@streamlayer/react 1.23.1 → 1.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/Question.js +1 -1
- package/lib/cjs/advertisement.js +28 -223
- package/lib/cjs/analytics.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/feature.js +1 -1
- package/lib/cjs/gamification-feature.js +1 -1
- package/lib/cjs/gamification-feature2.js +1 -1
- package/lib/cjs/hooks-WfHlJH12.js +1 -1
- package/lib/cjs/index-eShKGO10.js +1 -5
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -1
- package/lib/cjs/index11.js +3 -4
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +3 -1
- package/lib/cjs/index14.js +1 -1
- package/lib/cjs/index15.js +1 -1
- package/lib/cjs/index16.js +3 -5
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index3.js +1 -1
- package/lib/cjs/index4.js +3 -5
- package/lib/cjs/index5.js +1 -1
- package/lib/cjs/index6.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +1 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +1 -13
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/polymarket.js +5 -15
- package/lib/cjs/sl-types.js +1 -15
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/style.css +1 -0
- package/lib/cjs/theme.js +1 -17
- package/lib/cjs/useStreamLayerApp.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +3 -17
- package/lib/cjs/utils.js +1 -47
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +28 -223
- package/lib/classic/cjs/analytics.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +3 -5
- package/lib/classic/cjs/feature.js +1 -1
- package/lib/classic/cjs/gamification-feature.js +1 -1
- package/lib/classic/cjs/hooks-WfHlJH12.js +1 -1
- package/lib/classic/cjs/index-eShKGO10.js +1 -5
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -1
- package/lib/classic/cjs/index11.js +1 -1
- package/lib/classic/cjs/index12.js +1 -1
- package/lib/classic/cjs/index13.js +3 -4
- package/lib/classic/cjs/index2.js +3 -5
- package/lib/classic/cjs/index3.js +1 -1
- package/lib/classic/cjs/index4.js +1 -1
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index6.js +1 -1
- package/lib/classic/cjs/index7.js +1 -1
- package/lib/classic/cjs/index8.js +1 -1
- package/lib/classic/cjs/index9.js +3 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/polymarket.js +5 -15
- package/lib/classic/cjs/sl-types.js +1 -15
- package/lib/classic/cjs/style.css +1 -0
- package/lib/classic/cjs/useStreamLayerApp.js +1 -1
- package/lib/classic/cjs/useStreamLayerApp2.js +3 -17
- package/lib/classic/cjs/utils.js +1 -47
- package/lib/classic/es/Question.js +277 -264
- package/lib/classic/es/advertisement.js +34990 -18881
- package/lib/classic/es/analytics.js +58 -56
- package/lib/classic/es/auth.js +14 -8
- package/lib/classic/es/bet-pack.js +2448 -2419
- package/lib/classic/es/feature.js +93 -48
- package/lib/classic/es/gamification-feature.js +2 -2
- package/lib/classic/es/hooks-WfHlJH12.js +78 -78
- package/lib/classic/es/index-eShKGO10.js +948 -948
- package/lib/classic/es/index.js +13 -13
- package/lib/classic/es/index10.js +68 -67
- package/lib/classic/es/index11.js +2903 -2159
- package/lib/classic/es/index12.js +124 -119
- package/lib/classic/es/index13.js +581 -566
- package/lib/classic/es/index2.js +2098 -1763
- package/lib/classic/es/index3.js +11 -11
- package/lib/classic/es/index4.js +127 -127
- package/lib/classic/es/index5.js +3 -4
- package/lib/classic/es/index6.js +8 -3
- package/lib/classic/es/index7.js +6 -5
- package/lib/classic/es/index8.js +8 -7
- package/lib/classic/es/index9.js +225 -223
- package/lib/classic/es/insight.js +58 -53
- package/lib/classic/es/notification.js +3 -3
- package/lib/classic/es/notification2.js +764 -722
- package/lib/classic/es/pause-ad.js +190 -167
- package/lib/classic/es/points.js +55 -48
- package/lib/classic/es/polymarket.js +4209 -4031
- package/lib/classic/es/sl-types.js +193 -125
- package/lib/classic/es/useStreamLayerApp.js +2 -2
- package/lib/classic/es/useStreamLayerApp2.js +9714 -7603
- package/lib/classic/es/utils.js +28 -28
- package/lib/classic/index.d.ts +1 -0
- package/lib/classic/style.css +1 -0
- package/lib/dist/cjs/gamification-feature.js +1 -1
- package/lib/dist/cjs/index-eShKGO10.js +1 -5
- package/lib/dist/cjs/index.js +1 -1
- package/lib/dist/cjs/masters.js +3 -77
- package/lib/dist/es/gamification-feature.js +2 -2
- package/lib/dist/es/index-eShKGO10.js +948 -948
- package/lib/dist/es/index.js +7 -8
- package/lib/dist/es/masters.js +18197 -14750
- package/lib/dist/index.d.ts +12 -2
- package/lib/dist/style.css +1 -1
- package/lib/es/Question.js +108 -106
- package/lib/es/advertisement.js +34990 -18881
- package/lib/es/analytics.js +58 -56
- package/lib/es/auth.js +14 -8
- package/lib/es/bet-pack.js +29 -17
- package/lib/es/feature.js +93 -48
- package/lib/es/gamification-feature.js +2 -2
- package/lib/es/gamification-feature2.js +2 -2
- package/lib/es/hooks-WfHlJH12.js +78 -78
- package/lib/es/index-eShKGO10.js +948 -948
- package/lib/es/index.js +14 -13
- package/lib/es/index10.js +176 -166
- package/lib/es/index11.js +581 -566
- package/lib/es/index12.js +124 -119
- package/lib/es/index13.js +225 -223
- package/lib/es/index14.js +68 -67
- package/lib/es/index15.js +2903 -2159
- package/lib/es/index16.js +1005 -806
- package/lib/es/index2.js +1117 -984
- package/lib/es/index3.js +3 -4
- package/lib/es/index4.js +2424 -2407
- package/lib/es/index5.js +11 -11
- package/lib/es/index6.js +127 -127
- package/lib/es/index7.js +8 -3
- package/lib/es/index8.js +5 -5
- package/lib/es/index9.js +8 -7
- package/lib/es/insight.js +58 -53
- package/lib/es/masters.js +6 -5
- package/lib/es/masters2.js +696 -559
- package/lib/es/notification.js +696 -655
- package/lib/es/pause-ad.js +190 -167
- package/lib/es/points.js +56 -49
- package/lib/es/polymarket.js +4209 -4031
- package/lib/es/sl-types.js +200 -132
- package/lib/es/storage.js +75 -74
- package/lib/es/theme.js +177 -31
- package/lib/es/useStreamLayerApp.js +2 -2
- package/lib/es/useStreamLayerApp2.js +9714 -7603
- package/lib/es/utils.js +28 -28
- package/lib/index.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +23 -20
|
@@ -1,22 +1,38 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import React36__default from "react";
|
|
2
|
+
function listenKeys($store, keys, listener) {
|
|
3
|
+
let keysSet = new Set(keys).add(void 0);
|
|
4
|
+
return $store.listen((value, oldValue, changed) => {
|
|
5
|
+
if (keysSet.has(changed)) {
|
|
6
|
+
listener(value, oldValue, changed);
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
var cx = function cx2() {
|
|
11
|
+
const presentClassNames = Array.prototype.slice.call(arguments).filter(Boolean);
|
|
12
|
+
const atomicClasses = {};
|
|
13
|
+
const nonAtomicClasses = [];
|
|
14
|
+
presentClassNames.forEach((arg) => {
|
|
15
|
+
const individualClassNames = arg ? arg.split(" ") : [];
|
|
16
|
+
individualClassNames.forEach((className) => {
|
|
17
|
+
if (className.startsWith("atm_")) {
|
|
18
|
+
const [, keyHash] = className.split("_");
|
|
19
|
+
atomicClasses[keyHash] = className;
|
|
20
|
+
} else {
|
|
21
|
+
nonAtomicClasses.push(className);
|
|
22
|
+
}
|
|
12
23
|
});
|
|
13
24
|
});
|
|
14
|
-
const
|
|
15
|
-
for (const
|
|
16
|
-
Object.prototype.hasOwnProperty.call(
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
25
|
+
const result = [];
|
|
26
|
+
for (const keyHash in atomicClasses) {
|
|
27
|
+
if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
|
|
28
|
+
result.push(atomicClasses[keyHash]);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
result.push(...nonAtomicClasses);
|
|
32
|
+
return result.join(" ");
|
|
33
|
+
};
|
|
34
|
+
var cx_default = cx;
|
|
35
|
+
const R = {
|
|
20
36
|
BLUE_QUESTION_ACTION_BTN: "#1589ee",
|
|
21
37
|
WHITE: "#FFFFFF",
|
|
22
38
|
BLUE: "#2d6ffd",
|
|
@@ -86,7 +102,7 @@ const P = {
|
|
|
86
102
|
IN_APP_QUESTION_RESULT_LINE: "#babfc5",
|
|
87
103
|
QUOTE_BORDER: "#E8E8E8",
|
|
88
104
|
QUOTE_TEXT: "rgba(10, 14, 19, 0.70)"
|
|
89
|
-
},
|
|
105
|
+
}, F = {
|
|
90
106
|
BG_PRIMARY: "#13212b",
|
|
91
107
|
BG_SECONDARY: "#152430",
|
|
92
108
|
BG_SECONDARY1: "#435059",
|
|
@@ -96,7 +112,7 @@ const P = {
|
|
|
96
112
|
TEXT_SECONDARY: "rgba(255, 255, 255, 0.8)",
|
|
97
113
|
TEXT_SECONDARY1: "#878787",
|
|
98
114
|
WHITE: "#fff"
|
|
99
|
-
},
|
|
115
|
+
}, I = ["#107D57", "#DF2F3B", "#DF2F3B", "#E8E8E8"], O = "#cee5de", N = "#f9d6d8", S = "#E8E8E8", A = {
|
|
100
116
|
xs: 324,
|
|
101
117
|
sm: 576,
|
|
102
118
|
md: 768,
|
|
@@ -104,80 +120,108 @@ const P = {
|
|
|
104
120
|
xl: 1200,
|
|
105
121
|
xxl: 1440
|
|
106
122
|
};
|
|
107
|
-
Object.entries(
|
|
108
|
-
${
|
|
109
|
-
--color-${
|
|
123
|
+
Object.entries(R).reduce((E, [_, T]) => `
|
|
124
|
+
${E}
|
|
125
|
+
--color-${_.toLowerCase().replaceAll("_", "-")}: ${T};
|
|
110
126
|
`, "");
|
|
111
|
-
Object.entries(
|
|
112
|
-
${
|
|
113
|
-
--color-adv-${
|
|
127
|
+
Object.entries(F).reduce((E, [_, T]) => `
|
|
128
|
+
${E}
|
|
129
|
+
--color-adv-${_.toLowerCase().replaceAll("_", "-")}: ${T};
|
|
114
130
|
`, "");
|
|
115
|
-
function
|
|
116
|
-
var
|
|
117
|
-
return function(
|
|
118
|
-
|
|
131
|
+
function memoize(fn) {
|
|
132
|
+
var cache = /* @__PURE__ */ Object.create(null);
|
|
133
|
+
return function(arg) {
|
|
134
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
135
|
+
return cache[arg];
|
|
119
136
|
};
|
|
120
137
|
}
|
|
121
|
-
var
|
|
122
|
-
|
|
123
|
-
|
|
138
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
139
|
+
var isPropValid = /* @__PURE__ */ memoize(
|
|
140
|
+
function(prop) {
|
|
141
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
124
142
|
}
|
|
125
143
|
/* Z+1 */
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
144
|
+
);
|
|
145
|
+
var isCapital = (ch) => ch.toUpperCase() === ch;
|
|
146
|
+
var filterKey = (keys) => (key) => keys.indexOf(key) === -1;
|
|
147
|
+
var omit = (obj, keys) => {
|
|
148
|
+
const res = {};
|
|
149
|
+
Object.keys(obj).filter(filterKey(keys)).forEach((key) => {
|
|
150
|
+
res[key] = obj[key];
|
|
151
|
+
});
|
|
152
|
+
return res;
|
|
131
153
|
};
|
|
132
|
-
function
|
|
133
|
-
const
|
|
134
|
-
if (!
|
|
135
|
-
const
|
|
136
|
-
Object.keys(
|
|
137
|
-
|
|
154
|
+
function filterProps(asIs, props, omitKeys) {
|
|
155
|
+
const filteredProps = omit(props, omitKeys);
|
|
156
|
+
if (!asIs) {
|
|
157
|
+
const interopValidAttr = typeof isPropValid === "function" ? { default: isPropValid } : isPropValid;
|
|
158
|
+
Object.keys(filteredProps).forEach((key) => {
|
|
159
|
+
if (!interopValidAttr.default(key)) {
|
|
160
|
+
delete filteredProps[key];
|
|
161
|
+
}
|
|
138
162
|
});
|
|
139
163
|
}
|
|
140
|
-
return
|
|
164
|
+
return filteredProps;
|
|
141
165
|
}
|
|
142
|
-
var
|
|
166
|
+
var warnIfInvalid = (value, componentName) => {
|
|
143
167
|
};
|
|
144
|
-
function
|
|
145
|
-
let
|
|
146
|
-
return (
|
|
147
|
-
const
|
|
148
|
-
const { as:
|
|
168
|
+
function styled(tag) {
|
|
169
|
+
let mockedClass = "";
|
|
170
|
+
return (options) => {
|
|
171
|
+
const render = (props, ref) => {
|
|
172
|
+
const { as: component = tag, class: className = mockedClass } = props;
|
|
173
|
+
const shouldKeepProps = options.propsAsIs === void 0 ? !(typeof component === "string" && component.indexOf("-") === -1 && !isCapital(component[0])) : options.propsAsIs;
|
|
174
|
+
const filteredProps = filterProps(shouldKeepProps, props, [
|
|
149
175
|
"as",
|
|
150
176
|
"class"
|
|
151
177
|
]);
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
178
|
+
filteredProps.ref = ref;
|
|
179
|
+
filteredProps.className = options.atomic ? cx_default(options.class, filteredProps.className || className) : cx_default(filteredProps.className || className, options.class);
|
|
180
|
+
const { vars } = options;
|
|
181
|
+
if (vars) {
|
|
182
|
+
const style = {};
|
|
183
|
+
for (const name in vars) {
|
|
184
|
+
const variable = vars[name];
|
|
185
|
+
const result = variable[0];
|
|
186
|
+
const unit = variable[1] || "";
|
|
187
|
+
const value = typeof result === "function" ? result(props) : result;
|
|
188
|
+
warnIfInvalid(value, options.name);
|
|
189
|
+
style[`--${name}`] = `${value}${unit}`;
|
|
159
190
|
}
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
191
|
+
const ownStyle = filteredProps.style || {};
|
|
192
|
+
const keys = Object.keys(ownStyle);
|
|
193
|
+
if (keys.length > 0) {
|
|
194
|
+
keys.forEach((key) => {
|
|
195
|
+
style[key] = ownStyle[key];
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
filteredProps.style = style;
|
|
199
|
+
}
|
|
200
|
+
if (tag.__wyw_meta && tag !== component) {
|
|
201
|
+
filteredProps.as = component;
|
|
202
|
+
return React36__default.createElement(tag, filteredProps);
|
|
164
203
|
}
|
|
165
|
-
return
|
|
166
|
-
}
|
|
204
|
+
return React36__default.createElement(component, filteredProps);
|
|
205
|
+
};
|
|
206
|
+
const Result = React36__default.forwardRef ? React36__default.forwardRef(render) : (
|
|
167
207
|
// React.forwardRef won't available on older React versions and in Preact
|
|
168
208
|
// Fallback to a innerRef prop in that case
|
|
169
|
-
(
|
|
170
|
-
const
|
|
171
|
-
return
|
|
209
|
+
(props) => {
|
|
210
|
+
const rest = omit(props, ["innerRef"]);
|
|
211
|
+
return render(rest, props.innerRef);
|
|
172
212
|
}
|
|
173
213
|
);
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
214
|
+
Result.displayName = options.name;
|
|
215
|
+
Result.__wyw_meta = {
|
|
216
|
+
className: options.class || mockedClass,
|
|
217
|
+
extends: tag
|
|
218
|
+
};
|
|
219
|
+
return Result;
|
|
178
220
|
};
|
|
179
221
|
}
|
|
180
|
-
var
|
|
222
|
+
var styled_default = styled;
|
|
223
|
+
var shim$1 = { exports: {} };
|
|
224
|
+
var useSyncExternalStoreShim_production = {};
|
|
181
225
|
/**
|
|
182
226
|
* @license React
|
|
183
227
|
* use-sync-external-store-shim.production.js
|
|
@@ -187,72 +231,96 @@ var oe = Y, I = { exports: {} }, D = {};
|
|
|
187
231
|
* This source code is licensed under the MIT license found in the
|
|
188
232
|
* LICENSE file in the root directory of this source tree.
|
|
189
233
|
*/
|
|
190
|
-
var
|
|
191
|
-
function
|
|
192
|
-
return
|
|
234
|
+
var React = React36__default;
|
|
235
|
+
function is(x, y) {
|
|
236
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
193
237
|
}
|
|
194
|
-
var
|
|
195
|
-
function $(
|
|
196
|
-
var
|
|
197
|
-
|
|
238
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is, useState = React.useState, useEffect = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
|
|
239
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
240
|
+
var value = getSnapshot(), _useState = useState({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
241
|
+
useLayoutEffect(
|
|
198
242
|
function() {
|
|
199
|
-
|
|
243
|
+
inst.value = value;
|
|
244
|
+
inst.getSnapshot = getSnapshot;
|
|
245
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
200
246
|
},
|
|
201
|
-
[
|
|
202
|
-
)
|
|
247
|
+
[subscribe, value, getSnapshot]
|
|
248
|
+
);
|
|
249
|
+
useEffect(
|
|
203
250
|
function() {
|
|
204
|
-
|
|
205
|
-
|
|
251
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
252
|
+
return subscribe(function() {
|
|
253
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
206
254
|
});
|
|
207
255
|
},
|
|
208
|
-
[
|
|
209
|
-
)
|
|
256
|
+
[subscribe]
|
|
257
|
+
);
|
|
258
|
+
useDebugValue(value);
|
|
259
|
+
return value;
|
|
210
260
|
}
|
|
211
|
-
function
|
|
212
|
-
var
|
|
213
|
-
|
|
261
|
+
function checkIfSnapshotChanged(inst) {
|
|
262
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
263
|
+
inst = inst.value;
|
|
214
264
|
try {
|
|
215
|
-
var
|
|
216
|
-
return !
|
|
217
|
-
} catch {
|
|
218
|
-
return
|
|
265
|
+
var nextValue = latestGetSnapshot();
|
|
266
|
+
return !objectIs(inst, nextValue);
|
|
267
|
+
} catch (error) {
|
|
268
|
+
return true;
|
|
219
269
|
}
|
|
220
270
|
}
|
|
221
|
-
function
|
|
222
|
-
return
|
|
271
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
272
|
+
return getSnapshot();
|
|
223
273
|
}
|
|
224
|
-
var
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
const p = (e, t) => (r) => {
|
|
229
|
-
e.current !== r && (e.current = r, t());
|
|
230
|
-
};
|
|
231
|
-
function q(e, { keys: t, deps: r = [e, t] } = {}) {
|
|
232
|
-
const a = s.useRef();
|
|
233
|
-
a.current = e.get();
|
|
234
|
-
const i = s.useCallback((c) => (p(a, c)(e.value), (t == null ? void 0 : t.length) > 0 ? y(e, t, p(a, c)) : e.listen(p(a, c))), r), n = () => a.current;
|
|
235
|
-
return s.useSyncExternalStore ? s.useSyncExternalStore(i, n, n) : z.useSyncExternalStore(i, n, n);
|
|
274
|
+
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
275
|
+
useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
276
|
+
{
|
|
277
|
+
shim$1.exports = useSyncExternalStoreShim_production;
|
|
236
278
|
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
(
|
|
240
|
-
|
|
279
|
+
var shimExports = shim$1.exports;
|
|
280
|
+
const emit = (snapshotRef, onChange) => (value) => {
|
|
281
|
+
if (snapshotRef.current === value)
|
|
282
|
+
return;
|
|
283
|
+
snapshotRef.current = value;
|
|
284
|
+
onChange();
|
|
285
|
+
};
|
|
286
|
+
function useStore$1(store, { keys, deps = [store, keys] } = {}) {
|
|
287
|
+
const snapshotRef = React36__default.useRef();
|
|
288
|
+
snapshotRef.current = store.get();
|
|
289
|
+
const subscribe = React36__default.useCallback((onChange) => {
|
|
290
|
+
emit(snapshotRef, onChange)(store.value);
|
|
291
|
+
return (keys == null ? void 0 : keys.length) > 0 ? listenKeys(store, keys, emit(snapshotRef, onChange)) : store.listen(emit(snapshotRef, onChange));
|
|
292
|
+
}, deps);
|
|
293
|
+
const get = () => snapshotRef.current;
|
|
294
|
+
if (React36__default.useSyncExternalStore) {
|
|
295
|
+
return React36__default.useSyncExternalStore(subscribe, get, get);
|
|
241
296
|
}
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
297
|
+
return shimExports.useSyncExternalStore(subscribe, get, get);
|
|
298
|
+
}
|
|
299
|
+
const useStore = useStore$1;
|
|
300
|
+
const legacyUseTransition = () => {
|
|
301
|
+
return [
|
|
302
|
+
false,
|
|
303
|
+
(fn) => {
|
|
304
|
+
window.requestAnimationFrame(() => fn());
|
|
305
|
+
}
|
|
306
|
+
];
|
|
307
|
+
};
|
|
308
|
+
const useTransition = React36__default.useTransition || legacyUseTransition;
|
|
309
|
+
var NotificationType;
|
|
310
|
+
(function(NotificationType2) {
|
|
311
|
+
NotificationType2[NotificationType2["ONBOARDING"] = 1] = "ONBOARDING";
|
|
312
|
+
NotificationType2[NotificationType2["QUESTION"] = 2] = "QUESTION";
|
|
313
|
+
NotificationType2[NotificationType2["QUESTION_RESOLVED"] = 3] = "QUESTION_RESOLVED";
|
|
314
|
+
})(NotificationType || (NotificationType = {}));
|
|
247
315
|
export {
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
316
|
+
A,
|
|
317
|
+
I,
|
|
318
|
+
N,
|
|
319
|
+
O,
|
|
320
|
+
S,
|
|
321
|
+
NotificationType as a,
|
|
322
|
+
useTransition as b,
|
|
323
|
+
cx_default as c,
|
|
324
|
+
styled_default as s,
|
|
325
|
+
useStore as u
|
|
258
326
|
};
|