@vitessce/description 3.9.2 → 3.9.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 +1885 -93
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import React__default, { useContext, useRef, useMemo, createContext,
|
|
2
|
+
import React__default, { useContext, forwardRef, useRef, useMemo, createContext, createElement, PureComponent, useEffect } from "react";
|
|
3
3
|
import { useLoaders, useCoordinationScopes, useCoordination, useDescription, useImageData, useReady, TitleInfo } from "@vitessce/vit-s";
|
|
4
4
|
import * as ReactDOM from "react-dom";
|
|
5
5
|
const ViewType = {
|
|
@@ -25,6 +25,7 @@ const ViewType = {
|
|
|
25
25
|
OBS_SET_COMPOSITION_BAR_PLOT: "obsSetCompositionBarPlot",
|
|
26
26
|
FEATURE_SET_ENRICHMENT_BAR_PLOT: "featureSetEnrichmentBarPlot",
|
|
27
27
|
BIOMARKER_SELECT: "biomarkerSelect",
|
|
28
|
+
BIOMARKER_SELECT_ALT: "biomarkerSelectAlt",
|
|
28
29
|
COMPARATIVE_HEADING: "comparativeHeading",
|
|
29
30
|
LINK_CONTROLLER: "linkController",
|
|
30
31
|
NEUROGLANCER: "neuroglancer",
|
|
@@ -788,6 +789,17 @@ const COMPONENT_COORDINATION_TYPES = {
|
|
|
788
789
|
CoordinationType.OBS_SET_FILTER
|
|
789
790
|
// TODO: create coordination types for internal state of the biomarker selection view?
|
|
790
791
|
],
|
|
792
|
+
[ViewType.BIOMARKER_SELECT_ALT]: [
|
|
793
|
+
CoordinationType.DATASET,
|
|
794
|
+
CoordinationType.OBS_TYPE,
|
|
795
|
+
CoordinationType.SAMPLE_TYPE,
|
|
796
|
+
CoordinationType.FEATURE_SELECTION,
|
|
797
|
+
CoordinationType.SAMPLE_SET_SELECTION,
|
|
798
|
+
CoordinationType.SAMPLE_SET_FILTER,
|
|
799
|
+
CoordinationType.OBS_SET_SELECTION,
|
|
800
|
+
CoordinationType.OBS_SET_FILTER
|
|
801
|
+
// TODO: create coordination types for internal state of the biomarker selection view?
|
|
802
|
+
],
|
|
791
803
|
[ViewType.COMPARATIVE_HEADING]: [
|
|
792
804
|
CoordinationType.DATASET,
|
|
793
805
|
CoordinationType.OBS_TYPE,
|
|
@@ -1226,9 +1238,9 @@ function parse$1(value, root2, parent, rule, rules, rulesets, pseudo, points, de
|
|
|
1226
1238
|
function ruleset(value, root2, parent, index2, offset2, rules, points, type, props, children, length2) {
|
|
1227
1239
|
var post = offset2 - 1;
|
|
1228
1240
|
var rule = offset2 === 0 ? rules : [""];
|
|
1229
|
-
var
|
|
1241
|
+
var size2 = sizeof(rule);
|
|
1230
1242
|
for (var i = 0, j = 0, k = 0; i < index2; ++i)
|
|
1231
|
-
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x <
|
|
1243
|
+
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size2; ++x)
|
|
1232
1244
|
if (z = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
|
|
1233
1245
|
props[k++] = z;
|
|
1234
1246
|
return node$1(value, root2, parent, offset2 === 0 ? RULESET : type, props, children, length2);
|
|
@@ -1281,9 +1293,9 @@ function rulesheet(callback) {
|
|
|
1281
1293
|
}
|
|
1282
1294
|
function memoize$1(fn) {
|
|
1283
1295
|
var cache = /* @__PURE__ */ Object.create(null);
|
|
1284
|
-
return function(
|
|
1285
|
-
if (cache[
|
|
1286
|
-
return cache[
|
|
1296
|
+
return function(arg2) {
|
|
1297
|
+
if (cache[arg2] === void 0) cache[arg2] = fn(arg2);
|
|
1298
|
+
return cache[arg2];
|
|
1287
1299
|
};
|
|
1288
1300
|
}
|
|
1289
1301
|
var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index2) {
|
|
@@ -1621,6 +1633,15 @@ var createCache = function createCache2(options) {
|
|
|
1621
1633
|
cache.sheet.hydrate(nodesToHydrate);
|
|
1622
1634
|
return cache;
|
|
1623
1635
|
};
|
|
1636
|
+
function _extends$2() {
|
|
1637
|
+
return _extends$2 = Object.assign ? Object.assign.bind() : function(n) {
|
|
1638
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
1639
|
+
var t = arguments[e];
|
|
1640
|
+
for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
|
|
1641
|
+
}
|
|
1642
|
+
return n;
|
|
1643
|
+
}, _extends$2.apply(null, arguments);
|
|
1644
|
+
}
|
|
1624
1645
|
function getDefaultExportFromCjs(x) {
|
|
1625
1646
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
1626
1647
|
}
|
|
@@ -1796,6 +1817,7 @@ function requireReactIs$1() {
|
|
|
1796
1817
|
}
|
|
1797
1818
|
return reactIs$1.exports;
|
|
1798
1819
|
}
|
|
1820
|
+
var isBrowser$1 = true;
|
|
1799
1821
|
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1800
1822
|
var rawClassName = "";
|
|
1801
1823
|
classNames.split(" ").forEach(function(className) {
|
|
@@ -1807,7 +1829,7 @@ function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
|
1807
1829
|
});
|
|
1808
1830
|
return rawClassName;
|
|
1809
1831
|
}
|
|
1810
|
-
var registerStyles = function registerStyles2(cache, serialized,
|
|
1832
|
+
var registerStyles = function registerStyles2(cache, serialized, isStringTag2) {
|
|
1811
1833
|
var className = cache.key + "-" + serialized.name;
|
|
1812
1834
|
if (
|
|
1813
1835
|
// we only need to add the styles to the registered cache if the
|
|
@@ -1815,13 +1837,17 @@ var registerStyles = function registerStyles2(cache, serialized, isStringTag) {
|
|
|
1815
1837
|
// the tree but if it's a string tag, we know it won't
|
|
1816
1838
|
// so we don't have to add it to registered cache.
|
|
1817
1839
|
// this improves memory usage since we can avoid storing the whole style string
|
|
1818
|
-
|
|
1840
|
+
(isStringTag2 === false || // we need to always store it if we're in compat mode and
|
|
1841
|
+
// in node since emotion-server relies on whether a style is in
|
|
1842
|
+
// the registered cache to know whether a style is global or not
|
|
1843
|
+
// also, note that this check will be dead code eliminated in the browser
|
|
1844
|
+
isBrowser$1 === false) && cache.registered[className] === void 0
|
|
1819
1845
|
) {
|
|
1820
1846
|
cache.registered[className] = serialized.styles;
|
|
1821
1847
|
}
|
|
1822
1848
|
};
|
|
1823
|
-
var insertStyles = function insertStyles2(cache, serialized,
|
|
1824
|
-
registerStyles(cache, serialized);
|
|
1849
|
+
var insertStyles = function insertStyles2(cache, serialized, isStringTag2) {
|
|
1850
|
+
registerStyles(cache, serialized, isStringTag2);
|
|
1825
1851
|
var className = cache.key + "-" + serialized.name;
|
|
1826
1852
|
if (cache.inserted[serialized.name] === void 0) {
|
|
1827
1853
|
var current = serialized;
|
|
@@ -1981,6 +2007,15 @@ function handleInterpolation(mergedProps, registered, interpolation) {
|
|
|
1981
2007
|
}
|
|
1982
2008
|
return createStringFromObject(mergedProps, registered, interpolation);
|
|
1983
2009
|
}
|
|
2010
|
+
case "function": {
|
|
2011
|
+
if (mergedProps !== void 0) {
|
|
2012
|
+
var previousCursor = cursor;
|
|
2013
|
+
var result = interpolation(mergedProps);
|
|
2014
|
+
cursor = previousCursor;
|
|
2015
|
+
return handleInterpolation(mergedProps, registered, result);
|
|
2016
|
+
}
|
|
2017
|
+
break;
|
|
2018
|
+
}
|
|
1984
2019
|
}
|
|
1985
2020
|
var asString = interpolation;
|
|
1986
2021
|
if (registered == null) {
|
|
@@ -2067,6 +2102,11 @@ function serializeStyles(args, registered, mergedProps) {
|
|
|
2067
2102
|
next: cursor
|
|
2068
2103
|
};
|
|
2069
2104
|
}
|
|
2105
|
+
var syncFallback = function syncFallback2(create2) {
|
|
2106
|
+
return create2();
|
|
2107
|
+
};
|
|
2108
|
+
var useInsertionEffect = React["useInsertionEffect"] ? React["useInsertionEffect"] : false;
|
|
2109
|
+
var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;
|
|
2070
2110
|
var EmotionCacheContext = /* @__PURE__ */ React.createContext(
|
|
2071
2111
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
2072
2112
|
// because this module is primarily intended for the browser and node
|
|
@@ -2082,6 +2122,12 @@ EmotionCacheContext.Provider;
|
|
|
2082
2122
|
var __unsafe_useEmotionCache = function useEmotionCache() {
|
|
2083
2123
|
return useContext(EmotionCacheContext);
|
|
2084
2124
|
};
|
|
2125
|
+
var withEmotionCache = function withEmotionCache2(func) {
|
|
2126
|
+
return /* @__PURE__ */ forwardRef(function(props, ref) {
|
|
2127
|
+
var cache = useContext(EmotionCacheContext);
|
|
2128
|
+
return func(props, cache, ref);
|
|
2129
|
+
});
|
|
2130
|
+
};
|
|
2085
2131
|
var ThemeContext = /* @__PURE__ */ React.createContext({});
|
|
2086
2132
|
const objectFromEntries = !Object.fromEntries ? (entries) => {
|
|
2087
2133
|
if (!entries || !entries[Symbol.iterator]) {
|
|
@@ -2110,24 +2156,24 @@ const classnames = (args) => {
|
|
|
2110
2156
|
let i = 0;
|
|
2111
2157
|
let cls = "";
|
|
2112
2158
|
for (; i < len; i++) {
|
|
2113
|
-
const
|
|
2114
|
-
if (
|
|
2159
|
+
const arg2 = args[i];
|
|
2160
|
+
if (arg2 == null)
|
|
2115
2161
|
continue;
|
|
2116
2162
|
let toAdd;
|
|
2117
|
-
switch (typeof
|
|
2163
|
+
switch (typeof arg2) {
|
|
2118
2164
|
case "boolean":
|
|
2119
2165
|
break;
|
|
2120
2166
|
case "object": {
|
|
2121
|
-
if (Array.isArray(
|
|
2122
|
-
toAdd = classnames(
|
|
2167
|
+
if (Array.isArray(arg2)) {
|
|
2168
|
+
toAdd = classnames(arg2);
|
|
2123
2169
|
} else {
|
|
2124
|
-
assert(!typeGuard(
|
|
2125
|
-
if (
|
|
2170
|
+
assert(!typeGuard(arg2, false));
|
|
2171
|
+
if (arg2.styles !== void 0 && arg2.name !== void 0) {
|
|
2126
2172
|
console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.");
|
|
2127
2173
|
}
|
|
2128
2174
|
toAdd = "";
|
|
2129
|
-
for (const k in
|
|
2130
|
-
if (
|
|
2175
|
+
for (const k in arg2) {
|
|
2176
|
+
if (arg2[k] && k) {
|
|
2131
2177
|
toAdd && (toAdd += " ");
|
|
2132
2178
|
toAdd += k;
|
|
2133
2179
|
}
|
|
@@ -2136,7 +2182,7 @@ const classnames = (args) => {
|
|
|
2136
2182
|
break;
|
|
2137
2183
|
}
|
|
2138
2184
|
default: {
|
|
2139
|
-
toAdd =
|
|
2185
|
+
toAdd = arg2;
|
|
2140
2186
|
}
|
|
2141
2187
|
}
|
|
2142
2188
|
if (toAdd) {
|
|
@@ -2157,8 +2203,8 @@ function useGuaranteedMemo(fn, deps) {
|
|
|
2157
2203
|
}
|
|
2158
2204
|
return ref.current.v;
|
|
2159
2205
|
}
|
|
2160
|
-
function matchCSSObject(
|
|
2161
|
-
return
|
|
2206
|
+
function matchCSSObject(arg2) {
|
|
2207
|
+
return arg2 instanceof Object && !("styles" in arg2) && !("length" in arg2) && !("__emotion_styles" in arg2);
|
|
2162
2208
|
}
|
|
2163
2209
|
const { createCssAndCx } = /* @__PURE__ */ (() => {
|
|
2164
2210
|
function merge2(registered, css, className) {
|
|
@@ -2173,14 +2219,14 @@ const { createCssAndCx } = /* @__PURE__ */ (() => {
|
|
|
2173
2219
|
const { cache } = params;
|
|
2174
2220
|
const css = (...args) => {
|
|
2175
2221
|
const serialized = serializeStyles(args, cache.registered);
|
|
2176
|
-
insertStyles(cache, serialized);
|
|
2222
|
+
insertStyles(cache, serialized, false);
|
|
2177
2223
|
const className = `${cache.key}-${serialized.name}`;
|
|
2178
2224
|
scope: {
|
|
2179
|
-
const
|
|
2180
|
-
if (!matchCSSObject(
|
|
2225
|
+
const arg2 = args[0];
|
|
2226
|
+
if (!matchCSSObject(arg2)) {
|
|
2181
2227
|
break scope;
|
|
2182
2228
|
}
|
|
2183
|
-
increaseSpecificityToTakePrecedenceOverMediaQueries.saveClassNameCSSObjectMapping(cache, className,
|
|
2229
|
+
increaseSpecificityToTakePrecedenceOverMediaQueries.saveClassNameCSSObjectMapping(cache, className, arg2);
|
|
2184
2230
|
}
|
|
2185
2231
|
return className;
|
|
2186
2232
|
};
|
|
@@ -2793,6 +2839,274 @@ const { tss: tss$1 } = createTss({
|
|
|
2793
2839
|
});
|
|
2794
2840
|
tss$1.create({});
|
|
2795
2841
|
const THEME_ID = "$$material";
|
|
2842
|
+
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|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)-.*))$/;
|
|
2843
|
+
var isPropValid = /* @__PURE__ */ memoize$1(
|
|
2844
|
+
function(prop) {
|
|
2845
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
2846
|
+
}
|
|
2847
|
+
/* Z+1 */
|
|
2848
|
+
);
|
|
2849
|
+
var testOmitPropsOnStringTag = isPropValid;
|
|
2850
|
+
var testOmitPropsOnComponent = function testOmitPropsOnComponent2(key) {
|
|
2851
|
+
return key !== "theme";
|
|
2852
|
+
};
|
|
2853
|
+
var getDefaultShouldForwardProp = function getDefaultShouldForwardProp2(tag) {
|
|
2854
|
+
return typeof tag === "string" && // 96 is one less than the char code
|
|
2855
|
+
// for "a" so this is checking that
|
|
2856
|
+
// it's a lowercase character
|
|
2857
|
+
tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
|
|
2858
|
+
};
|
|
2859
|
+
var composeShouldForwardProps = function composeShouldForwardProps2(tag, options, isReal) {
|
|
2860
|
+
var shouldForwardProp2;
|
|
2861
|
+
if (options) {
|
|
2862
|
+
var optionsShouldForwardProp = options.shouldForwardProp;
|
|
2863
|
+
shouldForwardProp2 = tag.__emotion_forwardProp && optionsShouldForwardProp ? function(propName) {
|
|
2864
|
+
return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
|
|
2865
|
+
} : optionsShouldForwardProp;
|
|
2866
|
+
}
|
|
2867
|
+
if (typeof shouldForwardProp2 !== "function" && isReal) {
|
|
2868
|
+
shouldForwardProp2 = tag.__emotion_forwardProp;
|
|
2869
|
+
}
|
|
2870
|
+
return shouldForwardProp2;
|
|
2871
|
+
};
|
|
2872
|
+
var Insertion = function Insertion2(_ref) {
|
|
2873
|
+
var cache = _ref.cache, serialized = _ref.serialized, isStringTag2 = _ref.isStringTag;
|
|
2874
|
+
registerStyles(cache, serialized, isStringTag2);
|
|
2875
|
+
useInsertionEffectAlwaysWithSyncFallback(function() {
|
|
2876
|
+
return insertStyles(cache, serialized, isStringTag2);
|
|
2877
|
+
});
|
|
2878
|
+
return null;
|
|
2879
|
+
};
|
|
2880
|
+
var createStyled$1 = function createStyled(tag, options) {
|
|
2881
|
+
var isReal = tag.__emotion_real === tag;
|
|
2882
|
+
var baseTag = isReal && tag.__emotion_base || tag;
|
|
2883
|
+
var identifierName;
|
|
2884
|
+
var targetClassName;
|
|
2885
|
+
if (options !== void 0) {
|
|
2886
|
+
identifierName = options.label;
|
|
2887
|
+
targetClassName = options.target;
|
|
2888
|
+
}
|
|
2889
|
+
var shouldForwardProp2 = composeShouldForwardProps(tag, options, isReal);
|
|
2890
|
+
var defaultShouldForwardProp = shouldForwardProp2 || getDefaultShouldForwardProp(baseTag);
|
|
2891
|
+
var shouldUseAs = !defaultShouldForwardProp("as");
|
|
2892
|
+
return function() {
|
|
2893
|
+
var args = arguments;
|
|
2894
|
+
var styles = isReal && tag.__emotion_styles !== void 0 ? tag.__emotion_styles.slice(0) : [];
|
|
2895
|
+
if (identifierName !== void 0) {
|
|
2896
|
+
styles.push("label:" + identifierName + ";");
|
|
2897
|
+
}
|
|
2898
|
+
if (args[0] == null || args[0].raw === void 0) {
|
|
2899
|
+
styles.push.apply(styles, args);
|
|
2900
|
+
} else {
|
|
2901
|
+
var templateStringsArr = args[0];
|
|
2902
|
+
styles.push(templateStringsArr[0]);
|
|
2903
|
+
var len = args.length;
|
|
2904
|
+
var i = 1;
|
|
2905
|
+
for (; i < len; i++) {
|
|
2906
|
+
styles.push(args[i], templateStringsArr[i]);
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
var Styled = withEmotionCache(function(props, cache, ref) {
|
|
2910
|
+
var FinalTag = shouldUseAs && props.as || baseTag;
|
|
2911
|
+
var className = "";
|
|
2912
|
+
var classInterpolations = [];
|
|
2913
|
+
var mergedProps = props;
|
|
2914
|
+
if (props.theme == null) {
|
|
2915
|
+
mergedProps = {};
|
|
2916
|
+
for (var key in props) {
|
|
2917
|
+
mergedProps[key] = props[key];
|
|
2918
|
+
}
|
|
2919
|
+
mergedProps.theme = React.useContext(ThemeContext);
|
|
2920
|
+
}
|
|
2921
|
+
if (typeof props.className === "string") {
|
|
2922
|
+
className = getRegisteredStyles(cache.registered, classInterpolations, props.className);
|
|
2923
|
+
} else if (props.className != null) {
|
|
2924
|
+
className = props.className + " ";
|
|
2925
|
+
}
|
|
2926
|
+
var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);
|
|
2927
|
+
className += cache.key + "-" + serialized.name;
|
|
2928
|
+
if (targetClassName !== void 0) {
|
|
2929
|
+
className += " " + targetClassName;
|
|
2930
|
+
}
|
|
2931
|
+
var finalShouldForwardProp = shouldUseAs && shouldForwardProp2 === void 0 ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
|
|
2932
|
+
var newProps = {};
|
|
2933
|
+
for (var _key in props) {
|
|
2934
|
+
if (shouldUseAs && _key === "as") continue;
|
|
2935
|
+
if (finalShouldForwardProp(_key)) {
|
|
2936
|
+
newProps[_key] = props[_key];
|
|
2937
|
+
}
|
|
2938
|
+
}
|
|
2939
|
+
newProps.className = className;
|
|
2940
|
+
if (ref) {
|
|
2941
|
+
newProps.ref = ref;
|
|
2942
|
+
}
|
|
2943
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Insertion, {
|
|
2944
|
+
cache,
|
|
2945
|
+
serialized,
|
|
2946
|
+
isStringTag: typeof FinalTag === "string"
|
|
2947
|
+
}), /* @__PURE__ */ React.createElement(FinalTag, newProps));
|
|
2948
|
+
});
|
|
2949
|
+
Styled.displayName = identifierName !== void 0 ? identifierName : "Styled(" + (typeof baseTag === "string" ? baseTag : baseTag.displayName || baseTag.name || "Component") + ")";
|
|
2950
|
+
Styled.defaultProps = tag.defaultProps;
|
|
2951
|
+
Styled.__emotion_real = Styled;
|
|
2952
|
+
Styled.__emotion_base = baseTag;
|
|
2953
|
+
Styled.__emotion_styles = styles;
|
|
2954
|
+
Styled.__emotion_forwardProp = shouldForwardProp2;
|
|
2955
|
+
Object.defineProperty(Styled, "toString", {
|
|
2956
|
+
value: function value() {
|
|
2957
|
+
return "." + targetClassName;
|
|
2958
|
+
}
|
|
2959
|
+
});
|
|
2960
|
+
Styled.withComponent = function(nextTag, nextOptions) {
|
|
2961
|
+
var newStyled2 = createStyled(nextTag, _extends$2({}, options, nextOptions, {
|
|
2962
|
+
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
|
|
2963
|
+
}));
|
|
2964
|
+
return newStyled2.apply(void 0, styles);
|
|
2965
|
+
};
|
|
2966
|
+
return Styled;
|
|
2967
|
+
};
|
|
2968
|
+
};
|
|
2969
|
+
var tags = [
|
|
2970
|
+
"a",
|
|
2971
|
+
"abbr",
|
|
2972
|
+
"address",
|
|
2973
|
+
"area",
|
|
2974
|
+
"article",
|
|
2975
|
+
"aside",
|
|
2976
|
+
"audio",
|
|
2977
|
+
"b",
|
|
2978
|
+
"base",
|
|
2979
|
+
"bdi",
|
|
2980
|
+
"bdo",
|
|
2981
|
+
"big",
|
|
2982
|
+
"blockquote",
|
|
2983
|
+
"body",
|
|
2984
|
+
"br",
|
|
2985
|
+
"button",
|
|
2986
|
+
"canvas",
|
|
2987
|
+
"caption",
|
|
2988
|
+
"cite",
|
|
2989
|
+
"code",
|
|
2990
|
+
"col",
|
|
2991
|
+
"colgroup",
|
|
2992
|
+
"data",
|
|
2993
|
+
"datalist",
|
|
2994
|
+
"dd",
|
|
2995
|
+
"del",
|
|
2996
|
+
"details",
|
|
2997
|
+
"dfn",
|
|
2998
|
+
"dialog",
|
|
2999
|
+
"div",
|
|
3000
|
+
"dl",
|
|
3001
|
+
"dt",
|
|
3002
|
+
"em",
|
|
3003
|
+
"embed",
|
|
3004
|
+
"fieldset",
|
|
3005
|
+
"figcaption",
|
|
3006
|
+
"figure",
|
|
3007
|
+
"footer",
|
|
3008
|
+
"form",
|
|
3009
|
+
"h1",
|
|
3010
|
+
"h2",
|
|
3011
|
+
"h3",
|
|
3012
|
+
"h4",
|
|
3013
|
+
"h5",
|
|
3014
|
+
"h6",
|
|
3015
|
+
"head",
|
|
3016
|
+
"header",
|
|
3017
|
+
"hgroup",
|
|
3018
|
+
"hr",
|
|
3019
|
+
"html",
|
|
3020
|
+
"i",
|
|
3021
|
+
"iframe",
|
|
3022
|
+
"img",
|
|
3023
|
+
"input",
|
|
3024
|
+
"ins",
|
|
3025
|
+
"kbd",
|
|
3026
|
+
"keygen",
|
|
3027
|
+
"label",
|
|
3028
|
+
"legend",
|
|
3029
|
+
"li",
|
|
3030
|
+
"link",
|
|
3031
|
+
"main",
|
|
3032
|
+
"map",
|
|
3033
|
+
"mark",
|
|
3034
|
+
"marquee",
|
|
3035
|
+
"menu",
|
|
3036
|
+
"menuitem",
|
|
3037
|
+
"meta",
|
|
3038
|
+
"meter",
|
|
3039
|
+
"nav",
|
|
3040
|
+
"noscript",
|
|
3041
|
+
"object",
|
|
3042
|
+
"ol",
|
|
3043
|
+
"optgroup",
|
|
3044
|
+
"option",
|
|
3045
|
+
"output",
|
|
3046
|
+
"p",
|
|
3047
|
+
"param",
|
|
3048
|
+
"picture",
|
|
3049
|
+
"pre",
|
|
3050
|
+
"progress",
|
|
3051
|
+
"q",
|
|
3052
|
+
"rp",
|
|
3053
|
+
"rt",
|
|
3054
|
+
"ruby",
|
|
3055
|
+
"s",
|
|
3056
|
+
"samp",
|
|
3057
|
+
"script",
|
|
3058
|
+
"section",
|
|
3059
|
+
"select",
|
|
3060
|
+
"small",
|
|
3061
|
+
"source",
|
|
3062
|
+
"span",
|
|
3063
|
+
"strong",
|
|
3064
|
+
"style",
|
|
3065
|
+
"sub",
|
|
3066
|
+
"summary",
|
|
3067
|
+
"sup",
|
|
3068
|
+
"table",
|
|
3069
|
+
"tbody",
|
|
3070
|
+
"td",
|
|
3071
|
+
"textarea",
|
|
3072
|
+
"tfoot",
|
|
3073
|
+
"th",
|
|
3074
|
+
"thead",
|
|
3075
|
+
"time",
|
|
3076
|
+
"title",
|
|
3077
|
+
"tr",
|
|
3078
|
+
"track",
|
|
3079
|
+
"u",
|
|
3080
|
+
"ul",
|
|
3081
|
+
"var",
|
|
3082
|
+
"video",
|
|
3083
|
+
"wbr",
|
|
3084
|
+
// SVG
|
|
3085
|
+
"circle",
|
|
3086
|
+
"clipPath",
|
|
3087
|
+
"defs",
|
|
3088
|
+
"ellipse",
|
|
3089
|
+
"foreignObject",
|
|
3090
|
+
"g",
|
|
3091
|
+
"image",
|
|
3092
|
+
"line",
|
|
3093
|
+
"linearGradient",
|
|
3094
|
+
"mask",
|
|
3095
|
+
"path",
|
|
3096
|
+
"pattern",
|
|
3097
|
+
"polygon",
|
|
3098
|
+
"polyline",
|
|
3099
|
+
"radialGradient",
|
|
3100
|
+
"rect",
|
|
3101
|
+
"stop",
|
|
3102
|
+
"svg",
|
|
3103
|
+
"text",
|
|
3104
|
+
"tspan"
|
|
3105
|
+
];
|
|
3106
|
+
var newStyled = createStyled$1.bind(null);
|
|
3107
|
+
tags.forEach(function(tagName) {
|
|
3108
|
+
newStyled[tagName] = newStyled(tagName);
|
|
3109
|
+
});
|
|
2796
3110
|
var propTypes = { exports: {} };
|
|
2797
3111
|
/*
|
|
2798
3112
|
object-assign
|
|
@@ -3501,7 +3815,7 @@ function requireReactJsxRuntime_development() {
|
|
|
3501
3815
|
}
|
|
3502
3816
|
return false;
|
|
3503
3817
|
}
|
|
3504
|
-
function
|
|
3818
|
+
function getWrappedName2(outerType, innerType, wrapperName) {
|
|
3505
3819
|
var displayName = outerType.displayName;
|
|
3506
3820
|
if (displayName) {
|
|
3507
3821
|
return displayName;
|
|
@@ -3550,7 +3864,7 @@ function requireReactJsxRuntime_development() {
|
|
|
3550
3864
|
var provider = type;
|
|
3551
3865
|
return getContextName(provider._context) + ".Provider";
|
|
3552
3866
|
case REACT_FORWARD_REF_TYPE:
|
|
3553
|
-
return
|
|
3867
|
+
return getWrappedName2(type, type.render, "ForwardRef");
|
|
3554
3868
|
case REACT_MEMO_TYPE:
|
|
3555
3869
|
var outerName = type.displayName || null;
|
|
3556
3870
|
if (outerName !== null) {
|
|
@@ -4302,6 +4616,30 @@ function requireJsxRuntime() {
|
|
|
4302
4616
|
return jsxRuntime.exports;
|
|
4303
4617
|
}
|
|
4304
4618
|
var jsxRuntimeExports = requireJsxRuntime();
|
|
4619
|
+
function styled$1(tag, options) {
|
|
4620
|
+
const stylesFactory = newStyled(tag, options);
|
|
4621
|
+
{
|
|
4622
|
+
return (...styles) => {
|
|
4623
|
+
const component = typeof tag === "string" ? `"${tag}"` : "component";
|
|
4624
|
+
if (styles.length === 0) {
|
|
4625
|
+
console.error([`MUI: Seems like you called \`styled(${component})()\` without a \`style\` argument.`, 'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join("\n"));
|
|
4626
|
+
} else if (styles.some((style2) => style2 === void 0)) {
|
|
4627
|
+
console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);
|
|
4628
|
+
}
|
|
4629
|
+
return stylesFactory(...styles);
|
|
4630
|
+
};
|
|
4631
|
+
}
|
|
4632
|
+
}
|
|
4633
|
+
function internal_mutateStyles(tag, processor) {
|
|
4634
|
+
if (Array.isArray(tag.__emotion_styles)) {
|
|
4635
|
+
tag.__emotion_styles = processor(tag.__emotion_styles);
|
|
4636
|
+
}
|
|
4637
|
+
}
|
|
4638
|
+
const wrapper = [];
|
|
4639
|
+
function internal_serializeStyles(styles) {
|
|
4640
|
+
wrapper[0] = styles;
|
|
4641
|
+
return serializeStyles(wrapper);
|
|
4642
|
+
}
|
|
4305
4643
|
var reactIs = { exports: {} };
|
|
4306
4644
|
var reactIs_development = {};
|
|
4307
4645
|
var hasRequiredReactIs_development;
|
|
@@ -4756,11 +5094,11 @@ function style$1(options) {
|
|
|
4756
5094
|
}
|
|
4757
5095
|
function memoize(fn) {
|
|
4758
5096
|
const cache = {};
|
|
4759
|
-
return (
|
|
4760
|
-
if (cache[
|
|
4761
|
-
cache[
|
|
5097
|
+
return (arg2) => {
|
|
5098
|
+
if (cache[arg2] === void 0) {
|
|
5099
|
+
cache[arg2] = fn(arg2);
|
|
4762
5100
|
}
|
|
4763
|
-
return cache[
|
|
5101
|
+
return cache[arg2];
|
|
4764
5102
|
};
|
|
4765
5103
|
}
|
|
4766
5104
|
const properties = {
|
|
@@ -5430,8 +5768,8 @@ function objectsHaveSameKeys(...objects) {
|
|
|
5430
5768
|
const union = new Set(allKeys);
|
|
5431
5769
|
return objects.every((object) => union.size === Object.keys(object).length);
|
|
5432
5770
|
}
|
|
5433
|
-
function callIfFn(maybeFn,
|
|
5434
|
-
return typeof maybeFn === "function" ? maybeFn(
|
|
5771
|
+
function callIfFn(maybeFn, arg2) {
|
|
5772
|
+
return typeof maybeFn === "function" ? maybeFn(arg2) : maybeFn;
|
|
5435
5773
|
}
|
|
5436
5774
|
function unstable_createStyleFunctionSx() {
|
|
5437
5775
|
function getThemeValue(prop, val, theme, config) {
|
|
@@ -5596,17 +5934,67 @@ function createTheme$1(options = {}, ...args) {
|
|
|
5596
5934
|
};
|
|
5597
5935
|
return muiTheme;
|
|
5598
5936
|
}
|
|
5599
|
-
function isObjectEmpty(obj) {
|
|
5937
|
+
function isObjectEmpty$1(obj) {
|
|
5600
5938
|
return Object.keys(obj).length === 0;
|
|
5601
5939
|
}
|
|
5602
5940
|
function useTheme$2(defaultTheme2 = null) {
|
|
5603
5941
|
const contextTheme = React.useContext(ThemeContext);
|
|
5604
|
-
return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme2 : contextTheme;
|
|
5942
|
+
return !contextTheme || isObjectEmpty$1(contextTheme) ? defaultTheme2 : contextTheme;
|
|
5605
5943
|
}
|
|
5606
|
-
const systemDefaultTheme = createTheme$1();
|
|
5607
|
-
function useTheme$1(defaultTheme2 = systemDefaultTheme) {
|
|
5944
|
+
const systemDefaultTheme$1 = createTheme$1();
|
|
5945
|
+
function useTheme$1(defaultTheme2 = systemDefaultTheme$1) {
|
|
5608
5946
|
return useTheme$2(defaultTheme2);
|
|
5609
5947
|
}
|
|
5948
|
+
const splitProps = (props) => {
|
|
5949
|
+
var _a;
|
|
5950
|
+
const result = {
|
|
5951
|
+
systemProps: {},
|
|
5952
|
+
otherProps: {}
|
|
5953
|
+
};
|
|
5954
|
+
const config = ((_a = props == null ? void 0 : props.theme) == null ? void 0 : _a.unstable_sxConfig) ?? defaultSxConfig;
|
|
5955
|
+
Object.keys(props).forEach((prop) => {
|
|
5956
|
+
if (config[prop]) {
|
|
5957
|
+
result.systemProps[prop] = props[prop];
|
|
5958
|
+
} else {
|
|
5959
|
+
result.otherProps[prop] = props[prop];
|
|
5960
|
+
}
|
|
5961
|
+
});
|
|
5962
|
+
return result;
|
|
5963
|
+
};
|
|
5964
|
+
function extendSxProp$1(props) {
|
|
5965
|
+
const {
|
|
5966
|
+
sx: inSx,
|
|
5967
|
+
...other
|
|
5968
|
+
} = props;
|
|
5969
|
+
const {
|
|
5970
|
+
systemProps,
|
|
5971
|
+
otherProps
|
|
5972
|
+
} = splitProps(other);
|
|
5973
|
+
let finalSx;
|
|
5974
|
+
if (Array.isArray(inSx)) {
|
|
5975
|
+
finalSx = [systemProps, ...inSx];
|
|
5976
|
+
} else if (typeof inSx === "function") {
|
|
5977
|
+
finalSx = (...args) => {
|
|
5978
|
+
const result = inSx(...args);
|
|
5979
|
+
if (!isPlainObject$1(result)) {
|
|
5980
|
+
return systemProps;
|
|
5981
|
+
}
|
|
5982
|
+
return {
|
|
5983
|
+
...systemProps,
|
|
5984
|
+
...result
|
|
5985
|
+
};
|
|
5986
|
+
};
|
|
5987
|
+
} else {
|
|
5988
|
+
finalSx = {
|
|
5989
|
+
...systemProps,
|
|
5990
|
+
...inSx
|
|
5991
|
+
};
|
|
5992
|
+
}
|
|
5993
|
+
return {
|
|
5994
|
+
...otherProps,
|
|
5995
|
+
sx: finalSx
|
|
5996
|
+
};
|
|
5997
|
+
}
|
|
5610
5998
|
const defaultGenerator = (componentName) => componentName;
|
|
5611
5999
|
const createClassNameGenerator = () => {
|
|
5612
6000
|
let generate = defaultGenerator;
|
|
@@ -5623,6 +6011,19 @@ const createClassNameGenerator = () => {
|
|
|
5623
6011
|
};
|
|
5624
6012
|
};
|
|
5625
6013
|
const ClassNameGenerator = createClassNameGenerator();
|
|
6014
|
+
function r(e) {
|
|
6015
|
+
var t, f, n = "";
|
|
6016
|
+
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
6017
|
+
else if ("object" == typeof e) if (Array.isArray(e)) {
|
|
6018
|
+
var o = e.length;
|
|
6019
|
+
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
|
|
6020
|
+
} else for (f in e) e[f] && (n && (n += " "), n += f);
|
|
6021
|
+
return n;
|
|
6022
|
+
}
|
|
6023
|
+
function clsx() {
|
|
6024
|
+
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
6025
|
+
return n;
|
|
6026
|
+
}
|
|
5626
6027
|
const globalStateClasses = {
|
|
5627
6028
|
active: "active",
|
|
5628
6029
|
checked: "checked",
|
|
@@ -5641,6 +6042,324 @@ function generateUtilityClass(componentName, slot, globalStatePrefix = "Mui") {
|
|
|
5641
6042
|
const globalStateClass = globalStateClasses[slot];
|
|
5642
6043
|
return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
|
|
5643
6044
|
}
|
|
6045
|
+
function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
|
|
6046
|
+
const result = {};
|
|
6047
|
+
slots.forEach((slot) => {
|
|
6048
|
+
result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
|
|
6049
|
+
});
|
|
6050
|
+
return result;
|
|
6051
|
+
}
|
|
6052
|
+
function getFunctionComponentName(Component, fallback = "") {
|
|
6053
|
+
return Component.displayName || Component.name || fallback;
|
|
6054
|
+
}
|
|
6055
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
6056
|
+
const functionName = getFunctionComponentName(innerType);
|
|
6057
|
+
return outerType.displayName || (functionName !== "" ? `${wrapperName}(${functionName})` : wrapperName);
|
|
6058
|
+
}
|
|
6059
|
+
function getDisplayName(Component) {
|
|
6060
|
+
if (Component == null) {
|
|
6061
|
+
return void 0;
|
|
6062
|
+
}
|
|
6063
|
+
if (typeof Component === "string") {
|
|
6064
|
+
return Component;
|
|
6065
|
+
}
|
|
6066
|
+
if (typeof Component === "function") {
|
|
6067
|
+
return getFunctionComponentName(Component, "Component");
|
|
6068
|
+
}
|
|
6069
|
+
if (typeof Component === "object") {
|
|
6070
|
+
switch (Component.$$typeof) {
|
|
6071
|
+
case reactIsExports.ForwardRef:
|
|
6072
|
+
return getWrappedName(Component, Component.render, "ForwardRef");
|
|
6073
|
+
case reactIsExports.Memo:
|
|
6074
|
+
return getWrappedName(Component, Component.type, "memo");
|
|
6075
|
+
default:
|
|
6076
|
+
return void 0;
|
|
6077
|
+
}
|
|
6078
|
+
}
|
|
6079
|
+
return void 0;
|
|
6080
|
+
}
|
|
6081
|
+
function preprocessStyles(input) {
|
|
6082
|
+
const {
|
|
6083
|
+
variants,
|
|
6084
|
+
...style2
|
|
6085
|
+
} = input;
|
|
6086
|
+
const result = {
|
|
6087
|
+
variants,
|
|
6088
|
+
style: internal_serializeStyles(style2),
|
|
6089
|
+
isProcessed: true
|
|
6090
|
+
};
|
|
6091
|
+
if (result.style === style2) {
|
|
6092
|
+
return result;
|
|
6093
|
+
}
|
|
6094
|
+
if (variants) {
|
|
6095
|
+
variants.forEach((variant) => {
|
|
6096
|
+
if (typeof variant.style !== "function") {
|
|
6097
|
+
variant.style = internal_serializeStyles(variant.style);
|
|
6098
|
+
}
|
|
6099
|
+
});
|
|
6100
|
+
}
|
|
6101
|
+
return result;
|
|
6102
|
+
}
|
|
6103
|
+
const systemDefaultTheme = createTheme$1();
|
|
6104
|
+
function shouldForwardProp(prop) {
|
|
6105
|
+
return prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as";
|
|
6106
|
+
}
|
|
6107
|
+
function defaultOverridesResolver(slot) {
|
|
6108
|
+
if (!slot) {
|
|
6109
|
+
return null;
|
|
6110
|
+
}
|
|
6111
|
+
return (_props, styles) => styles[slot];
|
|
6112
|
+
}
|
|
6113
|
+
function attachTheme(props, themeId, defaultTheme2) {
|
|
6114
|
+
props.theme = isObjectEmpty(props.theme) ? defaultTheme2 : props.theme[themeId] || props.theme;
|
|
6115
|
+
}
|
|
6116
|
+
function processStyle(props, style2) {
|
|
6117
|
+
const resolvedStyle = typeof style2 === "function" ? style2(props) : style2;
|
|
6118
|
+
if (Array.isArray(resolvedStyle)) {
|
|
6119
|
+
return resolvedStyle.flatMap((subStyle) => processStyle(props, subStyle));
|
|
6120
|
+
}
|
|
6121
|
+
if (Array.isArray(resolvedStyle == null ? void 0 : resolvedStyle.variants)) {
|
|
6122
|
+
let rootStyle;
|
|
6123
|
+
if (resolvedStyle.isProcessed) {
|
|
6124
|
+
rootStyle = resolvedStyle.style;
|
|
6125
|
+
} else {
|
|
6126
|
+
const {
|
|
6127
|
+
variants,
|
|
6128
|
+
...otherStyles
|
|
6129
|
+
} = resolvedStyle;
|
|
6130
|
+
rootStyle = otherStyles;
|
|
6131
|
+
}
|
|
6132
|
+
return processStyleVariants(props, resolvedStyle.variants, [rootStyle]);
|
|
6133
|
+
}
|
|
6134
|
+
if (resolvedStyle == null ? void 0 : resolvedStyle.isProcessed) {
|
|
6135
|
+
return resolvedStyle.style;
|
|
6136
|
+
}
|
|
6137
|
+
return resolvedStyle;
|
|
6138
|
+
}
|
|
6139
|
+
function processStyleVariants(props, variants, results = []) {
|
|
6140
|
+
var _a;
|
|
6141
|
+
let mergedState;
|
|
6142
|
+
variantLoop: for (let i = 0; i < variants.length; i += 1) {
|
|
6143
|
+
const variant = variants[i];
|
|
6144
|
+
if (typeof variant.props === "function") {
|
|
6145
|
+
mergedState ?? (mergedState = {
|
|
6146
|
+
...props,
|
|
6147
|
+
...props.ownerState,
|
|
6148
|
+
ownerState: props.ownerState
|
|
6149
|
+
});
|
|
6150
|
+
if (!variant.props(mergedState)) {
|
|
6151
|
+
continue;
|
|
6152
|
+
}
|
|
6153
|
+
} else {
|
|
6154
|
+
for (const key in variant.props) {
|
|
6155
|
+
if (props[key] !== variant.props[key] && ((_a = props.ownerState) == null ? void 0 : _a[key]) !== variant.props[key]) {
|
|
6156
|
+
continue variantLoop;
|
|
6157
|
+
}
|
|
6158
|
+
}
|
|
6159
|
+
}
|
|
6160
|
+
if (typeof variant.style === "function") {
|
|
6161
|
+
mergedState ?? (mergedState = {
|
|
6162
|
+
...props,
|
|
6163
|
+
...props.ownerState,
|
|
6164
|
+
ownerState: props.ownerState
|
|
6165
|
+
});
|
|
6166
|
+
results.push(variant.style(mergedState));
|
|
6167
|
+
} else {
|
|
6168
|
+
results.push(variant.style);
|
|
6169
|
+
}
|
|
6170
|
+
}
|
|
6171
|
+
return results;
|
|
6172
|
+
}
|
|
6173
|
+
function createStyled2(input = {}) {
|
|
6174
|
+
const {
|
|
6175
|
+
themeId,
|
|
6176
|
+
defaultTheme: defaultTheme2 = systemDefaultTheme,
|
|
6177
|
+
rootShouldForwardProp: rootShouldForwardProp2 = shouldForwardProp,
|
|
6178
|
+
slotShouldForwardProp: slotShouldForwardProp2 = shouldForwardProp
|
|
6179
|
+
} = input;
|
|
6180
|
+
function styleAttachTheme(props) {
|
|
6181
|
+
attachTheme(props, themeId, defaultTheme2);
|
|
6182
|
+
}
|
|
6183
|
+
const styled2 = (tag, inputOptions = {}) => {
|
|
6184
|
+
internal_mutateStyles(tag, (styles) => styles.filter((style2) => style2 !== styleFunctionSx));
|
|
6185
|
+
const {
|
|
6186
|
+
name: componentName,
|
|
6187
|
+
slot: componentSlot,
|
|
6188
|
+
skipVariantsResolver: inputSkipVariantsResolver,
|
|
6189
|
+
skipSx: inputSkipSx,
|
|
6190
|
+
// TODO v6: remove `lowercaseFirstLetter()` in the next major release
|
|
6191
|
+
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
6192
|
+
overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),
|
|
6193
|
+
...options
|
|
6194
|
+
} = inputOptions;
|
|
6195
|
+
const skipVariantsResolver = inputSkipVariantsResolver !== void 0 ? inputSkipVariantsResolver : (
|
|
6196
|
+
// TODO v6: remove `Root` in the next major release
|
|
6197
|
+
// For more details: https://github.com/mui/material-ui/pull/37908
|
|
6198
|
+
componentSlot && componentSlot !== "Root" && componentSlot !== "root" || false
|
|
6199
|
+
);
|
|
6200
|
+
const skipSx = inputSkipSx || false;
|
|
6201
|
+
let shouldForwardPropOption = shouldForwardProp;
|
|
6202
|
+
if (componentSlot === "Root" || componentSlot === "root") {
|
|
6203
|
+
shouldForwardPropOption = rootShouldForwardProp2;
|
|
6204
|
+
} else if (componentSlot) {
|
|
6205
|
+
shouldForwardPropOption = slotShouldForwardProp2;
|
|
6206
|
+
} else if (isStringTag(tag)) {
|
|
6207
|
+
shouldForwardPropOption = void 0;
|
|
6208
|
+
}
|
|
6209
|
+
const defaultStyledResolver = styled$1(tag, {
|
|
6210
|
+
shouldForwardProp: shouldForwardPropOption,
|
|
6211
|
+
label: generateStyledLabel(componentName, componentSlot),
|
|
6212
|
+
...options
|
|
6213
|
+
});
|
|
6214
|
+
const transformStyle = (style2) => {
|
|
6215
|
+
if (typeof style2 === "function" && style2.__emotion_real !== style2) {
|
|
6216
|
+
return function styleFunctionProcessor(props) {
|
|
6217
|
+
return processStyle(props, style2);
|
|
6218
|
+
};
|
|
6219
|
+
}
|
|
6220
|
+
if (isPlainObject$1(style2)) {
|
|
6221
|
+
const serialized = preprocessStyles(style2);
|
|
6222
|
+
if (!serialized.variants) {
|
|
6223
|
+
return serialized.style;
|
|
6224
|
+
}
|
|
6225
|
+
return function styleObjectProcessor(props) {
|
|
6226
|
+
return processStyle(props, serialized);
|
|
6227
|
+
};
|
|
6228
|
+
}
|
|
6229
|
+
return style2;
|
|
6230
|
+
};
|
|
6231
|
+
const muiStyledResolver = (...expressionsInput) => {
|
|
6232
|
+
const expressionsHead = [];
|
|
6233
|
+
const expressionsBody = expressionsInput.map(transformStyle);
|
|
6234
|
+
const expressionsTail = [];
|
|
6235
|
+
expressionsHead.push(styleAttachTheme);
|
|
6236
|
+
if (componentName && overridesResolver) {
|
|
6237
|
+
expressionsTail.push(function styleThemeOverrides(props) {
|
|
6238
|
+
var _a, _b;
|
|
6239
|
+
const theme = props.theme;
|
|
6240
|
+
const styleOverrides = (_b = (_a = theme.components) == null ? void 0 : _a[componentName]) == null ? void 0 : _b.styleOverrides;
|
|
6241
|
+
if (!styleOverrides) {
|
|
6242
|
+
return null;
|
|
6243
|
+
}
|
|
6244
|
+
const resolvedStyleOverrides = {};
|
|
6245
|
+
for (const slotKey in styleOverrides) {
|
|
6246
|
+
resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]);
|
|
6247
|
+
}
|
|
6248
|
+
return overridesResolver(props, resolvedStyleOverrides);
|
|
6249
|
+
});
|
|
6250
|
+
}
|
|
6251
|
+
if (componentName && !skipVariantsResolver) {
|
|
6252
|
+
expressionsTail.push(function styleThemeVariants(props) {
|
|
6253
|
+
var _a, _b;
|
|
6254
|
+
const theme = props.theme;
|
|
6255
|
+
const themeVariants = (_b = (_a = theme == null ? void 0 : theme.components) == null ? void 0 : _a[componentName]) == null ? void 0 : _b.variants;
|
|
6256
|
+
if (!themeVariants) {
|
|
6257
|
+
return null;
|
|
6258
|
+
}
|
|
6259
|
+
return processStyleVariants(props, themeVariants);
|
|
6260
|
+
});
|
|
6261
|
+
}
|
|
6262
|
+
if (!skipSx) {
|
|
6263
|
+
expressionsTail.push(styleFunctionSx);
|
|
6264
|
+
}
|
|
6265
|
+
if (Array.isArray(expressionsBody[0])) {
|
|
6266
|
+
const inputStrings = expressionsBody.shift();
|
|
6267
|
+
const placeholdersHead = new Array(expressionsHead.length).fill("");
|
|
6268
|
+
const placeholdersTail = new Array(expressionsTail.length).fill("");
|
|
6269
|
+
let outputStrings;
|
|
6270
|
+
{
|
|
6271
|
+
outputStrings = [...placeholdersHead, ...inputStrings, ...placeholdersTail];
|
|
6272
|
+
outputStrings.raw = [...placeholdersHead, ...inputStrings.raw, ...placeholdersTail];
|
|
6273
|
+
}
|
|
6274
|
+
expressionsHead.unshift(outputStrings);
|
|
6275
|
+
}
|
|
6276
|
+
const expressions = [...expressionsHead, ...expressionsBody, ...expressionsTail];
|
|
6277
|
+
const Component = defaultStyledResolver(...expressions);
|
|
6278
|
+
if (tag.muiName) {
|
|
6279
|
+
Component.muiName = tag.muiName;
|
|
6280
|
+
}
|
|
6281
|
+
{
|
|
6282
|
+
Component.displayName = generateDisplayName(componentName, componentSlot, tag);
|
|
6283
|
+
}
|
|
6284
|
+
return Component;
|
|
6285
|
+
};
|
|
6286
|
+
if (defaultStyledResolver.withConfig) {
|
|
6287
|
+
muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
|
|
6288
|
+
}
|
|
6289
|
+
return muiStyledResolver;
|
|
6290
|
+
};
|
|
6291
|
+
return styled2;
|
|
6292
|
+
}
|
|
6293
|
+
function generateDisplayName(componentName, componentSlot, tag) {
|
|
6294
|
+
if (componentName) {
|
|
6295
|
+
return `${componentName}${capitalize(componentSlot || "")}`;
|
|
6296
|
+
}
|
|
6297
|
+
return `Styled(${getDisplayName(tag)})`;
|
|
6298
|
+
}
|
|
6299
|
+
function generateStyledLabel(componentName, componentSlot) {
|
|
6300
|
+
let label;
|
|
6301
|
+
{
|
|
6302
|
+
if (componentName) {
|
|
6303
|
+
label = `${componentName}-${lowercaseFirstLetter(componentSlot || "Root")}`;
|
|
6304
|
+
}
|
|
6305
|
+
}
|
|
6306
|
+
return label;
|
|
6307
|
+
}
|
|
6308
|
+
function isObjectEmpty(object) {
|
|
6309
|
+
for (const _ in object) {
|
|
6310
|
+
return false;
|
|
6311
|
+
}
|
|
6312
|
+
return true;
|
|
6313
|
+
}
|
|
6314
|
+
function isStringTag(tag) {
|
|
6315
|
+
return typeof tag === "string" && // 96 is one less than the char code
|
|
6316
|
+
// for "a" so this is checking that
|
|
6317
|
+
// it's a lowercase character
|
|
6318
|
+
tag.charCodeAt(0) > 96;
|
|
6319
|
+
}
|
|
6320
|
+
function lowercaseFirstLetter(string2) {
|
|
6321
|
+
if (!string2) {
|
|
6322
|
+
return string2;
|
|
6323
|
+
}
|
|
6324
|
+
return string2.charAt(0).toLowerCase() + string2.slice(1);
|
|
6325
|
+
}
|
|
6326
|
+
function resolveProps(defaultProps, props) {
|
|
6327
|
+
const output = {
|
|
6328
|
+
...props
|
|
6329
|
+
};
|
|
6330
|
+
for (const key in defaultProps) {
|
|
6331
|
+
if (Object.prototype.hasOwnProperty.call(defaultProps, key)) {
|
|
6332
|
+
const propName = key;
|
|
6333
|
+
if (propName === "components" || propName === "slots") {
|
|
6334
|
+
output[propName] = {
|
|
6335
|
+
...defaultProps[propName],
|
|
6336
|
+
...output[propName]
|
|
6337
|
+
};
|
|
6338
|
+
} else if (propName === "componentsProps" || propName === "slotProps") {
|
|
6339
|
+
const defaultSlotProps = defaultProps[propName];
|
|
6340
|
+
const slotProps = props[propName];
|
|
6341
|
+
if (!slotProps) {
|
|
6342
|
+
output[propName] = defaultSlotProps || {};
|
|
6343
|
+
} else if (!defaultSlotProps) {
|
|
6344
|
+
output[propName] = slotProps;
|
|
6345
|
+
} else {
|
|
6346
|
+
output[propName] = {
|
|
6347
|
+
...slotProps
|
|
6348
|
+
};
|
|
6349
|
+
for (const slotKey in defaultSlotProps) {
|
|
6350
|
+
if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {
|
|
6351
|
+
const slotPropName = slotKey;
|
|
6352
|
+
output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
|
|
6353
|
+
}
|
|
6354
|
+
}
|
|
6355
|
+
}
|
|
6356
|
+
} else if (output[propName] === void 0) {
|
|
6357
|
+
output[propName] = defaultProps[propName];
|
|
6358
|
+
}
|
|
6359
|
+
}
|
|
6360
|
+
}
|
|
6361
|
+
return output;
|
|
6362
|
+
}
|
|
5644
6363
|
const useEnhancedEffect$1 = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
|
|
5645
6364
|
function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {
|
|
5646
6365
|
return Math.max(min, Math.min(val, max));
|
|
@@ -5861,6 +6580,69 @@ function exactProp(propTypes2) {
|
|
|
5861
6580
|
}
|
|
5862
6581
|
};
|
|
5863
6582
|
}
|
|
6583
|
+
const PropsContext = /* @__PURE__ */ React.createContext(void 0);
|
|
6584
|
+
({
|
|
6585
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
6586
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
6587
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
6588
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
6589
|
+
/**
|
|
6590
|
+
* @ignore
|
|
6591
|
+
*/
|
|
6592
|
+
children: PropTypes.node,
|
|
6593
|
+
/**
|
|
6594
|
+
* @ignore
|
|
6595
|
+
*/
|
|
6596
|
+
value: PropTypes.object
|
|
6597
|
+
});
|
|
6598
|
+
function getThemeProps(params) {
|
|
6599
|
+
const {
|
|
6600
|
+
theme,
|
|
6601
|
+
name: name2,
|
|
6602
|
+
props
|
|
6603
|
+
} = params;
|
|
6604
|
+
if (!theme || !theme.components || !theme.components[name2]) {
|
|
6605
|
+
return props;
|
|
6606
|
+
}
|
|
6607
|
+
const config = theme.components[name2];
|
|
6608
|
+
if (config.defaultProps) {
|
|
6609
|
+
return resolveProps(config.defaultProps, props);
|
|
6610
|
+
}
|
|
6611
|
+
if (!config.styleOverrides && !config.variants) {
|
|
6612
|
+
return resolveProps(config, props);
|
|
6613
|
+
}
|
|
6614
|
+
return props;
|
|
6615
|
+
}
|
|
6616
|
+
function useDefaultProps$1({
|
|
6617
|
+
props,
|
|
6618
|
+
name: name2
|
|
6619
|
+
}) {
|
|
6620
|
+
const ctx = React.useContext(PropsContext);
|
|
6621
|
+
return getThemeProps({
|
|
6622
|
+
props,
|
|
6623
|
+
name: name2,
|
|
6624
|
+
theme: {
|
|
6625
|
+
components: ctx
|
|
6626
|
+
}
|
|
6627
|
+
});
|
|
6628
|
+
}
|
|
6629
|
+
const arg = {
|
|
6630
|
+
theme: void 0
|
|
6631
|
+
};
|
|
6632
|
+
function unstable_memoTheme(styleFn) {
|
|
6633
|
+
let lastValue;
|
|
6634
|
+
let lastTheme;
|
|
6635
|
+
return function styleMemoized(props) {
|
|
6636
|
+
let value = lastValue;
|
|
6637
|
+
if (value === void 0 || props.theme !== lastTheme) {
|
|
6638
|
+
arg.theme = props.theme;
|
|
6639
|
+
value = preprocessStyles(styleFn(arg));
|
|
6640
|
+
lastValue = value;
|
|
6641
|
+
lastTheme = props.theme;
|
|
6642
|
+
}
|
|
6643
|
+
return value;
|
|
6644
|
+
};
|
|
6645
|
+
}
|
|
5864
6646
|
function createGetCssVar$1(prefix2 = "") {
|
|
5865
6647
|
function appendVar(...vars) {
|
|
5866
6648
|
if (!vars.length) {
|
|
@@ -6129,6 +6911,26 @@ function createGetColorSchemeSelector(selector) {
|
|
|
6129
6911
|
return "&";
|
|
6130
6912
|
};
|
|
6131
6913
|
}
|
|
6914
|
+
function composeClasses(slots, getUtilityClass, classes = void 0) {
|
|
6915
|
+
const output = {};
|
|
6916
|
+
for (const slotName in slots) {
|
|
6917
|
+
const slot = slots[slotName];
|
|
6918
|
+
let buffer = "";
|
|
6919
|
+
let start = true;
|
|
6920
|
+
for (let i = 0; i < slot.length; i += 1) {
|
|
6921
|
+
const value = slot[i];
|
|
6922
|
+
if (value) {
|
|
6923
|
+
buffer += (start === true ? "" : " ") + getUtilityClass(value);
|
|
6924
|
+
start = false;
|
|
6925
|
+
if (classes && classes[value]) {
|
|
6926
|
+
buffer += " " + classes[value];
|
|
6927
|
+
}
|
|
6928
|
+
}
|
|
6929
|
+
}
|
|
6930
|
+
output[slotName] = buffer;
|
|
6931
|
+
}
|
|
6932
|
+
return output;
|
|
6933
|
+
}
|
|
6132
6934
|
const common = {
|
|
6133
6935
|
black: "#000",
|
|
6134
6936
|
white: "#fff"
|
|
@@ -6555,17 +7357,17 @@ function createTypography(palette, typography) {
|
|
|
6555
7357
|
}
|
|
6556
7358
|
}
|
|
6557
7359
|
const coef = fontSize / 14;
|
|
6558
|
-
const pxToRem = pxToRem2 || ((
|
|
6559
|
-
const buildVariant = (fontWeight,
|
|
7360
|
+
const pxToRem = pxToRem2 || ((size2) => `${size2 / htmlFontSize * coef}rem`);
|
|
7361
|
+
const buildVariant = (fontWeight, size2, lineHeight, letterSpacing, casing) => ({
|
|
6560
7362
|
fontFamily,
|
|
6561
7363
|
fontWeight,
|
|
6562
|
-
fontSize: pxToRem(
|
|
7364
|
+
fontSize: pxToRem(size2),
|
|
6563
7365
|
// Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
|
|
6564
7366
|
lineHeight,
|
|
6565
7367
|
// The letter spacing was designed for the Roboto font-family. Using the same letter-spacing
|
|
6566
7368
|
// across font-families can cause issues with the kerning.
|
|
6567
7369
|
...fontFamily === defaultFontFamily ? {
|
|
6568
|
-
letterSpacing: `${round(letterSpacing /
|
|
7370
|
+
letterSpacing: `${round(letterSpacing / size2)}em`
|
|
6569
7371
|
} : {},
|
|
6570
7372
|
...casing,
|
|
6571
7373
|
...allVariants
|
|
@@ -7356,6 +8158,15 @@ function useTheme() {
|
|
|
7356
8158
|
}
|
|
7357
8159
|
return theme[THEME_ID] || theme;
|
|
7358
8160
|
}
|
|
8161
|
+
function slotShouldForwardProp(prop) {
|
|
8162
|
+
return prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as";
|
|
8163
|
+
}
|
|
8164
|
+
const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes";
|
|
8165
|
+
const styled = createStyled2({
|
|
8166
|
+
themeId: THEME_ID,
|
|
8167
|
+
defaultTheme,
|
|
8168
|
+
rootShouldForwardProp
|
|
8169
|
+
});
|
|
7359
8170
|
const { makeStyles } = createMakeAndWithStyles({
|
|
7360
8171
|
useTheme
|
|
7361
8172
|
});
|
|
@@ -7367,6 +8178,27 @@ const { tss } = createTss({
|
|
|
7367
8178
|
"usePlugin": useMuiThemeStyleOverridesPlugin
|
|
7368
8179
|
});
|
|
7369
8180
|
const useStyles$1 = tss.create({});
|
|
8181
|
+
function internal_createExtendSxProp() {
|
|
8182
|
+
return extendSxProp$1;
|
|
8183
|
+
}
|
|
8184
|
+
const memoTheme = unstable_memoTheme;
|
|
8185
|
+
({
|
|
8186
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
8187
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
8188
|
+
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
8189
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
8190
|
+
/**
|
|
8191
|
+
* @ignore
|
|
8192
|
+
*/
|
|
8193
|
+
children: PropTypes.node,
|
|
8194
|
+
/**
|
|
8195
|
+
* @ignore
|
|
8196
|
+
*/
|
|
8197
|
+
value: PropTypes.object.isRequired
|
|
8198
|
+
});
|
|
8199
|
+
function useDefaultProps(params) {
|
|
8200
|
+
return useDefaultProps$1(params);
|
|
8201
|
+
}
|
|
7370
8202
|
function setRef$1(ref, value) {
|
|
7371
8203
|
if (typeof ref === "function") {
|
|
7372
8204
|
ref(value);
|
|
@@ -7412,6 +8244,44 @@ function useForkRef$1(...refs) {
|
|
|
7412
8244
|
};
|
|
7413
8245
|
}, refs);
|
|
7414
8246
|
}
|
|
8247
|
+
function _extends$1() {
|
|
8248
|
+
return _extends$1 = Object.assign ? Object.assign.bind() : function(n) {
|
|
8249
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
8250
|
+
var t = arguments[e];
|
|
8251
|
+
for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
|
|
8252
|
+
}
|
|
8253
|
+
return n;
|
|
8254
|
+
}, _extends$1.apply(null, arguments);
|
|
8255
|
+
}
|
|
8256
|
+
function _setPrototypeOf(t, e) {
|
|
8257
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e2) {
|
|
8258
|
+
return t2.__proto__ = e2, t2;
|
|
8259
|
+
}, _setPrototypeOf(t, e);
|
|
8260
|
+
}
|
|
8261
|
+
function _inheritsLoose(t, o) {
|
|
8262
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
8263
|
+
}
|
|
8264
|
+
function _assertThisInitialized(e) {
|
|
8265
|
+
if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
8266
|
+
return e;
|
|
8267
|
+
}
|
|
8268
|
+
function hasCorrectMainProperty(obj) {
|
|
8269
|
+
return typeof obj.main === "string";
|
|
8270
|
+
}
|
|
8271
|
+
function checkSimplePaletteColorValues(obj, additionalPropertiesToCheck = []) {
|
|
8272
|
+
if (!hasCorrectMainProperty(obj)) {
|
|
8273
|
+
return false;
|
|
8274
|
+
}
|
|
8275
|
+
for (const value of additionalPropertiesToCheck) {
|
|
8276
|
+
if (!obj.hasOwnProperty(value) || typeof obj[value] !== "string") {
|
|
8277
|
+
return false;
|
|
8278
|
+
}
|
|
8279
|
+
}
|
|
8280
|
+
return true;
|
|
8281
|
+
}
|
|
8282
|
+
function createSimplePaletteValueFilter(additionalPropertiesToCheck = []) {
|
|
8283
|
+
return ([, value]) => value && checkSimplePaletteColorValues(value, additionalPropertiesToCheck);
|
|
8284
|
+
}
|
|
7415
8285
|
function HTMLElementType(props, propName, componentName, location, propFullName) {
|
|
7416
8286
|
const propValue = props[propName];
|
|
7417
8287
|
const safePropName = propFullName || propName;
|
|
@@ -7495,6 +8365,266 @@ Portal.propTypes = {
|
|
|
7495
8365
|
{
|
|
7496
8366
|
Portal["propTypes"] = exactProp(Portal.propTypes);
|
|
7497
8367
|
}
|
|
8368
|
+
function getTypographyUtilityClass(slot) {
|
|
8369
|
+
return generateUtilityClass("MuiTypography", slot);
|
|
8370
|
+
}
|
|
8371
|
+
generateUtilityClasses("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
|
|
8372
|
+
const v6Colors = {
|
|
8373
|
+
primary: true,
|
|
8374
|
+
secondary: true,
|
|
8375
|
+
error: true,
|
|
8376
|
+
info: true,
|
|
8377
|
+
success: true,
|
|
8378
|
+
warning: true,
|
|
8379
|
+
textPrimary: true,
|
|
8380
|
+
textSecondary: true,
|
|
8381
|
+
textDisabled: true
|
|
8382
|
+
};
|
|
8383
|
+
const extendSxProp = internal_createExtendSxProp();
|
|
8384
|
+
const useUtilityClasses = (ownerState) => {
|
|
8385
|
+
const {
|
|
8386
|
+
align,
|
|
8387
|
+
gutterBottom,
|
|
8388
|
+
noWrap,
|
|
8389
|
+
paragraph: paragraph2,
|
|
8390
|
+
variant,
|
|
8391
|
+
classes
|
|
8392
|
+
} = ownerState;
|
|
8393
|
+
const slots = {
|
|
8394
|
+
root: ["root", variant, ownerState.align !== "inherit" && `align${capitalize(align)}`, gutterBottom && "gutterBottom", noWrap && "noWrap", paragraph2 && "paragraph"]
|
|
8395
|
+
};
|
|
8396
|
+
return composeClasses(slots, getTypographyUtilityClass, classes);
|
|
8397
|
+
};
|
|
8398
|
+
const TypographyRoot = styled("span", {
|
|
8399
|
+
name: "MuiTypography",
|
|
8400
|
+
slot: "Root",
|
|
8401
|
+
overridesResolver: (props, styles) => {
|
|
8402
|
+
const {
|
|
8403
|
+
ownerState
|
|
8404
|
+
} = props;
|
|
8405
|
+
return [styles.root, ownerState.variant && styles[ownerState.variant], ownerState.align !== "inherit" && styles[`align${capitalize(ownerState.align)}`], ownerState.noWrap && styles.noWrap, ownerState.gutterBottom && styles.gutterBottom, ownerState.paragraph && styles.paragraph];
|
|
8406
|
+
}
|
|
8407
|
+
})(memoTheme(({
|
|
8408
|
+
theme
|
|
8409
|
+
}) => {
|
|
8410
|
+
var _a;
|
|
8411
|
+
return {
|
|
8412
|
+
margin: 0,
|
|
8413
|
+
variants: [{
|
|
8414
|
+
props: {
|
|
8415
|
+
variant: "inherit"
|
|
8416
|
+
},
|
|
8417
|
+
style: {
|
|
8418
|
+
// Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
|
|
8419
|
+
font: "inherit",
|
|
8420
|
+
lineHeight: "inherit",
|
|
8421
|
+
letterSpacing: "inherit"
|
|
8422
|
+
}
|
|
8423
|
+
}, ...Object.entries(theme.typography).filter(([variant, value]) => variant !== "inherit" && value && typeof value === "object").map(([variant, value]) => ({
|
|
8424
|
+
props: {
|
|
8425
|
+
variant
|
|
8426
|
+
},
|
|
8427
|
+
style: value
|
|
8428
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color2]) => ({
|
|
8429
|
+
props: {
|
|
8430
|
+
color: color2
|
|
8431
|
+
},
|
|
8432
|
+
style: {
|
|
8433
|
+
color: (theme.vars || theme).palette[color2].main
|
|
8434
|
+
}
|
|
8435
|
+
})), ...Object.entries(((_a = theme.palette) == null ? void 0 : _a.text) || {}).filter(([, value]) => typeof value === "string").map(([color2]) => ({
|
|
8436
|
+
props: {
|
|
8437
|
+
color: `text${capitalize(color2)}`
|
|
8438
|
+
},
|
|
8439
|
+
style: {
|
|
8440
|
+
color: (theme.vars || theme).palette.text[color2]
|
|
8441
|
+
}
|
|
8442
|
+
})), {
|
|
8443
|
+
props: ({
|
|
8444
|
+
ownerState
|
|
8445
|
+
}) => ownerState.align !== "inherit",
|
|
8446
|
+
style: {
|
|
8447
|
+
textAlign: "var(--Typography-textAlign)"
|
|
8448
|
+
}
|
|
8449
|
+
}, {
|
|
8450
|
+
props: ({
|
|
8451
|
+
ownerState
|
|
8452
|
+
}) => ownerState.noWrap,
|
|
8453
|
+
style: {
|
|
8454
|
+
overflow: "hidden",
|
|
8455
|
+
textOverflow: "ellipsis",
|
|
8456
|
+
whiteSpace: "nowrap"
|
|
8457
|
+
}
|
|
8458
|
+
}, {
|
|
8459
|
+
props: ({
|
|
8460
|
+
ownerState
|
|
8461
|
+
}) => ownerState.gutterBottom,
|
|
8462
|
+
style: {
|
|
8463
|
+
marginBottom: "0.35em"
|
|
8464
|
+
}
|
|
8465
|
+
}, {
|
|
8466
|
+
props: ({
|
|
8467
|
+
ownerState
|
|
8468
|
+
}) => ownerState.paragraph,
|
|
8469
|
+
style: {
|
|
8470
|
+
marginBottom: 16
|
|
8471
|
+
}
|
|
8472
|
+
}]
|
|
8473
|
+
};
|
|
8474
|
+
}));
|
|
8475
|
+
const defaultVariantMapping = {
|
|
8476
|
+
h1: "h1",
|
|
8477
|
+
h2: "h2",
|
|
8478
|
+
h3: "h3",
|
|
8479
|
+
h4: "h4",
|
|
8480
|
+
h5: "h5",
|
|
8481
|
+
h6: "h6",
|
|
8482
|
+
subtitle1: "h6",
|
|
8483
|
+
subtitle2: "h6",
|
|
8484
|
+
body1: "p",
|
|
8485
|
+
body2: "p",
|
|
8486
|
+
inherit: "p"
|
|
8487
|
+
};
|
|
8488
|
+
const Typography = /* @__PURE__ */ React.forwardRef(function Typography2(inProps, ref) {
|
|
8489
|
+
const {
|
|
8490
|
+
color: color2,
|
|
8491
|
+
...themeProps
|
|
8492
|
+
} = useDefaultProps({
|
|
8493
|
+
props: inProps,
|
|
8494
|
+
name: "MuiTypography"
|
|
8495
|
+
});
|
|
8496
|
+
const isSxColor = !v6Colors[color2];
|
|
8497
|
+
const props = extendSxProp({
|
|
8498
|
+
...themeProps,
|
|
8499
|
+
...isSxColor && {
|
|
8500
|
+
color: color2
|
|
8501
|
+
}
|
|
8502
|
+
});
|
|
8503
|
+
const {
|
|
8504
|
+
align = "inherit",
|
|
8505
|
+
className,
|
|
8506
|
+
component,
|
|
8507
|
+
gutterBottom = false,
|
|
8508
|
+
noWrap = false,
|
|
8509
|
+
paragraph: paragraph2 = false,
|
|
8510
|
+
variant = "body1",
|
|
8511
|
+
variantMapping = defaultVariantMapping,
|
|
8512
|
+
...other
|
|
8513
|
+
} = props;
|
|
8514
|
+
const ownerState = {
|
|
8515
|
+
...props,
|
|
8516
|
+
align,
|
|
8517
|
+
color: color2,
|
|
8518
|
+
className,
|
|
8519
|
+
component,
|
|
8520
|
+
gutterBottom,
|
|
8521
|
+
noWrap,
|
|
8522
|
+
paragraph: paragraph2,
|
|
8523
|
+
variant,
|
|
8524
|
+
variantMapping
|
|
8525
|
+
};
|
|
8526
|
+
const Component = component || (paragraph2 ? "p" : variantMapping[variant] || defaultVariantMapping[variant]) || "span";
|
|
8527
|
+
const classes = useUtilityClasses(ownerState);
|
|
8528
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyRoot, {
|
|
8529
|
+
as: Component,
|
|
8530
|
+
ref,
|
|
8531
|
+
className: clsx(classes.root, className),
|
|
8532
|
+
...other,
|
|
8533
|
+
ownerState,
|
|
8534
|
+
style: {
|
|
8535
|
+
...align !== "inherit" && {
|
|
8536
|
+
"--Typography-textAlign": align
|
|
8537
|
+
},
|
|
8538
|
+
...other.style
|
|
8539
|
+
}
|
|
8540
|
+
});
|
|
8541
|
+
});
|
|
8542
|
+
Typography.propTypes = {
|
|
8543
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
8544
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
8545
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
8546
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
8547
|
+
/**
|
|
8548
|
+
* Set the text-align on the component.
|
|
8549
|
+
* @default 'inherit'
|
|
8550
|
+
*/
|
|
8551
|
+
align: PropTypes.oneOf(["center", "inherit", "justify", "left", "right"]),
|
|
8552
|
+
/**
|
|
8553
|
+
* The content of the component.
|
|
8554
|
+
*/
|
|
8555
|
+
children: PropTypes.node,
|
|
8556
|
+
/**
|
|
8557
|
+
* Override or extend the styles applied to the component.
|
|
8558
|
+
*/
|
|
8559
|
+
classes: PropTypes.object,
|
|
8560
|
+
/**
|
|
8561
|
+
* @ignore
|
|
8562
|
+
*/
|
|
8563
|
+
className: PropTypes.string,
|
|
8564
|
+
/**
|
|
8565
|
+
* The color of the component.
|
|
8566
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
8567
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
8568
|
+
*/
|
|
8569
|
+
color: PropTypes.oneOfType([PropTypes.oneOf(["primary", "secondary", "success", "error", "info", "warning", "textPrimary", "textSecondary", "textDisabled"]), PropTypes.string]),
|
|
8570
|
+
/**
|
|
8571
|
+
* The component used for the root node.
|
|
8572
|
+
* Either a string to use a HTML element or a component.
|
|
8573
|
+
*/
|
|
8574
|
+
component: PropTypes.elementType,
|
|
8575
|
+
/**
|
|
8576
|
+
* If `true`, the text will have a bottom margin.
|
|
8577
|
+
* @default false
|
|
8578
|
+
*/
|
|
8579
|
+
gutterBottom: PropTypes.bool,
|
|
8580
|
+
/**
|
|
8581
|
+
* If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.
|
|
8582
|
+
*
|
|
8583
|
+
* Note that text overflow can only happen with block or inline-block level elements
|
|
8584
|
+
* (the element needs to have a width in order to overflow).
|
|
8585
|
+
* @default false
|
|
8586
|
+
*/
|
|
8587
|
+
noWrap: PropTypes.bool,
|
|
8588
|
+
/**
|
|
8589
|
+
* If `true`, the element will be a paragraph element.
|
|
8590
|
+
* @default false
|
|
8591
|
+
* @deprecated Use the `component` prop instead. This prop will be removed in a future major release. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
8592
|
+
*/
|
|
8593
|
+
paragraph: PropTypes.bool,
|
|
8594
|
+
/**
|
|
8595
|
+
* @ignore
|
|
8596
|
+
*/
|
|
8597
|
+
style: PropTypes.object,
|
|
8598
|
+
/**
|
|
8599
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
8600
|
+
*/
|
|
8601
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
|
|
8602
|
+
/**
|
|
8603
|
+
* Applies the theme typography styles.
|
|
8604
|
+
* @default 'body1'
|
|
8605
|
+
*/
|
|
8606
|
+
variant: PropTypes.oneOfType([PropTypes.oneOf(["body1", "body2", "button", "caption", "h1", "h2", "h3", "h4", "h5", "h6", "inherit", "overline", "subtitle1", "subtitle2"]), PropTypes.string]),
|
|
8607
|
+
/**
|
|
8608
|
+
* The component maps the variant prop to a range of different HTML element types.
|
|
8609
|
+
* For instance, subtitle1 to `<h6>`.
|
|
8610
|
+
* If you wish to change that mapping, you can provide your own.
|
|
8611
|
+
* Alternatively, you can use the `component` prop.
|
|
8612
|
+
* @default {
|
|
8613
|
+
* h1: 'h1',
|
|
8614
|
+
* h2: 'h2',
|
|
8615
|
+
* h3: 'h3',
|
|
8616
|
+
* h4: 'h4',
|
|
8617
|
+
* h5: 'h5',
|
|
8618
|
+
* h6: 'h6',
|
|
8619
|
+
* subtitle1: 'h6',
|
|
8620
|
+
* subtitle2: 'h6',
|
|
8621
|
+
* body1: 'p',
|
|
8622
|
+
* body2: 'p',
|
|
8623
|
+
* inherit: 'p',
|
|
8624
|
+
* }
|
|
8625
|
+
*/
|
|
8626
|
+
variantMapping: PropTypes.object
|
|
8627
|
+
};
|
|
7498
8628
|
/**!
|
|
7499
8629
|
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
|
7500
8630
|
* @version 1.16.1
|
|
@@ -8417,13 +9547,13 @@ function toValue(str, measurement, popperOffsets, referenceOffsets) {
|
|
|
8417
9547
|
var rect = getClientRect(element2);
|
|
8418
9548
|
return rect[measurement] / 100 * value;
|
|
8419
9549
|
} else if (unit === "vh" || unit === "vw") {
|
|
8420
|
-
var
|
|
9550
|
+
var size2 = void 0;
|
|
8421
9551
|
if (unit === "vh") {
|
|
8422
|
-
|
|
9552
|
+
size2 = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
|
|
8423
9553
|
} else {
|
|
8424
|
-
|
|
9554
|
+
size2 = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
|
|
8425
9555
|
}
|
|
8426
|
-
return
|
|
9556
|
+
return size2 / 100 * value;
|
|
8427
9557
|
} else {
|
|
8428
9558
|
return value;
|
|
8429
9559
|
}
|
|
@@ -9197,6 +10327,668 @@ React.forwardRef((props, ref) => {
|
|
|
9197
10327
|
...style2
|
|
9198
10328
|
}, children: typeof children === "function" ? children(childProps) : children }) });
|
|
9199
10329
|
});
|
|
10330
|
+
var safeIsNaN = Number.isNaN || function ponyfill(value) {
|
|
10331
|
+
return typeof value === "number" && value !== value;
|
|
10332
|
+
};
|
|
10333
|
+
function isEqual(first, second) {
|
|
10334
|
+
if (first === second) {
|
|
10335
|
+
return true;
|
|
10336
|
+
}
|
|
10337
|
+
if (safeIsNaN(first) && safeIsNaN(second)) {
|
|
10338
|
+
return true;
|
|
10339
|
+
}
|
|
10340
|
+
return false;
|
|
10341
|
+
}
|
|
10342
|
+
function areInputsEqual(newInputs, lastInputs) {
|
|
10343
|
+
if (newInputs.length !== lastInputs.length) {
|
|
10344
|
+
return false;
|
|
10345
|
+
}
|
|
10346
|
+
for (var i = 0; i < newInputs.length; i++) {
|
|
10347
|
+
if (!isEqual(newInputs[i], lastInputs[i])) {
|
|
10348
|
+
return false;
|
|
10349
|
+
}
|
|
10350
|
+
}
|
|
10351
|
+
return true;
|
|
10352
|
+
}
|
|
10353
|
+
function memoizeOne(resultFn, isEqual2) {
|
|
10354
|
+
if (isEqual2 === void 0) {
|
|
10355
|
+
isEqual2 = areInputsEqual;
|
|
10356
|
+
}
|
|
10357
|
+
var lastThis;
|
|
10358
|
+
var lastArgs = [];
|
|
10359
|
+
var lastResult;
|
|
10360
|
+
var calledOnce = false;
|
|
10361
|
+
function memoized() {
|
|
10362
|
+
var newArgs = [];
|
|
10363
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
10364
|
+
newArgs[_i] = arguments[_i];
|
|
10365
|
+
}
|
|
10366
|
+
if (calledOnce && lastThis === this && isEqual2(newArgs, lastArgs)) {
|
|
10367
|
+
return lastResult;
|
|
10368
|
+
}
|
|
10369
|
+
lastResult = resultFn.apply(this, newArgs);
|
|
10370
|
+
calledOnce = true;
|
|
10371
|
+
lastThis = this;
|
|
10372
|
+
lastArgs = newArgs;
|
|
10373
|
+
return lastResult;
|
|
10374
|
+
}
|
|
10375
|
+
return memoized;
|
|
10376
|
+
}
|
|
10377
|
+
var hasNativePerformanceNow = typeof performance === "object" && typeof performance.now === "function";
|
|
10378
|
+
var now = hasNativePerformanceNow ? function() {
|
|
10379
|
+
return performance.now();
|
|
10380
|
+
} : function() {
|
|
10381
|
+
return Date.now();
|
|
10382
|
+
};
|
|
10383
|
+
function cancelTimeout(timeoutID) {
|
|
10384
|
+
cancelAnimationFrame(timeoutID.id);
|
|
10385
|
+
}
|
|
10386
|
+
function requestTimeout(callback, delay) {
|
|
10387
|
+
var start = now();
|
|
10388
|
+
function tick() {
|
|
10389
|
+
if (now() - start >= delay) {
|
|
10390
|
+
callback.call(null);
|
|
10391
|
+
} else {
|
|
10392
|
+
timeoutID.id = requestAnimationFrame(tick);
|
|
10393
|
+
}
|
|
10394
|
+
}
|
|
10395
|
+
var timeoutID = {
|
|
10396
|
+
id: requestAnimationFrame(tick)
|
|
10397
|
+
};
|
|
10398
|
+
return timeoutID;
|
|
10399
|
+
}
|
|
10400
|
+
var size = -1;
|
|
10401
|
+
function getScrollbarSize(recalculate) {
|
|
10402
|
+
if (recalculate === void 0) {
|
|
10403
|
+
recalculate = false;
|
|
10404
|
+
}
|
|
10405
|
+
if (size === -1 || recalculate) {
|
|
10406
|
+
var div = document.createElement("div");
|
|
10407
|
+
var style2 = div.style;
|
|
10408
|
+
style2.width = "50px";
|
|
10409
|
+
style2.height = "50px";
|
|
10410
|
+
style2.overflow = "scroll";
|
|
10411
|
+
document.body.appendChild(div);
|
|
10412
|
+
size = div.offsetWidth - div.clientWidth;
|
|
10413
|
+
document.body.removeChild(div);
|
|
10414
|
+
}
|
|
10415
|
+
return size;
|
|
10416
|
+
}
|
|
10417
|
+
var cachedRTLResult = null;
|
|
10418
|
+
function getRTLOffsetType(recalculate) {
|
|
10419
|
+
if (recalculate === void 0) {
|
|
10420
|
+
recalculate = false;
|
|
10421
|
+
}
|
|
10422
|
+
if (cachedRTLResult === null || recalculate) {
|
|
10423
|
+
var outerDiv = document.createElement("div");
|
|
10424
|
+
var outerStyle = outerDiv.style;
|
|
10425
|
+
outerStyle.width = "50px";
|
|
10426
|
+
outerStyle.height = "50px";
|
|
10427
|
+
outerStyle.overflow = "scroll";
|
|
10428
|
+
outerStyle.direction = "rtl";
|
|
10429
|
+
var innerDiv = document.createElement("div");
|
|
10430
|
+
var innerStyle = innerDiv.style;
|
|
10431
|
+
innerStyle.width = "100px";
|
|
10432
|
+
innerStyle.height = "100px";
|
|
10433
|
+
outerDiv.appendChild(innerDiv);
|
|
10434
|
+
document.body.appendChild(outerDiv);
|
|
10435
|
+
if (outerDiv.scrollLeft > 0) {
|
|
10436
|
+
cachedRTLResult = "positive-descending";
|
|
10437
|
+
} else {
|
|
10438
|
+
outerDiv.scrollLeft = 1;
|
|
10439
|
+
if (outerDiv.scrollLeft === 0) {
|
|
10440
|
+
cachedRTLResult = "negative";
|
|
10441
|
+
} else {
|
|
10442
|
+
cachedRTLResult = "positive-ascending";
|
|
10443
|
+
}
|
|
10444
|
+
}
|
|
10445
|
+
document.body.removeChild(outerDiv);
|
|
10446
|
+
return cachedRTLResult;
|
|
10447
|
+
}
|
|
10448
|
+
return cachedRTLResult;
|
|
10449
|
+
}
|
|
10450
|
+
var IS_SCROLLING_DEBOUNCE_INTERVAL$1 = 150;
|
|
10451
|
+
var defaultItemKey$1 = function defaultItemKey3(index2, data) {
|
|
10452
|
+
return index2;
|
|
10453
|
+
};
|
|
10454
|
+
var devWarningsDirection = null;
|
|
10455
|
+
var devWarningsTagName$1 = null;
|
|
10456
|
+
{
|
|
10457
|
+
if (typeof window !== "undefined" && typeof window.WeakSet !== "undefined") {
|
|
10458
|
+
devWarningsDirection = /* @__PURE__ */ new WeakSet();
|
|
10459
|
+
devWarningsTagName$1 = /* @__PURE__ */ new WeakSet();
|
|
10460
|
+
}
|
|
10461
|
+
}
|
|
10462
|
+
function createListComponent(_ref) {
|
|
10463
|
+
var _class;
|
|
10464
|
+
var getItemOffset3 = _ref.getItemOffset, getEstimatedTotalSize4 = _ref.getEstimatedTotalSize, getItemSize3 = _ref.getItemSize, getOffsetForIndexAndAlignment5 = _ref.getOffsetForIndexAndAlignment, getStartIndexForOffset3 = _ref.getStartIndexForOffset, getStopIndexForStartIndex3 = _ref.getStopIndexForStartIndex, initInstanceProps5 = _ref.initInstanceProps, shouldResetStyleCacheOnItemSizeChange = _ref.shouldResetStyleCacheOnItemSizeChange, validateProps5 = _ref.validateProps;
|
|
10465
|
+
return _class = /* @__PURE__ */ function(_PureComponent) {
|
|
10466
|
+
_inheritsLoose(List, _PureComponent);
|
|
10467
|
+
function List(props) {
|
|
10468
|
+
var _this;
|
|
10469
|
+
_this = _PureComponent.call(this, props) || this;
|
|
10470
|
+
_this._instanceProps = initInstanceProps5(_this.props, _assertThisInitialized(_this));
|
|
10471
|
+
_this._outerRef = void 0;
|
|
10472
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
10473
|
+
_this.state = {
|
|
10474
|
+
instance: _assertThisInitialized(_this),
|
|
10475
|
+
isScrolling: false,
|
|
10476
|
+
scrollDirection: "forward",
|
|
10477
|
+
scrollOffset: typeof _this.props.initialScrollOffset === "number" ? _this.props.initialScrollOffset : 0,
|
|
10478
|
+
scrollUpdateWasRequested: false
|
|
10479
|
+
};
|
|
10480
|
+
_this._callOnItemsRendered = void 0;
|
|
10481
|
+
_this._callOnItemsRendered = memoizeOne(function(overscanStartIndex, overscanStopIndex, visibleStartIndex, visibleStopIndex) {
|
|
10482
|
+
return _this.props.onItemsRendered({
|
|
10483
|
+
overscanStartIndex,
|
|
10484
|
+
overscanStopIndex,
|
|
10485
|
+
visibleStartIndex,
|
|
10486
|
+
visibleStopIndex
|
|
10487
|
+
});
|
|
10488
|
+
});
|
|
10489
|
+
_this._callOnScroll = void 0;
|
|
10490
|
+
_this._callOnScroll = memoizeOne(function(scrollDirection, scrollOffset, scrollUpdateWasRequested) {
|
|
10491
|
+
return _this.props.onScroll({
|
|
10492
|
+
scrollDirection,
|
|
10493
|
+
scrollOffset,
|
|
10494
|
+
scrollUpdateWasRequested
|
|
10495
|
+
});
|
|
10496
|
+
});
|
|
10497
|
+
_this._getItemStyle = void 0;
|
|
10498
|
+
_this._getItemStyle = function(index2) {
|
|
10499
|
+
var _this$props = _this.props, direction = _this$props.direction, itemSize = _this$props.itemSize, layout = _this$props.layout;
|
|
10500
|
+
var itemStyleCache = _this._getItemStyleCache(shouldResetStyleCacheOnItemSizeChange && itemSize, shouldResetStyleCacheOnItemSizeChange && layout, shouldResetStyleCacheOnItemSizeChange && direction);
|
|
10501
|
+
var style2;
|
|
10502
|
+
if (itemStyleCache.hasOwnProperty(index2)) {
|
|
10503
|
+
style2 = itemStyleCache[index2];
|
|
10504
|
+
} else {
|
|
10505
|
+
var _offset = getItemOffset3(_this.props, index2, _this._instanceProps);
|
|
10506
|
+
var size2 = getItemSize3(_this.props, index2, _this._instanceProps);
|
|
10507
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
10508
|
+
var isRtl = direction === "rtl";
|
|
10509
|
+
var offsetHorizontal = isHorizontal ? _offset : 0;
|
|
10510
|
+
itemStyleCache[index2] = style2 = {
|
|
10511
|
+
position: "absolute",
|
|
10512
|
+
left: isRtl ? void 0 : offsetHorizontal,
|
|
10513
|
+
right: isRtl ? offsetHorizontal : void 0,
|
|
10514
|
+
top: !isHorizontal ? _offset : 0,
|
|
10515
|
+
height: !isHorizontal ? size2 : "100%",
|
|
10516
|
+
width: isHorizontal ? size2 : "100%"
|
|
10517
|
+
};
|
|
10518
|
+
}
|
|
10519
|
+
return style2;
|
|
10520
|
+
};
|
|
10521
|
+
_this._getItemStyleCache = void 0;
|
|
10522
|
+
_this._getItemStyleCache = memoizeOne(function(_, __, ___) {
|
|
10523
|
+
return {};
|
|
10524
|
+
});
|
|
10525
|
+
_this._onScrollHorizontal = function(event) {
|
|
10526
|
+
var _event$currentTarget = event.currentTarget, clientWidth = _event$currentTarget.clientWidth, scrollLeft = _event$currentTarget.scrollLeft, scrollWidth = _event$currentTarget.scrollWidth;
|
|
10527
|
+
_this.setState(function(prevState) {
|
|
10528
|
+
if (prevState.scrollOffset === scrollLeft) {
|
|
10529
|
+
return null;
|
|
10530
|
+
}
|
|
10531
|
+
var direction = _this.props.direction;
|
|
10532
|
+
var scrollOffset = scrollLeft;
|
|
10533
|
+
if (direction === "rtl") {
|
|
10534
|
+
switch (getRTLOffsetType()) {
|
|
10535
|
+
case "negative":
|
|
10536
|
+
scrollOffset = -scrollLeft;
|
|
10537
|
+
break;
|
|
10538
|
+
case "positive-descending":
|
|
10539
|
+
scrollOffset = scrollWidth - clientWidth - scrollLeft;
|
|
10540
|
+
break;
|
|
10541
|
+
}
|
|
10542
|
+
}
|
|
10543
|
+
scrollOffset = Math.max(0, Math.min(scrollOffset, scrollWidth - clientWidth));
|
|
10544
|
+
return {
|
|
10545
|
+
isScrolling: true,
|
|
10546
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
10547
|
+
scrollOffset,
|
|
10548
|
+
scrollUpdateWasRequested: false
|
|
10549
|
+
};
|
|
10550
|
+
}, _this._resetIsScrollingDebounced);
|
|
10551
|
+
};
|
|
10552
|
+
_this._onScrollVertical = function(event) {
|
|
10553
|
+
var _event$currentTarget2 = event.currentTarget, clientHeight = _event$currentTarget2.clientHeight, scrollHeight = _event$currentTarget2.scrollHeight, scrollTop = _event$currentTarget2.scrollTop;
|
|
10554
|
+
_this.setState(function(prevState) {
|
|
10555
|
+
if (prevState.scrollOffset === scrollTop) {
|
|
10556
|
+
return null;
|
|
10557
|
+
}
|
|
10558
|
+
var scrollOffset = Math.max(0, Math.min(scrollTop, scrollHeight - clientHeight));
|
|
10559
|
+
return {
|
|
10560
|
+
isScrolling: true,
|
|
10561
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
10562
|
+
scrollOffset,
|
|
10563
|
+
scrollUpdateWasRequested: false
|
|
10564
|
+
};
|
|
10565
|
+
}, _this._resetIsScrollingDebounced);
|
|
10566
|
+
};
|
|
10567
|
+
_this._outerRefSetter = function(ref) {
|
|
10568
|
+
var outerRef = _this.props.outerRef;
|
|
10569
|
+
_this._outerRef = ref;
|
|
10570
|
+
if (typeof outerRef === "function") {
|
|
10571
|
+
outerRef(ref);
|
|
10572
|
+
} else if (outerRef != null && typeof outerRef === "object" && outerRef.hasOwnProperty("current")) {
|
|
10573
|
+
outerRef.current = ref;
|
|
10574
|
+
}
|
|
10575
|
+
};
|
|
10576
|
+
_this._resetIsScrollingDebounced = function() {
|
|
10577
|
+
if (_this._resetIsScrollingTimeoutId !== null) {
|
|
10578
|
+
cancelTimeout(_this._resetIsScrollingTimeoutId);
|
|
10579
|
+
}
|
|
10580
|
+
_this._resetIsScrollingTimeoutId = requestTimeout(_this._resetIsScrolling, IS_SCROLLING_DEBOUNCE_INTERVAL$1);
|
|
10581
|
+
};
|
|
10582
|
+
_this._resetIsScrolling = function() {
|
|
10583
|
+
_this._resetIsScrollingTimeoutId = null;
|
|
10584
|
+
_this.setState({
|
|
10585
|
+
isScrolling: false
|
|
10586
|
+
}, function() {
|
|
10587
|
+
_this._getItemStyleCache(-1, null);
|
|
10588
|
+
});
|
|
10589
|
+
};
|
|
10590
|
+
return _this;
|
|
10591
|
+
}
|
|
10592
|
+
List.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {
|
|
10593
|
+
validateSharedProps$1(nextProps, prevState);
|
|
10594
|
+
validateProps5(nextProps);
|
|
10595
|
+
return null;
|
|
10596
|
+
};
|
|
10597
|
+
var _proto = List.prototype;
|
|
10598
|
+
_proto.scrollTo = function scrollTo(scrollOffset) {
|
|
10599
|
+
scrollOffset = Math.max(0, scrollOffset);
|
|
10600
|
+
this.setState(function(prevState) {
|
|
10601
|
+
if (prevState.scrollOffset === scrollOffset) {
|
|
10602
|
+
return null;
|
|
10603
|
+
}
|
|
10604
|
+
return {
|
|
10605
|
+
scrollDirection: prevState.scrollOffset < scrollOffset ? "forward" : "backward",
|
|
10606
|
+
scrollOffset,
|
|
10607
|
+
scrollUpdateWasRequested: true
|
|
10608
|
+
};
|
|
10609
|
+
}, this._resetIsScrollingDebounced);
|
|
10610
|
+
};
|
|
10611
|
+
_proto.scrollToItem = function scrollToItem(index2, align) {
|
|
10612
|
+
if (align === void 0) {
|
|
10613
|
+
align = "auto";
|
|
10614
|
+
}
|
|
10615
|
+
var _this$props2 = this.props, itemCount = _this$props2.itemCount, layout = _this$props2.layout;
|
|
10616
|
+
var scrollOffset = this.state.scrollOffset;
|
|
10617
|
+
index2 = Math.max(0, Math.min(index2, itemCount - 1));
|
|
10618
|
+
var scrollbarSize = 0;
|
|
10619
|
+
if (this._outerRef) {
|
|
10620
|
+
var outerRef = this._outerRef;
|
|
10621
|
+
if (layout === "vertical") {
|
|
10622
|
+
scrollbarSize = outerRef.scrollWidth > outerRef.clientWidth ? getScrollbarSize() : 0;
|
|
10623
|
+
} else {
|
|
10624
|
+
scrollbarSize = outerRef.scrollHeight > outerRef.clientHeight ? getScrollbarSize() : 0;
|
|
10625
|
+
}
|
|
10626
|
+
}
|
|
10627
|
+
this.scrollTo(getOffsetForIndexAndAlignment5(this.props, index2, align, scrollOffset, this._instanceProps, scrollbarSize));
|
|
10628
|
+
};
|
|
10629
|
+
_proto.componentDidMount = function componentDidMount() {
|
|
10630
|
+
var _this$props3 = this.props, direction = _this$props3.direction, initialScrollOffset = _this$props3.initialScrollOffset, layout = _this$props3.layout;
|
|
10631
|
+
if (typeof initialScrollOffset === "number" && this._outerRef != null) {
|
|
10632
|
+
var outerRef = this._outerRef;
|
|
10633
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
10634
|
+
outerRef.scrollLeft = initialScrollOffset;
|
|
10635
|
+
} else {
|
|
10636
|
+
outerRef.scrollTop = initialScrollOffset;
|
|
10637
|
+
}
|
|
10638
|
+
}
|
|
10639
|
+
this._callPropsCallbacks();
|
|
10640
|
+
};
|
|
10641
|
+
_proto.componentDidUpdate = function componentDidUpdate() {
|
|
10642
|
+
var _this$props4 = this.props, direction = _this$props4.direction, layout = _this$props4.layout;
|
|
10643
|
+
var _this$state = this.state, scrollOffset = _this$state.scrollOffset, scrollUpdateWasRequested = _this$state.scrollUpdateWasRequested;
|
|
10644
|
+
if (scrollUpdateWasRequested && this._outerRef != null) {
|
|
10645
|
+
var outerRef = this._outerRef;
|
|
10646
|
+
if (direction === "horizontal" || layout === "horizontal") {
|
|
10647
|
+
if (direction === "rtl") {
|
|
10648
|
+
switch (getRTLOffsetType()) {
|
|
10649
|
+
case "negative":
|
|
10650
|
+
outerRef.scrollLeft = -scrollOffset;
|
|
10651
|
+
break;
|
|
10652
|
+
case "positive-ascending":
|
|
10653
|
+
outerRef.scrollLeft = scrollOffset;
|
|
10654
|
+
break;
|
|
10655
|
+
default:
|
|
10656
|
+
var clientWidth = outerRef.clientWidth, scrollWidth = outerRef.scrollWidth;
|
|
10657
|
+
outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;
|
|
10658
|
+
break;
|
|
10659
|
+
}
|
|
10660
|
+
} else {
|
|
10661
|
+
outerRef.scrollLeft = scrollOffset;
|
|
10662
|
+
}
|
|
10663
|
+
} else {
|
|
10664
|
+
outerRef.scrollTop = scrollOffset;
|
|
10665
|
+
}
|
|
10666
|
+
}
|
|
10667
|
+
this._callPropsCallbacks();
|
|
10668
|
+
};
|
|
10669
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
|
10670
|
+
if (this._resetIsScrollingTimeoutId !== null) {
|
|
10671
|
+
cancelTimeout(this._resetIsScrollingTimeoutId);
|
|
10672
|
+
}
|
|
10673
|
+
};
|
|
10674
|
+
_proto.render = function render() {
|
|
10675
|
+
var _this$props5 = this.props, children = _this$props5.children, className = _this$props5.className, direction = _this$props5.direction, height2 = _this$props5.height, innerRef = _this$props5.innerRef, innerElementType = _this$props5.innerElementType, innerTagName = _this$props5.innerTagName, itemCount = _this$props5.itemCount, itemData = _this$props5.itemData, _this$props5$itemKey = _this$props5.itemKey, itemKey = _this$props5$itemKey === void 0 ? defaultItemKey$1 : _this$props5$itemKey, layout = _this$props5.layout, outerElementType = _this$props5.outerElementType, outerTagName = _this$props5.outerTagName, style2 = _this$props5.style, useIsScrolling = _this$props5.useIsScrolling, width2 = _this$props5.width;
|
|
10676
|
+
var isScrolling = this.state.isScrolling;
|
|
10677
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
10678
|
+
var onScroll = isHorizontal ? this._onScrollHorizontal : this._onScrollVertical;
|
|
10679
|
+
var _this$_getRangeToRend = this._getRangeToRender(), startIndex = _this$_getRangeToRend[0], stopIndex = _this$_getRangeToRend[1];
|
|
10680
|
+
var items = [];
|
|
10681
|
+
if (itemCount > 0) {
|
|
10682
|
+
for (var _index = startIndex; _index <= stopIndex; _index++) {
|
|
10683
|
+
items.push(createElement(children, {
|
|
10684
|
+
data: itemData,
|
|
10685
|
+
key: itemKey(_index, itemData),
|
|
10686
|
+
index: _index,
|
|
10687
|
+
isScrolling: useIsScrolling ? isScrolling : void 0,
|
|
10688
|
+
style: this._getItemStyle(_index)
|
|
10689
|
+
}));
|
|
10690
|
+
}
|
|
10691
|
+
}
|
|
10692
|
+
var estimatedTotalSize = getEstimatedTotalSize4(this.props, this._instanceProps);
|
|
10693
|
+
return createElement(outerElementType || outerTagName || "div", {
|
|
10694
|
+
className,
|
|
10695
|
+
onScroll,
|
|
10696
|
+
ref: this._outerRefSetter,
|
|
10697
|
+
style: _extends$1({
|
|
10698
|
+
position: "relative",
|
|
10699
|
+
height: height2,
|
|
10700
|
+
width: width2,
|
|
10701
|
+
overflow: "auto",
|
|
10702
|
+
WebkitOverflowScrolling: "touch",
|
|
10703
|
+
willChange: "transform",
|
|
10704
|
+
direction
|
|
10705
|
+
}, style2)
|
|
10706
|
+
}, createElement(innerElementType || innerTagName || "div", {
|
|
10707
|
+
children: items,
|
|
10708
|
+
ref: innerRef,
|
|
10709
|
+
style: {
|
|
10710
|
+
height: isHorizontal ? "100%" : estimatedTotalSize,
|
|
10711
|
+
pointerEvents: isScrolling ? "none" : void 0,
|
|
10712
|
+
width: isHorizontal ? estimatedTotalSize : "100%"
|
|
10713
|
+
}
|
|
10714
|
+
}));
|
|
10715
|
+
};
|
|
10716
|
+
_proto._callPropsCallbacks = function _callPropsCallbacks() {
|
|
10717
|
+
if (typeof this.props.onItemsRendered === "function") {
|
|
10718
|
+
var itemCount = this.props.itemCount;
|
|
10719
|
+
if (itemCount > 0) {
|
|
10720
|
+
var _this$_getRangeToRend2 = this._getRangeToRender(), _overscanStartIndex = _this$_getRangeToRend2[0], _overscanStopIndex = _this$_getRangeToRend2[1], _visibleStartIndex = _this$_getRangeToRend2[2], _visibleStopIndex = _this$_getRangeToRend2[3];
|
|
10721
|
+
this._callOnItemsRendered(_overscanStartIndex, _overscanStopIndex, _visibleStartIndex, _visibleStopIndex);
|
|
10722
|
+
}
|
|
10723
|
+
}
|
|
10724
|
+
if (typeof this.props.onScroll === "function") {
|
|
10725
|
+
var _this$state2 = this.state, _scrollDirection = _this$state2.scrollDirection, _scrollOffset = _this$state2.scrollOffset, _scrollUpdateWasRequested = _this$state2.scrollUpdateWasRequested;
|
|
10726
|
+
this._callOnScroll(_scrollDirection, _scrollOffset, _scrollUpdateWasRequested);
|
|
10727
|
+
}
|
|
10728
|
+
};
|
|
10729
|
+
_proto._getRangeToRender = function _getRangeToRender() {
|
|
10730
|
+
var _this$props6 = this.props, itemCount = _this$props6.itemCount, overscanCount = _this$props6.overscanCount;
|
|
10731
|
+
var _this$state3 = this.state, isScrolling = _this$state3.isScrolling, scrollDirection = _this$state3.scrollDirection, scrollOffset = _this$state3.scrollOffset;
|
|
10732
|
+
if (itemCount === 0) {
|
|
10733
|
+
return [0, 0, 0, 0];
|
|
10734
|
+
}
|
|
10735
|
+
var startIndex = getStartIndexForOffset3(this.props, scrollOffset, this._instanceProps);
|
|
10736
|
+
var stopIndex = getStopIndexForStartIndex3(this.props, startIndex, scrollOffset, this._instanceProps);
|
|
10737
|
+
var overscanBackward = !isScrolling || scrollDirection === "backward" ? Math.max(1, overscanCount) : 1;
|
|
10738
|
+
var overscanForward = !isScrolling || scrollDirection === "forward" ? Math.max(1, overscanCount) : 1;
|
|
10739
|
+
return [Math.max(0, startIndex - overscanBackward), Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)), startIndex, stopIndex];
|
|
10740
|
+
};
|
|
10741
|
+
return List;
|
|
10742
|
+
}(PureComponent), _class.defaultProps = {
|
|
10743
|
+
direction: "ltr",
|
|
10744
|
+
itemData: void 0,
|
|
10745
|
+
layout: "vertical",
|
|
10746
|
+
overscanCount: 2,
|
|
10747
|
+
useIsScrolling: false
|
|
10748
|
+
}, _class;
|
|
10749
|
+
}
|
|
10750
|
+
var validateSharedProps$1 = function validateSharedProps3(_ref2, _ref3) {
|
|
10751
|
+
var children = _ref2.children, direction = _ref2.direction, height2 = _ref2.height, layout = _ref2.layout, innerTagName = _ref2.innerTagName, outerTagName = _ref2.outerTagName, width2 = _ref2.width;
|
|
10752
|
+
var instance = _ref3.instance;
|
|
10753
|
+
{
|
|
10754
|
+
if (innerTagName != null || outerTagName != null) {
|
|
10755
|
+
if (devWarningsTagName$1 && !devWarningsTagName$1.has(instance)) {
|
|
10756
|
+
devWarningsTagName$1.add(instance);
|
|
10757
|
+
console.warn("The innerTagName and outerTagName props have been deprecated. Please use the innerElementType and outerElementType props instead.");
|
|
10758
|
+
}
|
|
10759
|
+
}
|
|
10760
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
10761
|
+
switch (direction) {
|
|
10762
|
+
case "horizontal":
|
|
10763
|
+
case "vertical":
|
|
10764
|
+
if (devWarningsDirection && !devWarningsDirection.has(instance)) {
|
|
10765
|
+
devWarningsDirection.add(instance);
|
|
10766
|
+
console.warn('The direction prop should be either "ltr" (default) or "rtl". Please use the layout prop to specify "vertical" (default) or "horizontal" orientation.');
|
|
10767
|
+
}
|
|
10768
|
+
break;
|
|
10769
|
+
case "ltr":
|
|
10770
|
+
case "rtl":
|
|
10771
|
+
break;
|
|
10772
|
+
default:
|
|
10773
|
+
throw Error('An invalid "direction" prop has been specified. Value should be either "ltr" or "rtl". ' + ('"' + direction + '" was specified.'));
|
|
10774
|
+
}
|
|
10775
|
+
switch (layout) {
|
|
10776
|
+
case "horizontal":
|
|
10777
|
+
case "vertical":
|
|
10778
|
+
break;
|
|
10779
|
+
default:
|
|
10780
|
+
throw Error('An invalid "layout" prop has been specified. Value should be either "horizontal" or "vertical". ' + ('"' + layout + '" was specified.'));
|
|
10781
|
+
}
|
|
10782
|
+
if (children == null) {
|
|
10783
|
+
throw Error('An invalid "children" prop has been specified. Value should be a React component. ' + ('"' + (children === null ? "null" : typeof children) + '" was specified.'));
|
|
10784
|
+
}
|
|
10785
|
+
if (isHorizontal && typeof width2 !== "number") {
|
|
10786
|
+
throw Error('An invalid "width" prop has been specified. Horizontal lists must specify a number for width. ' + ('"' + (width2 === null ? "null" : typeof width2) + '" was specified.'));
|
|
10787
|
+
} else if (!isHorizontal && typeof height2 !== "number") {
|
|
10788
|
+
throw Error('An invalid "height" prop has been specified. Vertical lists must specify a number for height. ' + ('"' + (height2 === null ? "null" : typeof height2) + '" was specified.'));
|
|
10789
|
+
}
|
|
10790
|
+
}
|
|
10791
|
+
};
|
|
10792
|
+
var DEFAULT_ESTIMATED_ITEM_SIZE$1 = 50;
|
|
10793
|
+
var getItemMetadata$1 = function getItemMetadata3(props, index2, instanceProps) {
|
|
10794
|
+
var _ref = props, itemSize = _ref.itemSize;
|
|
10795
|
+
var itemMetadataMap = instanceProps.itemMetadataMap, lastMeasuredIndex = instanceProps.lastMeasuredIndex;
|
|
10796
|
+
if (index2 > lastMeasuredIndex) {
|
|
10797
|
+
var offset2 = 0;
|
|
10798
|
+
if (lastMeasuredIndex >= 0) {
|
|
10799
|
+
var itemMetadata = itemMetadataMap[lastMeasuredIndex];
|
|
10800
|
+
offset2 = itemMetadata.offset + itemMetadata.size;
|
|
10801
|
+
}
|
|
10802
|
+
for (var i = lastMeasuredIndex + 1; i <= index2; i++) {
|
|
10803
|
+
var size2 = itemSize(i);
|
|
10804
|
+
itemMetadataMap[i] = {
|
|
10805
|
+
offset: offset2,
|
|
10806
|
+
size: size2
|
|
10807
|
+
};
|
|
10808
|
+
offset2 += size2;
|
|
10809
|
+
}
|
|
10810
|
+
instanceProps.lastMeasuredIndex = index2;
|
|
10811
|
+
}
|
|
10812
|
+
return itemMetadataMap[index2];
|
|
10813
|
+
};
|
|
10814
|
+
var findNearestItem$1 = function findNearestItem3(props, instanceProps, offset2) {
|
|
10815
|
+
var itemMetadataMap = instanceProps.itemMetadataMap, lastMeasuredIndex = instanceProps.lastMeasuredIndex;
|
|
10816
|
+
var lastMeasuredItemOffset = lastMeasuredIndex > 0 ? itemMetadataMap[lastMeasuredIndex].offset : 0;
|
|
10817
|
+
if (lastMeasuredItemOffset >= offset2) {
|
|
10818
|
+
return findNearestItemBinarySearch$1(props, instanceProps, lastMeasuredIndex, 0, offset2);
|
|
10819
|
+
} else {
|
|
10820
|
+
return findNearestItemExponentialSearch$1(props, instanceProps, Math.max(0, lastMeasuredIndex), offset2);
|
|
10821
|
+
}
|
|
10822
|
+
};
|
|
10823
|
+
var findNearestItemBinarySearch$1 = function findNearestItemBinarySearch3(props, instanceProps, high, low, offset2) {
|
|
10824
|
+
while (low <= high) {
|
|
10825
|
+
var middle = low + Math.floor((high - low) / 2);
|
|
10826
|
+
var currentOffset = getItemMetadata$1(props, middle, instanceProps).offset;
|
|
10827
|
+
if (currentOffset === offset2) {
|
|
10828
|
+
return middle;
|
|
10829
|
+
} else if (currentOffset < offset2) {
|
|
10830
|
+
low = middle + 1;
|
|
10831
|
+
} else if (currentOffset > offset2) {
|
|
10832
|
+
high = middle - 1;
|
|
10833
|
+
}
|
|
10834
|
+
}
|
|
10835
|
+
if (low > 0) {
|
|
10836
|
+
return low - 1;
|
|
10837
|
+
} else {
|
|
10838
|
+
return 0;
|
|
10839
|
+
}
|
|
10840
|
+
};
|
|
10841
|
+
var findNearestItemExponentialSearch$1 = function findNearestItemExponentialSearch3(props, instanceProps, index2, offset2) {
|
|
10842
|
+
var itemCount = props.itemCount;
|
|
10843
|
+
var interval = 1;
|
|
10844
|
+
while (index2 < itemCount && getItemMetadata$1(props, index2, instanceProps).offset < offset2) {
|
|
10845
|
+
index2 += interval;
|
|
10846
|
+
interval *= 2;
|
|
10847
|
+
}
|
|
10848
|
+
return findNearestItemBinarySearch$1(props, instanceProps, Math.min(index2, itemCount - 1), Math.floor(index2 / 2), offset2);
|
|
10849
|
+
};
|
|
10850
|
+
var getEstimatedTotalSize = function getEstimatedTotalSize2(_ref2, _ref3) {
|
|
10851
|
+
var itemCount = _ref2.itemCount;
|
|
10852
|
+
var itemMetadataMap = _ref3.itemMetadataMap, estimatedItemSize = _ref3.estimatedItemSize, lastMeasuredIndex = _ref3.lastMeasuredIndex;
|
|
10853
|
+
var totalSizeOfMeasuredItems = 0;
|
|
10854
|
+
if (lastMeasuredIndex >= itemCount) {
|
|
10855
|
+
lastMeasuredIndex = itemCount - 1;
|
|
10856
|
+
}
|
|
10857
|
+
if (lastMeasuredIndex >= 0) {
|
|
10858
|
+
var itemMetadata = itemMetadataMap[lastMeasuredIndex];
|
|
10859
|
+
totalSizeOfMeasuredItems = itemMetadata.offset + itemMetadata.size;
|
|
10860
|
+
}
|
|
10861
|
+
var numUnmeasuredItems = itemCount - lastMeasuredIndex - 1;
|
|
10862
|
+
var totalSizeOfUnmeasuredItems = numUnmeasuredItems * estimatedItemSize;
|
|
10863
|
+
return totalSizeOfMeasuredItems + totalSizeOfUnmeasuredItems;
|
|
10864
|
+
};
|
|
10865
|
+
var VariableSizeList$1 = /* @__PURE__ */ createListComponent({
|
|
10866
|
+
getItemOffset: function getItemOffset(props, index2, instanceProps) {
|
|
10867
|
+
return getItemMetadata$1(props, index2, instanceProps).offset;
|
|
10868
|
+
},
|
|
10869
|
+
getItemSize: function getItemSize(props, index2, instanceProps) {
|
|
10870
|
+
return instanceProps.itemMetadataMap[index2].size;
|
|
10871
|
+
},
|
|
10872
|
+
getEstimatedTotalSize,
|
|
10873
|
+
getOffsetForIndexAndAlignment: function getOffsetForIndexAndAlignment3(props, index2, align, scrollOffset, instanceProps, scrollbarSize) {
|
|
10874
|
+
var direction = props.direction, height2 = props.height, layout = props.layout, width2 = props.width;
|
|
10875
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
10876
|
+
var size2 = isHorizontal ? width2 : height2;
|
|
10877
|
+
var itemMetadata = getItemMetadata$1(props, index2, instanceProps);
|
|
10878
|
+
var estimatedTotalSize = getEstimatedTotalSize(props, instanceProps);
|
|
10879
|
+
var maxOffset = Math.max(0, Math.min(estimatedTotalSize - size2, itemMetadata.offset));
|
|
10880
|
+
var minOffset = Math.max(0, itemMetadata.offset - size2 + itemMetadata.size + scrollbarSize);
|
|
10881
|
+
if (align === "smart") {
|
|
10882
|
+
if (scrollOffset >= minOffset - size2 && scrollOffset <= maxOffset + size2) {
|
|
10883
|
+
align = "auto";
|
|
10884
|
+
} else {
|
|
10885
|
+
align = "center";
|
|
10886
|
+
}
|
|
10887
|
+
}
|
|
10888
|
+
switch (align) {
|
|
10889
|
+
case "start":
|
|
10890
|
+
return maxOffset;
|
|
10891
|
+
case "end":
|
|
10892
|
+
return minOffset;
|
|
10893
|
+
case "center":
|
|
10894
|
+
return Math.round(minOffset + (maxOffset - minOffset) / 2);
|
|
10895
|
+
case "auto":
|
|
10896
|
+
default:
|
|
10897
|
+
if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {
|
|
10898
|
+
return scrollOffset;
|
|
10899
|
+
} else if (scrollOffset < minOffset) {
|
|
10900
|
+
return minOffset;
|
|
10901
|
+
} else {
|
|
10902
|
+
return maxOffset;
|
|
10903
|
+
}
|
|
10904
|
+
}
|
|
10905
|
+
},
|
|
10906
|
+
getStartIndexForOffset: function getStartIndexForOffset(props, offset2, instanceProps) {
|
|
10907
|
+
return findNearestItem$1(props, instanceProps, offset2);
|
|
10908
|
+
},
|
|
10909
|
+
getStopIndexForStartIndex: function getStopIndexForStartIndex(props, startIndex, scrollOffset, instanceProps) {
|
|
10910
|
+
var direction = props.direction, height2 = props.height, itemCount = props.itemCount, layout = props.layout, width2 = props.width;
|
|
10911
|
+
var isHorizontal = direction === "horizontal" || layout === "horizontal";
|
|
10912
|
+
var size2 = isHorizontal ? width2 : height2;
|
|
10913
|
+
var itemMetadata = getItemMetadata$1(props, startIndex, instanceProps);
|
|
10914
|
+
var maxOffset = scrollOffset + size2;
|
|
10915
|
+
var offset2 = itemMetadata.offset + itemMetadata.size;
|
|
10916
|
+
var stopIndex = startIndex;
|
|
10917
|
+
while (stopIndex < itemCount - 1 && offset2 < maxOffset) {
|
|
10918
|
+
stopIndex++;
|
|
10919
|
+
offset2 += getItemMetadata$1(props, stopIndex, instanceProps).size;
|
|
10920
|
+
}
|
|
10921
|
+
return stopIndex;
|
|
10922
|
+
},
|
|
10923
|
+
initInstanceProps: function initInstanceProps2(props, instance) {
|
|
10924
|
+
var _ref4 = props, estimatedItemSize = _ref4.estimatedItemSize;
|
|
10925
|
+
var instanceProps = {
|
|
10926
|
+
itemMetadataMap: {},
|
|
10927
|
+
estimatedItemSize: estimatedItemSize || DEFAULT_ESTIMATED_ITEM_SIZE$1,
|
|
10928
|
+
lastMeasuredIndex: -1
|
|
10929
|
+
};
|
|
10930
|
+
instance.resetAfterIndex = function(index2, shouldForceUpdate) {
|
|
10931
|
+
if (shouldForceUpdate === void 0) {
|
|
10932
|
+
shouldForceUpdate = true;
|
|
10933
|
+
}
|
|
10934
|
+
instanceProps.lastMeasuredIndex = Math.min(instanceProps.lastMeasuredIndex, index2 - 1);
|
|
10935
|
+
instance._getItemStyleCache(-1);
|
|
10936
|
+
if (shouldForceUpdate) {
|
|
10937
|
+
instance.forceUpdate();
|
|
10938
|
+
}
|
|
10939
|
+
};
|
|
10940
|
+
return instanceProps;
|
|
10941
|
+
},
|
|
10942
|
+
shouldResetStyleCacheOnItemSizeChange: false,
|
|
10943
|
+
validateProps: function validateProps2(_ref5) {
|
|
10944
|
+
var itemSize = _ref5.itemSize;
|
|
10945
|
+
{
|
|
10946
|
+
if (typeof itemSize !== "function") {
|
|
10947
|
+
throw Error('An invalid "itemSize" prop has been specified. Value should be a function. ' + ('"' + (itemSize === null ? "null" : typeof itemSize) + '" was specified.'));
|
|
10948
|
+
}
|
|
10949
|
+
}
|
|
10950
|
+
}
|
|
10951
|
+
});
|
|
10952
|
+
const VariableSizeList = VariableSizeList$1;
|
|
10953
|
+
const LIST_ROW_HEIGHT = 48;
|
|
10954
|
+
makeStyles()(() => ({
|
|
10955
|
+
searchInput: {
|
|
10956
|
+
lineHeight: "initial",
|
|
10957
|
+
height: "auto !important"
|
|
10958
|
+
}
|
|
10959
|
+
}));
|
|
10960
|
+
const OuterElementContext = React__default.createContext({});
|
|
10961
|
+
const OuterElementType = React__default.forwardRef((props, ref) => {
|
|
10962
|
+
const outerProps = React__default.useContext(OuterElementContext);
|
|
10963
|
+
return jsxRuntimeExports.jsx("div", { ref, ...props, ...outerProps });
|
|
10964
|
+
});
|
|
10965
|
+
function ListRow(props) {
|
|
10966
|
+
const { data, index: index2, style: style2 } = props;
|
|
10967
|
+
const dataSet = data[index2];
|
|
10968
|
+
const inlineStyle = {
|
|
10969
|
+
...style2,
|
|
10970
|
+
top: style2.top + 8
|
|
10971
|
+
};
|
|
10972
|
+
const [props0, option, getItemLabel] = dataSet;
|
|
10973
|
+
const { key, ...optionProps } = props0;
|
|
10974
|
+
return jsxRuntimeExports.jsx(Typography, { component: "li", ...optionProps, noWrap: true, style: inlineStyle, children: getItemLabel(option) }, key);
|
|
10975
|
+
}
|
|
10976
|
+
function useResetCache(itemCount) {
|
|
10977
|
+
const ref = useRef(null);
|
|
10978
|
+
useEffect(() => {
|
|
10979
|
+
if (ref.current != null) {
|
|
10980
|
+
ref.current.resetAfterIndex(0, true);
|
|
10981
|
+
}
|
|
10982
|
+
}, [itemCount]);
|
|
10983
|
+
return ref;
|
|
10984
|
+
}
|
|
10985
|
+
React__default.forwardRef((props, ref) => {
|
|
10986
|
+
const { children, ...other } = props;
|
|
10987
|
+
const items = children;
|
|
10988
|
+
const itemCount = items.length;
|
|
10989
|
+
const gridRef = useResetCache(itemCount);
|
|
10990
|
+
return jsxRuntimeExports.jsx("div", { ref, children: jsxRuntimeExports.jsx(OuterElementContext.Provider, { value: other, children: jsxRuntimeExports.jsx(VariableSizeList, { height: Math.min(8, itemCount) * LIST_ROW_HEIGHT, itemSize: () => LIST_ROW_HEIGHT, width: "100%", innerElementType: "ul", outerElementType: OuterElementType, overscanCount: 5, ref: gridRef, itemCount, itemData: items, children: ListRow }) }) });
|
|
10991
|
+
});
|
|
9200
10992
|
function ok$1() {
|
|
9201
10993
|
}
|
|
9202
10994
|
function unreachable() {
|
|
@@ -11386,7 +13178,7 @@ function normalizeUri(value) {
|
|
|
11386
13178
|
}
|
|
11387
13179
|
function factorySpace(effects, ok2, type, max) {
|
|
11388
13180
|
const limit = max ? max - 1 : Number.POSITIVE_INFINITY;
|
|
11389
|
-
let
|
|
13181
|
+
let size2 = 0;
|
|
11390
13182
|
return start;
|
|
11391
13183
|
function start(code2) {
|
|
11392
13184
|
if (markdownSpace(code2)) {
|
|
@@ -11396,7 +13188,7 @@ function factorySpace(effects, ok2, type, max) {
|
|
|
11396
13188
|
return ok2(code2);
|
|
11397
13189
|
}
|
|
11398
13190
|
function prefix2(code2) {
|
|
11399
|
-
if (markdownSpace(code2) &&
|
|
13191
|
+
if (markdownSpace(code2) && size2++ < limit) {
|
|
11400
13192
|
effects.consume(code2);
|
|
11401
13193
|
return prefix2;
|
|
11402
13194
|
}
|
|
@@ -11637,14 +13429,14 @@ function initializeDocument(effects) {
|
|
|
11637
13429
|
self2.events.length = index2;
|
|
11638
13430
|
}
|
|
11639
13431
|
}
|
|
11640
|
-
function exitContainers(
|
|
13432
|
+
function exitContainers(size2) {
|
|
11641
13433
|
let index2 = stack.length;
|
|
11642
|
-
while (index2-- >
|
|
13434
|
+
while (index2-- > size2) {
|
|
11643
13435
|
const entry = stack[index2];
|
|
11644
13436
|
self2.containerState = entry[1];
|
|
11645
13437
|
entry[0].exit.call(self2, effects);
|
|
11646
13438
|
}
|
|
11647
|
-
stack.length =
|
|
13439
|
+
stack.length = size2;
|
|
11648
13440
|
}
|
|
11649
13441
|
function closeFlow() {
|
|
11650
13442
|
childFlow.write([null]);
|
|
@@ -11795,7 +13587,7 @@ const autolink = {
|
|
|
11795
13587
|
tokenize: tokenizeAutolink
|
|
11796
13588
|
};
|
|
11797
13589
|
function tokenizeAutolink(effects, ok2, nok) {
|
|
11798
|
-
let
|
|
13590
|
+
let size2 = 0;
|
|
11799
13591
|
return start;
|
|
11800
13592
|
function start(code2) {
|
|
11801
13593
|
effects.enter("autolink");
|
|
@@ -11817,7 +13609,7 @@ function tokenizeAutolink(effects, ok2, nok) {
|
|
|
11817
13609
|
}
|
|
11818
13610
|
function schemeOrEmailAtext(code2) {
|
|
11819
13611
|
if (code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) {
|
|
11820
|
-
|
|
13612
|
+
size2 = 1;
|
|
11821
13613
|
return schemeInsideOrEmailAtext(code2);
|
|
11822
13614
|
}
|
|
11823
13615
|
return emailAtext(code2);
|
|
@@ -11825,14 +13617,14 @@ function tokenizeAutolink(effects, ok2, nok) {
|
|
|
11825
13617
|
function schemeInsideOrEmailAtext(code2) {
|
|
11826
13618
|
if (code2 === 58) {
|
|
11827
13619
|
effects.consume(code2);
|
|
11828
|
-
|
|
13620
|
+
size2 = 0;
|
|
11829
13621
|
return urlInside;
|
|
11830
13622
|
}
|
|
11831
|
-
if ((code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) &&
|
|
13623
|
+
if ((code2 === 43 || code2 === 45 || code2 === 46 || asciiAlphanumeric(code2)) && size2++ < 32) {
|
|
11832
13624
|
effects.consume(code2);
|
|
11833
13625
|
return schemeInsideOrEmailAtext;
|
|
11834
13626
|
}
|
|
11835
|
-
|
|
13627
|
+
size2 = 0;
|
|
11836
13628
|
return emailAtext(code2);
|
|
11837
13629
|
}
|
|
11838
13630
|
function urlInside(code2) {
|
|
@@ -11867,7 +13659,7 @@ function tokenizeAutolink(effects, ok2, nok) {
|
|
|
11867
13659
|
function emailLabel(code2) {
|
|
11868
13660
|
if (code2 === 46) {
|
|
11869
13661
|
effects.consume(code2);
|
|
11870
|
-
|
|
13662
|
+
size2 = 0;
|
|
11871
13663
|
return emailAtSignOrDot;
|
|
11872
13664
|
}
|
|
11873
13665
|
if (code2 === 62) {
|
|
@@ -11881,7 +13673,7 @@ function tokenizeAutolink(effects, ok2, nok) {
|
|
|
11881
13673
|
return emailValue(code2);
|
|
11882
13674
|
}
|
|
11883
13675
|
function emailValue(code2) {
|
|
11884
|
-
if ((code2 === 45 || asciiAlphanumeric(code2)) &&
|
|
13676
|
+
if ((code2 === 45 || asciiAlphanumeric(code2)) && size2++ < 63) {
|
|
11885
13677
|
const next2 = code2 === 45 ? emailValue : emailLabel;
|
|
11886
13678
|
effects.consume(code2);
|
|
11887
13679
|
return next2;
|
|
@@ -11988,7 +13780,7 @@ const characterReference = {
|
|
|
11988
13780
|
};
|
|
11989
13781
|
function tokenizeCharacterReference(effects, ok2, nok) {
|
|
11990
13782
|
const self2 = this;
|
|
11991
|
-
let
|
|
13783
|
+
let size2 = 0;
|
|
11992
13784
|
let max;
|
|
11993
13785
|
let test;
|
|
11994
13786
|
return start;
|
|
@@ -12027,7 +13819,7 @@ function tokenizeCharacterReference(effects, ok2, nok) {
|
|
|
12027
13819
|
return value(code2);
|
|
12028
13820
|
}
|
|
12029
13821
|
function value(code2) {
|
|
12030
|
-
if (code2 === 59 &&
|
|
13822
|
+
if (code2 === 59 && size2) {
|
|
12031
13823
|
const token2 = effects.exit("characterReferenceValue");
|
|
12032
13824
|
if (test === asciiAlphanumeric && !decodeNamedCharacterReference(self2.sliceSerialize(token2))) {
|
|
12033
13825
|
return nok(code2);
|
|
@@ -12038,7 +13830,7 @@ function tokenizeCharacterReference(effects, ok2, nok) {
|
|
|
12038
13830
|
effects.exit("characterReference");
|
|
12039
13831
|
return ok2;
|
|
12040
13832
|
}
|
|
12041
|
-
if (test(code2) &&
|
|
13833
|
+
if (test(code2) && size2++ < max) {
|
|
12042
13834
|
effects.consume(code2);
|
|
12043
13835
|
return value;
|
|
12044
13836
|
}
|
|
@@ -12170,7 +13962,7 @@ function tokenizeCodeFenced(effects, ok2, nok) {
|
|
|
12170
13962
|
return ok2(code2);
|
|
12171
13963
|
}
|
|
12172
13964
|
function tokenizeCloseStart(effects2, ok3, nok2) {
|
|
12173
|
-
let
|
|
13965
|
+
let size2 = 0;
|
|
12174
13966
|
return startBefore;
|
|
12175
13967
|
function startBefore(code2) {
|
|
12176
13968
|
effects2.enter("lineEnding");
|
|
@@ -12191,11 +13983,11 @@ function tokenizeCodeFenced(effects, ok2, nok) {
|
|
|
12191
13983
|
}
|
|
12192
13984
|
function sequenceClose(code2) {
|
|
12193
13985
|
if (code2 === marker) {
|
|
12194
|
-
|
|
13986
|
+
size2++;
|
|
12195
13987
|
effects2.consume(code2);
|
|
12196
13988
|
return sequenceClose;
|
|
12197
13989
|
}
|
|
12198
|
-
if (
|
|
13990
|
+
if (size2 >= sizeOpen) {
|
|
12199
13991
|
effects2.exit("codeFencedFenceSequence");
|
|
12200
13992
|
return markdownSpace(code2) ? factorySpace(effects2, sequenceCloseAfter, "whitespace")(code2) : sequenceCloseAfter(code2);
|
|
12201
13993
|
}
|
|
@@ -12336,7 +14128,7 @@ function previous(code2) {
|
|
|
12336
14128
|
}
|
|
12337
14129
|
function tokenizeCodeText(effects, ok2, nok) {
|
|
12338
14130
|
let sizeOpen = 0;
|
|
12339
|
-
let
|
|
14131
|
+
let size2;
|
|
12340
14132
|
let token2;
|
|
12341
14133
|
return start;
|
|
12342
14134
|
function start(code2) {
|
|
@@ -12365,7 +14157,7 @@ function tokenizeCodeText(effects, ok2, nok) {
|
|
|
12365
14157
|
}
|
|
12366
14158
|
if (code2 === 96) {
|
|
12367
14159
|
token2 = effects.enter("codeTextSequence");
|
|
12368
|
-
|
|
14160
|
+
size2 = 0;
|
|
12369
14161
|
return sequenceClose(code2);
|
|
12370
14162
|
}
|
|
12371
14163
|
if (markdownLineEnding(code2)) {
|
|
@@ -12388,10 +14180,10 @@ function tokenizeCodeText(effects, ok2, nok) {
|
|
|
12388
14180
|
function sequenceClose(code2) {
|
|
12389
14181
|
if (code2 === 96) {
|
|
12390
14182
|
effects.consume(code2);
|
|
12391
|
-
|
|
14183
|
+
size2++;
|
|
12392
14184
|
return sequenceClose;
|
|
12393
14185
|
}
|
|
12394
|
-
if (
|
|
14186
|
+
if (size2 === sizeOpen) {
|
|
12395
14187
|
effects.exit("codeTextSequence");
|
|
12396
14188
|
effects.exit("codeText");
|
|
12397
14189
|
return ok2(code2);
|
|
@@ -12894,7 +14686,7 @@ function factoryDestination(effects, ok2, nok, type, literalType, literalMarkerT
|
|
|
12894
14686
|
}
|
|
12895
14687
|
function factoryLabel(effects, ok2, nok, type, markerType, stringType) {
|
|
12896
14688
|
const self2 = this;
|
|
12897
|
-
let
|
|
14689
|
+
let size2 = 0;
|
|
12898
14690
|
let seen;
|
|
12899
14691
|
return start;
|
|
12900
14692
|
function start(code2) {
|
|
@@ -12906,12 +14698,12 @@ function factoryLabel(effects, ok2, nok, type, markerType, stringType) {
|
|
|
12906
14698
|
return atBreak;
|
|
12907
14699
|
}
|
|
12908
14700
|
function atBreak(code2) {
|
|
12909
|
-
if (
|
|
14701
|
+
if (size2 > 999 || code2 === null || code2 === 91 || code2 === 93 && !seen || // To do: remove in the future once we’ve switched from
|
|
12910
14702
|
// `micromark-extension-footnote` to `micromark-extension-gfm-footnote`,
|
|
12911
14703
|
// which doesn’t need this.
|
|
12912
14704
|
// Hidden footnotes hook.
|
|
12913
14705
|
/* c8 ignore next 3 */
|
|
12914
|
-
code2 === 94 && !
|
|
14706
|
+
code2 === 94 && !size2 && "_hiddenFootnoteSupport" in self2.parser.constructs) {
|
|
12915
14707
|
return nok(code2);
|
|
12916
14708
|
}
|
|
12917
14709
|
if (code2 === 93) {
|
|
@@ -12934,7 +14726,7 @@ function factoryLabel(effects, ok2, nok, type, markerType, stringType) {
|
|
|
12934
14726
|
return labelInside(code2);
|
|
12935
14727
|
}
|
|
12936
14728
|
function labelInside(code2) {
|
|
12937
|
-
if (code2 === null || code2 === 91 || code2 === 93 || markdownLineEnding(code2) ||
|
|
14729
|
+
if (code2 === null || code2 === 91 || code2 === 93 || markdownLineEnding(code2) || size2++ > 999) {
|
|
12938
14730
|
effects.exit("chunkString");
|
|
12939
14731
|
return atBreak(code2);
|
|
12940
14732
|
}
|
|
@@ -12945,7 +14737,7 @@ function factoryLabel(effects, ok2, nok, type, markerType, stringType) {
|
|
|
12945
14737
|
function labelEscape(code2) {
|
|
12946
14738
|
if (code2 === 91 || code2 === 92 || code2 === 93) {
|
|
12947
14739
|
effects.consume(code2);
|
|
12948
|
-
|
|
14740
|
+
size2++;
|
|
12949
14741
|
return labelInside;
|
|
12950
14742
|
}
|
|
12951
14743
|
return labelInside(code2);
|
|
@@ -13171,7 +14963,7 @@ function resolveHeadingAtx(events, context) {
|
|
|
13171
14963
|
return events;
|
|
13172
14964
|
}
|
|
13173
14965
|
function tokenizeHeadingAtx(effects, ok2, nok) {
|
|
13174
|
-
let
|
|
14966
|
+
let size2 = 0;
|
|
13175
14967
|
return start;
|
|
13176
14968
|
function start(code2) {
|
|
13177
14969
|
effects.enter("atxHeading");
|
|
@@ -13182,7 +14974,7 @@ function tokenizeHeadingAtx(effects, ok2, nok) {
|
|
|
13182
14974
|
return sequenceOpen(code2);
|
|
13183
14975
|
}
|
|
13184
14976
|
function sequenceOpen(code2) {
|
|
13185
|
-
if (code2 === 35 &&
|
|
14977
|
+
if (code2 === 35 && size2++ < 6) {
|
|
13186
14978
|
effects.consume(code2);
|
|
13187
14979
|
return sequenceOpen;
|
|
13188
14980
|
}
|
|
@@ -14244,7 +16036,7 @@ const thematicBreak$1 = {
|
|
|
14244
16036
|
tokenize: tokenizeThematicBreak
|
|
14245
16037
|
};
|
|
14246
16038
|
function tokenizeThematicBreak(effects, ok2, nok) {
|
|
14247
|
-
let
|
|
16039
|
+
let size2 = 0;
|
|
14248
16040
|
let marker;
|
|
14249
16041
|
return start;
|
|
14250
16042
|
function start(code2) {
|
|
@@ -14260,7 +16052,7 @@ function tokenizeThematicBreak(effects, ok2, nok) {
|
|
|
14260
16052
|
effects.enter("thematicBreakSequence");
|
|
14261
16053
|
return sequence(code2);
|
|
14262
16054
|
}
|
|
14263
|
-
if (
|
|
16055
|
+
if (size2 >= 3 && (code2 === null || markdownLineEnding(code2))) {
|
|
14264
16056
|
effects.exit("thematicBreak");
|
|
14265
16057
|
return ok2(code2);
|
|
14266
16058
|
}
|
|
@@ -14269,7 +16061,7 @@ function tokenizeThematicBreak(effects, ok2, nok) {
|
|
|
14269
16061
|
function sequence(code2) {
|
|
14270
16062
|
if (code2 === marker) {
|
|
14271
16063
|
effects.consume(code2);
|
|
14272
|
-
|
|
16064
|
+
size2++;
|
|
14273
16065
|
return sequence;
|
|
14274
16066
|
}
|
|
14275
16067
|
effects.exit("thematicBreakSequence");
|
|
@@ -14296,7 +16088,7 @@ function tokenizeListStart(effects, ok2, nok) {
|
|
|
14296
16088
|
const self2 = this;
|
|
14297
16089
|
const tail = self2.events[self2.events.length - 1];
|
|
14298
16090
|
let initialSize = tail && tail[1].type === "linePrefix" ? tail[2].sliceSerialize(tail[1], true).length : 0;
|
|
14299
|
-
let
|
|
16091
|
+
let size2 = 0;
|
|
14300
16092
|
return start;
|
|
14301
16093
|
function start(code2) {
|
|
14302
16094
|
const kind = self2.containerState.type || (code2 === 42 || code2 === 43 || code2 === 45 ? "listUnordered" : "listOrdered");
|
|
@@ -14320,11 +16112,11 @@ function tokenizeListStart(effects, ok2, nok) {
|
|
|
14320
16112
|
return nok(code2);
|
|
14321
16113
|
}
|
|
14322
16114
|
function inside(code2) {
|
|
14323
|
-
if (asciiDigit(code2) && ++
|
|
16115
|
+
if (asciiDigit(code2) && ++size2 < 10) {
|
|
14324
16116
|
effects.consume(code2);
|
|
14325
16117
|
return inside;
|
|
14326
16118
|
}
|
|
14327
|
-
if ((!self2.interrupt ||
|
|
16119
|
+
if ((!self2.interrupt || size2 < 2) && (self2.containerState.marker ? code2 === self2.containerState.marker : code2 === 41 || code2 === 46)) {
|
|
14328
16120
|
effects.exit("listItemValue");
|
|
14329
16121
|
return atMarker(code2);
|
|
14330
16122
|
}
|
|
@@ -14622,34 +16414,34 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
14622
16414
|
const chunks = context.sliceStream(data);
|
|
14623
16415
|
let index2 = chunks.length;
|
|
14624
16416
|
let bufferIndex = -1;
|
|
14625
|
-
let
|
|
16417
|
+
let size2 = 0;
|
|
14626
16418
|
let tabs;
|
|
14627
16419
|
while (index2--) {
|
|
14628
16420
|
const chunk = chunks[index2];
|
|
14629
16421
|
if (typeof chunk === "string") {
|
|
14630
16422
|
bufferIndex = chunk.length;
|
|
14631
16423
|
while (chunk.charCodeAt(bufferIndex - 1) === 32) {
|
|
14632
|
-
|
|
16424
|
+
size2++;
|
|
14633
16425
|
bufferIndex--;
|
|
14634
16426
|
}
|
|
14635
16427
|
if (bufferIndex) break;
|
|
14636
16428
|
bufferIndex = -1;
|
|
14637
16429
|
} else if (chunk === -2) {
|
|
14638
16430
|
tabs = true;
|
|
14639
|
-
|
|
16431
|
+
size2++;
|
|
14640
16432
|
} else if (chunk === -1) ;
|
|
14641
16433
|
else {
|
|
14642
16434
|
index2++;
|
|
14643
16435
|
break;
|
|
14644
16436
|
}
|
|
14645
16437
|
}
|
|
14646
|
-
if (
|
|
16438
|
+
if (size2) {
|
|
14647
16439
|
const token2 = {
|
|
14648
|
-
type: eventIndex === events.length || tabs ||
|
|
16440
|
+
type: eventIndex === events.length || tabs || size2 < 2 ? "lineSuffix" : "hardBreakTrailing",
|
|
14649
16441
|
start: {
|
|
14650
16442
|
line: data.end.line,
|
|
14651
|
-
column: data.end.column -
|
|
14652
|
-
offset: data.end.offset -
|
|
16443
|
+
column: data.end.column - size2,
|
|
16444
|
+
offset: data.end.offset - size2,
|
|
14653
16445
|
_index: data.start._index + index2,
|
|
14654
16446
|
_bufferIndex: index2 ? bufferIndex : data.start._bufferIndex + bufferIndex
|
|
14655
16447
|
},
|
|
@@ -14707,7 +16499,7 @@ function createTokenizer(parser, initialize, from2) {
|
|
|
14707
16499
|
parser,
|
|
14708
16500
|
sliceStream,
|
|
14709
16501
|
sliceSerialize,
|
|
14710
|
-
now,
|
|
16502
|
+
now: now2,
|
|
14711
16503
|
defineSkip,
|
|
14712
16504
|
write
|
|
14713
16505
|
};
|
|
@@ -14732,7 +16524,7 @@ function createTokenizer(parser, initialize, from2) {
|
|
|
14732
16524
|
function sliceStream(token2) {
|
|
14733
16525
|
return sliceChunks(chunks, token2);
|
|
14734
16526
|
}
|
|
14735
|
-
function
|
|
16527
|
+
function now2() {
|
|
14736
16528
|
const { line: line2, column: column2, offset: offset2, _index, _bufferIndex } = point2;
|
|
14737
16529
|
return {
|
|
14738
16530
|
line: line2,
|
|
@@ -14790,14 +16582,14 @@ function createTokenizer(parser, initialize, from2) {
|
|
|
14790
16582
|
function enter(type, fields) {
|
|
14791
16583
|
const token2 = fields || {};
|
|
14792
16584
|
token2.type = type;
|
|
14793
|
-
token2.start =
|
|
16585
|
+
token2.start = now2();
|
|
14794
16586
|
context.events.push(["enter", token2, context]);
|
|
14795
16587
|
stack.push(token2);
|
|
14796
16588
|
return token2;
|
|
14797
16589
|
}
|
|
14798
16590
|
function exit2(type) {
|
|
14799
16591
|
const token2 = stack.pop();
|
|
14800
|
-
token2.end =
|
|
16592
|
+
token2.end = now2();
|
|
14801
16593
|
context.events.push(["exit", token2, context]);
|
|
14802
16594
|
return token2;
|
|
14803
16595
|
}
|
|
@@ -14892,7 +16684,7 @@ function createTokenizer(parser, initialize, from2) {
|
|
|
14892
16684
|
}
|
|
14893
16685
|
}
|
|
14894
16686
|
function store() {
|
|
14895
|
-
const startPoint =
|
|
16687
|
+
const startPoint = now2();
|
|
14896
16688
|
const startPrevious = context.previous;
|
|
14897
16689
|
const startCurrentConstruct = context.currentConstruct;
|
|
14898
16690
|
const startEventsIndex = context.events.length;
|