@appbaseio/reactivesearch-vue 3.0.0-alpha.3 → 3.0.0-alpha.5
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/@appbaseio/reactivesearch-vue.umd.js +1424 -2096
- package/dist/@appbaseio/reactivesearch-vue.umd.js.map +1 -1
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js +5 -5
- package/dist/@appbaseio/reactivesearch-vue.umd.min.js.map +1 -1
- package/dist/cjs/{Button-ad042719.js → Button-d4da7470.js} +6 -6
- package/dist/cjs/{Card-f5ab024a.js → Card-63968d94.js} +2 -2
- package/dist/cjs/{DropDown-7bd56543.js → DropDown-f48bea16.js} +1 -1
- package/dist/cjs/{Input-088dfcb4.js → Input-497be42a.js} +4 -4
- package/dist/cjs/{ListItem-d57d648d.js → ListItem-23af8974.js} +2 -2
- package/dist/cjs/MultiDropdownList.js +4 -4
- package/dist/cjs/MultiList.js +2 -2
- package/dist/cjs/{Pagination-4ffc67cd.js → Pagination-b953a80a.js} +1 -1
- package/dist/cjs/RangeInput.js +2 -2
- package/dist/cjs/{ReactiveComponent-4435adfa.js → ReactiveComponent-5db1cdbe.js} +7 -7
- package/dist/cjs/ReactiveComponent.js +8 -8
- package/dist/cjs/ReactiveGoogleMap.js +5 -5
- package/dist/cjs/ReactiveList.js +7 -7
- package/dist/cjs/ResultCard.js +2 -2
- package/dist/cjs/ResultList.js +2 -2
- package/dist/cjs/SelectedFilters.js +2 -2
- package/dist/cjs/SingleDropdownList.js +4 -4
- package/dist/cjs/SingleList.js +2 -2
- package/dist/cjs/ToggleButton.js +2 -2
- package/dist/cjs/index.js +9 -9
- package/dist/cjs/initReactivesearch.js +1 -1
- package/dist/cjs/install.js +8 -8
- package/dist/cjs/version.js +1 -1
- package/dist/es/{Button-474510e3.js → Button-fd869491.js} +1 -1
- package/dist/es/{Card-38cbe652.js → Card-54b9e7a0.js} +1 -1
- package/dist/es/{DropDown-029ffd42.js → DropDown-7174661a.js} +1 -1
- package/dist/es/{Input-ad474a55.js → Input-f7499ef8.js} +1 -1
- package/dist/es/{ListItem-16756c02.js → ListItem-1cb1b4de.js} +1 -1
- package/dist/es/MultiDropdownList.js +4 -4
- package/dist/es/MultiList.js +2 -2
- package/dist/es/{Pagination-72bd1d9e.js → Pagination-c2745bec.js} +1 -1
- package/dist/es/RangeInput.js +2 -2
- package/dist/es/{ReactiveComponent-04d94e01.js → ReactiveComponent-8a84aab3.js} +6 -6
- package/dist/es/ReactiveComponent.js +8 -8
- package/dist/es/ReactiveGoogleMap.js +3 -3
- package/dist/es/ReactiveList.js +5 -5
- package/dist/es/ResultCard.js +2 -2
- package/dist/es/ResultList.js +2 -2
- package/dist/es/SelectedFilters.js +2 -2
- package/dist/es/SingleDropdownList.js +4 -4
- package/dist/es/SingleList.js +2 -2
- package/dist/es/ToggleButton.js +2 -2
- package/dist/es/index.js +9 -9
- package/dist/es/initReactivesearch.js +1 -1
- package/dist/es/install.js +8 -8
- package/dist/es/version.js +1 -1
- package/package.json +3 -2
|
@@ -10635,718 +10635,20 @@
|
|
|
10635
10635
|
};
|
|
10636
10636
|
};
|
|
10637
10637
|
|
|
10638
|
-
var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
|
|
10639
|
-
|
|
10640
|
-
function memoize$1(fn) {
|
|
10641
|
-
var cache = {};
|
|
10642
|
-
return function (arg) {
|
|
10643
|
-
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
10644
|
-
return cache[arg];
|
|
10645
|
-
};
|
|
10646
|
-
}
|
|
10647
|
-
|
|
10648
|
-
var unitlessKeys$1 = {
|
|
10649
|
-
animationIterationCount: 1,
|
|
10650
|
-
borderImageOutset: 1,
|
|
10651
|
-
borderImageSlice: 1,
|
|
10652
|
-
borderImageWidth: 1,
|
|
10653
|
-
boxFlex: 1,
|
|
10654
|
-
boxFlexGroup: 1,
|
|
10655
|
-
boxOrdinalGroup: 1,
|
|
10656
|
-
columnCount: 1,
|
|
10657
|
-
columns: 1,
|
|
10658
|
-
flex: 1,
|
|
10659
|
-
flexGrow: 1,
|
|
10660
|
-
flexPositive: 1,
|
|
10661
|
-
flexShrink: 1,
|
|
10662
|
-
flexNegative: 1,
|
|
10663
|
-
flexOrder: 1,
|
|
10664
|
-
gridRow: 1,
|
|
10665
|
-
gridRowEnd: 1,
|
|
10666
|
-
gridRowSpan: 1,
|
|
10667
|
-
gridRowStart: 1,
|
|
10668
|
-
gridColumn: 1,
|
|
10669
|
-
gridColumnEnd: 1,
|
|
10670
|
-
gridColumnSpan: 1,
|
|
10671
|
-
gridColumnStart: 1,
|
|
10672
|
-
fontWeight: 1,
|
|
10673
|
-
lineHeight: 1,
|
|
10674
|
-
opacity: 1,
|
|
10675
|
-
order: 1,
|
|
10676
|
-
orphans: 1,
|
|
10677
|
-
tabSize: 1,
|
|
10678
|
-
widows: 1,
|
|
10679
|
-
zIndex: 1,
|
|
10680
|
-
zoom: 1,
|
|
10681
|
-
WebkitLineClamp: 1,
|
|
10682
|
-
// SVG-related properties
|
|
10683
|
-
fillOpacity: 1,
|
|
10684
|
-
floodOpacity: 1,
|
|
10685
|
-
stopOpacity: 1,
|
|
10686
|
-
strokeDasharray: 1,
|
|
10687
|
-
strokeDashoffset: 1,
|
|
10688
|
-
strokeMiterlimit: 1,
|
|
10689
|
-
strokeOpacity: 1,
|
|
10690
|
-
strokeWidth: 1
|
|
10691
|
-
};
|
|
10692
|
-
|
|
10693
|
-
/* eslint-disable */
|
|
10694
|
-
// murmurhash2 via https://github.com/garycourt/murmurhash-js/blob/master/murmurhash2_gc.js
|
|
10695
|
-
function murmurhash2_32_gc(str) {
|
|
10696
|
-
var l = str.length,
|
|
10697
|
-
h = l ^ l,
|
|
10698
|
-
i = 0,
|
|
10699
|
-
k;
|
|
10700
|
-
while (l >= 4) {
|
|
10701
|
-
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
|
10702
|
-
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
|
10703
|
-
k ^= k >>> 24;
|
|
10704
|
-
k = (k & 0xffff) * 0x5bd1e995 + (((k >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
|
10705
|
-
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16) ^ k;
|
|
10706
|
-
l -= 4;
|
|
10707
|
-
++i;
|
|
10708
|
-
}
|
|
10709
|
-
switch (l) {
|
|
10710
|
-
case 3:
|
|
10711
|
-
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
|
10712
|
-
case 2:
|
|
10713
|
-
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
|
10714
|
-
case 1:
|
|
10715
|
-
h ^= str.charCodeAt(i) & 0xff;
|
|
10716
|
-
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
|
10717
|
-
}
|
|
10718
|
-
h ^= h >>> 13;
|
|
10719
|
-
h = (h & 0xffff) * 0x5bd1e995 + (((h >>> 16) * 0x5bd1e995 & 0xffff) << 16);
|
|
10720
|
-
h ^= h >>> 15;
|
|
10721
|
-
return (h >>> 0).toString(36);
|
|
10722
|
-
}
|
|
10723
|
-
|
|
10724
|
-
function stylis_min(W) {
|
|
10725
|
-
function M(d, c, e, h, a) {
|
|
10726
|
-
for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {
|
|
10727
|
-
g = e.charCodeAt(l);
|
|
10728
|
-
l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);
|
|
10729
|
-
if (0 === b + n + v + m) {
|
|
10730
|
-
if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {
|
|
10731
|
-
switch (g) {
|
|
10732
|
-
case 32:
|
|
10733
|
-
case 9:
|
|
10734
|
-
case 59:
|
|
10735
|
-
case 13:
|
|
10736
|
-
case 10:
|
|
10737
|
-
break;
|
|
10738
|
-
default:
|
|
10739
|
-
f += e.charAt(l);
|
|
10740
|
-
}
|
|
10741
|
-
g = 59;
|
|
10742
|
-
}
|
|
10743
|
-
switch (g) {
|
|
10744
|
-
case 123:
|
|
10745
|
-
f = f.trim();
|
|
10746
|
-
q = f.charCodeAt(0);
|
|
10747
|
-
k = 1;
|
|
10748
|
-
for (t = ++l; l < B;) {
|
|
10749
|
-
switch (g = e.charCodeAt(l)) {
|
|
10750
|
-
case 123:
|
|
10751
|
-
k++;
|
|
10752
|
-
break;
|
|
10753
|
-
case 125:
|
|
10754
|
-
k--;
|
|
10755
|
-
break;
|
|
10756
|
-
case 47:
|
|
10757
|
-
switch (g = e.charCodeAt(l + 1)) {
|
|
10758
|
-
case 42:
|
|
10759
|
-
case 47:
|
|
10760
|
-
a: {
|
|
10761
|
-
for (u = l + 1; u < J; ++u) {
|
|
10762
|
-
switch (e.charCodeAt(u)) {
|
|
10763
|
-
case 47:
|
|
10764
|
-
if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {
|
|
10765
|
-
l = u + 1;
|
|
10766
|
-
break a;
|
|
10767
|
-
}
|
|
10768
|
-
break;
|
|
10769
|
-
case 10:
|
|
10770
|
-
if (47 === g) {
|
|
10771
|
-
l = u + 1;
|
|
10772
|
-
break a;
|
|
10773
|
-
}
|
|
10774
|
-
}
|
|
10775
|
-
}
|
|
10776
|
-
l = u;
|
|
10777
|
-
}
|
|
10778
|
-
}
|
|
10779
|
-
break;
|
|
10780
|
-
case 91:
|
|
10781
|
-
g++;
|
|
10782
|
-
case 40:
|
|
10783
|
-
g++;
|
|
10784
|
-
case 34:
|
|
10785
|
-
case 39:
|
|
10786
|
-
for (; l++ < J && e.charCodeAt(l) !== g;) {}
|
|
10787
|
-
}
|
|
10788
|
-
if (0 === k) break;
|
|
10789
|
-
l++;
|
|
10790
|
-
}
|
|
10791
|
-
k = e.substring(t, l);
|
|
10792
|
-
0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));
|
|
10793
|
-
switch (q) {
|
|
10794
|
-
case 64:
|
|
10795
|
-
0 < r && (f = f.replace(N, ''));
|
|
10796
|
-
g = f.charCodeAt(1);
|
|
10797
|
-
switch (g) {
|
|
10798
|
-
case 100:
|
|
10799
|
-
case 109:
|
|
10800
|
-
case 115:
|
|
10801
|
-
case 45:
|
|
10802
|
-
r = c;
|
|
10803
|
-
break;
|
|
10804
|
-
default:
|
|
10805
|
-
r = O;
|
|
10806
|
-
}
|
|
10807
|
-
k = M(c, r, k, g, a + 1);
|
|
10808
|
-
t = k.length;
|
|
10809
|
-
0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));
|
|
10810
|
-
if (0 < t) switch (g) {
|
|
10811
|
-
case 115:
|
|
10812
|
-
f = f.replace(da, ea);
|
|
10813
|
-
case 100:
|
|
10814
|
-
case 109:
|
|
10815
|
-
case 45:
|
|
10816
|
-
k = f + '{' + k + '}';
|
|
10817
|
-
break;
|
|
10818
|
-
case 107:
|
|
10819
|
-
f = f.replace(fa, '$1 $2');
|
|
10820
|
-
k = f + '{' + k + '}';
|
|
10821
|
-
k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;
|
|
10822
|
-
break;
|
|
10823
|
-
default:
|
|
10824
|
-
k = f + k, 112 === h && (k = (p += k, ''));
|
|
10825
|
-
} else k = '';
|
|
10826
|
-
break;
|
|
10827
|
-
default:
|
|
10828
|
-
k = M(c, X(c, f, I), k, h, a + 1);
|
|
10829
|
-
}
|
|
10830
|
-
F += k;
|
|
10831
|
-
k = I = r = u = q = 0;
|
|
10832
|
-
f = '';
|
|
10833
|
-
g = e.charCodeAt(++l);
|
|
10834
|
-
break;
|
|
10835
|
-
case 125:
|
|
10836
|
-
case 59:
|
|
10837
|
-
f = (0 < r ? f.replace(N, '') : f).trim();
|
|
10838
|
-
if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\x00\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {
|
|
10839
|
-
case 0:
|
|
10840
|
-
break;
|
|
10841
|
-
case 64:
|
|
10842
|
-
if (105 === g || 99 === g) {
|
|
10843
|
-
G += f + e.charAt(l);
|
|
10844
|
-
break;
|
|
10845
|
-
}
|
|
10846
|
-
default:
|
|
10847
|
-
58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));
|
|
10848
|
-
}
|
|
10849
|
-
I = r = u = q = 0;
|
|
10850
|
-
f = '';
|
|
10851
|
-
g = e.charCodeAt(++l);
|
|
10852
|
-
}
|
|
10853
|
-
}
|
|
10854
|
-
switch (g) {
|
|
10855
|
-
case 13:
|
|
10856
|
-
case 10:
|
|
10857
|
-
47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\x00');
|
|
10858
|
-
0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);
|
|
10859
|
-
z = 1;
|
|
10860
|
-
D++;
|
|
10861
|
-
break;
|
|
10862
|
-
case 59:
|
|
10863
|
-
case 125:
|
|
10864
|
-
if (0 === b + n + v + m) {
|
|
10865
|
-
z++;
|
|
10866
|
-
break;
|
|
10867
|
-
}
|
|
10868
|
-
default:
|
|
10869
|
-
z++;
|
|
10870
|
-
y = e.charAt(l);
|
|
10871
|
-
switch (g) {
|
|
10872
|
-
case 9:
|
|
10873
|
-
case 32:
|
|
10874
|
-
if (0 === n + m + b) switch (x) {
|
|
10875
|
-
case 44:
|
|
10876
|
-
case 58:
|
|
10877
|
-
case 9:
|
|
10878
|
-
case 32:
|
|
10879
|
-
y = '';
|
|
10880
|
-
break;
|
|
10881
|
-
default:
|
|
10882
|
-
32 !== g && (y = ' ');
|
|
10883
|
-
}
|
|
10884
|
-
break;
|
|
10885
|
-
case 0:
|
|
10886
|
-
y = '\\0';
|
|
10887
|
-
break;
|
|
10888
|
-
case 12:
|
|
10889
|
-
y = '\\f';
|
|
10890
|
-
break;
|
|
10891
|
-
case 11:
|
|
10892
|
-
y = '\\v';
|
|
10893
|
-
break;
|
|
10894
|
-
case 38:
|
|
10895
|
-
0 === n + b + m && (r = I = 1, y = '\f' + y);
|
|
10896
|
-
break;
|
|
10897
|
-
case 108:
|
|
10898
|
-
if (0 === n + b + m + E && 0 < u) switch (l - u) {
|
|
10899
|
-
case 2:
|
|
10900
|
-
112 === x && 58 === e.charCodeAt(l - 3) && (E = x);
|
|
10901
|
-
case 8:
|
|
10902
|
-
111 === K && (E = K);
|
|
10903
|
-
}
|
|
10904
|
-
break;
|
|
10905
|
-
case 58:
|
|
10906
|
-
0 === n + b + m && (u = l);
|
|
10907
|
-
break;
|
|
10908
|
-
case 44:
|
|
10909
|
-
0 === b + v + n + m && (r = 1, y += '\r');
|
|
10910
|
-
break;
|
|
10911
|
-
case 34:
|
|
10912
|
-
case 39:
|
|
10913
|
-
0 === b && (n = n === g ? 0 : 0 === n ? g : n);
|
|
10914
|
-
break;
|
|
10915
|
-
case 91:
|
|
10916
|
-
0 === n + b + v && m++;
|
|
10917
|
-
break;
|
|
10918
|
-
case 93:
|
|
10919
|
-
0 === n + b + v && m--;
|
|
10920
|
-
break;
|
|
10921
|
-
case 41:
|
|
10922
|
-
0 === n + b + m && v--;
|
|
10923
|
-
break;
|
|
10924
|
-
case 40:
|
|
10925
|
-
if (0 === n + b + m) {
|
|
10926
|
-
if (0 === q) switch (2 * x + 3 * K) {
|
|
10927
|
-
case 533:
|
|
10928
|
-
break;
|
|
10929
|
-
default:
|
|
10930
|
-
q = 1;
|
|
10931
|
-
}
|
|
10932
|
-
v++;
|
|
10933
|
-
}
|
|
10934
|
-
break;
|
|
10935
|
-
case 64:
|
|
10936
|
-
0 === b + v + n + m + u + k && (k = 1);
|
|
10937
|
-
break;
|
|
10938
|
-
case 42:
|
|
10939
|
-
case 47:
|
|
10940
|
-
if (!(0 < n + m + v)) switch (b) {
|
|
10941
|
-
case 0:
|
|
10942
|
-
switch (2 * g + 3 * e.charCodeAt(l + 1)) {
|
|
10943
|
-
case 235:
|
|
10944
|
-
b = 47;
|
|
10945
|
-
break;
|
|
10946
|
-
case 220:
|
|
10947
|
-
t = l, b = 42;
|
|
10948
|
-
}
|
|
10949
|
-
break;
|
|
10950
|
-
case 42:
|
|
10951
|
-
47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);
|
|
10952
|
-
}
|
|
10953
|
-
}
|
|
10954
|
-
0 === b && (f += y);
|
|
10955
|
-
}
|
|
10956
|
-
K = x;
|
|
10957
|
-
x = g;
|
|
10958
|
-
l++;
|
|
10959
|
-
}
|
|
10960
|
-
t = p.length;
|
|
10961
|
-
if (0 < t) {
|
|
10962
|
-
r = c;
|
|
10963
|
-
if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;
|
|
10964
|
-
p = r.join(',') + '{' + p + '}';
|
|
10965
|
-
if (0 !== w * E) {
|
|
10966
|
-
2 !== w || L(p, 2) || (E = 0);
|
|
10967
|
-
switch (E) {
|
|
10968
|
-
case 111:
|
|
10969
|
-
p = p.replace(ha, ':-moz-$1') + p;
|
|
10970
|
-
break;
|
|
10971
|
-
case 112:
|
|
10972
|
-
p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;
|
|
10973
|
-
}
|
|
10974
|
-
E = 0;
|
|
10975
|
-
}
|
|
10976
|
-
}
|
|
10977
|
-
return G + p + F;
|
|
10978
|
-
}
|
|
10979
|
-
function X(d, c, e) {
|
|
10980
|
-
var h = c.trim().split(ia);
|
|
10981
|
-
c = h;
|
|
10982
|
-
var a = h.length,
|
|
10983
|
-
m = d.length;
|
|
10984
|
-
switch (m) {
|
|
10985
|
-
case 0:
|
|
10986
|
-
case 1:
|
|
10987
|
-
var b = 0;
|
|
10988
|
-
for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {
|
|
10989
|
-
c[b] = Z(d, c[b], e).trim();
|
|
10990
|
-
}
|
|
10991
|
-
break;
|
|
10992
|
-
default:
|
|
10993
|
-
var v = b = 0;
|
|
10994
|
-
for (c = []; b < a; ++b) {
|
|
10995
|
-
for (var n = 0; n < m; ++n) {
|
|
10996
|
-
c[v++] = Z(d[n] + ' ', h[b], e).trim();
|
|
10997
|
-
}
|
|
10998
|
-
}
|
|
10999
|
-
}
|
|
11000
|
-
return c;
|
|
11001
|
-
}
|
|
11002
|
-
function Z(d, c, e) {
|
|
11003
|
-
var h = c.charCodeAt(0);
|
|
11004
|
-
33 > h && (h = (c = c.trim()).charCodeAt(0));
|
|
11005
|
-
switch (h) {
|
|
11006
|
-
case 38:
|
|
11007
|
-
return c.replace(F, '$1' + d.trim());
|
|
11008
|
-
case 58:
|
|
11009
|
-
return d.trim() + c.replace(F, '$1' + d.trim());
|
|
11010
|
-
default:
|
|
11011
|
-
if (0 < 1 * e && 0 < c.indexOf('\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());
|
|
11012
|
-
}
|
|
11013
|
-
return d + c;
|
|
11014
|
-
}
|
|
11015
|
-
function P(d, c, e, h) {
|
|
11016
|
-
var a = d + ';',
|
|
11017
|
-
m = 2 * c + 3 * e + 4 * h;
|
|
11018
|
-
if (944 === m) {
|
|
11019
|
-
d = a.indexOf(':', 9) + 1;
|
|
11020
|
-
var b = a.substring(d, a.length - 1).trim();
|
|
11021
|
-
b = a.substring(0, d).trim() + b + ';';
|
|
11022
|
-
return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;
|
|
11023
|
-
}
|
|
11024
|
-
if (0 === w || 2 === w && !L(a, 1)) return a;
|
|
11025
|
-
switch (m) {
|
|
11026
|
-
case 1015:
|
|
11027
|
-
return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;
|
|
11028
|
-
case 951:
|
|
11029
|
-
return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;
|
|
11030
|
-
case 963:
|
|
11031
|
-
return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;
|
|
11032
|
-
case 1009:
|
|
11033
|
-
if (100 !== a.charCodeAt(4)) break;
|
|
11034
|
-
case 969:
|
|
11035
|
-
case 942:
|
|
11036
|
-
return '-webkit-' + a + a;
|
|
11037
|
-
case 978:
|
|
11038
|
-
return '-webkit-' + a + '-moz-' + a + a;
|
|
11039
|
-
case 1019:
|
|
11040
|
-
case 983:
|
|
11041
|
-
return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;
|
|
11042
|
-
case 883:
|
|
11043
|
-
if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;
|
|
11044
|
-
if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;
|
|
11045
|
-
break;
|
|
11046
|
-
case 932:
|
|
11047
|
-
if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {
|
|
11048
|
-
case 103:
|
|
11049
|
-
return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;
|
|
11050
|
-
case 115:
|
|
11051
|
-
return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;
|
|
11052
|
-
case 98:
|
|
11053
|
-
return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;
|
|
11054
|
-
}
|
|
11055
|
-
return '-webkit-' + a + '-ms-' + a + a;
|
|
11056
|
-
case 964:
|
|
11057
|
-
return '-webkit-' + a + '-ms-flex-' + a + a;
|
|
11058
|
-
case 1023:
|
|
11059
|
-
if (99 !== a.charCodeAt(8)) break;
|
|
11060
|
-
b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');
|
|
11061
|
-
return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;
|
|
11062
|
-
case 1005:
|
|
11063
|
-
return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;
|
|
11064
|
-
case 1e3:
|
|
11065
|
-
b = a.substring(13).trim();
|
|
11066
|
-
c = b.indexOf('-') + 1;
|
|
11067
|
-
switch (b.charCodeAt(0) + b.charCodeAt(c)) {
|
|
11068
|
-
case 226:
|
|
11069
|
-
b = a.replace(G, 'tb');
|
|
11070
|
-
break;
|
|
11071
|
-
case 232:
|
|
11072
|
-
b = a.replace(G, 'tb-rl');
|
|
11073
|
-
break;
|
|
11074
|
-
case 220:
|
|
11075
|
-
b = a.replace(G, 'lr');
|
|
11076
|
-
break;
|
|
11077
|
-
default:
|
|
11078
|
-
return a;
|
|
11079
|
-
}
|
|
11080
|
-
return '-webkit-' + a + '-ms-' + b + a;
|
|
11081
|
-
case 1017:
|
|
11082
|
-
if (-1 === a.indexOf('sticky', 9)) break;
|
|
11083
|
-
case 975:
|
|
11084
|
-
c = (a = d).length - 10;
|
|
11085
|
-
b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();
|
|
11086
|
-
switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {
|
|
11087
|
-
case 203:
|
|
11088
|
-
if (111 > b.charCodeAt(8)) break;
|
|
11089
|
-
case 115:
|
|
11090
|
-
a = a.replace(b, '-webkit-' + b) + ';' + a;
|
|
11091
|
-
break;
|
|
11092
|
-
case 207:
|
|
11093
|
-
case 102:
|
|
11094
|
-
a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;
|
|
11095
|
-
}
|
|
11096
|
-
return a + ';';
|
|
11097
|
-
case 938:
|
|
11098
|
-
if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {
|
|
11099
|
-
case 105:
|
|
11100
|
-
return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;
|
|
11101
|
-
case 115:
|
|
11102
|
-
return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;
|
|
11103
|
-
default:
|
|
11104
|
-
return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;
|
|
11105
|
-
}
|
|
11106
|
-
break;
|
|
11107
|
-
case 973:
|
|
11108
|
-
case 989:
|
|
11109
|
-
if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;
|
|
11110
|
-
case 931:
|
|
11111
|
-
case 953:
|
|
11112
|
-
if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;
|
|
11113
|
-
break;
|
|
11114
|
-
case 962:
|
|
11115
|
-
if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;
|
|
11116
|
-
}
|
|
11117
|
-
return a;
|
|
11118
|
-
}
|
|
11119
|
-
function L(d, c) {
|
|
11120
|
-
var e = d.indexOf(1 === c ? ':' : '{'),
|
|
11121
|
-
h = d.substring(0, 3 !== c ? e : 10);
|
|
11122
|
-
e = d.substring(e + 1, d.length - 1);
|
|
11123
|
-
return R(2 !== c ? h : h.replace(na, '$1'), e, c);
|
|
11124
|
-
}
|
|
11125
|
-
function ea(d, c) {
|
|
11126
|
-
var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));
|
|
11127
|
-
return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';
|
|
11128
|
-
}
|
|
11129
|
-
function H(d, c, e, h, a, m, b, v, n, q) {
|
|
11130
|
-
for (var g = 0, x = c, w; g < A; ++g) {
|
|
11131
|
-
switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {
|
|
11132
|
-
case void 0:
|
|
11133
|
-
case !1:
|
|
11134
|
-
case !0:
|
|
11135
|
-
case null:
|
|
11136
|
-
break;
|
|
11137
|
-
default:
|
|
11138
|
-
x = w;
|
|
11139
|
-
}
|
|
11140
|
-
}
|
|
11141
|
-
if (x !== c) return x;
|
|
11142
|
-
}
|
|
11143
|
-
function T(d) {
|
|
11144
|
-
switch (d) {
|
|
11145
|
-
case void 0:
|
|
11146
|
-
case null:
|
|
11147
|
-
A = S.length = 0;
|
|
11148
|
-
break;
|
|
11149
|
-
default:
|
|
11150
|
-
switch (d.constructor) {
|
|
11151
|
-
case Array:
|
|
11152
|
-
for (var c = 0, e = d.length; c < e; ++c) {
|
|
11153
|
-
T(d[c]);
|
|
11154
|
-
}
|
|
11155
|
-
break;
|
|
11156
|
-
case Function:
|
|
11157
|
-
S[A++] = d;
|
|
11158
|
-
break;
|
|
11159
|
-
case Boolean:
|
|
11160
|
-
Y = !!d | 0;
|
|
11161
|
-
}
|
|
11162
|
-
}
|
|
11163
|
-
return T;
|
|
11164
|
-
}
|
|
11165
|
-
function U(d) {
|
|
11166
|
-
d = d.prefix;
|
|
11167
|
-
void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);
|
|
11168
|
-
return U;
|
|
11169
|
-
}
|
|
11170
|
-
function B(d, c) {
|
|
11171
|
-
var e = d;
|
|
11172
|
-
33 > e.charCodeAt(0) && (e = e.trim());
|
|
11173
|
-
V = e;
|
|
11174
|
-
e = [V];
|
|
11175
|
-
if (0 < A) {
|
|
11176
|
-
var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);
|
|
11177
|
-
void 0 !== h && 'string' === typeof h && (c = h);
|
|
11178
|
-
}
|
|
11179
|
-
var a = M(O, e, c, 0, 0);
|
|
11180
|
-
0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));
|
|
11181
|
-
V = '';
|
|
11182
|
-
E = 0;
|
|
11183
|
-
z = D = 1;
|
|
11184
|
-
return a;
|
|
11185
|
-
}
|
|
11186
|
-
var ca = /^\0+/g,
|
|
11187
|
-
N = /[\0\r\f]/g,
|
|
11188
|
-
aa = /: */g,
|
|
11189
|
-
ka = /zoo|gra/,
|
|
11190
|
-
ma = /([,: ])(transform)/g,
|
|
11191
|
-
ia = /,\r+?/g,
|
|
11192
|
-
F = /([\t\r\n ])*\f?&/g,
|
|
11193
|
-
fa = /@(k\w+)\s*(\S*)\s*/,
|
|
11194
|
-
Q = /::(place)/g,
|
|
11195
|
-
ha = /:(read-only)/g,
|
|
11196
|
-
G = /[svh]\w+-[tblr]{2}/,
|
|
11197
|
-
da = /\(\s*(.*)\s*\)/g,
|
|
11198
|
-
oa = /([\s\S]*?);/g,
|
|
11199
|
-
ba = /-self|flex-/g,
|
|
11200
|
-
na = /[^]*?(:[rp][el]a[\w-]+)[^]*/,
|
|
11201
|
-
la = /stretch|:\s*\w+\-(?:conte|avail)/,
|
|
11202
|
-
ja = /([^-])(image-set\()/,
|
|
11203
|
-
z = 1,
|
|
11204
|
-
D = 1,
|
|
11205
|
-
E = 0,
|
|
11206
|
-
w = 1,
|
|
11207
|
-
O = [],
|
|
11208
|
-
S = [],
|
|
11209
|
-
A = 0,
|
|
11210
|
-
R = null,
|
|
11211
|
-
Y = 0,
|
|
11212
|
-
V = '';
|
|
11213
|
-
B.use = T;
|
|
11214
|
-
B.set = U;
|
|
11215
|
-
void 0 !== W && U(W);
|
|
11216
|
-
return B;
|
|
11217
|
-
}
|
|
11218
|
-
|
|
11219
|
-
var stylisRuleSheet = createCommonjsModule(function (module, exports) {
|
|
11220
|
-
(function (factory) {
|
|
11221
|
-
module['exports'] = factory() ;
|
|
11222
|
-
})(function () {
|
|
11223
|
-
|
|
11224
|
-
return function (insertRule) {
|
|
11225
|
-
var delimiter = '/*|*/';
|
|
11226
|
-
var needle = delimiter + '}';
|
|
11227
|
-
function toSheet(block) {
|
|
11228
|
-
if (block) try {
|
|
11229
|
-
insertRule(block + '}');
|
|
11230
|
-
} catch (e) {}
|
|
11231
|
-
}
|
|
11232
|
-
return function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {
|
|
11233
|
-
switch (context) {
|
|
11234
|
-
// property
|
|
11235
|
-
case 1:
|
|
11236
|
-
// @import
|
|
11237
|
-
if (depth === 0 && content.charCodeAt(0) === 64) return insertRule(content + ';'), '';
|
|
11238
|
-
break;
|
|
11239
|
-
// selector
|
|
11240
|
-
case 2:
|
|
11241
|
-
if (ns === 0) return content + delimiter;
|
|
11242
|
-
break;
|
|
11243
|
-
// at-rule
|
|
11244
|
-
case 3:
|
|
11245
|
-
switch (ns) {
|
|
11246
|
-
// @font-face, @page
|
|
11247
|
-
case 102:
|
|
11248
|
-
case 112:
|
|
11249
|
-
return insertRule(selectors[0] + content), '';
|
|
11250
|
-
default:
|
|
11251
|
-
return content + (at === 0 ? delimiter : '');
|
|
11252
|
-
}
|
|
11253
|
-
case -2:
|
|
11254
|
-
content.split(needle).forEach(toSheet);
|
|
11255
|
-
}
|
|
11256
|
-
};
|
|
11257
|
-
};
|
|
11258
|
-
});
|
|
11259
|
-
});
|
|
11260
|
-
|
|
11261
|
-
var hyphenateRegex$1 = /[A-Z]|^ms/g;
|
|
11262
|
-
var processStyleName$1 = memoize$1(function (styleName) {
|
|
11263
|
-
return styleName.replace(hyphenateRegex$1, '-$&').toLowerCase();
|
|
11264
|
-
});
|
|
11265
|
-
var processStyleValue$1 = function processStyleValue(key, value) {
|
|
11266
|
-
if (value == null || typeof value === 'boolean') {
|
|
11267
|
-
return '';
|
|
11268
|
-
}
|
|
11269
|
-
if (unitlessKeys$1[key] !== 1 && key.charCodeAt(1) !== 45 &&
|
|
11270
|
-
// custom properties
|
|
11271
|
-
!isNaN(value) && value !== 0) {
|
|
11272
|
-
return value + 'px';
|
|
11273
|
-
}
|
|
11274
|
-
return value;
|
|
11275
|
-
};
|
|
11276
|
-
{
|
|
11277
|
-
var contentValuePattern$1 = /(attr|calc|counters?|url)\(/;
|
|
11278
|
-
var contentValues$1 = ['normal', 'none', 'counter', 'open-quote', 'close-quote', 'no-open-quote', 'no-close-quote', 'initial', 'inherit', 'unset'];
|
|
11279
|
-
var oldProcessStyleValue$1 = processStyleValue$1;
|
|
11280
|
-
processStyleValue$1 = function processStyleValue(key, value) {
|
|
11281
|
-
if (key === 'content') {
|
|
11282
|
-
if (typeof value !== 'string' || contentValues$1.indexOf(value) === -1 && !contentValuePattern$1.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
|
11283
|
-
console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
|
11284
|
-
}
|
|
11285
|
-
}
|
|
11286
|
-
return oldProcessStyleValue$1(key, value);
|
|
11287
|
-
};
|
|
11288
|
-
}
|
|
11289
|
-
var classnames = function classnames(args) {
|
|
11290
|
-
var len = args.length;
|
|
11291
|
-
var i = 0;
|
|
11292
|
-
var cls = '';
|
|
11293
|
-
for (; i < len; i++) {
|
|
11294
|
-
var arg = args[i];
|
|
11295
|
-
if (arg == null) continue;
|
|
11296
|
-
var toAdd = void 0;
|
|
11297
|
-
switch (typeof arg) {
|
|
11298
|
-
case 'boolean':
|
|
11299
|
-
break;
|
|
11300
|
-
case 'function':
|
|
11301
|
-
{
|
|
11302
|
-
console.error('Passing functions to cx is deprecated and will be removed in the next major version of Emotion.\n' + 'Please call the function before passing it to cx.');
|
|
11303
|
-
}
|
|
11304
|
-
toAdd = classnames([arg()]);
|
|
11305
|
-
break;
|
|
11306
|
-
case 'object':
|
|
11307
|
-
{
|
|
11308
|
-
if (Array.isArray(arg)) {
|
|
11309
|
-
toAdd = classnames(arg);
|
|
11310
|
-
} else {
|
|
11311
|
-
toAdd = '';
|
|
11312
|
-
for (var k in arg) {
|
|
11313
|
-
if (arg[k] && k) {
|
|
11314
|
-
toAdd && (toAdd += ' ');
|
|
11315
|
-
toAdd += k;
|
|
11316
|
-
}
|
|
11317
|
-
}
|
|
11318
|
-
}
|
|
11319
|
-
break;
|
|
11320
|
-
}
|
|
11321
|
-
default:
|
|
11322
|
-
{
|
|
11323
|
-
toAdd = arg;
|
|
11324
|
-
}
|
|
11325
|
-
}
|
|
11326
|
-
if (toAdd) {
|
|
11327
|
-
cls && (cls += ' ');
|
|
11328
|
-
cls += toAdd;
|
|
11329
|
-
}
|
|
11330
|
-
}
|
|
11331
|
-
return cls;
|
|
11332
|
-
};
|
|
11333
|
-
var isBrowser$1 = typeof document !== 'undefined';
|
|
11334
|
-
|
|
11335
10638
|
/*
|
|
11336
10639
|
|
|
10640
|
+
Based off glamor's StyleSheet, thanks Sunil ❤️
|
|
10641
|
+
|
|
11337
10642
|
high performance StyleSheet for css-in-js systems
|
|
11338
10643
|
|
|
11339
10644
|
- uses multiple style tags behind the scenes for millions of rules
|
|
11340
10645
|
- uses `insertRule` for appending in production for *much* faster performance
|
|
11341
|
-
- 'polyfills' on server side
|
|
11342
10646
|
|
|
11343
10647
|
// usage
|
|
11344
10648
|
|
|
11345
|
-
import StyleSheet from '
|
|
11346
|
-
let styleSheet = new StyleSheet()
|
|
10649
|
+
import { StyleSheet } from '@emotion/sheet'
|
|
11347
10650
|
|
|
11348
|
-
styleSheet.
|
|
11349
|
-
- 'injects' the stylesheet into the page (or into memory if on server)
|
|
10651
|
+
let styleSheet = new StyleSheet({ key: '', container: document.head })
|
|
11350
10652
|
|
|
11351
10653
|
styleSheet.insert('#box { border: 1px solid red; }')
|
|
11352
10654
|
- appends a css rule into the stylesheet
|
|
@@ -11362,6 +10664,8 @@
|
|
|
11362
10664
|
return tag.sheet;
|
|
11363
10665
|
} // this weirdness brought to you by firefox
|
|
11364
10666
|
|
|
10667
|
+
/* istanbul ignore next */
|
|
10668
|
+
|
|
11365
10669
|
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
11366
10670
|
if (document.styleSheets[i].ownerNode === tag) {
|
|
11367
10671
|
// $FlowFixMe
|
|
@@ -11369,352 +10673,1150 @@
|
|
|
11369
10673
|
}
|
|
11370
10674
|
}
|
|
11371
10675
|
}
|
|
11372
|
-
function
|
|
10676
|
+
function createStyleElement$1(options) {
|
|
11373
10677
|
var tag = document.createElement('style');
|
|
11374
|
-
tag.setAttribute('data-emotion',
|
|
11375
|
-
if (
|
|
11376
|
-
tag.setAttribute('nonce',
|
|
10678
|
+
tag.setAttribute('data-emotion', options.key);
|
|
10679
|
+
if (options.nonce !== undefined) {
|
|
10680
|
+
tag.setAttribute('nonce', options.nonce);
|
|
11377
10681
|
}
|
|
11378
|
-
tag.appendChild(document.createTextNode(''))
|
|
11379
|
-
;
|
|
11380
|
-
|
|
11381
|
-
(opts.container !== undefined ? opts.container : document.head).appendChild(tag);
|
|
10682
|
+
tag.appendChild(document.createTextNode(''));
|
|
10683
|
+
tag.setAttribute('data-s', '');
|
|
11382
10684
|
return tag;
|
|
11383
10685
|
}
|
|
11384
|
-
var StyleSheet$1 = /*#__PURE__*/
|
|
11385
|
-
|
|
10686
|
+
var StyleSheet$1 = /*#__PURE__*/function () {
|
|
10687
|
+
// Using Node instead of HTMLElement since container may be a ShadowRoot
|
|
11386
10688
|
function StyleSheet(options) {
|
|
11387
|
-
|
|
11388
|
-
|
|
10689
|
+
var _this = this;
|
|
10690
|
+
this._insertTag = function (tag) {
|
|
10691
|
+
var before;
|
|
10692
|
+
if (_this.tags.length === 0) {
|
|
10693
|
+
if (_this.insertionPoint) {
|
|
10694
|
+
before = _this.insertionPoint.nextSibling;
|
|
10695
|
+
} else if (_this.prepend) {
|
|
10696
|
+
before = _this.container.firstChild;
|
|
10697
|
+
} else {
|
|
10698
|
+
before = _this.before;
|
|
10699
|
+
}
|
|
10700
|
+
} else {
|
|
10701
|
+
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
10702
|
+
}
|
|
10703
|
+
_this.container.insertBefore(tag, before);
|
|
10704
|
+
_this.tags.push(tag);
|
|
10705
|
+
};
|
|
10706
|
+
this.isSpeedy = options.speedy === undefined ? "development" === 'production' : options.speedy;
|
|
11389
10707
|
this.tags = [];
|
|
11390
10708
|
this.ctr = 0;
|
|
11391
|
-
this.
|
|
10709
|
+
this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
|
|
10710
|
+
|
|
10711
|
+
this.key = options.key;
|
|
10712
|
+
this.container = options.container;
|
|
10713
|
+
this.prepend = options.prepend;
|
|
10714
|
+
this.insertionPoint = options.insertionPoint;
|
|
10715
|
+
this.before = null;
|
|
11392
10716
|
}
|
|
11393
10717
|
var _proto = StyleSheet.prototype;
|
|
11394
|
-
_proto.
|
|
11395
|
-
|
|
11396
|
-
throw new Error('already injected!');
|
|
11397
|
-
}
|
|
11398
|
-
this.tags[0] = makeStyleTag(this.opts);
|
|
11399
|
-
this.injected = true;
|
|
10718
|
+
_proto.hydrate = function hydrate(nodes) {
|
|
10719
|
+
nodes.forEach(this._insertTag);
|
|
11400
10720
|
};
|
|
11401
|
-
_proto.
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
10721
|
+
_proto.insert = function insert(rule) {
|
|
10722
|
+
// the max length is how many rules we have per style tag, it's 65000 in speedy mode
|
|
10723
|
+
// it's 1 in dev because we insert source maps that map a single rule to a location
|
|
10724
|
+
// and you can only have one source map per style tag
|
|
10725
|
+
if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
|
|
10726
|
+
this._insertTag(createStyleElement$1(this));
|
|
11405
10727
|
}
|
|
11406
|
-
this.
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11411
|
-
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11416
|
-
|
|
11417
|
-
|
|
10728
|
+
var tag = this.tags[this.tags.length - 1];
|
|
10729
|
+
{
|
|
10730
|
+
var isImportRule = rule.charCodeAt(0) === 64 && rule.charCodeAt(1) === 105;
|
|
10731
|
+
if (isImportRule && this._alreadyInsertedOrderInsensitiveRule) {
|
|
10732
|
+
// this would only cause problem in speedy mode
|
|
10733
|
+
// but we don't want enabling speedy to affect the observable behavior
|
|
10734
|
+
// so we report this error at all times
|
|
10735
|
+
console.error("You're attempting to insert the following rule:\n" + rule + '\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.');
|
|
10736
|
+
}
|
|
10737
|
+
this._alreadyInsertedOrderInsensitiveRule = this._alreadyInsertedOrderInsensitiveRule || !isImportRule;
|
|
10738
|
+
}
|
|
10739
|
+
if (this.isSpeedy) {
|
|
10740
|
+
var sheet = sheetForTag$1(tag);
|
|
10741
|
+
try {
|
|
10742
|
+
// this is the ultrafast version, works across browsers
|
|
10743
|
+
// the big drawback is that the css won't be editable in devtools
|
|
10744
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
10745
|
+
} catch (e) {
|
|
10746
|
+
if ( !/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule)) {
|
|
10747
|
+
console.error("There was a problem inserting the following rule: \"" + rule + "\"", e);
|
|
11418
10748
|
}
|
|
11419
10749
|
}
|
|
11420
10750
|
} else {
|
|
11421
|
-
|
|
11422
|
-
this.tags.push(_tag);
|
|
11423
|
-
_tag.appendChild(document.createTextNode(rule + (sourceMap || '')));
|
|
10751
|
+
tag.appendChild(document.createTextNode(rule));
|
|
11424
10752
|
}
|
|
11425
10753
|
this.ctr++;
|
|
11426
|
-
if (this.ctr % 65000 === 0) {
|
|
11427
|
-
this.tags.push(makeStyleTag(this.opts));
|
|
11428
|
-
}
|
|
11429
10754
|
};
|
|
11430
10755
|
_proto.flush = function flush() {
|
|
11431
10756
|
// $FlowFixMe
|
|
11432
10757
|
this.tags.forEach(function (tag) {
|
|
11433
|
-
return tag.parentNode.removeChild(tag);
|
|
10758
|
+
return tag.parentNode && tag.parentNode.removeChild(tag);
|
|
11434
10759
|
});
|
|
11435
10760
|
this.tags = [];
|
|
11436
|
-
this.ctr = 0;
|
|
11437
|
-
|
|
11438
|
-
|
|
10761
|
+
this.ctr = 0;
|
|
10762
|
+
{
|
|
10763
|
+
this._alreadyInsertedOrderInsensitiveRule = false;
|
|
10764
|
+
}
|
|
11439
10765
|
};
|
|
11440
10766
|
return StyleSheet;
|
|
11441
10767
|
}();
|
|
11442
|
-
|
|
11443
|
-
|
|
11444
|
-
|
|
11445
|
-
|
|
11446
|
-
|
|
11447
|
-
|
|
11448
|
-
|
|
11449
|
-
|
|
11450
|
-
|
|
10768
|
+
|
|
10769
|
+
function memoize$1(fn) {
|
|
10770
|
+
var cache = Object.create(null);
|
|
10771
|
+
return function (arg) {
|
|
10772
|
+
if (cache[arg] === undefined) cache[arg] = fn(arg);
|
|
10773
|
+
return cache[arg];
|
|
10774
|
+
};
|
|
10775
|
+
}
|
|
10776
|
+
|
|
10777
|
+
var identifierWithPointTracking$1 = function identifierWithPointTracking(begin, points, index) {
|
|
10778
|
+
var previous = 0;
|
|
10779
|
+
var character = 0;
|
|
10780
|
+
while (true) {
|
|
10781
|
+
previous = character;
|
|
10782
|
+
character = P$1(); // &\f
|
|
10783
|
+
|
|
10784
|
+
if (previous === 38 && character === 12) {
|
|
10785
|
+
points[index] = 1;
|
|
11451
10786
|
}
|
|
11452
|
-
|
|
11453
|
-
|
|
11454
|
-
function insertRule(rule) {
|
|
11455
|
-
current += rule;
|
|
11456
|
-
if (isBrowser$1) {
|
|
11457
|
-
sheet.insert(rule, currentSourceMap);
|
|
10787
|
+
if (T$1(character)) {
|
|
10788
|
+
break;
|
|
11458
10789
|
}
|
|
10790
|
+
N$1();
|
|
11459
10791
|
}
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
|
|
11464
|
-
|
|
11465
|
-
|
|
11466
|
-
|
|
11467
|
-
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
sheet.inject();
|
|
11477
|
-
}
|
|
11478
|
-
var stylis = new stylis_min(stylisOptions);
|
|
11479
|
-
stylis.use(options.stylisPlugins)(insertionPlugin);
|
|
11480
|
-
var currentSourceMap = '';
|
|
11481
|
-
function handleInterpolation(interpolation, couldBeSelectorInterpolation) {
|
|
11482
|
-
if (interpolation == null) {
|
|
11483
|
-
return '';
|
|
11484
|
-
}
|
|
11485
|
-
switch (typeof interpolation) {
|
|
11486
|
-
case 'boolean':
|
|
11487
|
-
return '';
|
|
11488
|
-
case 'function':
|
|
11489
|
-
if (interpolation.__emotion_styles !== undefined) {
|
|
11490
|
-
var selector = interpolation.toString();
|
|
11491
|
-
if (selector === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') {
|
|
11492
|
-
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
|
|
11493
|
-
}
|
|
11494
|
-
return selector;
|
|
10792
|
+
return R$1(begin, F$1);
|
|
10793
|
+
};
|
|
10794
|
+
var toRules$1 = function toRules(parsed, points) {
|
|
10795
|
+
// pretend we've started with a comma
|
|
10796
|
+
var index = -1;
|
|
10797
|
+
var character = 44;
|
|
10798
|
+
do {
|
|
10799
|
+
switch (T$1(character)) {
|
|
10800
|
+
case 0:
|
|
10801
|
+
// &\f
|
|
10802
|
+
if (character === 38 && P$1() === 12) {
|
|
10803
|
+
// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
|
|
10804
|
+
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
|
|
10805
|
+
// and when it should just concatenate the outer and inner selectors
|
|
10806
|
+
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
|
|
10807
|
+
points[index] = 1;
|
|
11495
10808
|
}
|
|
11496
|
-
|
|
11497
|
-
|
|
10809
|
+
parsed[index] += identifierWithPointTracking$1(F$1 - 1, points, index);
|
|
10810
|
+
break;
|
|
10811
|
+
case 2:
|
|
10812
|
+
parsed[index] += W(character);
|
|
10813
|
+
break;
|
|
10814
|
+
case 4:
|
|
10815
|
+
// comma
|
|
10816
|
+
if (character === 44) {
|
|
10817
|
+
// colon
|
|
10818
|
+
parsed[++index] = P$1() === 58 ? '&\f' : '';
|
|
10819
|
+
points[index] = parsed[index].length;
|
|
10820
|
+
break;
|
|
11498
10821
|
}
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
|
|
11502
|
-
case 'object':
|
|
11503
|
-
return createStringFromObject.call(this, interpolation);
|
|
10822
|
+
|
|
10823
|
+
// fallthrough
|
|
10824
|
+
|
|
11504
10825
|
default:
|
|
11505
|
-
|
|
11506
|
-
return couldBeSelectorInterpolation === false && cached !== undefined ? cached : interpolation;
|
|
11507
|
-
}
|
|
11508
|
-
}
|
|
11509
|
-
var objectToStringCache = new WeakMap();
|
|
11510
|
-
function createStringFromObject(obj) {
|
|
11511
|
-
if (objectToStringCache.has(obj)) {
|
|
11512
|
-
// $FlowFixMe
|
|
11513
|
-
return objectToStringCache.get(obj);
|
|
11514
|
-
}
|
|
11515
|
-
var string = '';
|
|
11516
|
-
if (Array.isArray(obj)) {
|
|
11517
|
-
obj.forEach(function (interpolation) {
|
|
11518
|
-
string += handleInterpolation.call(this, interpolation, false);
|
|
11519
|
-
}, this);
|
|
11520
|
-
} else {
|
|
11521
|
-
Object.keys(obj).forEach(function (key) {
|
|
11522
|
-
if (typeof obj[key] !== 'object') {
|
|
11523
|
-
if (caches.registered[obj[key]] !== undefined) {
|
|
11524
|
-
string += key + "{" + caches.registered[obj[key]] + "}";
|
|
11525
|
-
} else {
|
|
11526
|
-
string += processStyleName$1(key) + ":" + processStyleValue$1(key, obj[key]) + ";";
|
|
11527
|
-
}
|
|
11528
|
-
} else {
|
|
11529
|
-
if (key === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') {
|
|
11530
|
-
throw new Error('Component selectors can only be used in conjunction with babel-plugin-emotion.');
|
|
11531
|
-
}
|
|
11532
|
-
if (Array.isArray(obj[key]) && typeof obj[key][0] === 'string' && caches.registered[obj[key][0]] === undefined) {
|
|
11533
|
-
obj[key].forEach(function (value) {
|
|
11534
|
-
string += processStyleName$1(key) + ":" + processStyleValue$1(key, value) + ";";
|
|
11535
|
-
});
|
|
11536
|
-
} else {
|
|
11537
|
-
string += key + "{" + handleInterpolation.call(this, obj[key], false) + "}";
|
|
11538
|
-
}
|
|
11539
|
-
}
|
|
11540
|
-
}, this);
|
|
11541
|
-
}
|
|
11542
|
-
objectToStringCache.set(obj, string);
|
|
11543
|
-
return string;
|
|
11544
|
-
}
|
|
11545
|
-
var name;
|
|
11546
|
-
var stylesWithLabel;
|
|
11547
|
-
var labelPattern = /label:\s*([^\s;\n{]+)\s*;/g;
|
|
11548
|
-
var createClassName = function createClassName(styles, identifierName) {
|
|
11549
|
-
return murmurhash2_32_gc(styles + identifierName) + identifierName;
|
|
11550
|
-
};
|
|
11551
|
-
{
|
|
11552
|
-
var oldCreateClassName = createClassName;
|
|
11553
|
-
var sourceMappingUrlPattern = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
|
11554
|
-
createClassName = function createClassName(styles, identifierName) {
|
|
11555
|
-
return oldCreateClassName(styles.replace(sourceMappingUrlPattern, function (sourceMap) {
|
|
11556
|
-
currentSourceMap = sourceMap;
|
|
11557
|
-
return '';
|
|
11558
|
-
}), identifierName);
|
|
11559
|
-
};
|
|
11560
|
-
}
|
|
11561
|
-
var createStyles = function createStyles(strings) {
|
|
11562
|
-
var stringMode = true;
|
|
11563
|
-
var styles = '';
|
|
11564
|
-
var identifierName = '';
|
|
11565
|
-
if (strings == null || strings.raw === undefined) {
|
|
11566
|
-
stringMode = false;
|
|
11567
|
-
styles += handleInterpolation.call(this, strings, false);
|
|
11568
|
-
} else {
|
|
11569
|
-
styles += strings[0];
|
|
11570
|
-
}
|
|
11571
|
-
for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
11572
|
-
interpolations[_key - 1] = arguments[_key];
|
|
10826
|
+
parsed[index] += k$1(character);
|
|
11573
10827
|
}
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
10828
|
+
} while (character = N$1());
|
|
10829
|
+
return parsed;
|
|
10830
|
+
};
|
|
10831
|
+
var getRules$1 = function getRules(value, points) {
|
|
10832
|
+
return V$1(toRules$1(U$1(value), points));
|
|
10833
|
+
}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
|
|
11577
10834
|
|
|
11578
|
-
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11582
|
-
|
|
11583
|
-
|
|
11584
|
-
|
|
11585
|
-
return '';
|
|
11586
|
-
});
|
|
11587
|
-
name = createClassName(styles, identifierName);
|
|
11588
|
-
return styles;
|
|
11589
|
-
};
|
|
11590
|
-
{
|
|
11591
|
-
var oldStylis = stylis;
|
|
11592
|
-
stylis = function stylis(selector, styles) {
|
|
11593
|
-
oldStylis(selector, styles);
|
|
11594
|
-
currentSourceMap = '';
|
|
11595
|
-
};
|
|
11596
|
-
}
|
|
11597
|
-
function insert(scope, styles) {
|
|
11598
|
-
if (caches.inserted[name] === undefined) {
|
|
11599
|
-
current = '';
|
|
11600
|
-
stylis(scope, styles);
|
|
11601
|
-
caches.inserted[name] = current;
|
|
11602
|
-
}
|
|
11603
|
-
}
|
|
11604
|
-
var css = function css() {
|
|
11605
|
-
var styles = createStyles.apply(this, arguments);
|
|
11606
|
-
var selector = key + "-" + name;
|
|
11607
|
-
if (caches.registered[selector] === undefined) {
|
|
11608
|
-
caches.registered[selector] = stylesWithLabel;
|
|
11609
|
-
}
|
|
11610
|
-
insert("." + selector, styles);
|
|
11611
|
-
return selector;
|
|
11612
|
-
};
|
|
11613
|
-
var keyframes = function keyframes() {
|
|
11614
|
-
var styles = createStyles.apply(this, arguments);
|
|
11615
|
-
var animation = "animation-" + name;
|
|
11616
|
-
insert('', "@keyframes " + animation + "{" + styles + "}");
|
|
11617
|
-
return animation;
|
|
11618
|
-
};
|
|
11619
|
-
var injectGlobal = function injectGlobal() {
|
|
11620
|
-
var styles = createStyles.apply(this, arguments);
|
|
11621
|
-
insert('', styles);
|
|
11622
|
-
};
|
|
11623
|
-
function getRegisteredStyles(registeredStyles, classNames) {
|
|
11624
|
-
var rawClassName = '';
|
|
11625
|
-
classNames.split(' ').forEach(function (className) {
|
|
11626
|
-
if (caches.registered[className] !== undefined) {
|
|
11627
|
-
registeredStyles.push(className);
|
|
11628
|
-
} else {
|
|
11629
|
-
rawClassName += className + " ";
|
|
11630
|
-
}
|
|
11631
|
-
});
|
|
11632
|
-
return rawClassName;
|
|
10835
|
+
var fixedElements$1 = /* #__PURE__ */new WeakMap();
|
|
10836
|
+
var compat$1 = function compat(element) {
|
|
10837
|
+
if (element.type !== 'rule' || !element.parent ||
|
|
10838
|
+
// positive .length indicates that this rule contains pseudo
|
|
10839
|
+
// negative .length indicates that this rule has been already prefixed
|
|
10840
|
+
element.length < 1) {
|
|
10841
|
+
return;
|
|
11633
10842
|
}
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
10843
|
+
var value = element.value,
|
|
10844
|
+
parent = element.parent;
|
|
10845
|
+
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
10846
|
+
while (parent.type !== 'rule') {
|
|
10847
|
+
parent = parent.parent;
|
|
10848
|
+
if (!parent) return;
|
|
10849
|
+
} // short-circuit for the simplest case
|
|
10850
|
+
|
|
10851
|
+
if (element.props.length === 1 && value.charCodeAt(0) !== 58
|
|
10852
|
+
/* colon */ && !fixedElements$1.get(parent)) {
|
|
10853
|
+
return;
|
|
10854
|
+
} // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
|
|
10855
|
+
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
|
|
10856
|
+
|
|
10857
|
+
if (isImplicitRule) {
|
|
10858
|
+
return;
|
|
11641
10859
|
}
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
10860
|
+
fixedElements$1.set(element, true);
|
|
10861
|
+
var points = [];
|
|
10862
|
+
var rules = getRules$1(value, points);
|
|
10863
|
+
var parentRules = parent.props;
|
|
10864
|
+
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
10865
|
+
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
10866
|
+
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
11645
10867
|
}
|
|
11646
|
-
return merge(classnames(classNames));
|
|
11647
|
-
}
|
|
11648
|
-
function hydrateSingleId(id) {
|
|
11649
|
-
caches.inserted[id] = true;
|
|
11650
|
-
}
|
|
11651
|
-
function hydrate(ids) {
|
|
11652
|
-
ids.forEach(hydrateSingleId);
|
|
11653
10868
|
}
|
|
11654
|
-
|
|
11655
|
-
|
|
11656
|
-
|
|
11657
|
-
|
|
10869
|
+
};
|
|
10870
|
+
var removeLabel$1 = function removeLabel(element) {
|
|
10871
|
+
if (element.type === 'decl') {
|
|
10872
|
+
var value = element.value;
|
|
10873
|
+
if (
|
|
10874
|
+
// charcode for l
|
|
10875
|
+
value.charCodeAt(0) === 108 &&
|
|
10876
|
+
// charcode for b
|
|
10877
|
+
value.charCodeAt(2) === 98) {
|
|
10878
|
+
// this ignores label
|
|
10879
|
+
element["return"] = '';
|
|
10880
|
+
element.value = '';
|
|
11658
10881
|
}
|
|
11659
|
-
caches.inserted = {};
|
|
11660
|
-
caches.registered = {};
|
|
11661
10882
|
}
|
|
11662
|
-
|
|
11663
|
-
|
|
11664
|
-
|
|
11665
|
-
|
|
11666
|
-
|
|
10883
|
+
};
|
|
10884
|
+
var ignoreFlag$1 = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
|
|
10885
|
+
var isIgnoringComment$1 = function isIgnoringComment(element) {
|
|
10886
|
+
return element.type === 'comm' && element.children.indexOf(ignoreFlag$1) > -1;
|
|
10887
|
+
};
|
|
10888
|
+
var createUnsafeSelectorsAlarm$1 = function createUnsafeSelectorsAlarm(cache) {
|
|
10889
|
+
return function (element, index, children) {
|
|
10890
|
+
if (element.type !== 'rule' || cache.compat) return;
|
|
10891
|
+
var unsafePseudoClasses = element.value.match(/(:first|:nth|:nth-last)-child/g);
|
|
10892
|
+
if (unsafePseudoClasses) {
|
|
10893
|
+
var isNested = element.parent === children[0]; // in nested rules comments become children of the "auto-inserted" rule
|
|
10894
|
+
//
|
|
10895
|
+
// considering this input:
|
|
10896
|
+
// .a {
|
|
10897
|
+
// .b /* comm */ {}
|
|
10898
|
+
// color: hotpink;
|
|
10899
|
+
// }
|
|
10900
|
+
// we get output corresponding to this:
|
|
10901
|
+
// .a {
|
|
10902
|
+
// & {
|
|
10903
|
+
// /* comm */
|
|
10904
|
+
// color: hotpink;
|
|
10905
|
+
// }
|
|
10906
|
+
// .b {}
|
|
10907
|
+
// }
|
|
11667
10908
|
|
|
11668
|
-
|
|
11669
|
-
|
|
11670
|
-
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11677
|
-
|
|
11678
|
-
|
|
11679
|
-
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
11691
|
-
cx = _createEmotion.cx,
|
|
11692
|
-
merge = _createEmotion.merge,
|
|
11693
|
-
getRegisteredStyles$1 = _createEmotion.getRegisteredStyles,
|
|
11694
|
-
injectGlobal = _createEmotion.injectGlobal,
|
|
11695
|
-
keyframes = _createEmotion.keyframes,
|
|
11696
|
-
css = _createEmotion.css,
|
|
11697
|
-
sheet = _createEmotion.sheet,
|
|
11698
|
-
caches = _createEmotion.caches;
|
|
10909
|
+
var commentContainer = isNested ? children[0].children :
|
|
10910
|
+
// global rule at the root level
|
|
10911
|
+
children;
|
|
10912
|
+
for (var i = commentContainer.length - 1; i >= 0; i--) {
|
|
10913
|
+
var node = commentContainer[i];
|
|
10914
|
+
if (node.line < element.line) {
|
|
10915
|
+
break;
|
|
10916
|
+
} // it is quite weird but comments are *usually* put at `column: element.column - 1`
|
|
10917
|
+
// so we seek *from the end* for the node that is earlier than the rule's `element` and check that
|
|
10918
|
+
// this will also match inputs like this:
|
|
10919
|
+
// .a {
|
|
10920
|
+
// /* comm */
|
|
10921
|
+
// .b {}
|
|
10922
|
+
// }
|
|
10923
|
+
//
|
|
10924
|
+
// but that is fine
|
|
10925
|
+
//
|
|
10926
|
+
// it would be the easiest to change the placement of the comment to be the first child of the rule:
|
|
10927
|
+
// .a {
|
|
10928
|
+
// .b { /* comm */ }
|
|
10929
|
+
// }
|
|
10930
|
+
// with such inputs we wouldn't have to search for the comment at all
|
|
10931
|
+
// TODO: consider changing this comment placement in the next major version
|
|
11699
10932
|
|
|
11700
|
-
|
|
11701
|
-
|
|
11702
|
-
|
|
11703
|
-
|
|
11704
|
-
|
|
11705
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11706
|
-
target[key] = source[key];
|
|
10933
|
+
if (node.column < element.column) {
|
|
10934
|
+
if (isIgnoringComment$1(node)) {
|
|
10935
|
+
return;
|
|
10936
|
+
}
|
|
10937
|
+
break;
|
|
11707
10938
|
}
|
|
11708
10939
|
}
|
|
10940
|
+
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
|
|
10941
|
+
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
|
|
10942
|
+
});
|
|
11709
10943
|
}
|
|
11710
|
-
return target;
|
|
11711
10944
|
};
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
10945
|
+
};
|
|
10946
|
+
var isImportRule$1 = function isImportRule(element) {
|
|
10947
|
+
return element.type.charCodeAt(1) === 105 && element.type.charCodeAt(0) === 64;
|
|
10948
|
+
};
|
|
10949
|
+
var isPrependedWithRegularRules$1 = function isPrependedWithRegularRules(index, children) {
|
|
10950
|
+
for (var i = index - 1; i >= 0; i--) {
|
|
10951
|
+
if (!isImportRule$1(children[i])) {
|
|
10952
|
+
return true;
|
|
10953
|
+
}
|
|
10954
|
+
}
|
|
10955
|
+
return false;
|
|
10956
|
+
}; // use this to remove incorrect elements from further processing
|
|
10957
|
+
// so they don't get handed to the `sheet` (or anything else)
|
|
10958
|
+
// as that could potentially lead to additional logs which in turn could be overhelming to the user
|
|
10959
|
+
|
|
10960
|
+
var nullifyElement$1 = function nullifyElement(element) {
|
|
10961
|
+
element.type = '';
|
|
10962
|
+
element.value = '';
|
|
10963
|
+
element["return"] = '';
|
|
10964
|
+
element.children = '';
|
|
10965
|
+
element.props = '';
|
|
10966
|
+
};
|
|
10967
|
+
var incorrectImportAlarm$1 = function incorrectImportAlarm(element, index, children) {
|
|
10968
|
+
if (!isImportRule$1(element)) {
|
|
10969
|
+
return;
|
|
10970
|
+
}
|
|
10971
|
+
if (element.parent) {
|
|
10972
|
+
console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles.");
|
|
10973
|
+
nullifyElement$1(element);
|
|
10974
|
+
} else if (isPrependedWithRegularRules$1(index, children)) {
|
|
10975
|
+
console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules.");
|
|
10976
|
+
nullifyElement$1(element);
|
|
10977
|
+
}
|
|
10978
|
+
};
|
|
10979
|
+
|
|
10980
|
+
/* eslint-disable no-fallthrough */
|
|
10981
|
+
|
|
10982
|
+
function prefix$1(value, length) {
|
|
10983
|
+
switch (m$1(value, length)) {
|
|
10984
|
+
// color-adjust
|
|
10985
|
+
case 5103:
|
|
10986
|
+
return a$1 + 'print-' + value + value;
|
|
10987
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
10988
|
+
|
|
10989
|
+
case 5737:
|
|
10990
|
+
case 4201:
|
|
10991
|
+
case 3177:
|
|
10992
|
+
case 3433:
|
|
10993
|
+
case 1641:
|
|
10994
|
+
case 4457:
|
|
10995
|
+
case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
10996
|
+
|
|
10997
|
+
case 5572:
|
|
10998
|
+
case 6356:
|
|
10999
|
+
case 5844:
|
|
11000
|
+
case 3191:
|
|
11001
|
+
case 6645:
|
|
11002
|
+
case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
11003
|
+
|
|
11004
|
+
case 6391:
|
|
11005
|
+
case 5879:
|
|
11006
|
+
case 5623:
|
|
11007
|
+
case 6135:
|
|
11008
|
+
case 4599:
|
|
11009
|
+
case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
11010
|
+
|
|
11011
|
+
case 4215:
|
|
11012
|
+
case 6389:
|
|
11013
|
+
case 5109:
|
|
11014
|
+
case 5365:
|
|
11015
|
+
case 5621:
|
|
11016
|
+
case 3829:
|
|
11017
|
+
return a$1 + value + value;
|
|
11018
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
11019
|
+
|
|
11020
|
+
case 5349:
|
|
11021
|
+
case 4246:
|
|
11022
|
+
case 4810:
|
|
11023
|
+
case 6968:
|
|
11024
|
+
case 2756:
|
|
11025
|
+
return a$1 + value + r$1 + value + e + value + value;
|
|
11026
|
+
// flex, flex-direction
|
|
11027
|
+
|
|
11028
|
+
case 6828:
|
|
11029
|
+
case 4268:
|
|
11030
|
+
return a$1 + value + e + value + value;
|
|
11031
|
+
// order
|
|
11032
|
+
|
|
11033
|
+
case 6165:
|
|
11034
|
+
return a$1 + value + e + 'flex-' + value + value;
|
|
11035
|
+
// align-items
|
|
11036
|
+
|
|
11037
|
+
case 5187:
|
|
11038
|
+
return a$1 + value + j$1(value, /(\w+).+(:[^]+)/, a$1 + 'box-$1$2' + e + 'flex-$1$2') + value;
|
|
11039
|
+
// align-self
|
|
11040
|
+
|
|
11041
|
+
case 5443:
|
|
11042
|
+
return a$1 + value + e + 'flex-item-' + j$1(value, /flex-|-self/, '') + value;
|
|
11043
|
+
// align-content
|
|
11044
|
+
|
|
11045
|
+
case 4675:
|
|
11046
|
+
return a$1 + value + e + 'flex-line-pack' + j$1(value, /align-content|flex-|-self/, '') + value;
|
|
11047
|
+
// flex-shrink
|
|
11048
|
+
|
|
11049
|
+
case 5548:
|
|
11050
|
+
return a$1 + value + e + j$1(value, 'shrink', 'negative') + value;
|
|
11051
|
+
// flex-basis
|
|
11052
|
+
|
|
11053
|
+
case 5292:
|
|
11054
|
+
return a$1 + value + e + j$1(value, 'basis', 'preferred-size') + value;
|
|
11055
|
+
// flex-grow
|
|
11056
|
+
|
|
11057
|
+
case 6060:
|
|
11058
|
+
return a$1 + 'box-' + j$1(value, '-grow', '') + a$1 + value + e + j$1(value, 'grow', 'positive') + value;
|
|
11059
|
+
// transition
|
|
11060
|
+
|
|
11061
|
+
case 4554:
|
|
11062
|
+
return a$1 + j$1(value, /([^-])(transform)/g, '$1' + a$1 + '$2') + value;
|
|
11063
|
+
// cursor
|
|
11064
|
+
|
|
11065
|
+
case 6187:
|
|
11066
|
+
return j$1(j$1(j$1(value, /(zoom-|grab)/, a$1 + '$1'), /(image-set)/, a$1 + '$1'), value, '') + value;
|
|
11067
|
+
// background, background-image
|
|
11068
|
+
|
|
11069
|
+
case 5495:
|
|
11070
|
+
case 3959:
|
|
11071
|
+
return j$1(value, /(image-set\([^]*)/, a$1 + '$1' + '$`$1');
|
|
11072
|
+
// justify-content
|
|
11073
|
+
|
|
11074
|
+
case 4968:
|
|
11075
|
+
return j$1(j$1(value, /(.+:)(flex-)?(.*)/, a$1 + 'box-pack:$3' + e + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + a$1 + value + value;
|
|
11076
|
+
// (margin|padding)-inline-(start|end)
|
|
11077
|
+
|
|
11078
|
+
case 4095:
|
|
11079
|
+
case 3583:
|
|
11080
|
+
case 4068:
|
|
11081
|
+
case 2532:
|
|
11082
|
+
return j$1(value, /(.+)-inline(.+)/, a$1 + '$1$2') + value;
|
|
11083
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
11084
|
+
|
|
11085
|
+
case 8116:
|
|
11086
|
+
case 7059:
|
|
11087
|
+
case 5753:
|
|
11088
|
+
case 5535:
|
|
11089
|
+
case 5445:
|
|
11090
|
+
case 5701:
|
|
11091
|
+
case 4933:
|
|
11092
|
+
case 4677:
|
|
11093
|
+
case 5533:
|
|
11094
|
+
case 5789:
|
|
11095
|
+
case 5021:
|
|
11096
|
+
case 4765:
|
|
11097
|
+
// stretch, max-content, min-content, fill-available
|
|
11098
|
+
if (A$1(value) - 1 - length > 6) switch (C$1(value, length + 1)) {
|
|
11099
|
+
// (m)ax-content, (m)in-content
|
|
11100
|
+
case 109:
|
|
11101
|
+
// -
|
|
11102
|
+
if (C$1(value, length + 4) !== 45) break;
|
|
11103
|
+
// (f)ill-available, (f)it-content
|
|
11104
|
+
|
|
11105
|
+
case 102:
|
|
11106
|
+
return j$1(value, /(.+:)(.+)-([^]+)/, '$1' + a$1 + '$2-$3' + '$1' + r$1 + (C$1(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
|
|
11107
|
+
// (s)tretch
|
|
11108
|
+
|
|
11109
|
+
case 115:
|
|
11110
|
+
return ~z$1(value, 'stretch') ? prefix$1(j$1(value, 'stretch', 'fill-available'), length) + value : value;
|
|
11111
|
+
}
|
|
11112
|
+
break;
|
|
11113
|
+
// position: sticky
|
|
11114
|
+
|
|
11115
|
+
case 4949:
|
|
11116
|
+
// (s)ticky?
|
|
11117
|
+
if (C$1(value, length + 1) !== 115) break;
|
|
11118
|
+
// display: (flex|inline-flex)
|
|
11119
|
+
|
|
11120
|
+
case 6444:
|
|
11121
|
+
switch (C$1(value, A$1(value) - 3 - (~z$1(value, '!important') && 10))) {
|
|
11122
|
+
// stic(k)y
|
|
11123
|
+
case 107:
|
|
11124
|
+
return j$1(value, ':', ':' + a$1) + value;
|
|
11125
|
+
// (inline-)?fl(e)x
|
|
11126
|
+
|
|
11127
|
+
case 101:
|
|
11128
|
+
return j$1(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + a$1 + (C$1(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + a$1 + '$2$3' + '$1' + e + '$2box$3') + value;
|
|
11129
|
+
}
|
|
11130
|
+
break;
|
|
11131
|
+
// writing-mode
|
|
11132
|
+
|
|
11133
|
+
case 5936:
|
|
11134
|
+
switch (C$1(value, length + 11)) {
|
|
11135
|
+
// vertical-l(r)
|
|
11136
|
+
case 114:
|
|
11137
|
+
return a$1 + value + e + j$1(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
|
|
11138
|
+
// vertical-r(l)
|
|
11139
|
+
|
|
11140
|
+
case 108:
|
|
11141
|
+
return a$1 + value + e + j$1(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
|
|
11142
|
+
// horizontal(-)tb
|
|
11143
|
+
|
|
11144
|
+
case 45:
|
|
11145
|
+
return a$1 + value + e + j$1(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
|
|
11146
|
+
}
|
|
11147
|
+
return a$1 + value + e + value + value;
|
|
11148
|
+
}
|
|
11149
|
+
return value;
|
|
11150
|
+
}
|
|
11151
|
+
var prefixer$1 = function prefixer(element, index, children, callback) {
|
|
11152
|
+
if (element.length > -1) if (!element["return"]) switch (element.type) {
|
|
11153
|
+
case s$1:
|
|
11154
|
+
element["return"] = prefix$1(element.value, element.length);
|
|
11155
|
+
break;
|
|
11156
|
+
case h$1:
|
|
11157
|
+
return fe([J$1(element, {
|
|
11158
|
+
value: j$1(element.value, '@', '@' + a$1)
|
|
11159
|
+
})], callback);
|
|
11160
|
+
case c$1:
|
|
11161
|
+
if (element.length) return q$1(element.props, function (value) {
|
|
11162
|
+
switch (y$1(value, /(::plac\w+|:read-\w+)/)) {
|
|
11163
|
+
// :read-(only|write)
|
|
11164
|
+
case ':read-only':
|
|
11165
|
+
case ':read-write':
|
|
11166
|
+
return fe([J$1(element, {
|
|
11167
|
+
props: [j$1(value, /:(read-\w+)/, ':' + r$1 + '$1')]
|
|
11168
|
+
})], callback);
|
|
11169
|
+
// :placeholder
|
|
11170
|
+
|
|
11171
|
+
case '::placeholder':
|
|
11172
|
+
return fe([J$1(element, {
|
|
11173
|
+
props: [j$1(value, /:(plac\w+)/, ':' + a$1 + 'input-$1')]
|
|
11174
|
+
}), J$1(element, {
|
|
11175
|
+
props: [j$1(value, /:(plac\w+)/, ':' + r$1 + '$1')]
|
|
11176
|
+
}), J$1(element, {
|
|
11177
|
+
props: [j$1(value, /:(plac\w+)/, e + 'input-$1')]
|
|
11178
|
+
})], callback);
|
|
11179
|
+
}
|
|
11180
|
+
return '';
|
|
11181
|
+
});
|
|
11182
|
+
}
|
|
11183
|
+
};
|
|
11184
|
+
var defaultStylisPlugins$1 = [prefixer$1];
|
|
11185
|
+
var createCache$1 = function createCache(options) {
|
|
11186
|
+
var key = options.key;
|
|
11187
|
+
if ( !key) {
|
|
11188
|
+
throw new Error("You have to configure `key` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.\n" + "If multiple caches share the same key they might \"fight\" for each other's style elements.");
|
|
11189
|
+
}
|
|
11190
|
+
if (key === 'css') {
|
|
11191
|
+
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
|
|
11192
|
+
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
|
|
11193
|
+
// note this very very intentionally targets all style elements regardless of the key to ensure
|
|
11194
|
+
// that creating a cache works inside of render of a React component
|
|
11195
|
+
|
|
11196
|
+
Array.prototype.forEach.call(ssrStyles, function (node) {
|
|
11197
|
+
// we want to only move elements which have a space in the data-emotion attribute value
|
|
11198
|
+
// because that indicates that it is an Emotion 11 server-side rendered style elements
|
|
11199
|
+
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
|
|
11200
|
+
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
|
|
11201
|
+
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
|
|
11202
|
+
// will not result in the Emotion 10 styles being destroyed
|
|
11203
|
+
var dataEmotionAttribute = node.getAttribute('data-emotion');
|
|
11204
|
+
if (dataEmotionAttribute.indexOf(' ') === -1) {
|
|
11205
|
+
return;
|
|
11206
|
+
}
|
|
11207
|
+
document.head.appendChild(node);
|
|
11208
|
+
node.setAttribute('data-s', '');
|
|
11209
|
+
});
|
|
11210
|
+
}
|
|
11211
|
+
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins$1;
|
|
11212
|
+
{
|
|
11213
|
+
// $FlowFixMe
|
|
11214
|
+
if (/[^a-z-]/.test(key)) {
|
|
11215
|
+
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
|
|
11216
|
+
}
|
|
11217
|
+
}
|
|
11218
|
+
var inserted = {};
|
|
11219
|
+
var container;
|
|
11220
|
+
var nodesToHydrate = [];
|
|
11221
|
+
{
|
|
11222
|
+
container = options.container || document.head;
|
|
11223
|
+
Array.prototype.forEach.call(
|
|
11224
|
+
// this means we will ignore elements which don't have a space in them which
|
|
11225
|
+
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
11226
|
+
document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
|
|
11227
|
+
var attrib = node.getAttribute("data-emotion").split(' '); // $FlowFixMe
|
|
11228
|
+
|
|
11229
|
+
for (var i = 1; i < attrib.length; i++) {
|
|
11230
|
+
inserted[attrib[i]] = true;
|
|
11231
|
+
}
|
|
11232
|
+
nodesToHydrate.push(node);
|
|
11233
|
+
});
|
|
11234
|
+
}
|
|
11235
|
+
var _insert;
|
|
11236
|
+
var omnipresentPlugins = [compat$1, removeLabel$1];
|
|
11237
|
+
{
|
|
11238
|
+
omnipresentPlugins.push(createUnsafeSelectorsAlarm$1({
|
|
11239
|
+
get compat() {
|
|
11240
|
+
return cache.compat;
|
|
11241
|
+
}
|
|
11242
|
+
}), incorrectImportAlarm$1);
|
|
11243
|
+
}
|
|
11244
|
+
{
|
|
11245
|
+
var currentSheet;
|
|
11246
|
+
var finalizingPlugins = [oe, function (element) {
|
|
11247
|
+
if (!element.root) {
|
|
11248
|
+
if (element["return"]) {
|
|
11249
|
+
currentSheet.insert(element["return"]);
|
|
11250
|
+
} else if (element.value && element.type !== n$1) {
|
|
11251
|
+
// insert empty rule in non-production environments
|
|
11252
|
+
// so @emotion/jest can grab `key` from the (JS)DOM for caches without any rules inserted yet
|
|
11253
|
+
currentSheet.insert(element.value + "{}");
|
|
11254
|
+
}
|
|
11255
|
+
}
|
|
11256
|
+
} ];
|
|
11257
|
+
var serializer = le(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
11258
|
+
var stylis = function stylis(styles) {
|
|
11259
|
+
return fe(ne(styles), serializer);
|
|
11260
|
+
};
|
|
11261
|
+
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
11262
|
+
currentSheet = sheet;
|
|
11263
|
+
if ( serialized.map !== undefined) {
|
|
11264
|
+
currentSheet = {
|
|
11265
|
+
insert: function insert(rule) {
|
|
11266
|
+
sheet.insert(rule + serialized.map);
|
|
11267
|
+
}
|
|
11268
|
+
};
|
|
11269
|
+
}
|
|
11270
|
+
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
11271
|
+
if (shouldCache) {
|
|
11272
|
+
cache.inserted[serialized.name] = true;
|
|
11273
|
+
}
|
|
11274
|
+
};
|
|
11275
|
+
}
|
|
11276
|
+
var cache = {
|
|
11277
|
+
key: key,
|
|
11278
|
+
sheet: new StyleSheet$1({
|
|
11279
|
+
key: key,
|
|
11280
|
+
container: container,
|
|
11281
|
+
nonce: options.nonce,
|
|
11282
|
+
speedy: options.speedy,
|
|
11283
|
+
prepend: options.prepend,
|
|
11284
|
+
insertionPoint: options.insertionPoint
|
|
11285
|
+
}),
|
|
11286
|
+
nonce: options.nonce,
|
|
11287
|
+
inserted: inserted,
|
|
11288
|
+
registered: {},
|
|
11289
|
+
insert: _insert
|
|
11290
|
+
};
|
|
11291
|
+
cache.sheet.hydrate(nodesToHydrate);
|
|
11292
|
+
return cache;
|
|
11293
|
+
};
|
|
11294
|
+
|
|
11295
|
+
/* eslint-disable */
|
|
11296
|
+
// Inspired by https://github.com/garycourt/murmurhash-js
|
|
11297
|
+
// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
|
|
11298
|
+
function murmur2$1(str) {
|
|
11299
|
+
// 'm' and 'r' are mixing constants generated offline.
|
|
11300
|
+
// They're not really 'magic', they just happen to work well.
|
|
11301
|
+
// const m = 0x5bd1e995;
|
|
11302
|
+
// const r = 24;
|
|
11303
|
+
// Initialize the hash
|
|
11304
|
+
var h = 0; // Mix 4 bytes at a time into the hash
|
|
11305
|
+
|
|
11306
|
+
var k,
|
|
11307
|
+
i = 0,
|
|
11308
|
+
len = str.length;
|
|
11309
|
+
for (; len >= 4; ++i, len -= 4) {
|
|
11310
|
+
k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
|
|
11311
|
+
k = /* Math.imul(k, m): */
|
|
11312
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
|
|
11313
|
+
k ^= /* k >>> r: */
|
|
11314
|
+
k >>> 24;
|
|
11315
|
+
h = /* Math.imul(k, m): */
|
|
11316
|
+
(k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ /* Math.imul(h, m): */
|
|
11317
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
11318
|
+
} // Handle the last few bytes of the input array
|
|
11319
|
+
|
|
11320
|
+
switch (len) {
|
|
11321
|
+
case 3:
|
|
11322
|
+
h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
|
|
11323
|
+
case 2:
|
|
11324
|
+
h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
|
|
11325
|
+
case 1:
|
|
11326
|
+
h ^= str.charCodeAt(i) & 0xff;
|
|
11327
|
+
h = /* Math.imul(h, m): */
|
|
11328
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
11329
|
+
} // Do a few final mixes of the hash to ensure the last few
|
|
11330
|
+
// bytes are well-incorporated.
|
|
11331
|
+
|
|
11332
|
+
h ^= h >>> 13;
|
|
11333
|
+
h = /* Math.imul(h, m): */
|
|
11334
|
+
(h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
|
|
11335
|
+
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
11336
|
+
}
|
|
11337
|
+
|
|
11338
|
+
var unitlessKeys$1 = {
|
|
11339
|
+
animationIterationCount: 1,
|
|
11340
|
+
borderImageOutset: 1,
|
|
11341
|
+
borderImageSlice: 1,
|
|
11342
|
+
borderImageWidth: 1,
|
|
11343
|
+
boxFlex: 1,
|
|
11344
|
+
boxFlexGroup: 1,
|
|
11345
|
+
boxOrdinalGroup: 1,
|
|
11346
|
+
columnCount: 1,
|
|
11347
|
+
columns: 1,
|
|
11348
|
+
flex: 1,
|
|
11349
|
+
flexGrow: 1,
|
|
11350
|
+
flexPositive: 1,
|
|
11351
|
+
flexShrink: 1,
|
|
11352
|
+
flexNegative: 1,
|
|
11353
|
+
flexOrder: 1,
|
|
11354
|
+
gridRow: 1,
|
|
11355
|
+
gridRowEnd: 1,
|
|
11356
|
+
gridRowSpan: 1,
|
|
11357
|
+
gridRowStart: 1,
|
|
11358
|
+
gridColumn: 1,
|
|
11359
|
+
gridColumnEnd: 1,
|
|
11360
|
+
gridColumnSpan: 1,
|
|
11361
|
+
gridColumnStart: 1,
|
|
11362
|
+
msGridRow: 1,
|
|
11363
|
+
msGridRowSpan: 1,
|
|
11364
|
+
msGridColumn: 1,
|
|
11365
|
+
msGridColumnSpan: 1,
|
|
11366
|
+
fontWeight: 1,
|
|
11367
|
+
lineHeight: 1,
|
|
11368
|
+
opacity: 1,
|
|
11369
|
+
order: 1,
|
|
11370
|
+
orphans: 1,
|
|
11371
|
+
tabSize: 1,
|
|
11372
|
+
widows: 1,
|
|
11373
|
+
zIndex: 1,
|
|
11374
|
+
zoom: 1,
|
|
11375
|
+
WebkitLineClamp: 1,
|
|
11376
|
+
// SVG-related properties
|
|
11377
|
+
fillOpacity: 1,
|
|
11378
|
+
floodOpacity: 1,
|
|
11379
|
+
stopOpacity: 1,
|
|
11380
|
+
strokeDasharray: 1,
|
|
11381
|
+
strokeDashoffset: 1,
|
|
11382
|
+
strokeMiterlimit: 1,
|
|
11383
|
+
strokeOpacity: 1,
|
|
11384
|
+
strokeWidth: 1
|
|
11385
|
+
};
|
|
11386
|
+
|
|
11387
|
+
var ILLEGAL_ESCAPE_SEQUENCE_ERROR$2 = "You have illegal escape sequence in your template literal, most likely inside content's property value.\nBecause you write your CSS inside a JavaScript string you actually have to do double escaping, so for example \"content: '\\00d7';\" should become \"content: '\\\\00d7';\".\nYou can read more about this here:\nhttps://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences";
|
|
11388
|
+
var UNDEFINED_AS_OBJECT_KEY_ERROR$1 = "You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).";
|
|
11389
|
+
var hyphenateRegex$1 = /[A-Z]|^ms/g;
|
|
11390
|
+
var animationRegex$1 = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
11391
|
+
var isCustomProperty$1 = function isCustomProperty(property) {
|
|
11392
|
+
return property.charCodeAt(1) === 45;
|
|
11393
|
+
};
|
|
11394
|
+
var isProcessableValue$1 = function isProcessableValue(value) {
|
|
11395
|
+
return value != null && typeof value !== 'boolean';
|
|
11396
|
+
};
|
|
11397
|
+
var processStyleName$1 = /* #__PURE__ */memoize$1(function (styleName) {
|
|
11398
|
+
return isCustomProperty$1(styleName) ? styleName : styleName.replace(hyphenateRegex$1, '-$&').toLowerCase();
|
|
11399
|
+
});
|
|
11400
|
+
var processStyleValue$1 = function processStyleValue(key, value) {
|
|
11401
|
+
switch (key) {
|
|
11402
|
+
case 'animation':
|
|
11403
|
+
case 'animationName':
|
|
11404
|
+
{
|
|
11405
|
+
if (typeof value === 'string') {
|
|
11406
|
+
return value.replace(animationRegex$1, function (match, p1, p2) {
|
|
11407
|
+
cursor$1 = {
|
|
11408
|
+
name: p1,
|
|
11409
|
+
styles: p2,
|
|
11410
|
+
next: cursor$1
|
|
11411
|
+
};
|
|
11412
|
+
return p1;
|
|
11413
|
+
});
|
|
11414
|
+
}
|
|
11415
|
+
}
|
|
11416
|
+
}
|
|
11417
|
+
if (unitlessKeys$1[key] !== 1 && !isCustomProperty$1(key) && typeof value === 'number' && value !== 0) {
|
|
11418
|
+
return value + 'px';
|
|
11419
|
+
}
|
|
11420
|
+
return value;
|
|
11421
|
+
};
|
|
11422
|
+
{
|
|
11423
|
+
var contentValuePattern$1 = /(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/;
|
|
11424
|
+
var contentValues$1 = ['normal', 'none', 'initial', 'inherit', 'unset'];
|
|
11425
|
+
var oldProcessStyleValue$1 = processStyleValue$1;
|
|
11426
|
+
var msPattern$1 = /^-ms-/;
|
|
11427
|
+
var hyphenPattern$1 = /-(.)/g;
|
|
11428
|
+
var hyphenatedCache$1 = {};
|
|
11429
|
+
processStyleValue$1 = function processStyleValue(key, value) {
|
|
11430
|
+
if (key === 'content') {
|
|
11431
|
+
if (typeof value !== 'string' || contentValues$1.indexOf(value) === -1 && !contentValuePattern$1.test(value) && (value.charAt(0) !== value.charAt(value.length - 1) || value.charAt(0) !== '"' && value.charAt(0) !== "'")) {
|
|
11432
|
+
throw new Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"" + value + "\"'`");
|
|
11433
|
+
}
|
|
11434
|
+
}
|
|
11435
|
+
var processed = oldProcessStyleValue$1(key, value);
|
|
11436
|
+
if (processed !== '' && !isCustomProperty$1(key) && key.indexOf('-') !== -1 && hyphenatedCache$1[key] === undefined) {
|
|
11437
|
+
hyphenatedCache$1[key] = true;
|
|
11438
|
+
console.error("Using kebab-case for css properties in objects is not supported. Did you mean " + key.replace(msPattern$1, 'ms-').replace(hyphenPattern$1, function (str, _char) {
|
|
11439
|
+
return _char.toUpperCase();
|
|
11440
|
+
}) + "?");
|
|
11441
|
+
}
|
|
11442
|
+
return processed;
|
|
11443
|
+
};
|
|
11444
|
+
}
|
|
11445
|
+
var noComponentSelectorMessage$1 = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';
|
|
11446
|
+
function handleInterpolation$1(mergedProps, registered, interpolation) {
|
|
11447
|
+
if (interpolation == null) {
|
|
11448
|
+
return '';
|
|
11449
|
+
}
|
|
11450
|
+
if (interpolation.__emotion_styles !== undefined) {
|
|
11451
|
+
if ( interpolation.toString() === 'NO_COMPONENT_SELECTOR') {
|
|
11452
|
+
throw new Error(noComponentSelectorMessage$1);
|
|
11453
|
+
}
|
|
11454
|
+
return interpolation;
|
|
11455
|
+
}
|
|
11456
|
+
switch (typeof interpolation) {
|
|
11457
|
+
case 'boolean':
|
|
11458
|
+
{
|
|
11459
|
+
return '';
|
|
11460
|
+
}
|
|
11461
|
+
case 'object':
|
|
11462
|
+
{
|
|
11463
|
+
if (interpolation.anim === 1) {
|
|
11464
|
+
cursor$1 = {
|
|
11465
|
+
name: interpolation.name,
|
|
11466
|
+
styles: interpolation.styles,
|
|
11467
|
+
next: cursor$1
|
|
11468
|
+
};
|
|
11469
|
+
return interpolation.name;
|
|
11470
|
+
}
|
|
11471
|
+
if (interpolation.styles !== undefined) {
|
|
11472
|
+
var next = interpolation.next;
|
|
11473
|
+
if (next !== undefined) {
|
|
11474
|
+
// not the most efficient thing ever but this is a pretty rare case
|
|
11475
|
+
// and there will be very few iterations of this generally
|
|
11476
|
+
while (next !== undefined) {
|
|
11477
|
+
cursor$1 = {
|
|
11478
|
+
name: next.name,
|
|
11479
|
+
styles: next.styles,
|
|
11480
|
+
next: cursor$1
|
|
11481
|
+
};
|
|
11482
|
+
next = next.next;
|
|
11483
|
+
}
|
|
11484
|
+
}
|
|
11485
|
+
var styles = interpolation.styles + ";";
|
|
11486
|
+
if ( interpolation.map !== undefined) {
|
|
11487
|
+
styles += interpolation.map;
|
|
11488
|
+
}
|
|
11489
|
+
return styles;
|
|
11490
|
+
}
|
|
11491
|
+
return createStringFromObject$1(mergedProps, registered, interpolation);
|
|
11492
|
+
}
|
|
11493
|
+
case 'function':
|
|
11494
|
+
{
|
|
11495
|
+
if (mergedProps !== undefined) {
|
|
11496
|
+
var previousCursor = cursor$1;
|
|
11497
|
+
var result = interpolation(mergedProps);
|
|
11498
|
+
cursor$1 = previousCursor;
|
|
11499
|
+
return handleInterpolation$1(mergedProps, registered, result);
|
|
11500
|
+
} else {
|
|
11501
|
+
console.error('Functions that are interpolated in css calls will be stringified.\n' + 'If you want to have a css call based on props, create a function that returns a css call like this\n' + 'let dynamicStyle = (props) => css`color: ${props.color}`\n' + 'It can be called directly with props or interpolated in a styled call like this\n' + "let SomeComponent = styled('div')`${dynamicStyle}`");
|
|
11502
|
+
}
|
|
11503
|
+
break;
|
|
11504
|
+
}
|
|
11505
|
+
case 'string':
|
|
11506
|
+
{
|
|
11507
|
+
var matched = [];
|
|
11508
|
+
var replaced = interpolation.replace(animationRegex$1, function (match, p1, p2) {
|
|
11509
|
+
var fakeVarName = "animation" + matched.length;
|
|
11510
|
+
matched.push("const " + fakeVarName + " = keyframes`" + p2.replace(/^@keyframes animation-\w+/, '') + "`");
|
|
11511
|
+
return "${" + fakeVarName + "}";
|
|
11512
|
+
});
|
|
11513
|
+
if (matched.length) {
|
|
11514
|
+
console.error('`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\n' + 'Instead of doing this:\n\n' + [].concat(matched, ["`" + replaced + "`"]).join('\n') + '\n\nYou should wrap it with `css` like this:\n\n' + ("css`" + replaced + "`"));
|
|
11515
|
+
}
|
|
11516
|
+
}
|
|
11517
|
+
break;
|
|
11518
|
+
} // finalize string values (regular strings and functions interpolated into css calls)
|
|
11519
|
+
|
|
11520
|
+
if (registered == null) {
|
|
11521
|
+
return interpolation;
|
|
11522
|
+
}
|
|
11523
|
+
var cached = registered[interpolation];
|
|
11524
|
+
return cached !== undefined ? cached : interpolation;
|
|
11525
|
+
}
|
|
11526
|
+
function createStringFromObject$1(mergedProps, registered, obj) {
|
|
11527
|
+
var string = '';
|
|
11528
|
+
if (Array.isArray(obj)) {
|
|
11529
|
+
for (var i = 0; i < obj.length; i++) {
|
|
11530
|
+
string += handleInterpolation$1(mergedProps, registered, obj[i]) + ";";
|
|
11531
|
+
}
|
|
11532
|
+
} else {
|
|
11533
|
+
for (var _key in obj) {
|
|
11534
|
+
var value = obj[_key];
|
|
11535
|
+
if (typeof value !== 'object') {
|
|
11536
|
+
if (registered != null && registered[value] !== undefined) {
|
|
11537
|
+
string += _key + "{" + registered[value] + "}";
|
|
11538
|
+
} else if (isProcessableValue$1(value)) {
|
|
11539
|
+
string += processStyleName$1(_key) + ":" + processStyleValue$1(_key, value) + ";";
|
|
11540
|
+
}
|
|
11541
|
+
} else {
|
|
11542
|
+
if (_key === 'NO_COMPONENT_SELECTOR' && "development" !== 'production') {
|
|
11543
|
+
throw new Error(noComponentSelectorMessage$1);
|
|
11544
|
+
}
|
|
11545
|
+
if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
|
|
11546
|
+
for (var _i = 0; _i < value.length; _i++) {
|
|
11547
|
+
if (isProcessableValue$1(value[_i])) {
|
|
11548
|
+
string += processStyleName$1(_key) + ":" + processStyleValue$1(_key, value[_i]) + ";";
|
|
11549
|
+
}
|
|
11550
|
+
}
|
|
11551
|
+
} else {
|
|
11552
|
+
var interpolated = handleInterpolation$1(mergedProps, registered, value);
|
|
11553
|
+
switch (_key) {
|
|
11554
|
+
case 'animation':
|
|
11555
|
+
case 'animationName':
|
|
11556
|
+
{
|
|
11557
|
+
string += processStyleName$1(_key) + ":" + interpolated + ";";
|
|
11558
|
+
break;
|
|
11559
|
+
}
|
|
11560
|
+
default:
|
|
11561
|
+
{
|
|
11562
|
+
if ( _key === 'undefined') {
|
|
11563
|
+
console.error(UNDEFINED_AS_OBJECT_KEY_ERROR$1);
|
|
11564
|
+
}
|
|
11565
|
+
string += _key + "{" + interpolated + "}";
|
|
11566
|
+
}
|
|
11567
|
+
}
|
|
11568
|
+
}
|
|
11569
|
+
}
|
|
11570
|
+
}
|
|
11571
|
+
}
|
|
11572
|
+
return string;
|
|
11573
|
+
}
|
|
11574
|
+
var labelPattern$1 = /label:\s*([^\s;\n{]+)\s*(;|$)/g;
|
|
11575
|
+
var sourceMapPattern$1;
|
|
11576
|
+
{
|
|
11577
|
+
sourceMapPattern$1 = /\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;
|
|
11578
|
+
} // this is the cursor for keyframes
|
|
11579
|
+
// keyframes are stored on the SerializedStyles object as a linked list
|
|
11580
|
+
|
|
11581
|
+
var cursor$1;
|
|
11582
|
+
var serializeStyles$1 = function serializeStyles(args, registered, mergedProps) {
|
|
11583
|
+
if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
|
|
11584
|
+
return args[0];
|
|
11585
|
+
}
|
|
11586
|
+
var stringMode = true;
|
|
11587
|
+
var styles = '';
|
|
11588
|
+
cursor$1 = undefined;
|
|
11589
|
+
var strings = args[0];
|
|
11590
|
+
if (strings == null || strings.raw === undefined) {
|
|
11591
|
+
stringMode = false;
|
|
11592
|
+
styles += handleInterpolation$1(mergedProps, registered, strings);
|
|
11593
|
+
} else {
|
|
11594
|
+
if ( strings[0] === undefined) {
|
|
11595
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$2);
|
|
11596
|
+
}
|
|
11597
|
+
styles += strings[0];
|
|
11598
|
+
} // we start at 1 since we've already handled the first arg
|
|
11599
|
+
|
|
11600
|
+
for (var i = 1; i < args.length; i++) {
|
|
11601
|
+
styles += handleInterpolation$1(mergedProps, registered, args[i]);
|
|
11602
|
+
if (stringMode) {
|
|
11603
|
+
if ( strings[i] === undefined) {
|
|
11604
|
+
console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR$2);
|
|
11605
|
+
}
|
|
11606
|
+
styles += strings[i];
|
|
11607
|
+
}
|
|
11608
|
+
}
|
|
11609
|
+
var sourceMap;
|
|
11610
|
+
{
|
|
11611
|
+
styles = styles.replace(sourceMapPattern$1, function (match) {
|
|
11612
|
+
sourceMap = match;
|
|
11613
|
+
return '';
|
|
11614
|
+
});
|
|
11615
|
+
} // using a global regex with .exec is stateful so lastIndex has to be reset each time
|
|
11616
|
+
|
|
11617
|
+
labelPattern$1.lastIndex = 0;
|
|
11618
|
+
var identifierName = '';
|
|
11619
|
+
var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
|
|
11620
|
+
|
|
11621
|
+
while ((match = labelPattern$1.exec(styles)) !== null) {
|
|
11622
|
+
identifierName += '-' +
|
|
11623
|
+
// $FlowFixMe we know it's not null
|
|
11624
|
+
match[1];
|
|
11625
|
+
}
|
|
11626
|
+
var name = murmur2$1(styles) + identifierName;
|
|
11627
|
+
{
|
|
11628
|
+
// $FlowFixMe SerializedStyles type doesn't have toString property (and we don't want to add it)
|
|
11629
|
+
return {
|
|
11630
|
+
name: name,
|
|
11631
|
+
styles: styles,
|
|
11632
|
+
map: sourceMap,
|
|
11633
|
+
next: cursor$1,
|
|
11634
|
+
toString: function toString() {
|
|
11635
|
+
return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).";
|
|
11636
|
+
}
|
|
11637
|
+
};
|
|
11638
|
+
}
|
|
11639
|
+
};
|
|
11640
|
+
|
|
11641
|
+
var isBrowser$1 = "object" !== 'undefined';
|
|
11642
|
+
function getRegisteredStyles$1(registered, registeredStyles, classNames) {
|
|
11643
|
+
var rawClassName = '';
|
|
11644
|
+
classNames.split(' ').forEach(function (className) {
|
|
11645
|
+
if (registered[className] !== undefined) {
|
|
11646
|
+
registeredStyles.push(registered[className] + ";");
|
|
11647
|
+
} else {
|
|
11648
|
+
rawClassName += className + " ";
|
|
11649
|
+
}
|
|
11650
|
+
});
|
|
11651
|
+
return rawClassName;
|
|
11652
|
+
}
|
|
11653
|
+
var registerStyles$1 = function registerStyles(cache, serialized, isStringTag) {
|
|
11654
|
+
var className = cache.key + "-" + serialized.name;
|
|
11655
|
+
if (
|
|
11656
|
+
// we only need to add the styles to the registered cache if the
|
|
11657
|
+
// class name could be used further down
|
|
11658
|
+
// the tree but if it's a string tag, we know it won't
|
|
11659
|
+
// so we don't have to add it to registered cache.
|
|
11660
|
+
// this improves memory usage since we can avoid storing the whole style string
|
|
11661
|
+
(isStringTag === false ||
|
|
11662
|
+
// we need to always store it if we're in compat mode and
|
|
11663
|
+
// in node since emotion-server relies on whether a style is in
|
|
11664
|
+
// the registered cache to know whether a style is global or not
|
|
11665
|
+
// also, note that this check will be dead code eliminated in the browser
|
|
11666
|
+
isBrowser$1 === false) && cache.registered[className] === undefined) {
|
|
11667
|
+
cache.registered[className] = serialized.styles;
|
|
11668
|
+
}
|
|
11669
|
+
};
|
|
11670
|
+
var insertStyles$1 = function insertStyles(cache, serialized, isStringTag) {
|
|
11671
|
+
registerStyles$1(cache, serialized, isStringTag);
|
|
11672
|
+
var className = cache.key + "-" + serialized.name;
|
|
11673
|
+
if (cache.inserted[serialized.name] === undefined) {
|
|
11674
|
+
var current = serialized;
|
|
11675
|
+
do {
|
|
11676
|
+
var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
|
|
11677
|
+
current = current.next;
|
|
11678
|
+
} while (current !== undefined);
|
|
11679
|
+
}
|
|
11680
|
+
};
|
|
11681
|
+
|
|
11682
|
+
function insertWithoutScoping$1(cache, serialized) {
|
|
11683
|
+
if (cache.inserted[serialized.name] === undefined) {
|
|
11684
|
+
return cache.insert('', serialized, cache.sheet, true);
|
|
11685
|
+
}
|
|
11686
|
+
}
|
|
11687
|
+
function merge(registered, css, className) {
|
|
11688
|
+
var registeredStyles = [];
|
|
11689
|
+
var rawClassName = getRegisteredStyles$1(registered, registeredStyles, className);
|
|
11690
|
+
if (registeredStyles.length < 2) {
|
|
11691
|
+
return className;
|
|
11692
|
+
}
|
|
11693
|
+
return rawClassName + css(registeredStyles);
|
|
11694
|
+
}
|
|
11695
|
+
var createEmotion = function createEmotion(options) {
|
|
11696
|
+
var cache = createCache$1(options); // $FlowFixMe
|
|
11697
|
+
|
|
11698
|
+
cache.sheet.speedy = function (value) {
|
|
11699
|
+
if ( this.ctr !== 0) {
|
|
11700
|
+
throw new Error('speedy must be changed before any rules are inserted');
|
|
11701
|
+
}
|
|
11702
|
+
this.isSpeedy = value;
|
|
11703
|
+
};
|
|
11704
|
+
cache.compat = true;
|
|
11705
|
+
var css = function css() {
|
|
11706
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
11707
|
+
args[_key] = arguments[_key];
|
|
11708
|
+
}
|
|
11709
|
+
var serialized = serializeStyles$1(args, cache.registered, undefined);
|
|
11710
|
+
insertStyles$1(cache, serialized, false);
|
|
11711
|
+
return cache.key + "-" + serialized.name;
|
|
11712
|
+
};
|
|
11713
|
+
var keyframes = function keyframes() {
|
|
11714
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
11715
|
+
args[_key2] = arguments[_key2];
|
|
11716
|
+
}
|
|
11717
|
+
var serialized = serializeStyles$1(args, cache.registered);
|
|
11718
|
+
var animation = "animation-" + serialized.name;
|
|
11719
|
+
insertWithoutScoping$1(cache, {
|
|
11720
|
+
name: serialized.name,
|
|
11721
|
+
styles: "@keyframes " + animation + "{" + serialized.styles + "}"
|
|
11722
|
+
});
|
|
11723
|
+
return animation;
|
|
11724
|
+
};
|
|
11725
|
+
var injectGlobal = function injectGlobal() {
|
|
11726
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
11727
|
+
args[_key3] = arguments[_key3];
|
|
11728
|
+
}
|
|
11729
|
+
var serialized = serializeStyles$1(args, cache.registered);
|
|
11730
|
+
insertWithoutScoping$1(cache, serialized);
|
|
11731
|
+
};
|
|
11732
|
+
var cx = function cx() {
|
|
11733
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
11734
|
+
args[_key4] = arguments[_key4];
|
|
11735
|
+
}
|
|
11736
|
+
return merge(cache.registered, css, classnames(args));
|
|
11737
|
+
};
|
|
11738
|
+
return {
|
|
11739
|
+
css: css,
|
|
11740
|
+
cx: cx,
|
|
11741
|
+
injectGlobal: injectGlobal,
|
|
11742
|
+
keyframes: keyframes,
|
|
11743
|
+
hydrate: function hydrate(ids) {
|
|
11744
|
+
ids.forEach(function (key) {
|
|
11745
|
+
cache.inserted[key] = true;
|
|
11746
|
+
});
|
|
11747
|
+
},
|
|
11748
|
+
flush: function flush() {
|
|
11749
|
+
cache.registered = {};
|
|
11750
|
+
cache.inserted = {};
|
|
11751
|
+
cache.sheet.flush();
|
|
11752
|
+
},
|
|
11753
|
+
// $FlowFixMe
|
|
11754
|
+
sheet: cache.sheet,
|
|
11755
|
+
cache: cache,
|
|
11756
|
+
getRegisteredStyles: getRegisteredStyles$1.bind(null, cache.registered),
|
|
11757
|
+
merge: merge.bind(null, cache.registered, css)
|
|
11758
|
+
};
|
|
11759
|
+
};
|
|
11760
|
+
var classnames = function classnames(args) {
|
|
11761
|
+
var cls = '';
|
|
11762
|
+
for (var i = 0; i < args.length; i++) {
|
|
11763
|
+
var arg = args[i];
|
|
11764
|
+
if (arg == null) continue;
|
|
11765
|
+
var toAdd = void 0;
|
|
11766
|
+
switch (typeof arg) {
|
|
11767
|
+
case 'boolean':
|
|
11768
|
+
break;
|
|
11769
|
+
case 'object':
|
|
11770
|
+
{
|
|
11771
|
+
if (Array.isArray(arg)) {
|
|
11772
|
+
toAdd = classnames(arg);
|
|
11773
|
+
} else {
|
|
11774
|
+
toAdd = '';
|
|
11775
|
+
for (var k in arg) {
|
|
11776
|
+
if (arg[k] && k) {
|
|
11777
|
+
toAdd && (toAdd += ' ');
|
|
11778
|
+
toAdd += k;
|
|
11779
|
+
}
|
|
11780
|
+
}
|
|
11781
|
+
}
|
|
11782
|
+
break;
|
|
11783
|
+
}
|
|
11784
|
+
default:
|
|
11785
|
+
{
|
|
11786
|
+
toAdd = arg;
|
|
11787
|
+
}
|
|
11788
|
+
}
|
|
11789
|
+
if (toAdd) {
|
|
11790
|
+
cls && (cls += ' ');
|
|
11791
|
+
cls += toAdd;
|
|
11792
|
+
}
|
|
11793
|
+
}
|
|
11794
|
+
return cls;
|
|
11795
|
+
};
|
|
11796
|
+
|
|
11797
|
+
var _createEmotion = createEmotion({
|
|
11798
|
+
key: 'css'
|
|
11799
|
+
}),
|
|
11800
|
+
css = _createEmotion.css;
|
|
11801
|
+
|
|
11802
|
+
function _extends$1() {
|
|
11803
|
+
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
11804
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
11805
|
+
var source = arguments[i];
|
|
11806
|
+
for (var key in source) {
|
|
11807
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11808
|
+
target[key] = source[key];
|
|
11809
|
+
}
|
|
11810
|
+
}
|
|
11811
|
+
}
|
|
11812
|
+
return target;
|
|
11813
|
+
};
|
|
11814
|
+
return _extends$1.apply(this, arguments);
|
|
11815
|
+
}
|
|
11816
|
+
|
|
11817
|
+
function colorToInt(color) {
|
|
11818
|
+
return Math.round(color * 255);
|
|
11819
|
+
}
|
|
11718
11820
|
function convertToInt(red, green, blue) {
|
|
11719
11821
|
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
11720
11822
|
}
|
|
@@ -18394,9 +18496,9 @@
|
|
|
18394
18496
|
fontSize: '1rem'
|
|
18395
18497
|
})
|
|
18396
18498
|
}, null)]), description && vue.createVNode("div", {
|
|
18397
|
-
"class":
|
|
18499
|
+
"class": ['trim', css({
|
|
18398
18500
|
marginTop: 3
|
|
18399
|
-
})
|
|
18501
|
+
})]
|
|
18400
18502
|
}, [vue.createVNode(VueHighlightWords, {
|
|
18401
18503
|
"searchWords": _this.currentValue.split(' '),
|
|
18402
18504
|
"textToHighlight": description,
|
|
@@ -22497,6 +22599,8 @@
|
|
|
22497
22599
|
var _templateObject$o;
|
|
22498
22600
|
var Slider = styled('div')(_templateObject$o || (_templateObject$o = _taggedTemplateLiteralLoose(["\n\tmargin-top: 30px;\n\tpadding: 10px;\n\n\t/* component style */\n\t.vue-slider-disabled {\n\t\topacity: 0.5;\n\t\tcursor: not-allowed;\n\t}\n\n\t/* rail style */\n\t.vue-slider-rail {\n\t\tbackground-color: #ccc;\n\t\tborder-radius: 15px;\n\t\theight: 4px;\n\t}\n\n\t/* process style */\n\t.vue-slider-process {\n\t\tbackground-color: #0b6aff;\n\t\tborder-radius: 15px;\n\t}\n\n\t/* mark style */\n\t.vue-slider-mark {\n\t\tz-index: 4;\n\t}\n\n\t.vue-slider-mark:first-child .vue-slider-mark-step,\n\t.vue-slider-mark:last-child .vue-slider-mark-step {\n\t\tdisplay: none;\n\t}\n\n\t.vue-slider-mark-step {\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: rgba(0, 0, 0, 0.16);\n\t}\n\n\t.vue-slider-mark-label {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t}\n\n\t/* dot style */\n\t.vue-slider-dot {\n\t\tz-index: 2;\n\t}\n\n\t.vue-slider-dot-handle {\n\t\tcursor: pointer;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tborder-radius: 50%;\n\t\tbackground-color: #fff;\n\t\tbox-sizing: border-box;\n\t\tborder: 1px solid #9a9a9a;\n\t\tz-index: 2;\n\t\tbox-shadow: 0.5px 0.5px 2px 1px rgb(0 0 0 / 32%);\n\t}\n\n\t.vue-slider-dot-handle-disabled {\n\t\tcursor: not-allowed;\n\t\tbackground-color: #ccc;\n\t}\n\n\t.vue-slider-dot-tooltip-inner {\n\t\tfont-size: 14px;\n\t\twhite-space: nowrap;\n\t\tpadding: 2px 5px;\n\t\tmin-width: 20px;\n\t\ttext-align: center;\n\t\tcolor: #fff;\n\t\tborder-radius: 5px;\n\t\tborder: 1px solid #3498db;\n\t\tbackground-color: #3498db;\n\t\tbox-sizing: content-box;\n\t}\n\n\t.vue-slider-dot-tooltip-inner::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-top::after {\n\t\ttop: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-top-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-bottom::after {\n\t\tbottom: 100%;\n\t\tleft: 50%;\n\t\ttransform: translate(-50%, 0);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-bottom-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-left::after {\n\t\tleft: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-left-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-inner-right::after {\n\t\tright: 100%;\n\t\ttop: 50%;\n\t\ttransform: translate(0, -50%);\n\t\theight: 0;\n\t\twidth: 0;\n\t\tborder-color: transparent;\n\t\tborder-style: solid;\n\t\tborder-width: 5px;\n\t\tborder-right-color: inherit;\n\t}\n\n\t.vue-slider-dot-tooltip-wrapper {\n\t\topacity: 0;\n\t\ttransition: all 0.3s;\n\t}\n\t.vue-slider-dot-tooltip-wrapper-show {\n\t\topacity: 1;\n\t}\n\n\t.label-container {\n\t\tmargin: 10px 0;\n\t\twidth: 100%;\n\t}\n\n\t.range-label-right {\n\t\tfloat: right;\n\t}\n"])));
|
|
22499
22601
|
|
|
22602
|
+
var global$1 = typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
|
|
22603
|
+
|
|
22500
22604
|
/**
|
|
22501
22605
|
* Caution: Please do not change this file without having a discussion with the Team.
|
|
22502
22606
|
* Any change may break the umd build, we're directly replacing the line no: 14
|
|
@@ -30725,1128 +30829,352 @@
|
|
|
30725
30829
|
}
|
|
30726
30830
|
}
|
|
30727
30831
|
return _context3.abrupt("return", result);
|
|
30728
|
-
case 16:
|
|
30729
|
-
case "end":
|
|
30730
|
-
return _context3.stop();
|
|
30731
|
-
}
|
|
30732
|
-
}, _callee3);
|
|
30733
|
-
}));
|
|
30734
|
-
return _renderToString.apply(this, arguments);
|
|
30735
|
-
}
|
|
30736
|
-
function resolveTeleports(_x4) {
|
|
30737
|
-
return _resolveTeleports.apply(this, arguments);
|
|
30738
|
-
}
|
|
30739
|
-
function _resolveTeleports() {
|
|
30740
|
-
_resolveTeleports = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(context) {
|
|
30741
|
-
var key;
|
|
30742
|
-
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
30743
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
30744
|
-
case 0:
|
|
30745
|
-
if (!context.__teleportBuffers) {
|
|
30746
|
-
_context4.next = 14;
|
|
30747
|
-
break;
|
|
30748
|
-
}
|
|
30749
|
-
context.teleports = context.teleports || {};
|
|
30750
|
-
_context4.t0 = _regeneratorRuntime().keys(context.__teleportBuffers);
|
|
30751
|
-
case 3:
|
|
30752
|
-
if ((_context4.t1 = _context4.t0()).done) {
|
|
30753
|
-
_context4.next = 14;
|
|
30754
|
-
break;
|
|
30755
|
-
}
|
|
30756
|
-
key = _context4.t1.value;
|
|
30757
|
-
_context4.t2 = unrollBuffer;
|
|
30758
|
-
_context4.next = 8;
|
|
30759
|
-
return Promise.all([context.__teleportBuffers[key]]);
|
|
30760
|
-
case 8:
|
|
30761
|
-
_context4.t3 = _context4.sent;
|
|
30762
|
-
_context4.next = 11;
|
|
30763
|
-
return (0, _context4.t2)(_context4.t3);
|
|
30764
|
-
case 11:
|
|
30765
|
-
context.teleports[key] = _context4.sent;
|
|
30766
|
-
_context4.next = 3;
|
|
30767
|
-
break;
|
|
30768
|
-
case 14:
|
|
30769
|
-
case "end":
|
|
30770
|
-
return _context4.stop();
|
|
30771
|
-
}
|
|
30772
|
-
}, _callee4);
|
|
30773
|
-
}));
|
|
30774
|
-
return _resolveTeleports.apply(this, arguments);
|
|
30775
|
-
}
|
|
30776
|
-
var isVNode$1 = vue.ssrUtils.isVNode;
|
|
30777
|
-
var ErrorTypeStrings = (_ErrorTypeStrings = {}, _ErrorTypeStrings["sp" /* LifecycleHooks.SERVER_PREFETCH */] = 'serverPrefetch hook', _ErrorTypeStrings["bc" /* LifecycleHooks.BEFORE_CREATE */] = 'beforeCreate hook', _ErrorTypeStrings["c" /* LifecycleHooks.CREATED */] = 'created hook', _ErrorTypeStrings["bm" /* LifecycleHooks.BEFORE_MOUNT */] = 'beforeMount hook', _ErrorTypeStrings["m" /* LifecycleHooks.MOUNTED */] = 'mounted hook', _ErrorTypeStrings["bu" /* LifecycleHooks.BEFORE_UPDATE */] = 'beforeUpdate hook', _ErrorTypeStrings["u" /* LifecycleHooks.UPDATED */] = 'updated', _ErrorTypeStrings["bum" /* LifecycleHooks.BEFORE_UNMOUNT */] = 'beforeUnmount hook', _ErrorTypeStrings["um" /* LifecycleHooks.UNMOUNTED */] = 'unmounted hook', _ErrorTypeStrings["a" /* LifecycleHooks.ACTIVATED */] = 'activated hook', _ErrorTypeStrings["da" /* LifecycleHooks.DEACTIVATED */] = 'deactivated hook', _ErrorTypeStrings["ec" /* LifecycleHooks.ERROR_CAPTURED */] = 'errorCaptured hook', _ErrorTypeStrings["rtc" /* LifecycleHooks.RENDER_TRACKED */] = 'renderTracked hook', _ErrorTypeStrings["rtg" /* LifecycleHooks.RENDER_TRIGGERED */] = 'renderTriggered hook', _ErrorTypeStrings[0 /* ErrorCodes.SETUP_FUNCTION */] = 'setup function', _ErrorTypeStrings[1 /* ErrorCodes.RENDER_FUNCTION */] = 'render function', _ErrorTypeStrings[2 /* ErrorCodes.WATCH_GETTER */] = 'watcher getter', _ErrorTypeStrings[3 /* ErrorCodes.WATCH_CALLBACK */] = 'watcher callback', _ErrorTypeStrings[4 /* ErrorCodes.WATCH_CLEANUP */] = 'watcher cleanup function', _ErrorTypeStrings[5 /* ErrorCodes.NATIVE_EVENT_HANDLER */] = 'native event handler', _ErrorTypeStrings[6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */] = 'component event handler', _ErrorTypeStrings[7 /* ErrorCodes.VNODE_HOOK */] = 'vnode hook', _ErrorTypeStrings[8 /* ErrorCodes.DIRECTIVE_HOOK */] = 'directive hook', _ErrorTypeStrings[9 /* ErrorCodes.TRANSITION_HOOK */] = 'transition hook', _ErrorTypeStrings[10 /* ErrorCodes.APP_ERROR_HANDLER */] = 'app errorHandler', _ErrorTypeStrings[11 /* ErrorCodes.APP_WARN_HANDLER */] = 'app warnHandler', _ErrorTypeStrings[12 /* ErrorCodes.FUNCTION_REF */] = 'ref function', _ErrorTypeStrings[13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */] = 'async component loader', _ErrorTypeStrings[14 /* ErrorCodes.SCHEDULER */] = 'scheduler flush. This is likely a Vue internals bug. ' + 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core', _ErrorTypeStrings);
|
|
30778
|
-
vue.initDirectivesForSSR();
|
|
30779
|
-
|
|
30780
|
-
var componentTypes = {
|
|
30781
|
-
reactiveList: 'REACTIVELIST',
|
|
30782
|
-
// search components
|
|
30783
|
-
dataSearch: 'DATASEARCH',
|
|
30784
|
-
categorySearch: 'CATEGORYSEARCH',
|
|
30785
|
-
searchBox: 'SEARCHBOX',
|
|
30786
|
-
// list components
|
|
30787
|
-
singleList: 'SINGLELIST',
|
|
30788
|
-
multiList: 'MULTILIST',
|
|
30789
|
-
singleDataList: 'SINGLEDATALIST',
|
|
30790
|
-
tabDataList: 'TABDATALIST',
|
|
30791
|
-
singleDropdownList: 'SINGLEDROPDOWNLIST',
|
|
30792
|
-
multiDataList: 'MULTIDATALIST',
|
|
30793
|
-
multiDropdownList: 'MULTIDROPDOWNLIST',
|
|
30794
|
-
singleDropdownRange: 'SINGLEDROPDOWNRANGE',
|
|
30795
|
-
treeList: 'TREELIST',
|
|
30796
|
-
// basic components
|
|
30797
|
-
numberBox: 'NUMBERBOX',
|
|
30798
|
-
tagCloud: 'TAGCLOUD',
|
|
30799
|
-
toggleButton: 'TOGGLEBUTTON',
|
|
30800
|
-
reactiveComponent: 'REACTIVECOMPONENT',
|
|
30801
|
-
// range components
|
|
30802
|
-
datePicker: 'DATEPICKER',
|
|
30803
|
-
dateRange: 'DATERANGE',
|
|
30804
|
-
dynamicRangeSlider: 'DYNAMICRANGESLIDER',
|
|
30805
|
-
multiDropdownRange: 'MULTIDROPDOWNRANGE',
|
|
30806
|
-
singleRange: 'SINGLERANGE',
|
|
30807
|
-
multiRange: 'MULTIRANGE',
|
|
30808
|
-
rangeSlider: 'RANGESLIDER',
|
|
30809
|
-
ratingsFilter: 'RATINGSFILTER',
|
|
30810
|
-
rangeInput: 'RANGEINPUT',
|
|
30811
|
-
// map components
|
|
30812
|
-
geoDistanceDropdown: 'GEO_DISTANCE_DROPDOWN',
|
|
30813
|
-
geoDistanceSlider: 'GEO_DISTANCE_SLIDER',
|
|
30814
|
-
reactiveMap: 'REACTIVE_MAP',
|
|
30815
|
-
// chart components
|
|
30816
|
-
reactiveChart: 'REACTIVE_CHART'
|
|
30817
|
-
};
|
|
30818
|
-
var queryTypes = {
|
|
30819
|
-
search: 'search',
|
|
30820
|
-
term: 'term',
|
|
30821
|
-
range: 'range',
|
|
30822
|
-
geo: 'geo',
|
|
30823
|
-
suggestion: 'suggestion'
|
|
30824
|
-
};
|
|
30825
|
-
|
|
30826
|
-
var REMOVE_COMPONENT = 'REMOVE_COMPONENT';
|
|
30827
|
-
var PATCH_VALUE = 'PATCH_VALUE';
|
|
30828
|
-
var CLEAR_VALUES = 'CLEAR_VALUES';
|
|
30829
|
-
var SET_VALUE = 'SET_VALUE';
|
|
30830
|
-
var SET_VALUES = 'SET_VALUES';
|
|
30831
|
-
var RESET_TO_DEFAULT = 'RESET_TO_DEFAULT';
|
|
30832
|
-
|
|
30833
|
-
var dateFormats = {
|
|
30834
|
-
date: 'YYYY-MM-DD',
|
|
30835
|
-
basic_date: 'YYYYMMDD',
|
|
30836
|
-
basic_date_time: 'YYYYMMDD[T]HHmmss.SSSZ',
|
|
30837
|
-
basic_date_time_no_millis: 'YYYYMMDD[T]HHmmssZ',
|
|
30838
|
-
date_time_no_millis: 'YYYY-MM-DD[T]HH:mm:ssZ',
|
|
30839
|
-
basic_time: 'HHmmss.SSSZ',
|
|
30840
|
-
basic_time_no_millis: 'HHmmssZ',
|
|
30841
|
-
epoch_millis: 'epoch_millis',
|
|
30842
|
-
epoch_second: 'epoch_second'
|
|
30843
|
-
};
|
|
30844
|
-
|
|
30845
|
-
var _componentTypeToDefau;
|
|
30846
|
-
function getOperation(conjunction) {
|
|
30847
|
-
if (conjunction === 'and') {
|
|
30848
|
-
return 'must';
|
|
30849
|
-
}
|
|
30850
|
-
if (conjunction === 'or') {
|
|
30851
|
-
return 'should';
|
|
30852
|
-
}
|
|
30853
|
-
return 'must_not';
|
|
30854
|
-
}
|
|
30855
|
-
function createBoolQuery(operation, query) {
|
|
30856
|
-
var resultQuery = null;
|
|
30857
|
-
if (Array.isArray(query) && query.length || !Array.isArray(query) && query) {
|
|
30858
|
-
var _bool;
|
|
30859
|
-
resultQuery = {
|
|
30860
|
-
bool: (_bool = {}, _bool[operation] = query, _bool)
|
|
30861
|
-
};
|
|
30862
|
-
}
|
|
30863
|
-
if (operation === 'should' && resultQuery) {
|
|
30864
|
-
resultQuery = {
|
|
30865
|
-
bool: _extends({}, resultQuery.bool, {
|
|
30866
|
-
minimum_should_match: 1
|
|
30867
|
-
})
|
|
30868
|
-
};
|
|
30869
|
-
}
|
|
30870
|
-
return resultQuery;
|
|
30871
|
-
}
|
|
30872
|
-
function getQuery(react, queryList) {
|
|
30873
|
-
var query = [];
|
|
30874
|
-
Object.keys(react).forEach(function (conjunction) {
|
|
30875
|
-
if (Array.isArray(react[conjunction])) {
|
|
30876
|
-
var operation = getOperation(conjunction);
|
|
30877
|
-
var queryArr = react[conjunction].map(function (comp) {
|
|
30878
|
-
if (typeof comp !== 'string') {
|
|
30879
|
-
// in this case, we have { <conjunction>: <> } objects inside the array
|
|
30880
|
-
return getQuery(comp, queryList);
|
|
30881
|
-
} else if (comp in queryList) {
|
|
30882
|
-
if (queryList[comp] && Object.keys(queryList[comp]).length) {
|
|
30883
|
-
return queryList[comp];
|
|
30884
|
-
}
|
|
30885
|
-
}
|
|
30886
|
-
return null;
|
|
30887
|
-
}).filter(function (item) {
|
|
30888
|
-
return !!item;
|
|
30889
|
-
});
|
|
30890
|
-
var boolQuery = createBoolQuery(operation, queryArr);
|
|
30891
|
-
if (boolQuery && Object.keys(boolQuery).length) {
|
|
30892
|
-
query = [].concat(query, [boolQuery]);
|
|
30893
|
-
}
|
|
30894
|
-
} else if (typeof react[conjunction] === 'string') {
|
|
30895
|
-
var _operation = getOperation(conjunction);
|
|
30896
|
-
var _boolQuery = createBoolQuery(_operation, queryList[react[conjunction]]);
|
|
30897
|
-
if (_boolQuery && Object.keys(_boolQuery).length) {
|
|
30898
|
-
query = [].concat(query, [_boolQuery]);
|
|
30899
|
-
}
|
|
30900
|
-
} else if (typeof react[conjunction] === 'object' && react[conjunction] !== null) {
|
|
30901
|
-
var _boolQuery2 = getQuery(react[conjunction], queryList);
|
|
30902
|
-
if (_boolQuery2 && Object.keys(_boolQuery2).length) {
|
|
30903
|
-
query = [].concat(query, [_boolQuery2]);
|
|
30904
|
-
}
|
|
30905
|
-
}
|
|
30906
|
-
});
|
|
30907
|
-
if (Array.isArray(query) && query.length) {
|
|
30908
|
-
return {
|
|
30909
|
-
bool: {
|
|
30910
|
-
must: query
|
|
30911
|
-
}
|
|
30912
|
-
};
|
|
30913
|
-
}
|
|
30914
|
-
if (query && Object.keys(query).length) {
|
|
30915
|
-
return query;
|
|
30916
|
-
}
|
|
30917
|
-
return null;
|
|
30918
|
-
}
|
|
30919
|
-
function getExternalQueryOptions(react, options, component) {
|
|
30920
|
-
var queryOptions = {};
|
|
30921
|
-
Object.keys(react).forEach(function (conjunction) {
|
|
30922
|
-
if (Array.isArray(react[conjunction])) {
|
|
30923
|
-
react[conjunction].forEach(function (comp) {
|
|
30924
|
-
if (options[comp]) {
|
|
30925
|
-
queryOptions = _extends({}, queryOptions, options[comp]);
|
|
30926
|
-
}
|
|
30927
|
-
});
|
|
30928
|
-
} else if (typeof react[conjunction] === 'string') {
|
|
30929
|
-
if (options[react[conjunction]]) {
|
|
30930
|
-
queryOptions = _extends({}, queryOptions, options[react[conjunction]]);
|
|
30931
|
-
}
|
|
30932
|
-
} else if (typeof react[conjunction] === 'object' && react[conjunction] !== null && !Array.isArray(react[conjunction])) {
|
|
30933
|
-
queryOptions = _extends({}, queryOptions, getExternalQueryOptions(react[conjunction], options));
|
|
30934
|
-
}
|
|
30935
|
-
});
|
|
30936
|
-
if (options[component]) {
|
|
30937
|
-
queryOptions = _extends({}, queryOptions, options[component]);
|
|
30938
|
-
}
|
|
30939
|
-
return queryOptions;
|
|
30940
|
-
}
|
|
30941
|
-
function buildQuery(component, dependencyTree, queryList, queryOptions) {
|
|
30942
|
-
var queryObj = null;
|
|
30943
|
-
var options = null;
|
|
30944
|
-
if (component in dependencyTree) {
|
|
30945
|
-
queryObj = getQuery(dependencyTree[component], queryList);
|
|
30946
|
-
options = getExternalQueryOptions(dependencyTree[component], queryOptions, component);
|
|
30947
|
-
}
|
|
30948
|
-
return {
|
|
30949
|
-
queryObj: queryObj,
|
|
30950
|
-
options: options
|
|
30951
|
-
};
|
|
30952
|
-
}
|
|
30953
|
-
function formatDate(date, props) {
|
|
30954
|
-
if (props.parseDate) {
|
|
30955
|
-
// We would be passing an instance of dayjs instead of xdate below. Users need to know.
|
|
30956
|
-
return props.parseDate(date, props);
|
|
30957
|
-
}
|
|
30958
|
-
switch (props.queryFormat) {
|
|
30959
|
-
case 'epoch_millis':
|
|
30960
|
-
return date.valueOf();
|
|
30961
|
-
case 'epoch_second':
|
|
30962
|
-
return Math.floor(date.valueOf() / 1000);
|
|
30963
|
-
default:
|
|
30964
|
-
{
|
|
30965
|
-
if (dateFormats[props.queryFormat]) {
|
|
30966
|
-
return date.format(dateFormats[props.queryFormat]);
|
|
30967
|
-
}
|
|
30968
|
-
return date.valueOf();
|
|
30969
|
-
}
|
|
30970
|
-
}
|
|
30971
|
-
}
|
|
30972
|
-
var componentTypeToDefaultValue = (_componentTypeToDefau = {}, _componentTypeToDefau[componentTypes.singleList] = '', _componentTypeToDefau[componentTypes.multiList] = [], _componentTypeToDefau[componentTypes.singleDataList] = '', _componentTypeToDefau[componentTypes.singleDropdownList] = '', _componentTypeToDefau[componentTypes.multiDataList] = [], _componentTypeToDefau[componentTypes.multiDropdownList] = [], _componentTypeToDefau[componentTypes.tagCloud] = '', _componentTypeToDefau[componentTypes.toggleButton] = '', _componentTypeToDefau[componentTypes.singleDropdownRange] = '', _componentTypeToDefau[componentTypes.multiDropdownRange] = [], _componentTypeToDefau[componentTypes.singleRange] = '', _componentTypeToDefau[componentTypes.multiRange] = [], _componentTypeToDefau);
|
|
30973
|
-
|
|
30974
|
-
/* isValidDateRangeQueryFormat() checks if the queryFormat is one of the dateFormats
|
|
30975
|
-
accepted by the elasticsearch or not. */
|
|
30976
|
-
function isValidDateRangeQueryFormat(queryFormat) {
|
|
30977
|
-
return Object.keys(dateFormats).includes(queryFormat);
|
|
30978
|
-
}
|
|
30979
|
-
|
|
30980
|
-
var _componentToTypeMap;
|
|
30981
|
-
var componentToTypeMap = (_componentToTypeMap = {}, _componentToTypeMap[componentTypes.reactiveList] = queryTypes.search, _componentToTypeMap[componentTypes.dataSearch] = queryTypes.search, _componentToTypeMap[componentTypes.categorySearch] = queryTypes.search, _componentToTypeMap[componentTypes.searchBox] = queryTypes.suggestion, _componentToTypeMap[componentTypes.singleList] = queryTypes.term, _componentToTypeMap[componentTypes.multiList] = queryTypes.term, _componentToTypeMap[componentTypes.singleDataList] = queryTypes.term, _componentToTypeMap[componentTypes.singleDropdownList] = queryTypes.term, _componentToTypeMap[componentTypes.multiDataList] = queryTypes.term, _componentToTypeMap[componentTypes.multiDropdownList] = queryTypes.term, _componentToTypeMap[componentTypes.tagCloud] = queryTypes.term, _componentToTypeMap[componentTypes.toggleButton] = queryTypes.term, _componentToTypeMap[componentTypes.reactiveChart] = queryTypes.term, _componentToTypeMap[componentTypes.treeList] = queryTypes.term, _componentToTypeMap[componentTypes.numberBox] = queryTypes.term, _componentToTypeMap[componentTypes.datePicker] = queryTypes.range, _componentToTypeMap[componentTypes.dateRange] = queryTypes.range, _componentToTypeMap[componentTypes.dynamicRangeSlider] = queryTypes.range, _componentToTypeMap[componentTypes.singleDropdownRange] = queryTypes.range, _componentToTypeMap[componentTypes.multiDropdownRange] = queryTypes.range, _componentToTypeMap[componentTypes.singleRange] = queryTypes.range, _componentToTypeMap[componentTypes.multiRange] = queryTypes.range, _componentToTypeMap[componentTypes.rangeSlider] = queryTypes.range, _componentToTypeMap[componentTypes.ratingsFilter] = queryTypes.range, _componentToTypeMap[componentTypes.rangeInput] = queryTypes.range, _componentToTypeMap[componentTypes.geoDistanceDropdown] = queryTypes.geo, _componentToTypeMap[componentTypes.geoDistanceSlider] = queryTypes.geo, _componentToTypeMap[componentTypes.reactiveMap] = queryTypes.geo, _componentToTypeMap);
|
|
30982
|
-
var multiRangeComponents = [componentTypes.multiRange, componentTypes.multiDropdownRange];
|
|
30983
|
-
var dateRangeComponents = [componentTypes.dateRange, componentTypes.datePicker];
|
|
30984
|
-
var searchComponents = [componentTypes.categorySearch, componentTypes.dataSearch, componentTypes.searchBox];
|
|
30985
|
-
var listComponentsWithPagination = [componentTypes.singleList, componentTypes.multiList, componentTypes.singleDropdownList, componentTypes.multiDropdownList];
|
|
30986
|
-
var getNormalizedField = function getNormalizedField(field) {
|
|
30987
|
-
if (field && !Array.isArray(field)) {
|
|
30988
|
-
return [field];
|
|
30989
|
-
}
|
|
30990
|
-
return field;
|
|
30991
|
-
};
|
|
30992
|
-
var isInternalComponent = function isInternalComponent(componentID) {
|
|
30993
|
-
if (componentID === void 0) {
|
|
30994
|
-
componentID = '';
|
|
30995
|
-
}
|
|
30996
|
-
return componentID.endsWith('__internal');
|
|
30997
|
-
};
|
|
30998
|
-
var getInternalComponentID = function getInternalComponentID(componentID) {
|
|
30999
|
-
if (componentID === void 0) {
|
|
31000
|
-
componentID = '';
|
|
31001
|
-
}
|
|
31002
|
-
return componentID + "__internal";
|
|
31003
|
-
};
|
|
31004
|
-
var getHistogramComponentID = function getHistogramComponentID(componentID) {
|
|
31005
|
-
if (componentID === void 0) {
|
|
31006
|
-
componentID = '';
|
|
31007
|
-
}
|
|
31008
|
-
return componentID + "__histogram__internal";
|
|
31009
|
-
};
|
|
31010
|
-
var isDRSRangeComponent = function isDRSRangeComponent(componentID) {
|
|
31011
|
-
if (componentID === void 0) {
|
|
31012
|
-
componentID = '';
|
|
31013
|
-
}
|
|
31014
|
-
return componentID.endsWith('__range__internal');
|
|
31015
|
-
};
|
|
31016
|
-
var isSearchComponent = function isSearchComponent(componentType) {
|
|
31017
|
-
if (componentType === void 0) {
|
|
31018
|
-
componentType = '';
|
|
31019
|
-
}
|
|
31020
|
-
return searchComponents.includes(componentType);
|
|
31021
|
-
};
|
|
31022
|
-
var isComponentUsesLabelAsValue = function isComponentUsesLabelAsValue(componentType) {
|
|
31023
|
-
if (componentType === void 0) {
|
|
31024
|
-
componentType = '';
|
|
31025
|
-
}
|
|
31026
|
-
return componentType === componentTypes.multiDataList || componentType === componentTypes.singleDataList || componentType === componentTypes.tabDataList;
|
|
31027
|
-
};
|
|
31028
|
-
var hasPaginationSupport = function hasPaginationSupport(componentType) {
|
|
31029
|
-
if (componentType === void 0) {
|
|
31030
|
-
componentType = '';
|
|
31031
|
-
}
|
|
31032
|
-
return listComponentsWithPagination.includes(componentType);
|
|
31033
|
-
};
|
|
31034
|
-
var getRSQuery = function getRSQuery(componentId, props, execute) {
|
|
31035
|
-
if (execute === void 0) {
|
|
31036
|
-
execute = true;
|
|
31037
|
-
}
|
|
31038
|
-
if (props && componentId) {
|
|
31039
|
-
var queryType = props.type ? props.type : componentToTypeMap[props.componentType];
|
|
31040
|
-
// dataField is a required field for components other than search
|
|
31041
|
-
// TODO: Revisit this logic based on the Appbase version
|
|
31042
|
-
// dataField is no longer a required field in RS API
|
|
31043
|
-
if (!isSearchComponent(props.componentType) && !props.dataField) {
|
|
31044
|
-
return null;
|
|
31045
|
-
}
|
|
31046
|
-
var endpoint;
|
|
31047
|
-
if (props.endpoint instanceof Object) {
|
|
31048
|
-
endpoint = props.endpoint;
|
|
31049
|
-
}
|
|
31050
|
-
return _extends({
|
|
31051
|
-
id: componentId,
|
|
31052
|
-
type: queryType || queryTypes.search,
|
|
31053
|
-
dataField: getNormalizedField(props.dataField),
|
|
31054
|
-
execute: execute,
|
|
31055
|
-
react: props.react,
|
|
31056
|
-
highlight: props.highlight,
|
|
31057
|
-
highlightField: getNormalizedField(props.highlightField),
|
|
31058
|
-
fuzziness: props.fuzziness,
|
|
31059
|
-
searchOperators: props.searchOperators,
|
|
31060
|
-
includeFields: props.includeFields,
|
|
31061
|
-
excludeFields: props.excludeFields,
|
|
31062
|
-
size: props.size,
|
|
31063
|
-
aggregationSize: props.aggregationSize,
|
|
31064
|
-
from: props.from || undefined,
|
|
31065
|
-
// Need to maintain for RL
|
|
31066
|
-
queryFormat: props.queryFormat,
|
|
31067
|
-
sortBy: props.sortBy,
|
|
31068
|
-
fieldWeights: getNormalizedField(props.fieldWeights),
|
|
31069
|
-
includeNullValues: props.includeNullValues,
|
|
31070
|
-
aggregationField: props.aggregationField || undefined,
|
|
31071
|
-
categoryField: props.categoryField || undefined,
|
|
31072
|
-
missingLabel: props.missingLabel || undefined,
|
|
31073
|
-
showMissing: props.showMissing,
|
|
31074
|
-
nestedField: props.nestedField || undefined,
|
|
31075
|
-
interval: props.interval,
|
|
31076
|
-
highlightConfig: props.customHighlight || props.highlightConfig,
|
|
31077
|
-
customQuery: props.customQuery,
|
|
31078
|
-
defaultQuery: props.defaultQuery,
|
|
31079
|
-
value: props.value,
|
|
31080
|
-
categoryValue: props.categoryValue || undefined,
|
|
31081
|
-
after: props.after || undefined,
|
|
31082
|
-
aggregations: props.aggregations || undefined,
|
|
31083
|
-
enableSynonyms: props.enableSynonyms,
|
|
31084
|
-
selectAllLabel: props.selectAllLabel,
|
|
31085
|
-
pagination: props.pagination,
|
|
31086
|
-
queryString: props.queryString,
|
|
31087
|
-
distinctField: props.distinctField,
|
|
31088
|
-
distinctFieldConfig: props.distinctFieldConfig,
|
|
31089
|
-
index: props.index
|
|
31090
|
-
}, queryType === queryTypes.suggestion ? _extends({
|
|
31091
|
-
enablePopularSuggestions: props.enablePopularSuggestions,
|
|
31092
|
-
enableEndpointSuggestions: props.enableEndpointSuggestions,
|
|
31093
|
-
enableRecentSuggestions: props.enableRecentSuggestions,
|
|
31094
|
-
popularSuggestionsConfig: props.popularSuggestionsConfig,
|
|
31095
|
-
recentSuggestionsConfig: props.recentSuggestionsConfig,
|
|
31096
|
-
applyStopwords: props.applyStopwords,
|
|
31097
|
-
customStopwords: props.customStopwords,
|
|
31098
|
-
enablePredictiveSuggestions: props.enablePredictiveSuggestions,
|
|
31099
|
-
featuredSuggestionsConfig: props.featuredSuggestionsConfig,
|
|
31100
|
-
indexSuggestionsConfig: props.indexSuggestionsConfig,
|
|
31101
|
-
enableFeaturedSuggestions: props.enableFeaturedSuggestions,
|
|
31102
|
-
enableIndexSuggestions: props.enableIndexSuggestions
|
|
31103
|
-
}, props.searchboxId ? {
|
|
31104
|
-
searchboxId: props.searchboxId
|
|
31105
|
-
} : {}) : {}, {
|
|
31106
|
-
calendarInterval: props.calendarInterval,
|
|
31107
|
-
endpoint: endpoint,
|
|
31108
|
-
range: props.range
|
|
31109
|
-
});
|
|
31110
|
-
}
|
|
31111
|
-
return null;
|
|
31112
|
-
};
|
|
31113
|
-
var extractPropsFromState = function extractPropsFromState(store, component, customOptions) {
|
|
31114
|
-
var componentProps = store.props[component];
|
|
31115
|
-
if (!componentProps) {
|
|
31116
|
-
return null;
|
|
31117
|
-
}
|
|
31118
|
-
var queryType = componentProps.type ? componentProps.type : componentToTypeMap[componentProps.componentType];
|
|
31119
|
-
var calcValues = store.selectedValues[component];
|
|
31120
|
-
var value = calcValues !== undefined && calcValues !== null ? calcValues.value : undefined;
|
|
31121
|
-
var queryFormat = componentProps.queryFormat;
|
|
31122
|
-
// calendarInterval only supported when using date types
|
|
31123
|
-
var calendarInterval;
|
|
31124
|
-
var interval = componentProps.interval;
|
|
31125
|
-
var type = queryType;
|
|
31126
|
-
var dataField = componentProps.dataField;
|
|
31127
|
-
var aggregations = componentProps.aggregations;
|
|
31128
|
-
var pagination; // pagination for `term` type of queries
|
|
31129
|
-
var from = componentProps.from; // offset for RL
|
|
31130
|
-
var range; // applicable for range components supporting histogram
|
|
31131
|
-
|
|
31132
|
-
// For term queries i.e list component `dataField` will be treated as aggregationField
|
|
31133
|
-
if (queryType === queryTypes.term) {
|
|
31134
|
-
// Only apply pagination prop for the components which supports it otherwise it can break the UI
|
|
31135
|
-
if (componentProps.showLoadMore && hasPaginationSupport(componentProps.componentType)) {
|
|
31136
|
-
pagination = true;
|
|
31137
|
-
}
|
|
31138
|
-
// Extract values from components that are type of objects
|
|
31139
|
-
// This code handles the controlled behavior in list components for e.g ToggleButton
|
|
31140
|
-
if (value != null && typeof value === 'object' && value.value) {
|
|
31141
|
-
value = value.value;
|
|
31142
|
-
} else if (Array.isArray(value)) {
|
|
31143
|
-
var parsedValue = [];
|
|
31144
|
-
value.forEach(function (val) {
|
|
31145
|
-
if (val != null && typeof val === 'object' && val.value) {
|
|
31146
|
-
parsedValue.push(val.value);
|
|
31147
|
-
} else {
|
|
31148
|
-
parsedValue.push(val);
|
|
31149
|
-
}
|
|
31150
|
-
});
|
|
31151
|
-
value = parsedValue;
|
|
31152
|
-
}
|
|
31153
|
-
}
|
|
31154
|
-
if (queryType === queryTypes.range) {
|
|
31155
|
-
if (Array.isArray(value)) {
|
|
31156
|
-
if (multiRangeComponents.includes(componentProps.componentType)) {
|
|
31157
|
-
value = value.map(function (_ref) {
|
|
31158
|
-
var start = _ref.start,
|
|
31159
|
-
end = _ref.end;
|
|
31160
|
-
return {
|
|
31161
|
-
start: start,
|
|
31162
|
-
end: end
|
|
31163
|
-
};
|
|
31164
|
-
});
|
|
31165
|
-
} else {
|
|
31166
|
-
value = {
|
|
31167
|
-
start: value[0],
|
|
31168
|
-
end: value[1]
|
|
31169
|
-
};
|
|
31170
|
-
}
|
|
31171
|
-
} else if (componentProps.showHistogram) {
|
|
31172
|
-
var internalComponentID = getInternalComponentID(component);
|
|
31173
|
-
var internalComponentValue = store.internalValues[internalComponentID];
|
|
31174
|
-
if (!internalComponentValue) {
|
|
31175
|
-
// Handle dynamic range slider
|
|
31176
|
-
var histogramComponentID = getHistogramComponentID(component);
|
|
31177
|
-
internalComponentValue = store.internalValues[histogramComponentID];
|
|
31178
|
-
}
|
|
31179
|
-
if (internalComponentValue && Array.isArray(internalComponentValue.value)) {
|
|
31180
|
-
value = {
|
|
31181
|
-
start: internalComponentValue.value[0],
|
|
31182
|
-
end: internalComponentValue.value[1]
|
|
31183
|
-
};
|
|
31184
|
-
}
|
|
31185
|
-
}
|
|
31186
|
-
if (isDRSRangeComponent(component)) {
|
|
31187
|
-
aggregations = ['min', 'max'];
|
|
31188
|
-
} else if (componentProps.showHistogram) {
|
|
31189
|
-
aggregations = ['histogram'];
|
|
31190
|
-
}
|
|
31191
|
-
|
|
31192
|
-
// handle number box, number box query changes based on the `queryFormat` value
|
|
31193
|
-
if (componentProps.componentType === componentTypes.dynamicRangeSlider || componentProps.componentType === componentTypes.rangeSlider) {
|
|
31194
|
-
calendarInterval = Object.keys(dateFormats).includes(queryFormat) ? componentProps.calendarInterval : undefined;
|
|
31195
|
-
|
|
31196
|
-
// Set value
|
|
31197
|
-
if (value) {
|
|
31198
|
-
if (isValidDateRangeQueryFormat(componentProps.queryFormat)) {
|
|
31199
|
-
// check if date types are dealt with
|
|
31200
|
-
value = {
|
|
31201
|
-
start: formatDate(dayjs_min(new Date(value.start)), componentProps),
|
|
31202
|
-
end: formatDate(dayjs_min(new Date(value.end)), componentProps)
|
|
31203
|
-
};
|
|
31204
|
-
} else {
|
|
31205
|
-
value = {
|
|
31206
|
-
start: parseFloat(value.start),
|
|
31207
|
-
end: parseFloat(value.end)
|
|
31208
|
-
};
|
|
31209
|
-
}
|
|
31210
|
-
}
|
|
31211
|
-
var rangeValue;
|
|
31212
|
-
if (componentProps.componentType === componentTypes.dynamicRangeSlider) {
|
|
31213
|
-
rangeValue = store.aggregations[component + "__range__internal"];
|
|
31214
|
-
if (componentProps.nestedField) {
|
|
31215
|
-
rangeValue = rangeValue && store.aggregations[component + "__range__internal"][componentProps.nestedField].min ? {
|
|
31216
|
-
start: store.aggregations[component + "__range__internal"][componentProps.nestedField].min.value,
|
|
31217
|
-
end: store.aggregations[component + "__range__internal"][componentProps.nestedField].max.value
|
|
31218
|
-
} // prettier-ignore
|
|
31219
|
-
: null;
|
|
31220
|
-
} else {
|
|
31221
|
-
rangeValue = rangeValue && store.aggregations[component + "__range__internal"].min ? {
|
|
31222
|
-
start: store.aggregations[component + "__range__internal"].min.value,
|
|
31223
|
-
end: store.aggregations[component + "__range__internal"].max.value
|
|
31224
|
-
} // prettier-ignore
|
|
31225
|
-
: null;
|
|
31226
|
-
}
|
|
31227
|
-
} else {
|
|
31228
|
-
rangeValue = componentProps.range;
|
|
31229
|
-
}
|
|
31230
|
-
if (rangeValue) {
|
|
31231
|
-
if (isValidDateRangeQueryFormat(componentProps.queryFormat)) {
|
|
31232
|
-
// check if date types are dealt with
|
|
31233
|
-
range = {
|
|
31234
|
-
start: formatDate(dayjs_min(rangeValue.start), componentProps),
|
|
31235
|
-
end: formatDate(dayjs_min(rangeValue.end), componentProps)
|
|
31236
|
-
};
|
|
31237
|
-
} else {
|
|
31238
|
-
range = {
|
|
31239
|
-
start: parseFloat(rangeValue.start),
|
|
31240
|
-
end: parseFloat(rangeValue.end)
|
|
31241
|
-
};
|
|
31242
|
-
}
|
|
30832
|
+
case 16:
|
|
30833
|
+
case "end":
|
|
30834
|
+
return _context3.stop();
|
|
31243
30835
|
}
|
|
31244
|
-
}
|
|
31245
|
-
|
|
31246
|
-
|
|
31247
|
-
|
|
31248
|
-
|
|
31249
|
-
|
|
31250
|
-
|
|
31251
|
-
|
|
31252
|
-
|
|
31253
|
-
|
|
31254
|
-
|
|
31255
|
-
|
|
31256
|
-
|
|
31257
|
-
|
|
31258
|
-
|
|
31259
|
-
|
|
31260
|
-
// value would be one of ISO Date string, number, native date
|
|
31261
|
-
start: formatDate(dayjs_min(val).subtract(24, 'hour'), componentProps),
|
|
31262
|
-
end: formatDate(dayjs_min(val), componentProps)
|
|
31263
|
-
};
|
|
31264
|
-
});
|
|
31265
|
-
} else {
|
|
31266
|
-
value = {
|
|
31267
|
-
start: formatDate(dayjs_min(value.start).subtract(24, 'hour'), componentProps),
|
|
31268
|
-
end: formatDate(dayjs_min(value.end), componentProps)
|
|
31269
|
-
};
|
|
30836
|
+
}, _callee3);
|
|
30837
|
+
}));
|
|
30838
|
+
return _renderToString.apply(this, arguments);
|
|
30839
|
+
}
|
|
30840
|
+
function resolveTeleports(_x4) {
|
|
30841
|
+
return _resolveTeleports.apply(this, arguments);
|
|
30842
|
+
}
|
|
30843
|
+
function _resolveTeleports() {
|
|
30844
|
+
_resolveTeleports = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(context) {
|
|
30845
|
+
var key;
|
|
30846
|
+
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
30847
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
30848
|
+
case 0:
|
|
30849
|
+
if (!context.__teleportBuffers) {
|
|
30850
|
+
_context4.next = 14;
|
|
30851
|
+
break;
|
|
31270
30852
|
}
|
|
31271
|
-
|
|
30853
|
+
context.teleports = context.teleports || {};
|
|
30854
|
+
_context4.t0 = _regeneratorRuntime().keys(context.__teleportBuffers);
|
|
30855
|
+
case 3:
|
|
30856
|
+
if ((_context4.t1 = _context4.t0()).done) {
|
|
30857
|
+
_context4.next = 14;
|
|
30858
|
+
break;
|
|
30859
|
+
}
|
|
30860
|
+
key = _context4.t1.value;
|
|
30861
|
+
_context4.t2 = unrollBuffer;
|
|
30862
|
+
_context4.next = 8;
|
|
30863
|
+
return Promise.all([context.__teleportBuffers[key]]);
|
|
30864
|
+
case 8:
|
|
30865
|
+
_context4.t3 = _context4.sent;
|
|
30866
|
+
_context4.next = 11;
|
|
30867
|
+
return (0, _context4.t2)(_context4.t3);
|
|
30868
|
+
case 11:
|
|
30869
|
+
context.teleports[key] = _context4.sent;
|
|
30870
|
+
_context4.next = 3;
|
|
30871
|
+
break;
|
|
30872
|
+
case 14:
|
|
30873
|
+
case "end":
|
|
30874
|
+
return _context4.stop();
|
|
31272
30875
|
}
|
|
31273
|
-
}
|
|
31274
|
-
}
|
|
31275
|
-
|
|
31276
|
-
|
|
31277
|
-
|
|
31278
|
-
|
|
31279
|
-
|
|
31280
|
-
|
|
31281
|
-
|
|
31282
|
-
|
|
31283
|
-
|
|
31284
|
-
|
|
31285
|
-
|
|
31286
|
-
|
|
30876
|
+
}, _callee4);
|
|
30877
|
+
}));
|
|
30878
|
+
return _resolveTeleports.apply(this, arguments);
|
|
30879
|
+
}
|
|
30880
|
+
var isVNode$1 = vue.ssrUtils.isVNode;
|
|
30881
|
+
var ErrorTypeStrings = (_ErrorTypeStrings = {}, _ErrorTypeStrings["sp" /* LifecycleHooks.SERVER_PREFETCH */] = 'serverPrefetch hook', _ErrorTypeStrings["bc" /* LifecycleHooks.BEFORE_CREATE */] = 'beforeCreate hook', _ErrorTypeStrings["c" /* LifecycleHooks.CREATED */] = 'created hook', _ErrorTypeStrings["bm" /* LifecycleHooks.BEFORE_MOUNT */] = 'beforeMount hook', _ErrorTypeStrings["m" /* LifecycleHooks.MOUNTED */] = 'mounted hook', _ErrorTypeStrings["bu" /* LifecycleHooks.BEFORE_UPDATE */] = 'beforeUpdate hook', _ErrorTypeStrings["u" /* LifecycleHooks.UPDATED */] = 'updated', _ErrorTypeStrings["bum" /* LifecycleHooks.BEFORE_UNMOUNT */] = 'beforeUnmount hook', _ErrorTypeStrings["um" /* LifecycleHooks.UNMOUNTED */] = 'unmounted hook', _ErrorTypeStrings["a" /* LifecycleHooks.ACTIVATED */] = 'activated hook', _ErrorTypeStrings["da" /* LifecycleHooks.DEACTIVATED */] = 'deactivated hook', _ErrorTypeStrings["ec" /* LifecycleHooks.ERROR_CAPTURED */] = 'errorCaptured hook', _ErrorTypeStrings["rtc" /* LifecycleHooks.RENDER_TRACKED */] = 'renderTracked hook', _ErrorTypeStrings["rtg" /* LifecycleHooks.RENDER_TRIGGERED */] = 'renderTriggered hook', _ErrorTypeStrings[0 /* ErrorCodes.SETUP_FUNCTION */] = 'setup function', _ErrorTypeStrings[1 /* ErrorCodes.RENDER_FUNCTION */] = 'render function', _ErrorTypeStrings[2 /* ErrorCodes.WATCH_GETTER */] = 'watcher getter', _ErrorTypeStrings[3 /* ErrorCodes.WATCH_CALLBACK */] = 'watcher callback', _ErrorTypeStrings[4 /* ErrorCodes.WATCH_CLEANUP */] = 'watcher cleanup function', _ErrorTypeStrings[5 /* ErrorCodes.NATIVE_EVENT_HANDLER */] = 'native event handler', _ErrorTypeStrings[6 /* ErrorCodes.COMPONENT_EVENT_HANDLER */] = 'component event handler', _ErrorTypeStrings[7 /* ErrorCodes.VNODE_HOOK */] = 'vnode hook', _ErrorTypeStrings[8 /* ErrorCodes.DIRECTIVE_HOOK */] = 'directive hook', _ErrorTypeStrings[9 /* ErrorCodes.TRANSITION_HOOK */] = 'transition hook', _ErrorTypeStrings[10 /* ErrorCodes.APP_ERROR_HANDLER */] = 'app errorHandler', _ErrorTypeStrings[11 /* ErrorCodes.APP_WARN_HANDLER */] = 'app warnHandler', _ErrorTypeStrings[12 /* ErrorCodes.FUNCTION_REF */] = 'ref function', _ErrorTypeStrings[13 /* ErrorCodes.ASYNC_COMPONENT_LOADER */] = 'async component loader', _ErrorTypeStrings[14 /* ErrorCodes.SCHEDULER */] = 'scheduler flush. This is likely a Vue internals bug. ' + 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core', _ErrorTypeStrings);
|
|
30882
|
+
vue.initDirectivesForSSR();
|
|
30883
|
+
|
|
30884
|
+
var server = createCommonjsModule(function (module, exports) {
|
|
30885
|
+
Object.defineProperty(exports, "__esModule", {
|
|
30886
|
+
value: true
|
|
30887
|
+
});
|
|
30888
|
+
var _extends = Object.assign || function (target) {
|
|
30889
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
30890
|
+
var source = arguments[i];
|
|
30891
|
+
for (var key in source) {
|
|
30892
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
30893
|
+
target[key] = source[key];
|
|
31287
30894
|
}
|
|
31288
30895
|
}
|
|
31289
|
-
if (geoCalcValues.meta.mapBoxBounds && geoCalcValues.meta.mapBoxBounds.top_left && geoCalcValues.meta.mapBoxBounds.bottom_right) {
|
|
31290
|
-
value = {
|
|
31291
|
-
// Note: format will be reverse of what we're using now
|
|
31292
|
-
geoBoundingBox: {
|
|
31293
|
-
topLeft: geoCalcValues.meta.mapBoxBounds.top_left[1] + ", " + geoCalcValues.meta.mapBoxBounds.top_left[0],
|
|
31294
|
-
bottomRight: geoCalcValues.meta.mapBoxBounds.bottom_right[1] + ", " + geoCalcValues.meta.mapBoxBounds.bottom_right[0]
|
|
31295
|
-
}
|
|
31296
|
-
};
|
|
31297
|
-
}
|
|
31298
30896
|
}
|
|
30897
|
+
return target;
|
|
30898
|
+
};
|
|
30899
|
+
var _valueReducer2 = _interopRequireDefault(valueReducer_1);
|
|
30900
|
+
function _interopRequireDefault(obj) {
|
|
30901
|
+
return obj && obj.__esModule ? obj : {
|
|
30902
|
+
"default": obj
|
|
30903
|
+
};
|
|
31299
30904
|
}
|
|
31300
|
-
|
|
31301
|
-
|
|
31302
|
-
|
|
31303
|
-
|
|
31304
|
-
} else {
|
|
31305
|
-
type = 'range';
|
|
31306
|
-
if (queryFormat === 'lte') {
|
|
31307
|
-
value = {
|
|
31308
|
-
end: value,
|
|
31309
|
-
boost: 2.0
|
|
31310
|
-
};
|
|
31311
|
-
} else {
|
|
31312
|
-
value = {
|
|
31313
|
-
start: value,
|
|
31314
|
-
boost: 2.0
|
|
31315
|
-
};
|
|
31316
|
-
}
|
|
31317
|
-
}
|
|
31318
|
-
// Remove query format
|
|
31319
|
-
queryFormat = 'or';
|
|
31320
|
-
}
|
|
31321
|
-
// Fake dataField for ReactiveComponent
|
|
31322
|
-
// TODO: Remove it after some time. The `dataField` is no longer required
|
|
31323
|
-
if (componentProps.componentType === componentTypes.reactiveComponent) {
|
|
31324
|
-
// Set the type to `term`
|
|
31325
|
-
type = 'term';
|
|
31326
|
-
dataField = 'reactive_component_field';
|
|
31327
|
-
// Don't set value property for ReactiveComponent
|
|
31328
|
-
// since it is driven by `defaultQuery` and `customQuery`
|
|
31329
|
-
value = undefined;
|
|
31330
|
-
}
|
|
31331
|
-
// Assign default value as an empty string for search components so search relevancy can work
|
|
31332
|
-
if (isSearchComponent(componentProps.componentType) && !value) {
|
|
31333
|
-
value = '';
|
|
31334
|
-
}
|
|
31335
|
-
|
|
31336
|
-
// Handle components which uses label instead of value as the selected value
|
|
31337
|
-
if (isComponentUsesLabelAsValue(componentProps.componentType)) {
|
|
31338
|
-
var data = componentProps.data,
|
|
31339
|
-
selectAllLabel = componentProps.selectAllLabel;
|
|
31340
|
-
var absValue = [];
|
|
31341
|
-
if (value && Array.isArray(value)) {
|
|
31342
|
-
absValue = value;
|
|
31343
|
-
} else if (value && typeof value === 'string') {
|
|
31344
|
-
absValue = [value];
|
|
31345
|
-
}
|
|
31346
|
-
var normalizedValue = [];
|
|
31347
|
-
if (absValue.length) {
|
|
31348
|
-
if (data && Array.isArray(data)) {
|
|
31349
|
-
absValue.forEach(function (val) {
|
|
31350
|
-
var dataItem = data.find(function (o) {
|
|
31351
|
-
return o.label === val;
|
|
31352
|
-
});
|
|
31353
|
-
if (dataItem && dataItem.value) {
|
|
31354
|
-
normalizedValue.push(dataItem.value);
|
|
31355
|
-
}
|
|
31356
|
-
});
|
|
30905
|
+
function _toConsumableArray(arr) {
|
|
30906
|
+
if (Array.isArray(arr)) {
|
|
30907
|
+
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) {
|
|
30908
|
+
arr2[i] = arr[i];
|
|
31357
30909
|
}
|
|
31358
|
-
|
|
31359
|
-
if (selectAllLabel && absValue.length && absValue.includes(selectAllLabel)) {
|
|
31360
|
-
normalizedValue = absValue;
|
|
31361
|
-
}
|
|
31362
|
-
if (normalizedValue.length) {
|
|
31363
|
-
value = normalizedValue;
|
|
30910
|
+
return arr2;
|
|
31364
30911
|
} else {
|
|
31365
|
-
|
|
30912
|
+
return Array.from(arr);
|
|
31366
30913
|
}
|
|
31367
30914
|
}
|
|
31368
|
-
|
|
31369
|
-
|
|
31370
|
-
|
|
31371
|
-
|
|
31372
|
-
|
|
31373
|
-
|
|
31374
|
-
value = undefined;
|
|
31375
|
-
}
|
|
31376
|
-
var queryValue = value || undefined;
|
|
31377
|
-
if (componentProps.componentType === componentTypes.searchBox) {
|
|
31378
|
-
if (Array.isArray(queryValue)) {
|
|
31379
|
-
queryValue = undefined;
|
|
31380
|
-
}
|
|
31381
|
-
}
|
|
31382
|
-
var endpoint;
|
|
31383
|
-
if (componentProps.endpoint instanceof Object) {
|
|
31384
|
-
endpoint = _extends({}, endpoint || {}, componentProps.endpoint);
|
|
31385
|
-
}
|
|
31386
|
-
return _extends({}, componentProps, {
|
|
31387
|
-
endpoint: endpoint,
|
|
31388
|
-
calendarInterval: calendarInterval,
|
|
31389
|
-
dataField: dataField,
|
|
31390
|
-
queryFormat: queryFormat,
|
|
31391
|
-
type: type,
|
|
31392
|
-
aggregations: aggregations,
|
|
31393
|
-
interval: interval,
|
|
31394
|
-
react: store.dependencyTree ? store.dependencyTree[component] : undefined,
|
|
31395
|
-
customQuery: store.customQueries ? store.customQueries[component] : undefined,
|
|
31396
|
-
defaultQuery: store.defaultQueries ? store.defaultQueries[component] : undefined,
|
|
31397
|
-
customHighlight: store.customHighlightOptions ? store.customHighlightOptions[component] : undefined,
|
|
31398
|
-
categoryValue: store.internalValues[component] ? store.internalValues[component].category : undefined,
|
|
31399
|
-
value: queryValue,
|
|
31400
|
-
pagination: pagination,
|
|
31401
|
-
from: from,
|
|
31402
|
-
range: range
|
|
31403
|
-
}, customOptions);
|
|
31404
|
-
};
|
|
31405
|
-
function flatReactProp(reactProp, componentID) {
|
|
31406
|
-
var flattenReact = [];
|
|
31407
|
-
var flatReact = function flatReact(react) {
|
|
31408
|
-
if (react && Object.keys(react)) {
|
|
31409
|
-
Object.keys(react).forEach(function (r) {
|
|
31410
|
-
if (react[r]) {
|
|
31411
|
-
if (typeof react[r] === 'string') {
|
|
31412
|
-
flattenReact = [].concat(flattenReact, [react[r]]);
|
|
31413
|
-
} else if (Array.isArray(react[r])) {
|
|
31414
|
-
flattenReact = [].concat(flattenReact, react[r]);
|
|
31415
|
-
} else if (typeof react[r] === 'object') {
|
|
31416
|
-
flatReact(react[r]);
|
|
31417
|
-
}
|
|
31418
|
-
}
|
|
31419
|
-
});
|
|
31420
|
-
}
|
|
31421
|
-
};
|
|
31422
|
-
flatReact(reactProp);
|
|
31423
|
-
// Remove cyclic dependencies
|
|
31424
|
-
flattenReact = flattenReact.filter(function (react) {
|
|
31425
|
-
return react !== componentID;
|
|
31426
|
-
});
|
|
31427
|
-
return flattenReact;
|
|
31428
|
-
}
|
|
31429
|
-
var getDependentQueries = function getDependentQueries(store, componentID, orderOfQueries) {
|
|
31430
|
-
if (orderOfQueries === void 0) {
|
|
31431
|
-
orderOfQueries = [];
|
|
31432
|
-
}
|
|
31433
|
-
var finalQuery = {};
|
|
31434
|
-
var react = flatReactProp(store.dependencyTree[componentID], componentID);
|
|
31435
|
-
react.forEach(function (componentObject) {
|
|
31436
|
-
var component = componentObject;
|
|
31437
|
-
var customQuery = store.customQueries[component];
|
|
31438
|
-
if (!isInternalComponent(component)) {
|
|
31439
|
-
var calcValues = store.selectedValues[component] || store.internalValues[component];
|
|
31440
|
-
// Only include queries for that component that has `customQuery` or `value` defined
|
|
31441
|
-
if ((calcValues && calcValues.value || customQuery) && !finalQuery[component]) {
|
|
31442
|
-
var execute = false;
|
|
31443
|
-
if (Array.isArray(orderOfQueries) && orderOfQueries.includes(component)) {
|
|
31444
|
-
execute = true;
|
|
31445
|
-
}
|
|
31446
|
-
var componentProps = store.props[component];
|
|
31447
|
-
// build query
|
|
31448
|
-
var dependentQuery = getRSQuery(component, extractPropsFromState(store, component, _extends({}, componentProps && _extends({}, componentProps.componentType === componentTypes.searchBox ? _extends({}, execute === false ? {
|
|
31449
|
-
type: queryTypes.search
|
|
31450
|
-
} : {}, calcValues.category ? {
|
|
31451
|
-
categoryValue: calcValues.category
|
|
31452
|
-
} : {
|
|
31453
|
-
categoryValue: undefined
|
|
31454
|
-
}, calcValues.value ? {
|
|
31455
|
-
value: calcValues.value
|
|
31456
|
-
} : {}) : {}, componentProps.componentType === componentTypes.categorySearch ? _extends({}, calcValues.category ? {
|
|
31457
|
-
categoryValue: calcValues.category
|
|
31458
|
-
} : {
|
|
31459
|
-
categoryValue: undefined
|
|
31460
|
-
}) : {}))), execute);
|
|
31461
|
-
if (dependentQuery) {
|
|
31462
|
-
finalQuery[component] = dependentQuery;
|
|
31463
|
-
}
|
|
31464
|
-
}
|
|
30915
|
+
function _objectWithoutProperties(obj, keys) {
|
|
30916
|
+
var target = {};
|
|
30917
|
+
for (var i in obj) {
|
|
30918
|
+
if (keys.indexOf(i) >= 0) continue;
|
|
30919
|
+
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
|
|
30920
|
+
target[i] = obj[i];
|
|
31465
30921
|
}
|
|
31466
|
-
|
|
31467
|
-
return finalQuery;
|
|
31468
|
-
};
|
|
31469
|
-
|
|
31470
|
-
var handleTransformResponse = function handleTransformResponse(res, config, component) {
|
|
31471
|
-
if (res === void 0) {
|
|
31472
|
-
res = null;
|
|
31473
|
-
}
|
|
31474
|
-
if (config === void 0) {
|
|
31475
|
-
config = {};
|
|
31476
|
-
}
|
|
31477
|
-
if (component === void 0) {
|
|
31478
|
-
component = '';
|
|
31479
|
-
}
|
|
31480
|
-
if (config.transformResponse && typeof config.transformResponse === 'function') {
|
|
31481
|
-
return config.transformResponse(res, component);
|
|
30922
|
+
return target;
|
|
31482
30923
|
}
|
|
31483
|
-
|
|
31484
|
-
|
|
31485
|
-
|
|
31486
|
-
|
|
31487
|
-
|
|
31488
|
-
|
|
31489
|
-
|
|
31490
|
-
|
|
31491
|
-
|
|
31492
|
-
|
|
31493
|
-
|
|
31494
|
-
|
|
31495
|
-
if (state === void 0) {
|
|
31496
|
-
state = {};
|
|
30924
|
+
function _defineProperty(obj, key, value) {
|
|
30925
|
+
if (key in obj) {
|
|
30926
|
+
Object.defineProperty(obj, key, {
|
|
30927
|
+
value: value,
|
|
30928
|
+
enumerable: true,
|
|
30929
|
+
configurable: true,
|
|
30930
|
+
writable: true
|
|
30931
|
+
});
|
|
30932
|
+
} else {
|
|
30933
|
+
obj[key] = value;
|
|
30934
|
+
}
|
|
30935
|
+
return obj;
|
|
31497
30936
|
}
|
|
31498
|
-
|
|
31499
|
-
|
|
31500
|
-
{
|
|
31501
|
-
var
|
|
31502
|
-
|
|
31503
|
-
|
|
31504
|
-
|
|
31505
|
-
|
|
31506
|
-
|
|
30937
|
+
function getValue(state, id, defaultValue) {
|
|
30938
|
+
if (state && state[id]) {
|
|
30939
|
+
try {
|
|
30940
|
+
var parsedValue = JSON.parse(state[id]);
|
|
30941
|
+
return _extends({}, typeof parsedValue === 'object' && parsedValue.value ? _extends({
|
|
30942
|
+
value: parsedValue.value
|
|
30943
|
+
}, parsedValue.category ? {
|
|
30944
|
+
category: parsedValue.category
|
|
30945
|
+
} : {}) : {
|
|
30946
|
+
value: parsedValue
|
|
30947
|
+
}, {
|
|
30948
|
+
reference: 'URL'
|
|
31507
30949
|
});
|
|
31508
|
-
|
|
31509
|
-
|
|
31510
|
-
|
|
31511
|
-
|
|
31512
|
-
|
|
31513
|
-
componentType: action.componentType,
|
|
31514
|
-
category: action.category,
|
|
31515
|
-
meta: action.meta,
|
|
31516
|
-
reference: action.reference
|
|
31517
|
-
}, _extends2));
|
|
31518
|
-
}
|
|
31519
|
-
case SET_VALUES:
|
|
31520
|
-
{
|
|
31521
|
-
var componentKeys = action.componentsValues ? Object.keys(action.componentsValues) : [];
|
|
31522
|
-
if (componentKeys.length) {
|
|
31523
|
-
var _newState = {};
|
|
31524
|
-
componentKeys.forEach(function (component) {
|
|
31525
|
-
var _action$componentsVal = action.componentsValues[component],
|
|
31526
|
-
value = _action$componentsVal.value,
|
|
31527
|
-
rest = _objectWithoutPropertiesLoose(_action$componentsVal, _excluded$a);
|
|
31528
|
-
_newState[component] = _extends({}, state[component], {
|
|
31529
|
-
value: value
|
|
31530
|
-
}, rest);
|
|
31531
|
-
});
|
|
31532
|
-
return _extends({}, state, _newState);
|
|
31533
|
-
}
|
|
31534
|
-
return state;
|
|
31535
|
-
}
|
|
31536
|
-
case PATCH_VALUE:
|
|
31537
|
-
return _extends({}, state, (_extends3 = {}, _extends3[action.component] = _extends({}, state[action.component], action.payload), _extends3));
|
|
31538
|
-
case CLEAR_VALUES:
|
|
31539
|
-
{
|
|
31540
|
-
var nextState = {};
|
|
31541
|
-
if (action.resetValues) {
|
|
31542
|
-
Object.keys(action.resetValues).forEach(function (componentId) {
|
|
31543
|
-
nextState[componentId] = _extends({}, state[componentId], {
|
|
31544
|
-
value: action.resetValues[componentId]
|
|
31545
|
-
});
|
|
31546
|
-
});
|
|
31547
|
-
}
|
|
31548
|
-
// clearAllBlacklistComponents has more priority over reset values
|
|
31549
|
-
if (Array.isArray(action.clearAllBlacklistComponents)) {
|
|
31550
|
-
Object.keys(state).forEach(function (componentId) {
|
|
31551
|
-
if (action.clearAllBlacklistComponents.includes(componentId)) {
|
|
31552
|
-
nextState[componentId] = state[componentId];
|
|
31553
|
-
}
|
|
31554
|
-
});
|
|
31555
|
-
}
|
|
31556
|
-
return nextState;
|
|
30950
|
+
} catch (error) {
|
|
30951
|
+
return {
|
|
30952
|
+
value: state[id],
|
|
30953
|
+
reference: 'URL'
|
|
30954
|
+
};
|
|
31557
30955
|
}
|
|
31558
|
-
case REMOVE_COMPONENT:
|
|
31559
|
-
{
|
|
31560
|
-
var _state2 = state,
|
|
31561
|
-
_action$component2 = action.component,
|
|
31562
|
-
del = _state2[_action$component2],
|
|
31563
|
-
obj = _objectWithoutPropertiesLoose(_state2, [_action$component2].map(_toPropertyKey$1));
|
|
31564
|
-
return obj;
|
|
31565
|
-
}
|
|
31566
|
-
case RESET_TO_DEFAULT:
|
|
31567
|
-
return _extends({}, state, action.defaultValues);
|
|
31568
|
-
default:
|
|
31569
|
-
return state;
|
|
31570
|
-
}
|
|
31571
|
-
}
|
|
31572
|
-
|
|
31573
|
-
var _excluded$b = ["value"];
|
|
31574
|
-
function getValue(state, id, defaultValue) {
|
|
31575
|
-
if (state && state[id]) {
|
|
31576
|
-
try {
|
|
31577
|
-
// parsing for next.js - since it uses extra set of quotes to wrap params
|
|
31578
|
-
var parsedValue = JSON.parse(state[id]);
|
|
31579
|
-
return _extends({}, typeof parsedValue === 'object' && parsedValue.value ? _extends({
|
|
31580
|
-
value: parsedValue.value
|
|
31581
|
-
}, parsedValue.category ? {
|
|
31582
|
-
category: parsedValue.category
|
|
31583
|
-
} : {}) : {
|
|
31584
|
-
value: parsedValue
|
|
31585
|
-
}, {
|
|
31586
|
-
reference: 'URL'
|
|
31587
|
-
});
|
|
31588
|
-
} catch (error) {
|
|
31589
|
-
// using react-dom-server for ssr
|
|
31590
|
-
return {
|
|
31591
|
-
value: state[id],
|
|
31592
|
-
reference: 'URL'
|
|
31593
|
-
};
|
|
31594
30956
|
}
|
|
30957
|
+
return {
|
|
30958
|
+
value: defaultValue,
|
|
30959
|
+
reference: 'DEFAULT'
|
|
30960
|
+
};
|
|
31595
30961
|
}
|
|
31596
|
-
|
|
31597
|
-
|
|
31598
|
-
|
|
31599
|
-
|
|
31600
|
-
|
|
31601
|
-
|
|
31602
|
-
|
|
31603
|
-
|
|
31604
|
-
|
|
31605
|
-
|
|
31606
|
-
|
|
31607
|
-
|
|
31608
|
-
|
|
31609
|
-
|
|
31610
|
-
|
|
31611
|
-
|
|
31612
|
-
|
|
31613
|
-
|
|
31614
|
-
|
|
31615
|
-
|
|
31616
|
-
|
|
31617
|
-
|
|
31618
|
-
|
|
31619
|
-
|
|
31620
|
-
var first;
|
|
31621
|
-
var second;
|
|
31622
|
-
for (var i = 0; i < sLength; i += 1) {
|
|
31623
|
-
bit = s[i].split('=');
|
|
31624
|
-
first = decodeURIComponent(bit[0]);
|
|
31625
|
-
// eslint-disable-next-line no-continue
|
|
31626
|
-
if (first.length === 0) continue;
|
|
31627
|
-
second = decodeURIComponent(bit[1]);
|
|
31628
|
-
if (typeof query[first] === 'undefined') query[first] = second;else if (query[first] instanceof Array) query[first].push(second);else query[first] = [query[first], second];
|
|
31629
|
-
}
|
|
31630
|
-
return query;
|
|
31631
|
-
}
|
|
31632
|
-
var getServerResults = function getServerResults() {
|
|
31633
|
-
var storeReference = null;
|
|
31634
|
-
return function (App, queryString, ssrRenderFunc) {
|
|
31635
|
-
if (queryString === void 0) {
|
|
31636
|
-
queryString = '';
|
|
30962
|
+
function parseQuery(str) {
|
|
30963
|
+
if (str instanceof Object) {
|
|
30964
|
+
return str;
|
|
30965
|
+
}
|
|
30966
|
+
if (typeof str !== 'string' || str.length === 0) return {};
|
|
30967
|
+
var s = void 0;
|
|
30968
|
+
if (str.split('/?')[1]) {
|
|
30969
|
+
s = str.split('/?')[1].split('&');
|
|
30970
|
+
}
|
|
30971
|
+
if (str.split('?')[1]) {
|
|
30972
|
+
s = str.split('?')[1].split('&');
|
|
30973
|
+
}
|
|
30974
|
+
if (!s) return {};
|
|
30975
|
+
var sLength = s.length;
|
|
30976
|
+
var bit = void 0;
|
|
30977
|
+
var query = {};
|
|
30978
|
+
var first = void 0;
|
|
30979
|
+
var second = void 0;
|
|
30980
|
+
for (var i = 0; i < sLength; i += 1) {
|
|
30981
|
+
bit = s[i].split('=');
|
|
30982
|
+
first = decodeURIComponent(bit[0]);
|
|
30983
|
+
if (first.length === 0) continue;
|
|
30984
|
+
second = decodeURIComponent(bit[1]);
|
|
30985
|
+
if (typeof query[first] === 'undefined') query[first] = second;else if (query[first] instanceof Array) query[first].push(second);else query[first] = [query[first], second];
|
|
31637
30986
|
}
|
|
31638
|
-
|
|
31639
|
-
|
|
31640
|
-
|
|
31641
|
-
|
|
31642
|
-
|
|
31643
|
-
|
|
31644
|
-
|
|
31645
|
-
|
|
31646
|
-
|
|
31647
|
-
|
|
31648
|
-
|
|
31649
|
-
|
|
31650
|
-
|
|
31651
|
-
|
|
31652
|
-
|
|
31653
|
-
|
|
31654
|
-
|
|
31655
|
-
|
|
31656
|
-
|
|
31657
|
-
|
|
31658
|
-
|
|
31659
|
-
|
|
31660
|
-
|
|
31661
|
-
|
|
31662
|
-
|
|
31663
|
-
|
|
31664
|
-
|
|
31665
|
-
|
|
31666
|
-
|
|
31667
|
-
|
|
31668
|
-
|
|
30987
|
+
return query;
|
|
30988
|
+
}
|
|
30989
|
+
var getServerResults = function getServerResults() {
|
|
30990
|
+
var storeReference = null;
|
|
30991
|
+
return function (App) {
|
|
30992
|
+
var queryString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
30993
|
+
var ssrRenderFunc = arguments[2];
|
|
30994
|
+
try {
|
|
30995
|
+
var parsedQueryString = parseQuery(queryString);
|
|
30996
|
+
if (!storeReference) {
|
|
30997
|
+
var newSelectedValues = {};
|
|
30998
|
+
var contextCollector = function contextCollector(params) {
|
|
30999
|
+
if (params.ctx) {
|
|
31000
|
+
storeReference = params.ctx;
|
|
31001
|
+
Object.keys(parsedQueryString).forEach(function (componentId) {
|
|
31002
|
+
var _getValue = getValue(parsedQueryString, componentId, null),
|
|
31003
|
+
value = _getValue.value,
|
|
31004
|
+
reference = _getValue.reference;
|
|
31005
|
+
if (value) {
|
|
31006
|
+
newSelectedValues = (0, _valueReducer2["default"])(newSelectedValues, {
|
|
31007
|
+
type: 'PATCH_VALUE',
|
|
31008
|
+
component: componentId,
|
|
31009
|
+
payload: {
|
|
31010
|
+
value: value,
|
|
31011
|
+
reference: reference
|
|
31012
|
+
}
|
|
31013
|
+
});
|
|
31014
|
+
}
|
|
31015
|
+
});
|
|
31016
|
+
}
|
|
31017
|
+
return {
|
|
31018
|
+
selectedValues: newSelectedValues
|
|
31019
|
+
};
|
|
31669
31020
|
};
|
|
31670
|
-
|
|
31671
|
-
|
|
31672
|
-
|
|
31673
|
-
|
|
31674
|
-
|
|
31675
|
-
|
|
31676
|
-
|
|
31677
|
-
|
|
31678
|
-
|
|
31679
|
-
|
|
31680
|
-
|
|
31681
|
-
|
|
31682
|
-
|
|
31683
|
-
|
|
31684
|
-
|
|
31685
|
-
|
|
31686
|
-
|
|
31687
|
-
|
|
31688
|
-
|
|
31689
|
-
|
|
31690
|
-
|
|
31691
|
-
|
|
31692
|
-
|
|
31693
|
-
|
|
31694
|
-
|
|
31695
|
-
|
|
31696
|
-
|
|
31697
|
-
|
|
31698
|
-
|
|
31699
|
-
|
|
31700
|
-
|
|
31701
|
-
|
|
31702
|
-
|
|
31703
|
-
|
|
31704
|
-
|
|
31705
|
-
|
|
31706
|
-
|
|
31707
|
-
|
|
31708
|
-
|
|
31709
|
-
|
|
31710
|
-
|
|
31711
|
-
|
|
31712
|
-
|
|
31713
|
-
|
|
31714
|
-
}
|
|
31715
|
-
var query = getRSQuery(componentId, extractPropsFromState(state, componentId, queryOptions && queryOptions[componentId] ? {
|
|
31716
|
-
from: queryOptions[componentId].from
|
|
31717
|
-
} : null));
|
|
31718
|
-
|
|
31719
|
-
// check if query or options are valid - non-empty
|
|
31720
|
-
if (query && !!Object.keys(query).length) {
|
|
31721
|
-
var _extends2, _extends6;
|
|
31722
|
-
var currentQuery = query;
|
|
31723
|
-
var dependentQueries = getDependentQueries(state, componentId, orderOfQueries);
|
|
31724
|
-
var queryToLog = _extends({}, (_extends2 = {}, _extends2[componentId] = currentQuery, _extends2), Object.keys(dependentQueries).reduce(function (acc, q) {
|
|
31725
|
-
var _extends3;
|
|
31726
|
-
return _extends({}, acc, (_extends3 = {}, _extends3[q] = _extends({}, dependentQueries[q], {
|
|
31727
|
-
execute: false
|
|
31728
|
-
}, dependentQueries[q].type === queryTypes.suggestion ? {
|
|
31729
|
-
type: 'search'
|
|
31730
|
-
} : {}), _extends3));
|
|
31731
|
-
}, {}));
|
|
31732
|
-
if ([queryTypes.range, queryTypes.term].includes(componentToTypeMap[props[componentId].componentType])) {
|
|
31733
|
-
var _extends4;
|
|
31734
|
-
// Avoid logging `value` for term type of components
|
|
31735
|
-
// eslint-disable-next-line
|
|
31736
|
-
var value = currentQuery.value,
|
|
31737
|
-
rest = _objectWithoutPropertiesLoose(currentQuery, _excluded$b);
|
|
31738
|
-
queryToLog = _extends({}, (_extends4 = {}, _extends4[componentId] = rest, _extends4), Object.keys(dependentQueries).reduce(function (acc, q) {
|
|
31739
|
-
var _extends5;
|
|
31740
|
-
return _extends({}, acc, (_extends5 = {}, _extends5[q] = _extends({}, dependentQueries[q], {
|
|
31021
|
+
var output = ssrRenderFunc(App({
|
|
31022
|
+
contextCollector: contextCollector
|
|
31023
|
+
}));
|
|
31024
|
+
var promiseFunc = void 0;
|
|
31025
|
+
if (!output.then) {
|
|
31026
|
+
promiseFunc = Promise.resolve(promiseFunc);
|
|
31027
|
+
} else {
|
|
31028
|
+
promiseFunc = output;
|
|
31029
|
+
}
|
|
31030
|
+
return promiseFunc.then(function () {
|
|
31031
|
+
if (storeReference) {
|
|
31032
|
+
var extractedState = storeReference.getState();
|
|
31033
|
+
var components = extractedState.components,
|
|
31034
|
+
config = extractedState.config,
|
|
31035
|
+
appbaseRef = extractedState.appbaseRef,
|
|
31036
|
+
queryOptions = extractedState.queryOptions,
|
|
31037
|
+
internalValues = extractedState.internalValues,
|
|
31038
|
+
props = extractedState.props,
|
|
31039
|
+
queryList = extractedState.queryList,
|
|
31040
|
+
dependencyTree = extractedState.dependencyTree;
|
|
31041
|
+
var queryLog = extractedState.queryLog;
|
|
31042
|
+
var finalQuery = [];
|
|
31043
|
+
var appbaseQuery = {};
|
|
31044
|
+
var orderOfQueries = [];
|
|
31045
|
+
var hits = {};
|
|
31046
|
+
var aggregations = {};
|
|
31047
|
+
var state = _extends({}, extractedState);
|
|
31048
|
+
components.filter(function (t) {
|
|
31049
|
+
return !t.endsWith('__internal');
|
|
31050
|
+
}).forEach(function (componentId) {
|
|
31051
|
+
var _buildQuery = (0, helper.buildQuery)(componentId, dependencyTree, queryList, queryOptions),
|
|
31052
|
+
queryObj = _buildQuery.queryObj,
|
|
31053
|
+
options = _buildQuery.options;
|
|
31054
|
+
if (!queryObj && !options) {
|
|
31055
|
+
return;
|
|
31056
|
+
}
|
|
31057
|
+
var query = (0, transform.getRSQuery)(componentId, (0, transform.extractPropsFromState)(state, componentId, queryOptions && queryOptions[componentId] ? {
|
|
31058
|
+
from: queryOptions[componentId].from
|
|
31059
|
+
} : null));
|
|
31060
|
+
if (query && !!Object.keys(query).length) {
|
|
31061
|
+
var currentQuery = query;
|
|
31062
|
+
var dependentQueries = (0, transform.getDependentQueries)(state, componentId, orderOfQueries);
|
|
31063
|
+
var queryToLog = _extends(_defineProperty({}, componentId, currentQuery), Object.keys(dependentQueries).reduce(function (acc, q) {
|
|
31064
|
+
return _extends({}, acc, _defineProperty({}, q, _extends({}, dependentQueries[q], {
|
|
31741
31065
|
execute: false
|
|
31742
|
-
}, dependentQueries[q].type === queryTypes.suggestion ? {
|
|
31066
|
+
}, dependentQueries[q].type === constants$1.queryTypes.suggestion ? {
|
|
31743
31067
|
type: 'search'
|
|
31744
|
-
} : {})
|
|
31068
|
+
} : {})));
|
|
31745
31069
|
}, {}));
|
|
31070
|
+
if ([constants$1.queryTypes.range, constants$1.queryTypes.term].includes(transform.componentToTypeMap[props[componentId].componentType])) {
|
|
31071
|
+
var value = currentQuery.value,
|
|
31072
|
+
rest = _objectWithoutProperties(currentQuery, ['value']);
|
|
31073
|
+
queryToLog = _extends(_defineProperty({}, componentId, rest), Object.keys(dependentQueries).reduce(function (acc, q) {
|
|
31074
|
+
return _extends({}, acc, _defineProperty({}, q, _extends({}, dependentQueries[q], {
|
|
31075
|
+
execute: false
|
|
31076
|
+
}, dependentQueries[q].type === constants$1.queryTypes.suggestion ? {
|
|
31077
|
+
type: 'search'
|
|
31078
|
+
} : {})));
|
|
31079
|
+
}, {}));
|
|
31080
|
+
}
|
|
31081
|
+
orderOfQueries = [].concat(_toConsumableArray(orderOfQueries), [componentId]);
|
|
31082
|
+
queryLog = _extends({}, queryLog, _defineProperty({}, componentId, queryToLog));
|
|
31083
|
+
if (query) {
|
|
31084
|
+
var dependentQueriesToAppend = (0, transform.getDependentQueries)(state, componentId, orderOfQueries);
|
|
31085
|
+
appbaseQuery = _extends({}, appbaseQuery, _defineProperty({}, componentId, query));
|
|
31086
|
+
Object.keys(dependentQueriesToAppend).forEach(function (cId) {
|
|
31087
|
+
if (appbaseQuery[cId]) {
|
|
31088
|
+
appbaseQuery[cId + Math.random()] = dependentQueriesToAppend[cId];
|
|
31089
|
+
} else {
|
|
31090
|
+
appbaseQuery[cId] = dependentQueriesToAppend[cId];
|
|
31091
|
+
}
|
|
31092
|
+
});
|
|
31093
|
+
}
|
|
31746
31094
|
}
|
|
31747
|
-
|
|
31748
|
-
|
|
31749
|
-
|
|
31750
|
-
|
|
31751
|
-
|
|
31752
|
-
|
|
31753
|
-
|
|
31754
|
-
|
|
31755
|
-
|
|
31756
|
-
|
|
31757
|
-
|
|
31758
|
-
|
|
31759
|
-
|
|
31760
|
-
|
|
31761
|
-
appbaseQuery[cId] = dependentQueriesToAppend[cId];
|
|
31762
|
-
}
|
|
31763
|
-
});
|
|
31764
|
-
}
|
|
31765
|
-
}
|
|
31766
|
-
});
|
|
31767
|
-
var handleRSResponse = function handleRSResponse(res) {
|
|
31768
|
-
var promotedResults = {};
|
|
31769
|
-
var rawData = {};
|
|
31770
|
-
var customData = {};
|
|
31771
|
-
var allPromises = orderOfQueries.map(function (component) {
|
|
31772
|
-
return new Promise(function (responseResolve, responseReject) {
|
|
31773
|
-
handleTransformResponse(res[component], config, component).then(function (response) {
|
|
31774
|
-
if (response) {
|
|
31775
|
-
var _extends9;
|
|
31776
|
-
if (response.promoted) {
|
|
31777
|
-
promotedResults[component] = response.promoted.map(function (promoted) {
|
|
31778
|
-
return _extends({}, promoted.doc, {
|
|
31779
|
-
_position: promoted.position
|
|
31095
|
+
});
|
|
31096
|
+
var handleRSResponse = function handleRSResponse(res) {
|
|
31097
|
+
var promotedResults = {};
|
|
31098
|
+
var rawData = {};
|
|
31099
|
+
var customData = {};
|
|
31100
|
+
var allPromises = orderOfQueries.map(function (component) {
|
|
31101
|
+
return new Promise(function (responseResolve, responseReject) {
|
|
31102
|
+
(0, utils.handleTransformResponse)(res[component], config, component).then(function (response) {
|
|
31103
|
+
if (response) {
|
|
31104
|
+
if (response.promoted) {
|
|
31105
|
+
promotedResults[component] = response.promoted.map(function (promoted) {
|
|
31106
|
+
return _extends({}, promoted.doc, {
|
|
31107
|
+
_position: promoted.position
|
|
31108
|
+
});
|
|
31780
31109
|
});
|
|
31781
|
-
}
|
|
31782
|
-
|
|
31783
|
-
|
|
31784
|
-
|
|
31785
|
-
|
|
31786
|
-
|
|
31787
|
-
|
|
31788
|
-
|
|
31789
|
-
var
|
|
31790
|
-
|
|
31110
|
+
}
|
|
31111
|
+
rawData[component] = response;
|
|
31112
|
+
if (response.customData) {
|
|
31113
|
+
customData[component] = response.customData;
|
|
31114
|
+
}
|
|
31115
|
+
if (response.aggregations) {
|
|
31116
|
+
aggregations = _extends({}, aggregations, _defineProperty({}, component, response.aggregations));
|
|
31117
|
+
}
|
|
31118
|
+
var hitsObj = response.hits || {};
|
|
31119
|
+
hits = _extends({}, hits, _defineProperty({}, component, {
|
|
31120
|
+
hits: hitsObj.hits,
|
|
31121
|
+
total: typeof hitsObj.total === 'object' ? hitsObj.total.value : hitsObj.total,
|
|
31122
|
+
time: response.took
|
|
31123
|
+
}));
|
|
31124
|
+
responseResolve();
|
|
31791
31125
|
}
|
|
31792
|
-
|
|
31793
|
-
|
|
31794
|
-
|
|
31795
|
-
total: typeof hitsObj.total === 'object' ? hitsObj.total.value : hitsObj.total,
|
|
31796
|
-
time: response.took
|
|
31797
|
-
}, _extends9));
|
|
31798
|
-
responseResolve();
|
|
31799
|
-
}
|
|
31800
|
-
})["catch"](function (err) {
|
|
31801
|
-
responseReject(err);
|
|
31126
|
+
})["catch"](function (err) {
|
|
31127
|
+
responseReject(err);
|
|
31128
|
+
});
|
|
31802
31129
|
});
|
|
31803
31130
|
});
|
|
31804
|
-
|
|
31805
|
-
|
|
31806
|
-
|
|
31807
|
-
|
|
31808
|
-
|
|
31809
|
-
|
|
31810
|
-
|
|
31811
|
-
|
|
31812
|
-
|
|
31813
|
-
|
|
31814
|
-
|
|
31815
|
-
|
|
31816
|
-
|
|
31817
|
-
|
|
31818
|
-
|
|
31819
|
-
|
|
31820
|
-
}
|
|
31821
|
-
|
|
31822
|
-
|
|
31823
|
-
|
|
31824
|
-
|
|
31825
|
-
|
|
31826
|
-
|
|
31827
|
-
|
|
31828
|
-
|
|
31829
|
-
|
|
31830
|
-
rsAPISettings.
|
|
31131
|
+
return Promise.all(allPromises).then(function () {
|
|
31132
|
+
state = {
|
|
31133
|
+
queryList: queryList,
|
|
31134
|
+
queryOptions: queryOptions,
|
|
31135
|
+
selectedValues: newSelectedValues,
|
|
31136
|
+
internalValues: internalValues,
|
|
31137
|
+
queryLog: queryLog,
|
|
31138
|
+
hits: hits,
|
|
31139
|
+
aggregations: aggregations,
|
|
31140
|
+
promotedResults: promotedResults,
|
|
31141
|
+
customData: customData,
|
|
31142
|
+
rawData: rawData,
|
|
31143
|
+
dependencyTree: dependencyTree
|
|
31144
|
+
};
|
|
31145
|
+
return Promise.resolve(JSON.parse(JSON.stringify(state)));
|
|
31146
|
+
});
|
|
31147
|
+
};
|
|
31148
|
+
if (Object.keys(appbaseQuery).length) {
|
|
31149
|
+
finalQuery = Object.values(appbaseQuery);
|
|
31150
|
+
var rsAPISettings = {};
|
|
31151
|
+
if (config.analyticsConfig) {
|
|
31152
|
+
rsAPISettings.recordAnalytics = (0, utils.isPropertyDefined)(config.analyticsConfig.recordAnalytics) ? config.analyticsConfig.recordAnalytics : undefined;
|
|
31153
|
+
rsAPISettings.userId = (0, utils.isPropertyDefined)(config.analyticsConfig.userId) ? config.analyticsConfig.userId : undefined;
|
|
31154
|
+
rsAPISettings.enableQueryRules = (0, utils.isPropertyDefined)(config.analyticsConfig.enableQueryRules) ? config.analyticsConfig.enableQueryRules : undefined;
|
|
31155
|
+
rsAPISettings.customEvents = (0, utils.isPropertyDefined)(config.analyticsConfig.customEvents) ? config.analyticsConfig.customEvents : undefined;
|
|
31156
|
+
}
|
|
31157
|
+
return appbaseRef.reactiveSearchv3(finalQuery, rsAPISettings).then(function (res) {
|
|
31158
|
+
return handleRSResponse(res);
|
|
31159
|
+
})["catch"](function (err) {
|
|
31160
|
+
return Promise.reject(err);
|
|
31161
|
+
});
|
|
31831
31162
|
}
|
|
31832
|
-
|
|
31833
|
-
|
|
31834
|
-
|
|
31835
|
-
return Promise.reject(err);
|
|
31836
|
-
});
|
|
31163
|
+
throw new Error('Could not compute server-side initial state of the app!');
|
|
31164
|
+
} else {
|
|
31165
|
+
return null;
|
|
31837
31166
|
}
|
|
31838
|
-
|
|
31839
|
-
|
|
31840
|
-
|
|
31841
|
-
|
|
31842
|
-
|
|
31167
|
+
});
|
|
31168
|
+
}
|
|
31169
|
+
return null;
|
|
31170
|
+
} catch (error) {
|
|
31171
|
+
return Promise.reject(error);
|
|
31843
31172
|
}
|
|
31844
|
-
|
|
31845
|
-
} catch (error) {
|
|
31846
|
-
return Promise.reject(error);
|
|
31847
|
-
}
|
|
31173
|
+
};
|
|
31848
31174
|
};
|
|
31849
|
-
|
|
31175
|
+
exports["default"] = getServerResults;
|
|
31176
|
+
});
|
|
31177
|
+
var getServerResults = unwrapExports(server);
|
|
31850
31178
|
|
|
31851
31179
|
function getServerState(App, queryString) {
|
|
31852
31180
|
var renderFunction = renderToString;
|
|
@@ -31855,7 +31183,7 @@
|
|
|
31855
31183
|
}, queryString, renderFunction);
|
|
31856
31184
|
}
|
|
31857
31185
|
|
|
31858
|
-
var version = "3.0.0-alpha.
|
|
31186
|
+
var version = "3.0.0-alpha.5";
|
|
31859
31187
|
|
|
31860
31188
|
var components = [RLConnected, ResultCard, ResultList, ReactiveBase, SBConnected, ListConnected, ListConnected$1, RangeConnected$1, RangeConnected$2, RangeConnected$3, RangeConnected, RcConnected, RcConnected$1, TBConnected, ListConnected$2, ListConnected$3, StateProviderConnected, RangeConnected$4];
|
|
31861
31189
|
function install$1 (Vue) {
|