pollination-react-io 0.0.11 → 0.0.14
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/build/Dropdown/Dropdown.d.ts +7 -2
- package/build/GetModel/GetModel.d.ts +4 -0
- package/build/GetModel/GetModel.types.d.ts +3 -0
- package/build/PreviewBakeGeometry/PreviewBakeGeometry.d.ts +4 -0
- package/build/PreviewBakeGeometry/PreviewBakeGeometry.types.d.ts +4 -0
- package/build/PreviewBakeModel/PreviewBakeModel.d.ts +4 -0
- package/build/PreviewBakeModel/PreviewBakeModel.types.d.ts +4 -0
- package/build/RunCommand/RunCommand.d.ts +5 -0
- package/build/RunCommand/RunCommand.types.d.ts +4 -0
- package/build/SendGeometry/SendGeometry.types.d.ts +1 -0
- package/build/SendModel/SendModel.d.ts +4 -0
- package/build/SendModel/SendModel.types.d.ts +4 -0
- package/build/SettingsButton/index.d.ts +6 -5
- package/build/buttons.scss +1 -0
- package/build/hooks/types.d.ts +4 -1
- package/build/hooks/useSendGeometry.d.ts +2 -2
- package/build/hooks/useSendHbjson.d.ts +2 -2
- package/build/index.d.ts +5 -2
- package/build/index.esm.js +488 -230
- package/build/index.esm.js.map +1 -1
- package/build/index.js +489 -231
- package/build/index.js.map +1 -1
- package/build/ts-utils.d.ts +4 -0
- package/package.json +3 -1
package/build/index.js
CHANGED
|
@@ -2038,8 +2038,8 @@ var useGetGeometry = function () {
|
|
|
2038
2038
|
var geometryRef = React.useRef(undefined);
|
|
2039
2039
|
var setReturnVal = React.useCallback(function (data, force) {
|
|
2040
2040
|
var bytes = new TextEncoder().encode(data.Geometry);
|
|
2041
|
-
if (geometryRef.current) {
|
|
2042
|
-
if (
|
|
2041
|
+
if (!force && geometryRef.current) {
|
|
2042
|
+
if (!lodash_isequal(bytes, geometryRef.current)) {
|
|
2043
2043
|
setGeometry(new Blob([bytes], {
|
|
2044
2044
|
type: 'application/json;charset=utf-8',
|
|
2045
2045
|
}));
|
|
@@ -2096,7 +2096,7 @@ var useGetGeometry = function () {
|
|
|
2096
2096
|
};
|
|
2097
2097
|
};
|
|
2098
2098
|
|
|
2099
|
-
|
|
2099
|
+
/*! *****************************************************************************
|
|
2100
2100
|
Copyright (c) Microsoft Corporation.
|
|
2101
2101
|
|
|
2102
2102
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -2111,29 +2111,17 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
|
2111
2111
|
PERFORMANCE OF THIS SOFTWARE.
|
|
2112
2112
|
***************************************************************************** */
|
|
2113
2113
|
|
|
2114
|
-
var __assign = function() {
|
|
2115
|
-
__assign = Object.assign || function __assign(t) {
|
|
2114
|
+
var __assign$2 = function() {
|
|
2115
|
+
__assign$2 = Object.assign || function __assign(t) {
|
|
2116
2116
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2117
2117
|
s = arguments[i];
|
|
2118
2118
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
2119
2119
|
}
|
|
2120
2120
|
return t;
|
|
2121
2121
|
};
|
|
2122
|
-
return __assign.apply(this, arguments);
|
|
2122
|
+
return __assign$2.apply(this, arguments);
|
|
2123
2123
|
};
|
|
2124
2124
|
|
|
2125
|
-
function __rest(s, e) {
|
|
2126
|
-
var t = {};
|
|
2127
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
2128
|
-
t[p] = s[p];
|
|
2129
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
2130
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
2131
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
2132
|
-
t[p[i]] = s[p[i]];
|
|
2133
|
-
}
|
|
2134
|
-
return t;
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
2125
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
2138
2126
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2139
2127
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -2170,35 +2158,23 @@ function __generator(thisArg, body) {
|
|
|
2170
2158
|
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
2171
2159
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2172
2160
|
}
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
function __spreadArray(to, from, pack) {
|
|
2176
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2177
|
-
if (ar || !(i in from)) {
|
|
2178
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
2179
|
-
ar[i] = from[i];
|
|
2180
|
-
}
|
|
2181
|
-
}
|
|
2182
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
2183
2161
|
}
|
|
2184
2162
|
|
|
2185
2163
|
var useSendHbjson = function () {
|
|
2186
2164
|
var host = getHost();
|
|
2187
2165
|
var _a = React.useState({}), state = _a[0], setState = _a[1];
|
|
2188
|
-
var rubySendHbjson = React.useCallback(function (
|
|
2189
|
-
if (preview === void 0) { preview = true; }
|
|
2166
|
+
var rubySendHbjson = React.useCallback(function (action, message) {
|
|
2190
2167
|
if (!checkRuby())
|
|
2191
2168
|
return;
|
|
2192
|
-
var response = sendMessageRuby(__assign({ action:
|
|
2193
|
-
setState(function (state) { return (__assign(__assign({}, state), { response: response })); });
|
|
2169
|
+
var response = sendMessageRuby(__assign$2({ action: action }, message));
|
|
2170
|
+
setState(function (state) { return (__assign$2(__assign$2({}, state), { response: response })); });
|
|
2194
2171
|
return response;
|
|
2195
2172
|
}, []);
|
|
2196
|
-
var dotNetSendHbjson = React.useCallback(function (
|
|
2197
|
-
if (preview === void 0) { preview = true; }
|
|
2173
|
+
var dotNetSendHbjson = React.useCallback(function (action, message) {
|
|
2198
2174
|
if (!checkDotNet())
|
|
2199
2175
|
return;
|
|
2200
|
-
var response = sendMessageDotNet(__assign({ action:
|
|
2201
|
-
setState(function (state) { return (__assign(__assign({}, state), { response: response })); });
|
|
2176
|
+
var response = sendMessageDotNet(__assign$2({ action: action }, message));
|
|
2177
|
+
setState(function (state) { return (__assign$2(__assign$2({}, state), { response: response })); });
|
|
2202
2178
|
return response;
|
|
2203
2179
|
}, []);
|
|
2204
2180
|
var sendHbjson = React.useMemo(function () {
|
|
@@ -2223,20 +2199,18 @@ var useSendHbjson = function () {
|
|
|
2223
2199
|
var useSendGeometry = function () {
|
|
2224
2200
|
var host = getHost();
|
|
2225
2201
|
var _a = React.useState({}), state = _a[0], setState = _a[1];
|
|
2226
|
-
var rubySendGeometry = React.useCallback(function (
|
|
2227
|
-
if (preview === void 0) { preview = true; }
|
|
2202
|
+
var rubySendGeometry = React.useCallback(function (action, message) {
|
|
2228
2203
|
if (!checkRuby())
|
|
2229
2204
|
return;
|
|
2230
|
-
var response = sendMessageRuby(__assign({ action:
|
|
2231
|
-
setState(function (state) { return (__assign(__assign({}, state), { response: response })); });
|
|
2205
|
+
var response = sendMessageRuby(__assign$2({ action: action }, message));
|
|
2206
|
+
setState(function (state) { return (__assign$2(__assign$2({}, state), { response: response })); });
|
|
2232
2207
|
return response;
|
|
2233
2208
|
}, []);
|
|
2234
|
-
var dotNetSendGeometry = React.useCallback(function (
|
|
2235
|
-
if (preview === void 0) { preview = true; }
|
|
2209
|
+
var dotNetSendGeometry = React.useCallback(function (action, message) {
|
|
2236
2210
|
if (!checkDotNet())
|
|
2237
2211
|
return;
|
|
2238
|
-
var response = sendMessageDotNet(__assign({ action:
|
|
2239
|
-
setState(function (state) { return (__assign(__assign({}, state), { response: response })); });
|
|
2212
|
+
var response = sendMessageDotNet(__assign$2({ action: action }, message));
|
|
2213
|
+
setState(function (state) { return (__assign$2(__assign$2({}, state), { response: response })); });
|
|
2240
2214
|
return response;
|
|
2241
2215
|
}, []);
|
|
2242
2216
|
var sendGeometry = React.useMemo(function () {
|
|
@@ -2374,10 +2348,10 @@ var useHbjsontoVTK = function () {
|
|
|
2374
2348
|
*/
|
|
2375
2349
|
var b$2="function"===typeof Symbol&&Symbol.for,c$4=b$2?Symbol.for("react.element"):60103,d$4=b$2?Symbol.for("react.portal"):60106,e$3=b$2?Symbol.for("react.fragment"):60107,f$4=b$2?Symbol.for("react.strict_mode"):60108,g$2=b$2?Symbol.for("react.profiler"):60114,h=b$2?Symbol.for("react.provider"):60109,k$1=b$2?Symbol.for("react.context"):60110,l$4=b$2?Symbol.for("react.async_mode"):60111,m$3=b$2?Symbol.for("react.concurrent_mode"):60111,n$5=b$2?Symbol.for("react.forward_ref"):60112,p$2=b$2?Symbol.for("react.suspense"):60113,q$1=b$2?
|
|
2376
2350
|
Symbol.for("react.suspense_list"):60120,r$4=b$2?Symbol.for("react.memo"):60115,t$4=b$2?Symbol.for("react.lazy"):60116,v$1=b$2?Symbol.for("react.block"):60121,w$2=b$2?Symbol.for("react.fundamental"):60117,x$1=b$2?Symbol.for("react.responder"):60118,y$1=b$2?Symbol.for("react.scope"):60119;
|
|
2377
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$4:switch(a=a.type,a){case l$4:case m$3:case e$3:case g$2:case f$4:case p$2:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$5:case t$4:case r$4:case h:return a;default:return u}}case d$4:return u}}}function A$1(a){return z(a)===m$3}var AsyncMode=l$4;var ConcurrentMode=m$3;var ContextConsumer=k$1;var ContextProvider=h;var Element=c$4;var ForwardRef=n$5;var Fragment=e$3;var Lazy=t$4;var Memo=r$4;var Portal$1=d$4;
|
|
2378
|
-
var Profiler=g$2;var StrictMode=f$4;var Suspense=p$2;var isAsyncMode=function(a){return A$1(a)||z(a)===l$4};var isConcurrentMode=A$1;var isContextConsumer=function(a){return z(a)===k$1};var isContextProvider=function(a){return z(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$4};var isForwardRef=function(a){return z(a)===n$5};var isFragment=function(a){return z(a)===e$3};var isLazy=function(a){return z(a)===t$4};
|
|
2379
|
-
var isMemo=function(a){return z(a)===r$4};var isPortal=function(a){return z(a)===d$4};var isProfiler=function(a){return z(a)===g$2};var isStrictMode=function(a){return z(a)===f$4};var isSuspense=function(a){return z(a)===p$2};
|
|
2380
|
-
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$3||a===m$3||a===g$2||a===f$4||a===p$2||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$4||a.$$typeof===r$4||a.$$typeof===h||a.$$typeof===k$1||a.$$typeof===n$5||a.$$typeof===w$2||a.$$typeof===x$1||a.$$typeof===y$1||a.$$typeof===v$1)};var typeOf=z;
|
|
2351
|
+
function z$1(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c$4:switch(a=a.type,a){case l$4:case m$3:case e$3:case g$2:case f$4:case p$2:return a;default:switch(a=a&&a.$$typeof,a){case k$1:case n$5:case t$4:case r$4:case h:return a;default:return u}}case d$4:return u}}}function A$1(a){return z$1(a)===m$3}var AsyncMode=l$4;var ConcurrentMode=m$3;var ContextConsumer=k$1;var ContextProvider=h;var Element=c$4;var ForwardRef=n$5;var Fragment=e$3;var Lazy=t$4;var Memo=r$4;var Portal$1=d$4;
|
|
2352
|
+
var Profiler=g$2;var StrictMode=f$4;var Suspense=p$2;var isAsyncMode=function(a){return A$1(a)||z$1(a)===l$4};var isConcurrentMode=A$1;var isContextConsumer=function(a){return z$1(a)===k$1};var isContextProvider=function(a){return z$1(a)===h};var isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c$4};var isForwardRef=function(a){return z$1(a)===n$5};var isFragment=function(a){return z$1(a)===e$3};var isLazy=function(a){return z$1(a)===t$4};
|
|
2353
|
+
var isMemo=function(a){return z$1(a)===r$4};var isPortal=function(a){return z$1(a)===d$4};var isProfiler=function(a){return z$1(a)===g$2};var isStrictMode=function(a){return z$1(a)===f$4};var isSuspense=function(a){return z$1(a)===p$2};
|
|
2354
|
+
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$3||a===m$3||a===g$2||a===f$4||a===p$2||a===q$1||"object"===typeof a&&null!==a&&(a.$$typeof===t$4||a.$$typeof===r$4||a.$$typeof===h||a.$$typeof===k$1||a.$$typeof===n$5||a.$$typeof===w$2||a.$$typeof===x$1||a.$$typeof===y$1||a.$$typeof===v$1)};var typeOf=z$1;
|
|
2381
2355
|
|
|
2382
2356
|
var reactIs_production_min = {
|
|
2383
2357
|
AsyncMode: AsyncMode,
|
|
@@ -3510,6 +3484,81 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
3510
3484
|
|
|
3511
3485
|
var PropTypes = propTypes;
|
|
3512
3486
|
|
|
3487
|
+
var _excluded$3 = ["color", "size", "title"];
|
|
3488
|
+
|
|
3489
|
+
function _extends$4() { _extends$4 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
3490
|
+
|
|
3491
|
+
function _objectWithoutProperties$3(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$3(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3492
|
+
|
|
3493
|
+
function _objectWithoutPropertiesLoose$3(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
3494
|
+
var ArrowRepeat = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3495
|
+
var color = _ref.color,
|
|
3496
|
+
size = _ref.size,
|
|
3497
|
+
title = _ref.title,
|
|
3498
|
+
rest = _objectWithoutProperties$3(_ref, _excluded$3);
|
|
3499
|
+
|
|
3500
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", _extends$4({
|
|
3501
|
+
ref: ref,
|
|
3502
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3503
|
+
viewBox: "0 0 16 16",
|
|
3504
|
+
width: size,
|
|
3505
|
+
height: size,
|
|
3506
|
+
fill: color
|
|
3507
|
+
}, rest), title ? /*#__PURE__*/React__default["default"].createElement("title", null, title) : null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3508
|
+
d: "M11.534 7h3.932a.25.25 0 0 1 .192.41l-1.966 2.36a.25.25 0 0 1-.384 0l-1.966-2.36a.25.25 0 0 1 .192-.41zm-11 2h3.932a.25.25 0 0 0 .192-.41L2.692 6.23a.25.25 0 0 0-.384 0L.342 8.59A.25.25 0 0 0 .534 9z"
|
|
3509
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3510
|
+
fillRule: "evenodd",
|
|
3511
|
+
d: "M8 3c-1.552 0-2.94.707-3.857 1.818a.5.5 0 1 1-.771-.636A6.002 6.002 0 0 1 13.917 7H12.9A5.002 5.002 0 0 0 8 3zM3.1 9a5.002 5.002 0 0 0 8.757 2.182.5.5 0 1 1 .771.636A6.002 6.002 0 0 1 2.083 9H3.1z"
|
|
3512
|
+
}));
|
|
3513
|
+
});
|
|
3514
|
+
ArrowRepeat.propTypes = {
|
|
3515
|
+
color: PropTypes.string,
|
|
3516
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
3517
|
+
title: PropTypes.string
|
|
3518
|
+
};
|
|
3519
|
+
ArrowRepeat.defaultProps = {
|
|
3520
|
+
color: 'currentColor',
|
|
3521
|
+
size: '1em',
|
|
3522
|
+
title: null
|
|
3523
|
+
};
|
|
3524
|
+
var ArrowRepeat$1 = ArrowRepeat;
|
|
3525
|
+
|
|
3526
|
+
var _excluded$2 = ["color", "size", "title"];
|
|
3527
|
+
|
|
3528
|
+
function _extends$3() { _extends$3 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
3529
|
+
|
|
3530
|
+
function _objectWithoutProperties$2(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose$2(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3531
|
+
|
|
3532
|
+
function _objectWithoutPropertiesLoose$2(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
3533
|
+
var BoundingBox = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
3534
|
+
var color = _ref.color,
|
|
3535
|
+
size = _ref.size,
|
|
3536
|
+
title = _ref.title,
|
|
3537
|
+
rest = _objectWithoutProperties$2(_ref, _excluded$2);
|
|
3538
|
+
|
|
3539
|
+
return /*#__PURE__*/React__default["default"].createElement("svg", _extends$3({
|
|
3540
|
+
ref: ref,
|
|
3541
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3542
|
+
viewBox: "0 0 16 16",
|
|
3543
|
+
width: size,
|
|
3544
|
+
height: size,
|
|
3545
|
+
fill: color
|
|
3546
|
+
}, rest), title ? /*#__PURE__*/React__default["default"].createElement("title", null, title) : null, /*#__PURE__*/React__default["default"].createElement("path", {
|
|
3547
|
+
d: "M5 2V0H0v5h2v6H0v5h5v-2h6v2h5v-5h-2V5h2V0h-5v2H5zm6 1v2h2v6h-2v2H5v-2H3V5h2V3h6zm1-2h3v3h-3V1zm3 11v3h-3v-3h3zM4 15H1v-3h3v3zM1 4V1h3v3H1z"
|
|
3548
|
+
}));
|
|
3549
|
+
});
|
|
3550
|
+
BoundingBox.propTypes = {
|
|
3551
|
+
color: PropTypes.string,
|
|
3552
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
3553
|
+
title: PropTypes.string
|
|
3554
|
+
};
|
|
3555
|
+
BoundingBox.defaultProps = {
|
|
3556
|
+
color: 'currentColor',
|
|
3557
|
+
size: '1em',
|
|
3558
|
+
title: null
|
|
3559
|
+
};
|
|
3560
|
+
var BoundingBox$1 = BoundingBox;
|
|
3561
|
+
|
|
3513
3562
|
var _excluded$1 = ["color", "size", "title"];
|
|
3514
3563
|
|
|
3515
3564
|
function _extends$2() { _extends$2 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
@@ -3737,6 +3786,54 @@ var hideOthers = function (originalTarget, parentNode, markerName) {
|
|
|
3737
3786
|
};
|
|
3738
3787
|
};
|
|
3739
3788
|
|
|
3789
|
+
/******************************************************************************
|
|
3790
|
+
Copyright (c) Microsoft Corporation.
|
|
3791
|
+
|
|
3792
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
3793
|
+
purpose with or without fee is hereby granted.
|
|
3794
|
+
|
|
3795
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
3796
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
3797
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
3798
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
3799
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
3800
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
3801
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
3802
|
+
***************************************************************************** */
|
|
3803
|
+
|
|
3804
|
+
var __assign$1 = function() {
|
|
3805
|
+
__assign$1 = Object.assign || function __assign(t) {
|
|
3806
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3807
|
+
s = arguments[i];
|
|
3808
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3809
|
+
}
|
|
3810
|
+
return t;
|
|
3811
|
+
};
|
|
3812
|
+
return __assign$1.apply(this, arguments);
|
|
3813
|
+
};
|
|
3814
|
+
|
|
3815
|
+
function __rest$1(s, e) {
|
|
3816
|
+
var t = {};
|
|
3817
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3818
|
+
t[p] = s[p];
|
|
3819
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3820
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3821
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3822
|
+
t[p[i]] = s[p[i]];
|
|
3823
|
+
}
|
|
3824
|
+
return t;
|
|
3825
|
+
}
|
|
3826
|
+
|
|
3827
|
+
function __spreadArray(to, from, pack) {
|
|
3828
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3829
|
+
if (ar || !(i in from)) {
|
|
3830
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
3831
|
+
ar[i] = from[i];
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
3835
|
+
}
|
|
3836
|
+
|
|
3740
3837
|
var zeroRightClassName = 'right-scroll-bar-position';
|
|
3741
3838
|
var fullWidthClassName = 'width-before-scroll-bar';
|
|
3742
3839
|
var noScrollbarsClassName = 'with-scroll-bars-hidden';
|
|
@@ -3826,6 +3923,44 @@ function useMergeRefs(refs, defaultValue) {
|
|
|
3826
3923
|
return useCallbackRef(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); });
|
|
3827
3924
|
}
|
|
3828
3925
|
|
|
3926
|
+
/******************************************************************************
|
|
3927
|
+
Copyright (c) Microsoft Corporation.
|
|
3928
|
+
|
|
3929
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
3930
|
+
purpose with or without fee is hereby granted.
|
|
3931
|
+
|
|
3932
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
3933
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
3934
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
3935
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
3936
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
3937
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
3938
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
3939
|
+
***************************************************************************** */
|
|
3940
|
+
|
|
3941
|
+
var __assign = function() {
|
|
3942
|
+
__assign = Object.assign || function __assign(t) {
|
|
3943
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
3944
|
+
s = arguments[i];
|
|
3945
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
3946
|
+
}
|
|
3947
|
+
return t;
|
|
3948
|
+
};
|
|
3949
|
+
return __assign.apply(this, arguments);
|
|
3950
|
+
};
|
|
3951
|
+
|
|
3952
|
+
function __rest(s, e) {
|
|
3953
|
+
var t = {};
|
|
3954
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
3955
|
+
t[p] = s[p];
|
|
3956
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
3957
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
3958
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
3959
|
+
t[p[i]] = s[p[i]];
|
|
3960
|
+
}
|
|
3961
|
+
return t;
|
|
3962
|
+
}
|
|
3963
|
+
|
|
3829
3964
|
function ItoI(a) {
|
|
3830
3965
|
return a;
|
|
3831
3966
|
}
|
|
@@ -3932,13 +4067,13 @@ var RemoveScroll = React__namespace.forwardRef(function (props, parentRef) {
|
|
|
3932
4067
|
onWheelCapture: nothing,
|
|
3933
4068
|
onTouchMoveCapture: nothing,
|
|
3934
4069
|
}), callbacks = _a[0], setCallbacks = _a[1];
|
|
3935
|
-
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, rest = __rest(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
|
|
4070
|
+
var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, rest = __rest$1(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]);
|
|
3936
4071
|
var SideCar = sideCar;
|
|
3937
4072
|
var containerRef = useMergeRefs([ref, parentRef]);
|
|
3938
|
-
var containerProps = __assign(__assign({}, rest), callbacks);
|
|
4073
|
+
var containerProps = __assign$1(__assign$1({}, rest), callbacks);
|
|
3939
4074
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
3940
4075
|
enabled && (React__namespace.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),
|
|
3941
|
-
forwardProps ? (React__namespace.cloneElement(React__namespace.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React__namespace.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
|
|
4076
|
+
forwardProps ? (React__namespace.cloneElement(React__namespace.Children.only(children), __assign$1(__assign$1({}, containerProps), { ref: containerRef }))) : (React__namespace.createElement(Container, __assign$1({}, containerProps, { className: className, ref: containerRef }), children))));
|
|
3942
4077
|
});
|
|
3943
4078
|
RemoveScroll.defaultProps = {
|
|
3944
4079
|
enabled: true,
|
|
@@ -4356,13 +4491,13 @@ function RemoveScrollSideCar(props) {
|
|
|
4356
4491
|
|
|
4357
4492
|
var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
|
|
4358
4493
|
|
|
4359
|
-
var ReactRemoveScroll = React__namespace.forwardRef(function (props, ref) { return (React__namespace.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });
|
|
4494
|
+
var ReactRemoveScroll = React__namespace.forwardRef(function (props, ref) { return (React__namespace.createElement(RemoveScroll, __assign$1({}, props, { ref: ref, sideCar: SideCar }))); });
|
|
4360
4495
|
ReactRemoveScroll.classNames = RemoveScroll.classNames;
|
|
4361
4496
|
var C = ReactRemoveScroll;
|
|
4362
4497
|
|
|
4363
|
-
const x=["Enter"," "],b=["ArrowUp","PageDown","End"],R=["ArrowDown","PageUp","Home",...b],y={ltr:["ArrowLeft"],rtl:["ArrowRight"]},[I,k,P]=createCollection("Menu"),[D$1,S]=createContextScope("Menu",[P,l$1,v]);const O=l$1(),T=v(),[L,A]=D$1("Menu");const Menu=e=>{const{__scopeMenu:n,open:o=!1,children:u,onOpenChange:c,modal:i=!0}=e,s=O(n),[l,d]=React__namespace.useState(null),p=React__namespace.useRef(!1),f=useCallbackRef$1(c),m=useDirection(l,e.dir);return React__namespace.useEffect((()=>{const e=()=>{p.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0});},n=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0});}}),[]),/*#__PURE__*/React__namespace.createElement(Root$3,s,/*#__PURE__*/React__namespace.createElement(L,{scope:n,isSubmenu:!1,isUsingKeyboardRef:p,dir:m,open:o,onOpenChange:f,content:l,onContentChange:d,onRootClose:React__namespace.useCallback((()=>f(!1)),[f]),modal:i},u))};const MenuSub=n=>{const{__scopeMenu:r,children:o,open:u=!1,onOpenChange:c}=n,i=A("MenuSub",r),s=O(r),[l,d]=React__namespace.useState(null),[p,f]=React__namespace.useState(null),m=useCallbackRef$1(c);return React__namespace.useEffect((()=>(!1===i.open&&m(!1),()=>m(!1))),[i.open,m]),/*#__PURE__*/React__namespace.createElement(Root$3,s,/*#__PURE__*/React__namespace.createElement(L,{scope:r,isSubmenu:!0,isUsingKeyboardRef:i.isUsingKeyboardRef,dir:i.dir,open:u,onOpenChange:m,content:p,onContentChange:f,onRootClose:i.onRootClose,contentId:useId(),trigger:l,onTriggerChange:d,triggerId:useId(),modal:!1},o))};const MenuAnchor=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=O(t);return React__namespace.createElement(Anchor$1,_extends({},o,r,{ref:n}))}));const[F,K]=D$1("MenuContent");const MenuContent=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{forceMount:t,...r}=e,o=A("MenuContent",e.__scopeMenu);return React__namespace.createElement(I.Provider,{scope:e.__scopeMenu},/*#__PURE__*/React__namespace.createElement(Presence,{present:t||o.open},/*#__PURE__*/React__namespace.createElement(I.Slot,{scope:e.__scopeMenu},o.isSubmenu?/*#__PURE__*/React__namespace.createElement(X,_extends({},r,{ref:n})):/*#__PURE__*/React__namespace.createElement(G,_extends({},r,{ref:n})))))}));const G=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>A("MenuContent",e.__scopeMenu).modal?/*#__PURE__*/React__namespace.createElement(U,_extends({},e,{ref:n})):/*#__PURE__*/React__namespace.createElement(V,_extends({},e,{ref:n})))),U=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const t=A("MenuContent",e.__scopeMenu),r=React__namespace.useRef(null),o=useComposedRefs(n,r);return React__namespace.useEffect((()=>{const e=r.current;if(e)return hideOthers(e)}),[]),/*#__PURE__*/React__namespace.createElement(B,_extends({},e,{ref:o,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)}))})),V=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const t=A("MenuContent",e.__scopeMenu);return React__namespace.createElement(B,_extends({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)}))})),X=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const t=A("MenuContent",e.__scopeMenu),r=React__namespace.useRef(null),o=useComposedRefs(n,r);return t.isSubmenu?/*#__PURE__*/React__namespace.createElement(B,_extends({id:t.contentId,"aria-labelledby":t.triggerId},e,{ref:o,align:"start",side:"rtl"===t.dir?"left":"right",portalled:!0,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var n;t.isUsingKeyboardRef.current&&(null===(n=r.current)||void 0===n||n.focus()),e.preventDefault();},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,(e=>{e.target!==t.trigger&&t.onOpenChange(!1);})),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,t.onRootClose),onKeyDown:composeEventHandlers(e.onKeyDown,(e=>{const n=e.currentTarget.contains(e.target),r=y[t.dir].includes(e.key);var o;n&&r&&(t.onOpenChange(!1),null===(o=t.trigger)||void 0===o||o.focus(),e.preventDefault());}))})):null})),B=/*#__PURE__*/React__namespace.forwardRef(((e,t)=>{const{__scopeMenu:r,loop:u=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:f,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:x,onDismiss:_,disableOutsideScroll:y,allowPinchZoom:I,portalled:P,...D}=e,S=A("MenuContent",r),L=O(r),K=T(r),G=k(r),[U,V]=React__namespace.useState(null),X=React__namespace.useRef(null),B=useComposedRefs(t,X,S.onContentChange),Y=React__namespace.useRef(0),Z=React__namespace.useRef(""),z=React__namespace.useRef(0),H=React__namespace.useRef(null),W=React__namespace.useRef("right"),q=React__namespace.useRef(0),N=P?Portal:React__namespace.Fragment,Q=y?C:React__namespace.Fragment,$=y?{allowPinchZoom:I}:void 0,ee=e=>{var n,t;const r=Z.current+e,o=G().filter((e=>!e.disabled)),u=document.activeElement,c=null===(n=o.find((e=>e.ref.current===u)))||void 0===n?void 0:n.textValue,a=function(e,n,t){const r=n.length>1&&Array.from(n).every((e=>e===n[0]))?n[0]:n,o=t?e.indexOf(t):-1;let u=(c=e,a=Math.max(o,0),c.map(((e,n)=>c[(a+n)%c.length])));var c,a;1===r.length&&(u=u.filter((e=>e!==t)));const i=u.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==t?i:void 0}(o.map((e=>e.textValue)),r,c),i=null===(t=o.find((e=>e.textValue===a)))||void 0===t?void 0:t.ref.current;!function e(n){Z.current=n,window.clearTimeout(Y.current),""!==n&&(Y.current=window.setTimeout((()=>e("")),1e3));}(r),i&&setTimeout((()=>i.focus()));};React__namespace.useEffect((()=>()=>window.clearTimeout(Y.current)),[]),useFocusGuards();const ne=React__namespace.useCallback((e=>{var n,t;return W.current===(null===(n=H.current)||void 0===n?void 0:n.side)&&function(e,n){if(!n)return !1;return function(e,n){const{x:t,y:r}=e;let o=!1;for(let e=0,u=n.length-1;e<n.length;u=e++){const c=n[e].x,a=n[e].y,i=n[u].x,s=n[u].y;a>r!=s>r&&t<(i-c)*(r-a)/(s-a)+c&&(o=!o);}return o}({x:e.clientX,y:e.clientY},n)}(e,null===(t=H.current)||void 0===t?void 0:t.area)}),[]);return React__namespace.createElement(N,null,/*#__PURE__*/React__namespace.createElement(Q,$,/*#__PURE__*/React__namespace.createElement(F,{scope:r,searchRef:Z,onItemEnter:React__namespace.useCallback((e=>{ne(e)&&e.preventDefault();}),[ne]),onItemLeave:React__namespace.useCallback((e=>{var n;ne(e)||(null===(n=X.current)||void 0===n||n.focus(),V(null));}),[ne]),onTriggerLeave:React__namespace.useCallback((e=>{ne(e)&&e.preventDefault();}),[ne]),pointerGraceTimerRef:z,onPointerGraceIntentChange:React__namespace.useCallback((e=>{H.current=e;}),[])},/*#__PURE__*/React__namespace.createElement(FocusScope,{asChild:!0,trapped:i,onMountAutoFocus:composeEventHandlers(s,(e=>{var n;e.preventDefault(),null===(n=X.current)||void 0===n||n.focus();})),onUnmountAutoFocus:l},/*#__PURE__*/React__namespace.createElement(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:x,onDismiss:_},/*#__PURE__*/React__namespace.createElement(Root$5,_extends({asChild:!0},K,{dir:S.dir,orientation:"vertical",loop:u,currentTabStopId:U,onCurrentTabStopIdChange:V,onEntryFocus:e=>{S.isUsingKeyboardRef.current||e.preventDefault();}}),/*#__PURE__*/React__namespace.createElement(Content$2,_extends({role:"menu","aria-orientation":"vertical","data-state":j(S.open),dir:S.dir},L,D,{ref:B,style:{outline:"none",...D.style},onKeyDown:composeEventHandlers(D.onKeyDown,(e=>{const n=e.target,t=e.currentTarget.contains(n),r=e.ctrlKey||e.altKey||e.metaKey,o=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&o&&ee(e.key));const u=X.current;if(e.target!==u)return;if(!R.includes(e.key))return;e.preventDefault();const c=G().filter((e=>!e.disabled)).map((e=>e.ref.current));b.includes(e.key)&&c.reverse(),function(e){const n=document.activeElement;for(const t of e){if(t===n)return;if(t.focus(),document.activeElement!==n)return}}(c);})),onBlur:composeEventHandlers(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(Y.current),Z.current="");})),onPointerMove:composeEventHandlers(e.onPointerMove,J((e=>{const n=e.target,t=q.current!==e.clientX;if(e.currentTarget.contains(n)&&t){const n=e.clientX>q.current?"right":"left";W.current=n,q.current=e.clientX;}})))}))))))))}));const MenuLabel=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return React__namespace.createElement(Primitive.div,_extends({},r,{ref:n}))}));const MenuItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{disabled:t=!1,onSelect:r,...o}=e,u=React__namespace.useRef(null),c=A("MenuItem",e.__scopeMenu),a=K("MenuItem",e.__scopeMenu),i=useComposedRefs(n,u),s=React__namespace.useRef(!1);return React__namespace.createElement(Y,_extends({},o,{ref:i,disabled:t,onClick:composeEventHandlers(e.onClick,(()=>{const e=u.current;if(!t&&e){const n=new Event("menu.itemSelect",{bubbles:!0,cancelable:!0});e.addEventListener("menu.itemSelect",(e=>null==r?void 0:r(e)),{once:!0}),e.dispatchEvent(n),n.defaultPrevented?s.current=!1:c.onRootClose();}})),onPointerDown:n=>{var t;null===(t=e.onPointerDown)||void 0===t||t.call(e,n),s.current=!0;},onPointerUp:composeEventHandlers(e.onPointerUp,(e=>{var n;s.current||null===(n=e.currentTarget)||void 0===n||n.click();})),onKeyDown:composeEventHandlers(e.onKeyDown,(e=>{const n=""!==a.searchRef.current;t||n&&" "===e.key||x.includes(e.key)&&(e.currentTarget.click(),e.preventDefault());}))}))}));const Y=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,disabled:r=!1,textValue:u,...c}=e,a=K("MenuItem",t),i=T(t),l=React__namespace.useRef(null),d=useComposedRefs(n,l),[p,f]=React__namespace.useState("");return React__namespace.useEffect((()=>{const e=l.current;var n;e&&f((null!==(n=e.textContent)&&void 0!==n?n:"").trim());}),[c.children]),/*#__PURE__*/React__namespace.createElement(I.ItemSlot,{scope:t,disabled:r,textValue:null!=u?u:p},/*#__PURE__*/React__namespace.createElement(Item$2,_extends({asChild:!0},i,{focusable:!r}),/*#__PURE__*/React__namespace.createElement(Primitive.div,_extends({role:"menuitem","aria-disabled":r||void 0,"data-disabled":r?"":void 0},c,{ref:d,onPointerMove:composeEventHandlers(e.onPointerMove,J((e=>{if(r)a.onItemLeave(e);else if(a.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus();}}))),onPointerLeave:composeEventHandlers(e.onPointerLeave,J((e=>a.onItemLeave(e))))}))))}));const MenuCheckboxItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{checked:t=!1,onCheckedChange:r,...o}=e;return React__namespace.createElement(H,{scope:e.__scopeMenu,checked:t},/*#__PURE__*/React__namespace.createElement(MenuItem,_extends({role:"menuitemcheckbox","aria-checked":t},o,{ref:n,"data-state":q(t),onSelect:composeEventHandlers(o.onSelect,(()=>null==r?void 0:r(!t)),{checkForDefaultPrevented:!1})})))}));D$1("MenuRadioGroup",{value:void 0,onValueChange:()=>{}});const[H,W]=D$1("MenuItemIndicator",{checked:!1});const MenuItemIndicator=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,forceMount:r,...o}=e,u=W("MenuItemIndicator",t);return React__namespace.createElement(Presence,{present:r||u.checked},/*#__PURE__*/React__namespace.createElement(Primitive.span,_extends({},o,{ref:n,"data-state":q(u.checked)})))}));const MenuArrow=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=O(t);return React__namespace.createElement(Arrow$2,_extends({},o,r,{ref:n}))}));function j(e){return e?"open":"closed"}function q(e){return e?"checked":"unchecked"}function J(e){return n=>"mouse"===n.pointerType?e(n):void 0}const Root$2=Menu;const Sub=MenuSub;const Anchor=MenuAnchor;const Content$1=MenuContent;const Label$1=MenuLabel;const Item$1=MenuItem;const CheckboxItem$1=MenuCheckboxItem;const ItemIndicator$1=MenuItemIndicator;const Arrow$1=MenuArrow;
|
|
4498
|
+
const x=["Enter"," "],b=["ArrowUp","PageDown","End"],R=["ArrowDown","PageUp","Home",...b],y={ltr:["ArrowLeft"],rtl:["ArrowRight"]},[I,k,P]=createCollection("Menu"),[D$1,S]=createContextScope("Menu",[P,l$1,v]);const O=l$1(),T=v(),[L,A]=D$1("Menu");const Menu=e=>{const{__scopeMenu:n,open:o=!1,children:u,onOpenChange:c,modal:i=!0}=e,s=O(n),[l,d]=React__namespace.useState(null),p=React__namespace.useRef(!1),f=useCallbackRef$1(c),m=useDirection(l,e.dir);return React__namespace.useEffect((()=>{const e=()=>{p.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0});},n=()=>p.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0});}}),[]),/*#__PURE__*/React__namespace.createElement(Root$3,s,/*#__PURE__*/React__namespace.createElement(L,{scope:n,isSubmenu:!1,isUsingKeyboardRef:p,dir:m,open:o,onOpenChange:f,content:l,onContentChange:d,onRootClose:React__namespace.useCallback((()=>f(!1)),[f]),modal:i},u))};const MenuSub=n=>{const{__scopeMenu:r,children:o,open:u=!1,onOpenChange:c}=n,i=A("MenuSub",r),s=O(r),[l,d]=React__namespace.useState(null),[p,f]=React__namespace.useState(null),m=useCallbackRef$1(c);return React__namespace.useEffect((()=>(!1===i.open&&m(!1),()=>m(!1))),[i.open,m]),/*#__PURE__*/React__namespace.createElement(Root$3,s,/*#__PURE__*/React__namespace.createElement(L,{scope:r,isSubmenu:!0,isUsingKeyboardRef:i.isUsingKeyboardRef,dir:i.dir,open:u,onOpenChange:m,content:p,onContentChange:f,onRootClose:i.onRootClose,contentId:useId(),trigger:l,onTriggerChange:d,triggerId:useId(),modal:!1},o))};const MenuAnchor=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=O(t);return React__namespace.createElement(Anchor$1,_extends({},o,r,{ref:n}))}));const[F,K]=D$1("MenuContent");const MenuContent=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{forceMount:t,...r}=e,o=A("MenuContent",e.__scopeMenu);return React__namespace.createElement(I.Provider,{scope:e.__scopeMenu},/*#__PURE__*/React__namespace.createElement(Presence,{present:t||o.open},/*#__PURE__*/React__namespace.createElement(I.Slot,{scope:e.__scopeMenu},o.isSubmenu?/*#__PURE__*/React__namespace.createElement(X,_extends({},r,{ref:n})):/*#__PURE__*/React__namespace.createElement(G,_extends({},r,{ref:n})))))}));const G=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>A("MenuContent",e.__scopeMenu).modal?/*#__PURE__*/React__namespace.createElement(U,_extends({},e,{ref:n})):/*#__PURE__*/React__namespace.createElement(V,_extends({},e,{ref:n})))),U=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const t=A("MenuContent",e.__scopeMenu),r=React__namespace.useRef(null),o=useComposedRefs(n,r);return React__namespace.useEffect((()=>{const e=r.current;if(e)return hideOthers(e)}),[]),/*#__PURE__*/React__namespace.createElement(B,_extends({},e,{ref:o,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)}))})),V=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const t=A("MenuContent",e.__scopeMenu);return React__namespace.createElement(B,_extends({},e,{ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)}))})),X=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const t=A("MenuContent",e.__scopeMenu),r=React__namespace.useRef(null),o=useComposedRefs(n,r);return t.isSubmenu?/*#__PURE__*/React__namespace.createElement(B,_extends({id:t.contentId,"aria-labelledby":t.triggerId},e,{ref:o,align:"start",side:"rtl"===t.dir?"left":"right",portalled:!0,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var n;t.isUsingKeyboardRef.current&&(null===(n=r.current)||void 0===n||n.focus()),e.preventDefault();},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,(e=>{e.target!==t.trigger&&t.onOpenChange(!1);})),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,t.onRootClose),onKeyDown:composeEventHandlers(e.onKeyDown,(e=>{const n=e.currentTarget.contains(e.target),r=y[t.dir].includes(e.key);var o;n&&r&&(t.onOpenChange(!1),null===(o=t.trigger)||void 0===o||o.focus(),e.preventDefault());}))})):null})),B=/*#__PURE__*/React__namespace.forwardRef(((e,t)=>{const{__scopeMenu:r,loop:u=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:f,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:x,onDismiss:_,disableOutsideScroll:y,allowPinchZoom:I,portalled:P,...D}=e,S=A("MenuContent",r),L=O(r),K=T(r),G=k(r),[U,V]=React__namespace.useState(null),X=React__namespace.useRef(null),B=useComposedRefs(t,X,S.onContentChange),Y=React__namespace.useRef(0),Z=React__namespace.useRef(""),z=React__namespace.useRef(0),H=React__namespace.useRef(null),W=React__namespace.useRef("right"),q=React__namespace.useRef(0),N=P?Portal:React__namespace.Fragment,Q=y?C:React__namespace.Fragment,$=y?{allowPinchZoom:I}:void 0,ee=e=>{var n,t;const r=Z.current+e,o=G().filter((e=>!e.disabled)),u=document.activeElement,c=null===(n=o.find((e=>e.ref.current===u)))||void 0===n?void 0:n.textValue,a=function(e,n,t){const r=n.length>1&&Array.from(n).every((e=>e===n[0]))?n[0]:n,o=t?e.indexOf(t):-1;let u=(c=e,a=Math.max(o,0),c.map(((e,n)=>c[(a+n)%c.length])));var c,a;1===r.length&&(u=u.filter((e=>e!==t)));const i=u.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==t?i:void 0}(o.map((e=>e.textValue)),r,c),i=null===(t=o.find((e=>e.textValue===a)))||void 0===t?void 0:t.ref.current;!function e(n){Z.current=n,window.clearTimeout(Y.current),""!==n&&(Y.current=window.setTimeout((()=>e("")),1e3));}(r),i&&setTimeout((()=>i.focus()));};React__namespace.useEffect((()=>()=>window.clearTimeout(Y.current)),[]),useFocusGuards();const ne=React__namespace.useCallback((e=>{var n,t;return W.current===(null===(n=H.current)||void 0===n?void 0:n.side)&&function(e,n){if(!n)return !1;return function(e,n){const{x:t,y:r}=e;let o=!1;for(let e=0,u=n.length-1;e<n.length;u=e++){const c=n[e].x,a=n[e].y,i=n[u].x,s=n[u].y;a>r!=s>r&&t<(i-c)*(r-a)/(s-a)+c&&(o=!o);}return o}({x:e.clientX,y:e.clientY},n)}(e,null===(t=H.current)||void 0===t?void 0:t.area)}),[]);return React__namespace.createElement(N,null,/*#__PURE__*/React__namespace.createElement(Q,$,/*#__PURE__*/React__namespace.createElement(F,{scope:r,searchRef:Z,onItemEnter:React__namespace.useCallback((e=>{ne(e)&&e.preventDefault();}),[ne]),onItemLeave:React__namespace.useCallback((e=>{var n;ne(e)||(null===(n=X.current)||void 0===n||n.focus(),V(null));}),[ne]),onTriggerLeave:React__namespace.useCallback((e=>{ne(e)&&e.preventDefault();}),[ne]),pointerGraceTimerRef:z,onPointerGraceIntentChange:React__namespace.useCallback((e=>{H.current=e;}),[])},/*#__PURE__*/React__namespace.createElement(FocusScope,{asChild:!0,trapped:i,onMountAutoFocus:composeEventHandlers(s,(e=>{var n;e.preventDefault(),null===(n=X.current)||void 0===n||n.focus();})),onUnmountAutoFocus:l},/*#__PURE__*/React__namespace.createElement(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:v,onPointerDownOutside:g,onFocusOutside:h,onInteractOutside:x,onDismiss:_},/*#__PURE__*/React__namespace.createElement(Root$5,_extends({asChild:!0},K,{dir:S.dir,orientation:"vertical",loop:u,currentTabStopId:U,onCurrentTabStopIdChange:V,onEntryFocus:e=>{S.isUsingKeyboardRef.current||e.preventDefault();}}),/*#__PURE__*/React__namespace.createElement(Content$2,_extends({role:"menu","aria-orientation":"vertical","data-state":j(S.open),dir:S.dir},L,D,{ref:B,style:{outline:"none",...D.style},onKeyDown:composeEventHandlers(D.onKeyDown,(e=>{const n=e.target,t=e.currentTarget.contains(n),r=e.ctrlKey||e.altKey||e.metaKey,o=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&o&&ee(e.key));const u=X.current;if(e.target!==u)return;if(!R.includes(e.key))return;e.preventDefault();const c=G().filter((e=>!e.disabled)).map((e=>e.ref.current));b.includes(e.key)&&c.reverse(),function(e){const n=document.activeElement;for(const t of e){if(t===n)return;if(t.focus(),document.activeElement!==n)return}}(c);})),onBlur:composeEventHandlers(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(Y.current),Z.current="");})),onPointerMove:composeEventHandlers(e.onPointerMove,J((e=>{const n=e.target,t=q.current!==e.clientX;if(e.currentTarget.contains(n)&&t){const n=e.clientX>q.current?"right":"left";W.current=n,q.current=e.clientX;}})))}))))))))}));const MenuGroup=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return React__namespace.createElement(Primitive.div,_extends({role:"group"},r,{ref:n}))}));const MenuLabel=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e;return React__namespace.createElement(Primitive.div,_extends({},r,{ref:n}))}));const MenuItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{disabled:t=!1,onSelect:r,...o}=e,u=React__namespace.useRef(null),c=A("MenuItem",e.__scopeMenu),a=K("MenuItem",e.__scopeMenu),i=useComposedRefs(n,u),s=React__namespace.useRef(!1);return React__namespace.createElement(Y,_extends({},o,{ref:i,disabled:t,onClick:composeEventHandlers(e.onClick,(()=>{const e=u.current;if(!t&&e){const n=new Event("menu.itemSelect",{bubbles:!0,cancelable:!0});e.addEventListener("menu.itemSelect",(e=>null==r?void 0:r(e)),{once:!0}),e.dispatchEvent(n),n.defaultPrevented?s.current=!1:c.onRootClose();}})),onPointerDown:n=>{var t;null===(t=e.onPointerDown)||void 0===t||t.call(e,n),s.current=!0;},onPointerUp:composeEventHandlers(e.onPointerUp,(e=>{var n;s.current||null===(n=e.currentTarget)||void 0===n||n.click();})),onKeyDown:composeEventHandlers(e.onKeyDown,(e=>{const n=""!==a.searchRef.current;t||n&&" "===e.key||x.includes(e.key)&&(e.currentTarget.click(),e.preventDefault());}))}))}));const Y=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,disabled:r=!1,textValue:u,...c}=e,a=K("MenuItem",t),i=T(t),l=React__namespace.useRef(null),d=useComposedRefs(n,l),[p,f]=React__namespace.useState("");return React__namespace.useEffect((()=>{const e=l.current;var n;e&&f((null!==(n=e.textContent)&&void 0!==n?n:"").trim());}),[c.children]),/*#__PURE__*/React__namespace.createElement(I.ItemSlot,{scope:t,disabled:r,textValue:null!=u?u:p},/*#__PURE__*/React__namespace.createElement(Item$2,_extends({asChild:!0},i,{focusable:!r}),/*#__PURE__*/React__namespace.createElement(Primitive.div,_extends({role:"menuitem","aria-disabled":r||void 0,"data-disabled":r?"":void 0},c,{ref:d,onPointerMove:composeEventHandlers(e.onPointerMove,J((e=>{if(r)a.onItemLeave(e);else if(a.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus();}}))),onPointerLeave:composeEventHandlers(e.onPointerLeave,J((e=>a.onItemLeave(e))))}))))}));const MenuCheckboxItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{checked:t=!1,onCheckedChange:r,...o}=e;return React__namespace.createElement(H,{scope:e.__scopeMenu,checked:t},/*#__PURE__*/React__namespace.createElement(MenuItem,_extends({role:"menuitemcheckbox","aria-checked":t},o,{ref:n,"data-state":q(t),onSelect:composeEventHandlers(o.onSelect,(()=>null==r?void 0:r(!t)),{checkForDefaultPrevented:!1})})))}));const[Z,z]=D$1("MenuRadioGroup",{value:void 0,onValueChange:()=>{}});const MenuRadioGroup=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{value:r,onValueChange:o,...u}=e,c=useCallbackRef$1(o);return React__namespace.createElement(Z,{scope:e.__scopeMenu,value:r,onValueChange:c},/*#__PURE__*/React__namespace.createElement(MenuGroup,_extends({},u,{ref:n})))}));const MenuRadioItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{value:t,...r}=e,o=z("MenuRadioItem",e.__scopeMenu),u=t===o.value;return React__namespace.createElement(H,{scope:e.__scopeMenu,checked:u},/*#__PURE__*/React__namespace.createElement(MenuItem,_extends({role:"menuitemradio","aria-checked":u},r,{ref:n,"data-state":q(u),onSelect:composeEventHandlers(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,t)}),{checkForDefaultPrevented:!1})})))}));const[H,W]=D$1("MenuItemIndicator",{checked:!1});const MenuItemIndicator=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,forceMount:r,...o}=e,u=W("MenuItemIndicator",t);return React__namespace.createElement(Presence,{present:r||u.checked},/*#__PURE__*/React__namespace.createElement(Primitive.span,_extends({},o,{ref:n,"data-state":q(u.checked)})))}));const MenuArrow=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeMenu:t,...r}=e,o=O(t);return React__namespace.createElement(Arrow$2,_extends({},o,r,{ref:n}))}));function j(e){return e?"open":"closed"}function q(e){return e?"checked":"unchecked"}function J(e){return n=>"mouse"===n.pointerType?e(n):void 0}const Root$2=Menu;const Sub=MenuSub;const Anchor=MenuAnchor;const Content$1=MenuContent;const Group$1=MenuGroup;const Label$1=MenuLabel;const Item$1=MenuItem;const CheckboxItem$1=MenuCheckboxItem;const RadioGroup$1=MenuRadioGroup;const RadioItem$1=MenuRadioItem;const ItemIndicator$1=MenuItemIndicator;const Arrow$1=MenuArrow;
|
|
4364
4499
|
|
|
4365
|
-
const[s,i$1]=createContextScope("DropdownMenu",[S]);const l=S(),[m,w]=s("DropdownMenu");const DropdownMenu=e=>{const{__scopeDropdownMenu:n,children:r,open:p,defaultOpen:d,onOpenChange:a}=e,s=M("DropdownMenu",n),i=l(n),[w=!1,D]=useControllableState({prop:p,defaultProp:d,onChange:a}),g=React__namespace.useCallback((()=>D((e=>!e))),[D]);return s.isInsideContent?/*#__PURE__*/React__namespace.createElement(m,{scope:n,isRootMenu:!1,open:w,onOpenChange:D,onOpenToggle:g},/*#__PURE__*/React__namespace.createElement(Sub,_extends({},i,{open:w,onOpenChange:D}),r)):/*#__PURE__*/React__namespace.createElement(f,_extends({},e,{open:w,onOpenChange:D,onOpenToggle:g}),r)};const f=n=>{const{__scopeDropdownMenu:r,children:t,dir:p,open:d,onOpenChange:a,onOpenToggle:s,modal:i=!0}=n,w=l(r),f=React__namespace.useRef(null);return React__namespace.createElement(m,{scope:r,isRootMenu:!0,triggerId:useId(),triggerRef:f,contentId:useId(),open:d,onOpenChange:a,onOpenToggle:s,modal:i},/*#__PURE__*/React__namespace.createElement(Root$2,_extends({},w,{open:d,onOpenChange:a,dir:p,modal:i}),t))};const DropdownMenuTrigger=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,disabled:p=!1,...s}=e,i=w("DropdownMenuTrigger",t),m=l(t);return i.isRootMenu?/*#__PURE__*/React__namespace.createElement(Anchor,_extends({asChild:!0},m),/*#__PURE__*/React__namespace.createElement(Primitive.button,_extends({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":!!i.open||void 0,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":p?"":void 0,disabled:p},s,{ref:composeRefs(n,i.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,(e=>{p||0!==e.button||!1!==e.ctrlKey||(i.open||e.preventDefault(),i.onOpenToggle());})),onKeyDown:composeEventHandlers(e.onKeyDown,(e=>{p||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),[" ","ArrowDown"].includes(e.key)&&e.preventDefault());}))}))):null}));const[D,M]=s("DropdownMenuContent",{isInsideContent:!1});const DropdownMenuContent=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=w("DropdownMenuContent",r),d=l(r),a={...t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}};return React__namespace.createElement(D,{scope:r,isInsideContent:!0},p.isRootMenu?/*#__PURE__*/React__namespace.createElement(g,_extends({__scopeDropdownMenu:r},a,{ref:n})):/*#__PURE__*/React__namespace.createElement(Content$1,_extends({},d,a,{ref:n})))}));const g=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,portalled:t=!0,...p}=e,d=w("DropdownMenuContent",r),s=l(r),i=React__namespace.useRef(!1);return d.isRootMenu?/*#__PURE__*/React__namespace.createElement(Content$1,_extends({id:d.contentId,"aria-labelledby":d.triggerId},s,p,{ref:n,portalled:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,(e=>{var o;i.current||null===(o=d.triggerRef.current)||void 0===o||o.focus(),i.current=!1,e.preventDefault();})),onInteractOutside:composeEventHandlers(e.onInteractOutside,(e=>{const o=e.detail.originalEvent,n=0===o.button&&!0===o.ctrlKey,r=2===o.button||n;d.modal&&!r||(i.current=!0);}))})):null}));const DropdownMenuLabel=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(Label$1,_extends({},p,t,{ref:n}))}));const DropdownMenuItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(Item$1,_extends({},p,t,{ref:n}))}));const DropdownMenuCheckboxItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(CheckboxItem$1,_extends({},p,t,{ref:n}))}));const DropdownMenuItemIndicator=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(ItemIndicator$1,_extends({},p,t,{ref:n}))}));const DropdownMenuArrow=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(Arrow$1,_extends({},p,t,{ref:n}))}));const Root$1=DropdownMenu;const Trigger=DropdownMenuTrigger;const Content=DropdownMenuContent;const Label=DropdownMenuLabel;const Item=DropdownMenuItem;const CheckboxItem=DropdownMenuCheckboxItem;const ItemIndicator=DropdownMenuItemIndicator;const Arrow=DropdownMenuArrow;
|
|
4500
|
+
const[s,i$1]=createContextScope("DropdownMenu",[S]);const l=S(),[m,w]=s("DropdownMenu");const DropdownMenu=e=>{const{__scopeDropdownMenu:n,children:r,open:p,defaultOpen:d,onOpenChange:a}=e,s=M("DropdownMenu",n),i=l(n),[w=!1,D]=useControllableState({prop:p,defaultProp:d,onChange:a}),g=React__namespace.useCallback((()=>D((e=>!e))),[D]);return s.isInsideContent?/*#__PURE__*/React__namespace.createElement(m,{scope:n,isRootMenu:!1,open:w,onOpenChange:D,onOpenToggle:g},/*#__PURE__*/React__namespace.createElement(Sub,_extends({},i,{open:w,onOpenChange:D}),r)):/*#__PURE__*/React__namespace.createElement(f,_extends({},e,{open:w,onOpenChange:D,onOpenToggle:g}),r)};const f=n=>{const{__scopeDropdownMenu:r,children:t,dir:p,open:d,onOpenChange:a,onOpenToggle:s,modal:i=!0}=n,w=l(r),f=React__namespace.useRef(null);return React__namespace.createElement(m,{scope:r,isRootMenu:!0,triggerId:useId(),triggerRef:f,contentId:useId(),open:d,onOpenChange:a,onOpenToggle:s,modal:i},/*#__PURE__*/React__namespace.createElement(Root$2,_extends({},w,{open:d,onOpenChange:a,dir:p,modal:i}),t))};const DropdownMenuTrigger=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:t,disabled:p=!1,...s}=e,i=w("DropdownMenuTrigger",t),m=l(t);return i.isRootMenu?/*#__PURE__*/React__namespace.createElement(Anchor,_extends({asChild:!0},m),/*#__PURE__*/React__namespace.createElement(Primitive.button,_extends({type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":!!i.open||void 0,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":p?"":void 0,disabled:p},s,{ref:composeRefs(n,i.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,(e=>{p||0!==e.button||!1!==e.ctrlKey||(i.open||e.preventDefault(),i.onOpenToggle());})),onKeyDown:composeEventHandlers(e.onKeyDown,(e=>{p||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),[" ","ArrowDown"].includes(e.key)&&e.preventDefault());}))}))):null}));const[D,M]=s("DropdownMenuContent",{isInsideContent:!1});const DropdownMenuContent=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=w("DropdownMenuContent",r),d=l(r),a={...t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)"}};return React__namespace.createElement(D,{scope:r,isInsideContent:!0},p.isRootMenu?/*#__PURE__*/React__namespace.createElement(g,_extends({__scopeDropdownMenu:r},a,{ref:n})):/*#__PURE__*/React__namespace.createElement(Content$1,_extends({},d,a,{ref:n})))}));const g=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,portalled:t=!0,...p}=e,d=w("DropdownMenuContent",r),s=l(r),i=React__namespace.useRef(!1);return d.isRootMenu?/*#__PURE__*/React__namespace.createElement(Content$1,_extends({id:d.contentId,"aria-labelledby":d.triggerId},s,p,{ref:n,portalled:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,(e=>{var o;i.current||null===(o=d.triggerRef.current)||void 0===o||o.focus(),i.current=!1,e.preventDefault();})),onInteractOutside:composeEventHandlers(e.onInteractOutside,(e=>{const o=e.detail.originalEvent,n=0===o.button&&!0===o.ctrlKey,r=2===o.button||n;d.modal&&!r||(i.current=!0);}))})):null}));const DropdownMenuGroup=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(Group$1,_extends({},p,t,{ref:n}))}));const DropdownMenuLabel=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(Label$1,_extends({},p,t,{ref:n}))}));const DropdownMenuItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(Item$1,_extends({},p,t,{ref:n}))}));const DropdownMenuCheckboxItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(CheckboxItem$1,_extends({},p,t,{ref:n}))}));const DropdownMenuRadioGroup=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(RadioGroup$1,_extends({},p,t,{ref:n}))}));const DropdownMenuRadioItem=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(RadioItem$1,_extends({},p,t,{ref:n}))}));const DropdownMenuItemIndicator=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(ItemIndicator$1,_extends({},p,t,{ref:n}))}));const DropdownMenuArrow=/*#__PURE__*/React__namespace.forwardRef(((e,n)=>{const{__scopeDropdownMenu:r,...t}=e,p=l(r);return React__namespace.createElement(Arrow$1,_extends({},p,t,{ref:n}))}));const Root$1=DropdownMenu;const Trigger=DropdownMenuTrigger;const Content=DropdownMenuContent;const Group=DropdownMenuGroup;const Label=DropdownMenuLabel;const Item=DropdownMenuItem;const CheckboxItem=DropdownMenuCheckboxItem;const RadioGroup=DropdownMenuRadioGroup;const RadioItem=DropdownMenuRadioItem;const ItemIndicator=DropdownMenuItemIndicator;const Arrow=DropdownMenuArrow;
|
|
4366
4501
|
|
|
4367
4502
|
const e="horizontal",n=["horizontal","vertical"];const Separator=/*#__PURE__*/React__namespace.forwardRef(((n,a)=>{const{decorative:p,orientation:l=e,...c}=n,s=i(l)?l:e,u=p?{role:"none"}:{"aria-orientation":"vertical"===s?s:void 0,role:"separator"};return React__namespace.createElement(Primitive.div,_extends({"data-orientation":s},u,c,{ref:a}))}));function i(r){return n.includes(r)}Separator.propTypes={orientation(r,o,t){const n=r[o],a=String(n);return n&&!i(n)?new Error(function(r,o){return `Invalid prop \`orientation\` of value \`${r}\` supplied to \`${o}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${e}\`.`}(a,t)):null}};const Root=Separator;
|
|
4368
4503
|
|
|
@@ -4393,48 +4528,63 @@ function styleInject(css, ref) {
|
|
|
4393
4528
|
}
|
|
4394
4529
|
}
|
|
4395
4530
|
|
|
4396
|
-
var css_248z$
|
|
4397
|
-
styleInject(css_248z$
|
|
4531
|
+
var css_248z$2 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary0: #e6f7ff;\n --grey5: #8c8c8c;\n --grey3: #d0d7de;\n --secondary: #fff566;\n --font-color: #494949;\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n --background: #3c3c3c;\n --font-color: #fafafa;\n }\n}\n.poll-select-content {\n font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", Segoe UI Symbol, \"Noto Color Emoji\";\n display: flex;\n flex-direction: column;\n width: fit-content;\n background-color: white;\n border: 1px solid var(--grey3);\n border-radius: 4px;\n padding: 6px 4px;\n box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 4px;\n gap: 2px;\n}\n\n.poll-select-item {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n border-radius: 2px;\n padding: 2px 8px 2px 24px;\n transition: background-color 0.15s linear, color 0.15s linear;\n}\n\n.poll-select-item[data-state=checked] {\n background-color: var(--primary2);\n color: white;\n}\n\n.poll-select-item:focus-visible {\n outline: none;\n}\n\n.poll-select-item:hover {\n background-color: var(--primary0);\n cursor: pointer;\n color: unset;\n}\n\n.poll-separator {\n background-color: #d0d7de;\n height: 1px;\n width: 100%;\n margin: 4px 0;\n}";
|
|
4532
|
+
styleInject(css_248z$2);
|
|
4398
4533
|
|
|
4399
4534
|
var Dropdown = function (_a) {
|
|
4400
|
-
var
|
|
4535
|
+
var optionGroups = _a.optionGroups, trigger = _a.trigger, contentProps = _a.contentProps, itemProps = _a.itemProps, _b = _a.arrow, arrow = _b === void 0 ? true : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c;
|
|
4536
|
+
var renderItem = React.useCallback(function (o) {
|
|
4537
|
+
var _a;
|
|
4538
|
+
switch (o.type) {
|
|
4539
|
+
case 'checkbox':
|
|
4540
|
+
return (React__default["default"].createElement(CheckboxItem, __assign$2({ key: o.id, className: 'poll-select-item', onSelect: function (e) {
|
|
4541
|
+
if (o.onSelect)
|
|
4542
|
+
o.onSelect(o);
|
|
4543
|
+
}, checked: o.checked, disabled: o.disabled }, itemProps),
|
|
4544
|
+
o.checked ?
|
|
4545
|
+
React__default["default"].createElement(ItemIndicator, { style: {
|
|
4546
|
+
position: 'absolute',
|
|
4547
|
+
display: 'inline-flex',
|
|
4548
|
+
left: 10
|
|
4549
|
+
} },
|
|
4550
|
+
React__default["default"].createElement(CheckCircle$1, null)) :
|
|
4551
|
+
React__default["default"].createElement("div", { style: {
|
|
4552
|
+
width: 12,
|
|
4553
|
+
minWidth: 12,
|
|
4554
|
+
height: 12
|
|
4555
|
+
} }),
|
|
4556
|
+
o.label));
|
|
4557
|
+
case 'radio':
|
|
4558
|
+
return (React__default["default"].createElement(RadioItem, __assign$2({ key: o.id, className: 'poll-select-item', onSelect: function (e) {
|
|
4559
|
+
if (o.onSelect)
|
|
4560
|
+
o.onSelect(o);
|
|
4561
|
+
}, textValue: o.label, value: o.id, disabled: o.disabled }, itemProps),
|
|
4562
|
+
React__default["default"].createElement(ItemIndicator, { style: {
|
|
4563
|
+
position: 'absolute',
|
|
4564
|
+
display: 'inline-flex',
|
|
4565
|
+
left: 10
|
|
4566
|
+
} },
|
|
4567
|
+
React__default["default"].createElement(CheckCircle$1, null)),
|
|
4568
|
+
o.label));
|
|
4569
|
+
case 'label':
|
|
4570
|
+
return (React__default["default"].createElement(Label, { key: o.id }, o.label));
|
|
4571
|
+
case 'link':
|
|
4572
|
+
return (React__default["default"].createElement("a", { href: (_a = o.to) !== null && _a !== void 0 ? _a : '/', key: o.id, style: { color: 'unset' } },
|
|
4573
|
+
React__default["default"].createElement(Item, __assign$2({ className: 'poll-select-item', onSelect: function () { return o.onSelect && o.onSelect(o); } }, itemProps), o.label)));
|
|
4574
|
+
default:
|
|
4575
|
+
return (React__default["default"].createElement(Item, __assign$2({ key: o.id, className: 'poll-select-item', onSelect: function (e) { return o.onSelect && o.onSelect(o); } }, itemProps), o.label));
|
|
4576
|
+
}
|
|
4577
|
+
}, [itemProps]);
|
|
4401
4578
|
return (React__default["default"].createElement(Root$1, null,
|
|
4402
4579
|
React__default["default"].createElement(Trigger, { asChild: true, disabled: disabled }, trigger),
|
|
4403
|
-
React__default["default"].createElement(Content, __assign({ className: 'poll-select-content' }, contentProps),
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
o.onSelect(o);
|
|
4412
|
-
}, checked: o.checked }, itemProps),
|
|
4413
|
-
o.checked ?
|
|
4414
|
-
React__default["default"].createElement(ItemIndicator, null,
|
|
4415
|
-
React__default["default"].createElement("div", { style: {
|
|
4416
|
-
display: 'flex',
|
|
4417
|
-
alignItems: 'center',
|
|
4418
|
-
justifyContent: 'center',
|
|
4419
|
-
width: 12,
|
|
4420
|
-
height: 12,
|
|
4421
|
-
} },
|
|
4422
|
-
React__default["default"].createElement(CheckCircle$1, null))) :
|
|
4423
|
-
React__default["default"].createElement("div", { style: {
|
|
4424
|
-
width: 12,
|
|
4425
|
-
minWidth: 12,
|
|
4426
|
-
height: 12
|
|
4427
|
-
} }),
|
|
4428
|
-
o.label));
|
|
4429
|
-
case 'label':
|
|
4430
|
-
return (React__default["default"].createElement(Label, { key: o.id }, o.label));
|
|
4431
|
-
case 'link':
|
|
4432
|
-
return (React__default["default"].createElement("a", { href: (_a = o.to) !== null && _a !== void 0 ? _a : '/', key: o.id, style: { color: 'unset' } },
|
|
4433
|
-
React__default["default"].createElement(Item, __assign({ className: 'poll-select-item', onSelect: function () { return o.onSelect && o.onSelect(o); } }, itemProps), o.label)));
|
|
4434
|
-
default:
|
|
4435
|
-
return (React__default["default"].createElement(Item, __assign({ key: o.id, className: 'poll-select-item', onSelect: function (e) { return o.onSelect && o.onSelect(o); } }, itemProps), o.label));
|
|
4436
|
-
}
|
|
4437
|
-
}),
|
|
4580
|
+
React__default["default"].createElement(Content, __assign$2({ className: 'poll-select-content' }, contentProps),
|
|
4581
|
+
optionGroups.map(function (group, i, a) { return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
4582
|
+
group.type && group.type === 'radio' ?
|
|
4583
|
+
React__default["default"].createElement(RadioGroup, { value: group.value }, group.options.map(renderItem))
|
|
4584
|
+
:
|
|
4585
|
+
group.type && group.type === 'default' ?
|
|
4586
|
+
React__default["default"].createElement(Group, null, group.options.map(renderItem)) :
|
|
4587
|
+
React__default["default"].createElement(React__default["default"].Fragment, null, group.options.map(renderItem)),
|
|
4438
4588
|
i !== a.length - 1 && React__default["default"].createElement(Root, { key: "dropdown-separator-".concat(i), className: 'poll-separator' }))); }),
|
|
4439
4589
|
arrow && React__default["default"].createElement(Arrow, { style: {
|
|
4440
4590
|
fill: 'white',
|
|
@@ -4448,8 +4598,8 @@ var Dropdown = function (_a) {
|
|
|
4448
4598
|
}, offset: 12 }))));
|
|
4449
4599
|
};
|
|
4450
4600
|
|
|
4451
|
-
var css_248z = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary0: #e6f7ff;\n --grey5: #8c8c8c;\n --grey3: #d0d7de;\n --secondary: #fff566;\n --font-color: #494949;\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n --background: #3c3c3c;\n --font-color: #fafafa;\n }\n}\n.btn-group {\n font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", Segoe UI Symbol, \"Noto Color Emoji\";\n width: fit-content;\n display: flex;\n border-radius: 4px;\n}\n\n.btn-group:hover {\n box-shadow: 0 1px 2px 0 rgba(26, 115, 232, 0.45), 0 1px 3px 1px rgba(26, 115, 232, 0.3);\n}\n\n.btn-group-disabled:hover {\n box-shadow: none;\n}\n\n.btn-group button {\n max-width: 260px;\n display: flex;\n background-color: var(--primary);\n border: 1px solid var(--primary);\n color: white;\n padding: 6px 10px;\n cursor: pointer;\n float: left;\n transition: background-color 0.125s ease-in-out;\n z-index: 10;\n align-items: center;\n}\n\n.btn-group button:disabled {\n background-color: var(--grey3);\n color: var(--grey5);\n cursor: default;\n border-color: var(--grey5);\n}\n\n.btn-group button:first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n\n.btn-group button:last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n border-left-color: #096dd9;\n}\n\n.btn-group button:last-child:disabled {\n border-left-color: var(--grey5);\n}\n\n.btn-group button:not(:last-child) {\n border-right: none;\n}\n\n.btn-group button:focus-visible {\n outline: none;\n}\n\n.btn-group button:focus {\n outline: none;\n}\n\n/* Clear floats (clearfix hack) */\n.btn-group:after {\n content: \"\";\n clear: both;\n display: table;\n}\n\n.btn-group button:hover {\n background-color: var(--primary2);\n z-index: 11;\n}\n\n.btn-group-disabled:hover button:hover {\n background-color: var(--grey3);\n}\n\n.options-content {\n font-size: clamp(0.65rem, 8vw - 0.75rem, 0.85rem);\n}";
|
|
4452
|
-
styleInject(css_248z);
|
|
4601
|
+
var css_248z$1 = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary0: #e6f7ff;\n --grey5: #8c8c8c;\n --grey3: #d0d7de;\n --secondary: #fff566;\n --font-color: #494949;\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n --background: #3c3c3c;\n --font-color: #fafafa;\n }\n}\n.btn-group {\n font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", Segoe UI Symbol, \"Noto Color Emoji\";\n width: fit-content;\n display: flex;\n border-radius: 4px;\n}\n\n.btn-group:hover {\n box-shadow: 0 1px 2px 0 rgba(26, 115, 232, 0.45), 0 1px 3px 1px rgba(26, 115, 232, 0.3);\n}\n\n.btn-group-disabled:hover {\n box-shadow: none;\n}\n\n.btn-group button {\n max-width: 260px;\n display: flex;\n background-color: var(--primary);\n border: 1px solid var(--primary);\n color: white;\n padding: 6px 10px;\n cursor: pointer;\n float: left;\n transition: background-color 0.125s ease-in-out;\n z-index: 10;\n align-items: center;\n gap: 8px;\n}\n\n.btn-group button:disabled {\n background-color: var(--grey3);\n color: var(--grey5);\n cursor: default;\n border-color: var(--grey5);\n}\n\n.btn-group button:first-child {\n border-top-left-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n\n.btn-group button:last-child {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n border-left-color: #096dd9;\n}\n\n.btn-group button:last-child:disabled {\n border-left-color: var(--grey5);\n}\n\n.btn-group button:not(:last-child) {\n border-right: none;\n}\n\n.btn-group button:focus-visible {\n outline: none;\n}\n\n.btn-group button:focus {\n outline: none;\n}\n\n/* Clear floats (clearfix hack) */\n.btn-group:after {\n content: \"\";\n clear: both;\n display: table;\n}\n\n.btn-group button:hover {\n background-color: var(--primary2);\n z-index: 11;\n}\n\n.btn-group-disabled:hover button:hover {\n background-color: var(--grey3);\n}\n\n.options-content {\n font-size: clamp(0.65rem, 8vw - 0.75rem, 0.85rem);\n}";
|
|
4602
|
+
styleInject(css_248z$1);
|
|
4453
4603
|
|
|
4454
4604
|
var logo = 'data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIwIiBoZWlnaHQ9IjEyMSIgdmlld0JveD0iMCAwIDEyMCAxMjEiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8ZyBjbGlwLXBhdGg9InVybCgjY2xpcDBfMTk2OjI4Nzk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
|
4455
4605
|
|
|
@@ -4461,22 +4611,20 @@ function Logo() {
|
|
|
4461
4611
|
borderRadius: 99999,
|
|
4462
4612
|
maxHeight: 24,
|
|
4463
4613
|
maxWidth: 24,
|
|
4464
|
-
marginRight: 6,
|
|
4465
4614
|
} },
|
|
4466
4615
|
React__default["default"].createElement("img", { src: logo, alt: "Pollination Logo" })));
|
|
4467
4616
|
}
|
|
4468
4617
|
|
|
4469
4618
|
var SettingsButton = function (_a) {
|
|
4470
|
-
var
|
|
4619
|
+
var onClick = _a.onClick, label = _a.label, options = _a.options, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.triggerIcon, triggerIcon = _c === void 0 ? React__default["default"].createElement(CaretDownFill$1, null) : _c;
|
|
4471
4620
|
return (React__default["default"].createElement("div", { className: "btn-group ".concat(disabled && 'btn-group-disabled') },
|
|
4472
4621
|
React__default["default"].createElement("button", { onClick: onClick, disabled: disabled, style: {
|
|
4473
4622
|
flex: 1,
|
|
4474
4623
|
} },
|
|
4475
4624
|
React__default["default"].createElement(Logo, null),
|
|
4476
|
-
|
|
4477
|
-
options && options.length
|
|
4478
|
-
React__default["default"].createElement(Dropdown, { trigger: React__default["default"].createElement("button", null,
|
|
4479
|
-
React__default["default"].createElement(CaretDownFill$1, null)), options: options, contentProps: {
|
|
4625
|
+
label),
|
|
4626
|
+
options && options.length &&
|
|
4627
|
+
React__default["default"].createElement(Dropdown, { trigger: React__default["default"].createElement("button", null, triggerIcon), optionGroups: options, contentProps: {
|
|
4480
4628
|
align: 'end',
|
|
4481
4629
|
style: {
|
|
4482
4630
|
fontSize: 'clamp(0.65rem, 8vw - 0.75rem, 0.85rem)',
|
|
@@ -4484,22 +4632,22 @@ var SettingsButton = function (_a) {
|
|
|
4484
4632
|
}, disabled: disabled })));
|
|
4485
4633
|
};
|
|
4486
4634
|
|
|
4487
|
-
var KEY$1 = performance.now().toString();
|
|
4488
4635
|
var GetGeometry = function (_a) {
|
|
4489
4636
|
var setParentState = _a.setParentState;
|
|
4490
|
-
var _b = React.useState(false), subscribe = _b[0], setSubscribe = _b[1];
|
|
4491
4637
|
var subscribeRef = React.useRef();
|
|
4492
|
-
var
|
|
4638
|
+
var _b = React.useState(performance.now().toString()), key = _b[0], setKey = _b[1];
|
|
4639
|
+
var _c = React.useState(), selOption = _c[0], setSelOption = _c[1];
|
|
4493
4640
|
// pollination-react-io hooks
|
|
4494
4641
|
var _d = useGetGeometry(); _d.host; var geometry = _d.geometry, getGeometry = _d.getGeometry;
|
|
4495
4642
|
// initial retrieval of geometry
|
|
4496
|
-
|
|
4497
|
-
getGeometry(
|
|
4643
|
+
React.useEffect(function () {
|
|
4644
|
+
getGeometry(key);
|
|
4645
|
+
}, [key, getGeometry]);
|
|
4498
4646
|
React.useEffect(function () {
|
|
4499
4647
|
if (!geometry || !setParentState)
|
|
4500
4648
|
return;
|
|
4501
4649
|
var fr = new FileReader();
|
|
4502
|
-
fr.onload = function (
|
|
4650
|
+
fr.onload = function () {
|
|
4503
4651
|
if (typeof this.result !== 'string')
|
|
4504
4652
|
return;
|
|
4505
4653
|
setParentState({ geometry: JSON.parse(this.result) });
|
|
@@ -4510,70 +4658,75 @@ var GetGeometry = function (_a) {
|
|
|
4510
4658
|
React.useEffect(function () {
|
|
4511
4659
|
if (!getGeometry)
|
|
4512
4660
|
return;
|
|
4513
|
-
if (subscribe &&
|
|
4661
|
+
if (selOption === 'subscribe' &&
|
|
4514
4662
|
typeof subscribeRef.current === 'undefined') {
|
|
4515
4663
|
subscribeRef.current = setInterval(function () {
|
|
4516
|
-
getGeometry(
|
|
4517
|
-
},
|
|
4664
|
+
getGeometry(key);
|
|
4665
|
+
}, 1000);
|
|
4518
4666
|
}
|
|
4519
|
-
else if (
|
|
4667
|
+
else if (selOption !== 'subscribe' &&
|
|
4520
4668
|
typeof subscribeRef.current !== 'undefined') {
|
|
4521
4669
|
clearInterval(subscribeRef.current);
|
|
4522
4670
|
subscribeRef.current = undefined;
|
|
4523
4671
|
}
|
|
4524
|
-
}, [getGeometry,
|
|
4525
|
-
// with the current way our selection mechanism works
|
|
4526
|
-
// you can't be both subscribing and in selection mode
|
|
4527
|
-
// asks the user to continually provide input
|
|
4672
|
+
}, [getGeometry, key, selOption]);
|
|
4528
4673
|
React.useEffect(function () {
|
|
4529
|
-
if (
|
|
4674
|
+
if (selOption === 'select') {
|
|
4530
4675
|
if (subscribeRef.current) {
|
|
4531
4676
|
clearInterval(subscribeRef.current);
|
|
4532
4677
|
}
|
|
4533
|
-
setSubscribe(false);
|
|
4534
|
-
}
|
|
4535
|
-
}, [selection]);
|
|
4536
|
-
React.useEffect(function () {
|
|
4537
|
-
if (subscribe) {
|
|
4538
|
-
setSelection(false);
|
|
4539
4678
|
}
|
|
4540
|
-
}, [
|
|
4679
|
+
}, [selOption]);
|
|
4541
4680
|
return (React__default["default"].createElement(SettingsButton, { onClick: function () {
|
|
4542
4681
|
if (!getGeometry)
|
|
4543
4682
|
return;
|
|
4544
|
-
getGeometry(
|
|
4545
|
-
}, disabled: typeof getGeometry === 'undefined', options: [
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
|
|
4552
|
-
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4683
|
+
getGeometry(key, selOption === 'select', true);
|
|
4684
|
+
}, disabled: typeof getGeometry === 'undefined', options: [{
|
|
4685
|
+
type: 'radio',
|
|
4686
|
+
value: selOption,
|
|
4687
|
+
options: [
|
|
4688
|
+
{
|
|
4689
|
+
type: 'radio',
|
|
4690
|
+
id: 'subscribe',
|
|
4691
|
+
label: 'Subscribe',
|
|
4692
|
+
disabled: !getGeometry,
|
|
4693
|
+
onSelect: function () {
|
|
4694
|
+
setSelOption(function (state) { return state === 'subscribe' ? undefined : 'subscribe'; });
|
|
4695
|
+
setKey(performance.now().toString());
|
|
4696
|
+
},
|
|
4697
|
+
},
|
|
4698
|
+
{
|
|
4699
|
+
type: 'radio',
|
|
4700
|
+
id: 'select',
|
|
4701
|
+
label: 'Select',
|
|
4702
|
+
disabled: !getGeometry,
|
|
4703
|
+
onSelect: function () {
|
|
4704
|
+
setSelOption(function (state) { return state === 'select' ? undefined : 'select'; });
|
|
4705
|
+
setKey(performance.now().toString());
|
|
4706
|
+
},
|
|
4707
|
+
},
|
|
4708
|
+
]
|
|
4709
|
+
}], label: 'Get Geometry', triggerIcon: selOption === 'select' ?
|
|
4710
|
+
React__default["default"].createElement(BoundingBox$1, { size: 16 }) :
|
|
4711
|
+
selOption === 'subscribe' ?
|
|
4712
|
+
React__default["default"].createElement(ArrowRepeat$1, { size: 16 }) :
|
|
4713
|
+
undefined }));
|
|
4563
4714
|
};
|
|
4564
4715
|
|
|
4565
|
-
|
|
4566
|
-
var
|
|
4716
|
+
performance.now().toString();
|
|
4717
|
+
var GetModel = function (_a) {
|
|
4567
4718
|
var setParentState = _a.setParentState;
|
|
4568
|
-
// sync
|
|
4569
|
-
var _b = React.useState(false), subscribe = _b[0], setSubscribe = _b[1];
|
|
4570
4719
|
var subscribeRef = React.useRef();
|
|
4571
|
-
var
|
|
4720
|
+
var _b = React.useState(performance.now().toString()), key = _b[0], setKey = _b[1];
|
|
4721
|
+
var _c = React.useState(), selOption = _c[0], setSelOption = _c[1];
|
|
4572
4722
|
// pollination-react-io hooks
|
|
4573
4723
|
var _d = useGetHbjson(); _d.host; var hbjson = _d.hbjson, getHbjson = _d.getHbjson;
|
|
4574
|
-
// initial retrieval of
|
|
4575
|
-
|
|
4576
|
-
getHbjson
|
|
4724
|
+
// initial retrieval of geometry
|
|
4725
|
+
React.useEffect(function () {
|
|
4726
|
+
if (!getHbjson)
|
|
4727
|
+
return;
|
|
4728
|
+
getHbjson(key);
|
|
4729
|
+
}, [key, getHbjson]);
|
|
4577
4730
|
React.useEffect(function () {
|
|
4578
4731
|
if (!hbjson || !setParentState)
|
|
4579
4732
|
return;
|
|
@@ -4589,142 +4742,247 @@ var GetHbjson = function (_a) {
|
|
|
4589
4742
|
React.useEffect(function () {
|
|
4590
4743
|
if (!getHbjson)
|
|
4591
4744
|
return;
|
|
4592
|
-
if (subscribe &&
|
|
4745
|
+
if (selOption === 'subscribe' &&
|
|
4593
4746
|
typeof subscribeRef.current === 'undefined') {
|
|
4594
4747
|
subscribeRef.current = setInterval(function () {
|
|
4595
|
-
getHbjson(
|
|
4596
|
-
},
|
|
4748
|
+
getHbjson(key, false);
|
|
4749
|
+
}, 1000);
|
|
4597
4750
|
}
|
|
4598
|
-
else if (
|
|
4751
|
+
else if (selOption !== 'subscribe' &&
|
|
4599
4752
|
typeof subscribeRef.current !== 'undefined') {
|
|
4600
4753
|
clearInterval(subscribeRef.current);
|
|
4601
4754
|
subscribeRef.current = undefined;
|
|
4602
4755
|
}
|
|
4603
|
-
}, [getHbjson,
|
|
4604
|
-
// with the current way our selection mechanism works
|
|
4605
|
-
// you can't be both subscribing and in selection mode
|
|
4606
|
-
// asks the user to continually provide input
|
|
4756
|
+
}, [getHbjson, key, selOption]);
|
|
4607
4757
|
React.useEffect(function () {
|
|
4608
|
-
if (
|
|
4758
|
+
if (selOption === 'select') {
|
|
4609
4759
|
if (subscribeRef.current) {
|
|
4610
4760
|
clearInterval(subscribeRef.current);
|
|
4611
4761
|
}
|
|
4612
|
-
setSubscribe(false);
|
|
4613
|
-
}
|
|
4614
|
-
}, [selection]);
|
|
4615
|
-
React.useEffect(function () {
|
|
4616
|
-
if (subscribe) {
|
|
4617
|
-
setSelection(false);
|
|
4618
4762
|
}
|
|
4619
|
-
}, [
|
|
4763
|
+
}, [selOption]);
|
|
4620
4764
|
return (React__default["default"].createElement(SettingsButton, { onClick: function () {
|
|
4621
4765
|
if (!getHbjson)
|
|
4622
4766
|
return;
|
|
4623
|
-
getHbjson(
|
|
4624
|
-
}, disabled:
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
|
|
4636
|
-
|
|
4637
|
-
|
|
4638
|
-
|
|
4639
|
-
|
|
4640
|
-
|
|
4641
|
-
|
|
4767
|
+
getHbjson(key, selOption === 'select', true);
|
|
4768
|
+
}, disabled: !getHbjson, options: [{
|
|
4769
|
+
type: 'radio',
|
|
4770
|
+
value: selOption,
|
|
4771
|
+
options: [
|
|
4772
|
+
{
|
|
4773
|
+
type: 'checkbox',
|
|
4774
|
+
id: 'subscribe',
|
|
4775
|
+
label: 'Subscribe',
|
|
4776
|
+
disabled: !getHbjson,
|
|
4777
|
+
onSelect: function () {
|
|
4778
|
+
setSelOption(function (state) { return state === 'subscribe' ? undefined : 'subscribe'; });
|
|
4779
|
+
setKey(performance.now().toString());
|
|
4780
|
+
},
|
|
4781
|
+
},
|
|
4782
|
+
{
|
|
4783
|
+
type: 'checkbox',
|
|
4784
|
+
id: 'selection',
|
|
4785
|
+
label: 'Select',
|
|
4786
|
+
disabled: !getHbjson,
|
|
4787
|
+
onSelect: function () {
|
|
4788
|
+
setSelOption(function (state) { return state === 'select' ? undefined : 'select'; });
|
|
4789
|
+
setKey(performance.now().toString());
|
|
4790
|
+
},
|
|
4791
|
+
},
|
|
4792
|
+
]
|
|
4793
|
+
}], label: 'Get Model', triggerIcon: selOption === 'select' ?
|
|
4794
|
+
React__default["default"].createElement(BoundingBox$1, { size: 16 }) :
|
|
4795
|
+
selOption === 'subscribe' ?
|
|
4796
|
+
React__default["default"].createElement(ArrowRepeat$1, { size: 16 }) :
|
|
4797
|
+
undefined }));
|
|
4642
4798
|
};
|
|
4643
4799
|
|
|
4800
|
+
var css_248z = ":root {\n --background: #FFFAEE;\n --primary: #1890ff;\n --primary2: #40a9ff;\n --primary0: #e6f7ff;\n --grey5: #8c8c8c;\n --grey3: #d0d7de;\n --secondary: #fff566;\n --font-color: #494949;\n}\n\n@media (prefers-color-scheme: dark) {\n :root {\n --background: #3c3c3c;\n --font-color: #fafafa;\n }\n}";
|
|
4801
|
+
styleInject(css_248z);
|
|
4802
|
+
|
|
4803
|
+
var getAction$1 = function (key) {
|
|
4804
|
+
switch (key) {
|
|
4805
|
+
case 'add':
|
|
4806
|
+
return 'BakeGeometry';
|
|
4807
|
+
case 'delete':
|
|
4808
|
+
return 'ClearGeometry';
|
|
4809
|
+
case 'preview':
|
|
4810
|
+
return 'DrawGeometry';
|
|
4811
|
+
case 'clear':
|
|
4812
|
+
return 'DisableDraw';
|
|
4813
|
+
case 'subscribe-preview':
|
|
4814
|
+
return 'DrawGeometry';
|
|
4815
|
+
}
|
|
4816
|
+
};
|
|
4644
4817
|
var SendGeometry = function (_a) {
|
|
4645
|
-
var geometry = _a.geometry;
|
|
4646
|
-
var _b = React.useState(
|
|
4647
|
-
var _c =
|
|
4648
|
-
|
|
4818
|
+
var geometry = _a.geometry, defaultAction = _a.defaultAction;
|
|
4819
|
+
var _b = React.useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : 'preview'), selOpt = _b[0], setSelOpt = _b[1];
|
|
4820
|
+
var _c = React.useState(performance.now().toString()), key = _c[0]; _c[1];
|
|
4821
|
+
var _d = useSendGeometry(); _d.host; _d.state; var sendGeometry = _d.sendGeometry;
|
|
4649
4822
|
React.useEffect(function () {
|
|
4650
|
-
if (!sendGeometry)
|
|
4823
|
+
if (!sendGeometry || selOpt !== 'subscribe-preview')
|
|
4651
4824
|
return;
|
|
4652
|
-
sendGeometry({
|
|
4825
|
+
sendGeometry('DrawGeometry', {
|
|
4653
4826
|
data: geometry,
|
|
4654
|
-
uniqueId:
|
|
4827
|
+
uniqueId: key,
|
|
4655
4828
|
options: {
|
|
4656
4829
|
layer: 'StreamlitLayer',
|
|
4657
4830
|
units: 'Meters',
|
|
4658
4831
|
},
|
|
4659
|
-
}
|
|
4660
|
-
}, [geometry,
|
|
4832
|
+
});
|
|
4833
|
+
}, [selOpt, geometry, sendGeometry, key]);
|
|
4661
4834
|
return (React__default["default"].createElement(SettingsButton, { disabled: !sendGeometry, onClick: function () {
|
|
4662
4835
|
if (!sendGeometry)
|
|
4663
4836
|
return;
|
|
4664
|
-
sendGeometry({
|
|
4837
|
+
sendGeometry(getAction$1(selOpt), {
|
|
4665
4838
|
data: geometry,
|
|
4666
|
-
uniqueId:
|
|
4839
|
+
uniqueId: key,
|
|
4667
4840
|
options: {
|
|
4668
4841
|
layer: 'StreamlitLayer',
|
|
4669
4842
|
units: 'Meters',
|
|
4670
4843
|
},
|
|
4671
|
-
}
|
|
4672
|
-
}, options: [
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4844
|
+
});
|
|
4845
|
+
}, options: [{
|
|
4846
|
+
type: 'radio',
|
|
4847
|
+
value: selOpt,
|
|
4848
|
+
options: [
|
|
4849
|
+
{
|
|
4850
|
+
type: 'radio',
|
|
4851
|
+
id: 'preview',
|
|
4852
|
+
label: 'Preview',
|
|
4853
|
+
disabled: !sendGeometry,
|
|
4854
|
+
onSelect: function () {
|
|
4855
|
+
setSelOpt(function (state) { return state === 'preview' ? undefined : 'preview'; });
|
|
4856
|
+
},
|
|
4857
|
+
},
|
|
4858
|
+
{
|
|
4859
|
+
type: 'radio',
|
|
4860
|
+
id: 'add',
|
|
4861
|
+
label: 'Add',
|
|
4862
|
+
disabled: !sendGeometry,
|
|
4863
|
+
onSelect: function () {
|
|
4864
|
+
setSelOpt(function (state) { return state === 'add' ? undefined : 'add'; });
|
|
4865
|
+
}
|
|
4866
|
+
},
|
|
4867
|
+
{
|
|
4868
|
+
type: 'radio',
|
|
4869
|
+
id: 'delete',
|
|
4870
|
+
label: 'Delete',
|
|
4871
|
+
disabled: !sendGeometry,
|
|
4872
|
+
onSelect: function () {
|
|
4873
|
+
setSelOpt(function (state) { return state === 'delete' ? undefined : 'delete'; });
|
|
4874
|
+
},
|
|
4875
|
+
},
|
|
4876
|
+
{
|
|
4877
|
+
type: 'radio',
|
|
4878
|
+
id: 'clear',
|
|
4879
|
+
label: 'Clear',
|
|
4880
|
+
disabled: !sendGeometry,
|
|
4881
|
+
onSelect: function () {
|
|
4882
|
+
setSelOpt(function (state) { return state === 'clear' ? undefined : 'clear'; });
|
|
4883
|
+
},
|
|
4884
|
+
},
|
|
4885
|
+
{
|
|
4886
|
+
type: 'radio',
|
|
4887
|
+
id: 'subscribe-preview',
|
|
4888
|
+
label: 'Subscribe Preview',
|
|
4889
|
+
disabled: !sendGeometry,
|
|
4890
|
+
onSelect: function () {
|
|
4891
|
+
setSelOpt(function (state) { return state === 'subscribe-preview' ? undefined : 'subscribe-preview'; });
|
|
4892
|
+
},
|
|
4893
|
+
},
|
|
4894
|
+
]
|
|
4895
|
+
}], label: "".concat(selOpt ? selOpt.split('-').map(function (o) { return o.charAt(0).toUpperCase() + o.slice(1); }).join(' ') : 'Send', " Geometry") }));
|
|
4682
4896
|
};
|
|
4683
4897
|
|
|
4684
|
-
var
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4898
|
+
var getAction = function (key) {
|
|
4899
|
+
switch (key) {
|
|
4900
|
+
case 'add':
|
|
4901
|
+
return 'BakePollinationModel';
|
|
4902
|
+
case 'preview':
|
|
4903
|
+
return 'DrawPollinationModel';
|
|
4904
|
+
case 'clear':
|
|
4905
|
+
return 'DisableDrawPollinationModel';
|
|
4906
|
+
case 'subscribe-preview':
|
|
4907
|
+
return 'DrawPollinationModel';
|
|
4908
|
+
}
|
|
4909
|
+
};
|
|
4910
|
+
var SendModel = function (_a) {
|
|
4911
|
+
var hbjson = _a.hbjson, defaultAction = _a.defaultAction;
|
|
4912
|
+
var _b = React.useState(defaultAction !== null && defaultAction !== void 0 ? defaultAction : 'preview'), selOpt = _b[0], setSelOpt = _b[1];
|
|
4913
|
+
var _c = React.useState(performance.now().toString()), key = _c[0]; _c[1];
|
|
4914
|
+
var _d = useSendHbjson(); _d.host; _d.state; var sendHbjson = _d.sendHbjson;
|
|
4689
4915
|
React.useEffect(function () {
|
|
4690
|
-
if (!sendHbjson)
|
|
4916
|
+
if (!sendHbjson || selOpt !== 'subscribe-preview')
|
|
4691
4917
|
return;
|
|
4692
|
-
sendHbjson({
|
|
4918
|
+
sendHbjson('DrawPollinationModel', {
|
|
4693
4919
|
data: hbjson,
|
|
4694
|
-
uniqueId:
|
|
4920
|
+
uniqueId: key,
|
|
4695
4921
|
options: {
|
|
4696
4922
|
layer: 'StreamlitLayer',
|
|
4697
4923
|
units: 'Meters',
|
|
4698
4924
|
},
|
|
4699
|
-
}
|
|
4700
|
-
}, [hbjson,
|
|
4925
|
+
});
|
|
4926
|
+
}, [selOpt, hbjson, sendHbjson, key]);
|
|
4701
4927
|
return (React__default["default"].createElement(SettingsButton, { disabled: !sendHbjson, onClick: function () {
|
|
4702
4928
|
if (!sendHbjson)
|
|
4703
4929
|
return;
|
|
4704
|
-
sendHbjson({
|
|
4930
|
+
sendHbjson(getAction(selOpt), {
|
|
4705
4931
|
data: hbjson,
|
|
4706
|
-
uniqueId:
|
|
4932
|
+
uniqueId: key,
|
|
4707
4933
|
options: {
|
|
4708
4934
|
layer: 'StreamlitLayer',
|
|
4709
4935
|
units: 'Meters',
|
|
4710
4936
|
},
|
|
4711
|
-
}
|
|
4712
|
-
}, options: [
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4937
|
+
});
|
|
4938
|
+
}, options: [{
|
|
4939
|
+
type: 'radio',
|
|
4940
|
+
value: selOpt,
|
|
4941
|
+
options: [
|
|
4942
|
+
{
|
|
4943
|
+
type: 'radio',
|
|
4944
|
+
id: 'preview',
|
|
4945
|
+
label: 'Preview',
|
|
4946
|
+
disabled: !sendHbjson,
|
|
4947
|
+
onSelect: function () {
|
|
4948
|
+
setSelOpt(function (state) { return state === 'preview' ? undefined : 'preview'; });
|
|
4949
|
+
},
|
|
4950
|
+
},
|
|
4951
|
+
{
|
|
4952
|
+
type: 'radio',
|
|
4953
|
+
id: 'add',
|
|
4954
|
+
label: 'Add',
|
|
4955
|
+
disabled: !sendHbjson,
|
|
4956
|
+
onSelect: function () {
|
|
4957
|
+
setSelOpt(function (state) { return state === 'add' ? undefined : 'add'; });
|
|
4958
|
+
}
|
|
4959
|
+
},
|
|
4960
|
+
{
|
|
4961
|
+
type: 'radio',
|
|
4962
|
+
id: 'clear',
|
|
4963
|
+
label: 'Clear',
|
|
4964
|
+
disabled: !sendHbjson,
|
|
4965
|
+
onSelect: function () {
|
|
4966
|
+
setSelOpt(function (state) { return state === 'clear' ? undefined : 'clear'; });
|
|
4967
|
+
},
|
|
4968
|
+
},
|
|
4969
|
+
{
|
|
4970
|
+
type: 'radio',
|
|
4971
|
+
id: 'subscribe-preview',
|
|
4972
|
+
label: 'Subscribe Preview',
|
|
4973
|
+
disabled: !sendHbjson,
|
|
4974
|
+
onSelect: function () {
|
|
4975
|
+
setSelOpt(function (state) { return state === 'subscribe-preview' ? undefined : 'subscribe-preview'; });
|
|
4976
|
+
},
|
|
4977
|
+
},
|
|
4978
|
+
]
|
|
4979
|
+
}], label: "".concat(selOpt ? selOpt.split('-').map(function (o) { return o.charAt(0).toUpperCase() + o.slice(1); }).join(' ') : 'Send', " Model") }));
|
|
4722
4980
|
};
|
|
4723
4981
|
|
|
4724
4982
|
exports.GetGeometry = GetGeometry;
|
|
4725
|
-
exports.
|
|
4983
|
+
exports.GetModel = GetModel;
|
|
4726
4984
|
exports.SendGeometry = SendGeometry;
|
|
4727
|
-
exports.
|
|
4985
|
+
exports.SendModel = SendModel;
|
|
4728
4986
|
exports.checkDotNet = checkDotNet;
|
|
4729
4987
|
exports.checkRuby = checkRuby;
|
|
4730
4988
|
exports.getHost = getHost;
|