@darajs/core 1.7.0 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{dara_core-1.7.0-py3-none-any.whl → dara_core-1.7.2-py3-none-any.whl} +0 -0
- package/dist/shared/interactivity/persistence.d.ts.map +1 -1
- package/dist/shared/interactivity/persistence.js +17 -28
- package/dist/shared/interactivity/persistence.js.map +1 -1
- package/dist/shared/interactivity/plain-variable.d.ts.map +1 -1
- package/dist/shared/interactivity/plain-variable.js +79 -20
- package/dist/shared/interactivity/plain-variable.js.map +1 -1
- package/dist/umd/dara.core.umd.js +815 -234
- package/package.json +9 -9
|
@@ -25,7 +25,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
25
25
|
(function(global2, factory) {
|
|
26
26
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react"), require("@tanstack/react-query"), require("react-dom"), require("styled-components")) : typeof define === "function" && define.amd ? define(["exports", "react", "@tanstack/react-query", "react-dom", "styled-components"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory((global2.dara = global2.dara || {}, global2.dara.core = {}), global2.React, global2.ReactQuery, global2.ReactDOM, global2.styled));
|
|
27
27
|
})(this, function(exports, React, reactQuery, ReactDOM, styled) {
|
|
28
|
-
var _instance,
|
|
28
|
+
var _instance, _observers;
|
|
29
29
|
"use strict";
|
|
30
30
|
const _interopDefaultLegacy = (e3) => e3 && typeof e3 === "object" && "default" in e3 ? e3 : { default: e3 };
|
|
31
31
|
function _interopNamespace(e3) {
|
|
@@ -17534,7 +17534,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17534
17534
|
};
|
|
17535
17535
|
return _wrapNativeSuper$1(Class);
|
|
17536
17536
|
}
|
|
17537
|
-
var PolishedError$
|
|
17537
|
+
var PolishedError$2 = /* @__PURE__ */ function(_Error) {
|
|
17538
17538
|
_inheritsLoose$1(PolishedError2, _Error);
|
|
17539
17539
|
function PolishedError2(code) {
|
|
17540
17540
|
var _this;
|
|
@@ -17545,15 +17545,15 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17545
17545
|
}
|
|
17546
17546
|
return PolishedError2;
|
|
17547
17547
|
}(/* @__PURE__ */ _wrapNativeSuper$1(Error));
|
|
17548
|
-
function colorToInt$
|
|
17548
|
+
function colorToInt$2(color) {
|
|
17549
17549
|
return Math.round(color * 255);
|
|
17550
17550
|
}
|
|
17551
|
-
function convertToInt$
|
|
17552
|
-
return colorToInt$
|
|
17551
|
+
function convertToInt$2(red, green, blue) {
|
|
17552
|
+
return colorToInt$2(red) + "," + colorToInt$2(green) + "," + colorToInt$2(blue);
|
|
17553
17553
|
}
|
|
17554
|
-
function hslToRgb$
|
|
17554
|
+
function hslToRgb$2(hue, saturation, lightness, convert2) {
|
|
17555
17555
|
if (convert2 === void 0) {
|
|
17556
|
-
convert2 = convertToInt$
|
|
17556
|
+
convert2 = convertToInt$2;
|
|
17557
17557
|
}
|
|
17558
17558
|
if (saturation === 0) {
|
|
17559
17559
|
return convert2(lightness, lightness, lightness);
|
|
@@ -17589,7 +17589,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17589
17589
|
var finalBlue = blue + lightnessModification;
|
|
17590
17590
|
return convert2(finalRed, finalGreen, finalBlue);
|
|
17591
17591
|
}
|
|
17592
|
-
var namedColorMap$
|
|
17592
|
+
var namedColorMap$2 = {
|
|
17593
17593
|
aliceblue: "f0f8ff",
|
|
17594
17594
|
antiquewhite: "faebd7",
|
|
17595
17595
|
aqua: "00ffff",
|
|
@@ -17739,33 +17739,33 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17739
17739
|
yellow: "ff0",
|
|
17740
17740
|
yellowgreen: "9acd32"
|
|
17741
17741
|
};
|
|
17742
|
-
function nameToHex$
|
|
17742
|
+
function nameToHex$2(color) {
|
|
17743
17743
|
if (typeof color !== "string")
|
|
17744
17744
|
return color;
|
|
17745
17745
|
var normalizedColorName = color.toLowerCase();
|
|
17746
|
-
return namedColorMap$
|
|
17747
|
-
}
|
|
17748
|
-
var hexRegex$
|
|
17749
|
-
var hexRgbaRegex$
|
|
17750
|
-
var reducedHexRegex$
|
|
17751
|
-
var reducedRgbaHexRegex$
|
|
17752
|
-
var rgbRegex$
|
|
17753
|
-
var rgbaRegex$
|
|
17754
|
-
var hslRegex$
|
|
17755
|
-
var hslaRegex$
|
|
17756
|
-
function parseToRgb$
|
|
17746
|
+
return namedColorMap$2[normalizedColorName] ? "#" + namedColorMap$2[normalizedColorName] : color;
|
|
17747
|
+
}
|
|
17748
|
+
var hexRegex$2 = /^#[a-fA-F0-9]{6}$/;
|
|
17749
|
+
var hexRgbaRegex$2 = /^#[a-fA-F0-9]{8}$/;
|
|
17750
|
+
var reducedHexRegex$2 = /^#[a-fA-F0-9]{3}$/;
|
|
17751
|
+
var reducedRgbaHexRegex$2 = /^#[a-fA-F0-9]{4}$/;
|
|
17752
|
+
var rgbRegex$2 = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/i;
|
|
17753
|
+
var rgbaRegex$2 = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;
|
|
17754
|
+
var hslRegex$2 = /^hsl\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
17755
|
+
var hslaRegex$2 = /^hsla\(\s*(\d{0,3}[.]?[0-9]+)\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*(\d{1,3}[.]?[0-9]?)%\s*,\s*([-+]?[0-9]*[.]?[0-9]+)\s*\)$/i;
|
|
17756
|
+
function parseToRgb$2(color) {
|
|
17757
17757
|
if (typeof color !== "string") {
|
|
17758
|
-
throw new PolishedError$
|
|
17758
|
+
throw new PolishedError$2(3);
|
|
17759
17759
|
}
|
|
17760
|
-
var normalizedColor = nameToHex$
|
|
17761
|
-
if (normalizedColor.match(hexRegex$
|
|
17760
|
+
var normalizedColor = nameToHex$2(color);
|
|
17761
|
+
if (normalizedColor.match(hexRegex$2)) {
|
|
17762
17762
|
return {
|
|
17763
17763
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
17764
17764
|
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
17765
17765
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
17766
17766
|
};
|
|
17767
17767
|
}
|
|
17768
|
-
if (normalizedColor.match(hexRgbaRegex$
|
|
17768
|
+
if (normalizedColor.match(hexRgbaRegex$2)) {
|
|
17769
17769
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
17770
17770
|
return {
|
|
17771
17771
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -17774,14 +17774,14 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17774
17774
|
alpha
|
|
17775
17775
|
};
|
|
17776
17776
|
}
|
|
17777
|
-
if (normalizedColor.match(reducedHexRegex$
|
|
17777
|
+
if (normalizedColor.match(reducedHexRegex$2)) {
|
|
17778
17778
|
return {
|
|
17779
17779
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
17780
17780
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
17781
17781
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
17782
17782
|
};
|
|
17783
17783
|
}
|
|
17784
|
-
if (normalizedColor.match(reducedRgbaHexRegex$
|
|
17784
|
+
if (normalizedColor.match(reducedRgbaHexRegex$2)) {
|
|
17785
17785
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
17786
17786
|
return {
|
|
17787
17787
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -17790,7 +17790,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17790
17790
|
alpha: _alpha
|
|
17791
17791
|
};
|
|
17792
17792
|
}
|
|
17793
|
-
var rgbMatched = rgbRegex$
|
|
17793
|
+
var rgbMatched = rgbRegex$2.exec(normalizedColor);
|
|
17794
17794
|
if (rgbMatched) {
|
|
17795
17795
|
return {
|
|
17796
17796
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -17798,7 +17798,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17798
17798
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
17799
17799
|
};
|
|
17800
17800
|
}
|
|
17801
|
-
var rgbaMatched = rgbaRegex$
|
|
17801
|
+
var rgbaMatched = rgbaRegex$2.exec(normalizedColor);
|
|
17802
17802
|
if (rgbaMatched) {
|
|
17803
17803
|
return {
|
|
17804
17804
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -17807,15 +17807,15 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17807
17807
|
alpha: parseFloat("" + rgbaMatched[4])
|
|
17808
17808
|
};
|
|
17809
17809
|
}
|
|
17810
|
-
var hslMatched = hslRegex$
|
|
17810
|
+
var hslMatched = hslRegex$2.exec(normalizedColor);
|
|
17811
17811
|
if (hslMatched) {
|
|
17812
17812
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
17813
17813
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
17814
17814
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
17815
|
-
var rgbColorString = "rgb(" + hslToRgb$
|
|
17816
|
-
var hslRgbMatched = rgbRegex$
|
|
17815
|
+
var rgbColorString = "rgb(" + hslToRgb$2(hue, saturation, lightness) + ")";
|
|
17816
|
+
var hslRgbMatched = rgbRegex$2.exec(rgbColorString);
|
|
17817
17817
|
if (!hslRgbMatched) {
|
|
17818
|
-
throw new PolishedError$
|
|
17818
|
+
throw new PolishedError$2(4, normalizedColor, rgbColorString);
|
|
17819
17819
|
}
|
|
17820
17820
|
return {
|
|
17821
17821
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
@@ -17823,15 +17823,15 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17823
17823
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
17824
17824
|
};
|
|
17825
17825
|
}
|
|
17826
|
-
var hslaMatched = hslaRegex$
|
|
17826
|
+
var hslaMatched = hslaRegex$2.exec(normalizedColor);
|
|
17827
17827
|
if (hslaMatched) {
|
|
17828
17828
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
17829
17829
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
17830
17830
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
17831
|
-
var _rgbColorString = "rgb(" + hslToRgb$
|
|
17832
|
-
var _hslRgbMatched = rgbRegex$
|
|
17831
|
+
var _rgbColorString = "rgb(" + hslToRgb$2(_hue, _saturation, _lightness) + ")";
|
|
17832
|
+
var _hslRgbMatched = rgbRegex$2.exec(_rgbColorString);
|
|
17833
17833
|
if (!_hslRgbMatched) {
|
|
17834
|
-
throw new PolishedError$
|
|
17834
|
+
throw new PolishedError$2(4, normalizedColor, _rgbColorString);
|
|
17835
17835
|
}
|
|
17836
17836
|
return {
|
|
17837
17837
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
@@ -17840,60 +17840,60 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
17840
17840
|
alpha: parseFloat("" + hslaMatched[4])
|
|
17841
17841
|
};
|
|
17842
17842
|
}
|
|
17843
|
-
throw new PolishedError$
|
|
17843
|
+
throw new PolishedError$2(5);
|
|
17844
17844
|
}
|
|
17845
|
-
var reduceHexValue$
|
|
17845
|
+
var reduceHexValue$3 = function reduceHexValue2(value) {
|
|
17846
17846
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
17847
17847
|
return "#" + value[1] + value[3] + value[5];
|
|
17848
17848
|
}
|
|
17849
17849
|
return value;
|
|
17850
17850
|
};
|
|
17851
|
-
function numberToHex$
|
|
17851
|
+
function numberToHex$2(value) {
|
|
17852
17852
|
var hex = value.toString(16);
|
|
17853
17853
|
return hex.length === 1 ? "0" + hex : hex;
|
|
17854
17854
|
}
|
|
17855
|
-
function rgb$
|
|
17855
|
+
function rgb$2(value, green, blue) {
|
|
17856
17856
|
if (typeof value === "number" && typeof green === "number" && typeof blue === "number") {
|
|
17857
|
-
return reduceHexValue$
|
|
17857
|
+
return reduceHexValue$3("#" + numberToHex$2(value) + numberToHex$2(green) + numberToHex$2(blue));
|
|
17858
17858
|
} else if (typeof value === "object" && green === void 0 && blue === void 0) {
|
|
17859
|
-
return reduceHexValue$
|
|
17859
|
+
return reduceHexValue$3("#" + numberToHex$2(value.red) + numberToHex$2(value.green) + numberToHex$2(value.blue));
|
|
17860
17860
|
}
|
|
17861
|
-
throw new PolishedError$
|
|
17861
|
+
throw new PolishedError$2(6);
|
|
17862
17862
|
}
|
|
17863
|
-
function rgba$
|
|
17863
|
+
function rgba$2(firstValue, secondValue, thirdValue, fourthValue) {
|
|
17864
17864
|
if (typeof firstValue === "string" && typeof secondValue === "number") {
|
|
17865
|
-
var rgbValue = parseToRgb$
|
|
17865
|
+
var rgbValue = parseToRgb$2(firstValue);
|
|
17866
17866
|
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
17867
17867
|
} else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") {
|
|
17868
|
-
return fourthValue >= 1 ? rgb$
|
|
17868
|
+
return fourthValue >= 1 ? rgb$2(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
17869
17869
|
} else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) {
|
|
17870
|
-
return firstValue.alpha >= 1 ? rgb$
|
|
17870
|
+
return firstValue.alpha >= 1 ? rgb$2(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
17871
17871
|
}
|
|
17872
|
-
throw new PolishedError$
|
|
17872
|
+
throw new PolishedError$2(7);
|
|
17873
17873
|
}
|
|
17874
|
-
function curried$
|
|
17874
|
+
function curried$2(f2, length, acc) {
|
|
17875
17875
|
return function fn() {
|
|
17876
17876
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
17877
|
-
return combined.length >= length ? f2.apply(this, combined) : curried$
|
|
17877
|
+
return combined.length >= length ? f2.apply(this, combined) : curried$2(f2, length, combined);
|
|
17878
17878
|
};
|
|
17879
17879
|
}
|
|
17880
|
-
function curry$
|
|
17881
|
-
return curried$
|
|
17880
|
+
function curry$3(f2) {
|
|
17881
|
+
return curried$2(f2, f2.length, []);
|
|
17882
17882
|
}
|
|
17883
|
-
function guard$
|
|
17883
|
+
function guard$2(lowerBoundary, upperBoundary, value) {
|
|
17884
17884
|
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
17885
17885
|
}
|
|
17886
|
-
function transparentize$
|
|
17886
|
+
function transparentize$2(amount, color) {
|
|
17887
17887
|
if (color === "transparent")
|
|
17888
17888
|
return color;
|
|
17889
|
-
var parsedColor = parseToRgb$
|
|
17889
|
+
var parsedColor = parseToRgb$2(color);
|
|
17890
17890
|
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
17891
17891
|
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
17892
|
-
alpha: guard$
|
|
17892
|
+
alpha: guard$2(0, 1, (alpha * 100 - parseFloat(amount) * 100) / 100)
|
|
17893
17893
|
});
|
|
17894
|
-
return rgba$
|
|
17894
|
+
return rgba$2(colorWithAlpha);
|
|
17895
17895
|
}
|
|
17896
|
-
var curriedTransparentize$2 = /* @__PURE__ */ curry$
|
|
17896
|
+
var curriedTransparentize$2 = /* @__PURE__ */ curry$3(transparentize$2);
|
|
17897
17897
|
const Wrapper$8 = styled__default.default.div`
|
|
17898
17898
|
display: flex;
|
|
17899
17899
|
gap: 1rem;
|
|
@@ -50266,77 +50266,26 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50266
50266
|
}
|
|
50267
50267
|
return DelayMessage2;
|
|
50268
50268
|
}();
|
|
50269
|
-
function
|
|
50270
|
-
|
|
50271
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
50272
|
-
} catch (e3) {
|
|
50273
|
-
return typeof fn === "function";
|
|
50274
|
-
}
|
|
50275
|
-
}
|
|
50276
|
-
function _construct(Parent, args, Class) {
|
|
50277
|
-
if (_isNativeReflectConstruct$1()) {
|
|
50278
|
-
_construct = Reflect.construct.bind();
|
|
50279
|
-
} else {
|
|
50280
|
-
_construct = function _construct2(Parent2, args2, Class2) {
|
|
50281
|
-
var a2 = [null];
|
|
50282
|
-
a2.push.apply(a2, args2);
|
|
50283
|
-
var Constructor = Function.bind.apply(Parent2, a2);
|
|
50284
|
-
var instance = new Constructor();
|
|
50285
|
-
if (Class2)
|
|
50286
|
-
_setPrototypeOf$5(instance, Class2.prototype);
|
|
50287
|
-
return instance;
|
|
50288
|
-
};
|
|
50289
|
-
}
|
|
50290
|
-
return _construct.apply(null, arguments);
|
|
50291
|
-
}
|
|
50292
|
-
function _wrapNativeSuper(Class) {
|
|
50293
|
-
var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
50294
|
-
_wrapNativeSuper = function _wrapNativeSuper2(Class2) {
|
|
50295
|
-
if (Class2 === null || !_isNativeFunction(Class2))
|
|
50296
|
-
return Class2;
|
|
50297
|
-
if (typeof Class2 !== "function") {
|
|
50298
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
50299
|
-
}
|
|
50300
|
-
if (typeof _cache !== "undefined") {
|
|
50301
|
-
if (_cache.has(Class2))
|
|
50302
|
-
return _cache.get(Class2);
|
|
50303
|
-
_cache.set(Class2, Wrapper2);
|
|
50304
|
-
}
|
|
50305
|
-
function Wrapper2() {
|
|
50306
|
-
return _construct(Class2, arguments, _getPrototypeOf$1(this).constructor);
|
|
50307
|
-
}
|
|
50308
|
-
Wrapper2.prototype = Object.create(Class2.prototype, {
|
|
50309
|
-
constructor: {
|
|
50310
|
-
value: Wrapper2,
|
|
50311
|
-
enumerable: false,
|
|
50312
|
-
writable: true,
|
|
50313
|
-
configurable: true
|
|
50314
|
-
}
|
|
50315
|
-
});
|
|
50316
|
-
return _setPrototypeOf$5(Wrapper2, Class2);
|
|
50317
|
-
};
|
|
50318
|
-
return _wrapNativeSuper(Class);
|
|
50319
|
-
}
|
|
50320
|
-
var PolishedError = /* @__PURE__ */ function(_Error) {
|
|
50321
|
-
_inheritsLoose$2(PolishedError2, _Error);
|
|
50269
|
+
var PolishedError$1 = /* @__PURE__ */ function(_Error) {
|
|
50270
|
+
_inheritsLoose$1(PolishedError2, _Error);
|
|
50322
50271
|
function PolishedError2(code) {
|
|
50323
50272
|
var _this;
|
|
50324
50273
|
{
|
|
50325
50274
|
_this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
|
|
50326
50275
|
}
|
|
50327
|
-
return _assertThisInitialized$
|
|
50276
|
+
return _assertThisInitialized$3(_this);
|
|
50328
50277
|
}
|
|
50329
50278
|
return PolishedError2;
|
|
50330
|
-
}(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
50331
|
-
function colorToInt(color) {
|
|
50279
|
+
}(/* @__PURE__ */ _wrapNativeSuper$1(Error));
|
|
50280
|
+
function colorToInt$1(color) {
|
|
50332
50281
|
return Math.round(color * 255);
|
|
50333
50282
|
}
|
|
50334
|
-
function convertToInt(red, green, blue) {
|
|
50335
|
-
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
50283
|
+
function convertToInt$1(red, green, blue) {
|
|
50284
|
+
return colorToInt$1(red) + "," + colorToInt$1(green) + "," + colorToInt$1(blue);
|
|
50336
50285
|
}
|
|
50337
|
-
function hslToRgb(hue, saturation, lightness, convert2) {
|
|
50286
|
+
function hslToRgb$1(hue, saturation, lightness, convert2) {
|
|
50338
50287
|
if (convert2 === void 0) {
|
|
50339
|
-
convert2 = convertToInt;
|
|
50288
|
+
convert2 = convertToInt$1;
|
|
50340
50289
|
}
|
|
50341
50290
|
if (saturation === 0) {
|
|
50342
50291
|
return convert2(lightness, lightness, lightness);
|
|
@@ -50372,7 +50321,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50372
50321
|
var finalBlue = blue + lightnessModification;
|
|
50373
50322
|
return convert2(finalRed, finalGreen, finalBlue);
|
|
50374
50323
|
}
|
|
50375
|
-
var namedColorMap = {
|
|
50324
|
+
var namedColorMap$1 = {
|
|
50376
50325
|
aliceblue: "f0f8ff",
|
|
50377
50326
|
antiquewhite: "faebd7",
|
|
50378
50327
|
aqua: "00ffff",
|
|
@@ -50522,33 +50471,33 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50522
50471
|
yellow: "ff0",
|
|
50523
50472
|
yellowgreen: "9acd32"
|
|
50524
50473
|
};
|
|
50525
|
-
function nameToHex(color) {
|
|
50474
|
+
function nameToHex$1(color) {
|
|
50526
50475
|
if (typeof color !== "string")
|
|
50527
50476
|
return color;
|
|
50528
50477
|
var normalizedColorName = color.toLowerCase();
|
|
50529
|
-
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
|
|
50478
|
+
return namedColorMap$1[normalizedColorName] ? "#" + namedColorMap$1[normalizedColorName] : color;
|
|
50530
50479
|
}
|
|
50531
|
-
var hexRegex = /^#[a-fA-F0-9]{6}$/;
|
|
50532
|
-
var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
|
|
50533
|
-
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
|
|
50534
|
-
var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
|
|
50535
|
-
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
|
|
50536
|
-
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
50537
|
-
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
50538
|
-
var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
50539
|
-
function parseToRgb(color) {
|
|
50480
|
+
var hexRegex$1 = /^#[a-fA-F0-9]{6}$/;
|
|
50481
|
+
var hexRgbaRegex$1 = /^#[a-fA-F0-9]{8}$/;
|
|
50482
|
+
var reducedHexRegex$1 = /^#[a-fA-F0-9]{3}$/;
|
|
50483
|
+
var reducedRgbaHexRegex$1 = /^#[a-fA-F0-9]{4}$/;
|
|
50484
|
+
var rgbRegex$1 = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
|
|
50485
|
+
var rgbaRegex$1 = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
50486
|
+
var hslRegex$1 = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
50487
|
+
var hslaRegex$1 = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
50488
|
+
function parseToRgb$1(color) {
|
|
50540
50489
|
if (typeof color !== "string") {
|
|
50541
|
-
throw new PolishedError(3);
|
|
50490
|
+
throw new PolishedError$1(3);
|
|
50542
50491
|
}
|
|
50543
|
-
var normalizedColor = nameToHex(color);
|
|
50544
|
-
if (normalizedColor.match(hexRegex)) {
|
|
50492
|
+
var normalizedColor = nameToHex$1(color);
|
|
50493
|
+
if (normalizedColor.match(hexRegex$1)) {
|
|
50545
50494
|
return {
|
|
50546
50495
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
50547
50496
|
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
50548
50497
|
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
50549
50498
|
};
|
|
50550
50499
|
}
|
|
50551
|
-
if (normalizedColor.match(hexRgbaRegex)) {
|
|
50500
|
+
if (normalizedColor.match(hexRgbaRegex$1)) {
|
|
50552
50501
|
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
50553
50502
|
return {
|
|
50554
50503
|
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
@@ -50557,14 +50506,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50557
50506
|
alpha
|
|
50558
50507
|
};
|
|
50559
50508
|
}
|
|
50560
|
-
if (normalizedColor.match(reducedHexRegex)) {
|
|
50509
|
+
if (normalizedColor.match(reducedHexRegex$1)) {
|
|
50561
50510
|
return {
|
|
50562
50511
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
50563
50512
|
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
50564
50513
|
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
50565
50514
|
};
|
|
50566
50515
|
}
|
|
50567
|
-
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
50516
|
+
if (normalizedColor.match(reducedRgbaHexRegex$1)) {
|
|
50568
50517
|
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
50569
50518
|
return {
|
|
50570
50519
|
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
@@ -50573,7 +50522,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50573
50522
|
alpha: _alpha
|
|
50574
50523
|
};
|
|
50575
50524
|
}
|
|
50576
|
-
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
50525
|
+
var rgbMatched = rgbRegex$1.exec(normalizedColor);
|
|
50577
50526
|
if (rgbMatched) {
|
|
50578
50527
|
return {
|
|
50579
50528
|
red: parseInt("" + rgbMatched[1], 10),
|
|
@@ -50581,7 +50530,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50581
50530
|
blue: parseInt("" + rgbMatched[3], 10)
|
|
50582
50531
|
};
|
|
50583
50532
|
}
|
|
50584
|
-
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
50533
|
+
var rgbaMatched = rgbaRegex$1.exec(normalizedColor.substring(0, 50));
|
|
50585
50534
|
if (rgbaMatched) {
|
|
50586
50535
|
return {
|
|
50587
50536
|
red: parseInt("" + rgbaMatched[1], 10),
|
|
@@ -50590,15 +50539,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50590
50539
|
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
50591
50540
|
};
|
|
50592
50541
|
}
|
|
50593
|
-
var hslMatched = hslRegex.exec(normalizedColor);
|
|
50542
|
+
var hslMatched = hslRegex$1.exec(normalizedColor);
|
|
50594
50543
|
if (hslMatched) {
|
|
50595
50544
|
var hue = parseInt("" + hslMatched[1], 10);
|
|
50596
50545
|
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
50597
50546
|
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
50598
|
-
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
50599
|
-
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
50547
|
+
var rgbColorString = "rgb(" + hslToRgb$1(hue, saturation, lightness) + ")";
|
|
50548
|
+
var hslRgbMatched = rgbRegex$1.exec(rgbColorString);
|
|
50600
50549
|
if (!hslRgbMatched) {
|
|
50601
|
-
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
50550
|
+
throw new PolishedError$1(4, normalizedColor, rgbColorString);
|
|
50602
50551
|
}
|
|
50603
50552
|
return {
|
|
50604
50553
|
red: parseInt("" + hslRgbMatched[1], 10),
|
|
@@ -50606,15 +50555,15 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50606
50555
|
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
50607
50556
|
};
|
|
50608
50557
|
}
|
|
50609
|
-
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
50558
|
+
var hslaMatched = hslaRegex$1.exec(normalizedColor.substring(0, 50));
|
|
50610
50559
|
if (hslaMatched) {
|
|
50611
50560
|
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
50612
50561
|
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
50613
50562
|
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
50614
|
-
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
50615
|
-
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
50563
|
+
var _rgbColorString = "rgb(" + hslToRgb$1(_hue, _saturation, _lightness) + ")";
|
|
50564
|
+
var _hslRgbMatched = rgbRegex$1.exec(_rgbColorString);
|
|
50616
50565
|
if (!_hslRgbMatched) {
|
|
50617
|
-
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
50566
|
+
throw new PolishedError$1(4, normalizedColor, _rgbColorString);
|
|
50618
50567
|
}
|
|
50619
50568
|
return {
|
|
50620
50569
|
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
@@ -50623,50 +50572,191 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50623
50572
|
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
50624
50573
|
};
|
|
50625
50574
|
}
|
|
50626
|
-
throw new PolishedError(5);
|
|
50575
|
+
throw new PolishedError$1(5);
|
|
50627
50576
|
}
|
|
50628
|
-
|
|
50577
|
+
function rgbToHsl(color) {
|
|
50578
|
+
var red = color.red / 255;
|
|
50579
|
+
var green = color.green / 255;
|
|
50580
|
+
var blue = color.blue / 255;
|
|
50581
|
+
var max2 = Math.max(red, green, blue);
|
|
50582
|
+
var min2 = Math.min(red, green, blue);
|
|
50583
|
+
var lightness = (max2 + min2) / 2;
|
|
50584
|
+
if (max2 === min2) {
|
|
50585
|
+
if (color.alpha !== void 0) {
|
|
50586
|
+
return {
|
|
50587
|
+
hue: 0,
|
|
50588
|
+
saturation: 0,
|
|
50589
|
+
lightness,
|
|
50590
|
+
alpha: color.alpha
|
|
50591
|
+
};
|
|
50592
|
+
} else {
|
|
50593
|
+
return {
|
|
50594
|
+
hue: 0,
|
|
50595
|
+
saturation: 0,
|
|
50596
|
+
lightness
|
|
50597
|
+
};
|
|
50598
|
+
}
|
|
50599
|
+
}
|
|
50600
|
+
var hue;
|
|
50601
|
+
var delta = max2 - min2;
|
|
50602
|
+
var saturation = lightness > 0.5 ? delta / (2 - max2 - min2) : delta / (max2 + min2);
|
|
50603
|
+
switch (max2) {
|
|
50604
|
+
case red:
|
|
50605
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
50606
|
+
break;
|
|
50607
|
+
case green:
|
|
50608
|
+
hue = (blue - red) / delta + 2;
|
|
50609
|
+
break;
|
|
50610
|
+
default:
|
|
50611
|
+
hue = (red - green) / delta + 4;
|
|
50612
|
+
break;
|
|
50613
|
+
}
|
|
50614
|
+
hue *= 60;
|
|
50615
|
+
if (color.alpha !== void 0) {
|
|
50616
|
+
return {
|
|
50617
|
+
hue,
|
|
50618
|
+
saturation,
|
|
50619
|
+
lightness,
|
|
50620
|
+
alpha: color.alpha
|
|
50621
|
+
};
|
|
50622
|
+
}
|
|
50623
|
+
return {
|
|
50624
|
+
hue,
|
|
50625
|
+
saturation,
|
|
50626
|
+
lightness
|
|
50627
|
+
};
|
|
50628
|
+
}
|
|
50629
|
+
function parseToHsl(color) {
|
|
50630
|
+
return rgbToHsl(parseToRgb$1(color));
|
|
50631
|
+
}
|
|
50632
|
+
var reduceHexValue$2 = function reduceHexValue2(value) {
|
|
50629
50633
|
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
50630
50634
|
return "#" + value[1] + value[3] + value[5];
|
|
50631
50635
|
}
|
|
50632
50636
|
return value;
|
|
50633
50637
|
};
|
|
50634
|
-
var reduceHexValue$1 = reduceHexValue;
|
|
50635
|
-
function numberToHex(value) {
|
|
50638
|
+
var reduceHexValue$1$1 = reduceHexValue$2;
|
|
50639
|
+
function numberToHex$1(value) {
|
|
50636
50640
|
var hex = value.toString(16);
|
|
50637
50641
|
return hex.length === 1 ? "0" + hex : hex;
|
|
50638
50642
|
}
|
|
50639
|
-
function
|
|
50643
|
+
function colorToHex(color) {
|
|
50644
|
+
return numberToHex$1(Math.round(color * 255));
|
|
50645
|
+
}
|
|
50646
|
+
function convertToHex(red, green, blue) {
|
|
50647
|
+
return reduceHexValue$1$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
50648
|
+
}
|
|
50649
|
+
function hslToHex(hue, saturation, lightness) {
|
|
50650
|
+
return hslToRgb$1(hue, saturation, lightness, convertToHex);
|
|
50651
|
+
}
|
|
50652
|
+
function hsl(value, saturation, lightness) {
|
|
50653
|
+
if (typeof value === "number" && typeof saturation === "number" && typeof lightness === "number") {
|
|
50654
|
+
return hslToHex(value, saturation, lightness);
|
|
50655
|
+
} else if (typeof value === "object" && saturation === void 0 && lightness === void 0) {
|
|
50656
|
+
return hslToHex(value.hue, value.saturation, value.lightness);
|
|
50657
|
+
}
|
|
50658
|
+
throw new PolishedError$1(1);
|
|
50659
|
+
}
|
|
50660
|
+
function hsla(value, saturation, lightness, alpha) {
|
|
50661
|
+
if (typeof value === "number" && typeof saturation === "number" && typeof lightness === "number" && typeof alpha === "number") {
|
|
50662
|
+
return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb$1(value, saturation, lightness) + "," + alpha + ")";
|
|
50663
|
+
} else if (typeof value === "object" && saturation === void 0 && lightness === void 0 && alpha === void 0) {
|
|
50664
|
+
return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb$1(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
50665
|
+
}
|
|
50666
|
+
throw new PolishedError$1(2);
|
|
50667
|
+
}
|
|
50668
|
+
function rgb$1(value, green, blue) {
|
|
50640
50669
|
if (typeof value === "number" && typeof green === "number" && typeof blue === "number") {
|
|
50641
|
-
return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
|
|
50670
|
+
return reduceHexValue$1$1("#" + numberToHex$1(value) + numberToHex$1(green) + numberToHex$1(blue));
|
|
50642
50671
|
} else if (typeof value === "object" && green === void 0 && blue === void 0) {
|
|
50643
|
-
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
50672
|
+
return reduceHexValue$1$1("#" + numberToHex$1(value.red) + numberToHex$1(value.green) + numberToHex$1(value.blue));
|
|
50644
50673
|
}
|
|
50645
|
-
throw new PolishedError(6);
|
|
50674
|
+
throw new PolishedError$1(6);
|
|
50646
50675
|
}
|
|
50647
|
-
function rgba(firstValue, secondValue, thirdValue, fourthValue) {
|
|
50676
|
+
function rgba$1(firstValue, secondValue, thirdValue, fourthValue) {
|
|
50648
50677
|
if (typeof firstValue === "string" && typeof secondValue === "number") {
|
|
50649
|
-
var rgbValue = parseToRgb(firstValue);
|
|
50678
|
+
var rgbValue = parseToRgb$1(firstValue);
|
|
50650
50679
|
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
50651
50680
|
} else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") {
|
|
50652
|
-
return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
50681
|
+
return fourthValue >= 1 ? rgb$1(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
50653
50682
|
} else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) {
|
|
50654
|
-
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
50683
|
+
return firstValue.alpha >= 1 ? rgb$1(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
50655
50684
|
}
|
|
50656
|
-
throw new PolishedError(7);
|
|
50685
|
+
throw new PolishedError$1(7);
|
|
50657
50686
|
}
|
|
50658
|
-
function
|
|
50687
|
+
var isRgb = function isRgb2(color) {
|
|
50688
|
+
return typeof color.red === "number" && typeof color.green === "number" && typeof color.blue === "number" && (typeof color.alpha !== "number" || typeof color.alpha === "undefined");
|
|
50689
|
+
};
|
|
50690
|
+
var isRgba = function isRgba2(color) {
|
|
50691
|
+
return typeof color.red === "number" && typeof color.green === "number" && typeof color.blue === "number" && typeof color.alpha === "number";
|
|
50692
|
+
};
|
|
50693
|
+
var isHsl = function isHsl2(color) {
|
|
50694
|
+
return typeof color.hue === "number" && typeof color.saturation === "number" && typeof color.lightness === "number" && (typeof color.alpha !== "number" || typeof color.alpha === "undefined");
|
|
50695
|
+
};
|
|
50696
|
+
var isHsla = function isHsla2(color) {
|
|
50697
|
+
return typeof color.hue === "number" && typeof color.saturation === "number" && typeof color.lightness === "number" && typeof color.alpha === "number";
|
|
50698
|
+
};
|
|
50699
|
+
function toColorString(color) {
|
|
50700
|
+
if (typeof color !== "object")
|
|
50701
|
+
throw new PolishedError$1(8);
|
|
50702
|
+
if (isRgba(color))
|
|
50703
|
+
return rgba$1(color);
|
|
50704
|
+
if (isRgb(color))
|
|
50705
|
+
return rgb$1(color);
|
|
50706
|
+
if (isHsla(color))
|
|
50707
|
+
return hsla(color);
|
|
50708
|
+
if (isHsl(color))
|
|
50709
|
+
return hsl(color);
|
|
50710
|
+
throw new PolishedError$1(8);
|
|
50711
|
+
}
|
|
50712
|
+
function curried$1(f2, length, acc) {
|
|
50659
50713
|
return function fn() {
|
|
50660
50714
|
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
50661
|
-
return combined.length >= length ? f2.apply(this, combined) : curried(f2, length, combined);
|
|
50715
|
+
return combined.length >= length ? f2.apply(this, combined) : curried$1(f2, length, combined);
|
|
50662
50716
|
};
|
|
50663
50717
|
}
|
|
50664
|
-
function curry$
|
|
50665
|
-
return curried(f2, f2.length, []);
|
|
50718
|
+
function curry$2(f2) {
|
|
50719
|
+
return curried$1(f2, f2.length, []);
|
|
50666
50720
|
}
|
|
50667
|
-
function
|
|
50721
|
+
function adjustHue(degree, color) {
|
|
50722
|
+
if (color === "transparent")
|
|
50723
|
+
return color;
|
|
50724
|
+
var hslColor = parseToHsl(color);
|
|
50725
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
50726
|
+
hue: hslColor.hue + parseFloat(degree)
|
|
50727
|
+
}));
|
|
50728
|
+
}
|
|
50729
|
+
curry$2(adjustHue);
|
|
50730
|
+
function guard$1(lowerBoundary, upperBoundary, value) {
|
|
50668
50731
|
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
50669
50732
|
}
|
|
50733
|
+
function darken(amount, color) {
|
|
50734
|
+
if (color === "transparent")
|
|
50735
|
+
return color;
|
|
50736
|
+
var hslColor = parseToHsl(color);
|
|
50737
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
50738
|
+
lightness: guard$1(0, 1, hslColor.lightness - parseFloat(amount))
|
|
50739
|
+
}));
|
|
50740
|
+
}
|
|
50741
|
+
curry$2(darken);
|
|
50742
|
+
function desaturate(amount, color) {
|
|
50743
|
+
if (color === "transparent")
|
|
50744
|
+
return color;
|
|
50745
|
+
var hslColor = parseToHsl(color);
|
|
50746
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
50747
|
+
saturation: guard$1(0, 1, hslColor.saturation - parseFloat(amount))
|
|
50748
|
+
}));
|
|
50749
|
+
}
|
|
50750
|
+
curry$2(desaturate);
|
|
50751
|
+
function lighten(amount, color) {
|
|
50752
|
+
if (color === "transparent")
|
|
50753
|
+
return color;
|
|
50754
|
+
var hslColor = parseToHsl(color);
|
|
50755
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
50756
|
+
lightness: guard$1(0, 1, hslColor.lightness + parseFloat(amount))
|
|
50757
|
+
}));
|
|
50758
|
+
}
|
|
50759
|
+
curry$2(lighten);
|
|
50670
50760
|
function mix(weight, color, otherColor) {
|
|
50671
50761
|
if (color === "transparent")
|
|
50672
50762
|
return otherColor;
|
|
@@ -50674,12 +50764,12 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50674
50764
|
return color;
|
|
50675
50765
|
if (weight === 0)
|
|
50676
50766
|
return otherColor;
|
|
50677
|
-
var parsedColor1 = parseToRgb(color);
|
|
50678
|
-
var color1 = _extends$
|
|
50767
|
+
var parsedColor1 = parseToRgb$1(color);
|
|
50768
|
+
var color1 = _extends$1({}, parsedColor1, {
|
|
50679
50769
|
alpha: typeof parsedColor1.alpha === "number" ? parsedColor1.alpha : 1
|
|
50680
50770
|
});
|
|
50681
|
-
var parsedColor2 = parseToRgb(otherColor);
|
|
50682
|
-
var color2 = _extends$
|
|
50771
|
+
var parsedColor2 = parseToRgb$1(otherColor);
|
|
50772
|
+
var color2 = _extends$1({}, parsedColor2, {
|
|
50683
50773
|
alpha: typeof parsedColor2.alpha === "number" ? parsedColor2.alpha : 1
|
|
50684
50774
|
});
|
|
50685
50775
|
var alphaDelta = color1.alpha - color2.alpha;
|
|
@@ -50694,22 +50784,77 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
50694
50784
|
blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),
|
|
50695
50785
|
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
50696
50786
|
};
|
|
50697
|
-
return rgba(mixedColor);
|
|
50787
|
+
return rgba$1(mixedColor);
|
|
50698
50788
|
}
|
|
50699
|
-
var curriedMix =
|
|
50789
|
+
var curriedMix = curry$2(mix);
|
|
50700
50790
|
var mix$1 = curriedMix;
|
|
50701
|
-
function
|
|
50791
|
+
function opacify(amount, color) {
|
|
50702
50792
|
if (color === "transparent")
|
|
50703
50793
|
return color;
|
|
50704
|
-
var parsedColor = parseToRgb(color);
|
|
50794
|
+
var parsedColor = parseToRgb$1(color);
|
|
50705
50795
|
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
50706
|
-
var colorWithAlpha = _extends$
|
|
50707
|
-
alpha: guard(0, 1,
|
|
50796
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
50797
|
+
alpha: guard$1(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100)
|
|
50708
50798
|
});
|
|
50709
|
-
return rgba(colorWithAlpha);
|
|
50799
|
+
return rgba$1(colorWithAlpha);
|
|
50710
50800
|
}
|
|
50711
|
-
|
|
50712
|
-
|
|
50801
|
+
curry$2(opacify);
|
|
50802
|
+
function saturate(amount, color) {
|
|
50803
|
+
if (color === "transparent")
|
|
50804
|
+
return color;
|
|
50805
|
+
var hslColor = parseToHsl(color);
|
|
50806
|
+
return toColorString(_extends$1({}, hslColor, {
|
|
50807
|
+
saturation: guard$1(0, 1, hslColor.saturation + parseFloat(amount))
|
|
50808
|
+
}));
|
|
50809
|
+
}
|
|
50810
|
+
curry$2(saturate);
|
|
50811
|
+
function setHue(hue, color) {
|
|
50812
|
+
if (color === "transparent")
|
|
50813
|
+
return color;
|
|
50814
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
50815
|
+
hue: parseFloat(hue)
|
|
50816
|
+
}));
|
|
50817
|
+
}
|
|
50818
|
+
curry$2(setHue);
|
|
50819
|
+
function setLightness(lightness, color) {
|
|
50820
|
+
if (color === "transparent")
|
|
50821
|
+
return color;
|
|
50822
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
50823
|
+
lightness: parseFloat(lightness)
|
|
50824
|
+
}));
|
|
50825
|
+
}
|
|
50826
|
+
curry$2(setLightness);
|
|
50827
|
+
function setSaturation(saturation, color) {
|
|
50828
|
+
if (color === "transparent")
|
|
50829
|
+
return color;
|
|
50830
|
+
return toColorString(_extends$1({}, parseToHsl(color), {
|
|
50831
|
+
saturation: parseFloat(saturation)
|
|
50832
|
+
}));
|
|
50833
|
+
}
|
|
50834
|
+
curry$2(setSaturation);
|
|
50835
|
+
function shade(percentage, color) {
|
|
50836
|
+
if (color === "transparent")
|
|
50837
|
+
return color;
|
|
50838
|
+
return mix$1(parseFloat(percentage), "rgb(0, 0, 0)", color);
|
|
50839
|
+
}
|
|
50840
|
+
curry$2(shade);
|
|
50841
|
+
function tint(percentage, color) {
|
|
50842
|
+
if (color === "transparent")
|
|
50843
|
+
return color;
|
|
50844
|
+
return mix$1(parseFloat(percentage), "rgb(255, 255, 255)", color);
|
|
50845
|
+
}
|
|
50846
|
+
curry$2(tint);
|
|
50847
|
+
function transparentize$1(amount, color) {
|
|
50848
|
+
if (color === "transparent")
|
|
50849
|
+
return color;
|
|
50850
|
+
var parsedColor = parseToRgb$1(color);
|
|
50851
|
+
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
50852
|
+
var colorWithAlpha = _extends$1({}, parsedColor, {
|
|
50853
|
+
alpha: guard$1(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
50854
|
+
});
|
|
50855
|
+
return rgba$1(colorWithAlpha);
|
|
50856
|
+
}
|
|
50857
|
+
curry$2(transparentize$1);
|
|
50713
50858
|
const NotificationWrapper$1 = styled__default.default.div`
|
|
50714
50859
|
pointer-events: auto;
|
|
50715
50860
|
|
|
@@ -51483,14 +51628,14 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
51483
51628
|
var _createWrap = createWrap$1;
|
|
51484
51629
|
var createWrap = _createWrap;
|
|
51485
51630
|
var WRAP_CURRY_FLAG = 8;
|
|
51486
|
-
function curry(func, arity, guard2) {
|
|
51631
|
+
function curry$1(func, arity, guard2) {
|
|
51487
51632
|
arity = guard2 ? void 0 : arity;
|
|
51488
51633
|
var result = createWrap(func, WRAP_CURRY_FLAG, void 0, void 0, void 0, void 0, void 0, arity);
|
|
51489
|
-
result.placeholder = curry.placeholder;
|
|
51634
|
+
result.placeholder = curry$1.placeholder;
|
|
51490
51635
|
return result;
|
|
51491
51636
|
}
|
|
51492
|
-
curry.placeholder = {};
|
|
51493
|
-
var curry_1 = curry;
|
|
51637
|
+
curry$1.placeholder = {};
|
|
51638
|
+
var curry_1 = curry$1;
|
|
51494
51639
|
function useNotifications() {
|
|
51495
51640
|
const { push } = React.useContext(NotificationContext);
|
|
51496
51641
|
const curriedPush = React__default.default.useCallback((status) => curry_1((title, err2) => {
|
|
@@ -56323,40 +56468,38 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56323
56468
|
writableObject: writableObject$1
|
|
56324
56469
|
};
|
|
56325
56470
|
var Refine_index_6 = Refine_index.mixed;
|
|
56471
|
+
const STORE_EXTRAS_MAP = /* @__PURE__ */ new Map();
|
|
56326
56472
|
function BackendStoreSync({ children }) {
|
|
56327
56473
|
const { client } = React__namespace.useContext(websocketCtx);
|
|
56328
|
-
const
|
|
56329
|
-
|
|
56330
|
-
|
|
56331
|
-
|
|
56332
|
-
|
|
56333
|
-
|
|
56334
|
-
|
|
56335
|
-
|
|
56336
|
-
},
|
|
56337
|
-
[extras]
|
|
56338
|
-
);
|
|
56474
|
+
const getStoreValue = React__namespace.useCallback(async (itemKey) => {
|
|
56475
|
+
const serializableExtras = STORE_EXTRAS_MAP.get(itemKey);
|
|
56476
|
+
const response = await request(`/api/core/store/${itemKey}`, {}, serializableExtras.extras);
|
|
56477
|
+
await handleAuthErrors(response, true);
|
|
56478
|
+
await validateResponse(response, `Failed to fetch the store value for key: ${itemKey}`);
|
|
56479
|
+
const val = await response.json();
|
|
56480
|
+
return val;
|
|
56481
|
+
}, []);
|
|
56339
56482
|
const syncStoreValues = React__namespace.useCallback(async ({ diff }) => {
|
|
56340
56483
|
const extrasMap = /* @__PURE__ */ new Map();
|
|
56341
|
-
for (const [
|
|
56342
|
-
const
|
|
56343
|
-
if (!extrasMap.has(
|
|
56344
|
-
extrasMap.set(
|
|
56484
|
+
for (const [itemKey, value] of diff.entries()) {
|
|
56485
|
+
const extras = STORE_EXTRAS_MAP.get(itemKey);
|
|
56486
|
+
if (!extrasMap.has(extras)) {
|
|
56487
|
+
extrasMap.set(extras, {});
|
|
56345
56488
|
}
|
|
56346
|
-
extrasMap.get(
|
|
56489
|
+
extrasMap.get(extras)[itemKey] = value;
|
|
56347
56490
|
}
|
|
56348
|
-
async function sendRequest(
|
|
56491
|
+
async function sendRequest(serializableExtras, storeDiff) {
|
|
56349
56492
|
const response = await request(
|
|
56350
56493
|
`/api/core/store`,
|
|
56351
56494
|
{ body: JSON.stringify(storeDiff), method: "POST" },
|
|
56352
|
-
|
|
56495
|
+
serializableExtras.extras
|
|
56353
56496
|
);
|
|
56354
56497
|
await handleAuthErrors(response, true);
|
|
56355
56498
|
await validateResponse(response, `Failed to sync the store values`);
|
|
56356
56499
|
}
|
|
56357
56500
|
await Promise.allSettled(
|
|
56358
56501
|
Array.from(extrasMap.entries()).map(
|
|
56359
|
-
([
|
|
56502
|
+
([serializableExtras, storeDiff]) => sendRequest(serializableExtras, storeDiff)
|
|
56360
56503
|
)
|
|
56361
56504
|
);
|
|
56362
56505
|
}, []);
|
|
@@ -56375,19 +56518,11 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56375
56518
|
return /* @__PURE__ */ React__namespace.createElement(RecoilSync_index_1, { listen: listenToStoreChanges, read: getStoreValue, storeKey: "BackendStore", write: syncStoreValues }, children);
|
|
56376
56519
|
}
|
|
56377
56520
|
function backendStoreEffect(variable, requestExtras) {
|
|
56521
|
+
STORE_EXTRAS_MAP.set(variable.store.uid, requestExtras);
|
|
56378
56522
|
return RecoilSync_index_2({
|
|
56379
56523
|
itemKey: variable.store.uid,
|
|
56380
56524
|
refine: Refine_index_6(),
|
|
56381
|
-
storeKey: "BackendStore"
|
|
56382
|
-
write: ({ write: write2 }, newValue) => {
|
|
56383
|
-
write2(
|
|
56384
|
-
JSON.stringify({
|
|
56385
|
-
serializedExtras: requestExtras.toJSON(),
|
|
56386
|
-
store_uid: variable.store.uid
|
|
56387
|
-
}),
|
|
56388
|
-
newValue
|
|
56389
|
-
);
|
|
56390
|
-
}
|
|
56525
|
+
storeKey: "BackendStore"
|
|
56391
56526
|
});
|
|
56392
56527
|
}
|
|
56393
56528
|
function getSessionKey(extras, uid2) {
|
|
@@ -56482,7 +56617,7 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56482
56617
|
}
|
|
56483
56618
|
const _StateSynchronizer = class {
|
|
56484
56619
|
constructor() {
|
|
56485
|
-
__privateAdd(this,
|
|
56620
|
+
__privateAdd(this, _observers, /* @__PURE__ */ new Map());
|
|
56486
56621
|
}
|
|
56487
56622
|
static getInstance() {
|
|
56488
56623
|
if (!__privateGet(_StateSynchronizer, _instance)) {
|
|
@@ -56490,23 +56625,42 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56490
56625
|
}
|
|
56491
56626
|
return __privateGet(_StateSynchronizer, _instance);
|
|
56492
56627
|
}
|
|
56493
|
-
|
|
56494
|
-
if (!__privateGet(this,
|
|
56495
|
-
__privateGet(this,
|
|
56628
|
+
register(key, defaultValue) {
|
|
56629
|
+
if (!__privateGet(this, _observers).has(key)) {
|
|
56630
|
+
__privateGet(this, _observers).set(key, new BehaviorSubject({ type: "initial", value: defaultValue }));
|
|
56496
56631
|
}
|
|
56497
|
-
|
|
56632
|
+
}
|
|
56633
|
+
isRegistered(key) {
|
|
56634
|
+
return __privateGet(this, _observers).has(key);
|
|
56635
|
+
}
|
|
56636
|
+
getCurrentState(key) {
|
|
56637
|
+
if (!this.isRegistered(key)) {
|
|
56638
|
+
return null;
|
|
56639
|
+
}
|
|
56640
|
+
return __privateGet(this, _observers).get(key).getValue();
|
|
56641
|
+
}
|
|
56642
|
+
subscribe(key, subscription) {
|
|
56643
|
+
if (!this.isRegistered(key)) {
|
|
56644
|
+
this.register(key, null);
|
|
56645
|
+
}
|
|
56646
|
+
const sub = __privateGet(this, _observers).get(key).subscribe(subscription);
|
|
56498
56647
|
return () => {
|
|
56499
|
-
|
|
56648
|
+
sub.unsubscribe();
|
|
56649
|
+
if (__privateGet(this, _observers).get(key).observers.length === 0) {
|
|
56650
|
+
__privateGet(this, _observers).delete(key);
|
|
56651
|
+
}
|
|
56500
56652
|
};
|
|
56501
56653
|
}
|
|
56502
|
-
notify(key,
|
|
56503
|
-
|
|
56504
|
-
|
|
56654
|
+
notify(key, update) {
|
|
56655
|
+
if (!this.isRegistered(key)) {
|
|
56656
|
+
this.register(key, null);
|
|
56657
|
+
}
|
|
56658
|
+
__privateGet(this, _observers).get(key).next(update);
|
|
56505
56659
|
}
|
|
56506
56660
|
};
|
|
56507
56661
|
let StateSynchronizer = _StateSynchronizer;
|
|
56508
56662
|
_instance = new WeakMap();
|
|
56509
|
-
|
|
56663
|
+
_observers = new WeakMap();
|
|
56510
56664
|
__privateAdd(StateSynchronizer, _instance, void 0);
|
|
56511
56665
|
function getOrRegisterPlainVariable(variable, wsClient, taskContext, extras) {
|
|
56512
56666
|
const isNested = variable.nested && variable.nested.length > 0;
|
|
@@ -56523,23 +56677,37 @@ You must set sticky: 'left' | 'right' for the '${bugWithUnderColumnsSticky.Heade
|
|
|
56523
56677
|
) : variable.default,
|
|
56524
56678
|
effects: (extrasSerializable2) => {
|
|
56525
56679
|
const familySync = ({ onSet, setSelf, resetSelf, node }) => {
|
|
56526
|
-
|
|
56527
|
-
variable.uid,
|
|
56528
|
-
|
|
56529
|
-
|
|
56530
|
-
|
|
56531
|
-
|
|
56532
|
-
if (isReset) {
|
|
56533
|
-
resetSelf();
|
|
56534
|
-
} else {
|
|
56535
|
-
setSelf(newValue);
|
|
56536
|
-
}
|
|
56680
|
+
if (!StateSynchronizer.getInstance().isRegistered(variable.uid)) {
|
|
56681
|
+
StateSynchronizer.getInstance().register(variable.uid, variable.default);
|
|
56682
|
+
} else {
|
|
56683
|
+
const currentState = StateSynchronizer.getInstance().getCurrentState(variable.uid);
|
|
56684
|
+
if (!isDefaultDerived || (currentState == null ? void 0 : currentState.type) !== "initial") {
|
|
56685
|
+
setSelf(currentState == null ? void 0 : currentState.value);
|
|
56537
56686
|
}
|
|
56538
|
-
|
|
56687
|
+
}
|
|
56688
|
+
const unsub = StateSynchronizer.getInstance().subscribe(variable.uid, (update) => {
|
|
56689
|
+
if (update.type === "initial") {
|
|
56690
|
+
return;
|
|
56691
|
+
}
|
|
56692
|
+
if (update.nodeKey === node.key) {
|
|
56693
|
+
return;
|
|
56694
|
+
}
|
|
56695
|
+
if (update.isReset) {
|
|
56696
|
+
resetSelf();
|
|
56697
|
+
} else {
|
|
56698
|
+
setSelf(update.value);
|
|
56699
|
+
}
|
|
56700
|
+
});
|
|
56539
56701
|
onSet((newValue, oldValue, isReset) => {
|
|
56540
|
-
StateSynchronizer.getInstance().notify(variable.uid,
|
|
56702
|
+
StateSynchronizer.getInstance().notify(variable.uid, {
|
|
56703
|
+
isReset,
|
|
56704
|
+
nodeKey: node.key,
|
|
56705
|
+
oldValue,
|
|
56706
|
+
type: "update",
|
|
56707
|
+
value: newValue
|
|
56708
|
+
});
|
|
56541
56709
|
});
|
|
56542
|
-
return
|
|
56710
|
+
return unsub;
|
|
56543
56711
|
};
|
|
56544
56712
|
const effects = [familySync];
|
|
56545
56713
|
const storeEffect = getEffect(variable);
|
|
@@ -58059,6 +58227,419 @@ Inferred class string: "${iconClasses}."`
|
|
|
58059
58227
|
function isSelectorError(e3) {
|
|
58060
58228
|
return e3 !== void 0 && e3 !== null && typeof e3 === "object" && "selectorId" in e3 && "selectorExtras" in e3;
|
|
58061
58229
|
}
|
|
58230
|
+
function _isNativeFunction(fn) {
|
|
58231
|
+
try {
|
|
58232
|
+
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
58233
|
+
} catch (e3) {
|
|
58234
|
+
return typeof fn === "function";
|
|
58235
|
+
}
|
|
58236
|
+
}
|
|
58237
|
+
function _construct(Parent, args, Class) {
|
|
58238
|
+
if (_isNativeReflectConstruct$1()) {
|
|
58239
|
+
_construct = Reflect.construct.bind();
|
|
58240
|
+
} else {
|
|
58241
|
+
_construct = function _construct2(Parent2, args2, Class2) {
|
|
58242
|
+
var a2 = [null];
|
|
58243
|
+
a2.push.apply(a2, args2);
|
|
58244
|
+
var Constructor = Function.bind.apply(Parent2, a2);
|
|
58245
|
+
var instance = new Constructor();
|
|
58246
|
+
if (Class2)
|
|
58247
|
+
_setPrototypeOf$5(instance, Class2.prototype);
|
|
58248
|
+
return instance;
|
|
58249
|
+
};
|
|
58250
|
+
}
|
|
58251
|
+
return _construct.apply(null, arguments);
|
|
58252
|
+
}
|
|
58253
|
+
function _wrapNativeSuper(Class) {
|
|
58254
|
+
var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
58255
|
+
_wrapNativeSuper = function _wrapNativeSuper2(Class2) {
|
|
58256
|
+
if (Class2 === null || !_isNativeFunction(Class2))
|
|
58257
|
+
return Class2;
|
|
58258
|
+
if (typeof Class2 !== "function") {
|
|
58259
|
+
throw new TypeError("Super expression must either be null or a function");
|
|
58260
|
+
}
|
|
58261
|
+
if (typeof _cache !== "undefined") {
|
|
58262
|
+
if (_cache.has(Class2))
|
|
58263
|
+
return _cache.get(Class2);
|
|
58264
|
+
_cache.set(Class2, Wrapper2);
|
|
58265
|
+
}
|
|
58266
|
+
function Wrapper2() {
|
|
58267
|
+
return _construct(Class2, arguments, _getPrototypeOf$1(this).constructor);
|
|
58268
|
+
}
|
|
58269
|
+
Wrapper2.prototype = Object.create(Class2.prototype, {
|
|
58270
|
+
constructor: {
|
|
58271
|
+
value: Wrapper2,
|
|
58272
|
+
enumerable: false,
|
|
58273
|
+
writable: true,
|
|
58274
|
+
configurable: true
|
|
58275
|
+
}
|
|
58276
|
+
});
|
|
58277
|
+
return _setPrototypeOf$5(Wrapper2, Class2);
|
|
58278
|
+
};
|
|
58279
|
+
return _wrapNativeSuper(Class);
|
|
58280
|
+
}
|
|
58281
|
+
var PolishedError = /* @__PURE__ */ function(_Error) {
|
|
58282
|
+
_inheritsLoose$2(PolishedError2, _Error);
|
|
58283
|
+
function PolishedError2(code) {
|
|
58284
|
+
var _this;
|
|
58285
|
+
{
|
|
58286
|
+
_this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
|
|
58287
|
+
}
|
|
58288
|
+
return _assertThisInitialized$2(_this);
|
|
58289
|
+
}
|
|
58290
|
+
return PolishedError2;
|
|
58291
|
+
}(/* @__PURE__ */ _wrapNativeSuper(Error));
|
|
58292
|
+
function colorToInt(color) {
|
|
58293
|
+
return Math.round(color * 255);
|
|
58294
|
+
}
|
|
58295
|
+
function convertToInt(red, green, blue) {
|
|
58296
|
+
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
58297
|
+
}
|
|
58298
|
+
function hslToRgb(hue, saturation, lightness, convert2) {
|
|
58299
|
+
if (convert2 === void 0) {
|
|
58300
|
+
convert2 = convertToInt;
|
|
58301
|
+
}
|
|
58302
|
+
if (saturation === 0) {
|
|
58303
|
+
return convert2(lightness, lightness, lightness);
|
|
58304
|
+
}
|
|
58305
|
+
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
58306
|
+
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
58307
|
+
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
58308
|
+
var red = 0;
|
|
58309
|
+
var green = 0;
|
|
58310
|
+
var blue = 0;
|
|
58311
|
+
if (huePrime >= 0 && huePrime < 1) {
|
|
58312
|
+
red = chroma;
|
|
58313
|
+
green = secondComponent;
|
|
58314
|
+
} else if (huePrime >= 1 && huePrime < 2) {
|
|
58315
|
+
red = secondComponent;
|
|
58316
|
+
green = chroma;
|
|
58317
|
+
} else if (huePrime >= 2 && huePrime < 3) {
|
|
58318
|
+
green = chroma;
|
|
58319
|
+
blue = secondComponent;
|
|
58320
|
+
} else if (huePrime >= 3 && huePrime < 4) {
|
|
58321
|
+
green = secondComponent;
|
|
58322
|
+
blue = chroma;
|
|
58323
|
+
} else if (huePrime >= 4 && huePrime < 5) {
|
|
58324
|
+
red = secondComponent;
|
|
58325
|
+
blue = chroma;
|
|
58326
|
+
} else if (huePrime >= 5 && huePrime < 6) {
|
|
58327
|
+
red = chroma;
|
|
58328
|
+
blue = secondComponent;
|
|
58329
|
+
}
|
|
58330
|
+
var lightnessModification = lightness - chroma / 2;
|
|
58331
|
+
var finalRed = red + lightnessModification;
|
|
58332
|
+
var finalGreen = green + lightnessModification;
|
|
58333
|
+
var finalBlue = blue + lightnessModification;
|
|
58334
|
+
return convert2(finalRed, finalGreen, finalBlue);
|
|
58335
|
+
}
|
|
58336
|
+
var namedColorMap = {
|
|
58337
|
+
aliceblue: "f0f8ff",
|
|
58338
|
+
antiquewhite: "faebd7",
|
|
58339
|
+
aqua: "00ffff",
|
|
58340
|
+
aquamarine: "7fffd4",
|
|
58341
|
+
azure: "f0ffff",
|
|
58342
|
+
beige: "f5f5dc",
|
|
58343
|
+
bisque: "ffe4c4",
|
|
58344
|
+
black: "000",
|
|
58345
|
+
blanchedalmond: "ffebcd",
|
|
58346
|
+
blue: "0000ff",
|
|
58347
|
+
blueviolet: "8a2be2",
|
|
58348
|
+
brown: "a52a2a",
|
|
58349
|
+
burlywood: "deb887",
|
|
58350
|
+
cadetblue: "5f9ea0",
|
|
58351
|
+
chartreuse: "7fff00",
|
|
58352
|
+
chocolate: "d2691e",
|
|
58353
|
+
coral: "ff7f50",
|
|
58354
|
+
cornflowerblue: "6495ed",
|
|
58355
|
+
cornsilk: "fff8dc",
|
|
58356
|
+
crimson: "dc143c",
|
|
58357
|
+
cyan: "00ffff",
|
|
58358
|
+
darkblue: "00008b",
|
|
58359
|
+
darkcyan: "008b8b",
|
|
58360
|
+
darkgoldenrod: "b8860b",
|
|
58361
|
+
darkgray: "a9a9a9",
|
|
58362
|
+
darkgreen: "006400",
|
|
58363
|
+
darkgrey: "a9a9a9",
|
|
58364
|
+
darkkhaki: "bdb76b",
|
|
58365
|
+
darkmagenta: "8b008b",
|
|
58366
|
+
darkolivegreen: "556b2f",
|
|
58367
|
+
darkorange: "ff8c00",
|
|
58368
|
+
darkorchid: "9932cc",
|
|
58369
|
+
darkred: "8b0000",
|
|
58370
|
+
darksalmon: "e9967a",
|
|
58371
|
+
darkseagreen: "8fbc8f",
|
|
58372
|
+
darkslateblue: "483d8b",
|
|
58373
|
+
darkslategray: "2f4f4f",
|
|
58374
|
+
darkslategrey: "2f4f4f",
|
|
58375
|
+
darkturquoise: "00ced1",
|
|
58376
|
+
darkviolet: "9400d3",
|
|
58377
|
+
deeppink: "ff1493",
|
|
58378
|
+
deepskyblue: "00bfff",
|
|
58379
|
+
dimgray: "696969",
|
|
58380
|
+
dimgrey: "696969",
|
|
58381
|
+
dodgerblue: "1e90ff",
|
|
58382
|
+
firebrick: "b22222",
|
|
58383
|
+
floralwhite: "fffaf0",
|
|
58384
|
+
forestgreen: "228b22",
|
|
58385
|
+
fuchsia: "ff00ff",
|
|
58386
|
+
gainsboro: "dcdcdc",
|
|
58387
|
+
ghostwhite: "f8f8ff",
|
|
58388
|
+
gold: "ffd700",
|
|
58389
|
+
goldenrod: "daa520",
|
|
58390
|
+
gray: "808080",
|
|
58391
|
+
green: "008000",
|
|
58392
|
+
greenyellow: "adff2f",
|
|
58393
|
+
grey: "808080",
|
|
58394
|
+
honeydew: "f0fff0",
|
|
58395
|
+
hotpink: "ff69b4",
|
|
58396
|
+
indianred: "cd5c5c",
|
|
58397
|
+
indigo: "4b0082",
|
|
58398
|
+
ivory: "fffff0",
|
|
58399
|
+
khaki: "f0e68c",
|
|
58400
|
+
lavender: "e6e6fa",
|
|
58401
|
+
lavenderblush: "fff0f5",
|
|
58402
|
+
lawngreen: "7cfc00",
|
|
58403
|
+
lemonchiffon: "fffacd",
|
|
58404
|
+
lightblue: "add8e6",
|
|
58405
|
+
lightcoral: "f08080",
|
|
58406
|
+
lightcyan: "e0ffff",
|
|
58407
|
+
lightgoldenrodyellow: "fafad2",
|
|
58408
|
+
lightgray: "d3d3d3",
|
|
58409
|
+
lightgreen: "90ee90",
|
|
58410
|
+
lightgrey: "d3d3d3",
|
|
58411
|
+
lightpink: "ffb6c1",
|
|
58412
|
+
lightsalmon: "ffa07a",
|
|
58413
|
+
lightseagreen: "20b2aa",
|
|
58414
|
+
lightskyblue: "87cefa",
|
|
58415
|
+
lightslategray: "789",
|
|
58416
|
+
lightslategrey: "789",
|
|
58417
|
+
lightsteelblue: "b0c4de",
|
|
58418
|
+
lightyellow: "ffffe0",
|
|
58419
|
+
lime: "0f0",
|
|
58420
|
+
limegreen: "32cd32",
|
|
58421
|
+
linen: "faf0e6",
|
|
58422
|
+
magenta: "f0f",
|
|
58423
|
+
maroon: "800000",
|
|
58424
|
+
mediumaquamarine: "66cdaa",
|
|
58425
|
+
mediumblue: "0000cd",
|
|
58426
|
+
mediumorchid: "ba55d3",
|
|
58427
|
+
mediumpurple: "9370db",
|
|
58428
|
+
mediumseagreen: "3cb371",
|
|
58429
|
+
mediumslateblue: "7b68ee",
|
|
58430
|
+
mediumspringgreen: "00fa9a",
|
|
58431
|
+
mediumturquoise: "48d1cc",
|
|
58432
|
+
mediumvioletred: "c71585",
|
|
58433
|
+
midnightblue: "191970",
|
|
58434
|
+
mintcream: "f5fffa",
|
|
58435
|
+
mistyrose: "ffe4e1",
|
|
58436
|
+
moccasin: "ffe4b5",
|
|
58437
|
+
navajowhite: "ffdead",
|
|
58438
|
+
navy: "000080",
|
|
58439
|
+
oldlace: "fdf5e6",
|
|
58440
|
+
olive: "808000",
|
|
58441
|
+
olivedrab: "6b8e23",
|
|
58442
|
+
orange: "ffa500",
|
|
58443
|
+
orangered: "ff4500",
|
|
58444
|
+
orchid: "da70d6",
|
|
58445
|
+
palegoldenrod: "eee8aa",
|
|
58446
|
+
palegreen: "98fb98",
|
|
58447
|
+
paleturquoise: "afeeee",
|
|
58448
|
+
palevioletred: "db7093",
|
|
58449
|
+
papayawhip: "ffefd5",
|
|
58450
|
+
peachpuff: "ffdab9",
|
|
58451
|
+
peru: "cd853f",
|
|
58452
|
+
pink: "ffc0cb",
|
|
58453
|
+
plum: "dda0dd",
|
|
58454
|
+
powderblue: "b0e0e6",
|
|
58455
|
+
purple: "800080",
|
|
58456
|
+
rebeccapurple: "639",
|
|
58457
|
+
red: "f00",
|
|
58458
|
+
rosybrown: "bc8f8f",
|
|
58459
|
+
royalblue: "4169e1",
|
|
58460
|
+
saddlebrown: "8b4513",
|
|
58461
|
+
salmon: "fa8072",
|
|
58462
|
+
sandybrown: "f4a460",
|
|
58463
|
+
seagreen: "2e8b57",
|
|
58464
|
+
seashell: "fff5ee",
|
|
58465
|
+
sienna: "a0522d",
|
|
58466
|
+
silver: "c0c0c0",
|
|
58467
|
+
skyblue: "87ceeb",
|
|
58468
|
+
slateblue: "6a5acd",
|
|
58469
|
+
slategray: "708090",
|
|
58470
|
+
slategrey: "708090",
|
|
58471
|
+
snow: "fffafa",
|
|
58472
|
+
springgreen: "00ff7f",
|
|
58473
|
+
steelblue: "4682b4",
|
|
58474
|
+
tan: "d2b48c",
|
|
58475
|
+
teal: "008080",
|
|
58476
|
+
thistle: "d8bfd8",
|
|
58477
|
+
tomato: "ff6347",
|
|
58478
|
+
turquoise: "40e0d0",
|
|
58479
|
+
violet: "ee82ee",
|
|
58480
|
+
wheat: "f5deb3",
|
|
58481
|
+
white: "fff",
|
|
58482
|
+
whitesmoke: "f5f5f5",
|
|
58483
|
+
yellow: "ff0",
|
|
58484
|
+
yellowgreen: "9acd32"
|
|
58485
|
+
};
|
|
58486
|
+
function nameToHex(color) {
|
|
58487
|
+
if (typeof color !== "string")
|
|
58488
|
+
return color;
|
|
58489
|
+
var normalizedColorName = color.toLowerCase();
|
|
58490
|
+
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
|
|
58491
|
+
}
|
|
58492
|
+
var hexRegex = /^#[a-fA-F0-9]{6}$/;
|
|
58493
|
+
var hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
|
|
58494
|
+
var reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
|
|
58495
|
+
var reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
|
|
58496
|
+
var rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
|
|
58497
|
+
var rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
58498
|
+
var hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
58499
|
+
var hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
58500
|
+
function parseToRgb(color) {
|
|
58501
|
+
if (typeof color !== "string") {
|
|
58502
|
+
throw new PolishedError(3);
|
|
58503
|
+
}
|
|
58504
|
+
var normalizedColor = nameToHex(color);
|
|
58505
|
+
if (normalizedColor.match(hexRegex)) {
|
|
58506
|
+
return {
|
|
58507
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
58508
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
58509
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
58510
|
+
};
|
|
58511
|
+
}
|
|
58512
|
+
if (normalizedColor.match(hexRgbaRegex)) {
|
|
58513
|
+
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
58514
|
+
return {
|
|
58515
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
58516
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
58517
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
|
|
58518
|
+
alpha
|
|
58519
|
+
};
|
|
58520
|
+
}
|
|
58521
|
+
if (normalizedColor.match(reducedHexRegex)) {
|
|
58522
|
+
return {
|
|
58523
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
58524
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
58525
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
58526
|
+
};
|
|
58527
|
+
}
|
|
58528
|
+
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
58529
|
+
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
58530
|
+
return {
|
|
58531
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
58532
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
58533
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
|
|
58534
|
+
alpha: _alpha
|
|
58535
|
+
};
|
|
58536
|
+
}
|
|
58537
|
+
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
58538
|
+
if (rgbMatched) {
|
|
58539
|
+
return {
|
|
58540
|
+
red: parseInt("" + rgbMatched[1], 10),
|
|
58541
|
+
green: parseInt("" + rgbMatched[2], 10),
|
|
58542
|
+
blue: parseInt("" + rgbMatched[3], 10)
|
|
58543
|
+
};
|
|
58544
|
+
}
|
|
58545
|
+
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
58546
|
+
if (rgbaMatched) {
|
|
58547
|
+
return {
|
|
58548
|
+
red: parseInt("" + rgbaMatched[1], 10),
|
|
58549
|
+
green: parseInt("" + rgbaMatched[2], 10),
|
|
58550
|
+
blue: parseInt("" + rgbaMatched[3], 10),
|
|
58551
|
+
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
58552
|
+
};
|
|
58553
|
+
}
|
|
58554
|
+
var hslMatched = hslRegex.exec(normalizedColor);
|
|
58555
|
+
if (hslMatched) {
|
|
58556
|
+
var hue = parseInt("" + hslMatched[1], 10);
|
|
58557
|
+
var saturation = parseInt("" + hslMatched[2], 10) / 100;
|
|
58558
|
+
var lightness = parseInt("" + hslMatched[3], 10) / 100;
|
|
58559
|
+
var rgbColorString = "rgb(" + hslToRgb(hue, saturation, lightness) + ")";
|
|
58560
|
+
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
58561
|
+
if (!hslRgbMatched) {
|
|
58562
|
+
throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
58563
|
+
}
|
|
58564
|
+
return {
|
|
58565
|
+
red: parseInt("" + hslRgbMatched[1], 10),
|
|
58566
|
+
green: parseInt("" + hslRgbMatched[2], 10),
|
|
58567
|
+
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
58568
|
+
};
|
|
58569
|
+
}
|
|
58570
|
+
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
58571
|
+
if (hslaMatched) {
|
|
58572
|
+
var _hue = parseInt("" + hslaMatched[1], 10);
|
|
58573
|
+
var _saturation = parseInt("" + hslaMatched[2], 10) / 100;
|
|
58574
|
+
var _lightness = parseInt("" + hslaMatched[3], 10) / 100;
|
|
58575
|
+
var _rgbColorString = "rgb(" + hslToRgb(_hue, _saturation, _lightness) + ")";
|
|
58576
|
+
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
58577
|
+
if (!_hslRgbMatched) {
|
|
58578
|
+
throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
58579
|
+
}
|
|
58580
|
+
return {
|
|
58581
|
+
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
58582
|
+
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
58583
|
+
blue: parseInt("" + _hslRgbMatched[3], 10),
|
|
58584
|
+
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
58585
|
+
};
|
|
58586
|
+
}
|
|
58587
|
+
throw new PolishedError(5);
|
|
58588
|
+
}
|
|
58589
|
+
var reduceHexValue = function reduceHexValue2(value) {
|
|
58590
|
+
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) {
|
|
58591
|
+
return "#" + value[1] + value[3] + value[5];
|
|
58592
|
+
}
|
|
58593
|
+
return value;
|
|
58594
|
+
};
|
|
58595
|
+
var reduceHexValue$1 = reduceHexValue;
|
|
58596
|
+
function numberToHex(value) {
|
|
58597
|
+
var hex = value.toString(16);
|
|
58598
|
+
return hex.length === 1 ? "0" + hex : hex;
|
|
58599
|
+
}
|
|
58600
|
+
function rgb(value, green, blue) {
|
|
58601
|
+
if (typeof value === "number" && typeof green === "number" && typeof blue === "number") {
|
|
58602
|
+
return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
|
|
58603
|
+
} else if (typeof value === "object" && green === void 0 && blue === void 0) {
|
|
58604
|
+
return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
58605
|
+
}
|
|
58606
|
+
throw new PolishedError(6);
|
|
58607
|
+
}
|
|
58608
|
+
function rgba(firstValue, secondValue, thirdValue, fourthValue) {
|
|
58609
|
+
if (typeof firstValue === "string" && typeof secondValue === "number") {
|
|
58610
|
+
var rgbValue = parseToRgb(firstValue);
|
|
58611
|
+
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
58612
|
+
} else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") {
|
|
58613
|
+
return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
58614
|
+
} else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) {
|
|
58615
|
+
return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
58616
|
+
}
|
|
58617
|
+
throw new PolishedError(7);
|
|
58618
|
+
}
|
|
58619
|
+
function curried(f2, length, acc) {
|
|
58620
|
+
return function fn() {
|
|
58621
|
+
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
58622
|
+
return combined.length >= length ? f2.apply(this, combined) : curried(f2, length, combined);
|
|
58623
|
+
};
|
|
58624
|
+
}
|
|
58625
|
+
function curry(f2) {
|
|
58626
|
+
return curried(f2, f2.length, []);
|
|
58627
|
+
}
|
|
58628
|
+
function guard(lowerBoundary, upperBoundary, value) {
|
|
58629
|
+
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
58630
|
+
}
|
|
58631
|
+
function transparentize(amount, color) {
|
|
58632
|
+
if (color === "transparent")
|
|
58633
|
+
return color;
|
|
58634
|
+
var parsedColor = parseToRgb(color);
|
|
58635
|
+
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
58636
|
+
var colorWithAlpha = _extends$4({}, parsedColor, {
|
|
58637
|
+
alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100)
|
|
58638
|
+
});
|
|
58639
|
+
return rgba(colorWithAlpha);
|
|
58640
|
+
}
|
|
58641
|
+
var curriedTransparentize = /* @__PURE__ */ curry(transparentize);
|
|
58642
|
+
var curriedTransparentize$1 = curriedTransparentize;
|
|
58062
58643
|
const StyledErrorDisplay = styled__default.default.div`
|
|
58063
58644
|
display: flex;
|
|
58064
58645
|
gap: 1rem;
|