@linkdlab/funcnodes_react_flow 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/css/style.css +3 -3
- package/dist/esm/index.esm.js +849 -37
- package/dist/types/frontend/dialog.d.ts +2 -1
- package/dist/types/frontend/dialog.d.ts.map +1 -1
- package/dist/types/frontend/funcnodesreactflow/index.d.ts +1 -1
- package/dist/types/frontend/funcnodesreactflow/index.d.ts.map +1 -1
- package/dist/types/frontend/header/index.d.ts.map +1 -1
- package/dist/types/frontend/lib.d.ts.map +1 -1
- package/dist/types/frontend/node/io/default_input_renderer.d.ts.map +1 -1
- package/dist/types/frontend/node/node.d.ts.map +1 -1
- package/dist/types/frontend/utils/progressbar.d.ts +48 -0
- package/dist/types/frontend/utils/progressbar.d.ts.map +1 -0
- package/dist/types/funcnodes/funcnodesworker.d.ts +14 -3
- package/dist/types/funcnodes/funcnodesworker.d.ts.map +1 -1
- package/dist/types/funcnodes/websocketworker.d.ts +3 -0
- package/dist/types/funcnodes/websocketworker.d.ts.map +1 -1
- package/dist/types/funcnodes/workermanager.d.ts.map +1 -1
- package/dist/types/index.d.ts +8 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/states/fnrfzst.d.ts +1 -1
- package/dist/types/states/fnrfzst.d.ts.map +1 -1
- package/dist/types/states/fnrfzst.t.d.ts +12 -2
- package/dist/types/states/fnrfzst.t.d.ts.map +1 -1
- package/dist/types/states/node.d.ts.map +1 -1
- package/dist/types/states/node.t.d.ts +2 -0
- package/dist/types/states/node.t.d.ts.map +1 -1
- package/dist/types/utils/autolayout/txt.d.ts +16 -0
- package/dist/types/utils/autolayout/txt.d.ts.map +1 -0
- package/dist/types/utils/data.d.ts +13 -0
- package/dist/types/utils/data.d.ts.map +1 -0
- package/dist/umd/index.umd.js +977 -86
- package/package.json +5 -3
package/dist/esm/index.esm.js
CHANGED
|
@@ -240,6 +240,16 @@ eval("\n\"use client\";\n\nvar _interopRequireDefault = __webpack_require__(/*!
|
|
|
240
240
|
|
|
241
241
|
/***/ }),
|
|
242
242
|
|
|
243
|
+
/***/ "../node_modules/@mui/icons-material/MenuRounded.js":
|
|
244
|
+
/*!**********************************************************!*\
|
|
245
|
+
!*** ../node_modules/@mui/icons-material/MenuRounded.js ***!
|
|
246
|
+
\**********************************************************/
|
|
247
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
248
|
+
|
|
249
|
+
eval("\n\"use client\";\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ \"../node_modules/@babel/runtime/helpers/interopRequireDefault.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ \"../node_modules/@mui/icons-material/utils/createSvgIcon.js\"));\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\nvar _default = exports[\"default\"] = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M4 18h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1m0-5h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1s.45 1 1 1M3 7c0 .55.45 1 1 1h16c.55 0 1-.45 1-1s-.45-1-1-1H4c-.55 0-1 .45-1 1\"\n}), 'MenuRounded');\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@mui/icons-material/MenuRounded.js?");
|
|
250
|
+
|
|
251
|
+
/***/ }),
|
|
252
|
+
|
|
243
253
|
/***/ "../node_modules/@mui/icons-material/PlayCircleFilled.js":
|
|
244
254
|
/*!***************************************************************!*\
|
|
245
255
|
!*** ../node_modules/@mui/icons-material/PlayCircleFilled.js ***!
|
|
@@ -320,6 +330,16 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
320
330
|
|
|
321
331
|
/***/ }),
|
|
322
332
|
|
|
333
|
+
/***/ "../node_modules/@mui/material/Stack/Stack.js":
|
|
334
|
+
/*!****************************************************!*\
|
|
335
|
+
!*** ../node_modules/@mui/material/Stack/Stack.js ***!
|
|
336
|
+
\****************************************************/
|
|
337
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
338
|
+
|
|
339
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ \"../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/system */ \"../node_modules/@mui/system/esm/Stack/createStack.js\");\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../styles/styled */ \"../node_modules/@mui/material/styles/styled.js\");\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../styles/useThemeProps */ \"../node_modules/@mui/material/styles/useThemeProps.js\");\n'use client';\n\n\n\n\n\nconst Stack = (0,_mui_system__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n createStyledComponent: (0,_styles_styled__WEBPACK_IMPORTED_MODULE_1__[\"default\"])('div', {\n name: 'MuiStack',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n }),\n useThemeProps: inProps => (0,_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_2__[\"default\"])({\n props: inProps,\n name: 'MuiStack'\n })\n});\n true ? Stack.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().node),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().elementType),\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'column'\n */\n direction: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(['column-reverse', 'column', 'row-reverse', 'row']), prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object)]),\n /**\n * Add an element between each child.\n */\n divider: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().node),\n /**\n * Defines the space between immediate children.\n * @default 0\n */\n spacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string)])), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().string)]),\n /**\n * The system prop, which allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool)])), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_3___default().object)]),\n /**\n * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.\n *\n * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),\n * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.\n *\n * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.\n * @default false\n */\n useFlexGap: (prop_types__WEBPACK_IMPORTED_MODULE_3___default().bool)\n} : 0;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Stack);\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@mui/material/Stack/Stack.js?");
|
|
340
|
+
|
|
341
|
+
/***/ }),
|
|
342
|
+
|
|
323
343
|
/***/ "../node_modules/@mui/material/SvgIcon/SvgIcon.js":
|
|
324
344
|
/*!********************************************************!*\
|
|
325
345
|
!*** ../node_modules/@mui/material/SvgIcon/SvgIcon.js ***!
|
|
@@ -500,6 +520,26 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
500
520
|
|
|
501
521
|
/***/ }),
|
|
502
522
|
|
|
523
|
+
/***/ "../node_modules/@mui/material/Typography/Typography.js":
|
|
524
|
+
/*!**************************************************************!*\
|
|
525
|
+
!*** ../node_modules/@mui/material/Typography/Typography.js ***!
|
|
526
|
+
\**************************************************************/
|
|
527
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
528
|
+
|
|
529
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ TypographyRoot: () => (/* binding */ TypographyRoot),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! prop-types */ \"../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! clsx */ \"../node_modules/clsx/dist/clsx.mjs\");\n/* harmony import */ var _mui_system_styleFunctionSx__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/system/styleFunctionSx */ \"../node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js\");\n/* harmony import */ var _mui_utils_composeClasses__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/utils/composeClasses */ \"../node_modules/@mui/utils/composeClasses/composeClasses.js\");\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/styled */ \"../node_modules/@mui/material/styles/styled.js\");\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/useThemeProps */ \"../node_modules/@mui/material/styles/useThemeProps.js\");\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/capitalize */ \"../node_modules/@mui/material/utils/capitalize.js\");\n/* harmony import */ var _typographyClasses__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./typographyClasses */ \"../node_modules/@mui/material/Typography/typographyClasses.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n'use client';\n\n\n\nconst _excluded = [\"align\", \"className\", \"component\", \"gutterBottom\", \"noWrap\", \"paragraph\", \"variant\", \"variantMapping\"];\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n align,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, ownerState.align !== 'inherit' && `align${(0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(align)}`, gutterBottom && 'gutterBottom', noWrap && 'noWrap', paragraph && 'paragraph']\n };\n return (0,_mui_utils_composeClasses__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(slots, _typographyClasses__WEBPACK_IMPORTED_MODULE_7__.getTypographyUtilityClass, classes);\n};\nconst TypographyRoot = (0,_styles_styled__WEBPACK_IMPORTED_MODULE_8__[\"default\"])('span', {\n name: 'MuiTypography',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.variant && styles[ownerState.variant], ownerState.align !== 'inherit' && styles[`align${(0,_utils_capitalize__WEBPACK_IMPORTED_MODULE_5__[\"default\"])(ownerState.align)}`], ownerState.noWrap && styles.noWrap, ownerState.gutterBottom && styles.gutterBottom, ownerState.paragraph && styles.paragraph];\n }\n})(({\n theme,\n ownerState\n}) => (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n margin: 0\n}, ownerState.variant === 'inherit' && {\n // Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.\n font: 'inherit'\n}, ownerState.variant !== 'inherit' && theme.typography[ownerState.variant], ownerState.align !== 'inherit' && {\n textAlign: ownerState.align\n}, ownerState.noWrap && {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n}, ownerState.gutterBottom && {\n marginBottom: '0.35em'\n}, ownerState.paragraph && {\n marginBottom: 16\n}));\nconst defaultVariantMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p',\n inherit: 'p'\n};\n\n// TODO v6: deprecate these color values in v5.x and remove the transformation in v6\nconst colorTransformations = {\n primary: 'primary.main',\n textPrimary: 'text.primary',\n secondary: 'secondary.main',\n textSecondary: 'text.secondary',\n error: 'error.main'\n};\nconst transformDeprecatedColors = color => {\n return colorTransformations[color] || color;\n};\nconst Typography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(function Typography(inProps, ref) {\n const themeProps = (0,_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_9__[\"default\"])({\n props: inProps,\n name: 'MuiTypography'\n });\n const color = transformDeprecatedColors(themeProps.color);\n const props = (0,_mui_system_styleFunctionSx__WEBPACK_IMPORTED_MODULE_10__[\"default\"])((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, themeProps, {\n color\n }));\n const {\n align = 'inherit',\n className,\n component,\n gutterBottom = false,\n noWrap = false,\n paragraph = false,\n variant = 'body1',\n variantMapping = defaultVariantMapping\n } = props,\n other = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, _excluded);\n const ownerState = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}, props, {\n align,\n color,\n className,\n component,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n variantMapping\n });\n const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(TypographyRoot, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n as: Component,\n ref: ref,\n ownerState: ownerState,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(classes.root, className)\n }, other));\n});\n true ? Typography.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Set the text-align on the component.\n * @default 'inherit'\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n /**\n * The content of the component.\n */\n children: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().node),\n /**\n * Override or extend the styles applied to the component.\n */\n classes: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object),\n /**\n * @ignore\n */\n className: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().elementType),\n /**\n * If `true`, the text will have a bottom margin.\n * @default false\n */\n gutterBottom: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n * @default false\n */\n noWrap: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n /**\n * If `true`, the element will be a paragraph element.\n * @default false\n */\n paragraph: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_11___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_11___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().bool)])), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object)]),\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_11___default().oneOf(['body1', 'body2', 'button', 'caption', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'inherit', 'overline', 'subtitle1', 'subtitle2']), (prop_types__WEBPACK_IMPORTED_MODULE_11___default().string)]),\n /**\n * The component maps the variant prop to a range of different HTML element types.\n * For instance, subtitle1 to `<h6>`.\n * If you wish to change that mapping, you can provide your own.\n * Alternatively, you can use the `component` prop.\n * @default {\n * h1: 'h1',\n * h2: 'h2',\n * h3: 'h3',\n * h4: 'h4',\n * h5: 'h5',\n * h6: 'h6',\n * subtitle1: 'h6',\n * subtitle2: 'h6',\n * body1: 'p',\n * body2: 'p',\n * inherit: 'p',\n * }\n */\n variantMapping: (prop_types__WEBPACK_IMPORTED_MODULE_11___default().object)\n} : 0;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Typography);\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@mui/material/Typography/Typography.js?");
|
|
530
|
+
|
|
531
|
+
/***/ }),
|
|
532
|
+
|
|
533
|
+
/***/ "../node_modules/@mui/material/Typography/typographyClasses.js":
|
|
534
|
+
/*!*********************************************************************!*\
|
|
535
|
+
!*** ../node_modules/@mui/material/Typography/typographyClasses.js ***!
|
|
536
|
+
\*********************************************************************/
|
|
537
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
538
|
+
|
|
539
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ getTypographyUtilityClass: () => (/* binding */ getTypographyUtilityClass)\n/* harmony export */ });\n/* harmony import */ var _mui_utils_generateUtilityClasses__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/utils/generateUtilityClasses */ \"../node_modules/@mui/utils/generateUtilityClasses/generateUtilityClasses.js\");\n/* harmony import */ var _mui_utils_generateUtilityClass__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils/generateUtilityClass */ \"../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js\");\n\n\nfunction getTypographyUtilityClass(slot) {\n return (0,_mui_utils_generateUtilityClass__WEBPACK_IMPORTED_MODULE_0__[\"default\"])('MuiTypography', slot);\n}\nconst typographyClasses = (0,_mui_utils_generateUtilityClasses__WEBPACK_IMPORTED_MODULE_1__[\"default\"])('MuiTypography', ['root', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'inherit', 'button', 'caption', 'overline', 'alignLeft', 'alignRight', 'alignCenter', 'alignJustify', 'noWrap', 'gutterBottom', 'paragraph']);\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (typographyClasses);\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@mui/material/Typography/typographyClasses.js?");
|
|
540
|
+
|
|
541
|
+
/***/ }),
|
|
542
|
+
|
|
503
543
|
/***/ "../node_modules/@mui/material/colors/blue.js":
|
|
504
544
|
/*!****************************************************!*\
|
|
505
545
|
!*** ../node_modules/@mui/material/colors/blue.js ***!
|
|
@@ -950,6 +990,16 @@ eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/he
|
|
|
950
990
|
|
|
951
991
|
/***/ }),
|
|
952
992
|
|
|
993
|
+
/***/ "../node_modules/@mui/system/esm/Stack/createStack.js":
|
|
994
|
+
/*!************************************************************!*\
|
|
995
|
+
!*** ../node_modules/@mui/system/esm/Stack/createStack.js ***!
|
|
996
|
+
\************************************************************/
|
|
997
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
998
|
+
|
|
999
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ createStack),\n/* harmony export */ style: () => (/* binding */ style)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! prop-types */ \"../node_modules/prop-types/index.js\");\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! clsx */ \"../node_modules/clsx/dist/clsx.mjs\");\n/* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/utils/deepmerge */ \"../node_modules/@mui/utils/deepmerge/deepmerge.js\");\n/* harmony import */ var _mui_utils_generateUtilityClass__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/utils/generateUtilityClass */ \"../node_modules/@mui/utils/generateUtilityClass/generateUtilityClass.js\");\n/* harmony import */ var _mui_utils_composeClasses__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/utils/composeClasses */ \"../node_modules/@mui/utils/composeClasses/composeClasses.js\");\n/* harmony import */ var _styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styled */ \"../node_modules/@mui/system/esm/styled.js\");\n/* harmony import */ var _useThemeProps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../useThemeProps */ \"../node_modules/@mui/system/esm/useThemeProps/useThemeProps.js\");\n/* harmony import */ var _styleFunctionSx__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../styleFunctionSx */ \"../node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js\");\n/* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../createTheme */ \"../node_modules/@mui/system/esm/createTheme/createTheme.js\");\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../breakpoints */ \"../node_modules/@mui/system/esm/breakpoints.js\");\n/* harmony import */ var _spacing__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../spacing */ \"../node_modules/@mui/system/esm/spacing.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\n\nconst _excluded = [\"component\", \"direction\", \"spacing\", \"divider\", \"children\", \"className\", \"useFlexGap\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst defaultTheme = (0,_createTheme__WEBPACK_IMPORTED_MODULE_5__[\"default\"])();\n// widening Theme to any so that the consumer can own the theme structure.\nconst defaultCreateStyledComponent = (0,_styled__WEBPACK_IMPORTED_MODULE_6__[\"default\"])('div', {\n name: 'MuiStack',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n});\nfunction useThemePropsDefault(props) {\n return (0,_useThemeProps__WEBPACK_IMPORTED_MODULE_7__[\"default\"])({\n props,\n name: 'MuiStack',\n defaultTheme\n });\n}\n\n/**\n * Return an array with the separator React element interspersed between\n * each React node of the input children.\n *\n * > joinChildren([1,2,3], 0)\n * [1,0,2,0,3]\n */\nfunction joinChildren(children, separator) {\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_2__.Children.toArray(children).filter(Boolean);\n return childrenArray.reduce((output, child, index) => {\n output.push(child);\n if (index < childrenArray.length - 1) {\n output.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.cloneElement(separator, {\n key: `separator-${index}`\n }));\n }\n return output;\n }, []);\n}\nconst getSideFromDirection = direction => {\n return {\n row: 'Left',\n 'row-reverse': 'Right',\n column: 'Top',\n 'column-reverse': 'Bottom'\n }[direction];\n};\nconst style = ({\n ownerState,\n theme\n}) => {\n let styles = (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n display: 'flex',\n flexDirection: 'column'\n }, (0,_breakpoints__WEBPACK_IMPORTED_MODULE_8__.handleBreakpoints)({\n theme\n }, (0,_breakpoints__WEBPACK_IMPORTED_MODULE_8__.resolveBreakpointValues)({\n values: ownerState.direction,\n breakpoints: theme.breakpoints.values\n }), propValue => ({\n flexDirection: propValue\n })));\n if (ownerState.spacing) {\n const transformer = (0,_spacing__WEBPACK_IMPORTED_MODULE_9__.createUnarySpacing)(theme);\n const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {\n if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {\n acc[breakpoint] = true;\n }\n return acc;\n }, {});\n const directionValues = (0,_breakpoints__WEBPACK_IMPORTED_MODULE_8__.resolveBreakpointValues)({\n values: ownerState.direction,\n base\n });\n const spacingValues = (0,_breakpoints__WEBPACK_IMPORTED_MODULE_8__.resolveBreakpointValues)({\n values: ownerState.spacing,\n base\n });\n if (typeof directionValues === 'object') {\n Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {\n const directionValue = directionValues[breakpoint];\n if (!directionValue) {\n const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';\n directionValues[breakpoint] = previousDirectionValue;\n }\n });\n }\n const styleFromPropValue = (propValue, breakpoint) => {\n if (ownerState.useFlexGap) {\n return {\n gap: (0,_spacing__WEBPACK_IMPORTED_MODULE_9__.getValue)(transformer, propValue)\n };\n }\n return {\n // The useFlexGap={false} implement relies on each child to give up control of the margin.\n // We need to reset the margin to avoid double spacing.\n '& > :not(style):not(style)': {\n margin: 0\n },\n '& > :not(style) ~ :not(style)': {\n [`margin${getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)}`]: (0,_spacing__WEBPACK_IMPORTED_MODULE_9__.getValue)(transformer, propValue)\n }\n };\n };\n styles = (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(styles, (0,_breakpoints__WEBPACK_IMPORTED_MODULE_8__.handleBreakpoints)({\n theme\n }, spacingValues, styleFromPropValue));\n }\n styles = (0,_breakpoints__WEBPACK_IMPORTED_MODULE_8__.mergeBreakpointsInOrder)(theme.breakpoints, styles);\n return styles;\n};\nfunction createStack(options = {}) {\n const {\n // This will allow adding custom styled fn (for example for custom sx style function)\n createStyledComponent = defaultCreateStyledComponent,\n useThemeProps = useThemePropsDefault,\n componentName = 'MuiStack'\n } = options;\n const useUtilityClasses = () => {\n const slots = {\n root: ['root']\n };\n return (0,_mui_utils_composeClasses__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(slots, slot => (0,_mui_utils_generateUtilityClass__WEBPACK_IMPORTED_MODULE_12__[\"default\"])(componentName, slot), {});\n };\n const StackRoot = createStyledComponent(style);\n const Stack = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.forwardRef(function Grid(inProps, ref) {\n const themeProps = useThemeProps(inProps);\n const props = (0,_styleFunctionSx__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(themeProps); // `color` type conflicts with html color attribute.\n const {\n component = 'div',\n direction = 'column',\n spacing = 0,\n divider,\n children,\n className,\n useFlexGap = false\n } = props,\n other = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[\"default\"])(props, _excluded);\n const ownerState = {\n direction,\n spacing,\n useFlexGap\n };\n const classes = useUtilityClasses();\n return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)(StackRoot, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n as: component,\n ownerState: ownerState,\n ref: ref,\n className: (0,clsx__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(classes.root, className)\n }, other, {\n children: divider ? joinChildren(children, divider) : children\n }));\n });\n true ? Stack.propTypes /* remove-proptypes */ = {\n children: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().node),\n direction: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOf(['column-reverse', 'column', 'row-reverse', 'row']), prop_types__WEBPACK_IMPORTED_MODULE_14___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object)]),\n divider: (prop_types__WEBPACK_IMPORTED_MODULE_14___default().node),\n spacing: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_14___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string)])), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().number), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().string)]),\n sx: prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_14___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_14___default().oneOfType([(prop_types__WEBPACK_IMPORTED_MODULE_14___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().bool)])), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().func), (prop_types__WEBPACK_IMPORTED_MODULE_14___default().object)])\n } : 0;\n return Stack;\n}\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@mui/system/esm/Stack/createStack.js?");
|
|
1000
|
+
|
|
1001
|
+
/***/ }),
|
|
1002
|
+
|
|
953
1003
|
/***/ "../node_modules/@mui/system/esm/borders.js":
|
|
954
1004
|
/*!**************************************************!*\
|
|
955
1005
|
!*** ../node_modules/@mui/system/esm/borders.js ***!
|
|
@@ -980,6 +1030,16 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
980
1030
|
|
|
981
1031
|
/***/ }),
|
|
982
1032
|
|
|
1033
|
+
/***/ "../node_modules/@mui/system/esm/createStyled.js":
|
|
1034
|
+
/*!*******************************************************!*\
|
|
1035
|
+
!*** ../node_modules/@mui/system/esm/createStyled.js ***!
|
|
1036
|
+
\*******************************************************/
|
|
1037
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1038
|
+
|
|
1039
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ createStyled),\n/* harmony export */ shouldForwardProp: () => (/* binding */ shouldForwardProp),\n/* harmony export */ systemDefaultTheme: () => (/* binding */ systemDefaultTheme)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ \"../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js\");\n/* harmony import */ var _mui_styled_engine__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/styled-engine */ \"../node_modules/@mui/styled-engine/index.js\");\n/* harmony import */ var _mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/utils/deepmerge */ \"../node_modules/@mui/utils/deepmerge/deepmerge.js\");\n/* harmony import */ var _mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/utils/capitalize */ \"../node_modules/@mui/utils/capitalize/capitalize.js\");\n/* harmony import */ var _mui_utils_getDisplayName__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/utils/getDisplayName */ \"../node_modules/@mui/utils/getDisplayName/getDisplayName.js\");\n/* harmony import */ var _createTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./createTheme */ \"../node_modules/@mui/system/esm/createTheme/createTheme.js\");\n/* harmony import */ var _styleFunctionSx__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./styleFunctionSx */ \"../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js\");\n\n\nconst _excluded = [\"ownerState\"],\n _excluded2 = [\"variants\"],\n _excluded3 = [\"name\", \"slot\", \"skipVariantsResolver\", \"skipSx\", \"overridesResolver\"];\n/* eslint-disable no-underscore-dangle */\n\n\n\n\n\n\nfunction isEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\n\n// Update /system/styled/#api in case if this changes\nfunction shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nconst systemDefaultTheme = (0,_createTheme__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\nconst lowercaseFirstLetter = string => {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n};\nfunction resolveTheme({\n defaultTheme,\n theme,\n themeId\n}) {\n return isEmpty(theme) ? defaultTheme : theme[themeId] || theme;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (props, styles) => styles[slot];\n}\nfunction processStyleArg(callableStyle, _ref) {\n let {\n ownerState\n } = _ref,\n props = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(_ref, _excluded);\n const resolvedStylesArg = typeof callableStyle === 'function' ? callableStyle((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ownerState\n }, props)) : callableStyle;\n if (Array.isArray(resolvedStylesArg)) {\n return resolvedStylesArg.flatMap(resolvedStyle => processStyleArg(resolvedStyle, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ownerState\n }, props)));\n }\n if (!!resolvedStylesArg && typeof resolvedStylesArg === 'object' && Array.isArray(resolvedStylesArg.variants)) {\n const {\n variants = []\n } = resolvedStylesArg,\n otherStyles = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(resolvedStylesArg, _excluded2);\n let result = otherStyles;\n variants.forEach(variant => {\n let isMatch = true;\n if (typeof variant.props === 'function') {\n isMatch = variant.props((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ownerState\n }, props, ownerState));\n } else {\n Object.keys(variant.props).forEach(key => {\n if ((ownerState == null ? void 0 : ownerState[key]) !== variant.props[key] && props[key] !== variant.props[key]) {\n isMatch = false;\n }\n });\n }\n if (isMatch) {\n if (!Array.isArray(result)) {\n result = [result];\n }\n result.push(typeof variant.style === 'function' ? variant.style((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n ownerState\n }, props, ownerState)) : variant.style);\n }\n });\n return result;\n }\n return resolvedStylesArg;\n}\nfunction createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n const systemSx = props => {\n return (0,_styleFunctionSx__WEBPACK_IMPORTED_MODULE_3__[\"default\"])((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n theme: resolveTheme((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n defaultTheme,\n themeId\n }))\n }));\n };\n systemSx.__mui_systemSx = true;\n return (tag, inputOptions = {}) => {\n // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.\n (0,_mui_styled_engine__WEBPACK_IMPORTED_MODULE_4__.internal_processStyles)(tag, styles => styles.filter(style => !(style != null && style.__mui_systemSx)));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))\n } = inputOptions,\n options = (0,_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[\"default\"])(inputOptions, _excluded3);\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let label;\n if (true) {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = (0,_mui_styled_engine__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(tag, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n shouldForwardProp: shouldForwardPropOption,\n label\n }, options));\n const transformStyleArg = stylesArg => {\n // On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n if (typeof stylesArg === 'function' && stylesArg.__emotion_real !== stylesArg || (0,_mui_utils_deepmerge__WEBPACK_IMPORTED_MODULE_5__.isPlainObject)(stylesArg)) {\n return props => processStyleArg(stylesArg, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n theme: resolveTheme({\n theme: props.theme,\n defaultTheme,\n themeId\n })\n }));\n }\n return stylesArg;\n };\n const muiStyledResolver = (styleArg, ...expressions) => {\n let transformedStyleArg = transformStyleArg(styleArg);\n const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];\n if (componentName && overridesResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = resolveTheme((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n defaultTheme,\n themeId\n }));\n if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {\n return null;\n }\n const styleOverrides = theme.components[componentName].styleOverrides;\n const resolvedStyleOverrides = {};\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {\n resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n theme\n }));\n });\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsWithDefaultTheme.push(props => {\n var _theme$components;\n const theme = resolveTheme((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n defaultTheme,\n themeId\n }));\n const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants;\n return processStyleArg({\n variants: themeVariants\n }, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n theme\n }));\n });\n }\n if (!skipSx) {\n expressionsWithDefaultTheme.push(systemSx);\n }\n const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;\n if (Array.isArray(styleArg) && numOfCustomFnsApplied > 0) {\n const placeholders = new Array(numOfCustomFnsApplied).fill('');\n // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.\n transformedStyleArg = [...styleArg, ...placeholders];\n transformedStyleArg.raw = [...styleArg.raw, ...placeholders];\n }\n const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);\n if (true) {\n let displayName;\n if (componentName) {\n displayName = `${componentName}${(0,_mui_utils_capitalize__WEBPACK_IMPORTED_MODULE_6__[\"default\"])(componentSlot || '')}`;\n }\n if (displayName === undefined) {\n displayName = `Styled(${(0,_mui_utils_getDisplayName__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(tag)})`;\n }\n Component.displayName = displayName;\n }\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n}\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@mui/system/esm/createStyled.js?");
|
|
1040
|
+
|
|
1041
|
+
/***/ }),
|
|
1042
|
+
|
|
983
1043
|
/***/ "../node_modules/@mui/system/esm/createTheme/applyStyles.js":
|
|
984
1044
|
/*!******************************************************************!*\
|
|
985
1045
|
!*** ../node_modules/@mui/system/esm/createTheme/applyStyles.js ***!
|
|
@@ -1160,6 +1220,16 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1160
1220
|
|
|
1161
1221
|
/***/ }),
|
|
1162
1222
|
|
|
1223
|
+
/***/ "../node_modules/@mui/system/esm/styled.js":
|
|
1224
|
+
/*!*************************************************!*\
|
|
1225
|
+
!*** ../node_modules/@mui/system/esm/styled.js ***!
|
|
1226
|
+
\*************************************************/
|
|
1227
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1228
|
+
|
|
1229
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _createStyled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createStyled */ \"../node_modules/@mui/system/esm/createStyled.js\");\n\nconst styled = (0,_createStyled__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styled);\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@mui/system/esm/styled.js?");
|
|
1230
|
+
|
|
1231
|
+
/***/ }),
|
|
1232
|
+
|
|
1163
1233
|
/***/ "../node_modules/@mui/system/esm/useTheme.js":
|
|
1164
1234
|
/*!***************************************************!*\
|
|
1165
1235
|
!*** ../node_modules/@mui/system/esm/useTheme.js ***!
|
|
@@ -1560,6 +1630,76 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1560
1630
|
|
|
1561
1631
|
/***/ }),
|
|
1562
1632
|
|
|
1633
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/Combination.js":
|
|
1634
|
+
/*!***********************************************************************************************************!*\
|
|
1635
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/Combination.js ***!
|
|
1636
|
+
\***********************************************************************************************************/
|
|
1637
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1638
|
+
|
|
1639
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ \"../node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _UI__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./UI */ \"../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/UI.js\");\n/* harmony import */ var _sidecar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./sidecar */ \"../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/sidecar.js\");\n\n\n\n\nvar ReactRemoveScroll = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, ref) {\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(_UI__WEBPACK_IMPORTED_MODULE_2__.RemoveScroll, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, props, {\n ref: ref,\n sideCar: _sidecar__WEBPACK_IMPORTED_MODULE_1__[\"default\"]\n }));\n});\nReactRemoveScroll.classNames = _UI__WEBPACK_IMPORTED_MODULE_2__.RemoveScroll.classNames;\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReactRemoveScroll);\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/Combination.js?");
|
|
1640
|
+
|
|
1641
|
+
/***/ }),
|
|
1642
|
+
|
|
1643
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/SideEffect.js":
|
|
1644
|
+
/*!**********************************************************************************************************!*\
|
|
1645
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/SideEffect.js ***!
|
|
1646
|
+
\**********************************************************************************************************/
|
|
1647
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1648
|
+
|
|
1649
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RemoveScrollSideCar: () => (/* binding */ RemoveScrollSideCar),\n/* harmony export */ getDeltaXY: () => (/* binding */ getDeltaXY),\n/* harmony export */ getTouchXY: () => (/* binding */ getTouchXY)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ \"../node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_remove_scroll_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-remove-scroll-bar */ \"../node_modules/react-remove-scroll-bar/dist/es2015/index.js\");\n/* harmony import */ var react_style_singleton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-style-singleton */ \"../node_modules/react-style-singleton/dist/es2015/index.js\");\n/* harmony import */ var _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./aggresiveCapture */ \"../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js\");\n/* harmony import */ var _handleScroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./handleScroll */ \"../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/handleScroll.js\");\n\n\n\n\n\n\nvar getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nvar getDeltaXY = function (event) {\n return [event.deltaX, event.deltaY];\n};\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) {\n return x[0] === y[0] && x[1] === y[1];\n};\nvar generateStyle = function (id) {\n return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\");\n};\nvar idCounter = 0;\nvar lockStack = [];\nfunction RemoveScrollSideCar(props) {\n var shouldPreventQueue = react__WEBPACK_IMPORTED_MODULE_0__.useRef([]);\n var touchStartRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef([0, 0]);\n var activeAxis = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n var id = react__WEBPACK_IMPORTED_MODULE_0__.useState(idCounter++)[0];\n var Style = react__WEBPACK_IMPORTED_MODULE_0__.useState(function () {\n return (0,react_style_singleton__WEBPACK_IMPORTED_MODULE_2__.styleSingleton)();\n })[0];\n var lastProps = react__WEBPACK_IMPORTED_MODULE_0__.useRef(props);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__spreadArray)([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) {\n return el.classList.add(\"allow-interactivity-\".concat(id));\n });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) {\n return el.classList.remove(\"allow-interactivity-\".concat(id));\n });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (event, parent) {\n if ('touches' in event && event.touches.length === 2) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n var canBeScrolledInMainDirection = (0,_handleScroll__WEBPACK_IMPORTED_MODULE_4__.locationCouldBeScrolled)(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n } else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = (0,_handleScroll__WEBPACK_IMPORTED_MODULE_4__.locationCouldBeScrolled)(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return (0,_handleScroll__WEBPACK_IMPORTED_MODULE_4__.handleScroll)(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) {\n return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta);\n })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function (node) {\n return node.contains(event.target);\n });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (name, delta, target, should) {\n var event = {\n name: name,\n delta: delta,\n target: target,\n should: should\n };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) {\n return e !== event;\n });\n }, 1);\n }, []);\n var scrollTouchStart = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove\n });\n document.addEventListener('wheel', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n document.addEventListener('touchmove', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) {\n return inst !== Style;\n });\n document.removeEventListener('wheel', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar,\n inert = props.inert;\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, inert ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(Style, {\n styles: generateStyle(id)\n }) : null, removeScrollBar ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_remove_scroll_bar__WEBPACK_IMPORTED_MODULE_1__.RemoveScrollBar, {\n gapMode: \"margin\"\n }) : null);\n}\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/SideEffect.js?");
|
|
1650
|
+
|
|
1651
|
+
/***/ }),
|
|
1652
|
+
|
|
1653
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/UI.js":
|
|
1654
|
+
/*!**************************************************************************************************!*\
|
|
1655
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/UI.js ***!
|
|
1656
|
+
\**************************************************************************************************/
|
|
1657
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1658
|
+
|
|
1659
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RemoveScroll: () => (/* binding */ RemoveScroll)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ \"../node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-remove-scroll-bar/constants */ \"../node_modules/react-remove-scroll-bar/dist/es2015/constants.js\");\n/* harmony import */ var use_callback_ref__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! use-callback-ref */ \"../node_modules/use-callback-ref/dist/es2015/useMergeRef.js\");\n/* harmony import */ var _medium__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./medium */ \"../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/medium.js\");\n\n\n\n\n\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, parentRef) {\n var ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n var _a = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing\n }),\n callbacks = _a[0],\n setCallbacks = _a[1];\n var forwardProps = props.forwardProps,\n children = props.children,\n className = props.className,\n removeScrollBar = props.removeScrollBar,\n enabled = props.enabled,\n shards = props.shards,\n sideCar = props.sideCar,\n noIsolation = props.noIsolation,\n inert = props.inert,\n allowPinchZoom = props.allowPinchZoom,\n _b = props.as,\n Container = _b === void 0 ? 'div' : _b,\n rest = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__rest)(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\"]);\n var SideCar = sideCar;\n var containerRef = (0,use_callback_ref__WEBPACK_IMPORTED_MODULE_3__.useMergeRefs)([ref, parentRef]);\n var containerProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, rest), callbacks);\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, enabled && react__WEBPACK_IMPORTED_MODULE_0__.createElement(SideCar, {\n sideCar: _medium__WEBPACK_IMPORTED_MODULE_4__.effectCar,\n removeScrollBar: removeScrollBar,\n shards: shards,\n noIsolation: noIsolation,\n inert: inert,\n setCallbacks: setCallbacks,\n allowPinchZoom: !!allowPinchZoom,\n lockRef: ref\n }), forwardProps ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(react__WEBPACK_IMPORTED_MODULE_0__.Children.only(children), (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, containerProps), {\n ref: containerRef\n })) : react__WEBPACK_IMPORTED_MODULE_0__.createElement(Container, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, containerProps, {\n className: className,\n ref: containerRef\n }), children));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false\n};\nRemoveScroll.classNames = {\n fullWidth: react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_1__.fullWidthClassName,\n zeroRight: react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_1__.zeroRightClassName\n};\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/UI.js?");
|
|
1660
|
+
|
|
1661
|
+
/***/ }),
|
|
1662
|
+
|
|
1663
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js":
|
|
1664
|
+
/*!****************************************************************************************************************!*\
|
|
1665
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js ***!
|
|
1666
|
+
\****************************************************************************************************************/
|
|
1667
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1668
|
+
|
|
1669
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ nonPassive: () => (/* binding */ nonPassive)\n/* harmony export */ });\nvar passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n }\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n } catch (err) {\n passiveSupported = false;\n }\n}\nvar nonPassive = passiveSupported ? {\n passive: false\n} : false;\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js?");
|
|
1670
|
+
|
|
1671
|
+
/***/ }),
|
|
1672
|
+
|
|
1673
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/handleScroll.js":
|
|
1674
|
+
/*!************************************************************************************************************!*\
|
|
1675
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/handleScroll.js ***!
|
|
1676
|
+
\************************************************************************************************************/
|
|
1677
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1678
|
+
|
|
1679
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ handleScroll: () => (/* binding */ handleScroll),\n/* harmony export */ locationCouldBeScrolled: () => (/* binding */ locationCouldBeScrolled)\n/* harmony export */ });\nvar alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible')\n );\n};\nvar elementCouldBeVScrolled = function (node) {\n return elementCanBeScrolled(node, 'overflowY');\n};\nvar elementCouldBeHScrolled = function (node) {\n return elementCanBeScrolled(node, 'overflowX');\n};\nvar locationCouldBeScrolled = function (axis, node) {\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current),\n s = _a[1],\n d = _a[2];\n if (s > d) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== document.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop,\n scrollHeight = _a.scrollHeight,\n clientHeight = _a.clientHeight;\n return [scrollTop, scrollHeight, clientHeight];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft,\n scrollWidth = _a.scrollWidth,\n clientWidth = _a.clientWidth;\n return [scrollLeft, scrollWidth, clientWidth];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nvar handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n var _a = getScrollVariables(axis, target),\n position = _a[0],\n scroll_1 = _a[1],\n capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n target = target.parentNode;\n } while (\n // portaled content\n !targetInLock && target !== document.body ||\n // self content\n targetInLock && (endTarget.contains(target) || endTarget === target));\n if (isDeltaPositive && (noOverscroll && availableScroll === 0 || !noOverscroll && delta > availableScroll)) {\n shouldCancelScroll = true;\n } else if (!isDeltaPositive && (noOverscroll && availableScrollTop === 0 || !noOverscroll && -delta > availableScrollTop)) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/handleScroll.js?");
|
|
1680
|
+
|
|
1681
|
+
/***/ }),
|
|
1682
|
+
|
|
1683
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/medium.js":
|
|
1684
|
+
/*!******************************************************************************************************!*\
|
|
1685
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/medium.js ***!
|
|
1686
|
+
\******************************************************************************************************/
|
|
1687
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1688
|
+
|
|
1689
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ effectCar: () => (/* binding */ effectCar)\n/* harmony export */ });\n/* harmony import */ var use_sidecar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! use-sidecar */ \"../node_modules/use-sidecar/dist/es2015/medium.js\");\n\nvar effectCar = (0,use_sidecar__WEBPACK_IMPORTED_MODULE_0__.createSidecarMedium)();\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/medium.js?");
|
|
1690
|
+
|
|
1691
|
+
/***/ }),
|
|
1692
|
+
|
|
1693
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/sidecar.js":
|
|
1694
|
+
/*!*******************************************************************************************************!*\
|
|
1695
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/sidecar.js ***!
|
|
1696
|
+
\*******************************************************************************************************/
|
|
1697
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1698
|
+
|
|
1699
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var use_sidecar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! use-sidecar */ \"../node_modules/use-sidecar/dist/es2015/exports.js\");\n/* harmony import */ var _SideEffect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SideEffect */ \"../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/SideEffect.js\");\n/* harmony import */ var _medium__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./medium */ \"../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/medium.js\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,use_sidecar__WEBPACK_IMPORTED_MODULE_0__.exportSidecar)(_medium__WEBPACK_IMPORTED_MODULE_1__.effectCar, _SideEffect__WEBPACK_IMPORTED_MODULE_2__.RemoveScrollSideCar));\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/sidecar.js?");
|
|
1700
|
+
|
|
1701
|
+
/***/ }),
|
|
1702
|
+
|
|
1563
1703
|
/***/ "../node_modules/@tanem/svg-injector/dist/svg-injector.esm.js":
|
|
1564
1704
|
/*!********************************************************************!*\
|
|
1565
1705
|
!*** ../node_modules/@tanem/svg-injector/dist/svg-injector.esm.js ***!
|
|
@@ -1810,6 +1950,16 @@ eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs
|
|
|
1810
1950
|
|
|
1811
1951
|
/***/ }),
|
|
1812
1952
|
|
|
1953
|
+
/***/ "../node_modules/react-dom/client.js":
|
|
1954
|
+
/*!*******************************************!*\
|
|
1955
|
+
!*** ../node_modules/react-dom/client.js ***!
|
|
1956
|
+
\*******************************************/
|
|
1957
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1958
|
+
|
|
1959
|
+
eval("\n\nvar m = __webpack_require__(/*! react-dom */ \"react-dom\");\nif (false) {} else {\n var i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n exports.createRoot = function (c, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.createRoot(c, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n exports.hydrateRoot = function (c, h, o) {\n i.usingClientEntryPoint = true;\n try {\n return m.hydrateRoot(c, h, o);\n } finally {\n i.usingClientEntryPoint = false;\n }\n };\n}\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/react-dom/client.js?");
|
|
1960
|
+
|
|
1961
|
+
/***/ }),
|
|
1962
|
+
|
|
1813
1963
|
/***/ "../node_modules/react-is/cjs/react-is.development.js":
|
|
1814
1964
|
/*!************************************************************!*\
|
|
1815
1965
|
!*** ../node_modules/react-is/cjs/react-is.development.js ***!
|
|
@@ -1896,7 +2046,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1896
2046
|
\*********************************************************************/
|
|
1897
2047
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1898
2048
|
|
|
1899
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RemoveScrollSideCar: () => (/* binding */ RemoveScrollSideCar),\n/* harmony export */ getDeltaXY: () => (/* binding */ getDeltaXY),\n/* harmony export */ getTouchXY: () => (/* binding */ getTouchXY)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ \"../node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_remove_scroll_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-remove-scroll-bar */ \"../node_modules/react-remove-scroll-bar/dist/es2015/index.js\");\n/* harmony import */ var react_style_singleton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-style-singleton */ \"../node_modules/react-style-singleton/dist/es2015/index.js\");\n/* harmony import */ var _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./aggresiveCapture */ \"../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js\");\n/* harmony import */ var _handleScroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./handleScroll */ \"../node_modules/react-remove-scroll/dist/es2015/handleScroll.js\");\n\n\n\n\n\n\nvar getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nvar getDeltaXY = function (event) {\n return [event.deltaX, event.deltaY];\n};\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) {\n return x[0] === y[0] && x[1] === y[1];\n};\nvar generateStyle = function (id) {\n return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\");\n};\nvar idCounter = 0;\nvar lockStack = [];\nfunction RemoveScrollSideCar(props) {\n var shouldPreventQueue = react__WEBPACK_IMPORTED_MODULE_0__.useRef([]);\n var touchStartRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef([0, 0]);\n var activeAxis = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n var id = react__WEBPACK_IMPORTED_MODULE_0__.useState(idCounter++)[0];\n var Style = react__WEBPACK_IMPORTED_MODULE_0__.useState(
|
|
2049
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RemoveScrollSideCar: () => (/* binding */ RemoveScrollSideCar),\n/* harmony export */ getDeltaXY: () => (/* binding */ getDeltaXY),\n/* harmony export */ getTouchXY: () => (/* binding */ getTouchXY)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ \"../node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_remove_scroll_bar__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-remove-scroll-bar */ \"../node_modules/react-remove-scroll-bar/dist/es2015/index.js\");\n/* harmony import */ var react_style_singleton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-style-singleton */ \"../node_modules/react-style-singleton/dist/es2015/index.js\");\n/* harmony import */ var _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./aggresiveCapture */ \"../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js\");\n/* harmony import */ var _handleScroll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./handleScroll */ \"../node_modules/react-remove-scroll/dist/es2015/handleScroll.js\");\n\n\n\n\n\n\nvar getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nvar getDeltaXY = function (event) {\n return [event.deltaX, event.deltaY];\n};\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) {\n return x[0] === y[0] && x[1] === y[1];\n};\nvar generateStyle = function (id) {\n return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\");\n};\nvar idCounter = 0;\nvar lockStack = [];\nfunction RemoveScrollSideCar(props) {\n var shouldPreventQueue = react__WEBPACK_IMPORTED_MODULE_0__.useRef([]);\n var touchStartRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef([0, 0]);\n var activeAxis = react__WEBPACK_IMPORTED_MODULE_0__.useRef();\n var id = react__WEBPACK_IMPORTED_MODULE_0__.useState(idCounter++)[0];\n var Style = react__WEBPACK_IMPORTED_MODULE_0__.useState(react_style_singleton__WEBPACK_IMPORTED_MODULE_2__.styleSingleton)[0];\n var lastProps = react__WEBPACK_IMPORTED_MODULE_0__.useRef(props);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__spreadArray)([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) {\n return el.classList.add(\"allow-interactivity-\".concat(id));\n });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) {\n return el.classList.remove(\"allow-interactivity-\".concat(id));\n });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (event, parent) {\n if ('touches' in event && event.touches.length === 2 || event.type === 'wheel' && event.ctrlKey) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n var canBeScrolledInMainDirection = (0,_handleScroll__WEBPACK_IMPORTED_MODULE_4__.locationCouldBeScrolled)(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n } else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = (0,_handleScroll__WEBPACK_IMPORTED_MODULE_4__.locationCouldBeScrolled)(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return (0,_handleScroll__WEBPACK_IMPORTED_MODULE_4__.handleScroll)(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) {\n return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta);\n })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || []).map(extractRef).filter(Boolean).filter(function (node) {\n return node.contains(event.target);\n });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (name, delta, target, should) {\n var event = {\n name: name,\n delta: delta,\n target: target,\n should: should,\n shadowParent: getOutermostShadowParent(target)\n };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) {\n return e !== event;\n });\n }, 1);\n }, []);\n var scrollTouchStart = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove\n });\n document.addEventListener('wheel', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n document.addEventListener('touchmove', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) {\n return inst !== Style;\n });\n document.removeEventListener('wheel', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, _aggresiveCapture__WEBPACK_IMPORTED_MODULE_5__.nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar,\n inert = props.inert;\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, inert ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(Style, {\n styles: generateStyle(id)\n }) : null, removeScrollBar ? react__WEBPACK_IMPORTED_MODULE_0__.createElement(react_remove_scroll_bar__WEBPACK_IMPORTED_MODULE_1__.RemoveScrollBar, {\n gapMode: props.gapMode\n }) : null);\n}\nfunction getOutermostShadowParent(node) {\n var shadowParent = null;\n while (node !== null) {\n if (node instanceof ShadowRoot) {\n shadowParent = node.host;\n node = node.host;\n }\n node = node.parentNode;\n }\n return shadowParent;\n}\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/react-remove-scroll/dist/es2015/SideEffect.js?");
|
|
1900
2050
|
|
|
1901
2051
|
/***/ }),
|
|
1902
2052
|
|
|
@@ -1906,7 +2056,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1906
2056
|
\*************************************************************/
|
|
1907
2057
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1908
2058
|
|
|
1909
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RemoveScroll: () => (/* binding */ RemoveScroll)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ \"../node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-remove-scroll-bar/constants */ \"../node_modules/react-remove-scroll-bar/dist/es2015/constants.js\");\n/* harmony import */ var use_callback_ref__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! use-callback-ref */ \"../node_modules/use-callback-ref/dist/es2015/useMergeRef.js\");\n/* harmony import */ var _medium__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./medium */ \"../node_modules/react-remove-scroll/dist/es2015/medium.js\");\n\n\n\n\n\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, parentRef) {\n var ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n var _a = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing\n }),\n callbacks = _a[0],\n setCallbacks = _a[1];\n var forwardProps = props.forwardProps,\n children = props.children,\n className = props.className,\n removeScrollBar = props.removeScrollBar,\n enabled = props.enabled,\n shards = props.shards,\n sideCar = props.sideCar,\n noIsolation = props.noIsolation,\n inert = props.inert,\n allowPinchZoom = props.allowPinchZoom,\n _b = props.as,\n Container = _b === void 0 ? 'div' : _b,\n rest = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__rest)(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\"]);\n var SideCar = sideCar;\n var containerRef = (0,use_callback_ref__WEBPACK_IMPORTED_MODULE_3__.useMergeRefs)([ref, parentRef]);\n var containerProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, rest), callbacks);\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, enabled && react__WEBPACK_IMPORTED_MODULE_0__.createElement(SideCar, {\n sideCar: _medium__WEBPACK_IMPORTED_MODULE_4__.effectCar,\n removeScrollBar: removeScrollBar,\n shards: shards,\n noIsolation: noIsolation,\n inert: inert,\n setCallbacks: setCallbacks,\n allowPinchZoom: !!allowPinchZoom,\n lockRef: ref\n }), forwardProps ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(react__WEBPACK_IMPORTED_MODULE_0__.Children.only(children), (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, containerProps), {\n ref: containerRef\n })) : react__WEBPACK_IMPORTED_MODULE_0__.createElement(Container, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, containerProps, {\n className: className,\n ref: containerRef\n }), children));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false\n};\nRemoveScroll.classNames = {\n fullWidth: react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_1__.fullWidthClassName,\n zeroRight: react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_1__.zeroRightClassName\n};\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/react-remove-scroll/dist/es2015/UI.js?");
|
|
2059
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RemoveScroll: () => (/* binding */ RemoveScroll)\n/* harmony export */ });\n/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ \"../node_modules/tslib/tslib.es6.mjs\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-remove-scroll-bar/constants */ \"../node_modules/react-remove-scroll-bar/dist/es2015/constants.js\");\n/* harmony import */ var use_callback_ref__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! use-callback-ref */ \"../node_modules/use-callback-ref/dist/es2015/useMergeRef.js\");\n/* harmony import */ var _medium__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./medium */ \"../node_modules/react-remove-scroll/dist/es2015/medium.js\");\n\n\n\n\n\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function (props, parentRef) {\n var ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n var _a = react__WEBPACK_IMPORTED_MODULE_0__.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing\n }),\n callbacks = _a[0],\n setCallbacks = _a[1];\n var forwardProps = props.forwardProps,\n children = props.children,\n className = props.className,\n removeScrollBar = props.removeScrollBar,\n enabled = props.enabled,\n shards = props.shards,\n sideCar = props.sideCar,\n noIsolation = props.noIsolation,\n inert = props.inert,\n allowPinchZoom = props.allowPinchZoom,\n _b = props.as,\n Container = _b === void 0 ? 'div' : _b,\n gapMode = props.gapMode,\n rest = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__rest)(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\", \"gapMode\"]);\n var SideCar = sideCar;\n var containerRef = (0,use_callback_ref__WEBPACK_IMPORTED_MODULE_3__.useMergeRefs)([ref, parentRef]);\n var containerProps = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, rest), callbacks);\n return react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, enabled && react__WEBPACK_IMPORTED_MODULE_0__.createElement(SideCar, {\n sideCar: _medium__WEBPACK_IMPORTED_MODULE_4__.effectCar,\n removeScrollBar: removeScrollBar,\n shards: shards,\n noIsolation: noIsolation,\n inert: inert,\n setCallbacks: setCallbacks,\n allowPinchZoom: !!allowPinchZoom,\n lockRef: ref,\n gapMode: gapMode\n }), forwardProps ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(react__WEBPACK_IMPORTED_MODULE_0__.Children.only(children), (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, containerProps), {\n ref: containerRef\n })) : react__WEBPACK_IMPORTED_MODULE_0__.createElement(Container, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, containerProps, {\n className: className,\n ref: containerRef\n }), children));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false\n};\nRemoveScroll.classNames = {\n fullWidth: react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_1__.fullWidthClassName,\n zeroRight: react_remove_scroll_bar_constants__WEBPACK_IMPORTED_MODULE_1__.zeroRightClassName\n};\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/react-remove-scroll/dist/es2015/UI.js?");
|
|
1910
2060
|
|
|
1911
2061
|
/***/ }),
|
|
1912
2062
|
|
|
@@ -1926,7 +2076,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1926
2076
|
\***********************************************************************/
|
|
1927
2077
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1928
2078
|
|
|
1929
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ handleScroll: () => (/* binding */ handleScroll),\n/* harmony export */ locationCouldBeScrolled: () => (/* binding */ locationCouldBeScrolled)\n/* harmony export */ });\nvar alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible')\n );\n};\nvar elementCouldBeVScrolled = function (node) {\n return elementCanBeScrolled(node, 'overflowY');\n};\nvar elementCouldBeHScrolled = function (node) {\n return elementCanBeScrolled(node, 'overflowX');\n};\nvar locationCouldBeScrolled = function (axis, node) {\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current),\n
|
|
2079
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ handleScroll: () => (/* binding */ handleScroll),\n/* harmony export */ locationCouldBeScrolled: () => (/* binding */ locationCouldBeScrolled)\n/* harmony export */ });\nvar alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible')\n );\n};\nvar elementCouldBeVScrolled = function (node) {\n return elementCanBeScrolled(node, 'overflowY');\n};\nvar elementCouldBeHScrolled = function (node) {\n return elementCanBeScrolled(node, 'overflowX');\n};\nvar locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current),\n scrollHeight = _a[1],\n clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop,\n scrollHeight = _a.scrollHeight,\n clientHeight = _a.clientHeight;\n return [scrollTop, scrollHeight, clientHeight];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft,\n scrollWidth = _a.scrollWidth,\n clientWidth = _a.clientWidth;\n return [scrollLeft, scrollWidth, clientWidth];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nvar handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n var _a = getScrollVariables(axis, target),\n position = _a[0],\n scroll_1 = _a[1],\n capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n if (target instanceof ShadowRoot) {\n target = target.host;\n } else {\n target = target.parentNode;\n }\n } while (\n // portaled content\n !targetInLock && target !== document.body ||\n // self content\n targetInLock && (endTarget.contains(target) || endTarget === target));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive && (noOverscroll && Math.abs(availableScroll) < 1 || !noOverscroll && delta > availableScroll)) {\n shouldCancelScroll = true;\n } else if (!isDeltaPositive && (noOverscroll && Math.abs(availableScrollTop) < 1 || !noOverscroll && -delta > availableScrollTop)) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/react-remove-scroll/dist/es2015/handleScroll.js?");
|
|
1930
2080
|
|
|
1931
2081
|
/***/ }),
|
|
1932
2082
|
|
|
@@ -2436,7 +2586,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2436
2586
|
\*********************************/
|
|
2437
2587
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2438
2588
|
|
|
2439
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-dialog */ \"../node_modules/@radix-ui/react-dialog/dist/index.mjs\");\n/* harmony import */ var _mui_icons_material_Close__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/icons-material/Close */ \"../node_modules/@mui/icons-material/Close.js\");\n/* harmony import */ var _dialog_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dialog.scss */ \"./src/frontend/dialog.scss\");\n\n\n\n\nvar CustomDialog = function (_a) {\n var trigger = _a.trigger, title = _a.title, description = _a.description, children = _a.children, _b = _a.closebutton, closebutton = _b === void 0 ? true : _b, onOpenChange = _a.onOpenChange, _c = _a.buttons, buttons = _c === void 0 ? [] : _c, open = _a.open, setOpen = _a.setOpen;\n var handleOpenChange = function (isOpen) {\n if (setOpen) {\n setOpen(isOpen);\n }\n if (onOpenChange) {\n onOpenChange(isOpen);\n }\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Root, { open: open, onOpenChange: handleOpenChange },\n trigger && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Trigger, { asChild: true }, trigger),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Portal, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Overlay, { className: \"dialogoverlay\" }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Content, { className: \"dialogconent\" },\n title && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Title, { className: \"dialogtitle\" }, title)),\n description && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Description, { className: \"dialogdescription\" }, description)),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"dialogchildren\" }, children),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { style: {\n display: \"flex\",\n marginTop: 25,\n justifyContent: \"flex-end\",\n } }, (buttons || []).map(function (button, index) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Close, { asChild: true, key: index },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"dialogsendbutton\", onClick: button.onClick }, button.text))); })),\n closebutton && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Close, { asChild: true },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"dialogclosebutton\", \"aria-label\": \"Close\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_Close__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null))))))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CustomDialog);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/dialog.tsx?");
|
|
2589
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-dialog */ \"../node_modules/@radix-ui/react-dialog/dist/index.mjs\");\n/* harmony import */ var _mui_icons_material_Close__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/icons-material/Close */ \"../node_modules/@mui/icons-material/Close.js\");\n/* harmony import */ var _dialog_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dialog.scss */ \"./src/frontend/dialog.scss\");\n\n\n\n\nvar CustomDialog = function (_a) {\n var trigger = _a.trigger, title = _a.title, description = _a.description, children = _a.children, _b = _a.closebutton, closebutton = _b === void 0 ? true : _b, onOpenChange = _a.onOpenChange, _c = _a.buttons, buttons = _c === void 0 ? [] : _c, open = _a.open, setOpen = _a.setOpen, _d = _a.modal, modal = _d === void 0 ? true : _d;\n var handleOpenChange = function (isOpen) {\n if (setOpen) {\n setOpen(isOpen);\n }\n if (onOpenChange) {\n onOpenChange(isOpen);\n }\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Root, { open: open, onOpenChange: handleOpenChange, modal: modal },\n trigger && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Trigger, { asChild: true }, trigger),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Portal, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Overlay, { className: \"dialogoverlay\" }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Content, { className: \"dialogconent\" },\n title && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Title, { className: \"dialogtitle\" }, title)),\n description && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Description, { className: \"dialogdescription\" }, description)),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"dialogchildren\" }, children),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { style: {\n display: \"flex\",\n marginTop: 25,\n justifyContent: \"flex-end\",\n } }, (buttons || []).map(function (button, index) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Close, { asChild: true, key: index },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"dialogsendbutton\", onClick: button.onClick }, button.text))); })),\n closebutton && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dialog__WEBPACK_IMPORTED_MODULE_2__.Close, { asChild: true },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"dialogclosebutton\", \"aria-label\": \"Close\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_Close__WEBPACK_IMPORTED_MODULE_3__[\"default\"], null))))))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CustomDialog);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/dialog.tsx?");
|
|
2440
2590
|
|
|
2441
2591
|
/***/ }),
|
|
2442
2592
|
|
|
@@ -2456,7 +2606,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2456
2606
|
\***************************************************/
|
|
2457
2607
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2458
2608
|
|
|
2459
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FuncNodesContext: () => (/* binding */ FuncNodesContext),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _states_fnrfzst__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../states/fnrfzst */ \"./src/states/fnrfzst.ts\");\n/* harmony import */ var _funcnodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../funcnodes */ \"./src/funcnodes/index.ts\");\n/* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../header */ \"./src/frontend/header/index.tsx\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../lib */ \"./src/frontend/lib.tsx\");\n/* harmony import */ var _react_flow_layer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./react_flow_layer */ \"./src/frontend/funcnodesreactflow/react_flow_layer.tsx\");\n/* harmony import */ var _datarenderer_rendermappings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../datarenderer/rendermappings */ \"./src/frontend/datarenderer/rendermappings.tsx\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../node */ \"./src/frontend/node/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n\n\n\n\nvar FuncNodesContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)((0,_states_fnrfzst__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}));\nvar InnerFuncnodesReactFlow = function (_a) {\n var fnrf_zst = _a.fnrf_zst, header = _a.header;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), workermanageruri = _b[0], setWorkermanageruri = _b[1];\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(fnrf_zst.options.default_worker), worker = _c[0], setWorker = _c[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n function fetch_worker_manager() {\n return __awaiter(this, void 0, void 0, function () {\n var response, workerewsuri;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, fetch(\"/worker_manager\")];\n case 1:\n response = _a.sent();\n return [4 /*yield*/, response.text()];\n case 2:\n workerewsuri = _a.sent();\n setWorkermanageruri(workerewsuri);\n return [2 /*return*/];\n }\n });\n });\n }\n if (fnrf_zst.options.useWorkerManager)\n fetch_worker_manager();\n }, []);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n if (workermanageruri) {\n var workermanager = new _funcnodes__WEBPACK_IMPORTED_MODULE_2__.WorkerManager(workermanageruri, fnrf_zst);\n workermanager.on_setWorker = setWorker;\n fnrf_zst.workermanager = workermanager;\n }\n }, [workermanageruri]);\n fnrf_zst.worker
|
|
2609
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FuncNodesContext: () => (/* binding */ FuncNodesContext),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _states_fnrfzst__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../states/fnrfzst */ \"./src/states/fnrfzst.ts\");\n/* harmony import */ var _funcnodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../funcnodes */ \"./src/funcnodes/index.ts\");\n/* harmony import */ var _header__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../header */ \"./src/frontend/header/index.tsx\");\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../lib */ \"./src/frontend/lib.tsx\");\n/* harmony import */ var _react_flow_layer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./react_flow_layer */ \"./src/frontend/funcnodesreactflow/react_flow_layer.tsx\");\n/* harmony import */ var _datarenderer_rendermappings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../datarenderer/rendermappings */ \"./src/frontend/datarenderer/rendermappings.tsx\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../node */ \"./src/frontend/node/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n\n\n\n\nvar FuncNodesContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)((0,_states_fnrfzst__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({}));\nvar InnerFuncnodesReactFlow = function (_a) {\n var fnrf_zst = _a.fnrf_zst, header = _a.header;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), workermanageruri = _b[0], setWorkermanageruri = _b[1];\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(fnrf_zst.options.default_worker), worker = _c[0], setWorker = _c[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n function fetch_worker_manager() {\n return __awaiter(this, void 0, void 0, function () {\n var response, workerewsuri;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, fetch(\"/worker_manager\")];\n case 1:\n response = _a.sent();\n return [4 /*yield*/, response.text()];\n case 2:\n workerewsuri = _a.sent();\n setWorkermanageruri(workerewsuri);\n return [2 /*return*/];\n }\n });\n });\n }\n if (fnrf_zst.options.useWorkerManager)\n fetch_worker_manager();\n }, []);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n if (workermanageruri) {\n var workermanager = new _funcnodes__WEBPACK_IMPORTED_MODULE_2__.WorkerManager(workermanageruri, fnrf_zst);\n workermanager.on_setWorker = setWorker;\n fnrf_zst.workermanager = workermanager;\n }\n }, [workermanageruri]);\n fnrf_zst.set_worker(worker);\n fnrf_zst.auto_progress();\n // const worker = new WebSocketWorker(\"ws://localhost:9382\", fnrf_zst);\n // fnrf_zst.worker = worker;\n var plugins = fnrf_zst.plugins();\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_datarenderer_rendermappings__WEBPACK_IMPORTED_MODULE_6__.RenderMappingProvider, { plugins: plugins, fnrf_zst: fnrf_zst },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(FuncNodesContext.Provider, { value: fnrf_zst },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"funcnodesreactflowcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_header__WEBPACK_IMPORTED_MODULE_3__[\"default\"], __assign({}, header)),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"funcnodesreactflowbody\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_lib__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_react_flow_layer__WEBPACK_IMPORTED_MODULE_5__[\"default\"], null),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_node__WEBPACK_IMPORTED_MODULE_7__.NodeSettings, null))))));\n};\nvar FUNCNODESREACTFLOW_MAPPER = {};\nvar FuncnodesReactFlow = function (_a) {\n var _b = _a.useWorkerManager, useWorkerManager = _b === void 0 ? true : _b, _c = _a.default_worker, default_worker = _c === void 0 ? undefined : _c, _d = _a.on_sync_complete, on_sync_complete = _d === void 0 ? undefined : _d, _e = _a.header, header = _e === void 0 ? {} : _e, id = _a.id;\n if (!useWorkerManager && default_worker === undefined) {\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null, \"Error: If you don't use a worker manager, you must provide a default worker.\"));\n }\n if (id === undefined || id === null) {\n id = \"fnrf_\" + Math.random().toString(36).substring(7);\n }\n // @ts-ignore\n if (window.fnrf_zst === undefined) {\n // @ts-ignore\n window.fnrf_zst = FUNCNODESREACTFLOW_MAPPER;\n }\n if (FUNCNODESREACTFLOW_MAPPER[id] === undefined) {\n var fnrf_zst = (0,_states_fnrfzst__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({\n useWorkerManager: useWorkerManager,\n default_worker: default_worker,\n on_sync_complete: on_sync_complete,\n });\n FUNCNODESREACTFLOW_MAPPER[id] = fnrf_zst;\n }\n if (default_worker) {\n default_worker.set_zustand(FUNCNODESREACTFLOW_MAPPER[id]);\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(InnerFuncnodesReactFlow, { fnrf_zst: FUNCNODESREACTFLOW_MAPPER[id], header: header }));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FuncnodesReactFlow);\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/funcnodesreactflow/index.tsx?");
|
|
2460
2610
|
|
|
2461
2611
|
/***/ }),
|
|
2462
2612
|
|
|
@@ -2466,7 +2616,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2466
2616
|
\**************************************************************/
|
|
2467
2617
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2468
2618
|
|
|
2469
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var reactflow_dist_style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reactflow/dist/style.css */ \"../node_modules/reactflow/dist/style.css\");\n/* harmony import */ var _funcnodesreactflow_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./funcnodesreactflow.scss */ \"./src/frontend/funcnodesreactflow/funcnodesreactflow.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! reactflow */ \"../node_modules/@reactflow/core/dist/esm/index.mjs\");\n/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! reactflow */ \"../node_modules/@reactflow/background/dist/esm/index.mjs\");\n/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! reactflow */ \"../node_modules/@reactflow/minimap/dist/esm/index.mjs\");\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! .. */ \"./src/frontend/index.tsx\");\n/* harmony import */ var zustand_react_shallow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! zustand/react/shallow */ \"../node_modules/zustand/esm/react/shallow.mjs\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../node */ \"./src/frontend/node/index.tsx\");\n/* harmony import */ var _edge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../edge */ \"./src/frontend/edge.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n// import { useForceGraph } from \"../../utils/autolayout\";\nvar selector = function (state) { return ({\n nodes: state.nodes,\n edges: state.edges,\n onNodesChange: state.onNodesChange,\n onEdgesChange: state.onEdgesChange,\n onConnect: state.onConnect,\n}); };\nvar nodeTypes = { default: _node__WEBPACK_IMPORTED_MODULE_4__[\"default\"] };\nvar edgeTypes = {\n default: _edge__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n};\nvar ReactFlowManager = function () {\n var rfinstance = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useReactFlow)();\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(___WEBPACK_IMPORTED_MODULE_3__.FuncNodesContext);\n fnrf_zst.rf_instance = rfinstance;\n // useForceGraph();\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n};\nvar KeyHandler = function () {\n var _a;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(___WEBPACK_IMPORTED_MODULE_3__.FuncNodesContext);\n var delPressed = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useKeyPress)(\"Delete\");\n var edges = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useEdges)();\n var nodes = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useNodes)();\n if (delPressed) {\n for (var _i = 0, edges_1 = edges; _i < edges_1.length; _i++) {\n var edge = edges_1[_i];\n if (edge.selected) {\n if (!fnrf_zst.worker)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n if (!edge.source || !edge.target)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n if (!edge.sourceHandle || !edge.targetHandle)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.remove_edge({\n src_nid: edge.source,\n src_ioid: edge.sourceHandle,\n trg_nid: edge.target,\n trg_ioid: edge.targetHandle,\n });\n }\n }\n for (var _b = 0, nodes_1 = nodes; _b < nodes_1.length; _b++) {\n var node = nodes_1[_b];\n if (node.selected) {\n if (!fnrf_zst.worker)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n fnrf_zst.worker.remove_node(node.id);\n }\n }\n }\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n};\nvar ContextMenu = function (_a) {\n var id = _a.id, top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom, props = __rest(_a, [\"id\", \"top\", \"left\", \"right\", \"bottom\"]);\n var _b = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useReactFlow)(), getNode = _b.getNode, setNodes = _b.setNodes, addNodes = _b.addNodes, setEdges = _b.setEdges;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(___WEBPACK_IMPORTED_MODULE_3__.FuncNodesContext);\n var duplicateNode = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () {\n var rfnode = getNode(id);\n if (!rfnode)\n return;\n var position = {\n x: rfnode.position.x + 50,\n y: rfnode.position.y + 50,\n };\n addNodes(__assign(__assign({}, rfnode), { id: \"\".concat(rfnode.id, \"-copy\"), position: position }));\n }, [id, getNode, addNodes]);\n var deleteNode = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () {\n fnrf_zst.on_node_action({ type: \"delete\", id: id, from_remote: false });\n }, [id, setNodes, setEdges]);\n var nodestore = fnrf_zst.nodespace.get_node(id, false);\n if (!nodestore)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null, \" \");\n var node = nodestore();\n return (react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"div\", __assign({ style: { top: top, left: left, right: right, bottom: bottom }, className: \"context-menu\" }, props),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"p\", { style: { fontWeight: \"bold\" } },\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"small\", null, node.name)),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"button\", { onClick: duplicateNode }, \"duplicate\"),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"button\", { onClick: deleteNode }, \"delete\")));\n};\nvar ReactFlowLayer = function () {\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(___WEBPACK_IMPORTED_MODULE_3__.FuncNodesContext);\n var reactflowRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n fnrf_zst.reactflowRef = reactflowRef.current;\n }, [reactflowRef]);\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(null), menu = _a[0], setMenu = _a[1];\n var onSelectionChange = function (_a) {\n var nodes = _a.nodes, edges = _a.edges;\n var cs = fnrf_zst.local_state.getState();\n fnrf_zst.local_state.setState(__assign(__assign({}, cs), { selected_nodes: nodes.map(function (node) { return node.id; }), selected_edges: edges.map(function (edge) { return edge.id; }) }));\n };\n // const onNodeContextMenu = useCallback(\n // (event: React.MouseEvent, node: Node) => {\n // if (!reactflowRef.current) return;\n // // Prevent native context menu from showing\n // event.preventDefault();\n // // Calculate position of the context menu. We want to make sure it\n // // doesn't get positioned off-screen.\n // const pane = reactflowRef.current.getBoundingClientRect();\n // const clientX = event.clientX as number;\n // const clientY = event.clientY as number;\n // setMenu({\n // id: node.id,\n // top: clientY < pane.height - 200 ? clientY : undefined,\n // left: clientX < pane.width - 200 ? clientX : undefined,\n // right: clientX >= pane.width - 200 ? pane.width - clientX : undefined,\n // bottom:\n // clientY >= pane.height - 200 ? pane.height - clientY : undefined,\n // });\n // },\n // [setMenu]\n // );\n var onPaneClick = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () { return setMenu(null); }, [setMenu]);\n var _b = fnrf_zst.useReactFlowStore((0,zustand_react_shallow__WEBPACK_IMPORTED_MODULE_7__.useShallow)(selector)), nodes = _b.nodes, edges = _b.edges, onNodesChange = _b.onNodesChange, onEdgesChange = _b.onEdgesChange, onConnect = _b.onConnect;\n return (react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"div\", { className: \"reactflowlayer\" },\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(reactflow__WEBPACK_IMPORTED_MODULE_6__.ReactFlow, { nodes: nodes, edges: edges, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, onConnect: onConnect, nodeTypes: nodeTypes, edgeTypes: edgeTypes, minZoom: 0.1, maxZoom: 2, fitView: true, onSelectionChange: onSelectionChange, ref: reactflowRef, \n // onNodeContextMenu={onNodeContextMenu}\n onPaneClick: onPaneClick },\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(ReactFlowManager, null),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(KeyHandler, null),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(reactflow__WEBPACK_IMPORTED_MODULE_8__.Background, { color: \"#888\" // Color of the grid lines\n , gap: 16, size: 1 }),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(reactflow__WEBPACK_IMPORTED_MODULE_9__.MiniMap, { nodeStrokeWidth: 3, pannable: true, zoomable: true, zoomStep: 3 }),\n menu && react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(ContextMenu, __assign({ onClick: onPaneClick }, menu)))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReactFlowLayer);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/funcnodesreactflow/react_flow_layer.tsx?");
|
|
2619
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var reactflow_dist_style_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! reactflow/dist/style.css */ \"../node_modules/reactflow/dist/style.css\");\n/* harmony import */ var _funcnodesreactflow_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./funcnodesreactflow.scss */ \"./src/frontend/funcnodesreactflow/funcnodesreactflow.scss\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! reactflow */ \"../node_modules/@reactflow/core/dist/esm/index.mjs\");\n/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! reactflow */ \"../node_modules/@reactflow/background/dist/esm/index.mjs\");\n/* harmony import */ var reactflow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! reactflow */ \"../node_modules/@reactflow/minimap/dist/esm/index.mjs\");\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! .. */ \"./src/frontend/index.tsx\");\n/* harmony import */ var zustand_react_shallow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! zustand/react/shallow */ \"../node_modules/zustand/esm/react/shallow.mjs\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../node */ \"./src/frontend/node/index.tsx\");\n/* harmony import */ var _edge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../edge */ \"./src/frontend/edge.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n// import { useForceGraph } from \"../../utils/autolayout\";\nvar selector = function (state) { return ({\n nodes: state.nodes,\n edges: state.edges,\n onNodesChange: state.onNodesChange,\n onEdgesChange: state.onEdgesChange,\n onConnect: state.onConnect,\n}); };\nvar nodeTypes = { default: _node__WEBPACK_IMPORTED_MODULE_4__[\"default\"] };\nvar edgeTypes = {\n default: _edge__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n};\nvar ReactFlowManager = function () {\n var rfinstance = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useReactFlow)();\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(___WEBPACK_IMPORTED_MODULE_3__.FuncNodesContext);\n fnrf_zst.rf_instance = rfinstance;\n // useForceGraph();\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n};\nvar KeyHandler = function () {\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(___WEBPACK_IMPORTED_MODULE_3__.FuncNodesContext);\n var delPressed = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useKeyPress)(\"Delete\");\n var edges = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useEdges)();\n var nodes = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useNodes)();\n if (delPressed) {\n for (var _i = 0, edges_1 = edges; _i < edges_1.length; _i++) {\n var edge = edges_1[_i];\n if (edge.selected) {\n if (!fnrf_zst.worker)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n if (!edge.source || !edge.target)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n if (!edge.sourceHandle || !edge.targetHandle)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n fnrf_zst.worker.remove_edge({\n src_nid: edge.source,\n src_ioid: edge.sourceHandle,\n trg_nid: edge.target,\n trg_ioid: edge.targetHandle,\n });\n }\n }\n for (var _a = 0, nodes_1 = nodes; _a < nodes_1.length; _a++) {\n var node = nodes_1[_a];\n if (node.selected) {\n if (!fnrf_zst.worker)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n fnrf_zst.worker.remove_node(node.id);\n }\n }\n }\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null);\n};\nvar ContextMenu = function (_a) {\n var id = _a.id, top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom, props = __rest(_a, [\"id\", \"top\", \"left\", \"right\", \"bottom\"]);\n var _b = (0,reactflow__WEBPACK_IMPORTED_MODULE_6__.useReactFlow)(), getNode = _b.getNode, setNodes = _b.setNodes, addNodes = _b.addNodes, setEdges = _b.setEdges;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(___WEBPACK_IMPORTED_MODULE_3__.FuncNodesContext);\n var duplicateNode = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () {\n var rfnode = getNode(id);\n if (!rfnode)\n return;\n var position = {\n x: rfnode.position.x + 50,\n y: rfnode.position.y + 50,\n };\n addNodes(__assign(__assign({}, rfnode), { id: \"\".concat(rfnode.id, \"-copy\"), position: position }));\n }, [id, getNode, addNodes]);\n var deleteNode = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () {\n fnrf_zst.on_node_action({ type: \"delete\", id: id, from_remote: false });\n }, [id, setNodes, setEdges]);\n var nodestore = fnrf_zst.nodespace.get_node(id, false);\n if (!nodestore)\n return react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].Fragment, null, \" \");\n var node = nodestore();\n return (react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"div\", __assign({ style: { top: top, left: left, right: right, bottom: bottom }, className: \"context-menu\" }, props),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"p\", { style: { fontWeight: \"bold\" } },\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"small\", null, node.name)),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"button\", { onClick: duplicateNode }, \"duplicate\"),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"button\", { onClick: deleteNode }, \"delete\")));\n};\nvar ReactFlowLayer = function () {\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_2__.useContext)(___WEBPACK_IMPORTED_MODULE_3__.FuncNodesContext);\n var reactflowRef = (0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);\n (0,react__WEBPACK_IMPORTED_MODULE_2__.useEffect)(function () {\n fnrf_zst.reactflowRef = reactflowRef.current;\n }, [reactflowRef]);\n var _a = (0,react__WEBPACK_IMPORTED_MODULE_2__.useState)(null), menu = _a[0], setMenu = _a[1];\n var onSelectionChange = function (_a) {\n var nodes = _a.nodes, edges = _a.edges;\n var cs = fnrf_zst.local_state.getState();\n fnrf_zst.local_state.setState(__assign(__assign({}, cs), { selected_nodes: nodes.map(function (node) { return node.id; }), selected_edges: edges.map(function (edge) { return edge.id; }) }));\n };\n // const onNodeContextMenu = useCallback(\n // (event: React.MouseEvent, node: Node) => {\n // if (!reactflowRef.current) return;\n // // Prevent native context menu from showing\n // event.preventDefault();\n // // Calculate position of the context menu. We want to make sure it\n // // doesn't get positioned off-screen.\n // const pane = reactflowRef.current.getBoundingClientRect();\n // const clientX = event.clientX as number;\n // const clientY = event.clientY as number;\n // setMenu({\n // id: node.id,\n // top: clientY < pane.height - 200 ? clientY : undefined,\n // left: clientX < pane.width - 200 ? clientX : undefined,\n // right: clientX >= pane.width - 200 ? pane.width - clientX : undefined,\n // bottom:\n // clientY >= pane.height - 200 ? pane.height - clientY : undefined,\n // });\n // },\n // [setMenu]\n // );\n var onPaneClick = (0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function () { return setMenu(null); }, [setMenu]);\n var _b = fnrf_zst.useReactFlowStore((0,zustand_react_shallow__WEBPACK_IMPORTED_MODULE_7__.useShallow)(selector)), nodes = _b.nodes, edges = _b.edges, onNodesChange = _b.onNodesChange, onEdgesChange = _b.onEdgesChange, onConnect = _b.onConnect;\n return (react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(\"div\", { className: \"reactflowlayer\" },\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(reactflow__WEBPACK_IMPORTED_MODULE_6__.ReactFlow, { nodes: nodes, edges: edges, onNodesChange: onNodesChange, onEdgesChange: onEdgesChange, onConnect: onConnect, nodeTypes: nodeTypes, edgeTypes: edgeTypes, minZoom: 0.1, maxZoom: 2, fitView: true, onSelectionChange: onSelectionChange, ref: reactflowRef, \n // onNodeContextMenu={onNodeContextMenu}\n onPaneClick: onPaneClick },\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(ReactFlowManager, null),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(KeyHandler, null),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(reactflow__WEBPACK_IMPORTED_MODULE_8__.Background, { color: \"#888\" // Color of the grid lines\n , gap: 16, size: 1 }),\n react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(reactflow__WEBPACK_IMPORTED_MODULE_9__.MiniMap, { nodeStrokeWidth: 3, pannable: true, zoomable: true, zoomStep: 3 }),\n menu && react__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createElement(ContextMenu, __assign({ onClick: onPaneClick }, menu)))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ReactFlowLayer);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/funcnodesreactflow/react_flow_layer.tsx?");
|
|
2470
2620
|
|
|
2471
2621
|
/***/ }),
|
|
2472
2622
|
|
|
@@ -2476,7 +2626,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2476
2626
|
\***************************************/
|
|
2477
2627
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2478
2628
|
|
|
2479
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../funcnodesreactflow */ \"./src/frontend/funcnodesreactflow/index.tsx\");\n/* harmony import */ var _header_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./header.scss */ \"./src/frontend/header/header.scss\");\n/* harmony import */ var _dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dialog */ \"./src/frontend/dialog.tsx\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\nvar NewWorkerDialog = function (_a) {\n var trigger = _a.trigger;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), name = _b[0], setName = _b[1];\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), copyLib = _c[0], setCopyLib = _c[1];\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), copyNS = _d[0], setCopyNS = _d[1];\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var workersstate = fnrf_zst.workers();\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({\n name: \"None\",\n uuid: \"\",\n }), reference = _e[0], setReference = _e[1];\n if (!fnrf_zst.options.useWorkerManager)\n return null;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_dialog__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { trigger: trigger, title: \"New Worker\", description: \"Please provide a name and select a another worker as interpreter reference\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n \"Name:\",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"br\", null),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"styledinput\", onChange: function (e) {\n setName(e.currentTarget.value);\n }, value: name })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n \"Reference Worker:\",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"br\", null),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"select\", { className: \"styleddropdown\", onChange: function (e) {\n var uuid = e.target.value;\n var name = e.target.selectedOptions[0].innerText;\n setReference({ name: name, uuid: uuid });\n }, value: reference.uuid },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { value: \"\" }, \"None\"),\n Object.keys(workersstate).map(function (workerid) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { className: \"\", key: workerid, value: workerid }, workersstate[workerid].name || workerid)); })),\n reference.uuid && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n \"Copy Lib:\",\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"checkbox\", className: \"styledcheckbox\", checked: copyLib, onChange: function (e) {\n setCopyLib(e.currentTarget.checked);\n } })),\n copyLib && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n \"Copy Nodespace\",\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"checkbox\", className: \"styledcheckbox\", checked: copyNS, onChange: function (e) {\n setCopyNS(e.currentTarget.checked);\n if (e.currentTarget.checked) {\n setCopyLib(true);\n }\n } }))))),\n name && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\", onClick: function () {\n var _a;\n (_a = fnrf_zst.workermanager) === null || _a === void 0 ? void 0 : _a.new_worker({\n name: name,\n reference: reference.uuid,\n copyLib: copyLib,\n copyNS: copyNS,\n });\n } }, \"Create\"))))));\n};\nvar Statusbar = function () {\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var progress = fnrf_zst.progress_state();\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"statusbar\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"span\", { className: \"statusbar-progressbar\", style: { width: Math.min(100, 100 * progress.progress) + \"%\" } }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"span\", { className: \"statusbar-message\" }, progress.message)));\n};\nvar FuncnodesHeader = function (_a) {\n var headerprops = __rest(_a, []);\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n // pserudouse headerprops\n if (Object.keys(headerprops).length > 0) {\n fnrf_zst.logger.debug(\"headerprops\", headerprops);\n }\n var workersstate = fnrf_zst.workers();\n var onNew = function () {\n var _a;\n var alert = window.confirm(\"Are you sure you want to start a new flow?\");\n if (alert) {\n (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.clear();\n }\n };\n var onSave = function () { return __awaiter(void 0, void 0, void 0, function () {\n var data, blob, url, a;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, ((_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.save())];\n case 1:\n data = _b.sent();\n if (!data)\n return [2 /*return*/];\n blob = new Blob([JSON.stringify(data)], {\n type: \"application/json\",\n });\n url = URL.createObjectURL(blob);\n a = document.createElement(\"a\");\n a.href = url;\n a.download = \"flow.json\";\n a.click();\n URL.revokeObjectURL(url);\n a.remove();\n return [2 /*return*/];\n }\n });\n }); };\n var onOpen = function () { return __awaiter(void 0, void 0, void 0, function () {\n var input;\n return __generator(this, function (_a) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.accept = \".json\";\n input.onchange = function (e) { return __awaiter(void 0, void 0, void 0, function () {\n var file, reader;\n var _a;\n return __generator(this, function (_b) {\n file = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];\n if (!file)\n return [2 /*return*/];\n reader = new FileReader();\n reader.onload = function (e) { return __awaiter(void 0, void 0, void 0, function () {\n var contents, data;\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n contents = (_a = e.target) === null || _a === void 0 ? void 0 : _a.result;\n if (!contents)\n return [2 /*return*/];\n data = JSON.parse(contents);\n return [4 /*yield*/, ((_b = fnrf_zst.worker) === null || _b === void 0 ? void 0 : _b.load(data))];\n case 1:\n _c.sent();\n return [2 /*return*/];\n }\n });\n }); };\n reader.readAsText(file);\n return [2 /*return*/];\n });\n }); };\n input.click();\n return [2 /*return*/];\n });\n }); };\n var workerselectchange = function (e) {\n var workerid = e.target.value;\n if (workerid === \"__select__\")\n return;\n if (!fnrf_zst.workers)\n return;\n if (!fnrf_zst.workermanager)\n return;\n if (!workersstate[workerid])\n return;\n if (!workersstate[workerid].active) {\n //create popup\n var ans = window.confirm(\"this is an inactive worker, selecting it will start it, continue?\");\n if (!ans)\n return;\n }\n fnrf_zst.workermanager.set_active(workerid);\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"funcnodesreactflowheader\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(Statusbar, null)),\n fnrf_zst.options.useWorkerManager && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"select\", { className: \"workerselect styleddropdown\", value: fnrf_zst.worker ? fnrf_zst.worker.uuid : \"__select__\", onChange: workerselectchange },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { disabled: true, value: \"__select__\" }, \"Select Worker\"),\n Object.keys(workersstate)\n .sort(function (a, b) {\n // First, sort by active status (active workers come first)\n if (workersstate[a].active && !workersstate[b].active)\n return -1;\n if (!workersstate[a].active && workersstate[b].active)\n return 1;\n // If both are active or both are inactive, sort by name or ID\n var nameA = workersstate[a].name || a;\n var nameB = workersstate[b].name || b;\n return nameA.localeCompare(nameB);\n })\n .map(function (workerid) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { className: \"workerselectoption\" +\n (workersstate[workerid].active ? \" active\" : \" inactive\"), key: workerid, value: workerid }, workersstate[workerid].name || workerid)); })))),\n fnrf_zst.worker && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\", onClick: function () {\n if (!fnrf_zst.worker)\n return;\n fnrf_zst.worker.stop();\n } }, \"stop worker\")),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\", onClick: function () {\n var _a;\n if (!fnrf_zst.worker)\n return;\n if (!fnrf_zst.workermanager)\n return fnrf_zst.logger.error(\"no workermanager\");\n (_a = fnrf_zst.workermanager) === null || _a === void 0 ? void 0 : _a.restart_worker(fnrf_zst.worker.uuid);\n } }, \"restart worker\")))),\n fnrf_zst.options.useWorkerManager && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NewWorkerDialog, { trigger: react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\" }, \"new worker\") }))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\", onClick: onNew }, \"new nodespace\")),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\", onClick: onOpen }, \"open\")),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\", onClick: onSave }, \"save\"))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FuncnodesHeader);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/header/index.tsx?");
|
|
2629
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../funcnodesreactflow */ \"./src/frontend/funcnodesreactflow/index.tsx\");\n/* harmony import */ var _header_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./header.scss */ \"./src/frontend/header/header.scss\");\n/* harmony import */ var _dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dialog */ \"./src/frontend/dialog.tsx\");\n/* harmony import */ var _radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-dropdown-menu */ \"../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs\");\n/* harmony import */ var _mui_icons_material_MenuRounded__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/MenuRounded */ \"../node_modules/@mui/icons-material/MenuRounded.js\");\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Typography */ \"../node_modules/@mui/material/Typography/Typography.js\");\n/* harmony import */ var _mui_material_Stack__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Stack */ \"../node_modules/@mui/material/Stack/Stack.js\");\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ChevronRight */ \"../node_modules/@mui/icons-material/ChevronRight.js\");\n/* harmony import */ var _utils_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/data */ \"./src/utils/data.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\n\n\n\n\n\n\n\n\n\nvar NewWorkerDialog = function (_a) {\n var trigger = _a.trigger, setOpen = _a.setOpen, open = _a.open;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), name = _b[0], setName = _b[1];\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), copyLib = _c[0], setCopyLib = _c[1];\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), copyNS = _d[0], setCopyNS = _d[1];\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var workersstate = fnrf_zst.workers();\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({\n name: \"None\",\n uuid: \"\",\n }), reference = _e[0], setReference = _e[1];\n if (!fnrf_zst.options.useWorkerManager)\n return null;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_dialog__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { setOpen: setOpen, open: open, trigger: trigger, title: \"New Worker\", description: \"Please provide a name and select a another worker as interpreter reference\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n \"Name:\",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"br\", null),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"styledinput\", onChange: function (e) {\n setName(e.currentTarget.value);\n }, value: name })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n \"Reference Worker:\",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"br\", null),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"select\", { className: \"styleddropdown\", onChange: function (e) {\n var uuid = e.target.value;\n var name = e.target.selectedOptions[0].innerText;\n setReference({ name: name, uuid: uuid });\n }, value: reference.uuid },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { value: \"\" }, \"None\"),\n Object.keys(workersstate).map(function (workerid) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { className: \"\", key: workerid, value: workerid }, workersstate[workerid].name || workerid)); })),\n reference.uuid && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n \"Copy Lib:\",\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"checkbox\", className: \"styledcheckbox\", checked: copyLib, onChange: function (e) {\n setCopyLib(e.currentTarget.checked);\n } })),\n copyLib && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n \"Copy Nodespace\",\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"checkbox\", className: \"styledcheckbox\", checked: copyNS, onChange: function (e) {\n setCopyNS(e.currentTarget.checked);\n if (e.currentTarget.checked) {\n setCopyLib(true);\n }\n } }))))),\n name && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\", onClick: function () {\n var _a;\n (_a = fnrf_zst.workermanager) === null || _a === void 0 ? void 0 : _a.new_worker({\n name: name,\n reference: reference.uuid,\n copyLib: copyLib,\n copyNS: copyNS,\n });\n setOpen(false);\n } }, \"Create\"))))));\n};\nvar Statusbar = function () {\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var progress = fnrf_zst.progress_state();\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"statusbar\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"span\", { className: \"statusbar-progressbar\", style: { width: Math.min(100, 100 * progress.progress) + \"%\" } }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"span\", { className: \"statusbar-message\" }, progress.message)));\n};\nvar WorkerMenu = function () {\n var _a;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var workersstate = fnrf_zst.workers();\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isNewWorkerDialogOpen = _b[0], setNewWorkerDialogOpen = _b[1];\n var workerselectchange = function (workerid) {\n if (workerid === \"__select__\")\n return;\n if (!fnrf_zst.workers)\n return;\n if (!fnrf_zst.workermanager)\n return;\n if (!workersstate[workerid])\n return;\n if (!workersstate[workerid].active) {\n //create popup\n var ans = window.confirm(\"this is an inactive worker, selecting it will start it, continue?\");\n if (!ans)\n return;\n }\n fnrf_zst.workermanager.set_active(workerid);\n };\n var exportWorker = function () { return __awaiter(void 0, void 0, void 0, function () {\n var data;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!fnrf_zst.worker)\n return [2 /*return*/];\n return [4 /*yield*/, fnrf_zst.worker.export()];\n case 1:\n data = _a.sent();\n (0,_utils_data__WEBPACK_IMPORTED_MODULE_4__.downloadBase64)(data, \"worker.fnw\", \"application/zip\");\n return [2 /*return*/];\n }\n });\n }); };\n var updateWorker = function () { return __awaiter(void 0, void 0, void 0, function () {\n var ans, data;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!fnrf_zst.worker)\n return [2 /*return*/];\n ans = window.confirm(\"Updateing the worker might replace the current nodespace, continue?\");\n if (!ans)\n return [2 /*return*/];\n return [4 /*yield*/, (0,_utils_data__WEBPACK_IMPORTED_MODULE_4__.fileDialogToBase64)(\".fnw\")];\n case 1:\n data = _a.sent();\n fnrf_zst.worker.update_from_export(data);\n return [2 /*return*/];\n }\n });\n }); };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Root, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Trigger, { asChild: true },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_material_Stack__WEBPACK_IMPORTED_MODULE_6__[\"default\"], { direction: \"row\", spacing: 1 },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_7__[\"default\"], null, \"Worker\"),\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_MenuRounded__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null)))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Portal, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Content, { className: \"headermenucontent\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Group, null,\n fnrf_zst.options.useWorkerManager && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Sub, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.SubTrigger, { className: \"headermenuitem submenuitem\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_material_Stack__WEBPACK_IMPORTED_MODULE_6__[\"default\"], { direction: \"row\", spacing: 1 },\n \"Select\",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__[\"default\"], null))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Portal, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.SubContent, { className: \"headermenucontent\", sideOffset: 2, alignOffset: -5 },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.RadioGroup, { value: (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.uuid, onValueChange: function (value) {\n workerselectchange(value);\n } }, Object.keys(workersstate)\n .sort(function (a, b) {\n // First, sort by active status (active workers come first)\n if (workersstate[a].active &&\n !workersstate[b].active)\n return -1;\n if (!workersstate[a].active &&\n workersstate[b].active)\n return 1;\n // If both are active or both are inactive, sort by name or ID\n var nameA = workersstate[a].name || a;\n var nameB = workersstate[b].name || b;\n return nameA.localeCompare(nameB);\n })\n .map(function (workerid) {\n var _a;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.RadioItem, { className: \"headermenuitem workerselectoption\" +\n (workersstate[workerid].active\n ? \" active\"\n : \" inactive\") +\n \" headermenuitem\", key: workerid, value: workerid, disabled: workerid === ((_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.uuid) }, workersstate[workerid].name || workerid));\n })))))),\n fnrf_zst.worker && fnrf_zst.worker.is_open && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n fnrf_zst.workermanager && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Item, { className: \"headermenuitem\", onClick: function () {\n var _a;\n if (!fnrf_zst.worker)\n return;\n if (!fnrf_zst.workermanager)\n return fnrf_zst.logger.error(\"no workermanager\");\n (_a = fnrf_zst.workermanager) === null || _a === void 0 ? void 0 : _a.restart_worker(fnrf_zst.worker.uuid);\n } }, \"Restart\")),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Item, { className: \"headermenuitem\", onClick: function () {\n if (!fnrf_zst.worker)\n return;\n fnrf_zst.worker.stop();\n } }, \"Stop\"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Item, { className: \"headermenuitem\", onClick: exportWorker }, \"Export\"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Item, { className: \"headermenuitem\", onClick: updateWorker }, \"Update\"))),\n fnrf_zst.options.useWorkerManager && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Item, { className: \"headermenuitem\", onClick: function () { return setNewWorkerDialogOpen(true); } }, \"New\"))))))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NewWorkerDialog, { open: isNewWorkerDialogOpen, setOpen: setNewWorkerDialogOpen })));\n};\nvar NodeSpaceMenu = function () {\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var onNew = function () {\n var _a;\n var alert = window.confirm(\"Are you sure you want to start a new flow?\");\n if (alert) {\n (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.clear();\n }\n };\n var onSave = function () { return __awaiter(void 0, void 0, void 0, function () {\n var data, blob, url, a;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, ((_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.save())];\n case 1:\n data = _b.sent();\n if (!data)\n return [2 /*return*/];\n blob = new Blob([JSON.stringify(data)], {\n type: \"application/json\",\n });\n url = URL.createObjectURL(blob);\n a = document.createElement(\"a\");\n a.href = url;\n a.download = \"flow.json\";\n a.click();\n URL.revokeObjectURL(url);\n a.remove();\n return [2 /*return*/];\n }\n });\n }); };\n var onOpen = function () { return __awaiter(void 0, void 0, void 0, function () {\n var input;\n return __generator(this, function (_a) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.accept = \".json\";\n input.onchange = function (e) { return __awaiter(void 0, void 0, void 0, function () {\n var file, reader;\n var _a;\n return __generator(this, function (_b) {\n file = (_a = e.target.files) === null || _a === void 0 ? void 0 : _a[0];\n if (!file)\n return [2 /*return*/];\n reader = new FileReader();\n reader.onload = function (e) { return __awaiter(void 0, void 0, void 0, function () {\n var contents, data;\n var _a, _b;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n contents = (_a = e.target) === null || _a === void 0 ? void 0 : _a.result;\n if (!contents)\n return [2 /*return*/];\n data = JSON.parse(contents);\n return [4 /*yield*/, ((_b = fnrf_zst.worker) === null || _b === void 0 ? void 0 : _b.load(data))];\n case 1:\n _c.sent();\n return [2 /*return*/];\n }\n });\n }); };\n reader.readAsText(file);\n return [2 /*return*/];\n });\n }); };\n input.click();\n return [2 /*return*/];\n });\n }); };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Root, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Trigger, { asChild: true },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"styledbtn\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_material_Stack__WEBPACK_IMPORTED_MODULE_6__[\"default\"], { direction: \"row\", spacing: 1 },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_7__[\"default\"], null, \"Nodespace\"),\n \" \",\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_MenuRounded__WEBPACK_IMPORTED_MODULE_8__[\"default\"], null)))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Portal, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Content, { className: \"headermenucontent\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Group, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Item, { className: \"headermenuitem\", onClick: onNew }, \"New\"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Item, { className: \"headermenuitem\", onClick: onSave }, \"Save\"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_dropdown_menu__WEBPACK_IMPORTED_MODULE_5__.Item, { className: \"headermenuitem\", onClick: onOpen }, \"Load\")))))));\n};\nvar FuncnodesHeader = function (_a) {\n var headerprops = __rest(_a, []);\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var workerstate = fnrf_zst.workerstate();\n // pserudouse headerprops\n if (Object.keys(headerprops).length > 0) {\n fnrf_zst.logger.debug(\"headerprops\", headerprops);\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"funcnodesreactflowheader\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(Statusbar, null)),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(WorkerMenu, null)),\n fnrf_zst.worker && workerstate.is_open && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"headerelement\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeSpaceMenu, null)))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FuncnodesHeader);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/header/index.tsx?");
|
|
2480
2630
|
|
|
2481
2631
|
/***/ }),
|
|
2482
2632
|
|
|
@@ -2496,7 +2646,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2496
2646
|
\******************************/
|
|
2497
2647
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2498
2648
|
|
|
2499
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LibraryItem: () => (/* binding */ LibraryShelf),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-markdown */ \"../node_modules/react-markdown/lib/index.js\");\n/* harmony import */ var remark_gfm__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! remark-gfm */ \"../node_modules/remark-gfm/lib/index.js\");\n/* harmony import */ var _lib_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib.scss */ \"./src/frontend/lib.scss\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./src/frontend/index.tsx\");\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/icons-material/Search */ \"../node_modules/@mui/icons-material/Search.js\");\n/* harmony import */ var _mui_icons_material_Close__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/icons-material/Close */ \"../node_modules/@mui/icons-material/Close.js\");\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ \"../node_modules/@mui/icons-material/ExpandLess.js\");\n/* harmony import */ var _dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dialog */ \"./src/frontend/dialog.tsx\");\n\n\n\n\n\n\n\n\n\nvar LibraryNode = function (_a) {\n var item = _a.item;\n var zustand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var add_to_flow = function () {\n var _a;\n (_a = zustand.worker) === null || _a === void 0 ? void 0 : _a.add_node(item.node_id);\n };\n var nodeclick = function (event) {\n // if double click, add node to graph\n if (event.detail === 2) {\n add_to_flow();\n }\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodeentry\", onClick: nodeclick, title: item.description }, item.node_name || item.node_id));\n};\nvar filterShelf = function (shelf, filter) {\n var _a, _b, _c, _d;\n var hasFilteredNodes = (_b = (_a = shelf.nodes) === null || _a === void 0 ? void 0 : _a.some(function (node) {\n return node.node_id.toLowerCase().includes(filter.toLowerCase());\n })) !== null && _b !== void 0 ? _b : false;\n var hasFilteredSubShelves = (_d = (_c = shelf.subshelves) === null || _c === void 0 ? void 0 : _c.some(function (subShelf) { return filterShelf(subShelf, filter); })) !== null && _d !== void 0 ? _d : false;\n return hasFilteredNodes || hasFilteredSubShelves;\n};\nvar LibraryShelf = function (_a) {\n var _b;\n var item = _a.item, filter = _a.filter;\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isOpen = _c[0], setIsOpen = _c[1];\n var handleToggle = function () { return setIsOpen(!isOpen); };\n var filterednodes = (_b = item.nodes) === null || _b === void 0 ? void 0 : _b.filter(function (node) {\n return node.node_id.toLowerCase().includes(filter.toLowerCase());\n });\n var _isopen = isOpen || filter.length > 0;\n if (!filterShelf(item, filter)) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null);\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelfcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle\", onClick: handleToggle, style: { cursor: \"pointer\" }, title: item.description },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle_text\" }, item.name),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"expandicon \" + (_isopen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer \" + (_isopen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer_inner\" },\n filterednodes && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null, filterednodes.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryNode, { key: idx, item: subItem })); }))),\n item.subshelves && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null, item.subshelves.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryShelf, { key: idx, item: subItem, filter: filter })); }))))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", null)));\n};\nvar LibFilter = function (_a) {\n // input with left icon\n var filter = _a.filter, setFilter = _a.setFilter;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libfilter\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { fontSize: \"inherit\" }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"text\", placeholder: \"Filter\", value: filter, onChange: function (e) {\n setFilter(e.target.value);\n } }),\n filter && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_Close__WEBPACK_IMPORTED_MODULE_6__[\"default\"], { fontSize: \"inherit\", onClick: function () {\n setFilter(\"\");\n } }))));\n};\nvar ActiveModule = function (_a) {\n var availableModule = _a.availableModule, on_remove = _a.on_remove;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"addable-module\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-name\" }, availableModule[\"name\"]),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-links\" },\n availableModule.homepage && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"a\", { href: availableModule[\"homepage\"], target: \"_blank\", rel: \"noopener noreferrer\" }, \"Homepage\"))),\n availableModule.source && availableModule.homepage && \" | \",\n availableModule.source && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"a\", { href: availableModule[\"source\"], target: \"_blank\", rel: \"noopener noreferrer\" }, \"Source\")))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-description\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react_markdown__WEBPACK_IMPORTED_MODULE_7__.Markdown, { remarkPlugins: [remark_gfm__WEBPACK_IMPORTED_MODULE_8__[\"default\"]] }, availableModule[\"description\"].replace(/\\\\n/g, \" \\n\"))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"remove-button\", onClick: function () {\n on_remove(availableModule);\n } }, \"Remove\")));\n};\nvar AddableModule = function (_a) {\n var availableModule = _a.availableModule, on_add = _a.on_add;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), expandedDescription = _b[0], setExpandedDescription = _b[1];\n var toggleDescription = function () { return setExpandedDescription(!expandedDescription); };\n var maxDescriptionLength = 150; // Max character length before truncating the description.\n var truncatedDescription = availableModule[\"description\"].length > maxDescriptionLength\n ? availableModule[\"description\"].substring(0, maxDescriptionLength) +\n \"...\"\n : availableModule[\"description\"];\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"addable-module\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-name\" }, availableModule[\"name\"]),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-links\" },\n availableModule.homepage && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"a\", { href: availableModule[\"homepage\"], target: \"_blank\", rel: \"noopener noreferrer\" }, \"Homepage\"))),\n availableModule.source && availableModule.homepage && \" | \",\n availableModule.source && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"a\", { href: availableModule[\"source\"], target: \"_blank\", rel: \"noopener noreferrer\" }, \"Source\")))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-description\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react_markdown__WEBPACK_IMPORTED_MODULE_7__.Markdown, { remarkPlugins: [remark_gfm__WEBPACK_IMPORTED_MODULE_8__[\"default\"]] }, expandedDescription\n ? availableModule[\"description\"].replace(/\\\\n/g, \" \\n\")\n : truncatedDescription.replace(/\\\\n/g, \" \\n\")),\n availableModule[\"description\"].length > maxDescriptionLength && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { onClick: toggleDescription, className: \"toggle-description\" }, expandedDescription ? \"Show less\" : \"Show more\"))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"add-button\", onClick: function () {\n on_add(availableModule);\n } }, \"Add\")));\n};\nvar AddLibraryOverLay = function (_a) {\n var children = _a.children;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), newlib = _b[0], setNewLib = _b[1];\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), filter = _c[0], setFilter = _c[1]; // State for the filter input\n var zustand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({\n installed: [],\n available: [],\n active: [],\n }), availableModules = _d[0], SetAvailableModules = _d[1];\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isDialogOpen = _e[0], setIsDialogOpen = _e[1];\n var update_modules = function (open) {\n if (!open)\n return;\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.get_available_modules().then(function (modules) {\n SetAvailableModules(modules);\n });\n };\n if (!zustand.worker) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null);\n }\n var add_new_lib = function () {\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.add_lib(newlib);\n setNewLib(\"\");\n };\n var add_new_lib_from_installed = function (module) {\n setIsDialogOpen(false);\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.add_lib(module.name); // use name as module name\n };\n var add_new_lib_from_installable = function (module) {\n setIsDialogOpen(false);\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.add_lib(module.name); // use name as module name\n };\n var remove_lib_from_active = function (module) {\n setIsDialogOpen(false);\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.remove_lib(module.name);\n };\n // Filter the modules based on the search term, ignoring case\n var filterModules = function (modules) {\n return modules.filter(function (module) {\n return module.name.toLowerCase().includes(filter.toLowerCase()) ||\n module.description.toLowerCase().includes(filter.toLowerCase());\n });\n };\n var availableModulesFiltered = filterModules(availableModules.available);\n var installedModulesFiltered = filterModules(availableModules.installed);\n var activeModulesFiltered = filterModules(availableModules.active);\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_dialog__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { title: \"Manage Library\", trigger: children, description: \"Add or remove libraries to the current worker.\", onOpenChange: update_modules, open: isDialogOpen, setOpen: setIsDialogOpen, buttons: [\n {\n text: \"add\",\n onClick: add_new_lib,\n close: true,\n },\n ] },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"filter-input styledinput\", type: \"text\", placeholder: \"Filter modules...\", value: filter, onChange: function (e) { return setFilter(e.target.value); } }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"packagelist\", style: { maxHeight: \"70%\", overflow: \"auto\" } },\n installedModulesFiltered.length > 0 && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"h3\", null, \"Installed\"),\n installedModulesFiltered.map(function (item, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(AddableModule, { key: idx, availableModule: item, on_add: add_new_lib_from_installed })); }),\n availableModulesFiltered.length > 0 && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"h3\", null, \"Available\"),\n availableModulesFiltered.map(function (item, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(AddableModule, { key: idx, availableModule: item, on_add: add_new_lib_from_installable })); }),\n activeModulesFiltered.length > 0 && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"h3\", null, \"Active\"),\n activeModulesFiltered.map(function (item, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ActiveModule, { key: idx, availableModule: item, on_remove: remove_lib_from_active })); })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"styledinput\", type: \"text\", value: newlib, onChange: function (e) {\n setNewLib(e.target.value);\n } })));\n};\nvar ExternalWorkerInstanceSettings = function (_a) {\n var ins = _a.ins;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(ins.name), tempName = _b[0], setTempName = _b[1];\n var fnrz = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var stop_instance = function () {\n if (!fnrz.worker)\n return;\n fnrz.worker.remove_external_worker(ins.uuid, ins.nodeclassid);\n };\n var save_instance = function () {\n if (!fnrz.worker)\n return;\n fnrz.worker.update_external_worker(ins.uuid, ins.nodeclassid, {\n name: tempName,\n });\n ins.name = tempName;\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_dialog__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { title: ins.name, description: \"Settings for\" + ins.name, trigger: react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null, \"Settings\"), buttons: [\n {\n text: \"Save\",\n onClick: save_instance,\n close: true,\n },\n {\n text: \"Delete\",\n onClick: stop_instance,\n close: true,\n },\n ] },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"label\", { htmlFor: \"name\" }, \"Name: \"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"text\", name: \"name\", value: tempName, onChange: function (e) { return setTempName(e.target.value); }, className: \"styledinput\" }))))));\n};\nvar ExternalWorkerInstanceEntry = function (_a) {\n var _b;\n var ins = _a.ins, lib = _a.lib, _c = _a.filter, filter = _c === void 0 ? \"\" : _c;\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isOpen = _d[0], setIsOpen = _d[1];\n var handleToggle = function () { return setIsOpen(!isOpen); };\n var filterednodes = (_b = lib === null || lib === void 0 ? void 0 : lib.nodes) === null || _b === void 0 ? void 0 : _b.filter(function (node) {\n return node.node_id.toLowerCase().includes(filter.toLowerCase());\n });\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelfcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle\", onClick: handleToggle, style: { cursor: \"pointer\" }, title: ins.name },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle_text\" }, ins.name),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"expandicon \" + (isOpen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer \" + (isOpen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer_inner\" }, isOpen && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodeentry\", title: ins.uuid },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ExternalWorkerInstanceSettings, { ins: ins })),\n lib && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n filterednodes && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null, filterednodes.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryNode, { key: idx, item: subItem })); }))),\n lib.subshelves.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryShelf, { key: idx, item: subItem, filter: filter })); })))))))));\n};\nvar ExternalWorkerClassEntry = function (_a) {\n var item = _a.item, mod = _a.mod, lib = _a.lib;\n var zustand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isOpen = _b[0], setIsOpen = _b[1];\n var handleToggle = function () { return setIsOpen(!isOpen); };\n console.log(\"ExternalWorkerClassEntry\", item, mod);\n var add_to_flow = function () {\n var _a;\n (_a = zustand.worker) === null || _a === void 0 ? void 0 : _a.add_external_worker({\n module: mod,\n cls_module: item.module,\n cls_name: item.class_name,\n });\n };\n var click_new_instance = function (event) {\n // if double click, add node to graph\n if (event.detail === 2) {\n add_to_flow();\n }\n };\n var title = item.name || item.module + \".\" + item.class_name;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelfcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle\", onClick: handleToggle, style: { cursor: \"pointer\" }, title: title },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle_text\" }, title),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"expandicon \" + (isOpen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer \" + (isOpen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer_inner\" }, isOpen && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodeentry\", onClick: click_new_instance, title: item.name }, \"New Instance\"),\n item.instances.map(function (instance, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ExternalWorkerInstanceEntry, { key: idx, ins: instance, lib: lib === null || lib === void 0 ? void 0 : lib.subshelves.find(function (shelf) { return shelf.name === instance.uuid; }) })); })))))));\n};\nvar ExternalWorkerShelf = function (_a) {\n var externalworkermod = _a.externalworkermod, lib = _a.lib;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isOpen = _b[0], setIsOpen = _b[1];\n var handleToggle = function () { return setIsOpen(!isOpen); };\n var _isopen = isOpen;\n console.log(\"externalworkermod\", externalworkermod);\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelfcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle\", onClick: handleToggle, style: { cursor: \"pointer\" }, title: externalworkermod.module },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle_text\" }, externalworkermod.module),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"expandicon \" + (_isopen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer \" + (_isopen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer_inner\" }, externalworkermod.worker_classes.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ExternalWorkerClassEntry, { key: idx, item: subItem, mod: externalworkermod.module, lib: lib })); }))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", null)));\n};\nvar Library = function () {\n var _a;\n var zustand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var libstate = zustand.lib.libstate();\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), filter = _b[0], setFilter = _b[1];\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"library\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libtitle\" }, \"Lib\"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", { className: \"hr_prominent\" }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibFilter, { filter: filter, setFilter: setFilter }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"vscrollcontainer\" }, libstate.lib.shelves.map(function (item, idx) {\n return item.name == \"_external_worker\" ? (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null)) : (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryShelf, { key: idx, item: item, filter: filter }));\n })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", null),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libtitle\" }, \"External Worker\"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", { className: \"hr_prominent\" }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"vscrollcontainer\" }, (_a = libstate.external_worker) === null || _a === void 0 ? void 0 : _a.map(function (item, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ExternalWorkerShelf, { key: idx, externalworkermod: item, lib: libstate.lib.shelves.find(function (shelf) { return shelf.name === \"_external_worker\"; }) })); })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", null)),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { style: { paddingTop: \"0.5rem\" } }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"addlib\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(AddLibraryOverLay, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { disabled: zustand.worker === undefined }, \"Manage Libaries\")))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Library);\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/lib.tsx?");
|
|
2649
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LibraryItem: () => (/* binding */ LibraryShelf),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_markdown__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-markdown */ \"../node_modules/react-markdown/lib/index.js\");\n/* harmony import */ var remark_gfm__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! remark-gfm */ \"../node_modules/remark-gfm/lib/index.js\");\n/* harmony import */ var _lib_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./lib.scss */ \"./src/frontend/lib.scss\");\n/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ \"./src/frontend/index.tsx\");\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/icons-material/Search */ \"../node_modules/@mui/icons-material/Search.js\");\n/* harmony import */ var _mui_icons_material_Close__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/icons-material/Close */ \"../node_modules/@mui/icons-material/Close.js\");\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ \"../node_modules/@mui/icons-material/ExpandLess.js\");\n/* harmony import */ var _dialog__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dialog */ \"./src/frontend/dialog.tsx\");\n\n\n\n\n\n\n\n\n\nvar LibraryNode = function (_a) {\n var item = _a.item;\n var zustand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var add_to_flow = function () {\n var _a;\n (_a = zustand.worker) === null || _a === void 0 ? void 0 : _a.add_node(item.node_id);\n };\n var nodeclick = function (event) {\n // if double click, add node to graph\n if (event.detail === 2) {\n add_to_flow();\n }\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodeentry\", onClick: nodeclick, title: item.description }, item.node_name || item.node_id));\n};\nvar filterShelf = function (shelf, filter) {\n var _a, _b, _c, _d;\n var hasFilteredNodes = (_b = (_a = shelf.nodes) === null || _a === void 0 ? void 0 : _a.some(function (node) {\n return node.node_id.toLowerCase().includes(filter.toLowerCase());\n })) !== null && _b !== void 0 ? _b : false;\n var hasFilteredSubShelves = (_d = (_c = shelf.subshelves) === null || _c === void 0 ? void 0 : _c.some(function (subShelf) { return filterShelf(subShelf, filter); })) !== null && _d !== void 0 ? _d : false;\n return hasFilteredNodes || hasFilteredSubShelves;\n};\nvar LibraryShelf = function (_a) {\n var _b;\n var item = _a.item, filter = _a.filter;\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isOpen = _c[0], setIsOpen = _c[1];\n var handleToggle = function () { return setIsOpen(!isOpen); };\n var filterednodes = (_b = item.nodes) === null || _b === void 0 ? void 0 : _b.filter(function (node) {\n return node.node_id.toLowerCase().includes(filter.toLowerCase());\n });\n var _isopen = isOpen || filter.length > 0;\n if (!filterShelf(item, filter)) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null);\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelfcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle\", onClick: handleToggle, style: { cursor: \"pointer\" }, title: item.description },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle_text\" }, item.name),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"expandicon \" + (_isopen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer \" + (_isopen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer_inner\" },\n filterednodes && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null, filterednodes.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryNode, { key: idx, item: subItem })); }))),\n item.subshelves && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null, item.subshelves.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryShelf, { key: idx, item: subItem, filter: filter })); }))))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", null)));\n};\nvar LibFilter = function (_a) {\n // input with left icon\n var filter = _a.filter, setFilter = _a.setFilter;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libfilter\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { fontSize: \"inherit\" }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"text\", placeholder: \"Filter\", value: filter, onChange: function (e) {\n setFilter(e.target.value);\n } }),\n filter && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_Close__WEBPACK_IMPORTED_MODULE_6__[\"default\"], { fontSize: \"inherit\", onClick: function () {\n setFilter(\"\");\n } }))));\n};\nvar ActiveModule = function (_a) {\n var availableModule = _a.availableModule, on_remove = _a.on_remove;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"addable-module\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-name\" }, availableModule[\"name\"]),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-links\" },\n availableModule.homepage && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"a\", { href: availableModule[\"homepage\"], target: \"_blank\", rel: \"noopener noreferrer\" }, \"Homepage\"))),\n availableModule.source && availableModule.homepage && \" | \",\n availableModule.source && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"a\", { href: availableModule[\"source\"], target: \"_blank\", rel: \"noopener noreferrer\" }, \"Source\")))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-description\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react_markdown__WEBPACK_IMPORTED_MODULE_7__.Markdown, { remarkPlugins: [remark_gfm__WEBPACK_IMPORTED_MODULE_8__[\"default\"]] }, availableModule[\"description\"].replace(/\\\\n/g, \" \\n\"))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"remove-button\", onClick: function () {\n on_remove(availableModule);\n } }, \"Remove\")));\n};\nvar AddableModule = function (_a) {\n var availableModule = _a.availableModule, on_add = _a.on_add;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), expandedDescription = _b[0], setExpandedDescription = _b[1];\n var toggleDescription = function () { return setExpandedDescription(!expandedDescription); };\n var maxDescriptionLength = 150; // Max character length before truncating the description.\n var truncatedDescription = availableModule[\"description\"].length > maxDescriptionLength\n ? availableModule[\"description\"].substring(0, maxDescriptionLength) +\n \"...\"\n : availableModule[\"description\"];\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"addable-module\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-name\" }, availableModule[\"name\"]),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-links\" },\n availableModule.homepage && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"a\", { href: availableModule[\"homepage\"], target: \"_blank\", rel: \"noopener noreferrer\" }, \"Homepage\"))),\n availableModule.source && availableModule.homepage && \" | \",\n availableModule.source && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"a\", { href: availableModule[\"source\"], target: \"_blank\", rel: \"noopener noreferrer\" }, \"Source\")))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"module-description\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react_markdown__WEBPACK_IMPORTED_MODULE_7__.Markdown, { remarkPlugins: [remark_gfm__WEBPACK_IMPORTED_MODULE_8__[\"default\"]] }, expandedDescription\n ? availableModule[\"description\"].replace(/\\\\n/g, \" \\n\")\n : truncatedDescription.replace(/\\\\n/g, \" \\n\")),\n availableModule[\"description\"].length > maxDescriptionLength && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { onClick: toggleDescription, className: \"toggle-description\" }, expandedDescription ? \"Show less\" : \"Show more\"))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { className: \"add-button\", onClick: function () {\n on_add(availableModule);\n } }, \"Add\")));\n};\nvar AddLibraryOverLay = function (_a) {\n var children = _a.children;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), newlib = _b[0], setNewLib = _b[1];\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), filter = _c[0], setFilter = _c[1]; // State for the filter input\n var zustand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({\n installed: [],\n available: [],\n active: [],\n }), availableModules = _d[0], SetAvailableModules = _d[1];\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isDialogOpen = _e[0], setIsDialogOpen = _e[1];\n var update_modules = function (open) {\n if (!open)\n return;\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.get_available_modules().then(function (modules) {\n SetAvailableModules(modules);\n });\n };\n if (!zustand.worker) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null);\n }\n var add_new_lib = function () {\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.add_lib(newlib);\n setNewLib(\"\");\n };\n var add_new_lib_from_installed = function (module) {\n setIsDialogOpen(false);\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.add_lib(module.name); // use name as module name\n };\n var add_new_lib_from_installable = function (module) {\n setIsDialogOpen(false);\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.add_lib(module.name); // use name as module name\n };\n var remove_lib_from_active = function (module) {\n setIsDialogOpen(false);\n if (zustand.worker === undefined) {\n return;\n }\n zustand.worker.remove_lib(module.name);\n };\n // Filter the modules based on the search term, ignoring case\n var filterModules = function (modules) {\n return modules.filter(function (module) {\n return module.name.toLowerCase().includes(filter.toLowerCase()) ||\n module.description.toLowerCase().includes(filter.toLowerCase());\n });\n };\n var availableModulesFiltered = filterModules(availableModules.available);\n var installedModulesFiltered = filterModules(availableModules.installed);\n var activeModulesFiltered = filterModules(availableModules.active);\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_dialog__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { title: \"Manage Library\", trigger: children, description: \"Add or remove libraries to the current worker.\", onOpenChange: update_modules, open: isDialogOpen, setOpen: setIsDialogOpen, buttons: [\n {\n text: \"add\",\n onClick: add_new_lib,\n close: true,\n },\n ] },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"filter-input styledinput\", type: \"text\", placeholder: \"Filter modules...\", value: filter, onChange: function (e) { return setFilter(e.target.value); } }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"packagelist\", style: { maxHeight: \"70%\", overflow: \"auto\" } },\n installedModulesFiltered.length > 0 && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"h3\", null, \"Installed\"),\n installedModulesFiltered.map(function (item, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(AddableModule, { key: idx, availableModule: item, on_add: add_new_lib_from_installed })); }),\n availableModulesFiltered.length > 0 && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"h3\", null, \"Available\"),\n availableModulesFiltered.map(function (item, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(AddableModule, { key: idx, availableModule: item, on_add: add_new_lib_from_installable })); }),\n activeModulesFiltered.length > 0 && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"h3\", null, \"Active\"),\n activeModulesFiltered.map(function (item, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ActiveModule, { key: idx, availableModule: item, on_remove: remove_lib_from_active })); })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"styledinput\", type: \"text\", value: newlib, onChange: function (e) {\n setNewLib(e.target.value);\n } })));\n};\nvar ExternalWorkerInstanceSettings = function (_a) {\n var ins = _a.ins;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(ins.name), tempName = _b[0], setTempName = _b[1];\n var fnrz = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var stop_instance = function () {\n if (!fnrz.worker)\n return;\n fnrz.worker.remove_external_worker(ins.uuid, ins.nodeclassid);\n };\n var save_instance = function () {\n if (!fnrz.worker)\n return;\n fnrz.worker.update_external_worker(ins.uuid, ins.nodeclassid, {\n name: tempName,\n });\n ins.name = tempName;\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_dialog__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { title: ins.name, description: \"Settings for\" + ins.name, trigger: react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null, \"Settings\"), buttons: [\n {\n text: \"Save\",\n onClick: save_instance,\n close: true,\n },\n {\n text: \"Delete\",\n onClick: stop_instance,\n close: true,\n },\n ] },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"label\", { htmlFor: \"name\" }, \"Name: \"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"text\", name: \"name\", value: tempName, onChange: function (e) { return setTempName(e.target.value); }, className: \"styledinput\" }))))));\n};\nvar ExternalWorkerInstanceEntry = function (_a) {\n var _b;\n var ins = _a.ins, lib = _a.lib, _c = _a.filter, filter = _c === void 0 ? \"\" : _c;\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isOpen = _d[0], setIsOpen = _d[1];\n var handleToggle = function () { return setIsOpen(!isOpen); };\n var filterednodes = (_b = lib === null || lib === void 0 ? void 0 : lib.nodes) === null || _b === void 0 ? void 0 : _b.filter(function (node) {\n return node.node_id.toLowerCase().includes(filter.toLowerCase());\n });\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelfcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle\", onClick: handleToggle, style: { cursor: \"pointer\" }, title: ins.name },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle_text\" }, ins.name),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"expandicon \" + (isOpen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer \" + (isOpen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer_inner\" }, isOpen && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodeentry\", title: ins.uuid },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ExternalWorkerInstanceSettings, { ins: ins })),\n lib && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n filterednodes && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null, filterednodes.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryNode, { key: idx, item: subItem })); }))),\n lib.subshelves.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryShelf, { key: idx, item: subItem, filter: filter })); })))))))));\n};\nvar ExternalWorkerClassEntry = function (_a) {\n var item = _a.item, mod = _a.mod, lib = _a.lib;\n var zustand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isOpen = _b[0], setIsOpen = _b[1];\n var handleToggle = function () { return setIsOpen(!isOpen); };\n var add_to_flow = function () {\n var _a;\n (_a = zustand.worker) === null || _a === void 0 ? void 0 : _a.add_external_worker({\n module: mod,\n cls_module: item.module,\n cls_name: item.class_name,\n });\n };\n var click_new_instance = function (event) {\n // if double click, add node to graph\n if (event.detail === 2) {\n add_to_flow();\n }\n };\n var title = item.name || item.module + \".\" + item.class_name;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelfcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle\", onClick: handleToggle, style: { cursor: \"pointer\" }, title: title },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle_text\" }, title),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"expandicon \" + (isOpen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer \" + (isOpen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer_inner\" }, isOpen && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodeentry\", onClick: click_new_instance, title: item.name }, \"New Instance\"),\n item.instances.map(function (instance, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ExternalWorkerInstanceEntry, { key: idx, ins: instance, lib: lib === null || lib === void 0 ? void 0 : lib.subshelves.find(function (shelf) { return shelf.name === instance.uuid; }) })); })))))));\n};\nvar ExternalWorkerShelf = function (_a) {\n var externalworkermod = _a.externalworkermod, lib = _a.lib;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), isOpen = _b[0], setIsOpen = _b[1];\n var handleToggle = function () { return setIsOpen(!isOpen); };\n var _isopen = isOpen;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelfcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle\", onClick: handleToggle, style: { cursor: \"pointer\" }, title: externalworkermod.module },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"shelftitle_text\" }, externalworkermod.module),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"expandicon \" + (_isopen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_4__[\"default\"], null))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer \" + (_isopen ? \"open\" : \"close\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libnodecontainer_inner\" }, externalworkermod.worker_classes.map(function (subItem, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ExternalWorkerClassEntry, { key: idx, item: subItem, mod: externalworkermod.module, lib: lib })); }))),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", null)));\n};\nvar Library = function () {\n var _a;\n var zustand = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index__WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var libstate = zustand.lib.libstate();\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(\"\"), filter = _b[0], setFilter = _b[1];\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libcontainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"library\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libtitle\" }, \"Lib\"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", { className: \"hr_prominent\" }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibFilter, { filter: filter, setFilter: setFilter }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"vscrollcontainer\" }, libstate.lib.shelves.map(function (item, idx) {\n return item.name == \"_external_worker\" ? (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null)) : (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(LibraryShelf, { key: idx, item: item, filter: filter }));\n })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", null),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"libtitle\" }, \"External Worker\"),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", { className: \"hr_prominent\" }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"vscrollcontainer\" }, (_a = libstate.external_worker) === null || _a === void 0 ? void 0 : _a.map(function (item, idx) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(ExternalWorkerShelf, { key: idx, externalworkermod: item, lib: libstate.lib.shelves.find(function (shelf) { return shelf.name === \"_external_worker\"; }) })); })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"hr\", null)),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { style: { paddingTop: \"0.5rem\" } }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"addlib\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(AddLibraryOverLay, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"button\", { disabled: zustand.worker === undefined }, \"Manage Libaries\")))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Library);\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/lib.tsx?");
|
|
2500
2650
|
|
|
2501
2651
|
/***/ }),
|
|
2502
2652
|
|
|
@@ -2526,7 +2676,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2526
2676
|
\*********************************************************/
|
|
2527
2677
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2528
2678
|
|
|
2529
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BooleanInput: () => (/* binding */ BooleanInput),\n/* harmony export */ ColorInput: () => (/* binding */ ColorInput),\n/* harmony export */ FloatInput: () => (/* binding */ FloatInput),\n/* harmony export */ IntegerInput: () => (/* binding */ IntegerInput),\n/* harmony export */ SelectionInput: () => (/* binding */ SelectionInput),\n/* harmony export */ StringInput: () => (/* binding */ StringInput)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../funcnodesreactflow */ \"./src/frontend/funcnodesreactflow/index.tsx\");\n/* harmony import */ var _utils_colorpicker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/colorpicker */ \"./src/frontend/utils/colorpicker.tsx\");\n/* harmony import */ var _radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-slider */ \"../node_modules/@radix-ui/react-slider/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-tooltip */ \"../node_modules/@radix-ui/react-tooltip/dist/index.mjs\");\n/* harmony import */ var _utils_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/select */ \"./src/frontend/utils/select.tsx\");\n\n\n\n\n\n\n\nvar BooleanInput = function (_a) {\n var io = _a.io, inputconverter = _a.inputconverter;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var indeterminate = io.value === undefined;\n var cRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n if (!cRef.current)\n return;\n cRef.current.indeterminate = indeterminate;\n }, [cRef, indeterminate]);\n var on_change = function (e) {\n var _a;\n var new_value = e.target.checked;\n try {\n new_value = inputconverter[0](e.target.checked);\n }\n catch (e) { }\n (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n });\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { ref: cRef, type: \"checkbox\", className: \"styledcheckbox booleaninput\", checked: !!inputconverter[1](io.value), onChange: on_change, disabled: io.connected }));\n};\nvar NumberInput = function (_a) {\n var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n var io = _a.io, inputconverter = _a.inputconverter, _o = _a.parser, parser = _o === void 0 ? function (n) { return parseFloat(n); } : _o;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var _p = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(inputconverter[1](io.value)), tempvalue = _p[0], setTempValue = _p[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n setTempValue(inputconverter[1](io.value));\n }, [io.value]);\n var set_new_value = function (new_value) {\n var _a, _b, _c;\n new_value = parser(parseFloat(new_value.toString()).toString() // parse float first for e notation\n );\n if (isNaN(new_value)) {\n new_value = \"<NoValue>\";\n setTempValue(\"\");\n }\n else {\n if (((_a = io.value_options) === null || _a === void 0 ? void 0 : _a.min) !== undefined &&\n new_value < io.value_options.min)\n new_value = io.value_options.min;\n if (((_b = io.value_options) === null || _b === void 0 ? void 0 : _b.max) !== undefined &&\n new_value > io.value_options.max)\n new_value = io.value_options.max;\n setTempValue(new_value.toString());\n }\n try {\n new_value = inputconverter[0](new_value);\n }\n catch (e) { }\n (_c = fnrf_zst.worker) === null || _c === void 0 ? void 0 : _c.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n }).then(function (v) {\n console.log(\"set io value done\", v);\n });\n };\n var on_change = function (e) {\n set_new_value(e.target.value);\n };\n var v = io.connected ? inputconverter[1](io.value) : tempvalue;\n if (v === undefined)\n v = (_b = io.value_options) === null || _b === void 0 ? void 0 : _b.min;\n if (v === undefined)\n v = (_c = io.value_options) === null || _c === void 0 ? void 0 : _c.max;\n if (v === undefined)\n v = \"\";\n if (v === null)\n v = \"\";\n if (((_d = io.value_options) === null || _d === void 0 ? void 0 : _d.max) !== undefined &&\n ((_e = io.value_options) === null || _e === void 0 ? void 0 : _e.min) !== undefined) {\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { style: { minWidth: \"100px\" }, className: \"SliderContainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__.Root, { className: \"SliderRoot\", value: [v === undefined ? (_f = io.value_options) === null || _f === void 0 ? void 0 : _f.min : v], min: (_g = io.value_options) === null || _g === void 0 ? void 0 : _g.min, max: (_h = io.value_options) === null || _h === void 0 ? void 0 : _h.max, step: io.value_options.step ||\n (((_j = io.value_options) === null || _j === void 0 ? void 0 : _j.max) - ((_k = io.value_options) === null || _k === void 0 ? void 0 : _k.min)) / 1000, disabled: io.connected, onValueCommit: function (value) {\n if (isNaN(value[0]))\n return;\n set_new_value(value[0]);\n }, onValueChange: function (value) {\n if (isNaN(value[0]))\n return;\n setTempValue(value[0].toString());\n } },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__.Track, { className: \"SliderTrack\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__.Range, { className: \"SliderRange\" })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__.TooltipProvider, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__.Root, { open: true },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__.Trigger, { asChild: true },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__.Thumb, { className: \"SliderThumb\" })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__.Content, { className: \"SliderTooltipContent\" }, v))))));\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"text\", className: \"nodedatainput styledinput numberinput\", value: v, onChange: function (e) { return setTempValue(e.target.value); }, onBlur: on_change, onKeyDown: function (e) {\n // on key up add step to value\n if (e.key === \"ArrowUp\") {\n var step = io.render_options.step || 1;\n if (e.shiftKey)\n step *= 10;\n var new_value = (parseFloat(v) || 0) + step;\n // setTempValue(new_value.toString());\n set_new_value(new_value);\n return;\n }\n // on key down subtract step to value\n if (e.key === \"ArrowDown\") {\n var step = io.render_options.step || 1;\n if (e.shiftKey)\n step *= 10;\n var new_value = (parseFloat(v) || 0) - step;\n // setTempValue(new_value.toString());\n set_new_value(new_value);\n return;\n }\n //accept only numbers\n if (!/^[0-9.eE+-]$/.test(e.key) &&\n ![\"Backspace\", \"ArrowLeft\", \"ArrowRight\", \"Delete\", \"Tab\"].includes(e.key)) {\n e.preventDefault();\n }\n }, disabled: io.connected, step: io.render_options.step, min: (_l = io.value_options) === null || _l === void 0 ? void 0 : _l.min, max: (_m = io.value_options) === null || _m === void 0 ? void 0 : _m.max }));\n};\nvar FloatInput = function (_a) {\n var io = _a.io, inputconverter = _a.inputconverter;\n return NumberInput({ io: io, inputconverter: inputconverter, parser: parseFloat });\n};\nvar IntegerInput = function (_a) {\n var io = _a.io, inputconverter = _a.inputconverter;\n return NumberInput({ io: io, inputconverter: inputconverter, parser: parseInt });\n};\nvar StringInput = function (_a) {\n var io = _a.io, inputconverter = _a.inputconverter;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(inputconverter[1](io.value)), tempvalue = _b[0], setTempValue = _b[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n setTempValue(inputconverter[1](io.value));\n }, [io.value]);\n var on_change = function (e) {\n var _a;\n var new_value = e.target.value;\n if (!new_value)\n new_value = \"<NoValue>\";\n try {\n new_value = inputconverter[0](new_value);\n }\n catch (e) { }\n (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n });\n };\n var v = io.connected ? inputconverter[1](io.value) : tempvalue;\n if (v === undefined || v === null)\n v = \"\";\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"nodedatainput styledinput stringinput\", value: v, onChange: function (e) { return setTempValue(e.target.value); }, onBlur: on_change, disabled: io.connected }));\n};\nvar _parse_string = function (s) { return s; };\nvar _parse_number = function (s) { return parseFloat(s); };\nvar _parse_boolean = function (s) { return !!s; };\nvar _parse_null = function (s) { return (s === \"null\" ? null : s); };\nvar get_parser = function (datatype) {\n if (datatype === \"nuinputconvertermber\") {\n return _parse_number;\n }\n if (datatype === \"boolean\") {\n return _parse_boolean;\n }\n if (datatype === \"undefined\") {\n return _parse_null;\n }\n return _parse_string;\n};\nvar SelectionInput = function (_a) {\n var _b;\n var io = _a.io, inputconverter = _a.inputconverter, parser = _a.parser;\n var options = ((_b = io.value_options) === null || _b === void 0 ? void 0 : _b.options) || [];\n if (Array.isArray(options)) {\n options = {\n type: \"enum\",\n values: options,\n keys: options.map(function (x) { return (x === null ? \"None\" : x.toString()); }),\n nullable: false,\n };\n }\n if (options.type !== \"enum\") {\n options = {\n type: \"enum\",\n values: Object.values(options),\n keys: Object.keys(options),\n nullable: false,\n };\n }\n options = options;\n if (options.nullable &&\n !options.values.includes(null) &&\n !options.keys.includes(\"None\")) {\n options.values.unshift(null);\n options.keys.unshift(\"None\");\n }\n //make key value pairs\n var optionsmap = [];\n for (var i = 0; i < options.values.length; i++) {\n // set const t to \"string\", \"number\",\"boolean\" \"null\" depenting on the type of options.values[i]\n var t = options.values[i] === null || options.values[i] === undefined\n ? \"undefined\"\n : typeof options.values[i];\n var v_1 = options.values[i];\n if (v_1 === null) {\n v_1 = \"null\";\n }\n if (v_1 === undefined) {\n v_1 = \"undefined\";\n }\n optionsmap.push([options.keys[i], v_1.toString(), t]);\n }\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var on_change_value = function (_a) {\n var _b;\n var value = _a.value, \n // label\n datatype = _a.datatype;\n // Use the existing parser or get a new one based on the datatype\n var p = parser || get_parser(datatype);\n var new_value = p(value);\n try {\n new_value = inputconverter[0](value);\n }\n catch (e) { }\n (_b = fnrf_zst.worker) === null || _b === void 0 ? void 0 : _b.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n });\n };\n var on_change = function (e) {\n // Find the selected option element\n var selectedOption = e.target.options[e.target.selectedIndex];\n // Retrieve the datatype attribute from the selected option\n var datatype = selectedOption.getAttribute(\"datatype\");\n on_change_value({\n value: e.target.value,\n // label: selectedOption.text,\n datatype: datatype || \"string\",\n });\n };\n var v = io.value;\n if (v === null) {\n v = \"null\";\n }\n if (v === undefined) {\n v = \"undefined\";\n }\n var default_entry = optionsmap.find(function (option) { return option[1] === v; });\n var default_value;\n if (default_entry !== undefined) {\n default_value = {\n value: default_entry[1],\n label: default_entry[0],\n datatype: default_entry[2],\n };\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_utils_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { className: \"nodedatainput styleddropdown\", options: optionsmap.map(function (option) { return ({\n value: option[1],\n label: option[0],\n datatype: option[2],\n }); }), defaultValue: default_value, onChange: function (newValue) {\n if (newValue === null)\n newValue = {\n value: \"<NoValue>\",\n label: \"<NoValue>\",\n datatype: \"string\",\n };\n on_change_value(newValue);\n } }));\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"select\", { value: v, onChange: on_change, disabled: io.connected, className: \"nodedatainput styleddropdown\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { value: \"<NoValue>\", disabled: true }, \"select\"),\n optionsmap.map(function (option) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { key: option[0], value: option[1], datatype: option[2] }, option[0])); })));\n};\nvar ColorInput = function (_a) {\n var _b;\n var io = _a.io;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var colorspace = ((_b = io.value_options) === null || _b === void 0 ? void 0 : _b.colorspace) || \"hex\";\n var on_change = function (colorconverter) {\n var _a;\n var new_value = \"<NoValue>\";\n if (colorconverter) {\n if (colorconverter[colorspace])\n new_value = colorconverter[colorspace]();\n else\n new_value = colorconverter.hex();\n }\n if (colorconverter === null)\n new_value = null;\n try {\n new_value = new_value;\n }\n catch (e) { }\n (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n });\n };\n var allow_null = false;\n if (typeof io.type !== \"string\" &&\n \"anyOf\" in io.type &&\n io.type.anyOf !== undefined) {\n allow_null = io.type.anyOf.some(function (x) { return x === \"None\"; });\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_utils_colorpicker__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { onChange: on_change, inicolordata: io.value, allow_null: allow_null, inicolorspace: colorspace }));\n};\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/node/io/default_input_renderer.tsx?");
|
|
2679
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ BooleanInput: () => (/* binding */ BooleanInput),\n/* harmony export */ ColorInput: () => (/* binding */ ColorInput),\n/* harmony export */ FloatInput: () => (/* binding */ FloatInput),\n/* harmony export */ IntegerInput: () => (/* binding */ IntegerInput),\n/* harmony export */ SelectionInput: () => (/* binding */ SelectionInput),\n/* harmony export */ StringInput: () => (/* binding */ StringInput)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../funcnodesreactflow */ \"./src/frontend/funcnodesreactflow/index.tsx\");\n/* harmony import */ var _utils_colorpicker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/colorpicker */ \"./src/frontend/utils/colorpicker.tsx\");\n/* harmony import */ var _radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-slider */ \"../node_modules/@radix-ui/react-slider/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-tooltip */ \"../node_modules/@radix-ui/react-tooltip/dist/index.mjs\");\n/* harmony import */ var _utils_select__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/select */ \"./src/frontend/utils/select.tsx\");\n\n\n\n\n\n\n\nvar BooleanInput = function (_a) {\n var io = _a.io, inputconverter = _a.inputconverter;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var indeterminate = io.value === undefined;\n var cRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n if (!cRef.current)\n return;\n cRef.current.indeterminate = indeterminate;\n }, [cRef, indeterminate]);\n var on_change = function (e) {\n var _a;\n var new_value = e.target.checked;\n try {\n new_value = inputconverter[0](e.target.checked);\n }\n catch (e) { }\n (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n });\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { ref: cRef, type: \"checkbox\", className: \"styledcheckbox booleaninput\", checked: !!inputconverter[1](io.value), onChange: on_change, disabled: io.connected }));\n};\nvar NumberInput = function (_a) {\n var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;\n var io = _a.io, inputconverter = _a.inputconverter, _o = _a.parser, parser = _o === void 0 ? function (n) { return parseFloat(n); } : _o;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var _p = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(inputconverter[1](io.value)), tempvalue = _p[0], setTempValue = _p[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n setTempValue(inputconverter[1](io.value));\n }, [io.value]);\n var set_new_value = function (new_value) {\n var _a, _b, _c;\n new_value = parser(parseFloat(new_value.toString()).toString() // parse float first for e notation\n );\n if (isNaN(new_value)) {\n new_value = \"<NoValue>\";\n setTempValue(\"\");\n }\n else {\n if (((_a = io.value_options) === null || _a === void 0 ? void 0 : _a.min) !== undefined &&\n new_value < io.value_options.min)\n new_value = io.value_options.min;\n if (((_b = io.value_options) === null || _b === void 0 ? void 0 : _b.max) !== undefined &&\n new_value > io.value_options.max)\n new_value = io.value_options.max;\n setTempValue(new_value.toString());\n }\n try {\n new_value = inputconverter[0](new_value);\n }\n catch (e) { }\n (_c = fnrf_zst.worker) === null || _c === void 0 ? void 0 : _c.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n });\n };\n var on_change = function (e) {\n set_new_value(e.target.value);\n };\n var v = io.connected ? inputconverter[1](io.value) : tempvalue;\n if (v === undefined)\n v = (_b = io.value_options) === null || _b === void 0 ? void 0 : _b.min;\n if (v === undefined)\n v = (_c = io.value_options) === null || _c === void 0 ? void 0 : _c.max;\n if (v === undefined)\n v = \"\";\n if (v === null)\n v = \"\";\n if (((_d = io.value_options) === null || _d === void 0 ? void 0 : _d.max) !== undefined &&\n ((_e = io.value_options) === null || _e === void 0 ? void 0 : _e.min) !== undefined) {\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { style: { minWidth: \"100px\" }, className: \"SliderContainer\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__.Root, { className: \"SliderRoot\", value: [v === undefined ? (_f = io.value_options) === null || _f === void 0 ? void 0 : _f.min : v], min: (_g = io.value_options) === null || _g === void 0 ? void 0 : _g.min, max: (_h = io.value_options) === null || _h === void 0 ? void 0 : _h.max, step: io.value_options.step ||\n (((_j = io.value_options) === null || _j === void 0 ? void 0 : _j.max) - ((_k = io.value_options) === null || _k === void 0 ? void 0 : _k.min)) / 1000, disabled: io.connected, onValueCommit: function (value) {\n if (isNaN(value[0]))\n return;\n set_new_value(value[0]);\n }, onValueChange: function (value) {\n if (isNaN(value[0]))\n return;\n setTempValue(value[0].toString());\n } },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__.Track, { className: \"SliderTrack\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__.Range, { className: \"SliderRange\" })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__.TooltipProvider, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__.Root, { open: true },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__.Trigger, { asChild: true },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slider__WEBPACK_IMPORTED_MODULE_4__.Thumb, { className: \"SliderThumb\" })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_tooltip__WEBPACK_IMPORTED_MODULE_5__.Content, { className: \"SliderTooltipContent\" }, v))))));\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { type: \"text\", className: \"nodedatainput styledinput numberinput\", value: v, onChange: function (e) { return setTempValue(e.target.value); }, onBlur: on_change, onKeyDown: function (e) {\n // on key up add step to value\n if (e.key === \"ArrowUp\") {\n var step = io.render_options.step || 1;\n if (e.shiftKey)\n step *= 10;\n var new_value = (parseFloat(v) || 0) + step;\n // setTempValue(new_value.toString());\n set_new_value(new_value);\n return;\n }\n // on key down subtract step to value\n if (e.key === \"ArrowDown\") {\n var step = io.render_options.step || 1;\n if (e.shiftKey)\n step *= 10;\n var new_value = (parseFloat(v) || 0) - step;\n // setTempValue(new_value.toString());\n set_new_value(new_value);\n return;\n }\n //accept only numbers\n if (!/^[0-9.eE+-]$/.test(e.key) &&\n ![\"Backspace\", \"ArrowLeft\", \"ArrowRight\", \"Delete\", \"Tab\"].includes(e.key)) {\n e.preventDefault();\n }\n }, disabled: io.connected, step: io.render_options.step, min: (_l = io.value_options) === null || _l === void 0 ? void 0 : _l.min, max: (_m = io.value_options) === null || _m === void 0 ? void 0 : _m.max }));\n};\nvar FloatInput = function (_a) {\n var io = _a.io, inputconverter = _a.inputconverter;\n return NumberInput({ io: io, inputconverter: inputconverter, parser: parseFloat });\n};\nvar IntegerInput = function (_a) {\n var io = _a.io, inputconverter = _a.inputconverter;\n return NumberInput({ io: io, inputconverter: inputconverter, parser: parseInt });\n};\nvar StringInput = function (_a) {\n var io = _a.io, inputconverter = _a.inputconverter;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(inputconverter[1](io.value)), tempvalue = _b[0], setTempValue = _b[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n setTempValue(inputconverter[1](io.value));\n }, [io.value]);\n var on_change = function (e) {\n var _a;\n var new_value = e.target.value;\n if (!new_value)\n new_value = \"<NoValue>\";\n try {\n new_value = inputconverter[0](new_value);\n }\n catch (e) { }\n (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n });\n };\n var v = io.connected ? inputconverter[1](io.value) : tempvalue;\n if (v === undefined || v === null)\n v = \"\";\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"nodedatainput styledinput stringinput\", value: v, onChange: function (e) { return setTempValue(e.target.value); }, onBlur: on_change, disabled: io.connected }));\n};\nvar _parse_string = function (s) { return s; };\nvar _parse_number = function (s) { return parseFloat(s); };\nvar _parse_boolean = function (s) { return !!s; };\nvar _parse_null = function (s) { return (s === \"null\" ? null : s); };\nvar get_parser = function (datatype) {\n if (datatype === \"nuinputconvertermber\") {\n return _parse_number;\n }\n if (datatype === \"boolean\") {\n return _parse_boolean;\n }\n if (datatype === \"undefined\") {\n return _parse_null;\n }\n return _parse_string;\n};\nvar SelectionInput = function (_a) {\n var _b;\n var io = _a.io, inputconverter = _a.inputconverter, parser = _a.parser;\n var options = ((_b = io.value_options) === null || _b === void 0 ? void 0 : _b.options) || [];\n if (Array.isArray(options)) {\n options = {\n type: \"enum\",\n values: options,\n keys: options.map(function (x) { return (x === null ? \"None\" : x.toString()); }),\n nullable: false,\n };\n }\n if (options.type !== \"enum\") {\n options = {\n type: \"enum\",\n values: Object.values(options),\n keys: Object.keys(options),\n nullable: false,\n };\n }\n options = options;\n if (options.nullable &&\n !options.values.includes(null) &&\n !options.keys.includes(\"None\")) {\n options.values.unshift(null);\n options.keys.unshift(\"None\");\n }\n //make key value pairs\n var optionsmap = [];\n for (var i = 0; i < options.values.length; i++) {\n // set const t to \"string\", \"number\",\"boolean\" \"null\" depenting on the type of options.values[i]\n var t = options.values[i] === null || options.values[i] === undefined\n ? \"undefined\"\n : typeof options.values[i];\n var v_1 = options.values[i];\n if (v_1 === null) {\n v_1 = \"null\";\n }\n if (v_1 === undefined) {\n v_1 = \"undefined\";\n }\n optionsmap.push([options.keys[i], v_1.toString(), t]);\n }\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var on_change_value = function (_a) {\n var _b;\n var value = _a.value, \n // label\n datatype = _a.datatype;\n // Use the existing parser or get a new one based on the datatype\n var p = parser || get_parser(datatype);\n var new_value = p(value);\n try {\n new_value = inputconverter[0](value);\n }\n catch (e) { }\n (_b = fnrf_zst.worker) === null || _b === void 0 ? void 0 : _b.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n });\n };\n var on_change = function (e) {\n // Find the selected option element\n var selectedOption = e.target.options[e.target.selectedIndex];\n // Retrieve the datatype attribute from the selected option\n var datatype = selectedOption.getAttribute(\"datatype\");\n on_change_value({\n value: e.target.value,\n // label: selectedOption.text,\n datatype: datatype || \"string\",\n });\n };\n var v = io.value;\n if (v === null) {\n v = \"null\";\n }\n if (v === undefined) {\n v = \"undefined\";\n }\n var default_entry = optionsmap.find(function (option) { return option[1] === v; });\n var default_value;\n if (default_entry !== undefined) {\n default_value = {\n value: default_entry[1],\n label: default_entry[0],\n datatype: default_entry[2],\n };\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_utils_select__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { className: \"nodedatainput styleddropdown\", options: optionsmap.map(function (option) { return ({\n value: option[1],\n label: option[0],\n datatype: option[2],\n }); }), defaultValue: default_value, onChange: function (newValue) {\n if (newValue === null)\n newValue = {\n value: \"<NoValue>\",\n label: \"<NoValue>\",\n datatype: \"string\",\n };\n on_change_value(newValue);\n } }));\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"select\", { value: v, onChange: on_change, disabled: io.connected, className: \"nodedatainput styleddropdown\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { value: \"<NoValue>\", disabled: true }, \"select\"),\n optionsmap.map(function (option) { return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"option\", { key: option[0], value: option[1], datatype: option[2] }, option[0])); })));\n};\nvar ColorInput = function (_a) {\n var _b;\n var io = _a.io;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_funcnodesreactflow__WEBPACK_IMPORTED_MODULE_1__.FuncNodesContext);\n var colorspace = ((_b = io.value_options) === null || _b === void 0 ? void 0 : _b.colorspace) || \"hex\";\n var on_change = function (colorconverter) {\n var _a;\n var new_value = \"<NoValue>\";\n if (colorconverter) {\n if (colorconverter[colorspace])\n new_value = colorconverter[colorspace]();\n else\n new_value = colorconverter.hex();\n }\n if (colorconverter === null)\n new_value = null;\n try {\n new_value = new_value;\n }\n catch (e) { }\n (_a = fnrf_zst.worker) === null || _a === void 0 ? void 0 : _a.set_io_value({\n nid: io.node,\n ioid: io.id,\n value: new_value,\n set_default: io.render_options.set_default,\n });\n };\n var allow_null = false;\n if (typeof io.type !== \"string\" &&\n \"anyOf\" in io.type &&\n io.type.anyOf !== undefined) {\n allow_null = io.type.anyOf.some(function (x) { return x === \"None\"; });\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_utils_colorpicker__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { onChange: on_change, inicolordata: io.value, allow_null: allow_null, inicolorspace: colorspace }));\n};\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/node/io/default_input_renderer.tsx?");
|
|
2530
2680
|
|
|
2531
2681
|
/***/ }),
|
|
2532
2682
|
|
|
@@ -2596,7 +2746,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2596
2746
|
\************************************/
|
|
2597
2747
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2598
2748
|
|
|
2599
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NodeName: () => (/* binding */ NodeName),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ \"../node_modules/@mui/icons-material/ExpandLess.js\");\n/* harmony import */ var _mui_icons_material_Lan__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/Lan */ \"../node_modules/@mui/icons-material/Lan.js\");\n/* harmony import */ var _mui_icons_material_PlayCircleFilled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/icons-material/PlayCircleFilled */ \"../node_modules/@mui/icons-material/PlayCircleFilled.js\");\n/* harmony import */ var _node_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node.scss */ \"./src/frontend/node/node.scss\");\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! .. */ \"./src/frontend/index.tsx\");\n/* harmony import */ var _io__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./io */ \"./src/frontend/node/io/index.tsx\");\n/* harmony import */ var _dialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../dialog */ \"./src/frontend/dialog.tsx\");\n/* harmony import */ var _body_data_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./body_data_renderer */ \"./src/frontend/node/body_data_renderer.tsx\");\n/* harmony import */ var _datarenderer_rendermappings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../datarenderer/rendermappings */ \"./src/frontend/datarenderer/rendermappings.tsx\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n\n\n\n\n\nvar NodeHeader = function (_a) {\n var node_data = _a.node_data;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(___WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var clicktrigger = function () {\n fnrf_zst.on_node_action({\n type: \"trigger\",\n from_remote: false,\n id: node_data.id,\n });\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader_element\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_PlayCircleFilled__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { fontSize: \"inherit\", className: \"triggerbutton\", onClick: clicktrigger }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_Lan__WEBPACK_IMPORTED_MODULE_8__[\"default\"], { fontSize: \"inherit\", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {\n var _a, _b, _c;\n var _d;\n return __generator(this, function (_e) {\n switch (_e.label) {\n case 0:\n _b = (_a = fnrf_zst.logger).info;\n _c = [\"nodestatus\"];\n return [4 /*yield*/, ((_d = fnrf_zst.worker) === null || _d === void 0 ? void 0 : _d.get_node_status(node_data.id))];\n case 1:\n _b.apply(_a, _c.concat([_e.sent()]));\n return [2 /*return*/];\n }\n });\n }); } })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader_element nodeheader_title\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader_title_text\" }, node_data.node_name)),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader_element\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { fontSize: \"inherit\" }))));\n};\nvar NodeDataRenderer = function (_a) {\n var _b, _c, _d, _e;\n var node_data = _a.node_data;\n var io = ((_c = (_b = node_data.render_options) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.src)\n ? node_data.io[(_e = (_d = node_data.render_options) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.src]\n : undefined;\n var _f = io\n ? (0,_body_data_renderer__WEBPACK_IMPORTED_MODULE_5__.BodyDataRendererForIo)(io)\n : [undefined, undefined], pvhandle = _f[0], overlayhandle = _f[1];\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodrag nodedatabody\" }, pvhandle && io && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_dialog__WEBPACK_IMPORTED_MODULE_4__[\"default\"], { trigger: react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_datarenderer_rendermappings__WEBPACK_IMPORTED_MODULE_6__.DynamicComponentLoader, { component: pvhandle, io: io })), onOpenChange: function (open) {\n if (open) {\n if (io === null || io === void 0 ? void 0 : io.try_get_full_value)\n io === null || io === void 0 ? void 0 : io.try_get_full_value();\n }\n } }, react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_datarenderer_rendermappings__WEBPACK_IMPORTED_MODULE_6__.DynamicComponentLoader, { component: overlayhandle, io: io })))));\n};\nvar NodeBody = function (_a) {\n var _b, _c;\n var node_data = _a.node_data;\n var inputs = Object.values(node_data.io).filter(function (io) { return io.is_input; });\n var outputs = Object.values(node_data.io).filter(function (io) { return !io.is_input; });\n if ((_c = (_b = node_data.render_options) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.src) {\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodebody\" },\n outputs.map(function (io) {\n if (io.hidden)\n return null;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_io__WEBPACK_IMPORTED_MODULE_3__.NodeOutput, { key: io.id, io: io });\n }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeDataRenderer, { node_data: node_data }),\n inputs.map(function (io) {\n if (io.hidden)\n return null;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_io__WEBPACK_IMPORTED_MODULE_3__.NodeInput, { key: io.id, io: io });\n })));\n};\nvar NodeName = function (_a) {\n var node_data = _a.node_data;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(node_data.name), name = _b[0], setName = _b[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n setName(node_data.name);\n }, [node_data]);\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(___WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var handleChange = function (event) {\n setName(event.target.value);\n };\n var finalSetName = function (e) {\n var new_name = e.target.value;\n fnrf_zst.on_node_action({\n type: \"update\",\n from_remote: false,\n id: node_data.id,\n node: { name: new_name },\n });\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"nodename_input\", value: name, onChange: handleChange, onBlur: finalSetName }));\n};\nvar NodeFooter = function (_a) {\n var node_data = _a.node_data;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodefooter\" }, node_data.error && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeerror\" }, node_data.error)));\n};\n/**\n * A generic function to deeply merge two objects of type T.\n *\n * @param {T} target - The target object to be merged.\n * @param {DeepPartial<T>} source - The source object to merge into the target. All properties of this object are optional.\n *\n * @returns {Object} An object containing the merged object (new_obj) and a boolean indicating if there was a change (change).\n *\n * @throws {Type 'string' cannot be used to index type 'T'} This error is ignored using the @ts-ignore directive because we are dynamically accessing properties of a generic type T.\n */\nvar DefaultNode = function (_a) {\n var data = _a.data;\n // Use the NodeStore to get the data for the node.\n var storedata = data.UseNodeStore();\n var collapsed = storedata.frontend.collapsed || false;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), visualTrigger = _b[0], setVisualTrigger = _b[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n var timeoutId;\n // When in_trigger becomes true, set visualTrigger to true immediately\n if (storedata.in_trigger) {\n setVisualTrigger(true);\n }\n else if (visualTrigger) {\n // When in_trigger becomes false, wait for a minimum duration before setting visualTrigger to false\n timeoutId = setTimeout(function () { return setVisualTrigger(false); }, 200); // 50ms or any other duration you see fit\n }\n return function () { return clearTimeout(timeoutId); }; // Cleanup timeout on component unmount or state changes\n }, [storedata.in_trigger, visualTrigger]);\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"innernode\" +\n (visualTrigger ? \" intrigger\" : \"\") +\n (storedata.error ? \" error\" : \"\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeHeader, { node_data: storedata }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeName, { node_data: storedata }),\n collapsed ? null : react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeBody, { node_data: storedata }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeFooter, { node_data: storedata }))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DefaultNode);\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/node/node.tsx?");
|
|
2749
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ NodeName: () => (/* binding */ NodeName),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ \"../node_modules/@mui/icons-material/ExpandLess.js\");\n/* harmony import */ var _mui_icons_material_Lan__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/Lan */ \"../node_modules/@mui/icons-material/Lan.js\");\n/* harmony import */ var _mui_icons_material_PlayCircleFilled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/PlayCircleFilled */ \"../node_modules/@mui/icons-material/PlayCircleFilled.js\");\n/* harmony import */ var _node_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node.scss */ \"./src/frontend/node/node.scss\");\n/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! .. */ \"./src/frontend/index.tsx\");\n/* harmony import */ var _io__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./io */ \"./src/frontend/node/io/index.tsx\");\n/* harmony import */ var _dialog__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../dialog */ \"./src/frontend/dialog.tsx\");\n/* harmony import */ var _body_data_renderer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./body_data_renderer */ \"./src/frontend/node/body_data_renderer.tsx\");\n/* harmony import */ var _datarenderer_rendermappings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../datarenderer/rendermappings */ \"./src/frontend/datarenderer/rendermappings.tsx\");\n/* harmony import */ var _utils_progressbar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/progressbar */ \"./src/frontend/utils/progressbar.tsx\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n\n\n\n\n\n\nvar NodeHeader = function (_a) {\n var node_data = _a.node_data;\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(___WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var clicktrigger = function () {\n fnrf_zst.on_node_action({\n type: \"trigger\",\n from_remote: false,\n id: node_data.id,\n });\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader_element\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_PlayCircleFilled__WEBPACK_IMPORTED_MODULE_8__[\"default\"], { fontSize: \"inherit\", className: \"triggerbutton\", onClick: clicktrigger }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_Lan__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { fontSize: \"inherit\", onClick: function () { return __awaiter(void 0, void 0, void 0, function () {\n var _a, _b, _c;\n var _d;\n return __generator(this, function (_e) {\n switch (_e.label) {\n case 0:\n _b = (_a = fnrf_zst.logger).info;\n _c = [\"nodestatus\"];\n return [4 /*yield*/, ((_d = fnrf_zst.worker) === null || _d === void 0 ? void 0 : _d.get_node_status(node_data.id))];\n case 1:\n _b.apply(_a, _c.concat([_e.sent()]));\n return [2 /*return*/];\n }\n });\n }); } })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader_element nodeheader_title\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader_title_text\" }, node_data.node_name)),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeheader_element\" },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_10__[\"default\"], { fontSize: \"inherit\" }))));\n};\nvar NodeDataRenderer = function (_a) {\n var _b, _c, _d, _e;\n var node_data = _a.node_data;\n var io = ((_c = (_b = node_data.render_options) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.src)\n ? node_data.io[(_e = (_d = node_data.render_options) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.src]\n : undefined;\n var _f = io\n ? (0,_body_data_renderer__WEBPACK_IMPORTED_MODULE_5__.BodyDataRendererForIo)(io)\n : [undefined, undefined], pvhandle = _f[0], overlayhandle = _f[1];\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodrag nodedatabody\" }, pvhandle && io && (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_dialog__WEBPACK_IMPORTED_MODULE_4__[\"default\"], { trigger: react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_datarenderer_rendermappings__WEBPACK_IMPORTED_MODULE_6__.DynamicComponentLoader, { component: pvhandle, io: io })), onOpenChange: function (open) {\n if (open) {\n if (io === null || io === void 0 ? void 0 : io.try_get_full_value)\n io === null || io === void 0 ? void 0 : io.try_get_full_value();\n }\n } }, react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_datarenderer_rendermappings__WEBPACK_IMPORTED_MODULE_6__.DynamicComponentLoader, { component: overlayhandle, io: io })))));\n};\nvar NodeBody = function (_a) {\n var _b, _c;\n var node_data = _a.node_data;\n var inputs = Object.values(node_data.io).filter(function (io) { return io.is_input; });\n var outputs = Object.values(node_data.io).filter(function (io) { return !io.is_input; });\n if ((_c = (_b = node_data.render_options) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.src) {\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodebody\" },\n outputs.map(function (io) {\n if (io.hidden)\n return null;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_io__WEBPACK_IMPORTED_MODULE_3__.NodeOutput, { key: io.id, io: io });\n }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeDataRenderer, { node_data: node_data }),\n inputs.map(function (io) {\n if (io.hidden)\n return null;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_io__WEBPACK_IMPORTED_MODULE_3__.NodeInput, { key: io.id, io: io });\n })));\n};\nvar NodeName = function (_a) {\n var node_data = _a.node_data;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(node_data.name), name = _b[0], setName = _b[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n setName(node_data.name);\n }, [node_data]);\n var fnrf_zst = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(___WEBPACK_IMPORTED_MODULE_2__.FuncNodesContext);\n var handleChange = function (event) {\n setName(event.target.value);\n };\n var finalSetName = function (e) {\n var new_name = e.target.value;\n fnrf_zst.on_node_action({\n type: \"update\",\n from_remote: false,\n id: node_data.id,\n node: { name: new_name },\n });\n };\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"input\", { className: \"nodename_input\", value: name, onChange: handleChange, onBlur: finalSetName }));\n};\nvar NodeProgressBar = function (_a) {\n var node_data = _a.node_data;\n if (!node_data.progress)\n return null;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_utils_progressbar__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { style: {\n height: node_data.progress.prefix === \"idle\" ? \"0px\" : undefined,\n }, state: node_data.progress, className: \"nodeprogress\" }));\n};\nvar NodeFooter = function (_a) {\n var node_data = _a.node_data;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodefooter\" },\n node_data.error && react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"nodeerror\" }, node_data.error),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeProgressBar, { node_data: node_data })));\n};\n/**\n * A generic function to deeply merge two objects of type T.\n *\n * @param {T} target - The target object to be merged.\n * @param {DeepPartial<T>} source - The source object to merge into the target. All properties of this object are optional.\n *\n * @returns {Object} An object containing the merged object (new_obj) and a boolean indicating if there was a change (change).\n *\n * @throws {Type 'string' cannot be used to index type 'T'} This error is ignored using the @ts-ignore directive because we are dynamically accessing properties of a generic type T.\n */\nvar DefaultNode = function (_a) {\n var data = _a.data;\n // Use the NodeStore to get the data for the node.\n var storedata = data.UseNodeStore();\n var collapsed = storedata.frontend.collapsed || false;\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false), visualTrigger = _b[0], setVisualTrigger = _b[1];\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n var timeoutId;\n // When in_trigger becomes true, set visualTrigger to true immediately\n if (storedata.in_trigger) {\n setVisualTrigger(true);\n }\n else if (visualTrigger) {\n // When in_trigger becomes false, wait for a minimum duration before setting visualTrigger to false\n timeoutId = setTimeout(function () { return setVisualTrigger(false); }, 200); // 50ms or any other duration you see fit\n }\n return function () { return clearTimeout(timeoutId); }; // Cleanup timeout on component unmount or state changes\n }, [storedata.in_trigger, visualTrigger]);\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].Fragment, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"innernode\" +\n (visualTrigger ? \" intrigger\" : \"\") +\n (storedata.error ? \" error\" : \"\") },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeHeader, { node_data: storedata }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeName, { node_data: storedata }),\n collapsed ? null : react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeBody, { node_data: storedata }),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(NodeFooter, { node_data: storedata }))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DefaultNode);\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/node/node.tsx?");
|
|
2600
2750
|
|
|
2601
2751
|
/***/ }),
|
|
2602
2752
|
|
|
@@ -2630,6 +2780,16 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2630
2780
|
|
|
2631
2781
|
/***/ }),
|
|
2632
2782
|
|
|
2783
|
+
/***/ "./src/frontend/utils/progressbar.tsx":
|
|
2784
|
+
/*!********************************************!*\
|
|
2785
|
+
!*** ./src/frontend/utils/progressbar.tsx ***!
|
|
2786
|
+
\********************************************/
|
|
2787
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2788
|
+
|
|
2789
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _utils_autolayout_txt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/autolayout/txt */ \"./src/utils/autolayout/txt.ts\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (undefined && undefined.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\n\n\nfunction formatMeter(options) {\n var _a, _b;\n if (options === void 0) { options = {\n n: 0,\n elapsed: 0,\n ascii: false,\n unit: \"it\",\n unit_scale: false,\n unit_divisor: 1000,\n }; }\n var total = (_a = options.total) !== null && _a !== void 0 ? _a : null;\n var n = options.n, unit_scale = options.unit_scale, elapsed = options.elapsed, \n // ascii,\n unit = options.unit, unit_divisor = options.unit_divisor, \n // ncols = undefined,\n _c = options.prefix, \n // ncols = undefined,\n prefix = _c === void 0 ? \"\" : _c, _d = options.rate, rate = _d === void 0 ? undefined : _d, \n // bar_format = undefined,\n _e = options.postfix, \n // bar_format = undefined,\n postfix = _e === void 0 ? null : _e, _f = options.initial, initial = _f === void 0 ? 0 : _f;\n if (total !== null && n >= total + 0.5) {\n total = null;\n }\n var scaledN = n;\n var scaledTotal = total;\n var scaledRate = rate;\n if (unit_scale && unit_scale !== true && unit_scale !== 1) {\n if (total !== null) {\n scaledTotal = total * unit_scale;\n }\n scaledN = n * unit_scale;\n if (rate !== undefined) {\n scaledRate = rate * unit_scale;\n }\n }\n var elapsedStr = formatInterval(elapsed);\n if (scaledRate === undefined && elapsed > 0) {\n scaledRate = (scaledN - initial) / elapsed;\n }\n var invRate = scaledRate ? 1 / scaledRate : undefined;\n var rateNoInvFmt = (scaledRate ? \"\".concat(scaledRate.toFixed(2)) : \"?\") + unit + \"/s\";\n var rateInvFmt = invRate ? \"\".concat(invRate.toFixed(2), \"s/\") + unit : \"?\";\n var rateFmt = invRate && invRate > 1 ? rateInvFmt : rateNoInvFmt;\n var nFmt = unit_scale\n ? formatSize(scaledN, unit_divisor)\n : scaledN.toString();\n var totalFmt = unit_scale && scaledTotal !== null\n ? formatSize(scaledTotal, unit_divisor)\n : (_b = scaledTotal === null || scaledTotal === void 0 ? void 0 : scaledTotal.toString()) !== null && _b !== void 0 ? _b : \"?\";\n var remaining = scaledRate && scaledTotal !== null\n ? (scaledTotal - scaledN) / scaledRate\n : 0;\n var remainingStr = scaledRate ? formatInterval(remaining) : \"?\";\n var lBar = prefix ? \"\".concat(prefix, \": \") : \"\";\n if (total !== null) {\n var percentage = (scaledN / total) * 100;\n var rBar = \" \".concat(nFmt, \"/\").concat(totalFmt, \" [\").concat(elapsedStr, \" < \").concat(remainingStr, \", \").concat(rateFmt).concat(postfix !== null && postfix !== void 0 ? postfix : \"\", \"]\");\n // const progressBar = createProgressBar(scaledN / total, ncols);\n return \"\".concat(lBar).concat(percentage.toFixed(0), \"%\").concat(rBar);\n }\n return \"\".concat(lBar).concat(nFmt).concat(unit, \" [\").concat(elapsedStr, \", \").concat(rateFmt).concat(postfix !== null && postfix !== void 0 ? postfix : \"\", \"]\");\n}\nfunction formatInterval(seconds) {\n var minutes = Math.floor(seconds / 60);\n var secs = Math.floor(seconds % 60);\n return \"\".concat(minutes, \":\").concat(secs.toString().padStart(2, \"0\"));\n}\nfunction formatSize(value, divisor) {\n var units = [\"\", \"K\", \"M\", \"G\", \"T\"];\n var unitIndex = 0;\n while (value >= divisor && unitIndex < units.length - 1) {\n value /= divisor;\n unitIndex++;\n }\n return \"\".concat(value.toFixed(2)).concat(units[unitIndex]);\n}\n// function createProgressBar(\n// fraction: number,\n// ncols: number | undefined\n// ): string {\n// const width = ncols ?? 10;\n// const filled = Math.round(fraction * width);\n// const empty = width - filled;\n// return \"#\".repeat(filled) + \"-\".repeat(empty);\n// }\nvar ProgressBar = function (_a) {\n var state = _a.state, _b = _a.className, className = _b === void 0 ? \"reacttqdm\" : _b, rest = __rest(_a, [\"state\", \"className\"]);\n var containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n var textcontainerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {\n var handleResize = function () {\n if (!containerRef.current || !textcontainerRef.current)\n return;\n (0,_utils_autolayout_txt__WEBPACK_IMPORTED_MODULE_1__.fitTextToContainer)(containerRef.current, textcontainerRef.current, {\n maxFontSize: 12,\n decrementFactor: 0.9,\n });\n };\n handleResize(); // Initial calculation\n window.addEventListener(\"resize\", handleResize);\n return function () {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n console.log(\"STATE\", state);\n var progressPercentage = state.total ? (state.n / state.total) * 100 : 0;\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", __assign({ ref: containerRef, className: className }, rest),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { style: {\n position: \"relative\",\n display: \"flex\",\n flexDirection: \"column\",\n justifyContent: \"center\",\n alignItems: \"center\",\n } },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: className + \"-bar\", style: {\n position: \"absolute\",\n width: \"100%\",\n height: \"100%\", // Adjust height if needed\n overflow: \"hidden\",\n } },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: className + \"-progress\", style: {\n width: \"\".concat(progressPercentage, \"%\"),\n height: \"100%\",\n } })),\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: className + \"-text\", ref: textcontainerRef }, formatMeter(state)))));\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProgressBar);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/frontend/utils/progressbar.tsx?");
|
|
2790
|
+
|
|
2791
|
+
/***/ }),
|
|
2792
|
+
|
|
2633
2793
|
/***/ "./src/frontend/utils/select.tsx":
|
|
2634
2794
|
/*!***************************************!*\
|
|
2635
2795
|
!*** ./src/frontend/utils/select.tsx ***!
|
|
@@ -2656,7 +2816,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2656
2816
|
\******************************************/
|
|
2657
2817
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2658
2818
|
|
|
2659
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! uuid */ \"../node_modules/uuid/dist/esm-browser/v4.js\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n/* harmony import */ var _utils_debugger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/debugger */ \"./src/utils/debugger.ts\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\nvar FuncNodesWorker = /** @class */ (function () {\n function FuncNodesWorker(data) {\n var _this = this;\n this.uuid = data.uuid;\n this.on_error =\n data.on_error ||\n (function (err) {\n var _a;\n (_a = _this._zustand) === null || _a === void 0 ? void 0 : _a.logger.error(err);\n });\n this.messagePromises = new Map();\n this._local_nodeupdates = new Map();\n this._nodeupdatetimer = setTimeout(function () {\n _this.sync_local_node_updates();\n }, 1000);\n this.is_open = true;\n if (data.zustand)\n this.set_zustand(data.zustand);\n }\n FuncNodesWorker.prototype.set_zustand = function (zustand) {\n this._zustand = zustand;\n this._zustand.auto_progress();\n this.stepwise_fullsync();\n };\n FuncNodesWorker.prototype.stepwise_fullsync = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this.sync_lib()];\n case 1:\n _a.sent();\n return [4 /*yield*/, this.sync_external_worker()];\n case 2:\n _a.sent();\n return [4 /*yield*/, this.sync_funcnodes_plugins()];\n case 3:\n _a.sent();\n return [4 /*yield*/, this.sync_nodespace()];\n case 4:\n _a.sent();\n return [4 /*yield*/, this.sync_view_state()];\n case 5:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_lib = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_library\",\n wait_for_response: true,\n retries: 2,\n })];\n case 1:\n resp = _a.sent();\n this._zustand.lib.libstate.getState().set({\n lib: resp,\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_external_worker = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_worker_dependencies\",\n wait_for_response: true,\n })];\n case 1:\n resp = _a.sent();\n this._zustand.lib.libstate.getState().set({\n external_worker: resp,\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_funcnodes_plugins = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp, _i, resp_1, key, plugin, _a, _b, js, scripttag, _c, _d, css, styletag, binaryString, binaryLen, bytes, i, blob, blobUrl, module;\n return __generator(this, function (_e) {\n switch (_e.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_plugin_keys\",\n wait_for_response: true,\n kwargs: { type: \"react\" },\n })];\n case 1:\n resp = (_e.sent());\n _i = 0, resp_1 = resp;\n _e.label = 2;\n case 2:\n if (!(_i < resp_1.length)) return [3 /*break*/, 6];\n key = resp_1[_i];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_plugin\",\n wait_for_response: true,\n kwargs: { key: key, type: \"react\" },\n })];\n case 3:\n plugin = _e.sent();\n if (plugin.js) {\n for (_a = 0, _b = plugin.js; _a < _b.length; _a++) {\n js = _b[_a];\n scripttag = document.createElement(\"script\");\n scripttag.text = atob(js);\n document.body.appendChild(scripttag);\n }\n }\n if (plugin.css) {\n for (_c = 0, _d = plugin.css; _c < _d.length; _c++) {\n css = _d[_c];\n styletag = document.createElement(\"style\");\n styletag.innerHTML = atob(css);\n document.head.appendChild(styletag);\n }\n }\n if (!(plugin.module !== undefined)) return [3 /*break*/, 5];\n binaryString = atob(plugin.module);\n binaryLen = binaryString.length;\n bytes = new Uint8Array(binaryLen);\n for (i = 0; i < binaryLen; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n blob = new Blob([bytes], { type: \"application/javascript\" });\n blobUrl = URL.createObjectURL(blob);\n return [4 /*yield*/, import(/* webpackIgnore: true */ blobUrl)];\n case 4:\n module = _e.sent();\n // gc the blob\n URL.revokeObjectURL(blobUrl);\n this._zustand.add_plugin(key, module.default);\n _e.label = 5;\n case 5:\n _i++;\n return [3 /*break*/, 2];\n case 6: return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_view_state = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp, nodeview, nodeid, nodev;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"view_state\",\n wait_for_response: true,\n })];\n case 1:\n resp = (_a.sent());\n if (resp.renderoptions)\n this._zustand.update_render_options(resp.renderoptions);\n nodeview = resp.nodes;\n if (nodeview) {\n for (nodeid in nodeview) {\n nodev = nodeview[nodeid];\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n frontend: nodev,\n },\n id: nodeid,\n from_remote: true,\n });\n }\n }\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_nodespace = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp, _i, resp_2, node, edges, _a, edges_1, edge;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_nodes\",\n kwargs: { with_frontend: true },\n wait_for_response: true,\n })];\n case 1:\n resp = (_b.sent());\n for (_i = 0, resp_2 = resp; _i < resp_2.length; _i++) {\n node = resp_2[_i];\n this._recieve_node_added(node);\n }\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_edges\",\n wait_for_response: true,\n })];\n case 2:\n edges = (_b.sent());\n for (_a = 0, edges_1 = edges; _a < edges_1.length; _a++) {\n edge = edges_1[_a];\n this._recieve_edge_added.apply(this, edge);\n }\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.fullsync = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp, e_1, nodeview, _i, _a, node, _b, _c, edge;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n _d.label = 1;\n case 1:\n if (false) {}\n _d.label = 2;\n case 2:\n _d.trys.push([2, 4, , 5]);\n return [4 /*yield*/, this._send_cmd({ cmd: \"full_state\" })];\n case 3:\n resp = (_d.sent());\n return [3 /*break*/, 6];\n case 4:\n e_1 = _d.sent();\n this._zustand.logger.error(\"Error in fullsync\", e_1);\n return [3 /*break*/, 5];\n case 5: return [3 /*break*/, 1];\n case 6:\n this._zustand.logger.debug(\"Full state\", resp);\n this._zustand.lib.libstate.getState().set({\n lib: resp.backend.lib,\n external_worker: resp.worker_dependencies,\n });\n if (resp.view.renderoptions)\n this._zustand.update_render_options(resp.view.renderoptions);\n nodeview = resp.view.nodes;\n for (_i = 0, _a = resp.backend.nodes; _i < _a.length; _i++) {\n node = _a[_i];\n if (nodeview[node.id] !== undefined) {\n node.frontend = nodeview[node.id];\n }\n this._recieve_node_added(node);\n }\n for (_b = 0, _c = resp.backend.edges; _b < _c.length; _b++) {\n edge = _c[_b];\n this._recieve_edge_added.apply(this, edge);\n }\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype._recieve_edge_added = function (src_nid, src_ioid, trg_nid, trg_ioid) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.on_edge_action(__assign({ type: \"add\", from_remote: true }, { src_nid: src_nid, src_ioid: src_ioid, trg_nid: trg_nid, trg_ioid: trg_ioid }));\n return [2 /*return*/];\n });\n });\n };\n FuncNodesWorker.prototype.trigger_node = function (node_id) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"trigger_node\",\n kwargs: { nid: node_id },\n wait_for_response: false,\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.add_node = function (node_id) {\n return __awaiter(this, void 0, void 0, function () {\n var resp;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"add_node\",\n kwargs: { id: node_id },\n })];\n case 1:\n resp = _a.sent();\n this._recieve_node_added(resp);\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.remove_node = function (node_id) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"remove_node\",\n kwargs: { id: node_id },\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype._recieve_node_added = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.on_node_action({\n type: \"add\",\n node: data,\n id: data.id,\n from_remote: true,\n });\n return [2 /*return*/];\n });\n });\n };\n FuncNodesWorker.prototype.add_edge = function (_a) {\n var src_nid = _a.src_nid, src_ioid = _a.src_ioid, trg_nid = _a.trg_nid, trg_ioid = _a.trg_ioid, _b = _a.replace, replace = _b === void 0 ? false : _b;\n return this._send_cmd({\n cmd: \"add_edge\",\n kwargs: { src_nid: src_nid, src_ioid: src_ioid, trg_nid: trg_nid, trg_ioid: trg_ioid, replace: replace },\n });\n };\n FuncNodesWorker.prototype.remove_edge = function (_a) {\n var src_nid = _a.src_nid, src_ioid = _a.src_ioid, trg_nid = _a.trg_nid, trg_ioid = _a.trg_ioid;\n return this._send_cmd({\n cmd: \"remove_edge\",\n kwargs: { src_nid: src_nid, src_ioid: src_ioid, trg_nid: trg_nid, trg_ioid: trg_ioid },\n });\n };\n FuncNodesWorker.prototype.add_external_worker = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var module = _b.module, cls_module = _b.cls_module, cls_name = _b.cls_name;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"add_external_worker\",\n kwargs: { module: module, cls_module: cls_module, cls_name: cls_name },\n })];\n case 1: return [2 /*return*/, _c.sent()];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_local_node_updates = function () {\n var _this = this;\n clearTimeout(this._nodeupdatetimer);\n this._local_nodeupdates.forEach(function (node, id) { return __awaiter(_this, void 0, void 0, function () {\n var ans;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"update_node\",\n kwargs: { nid: id, data: node },\n wait_for_response: true,\n })];\n case 1:\n ans = _a.sent();\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.on_node_action({\n type: \"update\",\n node: ans,\n id: id,\n from_remote: true,\n });\n return [2 /*return*/];\n }\n });\n }); });\n this._local_nodeupdates.clear();\n this._nodeupdatetimer = setTimeout(function () {\n _this.sync_local_node_updates();\n }, 200);\n };\n FuncNodesWorker.prototype.locally_update_node = function (action) {\n // Add the type to the parameter\n var currentstate = this._local_nodeupdates.get(action.id);\n if (currentstate) {\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.deep_merge)(currentstate, action.node), new_obj = _a.new_obj, change = _a.change;\n if (change) {\n this._local_nodeupdates.set(action.id, new_obj);\n }\n }\n else {\n this._local_nodeupdates.set(action.id, action.node);\n }\n if (action.immediate) {\n this.sync_local_node_updates();\n }\n };\n FuncNodesWorker.prototype.get_remote_node_state = function (nid) {\n return __awaiter(this, void 0, void 0, function () {\n var ans;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_node_state\",\n kwargs: { nid: nid },\n wait_for_response: true,\n })];\n case 1:\n ans = _a.sent();\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.on_node_action({\n type: \"update\",\n node: ans,\n id: ans.id,\n from_remote: true,\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.set_io_value = function (_a) {\n var nid = _a.nid, ioid = _a.ioid, value = _a.value, _b = _a.set_default, set_default = _b === void 0 ? false : _b;\n return this._send_cmd({\n cmd: \"set_io_value\",\n kwargs: { nid: nid, ioid: ioid, value: value, set_default: set_default },\n wait_for_response: true,\n });\n };\n FuncNodesWorker.prototype.clear = function () {\n return this._send_cmd({ cmd: \"clear\" });\n };\n FuncNodesWorker.prototype.save = function () {\n return this._send_cmd({ cmd: \"save\", wait_for_response: true });\n };\n FuncNodesWorker.prototype.load = function (data) {\n var _this = this;\n return this._send_cmd({\n cmd: \"load_data\",\n kwargs: { data: data },\n wait_for_response: true,\n }).then(function () {\n _this.stepwise_fullsync();\n });\n };\n FuncNodesWorker.prototype.get_io_value = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var res;\n var _c;\n var nid = _b.nid, ioid = _b.ioid;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_io_value\",\n kwargs: { nid: nid, ioid: ioid },\n wait_for_response: true,\n })];\n case 1:\n res = _d.sent();\n if (!this._zustand)\n return [2 /*return*/, res];\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n io: (_c = {},\n _c[ioid] = {\n value: res,\n },\n _c),\n },\n id: nid,\n from_remote: true,\n });\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.get_ios_values = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var res, mappedres, ioid;\n var nid = _b.nid;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_ios_values\",\n kwargs: { nid: nid },\n wait_for_response: true,\n })];\n case 1:\n res = _c.sent();\n if (!this._zustand)\n return [2 /*return*/, res];\n mappedres = {};\n for (ioid in res) {\n mappedres[ioid] = { value: res[ioid] };\n }\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n io: mappedres,\n },\n id: nid,\n from_remote: true,\n });\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype._send_cmd = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var msg, wait_for_response_callback;\n var _this = this;\n var cmd = _b.cmd, kwargs = _b.kwargs, _c = _b.wait_for_response, wait_for_response = _c === void 0 ? true : _c, _d = _b.response_timeout, response_timeout = _d === void 0 ? 5000 : _d, _e = _b.retries, retries = _e === void 0 ? 2 : _e;\n return __generator(this, function (_f) {\n msg = {\n type: \"cmd\",\n cmd: cmd,\n kwargs: kwargs || {},\n };\n if (wait_for_response) {\n if (retries < 0)\n retries = 0;\n wait_for_response_callback = function () { return __awaiter(_this, void 0, void 0, function () {\n var response, _loop_1, this_1, state_1;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _loop_1 = function () {\n var msid, promise, e_2;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n msid = msg.id || (0,uuid__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n msg.id = msid;\n promise = new Promise(function (resolve, reject) {\n var timeout = setTimeout(function () {\n reject(\"Timeout@wait_for_response for \" + cmd);\n }, response_timeout);\n _this.messagePromises.set(msid, {\n resolve: function (data) {\n clearTimeout(timeout);\n resolve(data);\n _this.messagePromises.delete(msid);\n },\n reject: function (err) {\n clearTimeout(timeout);\n reject(err);\n _this.messagePromises.delete(msid);\n },\n });\n });\n return [4 /*yield*/, this_1.send(msg)];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2:\n _b.trys.push([2, 4, , 5]);\n return [4 /*yield*/, promise];\n case 3:\n response = _b.sent();\n return [2 /*return*/, \"break\"];\n case 4:\n e_2 = _b.sent();\n if (retries === 0)\n throw e_2;\n retries -= 1;\n return [2 /*return*/, \"continue\"];\n case 5: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n _a.label = 1;\n case 1:\n if (!(retries >= 0)) return [3 /*break*/, 3];\n return [5 /*yield**/, _loop_1()];\n case 2:\n state_1 = _a.sent();\n if (state_1 === \"break\")\n return [3 /*break*/, 3];\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/, response];\n }\n });\n }); };\n return [2 /*return*/, wait_for_response_callback()];\n }\n return [2 /*return*/, this.send(msg)];\n });\n });\n };\n FuncNodesWorker.prototype.send = function (_data) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n // this is the abstract method that should be implemented by subclasses\n throw new Error(\"Not implemented\");\n });\n });\n };\n FuncNodesWorker.prototype.recieve_workerevent = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var _c;\n var event = _b.event, data = _b.data;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n _c = event;\n switch (_c) {\n case \"worker_error\": return [3 /*break*/, 1];\n case \"update_worker_dependencies\": return [3 /*break*/, 2];\n case \"lib_update\": return [3 /*break*/, 3];\n case \"external_worker_update\": return [3 /*break*/, 5];\n }\n return [3 /*break*/, 8];\n case 1:\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.logger.error(data.error)];\n case 2:\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.lib.libstate.getState().set({\n external_worker: data.worker_dependencies,\n })];\n case 3: return [4 /*yield*/, this.sync_lib()];\n case 4:\n _d.sent();\n return [2 /*return*/];\n case 5: return [4 /*yield*/, this.sync_lib()];\n case 6:\n _d.sent();\n return [4 /*yield*/, this.sync_external_worker()];\n case 7:\n _d.sent();\n return [2 /*return*/];\n case 8:\n console.warn(\"Unhandled worker event\", event, data);\n return [3 /*break*/, 9];\n case 9: return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.recieve_nodespace_event = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var _c, _d;\n var event = _b.event, data = _b.data;\n return __generator(this, function (_e) {\n (0,_utils_debugger__WEBPACK_IMPORTED_MODULE_1__.print_object_size)(data, \"Data size for event \" + event, this._zustand);\n (0,_utils_debugger__WEBPACK_IMPORTED_MODULE_1__.print_object)(data, this._zustand);\n switch (event) {\n case \"after_set_value\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"update\",\n node: {\n id: data.node,\n io: (_c = {},\n _c[data.io] = {\n value: data.result,\n },\n _c),\n },\n id: data.node,\n from_remote: true,\n })];\n case \"after_update_value_options\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"update\",\n node: {\n id: data.node,\n io: (_d = {},\n _d[data.io] = {\n value_options: data.result,\n },\n _d),\n },\n id: data.node,\n from_remote: true,\n })];\n case \"triggerstart\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"update\",\n node: {\n id: data.node,\n in_trigger: true,\n },\n id: data.node,\n from_remote: true,\n })];\n case \"triggerdone\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"update\",\n node: {\n id: data.node,\n in_trigger: false,\n },\n id: data.node,\n from_remote: true,\n })];\n case \"node_trigger_error\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"error\",\n errortype: \"trigger\",\n error: data.error,\n id: data.node,\n from_remote: true,\n })];\n case \"node_removed\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"delete\",\n id: data.node,\n from_remote: true,\n })];\n case \"node_added\":\n return [2 /*return*/, this._recieve_node_added(data.node)];\n case \"after_disconnect\":\n if (!data.result)\n return [2 /*return*/];\n if (!Array.isArray(data.result))\n return [2 /*return*/];\n if (data.result.length !== 4)\n return [2 /*return*/];\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_edge_action({\n type: \"delete\",\n from_remote: true,\n src_nid: data.result[0],\n src_ioid: data.result[1],\n trg_nid: data.result[2],\n trg_ioid: data.result[3],\n })];\n case \"after_unforward\":\n if (!data.result)\n return [2 /*return*/];\n if (!Array.isArray(data.result))\n return [2 /*return*/];\n if (data.result.length !== 4)\n return [2 /*return*/];\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_edge_action({\n type: \"delete\",\n from_remote: true,\n src_nid: data.result[0],\n src_ioid: data.result[1],\n trg_nid: data.result[2],\n trg_ioid: data.result[3],\n })];\n case \"after_connect\":\n if (!data.result)\n return [2 /*return*/];\n if (!Array.isArray(data.result))\n return [2 /*return*/];\n if (data.result.length !== 4)\n return [2 /*return*/];\n return [2 /*return*/, this._recieve_edge_added.apply(this, data.result)];\n case \"after_forward\":\n if (!data.result)\n return [2 /*return*/];\n if (!Array.isArray(data.result))\n return [2 /*return*/];\n if (data.result.length !== 4)\n return [2 /*return*/];\n return [2 /*return*/, this._recieve_edge_added.apply(this, data.result)];\n case \"after_add_shelf\":\n if (!data.result)\n return [2 /*return*/];\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.lib.libstate.getState().set({\n lib: data.result,\n })];\n case \"after_remove_shelf\":\n if (!data.result)\n return [2 /*return*/];\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.lib.libstate.getState().set({\n lib: data.result,\n })];\n default:\n console.warn(\"Unhandled nodepsace event\", event, data);\n break;\n }\n return [2 /*return*/];\n });\n });\n };\n FuncNodesWorker.prototype.add_lib = function (lib) {\n return __awaiter(this, void 0, void 0, function () {\n var ans;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"add_package_dependency\",\n kwargs: { name: lib },\n wait_for_response: false,\n })];\n case 1:\n ans = _a.sent();\n return [2 /*return*/, ans];\n }\n });\n });\n };\n FuncNodesWorker.prototype.remove_lib = function (lib) {\n return __awaiter(this, void 0, void 0, function () {\n var ans;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"remove_package_dependency\",\n kwargs: { name: lib },\n wait_for_response: false,\n })];\n case 1:\n ans = _a.sent();\n return [2 /*return*/, ans];\n }\n });\n });\n };\n FuncNodesWorker.prototype.recieve = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n var promise, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = data.type;\n switch (_a) {\n case \"nsevent\": return [3 /*break*/, 1];\n case \"result\": return [3 /*break*/, 3];\n case \"error\": return [3 /*break*/, 4];\n case \"progress\": return [3 /*break*/, 5];\n case \"workerevent\": return [3 /*break*/, 6];\n }\n return [3 /*break*/, 8];\n case 1: return [4 /*yield*/, this.recieve_nodespace_event(data)];\n case 2: return [2 /*return*/, _b.sent()];\n case 3:\n promise = data.id && this.messagePromises.get(data.id);\n if (promise) {\n return [2 /*return*/, promise.resolve(data.result)];\n }\n return [3 /*break*/, 9];\n case 4:\n this.on_error(data.tb + \"\\n\" + data.error);\n promise = data.id && this.messagePromises.get(data.id);\n if (promise) {\n return [2 /*return*/, promise.reject(data.error)];\n }\n return [3 /*break*/, 9];\n case 5:\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.set_progress(data);\n return [3 /*break*/, 9];\n case 6: return [4 /*yield*/, this.recieve_workerevent(data)];\n case 7: return [2 /*return*/, _b.sent()];\n case 8:\n console.warn(\"Unhandled message\", data);\n return [3 /*break*/, 9];\n case 9: return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.disconnect = function () { };\n FuncNodesWorker.prototype.onclose = function () {\n this.is_open = false;\n if (!this._zustand)\n return;\n this._zustand.auto_progress();\n };\n FuncNodesWorker.prototype.reconnect = function () {\n return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/];\n }); });\n };\n FuncNodesWorker.prototype.stop = function () {\n return __awaiter(this, void 0, void 0, function () {\n var oldonclose;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({ cmd: \"stop_worker\", wait_for_response: false })];\n case 1:\n _a.sent();\n oldonclose = this.onclose.bind(this);\n this.onclose = function () {\n oldonclose();\n if (!_this._zustand)\n return;\n if (_this._zustand.worker === _this) {\n _this._zustand.clear_all();\n }\n _this.onclose = oldonclose;\n };\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.get_io_full_value = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var res;\n var _c;\n var nid = _b.nid, ioid = _b.ioid;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_io_full_value\",\n kwargs: { nid: nid, ioid: ioid },\n wait_for_response: true,\n })];\n case 1:\n res = _d.sent();\n if (!this._zustand)\n return [2 /*return*/, res];\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n io: (_c = {},\n _c[ioid] = {\n fullvalue: res,\n },\n _c),\n },\n id: nid,\n from_remote: true,\n });\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.update_io_options = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var res;\n var _c;\n var nid = _b.nid, ioid = _b.ioid, options = _b.options;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"update_io_options\",\n kwargs: __assign({ nid: nid, ioid: ioid }, options),\n wait_for_response: true,\n })];\n case 1:\n res = _d.sent();\n if (!this._zustand)\n return [2 /*return*/, res];\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n io: (_c = {},\n _c[ioid] = __assign({}, options),\n _c),\n },\n id: nid,\n from_remote: true,\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.get_node_status = function (nid) {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_node_state\",\n kwargs: { nid: nid },\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.get_available_modules = function () {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_available_modules\",\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.update_external_worker = function (worker_id, class_id, data) {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"update_external_worker\",\n kwargs: __assign({ worker_id: worker_id, class_id: class_id }, data),\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.remove_external_worker = function (worker_id, class_id) {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"remove_external_worker\",\n kwargs: { worker_id: worker_id, class_id: class_id },\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n return [2 /*return*/, res];\n }\n });\n });\n };\n return FuncNodesWorker;\n}());\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FuncNodesWorker);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/funcnodes/funcnodesworker.ts?");
|
|
2819
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! uuid */ \"../node_modules/uuid/dist/esm-browser/v4.js\");\n/* harmony import */ var zustand__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! zustand */ \"../node_modules/zustand/esm/index.mjs\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n/* harmony import */ var _utils_debugger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/debugger */ \"./src/utils/debugger.ts\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\nvar FuncNodesWorker = /** @class */ (function () {\n function FuncNodesWorker(data) {\n var _this = this;\n this.uuid = data.uuid;\n this.on_error =\n data.on_error ||\n (function (err) {\n var _a;\n (_a = _this._zustand) === null || _a === void 0 ? void 0 : _a.logger.error(err);\n });\n this.messagePromises = new Map();\n this._local_nodeupdates = new Map();\n this._nodeupdatetimer = setTimeout(function () {\n _this.sync_local_node_updates();\n }, 1000);\n this.state = (0,zustand__WEBPACK_IMPORTED_MODULE_2__.create)(function (_set, _get) { return ({\n is_open: true,\n }); });\n if (data.zustand)\n this.set_zustand(data.zustand);\n if (data.on_sync_complete) {\n this.on_sync_complete = data.on_sync_complete;\n }\n else {\n this.on_sync_complete = function () { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/];\n }); }); };\n }\n }\n FuncNodesWorker.prototype.set_zustand = function (zustand) {\n if (zustand === this._zustand)\n return;\n this._zustand = zustand;\n zustand.set_worker(this);\n this._zustand.auto_progress();\n this.stepwise_fullsync();\n };\n Object.defineProperty(FuncNodesWorker.prototype, \"is_open\", {\n get: function () {\n return this.state.getState().is_open;\n },\n set: function (v) {\n this.state.setState({ is_open: v });\n },\n enumerable: false,\n configurable: true\n });\n FuncNodesWorker.prototype.stepwise_fullsync = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this.sync_lib()];\n case 1:\n _a.sent();\n return [4 /*yield*/, this.sync_external_worker()];\n case 2:\n _a.sent();\n return [4 /*yield*/, this.sync_funcnodes_plugins()];\n case 3:\n _a.sent();\n return [4 /*yield*/, this.sync_nodespace()];\n case 4:\n _a.sent();\n return [4 /*yield*/, this.sync_view_state()];\n case 5:\n _a.sent();\n return [4 /*yield*/, this.on_sync_complete(this)];\n case 6:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_lib = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_library\",\n wait_for_response: true,\n retries: 2,\n })];\n case 1:\n resp = _a.sent();\n this._zustand.lib.libstate.getState().set({\n lib: resp,\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_external_worker = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_worker_dependencies\",\n wait_for_response: true,\n })];\n case 1:\n resp = _a.sent();\n this._zustand.lib.libstate.getState().set({\n external_worker: resp,\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_funcnodes_plugins = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp, _i, resp_1, key, plugin, _a, _b, js, scripttag, _c, _d, css, styletag, binaryString, binaryLen, bytes, i, blob, blobUrl, module;\n return __generator(this, function (_e) {\n switch (_e.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_plugin_keys\",\n wait_for_response: true,\n kwargs: { type: \"react\" },\n })];\n case 1:\n resp = (_e.sent());\n _i = 0, resp_1 = resp;\n _e.label = 2;\n case 2:\n if (!(_i < resp_1.length)) return [3 /*break*/, 6];\n key = resp_1[_i];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_plugin\",\n wait_for_response: true,\n kwargs: { key: key, type: \"react\" },\n })];\n case 3:\n plugin = _e.sent();\n if (plugin.js) {\n for (_a = 0, _b = plugin.js; _a < _b.length; _a++) {\n js = _b[_a];\n scripttag = document.createElement(\"script\");\n scripttag.text = atob(js);\n document.body.appendChild(scripttag);\n }\n }\n if (plugin.css) {\n for (_c = 0, _d = plugin.css; _c < _d.length; _c++) {\n css = _d[_c];\n styletag = document.createElement(\"style\");\n styletag.innerHTML = atob(css);\n document.head.appendChild(styletag);\n }\n }\n if (!(plugin.module !== undefined)) return [3 /*break*/, 5];\n binaryString = atob(plugin.module);\n binaryLen = binaryString.length;\n bytes = new Uint8Array(binaryLen);\n for (i = 0; i < binaryLen; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n blob = new Blob([bytes], { type: \"application/javascript\" });\n blobUrl = URL.createObjectURL(blob);\n return [4 /*yield*/, import(/* webpackIgnore: true */ blobUrl)];\n case 4:\n module = _e.sent();\n // gc the blob\n URL.revokeObjectURL(blobUrl);\n this._zustand.add_plugin(key, module.default);\n _e.label = 5;\n case 5:\n _i++;\n return [3 /*break*/, 2];\n case 6: return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_view_state = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp, nodeview, nodeid, nodev;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"view_state\",\n wait_for_response: true,\n })];\n case 1:\n resp = (_a.sent());\n if (resp.renderoptions)\n this._zustand.update_render_options(resp.renderoptions);\n nodeview = resp.nodes;\n if (nodeview) {\n for (nodeid in nodeview) {\n nodev = nodeview[nodeid];\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n frontend: nodev,\n },\n id: nodeid,\n from_remote: true,\n });\n }\n }\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_nodespace = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp, _i, resp_2, node, edges, _a, edges_1, edge;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_nodes\",\n kwargs: { with_frontend: true },\n wait_for_response: true,\n })];\n case 1:\n resp = (_b.sent());\n for (_i = 0, resp_2 = resp; _i < resp_2.length; _i++) {\n node = resp_2[_i];\n this._recieve_node_added(node);\n }\n return [4 /*yield*/, this._send_cmd({\n cmd: \"get_edges\",\n wait_for_response: true,\n })];\n case 2:\n edges = (_b.sent());\n for (_a = 0, edges_1 = edges; _a < edges_1.length; _a++) {\n edge = edges_1[_a];\n this._recieve_edge_added.apply(this, edge);\n }\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.fullsync = function () {\n return __awaiter(this, void 0, void 0, function () {\n var resp, e_1, nodeview, _i, _a, node, _b, _c, edge;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (!this._zustand)\n return [2 /*return*/];\n if (!this.is_open)\n return [2 /*return*/];\n _d.label = 1;\n case 1:\n if (false) {}\n _d.label = 2;\n case 2:\n _d.trys.push([2, 4, , 5]);\n return [4 /*yield*/, this._send_cmd({ cmd: \"full_state\" })];\n case 3:\n resp = (_d.sent());\n return [3 /*break*/, 6];\n case 4:\n e_1 = _d.sent();\n this._zustand.logger.error(\"Error in fullsync\", e_1);\n return [3 /*break*/, 5];\n case 5: return [3 /*break*/, 1];\n case 6:\n this._zustand.logger.debug(\"Full state\", resp);\n this._zustand.lib.libstate.getState().set({\n lib: resp.backend.lib,\n external_worker: resp.worker_dependencies,\n });\n if (resp.view.renderoptions)\n this._zustand.update_render_options(resp.view.renderoptions);\n nodeview = resp.view.nodes;\n for (_i = 0, _a = resp.backend.nodes; _i < _a.length; _i++) {\n node = _a[_i];\n if (nodeview[node.id] !== undefined) {\n node.frontend = nodeview[node.id];\n }\n this._recieve_node_added(node);\n }\n for (_b = 0, _c = resp.backend.edges; _b < _c.length; _b++) {\n edge = _c[_b];\n this._recieve_edge_added.apply(this, edge);\n }\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype._recieve_edge_added = function (src_nid, src_ioid, trg_nid, trg_ioid) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.on_edge_action(__assign({ type: \"add\", from_remote: true }, { src_nid: src_nid, src_ioid: src_ioid, trg_nid: trg_nid, trg_ioid: trg_ioid }));\n return [2 /*return*/];\n });\n });\n };\n FuncNodesWorker.prototype.trigger_node = function (node_id) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"trigger_node\",\n kwargs: { nid: node_id },\n wait_for_response: false,\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.add_node = function (node_id) {\n return __awaiter(this, void 0, void 0, function () {\n var resp;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"add_node\",\n kwargs: { id: node_id },\n })];\n case 1:\n resp = _a.sent();\n this._recieve_node_added(resp);\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.remove_node = function (node_id) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"remove_node\",\n kwargs: { id: node_id },\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype._recieve_node_added = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.on_node_action({\n type: \"add\",\n node: data,\n id: data.id,\n from_remote: true,\n });\n return [2 /*return*/];\n });\n });\n };\n FuncNodesWorker.prototype.add_edge = function (_a) {\n var src_nid = _a.src_nid, src_ioid = _a.src_ioid, trg_nid = _a.trg_nid, trg_ioid = _a.trg_ioid, _b = _a.replace, replace = _b === void 0 ? false : _b;\n return this._send_cmd({\n cmd: \"add_edge\",\n kwargs: { src_nid: src_nid, src_ioid: src_ioid, trg_nid: trg_nid, trg_ioid: trg_ioid, replace: replace },\n });\n };\n FuncNodesWorker.prototype.remove_edge = function (_a) {\n var src_nid = _a.src_nid, src_ioid = _a.src_ioid, trg_nid = _a.trg_nid, trg_ioid = _a.trg_ioid;\n return this._send_cmd({\n cmd: \"remove_edge\",\n kwargs: { src_nid: src_nid, src_ioid: src_ioid, trg_nid: trg_nid, trg_ioid: trg_ioid },\n });\n };\n FuncNodesWorker.prototype.add_external_worker = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var module = _b.module, cls_module = _b.cls_module, cls_name = _b.cls_name;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"add_external_worker\",\n kwargs: { module: module, cls_module: cls_module, cls_name: cls_name },\n })];\n case 1: return [2 /*return*/, _c.sent()];\n }\n });\n });\n };\n FuncNodesWorker.prototype.sync_local_node_updates = function () {\n var _this = this;\n clearTimeout(this._nodeupdatetimer);\n this._local_nodeupdates.forEach(function (node, id) { return __awaiter(_this, void 0, void 0, function () {\n var ans;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"update_node\",\n kwargs: { nid: id, data: node },\n wait_for_response: true,\n })];\n case 1:\n ans = _a.sent();\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.on_node_action({\n type: \"update\",\n node: ans,\n id: id,\n from_remote: true,\n });\n return [2 /*return*/];\n }\n });\n }); });\n this._local_nodeupdates.clear();\n this._nodeupdatetimer = setTimeout(function () {\n _this.sync_local_node_updates();\n }, 200);\n };\n FuncNodesWorker.prototype.locally_update_node = function (action) {\n // Add the type to the parameter\n var currentstate = this._local_nodeupdates.get(action.id);\n if (currentstate) {\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.deep_merge)(currentstate, action.node), new_obj = _a.new_obj, change = _a.change;\n if (change) {\n this._local_nodeupdates.set(action.id, new_obj);\n }\n }\n else {\n this._local_nodeupdates.set(action.id, action.node);\n }\n if (action.immediate) {\n this.sync_local_node_updates();\n }\n };\n FuncNodesWorker.prototype.get_remote_node_state = function (nid) {\n return __awaiter(this, void 0, void 0, function () {\n var ans;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_node_state\",\n kwargs: { nid: nid },\n wait_for_response: true,\n })];\n case 1:\n ans = _a.sent();\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.on_node_action({\n type: \"update\",\n node: ans,\n id: ans.id,\n from_remote: true,\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.set_io_value = function (_a) {\n var nid = _a.nid, ioid = _a.ioid, value = _a.value, _b = _a.set_default, set_default = _b === void 0 ? false : _b;\n return this._send_cmd({\n cmd: \"set_io_value\",\n kwargs: { nid: nid, ioid: ioid, value: value, set_default: set_default },\n wait_for_response: true,\n });\n };\n FuncNodesWorker.prototype.clear = function () {\n return this._send_cmd({ cmd: \"clear\" });\n };\n FuncNodesWorker.prototype.save = function () {\n return this._send_cmd({ cmd: \"save\", wait_for_response: true });\n };\n FuncNodesWorker.prototype.load = function (data) {\n var _this = this;\n return this._send_cmd({\n cmd: \"load_data\",\n kwargs: { data: data },\n wait_for_response: true,\n }).then(function () {\n _this.stepwise_fullsync();\n });\n };\n FuncNodesWorker.prototype.get_io_value = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var res;\n var _c;\n var nid = _b.nid, ioid = _b.ioid;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_io_value\",\n kwargs: { nid: nid, ioid: ioid },\n wait_for_response: true,\n })];\n case 1:\n res = _d.sent();\n if (!this._zustand)\n return [2 /*return*/, res];\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n io: (_c = {},\n _c[ioid] = {\n value: res,\n },\n _c),\n },\n id: nid,\n from_remote: true,\n });\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.get_ios_values = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var res, mappedres, ioid;\n var nid = _b.nid;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_ios_values\",\n kwargs: { nid: nid },\n wait_for_response: true,\n })];\n case 1:\n res = _c.sent();\n if (!this._zustand)\n return [2 /*return*/, res];\n mappedres = {};\n for (ioid in res) {\n mappedres[ioid] = { value: res[ioid] };\n }\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n io: mappedres,\n },\n id: nid,\n from_remote: true,\n });\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype._send_cmd = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var msg, wait_for_response_callback;\n var _this = this;\n var cmd = _b.cmd, kwargs = _b.kwargs, _c = _b.wait_for_response, wait_for_response = _c === void 0 ? true : _c, _d = _b.response_timeout, response_timeout = _d === void 0 ? 5000 : _d, _e = _b.retries, retries = _e === void 0 ? 2 : _e;\n return __generator(this, function (_f) {\n msg = {\n type: \"cmd\",\n cmd: cmd,\n kwargs: kwargs || {},\n };\n if (wait_for_response) {\n if (retries < 0)\n retries = 0;\n wait_for_response_callback = function () { return __awaiter(_this, void 0, void 0, function () {\n var response, _loop_1, this_1, state_1;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _loop_1 = function () {\n var msid, promise, e_2;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n msid = msg.id || (0,uuid__WEBPACK_IMPORTED_MODULE_3__[\"default\"])();\n msg.id = msid;\n promise = new Promise(function (resolve, reject) {\n var timeout = setTimeout(function () {\n reject(\"Timeout@wait_for_response for \" + cmd);\n }, response_timeout);\n _this.messagePromises.set(msid, {\n resolve: function (data) {\n clearTimeout(timeout);\n resolve(data);\n _this.messagePromises.delete(msid);\n },\n reject: function (err) {\n clearTimeout(timeout);\n reject(err);\n _this.messagePromises.delete(msid);\n },\n });\n });\n return [4 /*yield*/, this_1.send(msg)];\n case 1:\n _b.sent();\n _b.label = 2;\n case 2:\n _b.trys.push([2, 4, , 5]);\n return [4 /*yield*/, promise];\n case 3:\n response = _b.sent();\n return [2 /*return*/, \"break\"];\n case 4:\n e_2 = _b.sent();\n if (retries === 0)\n throw e_2;\n retries -= 1;\n return [2 /*return*/, \"continue\"];\n case 5: return [2 /*return*/];\n }\n });\n };\n this_1 = this;\n _a.label = 1;\n case 1:\n if (!(retries >= 0)) return [3 /*break*/, 3];\n return [5 /*yield**/, _loop_1()];\n case 2:\n state_1 = _a.sent();\n if (state_1 === \"break\")\n return [3 /*break*/, 3];\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/, response];\n }\n });\n }); };\n return [2 /*return*/, wait_for_response_callback()];\n }\n return [2 /*return*/, this.send(msg)];\n });\n });\n };\n FuncNodesWorker.prototype.send = function (_data) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n // this is the abstract method that should be implemented by subclasses\n throw new Error(\"Not implemented\");\n });\n });\n };\n FuncNodesWorker.prototype.handle_large_message_hint = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n return __generator(this, function (_c) {\n throw new Error(\"handle_large_message_hint not implemented \");\n });\n });\n };\n FuncNodesWorker.prototype.recieve_workerevent = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var _c;\n var event = _b.event, data = _b.data;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n _c = event;\n switch (_c) {\n case \"worker_error\": return [3 /*break*/, 1];\n case \"update_worker_dependencies\": return [3 /*break*/, 2];\n case \"lib_update\": return [3 /*break*/, 3];\n case \"fullsync\": return [3 /*break*/, 5];\n case \"external_worker_update\": return [3 /*break*/, 7];\n }\n return [3 /*break*/, 10];\n case 1:\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.logger.error(data.error)];\n case 2:\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.lib.libstate.getState().set({\n external_worker: data.worker_dependencies,\n })];\n case 3: return [4 /*yield*/, this.sync_lib()];\n case 4:\n _d.sent();\n return [2 /*return*/];\n case 5: return [4 /*yield*/, this.stepwise_fullsync()];\n case 6:\n _d.sent();\n return [2 /*return*/];\n case 7: return [4 /*yield*/, this.sync_lib()];\n case 8:\n _d.sent();\n return [4 /*yield*/, this.sync_external_worker()];\n case 9:\n _d.sent();\n return [2 /*return*/];\n case 10:\n console.warn(\"Unhandled worker event\", event, data);\n return [3 /*break*/, 11];\n case 11: return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.recieve_nodespace_event = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var _c, _d;\n var event = _b.event, data = _b.data;\n return __generator(this, function (_e) {\n (0,_utils_debugger__WEBPACK_IMPORTED_MODULE_1__.print_object_size)(data, \"Data size for event \" + event, this._zustand);\n (0,_utils_debugger__WEBPACK_IMPORTED_MODULE_1__.print_object)(data, this._zustand);\n switch (event) {\n case \"after_set_value\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"update\",\n node: {\n id: data.node,\n io: (_c = {},\n _c[data.io] = {\n value: data.result,\n },\n _c),\n },\n id: data.node,\n from_remote: true,\n })];\n case \"after_update_value_options\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"update\",\n node: {\n id: data.node,\n io: (_d = {},\n _d[data.io] = {\n value_options: data.result,\n },\n _d),\n },\n id: data.node,\n from_remote: true,\n })];\n case \"triggerstart\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"update\",\n node: {\n id: data.node,\n in_trigger: true,\n },\n id: data.node,\n from_remote: true,\n })];\n case \"triggerdone\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"update\",\n node: {\n id: data.node,\n in_trigger: false,\n },\n id: data.node,\n from_remote: true,\n })];\n case \"node_trigger_error\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"error\",\n errortype: \"trigger\",\n error: data.error,\n id: data.node,\n from_remote: true,\n })];\n case \"node_removed\":\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"delete\",\n id: data.node,\n from_remote: true,\n })];\n case \"node_added\":\n return [2 /*return*/, this._recieve_node_added(data.node)];\n case \"after_disconnect\":\n if (!data.result)\n return [2 /*return*/];\n if (!Array.isArray(data.result))\n return [2 /*return*/];\n if (data.result.length !== 4)\n return [2 /*return*/];\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_edge_action({\n type: \"delete\",\n from_remote: true,\n src_nid: data.result[0],\n src_ioid: data.result[1],\n trg_nid: data.result[2],\n trg_ioid: data.result[3],\n })];\n case \"after_unforward\":\n if (!data.result)\n return [2 /*return*/];\n if (!Array.isArray(data.result))\n return [2 /*return*/];\n if (data.result.length !== 4)\n return [2 /*return*/];\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.on_edge_action({\n type: \"delete\",\n from_remote: true,\n src_nid: data.result[0],\n src_ioid: data.result[1],\n trg_nid: data.result[2],\n trg_ioid: data.result[3],\n })];\n case \"after_connect\":\n if (!data.result)\n return [2 /*return*/];\n if (!Array.isArray(data.result))\n return [2 /*return*/];\n if (data.result.length !== 4)\n return [2 /*return*/];\n return [2 /*return*/, this._recieve_edge_added.apply(this, data.result)];\n case \"after_forward\":\n if (!data.result)\n return [2 /*return*/];\n if (!Array.isArray(data.result))\n return [2 /*return*/];\n if (data.result.length !== 4)\n return [2 /*return*/];\n return [2 /*return*/, this._recieve_edge_added.apply(this, data.result)];\n case \"after_add_shelf\":\n if (!data.result)\n return [2 /*return*/];\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.lib.libstate.getState().set({\n lib: data.result,\n })];\n case \"after_remove_shelf\":\n if (!data.result)\n return [2 /*return*/];\n if (!this._zustand)\n return [2 /*return*/];\n return [2 /*return*/, this._zustand.lib.libstate.getState().set({\n lib: data.result,\n })];\n case \"progress\":\n if (!this._zustand)\n return [2 /*return*/];\n if (data.node) {\n return [2 /*return*/, this._zustand.on_node_action({\n type: \"update\",\n node: {\n id: data.node,\n progress: data.info,\n },\n id: data.node,\n from_remote: true,\n })];\n }\n console.warn(\"Unhandled nodepsace event\", event, data);\n break;\n default:\n console.warn(\"Unhandled nodepsace event\", event, data);\n break;\n }\n return [2 /*return*/];\n });\n });\n };\n FuncNodesWorker.prototype.add_lib = function (lib) {\n return __awaiter(this, void 0, void 0, function () {\n var ans;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"add_package_dependency\",\n kwargs: { name: lib },\n wait_for_response: false,\n })];\n case 1:\n ans = _a.sent();\n return [2 /*return*/, ans];\n }\n });\n });\n };\n FuncNodesWorker.prototype.remove_lib = function (lib) {\n return __awaiter(this, void 0, void 0, function () {\n var ans;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"remove_package_dependency\",\n kwargs: { name: lib },\n wait_for_response: false,\n })];\n case 1:\n ans = _a.sent();\n return [2 /*return*/, ans];\n }\n });\n });\n };\n FuncNodesWorker.prototype.recieve = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n var promise, _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = data.type;\n switch (_a) {\n case \"nsevent\": return [3 /*break*/, 1];\n case \"result\": return [3 /*break*/, 3];\n case \"error\": return [3 /*break*/, 4];\n case \"progress\": return [3 /*break*/, 5];\n case \"workerevent\": return [3 /*break*/, 6];\n case \"large_message\": return [3 /*break*/, 8];\n }\n return [3 /*break*/, 10];\n case 1: return [4 /*yield*/, this.recieve_nodespace_event(data)];\n case 2: return [2 /*return*/, _b.sent()];\n case 3:\n promise = data.id && this.messagePromises.get(data.id);\n if (promise) {\n return [2 /*return*/, promise.resolve(data.result)];\n }\n return [3 /*break*/, 11];\n case 4:\n this.on_error(data.tb + \"\\n\" + data.error);\n promise = data.id && this.messagePromises.get(data.id);\n if (promise) {\n return [2 /*return*/, promise.reject(data.error)];\n }\n return [3 /*break*/, 11];\n case 5:\n if (!this._zustand)\n return [2 /*return*/];\n this._zustand.set_progress(data);\n return [3 /*break*/, 11];\n case 6: return [4 /*yield*/, this.recieve_workerevent(data)];\n case 7: return [2 /*return*/, _b.sent()];\n case 8: return [4 /*yield*/, this.handle_large_message_hint(data)];\n case 9: return [2 /*return*/, _b.sent()];\n case 10:\n console.warn(\"Unhandled message\", data);\n return [3 /*break*/, 11];\n case 11: return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.disconnect = function () { };\n FuncNodesWorker.prototype.onclose = function () {\n this.is_open = false;\n if (!this._zustand)\n return;\n this._zustand.auto_progress();\n };\n FuncNodesWorker.prototype.reconnect = function () {\n return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_a) {\n return [2 /*return*/];\n }); });\n };\n FuncNodesWorker.prototype.stop = function () {\n return __awaiter(this, void 0, void 0, function () {\n var oldonclose;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({ cmd: \"stop_worker\", wait_for_response: false })];\n case 1:\n _a.sent();\n oldonclose = this.onclose.bind(this);\n this.onclose = function () {\n oldonclose();\n if (!_this._zustand)\n return;\n if (_this._zustand.worker === _this) {\n _this._zustand.clear_all();\n }\n _this.onclose = oldonclose;\n };\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.get_io_full_value = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var res;\n var _c;\n var nid = _b.nid, ioid = _b.ioid;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_io_full_value\",\n kwargs: { nid: nid, ioid: ioid },\n wait_for_response: true,\n })];\n case 1:\n res = _d.sent();\n if (!this._zustand)\n return [2 /*return*/, res];\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n io: (_c = {},\n _c[ioid] = {\n fullvalue: res,\n },\n _c),\n },\n id: nid,\n from_remote: true,\n });\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.update_io_options = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var res;\n var _c;\n var nid = _b.nid, ioid = _b.ioid, options = _b.options;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"update_io_options\",\n kwargs: __assign({ nid: nid, ioid: ioid }, options),\n wait_for_response: true,\n })];\n case 1:\n res = _d.sent();\n if (!this._zustand)\n return [2 /*return*/, res];\n this._zustand.on_node_action({\n type: \"update\",\n node: {\n io: (_c = {},\n _c[ioid] = __assign({}, options),\n _c),\n },\n id: nid,\n from_remote: true,\n });\n return [2 /*return*/];\n }\n });\n });\n };\n FuncNodesWorker.prototype.get_node_status = function (nid) {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_node_state\",\n kwargs: { nid: nid },\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.get_available_modules = function () {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"get_available_modules\",\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.update_external_worker = function (worker_id, class_id, data) {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"update_external_worker\",\n kwargs: __assign({ worker_id: worker_id, class_id: class_id }, data),\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.remove_external_worker = function (worker_id, class_id) {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"remove_external_worker\",\n kwargs: { worker_id: worker_id, class_id: class_id },\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.export = function () {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"export_worker\",\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n return [2 /*return*/, res];\n }\n });\n });\n };\n FuncNodesWorker.prototype.update_from_export = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n var res;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this._send_cmd({\n cmd: \"update_from_export\",\n kwargs: { data: data },\n wait_for_response: true,\n })];\n case 1:\n res = _a.sent();\n this.stepwise_fullsync();\n return [2 /*return*/, res];\n }\n });\n });\n };\n return FuncNodesWorker;\n}());\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FuncNodesWorker);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/funcnodes/funcnodesworker.ts?");
|
|
2660
2820
|
|
|
2661
2821
|
/***/ }),
|
|
2662
2822
|
|
|
@@ -2676,7 +2836,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2676
2836
|
\******************************************/
|
|
2677
2837
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2678
2838
|
|
|
2679
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _funcnodesworker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./funcnodesworker */ \"./src/funcnodes/funcnodesworker.ts\");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\nvar WebSocketWorker = /** @class */ (function (_super) {\n __extends(WebSocketWorker, _super);\n function WebSocketWorker(data) {\n var _this = _super.call(this, data) || this;\n _this._websocket = null;\n _this.reconnectAttempts = 0;\n _this.maxReconnectAttempts = 999;\n _this.initialTimeout = 200; // Initial reconnect delay in ms\n _this.maxTimeout = 5000; // Maximum reconnect delay\n _this._reconnect = true;\n _this._url = data.url;\n _this.connect();\n if (_this._zustand)\n _this._zustand.auto_progress();\n return _this;\n }\n WebSocketWorker.prototype.connect = function () {\n var _this = this;\n var _a;\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Connecting to websocket\");\n this.is_open = false;\n this._websocket = new WebSocket(this._url);\n this._websocket.onopen = function () {\n _this.onopen();\n };\n this._websocket.onclose = function () {\n _this.onclose();\n };\n this._websocket.onerror = function () {\n _this.on_ws_error();\n };\n this._websocket.onmessage = function (event) {\n _this.onmessage(event.data);\n };\n };\n WebSocketWorker.prototype.calculateReconnectTimeout = function () {\n // Increase timeout exponentially, capped at maxTimeout\n var timeout = Math.min(this.initialTimeout * Math.pow(2, this.reconnectAttempts), this.maxTimeout);\n return timeout;\n };\n WebSocketWorker.prototype.auto_reconnect = function () {\n var _this = this;\n var _a, _b;\n if (this.reconnectAttempts < this.maxReconnectAttempts) {\n var timeout = this.calculateReconnectTimeout();\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Attempting to reconnect in \".concat(timeout, \" ms\"));\n setTimeout(function () {\n if (_this._websocket) {\n if (_this._websocket.readyState === WebSocket.OPEN) {\n return;\n }\n }\n _this.reconnectAttempts++;\n _this.connect();\n }, timeout);\n }\n else {\n (_b = this._zustand) === null || _b === void 0 ? void 0 : _b.logger.warn(\"Maximum reconnect attempts reached. Giving up.\");\n }\n };\n WebSocketWorker.prototype.onmessage = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n var json;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n json = JSON.parse(data);\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.debug(\"Recieved data of length: \".concat(data.length, \" and data\\\"\"), json);\n return [4 /*yield*/, this.recieve(json)];\n case 1:\n _b.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n WebSocketWorker.prototype.onopen = function () {\n var _a;\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Websocket opened\");\n this.is_open = true;\n if (this._zustand)\n this._zustand.auto_progress();\n this.reconnectAttempts = 0;\n this.stepwise_fullsync();\n };\n WebSocketWorker.prototype.onclose = function () {\n var _a, _b;\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Websocket closed\");\n _super.prototype.onclose.call(this);\n if (this._reconnect) {\n (_b = this._zustand) === null || _b === void 0 ? void 0 : _b.logger.info(\"Websocket closed,reconnecting\");\n this.auto_reconnect(); // Attempt to reconnect\n }\n };\n WebSocketWorker.prototype.on_ws_error = function () {\n var _a;\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.warn(\"Websocket error\");\n if (this._websocket) {\n this._websocket.close(); // Ensure the connection is closed before attempting to reconnect\n }\n else {\n this.auto_reconnect();\n }\n };\n WebSocketWorker.prototype.send = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n var _a, _b;\n return __generator(this, function (_c) {\n if (!this._websocket || this._websocket.readyState !== WebSocket.OPEN) {\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.warn(\"Websocket not connected\");\n return [2 /*return*/];\n }\n (_b = this._zustand) === null || _b === void 0 ? void 0 : _b.logger.debug(\"Sending data\", data);\n this._websocket.send(JSON.stringify(data));\n return [2 /*return*/];\n });\n });\n };\n WebSocketWorker.prototype.stop = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, _super.prototype.stop.call(this)];\n case 1:\n _a.sent();\n this._reconnect = false;\n return [2 /*return*/];\n }\n });\n });\n };\n WebSocketWorker.prototype.close = function () {\n if (this._websocket)\n this._websocket.close();\n };\n WebSocketWorker.prototype.disconnect = function () {\n _super.prototype.disconnect.call(this);\n this._reconnect = false;\n this.close();\n };\n WebSocketWorker.prototype.reconnect = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, _super.prototype.reconnect.call(this)];\n case 1:\n _b.sent();\n this._reconnect = true;\n if (!this._websocket) return [3 /*break*/, 4];\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Reconnecting\");\n if (!(this._websocket.readyState === WebSocket.OPEN ||\n this._websocket.readyState === WebSocket.CONNECTING)) return [3 /*break*/, 4];\n if (!(this._websocket.readyState === WebSocket.CONNECTING)) return [3 /*break*/, 3];\n //await to ensure the websocket is connected, with a timeout of 2 seconds\n return [4 /*yield*/, new Promise(function (resolve, reject) {\n if (_this._websocket === null)\n return;\n var timeout = setTimeout(function () {\n reject(\"Timeout@reconnect\");\n }, 2000);\n _this._websocket.addEventListener(\"open\", function () {\n clearTimeout(timeout);\n resolve(null);\n }, { once: true });\n if (_this._websocket.readyState === WebSocket.OPEN) {\n clearTimeout(timeout);\n resolve(null);\n }\n })];\n case 2:\n //await to ensure the websocket is connected, with a timeout of 2 seconds\n _b.sent();\n _b.label = 3;\n case 3:\n if (this._websocket.readyState === WebSocket.OPEN) {\n this.stepwise_fullsync();\n return [2 /*return*/];\n }\n _b.label = 4;\n case 4:\n this.connect();\n return [2 /*return*/];\n }\n });\n });\n };\n return WebSocketWorker;\n}(_funcnodesworker__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WebSocketWorker);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/funcnodes/websocketworker.ts?");
|
|
2839
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _funcnodesworker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./funcnodesworker */ \"./src/funcnodes/funcnodesworker.ts\");\nvar __extends = (undefined && undefined.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\nvar WebSocketWorker = /** @class */ (function (_super) {\n __extends(WebSocketWorker, _super);\n function WebSocketWorker(data) {\n var _this = _super.call(this, data) || this;\n _this._websocket = null;\n _this.reconnectAttempts = 0;\n _this.maxReconnectAttempts = 999;\n _this.initialTimeout = 200; // Initial reconnect delay in ms\n _this.maxTimeout = 5000; // Maximum reconnect delay\n _this._reconnect = true;\n _this._url = data.url;\n _this.connect();\n if (_this._zustand)\n _this._zustand.auto_progress();\n return _this;\n }\n WebSocketWorker.prototype.connect = function () {\n var _this = this;\n var _a;\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Connecting to websocket\");\n this.is_open = false;\n this._websocket = new WebSocket(this._url);\n this._websocket.onopen = function () {\n _this.onopen();\n };\n this._websocket.onclose = function () {\n _this.onclose();\n };\n this._websocket.onerror = function () {\n _this.on_ws_error();\n };\n this._websocket.onmessage = function (event) {\n _this.onmessage(event.data);\n };\n };\n WebSocketWorker.prototype.calculateReconnectTimeout = function () {\n // Increase timeout exponentially, capped at maxTimeout\n var timeout = Math.min(this.initialTimeout * Math.pow(2, this.reconnectAttempts), this.maxTimeout);\n return timeout;\n };\n WebSocketWorker.prototype.auto_reconnect = function () {\n var _this = this;\n var _a, _b;\n if (this.reconnectAttempts < this.maxReconnectAttempts) {\n var timeout = this.calculateReconnectTimeout();\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Attempting to reconnect in \".concat(timeout, \" ms\"));\n setTimeout(function () {\n if (_this._websocket) {\n if (_this._websocket.readyState === WebSocket.OPEN) {\n return;\n }\n }\n _this.reconnectAttempts++;\n _this.connect();\n }, timeout);\n }\n else {\n (_b = this._zustand) === null || _b === void 0 ? void 0 : _b.logger.warn(\"Maximum reconnect attempts reached. Giving up.\");\n }\n };\n WebSocketWorker.prototype.onmessage = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n var json;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n json = JSON.parse(data);\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.debug(\"Recieved data of length: \".concat(data.length, \" and data\\\"\"), json);\n return [4 /*yield*/, this.recieve(json)];\n case 1:\n _b.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n WebSocketWorker.prototype.handle_large_message_hint = function (_a) {\n return __awaiter(this, arguments, void 0, function (_b) {\n var url, resp, json;\n var msg_id = _b.msg_id;\n return __generator(this, function (_c) {\n switch (_c.label) {\n case 0:\n url = \"http\" + this._url.substring(2);\n //add /msg_id to url to get the large message (url might end with /)\n if (url[url.length - 1] !== \"/\") {\n url += \"/\";\n }\n url += \"message/\" + msg_id;\n return [4 /*yield*/, fetch(url, {\n method: \"GET\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Access-Control-Allow-Origin\": \"*\",\n },\n })];\n case 1:\n resp = _c.sent();\n return [4 /*yield*/, resp.json()];\n case 2:\n json = _c.sent();\n this.recieve(json);\n return [2 /*return*/];\n }\n });\n });\n };\n WebSocketWorker.prototype.onopen = function () {\n var _a;\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Websocket opened\");\n this.is_open = true;\n if (this._zustand)\n this._zustand.auto_progress();\n this.reconnectAttempts = 0;\n this.stepwise_fullsync();\n };\n WebSocketWorker.prototype.onclose = function () {\n var _a, _b;\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Websocket closed\");\n _super.prototype.onclose.call(this);\n if (this._reconnect) {\n (_b = this._zustand) === null || _b === void 0 ? void 0 : _b.logger.info(\"Websocket closed,reconnecting\");\n this.auto_reconnect(); // Attempt to reconnect\n }\n };\n WebSocketWorker.prototype.on_ws_error = function () {\n var _a;\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.warn(\"Websocket error\");\n if (this._websocket) {\n this._websocket.close(); // Ensure the connection is closed before attempting to reconnect\n }\n else {\n this.auto_reconnect();\n }\n };\n WebSocketWorker.prototype.send_large_message = function (jsondata) {\n return __awaiter(this, void 0, void 0, function () {\n var url;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n url = \"http\" + this._url.substring(2);\n //add /msg_id to url to get the large message (url might end with /)\n if (url[url.length - 1] !== \"/\") {\n url += \"/\";\n }\n url += \"message/\";\n return [4 /*yield*/, fetch(url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body: jsondata,\n })];\n case 1:\n _a.sent();\n return [2 /*return*/];\n }\n });\n });\n };\n WebSocketWorker.prototype.send = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n var jsonstring, datasize;\n var _a, _b, _c;\n return __generator(this, function (_d) {\n switch (_d.label) {\n case 0:\n if (!this._websocket || this._websocket.readyState !== WebSocket.OPEN) {\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.warn(\"Websocket not connected\");\n return [2 /*return*/];\n }\n jsonstring = JSON.stringify(data);\n datasize = new Blob([jsonstring]).size;\n if (!(datasize > 1000000)) return [3 /*break*/, 2];\n // 1MB\n (_b = this._zustand) === null || _b === void 0 ? void 0 : _b.logger.info(\"Data too large, sending in chunks\");\n return [4 /*yield*/, this.send_large_message(jsonstring)];\n case 1: return [2 /*return*/, _d.sent()];\n case 2:\n (_c = this._zustand) === null || _c === void 0 ? void 0 : _c.logger.debug(\"Sending data\", data);\n this._websocket.send(jsonstring);\n return [2 /*return*/];\n }\n });\n });\n };\n WebSocketWorker.prototype.stop = function () {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, _super.prototype.stop.call(this)];\n case 1:\n _a.sent();\n this._reconnect = false;\n return [2 /*return*/];\n }\n });\n });\n };\n WebSocketWorker.prototype.close = function () {\n if (this._websocket)\n this._websocket.close();\n };\n WebSocketWorker.prototype.disconnect = function () {\n _super.prototype.disconnect.call(this);\n this._reconnect = false;\n this.close();\n };\n WebSocketWorker.prototype.reconnect = function () {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n var _a;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0: return [4 /*yield*/, _super.prototype.reconnect.call(this)];\n case 1:\n _b.sent();\n this._reconnect = true;\n if (!this._websocket) return [3 /*break*/, 4];\n (_a = this._zustand) === null || _a === void 0 ? void 0 : _a.logger.info(\"Reconnecting\");\n if (!(this._websocket.readyState === WebSocket.OPEN ||\n this._websocket.readyState === WebSocket.CONNECTING)) return [3 /*break*/, 4];\n if (!(this._websocket.readyState === WebSocket.CONNECTING)) return [3 /*break*/, 3];\n //await to ensure the websocket is connected, with a timeout of 2 seconds\n return [4 /*yield*/, new Promise(function (resolve, reject) {\n if (_this._websocket === null)\n return;\n var timeout = setTimeout(function () {\n reject(\"Timeout@reconnect\");\n }, 2000);\n _this._websocket.addEventListener(\"open\", function () {\n clearTimeout(timeout);\n resolve(null);\n }, { once: true });\n if (_this._websocket.readyState === WebSocket.OPEN) {\n clearTimeout(timeout);\n resolve(null);\n }\n })];\n case 2:\n //await to ensure the websocket is connected, with a timeout of 2 seconds\n _b.sent();\n _b.label = 3;\n case 3:\n if (this._websocket.readyState === WebSocket.OPEN) {\n this.stepwise_fullsync();\n return [2 /*return*/];\n }\n _b.label = 4;\n case 4:\n this.connect();\n return [2 /*return*/];\n }\n });\n });\n };\n return WebSocketWorker;\n}(_funcnodesworker__WEBPACK_IMPORTED_MODULE_0__[\"default\"]));\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WebSocketWorker);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/funcnodes/websocketworker.ts?");
|
|
2680
2840
|
|
|
2681
2841
|
/***/ }),
|
|
2682
2842
|
|
|
@@ -2686,7 +2846,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2686
2846
|
\****************************************/
|
|
2687
2847
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2688
2848
|
|
|
2689
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _websocketworker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./websocketworker */ \"./src/funcnodes/websocketworker.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\nvar WorkerManager = /** @class */ (function () {\n function WorkerManager(wsuri, zustand) {\n var _this = this;\n this.ws = null;\n this.reconnectAttempts = 0;\n this.maxReconnectAttempts = 999;\n this.initialTimeout = 200; // Initial reconnect delay in ms\n this.maxTimeout = 2000; // Maximum reconnect delay\n this.wsuri = wsuri;\n this.zustand = zustand;\n this.workers = {};\n this.on_setWorker = function (worker) {\n _this.zustand.worker = worker;\n };\n this.connect();\n }\n WorkerManager.prototype.connect = function () {\n var _this = this;\n this.zustand.set_progress({\n progress: 0,\n message: \"connecting to worker manager\",\n status: \"info\",\n blocking: true,\n });\n this.zustand.logger.info(\"Connecting to websocket:\", this.wsuri);\n this.ws = new WebSocket(this.wsuri);\n this.ws.onopen = function () {\n _this.onopen();\n };\n this.ws.onclose = function () {\n _this.onclose();\n };\n this.ws.onerror = function () {\n _this.on_ws_error();\n };\n this.ws.onmessage = function (event) {\n _this.onmessage(event.data);\n };\n this.connectionTimeout = setTimeout(function () {\n var _a;\n if (((_a = _this.ws) === null || _a === void 0 ? void 0 : _a.readyState) !== WebSocket.OPEN) {\n _this.on_ws_error();\n }\n }, 5000);\n };\n WorkerManager.prototype.on_ws_error = function () {\n console.warn(\"Websocket error\");\n if (this.ws) {\n this.ws.close(); // Ensure the connection is closed before attempting to reconnect\n }\n else {\n this.reconnect();\n }\n };\n WorkerManager.prototype.onopen = function () {\n if (this.connectionTimeout) {\n clearTimeout(this.connectionTimeout);\n this.connectionTimeout = undefined;\n }\n this.zustand.auto_progress();\n if (this.ws) {\n this.ws.send(\"worker_status\");\n }\n // Get active worker from window storage\n var active_worker = window.localStorage.getItem(\"funcnodes__active_worker\");\n if (active_worker) {\n this.set_active(active_worker);\n }\n };\n WorkerManager.prototype.onmessage = function (event) {\n var msg = JSON.parse(event);\n if (msg.type === \"worker_status\") {\n var new_state = {};\n for (var _i = 0, _a = msg.active; _i < _a.length; _i++) {\n var worker = _a[_i];\n worker.active = true;\n new_state[worker.uuid] = worker;\n }\n for (var _b = 0, _c = msg.inactive; _b < _c.length; _b++) {\n var worker = _c[_b];\n worker.active = false;\n new_state[worker.uuid] = worker;\n }\n this.zustand.workers.setState(new_state);\n return;\n }\n else if (msg.type === \"set_worker\") {\n if (msg.data.type === \"WSWorker\") {\n var url = \"ws\" +\n (msg.data.ssl ? \"s\" : \"\") +\n \"://\" +\n msg.data.host +\n \":\" +\n msg.data.port;\n this.setWorker(this.workers[msg.data.uuid] ||\n new _websocketworker__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n url: url,\n zustand: this.zustand,\n uuid: msg.data.uuid,\n }));\n }\n else {\n this.zustand.logger.error(\"WorkerManager: unknown worker type\", msg);\n }\n //store active worker in window storage\n return;\n }\n else if (msg.type === \"progress\") {\n this.zustand.set_progress(msg);\n return;\n }\n this.zustand.logger.error(\"WorkerManager: unknown message\", msg);\n };\n WorkerManager.prototype.setWorker = function (worker) {\n for (var w in this.workers) {\n if (w !== (worker === null || worker === void 0 ? void 0 : worker.uuid)) {\n this.workers[w].disconnect();\n }\n }\n if (worker !== undefined) {\n this.workers[worker.uuid] = worker;\n worker.reconnect();\n }\n window.localStorage.setItem(\"funcnodes__active_worker\", (worker === null || worker === void 0 ? void 0 : worker.uuid) || \"\");\n if (this.zustand.worker !== undefined) {\n this.zustand.clear_all();\n }\n this.zustand.worker = worker;\n this.on_setWorker(worker);\n };\n WorkerManager.prototype.restart_worker = function (workerid) {\n return __awaiter(this, void 0, void 0, function () {\n var _a;\n return __generator(this, function (_b) {\n (_a = this.ws) === null || _a === void 0 ? void 0 : _a.send(JSON.stringify({ type: \"restart_worker\", workerid: workerid }));\n return [2 /*return*/];\n });\n });\n };\n WorkerManager.prototype.calculateReconnectTimeout = function () {\n // Increase timeout exponentially, capped at maxTimeout\n var timeout = Math.min(this.initialTimeout * Math.pow(2, this.reconnectAttempts), this.maxTimeout);\n return timeout;\n };\n WorkerManager.prototype.reconnect = function () {\n var _this = this;\n if (this.reconnectAttempts < this.maxReconnectAttempts) {\n var timeout = this.calculateReconnectTimeout();\n this.zustand.logger.info(\"Attempting to reconnect in \".concat(timeout, \" ms\"));\n setTimeout(function () {\n if (_this.ws) {\n if (_this.ws.readyState === WebSocket.OPEN) {\n return;\n }\n }\n _this.reconnectAttempts++;\n _this.connect();\n }, timeout);\n }\n else {\n this.zustand.logger.warn(\"Maximum reconnect attempts reached. Giving up.\");\n }\n };\n WorkerManager.prototype.onclose = function () {\n this.zustand.logger.warn(\"WorkerManager: onclose\");\n this.reconnect(); // Attempt to reconnect\n };\n WorkerManager.prototype.set_active = function (workerid) {\n if (!this.ws)\n return;\n this.ws.send(JSON.stringify({ type: \"set_active\", workerid: workerid }));\n };\n WorkerManager.prototype.new_worker = function (_a) {\n var name = _a.name, reference = _a.reference, copyLib = _a.copyLib, copyNS = _a.copyNS;\n if (!name)\n name = undefined;\n if (!copyLib)\n copyLib = false;\n if (!copyNS)\n copyNS = false;\n if (!reference) {\n reference = undefined;\n copyLib = false;\n copyNS = false;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify({\n type: \"new_worker\",\n kwargs: {\n name: name,\n reference: reference,\n copyLib: copyLib,\n copyNS: copyNS,\n },\n }));\n }\n };\n return WorkerManager;\n}());\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WorkerManager);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/funcnodes/workermanager.ts?");
|
|
2849
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _websocketworker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./websocketworker */ \"./src/funcnodes/websocketworker.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\nvar WorkerManager = /** @class */ (function () {\n function WorkerManager(wsuri, zustand) {\n var _this = this;\n this.ws = null;\n this.reconnectAttempts = 0;\n this.maxReconnectAttempts = 999;\n this.initialTimeout = 200; // Initial reconnect delay in ms\n this.maxTimeout = 2000; // Maximum reconnect delay\n this.wsuri = wsuri;\n this.zustand = zustand;\n this.workers = {};\n this.on_setWorker = function (worker) {\n _this.zustand.set_worker(worker);\n };\n this.connect();\n }\n WorkerManager.prototype.connect = function () {\n var _this = this;\n this.zustand.set_progress({\n progress: 0,\n message: \"connecting to worker manager\",\n status: \"info\",\n blocking: true,\n });\n this.zustand.logger.info(\"Connecting to websocket:\", this.wsuri);\n this.ws = new WebSocket(this.wsuri);\n this.ws.onopen = function () {\n _this.onopen();\n };\n this.ws.onclose = function () {\n _this.onclose();\n };\n this.ws.onerror = function () {\n _this.on_ws_error();\n };\n this.ws.onmessage = function (event) {\n _this.onmessage(event.data);\n };\n this.connectionTimeout = setTimeout(function () {\n var _a;\n if (((_a = _this.ws) === null || _a === void 0 ? void 0 : _a.readyState) !== WebSocket.OPEN) {\n _this.on_ws_error();\n }\n }, 5000);\n };\n WorkerManager.prototype.on_ws_error = function () {\n console.warn(\"Websocket error\");\n if (this.ws) {\n this.ws.close(); // Ensure the connection is closed before attempting to reconnect\n }\n else {\n this.reconnect();\n }\n };\n WorkerManager.prototype.onopen = function () {\n if (this.connectionTimeout) {\n clearTimeout(this.connectionTimeout);\n this.connectionTimeout = undefined;\n }\n this.zustand.auto_progress();\n if (this.ws) {\n this.ws.send(\"worker_status\");\n }\n // Get active worker from window storage\n var active_worker = window.localStorage.getItem(\"funcnodes__active_worker\");\n if (active_worker) {\n this.set_active(active_worker);\n }\n };\n WorkerManager.prototype.onmessage = function (event) {\n var msg = JSON.parse(event);\n if (msg.type === \"worker_status\") {\n var new_state = {};\n for (var _i = 0, _a = msg.active; _i < _a.length; _i++) {\n var worker = _a[_i];\n worker.active = true;\n new_state[worker.uuid] = worker;\n }\n for (var _b = 0, _c = msg.inactive; _b < _c.length; _b++) {\n var worker = _c[_b];\n worker.active = false;\n new_state[worker.uuid] = worker;\n }\n this.zustand.workers.setState(new_state);\n return;\n }\n else if (msg.type === \"set_worker\") {\n if (msg.data.type === \"WSWorker\") {\n var url = \"ws\" +\n (msg.data.ssl ? \"s\" : \"\") +\n \"://\" +\n msg.data.host +\n \":\" +\n msg.data.port;\n this.setWorker(this.workers[msg.data.uuid] ||\n new _websocketworker__WEBPACK_IMPORTED_MODULE_0__[\"default\"]({\n url: url,\n zustand: this.zustand,\n uuid: msg.data.uuid,\n on_sync_complete: this.zustand.options.on_sync_complete,\n }));\n }\n else {\n this.zustand.logger.error(\"WorkerManager: unknown worker type\", msg);\n }\n //store active worker in window storage\n return;\n }\n else if (msg.type === \"progress\") {\n this.zustand.set_progress(msg);\n return;\n }\n this.zustand.logger.error(\"WorkerManager: unknown message\", msg);\n };\n WorkerManager.prototype.setWorker = function (worker) {\n for (var w in this.workers) {\n if (w !== (worker === null || worker === void 0 ? void 0 : worker.uuid)) {\n this.workers[w].disconnect();\n }\n }\n if (worker !== undefined) {\n this.workers[worker.uuid] = worker;\n worker.reconnect();\n }\n window.localStorage.setItem(\"funcnodes__active_worker\", (worker === null || worker === void 0 ? void 0 : worker.uuid) || \"\");\n if (this.zustand.worker !== undefined) {\n this.zustand.clear_all();\n }\n this.zustand.set_worker(worker);\n this.on_setWorker(worker);\n };\n WorkerManager.prototype.restart_worker = function (workerid) {\n return __awaiter(this, void 0, void 0, function () {\n var _a;\n return __generator(this, function (_b) {\n (_a = this.ws) === null || _a === void 0 ? void 0 : _a.send(JSON.stringify({ type: \"restart_worker\", workerid: workerid }));\n return [2 /*return*/];\n });\n });\n };\n WorkerManager.prototype.calculateReconnectTimeout = function () {\n // Increase timeout exponentially, capped at maxTimeout\n var timeout = Math.min(this.initialTimeout * Math.pow(2, this.reconnectAttempts), this.maxTimeout);\n return timeout;\n };\n WorkerManager.prototype.reconnect = function () {\n var _this = this;\n if (this.reconnectAttempts < this.maxReconnectAttempts) {\n var timeout = this.calculateReconnectTimeout();\n this.zustand.logger.info(\"Attempting to reconnect in \".concat(timeout, \" ms\"));\n setTimeout(function () {\n if (_this.ws) {\n if (_this.ws.readyState === WebSocket.OPEN) {\n return;\n }\n }\n _this.reconnectAttempts++;\n _this.connect();\n }, timeout);\n }\n else {\n this.zustand.logger.warn(\"Maximum reconnect attempts reached. Giving up.\");\n }\n };\n WorkerManager.prototype.onclose = function () {\n this.zustand.logger.warn(\"WorkerManager: onclose\");\n this.reconnect(); // Attempt to reconnect\n };\n WorkerManager.prototype.set_active = function (workerid) {\n if (!this.ws)\n return;\n this.ws.send(JSON.stringify({ type: \"set_active\", workerid: workerid }));\n };\n WorkerManager.prototype.new_worker = function (_a) {\n var name = _a.name, reference = _a.reference, copyLib = _a.copyLib, copyNS = _a.copyNS;\n if (!name)\n name = undefined;\n if (!copyLib)\n copyLib = false;\n if (!copyNS)\n copyNS = false;\n if (!reference) {\n reference = undefined;\n copyLib = false;\n copyNS = false;\n }\n if (this.ws) {\n this.ws.send(JSON.stringify({\n type: \"new_worker\",\n kwargs: {\n name: name,\n reference: reference,\n copyLib: copyLib,\n copyNS: copyNS,\n },\n }));\n }\n };\n return WorkerManager;\n}());\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (WorkerManager);\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/funcnodes/workermanager.ts?");
|
|
2690
2850
|
|
|
2691
2851
|
/***/ }),
|
|
2692
2852
|
|
|
@@ -2696,7 +2856,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2696
2856
|
\***********************/
|
|
2697
2857
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2698
2858
|
|
|
2699
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ WebSocketWorker: () => (/* reexport safe */ _funcnodes_websocketworker__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ helperfunctions: () => (/* reexport safe */ _utils_helperfunctions__WEBPACK_IMPORTED_MODULE_3__[\"default\"])\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _frontend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./frontend */ \"./src/frontend/index.tsx\");\n/* harmony import */ var _funcnodes_websocketworker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./funcnodes/websocketworker */ \"./src/funcnodes/websocketworker.ts\");\n/* harmony import */ var _utils_helperfunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/helperfunctions */ \"./src/utils/helperfunctions.ts\");\n\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_frontend__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\n// import ReactDOM from \"react-dom\";\n// (async () => {\n// // @ts-ignore\n// window.React = await import(\"react\");\n// })();\n// window.ReactDOM = ReactDOM;\n// @ts-ignore\nwindow.React = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/index.tsx?");
|
|
2859
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FuncNodes: () => (/* binding */ FuncNodes),\n/* harmony export */ FuncNodesReactFlowZustand: () => (/* reexport safe */ _states__WEBPACK_IMPORTED_MODULE_4__[\"default\"]),\n/* harmony export */ WebSocketWorker: () => (/* reexport safe */ _funcnodes_websocketworker__WEBPACK_IMPORTED_MODULE_2__[\"default\"]),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__),\n/* harmony export */ helperfunctions: () => (/* reexport safe */ _utils_helperfunctions__WEBPACK_IMPORTED_MODULE_3__[\"default\"])\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _frontend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./frontend */ \"./src/frontend/index.tsx\");\n/* harmony import */ var _funcnodes_websocketworker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./funcnodes/websocketworker */ \"./src/funcnodes/websocketworker.ts\");\n/* harmony import */ var _utils_helperfunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/helperfunctions */ \"./src/utils/helperfunctions.ts\");\n/* harmony import */ var _states__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./states */ \"./src/states/index.ts\");\n/* harmony import */ var react_dom_client__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-dom/client */ \"../node_modules/react-dom/client.js\");\n\n\n\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_frontend__WEBPACK_IMPORTED_MODULE_1__[\"default\"]);\nvar App = function (_a) {\n var id = _a.id, ws_url = _a.ws_url, on_sync_complete = _a.on_sync_complete;\n var useWorkerManager = true;\n var worker = undefined;\n if (ws_url !== undefined) {\n useWorkerManager = false;\n worker = new _funcnodes_websocketworker__WEBPACK_IMPORTED_MODULE_2__[\"default\"]({\n url: ws_url,\n uuid: id,\n on_sync_complete: on_sync_complete,\n });\n var fnrf_zst = (0,_states__WEBPACK_IMPORTED_MODULE_4__[\"default\"])({\n useWorkerManager: useWorkerManager,\n default_worker: worker,\n });\n worker.set_zustand(fnrf_zst);\n }\n return (react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(\"div\", { className: \"App\", style: {\n height: \"100%\",\n width: \"100%\",\n } },\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_frontend__WEBPACK_IMPORTED_MODULE_1__[\"default\"], { id: id, useWorkerManager: useWorkerManager, default_worker: worker, on_sync_complete: on_sync_complete })));\n};\nvar FuncNodes = function (id_or_element, options) {\n var id;\n var element;\n if (options === undefined) {\n options = {};\n }\n if (typeof id_or_element === \"string\") {\n id = id_or_element;\n element = document.getElementById(id);\n }\n else {\n element = id_or_element;\n id = element.id;\n }\n react_dom_client__WEBPACK_IMPORTED_MODULE_5__.createRoot(element).render(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].StrictMode, null,\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(App, { id: id, ws_url: options.ws_url, on_sync_complete: options.on_sync_complete })));\n};\n// @ts-ignore\nwindow.FuncNodes = FuncNodes;\n// import ReactDOM from \"react-dom\";\n// (async () => {\n// // @ts-ignore\n// window.React = await import(\"react\");\n// })();\n// window.ReactDOM = ReactDOM;\n// @ts-ignore\nwindow.React = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/index.tsx?");
|
|
2700
2860
|
|
|
2701
2861
|
/***/ }),
|
|
2702
2862
|
|
|
@@ -2716,7 +2876,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2716
2876
|
\*******************************/
|
|
2717
2877
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2718
2878
|
|
|
2719
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LibZustand: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"]),\n/* harmony export */ NodeSpaceZustand: () => (/* reexport safe */ _nodespace__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ assert_reactflow_node: () => (/* binding */ assert_reactflow_node),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib */ \"./src/states/lib.ts\");\n/* harmony import */ var _nodespace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodespace */ \"./src/states/nodespace.ts\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node */ \"./src/states/node.ts\");\n/* harmony import */ var _reactflow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactflow */ \"./src/states/reactflow.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n/* harmony import */ var _edge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edge */ \"./src/states/edge.ts\");\n/* harmony import */ var zustand__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! zustand */ \"../node_modules/zustand/esm/index.mjs\");\n/* harmony import */ var _utils_logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.ts\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\n\n\n\n\n\nvar _fill_node_frontend = function (node, fnrf_instance) {\n var frontend = node.frontend || {};\n if (!frontend.size) {\n frontend.size = [200, 100];\n }\n if (!frontend.pos ||\n frontend.pos.length !== 2 ||\n isNaN(frontend.pos[0]) ||\n frontend.pos[0] === null ||\n isNaN(frontend.pos[1]) ||\n frontend.pos[1] === null) {\n if (!fnrf_instance ||\n !fnrf_instance.rf_instance ||\n fnrf_instance.reactflowRef === null) {\n frontend.pos = [0, 0];\n }\n else {\n var ref = fnrf_instance.reactflowRef;\n var rect = ref.getBoundingClientRect(); // Step 2: Get bounding rectangle\n var centerX = rect.left + rect.width / 2; // Calculate center X\n var centerY = rect.top + rect.height / 2; // Calculate center Y\n var flowpos = fnrf_instance.rf_instance.screenToFlowPosition({\n x: centerX,\n y: centerY,\n });\n frontend.pos = [\n flowpos.x - frontend.size[0] / 2,\n flowpos.y - frontend.size[1] / 2,\n ];\n }\n }\n if (!frontend.collapsed) {\n frontend.collapsed = false;\n }\n node.frontend = frontend;\n};\nvar assert_react_flow_io = function (io, fnrf_instance) {\n if (io.value === \"<NoValue>\") {\n io.value = undefined;\n }\n if (io.fullvalue === \"<NoValue>\") {\n io.fullvalue = undefined;\n }\n if (io.try_get_full_value === undefined) {\n io.try_get_full_value = function () {\n var _a;\n if (!fnrf_instance) {\n return;\n }\n if (io.node === undefined || io.id === undefined) {\n return;\n }\n (_a = fnrf_instance.worker) === null || _a === void 0 ? void 0 : _a.get_io_full_value({ nid: io.node, ioid: io.id });\n };\n }\n if (io.hidden === undefined) {\n io.hidden = false;\n }\n if (io.set_hidden === undefined) {\n io.set_hidden = function (v) {\n var _a;\n if (!fnrf_instance) {\n return;\n }\n if (io.node === undefined || io.id === undefined) {\n return;\n }\n (_a = fnrf_instance.worker) === null || _a === void 0 ? void 0 : _a.update_io_options({\n nid: io.node,\n ioid: io.id,\n options: { hidden: v },\n });\n };\n }\n return io;\n};\nvar assert_reactflow_node = function (node, store, fnrf_instance) {\n _fill_node_frontend(node, fnrf_instance);\n node = (0,_node__WEBPACK_IMPORTED_MODULE_2__.assert_full_node)(node);\n if (node.id === undefined) {\n throw new Error(\"Node must have an id\");\n }\n for (var io in node.io) {\n node.io[io].node = node.id;\n assert_react_flow_io(node.io[io], fnrf_instance);\n }\n var extendedNode = __assign({ position: {\n x: node.frontend.pos[0],\n y: node.frontend.pos[1],\n }, data: {\n UseNodeStore: store,\n }, type: \"default\" }, node);\n return extendedNode;\n};\nvar FuncNodesReactFlowZustand = function (_a) {\n /*\n function that should be called when the remote node, e.g. in the python worker is performing an action\n */\n var _b = _a.useWorkerManager, useWorkerManager = _b === void 0 ? true : _b, _c = _a.default_worker, default_worker = _c === void 0 ? undefined : _c;\n var options = {\n useWorkerManager: useWorkerManager,\n default_worker: default_worker,\n };\n var _add_node = function (action) {\n var _a;\n var rfstate = rfstore.getState();\n if (action.from_remote) {\n var store = ns.get_node(action.node.id, false);\n if (!store) {\n try {\n store = (0,_node__WEBPACK_IMPORTED_MODULE_2__.createNodeStore)(action.node);\n ns.nodesstates.set(action.node.id, store);\n }\n catch (e) {\n return;\n }\n }\n var node = store.getState();\n var new_ndoes = __spreadArray(__spreadArray([], rfstate.nodes, true), [\n assert_reactflow_node(node, store, iterf),\n ], false);\n rfstore.setState({ nodes: new_ndoes });\n // wait 200 ms then set the full value of all ios\n for (var io in action.node.io) {\n var ioid = action.node.io[io].id;\n if (ioid !== undefined) {\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.get_io_value({ nid: action.node.id, ioid: ioid });\n }\n }\n }\n };\n var _update_node = function (action) {\n var _a;\n // some action reset the error, so far trigger does, so errors should remove the in_trigger flag\n if (action.node.in_trigger) {\n action.node.error = undefined;\n }\n if (action.from_remote) {\n var store = ns.get_node(action.id);\n if (!store) {\n return;\n }\n (0,_node__WEBPACK_IMPORTED_MODULE_2__.normalize_node)(action.node);\n var state = store.getState();\n var _b = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.deep_merge)(state, action.node), new_obj = _b.new_obj, change = _b.change;\n if (change) {\n // update ios after merge, because it might be an object whch would resolt of\n // some part of the old value still being there (on the frontend)\n if (action.node.io) {\n for (var io in action.node.io) {\n // if fullvalue is in the update data, set to fullvalue otherwise set to undefined\n new_obj.io[io].fullvalue = (_a = action.node.io[io]) === null || _a === void 0 ? void 0 : _a.fullvalue;\n for (var io_1 in action.node.io) {\n var ioobj = action.node.io[io_1];\n var new_obj_io = new_obj.io[io_1];\n // check if value in io, undefined is a valid value\n if (ioobj.hasOwnProperty(\"value\")) {\n if (ioobj.value === undefined) {\n new_obj_io.value = null;\n }\n else if (ioobj.value === \"<NoValue>\") {\n new_obj_io.value = undefined;\n }\n else {\n new_obj_io.value = ioobj.value;\n }\n }\n }\n }\n }\n assert_reactflow_node(new_obj, store, iterf);\n iterf.logger.debug(\"update_action\", new_obj);\n store.setState((0,_node__WEBPACK_IMPORTED_MODULE_2__.assert_full_node)(new_obj));\n }\n }\n else {\n if (iterf.worker) {\n iterf.worker.locally_update_node(action);\n }\n }\n };\n var _delete_node = function (action) {\n var _a;\n if (action.from_remote) {\n rfstore.getState().onNodesChange([\n {\n type: \"remove\",\n id: action.id,\n },\n ]);\n }\n else {\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.remove_node(action.id);\n }\n };\n var _error_action = function (action) {\n iterf.logger.error(\"Error\", action);\n on_node_action({\n type: \"update\",\n id: action.id,\n node: {\n in_trigger: false,\n error: action.error,\n },\n from_remote: true,\n });\n };\n var _trigger_action = function (action) {\n var _a;\n if (action.from_remote) {\n on_node_action({\n type: \"update\",\n id: action.id,\n node: {\n in_trigger: true,\n error: undefined,\n },\n from_remote: true,\n });\n }\n else {\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.trigger_node(action.id);\n }\n };\n var on_node_action = function (action) {\n switch (action.type) {\n case \"add\":\n _add_node(action);\n break;\n case \"update\":\n _update_node(action);\n break;\n case \"delete\":\n _delete_node(action);\n break;\n case \"error\":\n _error_action(action);\n break;\n case \"trigger\":\n _trigger_action(action);\n break;\n default:\n iterf.logger.error(\"Unknown node action\", action);\n }\n };\n var on_edge_action = function (action) {\n var _a, _b, _c, _d;\n var rfstate = rfstore.getState();\n switch (action.type) {\n case \"add\":\n if (action.from_remote) {\n var edges = rfstate.edges;\n var new_edge_id_1 = (0,_edge__WEBPACK_IMPORTED_MODULE_5__.generate_edge_id)(action);\n //cehck if edge already exists including reversed\n if (edges.some(function (e) { return e.id === new_edge_id_1; })) {\n return;\n }\n var new_edge = {\n id: new_edge_id_1,\n source: action.src_nid,\n target: action.trg_nid,\n sourceHandle: action.src_ioid,\n targetHandle: action.trg_ioid,\n className: \"funcnodes-edge animated\",\n };\n console.log(\"Adding edge\", new_edge);\n rfstore.setState({ edges: __spreadArray(__spreadArray([], edges, true), [new_edge], false) });\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.get_remote_node_state(action.src_nid);\n (_b = iterf.worker) === null || _b === void 0 ? void 0 : _b.get_remote_node_state(action.trg_nid);\n }\n else {\n }\n break;\n case \"delete\":\n if (action.from_remote) {\n var edges = rfstate.edges;\n var del_edge_id_1 = (0,_edge__WEBPACK_IMPORTED_MODULE_5__.generate_edge_id)(action);\n var new_edges = edges.filter(function (edge) { return edge.id !== del_edge_id_1; });\n rfstore.setState({ edges: new_edges });\n (_c = iterf.worker) === null || _c === void 0 ? void 0 : _c.get_remote_node_state(action.src_nid);\n (_d = iterf.worker) === null || _d === void 0 ? void 0 : _d.get_remote_node_state(action.trg_nid);\n }\n else {\n }\n break;\n default:\n iterf.logger.error(\"Unknown edge action\", action);\n }\n };\n /*\n on_node_cahnge is called by react flow when a note change event is fired\n should update the local state if something changed\n */\n var on_node_change = function (nodechange) {\n for (var _i = 0, nodechange_1 = nodechange; _i < nodechange_1.length; _i++) {\n var change = nodechange_1[_i];\n switch (change.type) {\n case \"position\":\n if (change.position) {\n on_node_action({\n type: \"update\",\n id: change.id,\n node: {\n frontend: { pos: [change.position.x, change.position.y] },\n },\n from_remote: false,\n });\n }\n break;\n case \"dimensions\":\n if (change.dimensions) {\n on_node_action({\n type: \"update\",\n id: change.id,\n node: {\n frontend: {\n size: [change.dimensions.width, change.dimensions.height],\n },\n },\n from_remote: false,\n });\n }\n break;\n }\n }\n };\n var on_edge_change = function (_edgechange) { };\n var on_connect = function (connection) {\n if (connection.source === null ||\n connection.target === null ||\n connection.sourceHandle === null ||\n connection.targetHandle === null ||\n !iterf.worker) {\n return;\n }\n iterf.worker.add_edge({\n src_nid: connection.source,\n src_ioid: connection.sourceHandle,\n trg_nid: connection.target,\n trg_ioid: connection.targetHandle,\n replace: true,\n });\n };\n var rfstore = (0,_reactflow__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n on_node_change: on_node_change,\n on_edge_change: on_edge_change,\n on_connect: on_connect,\n });\n var ns = (0,_nodespace__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({});\n var lib = (0,_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n var clear_all = function () {\n var _a, _b;\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.disconnect();\n iterf.worker = undefined;\n (_b = iterf.workermanager) === null || _b === void 0 ? void 0 : _b.setWorker(undefined);\n iterf.lib.libstate\n .getState()\n .set({ lib: { shelves: [] }, external_worker: [] });\n iterf.nodespace.nodesstates.clear();\n iterf.useReactFlowStore.setState({ nodes: [], edges: [] });\n iterf.auto_progress();\n };\n var iterf = {\n local_settings: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({\n view_settings: {\n expand_node_props: false,\n },\n update_view_settings: function (settings) {\n var current = iterf.local_settings.getState().view_settings;\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.deep_merge)(current, settings), new_obj = _a.new_obj, change = _a.change;\n if (change) {\n iterf.local_settings.setState(function (prev) { return (__assign(__assign({}, prev), { view_settings: new_obj })); });\n }\n },\n }); }),\n local_state: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({\n selected_nodes: [],\n selected_edges: [],\n }); }),\n options: options,\n lib: lib,\n workermanager: undefined,\n workers: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({}); }),\n render_options: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({}); }),\n progress_state: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({\n message: \"please select worker\",\n status: \"info\",\n progress: 0,\n blocking: false,\n }); }),\n update_render_options: function (options) {\n var current = iterf.render_options.getState();\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.deep_merge)(current, options), new_obj = _a.new_obj, change = _a.change;\n if (change) {\n iterf.render_options.setState(new_obj);\n }\n },\n worker: undefined,\n nodespace: ns,\n useReactFlowStore: rfstore,\n on_node_action: on_node_action,\n on_edge_action: on_edge_action,\n reactflowRef: null,\n clear_all: clear_all,\n set_progress: function (progress) {\n if (progress.message === \"\") {\n return iterf.auto_progress();\n }\n var prev_state = iterf.progress_state.getState();\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.deep_merge)(prev_state, progress), new_obj = _a.new_obj, change = _a.change;\n if (change) {\n iterf.progress_state.setState(new_obj);\n }\n },\n auto_progress: function () {\n if (iterf.worker === undefined) {\n return iterf.set_progress({\n progress: 0,\n message: \"please select worker\",\n status: \"error\",\n blocking: false,\n });\n }\n if (!iterf.worker.is_open) {\n return iterf.set_progress({\n progress: 0,\n message: \"connecting to worker\",\n status: \"info\",\n blocking: true,\n });\n }\n iterf.set_progress({\n progress: 1,\n message: \"running\",\n status: \"info\",\n blocking: false,\n });\n },\n plugins: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({}); }),\n add_plugin: function (name, plugin) {\n if (plugin === undefined)\n return;\n iterf.plugins.setState(function (prev) {\n var _a;\n return __assign(__assign({}, prev), (_a = {}, _a[name] = plugin, _a));\n });\n },\n dev_settings: {\n debug: true,\n },\n logger: new _utils_logger__WEBPACK_IMPORTED_MODULE_6__.ConsoleLogger(\"fn\", _utils_logger__WEBPACK_IMPORTED_MODULE_6__.INFO),\n };\n return iterf;\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FuncNodesReactFlowZustand);\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/states/fnrfzst.ts?");
|
|
2879
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LibZustand: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"]),\n/* harmony export */ NodeSpaceZustand: () => (/* reexport safe */ _nodespace__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ assert_reactflow_node: () => (/* binding */ assert_reactflow_node),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib */ \"./src/states/lib.ts\");\n/* harmony import */ var _nodespace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodespace */ \"./src/states/nodespace.ts\");\n/* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node */ \"./src/states/node.ts\");\n/* harmony import */ var _reactflow__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./reactflow */ \"./src/states/reactflow.ts\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n/* harmony import */ var _edge__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./edge */ \"./src/states/edge.ts\");\n/* harmony import */ var zustand__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! zustand */ \"../node_modules/zustand/esm/index.mjs\");\n/* harmony import */ var _utils_logger__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/logger */ \"./src/utils/logger.ts\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\n\n\n\n\n\nvar _fill_node_frontend = function (node, fnrf_instance) {\n var frontend = node.frontend || {};\n if (!frontend.size) {\n frontend.size = [200, 100];\n }\n if (!frontend.pos ||\n frontend.pos.length !== 2 ||\n isNaN(frontend.pos[0]) ||\n frontend.pos[0] === null ||\n isNaN(frontend.pos[1]) ||\n frontend.pos[1] === null) {\n if (!fnrf_instance ||\n !fnrf_instance.rf_instance ||\n fnrf_instance.reactflowRef === null) {\n frontend.pos = [0, 0];\n }\n else {\n var ref = fnrf_instance.reactflowRef;\n var rect = ref.getBoundingClientRect(); // Step 2: Get bounding rectangle\n var centerX = rect.left + rect.width / 2; // Calculate center X\n var centerY = rect.top + rect.height / 2; // Calculate center Y\n var flowpos = fnrf_instance.rf_instance.screenToFlowPosition({\n x: centerX,\n y: centerY,\n });\n frontend.pos = [\n flowpos.x - frontend.size[0] / 2,\n flowpos.y - frontend.size[1] / 2,\n ];\n }\n }\n if (!frontend.collapsed) {\n frontend.collapsed = false;\n }\n node.frontend = frontend;\n};\nvar assert_react_flow_io = function (io, fnrf_instance) {\n if (io.value === \"<NoValue>\") {\n io.value = undefined;\n }\n if (io.fullvalue === \"<NoValue>\") {\n io.fullvalue = undefined;\n }\n if (io.try_get_full_value === undefined) {\n io.try_get_full_value = function () {\n var _a;\n if (!fnrf_instance) {\n return;\n }\n if (io.node === undefined || io.id === undefined) {\n return;\n }\n (_a = fnrf_instance.worker) === null || _a === void 0 ? void 0 : _a.get_io_full_value({ nid: io.node, ioid: io.id });\n };\n }\n if (io.hidden === undefined) {\n io.hidden = false;\n }\n if (io.set_hidden === undefined) {\n io.set_hidden = function (v) {\n var _a;\n if (!fnrf_instance) {\n return;\n }\n if (io.node === undefined || io.id === undefined) {\n return;\n }\n (_a = fnrf_instance.worker) === null || _a === void 0 ? void 0 : _a.update_io_options({\n nid: io.node,\n ioid: io.id,\n options: { hidden: v },\n });\n };\n }\n return io;\n};\nvar assert_reactflow_node = function (node, store, fnrf_instance) {\n _fill_node_frontend(node, fnrf_instance);\n node = (0,_node__WEBPACK_IMPORTED_MODULE_2__.assert_full_node)(node);\n if (node.id === undefined) {\n throw new Error(\"Node must have an id\");\n }\n for (var io in node.io) {\n node.io[io].node = node.id;\n assert_react_flow_io(node.io[io], fnrf_instance);\n }\n var extendedNode = __assign({ position: {\n x: node.frontend.pos[0],\n y: node.frontend.pos[1],\n }, data: {\n UseNodeStore: store,\n }, type: \"default\" }, node);\n return extendedNode;\n};\nvar FuncNodesReactFlowZustand = function (_a) {\n /*\n function that should be called when the remote node, e.g. in the python worker is performing an action\n */\n var _b = _a.useWorkerManager, useWorkerManager = _b === void 0 ? true : _b, _c = _a.default_worker, default_worker = _c === void 0 ? undefined : _c, _d = _a.on_sync_complete, on_sync_complete = _d === void 0 ? undefined : _d;\n var options = {\n useWorkerManager: useWorkerManager,\n default_worker: default_worker,\n on_sync_complete: on_sync_complete,\n };\n var _add_node = function (action) {\n var _a;\n var rfstate = rfstore.getState();\n if (action.from_remote) {\n var store = ns.get_node(action.node.id, false);\n if (!store) {\n try {\n store = (0,_node__WEBPACK_IMPORTED_MODULE_2__.createNodeStore)(action.node);\n ns.nodesstates.set(action.node.id, store);\n }\n catch (e) {\n return;\n }\n }\n var node = store.getState();\n var new_ndoes = __spreadArray(__spreadArray([], rfstate.nodes, true), [\n assert_reactflow_node(node, store, iterf),\n ], false);\n rfstore.setState({ nodes: new_ndoes });\n // wait 200 ms then set the full value of all ios\n for (var io in action.node.io) {\n var ioid = action.node.io[io].id;\n if (ioid !== undefined) {\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.get_io_value({ nid: action.node.id, ioid: ioid });\n }\n }\n }\n };\n var _update_node = function (action) {\n var _a;\n // some action reset the error, so far trigger does, so errors should remove the in_trigger flag\n if (action.node.in_trigger) {\n action.node.error = undefined;\n }\n if (action.from_remote) {\n var store = ns.get_node(action.id, false);\n if (!store) {\n return;\n }\n (0,_node__WEBPACK_IMPORTED_MODULE_2__.normalize_node)(action.node);\n var state = store.getState();\n var _b = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.deep_merge)(state, action.node), new_obj = _b.new_obj, change = _b.change;\n if (change) {\n // update ios after merge, because it might be an object whch would resolt of\n // some part of the old value still being there (on the frontend)\n if (action.node.io) {\n for (var io in action.node.io) {\n // if fullvalue is in the update data, set to fullvalue otherwise set to undefined\n new_obj.io[io].fullvalue = (_a = action.node.io[io]) === null || _a === void 0 ? void 0 : _a.fullvalue;\n for (var io_1 in action.node.io) {\n var ioobj = action.node.io[io_1];\n var new_obj_io = new_obj.io[io_1];\n // check if value in io, undefined is a valid value\n if (ioobj.hasOwnProperty(\"value\")) {\n if (ioobj.value === undefined) {\n new_obj_io.value = null;\n }\n else if (ioobj.value === \"<NoValue>\") {\n new_obj_io.value = undefined;\n }\n else {\n new_obj_io.value = ioobj.value;\n }\n }\n }\n }\n }\n assert_reactflow_node(new_obj, store, iterf);\n iterf.logger.debug(\"update_action\", new_obj);\n store.setState((0,_node__WEBPACK_IMPORTED_MODULE_2__.assert_full_node)(new_obj));\n }\n }\n else {\n if (iterf.worker) {\n iterf.worker.locally_update_node(action);\n }\n }\n };\n var _delete_node = function (action) {\n var _a;\n if (action.from_remote) {\n rfstore.getState().onNodesChange([\n {\n type: \"remove\",\n id: action.id,\n },\n ]);\n }\n else {\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.remove_node(action.id);\n }\n };\n var _error_action = function (action) {\n iterf.logger.error(\"Error\", action);\n on_node_action({\n type: \"update\",\n id: action.id,\n node: {\n in_trigger: false,\n error: action.error,\n },\n from_remote: true,\n });\n };\n var _trigger_action = function (action) {\n var _a;\n if (action.from_remote) {\n on_node_action({\n type: \"update\",\n id: action.id,\n node: {\n in_trigger: true,\n error: undefined,\n },\n from_remote: true,\n });\n }\n else {\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.trigger_node(action.id);\n }\n };\n var on_node_action = function (action) {\n switch (action.type) {\n case \"add\":\n _add_node(action);\n break;\n case \"update\":\n _update_node(action);\n break;\n case \"delete\":\n _delete_node(action);\n break;\n case \"error\":\n _error_action(action);\n break;\n case \"trigger\":\n _trigger_action(action);\n break;\n default:\n iterf.logger.error(\"Unknown node action\", action);\n }\n };\n var on_edge_action = function (action) {\n var _a, _b, _c, _d;\n var rfstate = rfstore.getState();\n switch (action.type) {\n case \"add\":\n if (action.from_remote) {\n var edges = rfstate.edges;\n var new_edge_id_1 = (0,_edge__WEBPACK_IMPORTED_MODULE_5__.generate_edge_id)(action);\n //cehck if edge already exists including reversed\n if (edges.some(function (e) { return e.id === new_edge_id_1; })) {\n return;\n }\n var new_edge = {\n id: new_edge_id_1,\n source: action.src_nid,\n target: action.trg_nid,\n sourceHandle: action.src_ioid,\n targetHandle: action.trg_ioid,\n className: \"funcnodes-edge animated\",\n };\n iterf.logger.info(\"Adding edge\", new_edge);\n rfstore.setState({ edges: __spreadArray(__spreadArray([], edges, true), [new_edge], false) });\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.get_remote_node_state(action.src_nid);\n (_b = iterf.worker) === null || _b === void 0 ? void 0 : _b.get_remote_node_state(action.trg_nid);\n }\n else {\n }\n break;\n case \"delete\":\n if (action.from_remote) {\n var edges = rfstate.edges;\n var del_edge_id_1 = (0,_edge__WEBPACK_IMPORTED_MODULE_5__.generate_edge_id)(action);\n var new_edges = edges.filter(function (edge) { return edge.id !== del_edge_id_1; });\n rfstore.setState({ edges: new_edges });\n (_c = iterf.worker) === null || _c === void 0 ? void 0 : _c.get_remote_node_state(action.src_nid);\n (_d = iterf.worker) === null || _d === void 0 ? void 0 : _d.get_remote_node_state(action.trg_nid);\n }\n else {\n }\n break;\n default:\n iterf.logger.error(\"Unknown edge action\", action);\n }\n };\n /*\n on_node_cahnge is called by react flow when a note change event is fired\n should update the local state if something changed\n */\n var on_node_change = function (nodechange) {\n for (var _i = 0, nodechange_1 = nodechange; _i < nodechange_1.length; _i++) {\n var change = nodechange_1[_i];\n switch (change.type) {\n case \"position\":\n if (change.position) {\n on_node_action({\n type: \"update\",\n id: change.id,\n node: {\n frontend: { pos: [change.position.x, change.position.y] },\n },\n from_remote: false,\n });\n }\n break;\n case \"dimensions\":\n if (change.dimensions) {\n on_node_action({\n type: \"update\",\n id: change.id,\n node: {\n frontend: {\n size: [change.dimensions.width, change.dimensions.height],\n },\n },\n from_remote: false,\n });\n }\n break;\n }\n }\n };\n var on_edge_change = function (_edgechange) { };\n var on_connect = function (connection) {\n if (connection.source === null ||\n connection.target === null ||\n connection.sourceHandle === null ||\n connection.targetHandle === null ||\n !iterf.worker) {\n return;\n }\n iterf.worker.add_edge({\n src_nid: connection.source,\n src_ioid: connection.sourceHandle,\n trg_nid: connection.target,\n trg_ioid: connection.targetHandle,\n replace: true,\n });\n };\n var rfstore = (0,_reactflow__WEBPACK_IMPORTED_MODULE_3__[\"default\"])({\n on_node_change: on_node_change,\n on_edge_change: on_edge_change,\n on_connect: on_connect,\n });\n var ns = (0,_nodespace__WEBPACK_IMPORTED_MODULE_1__[\"default\"])({});\n var lib = (0,_lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"])();\n var clear_all = function () {\n var _a, _b;\n (_a = iterf.worker) === null || _a === void 0 ? void 0 : _a.disconnect();\n iterf.set_worker(undefined);\n (_b = iterf.workermanager) === null || _b === void 0 ? void 0 : _b.setWorker(undefined);\n iterf.lib.libstate\n .getState()\n .set({ lib: { shelves: [] }, external_worker: [] });\n iterf.nodespace.nodesstates.clear();\n iterf.useReactFlowStore.setState({ nodes: [], edges: [] });\n iterf.auto_progress();\n };\n var iterf = {\n local_settings: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({\n view_settings: {\n expand_node_props: false,\n },\n update_view_settings: function (settings) {\n var current = iterf.local_settings.getState().view_settings;\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.deep_merge)(current, settings), new_obj = _a.new_obj, change = _a.change;\n if (change) {\n iterf.local_settings.setState(function (prev) { return (__assign(__assign({}, prev), { view_settings: new_obj })); });\n }\n },\n }); }),\n local_state: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({\n selected_nodes: [],\n selected_edges: [],\n }); }),\n options: options,\n lib: lib,\n workermanager: undefined,\n workers: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({}); }),\n workerstate: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({\n is_open: false,\n }); }),\n render_options: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({}); }),\n progress_state: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({\n message: \"please select worker\",\n status: \"info\",\n progress: 0,\n blocking: false,\n }); }),\n update_render_options: function (options) {\n var current = iterf.render_options.getState();\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.deep_merge)(current, options), new_obj = _a.new_obj, change = _a.change;\n if (change) {\n iterf.render_options.setState(new_obj);\n }\n },\n worker: undefined,\n _unsubscribeFromWorker: undefined,\n set_worker: function (worker) {\n if (worker === iterf.worker) {\n return;\n }\n if (iterf._unsubscribeFromWorker) {\n iterf._unsubscribeFromWorker();\n iterf._unsubscribeFromWorker = undefined;\n }\n // If new worker is provided\n if (worker) {\n iterf._unsubscribeFromWorker = worker.state.subscribe(function (newState) {\n iterf.workerstate.setState(newState);\n });\n iterf.workerstate.setState(worker.state.getState());\n }\n // Update the reference\n iterf.worker = worker;\n worker === null || worker === void 0 ? void 0 : worker.set_zustand(iterf);\n },\n nodespace: ns,\n useReactFlowStore: rfstore,\n on_node_action: on_node_action,\n on_edge_action: on_edge_action,\n reactflowRef: null,\n clear_all: clear_all,\n set_progress: function (progress) {\n if (progress.message === \"\") {\n return iterf.auto_progress();\n }\n var prev_state = iterf.progress_state.getState();\n var _a = (0,_utils__WEBPACK_IMPORTED_MODULE_4__.deep_merge)(prev_state, progress), new_obj = _a.new_obj, change = _a.change;\n if (change) {\n iterf.progress_state.setState(new_obj);\n }\n },\n auto_progress: function () {\n if (iterf.worker === undefined) {\n return iterf.set_progress({\n progress: 0,\n message: \"please select worker\",\n status: \"error\",\n blocking: false,\n });\n }\n if (!iterf.worker.is_open) {\n return iterf.set_progress({\n progress: 0,\n message: \"connecting to worker\",\n status: \"info\",\n blocking: true,\n });\n }\n iterf.set_progress({\n progress: 1,\n message: \"running\",\n status: \"info\",\n blocking: false,\n });\n },\n plugins: (0,zustand__WEBPACK_IMPORTED_MODULE_7__.create)(function (_set, _get) { return ({}); }),\n add_plugin: function (name, plugin) {\n if (plugin === undefined)\n return;\n iterf.plugins.setState(function (prev) {\n var _a;\n return __assign(__assign({}, prev), (_a = {}, _a[name] = plugin, _a));\n });\n },\n dev_settings: {\n debug: true,\n },\n logger: new _utils_logger__WEBPACK_IMPORTED_MODULE_6__.ConsoleLogger(\"fn\", _utils_logger__WEBPACK_IMPORTED_MODULE_6__.INFO),\n };\n return iterf;\n};\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (FuncNodesReactFlowZustand);\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/states/fnrfzst.ts?");
|
|
2880
|
+
|
|
2881
|
+
/***/ }),
|
|
2882
|
+
|
|
2883
|
+
/***/ "./src/states/index.ts":
|
|
2884
|
+
/*!*****************************!*\
|
|
2885
|
+
!*** ./src/states/index.ts ***!
|
|
2886
|
+
\*****************************/
|
|
2887
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2888
|
+
|
|
2889
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ LibZustand: () => (/* reexport safe */ _lib__WEBPACK_IMPORTED_MODULE_0__[\"default\"]),\n/* harmony export */ NodeSpaceZustand: () => (/* reexport safe */ _nodespace__WEBPACK_IMPORTED_MODULE_1__[\"default\"]),\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib */ \"./src/states/lib.ts\");\n/* harmony import */ var _nodespace__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nodespace */ \"./src/states/nodespace.ts\");\n/* harmony import */ var _fnrfzst__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fnrfzst */ \"./src/states/fnrfzst.ts\");\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_fnrfzst__WEBPACK_IMPORTED_MODULE_2__[\"default\"]);\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/states/index.ts?");
|
|
2720
2890
|
|
|
2721
2891
|
/***/ }),
|
|
2722
2892
|
|
|
@@ -2736,7 +2906,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2736
2906
|
\****************************/
|
|
2737
2907
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2738
2908
|
|
|
2739
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ assert_full_node: () => (/* binding */ assert_full_node),\n/* harmony export */ createNodeStore: () => (/* binding */ createNodeStore),\n/* harmony export */ normalize_node: () => (/* binding */ normalize_node)\n/* harmony export */ });\n/* harmony import */ var zustand__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! zustand */ \"../node_modules/zustand/esm/index.mjs\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\n\nvar dummy_nodeio = {\n id: \"dummy\",\n name: \"dummy\",\n node: \"dummy\",\n full_id: \"dummy\",\n type: \"any\",\n value: undefined,\n is_input: false,\n connected: false,\n does_trigger: true,\n fullvalue: undefined,\n try_get_full_value: undefined,\n render_options: {\n set_default: true,\n type: \"any\",\n },\n set_hidden: undefined,\n hidden: false,\n};\nvar assert_full_nodeio = function (io) {\n if (!io.id) {\n throw new Error(\"IO must have an id but is missing for \" + JSON.stringify(io));\n }\n if (io.name === undefined) {\n io.name = io.id;\n }\n var new_obj = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.deep_update)(io, dummy_nodeio).new_obj;\n if (new_obj.render_options.type === \"any\" ||\n new_obj.render_options.type === undefined)\n new_obj.render_options.type = new_obj.type;\n return new_obj;\n};\nvar dummy_node = {\n id: \"dummy\",\n node_name: \"dummy\",\n frontend: {\n pos: [NaN, NaN],\n size: [200, 100],\n collapsed: false,\n },\n io: {},\n name: \"dummy\",\n in_trigger: false,\n io_order: [],\n};\nvar dummy_node_json = JSON.stringify(dummy_node);\nvar assert_full_node = function (node) {\n if (!node.id) {\n throw new Error(\"Node must have an id\");\n }\n var dummy_node = JSON.parse(dummy_node_json);\n var new_obj = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.deep_update)(node, dummy_node).new_obj;\n for (var ioid in new_obj.io) {\n if (new_obj.io[ioid] === undefined)\n continue;\n var io = assert_full_nodeio(new_obj.io[ioid]);\n new_obj.io[ioid] = io;\n }\n return new_obj;\n};\nvar normalize_node = function (node) {\n if (node.io === undefined) {\n node.io = {};\n }\n if (node.io_order === undefined) {\n if (Array.isArray(node.io)) {\n node.io_order = node.io.map(function (io) { return io.id; });\n var new_io = {};\n for (var _i = 0, _a = node.io; _i < _a.length; _i++) {\n var io = _a[_i];\n new_io[io.id] = io;\n }\n node.io = new_io;\n }\n else {\n node.io_order = Object.keys(node.io);\n }\n }\n else {\n if (Array.isArray(node.io)) {\n var new_io = {};\n for (var _b = 0, _c = node.io; _b < _c.length; _b++) {\n var io = _c[_b];\n new_io[io.id] = io;\n if (!node.io_order.includes(io.id)) {\n node.io_order.push(io.id);\n }\n }\n node.io = new_io;\n }\n else {\n for (var io in node.io) {\n if (!node.io_order.includes(io)) {\n node.io_order.push(io);\n }\n }\n }\n }\n return node;\n};\nvar createNodeStore = function (node) {\n // check if node is Object\n return (0,zustand__WEBPACK_IMPORTED_MODULE_1__.create)(function (_set, _get) {\n return assert_full_node(normalize_node(node));\n });\n};\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/states/node.ts?");
|
|
2909
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ assert_full_node: () => (/* binding */ assert_full_node),\n/* harmony export */ createNodeStore: () => (/* binding */ createNodeStore),\n/* harmony export */ normalize_node: () => (/* binding */ normalize_node)\n/* harmony export */ });\n/* harmony import */ var zustand__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! zustand */ \"../node_modules/zustand/esm/index.mjs\");\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils */ \"./src/utils/index.ts\");\n\n\nvar dummy_nodeio = {\n id: \"dummy\",\n name: \"dummy\",\n node: \"dummy\",\n full_id: \"dummy\",\n type: \"any\",\n value: undefined,\n is_input: false,\n connected: false,\n does_trigger: true,\n fullvalue: undefined,\n try_get_full_value: undefined,\n render_options: {\n set_default: true,\n type: \"any\",\n },\n set_hidden: undefined,\n hidden: false,\n};\nvar assert_full_nodeio = function (io) {\n if (!io.id) {\n throw new Error(\"IO must have an id but is missing for \" + JSON.stringify(io));\n }\n if (io.name === undefined) {\n io.name = io.id;\n }\n var new_obj = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.deep_update)(io, dummy_nodeio).new_obj;\n if (new_obj.render_options.type === \"any\" ||\n new_obj.render_options.type === undefined)\n new_obj.render_options.type = new_obj.type;\n return new_obj;\n};\nvar dummy_node = {\n id: \"dummy\",\n node_name: \"dummy\",\n frontend: {\n pos: [NaN, NaN],\n size: [200, 100],\n collapsed: false,\n },\n io: {},\n name: \"dummy\",\n in_trigger: false,\n io_order: [],\n progress: {\n ascii: false,\n elapsed: 0,\n initial: 0,\n n: 0,\n prefix: \"idle\",\n unit: \"it\",\n unit_divisor: 1000,\n unit_scale: false,\n },\n};\nvar dummy_node_json = JSON.stringify(dummy_node);\nvar assert_full_node = function (node) {\n if (!node.id) {\n throw new Error(\"Node must have an id\");\n }\n var dummy_node = JSON.parse(dummy_node_json);\n var new_obj = (0,_utils__WEBPACK_IMPORTED_MODULE_0__.deep_update)(node, dummy_node).new_obj;\n for (var ioid in new_obj.io) {\n if (new_obj.io[ioid] === undefined)\n continue;\n var io = assert_full_nodeio(new_obj.io[ioid]);\n new_obj.io[ioid] = io;\n }\n return new_obj;\n};\nvar normalize_node = function (node) {\n if (node.io === undefined) {\n node.io = {};\n }\n if (node.io_order === undefined) {\n if (Array.isArray(node.io)) {\n node.io_order = node.io.map(function (io) { return io.id; });\n var new_io = {};\n for (var _i = 0, _a = node.io; _i < _a.length; _i++) {\n var io = _a[_i];\n new_io[io.id] = io;\n }\n node.io = new_io;\n }\n else {\n node.io_order = Object.keys(node.io);\n }\n }\n else {\n if (Array.isArray(node.io)) {\n var new_io = {};\n for (var _b = 0, _c = node.io; _b < _c.length; _b++) {\n var io = _c[_b];\n new_io[io.id] = io;\n if (!node.io_order.includes(io.id)) {\n node.io_order.push(io.id);\n }\n }\n node.io = new_io;\n }\n else {\n for (var io in node.io) {\n if (!node.io_order.includes(io)) {\n node.io_order.push(io);\n }\n }\n }\n }\n return node;\n};\nvar createNodeStore = function (node) {\n // check if node is Object\n return (0,zustand__WEBPACK_IMPORTED_MODULE_1__.create)(function (_set, _get) {\n return assert_full_node(normalize_node(node));\n });\n};\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/states/node.ts?");
|
|
2740
2910
|
|
|
2741
2911
|
/***/ }),
|
|
2742
2912
|
|
|
@@ -2760,6 +2930,26 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2760
2930
|
|
|
2761
2931
|
/***/ }),
|
|
2762
2932
|
|
|
2933
|
+
/***/ "./src/utils/autolayout/txt.ts":
|
|
2934
|
+
/*!*************************************!*\
|
|
2935
|
+
!*** ./src/utils/autolayout/txt.ts ***!
|
|
2936
|
+
\*************************************/
|
|
2937
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2938
|
+
|
|
2939
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ fitTextToContainer: () => (/* binding */ fitTextToContainer)\n/* harmony export */ });\n/**\n * Dynamically adjusts the font size of a text element so that it fits within its container.\n *\n * @param container - The container element that defines the maximum space.\n * @param textElement - The element whose text needs to be resized.\n * @param options - Optional configuration (maxFontSize, minFontSize, decrementFactor).\n */\nfunction fitTextToContainer(container, textElement, options) {\n if (options === void 0) { options = {}; }\n var _a = options.maxFontSize, maxFontSize = _a === void 0 ? 100 : _a, // default maximum font size\n _b = options.minFontSize, // default maximum font size\n minFontSize = _b === void 0 ? 8 : _b, // default minimum font size\n _c = options.decrementFactor, // default minimum font size\n decrementFactor = _c === void 0 ? 0.9 : _c;\n if (!container || !textElement) {\n return;\n }\n if (decrementFactor >= 1 || decrementFactor <= 0) {\n throw new Error(\"decrementFactor must be between 0 and 1\");\n }\n // Get container dimensions\n var containerRect = container.getBoundingClientRect();\n var containerWidth = containerRect.width;\n var containerHeight = containerRect.height;\n // Start with the maximum font size\n var fontSize = maxFontSize;\n // Apply the font size, measure, and adjust\n textElement.style.whiteSpace = \"nowrap\"; // ensure single line measurement if desired\n textElement.style.display = \"inline-block\";\n // Set initial font size\n textElement.style.fontSize = fontSize + \"px\";\n var textRect = textElement.getBoundingClientRect();\n // While text doesn't fit and we haven't reached the minimum font size\n // Check both width and height to ensure the text fits completely.\n while ((textRect.width > containerWidth || textRect.height > containerHeight) &&\n fontSize > minFontSize) {\n fontSize *= decrementFactor;\n textElement.style.fontSize = fontSize + \"px\";\n textRect = textElement.getBoundingClientRect();\n }\n // If you want the text to break lines and fill multi-line container, remove whiteSpace override:\n // textElement.style.whiteSpace = \"normal\";\n}\n/*\nExample usage (in a component or script):\n-----------------------------------------\nconst container = document.getElementById('text-container');\nconst textElement = document.getElementById('text-content');\n\nif (container && textElement) {\n fitTextToContainer(container, textElement, {\n maxFontSize: 72,\n minFontSize: 10,\n decrementFactor: 0.9\n });\n}\n*/\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/utils/autolayout/txt.ts?");
|
|
2940
|
+
|
|
2941
|
+
/***/ }),
|
|
2942
|
+
|
|
2943
|
+
/***/ "./src/utils/data.ts":
|
|
2944
|
+
/*!***************************!*\
|
|
2945
|
+
!*** ./src/utils/data.ts ***!
|
|
2946
|
+
\***************************/
|
|
2947
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2948
|
+
|
|
2949
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FileToBase64: () => (/* binding */ FileToBase64),\n/* harmony export */ Uint8ArrayToBlob: () => (/* binding */ Uint8ArrayToBlob),\n/* harmony export */ base64ToBlob: () => (/* binding */ base64ToBlob),\n/* harmony export */ base64ToUint8Array: () => (/* binding */ base64ToUint8Array),\n/* harmony export */ blobToBase64: () => (/* binding */ blobToBase64),\n/* harmony export */ blobToUint8Array: () => (/* binding */ blobToUint8Array),\n/* harmony export */ downloadBase64: () => (/* binding */ downloadBase64),\n/* harmony export */ fileDialogToBase64: () => (/* binding */ fileDialogToBase64),\n/* harmony export */ fileDialogToFile: () => (/* binding */ fileDialogToFile),\n/* harmony export */ remoteUrlToBase64: () => (/* binding */ remoteUrlToBase64),\n/* harmony export */ uint8ArrayToBase64: () => (/* binding */ uint8ArrayToBase64)\n/* harmony export */ });\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nfunction base64ToUint8Array(base64) {\n var binaryString = window.atob(base64); // Decode base64 to binary string\n var len = binaryString.length;\n var bytes = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n return bytes;\n}\nfunction uint8ArrayToBase64(data) {\n var binaryString = \"\";\n for (var i = 0; i < data.byteLength; i++) {\n binaryString += String.fromCharCode(data[i]);\n }\n return window.btoa(binaryString);\n}\nfunction Uint8ArrayToBlob(data, type) {\n return new Blob([data], { type: type });\n}\nfunction blobToUint8Array(blob) {\n return new Promise(function (resolve) {\n var reader = new FileReader();\n reader.onload = function () {\n var arrayBuffer = reader.result;\n var uint8Array = new Uint8Array(arrayBuffer);\n resolve(uint8Array);\n };\n reader.readAsArrayBuffer(blob);\n });\n}\nfunction base64ToBlob(base64, type) {\n return Uint8ArrayToBlob(base64ToUint8Array(base64), type);\n}\nfunction blobToBase64(blob) {\n return blobToUint8Array(blob).then(function (uint8Array) {\n return uint8ArrayToBase64(uint8Array);\n });\n}\nfunction downloadBase64(base64, filename, type) {\n var blob = base64ToBlob(base64, type);\n var url = URL.createObjectURL(blob);\n var a = document.createElement(\"a\");\n a.href = url;\n a.download = filename;\n a.click();\n URL.revokeObjectURL(url);\n a.remove();\n}\nfunction FileToBase64(file, remove_prefix) {\n // if file is not provided open file dialog\n if (remove_prefix === void 0) { remove_prefix = true; }\n return new Promise(function (resolve) {\n var reader = new FileReader();\n reader.onload = function () {\n var base64 = reader.result;\n if (remove_prefix) {\n resolve(base64.split(\",\")[1]);\n }\n resolve(base64);\n };\n reader.readAsDataURL(file);\n });\n}\nfunction fileDialogToFile(accept) {\n return new Promise(function (resolve) {\n var input = document.createElement(\"input\");\n input.type = \"file\";\n if (accept)\n input.accept = accept;\n input.onchange = function () {\n var _a;\n var file = (_a = input.files) === null || _a === void 0 ? void 0 : _a[0];\n if (file) {\n resolve(file);\n }\n };\n input.click();\n });\n}\nfunction fileDialogToBase64(accept) {\n return fileDialogToFile(accept).then(FileToBase64);\n}\nfunction remoteUrlToBase64(url_1) {\n return __awaiter(this, arguments, void 0, function (url, remove_prefix) {\n var response, blob_1, base64, error_1;\n if (remove_prefix === void 0) { remove_prefix = true; }\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n _a.trys.push([0, 4, , 5]);\n return [4 /*yield*/, fetch(url)];\n case 1:\n response = _a.sent();\n // Check if the fetch was successful\n if (!response.ok) {\n throw new Error(\"Failed to fetch from URL: \".concat(response.status, \" \").concat(response.statusText));\n }\n return [4 /*yield*/, response.blob()];\n case 2:\n blob_1 = _a.sent();\n return [4 /*yield*/, new Promise(function (resolve, reject) {\n var reader = new FileReader();\n reader.onload = function () {\n var result = reader.result;\n if (typeof result !== \"string\") {\n reject(\"Failed to convert URL to Base64: No result from FileReader\");\n reject(reader.error);\n }\n if (remove_prefix) {\n resolve(result.split(\",\")[1]); // Remove the data prefix if specified\n }\n else {\n resolve(result);\n }\n };\n reader.onerror = function () { return reject(reader.error); };\n reader.readAsDataURL(blob_1);\n })];\n case 3:\n base64 = _a.sent();\n return [2 /*return*/, base64];\n case 4:\n error_1 = _a.sent();\n console.error(\"Error converting URL to Base64:\", error_1);\n throw error_1;\n case 5: return [2 /*return*/];\n }\n });\n });\n}\n\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/./src/utils/data.ts?");
|
|
2950
|
+
|
|
2951
|
+
/***/ }),
|
|
2952
|
+
|
|
2763
2953
|
/***/ "./src/utils/debugger.ts":
|
|
2764
2954
|
/*!*******************************!*\
|
|
2765
2955
|
!*** ./src/utils/debugger.ts ***!
|
|
@@ -2934,7 +3124,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2934
3124
|
\**********************************************************/
|
|
2935
3125
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
2936
3126
|
|
|
2937
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeEventHandlers: () => (/* binding */
|
|
3127
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeEventHandlers: () => (/* binding */ composeEventHandlers)\n/* harmony export */ });\n// packages/core/primitive/src/primitive.tsx\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/primitive/dist/index.mjs?");
|
|
2938
3128
|
|
|
2939
3129
|
/***/ }),
|
|
2940
3130
|
|
|
@@ -2944,7 +3134,27 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2944
3134
|
\************************************************************/
|
|
2945
3135
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
2946
3136
|
|
|
2947
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Arrow: () => (/* binding */
|
|
3137
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Arrow: () => (/* binding */ Arrow),\n/* harmony export */ Root: () => (/* binding */ Root)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/arrow/src/Arrow.tsx\n\n\n\nvar NAME = \"Arrow\";\nvar Arrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__.Primitive.svg,\n {\n ...arrowProps,\n ref: forwardedRef,\n width,\n height,\n viewBox: \"0 0 30 10\",\n preserveAspectRatio: \"none\",\n children: props.asChild ? children : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\"polygon\", { points: \"0,0 30,0 15,10\" })\n }\n );\n});\nArrow.displayName = NAME;\nvar Root = Arrow;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-arrow/dist/index.mjs?");
|
|
3138
|
+
|
|
3139
|
+
/***/ }),
|
|
3140
|
+
|
|
3141
|
+
/***/ "../node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-primitive/dist/index.mjs":
|
|
3142
|
+
/*!***************************************************************************************************!*\
|
|
3143
|
+
!*** ../node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-primitive/dist/index.mjs ***!
|
|
3144
|
+
\***************************************************************************************************/
|
|
3145
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3146
|
+
|
|
3147
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Primitive: () => (/* binding */ Primitive),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ dispatchDiscreteCustomEvent: () => (/* binding */ dispatchDiscreteCustomEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/primitive/src/Primitive.tsx\n\n\n\n\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-primitive/dist/index.mjs?");
|
|
3148
|
+
|
|
3149
|
+
/***/ }),
|
|
3150
|
+
|
|
3151
|
+
/***/ "../node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-slot/dist/index.mjs":
|
|
3152
|
+
/*!**********************************************************************************************!*\
|
|
3153
|
+
!*** ../node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-slot/dist/index.mjs ***!
|
|
3154
|
+
\**********************************************************************************************/
|
|
3155
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3156
|
+
|
|
3157
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Slot: () => (/* binding */ Slot),\n/* harmony export */ Slottable: () => (/* binding */ Slottable)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/slot/src/Slot.tsx\n\n\n\nvar Slot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null);\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, childrenRef) : childrenRef\n });\n }\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children });\n};\nfunction isSlottable(child) {\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-arrow/node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
2948
3158
|
|
|
2949
3159
|
/***/ }),
|
|
2950
3160
|
|
|
@@ -2954,7 +3164,27 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2954
3164
|
\*****************************************************************/
|
|
2955
3165
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
2956
3166
|
|
|
2957
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createCollection: () => (/* binding */
|
|
3167
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createCollection: () => (/* binding */ createCollection)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\"use client\";\n\n// packages/react/collection/src/Collection.tsx\n\n\n\n\n\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useRef(null);\n const itemMap = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlot = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_4__.Slot, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlot = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_4__.Slot, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-collection/dist/index.mjs?");
|
|
3168
|
+
|
|
3169
|
+
/***/ }),
|
|
3170
|
+
|
|
3171
|
+
/***/ "../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context/dist/index.mjs":
|
|
3172
|
+
/*!******************************************************************************************************!*\
|
|
3173
|
+
!*** ../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context/dist/index.mjs ***!
|
|
3174
|
+
\******************************************************************************************************/
|
|
3175
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3176
|
+
|
|
3177
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createContext: () => (/* binding */ createContext2),\n/* harmony export */ createContextScope: () => (/* binding */ createContextScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/context/src/createContext.tsx\n\n\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n function Provider(props) {\n const { children, ...context } = props;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n }\n function useContext2(consumerName) {\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n function Provider(props) {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName][index] || BaseContext;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n }\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName][index] || BaseContext;\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-context/dist/index.mjs?");
|
|
3178
|
+
|
|
3179
|
+
/***/ }),
|
|
3180
|
+
|
|
3181
|
+
/***/ "../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs":
|
|
3182
|
+
/*!***************************************************************************************************!*\
|
|
3183
|
+
!*** ../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs ***!
|
|
3184
|
+
\***************************************************************************************************/
|
|
3185
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3186
|
+
|
|
3187
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Slot: () => (/* binding */ Slot),\n/* harmony export */ Slottable: () => (/* binding */ Slottable)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/slot/src/Slot.tsx\n\n\n\nvar Slot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null);\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, childrenRef) : childrenRef\n });\n }\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children });\n};\nfunction isSlottable(child) {\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
2958
3188
|
|
|
2959
3189
|
/***/ }),
|
|
2960
3190
|
|
|
@@ -2964,7 +3194,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2964
3194
|
\*******************************************************************/
|
|
2965
3195
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
2966
3196
|
|
|
2967
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRefs: () => (/* binding */
|
|
3197
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRefs: () => (/* binding */ composeRefs),\n/* harmony export */ useComposedRefs: () => (/* binding */ useComposedRefs)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n// packages/react/compose-refs/src/composeRefs.tsx\n\nfunction setRef(ref, value) {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref !== null && ref !== void 0) {\n ref.current = value;\n }\n}\nfunction composeRefs(...refs) {\n return (node) => refs.forEach((ref) => setRef(ref, node));\n}\nfunction useComposedRefs(...refs) {\n return react__WEBPACK_IMPORTED_MODULE_0__.useCallback(composeRefs(...refs), refs);\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-compose-refs/dist/index.mjs?");
|
|
2968
3198
|
|
|
2969
3199
|
/***/ }),
|
|
2970
3200
|
|
|
@@ -2984,7 +3214,47 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2984
3214
|
\*************************************************************/
|
|
2985
3215
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
2986
3216
|
|
|
2987
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Close: () => (/* binding */ $5d3850c4d0b4e6c7$export$f39c2d165cd861fe),\n/* harmony export */ Content: () => (/* binding */ $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2),\n/* harmony export */ Description: () => (/* binding */ $5d3850c4d0b4e6c7$export$393edc798c47379d),\n/* harmony export */ Dialog: () => (/* binding */ $5d3850c4d0b4e6c7$export$3ddf2d174ce01153),\n/* harmony export */ DialogClose: () => (/* binding */ $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac),\n/* harmony export */ DialogContent: () => (/* binding */ $5d3850c4d0b4e6c7$export$b6d9565de1e068cf),\n/* harmony export */ DialogDescription: () => (/* binding */ $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5),\n/* harmony export */ DialogOverlay: () => (/* binding */ $5d3850c4d0b4e6c7$export$bd1d06c79be19e17),\n/* harmony export */ DialogPortal: () => (/* binding */ $5d3850c4d0b4e6c7$export$dad7c95542bacce0),\n/* harmony export */ DialogTitle: () => (/* binding */ $5d3850c4d0b4e6c7$export$16f7638e4a34b909),\n/* harmony export */ DialogTrigger: () => (/* binding */ $5d3850c4d0b4e6c7$export$2e1e1122cf0cba88),\n/* harmony export */ Overlay: () => (/* binding */ $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff),\n/* harmony export */ Portal: () => (/* binding */ $5d3850c4d0b4e6c7$export$602eac185826482c),\n/* harmony export */ Root: () => (/* binding */ $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9),\n/* harmony export */ Title: () => (/* binding */ $5d3850c4d0b4e6c7$export$f99233281efd08a0),\n/* harmony export */ Trigger: () => (/* binding */ $5d3850c4d0b4e6c7$export$41fb9f06171c75f4),\n/* harmony export */ WarningProvider: () => (/* binding */ $5d3850c4d0b4e6c7$export$69b62a49393917d6),\n/* harmony export */ createDialogScope: () => (/* binding */ $5d3850c4d0b4e6c7$export$cc702773b8ea3e41)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-id */ \"../node_modules/@radix-ui/react-id/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ \"../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @radix-ui/react-focus-scope */ \"../node_modules/@radix-ui/react-focus-scope/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-portal */ \"../node_modules/@radix-ui/react-portal/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-presence */ \"../node_modules/@radix-ui/react-presence/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @radix-ui/react-focus-guards */ \"../node_modules/@radix-ui/react-focus-guards/dist/index.mjs\");\n/* harmony import */ var react_remove_scroll__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react-remove-scroll */ \"../node_modules/react-remove-scroll/dist/es2015/Combination.js\");\n/* harmony import */ var aria_hidden__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! aria-hidden */ \"../node_modules/aria-hidden/dist/es2015/index.js\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-slot/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Dialog\n * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DIALOG_NAME = 'Dialog';\nconst [$5d3850c4d0b4e6c7$var$createDialogContext, $5d3850c4d0b4e6c7$export$cc702773b8ea3e41] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)($5d3850c4d0b4e6c7$var$DIALOG_NAME);\nconst [$5d3850c4d0b4e6c7$var$DialogProvider, $5d3850c4d0b4e6c7$var$useDialogContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$DIALOG_NAME);\nconst $5d3850c4d0b4e6c7$export$3ddf2d174ce01153 = (props)=>{\n const { __scopeDialog: __scopeDialog , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true } = props;\n const triggerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const contentRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const [open = false, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_3__.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5d3850c4d0b4e6c7$var$DialogProvider, {\n scope: __scopeDialog,\n triggerRef: triggerRef,\n contentRef: contentRef,\n contentId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__.useId)(),\n titleId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__.useId)(),\n descriptionId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__.useId)(),\n open: open,\n onOpenChange: setOpen,\n onOpenToggle: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>setOpen((prevOpen)=>!prevOpen\n )\n , [\n setOpen\n ]),\n modal: modal\n }, children);\n};\n/*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$3ddf2d174ce01153, {\n displayName: $5d3850c4d0b4e6c7$var$DIALOG_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DialogTrigger\n * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$TRIGGER_NAME = 'DialogTrigger';\nconst $5d3850c4d0b4e6c7$export$2e1e1122cf0cba88 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeDialog: __scopeDialog , ...triggerProps } = props;\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, context.triggerRef);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.button, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": $5d3850c4d0b4e6c7$var$getState(context.open)\n }, triggerProps, {\n ref: composedTriggerRef,\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onClick, context.onOpenToggle)\n }));\n});\n/*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$2e1e1122cf0cba88, {\n displayName: $5d3850c4d0b4e6c7$var$TRIGGER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DialogPortal\n * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$PORTAL_NAME = 'DialogPortal';\nconst [$5d3850c4d0b4e6c7$var$PortalProvider, $5d3850c4d0b4e6c7$var$usePortalContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, {\n forceMount: undefined\n});\nconst $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props)=>{\n const { __scopeDialog: __scopeDialog , forceMount: forceMount , children: children , container: container } = props;\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5d3850c4d0b4e6c7$var$PortalProvider, {\n scope: __scopeDialog,\n forceMount: forceMount\n }, react__WEBPACK_IMPORTED_MODULE_1__.Children.map(children, (child)=>/*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, {\n present: forceMount || context.open\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_9__.Portal, {\n asChild: true,\n container: container\n }, child))\n ));\n};\n/*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$dad7c95542bacce0, {\n displayName: $5d3850c4d0b4e6c7$var$PORTAL_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DialogOverlay\n * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$OVERLAY_NAME = 'DialogOverlay';\nconst $5d3850c4d0b4e6c7$export$bd1d06c79be19e17 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);\n const { forceMount: forceMount = portalContext.forceMount , ...overlayProps } = props;\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, {\n present: forceMount || context.open\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5d3850c4d0b4e6c7$var$DialogOverlayImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, overlayProps, {\n ref: forwardedRef\n }))) : null;\n});\n/*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$bd1d06c79be19e17, {\n displayName: $5d3850c4d0b4e6c7$var$OVERLAY_NAME\n});\nconst $5d3850c4d0b4e6c7$var$DialogOverlayImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeDialog: __scopeDialog , ...overlayProps } = props;\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, __scopeDialog);\n return(/*#__PURE__*/ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(react_remove_scroll__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {\n as: _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_11__.Slot,\n allowPinchZoom: true,\n shards: [\n context.contentRef\n ]\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-state\": $5d3850c4d0b4e6c7$var$getState(context.open)\n }, overlayProps, {\n ref: forwardedRef // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.\n ,\n style: {\n pointerEvents: 'auto',\n ...overlayProps.style\n }\n }))));\n});\n/* -------------------------------------------------------------------------------------------------\n * DialogContent\n * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CONTENT_NAME = 'DialogContent';\nconst $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);\n const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props;\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, {\n present: forceMount || context.open\n }, context.modal ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5d3850c4d0b4e6c7$var$DialogContentModal, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, contentProps, {\n ref: forwardedRef\n })) : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5d3850c4d0b4e6c7$var$DialogContentNonModal, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, contentProps, {\n ref: forwardedRef\n })));\n});\n/*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$b6d9565de1e068cf, {\n displayName: $5d3850c4d0b4e6c7$var$CONTENT_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentModal = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);\n const contentRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const content = contentRef.current;\n if (content) return (0,aria_hidden__WEBPACK_IMPORTED_MODULE_12__.hideOthers)(content);\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5d3850c4d0b4e6c7$var$DialogContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs // we make sure focus isn't trapped once `DialogContent` has been closed\n ,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onCloseAutoFocus, (event)=>{\n var _context$triggerRef$c;\n event.preventDefault();\n (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();\n }),\n onPointerDownOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onPointerDownOutside, (event)=>{\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick; // If the event is a right-click, we shouldn't close because\n // it is effectively as if we right-clicked the `Overlay`.\n if (isRightClick) event.preventDefault();\n }) // When focus is trapped, a `focusout` event may still happen.\n ,\n onFocusOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onFocusOutside, (event)=>event.preventDefault()\n )\n }));\n});\n/* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentNonModal = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const hasPointerDownOutsideRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5d3850c4d0b4e6c7$var$DialogContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event)=>{\n var _props$onCloseAutoFoc;\n (_props$onCloseAutoFoc = props.onCloseAutoFocus) === null || _props$onCloseAutoFoc === void 0 || _props$onCloseAutoFoc.call(props, event);\n if (!event.defaultPrevented) {\n var _context$triggerRef$c2;\n if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event)=>{\n var _props$onInteractOuts, _context$triggerRef$c3;\n (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true;\n } // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target;\n const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target);\n if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault();\n }\n }));\n});\n/* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeDialog: __scopeDialog , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props;\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, __scopeDialog);\n const contentRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, contentRef); // Make sure the whole tree has focus guards as our `Dialog` will be\n // the last element in the DOM (beacuse of the `Portal`)\n (0,_radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_13__.useFocusGuards)();\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_14__.FocusScope, {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_15__.DismissableLayer, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": $5d3850c4d0b4e6c7$var$getState(context.open)\n }, contentProps, {\n ref: composedRefs,\n onDismiss: ()=>context.onOpenChange(false)\n }))), false);\n});\n/* -------------------------------------------------------------------------------------------------\n * DialogTitle\n * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$TITLE_NAME = 'DialogTitle';\nconst $5d3850c4d0b4e6c7$export$16f7638e4a34b909 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeDialog: __scopeDialog , ...titleProps } = props;\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TITLE_NAME, __scopeDialog);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.h2, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n id: context.titleId\n }, titleProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$16f7638e4a34b909, {\n displayName: $5d3850c4d0b4e6c7$var$TITLE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DialogDescription\n * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DESCRIPTION_NAME = 'DialogDescription';\nconst $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeDialog: __scopeDialog , ...descriptionProps } = props;\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$DESCRIPTION_NAME, __scopeDialog);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.p, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n id: context.descriptionId\n }, descriptionProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$94e94c2ec2c954d5, {\n displayName: $5d3850c4d0b4e6c7$var$DESCRIPTION_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DialogClose\n * -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CLOSE_NAME = 'DialogClose';\nconst $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeDialog: __scopeDialog , ...closeProps } = props;\n const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CLOSE_NAME, __scopeDialog);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.button, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n type: \"button\"\n }, closeProps, {\n ref: forwardedRef,\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onClick, ()=>context.onOpenChange(false)\n )\n }));\n});\n/*#__PURE__*/ Object.assign($5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac, {\n displayName: $5d3850c4d0b4e6c7$var$CLOSE_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ function $5d3850c4d0b4e6c7$var$getState(open) {\n return open ? 'open' : 'closed';\n}\nconst $5d3850c4d0b4e6c7$var$TITLE_WARNING_NAME = 'DialogTitleWarning';\nconst [$5d3850c4d0b4e6c7$export$69b62a49393917d6, $5d3850c4d0b4e6c7$var$useWarningContext] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContext)($5d3850c4d0b4e6c7$var$TITLE_WARNING_NAME, {\n contentName: $5d3850c4d0b4e6c7$var$CONTENT_NAME,\n titleName: $5d3850c4d0b4e6c7$var$TITLE_NAME,\n docsSlug: 'dialog'\n});\nconst $5d3850c4d0b4e6c7$var$TitleWarning = ({ titleId: titleId })=>{\n const titleWarningContext = $5d3850c4d0b4e6c7$var$useWarningContext($5d3850c4d0b4e6c7$var$TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) throw new Error(MESSAGE);\n }\n }, [\n MESSAGE,\n titleId\n ]);\n return null;\n};\nconst $5d3850c4d0b4e6c7$var$DESCRIPTION_WARNING_NAME = 'DialogDescriptionWarning';\nconst $5d3850c4d0b4e6c7$var$DescriptionWarning = ({ contentRef: contentRef , descriptionId: descriptionId })=>{\n const descriptionWarningContext = $5d3850c4d0b4e6c7$var$useWarningContext($5d3850c4d0b4e6c7$var$DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n var _contentRef$current;\n const describedById = (_contentRef$current = contentRef.current) === null || _contentRef$current === void 0 ? void 0 : _contentRef$current.getAttribute('aria-describedby'); // if we have an id and the user hasn't set aria-describedby={undefined}\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [\n MESSAGE,\n contentRef,\n descriptionId\n ]);\n return null;\n};\nconst $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9 = $5d3850c4d0b4e6c7$export$3ddf2d174ce01153;\nconst $5d3850c4d0b4e6c7$export$41fb9f06171c75f4 = $5d3850c4d0b4e6c7$export$2e1e1122cf0cba88;\nconst $5d3850c4d0b4e6c7$export$602eac185826482c = $5d3850c4d0b4e6c7$export$dad7c95542bacce0;\nconst $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff = $5d3850c4d0b4e6c7$export$bd1d06c79be19e17;\nconst $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 = $5d3850c4d0b4e6c7$export$b6d9565de1e068cf;\nconst $5d3850c4d0b4e6c7$export$f99233281efd08a0 = $5d3850c4d0b4e6c7$export$16f7638e4a34b909;\nconst $5d3850c4d0b4e6c7$export$393edc798c47379d = $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5;\nconst $5d3850c4d0b4e6c7$export$f39c2d165cd861fe = $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dialog/dist/index.mjs?");
|
|
3217
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Close: () => (/* binding */ Close),\n/* harmony export */ Content: () => (/* binding */ Content),\n/* harmony export */ Description: () => (/* binding */ Description),\n/* harmony export */ Dialog: () => (/* binding */ Dialog),\n/* harmony export */ DialogClose: () => (/* binding */ DialogClose),\n/* harmony export */ DialogContent: () => (/* binding */ DialogContent),\n/* harmony export */ DialogDescription: () => (/* binding */ DialogDescription),\n/* harmony export */ DialogOverlay: () => (/* binding */ DialogOverlay),\n/* harmony export */ DialogPortal: () => (/* binding */ DialogPortal),\n/* harmony export */ DialogTitle: () => (/* binding */ DialogTitle),\n/* harmony export */ DialogTrigger: () => (/* binding */ DialogTrigger),\n/* harmony export */ Overlay: () => (/* binding */ Overlay),\n/* harmony export */ Portal: () => (/* binding */ Portal),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Title: () => (/* binding */ Title),\n/* harmony export */ Trigger: () => (/* binding */ Trigger),\n/* harmony export */ WarningProvider: () => (/* binding */ WarningProvider),\n/* harmony export */ createDialogScope: () => (/* binding */ createDialogScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-id */ \"../node_modules/@radix-ui/react-id/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ \"../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @radix-ui/react-focus-scope */ \"../node_modules/@radix-ui/react-focus-scope/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-portal */ \"../node_modules/@radix-ui/react-portal/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-presence */ \"../node_modules/@radix-ui/react-presence/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @radix-ui/react-focus-guards */ \"../node_modules/@radix-ui/react-focus-guards/dist/index.mjs\");\n/* harmony import */ var react_remove_scroll__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react-remove-scroll */ \"../node_modules/react-remove-scroll/dist/es2015/Combination.js\");\n/* harmony import */ var aria_hidden__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! aria-hidden */ \"../node_modules/aria-hidden/dist/es2015/index.js\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\"use client\";\n\n// packages/react/dialog/src/Dialog.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar DIALOG_NAME = \"Dialog\";\nvar [createDialogContext, createDialogScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)(DIALOG_NAME);\nvar [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);\nvar Dialog = (props) => {\n const {\n __scopeDialog,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const triggerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const contentRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const [open = false, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_3__.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n DialogProvider,\n {\n scope: __scopeDialog,\n triggerRef,\n contentRef,\n contentId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__.useId)(),\n titleId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__.useId)(),\n descriptionId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__.useId)(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children\n }\n );\n};\nDialog.displayName = DIALOG_NAME;\nvar TRIGGER_NAME = \"DialogTrigger\";\nvar DialogTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...triggerProps } = props;\n const context = useDialogContext(TRIGGER_NAME, __scopeDialog);\n const composedTriggerRef = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, context.triggerRef);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onClick, context.onOpenToggle)\n }\n );\n }\n);\nDialogTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DialogPortal\";\nvar [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar DialogPortal = (props) => {\n const { __scopeDialog, forceMount, children, container } = props;\n const context = useDialogContext(PORTAL_NAME, __scopeDialog);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(PortalProvider, { scope: __scopeDialog, forceMount, children: react__WEBPACK_IMPORTED_MODULE_0__.Children.map(children, (child) => /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_9__.Portal, { asChild: true, container, children: child }) })) });\n};\nDialogPortal.displayName = PORTAL_NAME;\nvar OVERLAY_NAME = \"DialogOverlay\";\nvar DialogOverlay = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);\n return context.modal ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;\n }\n);\nDialogOverlay.displayName = OVERLAY_NAME;\nvar DialogOverlayImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...overlayProps } = props;\n const context = useDialogContext(OVERLAY_NAME, __scopeDialog);\n return (\n // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`\n // ie. when `Overlay` and `Content` are siblings\n /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_remove_scroll__WEBPACK_IMPORTED_MODULE_10__[\"default\"], { as: _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_11__.Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.div,\n {\n \"data-state\": getState(context.open),\n ...overlayProps,\n ref: forwardedRef,\n style: { pointerEvents: \"auto\", ...overlayProps.style }\n }\n ) })\n );\n }\n);\nvar CONTENT_NAME = \"DialogContent\";\nvar DialogContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeDialog);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nDialogContent.displayName = CONTENT_NAME;\nvar DialogContentModal = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const contentRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, context.contentRef, contentRef);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const content = contentRef.current;\n if (content) return (0,aria_hidden__WEBPACK_IMPORTED_MODULE_12__.hideOthers)(content);\n }, []);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n DialogContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onPointerDownOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (isRightClick) event.preventDefault();\n }),\n onFocusOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(\n props.onFocusOutside,\n (event) => event.preventDefault()\n )\n }\n );\n }\n);\nvar DialogContentNonModal = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const context = useDialogContext(CONTENT_NAME, props.__scopeDialog);\n const hasInteractedOutsideRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n const hasPointerDownOutsideRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n DialogContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar DialogContentImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props;\n const context = useDialogContext(CONTENT_NAME, __scopeDialog);\n const contentRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_5__.useComposedRefs)(forwardedRef, contentRef);\n (0,_radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_13__.useFocusGuards)();\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children: [\n /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_14__.FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_15__.DismissableLayer,\n {\n role: \"dialog\",\n id: context.contentId,\n \"aria-describedby\": context.descriptionId,\n \"aria-labelledby\": context.titleId,\n \"data-state\": getState(context.open),\n ...contentProps,\n ref: composedRefs,\n onDismiss: () => context.onOpenChange(false)\n }\n )\n }\n ),\n /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children: [\n /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(TitleWarning, { titleId: context.titleId }),\n /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })\n ] })\n ] });\n }\n);\nvar TITLE_NAME = \"DialogTitle\";\nvar DialogTitle = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...titleProps } = props;\n const context = useDialogContext(TITLE_NAME, __scopeDialog);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });\n }\n);\nDialogTitle.displayName = TITLE_NAME;\nvar DESCRIPTION_NAME = \"DialogDescription\";\nvar DialogDescription = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...descriptionProps } = props;\n const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });\n }\n);\nDialogDescription.displayName = DESCRIPTION_NAME;\nvar CLOSE_NAME = \"DialogClose\";\nvar DialogClose = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDialog, ...closeProps } = props;\n const context = useDialogContext(CLOSE_NAME, __scopeDialog);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nDialogClose.displayName = CLOSE_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar TITLE_WARNING_NAME = \"DialogTitleWarning\";\nvar [WarningProvider, useWarningContext] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContext)(TITLE_WARNING_NAME, {\n contentName: CONTENT_NAME,\n titleName: TITLE_NAME,\n docsSlug: \"dialog\"\n});\nvar TitleWarning = ({ titleId }) => {\n const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);\n const MESSAGE = `\\`${titleWarningContext.contentName}\\` requires a \\`${titleWarningContext.titleName}\\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \\`${titleWarningContext.titleName}\\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (titleId) {\n const hasTitle = document.getElementById(titleId);\n if (!hasTitle) console.error(MESSAGE);\n }\n }, [MESSAGE, titleId]);\n return null;\n};\nvar DESCRIPTION_WARNING_NAME = \"DialogDescriptionWarning\";\nvar DescriptionWarning = ({ contentRef, descriptionId }) => {\n const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);\n const MESSAGE = `Warning: Missing \\`Description\\` or \\`aria-describedby={undefined}\\` for {${descriptionWarningContext.contentName}}.`;\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const describedById = contentRef.current?.getAttribute(\"aria-describedby\");\n if (descriptionId && describedById) {\n const hasDescription = document.getElementById(descriptionId);\n if (!hasDescription) console.warn(MESSAGE);\n }\n }, [MESSAGE, contentRef, descriptionId]);\n return null;\n};\nvar Root = Dialog;\nvar Trigger = DialogTrigger;\nvar Portal = DialogPortal;\nvar Overlay = DialogOverlay;\nvar Content = DialogContent;\nvar Title = DialogTitle;\nvar Description = DialogDescription;\nvar Close = DialogClose;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dialog/dist/index.mjs?");
|
|
3218
|
+
|
|
3219
|
+
/***/ }),
|
|
3220
|
+
|
|
3221
|
+
/***/ "../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs":
|
|
3222
|
+
/*!**************************************************************************************************!*\
|
|
3223
|
+
!*** ../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs ***!
|
|
3224
|
+
\**************************************************************************************************/
|
|
3225
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3226
|
+
|
|
3227
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createContext: () => (/* binding */ createContext2),\n/* harmony export */ createContextScope: () => (/* binding */ createContextScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/context/src/createContext.tsx\n\n\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.mjs?");
|
|
3228
|
+
|
|
3229
|
+
/***/ }),
|
|
3230
|
+
|
|
3231
|
+
/***/ "../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs":
|
|
3232
|
+
/*!****************************************************************************************************!*\
|
|
3233
|
+
!*** ../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs ***!
|
|
3234
|
+
\****************************************************************************************************/
|
|
3235
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3236
|
+
|
|
3237
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Primitive: () => (/* binding */ Primitive),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ dispatchDiscreteCustomEvent: () => (/* binding */ dispatchDiscreteCustomEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/primitive/src/Primitive.tsx\n\n\n\n\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.mjs?");
|
|
3238
|
+
|
|
3239
|
+
/***/ }),
|
|
3240
|
+
|
|
3241
|
+
/***/ "../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs":
|
|
3242
|
+
/*!***********************************************************************************************!*\
|
|
3243
|
+
!*** ../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs ***!
|
|
3244
|
+
\***********************************************************************************************/
|
|
3245
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3246
|
+
|
|
3247
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Slot: () => (/* binding */ Slot),\n/* harmony export */ Slottable: () => (/* binding */ Slottable)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/slot/src/Slot.tsx\n\n\n\nvar Slot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null);\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, childrenRef) : childrenRef\n });\n }\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children });\n};\nfunction isSlottable(child) {\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
3248
|
+
|
|
3249
|
+
/***/ }),
|
|
3250
|
+
|
|
3251
|
+
/***/ "../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs":
|
|
3252
|
+
/*!*****************************************************************************************************************!*\
|
|
3253
|
+
!*** ../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs ***!
|
|
3254
|
+
\*****************************************************************************************************************/
|
|
3255
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3256
|
+
|
|
3257
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useControllableState: () => (/* binding */ useControllableState)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n// packages/react/use-controllable-state/src/useControllableState.tsx\n\n\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n const setValue = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = react__WEBPACK_IMPORTED_MODULE_0__.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(value);\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs?");
|
|
2988
3258
|
|
|
2989
3259
|
/***/ }),
|
|
2990
3260
|
|
|
@@ -2994,7 +3264,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2994
3264
|
\****************************************************************/
|
|
2995
3265
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
2996
3266
|
|
|
2997
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DirectionProvider: () => (/* binding */
|
|
3267
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DirectionProvider: () => (/* binding */ DirectionProvider),\n/* harmony export */ Provider: () => (/* binding */ Provider),\n/* harmony export */ useDirection: () => (/* binding */ useDirection)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/direction/src/Direction.tsx\n\n\nvar DirectionContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-direction/dist/index.mjs?");
|
|
2998
3268
|
|
|
2999
3269
|
/***/ }),
|
|
3000
3270
|
|
|
@@ -3004,7 +3274,77 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3004
3274
|
\************************************************************************/
|
|
3005
3275
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3006
3276
|
|
|
3007
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Branch: () => (/* binding */ $5cb92bef7577960e$export$aecb2ddcb55c95be),\n/* harmony export */ DismissableLayer: () => (/* binding */ $5cb92bef7577960e$export$177fb62ff3ec1f22),\n/* harmony export */ DismissableLayerBranch: () => (/* binding */ $5cb92bef7577960e$export$4d5eb2109db14228),\n/* harmony export */ Root: () => (/* binding */ $5cb92bef7577960e$export$be92b6f5f03c0fe9)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-escape-keydown */ \"../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';\nconst $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\nlet $5cb92bef7577960e$var$originalBodyPointerEvents;\nconst $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)({\n layers: new Set(),\n layersWithOutsidePointerEventsDisabled: new Set(),\n branches: new Set()\n});\nconst $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n var _node$ownerDocument;\n const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)($5cb92bef7577960e$var$DismissableLayerContext);\n const [node1, setNode] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;\n const [, force] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({});\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, (node)=>setNode(node)\n );\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled\n ].slice(-1); // prettier-ignore\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore\n const index = node1 ? layers.indexOf(node1) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{\n const target = event.target;\n const isPointerDownOnBranch = [\n ...context.branches\n ].some((branch)=>branch.contains(target)\n );\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);\n onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n }, ownerDocument);\n const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{\n const target = event.target;\n const isFocusInBranch = [\n ...context.branches\n ].some((branch)=>branch.contains(target)\n );\n if (isFocusInBranch) return;\n onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);\n onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n }, ownerDocument);\n (0,_radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_3__.useEscapeKeydown)((event)=>{\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (!node1) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node1);\n }\n context.layers.add(node1);\n $5cb92bef7577960e$var$dispatchUpdate();\n return ()=>{\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;\n };\n }, [\n node1,\n ownerDocument,\n disableOutsidePointerEvents,\n context\n ]);\n /**\n * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n * and add it to the end again so the layering order wouldn't be _creation order_.\n * We only want them to be removed from context stacks when unmounted.\n */ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n return ()=>{\n if (!node1) return;\n context.layers.delete(node1);\n context.layersWithOutsidePointerEventsDisabled.delete(node1);\n $5cb92bef7577960e$var$dispatchUpdate();\n };\n }, [\n node1,\n context\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const handleUpdate = ()=>force({})\n ;\n document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);\n return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)\n ;\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, layerProps, {\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,\n ...props.style\n },\n onFocusCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)\n }));\n});\n/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$177fb62ff3ec1f22, {\n displayName: $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$BRANCH_NAME = 'DismissableLayerBranch';\nconst $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)($5cb92bef7577960e$var$DismissableLayerContext);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, ref);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return ()=>{\n context.branches.delete(node);\n };\n }\n }, [\n context.branches\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs\n }));\n});\n/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$4d5eb2109db14228, {\n displayName: $5cb92bef7577960e$var$BRANCH_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ /**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {\n const handlePointerDownOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onPointerDownOutside);\n const isPointerInsideReactTreeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const handleClickRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(()=>{});\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const handlePointerDown = (event)=>{\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = {\n originalEvent: event\n };\n function handleAndDispatchPointerDownOutsideEvent() {\n $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {\n discrete: true\n });\n }\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executres events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */ if (event.pointerType === 'touch') {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener('click', handleClickRef.current, {\n once: true\n });\n } else handleAndDispatchPointerDownOutsideEvent();\n } else // We need to remove the event listener in case the outside click has been canceled.\n // See: https://github.com/radix-ui/primitives/issues/2171\n ownerDocument.removeEventListener('click', handleClickRef.current);\n isPointerInsideReactTreeRef.current = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is not React specific, but rather how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */ const timerId = window.setTimeout(()=>{\n ownerDocument.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return ()=>{\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n ownerDocument.removeEventListener('click', handleClickRef.current);\n };\n }, [\n ownerDocument,\n handlePointerDownOutside\n ]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true\n };\n}\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {\n const handleFocusOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onFocusOutside);\n const isFocusInsideReactTreeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const handleFocus = (event)=>{\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = {\n originalEvent: event\n };\n $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener('focusin', handleFocus);\n return ()=>ownerDocument.removeEventListener('focusin', handleFocus)\n ;\n }, [\n ownerDocument,\n handleFocusOutside\n ]);\n return {\n onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true\n ,\n onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false\n };\n}\nfunction $5cb92bef7577960e$var$dispatchUpdate() {\n const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, {\n bubbles: false,\n cancelable: true,\n detail: detail\n });\n if (handler) target.addEventListener(name, handler, {\n once: true\n });\n if (discrete) (0,_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.dispatchDiscreteCustomEvent)(target, event);\n else target.dispatchEvent(event);\n}\nconst $5cb92bef7577960e$export$be92b6f5f03c0fe9 = $5cb92bef7577960e$export$177fb62ff3ec1f22;\nconst $5cb92bef7577960e$export$aecb2ddcb55c95be = $5cb92bef7577960e$export$4d5eb2109db14228;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs?");
|
|
3277
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Branch: () => (/* binding */ Branch),\n/* harmony export */ DismissableLayer: () => (/* binding */ DismissableLayer),\n/* harmony export */ DismissableLayerBranch: () => (/* binding */ DismissableLayerBranch),\n/* harmony export */ Root: () => (/* binding */ Root)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-escape-keydown */ \"../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\"use client\";\n\n// packages/react/dismissable-layer/src/DismissableLayer.tsx\n\n\n\n\n\n\n\nvar DISMISSABLE_LAYER_NAME = \"DismissableLayer\";\nvar CONTEXT_UPDATE = \"dismissableLayer.update\";\nvar POINTER_DOWN_OUTSIDE = \"dismissableLayer.pointerDownOutside\";\nvar FOCUS_OUTSIDE = \"dismissableLayer.focusOutside\";\nvar originalBodyPointerEvents;\nvar DismissableLayerContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext({\n layers: /* @__PURE__ */ new Set(),\n layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),\n branches: /* @__PURE__ */ new Set()\n});\nvar DismissableLayer = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const {\n disableOutsidePointerEvents = false,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n ...layerProps\n } = props;\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DismissableLayerContext);\n const [node, setNode] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);\n const ownerDocument = node?.ownerDocument ?? globalThis?.document;\n const [, force] = react__WEBPACK_IMPORTED_MODULE_0__.useState({});\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, (node2) => setNode(node2));\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);\n const index = node ? layers.indexOf(node) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = usePointerDownOutside((event) => {\n const target = event.target;\n const isPointerDownOnBranch = [...context.branches].some((branch) => branch.contains(target));\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n const focusOutside = useFocusOutside((event) => {\n const target = event.target;\n const isFocusInBranch = [...context.branches].some((branch) => branch.contains(target));\n if (isFocusInBranch) return;\n onFocusOutside?.(event);\n onInteractOutside?.(event);\n if (!event.defaultPrevented) onDismiss?.();\n }, ownerDocument);\n (0,_radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_3__.useEscapeKeydown)((event) => {\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown?.(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (!node) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = \"none\";\n }\n context.layersWithOutsidePointerEventsDisabled.add(node);\n }\n context.layers.add(node);\n dispatchUpdate();\n return () => {\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) {\n ownerDocument.body.style.pointerEvents = originalBodyPointerEvents;\n }\n };\n }, [node, ownerDocument, disableOutsidePointerEvents, context]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n return () => {\n if (!node) return;\n context.layers.delete(node);\n context.layersWithOutsidePointerEventsDisabled.delete(node);\n dispatchUpdate();\n };\n }, [node, context]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const handleUpdate = () => force({});\n document.addEventListener(CONTEXT_UPDATE, handleUpdate);\n return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);\n }, []);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div,\n {\n ...layerProps,\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? \"auto\" : \"none\" : void 0,\n ...props.style\n },\n onFocusCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(\n props.onPointerDownCapture,\n pointerDownOutside.onPointerDownCapture\n )\n }\n );\n }\n);\nDismissableLayer.displayName = DISMISSABLE_LAYER_NAME;\nvar BRANCH_NAME = \"DismissableLayerBranch\";\nvar DismissableLayerBranch = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DismissableLayerContext);\n const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, ref);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return () => {\n context.branches.delete(node);\n };\n }\n }, [context.branches]);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, { ...props, ref: composedRefs });\n});\nDismissableLayerBranch.displayName = BRANCH_NAME;\nfunction usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {\n const handlePointerDownOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onPointerDownOutside);\n const isPointerInsideReactTreeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n const handleClickRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(() => {\n });\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const handlePointerDown = (event) => {\n if (event.target && !isPointerInsideReactTreeRef.current) {\n let handleAndDispatchPointerDownOutsideEvent2 = function() {\n handleAndDispatchCustomEvent(\n POINTER_DOWN_OUTSIDE,\n handlePointerDownOutside,\n eventDetail,\n { discrete: true }\n );\n };\n var handleAndDispatchPointerDownOutsideEvent = handleAndDispatchPointerDownOutsideEvent2;\n const eventDetail = { originalEvent: event };\n if (event.pointerType === \"touch\") {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent2;\n ownerDocument.addEventListener(\"click\", handleClickRef.current, { once: true });\n } else {\n handleAndDispatchPointerDownOutsideEvent2();\n }\n } else {\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n }\n isPointerInsideReactTreeRef.current = false;\n };\n const timerId = window.setTimeout(() => {\n ownerDocument.addEventListener(\"pointerdown\", handlePointerDown);\n }, 0);\n return () => {\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener(\"pointerdown\", handlePointerDown);\n ownerDocument.removeEventListener(\"click\", handleClickRef.current);\n };\n }, [ownerDocument, handlePointerDownOutside]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: () => isPointerInsideReactTreeRef.current = true\n };\n}\nfunction useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {\n const handleFocusOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onFocusOutside);\n const isFocusInsideReactTreeRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const handleFocus = (event) => {\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = { originalEvent: event };\n handleAndDispatchCustomEvent(FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener(\"focusin\", handleFocus);\n return () => ownerDocument.removeEventListener(\"focusin\", handleFocus);\n }, [ownerDocument, handleFocusOutside]);\n return {\n onFocusCapture: () => isFocusInsideReactTreeRef.current = true,\n onBlurCapture: () => isFocusInsideReactTreeRef.current = false\n };\n}\nfunction dispatchUpdate() {\n const event = new CustomEvent(CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, { bubbles: false, cancelable: true, detail });\n if (handler) target.addEventListener(name, handler, { once: true });\n if (discrete) {\n (0,_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.dispatchDiscreteCustomEvent)(target, event);\n } else {\n target.dispatchEvent(event);\n }\n}\nvar Root = DismissableLayer;\nvar Branch = DismissableLayerBranch;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs?");
|
|
3278
|
+
|
|
3279
|
+
/***/ }),
|
|
3280
|
+
|
|
3281
|
+
/***/ "../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs":
|
|
3282
|
+
/*!***************************************************************************************************************!*\
|
|
3283
|
+
!*** ../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs ***!
|
|
3284
|
+
\***************************************************************************************************************/
|
|
3285
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3286
|
+
|
|
3287
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Primitive: () => (/* binding */ Primitive),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ dispatchDiscreteCustomEvent: () => (/* binding */ dispatchDiscreteCustomEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/primitive/src/Primitive.tsx\n\n\n\n\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-primitive/dist/index.mjs?");
|
|
3288
|
+
|
|
3289
|
+
/***/ }),
|
|
3290
|
+
|
|
3291
|
+
/***/ "../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs":
|
|
3292
|
+
/*!**********************************************************************************************************!*\
|
|
3293
|
+
!*** ../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs ***!
|
|
3294
|
+
\**********************************************************************************************************/
|
|
3295
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3296
|
+
|
|
3297
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Slot: () => (/* binding */ Slot),\n/* harmony export */ Slottable: () => (/* binding */ Slottable)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/slot/src/Slot.tsx\n\n\n\nvar Slot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null);\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, childrenRef) : childrenRef\n });\n }\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children });\n};\nfunction isSlottable(child) {\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
3298
|
+
|
|
3299
|
+
/***/ }),
|
|
3300
|
+
|
|
3301
|
+
/***/ "../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs":
|
|
3302
|
+
/*!********************************************************************!*\
|
|
3303
|
+
!*** ../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs ***!
|
|
3304
|
+
\********************************************************************/
|
|
3305
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3306
|
+
|
|
3307
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Arrow: () => (/* binding */ Arrow2),\n/* harmony export */ CheckboxItem: () => (/* binding */ CheckboxItem2),\n/* harmony export */ Content: () => (/* binding */ Content2),\n/* harmony export */ DropdownMenu: () => (/* binding */ DropdownMenu),\n/* harmony export */ DropdownMenuArrow: () => (/* binding */ DropdownMenuArrow),\n/* harmony export */ DropdownMenuCheckboxItem: () => (/* binding */ DropdownMenuCheckboxItem),\n/* harmony export */ DropdownMenuContent: () => (/* binding */ DropdownMenuContent),\n/* harmony export */ DropdownMenuGroup: () => (/* binding */ DropdownMenuGroup),\n/* harmony export */ DropdownMenuItem: () => (/* binding */ DropdownMenuItem),\n/* harmony export */ DropdownMenuItemIndicator: () => (/* binding */ DropdownMenuItemIndicator),\n/* harmony export */ DropdownMenuLabel: () => (/* binding */ DropdownMenuLabel),\n/* harmony export */ DropdownMenuPortal: () => (/* binding */ DropdownMenuPortal),\n/* harmony export */ DropdownMenuRadioGroup: () => (/* binding */ DropdownMenuRadioGroup),\n/* harmony export */ DropdownMenuRadioItem: () => (/* binding */ DropdownMenuRadioItem),\n/* harmony export */ DropdownMenuSeparator: () => (/* binding */ DropdownMenuSeparator),\n/* harmony export */ DropdownMenuSub: () => (/* binding */ DropdownMenuSub),\n/* harmony export */ DropdownMenuSubContent: () => (/* binding */ DropdownMenuSubContent),\n/* harmony export */ DropdownMenuSubTrigger: () => (/* binding */ DropdownMenuSubTrigger),\n/* harmony export */ DropdownMenuTrigger: () => (/* binding */ DropdownMenuTrigger),\n/* harmony export */ Group: () => (/* binding */ Group2),\n/* harmony export */ Item: () => (/* binding */ Item2),\n/* harmony export */ ItemIndicator: () => (/* binding */ ItemIndicator2),\n/* harmony export */ Label: () => (/* binding */ Label2),\n/* harmony export */ Portal: () => (/* binding */ Portal2),\n/* harmony export */ RadioGroup: () => (/* binding */ RadioGroup2),\n/* harmony export */ RadioItem: () => (/* binding */ RadioItem2),\n/* harmony export */ Root: () => (/* binding */ Root2),\n/* harmony export */ Separator: () => (/* binding */ Separator2),\n/* harmony export */ Sub: () => (/* binding */ Sub2),\n/* harmony export */ SubContent: () => (/* binding */ SubContent2),\n/* harmony export */ SubTrigger: () => (/* binding */ SubTrigger2),\n/* harmony export */ Trigger: () => (/* binding */ Trigger),\n/* harmony export */ createDropdownMenuScope: () => (/* binding */ createDropdownMenuScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-menu */ \"../node_modules/@radix-ui/react-menu/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-id */ \"../node_modules/@radix-ui/react-id/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\"use client\";\n\n// packages/react/dropdown-menu/src/DropdownMenu.tsx\n\n\n\n\n\n\n\n\n\n\nvar DROPDOWN_MENU_NAME = \"DropdownMenu\";\nvar [createDropdownMenuContext, createDropdownMenuScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)(\n DROPDOWN_MENU_NAME,\n [_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.createMenuScope]\n);\nvar useMenuScope = (0,_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.createMenuScope)();\nvar [DropdownMenuProvider, useDropdownMenuContext] = createDropdownMenuContext(DROPDOWN_MENU_NAME);\nvar DropdownMenu = (props) => {\n const {\n __scopeDropdownMenu,\n children,\n dir,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = true\n } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const triggerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const [open = false, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n DropdownMenuProvider,\n {\n scope: __scopeDropdownMenu,\n triggerId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__.useId)(),\n triggerRef,\n contentId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__.useId)(),\n open,\n onOpenChange: setOpen,\n onOpenToggle: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n modal,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Root, { ...menuScope, open, onOpenChange: setOpen, dir, modal, children })\n }\n );\n};\nDropdownMenu.displayName = DROPDOWN_MENU_NAME;\nvar TRIGGER_NAME = \"DropdownMenuTrigger\";\nvar DropdownMenuTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, disabled = false, ...triggerProps } = props;\n const context = useDropdownMenuContext(TRIGGER_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Anchor, { asChild: true, ...menuScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_6__.Primitive.button,\n {\n type: \"button\",\n id: context.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.open ? context.contentId : void 0,\n \"data-state\": context.open ? \"open\" : \"closed\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n ...triggerProps,\n ref: (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_7__.composeRefs)(forwardedRef, context.triggerRef),\n onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onPointerDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onOpenToggle();\n if (!context.open) event.preventDefault();\n }\n }),\n onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onKeyDown, (event) => {\n if (disabled) return;\n if ([\"Enter\", \" \"].includes(event.key)) context.onOpenToggle();\n if (event.key === \"ArrowDown\") context.onOpenChange(true);\n if ([\"Enter\", \" \", \"ArrowDown\"].includes(event.key)) event.preventDefault();\n })\n }\n ) });\n }\n);\nDropdownMenuTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"DropdownMenuPortal\";\nvar DropdownMenuPortal = (props) => {\n const { __scopeDropdownMenu, ...portalProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Portal, { ...menuScope, ...portalProps });\n};\nDropdownMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"DropdownMenuContent\";\nvar DropdownMenuContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...contentProps } = props;\n const context = useDropdownMenuContext(CONTENT_NAME, __scopeDropdownMenu);\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const hasInteractedOutsideRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Content,\n {\n id: context.contentId,\n \"aria-labelledby\": context.triggerId,\n ...menuScope,\n ...contentProps,\n ref: forwardedRef,\n onCloseAutoFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onCloseAutoFocus, (event) => {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n hasInteractedOutsideRef.current = false;\n event.preventDefault();\n }),\n onInteractOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onInteractOutside, (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n if (!context.modal || isRightClick) hasInteractedOutsideRef.current = true;\n }),\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n }\n);\nDropdownMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"DropdownMenuGroup\";\nvar DropdownMenuGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...groupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Group, { ...menuScope, ...groupProps, ref: forwardedRef });\n }\n);\nDropdownMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"DropdownMenuLabel\";\nvar DropdownMenuLabel = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...labelProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Label, { ...menuScope, ...labelProps, ref: forwardedRef });\n }\n);\nDropdownMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"DropdownMenuItem\";\nvar DropdownMenuItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Item, { ...menuScope, ...itemProps, ref: forwardedRef });\n }\n);\nDropdownMenuItem.displayName = ITEM_NAME;\nvar CHECKBOX_ITEM_NAME = \"DropdownMenuCheckboxItem\";\nvar DropdownMenuCheckboxItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...checkboxItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.CheckboxItem, { ...menuScope, ...checkboxItemProps, ref: forwardedRef });\n});\nDropdownMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"DropdownMenuRadioGroup\";\nvar DropdownMenuRadioGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioGroupProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.RadioGroup, { ...menuScope, ...radioGroupProps, ref: forwardedRef });\n});\nDropdownMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"DropdownMenuRadioItem\";\nvar DropdownMenuRadioItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...radioItemProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.RadioItem, { ...menuScope, ...radioItemProps, ref: forwardedRef });\n});\nDropdownMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar INDICATOR_NAME = \"DropdownMenuItemIndicator\";\nvar DropdownMenuItemIndicator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...itemIndicatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.ItemIndicator, { ...menuScope, ...itemIndicatorProps, ref: forwardedRef });\n});\nDropdownMenuItemIndicator.displayName = INDICATOR_NAME;\nvar SEPARATOR_NAME = \"DropdownMenuSeparator\";\nvar DropdownMenuSeparator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...separatorProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Separator, { ...menuScope, ...separatorProps, ref: forwardedRef });\n});\nDropdownMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"DropdownMenuArrow\";\nvar DropdownMenuArrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeDropdownMenu, ...arrowProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Arrow, { ...menuScope, ...arrowProps, ref: forwardedRef });\n }\n);\nDropdownMenuArrow.displayName = ARROW_NAME;\nvar DropdownMenuSub = (props) => {\n const { __scopeDropdownMenu, children, open: openProp, onOpenChange, defaultOpen } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n const [open = false, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.Sub, { ...menuScope, open, onOpenChange: setOpen, children });\n};\nvar SUB_TRIGGER_NAME = \"DropdownMenuSubTrigger\";\nvar DropdownMenuSubTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subTriggerProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.SubTrigger, { ...menuScope, ...subTriggerProps, ref: forwardedRef });\n});\nDropdownMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"DropdownMenuSubContent\";\nvar DropdownMenuSubContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { __scopeDropdownMenu, ...subContentProps } = props;\n const menuScope = useMenuScope(__scopeDropdownMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_menu__WEBPACK_IMPORTED_MODULE_3__.SubContent,\n {\n ...menuScope,\n ...subContentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-dropdown-menu-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-dropdown-menu-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-dropdown-menu-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-dropdown-menu-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-dropdown-menu-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n );\n});\nDropdownMenuSubContent.displayName = SUB_CONTENT_NAME;\nvar Root2 = DropdownMenu;\nvar Trigger = DropdownMenuTrigger;\nvar Portal2 = DropdownMenuPortal;\nvar Content2 = DropdownMenuContent;\nvar Group2 = DropdownMenuGroup;\nvar Label2 = DropdownMenuLabel;\nvar Item2 = DropdownMenuItem;\nvar CheckboxItem2 = DropdownMenuCheckboxItem;\nvar RadioGroup2 = DropdownMenuRadioGroup;\nvar RadioItem2 = DropdownMenuRadioItem;\nvar ItemIndicator2 = DropdownMenuItemIndicator;\nvar Separator2 = DropdownMenuSeparator;\nvar Arrow2 = DropdownMenuArrow;\nvar Sub2 = DropdownMenuSub;\nvar SubTrigger2 = DropdownMenuSubTrigger;\nvar SubContent2 = DropdownMenuSubContent;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs?");
|
|
3308
|
+
|
|
3309
|
+
/***/ }),
|
|
3310
|
+
|
|
3311
|
+
/***/ "../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-context/dist/index.mjs":
|
|
3312
|
+
/*!*********************************************************************************************************!*\
|
|
3313
|
+
!*** ../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-context/dist/index.mjs ***!
|
|
3314
|
+
\*********************************************************************************************************/
|
|
3315
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3316
|
+
|
|
3317
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createContext: () => (/* binding */ createContext2),\n/* harmony export */ createContextScope: () => (/* binding */ createContextScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/context/src/createContext.tsx\n\n\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-context/dist/index.mjs?");
|
|
3318
|
+
|
|
3319
|
+
/***/ }),
|
|
3320
|
+
|
|
3321
|
+
/***/ "../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.mjs":
|
|
3322
|
+
/*!***********************************************************************************************************!*\
|
|
3323
|
+
!*** ../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.mjs ***!
|
|
3324
|
+
\***********************************************************************************************************/
|
|
3325
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3326
|
+
|
|
3327
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Primitive: () => (/* binding */ Primitive),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ dispatchDiscreteCustomEvent: () => (/* binding */ dispatchDiscreteCustomEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/primitive/src/Primitive.tsx\n\n\n\n\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-primitive/dist/index.mjs?");
|
|
3328
|
+
|
|
3329
|
+
/***/ }),
|
|
3330
|
+
|
|
3331
|
+
/***/ "../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot/dist/index.mjs":
|
|
3332
|
+
/*!******************************************************************************************************!*\
|
|
3333
|
+
!*** ../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot/dist/index.mjs ***!
|
|
3334
|
+
\******************************************************************************************************/
|
|
3335
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3336
|
+
|
|
3337
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Slot: () => (/* binding */ Slot),\n/* harmony export */ Slottable: () => (/* binding */ Slottable)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/slot/src/Slot.tsx\n\n\n\nvar Slot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null);\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, childrenRef) : childrenRef\n });\n }\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children });\n};\nfunction isSlottable(child) {\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
3338
|
+
|
|
3339
|
+
/***/ }),
|
|
3340
|
+
|
|
3341
|
+
/***/ "../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs":
|
|
3342
|
+
/*!************************************************************************************************************************!*\
|
|
3343
|
+
!*** ../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs ***!
|
|
3344
|
+
\************************************************************************************************************************/
|
|
3345
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3346
|
+
|
|
3347
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useControllableState: () => (/* binding */ useControllableState)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n// packages/react/use-controllable-state/src/useControllableState.tsx\n\n\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n const setValue = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = react__WEBPACK_IMPORTED_MODULE_0__.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(value);\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-dropdown-menu/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs?");
|
|
3008
3348
|
|
|
3009
3349
|
/***/ }),
|
|
3010
3350
|
|
|
@@ -3014,7 +3354,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3014
3354
|
\*******************************************************************/
|
|
3015
3355
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3016
3356
|
|
|
3017
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FocusGuards: () => (/* binding */
|
|
3357
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FocusGuards: () => (/* binding */ FocusGuards),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ useFocusGuards: () => (/* binding */ useFocusGuards)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\"use client\";\n\n// packages/react/focus-guards/src/FocusGuards.tsx\n\nvar count = 0;\nfunction FocusGuards(props) {\n useFocusGuards();\n return props.children;\n}\nfunction useFocusGuards() {\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const edgeGuards = document.querySelectorAll(\"[data-radix-focus-guard]\");\n document.body.insertAdjacentElement(\"afterbegin\", edgeGuards[0] ?? createFocusGuard());\n document.body.insertAdjacentElement(\"beforeend\", edgeGuards[1] ?? createFocusGuard());\n count++;\n return () => {\n if (count === 1) {\n document.querySelectorAll(\"[data-radix-focus-guard]\").forEach((node) => node.remove());\n }\n count--;\n };\n }, []);\n}\nfunction createFocusGuard() {\n const element = document.createElement(\"span\");\n element.setAttribute(\"data-radix-focus-guard\", \"\");\n element.tabIndex = 0;\n element.style.outline = \"none\";\n element.style.opacity = \"0\";\n element.style.position = \"fixed\";\n element.style.pointerEvents = \"none\";\n return element;\n}\nvar Root = FocusGuards;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-focus-guards/dist/index.mjs?");
|
|
3018
3358
|
|
|
3019
3359
|
/***/ }),
|
|
3020
3360
|
|
|
@@ -3024,7 +3364,27 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3024
3364
|
\******************************************************************/
|
|
3025
3365
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3026
3366
|
|
|
3027
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FocusScope: () => (/* binding */ $d3863c46a17e8a28$export$20e40289641fbbb6),\n/* harmony export */ Root: () => (/* binding */ $d3863c46a17e8a28$export$be92b6f5f03c0fe9)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\nconst $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';\nconst $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';\nconst $d3863c46a17e8a28$var$EVENT_OPTIONS = {\n bubbles: false,\n cancelable: true\n};\n/* -------------------------------------------------------------------------------------------------\n * FocusScope\n * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME = 'FocusScope';\nconst $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;\n const [container1, setContainer] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const onMountAutoFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_2__.useCallbackRef)(onMountAutoFocusProp);\n const onUnmountAutoFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_2__.useCallbackRef)(onUnmountAutoFocusProp);\n const lastFocusedElementRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, (node)=>setContainer(node)\n );\n const focusScope = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({\n paused: false,\n pause () {\n this.paused = true;\n },\n resume () {\n this.paused = false;\n }\n }).current; // Takes care of trapping focus if focus is moved outside programmatically for example\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (trapped) {\n function handleFocusIn(event) {\n if (focusScope.paused || !container1) return;\n const target = event.target;\n if (container1.contains(target)) lastFocusedElementRef.current = target;\n else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {\n select: true\n });\n }\n function handleFocusOut(event) {\n if (focusScope.paused || !container1) return;\n const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n //\n // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n // 2. In Google Chrome, when the focused element is removed from the DOM.\n //\n // We let the browser do its thing here because:\n //\n // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n // throws the CPU to 100%, so we avoid doing anything for this reason here too.\n if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n // that is outside the container, we move focus to the last valid focused element inside.\n if (!container1.contains(relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {\n select: true\n });\n } // When the focused element gets removed from the DOM, browsers move focus\n // back to the document.body. In this case, we move focus to the container\n // to keep focus trapped correctly.\n function handleMutations(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations)if (mutation.removedNodes.length > 0) $d3863c46a17e8a28$var$focus(container1);\n }\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container1) mutationObserver.observe(container1, {\n childList: true,\n subtree: true\n });\n return ()=>{\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n mutationObserver.disconnect();\n };\n }\n }, [\n trapped,\n container1,\n focusScope.paused\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (container1) {\n $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container1.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);\n container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container1.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {\n select: true\n });\n if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);\n }\n }\n return ()=>{\n container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.\n // We need to delay the focus a little to get around it for now.\n // See: https://github.com/facebook/react/issues/17894\n setTimeout(()=>{\n const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);\n container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container1.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {\n select: true\n });\n // we need to remove the listener after we `dispatchEvent`\n container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [\n container1,\n onMountAutoFocus,\n onUnmountAutoFocus,\n focusScope\n ]); // Takes care of looping focus (when tabbing whilst at the edges)\n const handleKeyDown = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((event)=>{\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container = event.currentTarget;\n const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);\n const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges\n if (!hasTabbableElementsInside) {\n if (focusedElement === container) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) $d3863c46a17e8a28$var$focus(first, {\n select: true\n });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) $d3863c46a17e8a28$var$focus(last, {\n select: true\n });\n }\n }\n }\n }, [\n loop,\n trapped,\n focusScope.paused\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n tabIndex: -1\n }, scopeProps, {\n ref: composedRefs,\n onKeyDown: handleKeyDown\n }));\n});\n/*#__PURE__*/ Object.assign($d3863c46a17e8a28$export$20e40289641fbbb6, {\n displayName: $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/ /**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates){\n $d3863c46a17e8a28$var$focus(candidate, {\n select: select\n });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\n/**\n * Returns the first and last tabbable elements inside a container.\n */ function $d3863c46a17e8a28$var$getTabbableEdges(container) {\n const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);\n const first = $d3863c46a17e8a28$var$findVisible(candidates, container);\n const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);\n return [\n first,\n last\n ];\n}\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node)=>{\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */ function $d3863c46a17e8a28$var$findVisible(elements, container) {\n for (const element of elements){\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!$d3863c46a17e8a28$var$isHidden(element, {\n upTo: container\n })) return element;\n }\n}\nfunction $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) {\n if (getComputedStyle(node).visibility === 'hidden') return true;\n while(node){\n // we stop at `upTo` (excluding it)\n if (upTo !== undefined && node === upTo) return false;\n if (getComputedStyle(node).display === 'none') return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction $d3863c46a17e8a28$var$isSelectableInput(element) {\n return element instanceof HTMLInputElement && 'select' in element;\n}\nfunction $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) {\n // only focus if that element is focusable\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n element.focus({\n preventScroll: true\n }); // only select if its not the same element, it supports selection and we need to select\n if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();\n }\n}\n/* -------------------------------------------------------------------------------------------------\n * FocusScope stack\n * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();\nfunction $d3863c46a17e8a28$var$createFocusScopesStack() {\n /** A stack of focus scopes, with the active one at the top */ let stack = [];\n return {\n add (focusScope) {\n // pause the currently active focus scope (at the top of the stack)\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();\n // remove in case it already exists (because we'll re-add it at the top of the stack)\n stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove (focusScope) {\n var _stack$;\n stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);\n (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();\n }\n };\n}\nfunction $d3863c46a17e8a28$var$arrayRemove(array, item) {\n const updatedArray = [\n ...array\n ];\n const index = updatedArray.indexOf(item);\n if (index !== -1) updatedArray.splice(index, 1);\n return updatedArray;\n}\nfunction $d3863c46a17e8a28$var$removeLinks(items) {\n return items.filter((item)=>item.tagName !== 'A'\n );\n}\nconst $d3863c46a17e8a28$export$be92b6f5f03c0fe9 = $d3863c46a17e8a28$export$20e40289641fbbb6;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-focus-scope/dist/index.mjs?");
|
|
3367
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FocusScope: () => (/* binding */ FocusScope),\n/* harmony export */ Root: () => (/* binding */ Root)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\"use client\";\n\n// packages/react/focus-scope/src/FocusScope.tsx\n\n\n\n\n\nvar AUTOFOCUS_ON_MOUNT = \"focusScope.autoFocusOnMount\";\nvar AUTOFOCUS_ON_UNMOUNT = \"focusScope.autoFocusOnUnmount\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar FOCUS_SCOPE_NAME = \"FocusScope\";\nvar FocusScope = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const {\n loop = false,\n trapped = false,\n onMountAutoFocus: onMountAutoFocusProp,\n onUnmountAutoFocus: onUnmountAutoFocusProp,\n ...scopeProps\n } = props;\n const [container, setContainer] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);\n const onMountAutoFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_2__.useCallbackRef)(onMountAutoFocusProp);\n const onUnmountAutoFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_2__.useCallbackRef)(onUnmountAutoFocusProp);\n const lastFocusedElementRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, (node) => setContainer(node));\n const focusScope = react__WEBPACK_IMPORTED_MODULE_0__.useRef({\n paused: false,\n pause() {\n this.paused = true;\n },\n resume() {\n this.paused = false;\n }\n }).current;\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (trapped) {\n let handleFocusIn2 = function(event) {\n if (focusScope.paused || !container) return;\n const target = event.target;\n if (container.contains(target)) {\n lastFocusedElementRef.current = target;\n } else {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleFocusOut2 = function(event) {\n if (focusScope.paused || !container) return;\n const relatedTarget = event.relatedTarget;\n if (relatedTarget === null) return;\n if (!container.contains(relatedTarget)) {\n focus(lastFocusedElementRef.current, { select: true });\n }\n }, handleMutations2 = function(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations) {\n if (mutation.removedNodes.length > 0) focus(container);\n }\n };\n var handleFocusIn = handleFocusIn2, handleFocusOut = handleFocusOut2, handleMutations = handleMutations2;\n document.addEventListener(\"focusin\", handleFocusIn2);\n document.addEventListener(\"focusout\", handleFocusOut2);\n const mutationObserver = new MutationObserver(handleMutations2);\n if (container) mutationObserver.observe(container, { childList: true, subtree: true });\n return () => {\n document.removeEventListener(\"focusin\", handleFocusIn2);\n document.removeEventListener(\"focusout\", handleFocusOut2);\n mutationObserver.disconnect();\n };\n }\n }, [trapped, container, focusScope.paused]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (container) {\n focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent(AUTOFOCUS_ON_MOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n focusFirst(removeLinks(getTabbableCandidates(container)), { select: true });\n if (document.activeElement === previouslyFocusedElement) {\n focus(container);\n }\n }\n }\n return () => {\n container.removeEventListener(AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n setTimeout(() => {\n const unmountEvent = new CustomEvent(AUTOFOCUS_ON_UNMOUNT, EVENT_OPTIONS);\n container.addEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) {\n focus(previouslyFocusedElement ?? document.body, { select: true });\n }\n container.removeEventListener(AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [container, onMountAutoFocus, onUnmountAutoFocus, focusScope]);\n const handleKeyDown = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n (event) => {\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === \"Tab\" && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container2 = event.currentTarget;\n const [first, last] = getTabbableEdges(container2);\n const hasTabbableElementsInside = first && last;\n if (!hasTabbableElementsInside) {\n if (focusedElement === container2) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) focus(first, { select: true });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) focus(last, { select: true });\n }\n }\n }\n },\n [loop, trapped, focusScope.paused]\n );\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, { tabIndex: -1, ...scopeProps, ref: composedRefs, onKeyDown: handleKeyDown });\n});\nFocusScope.displayName = FOCUS_SCOPE_NAME;\nfunction focusFirst(candidates, { select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates) {\n focus(candidate, { select });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\nfunction getTabbableEdges(container) {\n const candidates = getTabbableCandidates(container);\n const first = findVisible(candidates, container);\n const last = findVisible(candidates.reverse(), container);\n return [first, last];\n}\nfunction getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node) => {\n const isHiddenInput = node.tagName === \"INPUT\" && node.type === \"hidden\";\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP;\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while (walker.nextNode()) nodes.push(walker.currentNode);\n return nodes;\n}\nfunction findVisible(elements, container) {\n for (const element of elements) {\n if (!isHidden(element, { upTo: container })) return element;\n }\n}\nfunction isHidden(node, { upTo }) {\n if (getComputedStyle(node).visibility === \"hidden\") return true;\n while (node) {\n if (upTo !== void 0 && node === upTo) return false;\n if (getComputedStyle(node).display === \"none\") return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction isSelectableInput(element) {\n return element instanceof HTMLInputElement && \"select\" in element;\n}\nfunction focus(element, { select = false } = {}) {\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement;\n element.focus({ preventScroll: true });\n if (element !== previouslyFocusedElement && isSelectableInput(element) && select)\n element.select();\n }\n}\nvar focusScopesStack = createFocusScopesStack();\nfunction createFocusScopesStack() {\n let stack = [];\n return {\n add(focusScope) {\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) {\n activeFocusScope?.pause();\n }\n stack = arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove(focusScope) {\n stack = arrayRemove(stack, focusScope);\n stack[0]?.resume();\n }\n };\n}\nfunction arrayRemove(array, item) {\n const updatedArray = [...array];\n const index = updatedArray.indexOf(item);\n if (index !== -1) {\n updatedArray.splice(index, 1);\n }\n return updatedArray;\n}\nfunction removeLinks(items) {\n return items.filter((item) => item.tagName !== \"A\");\n}\nvar Root = FocusScope;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-focus-scope/dist/index.mjs?");
|
|
3368
|
+
|
|
3369
|
+
/***/ }),
|
|
3370
|
+
|
|
3371
|
+
/***/ "../node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs":
|
|
3372
|
+
/*!*********************************************************************************************************!*\
|
|
3373
|
+
!*** ../node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs ***!
|
|
3374
|
+
\*********************************************************************************************************/
|
|
3375
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3376
|
+
|
|
3377
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Primitive: () => (/* binding */ Primitive),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ dispatchDiscreteCustomEvent: () => (/* binding */ dispatchDiscreteCustomEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/primitive/src/Primitive.tsx\n\n\n\n\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-primitive/dist/index.mjs?");
|
|
3378
|
+
|
|
3379
|
+
/***/ }),
|
|
3380
|
+
|
|
3381
|
+
/***/ "../node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot/dist/index.mjs":
|
|
3382
|
+
/*!****************************************************************************************************!*\
|
|
3383
|
+
!*** ../node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot/dist/index.mjs ***!
|
|
3384
|
+
\****************************************************************************************************/
|
|
3385
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3386
|
+
|
|
3387
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Slot: () => (/* binding */ Slot),\n/* harmony export */ Slottable: () => (/* binding */ Slottable)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/slot/src/Slot.tsx\n\n\n\nvar Slot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null);\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, childrenRef) : childrenRef\n });\n }\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children });\n};\nfunction isSlottable(child) {\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-focus-scope/node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
3028
3388
|
|
|
3029
3389
|
/***/ }),
|
|
3030
3390
|
|
|
@@ -3034,7 +3394,97 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3034
3394
|
\*********************************************************/
|
|
3035
3395
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3036
3396
|
|
|
3037
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useId: () => (/* binding */
|
|
3397
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useId: () => (/* binding */ useId)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n// packages/react/id/src/id.tsx\n\n\nvar useReactId = react__WEBPACK_IMPORTED_MODULE_0__[\"useId\".toString()] || (() => void 0);\nvar count = 0;\nfunction useId(deterministicId) {\n const [id, setId] = react__WEBPACK_IMPORTED_MODULE_0__.useState(useReactId());\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(() => {\n if (!deterministicId) setId((reactId) => reactId ?? String(count++));\n }, [deterministicId]);\n return deterministicId || (id ? `radix-${id}` : \"\");\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-id/dist/index.mjs?");
|
|
3398
|
+
|
|
3399
|
+
/***/ }),
|
|
3400
|
+
|
|
3401
|
+
/***/ "../node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs":
|
|
3402
|
+
/*!********************************************************************************************************!*\
|
|
3403
|
+
!*** ../node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs ***!
|
|
3404
|
+
\********************************************************************************************************/
|
|
3405
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3406
|
+
|
|
3407
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLayoutEffect: () => (/* binding */ useLayoutEffect2)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n// packages/react/use-layout-effect/src/useLayoutEffect.tsx\n\nvar useLayoutEffect2 = Boolean(globalThis?.document) ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : () => {\n};\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-id/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs?");
|
|
3408
|
+
|
|
3409
|
+
/***/ }),
|
|
3410
|
+
|
|
3411
|
+
/***/ "../node_modules/@radix-ui/react-menu/dist/index.mjs":
|
|
3412
|
+
/*!***********************************************************!*\
|
|
3413
|
+
!*** ../node_modules/@radix-ui/react-menu/dist/index.mjs ***!
|
|
3414
|
+
\***********************************************************/
|
|
3415
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3416
|
+
|
|
3417
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Anchor: () => (/* binding */ Anchor2),\n/* harmony export */ Arrow: () => (/* binding */ Arrow2),\n/* harmony export */ CheckboxItem: () => (/* binding */ CheckboxItem),\n/* harmony export */ Content: () => (/* binding */ Content2),\n/* harmony export */ Group: () => (/* binding */ Group),\n/* harmony export */ Item: () => (/* binding */ Item2),\n/* harmony export */ ItemIndicator: () => (/* binding */ ItemIndicator),\n/* harmony export */ Label: () => (/* binding */ Label),\n/* harmony export */ Menu: () => (/* binding */ Menu),\n/* harmony export */ MenuAnchor: () => (/* binding */ MenuAnchor),\n/* harmony export */ MenuArrow: () => (/* binding */ MenuArrow),\n/* harmony export */ MenuCheckboxItem: () => (/* binding */ MenuCheckboxItem),\n/* harmony export */ MenuContent: () => (/* binding */ MenuContent),\n/* harmony export */ MenuGroup: () => (/* binding */ MenuGroup),\n/* harmony export */ MenuItem: () => (/* binding */ MenuItem),\n/* harmony export */ MenuItemIndicator: () => (/* binding */ MenuItemIndicator),\n/* harmony export */ MenuLabel: () => (/* binding */ MenuLabel),\n/* harmony export */ MenuPortal: () => (/* binding */ MenuPortal),\n/* harmony export */ MenuRadioGroup: () => (/* binding */ MenuRadioGroup),\n/* harmony export */ MenuRadioItem: () => (/* binding */ MenuRadioItem),\n/* harmony export */ MenuSeparator: () => (/* binding */ MenuSeparator),\n/* harmony export */ MenuSub: () => (/* binding */ MenuSub),\n/* harmony export */ MenuSubContent: () => (/* binding */ MenuSubContent),\n/* harmony export */ MenuSubTrigger: () => (/* binding */ MenuSubTrigger),\n/* harmony export */ Portal: () => (/* binding */ Portal),\n/* harmony export */ RadioGroup: () => (/* binding */ RadioGroup),\n/* harmony export */ RadioItem: () => (/* binding */ RadioItem),\n/* harmony export */ Root: () => (/* binding */ Root3),\n/* harmony export */ Separator: () => (/* binding */ Separator),\n/* harmony export */ Sub: () => (/* binding */ Sub),\n/* harmony export */ SubContent: () => (/* binding */ SubContent),\n/* harmony export */ SubTrigger: () => (/* binding */ SubTrigger),\n/* harmony export */ createMenuScope: () => (/* binding */ createMenuScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-collection */ \"../node_modules/@radix-ui/react-collection/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-direction */ \"../node_modules/@radix-ui/react-direction/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ \"../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @radix-ui/react-focus-guards */ \"../node_modules/@radix-ui/react-focus-guards/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @radix-ui/react-focus-scope */ \"../node_modules/@radix-ui/react-focus-scope/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @radix-ui/react-id */ \"../node_modules/@radix-ui/react-id/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-popper */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-portal */ \"../node_modules/@radix-ui/react-portal/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-presence */ \"../node_modules/@radix-ui/react-presence/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-roving-focus */ \"../node_modules/@radix-ui/react-roving-focus/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var aria_hidden__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! aria-hidden */ \"../node_modules/aria-hidden/dist/es2015/index.js\");\n/* harmony import */ var react_remove_scroll__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react-remove-scroll */ \"../node_modules/react-remove-scroll/dist/es2015/Combination.js\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\"use client\";\n\n// packages/react/menu/src/Menu.tsx\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SELECTION_KEYS = [\"Enter\", \" \"];\nvar FIRST_KEYS = [\"ArrowDown\", \"PageUp\", \"Home\"];\nvar LAST_KEYS = [\"ArrowUp\", \"PageDown\", \"End\"];\nvar FIRST_LAST_KEYS = [...FIRST_KEYS, ...LAST_KEYS];\nvar SUB_OPEN_KEYS = {\n ltr: [...SELECTION_KEYS, \"ArrowRight\"],\n rtl: [...SELECTION_KEYS, \"ArrowLeft\"]\n};\nvar SUB_CLOSE_KEYS = {\n ltr: [\"ArrowLeft\"],\n rtl: [\"ArrowRight\"]\n};\nvar MENU_NAME = \"Menu\";\nvar [Collection, useCollection, createCollectionScope] = (0,_radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__.createCollection)(MENU_NAME);\nvar [createMenuContext, createMenuScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__.createContextScope)(MENU_NAME, [\n createCollectionScope,\n _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_4__.createPopperScope,\n _radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_5__.createRovingFocusGroupScope\n]);\nvar usePopperScope = (0,_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_4__.createPopperScope)();\nvar useRovingFocusGroupScope = (0,_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_5__.createRovingFocusGroupScope)();\nvar [MenuProvider, useMenuContext] = createMenuContext(MENU_NAME);\nvar [MenuRootProvider, useMenuRootContext] = createMenuContext(MENU_NAME);\nvar Menu = (props) => {\n const { __scopeMenu, open = false, children, dir, onOpenChange, modal = true } = props;\n const popperScope = usePopperScope(__scopeMenu);\n const [content, setContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);\n const isUsingKeyboardRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n const handleOpenChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onOpenChange);\n const direction = (0,_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_7__.useDirection)(dir);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const handleKeyDown = () => {\n isUsingKeyboardRef.current = true;\n document.addEventListener(\"pointerdown\", handlePointer, { capture: true, once: true });\n document.addEventListener(\"pointermove\", handlePointer, { capture: true, once: true });\n };\n const handlePointer = () => isUsingKeyboardRef.current = false;\n document.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => {\n document.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n document.removeEventListener(\"pointerdown\", handlePointer, { capture: true });\n document.removeEventListener(\"pointermove\", handlePointer, { capture: true });\n };\n }, []);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_4__.Root, { ...popperScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuRootProvider,\n {\n scope: __scopeMenu,\n onClose: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => handleOpenChange(false), [handleOpenChange]),\n isUsingKeyboardRef,\n dir: direction,\n modal,\n children\n }\n )\n }\n ) });\n};\nMenu.displayName = MENU_NAME;\nvar ANCHOR_NAME = \"MenuAnchor\";\nvar MenuAnchor = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...anchorProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_4__.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nMenuAnchor.displayName = ANCHOR_NAME;\nvar PORTAL_NAME = \"MenuPortal\";\nvar [PortalProvider, usePortalContext] = createMenuContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar MenuPortal = (props) => {\n const { __scopeMenu, forceMount, children, container } = props;\n const context = useMenuContext(PORTAL_NAME, __scopeMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(PortalProvider, { scope: __scopeMenu, forceMount, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_9__.Portal, { asChild: true, container, children }) }) });\n};\nMenuPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"MenuContent\";\nvar [MenuContentProvider, useMenuContentContext] = createMenuContext(CONTENT_NAME);\nvar MenuContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Collection.Slot, { scope: props.__scopeMenu, children: rootContext.modal ? /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MenuRootContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MenuRootContentNonModal, { ...contentProps, ref: forwardedRef }) }) }) });\n }\n);\nvar MenuRootContentModal = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_10__.useComposedRefs)(forwardedRef, ref);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const content = ref.current;\n if (content) return (0,aria_hidden__WEBPACK_IMPORTED_MODULE_11__.hideOthers)(content);\n }, []);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: context.open,\n disableOutsideScroll: true,\n onFocusOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n ),\n onDismiss: () => context.onOpenChange(false)\n }\n );\n }\n);\nvar MenuRootContentNonModal = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n onDismiss: () => context.onOpenChange(false)\n }\n );\n});\nvar MenuContentImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeMenu,\n loop = false,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEntryFocus,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n disableOutsideScroll,\n ...contentProps\n } = props;\n const context = useMenuContext(CONTENT_NAME, __scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const getItems = useCollection(__scopeMenu);\n const [currentItemId, setCurrentItemId] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);\n const contentRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_10__.useComposedRefs)(forwardedRef, contentRef, context.onContentChange);\n const timerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0);\n const searchRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(\"\");\n const pointerGraceTimerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0);\n const pointerGraceIntentRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const pointerDirRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(\"right\");\n const lastPointerXRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(0);\n const ScrollLockWrapper = disableOutsideScroll ? react_remove_scroll__WEBPACK_IMPORTED_MODULE_13__[\"default\"] : react__WEBPACK_IMPORTED_MODULE_0__.Fragment;\n const scrollLockWrapperProps = disableOutsideScroll ? { as: _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_14__.Slot, allowPinchZoom: true } : void 0;\n const handleTypeaheadSearch = (key) => {\n const search = searchRef.current + key;\n const items = getItems().filter((item) => !item.disabled);\n const currentItem = document.activeElement;\n const currentMatch = items.find((item) => item.ref.current === currentItem)?.textValue;\n const values = items.map((item) => item.textValue);\n const nextMatch = getNextMatch(values, search, currentMatch);\n const newItem = items.find((item) => item.textValue === nextMatch)?.ref.current;\n (function updateSearch(value) {\n searchRef.current = value;\n window.clearTimeout(timerRef.current);\n if (value !== \"\") timerRef.current = window.setTimeout(() => updateSearch(\"\"), 1e3);\n })(search);\n if (newItem) {\n setTimeout(() => newItem.focus());\n }\n };\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n return () => window.clearTimeout(timerRef.current);\n }, []);\n (0,_radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_15__.useFocusGuards)();\n const isPointerMovingToSubmenu = react__WEBPACK_IMPORTED_MODULE_0__.useCallback((event) => {\n const isMovingTowards = pointerDirRef.current === pointerGraceIntentRef.current?.side;\n return isMovingTowards && isPointerInGraceArea(event, pointerGraceIntentRef.current?.area);\n }, []);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuContentProvider,\n {\n scope: __scopeMenu,\n searchRef,\n onItemEnter: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n onItemLeave: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) return;\n contentRef.current?.focus();\n setCurrentItemId(null);\n },\n [isPointerMovingToSubmenu]\n ),\n onTriggerLeave: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n (event) => {\n if (isPointerMovingToSubmenu(event)) event.preventDefault();\n },\n [isPointerMovingToSubmenu]\n ),\n pointerGraceTimerRef,\n onPointerGraceIntentChange: react__WEBPACK_IMPORTED_MODULE_0__.useCallback((intent) => {\n pointerGraceIntentRef.current = intent;\n }, []),\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(ScrollLockWrapper, { ...scrollLockWrapperProps, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_16__.FocusScope,\n {\n asChild: true,\n trapped: trapFocus,\n onMountAutoFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(onOpenAutoFocus, (event) => {\n event.preventDefault();\n contentRef.current?.focus({ preventScroll: true });\n }),\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_17__.DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n onDismiss,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_5__.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n dir: rootContext.dir,\n orientation: \"vertical\",\n loop,\n currentTabStopId: currentItemId,\n onCurrentTabStopIdChange: setCurrentItemId,\n onEntryFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(onEntryFocus, (event) => {\n if (!rootContext.isUsingKeyboardRef.current) event.preventDefault();\n }),\n preventScrollOnEntryFocus: true,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_4__.Content,\n {\n role: \"menu\",\n \"aria-orientation\": \"vertical\",\n \"data-state\": getOpenState(context.open),\n \"data-radix-menu-content\": \"\",\n dir: rootContext.dir,\n ...popperScope,\n ...contentProps,\n ref: composedRefs,\n style: { outline: \"none\", ...contentProps.style },\n onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(contentProps.onKeyDown, (event) => {\n const target = event.target;\n const isKeyDownInside = target.closest(\"[data-radix-menu-content]\") === event.currentTarget;\n const isModifierKey = event.ctrlKey || event.altKey || event.metaKey;\n const isCharacterKey = event.key.length === 1;\n if (isKeyDownInside) {\n if (event.key === \"Tab\") event.preventDefault();\n if (!isModifierKey && isCharacterKey) handleTypeaheadSearch(event.key);\n }\n const content = contentRef.current;\n if (event.target !== content) return;\n if (!FIRST_LAST_KEYS.includes(event.key)) return;\n event.preventDefault();\n const items = getItems().filter((item) => !item.disabled);\n const candidateNodes = items.map((item) => item.ref.current);\n if (LAST_KEYS.includes(event.key)) candidateNodes.reverse();\n focusFirst(candidateNodes);\n }),\n onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onBlur, (event) => {\n if (!event.currentTarget.contains(event.target)) {\n window.clearTimeout(timerRef.current);\n searchRef.current = \"\";\n }\n }),\n onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(\n props.onPointerMove,\n whenMouse((event) => {\n const target = event.target;\n const pointerXHasChanged = lastPointerXRef.current !== event.clientX;\n if (event.currentTarget.contains(target) && pointerXHasChanged) {\n const newDir = event.clientX > lastPointerXRef.current ? \"right\" : \"left\";\n pointerDirRef.current = newDir;\n lastPointerXRef.current = event.clientX;\n }\n })\n )\n }\n )\n }\n )\n }\n )\n }\n ) })\n }\n );\n }\n);\nMenuContent.displayName = CONTENT_NAME;\nvar GROUP_NAME = \"MenuGroup\";\nvar MenuGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...groupProps } = props;\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_18__.Primitive.div, { role: \"group\", ...groupProps, ref: forwardedRef });\n }\n);\nMenuGroup.displayName = GROUP_NAME;\nvar LABEL_NAME = \"MenuLabel\";\nvar MenuLabel = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...labelProps } = props;\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_18__.Primitive.div, { ...labelProps, ref: forwardedRef });\n }\n);\nMenuLabel.displayName = LABEL_NAME;\nvar ITEM_NAME = \"MenuItem\";\nvar ITEM_SELECT = \"menu.itemSelect\";\nvar MenuItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { disabled = false, onSelect, ...itemProps } = props;\n const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const rootContext = useMenuRootContext(ITEM_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(ITEM_NAME, props.__scopeMenu);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_10__.useComposedRefs)(forwardedRef, ref);\n const isPointerDownRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n const handleSelect = () => {\n const menuItem = ref.current;\n if (!disabled && menuItem) {\n const itemSelectEvent = new CustomEvent(ITEM_SELECT, { bubbles: true, cancelable: true });\n menuItem.addEventListener(ITEM_SELECT, (event) => onSelect?.(event), { once: true });\n (0,_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_18__.dispatchDiscreteCustomEvent)(menuItem, itemSelectEvent);\n if (itemSelectEvent.defaultPrevented) {\n isPointerDownRef.current = false;\n } else {\n rootContext.onClose();\n }\n }\n };\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuItemImpl,\n {\n ...itemProps,\n ref: composedRefs,\n disabled,\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onClick, handleSelect),\n onPointerDown: (event) => {\n props.onPointerDown?.(event);\n isPointerDownRef.current = true;\n },\n onPointerUp: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onPointerUp, (event) => {\n if (!isPointerDownRef.current) event.currentTarget?.click();\n }),\n onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (disabled || isTypingAhead && event.key === \" \") return;\n if (SELECTION_KEYS.includes(event.key)) {\n event.currentTarget.click();\n event.preventDefault();\n }\n })\n }\n );\n }\n);\nMenuItem.displayName = ITEM_NAME;\nvar MenuItemImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, disabled = false, textValue, ...itemProps } = props;\n const contentContext = useMenuContentContext(ITEM_NAME, __scopeMenu);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeMenu);\n const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_10__.useComposedRefs)(forwardedRef, ref);\n const [isFocused, setIsFocused] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false);\n const [textContent, setTextContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(\"\");\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const menuItem = ref.current;\n if (menuItem) {\n setTextContent((menuItem.textContent ?? \"\").trim());\n }\n }, [itemProps.children]);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n Collection.ItemSlot,\n {\n scope: __scopeMenu,\n disabled,\n textValue: textValue ?? textContent,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_roving_focus__WEBPACK_IMPORTED_MODULE_5__.Item, { asChild: true, ...rovingFocusGroupScope, focusable: !disabled, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_18__.Primitive.div,\n {\n role: \"menuitem\",\n \"data-highlighted\": isFocused ? \"\" : void 0,\n \"aria-disabled\": disabled || void 0,\n \"data-disabled\": disabled ? \"\" : void 0,\n ...itemProps,\n ref: composedRefs,\n onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(\n props.onPointerMove,\n whenMouse((event) => {\n if (disabled) {\n contentContext.onItemLeave(event);\n } else {\n contentContext.onItemEnter(event);\n if (!event.defaultPrevented) {\n const item = event.currentTarget;\n item.focus({ preventScroll: true });\n }\n }\n })\n ),\n onPointerLeave: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(\n props.onPointerLeave,\n whenMouse((event) => contentContext.onItemLeave(event))\n ),\n onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onFocus, () => setIsFocused(true)),\n onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onBlur, () => setIsFocused(false))\n }\n ) })\n }\n );\n }\n);\nvar CHECKBOX_ITEM_NAME = \"MenuCheckboxItem\";\nvar MenuCheckboxItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { checked = false, onCheckedChange, ...checkboxItemProps } = props;\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuItem,\n {\n role: \"menuitemcheckbox\",\n \"aria-checked\": isIndeterminate(checked) ? \"mixed\" : checked,\n ...checkboxItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(\n checkboxItemProps.onSelect,\n () => onCheckedChange?.(isIndeterminate(checked) ? true : !checked),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuCheckboxItem.displayName = CHECKBOX_ITEM_NAME;\nvar RADIO_GROUP_NAME = \"MenuRadioGroup\";\nvar [RadioGroupProvider, useRadioGroupContext] = createMenuContext(\n RADIO_GROUP_NAME,\n { value: void 0, onValueChange: () => {\n } }\n);\nvar MenuRadioGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { value, onValueChange, ...groupProps } = props;\n const handleValueChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onValueChange);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(RadioGroupProvider, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MenuGroup, { ...groupProps, ref: forwardedRef }) });\n }\n);\nMenuRadioGroup.displayName = RADIO_GROUP_NAME;\nvar RADIO_ITEM_NAME = \"MenuRadioItem\";\nvar MenuRadioItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { value, ...radioItemProps } = props;\n const context = useRadioGroupContext(RADIO_ITEM_NAME, props.__scopeMenu);\n const checked = value === context.value;\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(ItemIndicatorProvider, { scope: props.__scopeMenu, checked, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuItem,\n {\n role: \"menuitemradio\",\n \"aria-checked\": checked,\n ...radioItemProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(checked),\n onSelect: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(\n radioItemProps.onSelect,\n () => context.onValueChange?.(value),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nMenuRadioItem.displayName = RADIO_ITEM_NAME;\nvar ITEM_INDICATOR_NAME = \"MenuItemIndicator\";\nvar [ItemIndicatorProvider, useItemIndicatorContext] = createMenuContext(\n ITEM_INDICATOR_NAME,\n { checked: false }\n);\nvar MenuItemIndicator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, forceMount, ...itemIndicatorProps } = props;\n const indicatorContext = useItemIndicatorContext(ITEM_INDICATOR_NAME, __scopeMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence,\n {\n present: forceMount || isIndeterminate(indicatorContext.checked) || indicatorContext.checked === true,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_18__.Primitive.span,\n {\n ...itemIndicatorProps,\n ref: forwardedRef,\n \"data-state\": getCheckedState(indicatorContext.checked)\n }\n )\n }\n );\n }\n);\nMenuItemIndicator.displayName = ITEM_INDICATOR_NAME;\nvar SEPARATOR_NAME = \"MenuSeparator\";\nvar MenuSeparator = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...separatorProps } = props;\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_18__.Primitive.div,\n {\n role: \"separator\",\n \"aria-orientation\": \"horizontal\",\n ...separatorProps,\n ref: forwardedRef\n }\n );\n }\n);\nMenuSeparator.displayName = SEPARATOR_NAME;\nvar ARROW_NAME = \"MenuArrow\";\nvar MenuArrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopeMenu, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopeMenu);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_4__.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nMenuArrow.displayName = ARROW_NAME;\nvar SUB_NAME = \"MenuSub\";\nvar [MenuSubProvider, useMenuSubContext] = createMenuContext(SUB_NAME);\nvar MenuSub = (props) => {\n const { __scopeMenu, children, open = false, onOpenChange } = props;\n const parentMenuContext = useMenuContext(SUB_NAME, __scopeMenu);\n const popperScope = usePopperScope(__scopeMenu);\n const [trigger, setTrigger] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);\n const [content, setContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);\n const handleOpenChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onOpenChange);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (parentMenuContext.open === false) handleOpenChange(false);\n return () => handleOpenChange(false);\n }, [parentMenuContext.open, handleOpenChange]);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_4__.Root, { ...popperScope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuProvider,\n {\n scope: __scopeMenu,\n open,\n onOpenChange: handleOpenChange,\n content,\n onContentChange: setContent,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuSubProvider,\n {\n scope: __scopeMenu,\n contentId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_19__.useId)(),\n triggerId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_19__.useId)(),\n trigger,\n onTriggerChange: setTrigger,\n children\n }\n )\n }\n ) });\n};\nMenuSub.displayName = SUB_NAME;\nvar SUB_TRIGGER_NAME = \"MenuSubTrigger\";\nvar MenuSubTrigger = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const context = useMenuContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const contentContext = useMenuContentContext(SUB_TRIGGER_NAME, props.__scopeMenu);\n const openTimerRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const { pointerGraceTimerRef, onPointerGraceIntentChange } = contentContext;\n const scope = { __scopeMenu: props.__scopeMenu };\n const clearOpenTimer = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => {\n if (openTimerRef.current) window.clearTimeout(openTimerRef.current);\n openTimerRef.current = null;\n }, []);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => clearOpenTimer, [clearOpenTimer]);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const pointerGraceTimer = pointerGraceTimerRef.current;\n return () => {\n window.clearTimeout(pointerGraceTimer);\n onPointerGraceIntentChange(null);\n };\n }, [pointerGraceTimerRef, onPointerGraceIntentChange]);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(MenuAnchor, { asChild: true, ...scope, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuItemImpl,\n {\n id: subContext.triggerId,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": context.open,\n \"aria-controls\": subContext.contentId,\n \"data-state\": getOpenState(context.open),\n ...props,\n ref: (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_10__.composeRefs)(forwardedRef, subContext.onTriggerChange),\n onClick: (event) => {\n props.onClick?.(event);\n if (props.disabled || event.defaultPrevented) return;\n event.currentTarget.focus();\n if (!context.open) context.onOpenChange(true);\n },\n onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(\n props.onPointerMove,\n whenMouse((event) => {\n contentContext.onItemEnter(event);\n if (event.defaultPrevented) return;\n if (!props.disabled && !context.open && !openTimerRef.current) {\n contentContext.onPointerGraceIntentChange(null);\n openTimerRef.current = window.setTimeout(() => {\n context.onOpenChange(true);\n clearOpenTimer();\n }, 100);\n }\n })\n ),\n onPointerLeave: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(\n props.onPointerLeave,\n whenMouse((event) => {\n clearOpenTimer();\n const contentRect = context.content?.getBoundingClientRect();\n if (contentRect) {\n const side = context.content?.dataset.side;\n const rightSide = side === \"right\";\n const bleed = rightSide ? -5 : 5;\n const contentNearEdge = contentRect[rightSide ? \"left\" : \"right\"];\n const contentFarEdge = contentRect[rightSide ? \"right\" : \"left\"];\n contentContext.onPointerGraceIntentChange({\n area: [\n // Apply a bleed on clientX to ensure that our exit point is\n // consistently within polygon bounds\n { x: event.clientX + bleed, y: event.clientY },\n { x: contentNearEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.top },\n { x: contentFarEdge, y: contentRect.bottom },\n { x: contentNearEdge, y: contentRect.bottom }\n ],\n side\n });\n window.clearTimeout(pointerGraceTimerRef.current);\n pointerGraceTimerRef.current = window.setTimeout(\n () => contentContext.onPointerGraceIntentChange(null),\n 300\n );\n } else {\n contentContext.onTriggerLeave(event);\n if (event.defaultPrevented) return;\n contentContext.onPointerGraceIntentChange(null);\n }\n })\n ),\n onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onKeyDown, (event) => {\n const isTypingAhead = contentContext.searchRef.current !== \"\";\n if (props.disabled || isTypingAhead && event.key === \" \") return;\n if (SUB_OPEN_KEYS[rootContext.dir].includes(event.key)) {\n context.onOpenChange(true);\n context.content?.focus();\n event.preventDefault();\n }\n })\n }\n ) });\n }\n);\nMenuSubTrigger.displayName = SUB_TRIGGER_NAME;\nvar SUB_CONTENT_NAME = \"MenuSubContent\";\nvar MenuSubContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopeMenu);\n const { forceMount = portalContext.forceMount, ...subContentProps } = props;\n const context = useMenuContext(CONTENT_NAME, props.__scopeMenu);\n const rootContext = useMenuRootContext(CONTENT_NAME, props.__scopeMenu);\n const subContext = useMenuSubContext(SUB_CONTENT_NAME, props.__scopeMenu);\n const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_10__.useComposedRefs)(forwardedRef, ref);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Collection.Provider, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_8__.Presence, { present: forceMount || context.open, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Collection.Slot, { scope: props.__scopeMenu, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n MenuContentImpl,\n {\n id: subContext.contentId,\n \"aria-labelledby\": subContext.triggerId,\n ...subContentProps,\n ref: composedRefs,\n align: \"start\",\n side: rootContext.dir === \"rtl\" ? \"left\" : \"right\",\n disableOutsidePointerEvents: false,\n disableOutsideScroll: false,\n trapFocus: false,\n onOpenAutoFocus: (event) => {\n if (rootContext.isUsingKeyboardRef.current) ref.current?.focus();\n event.preventDefault();\n },\n onCloseAutoFocus: (event) => event.preventDefault(),\n onFocusOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onFocusOutside, (event) => {\n if (event.target !== subContext.trigger) context.onOpenChange(false);\n }),\n onEscapeKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onEscapeKeyDown, (event) => {\n rootContext.onClose();\n event.preventDefault();\n }),\n onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_12__.composeEventHandlers)(props.onKeyDown, (event) => {\n const isKeyDownInside = event.currentTarget.contains(event.target);\n const isCloseKey = SUB_CLOSE_KEYS[rootContext.dir].includes(event.key);\n if (isKeyDownInside && isCloseKey) {\n context.onOpenChange(false);\n subContext.trigger?.focus();\n event.preventDefault();\n }\n })\n }\n ) }) }) });\n }\n);\nMenuSubContent.displayName = SUB_CONTENT_NAME;\nfunction getOpenState(open) {\n return open ? \"open\" : \"closed\";\n}\nfunction isIndeterminate(checked) {\n return checked === \"indeterminate\";\n}\nfunction getCheckedState(checked) {\n return isIndeterminate(checked) ? \"indeterminate\" : checked ? \"checked\" : \"unchecked\";\n}\nfunction focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nfunction getNextMatch(values, search, currentMatch) {\n const isRepeated = search.length > 1 && Array.from(search).every((char) => char === search[0]);\n const normalizedSearch = isRepeated ? search[0] : search;\n const currentMatchIndex = currentMatch ? values.indexOf(currentMatch) : -1;\n let wrappedValues = wrapArray(values, Math.max(currentMatchIndex, 0));\n const excludeCurrentMatch = normalizedSearch.length === 1;\n if (excludeCurrentMatch) wrappedValues = wrappedValues.filter((v) => v !== currentMatch);\n const nextMatch = wrappedValues.find(\n (value) => value.toLowerCase().startsWith(normalizedSearch.toLowerCase())\n );\n return nextMatch !== currentMatch ? nextMatch : void 0;\n}\nfunction isPointInPolygon(point, polygon) {\n const { x, y } = point;\n let inside = false;\n for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y;\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n}\nfunction isPointerInGraceArea(event, area) {\n if (!area) return false;\n const cursorPos = { x: event.clientX, y: event.clientY };\n return isPointInPolygon(cursorPos, area);\n}\nfunction whenMouse(handler) {\n return (event) => event.pointerType === \"mouse\" ? handler(event) : void 0;\n}\nvar Root3 = Menu;\nvar Anchor2 = MenuAnchor;\nvar Portal = MenuPortal;\nvar Content2 = MenuContent;\nvar Group = MenuGroup;\nvar Label = MenuLabel;\nvar Item2 = MenuItem;\nvar CheckboxItem = MenuCheckboxItem;\nvar RadioGroup = MenuRadioGroup;\nvar RadioItem = MenuRadioItem;\nvar ItemIndicator = MenuItemIndicator;\nvar Separator = MenuSeparator;\nvar Arrow2 = MenuArrow;\nvar Sub = MenuSub;\nvar SubTrigger = MenuSubTrigger;\nvar SubContent = MenuSubContent;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-menu/dist/index.mjs?");
|
|
3418
|
+
|
|
3419
|
+
/***/ }),
|
|
3420
|
+
|
|
3421
|
+
/***/ "../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-context/dist/index.mjs":
|
|
3422
|
+
/*!************************************************************************************************!*\
|
|
3423
|
+
!*** ../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-context/dist/index.mjs ***!
|
|
3424
|
+
\************************************************************************************************/
|
|
3425
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3426
|
+
|
|
3427
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createContext: () => (/* binding */ createContext2),\n/* harmony export */ createContextScope: () => (/* binding */ createContextScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/context/src/createContext.tsx\n\n\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n const Provider = (props) => {\n const { children, ...context } = props;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName) {\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n const Provider = (props) => {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n };\n Provider.displayName = rootComponentName + \"Provider\";\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName]?.[index] || BaseContext;\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-context/dist/index.mjs?");
|
|
3428
|
+
|
|
3429
|
+
/***/ }),
|
|
3430
|
+
|
|
3431
|
+
/***/ "../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/dist/index.mjs":
|
|
3432
|
+
/*!***********************************************************************************************!*\
|
|
3433
|
+
!*** ../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/dist/index.mjs ***!
|
|
3434
|
+
\***********************************************************************************************/
|
|
3435
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3436
|
+
|
|
3437
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ALIGN_OPTIONS: () => (/* binding */ ALIGN_OPTIONS),\n/* harmony export */ Anchor: () => (/* binding */ Anchor),\n/* harmony export */ Arrow: () => (/* binding */ Arrow),\n/* harmony export */ Content: () => (/* binding */ Content),\n/* harmony export */ Popper: () => (/* binding */ Popper),\n/* harmony export */ PopperAnchor: () => (/* binding */ PopperAnchor),\n/* harmony export */ PopperArrow: () => (/* binding */ PopperArrow),\n/* harmony export */ PopperContent: () => (/* binding */ PopperContent),\n/* harmony export */ Root: () => (/* binding */ Root2),\n/* harmony export */ SIDE_OPTIONS: () => (/* binding */ SIDE_OPTIONS),\n/* harmony export */ createPopperScope: () => (/* binding */ createPopperScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @floating-ui/react-dom */ \"../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs\");\n/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @floating-ui/react-dom */ \"../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs\");\n/* harmony import */ var _radix_ui_react_arrow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-arrow */ \"../node_modules/@radix-ui/react-arrow/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-use-size */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-size/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\"use client\";\n\n// packages/react/popper/src/Popper.tsx\n\n\n\n\n\n\n\n\n\n\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n context.onAnchorChange(virtualRef?.current || ref.current);\n });\n return virtualRef ? null : /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = react__WEBPACK_IMPORTED_MODULE_0__.useState(null);\n const arrowSize = (0,_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_5__.useSize)(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.useFloating)({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_7__.autoUpdate)(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.offset)({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.shift)({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.limitShift)() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.flip)({ ...detectOverflowOptions }),\n (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.size)({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.arrow)({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.hide)({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_8__.useCallbackRef)(onPlaced);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_9__.useLayoutEffect)(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_9__.useLayoutEffect)(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_arrow__WEBPACK_IMPORTED_MODULE_10__.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/dist/index.mjs?");
|
|
3438
|
+
|
|
3439
|
+
/***/ }),
|
|
3440
|
+
|
|
3441
|
+
/***/ "../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context/dist/index.mjs":
|
|
3442
|
+
/*!************************************************************************************************************************************!*\
|
|
3443
|
+
!*** ../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context/dist/index.mjs ***!
|
|
3444
|
+
\************************************************************************************************************************************/
|
|
3445
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3446
|
+
|
|
3447
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createContext: () => (/* binding */ createContext2),\n/* harmony export */ createContextScope: () => (/* binding */ createContextScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/context/src/createContext.tsx\n\n\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n function Provider(props) {\n const { children, ...context } = props;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n }\n function useContext2(consumerName) {\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n function Provider(props) {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName][index] || BaseContext;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n }\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName][index] || BaseContext;\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-context/dist/index.mjs?");
|
|
3448
|
+
|
|
3449
|
+
/***/ }),
|
|
3450
|
+
|
|
3451
|
+
/***/ "../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive/dist/index.mjs":
|
|
3452
|
+
/*!**************************************************************************************************!*\
|
|
3453
|
+
!*** ../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive/dist/index.mjs ***!
|
|
3454
|
+
\**************************************************************************************************/
|
|
3455
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3456
|
+
|
|
3457
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Primitive: () => (/* binding */ Primitive),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ dispatchDiscreteCustomEvent: () => (/* binding */ dispatchDiscreteCustomEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/primitive/src/Primitive.tsx\n\n\n\n\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-primitive/dist/index.mjs?");
|
|
3458
|
+
|
|
3459
|
+
/***/ }),
|
|
3460
|
+
|
|
3461
|
+
/***/ "../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs":
|
|
3462
|
+
/*!*********************************************************************************************!*\
|
|
3463
|
+
!*** ../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs ***!
|
|
3464
|
+
\*********************************************************************************************/
|
|
3465
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3466
|
+
|
|
3467
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Slot: () => (/* binding */ Slot),\n/* harmony export */ Slottable: () => (/* binding */ Slottable)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/slot/src/Slot.tsx\n\n\n\nvar Slot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null);\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, childrenRef) : childrenRef\n });\n }\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children });\n};\nfunction isSlottable(child) {\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
3468
|
+
|
|
3469
|
+
/***/ }),
|
|
3470
|
+
|
|
3471
|
+
/***/ "../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs":
|
|
3472
|
+
/*!**********************************************************************************************************!*\
|
|
3473
|
+
!*** ../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs ***!
|
|
3474
|
+
\**********************************************************************************************************/
|
|
3475
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3476
|
+
|
|
3477
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLayoutEffect: () => (/* binding */ useLayoutEffect2)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n// packages/react/use-layout-effect/src/useLayoutEffect.tsx\n\nvar useLayoutEffect2 = Boolean(globalThis?.document) ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : () => {\n};\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs?");
|
|
3478
|
+
|
|
3479
|
+
/***/ }),
|
|
3480
|
+
|
|
3481
|
+
/***/ "../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-size/dist/index.mjs":
|
|
3482
|
+
/*!*************************************************************************************************!*\
|
|
3483
|
+
!*** ../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-size/dist/index.mjs ***!
|
|
3484
|
+
\*************************************************************************************************/
|
|
3485
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3486
|
+
|
|
3487
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useSize: () => (/* binding */ useSize)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n// packages/react/use-size/src/useSize.tsx\n\n\nfunction useSize(element) {\n const [size, setSize] = react__WEBPACK_IMPORTED_MODULE_0__.useState(void 0);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(() => {\n if (element) {\n setSize({ width: element.offsetWidth, height: element.offsetHeight });\n const resizeObserver = new ResizeObserver((entries) => {\n if (!Array.isArray(entries)) {\n return;\n }\n if (!entries.length) {\n return;\n }\n const entry = entries[0];\n let width;\n let height;\n if (\"borderBoxSize\" in entry) {\n const borderSizeEntry = entry[\"borderBoxSize\"];\n const borderSize = Array.isArray(borderSizeEntry) ? borderSizeEntry[0] : borderSizeEntry;\n width = borderSize[\"inlineSize\"];\n height = borderSize[\"blockSize\"];\n } else {\n width = element.offsetWidth;\n height = element.offsetHeight;\n }\n setSize({ width, height });\n });\n resizeObserver.observe(element, { box: \"border-box\" });\n return () => resizeObserver.unobserve(element);\n } else {\n setSize(void 0);\n }\n }, [element]);\n return size;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-use-size/dist/index.mjs?");
|
|
3038
3488
|
|
|
3039
3489
|
/***/ }),
|
|
3040
3490
|
|
|
@@ -3044,7 +3494,107 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3044
3494
|
\**************************************************************/
|
|
3045
3495
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3046
3496
|
|
|
3047
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Anchor: () => (/* binding */ $cb5cc270b50c6fcd$export$b688253958b8dfe7),\n/* harmony export */ Arrow: () => (/* binding */ $cb5cc270b50c6fcd$export$21b07c8f274aebd5),\n/* harmony export */ Close: () => (/* binding */ $cb5cc270b50c6fcd$export$f39c2d165cd861fe),\n/* harmony export */ Content: () => (/* binding */ $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2),\n/* harmony export */ Popover: () => (/* binding */ $cb5cc270b50c6fcd$export$5b6b19405a83ff9d),\n/* harmony export */ PopoverAnchor: () => (/* binding */ $cb5cc270b50c6fcd$export$96e5381f42521a79),\n/* harmony export */ PopoverArrow: () => (/* binding */ $cb5cc270b50c6fcd$export$3152841115e061b2),\n/* harmony export */ PopoverClose: () => (/* binding */ $cb5cc270b50c6fcd$export$d6ac43ebaa40d53e),\n/* harmony export */ PopoverContent: () => (/* binding */ $cb5cc270b50c6fcd$export$d7e1f420b25549ff),\n/* harmony export */ PopoverPortal: () => (/* binding */ $cb5cc270b50c6fcd$export$dd679ffb4362d2d4),\n/* harmony export */ PopoverTrigger: () => (/* binding */ $cb5cc270b50c6fcd$export$7dacb05d26466c3),\n/* harmony export */ Portal: () => (/* binding */ $cb5cc270b50c6fcd$export$602eac185826482c),\n/* harmony export */ Root: () => (/* binding */ $cb5cc270b50c6fcd$export$be92b6f5f03c0fe9),\n/* harmony export */ Trigger: () => (/* binding */ $cb5cc270b50c6fcd$export$41fb9f06171c75f4),\n/* harmony export */ createPopoverScope: () => (/* binding */ $cb5cc270b50c6fcd$export$c8393c9e73286932)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ \"../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @radix-ui/react-focus-guards */ \"../node_modules/@radix-ui/react-focus-guards/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @radix-ui/react-focus-scope */ \"../node_modules/@radix-ui/react-focus-scope/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-id */ \"../node_modules/@radix-ui/react-id/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-popper */ \"../node_modules/@radix-ui/react-popper/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-portal */ \"../node_modules/@radix-ui/react-portal/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-presence */ \"../node_modules/@radix-ui/react-presence/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var aria_hidden__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! aria-hidden */ \"../node_modules/aria-hidden/dist/es2015/index.js\");\n/* harmony import */ var react_remove_scroll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react-remove-scroll */ \"../node_modules/react-remove-scroll/dist/es2015/Combination.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$POPOVER_NAME = 'Popover';\nconst [$cb5cc270b50c6fcd$var$createPopoverContext, $cb5cc270b50c6fcd$export$c8393c9e73286932] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)($cb5cc270b50c6fcd$var$POPOVER_NAME, [\n _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.createPopperScope\n]);\nconst $cb5cc270b50c6fcd$var$usePopperScope = (0,_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.createPopperScope)();\nconst [$cb5cc270b50c6fcd$var$PopoverProvider, $cb5cc270b50c6fcd$var$usePopoverContext] = $cb5cc270b50c6fcd$var$createPopoverContext($cb5cc270b50c6fcd$var$POPOVER_NAME);\nconst $cb5cc270b50c6fcd$export$5b6b19405a83ff9d = (props)=>{\n const { __scopePopover: __scopePopover , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = false } = props;\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);\n const triggerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const [hasCustomAnchor, setHasCustomAnchor] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n const [open = false, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Root, popperScope, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverProvider, {\n scope: __scopePopover,\n contentId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__.useId)(),\n triggerRef: triggerRef,\n open: open,\n onOpenChange: setOpen,\n onOpenToggle: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>setOpen((prevOpen)=>!prevOpen\n )\n , [\n setOpen\n ]),\n hasCustomAnchor: hasCustomAnchor,\n onCustomAnchorAdd: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>setHasCustomAnchor(true)\n , []),\n onCustomAnchorRemove: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>setHasCustomAnchor(false)\n , []),\n modal: modal\n }, children));\n};\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$5b6b19405a83ff9d, {\n displayName: $cb5cc270b50c6fcd$var$POPOVER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$ANCHOR_NAME = 'PopoverAnchor';\nconst $cb5cc270b50c6fcd$export$96e5381f42521a79 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , ...anchorProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$ANCHOR_NAME, __scopePopover);\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);\n const { onCustomAnchorAdd: onCustomAnchorAdd , onCustomAnchorRemove: onCustomAnchorRemove } = context;\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n onCustomAnchorAdd();\n return ()=>onCustomAnchorRemove()\n ;\n }, [\n onCustomAnchorAdd,\n onCustomAnchorRemove\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Anchor, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, popperScope, anchorProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$96e5381f42521a79, {\n displayName: $cb5cc270b50c6fcd$var$ANCHOR_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$TRIGGER_NAME = 'PopoverTrigger';\nconst $cb5cc270b50c6fcd$export$7dacb05d26466c3 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , ...triggerProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$TRIGGER_NAME, __scopePopover);\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);\n const composedTriggerRef = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__.useComposedRefs)(forwardedRef, context.triggerRef);\n const trigger = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__.Primitive.button, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": $cb5cc270b50c6fcd$var$getState(context.open)\n }, triggerProps, {\n ref: composedTriggerRef,\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onClick, context.onOpenToggle)\n }));\n return context.hasCustomAnchor ? trigger : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Anchor, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n asChild: true\n }, popperScope), trigger);\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$7dacb05d26466c3, {\n displayName: $cb5cc270b50c6fcd$var$TRIGGER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$PORTAL_NAME = 'PopoverPortal';\nconst [$cb5cc270b50c6fcd$var$PortalProvider, $cb5cc270b50c6fcd$var$usePortalContext] = $cb5cc270b50c6fcd$var$createPopoverContext($cb5cc270b50c6fcd$var$PORTAL_NAME, {\n forceMount: undefined\n});\nconst $cb5cc270b50c6fcd$export$dd679ffb4362d2d4 = (props)=>{\n const { __scopePopover: __scopePopover , forceMount: forceMount , children: children , container: container } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$PORTAL_NAME, __scopePopover);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PortalProvider, {\n scope: __scopePopover,\n forceMount: forceMount\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__.Presence, {\n present: forceMount || context.open\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_10__.Portal, {\n asChild: true,\n container: container\n }, children)));\n};\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$dd679ffb4362d2d4, {\n displayName: $cb5cc270b50c6fcd$var$PORTAL_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$CONTENT_NAME = 'PopoverContent';\nconst $cb5cc270b50c6fcd$export$d7e1f420b25549ff = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const portalContext = $cb5cc270b50c6fcd$var$usePortalContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);\n const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__.Presence, {\n present: forceMount || context.open\n }, context.modal ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverContentModal, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, contentProps, {\n ref: forwardedRef\n })) : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverContentNonModal, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, contentProps, {\n ref: forwardedRef\n })));\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$d7e1f420b25549ff, {\n displayName: $cb5cc270b50c6fcd$var$CONTENT_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$PopoverContentModal = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);\n const contentRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__.useComposedRefs)(forwardedRef, contentRef);\n const isRightClickOutsideRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false); // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const content = contentRef.current;\n if (content) return (0,aria_hidden__WEBPACK_IMPORTED_MODULE_11__.hideOthers)(content);\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(react_remove_scroll__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n as: _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_13__.Slot,\n allowPinchZoom: true\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs // we make sure we're not trapping once it's been closed\n ,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onCloseAutoFocus, (event)=>{\n var _context$triggerRef$c;\n event.preventDefault();\n if (!isRightClickOutsideRef.current) (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();\n }),\n onPointerDownOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onPointerDownOutside, (event)=>{\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n }, {\n checkForDefaultPrevented: false\n }) // When focus is trapped, a `focusout` event may still happen.\n ,\n onFocusOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onFocusOutside, (event)=>event.preventDefault()\n , {\n checkForDefaultPrevented: false\n })\n })));\n});\nconst $cb5cc270b50c6fcd$var$PopoverContentNonModal = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const hasPointerDownOutsideRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event)=>{\n var _props$onCloseAutoFoc;\n (_props$onCloseAutoFoc = props.onCloseAutoFocus) === null || _props$onCloseAutoFoc === void 0 || _props$onCloseAutoFoc.call(props, event);\n if (!event.defaultPrevented) {\n var _context$triggerRef$c2;\n if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event)=>{\n var _props$onInteractOuts, _context$triggerRef$c3;\n (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true;\n } // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target;\n const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target);\n if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault();\n }\n }));\n});\n/* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$PopoverContentImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , disableOutsidePointerEvents: disableOutsidePointerEvents , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , ...contentProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, __scopePopover);\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover); // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (beacuse of the `Portal`)\n (0,_radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_14__.useFocusGuards)();\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_15__.FocusScope, {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_16__.DismissableLayer, {\n asChild: true,\n disableOutsidePointerEvents: disableOutsidePointerEvents,\n onInteractOutside: onInteractOutside,\n onEscapeKeyDown: onEscapeKeyDown,\n onPointerDownOutside: onPointerDownOutside,\n onFocusOutside: onFocusOutside,\n onDismiss: ()=>context.onOpenChange(false)\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Content, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-state\": $cb5cc270b50c6fcd$var$getState(context.open),\n role: \"dialog\",\n id: context.contentId\n }, popperScope, contentProps, {\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n '--radix-popover-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-popover-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-popover-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-popover-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-popover-trigger-height': 'var(--radix-popper-anchor-height)'\n }\n }))));\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$CLOSE_NAME = 'PopoverClose';\nconst $cb5cc270b50c6fcd$export$d6ac43ebaa40d53e = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , ...closeProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CLOSE_NAME, __scopePopover);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__.Primitive.button, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n type: \"button\"\n }, closeProps, {\n ref: forwardedRef,\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onClick, ()=>context.onOpenChange(false)\n )\n }));\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$d6ac43ebaa40d53e, {\n displayName: $cb5cc270b50c6fcd$var$CLOSE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$ARROW_NAME = 'PopoverArrow';\nconst $cb5cc270b50c6fcd$export$3152841115e061b2 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , ...arrowProps } = props;\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Arrow, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, popperScope, arrowProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$3152841115e061b2, {\n displayName: $cb5cc270b50c6fcd$var$ARROW_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ function $cb5cc270b50c6fcd$var$getState(open) {\n return open ? 'open' : 'closed';\n}\nconst $cb5cc270b50c6fcd$export$be92b6f5f03c0fe9 = $cb5cc270b50c6fcd$export$5b6b19405a83ff9d;\nconst $cb5cc270b50c6fcd$export$b688253958b8dfe7 = $cb5cc270b50c6fcd$export$96e5381f42521a79;\nconst $cb5cc270b50c6fcd$export$41fb9f06171c75f4 = $cb5cc270b50c6fcd$export$7dacb05d26466c3;\nconst $cb5cc270b50c6fcd$export$602eac185826482c = $cb5cc270b50c6fcd$export$dd679ffb4362d2d4;\nconst $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2 = $cb5cc270b50c6fcd$export$d7e1f420b25549ff;\nconst $cb5cc270b50c6fcd$export$f39c2d165cd861fe = $cb5cc270b50c6fcd$export$d6ac43ebaa40d53e;\nconst $cb5cc270b50c6fcd$export$21b07c8f274aebd5 = $cb5cc270b50c6fcd$export$3152841115e061b2;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/dist/index.mjs?");
|
|
3497
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Anchor: () => (/* binding */ $cb5cc270b50c6fcd$export$b688253958b8dfe7),\n/* harmony export */ Arrow: () => (/* binding */ $cb5cc270b50c6fcd$export$21b07c8f274aebd5),\n/* harmony export */ Close: () => (/* binding */ $cb5cc270b50c6fcd$export$f39c2d165cd861fe),\n/* harmony export */ Content: () => (/* binding */ $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2),\n/* harmony export */ Popover: () => (/* binding */ $cb5cc270b50c6fcd$export$5b6b19405a83ff9d),\n/* harmony export */ PopoverAnchor: () => (/* binding */ $cb5cc270b50c6fcd$export$96e5381f42521a79),\n/* harmony export */ PopoverArrow: () => (/* binding */ $cb5cc270b50c6fcd$export$3152841115e061b2),\n/* harmony export */ PopoverClose: () => (/* binding */ $cb5cc270b50c6fcd$export$d6ac43ebaa40d53e),\n/* harmony export */ PopoverContent: () => (/* binding */ $cb5cc270b50c6fcd$export$d7e1f420b25549ff),\n/* harmony export */ PopoverPortal: () => (/* binding */ $cb5cc270b50c6fcd$export$dd679ffb4362d2d4),\n/* harmony export */ PopoverTrigger: () => (/* binding */ $cb5cc270b50c6fcd$export$7dacb05d26466c3),\n/* harmony export */ Portal: () => (/* binding */ $cb5cc270b50c6fcd$export$602eac185826482c),\n/* harmony export */ Root: () => (/* binding */ $cb5cc270b50c6fcd$export$be92b6f5f03c0fe9),\n/* harmony export */ Trigger: () => (/* binding */ $cb5cc270b50c6fcd$export$41fb9f06171c75f4),\n/* harmony export */ createPopoverScope: () => (/* binding */ $cb5cc270b50c6fcd$export$c8393c9e73286932)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @radix-ui/react-focus-guards */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-guards/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @radix-ui/react-focus-scope */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-id */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-id/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-popper */ \"../node_modules/@radix-ui/react-popper/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-portal */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-presence */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var aria_hidden__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! aria-hidden */ \"../node_modules/aria-hidden/dist/es2015/index.js\");\n/* harmony import */ var react_remove_scroll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react-remove-scroll */ \"../node_modules/@radix-ui/react-popover/node_modules/react-remove-scroll/dist/es2015/Combination.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Popover\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$POPOVER_NAME = 'Popover';\nconst [$cb5cc270b50c6fcd$var$createPopoverContext, $cb5cc270b50c6fcd$export$c8393c9e73286932] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)($cb5cc270b50c6fcd$var$POPOVER_NAME, [\n _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.createPopperScope\n]);\nconst $cb5cc270b50c6fcd$var$usePopperScope = (0,_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.createPopperScope)();\nconst [$cb5cc270b50c6fcd$var$PopoverProvider, $cb5cc270b50c6fcd$var$usePopoverContext] = $cb5cc270b50c6fcd$var$createPopoverContext($cb5cc270b50c6fcd$var$POPOVER_NAME);\nconst $cb5cc270b50c6fcd$export$5b6b19405a83ff9d = (props)=>{\n const { __scopePopover: __scopePopover , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = false } = props;\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);\n const triggerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const [hasCustomAnchor, setHasCustomAnchor] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false);\n const [open = false, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_4__.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Root, popperScope, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverProvider, {\n scope: __scopePopover,\n contentId: (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_5__.useId)(),\n triggerRef: triggerRef,\n open: open,\n onOpenChange: setOpen,\n onOpenToggle: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>setOpen((prevOpen)=>!prevOpen\n )\n , [\n setOpen\n ]),\n hasCustomAnchor: hasCustomAnchor,\n onCustomAnchorAdd: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>setHasCustomAnchor(true)\n , []),\n onCustomAnchorRemove: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>setHasCustomAnchor(false)\n , []),\n modal: modal\n }, children));\n};\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$5b6b19405a83ff9d, {\n displayName: $cb5cc270b50c6fcd$var$POPOVER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverAnchor\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$ANCHOR_NAME = 'PopoverAnchor';\nconst $cb5cc270b50c6fcd$export$96e5381f42521a79 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , ...anchorProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$ANCHOR_NAME, __scopePopover);\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);\n const { onCustomAnchorAdd: onCustomAnchorAdd , onCustomAnchorRemove: onCustomAnchorRemove } = context;\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n onCustomAnchorAdd();\n return ()=>onCustomAnchorRemove()\n ;\n }, [\n onCustomAnchorAdd,\n onCustomAnchorRemove\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Anchor, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, popperScope, anchorProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$96e5381f42521a79, {\n displayName: $cb5cc270b50c6fcd$var$ANCHOR_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverTrigger\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$TRIGGER_NAME = 'PopoverTrigger';\nconst $cb5cc270b50c6fcd$export$7dacb05d26466c3 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , ...triggerProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$TRIGGER_NAME, __scopePopover);\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);\n const composedTriggerRef = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__.useComposedRefs)(forwardedRef, context.triggerRef);\n const trigger = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__.Primitive.button, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": $cb5cc270b50c6fcd$var$getState(context.open)\n }, triggerProps, {\n ref: composedTriggerRef,\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onClick, context.onOpenToggle)\n }));\n return context.hasCustomAnchor ? trigger : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Anchor, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n asChild: true\n }, popperScope), trigger);\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$7dacb05d26466c3, {\n displayName: $cb5cc270b50c6fcd$var$TRIGGER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverPortal\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$PORTAL_NAME = 'PopoverPortal';\nconst [$cb5cc270b50c6fcd$var$PortalProvider, $cb5cc270b50c6fcd$var$usePortalContext] = $cb5cc270b50c6fcd$var$createPopoverContext($cb5cc270b50c6fcd$var$PORTAL_NAME, {\n forceMount: undefined\n});\nconst $cb5cc270b50c6fcd$export$dd679ffb4362d2d4 = (props)=>{\n const { __scopePopover: __scopePopover , forceMount: forceMount , children: children , container: container } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$PORTAL_NAME, __scopePopover);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PortalProvider, {\n scope: __scopePopover,\n forceMount: forceMount\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__.Presence, {\n present: forceMount || context.open\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_10__.Portal, {\n asChild: true,\n container: container\n }, children)));\n};\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$dd679ffb4362d2d4, {\n displayName: $cb5cc270b50c6fcd$var$PORTAL_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverContent\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$CONTENT_NAME = 'PopoverContent';\nconst $cb5cc270b50c6fcd$export$d7e1f420b25549ff = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const portalContext = $cb5cc270b50c6fcd$var$usePortalContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);\n const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__.Presence, {\n present: forceMount || context.open\n }, context.modal ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverContentModal, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, contentProps, {\n ref: forwardedRef\n })) : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverContentNonModal, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, contentProps, {\n ref: forwardedRef\n })));\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$d7e1f420b25549ff, {\n displayName: $cb5cc270b50c6fcd$var$CONTENT_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$PopoverContentModal = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);\n const contentRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__.useComposedRefs)(forwardedRef, contentRef);\n const isRightClickOutsideRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false); // aria-hide everything except the content (better supported equivalent to setting aria-modal)\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const content = contentRef.current;\n if (content) return (0,aria_hidden__WEBPACK_IMPORTED_MODULE_11__.hideOthers)(content);\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(react_remove_scroll__WEBPACK_IMPORTED_MODULE_12__[\"default\"], {\n as: _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_13__.Slot,\n allowPinchZoom: true\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs // we make sure we're not trapping once it's been closed\n ,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onCloseAutoFocus, (event)=>{\n var _context$triggerRef$c;\n event.preventDefault();\n if (!isRightClickOutsideRef.current) (_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();\n }),\n onPointerDownOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onPointerDownOutside, (event)=>{\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n }, {\n checkForDefaultPrevented: false\n }) // When focus is trapped, a `focusout` event may still happen.\n ,\n onFocusOutside: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onFocusOutside, (event)=>event.preventDefault()\n , {\n checkForDefaultPrevented: false\n })\n })));\n});\nconst $cb5cc270b50c6fcd$var$PopoverContentNonModal = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const hasPointerDownOutsideRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cb5cc270b50c6fcd$var$PopoverContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event)=>{\n var _props$onCloseAutoFoc;\n (_props$onCloseAutoFoc = props.onCloseAutoFocus) === null || _props$onCloseAutoFoc === void 0 || _props$onCloseAutoFoc.call(props, event);\n if (!event.defaultPrevented) {\n var _context$triggerRef$c2;\n if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event)=>{\n var _props$onInteractOuts, _context$triggerRef$c3;\n (_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true;\n } // Prevent dismissing when clicking the trigger.\n // As the trigger is already setup to close, without doing so would\n // cause it to close and immediately open.\n const target = event.target;\n const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target);\n if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked\n // we will get the pointer down outside event on the trigger, but then a subsequent\n // focus outside event on the container, we ignore any focus outside event when we've\n // already had a pointer down outside event.\n if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault();\n }\n }));\n});\n/* -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$PopoverContentImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , disableOutsidePointerEvents: disableOutsidePointerEvents , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , ...contentProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CONTENT_NAME, __scopePopover);\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover); // Make sure the whole tree has focus guards as our `Popover` may be\n // the last element in the DOM (beacuse of the `Portal`)\n (0,_radix_ui_react_focus_guards__WEBPACK_IMPORTED_MODULE_14__.useFocusGuards)();\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_focus_scope__WEBPACK_IMPORTED_MODULE_15__.FocusScope, {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_16__.DismissableLayer, {\n asChild: true,\n disableOutsidePointerEvents: disableOutsidePointerEvents,\n onInteractOutside: onInteractOutside,\n onEscapeKeyDown: onEscapeKeyDown,\n onPointerDownOutside: onPointerDownOutside,\n onFocusOutside: onFocusOutside,\n onDismiss: ()=>context.onOpenChange(false)\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Content, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-state\": $cb5cc270b50c6fcd$var$getState(context.open),\n role: \"dialog\",\n id: context.contentId\n }, popperScope, contentProps, {\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n '--radix-popover-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-popover-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-popover-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-popover-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-popover-trigger-height': 'var(--radix-popper-anchor-height)'\n }\n }))));\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverClose\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$CLOSE_NAME = 'PopoverClose';\nconst $cb5cc270b50c6fcd$export$d6ac43ebaa40d53e = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , ...closeProps } = props;\n const context = $cb5cc270b50c6fcd$var$usePopoverContext($cb5cc270b50c6fcd$var$CLOSE_NAME, __scopePopover);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__.Primitive.button, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n type: \"button\"\n }, closeProps, {\n ref: forwardedRef,\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onClick, ()=>context.onOpenChange(false)\n )\n }));\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$d6ac43ebaa40d53e, {\n displayName: $cb5cc270b50c6fcd$var$CLOSE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopoverArrow\n * -----------------------------------------------------------------------------------------------*/ const $cb5cc270b50c6fcd$var$ARROW_NAME = 'PopoverArrow';\nconst $cb5cc270b50c6fcd$export$3152841115e061b2 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopover: __scopePopover , ...arrowProps } = props;\n const popperScope = $cb5cc270b50c6fcd$var$usePopperScope(__scopePopover);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Arrow, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, popperScope, arrowProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($cb5cc270b50c6fcd$export$3152841115e061b2, {\n displayName: $cb5cc270b50c6fcd$var$ARROW_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ function $cb5cc270b50c6fcd$var$getState(open) {\n return open ? 'open' : 'closed';\n}\nconst $cb5cc270b50c6fcd$export$be92b6f5f03c0fe9 = $cb5cc270b50c6fcd$export$5b6b19405a83ff9d;\nconst $cb5cc270b50c6fcd$export$b688253958b8dfe7 = $cb5cc270b50c6fcd$export$96e5381f42521a79;\nconst $cb5cc270b50c6fcd$export$41fb9f06171c75f4 = $cb5cc270b50c6fcd$export$7dacb05d26466c3;\nconst $cb5cc270b50c6fcd$export$602eac185826482c = $cb5cc270b50c6fcd$export$dd679ffb4362d2d4;\nconst $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2 = $cb5cc270b50c6fcd$export$d7e1f420b25549ff;\nconst $cb5cc270b50c6fcd$export$f39c2d165cd861fe = $cb5cc270b50c6fcd$export$d6ac43ebaa40d53e;\nconst $cb5cc270b50c6fcd$export$21b07c8f274aebd5 = $cb5cc270b50c6fcd$export$3152841115e061b2;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/dist/index.mjs?");
|
|
3498
|
+
|
|
3499
|
+
/***/ }),
|
|
3500
|
+
|
|
3501
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/primitive/dist/index.mjs":
|
|
3502
|
+
/*!***********************************************************************************************!*\
|
|
3503
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/primitive/dist/index.mjs ***!
|
|
3504
|
+
\***********************************************************************************************/
|
|
3505
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3506
|
+
|
|
3507
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeEventHandlers: () => (/* binding */ $e42e1063c40fb3ef$export$b9ecd428b558ff10)\n/* harmony export */ });\nfunction $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);\n };\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/primitive/dist/index.mjs?");
|
|
3508
|
+
|
|
3509
|
+
/***/ }),
|
|
3510
|
+
|
|
3511
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs/dist/index.mjs":
|
|
3512
|
+
/*!********************************************************************************************************!*\
|
|
3513
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs/dist/index.mjs ***!
|
|
3514
|
+
\********************************************************************************************************/
|
|
3515
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3516
|
+
|
|
3517
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRefs: () => (/* binding */ $6ed0406888f73fc4$export$43e446d32b3d21af),\n/* harmony export */ useComposedRefs: () => (/* binding */ $6ed0406888f73fc4$export$c7b2cbe3552a0d05)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$var$setRef(ref, value) {\n if (typeof ref === 'function') ref(value);\n else if (ref !== null && ref !== undefined) ref.current = value;\n}\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {\n return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)\n )\n ;\n}\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs/dist/index.mjs?");
|
|
3518
|
+
|
|
3519
|
+
/***/ }),
|
|
3520
|
+
|
|
3521
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs":
|
|
3522
|
+
/*!*************************************************************************************************************!*\
|
|
3523
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs ***!
|
|
3524
|
+
\*************************************************************************************************************/
|
|
3525
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3526
|
+
|
|
3527
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Branch: () => (/* binding */ $5cb92bef7577960e$export$aecb2ddcb55c95be),\n/* harmony export */ DismissableLayer: () => (/* binding */ $5cb92bef7577960e$export$177fb62ff3ec1f22),\n/* harmony export */ DismissableLayerBranch: () => (/* binding */ $5cb92bef7577960e$export$4d5eb2109db14228),\n/* harmony export */ Root: () => (/* binding */ $5cb92bef7577960e$export$be92b6f5f03c0fe9)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-escape-keydown */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';\nconst $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\nlet $5cb92bef7577960e$var$originalBodyPointerEvents;\nconst $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)({\n layers: new Set(),\n layersWithOutsidePointerEventsDisabled: new Set(),\n branches: new Set()\n});\nconst $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n var _node$ownerDocument;\n const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)($5cb92bef7577960e$var$DismissableLayerContext);\n const [node1, setNode] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;\n const [, force] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({});\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, (node)=>setNode(node)\n );\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled\n ].slice(-1); // prettier-ignore\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore\n const index = node1 ? layers.indexOf(node1) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{\n const target = event.target;\n const isPointerDownOnBranch = [\n ...context.branches\n ].some((branch)=>branch.contains(target)\n );\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);\n onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n }, ownerDocument);\n const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{\n const target = event.target;\n const isFocusInBranch = [\n ...context.branches\n ].some((branch)=>branch.contains(target)\n );\n if (isFocusInBranch) return;\n onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);\n onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n }, ownerDocument);\n (0,_radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_3__.useEscapeKeydown)((event)=>{\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (!node1) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node1);\n }\n context.layers.add(node1);\n $5cb92bef7577960e$var$dispatchUpdate();\n return ()=>{\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;\n };\n }, [\n node1,\n ownerDocument,\n disableOutsidePointerEvents,\n context\n ]);\n /**\n * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n * and add it to the end again so the layering order wouldn't be _creation order_.\n * We only want them to be removed from context stacks when unmounted.\n */ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n return ()=>{\n if (!node1) return;\n context.layers.delete(node1);\n context.layersWithOutsidePointerEventsDisabled.delete(node1);\n $5cb92bef7577960e$var$dispatchUpdate();\n };\n }, [\n node1,\n context\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const handleUpdate = ()=>force({})\n ;\n document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);\n return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)\n ;\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, layerProps, {\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,\n ...props.style\n },\n onFocusCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)\n }));\n});\n/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$177fb62ff3ec1f22, {\n displayName: $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$BRANCH_NAME = 'DismissableLayerBranch';\nconst $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)($5cb92bef7577960e$var$DismissableLayerContext);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, ref);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return ()=>{\n context.branches.delete(node);\n };\n }\n }, [\n context.branches\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs\n }));\n});\n/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$4d5eb2109db14228, {\n displayName: $5cb92bef7577960e$var$BRANCH_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ /**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {\n const handlePointerDownOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onPointerDownOutside);\n const isPointerInsideReactTreeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const handleClickRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(()=>{});\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const handlePointerDown = (event)=>{\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = {\n originalEvent: event\n };\n function handleAndDispatchPointerDownOutsideEvent() {\n $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {\n discrete: true\n });\n }\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executres events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */ if (event.pointerType === 'touch') {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener('click', handleClickRef.current, {\n once: true\n });\n } else handleAndDispatchPointerDownOutsideEvent();\n } else // We need to remove the event listener in case the outside click has been canceled.\n // See: https://github.com/radix-ui/primitives/issues/2171\n ownerDocument.removeEventListener('click', handleClickRef.current);\n isPointerInsideReactTreeRef.current = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is not React specific, but rather how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */ const timerId = window.setTimeout(()=>{\n ownerDocument.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return ()=>{\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n ownerDocument.removeEventListener('click', handleClickRef.current);\n };\n }, [\n ownerDocument,\n handlePointerDownOutside\n ]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true\n };\n}\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {\n const handleFocusOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onFocusOutside);\n const isFocusInsideReactTreeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const handleFocus = (event)=>{\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = {\n originalEvent: event\n };\n $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener('focusin', handleFocus);\n return ()=>ownerDocument.removeEventListener('focusin', handleFocus)\n ;\n }, [\n ownerDocument,\n handleFocusOutside\n ]);\n return {\n onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true\n ,\n onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false\n };\n}\nfunction $5cb92bef7577960e$var$dispatchUpdate() {\n const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, {\n bubbles: false,\n cancelable: true,\n detail: detail\n });\n if (handler) target.addEventListener(name, handler, {\n once: true\n });\n if (discrete) (0,_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.dispatchDiscreteCustomEvent)(target, event);\n else target.dispatchEvent(event);\n}\nconst $5cb92bef7577960e$export$be92b6f5f03c0fe9 = $5cb92bef7577960e$export$177fb62ff3ec1f22;\nconst $5cb92bef7577960e$export$aecb2ddcb55c95be = $5cb92bef7577960e$export$4d5eb2109db14228;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs?");
|
|
3528
|
+
|
|
3529
|
+
/***/ }),
|
|
3530
|
+
|
|
3531
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-guards/dist/index.mjs":
|
|
3532
|
+
/*!********************************************************************************************************!*\
|
|
3533
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-guards/dist/index.mjs ***!
|
|
3534
|
+
\********************************************************************************************************/
|
|
3535
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3536
|
+
|
|
3537
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FocusGuards: () => (/* binding */ $3db38b7d1fb3fe6a$export$ac5b58043b79449b),\n/* harmony export */ Root: () => (/* binding */ $3db38b7d1fb3fe6a$export$be92b6f5f03c0fe9),\n/* harmony export */ useFocusGuards: () => (/* binding */ $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/** Number of components which have requested interest to have focus guards */ let $3db38b7d1fb3fe6a$var$count = 0;\nfunction $3db38b7d1fb3fe6a$export$ac5b58043b79449b(props) {\n $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();\n return props.children;\n}\n/**\n * Injects a pair of focus guards at the edges of the whole DOM tree\n * to ensure `focusin` & `focusout` events can be caught consistently.\n */ function $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c() {\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n var _edgeGuards$, _edgeGuards$2;\n const edgeGuards = document.querySelectorAll('[data-radix-focus-guard]');\n document.body.insertAdjacentElement('afterbegin', (_edgeGuards$ = edgeGuards[0]) !== null && _edgeGuards$ !== void 0 ? _edgeGuards$ : $3db38b7d1fb3fe6a$var$createFocusGuard());\n document.body.insertAdjacentElement('beforeend', (_edgeGuards$2 = edgeGuards[1]) !== null && _edgeGuards$2 !== void 0 ? _edgeGuards$2 : $3db38b7d1fb3fe6a$var$createFocusGuard());\n $3db38b7d1fb3fe6a$var$count++;\n return ()=>{\n if ($3db38b7d1fb3fe6a$var$count === 1) document.querySelectorAll('[data-radix-focus-guard]').forEach((node)=>node.remove()\n );\n $3db38b7d1fb3fe6a$var$count--;\n };\n }, []);\n}\nfunction $3db38b7d1fb3fe6a$var$createFocusGuard() {\n const element = document.createElement('span');\n element.setAttribute('data-radix-focus-guard', '');\n element.tabIndex = 0;\n element.style.cssText = 'outline: none; opacity: 0; position: fixed; pointer-events: none';\n return element;\n}\nconst $3db38b7d1fb3fe6a$export$be92b6f5f03c0fe9 = $3db38b7d1fb3fe6a$export$ac5b58043b79449b;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-guards/dist/index.mjs?");
|
|
3538
|
+
|
|
3539
|
+
/***/ }),
|
|
3540
|
+
|
|
3541
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope/dist/index.mjs":
|
|
3542
|
+
/*!*******************************************************************************************************!*\
|
|
3543
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope/dist/index.mjs ***!
|
|
3544
|
+
\*******************************************************************************************************/
|
|
3545
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3546
|
+
|
|
3547
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ FocusScope: () => (/* binding */ $d3863c46a17e8a28$export$20e40289641fbbb6),\n/* harmony export */ Root: () => (/* binding */ $d3863c46a17e8a28$export$be92b6f5f03c0fe9)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\nconst $d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT = 'focusScope.autoFocusOnMount';\nconst $d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT = 'focusScope.autoFocusOnUnmount';\nconst $d3863c46a17e8a28$var$EVENT_OPTIONS = {\n bubbles: false,\n cancelable: true\n};\n/* -------------------------------------------------------------------------------------------------\n * FocusScope\n * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME = 'FocusScope';\nconst $d3863c46a17e8a28$export$20e40289641fbbb6 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { loop: loop = false , trapped: trapped = false , onMountAutoFocus: onMountAutoFocusProp , onUnmountAutoFocus: onUnmountAutoFocusProp , ...scopeProps } = props;\n const [container1, setContainer] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const onMountAutoFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_2__.useCallbackRef)(onMountAutoFocusProp);\n const onUnmountAutoFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_2__.useCallbackRef)(onUnmountAutoFocusProp);\n const lastFocusedElementRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, (node)=>setContainer(node)\n );\n const focusScope = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)({\n paused: false,\n pause () {\n this.paused = true;\n },\n resume () {\n this.paused = false;\n }\n }).current; // Takes care of trapping focus if focus is moved outside programmatically for example\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (trapped) {\n function handleFocusIn(event) {\n if (focusScope.paused || !container1) return;\n const target = event.target;\n if (container1.contains(target)) lastFocusedElementRef.current = target;\n else $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {\n select: true\n });\n }\n function handleFocusOut(event) {\n if (focusScope.paused || !container1) return;\n const relatedTarget = event.relatedTarget; // A `focusout` event with a `null` `relatedTarget` will happen in at least two cases:\n //\n // 1. When the user switches app/tabs/windows/the browser itself loses focus.\n // 2. In Google Chrome, when the focused element is removed from the DOM.\n //\n // We let the browser do its thing here because:\n //\n // 1. The browser already keeps a memory of what's focused for when the page gets refocused.\n // 2. In Google Chrome, if we try to focus the deleted focused element (as per below), it\n // throws the CPU to 100%, so we avoid doing anything for this reason here too.\n if (relatedTarget === null) return; // If the focus has moved to an actual legitimate element (`relatedTarget !== null`)\n // that is outside the container, we move focus to the last valid focused element inside.\n if (!container1.contains(relatedTarget)) $d3863c46a17e8a28$var$focus(lastFocusedElementRef.current, {\n select: true\n });\n } // When the focused element gets removed from the DOM, browsers move focus\n // back to the document.body. In this case, we move focus to the container\n // to keep focus trapped correctly.\n function handleMutations(mutations) {\n const focusedElement = document.activeElement;\n if (focusedElement !== document.body) return;\n for (const mutation of mutations)if (mutation.removedNodes.length > 0) $d3863c46a17e8a28$var$focus(container1);\n }\n document.addEventListener('focusin', handleFocusIn);\n document.addEventListener('focusout', handleFocusOut);\n const mutationObserver = new MutationObserver(handleMutations);\n if (container1) mutationObserver.observe(container1, {\n childList: true,\n subtree: true\n });\n return ()=>{\n document.removeEventListener('focusin', handleFocusIn);\n document.removeEventListener('focusout', handleFocusOut);\n mutationObserver.disconnect();\n };\n }\n }, [\n trapped,\n container1,\n focusScope.paused\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (container1) {\n $d3863c46a17e8a28$var$focusScopesStack.add(focusScope);\n const previouslyFocusedElement = document.activeElement;\n const hasFocusedCandidate = container1.contains(previouslyFocusedElement);\n if (!hasFocusedCandidate) {\n const mountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);\n container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus);\n container1.dispatchEvent(mountEvent);\n if (!mountEvent.defaultPrevented) {\n $d3863c46a17e8a28$var$focusFirst($d3863c46a17e8a28$var$removeLinks($d3863c46a17e8a28$var$getTabbableCandidates(container1)), {\n select: true\n });\n if (document.activeElement === previouslyFocusedElement) $d3863c46a17e8a28$var$focus(container1);\n }\n }\n return ()=>{\n container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_MOUNT, onMountAutoFocus); // We hit a react bug (fixed in v17) with focusing in unmount.\n // We need to delay the focus a little to get around it for now.\n // See: https://github.com/facebook/react/issues/17894\n setTimeout(()=>{\n const unmountEvent = new CustomEvent($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, $d3863c46a17e8a28$var$EVENT_OPTIONS);\n container1.addEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n container1.dispatchEvent(unmountEvent);\n if (!unmountEvent.defaultPrevented) $d3863c46a17e8a28$var$focus(previouslyFocusedElement !== null && previouslyFocusedElement !== void 0 ? previouslyFocusedElement : document.body, {\n select: true\n });\n // we need to remove the listener after we `dispatchEvent`\n container1.removeEventListener($d3863c46a17e8a28$var$AUTOFOCUS_ON_UNMOUNT, onUnmountAutoFocus);\n $d3863c46a17e8a28$var$focusScopesStack.remove(focusScope);\n }, 0);\n };\n }\n }, [\n container1,\n onMountAutoFocus,\n onUnmountAutoFocus,\n focusScope\n ]); // Takes care of looping focus (when tabbing whilst at the edges)\n const handleKeyDown = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((event)=>{\n if (!loop && !trapped) return;\n if (focusScope.paused) return;\n const isTabKey = event.key === 'Tab' && !event.altKey && !event.ctrlKey && !event.metaKey;\n const focusedElement = document.activeElement;\n if (isTabKey && focusedElement) {\n const container = event.currentTarget;\n const [first, last] = $d3863c46a17e8a28$var$getTabbableEdges(container);\n const hasTabbableElementsInside = first && last; // we can only wrap focus if we have tabbable edges\n if (!hasTabbableElementsInside) {\n if (focusedElement === container) event.preventDefault();\n } else {\n if (!event.shiftKey && focusedElement === last) {\n event.preventDefault();\n if (loop) $d3863c46a17e8a28$var$focus(first, {\n select: true\n });\n } else if (event.shiftKey && focusedElement === first) {\n event.preventDefault();\n if (loop) $d3863c46a17e8a28$var$focus(last, {\n select: true\n });\n }\n }\n }\n }, [\n loop,\n trapped,\n focusScope.paused\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n tabIndex: -1\n }, scopeProps, {\n ref: composedRefs,\n onKeyDown: handleKeyDown\n }));\n});\n/*#__PURE__*/ Object.assign($d3863c46a17e8a28$export$20e40289641fbbb6, {\n displayName: $d3863c46a17e8a28$var$FOCUS_SCOPE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * Utils\n * -----------------------------------------------------------------------------------------------*/ /**\n * Attempts focusing the first element in a list of candidates.\n * Stops when focus has actually moved.\n */ function $d3863c46a17e8a28$var$focusFirst(candidates, { select: select = false } = {}) {\n const previouslyFocusedElement = document.activeElement;\n for (const candidate of candidates){\n $d3863c46a17e8a28$var$focus(candidate, {\n select: select\n });\n if (document.activeElement !== previouslyFocusedElement) return;\n }\n}\n/**\n * Returns the first and last tabbable elements inside a container.\n */ function $d3863c46a17e8a28$var$getTabbableEdges(container) {\n const candidates = $d3863c46a17e8a28$var$getTabbableCandidates(container);\n const first = $d3863c46a17e8a28$var$findVisible(candidates, container);\n const last = $d3863c46a17e8a28$var$findVisible(candidates.reverse(), container);\n return [\n first,\n last\n ];\n}\n/**\n * Returns a list of potential tabbable candidates.\n *\n * NOTE: This is only a close approximation. For example it doesn't take into account cases like when\n * elements are not visible. This cannot be worked out easily by just reading a property, but rather\n * necessitate runtime knowledge (computed styles, etc). We deal with these cases separately.\n *\n * See: https://developer.mozilla.org/en-US/docs/Web/API/TreeWalker\n * Credit: https://github.com/discord/focus-layers/blob/master/src/util/wrapFocus.tsx#L1\n */ function $d3863c46a17e8a28$var$getTabbableCandidates(container) {\n const nodes = [];\n const walker = document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode: (node)=>{\n const isHiddenInput = node.tagName === 'INPUT' && node.type === 'hidden';\n if (node.disabled || node.hidden || isHiddenInput) return NodeFilter.FILTER_SKIP; // `.tabIndex` is not the same as the `tabindex` attribute. It works on the\n // runtime's understanding of tabbability, so this automatically accounts\n // for any kind of element that could be tabbed to.\n return node.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n }\n });\n while(walker.nextNode())nodes.push(walker.currentNode); // we do not take into account the order of nodes with positive `tabIndex` as it\n // hinders accessibility to have tab order different from visual order.\n return nodes;\n}\n/**\n * Returns the first visible element in a list.\n * NOTE: Only checks visibility up to the `container`.\n */ function $d3863c46a17e8a28$var$findVisible(elements, container) {\n for (const element of elements){\n // we stop checking if it's hidden at the `container` level (excluding)\n if (!$d3863c46a17e8a28$var$isHidden(element, {\n upTo: container\n })) return element;\n }\n}\nfunction $d3863c46a17e8a28$var$isHidden(node, { upTo: upTo }) {\n if (getComputedStyle(node).visibility === 'hidden') return true;\n while(node){\n // we stop at `upTo` (excluding it)\n if (upTo !== undefined && node === upTo) return false;\n if (getComputedStyle(node).display === 'none') return true;\n node = node.parentElement;\n }\n return false;\n}\nfunction $d3863c46a17e8a28$var$isSelectableInput(element) {\n return element instanceof HTMLInputElement && 'select' in element;\n}\nfunction $d3863c46a17e8a28$var$focus(element, { select: select = false } = {}) {\n // only focus if that element is focusable\n if (element && element.focus) {\n const previouslyFocusedElement = document.activeElement; // NOTE: we prevent scrolling on focus, to minimize jarring transitions for users\n element.focus({\n preventScroll: true\n }); // only select if its not the same element, it supports selection and we need to select\n if (element !== previouslyFocusedElement && $d3863c46a17e8a28$var$isSelectableInput(element) && select) element.select();\n }\n}\n/* -------------------------------------------------------------------------------------------------\n * FocusScope stack\n * -----------------------------------------------------------------------------------------------*/ const $d3863c46a17e8a28$var$focusScopesStack = $d3863c46a17e8a28$var$createFocusScopesStack();\nfunction $d3863c46a17e8a28$var$createFocusScopesStack() {\n /** A stack of focus scopes, with the active one at the top */ let stack = [];\n return {\n add (focusScope) {\n // pause the currently active focus scope (at the top of the stack)\n const activeFocusScope = stack[0];\n if (focusScope !== activeFocusScope) activeFocusScope === null || activeFocusScope === void 0 || activeFocusScope.pause();\n // remove in case it already exists (because we'll re-add it at the top of the stack)\n stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);\n stack.unshift(focusScope);\n },\n remove (focusScope) {\n var _stack$;\n stack = $d3863c46a17e8a28$var$arrayRemove(stack, focusScope);\n (_stack$ = stack[0]) === null || _stack$ === void 0 || _stack$.resume();\n }\n };\n}\nfunction $d3863c46a17e8a28$var$arrayRemove(array, item) {\n const updatedArray = [\n ...array\n ];\n const index = updatedArray.indexOf(item);\n if (index !== -1) updatedArray.splice(index, 1);\n return updatedArray;\n}\nfunction $d3863c46a17e8a28$var$removeLinks(items) {\n return items.filter((item)=>item.tagName !== 'A'\n );\n}\nconst $d3863c46a17e8a28$export$be92b6f5f03c0fe9 = $d3863c46a17e8a28$export$20e40289641fbbb6;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-focus-scope/dist/index.mjs?");
|
|
3548
|
+
|
|
3549
|
+
/***/ }),
|
|
3550
|
+
|
|
3551
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-id/dist/index.mjs":
|
|
3552
|
+
/*!**********************************************************************************************!*\
|
|
3553
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-id/dist/index.mjs ***!
|
|
3554
|
+
\**********************************************************************************************/
|
|
3555
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3556
|
+
|
|
3557
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useId: () => (/* binding */ $1746a345f3d73bb7$export$f680877a34711e37)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n\n\n\n\n\nconst $1746a345f3d73bb7$var$useReactId = react__WEBPACK_IMPORTED_MODULE_0__['useId'.toString()] || (()=>undefined\n);\nlet $1746a345f3d73bb7$var$count = 0;\nfunction $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {\n const [id, setId] = react__WEBPACK_IMPORTED_MODULE_0__.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(()=>{\n if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)\n );\n }, [\n deterministicId\n ]);\n return deterministicId || (id ? `radix-${id}` : '');\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-id/dist/index.mjs?");
|
|
3558
|
+
|
|
3559
|
+
/***/ }),
|
|
3560
|
+
|
|
3561
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal/dist/index.mjs":
|
|
3562
|
+
/*!**************************************************************************************************!*\
|
|
3563
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal/dist/index.mjs ***!
|
|
3564
|
+
\**************************************************************************************************/
|
|
3565
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3566
|
+
|
|
3567
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Portal: () => (/* binding */ $f1701beae083dbae$export$602eac185826482c),\n/* harmony export */ Root: () => (/* binding */ $f1701beae083dbae$export$be92b6f5f03c0fe9)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$var$PORTAL_NAME = 'Portal';\nconst $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n var _globalThis$document;\n const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props;\n return container ? /*#__PURE__*/ react_dom__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createPortal(/*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_3__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, portalProps, {\n ref: forwardedRef\n })), container) : null;\n});\n/*#__PURE__*/ Object.assign($f1701beae083dbae$export$602eac185826482c, {\n displayName: $f1701beae083dbae$var$PORTAL_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$export$be92b6f5f03c0fe9 = $f1701beae083dbae$export$602eac185826482c;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-portal/dist/index.mjs?");
|
|
3568
|
+
|
|
3569
|
+
/***/ }),
|
|
3570
|
+
|
|
3571
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence/dist/index.mjs":
|
|
3572
|
+
/*!****************************************************************************************************!*\
|
|
3573
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence/dist/index.mjs ***!
|
|
3574
|
+
\****************************************************************************************************/
|
|
3575
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3576
|
+
|
|
3577
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Presence: () => (/* binding */ $921a889cee6df7e8$export$99c2b779aa4e8b8b)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\nfunction $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)((state, event)=>{\n const nextState = machine[state][event];\n return nextState !== null && nextState !== void 0 ? nextState : state;\n }, initialState);\n}\n\n\nconst $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{\n const { present: present , children: children } = props;\n const presence = $921a889cee6df7e8$var$usePresence(present);\n const child = typeof children === 'function' ? children({\n present: presence.isPresent\n }) : react__WEBPACK_IMPORTED_MODULE_0__.Children.only(children);\n const ref = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(presence.ref, child.ref);\n const forceMount = typeof children === 'function';\n return forceMount || presence.isPresent ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child, {\n ref: ref\n }) : null;\n};\n$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {\n const [node1, setNode] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();\n const stylesRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({});\n const prevPresentRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(present);\n const prevAnimationNameRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)('none');\n const initialState = present ? 'mounted' : 'unmounted';\n const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended'\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted'\n },\n unmounted: {\n MOUNT: 'mounted'\n }\n });\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [\n state\n ]);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__.useLayoutEffect)(()=>{\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);\n if (present) send('MOUNT');\n else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n send('UNMOUNT');\n else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */ const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) send('ANIMATION_OUT');\n else send('UNMOUNT');\n }\n prevPresentRef.current = present;\n }\n }, [\n present,\n send\n ]);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__.useLayoutEffect)(()=>{\n if (node1) {\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */ const handleAnimationEnd = (event)=>{\n const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied\n // a frame after the animation ends, creating a flash of visible content.\n // By manually flushing we ensure they sync within a frame, removing the flash.\n (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync)(()=>send('ANIMATION_END')\n );\n };\n const handleAnimationStart = (event)=>{\n if (event.target === node1) // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n };\n node1.addEventListener('animationstart', handleAnimationStart);\n node1.addEventListener('animationcancel', handleAnimationEnd);\n node1.addEventListener('animationend', handleAnimationEnd);\n return ()=>{\n node1.removeEventListener('animationstart', handleAnimationStart);\n node1.removeEventListener('animationcancel', handleAnimationEnd);\n node1.removeEventListener('animationend', handleAnimationEnd);\n };\n } else // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n send('ANIMATION_END');\n }, [\n node1,\n send\n ]);\n return {\n isPresent: [\n 'mounted',\n 'unmountSuspended'\n ].includes(state),\n ref: (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((node)=>{\n if (node) stylesRef.current = getComputedStyle(node);\n setNode(node);\n }, [])\n };\n}\n/* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) {\n return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-presence/dist/index.mjs?");
|
|
3578
|
+
|
|
3579
|
+
/***/ }),
|
|
3580
|
+
|
|
3581
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs":
|
|
3582
|
+
/*!************************************************************************************************************!*\
|
|
3583
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs ***!
|
|
3584
|
+
\************************************************************************************************************/
|
|
3585
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3586
|
+
|
|
3587
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useCallbackRef: () => (/* binding */ $b1b2314f5f9a1d84$export$25bec8c6f54ee79a)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {\n const callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(callback);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n callbackRef.current = callback;\n }); // https://github.com/facebook/react/issues/19240\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>(...args)=>{\n var _callbackRef$current;\n return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);\n }\n , []);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs?");
|
|
3588
|
+
|
|
3589
|
+
/***/ }),
|
|
3590
|
+
|
|
3591
|
+
/***/ "../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs":
|
|
3592
|
+
/*!**************************************************************************************************************!*\
|
|
3593
|
+
!*** ../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs ***!
|
|
3594
|
+
\**************************************************************************************************************/
|
|
3595
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3596
|
+
|
|
3597
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useEscapeKeydown: () => (/* binding */ $addc16e1bbe58fd0$export$3a72a57244d6e765)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n\n\n\n\n\n/**\n * Listens for when the escape key is down\n */ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {\n const onEscapeKeyDown = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onEscapeKeyDownProp);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n const handleKeyDown = (event)=>{\n if (event.key === 'Escape') onEscapeKeyDown(event);\n };\n ownerDocument.addEventListener('keydown', handleKeyDown);\n return ()=>ownerDocument.removeEventListener('keydown', handleKeyDown)\n ;\n }, [\n onEscapeKeyDown,\n ownerDocument\n ]);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs?");
|
|
3048
3598
|
|
|
3049
3599
|
/***/ }),
|
|
3050
3600
|
|
|
@@ -3054,7 +3604,37 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3054
3604
|
\*************************************************************/
|
|
3055
3605
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3056
3606
|
|
|
3057
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ALIGN_OPTIONS: () => (/* binding */ $cf1ac5d9fe0e8206$export$3671ffab7b302fc9),\n/* harmony export */ Anchor: () => (/* binding */ $cf1ac5d9fe0e8206$export$b688253958b8dfe7),\n/* harmony export */ Arrow: () => (/* binding */ $cf1ac5d9fe0e8206$export$21b07c8f274aebd5),\n/* harmony export */ Content: () => (/* binding */ $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2),\n/* harmony export */ Popper: () => (/* binding */ $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9),\n/* harmony export */ PopperAnchor: () => (/* binding */ $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d),\n/* harmony export */ PopperArrow: () => (/* binding */ $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0),\n/* harmony export */ PopperContent: () => (/* binding */ $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc),\n/* harmony export */ Root: () => (/* binding */ $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9),\n/* harmony export */ SIDE_OPTIONS: () => (/* binding */ $cf1ac5d9fe0e8206$export$36f0086da09c4b9f),\n/* harmony export */ createPopperScope: () => (/* binding */ $cf1ac5d9fe0e8206$export$722aac194ae923)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @floating-ui/react-dom */ \"../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs\");\n/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @floating-ui/react-dom */ \"../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs\");\n/* harmony import */ var _radix_ui_react_arrow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-arrow */ \"../node_modules/@radix-ui/react-arrow/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-use-size */ \"../node_modules/@radix-ui/react-use-size/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst $cf1ac5d9fe0e8206$export$36f0086da09c4b9f = [\n 'top',\n 'right',\n 'bottom',\n 'left'\n];\nconst $cf1ac5d9fe0e8206$export$3671ffab7b302fc9 = [\n 'start',\n 'center',\n 'end'\n];\n/* -------------------------------------------------------------------------------------------------\n * Popper\n * -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$POPPER_NAME = 'Popper';\nconst [$cf1ac5d9fe0e8206$var$createPopperContext, $cf1ac5d9fe0e8206$export$722aac194ae923] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)($cf1ac5d9fe0e8206$var$POPPER_NAME);\nconst [$cf1ac5d9fe0e8206$var$PopperProvider, $cf1ac5d9fe0e8206$var$usePopperContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME);\nconst $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9 = (props)=>{\n const { __scopePopper: __scopePopper , children: children } = props;\n const [anchor, setAnchor] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cf1ac5d9fe0e8206$var$PopperProvider, {\n scope: __scopePopper,\n anchor: anchor,\n onAnchorChange: setAnchor\n }, children);\n};\n/*#__PURE__*/ Object.assign($cf1ac5d9fe0e8206$export$badac9ada3a0bdf9, {\n displayName: $cf1ac5d9fe0e8206$var$POPPER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopperAnchor\n * -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ANCHOR_NAME = 'PopperAnchor';\nconst $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopper: __scopePopper , virtualRef: virtualRef , ...anchorProps } = props;\n const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME, __scopePopper);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n // Consumer can anchor the popper to something that isn't\n // a DOM node e.g. pointer position, so we override the\n // `anchorRef` with their virtual ref in this case.\n context.onAnchorChange((virtualRef === null || virtualRef === void 0 ? void 0 : virtualRef.current) || ref.current);\n });\n return virtualRef ? null : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, anchorProps, {\n ref: composedRefs\n }));\n});\n/*#__PURE__*/ Object.assign($cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d, {\n displayName: $cf1ac5d9fe0e8206$var$ANCHOR_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopperContent\n * -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$CONTENT_NAME = 'PopperContent';\nconst [$cf1ac5d9fe0e8206$var$PopperContentProvider, $cf1ac5d9fe0e8206$var$useContentContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME);\nconst $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$trans, _middlewareData$trans2, _middlewareData$hide;\n const { __scopePopper: __scopePopper , side: side = 'bottom' , sideOffset: sideOffset = 0 , align: align = 'center' , alignOffset: alignOffset = 0 , arrowPadding: arrowPadding = 0 , avoidCollisions: avoidCollisions = true , collisionBoundary: collisionBoundary = [] , collisionPadding: collisionPaddingProp = 0 , sticky: sticky = 'partial' , hideWhenDetached: hideWhenDetached = false , updatePositionStrategy: updatePositionStrategy = 'optimized' , onPlaced: onPlaced , ...contentProps } = props;\n const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME, __scopePopper);\n const [content, setContent] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, (node)=>setContent(node)\n );\n const [arrow, setArrow] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const arrowSize = (0,_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_5__.useSize)(arrow);\n const arrowWidth = (_arrowSize$width = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _arrowSize$width !== void 0 ? _arrowSize$width : 0;\n const arrowHeight = (_arrowSize$height = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _arrowSize$height !== void 0 ? _arrowSize$height : 0;\n const desiredPlacement = side + (align !== 'center' ? '-' + align : '');\n const collisionPadding = typeof collisionPaddingProp === 'number' ? collisionPaddingProp : {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...collisionPaddingProp\n };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [\n collisionBoundary\n ];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter($cf1ac5d9fe0e8206$var$isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs: refs , floatingStyles: floatingStyles , placement: placement , isPositioned: isPositioned , middlewareData: middlewareData } = (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.useFloating)({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: 'fixed',\n placement: desiredPlacement,\n whileElementsMounted: (...args)=>{\n const cleanup = (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_7__.autoUpdate)(...args, {\n animationFrame: updatePositionStrategy === 'always'\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.offset)({\n mainAxis: sideOffset + arrowHeight,\n alignmentAxis: alignOffset\n }),\n avoidCollisions && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.shift)({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === 'partial' ? (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.limitShift)() : undefined,\n ...detectOverflowOptions\n }),\n avoidCollisions && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.flip)({\n ...detectOverflowOptions\n }),\n (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.size)({\n ...detectOverflowOptions,\n apply: ({ elements: elements , rects: rects , availableWidth: availableWidth , availableHeight: availableHeight })=>{\n const { width: anchorWidth , height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty('--radix-popper-available-width', `${availableWidth}px`);\n contentStyle.setProperty('--radix-popper-available-height', `${availableHeight}px`);\n contentStyle.setProperty('--radix-popper-anchor-width', `${anchorWidth}px`);\n contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`);\n }\n }),\n arrow && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.arrow)({\n element: arrow,\n padding: arrowPadding\n }),\n $cf1ac5d9fe0e8206$var$transformOrigin({\n arrowWidth: arrowWidth,\n arrowHeight: arrowHeight\n }),\n hideWhenDetached && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.hide)({\n strategy: 'referenceHidden',\n ...detectOverflowOptions\n })\n ]\n });\n const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);\n const handlePlaced = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_8__.useCallbackRef)(onPlaced);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_9__.useLayoutEffect)(()=>{\n if (isPositioned) handlePlaced === null || handlePlaced === void 0 || handlePlaced();\n }, [\n isPositioned,\n handlePlaced\n ]);\n const arrowX = (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x;\n const arrowY = (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y;\n const cannotCenterArrow = ((_middlewareData$arrow3 = middlewareData.arrow) === null || _middlewareData$arrow3 === void 0 ? void 0 : _middlewareData$arrow3.centerOffset) !== 0;\n const [contentZIndex, setContentZIndex] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)();\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_9__.useLayoutEffect)(()=>{\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [\n content\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(\"div\", {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : 'translate(0, -200%)',\n // keep off the page when measuring\n minWidth: 'max-content',\n zIndex: contentZIndex,\n ['--radix-popper-transform-origin']: [\n (_middlewareData$trans = middlewareData.transformOrigin) === null || _middlewareData$trans === void 0 ? void 0 : _middlewareData$trans.x,\n (_middlewareData$trans2 = middlewareData.transformOrigin) === null || _middlewareData$trans2 === void 0 ? void 0 : _middlewareData$trans2.y\n ].join(' ')\n } // Floating UI interally calculates logical alignment based the `dir` attribute on\n ,\n dir: props.dir\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cf1ac5d9fe0e8206$var$PopperContentProvider, {\n scope: __scopePopper,\n placedSide: placedSide,\n onArrowChange: setArrow,\n arrowX: arrowX,\n arrowY: arrowY,\n shouldHideArrow: cannotCenterArrow\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-side\": placedSide,\n \"data-align\": placedAlign\n }, contentProps, {\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? 'none' : undefined,\n // hide the content if using the hide middleware and should be hidden\n opacity: (_middlewareData$hide = middlewareData.hide) !== null && _middlewareData$hide !== void 0 && _middlewareData$hide.referenceHidden ? 0 : undefined\n }\n }))));\n});\n/*#__PURE__*/ Object.assign($cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc, {\n displayName: $cf1ac5d9fe0e8206$var$CONTENT_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopperArrow\n * -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ARROW_NAME = 'PopperArrow';\nconst $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right'\n};\nconst $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0(props, forwardedRef) {\n const { __scopePopper: __scopePopper , ...arrowProps } = props;\n const contentContext = $cf1ac5d9fe0e8206$var$useContentContext($cf1ac5d9fe0e8206$var$ARROW_NAME, __scopePopper);\n const baseSide = $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE[contentContext.placedSide];\n return(/*#__PURE__*/ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(\"span\", {\n ref: contentContext.onArrowChange,\n style: {\n position: 'absolute',\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: '',\n right: '0 0',\n bottom: 'center 0',\n left: '100% 0'\n }[contentContext.placedSide],\n transform: {\n top: 'translateY(100%)',\n right: 'translateY(50%) rotate(90deg) translateX(-50%)',\n bottom: `rotate(180deg)`,\n left: 'translateY(50%) rotate(-90deg) translateX(50%)'\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? 'hidden' : undefined\n }\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_arrow__WEBPACK_IMPORTED_MODULE_10__.Root, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, arrowProps, {\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: 'block'\n }\n }))));\n});\n/*#__PURE__*/ Object.assign($cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0, {\n displayName: $cf1ac5d9fe0e8206$var$ARROW_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ function $cf1ac5d9fe0e8206$var$isNotNull(value) {\n return value !== null;\n}\nconst $cf1ac5d9fe0e8206$var$transformOrigin = (options)=>({\n name: 'transformOrigin',\n options: options,\n fn (data) {\n var _middlewareData$arrow4, _middlewareData$arrow5, _middlewareData$arrow6, _middlewareData$arrow7, _middlewareData$arrow8;\n const { placement: placement , rects: rects , middlewareData: middlewareData } = data;\n const cannotCenterArrow = ((_middlewareData$arrow4 = middlewareData.arrow) === null || _middlewareData$arrow4 === void 0 ? void 0 : _middlewareData$arrow4.centerOffset) !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);\n const noArrowAlign = {\n start: '0%',\n center: '50%',\n end: '100%'\n }[placedAlign];\n const arrowXCenter = ((_middlewareData$arrow5 = (_middlewareData$arrow6 = middlewareData.arrow) === null || _middlewareData$arrow6 === void 0 ? void 0 : _middlewareData$arrow6.x) !== null && _middlewareData$arrow5 !== void 0 ? _middlewareData$arrow5 : 0) + arrowWidth / 2;\n const arrowYCenter = ((_middlewareData$arrow7 = (_middlewareData$arrow8 = middlewareData.arrow) === null || _middlewareData$arrow8 === void 0 ? void 0 : _middlewareData$arrow8.y) !== null && _middlewareData$arrow7 !== void 0 ? _middlewareData$arrow7 : 0) + arrowHeight / 2;\n let x = '';\n let y = '';\n if (placedSide === 'bottom') {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === 'top') {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === 'right') {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === 'left') {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return {\n data: {\n x: x,\n y: y\n }\n };\n }\n })\n;\nfunction $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement) {\n const [side, align = 'center'] = placement.split('-');\n return [\n side,\n align\n ];\n}\nconst $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 = $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9;\nconst $cf1ac5d9fe0e8206$export$b688253958b8dfe7 = $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d;\nconst $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 = $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc;\nconst $cf1ac5d9fe0e8206$export$21b07c8f274aebd5 = $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popper/dist/index.mjs?");
|
|
3607
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ ALIGN_OPTIONS: () => (/* binding */ $cf1ac5d9fe0e8206$export$3671ffab7b302fc9),\n/* harmony export */ Anchor: () => (/* binding */ $cf1ac5d9fe0e8206$export$b688253958b8dfe7),\n/* harmony export */ Arrow: () => (/* binding */ $cf1ac5d9fe0e8206$export$21b07c8f274aebd5),\n/* harmony export */ Content: () => (/* binding */ $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2),\n/* harmony export */ Popper: () => (/* binding */ $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9),\n/* harmony export */ PopperAnchor: () => (/* binding */ $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d),\n/* harmony export */ PopperArrow: () => (/* binding */ $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0),\n/* harmony export */ PopperContent: () => (/* binding */ $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc),\n/* harmony export */ Root: () => (/* binding */ $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9),\n/* harmony export */ SIDE_OPTIONS: () => (/* binding */ $cf1ac5d9fe0e8206$export$36f0086da09c4b9f),\n/* harmony export */ createPopperScope: () => (/* binding */ $cf1ac5d9fe0e8206$export$722aac194ae923)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @floating-ui/react-dom */ \"../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs\");\n/* harmony import */ var _floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @floating-ui/react-dom */ \"../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs\");\n/* harmony import */ var _radix_ui_react_arrow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-arrow */ \"../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-arrow/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-use-size */ \"../node_modules/@radix-ui/react-use-size/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst $cf1ac5d9fe0e8206$export$36f0086da09c4b9f = [\n 'top',\n 'right',\n 'bottom',\n 'left'\n];\nconst $cf1ac5d9fe0e8206$export$3671ffab7b302fc9 = [\n 'start',\n 'center',\n 'end'\n];\n/* -------------------------------------------------------------------------------------------------\n * Popper\n * -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$POPPER_NAME = 'Popper';\nconst [$cf1ac5d9fe0e8206$var$createPopperContext, $cf1ac5d9fe0e8206$export$722aac194ae923] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)($cf1ac5d9fe0e8206$var$POPPER_NAME);\nconst [$cf1ac5d9fe0e8206$var$PopperProvider, $cf1ac5d9fe0e8206$var$usePopperContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$POPPER_NAME);\nconst $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9 = (props)=>{\n const { __scopePopper: __scopePopper , children: children } = props;\n const [anchor, setAnchor] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cf1ac5d9fe0e8206$var$PopperProvider, {\n scope: __scopePopper,\n anchor: anchor,\n onAnchorChange: setAnchor\n }, children);\n};\n/*#__PURE__*/ Object.assign($cf1ac5d9fe0e8206$export$badac9ada3a0bdf9, {\n displayName: $cf1ac5d9fe0e8206$var$POPPER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopperAnchor\n * -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ANCHOR_NAME = 'PopperAnchor';\nconst $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopePopper: __scopePopper , virtualRef: virtualRef , ...anchorProps } = props;\n const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$ANCHOR_NAME, __scopePopper);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, ref);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n // Consumer can anchor the popper to something that isn't\n // a DOM node e.g. pointer position, so we override the\n // `anchorRef` with their virtual ref in this case.\n context.onAnchorChange((virtualRef === null || virtualRef === void 0 ? void 0 : virtualRef.current) || ref.current);\n });\n return virtualRef ? null : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, anchorProps, {\n ref: composedRefs\n }));\n});\n/*#__PURE__*/ Object.assign($cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d, {\n displayName: $cf1ac5d9fe0e8206$var$ANCHOR_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopperContent\n * -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$CONTENT_NAME = 'PopperContent';\nconst [$cf1ac5d9fe0e8206$var$PopperContentProvider, $cf1ac5d9fe0e8206$var$useContentContext] = $cf1ac5d9fe0e8206$var$createPopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME);\nconst $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n var _arrowSize$width, _arrowSize$height, _middlewareData$arrow, _middlewareData$arrow2, _middlewareData$arrow3, _middlewareData$trans, _middlewareData$trans2, _middlewareData$hide;\n const { __scopePopper: __scopePopper , side: side = 'bottom' , sideOffset: sideOffset = 0 , align: align = 'center' , alignOffset: alignOffset = 0 , arrowPadding: arrowPadding = 0 , avoidCollisions: avoidCollisions = true , collisionBoundary: collisionBoundary = [] , collisionPadding: collisionPaddingProp = 0 , sticky: sticky = 'partial' , hideWhenDetached: hideWhenDetached = false , updatePositionStrategy: updatePositionStrategy = 'optimized' , onPlaced: onPlaced , ...contentProps } = props;\n const context = $cf1ac5d9fe0e8206$var$usePopperContext($cf1ac5d9fe0e8206$var$CONTENT_NAME, __scopePopper);\n const [content, setContent] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_3__.useComposedRefs)(forwardedRef, (node)=>setContent(node)\n );\n const [arrow, setArrow] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const arrowSize = (0,_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_5__.useSize)(arrow);\n const arrowWidth = (_arrowSize$width = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.width) !== null && _arrowSize$width !== void 0 ? _arrowSize$width : 0;\n const arrowHeight = (_arrowSize$height = arrowSize === null || arrowSize === void 0 ? void 0 : arrowSize.height) !== null && _arrowSize$height !== void 0 ? _arrowSize$height : 0;\n const desiredPlacement = side + (align !== 'center' ? '-' + align : '');\n const collisionPadding = typeof collisionPaddingProp === 'number' ? collisionPaddingProp : {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...collisionPaddingProp\n };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [\n collisionBoundary\n ];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter($cf1ac5d9fe0e8206$var$isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs: refs , floatingStyles: floatingStyles , placement: placement , isPositioned: isPositioned , middlewareData: middlewareData } = (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.useFloating)({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: 'fixed',\n placement: desiredPlacement,\n whileElementsMounted: (...args)=>{\n const cleanup = (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_7__.autoUpdate)(...args, {\n animationFrame: updatePositionStrategy === 'always'\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.offset)({\n mainAxis: sideOffset + arrowHeight,\n alignmentAxis: alignOffset\n }),\n avoidCollisions && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.shift)({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === 'partial' ? (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.limitShift)() : undefined,\n ...detectOverflowOptions\n }),\n avoidCollisions && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.flip)({\n ...detectOverflowOptions\n }),\n (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.size)({\n ...detectOverflowOptions,\n apply: ({ elements: elements , rects: rects , availableWidth: availableWidth , availableHeight: availableHeight })=>{\n const { width: anchorWidth , height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty('--radix-popper-available-width', `${availableWidth}px`);\n contentStyle.setProperty('--radix-popper-available-height', `${availableHeight}px`);\n contentStyle.setProperty('--radix-popper-anchor-width', `${anchorWidth}px`);\n contentStyle.setProperty('--radix-popper-anchor-height', `${anchorHeight}px`);\n }\n }),\n arrow && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.arrow)({\n element: arrow,\n padding: arrowPadding\n }),\n $cf1ac5d9fe0e8206$var$transformOrigin({\n arrowWidth: arrowWidth,\n arrowHeight: arrowHeight\n }),\n hideWhenDetached && (0,_floating_ui_react_dom__WEBPACK_IMPORTED_MODULE_6__.hide)({\n strategy: 'referenceHidden',\n ...detectOverflowOptions\n })\n ]\n });\n const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);\n const handlePlaced = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_8__.useCallbackRef)(onPlaced);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_9__.useLayoutEffect)(()=>{\n if (isPositioned) handlePlaced === null || handlePlaced === void 0 || handlePlaced();\n }, [\n isPositioned,\n handlePlaced\n ]);\n const arrowX = (_middlewareData$arrow = middlewareData.arrow) === null || _middlewareData$arrow === void 0 ? void 0 : _middlewareData$arrow.x;\n const arrowY = (_middlewareData$arrow2 = middlewareData.arrow) === null || _middlewareData$arrow2 === void 0 ? void 0 : _middlewareData$arrow2.y;\n const cannotCenterArrow = ((_middlewareData$arrow3 = middlewareData.arrow) === null || _middlewareData$arrow3 === void 0 ? void 0 : _middlewareData$arrow3.centerOffset) !== 0;\n const [contentZIndex, setContentZIndex] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)();\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_9__.useLayoutEffect)(()=>{\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [\n content\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(\"div\", {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : 'translate(0, -200%)',\n // keep off the page when measuring\n minWidth: 'max-content',\n zIndex: contentZIndex,\n ['--radix-popper-transform-origin']: [\n (_middlewareData$trans = middlewareData.transformOrigin) === null || _middlewareData$trans === void 0 ? void 0 : _middlewareData$trans.x,\n (_middlewareData$trans2 = middlewareData.transformOrigin) === null || _middlewareData$trans2 === void 0 ? void 0 : _middlewareData$trans2.y\n ].join(' ')\n } // Floating UI interally calculates logical alignment based the `dir` attribute on\n ,\n dir: props.dir\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($cf1ac5d9fe0e8206$var$PopperContentProvider, {\n scope: __scopePopper,\n placedSide: placedSide,\n onArrowChange: setArrow,\n arrowX: arrowX,\n arrowY: arrowY,\n shouldHideArrow: cannotCenterArrow\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-side\": placedSide,\n \"data-align\": placedAlign\n }, contentProps, {\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? 'none' : undefined,\n // hide the content if using the hide middleware and should be hidden\n opacity: (_middlewareData$hide = middlewareData.hide) !== null && _middlewareData$hide !== void 0 && _middlewareData$hide.referenceHidden ? 0 : undefined\n }\n }))));\n});\n/*#__PURE__*/ Object.assign($cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc, {\n displayName: $cf1ac5d9fe0e8206$var$CONTENT_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * PopperArrow\n * -----------------------------------------------------------------------------------------------*/ const $cf1ac5d9fe0e8206$var$ARROW_NAME = 'PopperArrow';\nconst $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE = {\n top: 'bottom',\n right: 'left',\n bottom: 'top',\n left: 'right'\n};\nconst $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0(props, forwardedRef) {\n const { __scopePopper: __scopePopper , ...arrowProps } = props;\n const contentContext = $cf1ac5d9fe0e8206$var$useContentContext($cf1ac5d9fe0e8206$var$ARROW_NAME, __scopePopper);\n const baseSide = $cf1ac5d9fe0e8206$var$OPPOSITE_SIDE[contentContext.placedSide];\n return(/*#__PURE__*/ // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(\"span\", {\n ref: contentContext.onArrowChange,\n style: {\n position: 'absolute',\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: '',\n right: '0 0',\n bottom: 'center 0',\n left: '100% 0'\n }[contentContext.placedSide],\n transform: {\n top: 'translateY(100%)',\n right: 'translateY(50%) rotate(90deg) translateX(-50%)',\n bottom: `rotate(180deg)`,\n left: 'translateY(50%) rotate(-90deg) translateX(50%)'\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? 'hidden' : undefined\n }\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_arrow__WEBPACK_IMPORTED_MODULE_10__.Root, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, arrowProps, {\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: 'block'\n }\n }))));\n});\n/*#__PURE__*/ Object.assign($cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0, {\n displayName: $cf1ac5d9fe0e8206$var$ARROW_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ function $cf1ac5d9fe0e8206$var$isNotNull(value) {\n return value !== null;\n}\nconst $cf1ac5d9fe0e8206$var$transformOrigin = (options)=>({\n name: 'transformOrigin',\n options: options,\n fn (data) {\n var _middlewareData$arrow4, _middlewareData$arrow5, _middlewareData$arrow6, _middlewareData$arrow7, _middlewareData$arrow8;\n const { placement: placement , rects: rects , middlewareData: middlewareData } = data;\n const cannotCenterArrow = ((_middlewareData$arrow4 = middlewareData.arrow) === null || _middlewareData$arrow4 === void 0 ? void 0 : _middlewareData$arrow4.centerOffset) !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement);\n const noArrowAlign = {\n start: '0%',\n center: '50%',\n end: '100%'\n }[placedAlign];\n const arrowXCenter = ((_middlewareData$arrow5 = (_middlewareData$arrow6 = middlewareData.arrow) === null || _middlewareData$arrow6 === void 0 ? void 0 : _middlewareData$arrow6.x) !== null && _middlewareData$arrow5 !== void 0 ? _middlewareData$arrow5 : 0) + arrowWidth / 2;\n const arrowYCenter = ((_middlewareData$arrow7 = (_middlewareData$arrow8 = middlewareData.arrow) === null || _middlewareData$arrow8 === void 0 ? void 0 : _middlewareData$arrow8.y) !== null && _middlewareData$arrow7 !== void 0 ? _middlewareData$arrow7 : 0) + arrowHeight / 2;\n let x = '';\n let y = '';\n if (placedSide === 'bottom') {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === 'top') {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === 'right') {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === 'left') {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return {\n data: {\n x: x,\n y: y\n }\n };\n }\n })\n;\nfunction $cf1ac5d9fe0e8206$var$getSideAndAlignFromPlacement(placement) {\n const [side, align = 'center'] = placement.split('-');\n return [\n side,\n align\n ];\n}\nconst $cf1ac5d9fe0e8206$export$be92b6f5f03c0fe9 = $cf1ac5d9fe0e8206$export$badac9ada3a0bdf9;\nconst $cf1ac5d9fe0e8206$export$b688253958b8dfe7 = $cf1ac5d9fe0e8206$export$ecd4e1ccab6ed6d;\nconst $cf1ac5d9fe0e8206$export$7c6e2c02157bb7d2 = $cf1ac5d9fe0e8206$export$bc4ae5855d3c4fc;\nconst $cf1ac5d9fe0e8206$export$21b07c8f274aebd5 = $cf1ac5d9fe0e8206$export$79d62cd4e10a3fd0;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popper/dist/index.mjs?");
|
|
3608
|
+
|
|
3609
|
+
/***/ }),
|
|
3610
|
+
|
|
3611
|
+
/***/ "../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-arrow/dist/index.mjs":
|
|
3612
|
+
/*!************************************************************************************************!*\
|
|
3613
|
+
!*** ../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-arrow/dist/index.mjs ***!
|
|
3614
|
+
\************************************************************************************************/
|
|
3615
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3616
|
+
|
|
3617
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Arrow: () => (/* binding */ $7e8f5cd07187803e$export$21b07c8f274aebd5),\n/* harmony export */ Root: () => (/* binding */ $7e8f5cd07187803e$export$be92b6f5f03c0fe9)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Arrow\n * -----------------------------------------------------------------------------------------------*/ const $7e8f5cd07187803e$var$NAME = 'Arrow';\nconst $7e8f5cd07187803e$export$21b07c8f274aebd5 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { children: children , width: width = 10 , height: height = 5 , ...arrowProps } = props;\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_2__.Primitive.svg, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, arrowProps, {\n ref: forwardedRef,\n width: width,\n height: height,\n viewBox: \"0 0 30 10\",\n preserveAspectRatio: \"none\"\n }), props.asChild ? children : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(\"polygon\", {\n points: \"0,0 30,0 15,10\"\n }));\n});\n/*#__PURE__*/ Object.assign($7e8f5cd07187803e$export$21b07c8f274aebd5, {\n displayName: $7e8f5cd07187803e$var$NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $7e8f5cd07187803e$export$be92b6f5f03c0fe9 = $7e8f5cd07187803e$export$21b07c8f274aebd5;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-arrow/dist/index.mjs?");
|
|
3618
|
+
|
|
3619
|
+
/***/ }),
|
|
3620
|
+
|
|
3621
|
+
/***/ "../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-compose-refs/dist/index.mjs":
|
|
3622
|
+
/*!*******************************************************************************************************!*\
|
|
3623
|
+
!*** ../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-compose-refs/dist/index.mjs ***!
|
|
3624
|
+
\*******************************************************************************************************/
|
|
3625
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3626
|
+
|
|
3627
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRefs: () => (/* binding */ $6ed0406888f73fc4$export$43e446d32b3d21af),\n/* harmony export */ useComposedRefs: () => (/* binding */ $6ed0406888f73fc4$export$c7b2cbe3552a0d05)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$var$setRef(ref, value) {\n if (typeof ref === 'function') ref(value);\n else if (ref !== null && ref !== undefined) ref.current = value;\n}\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {\n return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)\n )\n ;\n}\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-compose-refs/dist/index.mjs?");
|
|
3628
|
+
|
|
3629
|
+
/***/ }),
|
|
3630
|
+
|
|
3631
|
+
/***/ "../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs":
|
|
3632
|
+
/*!***********************************************************************************************************!*\
|
|
3633
|
+
!*** ../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs ***!
|
|
3634
|
+
\***********************************************************************************************************/
|
|
3635
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3636
|
+
|
|
3637
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useCallbackRef: () => (/* binding */ $b1b2314f5f9a1d84$export$25bec8c6f54ee79a)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {\n const callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(callback);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n callbackRef.current = callback;\n }); // https://github.com/facebook/react/issues/19240\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>(...args)=>{\n var _callbackRef$current;\n return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);\n }\n , []);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-popper/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs?");
|
|
3058
3638
|
|
|
3059
3639
|
/***/ }),
|
|
3060
3640
|
|
|
@@ -3064,7 +3644,37 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3064
3644
|
\*************************************************************/
|
|
3065
3645
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3066
3646
|
|
|
3067
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Portal: () => (/* binding */
|
|
3647
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Portal: () => (/* binding */ Portal),\n/* harmony export */ Root: () => (/* binding */ Root)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\"use client\";\n\n// packages/react/portal/src/Portal.tsx\n\n\n\n\n\nvar PORTAL_NAME = \"Portal\";\nvar Portal = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { container: containerProp, ...portalProps } = props;\n const [mounted, setMounted] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__.useLayoutEffect)(() => setMounted(true), []);\n const container = containerProp || mounted && globalThis?.document?.body;\n return container ? react_dom__WEBPACK_IMPORTED_MODULE_1__[\"default\"].createPortal(/* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, { ...portalProps, ref: forwardedRef }), container) : null;\n});\nPortal.displayName = PORTAL_NAME;\nvar Root = Portal;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-portal/dist/index.mjs?");
|
|
3648
|
+
|
|
3649
|
+
/***/ }),
|
|
3650
|
+
|
|
3651
|
+
/***/ "../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs":
|
|
3652
|
+
/*!****************************************************************************************************!*\
|
|
3653
|
+
!*** ../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs ***!
|
|
3654
|
+
\****************************************************************************************************/
|
|
3655
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3656
|
+
|
|
3657
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Primitive: () => (/* binding */ Primitive),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ dispatchDiscreteCustomEvent: () => (/* binding */ dispatchDiscreteCustomEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/primitive/src/Primitive.tsx\n\n\n\n\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-primitive/dist/index.mjs?");
|
|
3658
|
+
|
|
3659
|
+
/***/ }),
|
|
3660
|
+
|
|
3661
|
+
/***/ "../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs":
|
|
3662
|
+
/*!***********************************************************************************************!*\
|
|
3663
|
+
!*** ../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs ***!
|
|
3664
|
+
\***********************************************************************************************/
|
|
3665
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3666
|
+
|
|
3667
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Slot: () => (/* binding */ Slot),\n/* harmony export */ Slottable: () => (/* binding */ Slottable)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/slot/src/Slot.tsx\n\n\n\nvar Slot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null);\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, childrenRef) : childrenRef\n });\n }\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children });\n};\nfunction isSlottable(child) {\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
3668
|
+
|
|
3669
|
+
/***/ }),
|
|
3670
|
+
|
|
3671
|
+
/***/ "../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs":
|
|
3672
|
+
/*!************************************************************************************************************!*\
|
|
3673
|
+
!*** ../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs ***!
|
|
3674
|
+
\************************************************************************************************************/
|
|
3675
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3676
|
+
|
|
3677
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLayoutEffect: () => (/* binding */ useLayoutEffect2)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n// packages/react/use-layout-effect/src/useLayoutEffect.tsx\n\nvar useLayoutEffect2 = Boolean(globalThis?.document) ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : () => {\n};\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-portal/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs?");
|
|
3068
3678
|
|
|
3069
3679
|
/***/ }),
|
|
3070
3680
|
|
|
@@ -3074,7 +3684,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3074
3684
|
\***************************************************************/
|
|
3075
3685
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3076
3686
|
|
|
3077
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Presence: () => (/* binding */
|
|
3687
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Presence: () => (/* binding */ Presence)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n\"use client\";\n\n// packages/react/presence/src/Presence.tsx\n\n\n\n\n// packages/react/presence/src/useStateMachine.tsx\n\nfunction useStateMachine(initialState, machine) {\n return react__WEBPACK_IMPORTED_MODULE_0__.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// packages/react/presence/src/Presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : react__WEBPACK_IMPORTED_MODULE_0__.Children.only(children);\n const ref = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_1__.useComposedRefs)(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = react__WEBPACK_IMPORTED_MODULE_0__.useState();\n const stylesRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef({});\n const prevPresentRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(present);\n const prevAnimationNameRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_2__.useLayoutEffect)(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_2__.useLayoutEffect)(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: react__WEBPACK_IMPORTED_MODULE_0__.useCallback((node2) => {\n if (node2) stylesRef.current = getComputedStyle(node2);\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-presence/dist/index.mjs?");
|
|
3688
|
+
|
|
3689
|
+
/***/ }),
|
|
3690
|
+
|
|
3691
|
+
/***/ "../node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs":
|
|
3692
|
+
/*!**************************************************************************************************************!*\
|
|
3693
|
+
!*** ../node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs ***!
|
|
3694
|
+
\**************************************************************************************************************/
|
|
3695
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3696
|
+
|
|
3697
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLayoutEffect: () => (/* binding */ useLayoutEffect2)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n// packages/react/use-layout-effect/src/useLayoutEffect.tsx\n\nvar useLayoutEffect2 = Boolean(globalThis?.document) ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : () => {\n};\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-presence/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs?");
|
|
3078
3698
|
|
|
3079
3699
|
/***/ }),
|
|
3080
3700
|
|
|
@@ -3088,13 +3708,103 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3088
3708
|
|
|
3089
3709
|
/***/ }),
|
|
3090
3710
|
|
|
3711
|
+
/***/ "../node_modules/@radix-ui/react-roving-focus/dist/index.mjs":
|
|
3712
|
+
/*!*******************************************************************!*\
|
|
3713
|
+
!*** ../node_modules/@radix-ui/react-roving-focus/dist/index.mjs ***!
|
|
3714
|
+
\*******************************************************************/
|
|
3715
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3716
|
+
|
|
3717
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Item: () => (/* binding */ Item),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ RovingFocusGroup: () => (/* binding */ RovingFocusGroup),\n/* harmony export */ RovingFocusGroupItem: () => (/* binding */ RovingFocusGroupItem),\n/* harmony export */ createRovingFocusGroupScope: () => (/* binding */ createRovingFocusGroupScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-collection */ \"../node_modules/@radix-ui/react-collection/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-id */ \"../node_modules/@radix-ui/react-id/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-direction */ \"../node_modules/@radix-ui/react-direction/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n\"use client\";\n\n// packages/react/roving-focus/src/RovingFocusGroup.tsx\n\n\n\n\n\n\n\n\n\n\n\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = (0,_radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__.createCollection)(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__.createContextScope)(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = react__WEBPACK_IMPORTED_MODULE_0__.useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, ref);\n const direction = (0,_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_5__.useDirection)(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_6__.useControllableState)({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = react__WEBPACK_IMPORTED_MODULE_0__.useState(false);\n const handleEntryFocus = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_7__.useCallbackRef)(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = react__WEBPACK_IMPORTED_MODULE_0__.useState(0);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_8__.Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_9__.composeEventHandlers)(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_9__.composeEventHandlers)(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_9__.composeEventHandlers)(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n ...itemProps\n } = props;\n const autoId = (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_10__.useId)();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove } = context;\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(\n _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_8__.Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_9__.composeEventHandlers)(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_9__.composeEventHandlers)(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_9__.composeEventHandlers)(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n })\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-roving-focus/dist/index.mjs?");
|
|
3718
|
+
|
|
3719
|
+
/***/ }),
|
|
3720
|
+
|
|
3721
|
+
/***/ "../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context/dist/index.mjs":
|
|
3722
|
+
/*!********************************************************************************************************!*\
|
|
3723
|
+
!*** ../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context/dist/index.mjs ***!
|
|
3724
|
+
\********************************************************************************************************/
|
|
3725
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3726
|
+
|
|
3727
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createContext: () => (/* binding */ createContext2),\n/* harmony export */ createContextScope: () => (/* binding */ createContextScope)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/context/src/createContext.tsx\n\n\nfunction createContext2(rootComponentName, defaultContext) {\n const Context = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n function Provider(props) {\n const { children, ...context } = props;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n }\n function useContext2(consumerName) {\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n}\nfunction createContextScope(scopeName, createContextScopeDeps = []) {\n let defaultContexts = [];\n function createContext3(rootComponentName, defaultContext) {\n const BaseContext = react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n const index = defaultContexts.length;\n defaultContexts = [...defaultContexts, defaultContext];\n function Provider(props) {\n const { scope, children, ...context } = props;\n const Context = scope?.[scopeName][index] || BaseContext;\n const value = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => context, Object.values(context));\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(Context.Provider, { value, children });\n }\n function useContext2(consumerName, scope) {\n const Context = scope?.[scopeName][index] || BaseContext;\n const context = react__WEBPACK_IMPORTED_MODULE_0__.useContext(Context);\n if (context) return context;\n if (defaultContext !== void 0) return defaultContext;\n throw new Error(`\\`${consumerName}\\` must be used within \\`${rootComponentName}\\``);\n }\n Provider.displayName = rootComponentName + \"Provider\";\n return [Provider, useContext2];\n }\n const createScope = () => {\n const scopeContexts = defaultContexts.map((defaultContext) => {\n return react__WEBPACK_IMPORTED_MODULE_0__.createContext(defaultContext);\n });\n return function useScope(scope) {\n const contexts = scope?.[scopeName] || scopeContexts;\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(\n () => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),\n [scope, contexts]\n );\n };\n };\n createScope.scopeName = scopeName;\n return [createContext3, composeContextScopes(createScope, ...createContextScopeDeps)];\n}\nfunction composeContextScopes(...scopes) {\n const baseScope = scopes[0];\n if (scopes.length === 1) return baseScope;\n const createScope = () => {\n const scopeHooks = scopes.map((createScope2) => ({\n useScope: createScope2(),\n scopeName: createScope2.scopeName\n }));\n return function useComposedScopes(overrideScopes) {\n const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {\n const scopeProps = useScope(overrideScopes);\n const currentScope = scopeProps[`__scope${scopeName}`];\n return { ...nextScopes2, ...currentScope };\n }, {});\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);\n };\n };\n createScope.scopeName = baseScope.scopeName;\n return createScope;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-context/dist/index.mjs?");
|
|
3728
|
+
|
|
3729
|
+
/***/ }),
|
|
3730
|
+
|
|
3731
|
+
/***/ "../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-primitive/dist/index.mjs":
|
|
3732
|
+
/*!**********************************************************************************************************!*\
|
|
3733
|
+
!*** ../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-primitive/dist/index.mjs ***!
|
|
3734
|
+
\**********************************************************************************************************/
|
|
3735
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3736
|
+
|
|
3737
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Primitive: () => (/* binding */ Primitive),\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ dispatchDiscreteCustomEvent: () => (/* binding */ dispatchDiscreteCustomEvent)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/primitive/src/Primitive.tsx\n\n\n\n\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Node = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-primitive/dist/index.mjs?");
|
|
3738
|
+
|
|
3739
|
+
/***/ }),
|
|
3740
|
+
|
|
3741
|
+
/***/ "../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-slot/dist/index.mjs":
|
|
3742
|
+
/*!*****************************************************************************************************!*\
|
|
3743
|
+
!*** ../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-slot/dist/index.mjs ***!
|
|
3744
|
+
\*****************************************************************************************************/
|
|
3745
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3746
|
+
|
|
3747
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ Root),\n/* harmony export */ Slot: () => (/* binding */ Slot),\n/* harmony export */ Slottable: () => (/* binding */ Slottable)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react/jsx-runtime */ \"../node_modules/react/jsx-runtime.js\");\n// packages/react/slot/src/Slot.tsx\n\n\n\nvar Slot = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_0__.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (react__WEBPACK_IMPORTED_MODULE_0__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null);\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(newElement) ? react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });\n});\nSlot.displayName = \"Slot\";\nvar SlotClone = react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n return react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(children, {\n ...mergeProps(slotProps, children.props),\n // @ts-ignore\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, childrenRef) : childrenRef\n });\n }\n return react__WEBPACK_IMPORTED_MODULE_0__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_0__.Children.only(null) : null;\n});\nSlotClone.displayName = \"SlotClone\";\nvar Slottable = ({ children }) => {\n return /* @__PURE__ */ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.Fragment, { children });\n};\nfunction isSlottable(child) {\n return react__WEBPACK_IMPORTED_MODULE_0__.isValidElement(child) && child.type === Slottable;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n childPropValue(...args);\n slotPropValue(...args);\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Slot;\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
3748
|
+
|
|
3749
|
+
/***/ }),
|
|
3750
|
+
|
|
3751
|
+
/***/ "../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs":
|
|
3752
|
+
/*!***********************************************************************************************************************!*\
|
|
3753
|
+
!*** ../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs ***!
|
|
3754
|
+
\***********************************************************************************************************************/
|
|
3755
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3756
|
+
|
|
3757
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useControllableState: () => (/* binding */ useControllableState)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n// packages/react/use-controllable-state/src/useControllableState.tsx\n\n\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n }\n}) {\n const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState({ defaultProp, onChange });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n const setValue = react__WEBPACK_IMPORTED_MODULE_0__.useCallback(\n (nextValue) => {\n if (isControlled) {\n const setter = nextValue;\n const value2 = typeof nextValue === \"function\" ? setter(prop) : nextValue;\n if (value2 !== prop) handleChange(value2);\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, handleChange]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const uncontrolledState = react__WEBPACK_IMPORTED_MODULE_0__.useState(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(value);\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef, handleChange]);\n return uncontrolledState;\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-roving-focus/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs?");
|
|
3758
|
+
|
|
3759
|
+
/***/ }),
|
|
3760
|
+
|
|
3091
3761
|
/***/ "../node_modules/@radix-ui/react-slider/dist/index.mjs":
|
|
3092
3762
|
/*!*************************************************************!*\
|
|
3093
3763
|
!*** ../node_modules/@radix-ui/react-slider/dist/index.mjs ***!
|
|
3094
3764
|
\*************************************************************/
|
|
3095
3765
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3096
3766
|
|
|
3097
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Range: () => (/* binding */ $faa2e61a3361514f$export$9a58ef0d7ad3278c),\n/* harmony export */ Root: () => (/* binding */ $faa2e61a3361514f$export$be92b6f5f03c0fe9),\n/* harmony export */ Slider: () => (/* binding */ $faa2e61a3361514f$export$472062a354075cee),\n/* harmony export */ SliderRange: () => (/* binding */ $faa2e61a3361514f$export$a5cf38a7a000fe77),\n/* harmony export */ SliderThumb: () => (/* binding */ $faa2e61a3361514f$export$2c1b491743890dec),\n/* harmony export */ SliderTrack: () => (/* binding */ $faa2e61a3361514f$export$105594979f116971),\n/* harmony export */ Thumb: () => (/* binding */ $faa2e61a3361514f$export$6521433ed15a34db),\n/* harmony export */ Track: () => (/* binding */ $faa2e61a3361514f$export$13921ac0cc260818),\n/* harmony export */ createSliderScope: () => (/* binding */ $faa2e61a3361514f$export$ef72632d7b901f97)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_number__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/number */ \"../node_modules/@radix-ui/number/dist/index.mjs\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-direction */ \"../node_modules/@radix-ui/react-direction/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @radix-ui/react-use-previous */ \"../node_modules/@radix-ui/react-use-previous/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-use-size */ \"../node_modules/@radix-ui/react-use-size/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-collection */ \"../node_modules/@radix-ui/react-collection/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst $faa2e61a3361514f$var$PAGE_KEYS = [\n 'PageUp',\n 'PageDown'\n];\nconst $faa2e61a3361514f$var$ARROW_KEYS = [\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight'\n];\nconst $faa2e61a3361514f$var$BACK_KEYS = {\n 'from-left': [\n 'Home',\n 'PageDown',\n 'ArrowDown',\n 'ArrowLeft'\n ],\n 'from-right': [\n 'Home',\n 'PageDown',\n 'ArrowDown',\n 'ArrowRight'\n ],\n 'from-bottom': [\n 'Home',\n 'PageDown',\n 'ArrowDown',\n 'ArrowLeft'\n ],\n 'from-top': [\n 'Home',\n 'PageDown',\n 'ArrowUp',\n 'ArrowLeft'\n ]\n};\n/* -------------------------------------------------------------------------------------------------\n * Slider\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$SLIDER_NAME = 'Slider';\nconst [$faa2e61a3361514f$var$Collection, $faa2e61a3361514f$var$useCollection, $faa2e61a3361514f$var$createCollectionScope] = (0,_radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__.createCollection)($faa2e61a3361514f$var$SLIDER_NAME);\nconst [$faa2e61a3361514f$var$createSliderContext, $faa2e61a3361514f$export$ef72632d7b901f97] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__.createContextScope)($faa2e61a3361514f$var$SLIDER_NAME, [\n $faa2e61a3361514f$var$createCollectionScope\n]);\nconst [$faa2e61a3361514f$var$SliderProvider, $faa2e61a3361514f$var$useSliderContext] = $faa2e61a3361514f$var$createSliderContext($faa2e61a3361514f$var$SLIDER_NAME);\nconst $faa2e61a3361514f$export$472062a354075cee = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { name: name , min: min = 0 , max: max = 100 , step: step = 1 , orientation: orientation = 'horizontal' , disabled: disabled = false , minStepsBetweenThumbs: minStepsBetweenThumbs = 0 , defaultValue: defaultValue = [\n min\n ] , value: value1 , onValueChange: onValueChange = ()=>{} , onValueCommit: onValueCommit = ()=>{} , inverted: inverted = false , ...sliderProps } = props;\n const [slider, setSlider] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, (node)=>setSlider(node)\n );\n const thumbRefs = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(new Set());\n const valueIndexToChangeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(0);\n const isHorizontal = orientation === 'horizontal'; // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = slider ? Boolean(slider.closest('form')) : true;\n const SliderOrientation = isHorizontal ? $faa2e61a3361514f$var$SliderHorizontal : $faa2e61a3361514f$var$SliderVertical;\n const [values = [], setValues] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_5__.useControllableState)({\n prop: value1,\n defaultProp: defaultValue,\n onChange: (value)=>{\n var _thumbs$valueIndexToC;\n const thumbs = [\n ...thumbRefs.current\n ];\n (_thumbs$valueIndexToC = thumbs[valueIndexToChangeRef.current]) === null || _thumbs$valueIndexToC === void 0 || _thumbs$valueIndexToC.focus();\n onValueChange(value);\n }\n });\n const valuesBeforeSlideStartRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(values);\n function handleSlideStart(value) {\n const closestIndex = $faa2e61a3361514f$var$getClosestValueIndex(values, value);\n updateValues(value, closestIndex);\n }\n function handleSlideMove(value) {\n updateValues(value, valueIndexToChangeRef.current);\n }\n function handleSlideEnd() {\n const prevValue = valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current];\n const nextValue = values[valueIndexToChangeRef.current];\n const hasChanged = nextValue !== prevValue;\n if (hasChanged) onValueCommit(values);\n }\n function updateValues(value, atIndex, { commit: commit } = {\n commit: false\n }) {\n const decimalCount = $faa2e61a3361514f$var$getDecimalCount(step);\n const snapToStep = $faa2e61a3361514f$var$roundValue(Math.round((value - min) / step) * step + min, decimalCount);\n const nextValue = (0,_radix_ui_number__WEBPACK_IMPORTED_MODULE_6__.clamp)(snapToStep, [\n min,\n max\n ]);\n setValues((prevValues = [])=>{\n const nextValues = $faa2e61a3361514f$var$getNextSortedValues(prevValues, nextValue, atIndex);\n if ($faa2e61a3361514f$var$hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) {\n valueIndexToChangeRef.current = nextValues.indexOf(nextValue);\n const hasChanged = String(nextValues) !== String(prevValues);\n if (hasChanged && commit) onValueCommit(nextValues);\n return hasChanged ? nextValues : prevValues;\n } else return prevValues;\n });\n }\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderProvider, {\n scope: props.__scopeSlider,\n disabled: disabled,\n min: min,\n max: max,\n valueIndexToChangeRef: valueIndexToChangeRef,\n thumbs: thumbRefs.current,\n values: values,\n orientation: orientation\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$Collection.Provider, {\n scope: props.__scopeSlider\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$Collection.Slot, {\n scope: props.__scopeSlider\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(SliderOrientation, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"aria-disabled\": disabled,\n \"data-disabled\": disabled ? '' : undefined\n }, sliderProps, {\n ref: composedRefs,\n onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(sliderProps.onPointerDown, ()=>{\n if (!disabled) valuesBeforeSlideStartRef.current = values;\n }),\n min: min,\n max: max,\n inverted: inverted,\n onSlideStart: disabled ? undefined : handleSlideStart,\n onSlideMove: disabled ? undefined : handleSlideMove,\n onSlideEnd: disabled ? undefined : handleSlideEnd,\n onHomeKeyDown: ()=>!disabled && updateValues(min, 0, {\n commit: true\n })\n ,\n onEndKeyDown: ()=>!disabled && updateValues(max, values.length - 1, {\n commit: true\n })\n ,\n onStepKeyDown: ({ event: event , direction: stepDirection })=>{\n if (!disabled) {\n const isPageKey = $faa2e61a3361514f$var$PAGE_KEYS.includes(event.key);\n const isSkipKey = isPageKey || event.shiftKey && $faa2e61a3361514f$var$ARROW_KEYS.includes(event.key);\n const multiplier = isSkipKey ? 10 : 1;\n const atIndex = valueIndexToChangeRef.current;\n const value = values[atIndex];\n const stepInDirection = step * multiplier * stepDirection;\n updateValues(value + stepInDirection, atIndex, {\n commit: true\n });\n }\n }\n })))), isFormControl && values.map((value, index)=>/*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$BubbleInput, {\n key: index,\n name: name ? name + (values.length > 1 ? '[]' : '') : undefined,\n value: value\n })\n ));\n});\n/*#__PURE__*/ Object.assign($faa2e61a3361514f$export$472062a354075cee, {\n displayName: $faa2e61a3361514f$var$SLIDER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderHorizontal\n * -----------------------------------------------------------------------------------------------*/ const [$faa2e61a3361514f$var$SliderOrientationProvider, $faa2e61a3361514f$var$useSliderOrientationContext] = $faa2e61a3361514f$var$createSliderContext($faa2e61a3361514f$var$SLIDER_NAME, {\n startEdge: 'left',\n endEdge: 'right',\n size: 'width',\n direction: 1\n});\nconst $faa2e61a3361514f$var$SliderHorizontal = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { min: min , max: max , dir: dir , inverted: inverted , onSlideStart: onSlideStart , onSlideMove: onSlideMove , onSlideEnd: onSlideEnd , onStepKeyDown: onStepKeyDown , ...sliderProps } = props;\n const [slider, setSlider] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, (node)=>setSlider(node)\n );\n const rectRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();\n const direction = (0,_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_8__.useDirection)(dir);\n const isDirectionLTR = direction === 'ltr';\n const isSlidingFromLeft = isDirectionLTR && !inverted || !isDirectionLTR && inverted;\n function getValueFromPointer(pointerPosition) {\n const rect = rectRef.current || slider.getBoundingClientRect();\n const input = [\n 0,\n rect.width\n ];\n const output = isSlidingFromLeft ? [\n min,\n max\n ] : [\n max,\n min\n ];\n const value = $faa2e61a3361514f$var$linearScale(input, output);\n rectRef.current = rect;\n return value(pointerPosition - rect.left);\n }\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderOrientationProvider, {\n scope: props.__scopeSlider,\n startEdge: isSlidingFromLeft ? 'left' : 'right',\n endEdge: isSlidingFromLeft ? 'right' : 'left',\n direction: isSlidingFromLeft ? 1 : -1,\n size: \"width\"\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n dir: direction,\n \"data-orientation\": \"horizontal\"\n }, sliderProps, {\n ref: composedRefs,\n style: {\n ...sliderProps.style,\n ['--radix-slider-thumb-transform']: 'translateX(-50%)'\n },\n onSlideStart: (event)=>{\n const value = getValueFromPointer(event.clientX);\n onSlideStart === null || onSlideStart === void 0 || onSlideStart(value);\n },\n onSlideMove: (event)=>{\n const value = getValueFromPointer(event.clientX);\n onSlideMove === null || onSlideMove === void 0 || onSlideMove(value);\n },\n onSlideEnd: ()=>{\n rectRef.current = undefined;\n onSlideEnd === null || onSlideEnd === void 0 || onSlideEnd();\n },\n onStepKeyDown: (event)=>{\n const slideDirection = isSlidingFromLeft ? 'from-left' : 'from-right';\n const isBackKey = $faa2e61a3361514f$var$BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown === null || onStepKeyDown === void 0 || onStepKeyDown({\n event: event,\n direction: isBackKey ? -1 : 1\n });\n }\n })));\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderVertical\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$SliderVertical = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { min: min , max: max , inverted: inverted , onSlideStart: onSlideStart , onSlideMove: onSlideMove , onSlideEnd: onSlideEnd , onStepKeyDown: onStepKeyDown , ...sliderProps } = props;\n const sliderRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const ref = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, sliderRef);\n const rectRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();\n const isSlidingFromBottom = !inverted;\n function getValueFromPointer(pointerPosition) {\n const rect = rectRef.current || sliderRef.current.getBoundingClientRect();\n const input = [\n 0,\n rect.height\n ];\n const output = isSlidingFromBottom ? [\n max,\n min\n ] : [\n min,\n max\n ];\n const value = $faa2e61a3361514f$var$linearScale(input, output);\n rectRef.current = rect;\n return value(pointerPosition - rect.top);\n }\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderOrientationProvider, {\n scope: props.__scopeSlider,\n startEdge: isSlidingFromBottom ? 'bottom' : 'top',\n endEdge: isSlidingFromBottom ? 'top' : 'bottom',\n size: \"height\",\n direction: isSlidingFromBottom ? 1 : -1\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-orientation\": \"vertical\"\n }, sliderProps, {\n ref: ref,\n style: {\n ...sliderProps.style,\n ['--radix-slider-thumb-transform']: 'translateY(50%)'\n },\n onSlideStart: (event)=>{\n const value = getValueFromPointer(event.clientY);\n onSlideStart === null || onSlideStart === void 0 || onSlideStart(value);\n },\n onSlideMove: (event)=>{\n const value = getValueFromPointer(event.clientY);\n onSlideMove === null || onSlideMove === void 0 || onSlideMove(value);\n },\n onSlideEnd: ()=>{\n rectRef.current = undefined;\n onSlideEnd === null || onSlideEnd === void 0 || onSlideEnd();\n },\n onStepKeyDown: (event)=>{\n const slideDirection = isSlidingFromBottom ? 'from-bottom' : 'from-top';\n const isBackKey = $faa2e61a3361514f$var$BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown === null || onStepKeyDown === void 0 || onStepKeyDown({\n event: event,\n direction: isBackKey ? -1 : 1\n });\n }\n })));\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderImpl\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$SliderImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeSlider: __scopeSlider , onSlideStart: onSlideStart , onSlideMove: onSlideMove , onSlideEnd: onSlideEnd , onHomeKeyDown: onHomeKeyDown , onEndKeyDown: onEndKeyDown , onStepKeyDown: onStepKeyDown , ...sliderProps } = props;\n const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$SLIDER_NAME, __scopeSlider);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.Primitive.span, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, sliderProps, {\n ref: forwardedRef,\n onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onKeyDown, (event)=>{\n if (event.key === 'Home') {\n onHomeKeyDown(event); // Prevent scrolling to page start\n event.preventDefault();\n } else if (event.key === 'End') {\n onEndKeyDown(event); // Prevent scrolling to page end\n event.preventDefault();\n } else if ($faa2e61a3361514f$var$PAGE_KEYS.concat($faa2e61a3361514f$var$ARROW_KEYS).includes(event.key)) {\n onStepKeyDown(event); // Prevent scrolling for directional key presses\n event.preventDefault();\n }\n }),\n onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onPointerDown, (event)=>{\n const target = event.target;\n target.setPointerCapture(event.pointerId); // Prevent browser focus behaviour because we focus a thumb manually when values change.\n event.preventDefault(); // Touch devices have a delay before focusing so won't focus if touch immediately moves\n // away from target (sliding). We want thumb to focus regardless.\n if (context.thumbs.has(target)) target.focus();\n else onSlideStart(event);\n }),\n onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onPointerMove, (event)=>{\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) onSlideMove(event);\n }),\n onPointerUp: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onPointerUp, (event)=>{\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n onSlideEnd(event);\n }\n })\n }));\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderTrack\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$TRACK_NAME = 'SliderTrack';\nconst $faa2e61a3361514f$export$105594979f116971 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeSlider: __scopeSlider , ...trackProps } = props;\n const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$TRACK_NAME, __scopeSlider);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.Primitive.span, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-disabled\": context.disabled ? '' : undefined,\n \"data-orientation\": context.orientation\n }, trackProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($faa2e61a3361514f$export$105594979f116971, {\n displayName: $faa2e61a3361514f$var$TRACK_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderRange\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$RANGE_NAME = 'SliderRange';\nconst $faa2e61a3361514f$export$a5cf38a7a000fe77 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeSlider: __scopeSlider , ...rangeProps } = props;\n const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$RANGE_NAME, __scopeSlider);\n const orientation = $faa2e61a3361514f$var$useSliderOrientationContext($faa2e61a3361514f$var$RANGE_NAME, __scopeSlider);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, ref);\n const valuesCount = context.values.length;\n const percentages = context.values.map((value)=>$faa2e61a3361514f$var$convertValueToPercentage(value, context.min, context.max)\n );\n const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;\n const offsetEnd = 100 - Math.max(...percentages);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.Primitive.span, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-orientation\": context.orientation,\n \"data-disabled\": context.disabled ? '' : undefined\n }, rangeProps, {\n ref: composedRefs,\n style: {\n ...props.style,\n [orientation.startEdge]: offsetStart + '%',\n [orientation.endEdge]: offsetEnd + '%'\n }\n }));\n});\n/*#__PURE__*/ Object.assign($faa2e61a3361514f$export$a5cf38a7a000fe77, {\n displayName: $faa2e61a3361514f$var$RANGE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderThumb\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$THUMB_NAME = 'SliderThumb';\nconst $faa2e61a3361514f$export$2c1b491743890dec = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const getItems = $faa2e61a3361514f$var$useCollection(props.__scopeSlider);\n const [thumb, setThumb] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, (node)=>setThumb(node)\n );\n const index = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>thumb ? getItems().findIndex((item)=>item.ref.current === thumb\n ) : -1\n , [\n getItems,\n thumb\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderThumbImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs,\n index: index\n }));\n});\nconst $faa2e61a3361514f$var$SliderThumbImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeSlider: __scopeSlider , index: index , ...thumbProps } = props;\n const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$THUMB_NAME, __scopeSlider);\n const orientation = $faa2e61a3361514f$var$useSliderOrientationContext($faa2e61a3361514f$var$THUMB_NAME, __scopeSlider);\n const [thumb, setThumb] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, (node)=>setThumb(node)\n );\n const size = (0,_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_10__.useSize)(thumb); // We cast because index could be `-1` which would return undefined\n const value = context.values[index];\n const percent = value === undefined ? 0 : $faa2e61a3361514f$var$convertValueToPercentage(value, context.min, context.max);\n const label = $faa2e61a3361514f$var$getLabel(index, context.values.length);\n const orientationSize = size === null || size === void 0 ? void 0 : size[orientation.size];\n const thumbInBoundsOffset = orientationSize ? $faa2e61a3361514f$var$getThumbInBoundsOffset(orientationSize, percent, orientation.direction) : 0;\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (thumb) {\n context.thumbs.add(thumb);\n return ()=>{\n context.thumbs.delete(thumb);\n };\n }\n }, [\n thumb,\n context.thumbs\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(\"span\", {\n style: {\n transform: 'var(--radix-slider-thumb-transform)',\n position: 'absolute',\n [orientation.startEdge]: `calc(${percent}% + ${thumbInBoundsOffset}px)`\n }\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$Collection.ItemSlot, {\n scope: props.__scopeSlider\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.Primitive.span, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: \"slider\",\n \"aria-label\": props['aria-label'] || label,\n \"aria-valuemin\": context.min,\n \"aria-valuenow\": value,\n \"aria-valuemax\": context.max,\n \"aria-orientation\": context.orientation,\n \"data-orientation\": context.orientation,\n \"data-disabled\": context.disabled ? '' : undefined,\n tabIndex: context.disabled ? undefined : 0\n }, thumbProps, {\n ref: composedRefs,\n style: value === undefined ? {\n display: 'none'\n } : props.style,\n onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onFocus, ()=>{\n context.valueIndexToChangeRef.current = index;\n })\n }))));\n});\n/*#__PURE__*/ Object.assign($faa2e61a3361514f$export$2c1b491743890dec, {\n displayName: $faa2e61a3361514f$var$THUMB_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$BubbleInput = (props)=>{\n const { value: value , ...inputProps } = props;\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const prevValue = (0,_radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_11__.usePrevious)(value); // Bubble value change to parents (e.g form change event)\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const input = ref.current;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'value');\n const setValue = descriptor.set;\n if (prevValue !== value && setValue) {\n const event = new Event('input', {\n bubbles: true\n });\n setValue.call(input, value);\n input.dispatchEvent(event);\n }\n }, [\n prevValue,\n value\n ]);\n /**\n * We purposefully do not use `type=\"hidden\"` here otherwise forms that\n * wrap it will not be able to access its value via the FormData API.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programatically and bubble to any parent form `onChange` event.\n * Adding the `value` will cause React to consider the programatic\n * dispatch a duplicate and it will get swallowed.\n */ return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(\"input\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n style: {\n display: 'none'\n }\n }, inputProps, {\n ref: ref,\n defaultValue: value\n }));\n};\nfunction $faa2e61a3361514f$var$getNextSortedValues(prevValues = [], nextValue, atIndex) {\n const nextValues = [\n ...prevValues\n ];\n nextValues[atIndex] = nextValue;\n return nextValues.sort((a, b)=>a - b\n );\n}\nfunction $faa2e61a3361514f$var$convertValueToPercentage(value, min, max) {\n const maxSteps = max - min;\n const percentPerStep = 100 / maxSteps;\n const percentage = percentPerStep * (value - min);\n return (0,_radix_ui_number__WEBPACK_IMPORTED_MODULE_6__.clamp)(percentage, [\n 0,\n 100\n ]);\n}\n/**\n * Returns a label for each thumb when there are two or more thumbs\n */ function $faa2e61a3361514f$var$getLabel(index, totalValues) {\n if (totalValues > 2) return `Value ${index + 1} of ${totalValues}`;\n else if (totalValues === 2) return [\n 'Minimum',\n 'Maximum'\n ][index];\n else return undefined;\n}\n/**\n * Given a `values` array and a `nextValue`, determine which value in\n * the array is closest to `nextValue` and return its index.\n *\n * @example\n * // returns 1\n * getClosestValueIndex([10, 30], 25);\n */ function $faa2e61a3361514f$var$getClosestValueIndex(values, nextValue) {\n if (values.length === 1) return 0;\n const distances = values.map((value)=>Math.abs(value - nextValue)\n );\n const closestDistance = Math.min(...distances);\n return distances.indexOf(closestDistance);\n}\n/**\n * Offsets the thumb centre point while sliding to ensure it remains\n * within the bounds of the slider when reaching the edges\n */ function $faa2e61a3361514f$var$getThumbInBoundsOffset(width, left, direction) {\n const halfWidth = width / 2;\n const halfPercent = 50;\n const offset = $faa2e61a3361514f$var$linearScale([\n 0,\n halfPercent\n ], [\n 0,\n halfWidth\n ]);\n return (halfWidth - offset(left) * direction) * direction;\n}\n/**\n * Gets an array of steps between each value.\n *\n * @example\n * // returns [1, 9]\n * getStepsBetweenValues([10, 11, 20]);\n */ function $faa2e61a3361514f$var$getStepsBetweenValues(values) {\n return values.slice(0, -1).map((value, index)=>values[index + 1] - value\n );\n}\n/**\n * Verifies the minimum steps between all values is greater than or equal\n * to the expected minimum steps.\n *\n * @example\n * // returns false\n * hasMinStepsBetweenValues([1,2,3], 2);\n *\n * @example\n * // returns true\n * hasMinStepsBetweenValues([1,2,3], 1);\n */ function $faa2e61a3361514f$var$hasMinStepsBetweenValues(values, minStepsBetweenValues) {\n if (minStepsBetweenValues > 0) {\n const stepsBetweenValues = $faa2e61a3361514f$var$getStepsBetweenValues(values);\n const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);\n return actualMinStepsBetweenValues >= minStepsBetweenValues;\n }\n return true;\n} // https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nfunction $faa2e61a3361514f$var$linearScale(input, output) {\n return (value)=>{\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\nfunction $faa2e61a3361514f$var$getDecimalCount(value) {\n return (String(value).split('.')[1] || '').length;\n}\nfunction $faa2e61a3361514f$var$roundValue(value, decimalCount) {\n const rounder = Math.pow(10, decimalCount);\n return Math.round(value * rounder) / rounder;\n}\nconst $faa2e61a3361514f$export$be92b6f5f03c0fe9 = $faa2e61a3361514f$export$472062a354075cee;\nconst $faa2e61a3361514f$export$13921ac0cc260818 = $faa2e61a3361514f$export$105594979f116971;\nconst $faa2e61a3361514f$export$9a58ef0d7ad3278c = $faa2e61a3361514f$export$a5cf38a7a000fe77;\nconst $faa2e61a3361514f$export$6521433ed15a34db = $faa2e61a3361514f$export$2c1b491743890dec;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-slider/dist/index.mjs?");
|
|
3767
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Range: () => (/* binding */ $faa2e61a3361514f$export$9a58ef0d7ad3278c),\n/* harmony export */ Root: () => (/* binding */ $faa2e61a3361514f$export$be92b6f5f03c0fe9),\n/* harmony export */ Slider: () => (/* binding */ $faa2e61a3361514f$export$472062a354075cee),\n/* harmony export */ SliderRange: () => (/* binding */ $faa2e61a3361514f$export$a5cf38a7a000fe77),\n/* harmony export */ SliderThumb: () => (/* binding */ $faa2e61a3361514f$export$2c1b491743890dec),\n/* harmony export */ SliderTrack: () => (/* binding */ $faa2e61a3361514f$export$105594979f116971),\n/* harmony export */ Thumb: () => (/* binding */ $faa2e61a3361514f$export$6521433ed15a34db),\n/* harmony export */ Track: () => (/* binding */ $faa2e61a3361514f$export$13921ac0cc260818),\n/* harmony export */ createSliderScope: () => (/* binding */ $faa2e61a3361514f$export$ef72632d7b901f97)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_number__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/number */ \"../node_modules/@radix-ui/number/dist/index.mjs\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/react-direction */ \"../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-direction/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @radix-ui/react-use-previous */ \"../node_modules/@radix-ui/react-use-previous/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-use-size */ \"../node_modules/@radix-ui/react-use-size/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-collection */ \"../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst $faa2e61a3361514f$var$PAGE_KEYS = [\n 'PageUp',\n 'PageDown'\n];\nconst $faa2e61a3361514f$var$ARROW_KEYS = [\n 'ArrowUp',\n 'ArrowDown',\n 'ArrowLeft',\n 'ArrowRight'\n];\nconst $faa2e61a3361514f$var$BACK_KEYS = {\n 'from-left': [\n 'Home',\n 'PageDown',\n 'ArrowDown',\n 'ArrowLeft'\n ],\n 'from-right': [\n 'Home',\n 'PageDown',\n 'ArrowDown',\n 'ArrowRight'\n ],\n 'from-bottom': [\n 'Home',\n 'PageDown',\n 'ArrowDown',\n 'ArrowLeft'\n ],\n 'from-top': [\n 'Home',\n 'PageDown',\n 'ArrowUp',\n 'ArrowLeft'\n ]\n};\n/* -------------------------------------------------------------------------------------------------\n * Slider\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$SLIDER_NAME = 'Slider';\nconst [$faa2e61a3361514f$var$Collection, $faa2e61a3361514f$var$useCollection, $faa2e61a3361514f$var$createCollectionScope] = (0,_radix_ui_react_collection__WEBPACK_IMPORTED_MODULE_2__.createCollection)($faa2e61a3361514f$var$SLIDER_NAME);\nconst [$faa2e61a3361514f$var$createSliderContext, $faa2e61a3361514f$export$ef72632d7b901f97] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_3__.createContextScope)($faa2e61a3361514f$var$SLIDER_NAME, [\n $faa2e61a3361514f$var$createCollectionScope\n]);\nconst [$faa2e61a3361514f$var$SliderProvider, $faa2e61a3361514f$var$useSliderContext] = $faa2e61a3361514f$var$createSliderContext($faa2e61a3361514f$var$SLIDER_NAME);\nconst $faa2e61a3361514f$export$472062a354075cee = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { name: name , min: min = 0 , max: max = 100 , step: step = 1 , orientation: orientation = 'horizontal' , disabled: disabled = false , minStepsBetweenThumbs: minStepsBetweenThumbs = 0 , defaultValue: defaultValue = [\n min\n ] , value: value1 , onValueChange: onValueChange = ()=>{} , onValueCommit: onValueCommit = ()=>{} , inverted: inverted = false , ...sliderProps } = props;\n const [slider, setSlider] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, (node)=>setSlider(node)\n );\n const thumbRefs = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(new Set());\n const valueIndexToChangeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(0);\n const isHorizontal = orientation === 'horizontal'; // We set this to true by default so that events bubble to forms without JS (SSR)\n const isFormControl = slider ? Boolean(slider.closest('form')) : true;\n const SliderOrientation = isHorizontal ? $faa2e61a3361514f$var$SliderHorizontal : $faa2e61a3361514f$var$SliderVertical;\n const [values = [], setValues] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_5__.useControllableState)({\n prop: value1,\n defaultProp: defaultValue,\n onChange: (value)=>{\n var _thumbs$valueIndexToC;\n const thumbs = [\n ...thumbRefs.current\n ];\n (_thumbs$valueIndexToC = thumbs[valueIndexToChangeRef.current]) === null || _thumbs$valueIndexToC === void 0 || _thumbs$valueIndexToC.focus();\n onValueChange(value);\n }\n });\n const valuesBeforeSlideStartRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(values);\n function handleSlideStart(value) {\n const closestIndex = $faa2e61a3361514f$var$getClosestValueIndex(values, value);\n updateValues(value, closestIndex);\n }\n function handleSlideMove(value) {\n updateValues(value, valueIndexToChangeRef.current);\n }\n function handleSlideEnd() {\n const prevValue = valuesBeforeSlideStartRef.current[valueIndexToChangeRef.current];\n const nextValue = values[valueIndexToChangeRef.current];\n const hasChanged = nextValue !== prevValue;\n if (hasChanged) onValueCommit(values);\n }\n function updateValues(value, atIndex, { commit: commit } = {\n commit: false\n }) {\n const decimalCount = $faa2e61a3361514f$var$getDecimalCount(step);\n const snapToStep = $faa2e61a3361514f$var$roundValue(Math.round((value - min) / step) * step + min, decimalCount);\n const nextValue = (0,_radix_ui_number__WEBPACK_IMPORTED_MODULE_6__.clamp)(snapToStep, [\n min,\n max\n ]);\n setValues((prevValues = [])=>{\n const nextValues = $faa2e61a3361514f$var$getNextSortedValues(prevValues, nextValue, atIndex);\n if ($faa2e61a3361514f$var$hasMinStepsBetweenValues(nextValues, minStepsBetweenThumbs * step)) {\n valueIndexToChangeRef.current = nextValues.indexOf(nextValue);\n const hasChanged = String(nextValues) !== String(prevValues);\n if (hasChanged && commit) onValueCommit(nextValues);\n return hasChanged ? nextValues : prevValues;\n } else return prevValues;\n });\n }\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderProvider, {\n scope: props.__scopeSlider,\n disabled: disabled,\n min: min,\n max: max,\n valueIndexToChangeRef: valueIndexToChangeRef,\n thumbs: thumbRefs.current,\n values: values,\n orientation: orientation\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$Collection.Provider, {\n scope: props.__scopeSlider\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$Collection.Slot, {\n scope: props.__scopeSlider\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(SliderOrientation, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"aria-disabled\": disabled,\n \"data-disabled\": disabled ? '' : undefined\n }, sliderProps, {\n ref: composedRefs,\n onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(sliderProps.onPointerDown, ()=>{\n if (!disabled) valuesBeforeSlideStartRef.current = values;\n }),\n min: min,\n max: max,\n inverted: inverted,\n onSlideStart: disabled ? undefined : handleSlideStart,\n onSlideMove: disabled ? undefined : handleSlideMove,\n onSlideEnd: disabled ? undefined : handleSlideEnd,\n onHomeKeyDown: ()=>!disabled && updateValues(min, 0, {\n commit: true\n })\n ,\n onEndKeyDown: ()=>!disabled && updateValues(max, values.length - 1, {\n commit: true\n })\n ,\n onStepKeyDown: ({ event: event , direction: stepDirection })=>{\n if (!disabled) {\n const isPageKey = $faa2e61a3361514f$var$PAGE_KEYS.includes(event.key);\n const isSkipKey = isPageKey || event.shiftKey && $faa2e61a3361514f$var$ARROW_KEYS.includes(event.key);\n const multiplier = isSkipKey ? 10 : 1;\n const atIndex = valueIndexToChangeRef.current;\n const value = values[atIndex];\n const stepInDirection = step * multiplier * stepDirection;\n updateValues(value + stepInDirection, atIndex, {\n commit: true\n });\n }\n }\n })))), isFormControl && values.map((value, index)=>/*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$BubbleInput, {\n key: index,\n name: name ? name + (values.length > 1 ? '[]' : '') : undefined,\n value: value\n })\n ));\n});\n/*#__PURE__*/ Object.assign($faa2e61a3361514f$export$472062a354075cee, {\n displayName: $faa2e61a3361514f$var$SLIDER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderHorizontal\n * -----------------------------------------------------------------------------------------------*/ const [$faa2e61a3361514f$var$SliderOrientationProvider, $faa2e61a3361514f$var$useSliderOrientationContext] = $faa2e61a3361514f$var$createSliderContext($faa2e61a3361514f$var$SLIDER_NAME, {\n startEdge: 'left',\n endEdge: 'right',\n size: 'width',\n direction: 1\n});\nconst $faa2e61a3361514f$var$SliderHorizontal = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { min: min , max: max , dir: dir , inverted: inverted , onSlideStart: onSlideStart , onSlideMove: onSlideMove , onSlideEnd: onSlideEnd , onStepKeyDown: onStepKeyDown , ...sliderProps } = props;\n const [slider, setSlider] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, (node)=>setSlider(node)\n );\n const rectRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();\n const direction = (0,_radix_ui_react_direction__WEBPACK_IMPORTED_MODULE_8__.useDirection)(dir);\n const isDirectionLTR = direction === 'ltr';\n const isSlidingFromLeft = isDirectionLTR && !inverted || !isDirectionLTR && inverted;\n function getValueFromPointer(pointerPosition) {\n const rect = rectRef.current || slider.getBoundingClientRect();\n const input = [\n 0,\n rect.width\n ];\n const output = isSlidingFromLeft ? [\n min,\n max\n ] : [\n max,\n min\n ];\n const value = $faa2e61a3361514f$var$linearScale(input, output);\n rectRef.current = rect;\n return value(pointerPosition - rect.left);\n }\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderOrientationProvider, {\n scope: props.__scopeSlider,\n startEdge: isSlidingFromLeft ? 'left' : 'right',\n endEdge: isSlidingFromLeft ? 'right' : 'left',\n direction: isSlidingFromLeft ? 1 : -1,\n size: \"width\"\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n dir: direction,\n \"data-orientation\": \"horizontal\"\n }, sliderProps, {\n ref: composedRefs,\n style: {\n ...sliderProps.style,\n ['--radix-slider-thumb-transform']: 'translateX(-50%)'\n },\n onSlideStart: (event)=>{\n const value = getValueFromPointer(event.clientX);\n onSlideStart === null || onSlideStart === void 0 || onSlideStart(value);\n },\n onSlideMove: (event)=>{\n const value = getValueFromPointer(event.clientX);\n onSlideMove === null || onSlideMove === void 0 || onSlideMove(value);\n },\n onSlideEnd: ()=>{\n rectRef.current = undefined;\n onSlideEnd === null || onSlideEnd === void 0 || onSlideEnd();\n },\n onStepKeyDown: (event)=>{\n const slideDirection = isSlidingFromLeft ? 'from-left' : 'from-right';\n const isBackKey = $faa2e61a3361514f$var$BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown === null || onStepKeyDown === void 0 || onStepKeyDown({\n event: event,\n direction: isBackKey ? -1 : 1\n });\n }\n })));\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderVertical\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$SliderVertical = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { min: min , max: max , inverted: inverted , onSlideStart: onSlideStart , onSlideMove: onSlideMove , onSlideEnd: onSlideEnd , onStepKeyDown: onStepKeyDown , ...sliderProps } = props;\n const sliderRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const ref = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, sliderRef);\n const rectRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();\n const isSlidingFromBottom = !inverted;\n function getValueFromPointer(pointerPosition) {\n const rect = rectRef.current || sliderRef.current.getBoundingClientRect();\n const input = [\n 0,\n rect.height\n ];\n const output = isSlidingFromBottom ? [\n max,\n min\n ] : [\n min,\n max\n ];\n const value = $faa2e61a3361514f$var$linearScale(input, output);\n rectRef.current = rect;\n return value(pointerPosition - rect.top);\n }\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderOrientationProvider, {\n scope: props.__scopeSlider,\n startEdge: isSlidingFromBottom ? 'bottom' : 'top',\n endEdge: isSlidingFromBottom ? 'top' : 'bottom',\n size: \"height\",\n direction: isSlidingFromBottom ? 1 : -1\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-orientation\": \"vertical\"\n }, sliderProps, {\n ref: ref,\n style: {\n ...sliderProps.style,\n ['--radix-slider-thumb-transform']: 'translateY(50%)'\n },\n onSlideStart: (event)=>{\n const value = getValueFromPointer(event.clientY);\n onSlideStart === null || onSlideStart === void 0 || onSlideStart(value);\n },\n onSlideMove: (event)=>{\n const value = getValueFromPointer(event.clientY);\n onSlideMove === null || onSlideMove === void 0 || onSlideMove(value);\n },\n onSlideEnd: ()=>{\n rectRef.current = undefined;\n onSlideEnd === null || onSlideEnd === void 0 || onSlideEnd();\n },\n onStepKeyDown: (event)=>{\n const slideDirection = isSlidingFromBottom ? 'from-bottom' : 'from-top';\n const isBackKey = $faa2e61a3361514f$var$BACK_KEYS[slideDirection].includes(event.key);\n onStepKeyDown === null || onStepKeyDown === void 0 || onStepKeyDown({\n event: event,\n direction: isBackKey ? -1 : 1\n });\n }\n })));\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderImpl\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$SliderImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeSlider: __scopeSlider , onSlideStart: onSlideStart , onSlideMove: onSlideMove , onSlideEnd: onSlideEnd , onHomeKeyDown: onHomeKeyDown , onEndKeyDown: onEndKeyDown , onStepKeyDown: onStepKeyDown , ...sliderProps } = props;\n const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$SLIDER_NAME, __scopeSlider);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.Primitive.span, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, sliderProps, {\n ref: forwardedRef,\n onKeyDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onKeyDown, (event)=>{\n if (event.key === 'Home') {\n onHomeKeyDown(event); // Prevent scrolling to page start\n event.preventDefault();\n } else if (event.key === 'End') {\n onEndKeyDown(event); // Prevent scrolling to page end\n event.preventDefault();\n } else if ($faa2e61a3361514f$var$PAGE_KEYS.concat($faa2e61a3361514f$var$ARROW_KEYS).includes(event.key)) {\n onStepKeyDown(event); // Prevent scrolling for directional key presses\n event.preventDefault();\n }\n }),\n onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onPointerDown, (event)=>{\n const target = event.target;\n target.setPointerCapture(event.pointerId); // Prevent browser focus behaviour because we focus a thumb manually when values change.\n event.preventDefault(); // Touch devices have a delay before focusing so won't focus if touch immediately moves\n // away from target (sliding). We want thumb to focus regardless.\n if (context.thumbs.has(target)) target.focus();\n else onSlideStart(event);\n }),\n onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onPointerMove, (event)=>{\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) onSlideMove(event);\n }),\n onPointerUp: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onPointerUp, (event)=>{\n const target = event.target;\n if (target.hasPointerCapture(event.pointerId)) {\n target.releasePointerCapture(event.pointerId);\n onSlideEnd(event);\n }\n })\n }));\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderTrack\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$TRACK_NAME = 'SliderTrack';\nconst $faa2e61a3361514f$export$105594979f116971 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeSlider: __scopeSlider , ...trackProps } = props;\n const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$TRACK_NAME, __scopeSlider);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.Primitive.span, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-disabled\": context.disabled ? '' : undefined,\n \"data-orientation\": context.orientation\n }, trackProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($faa2e61a3361514f$export$105594979f116971, {\n displayName: $faa2e61a3361514f$var$TRACK_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderRange\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$RANGE_NAME = 'SliderRange';\nconst $faa2e61a3361514f$export$a5cf38a7a000fe77 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeSlider: __scopeSlider , ...rangeProps } = props;\n const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$RANGE_NAME, __scopeSlider);\n const orientation = $faa2e61a3361514f$var$useSliderOrientationContext($faa2e61a3361514f$var$RANGE_NAME, __scopeSlider);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, ref);\n const valuesCount = context.values.length;\n const percentages = context.values.map((value)=>$faa2e61a3361514f$var$convertValueToPercentage(value, context.min, context.max)\n );\n const offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0;\n const offsetEnd = 100 - Math.max(...percentages);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.Primitive.span, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-orientation\": context.orientation,\n \"data-disabled\": context.disabled ? '' : undefined\n }, rangeProps, {\n ref: composedRefs,\n style: {\n ...props.style,\n [orientation.startEdge]: offsetStart + '%',\n [orientation.endEdge]: offsetEnd + '%'\n }\n }));\n});\n/*#__PURE__*/ Object.assign($faa2e61a3361514f$export$a5cf38a7a000fe77, {\n displayName: $faa2e61a3361514f$var$RANGE_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * SliderThumb\n * -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$THUMB_NAME = 'SliderThumb';\nconst $faa2e61a3361514f$export$2c1b491743890dec = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const getItems = $faa2e61a3361514f$var$useCollection(props.__scopeSlider);\n const [thumb, setThumb] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, (node)=>setThumb(node)\n );\n const index = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>thumb ? getItems().findIndex((item)=>item.ref.current === thumb\n ) : -1\n , [\n getItems,\n thumb\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$SliderThumbImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs,\n index: index\n }));\n});\nconst $faa2e61a3361514f$var$SliderThumbImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeSlider: __scopeSlider , index: index , ...thumbProps } = props;\n const context = $faa2e61a3361514f$var$useSliderContext($faa2e61a3361514f$var$THUMB_NAME, __scopeSlider);\n const orientation = $faa2e61a3361514f$var$useSliderOrientationContext($faa2e61a3361514f$var$THUMB_NAME, __scopeSlider);\n const [thumb, setThumb] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_4__.useComposedRefs)(forwardedRef, (node)=>setThumb(node)\n );\n const size = (0,_radix_ui_react_use_size__WEBPACK_IMPORTED_MODULE_10__.useSize)(thumb); // We cast because index could be `-1` which would return undefined\n const value = context.values[index];\n const percent = value === undefined ? 0 : $faa2e61a3361514f$var$convertValueToPercentage(value, context.min, context.max);\n const label = $faa2e61a3361514f$var$getLabel(index, context.values.length);\n const orientationSize = size === null || size === void 0 ? void 0 : size[orientation.size];\n const thumbInBoundsOffset = orientationSize ? $faa2e61a3361514f$var$getThumbInBoundsOffset(orientationSize, percent, orientation.direction) : 0;\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (thumb) {\n context.thumbs.add(thumb);\n return ()=>{\n context.thumbs.delete(thumb);\n };\n }\n }, [\n thumb,\n context.thumbs\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(\"span\", {\n style: {\n transform: 'var(--radix-slider-thumb-transform)',\n position: 'absolute',\n [orientation.startEdge]: `calc(${percent}% + ${thumbInBoundsOffset}px)`\n }\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($faa2e61a3361514f$var$Collection.ItemSlot, {\n scope: props.__scopeSlider\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_9__.Primitive.span, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n role: \"slider\",\n \"aria-label\": props['aria-label'] || label,\n \"aria-valuemin\": context.min,\n \"aria-valuenow\": value,\n \"aria-valuemax\": context.max,\n \"aria-orientation\": context.orientation,\n \"data-orientation\": context.orientation,\n \"data-disabled\": context.disabled ? '' : undefined,\n tabIndex: context.disabled ? undefined : 0\n }, thumbProps, {\n ref: composedRefs,\n style: value === undefined ? {\n display: 'none'\n } : props.style,\n onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_7__.composeEventHandlers)(props.onFocus, ()=>{\n context.valueIndexToChangeRef.current = index;\n })\n }))));\n});\n/*#__PURE__*/ Object.assign($faa2e61a3361514f$export$2c1b491743890dec, {\n displayName: $faa2e61a3361514f$var$THUMB_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $faa2e61a3361514f$var$BubbleInput = (props)=>{\n const { value: value , ...inputProps } = props;\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const prevValue = (0,_radix_ui_react_use_previous__WEBPACK_IMPORTED_MODULE_11__.usePrevious)(value); // Bubble value change to parents (e.g form change event)\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const input = ref.current;\n const inputProto = window.HTMLInputElement.prototype;\n const descriptor = Object.getOwnPropertyDescriptor(inputProto, 'value');\n const setValue = descriptor.set;\n if (prevValue !== value && setValue) {\n const event = new Event('input', {\n bubbles: true\n });\n setValue.call(input, value);\n input.dispatchEvent(event);\n }\n }, [\n prevValue,\n value\n ]);\n /**\n * We purposefully do not use `type=\"hidden\"` here otherwise forms that\n * wrap it will not be able to access its value via the FormData API.\n *\n * We purposefully do not add the `value` attribute here to allow the value\n * to be set programatically and bubble to any parent form `onChange` event.\n * Adding the `value` will cause React to consider the programatic\n * dispatch a duplicate and it will get swallowed.\n */ return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(\"input\", (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n style: {\n display: 'none'\n }\n }, inputProps, {\n ref: ref,\n defaultValue: value\n }));\n};\nfunction $faa2e61a3361514f$var$getNextSortedValues(prevValues = [], nextValue, atIndex) {\n const nextValues = [\n ...prevValues\n ];\n nextValues[atIndex] = nextValue;\n return nextValues.sort((a, b)=>a - b\n );\n}\nfunction $faa2e61a3361514f$var$convertValueToPercentage(value, min, max) {\n const maxSteps = max - min;\n const percentPerStep = 100 / maxSteps;\n const percentage = percentPerStep * (value - min);\n return (0,_radix_ui_number__WEBPACK_IMPORTED_MODULE_6__.clamp)(percentage, [\n 0,\n 100\n ]);\n}\n/**\n * Returns a label for each thumb when there are two or more thumbs\n */ function $faa2e61a3361514f$var$getLabel(index, totalValues) {\n if (totalValues > 2) return `Value ${index + 1} of ${totalValues}`;\n else if (totalValues === 2) return [\n 'Minimum',\n 'Maximum'\n ][index];\n else return undefined;\n}\n/**\n * Given a `values` array and a `nextValue`, determine which value in\n * the array is closest to `nextValue` and return its index.\n *\n * @example\n * // returns 1\n * getClosestValueIndex([10, 30], 25);\n */ function $faa2e61a3361514f$var$getClosestValueIndex(values, nextValue) {\n if (values.length === 1) return 0;\n const distances = values.map((value)=>Math.abs(value - nextValue)\n );\n const closestDistance = Math.min(...distances);\n return distances.indexOf(closestDistance);\n}\n/**\n * Offsets the thumb centre point while sliding to ensure it remains\n * within the bounds of the slider when reaching the edges\n */ function $faa2e61a3361514f$var$getThumbInBoundsOffset(width, left, direction) {\n const halfWidth = width / 2;\n const halfPercent = 50;\n const offset = $faa2e61a3361514f$var$linearScale([\n 0,\n halfPercent\n ], [\n 0,\n halfWidth\n ]);\n return (halfWidth - offset(left) * direction) * direction;\n}\n/**\n * Gets an array of steps between each value.\n *\n * @example\n * // returns [1, 9]\n * getStepsBetweenValues([10, 11, 20]);\n */ function $faa2e61a3361514f$var$getStepsBetweenValues(values) {\n return values.slice(0, -1).map((value, index)=>values[index + 1] - value\n );\n}\n/**\n * Verifies the minimum steps between all values is greater than or equal\n * to the expected minimum steps.\n *\n * @example\n * // returns false\n * hasMinStepsBetweenValues([1,2,3], 2);\n *\n * @example\n * // returns true\n * hasMinStepsBetweenValues([1,2,3], 1);\n */ function $faa2e61a3361514f$var$hasMinStepsBetweenValues(values, minStepsBetweenValues) {\n if (minStepsBetweenValues > 0) {\n const stepsBetweenValues = $faa2e61a3361514f$var$getStepsBetweenValues(values);\n const actualMinStepsBetweenValues = Math.min(...stepsBetweenValues);\n return actualMinStepsBetweenValues >= minStepsBetweenValues;\n }\n return true;\n} // https://github.com/tmcw-up-for-adoption/simple-linear-scale/blob/master/index.js\nfunction $faa2e61a3361514f$var$linearScale(input, output) {\n return (value)=>{\n if (input[0] === input[1] || output[0] === output[1]) return output[0];\n const ratio = (output[1] - output[0]) / (input[1] - input[0]);\n return output[0] + ratio * (value - input[0]);\n };\n}\nfunction $faa2e61a3361514f$var$getDecimalCount(value) {\n return (String(value).split('.')[1] || '').length;\n}\nfunction $faa2e61a3361514f$var$roundValue(value, decimalCount) {\n const rounder = Math.pow(10, decimalCount);\n return Math.round(value * rounder) / rounder;\n}\nconst $faa2e61a3361514f$export$be92b6f5f03c0fe9 = $faa2e61a3361514f$export$472062a354075cee;\nconst $faa2e61a3361514f$export$13921ac0cc260818 = $faa2e61a3361514f$export$105594979f116971;\nconst $faa2e61a3361514f$export$9a58ef0d7ad3278c = $faa2e61a3361514f$export$a5cf38a7a000fe77;\nconst $faa2e61a3361514f$export$6521433ed15a34db = $faa2e61a3361514f$export$2c1b491743890dec;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-slider/dist/index.mjs?");
|
|
3768
|
+
|
|
3769
|
+
/***/ }),
|
|
3770
|
+
|
|
3771
|
+
/***/ "../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/primitive/dist/index.mjs":
|
|
3772
|
+
/*!**********************************************************************************************!*\
|
|
3773
|
+
!*** ../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/primitive/dist/index.mjs ***!
|
|
3774
|
+
\**********************************************************************************************/
|
|
3775
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3776
|
+
|
|
3777
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeEventHandlers: () => (/* binding */ $e42e1063c40fb3ef$export$b9ecd428b558ff10)\n/* harmony export */ });\nfunction $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);\n };\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/primitive/dist/index.mjs?");
|
|
3778
|
+
|
|
3779
|
+
/***/ }),
|
|
3780
|
+
|
|
3781
|
+
/***/ "../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.mjs":
|
|
3782
|
+
/*!*****************************************************************************************************!*\
|
|
3783
|
+
!*** ../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.mjs ***!
|
|
3784
|
+
\*****************************************************************************************************/
|
|
3785
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3786
|
+
|
|
3787
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ createCollection: () => (/* binding */ $e02a7d9cb1dc128c$export$c74125a8e3af6bb2)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-slot/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n// We have resorted to returning slots directly rather than exposing primitives that can then\n// be slotted like `<CollectionItem as={Slot}>…</CollectionItem>`.\n// This is because we encountered issues with generic types that cannot be statically analysed\n// due to creating them dynamically via createCollection.\nfunction $e02a7d9cb1dc128c$export$c74125a8e3af6bb2(name) {\n /* -----------------------------------------------------------------------------------------------\n * CollectionProvider\n * ---------------------------------------------------------------------------------------------*/ const PROVIDER_NAME = name + 'CollectionProvider';\n const [createCollectionContext, createCollectionScope] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_1__.createContextScope)(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(PROVIDER_NAME, {\n collectionRef: {\n current: null\n },\n itemMap: new Map()\n });\n const CollectionProvider = (props)=>{\n const { scope: scope , children: children } = props;\n const ref = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useRef(null);\n const itemMap = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useRef(new Map()).current;\n return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(CollectionProviderImpl, {\n scope: scope,\n itemMap: itemMap,\n collectionRef: ref\n }, children);\n };\n /*#__PURE__*/ Object.assign(CollectionProvider, {\n displayName: PROVIDER_NAME\n });\n /* -----------------------------------------------------------------------------------------------\n * CollectionSlot\n * ---------------------------------------------------------------------------------------------*/ const COLLECTION_SLOT_NAME = name + 'CollectionSlot';\n const CollectionSlot = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forwardRef((props, forwardedRef)=>{\n const { scope: scope , children: children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, context.collectionRef);\n return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot, {\n ref: composedRefs\n }, children);\n });\n /*#__PURE__*/ Object.assign(CollectionSlot, {\n displayName: COLLECTION_SLOT_NAME\n });\n /* -----------------------------------------------------------------------------------------------\n * CollectionItem\n * ---------------------------------------------------------------------------------------------*/ const ITEM_SLOT_NAME = name + 'CollectionItemSlot';\n const ITEM_DATA_ATTR = 'data-radix-collection-item';\n const CollectionItemSlot = /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].forwardRef((props, forwardedRef)=>{\n const { scope: scope , children: children , ...itemData } = props;\n const ref = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useRef(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useEffect(()=>{\n context.itemMap.set(ref, {\n ref: ref,\n ...itemData\n });\n return ()=>void context.itemMap.delete(ref)\n ;\n });\n return /*#__PURE__*/ react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].createElement(_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_3__.Slot, {\n [ITEM_DATA_ATTR]: '',\n ref: composedRefs\n }, children);\n });\n /*#__PURE__*/ Object.assign(CollectionItemSlot, {\n displayName: ITEM_SLOT_NAME\n });\n /* -----------------------------------------------------------------------------------------------\n * useCollection\n * ---------------------------------------------------------------------------------------------*/ function useCollection(scope) {\n const context = useCollectionContext(name + 'CollectionConsumer', scope);\n const getItems = react__WEBPACK_IMPORTED_MODULE_0__[\"default\"].useCallback(()=>{\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort((a, b)=>orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [\n context.collectionRef,\n context.itemMap\n ]);\n return getItems;\n }\n return [\n {\n Provider: CollectionProvider,\n Slot: CollectionSlot,\n ItemSlot: CollectionItemSlot\n },\n useCollection,\n createCollectionScope\n ];\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-collection/dist/index.mjs?");
|
|
3788
|
+
|
|
3789
|
+
/***/ }),
|
|
3790
|
+
|
|
3791
|
+
/***/ "../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-compose-refs/dist/index.mjs":
|
|
3792
|
+
/*!*******************************************************************************************************!*\
|
|
3793
|
+
!*** ../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-compose-refs/dist/index.mjs ***!
|
|
3794
|
+
\*******************************************************************************************************/
|
|
3795
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3796
|
+
|
|
3797
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRefs: () => (/* binding */ $6ed0406888f73fc4$export$43e446d32b3d21af),\n/* harmony export */ useComposedRefs: () => (/* binding */ $6ed0406888f73fc4$export$c7b2cbe3552a0d05)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$var$setRef(ref, value) {\n if (typeof ref === 'function') ref(value);\n else if (ref !== null && ref !== undefined) ref.current = value;\n}\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {\n return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)\n )\n ;\n}\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-compose-refs/dist/index.mjs?");
|
|
3798
|
+
|
|
3799
|
+
/***/ }),
|
|
3800
|
+
|
|
3801
|
+
/***/ "../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-direction/dist/index.mjs":
|
|
3802
|
+
/*!****************************************************************************************************!*\
|
|
3803
|
+
!*** ../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-direction/dist/index.mjs ***!
|
|
3804
|
+
\****************************************************************************************************/
|
|
3805
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3806
|
+
|
|
3807
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ DirectionProvider: () => (/* binding */ $f631663db3294ace$export$c760c09fdd558351),\n/* harmony export */ Provider: () => (/* binding */ $f631663db3294ace$export$2881499e37b75b9a),\n/* harmony export */ useDirection: () => (/* binding */ $f631663db3294ace$export$b39126d51d94e6f3)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\nconst $f631663db3294ace$var$DirectionContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(undefined);\n/* -------------------------------------------------------------------------------------------------\n * Direction\n * -----------------------------------------------------------------------------------------------*/ const $f631663db3294ace$export$c760c09fdd558351 = (props)=>{\n const { dir: dir , children: children } = props;\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)($f631663db3294ace$var$DirectionContext.Provider, {\n value: dir\n }, children);\n};\n/* -----------------------------------------------------------------------------------------------*/ function $f631663db3294ace$export$b39126d51d94e6f3(localDir) {\n const globalDir = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)($f631663db3294ace$var$DirectionContext);\n return localDir || globalDir || 'ltr';\n}\nconst $f631663db3294ace$export$2881499e37b75b9a = $f631663db3294ace$export$c760c09fdd558351;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-slider/node_modules/@radix-ui/react-direction/dist/index.mjs?");
|
|
3098
3808
|
|
|
3099
3809
|
/***/ }),
|
|
3100
3810
|
|
|
@@ -3104,7 +3814,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3104
3814
|
\***********************************************************/
|
|
3105
3815
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3106
3816
|
|
|
3107
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ $5e63c961fc1ce211$export$be92b6f5f03c0fe9),\n/* harmony export */ Slot: () => (/* binding */ $5e63c961fc1ce211$export$8c6ed5c666ac1360),\n/* harmony export */ Slottable: () => (/* binding */ $5e63c961fc1ce211$export$d9f1ccf0bdb05d45)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_1__.Children.toArray(children);\n const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child)=>{\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (react__WEBPACK_IMPORTED_MODULE_1__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_1__.Children.only(null);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(newElement) ? newElement.props.children : null;\n } else return child;\n });\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5e63c961fc1ce211$var$SlotClone, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, slotProps, {\n ref: forwardedRef\n }), /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(newElement) ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.cloneElement)(newElement, undefined, newChildren) : null);\n }\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5e63c961fc1ce211$var$SlotClone, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, slotProps, {\n ref: forwardedRef\n }), children);\n});\n$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n if (/*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(children)) return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.cloneElement)(children, {\n ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, children.ref) : children.ref\n });\n return react__WEBPACK_IMPORTED_MODULE_1__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_1__.Children.only(null) : null;\n});\n$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, children);\n};\n/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;\n}\nfunction $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {\n // all child props should override\n const overrideProps = {\n ...childProps\n };\n for(const propName in childProps){\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{\n childPropValue(...args);\n slotPropValue(...args);\n };\n else if (slotPropValue) overrideProps[propName] = slotPropValue;\n } else if (propName === 'style') overrideProps[propName] = {\n ...slotPropValue,\n ...childPropValue\n };\n else if (propName === 'className') overrideProps[propName] = [\n slotPropValue,\n childPropValue\n ].filter(Boolean).join(' ');\n }\n return {\n ...slotProps,\n ...overrideProps\n };\n}\nconst $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = $5e63c961fc1ce211$export$8c6ed5c666ac1360;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
3817
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Root: () => (/* binding */ $5e63c961fc1ce211$export$be92b6f5f03c0fe9),\n/* harmony export */ Slot: () => (/* binding */ $5e63c961fc1ce211$export$8c6ed5c666ac1360),\n/* harmony export */ Slottable: () => (/* binding */ $5e63c961fc1ce211$export$d9f1ccf0bdb05d45)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Slot\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$8c6ed5c666ac1360 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n const childrenArray = react__WEBPACK_IMPORTED_MODULE_1__.Children.toArray(children);\n const slottable = childrenArray.find($5e63c961fc1ce211$var$isSlottable);\n if (slottable) {\n // the new element to render is the one passed as a child of `Slottable`\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child)=>{\n if (child === slottable) {\n // because the new element will be the one rendered, we are only interested\n // in grabbing its children (`newElement.props.children`)\n if (react__WEBPACK_IMPORTED_MODULE_1__.Children.count(newElement) > 1) return react__WEBPACK_IMPORTED_MODULE_1__.Children.only(null);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(newElement) ? newElement.props.children : null;\n } else return child;\n });\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5e63c961fc1ce211$var$SlotClone, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, slotProps, {\n ref: forwardedRef\n }), /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(newElement) ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.cloneElement)(newElement, undefined, newChildren) : null);\n }\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($5e63c961fc1ce211$var$SlotClone, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, slotProps, {\n ref: forwardedRef\n }), children);\n});\n$5e63c961fc1ce211$export$8c6ed5c666ac1360.displayName = 'Slot';\n/* -------------------------------------------------------------------------------------------------\n * SlotClone\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$var$SlotClone = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { children: children , ...slotProps } = props;\n if (/*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(children)) return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.cloneElement)(children, {\n ...$5e63c961fc1ce211$var$mergeProps(slotProps, children.props),\n ref: forwardedRef ? (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.composeRefs)(forwardedRef, children.ref) : children.ref\n });\n return react__WEBPACK_IMPORTED_MODULE_1__.Children.count(children) > 1 ? react__WEBPACK_IMPORTED_MODULE_1__.Children.only(null) : null;\n});\n$5e63c961fc1ce211$var$SlotClone.displayName = 'SlotClone';\n/* -------------------------------------------------------------------------------------------------\n * Slottable\n * -----------------------------------------------------------------------------------------------*/ const $5e63c961fc1ce211$export$d9f1ccf0bdb05d45 = ({ children: children })=>{\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(react__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, children);\n};\n/* ---------------------------------------------------------------------------------------------- */ function $5e63c961fc1ce211$var$isSlottable(child) {\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.isValidElement)(child) && child.type === $5e63c961fc1ce211$export$d9f1ccf0bdb05d45;\n}\nfunction $5e63c961fc1ce211$var$mergeProps(slotProps, childProps) {\n // all child props should override\n const overrideProps = {\n ...childProps\n };\n for(const propName in childProps){\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n // if the handler exists on both, we compose them\n if (slotPropValue && childPropValue) overrideProps[propName] = (...args)=>{\n childPropValue(...args);\n slotPropValue(...args);\n };\n else if (slotPropValue) overrideProps[propName] = slotPropValue;\n } else if (propName === 'style') overrideProps[propName] = {\n ...slotPropValue,\n ...childPropValue\n };\n else if (propName === 'className') overrideProps[propName] = [\n slotPropValue,\n childPropValue\n ].filter(Boolean).join(' ');\n }\n return {\n ...slotProps,\n ...overrideProps\n };\n}\nconst $5e63c961fc1ce211$export$be92b6f5f03c0fe9 = $5e63c961fc1ce211$export$8c6ed5c666ac1360;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-slot/dist/index.mjs?");
|
|
3818
|
+
|
|
3819
|
+
/***/ }),
|
|
3820
|
+
|
|
3821
|
+
/***/ "../node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs":
|
|
3822
|
+
/*!*****************************************************************************************************!*\
|
|
3823
|
+
!*** ../node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs ***!
|
|
3824
|
+
\*****************************************************************************************************/
|
|
3825
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3826
|
+
|
|
3827
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRefs: () => (/* binding */ $6ed0406888f73fc4$export$43e446d32b3d21af),\n/* harmony export */ useComposedRefs: () => (/* binding */ $6ed0406888f73fc4$export$c7b2cbe3552a0d05)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$var$setRef(ref, value) {\n if (typeof ref === 'function') ref(value);\n else if (ref !== null && ref !== undefined) ref.current = value;\n}\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {\n return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)\n )\n ;\n}\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs?");
|
|
3108
3828
|
|
|
3109
3829
|
/***/ }),
|
|
3110
3830
|
|
|
@@ -3114,7 +3834,87 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3114
3834
|
\**************************************************************/
|
|
3115
3835
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3116
3836
|
|
|
3117
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Arrow: () => (/* binding */ $a093c7e1ec25a057$export$21b07c8f274aebd5),\n/* harmony export */ Content: () => (/* binding */ $a093c7e1ec25a057$export$7c6e2c02157bb7d2),\n/* harmony export */ Portal: () => (/* binding */ $a093c7e1ec25a057$export$602eac185826482c),\n/* harmony export */ Provider: () => (/* binding */ $a093c7e1ec25a057$export$2881499e37b75b9a),\n/* harmony export */ Root: () => (/* binding */ $a093c7e1ec25a057$export$be92b6f5f03c0fe9),\n/* harmony export */ Tooltip: () => (/* binding */ $a093c7e1ec25a057$export$28c660c63b792dea),\n/* harmony export */ TooltipArrow: () => (/* binding */ $a093c7e1ec25a057$export$c27ee0ad710f7559),\n/* harmony export */ TooltipContent: () => (/* binding */ $a093c7e1ec25a057$export$e9003e2be37ec060),\n/* harmony export */ TooltipPortal: () => (/* binding */ $a093c7e1ec25a057$export$7b36b8f925ab7497),\n/* harmony export */ TooltipProvider: () => (/* binding */ $a093c7e1ec25a057$export$f78649fb9ca566b8),\n/* harmony export */ TooltipTrigger: () => (/* binding */ $a093c7e1ec25a057$export$8c610744efcf8a1d),\n/* harmony export */ Trigger: () => (/* binding */ $a093c7e1ec25a057$export$41fb9f06171c75f4),\n/* harmony export */ createTooltipScope: () => (/* binding */ $a093c7e1ec25a057$export$1c540a2224f0d865)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ \"../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-id */ \"../node_modules/@radix-ui/react-id/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-popper */ \"../node_modules/@radix-ui/react-popper/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-portal */ \"../node_modules/@radix-ui/react-portal/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-presence */ \"../node_modules/@radix-ui/react-presence/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_visually_hidden__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @radix-ui/react-visually-hidden */ \"../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst [$a093c7e1ec25a057$var$createTooltipContext, $a093c7e1ec25a057$export$1c540a2224f0d865] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)('Tooltip', [\n _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.createPopperScope\n]);\nconst $a093c7e1ec25a057$var$usePopperScope = (0,_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.createPopperScope)();\n/* -------------------------------------------------------------------------------------------------\n * TooltipProvider\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$PROVIDER_NAME = 'TooltipProvider';\nconst $a093c7e1ec25a057$var$DEFAULT_DELAY_DURATION = 700;\nconst $a093c7e1ec25a057$var$TOOLTIP_OPEN = 'tooltip.open';\nconst [$a093c7e1ec25a057$var$TooltipProviderContextProvider, $a093c7e1ec25a057$var$useTooltipProviderContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PROVIDER_NAME);\nconst $a093c7e1ec25a057$export$f78649fb9ca566b8 = (props)=>{\n const { __scopeTooltip: __scopeTooltip , delayDuration: delayDuration = $a093c7e1ec25a057$var$DEFAULT_DELAY_DURATION , skipDelayDuration: skipDelayDuration = 300 , disableHoverableContent: disableHoverableContent = false , children: children } = props;\n const [isOpenDelayed, setIsOpenDelayed] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n const isPointerInTransitRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const skipDelayTimerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(0);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const skipDelayTimer = skipDelayTimerRef.current;\n return ()=>window.clearTimeout(skipDelayTimer)\n ;\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipProviderContextProvider, {\n scope: __scopeTooltip,\n isOpenDelayed: isOpenDelayed,\n delayDuration: delayDuration,\n onOpen: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(skipDelayTimerRef.current);\n setIsOpenDelayed(false);\n }, []),\n onClose: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(()=>setIsOpenDelayed(true)\n , skipDelayDuration);\n }, [\n skipDelayDuration\n ]),\n isPointerInTransitRef: isPointerInTransitRef,\n onPointerInTransitChange: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((inTransit)=>{\n isPointerInTransitRef.current = inTransit;\n }, []),\n disableHoverableContent: disableHoverableContent\n }, children);\n};\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$f78649fb9ca566b8, {\n displayName: $a093c7e1ec25a057$var$PROVIDER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * Tooltip\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$TOOLTIP_NAME = 'Tooltip';\nconst [$a093c7e1ec25a057$var$TooltipContextProvider, $a093c7e1ec25a057$var$useTooltipContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME);\nconst $a093c7e1ec25a057$export$28c660c63b792dea = (props)=>{\n const { __scopeTooltip: __scopeTooltip , children: children , open: openProp , defaultOpen: defaultOpen = false , onOpenChange: onOpenChange , disableHoverableContent: disableHoverableContentProp , delayDuration: delayDurationProp } = props;\n const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TOOLTIP_NAME, props.__scopeTooltip);\n const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);\n const [trigger, setTrigger] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const contentId = (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__.useId)();\n const openTimerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(0);\n const disableHoverableContent = disableHoverableContentProp !== null && disableHoverableContentProp !== void 0 ? disableHoverableContentProp : providerContext.disableHoverableContent;\n const delayDuration = delayDurationProp !== null && delayDurationProp !== void 0 ? delayDurationProp : providerContext.delayDuration;\n const wasOpenDelayedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const [open1 = false, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_5__.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: (open)=>{\n if (open) {\n providerContext.onOpen(); // as `onChange` is called within a lifecycle method we\n // avoid dispatching via `dispatchDiscreteCustomEvent`.\n document.dispatchEvent(new CustomEvent($a093c7e1ec25a057$var$TOOLTIP_OPEN));\n } else providerContext.onClose();\n onOpenChange === null || onOpenChange === void 0 || onOpenChange(open);\n }\n });\n const stateAttribute = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{\n return open1 ? wasOpenDelayedRef.current ? 'delayed-open' : 'instant-open' : 'closed';\n }, [\n open1\n ]);\n const handleOpen = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(openTimerRef.current);\n wasOpenDelayedRef.current = false;\n setOpen(true);\n }, [\n setOpen\n ]);\n const handleClose = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(openTimerRef.current);\n setOpen(false);\n }, [\n setOpen\n ]);\n const handleDelayedOpen = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = window.setTimeout(()=>{\n wasOpenDelayedRef.current = true;\n setOpen(true);\n }, delayDuration);\n }, [\n delayDuration,\n setOpen\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n return ()=>window.clearTimeout(openTimerRef.current)\n ;\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Root, popperScope, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipContextProvider, {\n scope: __scopeTooltip,\n contentId: contentId,\n open: open1,\n stateAttribute: stateAttribute,\n trigger: trigger,\n onTriggerChange: setTrigger,\n onTriggerEnter: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n if (providerContext.isOpenDelayed) handleDelayedOpen();\n else handleOpen();\n }, [\n providerContext.isOpenDelayed,\n handleDelayedOpen,\n handleOpen\n ]),\n onTriggerLeave: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n if (disableHoverableContent) handleClose();\n else // Clear the timer in case the pointer leaves the trigger before the tooltip is opened.\n window.clearTimeout(openTimerRef.current);\n }, [\n handleClose,\n disableHoverableContent\n ]),\n onOpen: handleOpen,\n onClose: handleClose,\n disableHoverableContent: disableHoverableContent\n }, children));\n};\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$28c660c63b792dea, {\n displayName: $a093c7e1ec25a057$var$TOOLTIP_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * TooltipTrigger\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$TRIGGER_NAME = 'TooltipTrigger';\nconst $a093c7e1ec25a057$export$8c610744efcf8a1d = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeTooltip: __scopeTooltip , ...triggerProps } = props;\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$TRIGGER_NAME, __scopeTooltip);\n const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TRIGGER_NAME, __scopeTooltip);\n const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__.useComposedRefs)(forwardedRef, ref, context.onTriggerChange);\n const isPointerDownRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const hasPointerMoveOpenedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const handlePointerUp = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>isPointerDownRef.current = false\n , []);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n return ()=>document.removeEventListener('pointerup', handlePointerUp)\n ;\n }, [\n handlePointerUp\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Anchor, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n asChild: true\n }, popperScope), /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__.Primitive.button, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // We purposefully avoid adding `type=button` here because tooltip triggers are also\n // commonly anchors and the anchor `type` attribute signifies MIME type.\n \"aria-describedby\": context.open ? context.contentId : undefined,\n \"data-state\": context.stateAttribute\n }, triggerProps, {\n ref: composedRefs,\n onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onPointerMove, (event)=>{\n if (event.pointerType === 'touch') return;\n if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {\n context.onTriggerEnter();\n hasPointerMoveOpenedRef.current = true;\n }\n }),\n onPointerLeave: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onPointerLeave, ()=>{\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n }),\n onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onPointerDown, ()=>{\n isPointerDownRef.current = true;\n document.addEventListener('pointerup', handlePointerUp, {\n once: true\n });\n }),\n onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onFocus, ()=>{\n if (!isPointerDownRef.current) context.onOpen();\n }),\n onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onBlur, context.onClose),\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onClick, context.onClose)\n })));\n});\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$8c610744efcf8a1d, {\n displayName: $a093c7e1ec25a057$var$TRIGGER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * TooltipPortal\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$PORTAL_NAME = 'TooltipPortal';\nconst [$a093c7e1ec25a057$var$PortalProvider, $a093c7e1ec25a057$var$usePortalContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PORTAL_NAME, {\n forceMount: undefined\n});\nconst $a093c7e1ec25a057$export$7b36b8f925ab7497 = (props)=>{\n const { __scopeTooltip: __scopeTooltip , forceMount: forceMount , children: children , container: container } = props;\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$PORTAL_NAME, __scopeTooltip);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$PortalProvider, {\n scope: __scopeTooltip,\n forceMount: forceMount\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__.Presence, {\n present: forceMount || context.open\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_10__.Portal, {\n asChild: true,\n container: container\n }, children)));\n};\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$7b36b8f925ab7497, {\n displayName: $a093c7e1ec25a057$var$PORTAL_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * TooltipContent\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$CONTENT_NAME = 'TooltipContent';\nconst $a093c7e1ec25a057$export$e9003e2be37ec060 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const portalContext = $a093c7e1ec25a057$var$usePortalContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);\n const { forceMount: forceMount = portalContext.forceMount , side: side = 'top' , ...contentProps } = props;\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__.Presence, {\n present: forceMount || context.open\n }, context.disableHoverableContent ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n side: side\n }, contentProps, {\n ref: forwardedRef\n })) : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipContentHoverable, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n side: side\n }, contentProps, {\n ref: forwardedRef\n })));\n});\nconst $a093c7e1ec25a057$var$TooltipContentHoverable = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);\n const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__.useComposedRefs)(forwardedRef, ref);\n const [pointerGraceArea, setPointerGraceArea] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const { trigger: trigger , onClose: onClose } = context;\n const content = ref.current;\n const { onPointerInTransitChange: onPointerInTransitChange } = providerContext;\n const handleRemoveGraceArea = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n setPointerGraceArea(null);\n onPointerInTransitChange(false);\n }, [\n onPointerInTransitChange\n ]);\n const handleCreateGraceArea = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((event, hoverTarget)=>{\n const currentTarget = event.currentTarget;\n const exitPoint = {\n x: event.clientX,\n y: event.clientY\n };\n const exitSide = $a093c7e1ec25a057$var$getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());\n const paddedExitPoints = $a093c7e1ec25a057$var$getPaddedExitPoints(exitPoint, exitSide);\n const hoverTargetPoints = $a093c7e1ec25a057$var$getPointsFromRect(hoverTarget.getBoundingClientRect());\n const graceArea = $a093c7e1ec25a057$var$getHull([\n ...paddedExitPoints,\n ...hoverTargetPoints\n ]);\n setPointerGraceArea(graceArea);\n onPointerInTransitChange(true);\n }, [\n onPointerInTransitChange\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n return ()=>handleRemoveGraceArea()\n ;\n }, [\n handleRemoveGraceArea\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (trigger && content) {\n const handleTriggerLeave = (event)=>handleCreateGraceArea(event, content)\n ;\n const handleContentLeave = (event)=>handleCreateGraceArea(event, trigger)\n ;\n trigger.addEventListener('pointerleave', handleTriggerLeave);\n content.addEventListener('pointerleave', handleContentLeave);\n return ()=>{\n trigger.removeEventListener('pointerleave', handleTriggerLeave);\n content.removeEventListener('pointerleave', handleContentLeave);\n };\n }\n }, [\n trigger,\n content,\n handleCreateGraceArea,\n handleRemoveGraceArea\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (pointerGraceArea) {\n const handleTrackPointerGrace = (event)=>{\n const target = event.target;\n const pointerPosition = {\n x: event.clientX,\n y: event.clientY\n };\n const hasEnteredTarget = (trigger === null || trigger === void 0 ? void 0 : trigger.contains(target)) || (content === null || content === void 0 ? void 0 : content.contains(target));\n const isPointerOutsideGraceArea = !$a093c7e1ec25a057$var$isPointInPolygon(pointerPosition, pointerGraceArea);\n if (hasEnteredTarget) handleRemoveGraceArea();\n else if (isPointerOutsideGraceArea) {\n handleRemoveGraceArea();\n onClose();\n }\n };\n document.addEventListener('pointermove', handleTrackPointerGrace);\n return ()=>document.removeEventListener('pointermove', handleTrackPointerGrace)\n ;\n }\n }, [\n trigger,\n content,\n pointerGraceArea,\n onClose,\n handleRemoveGraceArea\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs\n }));\n});\nconst [$a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, $a093c7e1ec25a057$var$useVisuallyHiddenContentContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME, {\n isInside: false\n});\nconst $a093c7e1ec25a057$var$TooltipContentImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeTooltip: __scopeTooltip , children: children , 'aria-label': ariaLabel , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , ...contentProps } = props;\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, __scopeTooltip);\n const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);\n const { onClose: onClose } = context; // Close this tooltip if another one opens\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n document.addEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN, onClose);\n return ()=>document.removeEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN, onClose)\n ;\n }, [\n onClose\n ]); // Close the tooltip if the trigger is scrolled\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (context.trigger) {\n const handleScroll = (event)=>{\n const target = event.target;\n if (target !== null && target !== void 0 && target.contains(context.trigger)) onClose();\n };\n window.addEventListener('scroll', handleScroll, {\n capture: true\n });\n return ()=>window.removeEventListener('scroll', handleScroll, {\n capture: true\n })\n ;\n }\n }, [\n context.trigger,\n onClose\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_11__.DismissableLayer, {\n asChild: true,\n disableOutsidePointerEvents: false,\n onEscapeKeyDown: onEscapeKeyDown,\n onPointerDownOutside: onPointerDownOutside,\n onFocusOutside: (event)=>event.preventDefault()\n ,\n onDismiss: onClose\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Content, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-state\": context.stateAttribute\n }, popperScope, contentProps, {\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n '--radix-tooltip-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-tooltip-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-tooltip-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-tooltip-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-tooltip-trigger-height': 'var(--radix-popper-anchor-height)'\n }\n }), /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_12__.Slottable, null, children), /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, {\n scope: __scopeTooltip,\n isInside: true\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_visually_hidden__WEBPACK_IMPORTED_MODULE_13__.Root, {\n id: context.contentId,\n role: \"tooltip\"\n }, ariaLabel || children))));\n});\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$e9003e2be37ec060, {\n displayName: $a093c7e1ec25a057$var$CONTENT_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * TooltipArrow\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$ARROW_NAME = 'TooltipArrow';\nconst $a093c7e1ec25a057$export$c27ee0ad710f7559 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeTooltip: __scopeTooltip , ...arrowProps } = props;\n const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);\n const visuallyHiddenContentContext = $a093c7e1ec25a057$var$useVisuallyHiddenContentContext($a093c7e1ec25a057$var$ARROW_NAME, __scopeTooltip); // if the arrow is inside the `VisuallyHidden`, we don't want to render it all to\n // prevent issues in positioning the arrow due to the duplicate\n return visuallyHiddenContentContext.isInside ? null : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Arrow, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, popperScope, arrowProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$c27ee0ad710f7559, {\n displayName: $a093c7e1ec25a057$var$ARROW_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ function $a093c7e1ec25a057$var$getExitSideFromRect(point, rect) {\n const top = Math.abs(rect.top - point.y);\n const bottom = Math.abs(rect.bottom - point.y);\n const right = Math.abs(rect.right - point.x);\n const left = Math.abs(rect.left - point.x);\n switch(Math.min(top, bottom, right, left)){\n case left:\n return 'left';\n case right:\n return 'right';\n case top:\n return 'top';\n case bottom:\n return 'bottom';\n default:\n throw new Error('unreachable');\n }\n}\nfunction $a093c7e1ec25a057$var$getPaddedExitPoints(exitPoint, exitSide, padding = 5) {\n const paddedExitPoints = [];\n switch(exitSide){\n case 'top':\n paddedExitPoints.push({\n x: exitPoint.x - padding,\n y: exitPoint.y + padding\n }, {\n x: exitPoint.x + padding,\n y: exitPoint.y + padding\n });\n break;\n case 'bottom':\n paddedExitPoints.push({\n x: exitPoint.x - padding,\n y: exitPoint.y - padding\n }, {\n x: exitPoint.x + padding,\n y: exitPoint.y - padding\n });\n break;\n case 'left':\n paddedExitPoints.push({\n x: exitPoint.x + padding,\n y: exitPoint.y - padding\n }, {\n x: exitPoint.x + padding,\n y: exitPoint.y + padding\n });\n break;\n case 'right':\n paddedExitPoints.push({\n x: exitPoint.x - padding,\n y: exitPoint.y - padding\n }, {\n x: exitPoint.x - padding,\n y: exitPoint.y + padding\n });\n break;\n }\n return paddedExitPoints;\n}\nfunction $a093c7e1ec25a057$var$getPointsFromRect(rect) {\n const { top: top , right: right , bottom: bottom , left: left } = rect;\n return [\n {\n x: left,\n y: top\n },\n {\n x: right,\n y: top\n },\n {\n x: right,\n y: bottom\n },\n {\n x: left,\n y: bottom\n }\n ];\n} // Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nfunction $a093c7e1ec25a057$var$isPointInPolygon(point, polygon) {\n const { x: x , y: y } = point;\n let inside = false;\n for(let i = 0, j = polygon.length - 1; i < polygon.length; j = i++){\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y; // prettier-ignore\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n} // Returns a new array of points representing the convex hull of the given set of points.\n// https://www.nayuki.io/page/convex-hull-algorithm\nfunction $a093c7e1ec25a057$var$getHull(points) {\n const newPoints = points.slice();\n newPoints.sort((a, b)=>{\n if (a.x < b.x) return -1;\n else if (a.x > b.x) return 1;\n else if (a.y < b.y) return -1;\n else if (a.y > b.y) return 1;\n else return 0;\n });\n return $a093c7e1ec25a057$var$getHullPresorted(newPoints);\n} // Returns the convex hull, assuming that each points[i] <= points[i + 1]. Runs in O(n) time.\nfunction $a093c7e1ec25a057$var$getHullPresorted(points) {\n if (points.length <= 1) return points.slice();\n const upperHull = [];\n for(let i = 0; i < points.length; i++){\n const p = points[i];\n while(upperHull.length >= 2){\n const q = upperHull[upperHull.length - 1];\n const r = upperHull[upperHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();\n else break;\n }\n upperHull.push(p);\n }\n upperHull.pop();\n const lowerHull = [];\n for(let i1 = points.length - 1; i1 >= 0; i1--){\n const p = points[i1];\n while(lowerHull.length >= 2){\n const q = lowerHull[lowerHull.length - 1];\n const r = lowerHull[lowerHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();\n else break;\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) return upperHull;\n else return upperHull.concat(lowerHull);\n}\nconst $a093c7e1ec25a057$export$2881499e37b75b9a = $a093c7e1ec25a057$export$f78649fb9ca566b8;\nconst $a093c7e1ec25a057$export$be92b6f5f03c0fe9 = $a093c7e1ec25a057$export$28c660c63b792dea;\nconst $a093c7e1ec25a057$export$41fb9f06171c75f4 = $a093c7e1ec25a057$export$8c610744efcf8a1d;\nconst $a093c7e1ec25a057$export$602eac185826482c = $a093c7e1ec25a057$export$7b36b8f925ab7497;\nconst $a093c7e1ec25a057$export$7c6e2c02157bb7d2 = $a093c7e1ec25a057$export$e9003e2be37ec060;\nconst $a093c7e1ec25a057$export$21b07c8f274aebd5 = $a093c7e1ec25a057$export$c27ee0ad710f7559;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/dist/index.mjs?");
|
|
3837
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Arrow: () => (/* binding */ $a093c7e1ec25a057$export$21b07c8f274aebd5),\n/* harmony export */ Content: () => (/* binding */ $a093c7e1ec25a057$export$7c6e2c02157bb7d2),\n/* harmony export */ Portal: () => (/* binding */ $a093c7e1ec25a057$export$602eac185826482c),\n/* harmony export */ Provider: () => (/* binding */ $a093c7e1ec25a057$export$2881499e37b75b9a),\n/* harmony export */ Root: () => (/* binding */ $a093c7e1ec25a057$export$be92b6f5f03c0fe9),\n/* harmony export */ Tooltip: () => (/* binding */ $a093c7e1ec25a057$export$28c660c63b792dea),\n/* harmony export */ TooltipArrow: () => (/* binding */ $a093c7e1ec25a057$export$c27ee0ad710f7559),\n/* harmony export */ TooltipContent: () => (/* binding */ $a093c7e1ec25a057$export$e9003e2be37ec060),\n/* harmony export */ TooltipPortal: () => (/* binding */ $a093c7e1ec25a057$export$7b36b8f925ab7497),\n/* harmony export */ TooltipProvider: () => (/* binding */ $a093c7e1ec25a057$export$f78649fb9ca566b8),\n/* harmony export */ TooltipTrigger: () => (/* binding */ $a093c7e1ec25a057$export$8c610744efcf8a1d),\n/* harmony export */ Trigger: () => (/* binding */ $a093c7e1ec25a057$export$41fb9f06171c75f4),\n/* harmony export */ createTooltipScope: () => (/* binding */ $a093c7e1ec25a057$export$1c540a2224f0d865)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-context */ \"../node_modules/@radix-ui/react-context/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @radix-ui/react-dismissable-layer */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-id */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-id/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-popper */ \"../node_modules/@radix-ui/react-popper/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @radix-ui/react-portal */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @radix-ui/react-presence */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-presence/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @radix-ui/react-slot */ \"../node_modules/@radix-ui/react-slot/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/react-use-controllable-state */ \"../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_visually_hidden__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @radix-ui/react-visually-hidden */ \"../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst [$a093c7e1ec25a057$var$createTooltipContext, $a093c7e1ec25a057$export$1c540a2224f0d865] = (0,_radix_ui_react_context__WEBPACK_IMPORTED_MODULE_2__.createContextScope)('Tooltip', [\n _radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.createPopperScope\n]);\nconst $a093c7e1ec25a057$var$usePopperScope = (0,_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.createPopperScope)();\n/* -------------------------------------------------------------------------------------------------\n * TooltipProvider\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$PROVIDER_NAME = 'TooltipProvider';\nconst $a093c7e1ec25a057$var$DEFAULT_DELAY_DURATION = 700;\nconst $a093c7e1ec25a057$var$TOOLTIP_OPEN = 'tooltip.open';\nconst [$a093c7e1ec25a057$var$TooltipProviderContextProvider, $a093c7e1ec25a057$var$useTooltipProviderContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PROVIDER_NAME);\nconst $a093c7e1ec25a057$export$f78649fb9ca566b8 = (props)=>{\n const { __scopeTooltip: __scopeTooltip , delayDuration: delayDuration = $a093c7e1ec25a057$var$DEFAULT_DELAY_DURATION , skipDelayDuration: skipDelayDuration = 300 , disableHoverableContent: disableHoverableContent = false , children: children } = props;\n const [isOpenDelayed, setIsOpenDelayed] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true);\n const isPointerInTransitRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const skipDelayTimerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(0);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const skipDelayTimer = skipDelayTimerRef.current;\n return ()=>window.clearTimeout(skipDelayTimer)\n ;\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipProviderContextProvider, {\n scope: __scopeTooltip,\n isOpenDelayed: isOpenDelayed,\n delayDuration: delayDuration,\n onOpen: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(skipDelayTimerRef.current);\n setIsOpenDelayed(false);\n }, []),\n onClose: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(skipDelayTimerRef.current);\n skipDelayTimerRef.current = window.setTimeout(()=>setIsOpenDelayed(true)\n , skipDelayDuration);\n }, [\n skipDelayDuration\n ]),\n isPointerInTransitRef: isPointerInTransitRef,\n onPointerInTransitChange: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((inTransit)=>{\n isPointerInTransitRef.current = inTransit;\n }, []),\n disableHoverableContent: disableHoverableContent\n }, children);\n};\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$f78649fb9ca566b8, {\n displayName: $a093c7e1ec25a057$var$PROVIDER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * Tooltip\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$TOOLTIP_NAME = 'Tooltip';\nconst [$a093c7e1ec25a057$var$TooltipContextProvider, $a093c7e1ec25a057$var$useTooltipContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME);\nconst $a093c7e1ec25a057$export$28c660c63b792dea = (props)=>{\n const { __scopeTooltip: __scopeTooltip , children: children , open: openProp , defaultOpen: defaultOpen = false , onOpenChange: onOpenChange , disableHoverableContent: disableHoverableContentProp , delayDuration: delayDurationProp } = props;\n const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TOOLTIP_NAME, props.__scopeTooltip);\n const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);\n const [trigger, setTrigger] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const contentId = (0,_radix_ui_react_id__WEBPACK_IMPORTED_MODULE_4__.useId)();\n const openTimerRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(0);\n const disableHoverableContent = disableHoverableContentProp !== null && disableHoverableContentProp !== void 0 ? disableHoverableContentProp : providerContext.disableHoverableContent;\n const delayDuration = delayDurationProp !== null && delayDurationProp !== void 0 ? delayDurationProp : providerContext.delayDuration;\n const wasOpenDelayedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const [open1 = false, setOpen] = (0,_radix_ui_react_use_controllable_state__WEBPACK_IMPORTED_MODULE_5__.useControllableState)({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: (open)=>{\n if (open) {\n providerContext.onOpen(); // as `onChange` is called within a lifecycle method we\n // avoid dispatching via `dispatchDiscreteCustomEvent`.\n document.dispatchEvent(new CustomEvent($a093c7e1ec25a057$var$TOOLTIP_OPEN));\n } else providerContext.onClose();\n onOpenChange === null || onOpenChange === void 0 || onOpenChange(open);\n }\n });\n const stateAttribute = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{\n return open1 ? wasOpenDelayedRef.current ? 'delayed-open' : 'instant-open' : 'closed';\n }, [\n open1\n ]);\n const handleOpen = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(openTimerRef.current);\n wasOpenDelayedRef.current = false;\n setOpen(true);\n }, [\n setOpen\n ]);\n const handleClose = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(openTimerRef.current);\n setOpen(false);\n }, [\n setOpen\n ]);\n const handleDelayedOpen = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n window.clearTimeout(openTimerRef.current);\n openTimerRef.current = window.setTimeout(()=>{\n wasOpenDelayedRef.current = true;\n setOpen(true);\n }, delayDuration);\n }, [\n delayDuration,\n setOpen\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n return ()=>window.clearTimeout(openTimerRef.current)\n ;\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Root, popperScope, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipContextProvider, {\n scope: __scopeTooltip,\n contentId: contentId,\n open: open1,\n stateAttribute: stateAttribute,\n trigger: trigger,\n onTriggerChange: setTrigger,\n onTriggerEnter: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n if (providerContext.isOpenDelayed) handleDelayedOpen();\n else handleOpen();\n }, [\n providerContext.isOpenDelayed,\n handleDelayedOpen,\n handleOpen\n ]),\n onTriggerLeave: (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n if (disableHoverableContent) handleClose();\n else // Clear the timer in case the pointer leaves the trigger before the tooltip is opened.\n window.clearTimeout(openTimerRef.current);\n }, [\n handleClose,\n disableHoverableContent\n ]),\n onOpen: handleOpen,\n onClose: handleClose,\n disableHoverableContent: disableHoverableContent\n }, children));\n};\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$28c660c63b792dea, {\n displayName: $a093c7e1ec25a057$var$TOOLTIP_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * TooltipTrigger\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$TRIGGER_NAME = 'TooltipTrigger';\nconst $a093c7e1ec25a057$export$8c610744efcf8a1d = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeTooltip: __scopeTooltip , ...triggerProps } = props;\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$TRIGGER_NAME, __scopeTooltip);\n const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$TRIGGER_NAME, __scopeTooltip);\n const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__.useComposedRefs)(forwardedRef, ref, context.onTriggerChange);\n const isPointerDownRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const hasPointerMoveOpenedRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const handlePointerUp = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>isPointerDownRef.current = false\n , []);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n return ()=>document.removeEventListener('pointerup', handlePointerUp)\n ;\n }, [\n handlePointerUp\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Anchor, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n asChild: true\n }, popperScope), /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_7__.Primitive.button, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n // We purposefully avoid adding `type=button` here because tooltip triggers are also\n // commonly anchors and the anchor `type` attribute signifies MIME type.\n \"aria-describedby\": context.open ? context.contentId : undefined,\n \"data-state\": context.stateAttribute\n }, triggerProps, {\n ref: composedRefs,\n onPointerMove: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onPointerMove, (event)=>{\n if (event.pointerType === 'touch') return;\n if (!hasPointerMoveOpenedRef.current && !providerContext.isPointerInTransitRef.current) {\n context.onTriggerEnter();\n hasPointerMoveOpenedRef.current = true;\n }\n }),\n onPointerLeave: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onPointerLeave, ()=>{\n context.onTriggerLeave();\n hasPointerMoveOpenedRef.current = false;\n }),\n onPointerDown: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onPointerDown, ()=>{\n isPointerDownRef.current = true;\n document.addEventListener('pointerup', handlePointerUp, {\n once: true\n });\n }),\n onFocus: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onFocus, ()=>{\n if (!isPointerDownRef.current) context.onOpen();\n }),\n onBlur: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onBlur, context.onClose),\n onClick: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_8__.composeEventHandlers)(props.onClick, context.onClose)\n })));\n});\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$8c610744efcf8a1d, {\n displayName: $a093c7e1ec25a057$var$TRIGGER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * TooltipPortal\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$PORTAL_NAME = 'TooltipPortal';\nconst [$a093c7e1ec25a057$var$PortalProvider, $a093c7e1ec25a057$var$usePortalContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$PORTAL_NAME, {\n forceMount: undefined\n});\nconst $a093c7e1ec25a057$export$7b36b8f925ab7497 = (props)=>{\n const { __scopeTooltip: __scopeTooltip , forceMount: forceMount , children: children , container: container } = props;\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$PORTAL_NAME, __scopeTooltip);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$PortalProvider, {\n scope: __scopeTooltip,\n forceMount: forceMount\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__.Presence, {\n present: forceMount || context.open\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_portal__WEBPACK_IMPORTED_MODULE_10__.Portal, {\n asChild: true,\n container: container\n }, children)));\n};\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$7b36b8f925ab7497, {\n displayName: $a093c7e1ec25a057$var$PORTAL_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * TooltipContent\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$CONTENT_NAME = 'TooltipContent';\nconst $a093c7e1ec25a057$export$e9003e2be37ec060 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const portalContext = $a093c7e1ec25a057$var$usePortalContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);\n const { forceMount: forceMount = portalContext.forceMount , side: side = 'top' , ...contentProps } = props;\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_presence__WEBPACK_IMPORTED_MODULE_9__.Presence, {\n present: forceMount || context.open\n }, context.disableHoverableContent ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n side: side\n }, contentProps, {\n ref: forwardedRef\n })) : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipContentHoverable, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n side: side\n }, contentProps, {\n ref: forwardedRef\n })));\n});\nconst $a093c7e1ec25a057$var$TooltipContentHoverable = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);\n const providerContext = $a093c7e1ec25a057$var$useTooltipProviderContext($a093c7e1ec25a057$var$CONTENT_NAME, props.__scopeTooltip);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_6__.useComposedRefs)(forwardedRef, ref);\n const [pointerGraceArea, setPointerGraceArea] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const { trigger: trigger , onClose: onClose } = context;\n const content = ref.current;\n const { onPointerInTransitChange: onPointerInTransitChange } = providerContext;\n const handleRemoveGraceArea = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)(()=>{\n setPointerGraceArea(null);\n onPointerInTransitChange(false);\n }, [\n onPointerInTransitChange\n ]);\n const handleCreateGraceArea = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((event, hoverTarget)=>{\n const currentTarget = event.currentTarget;\n const exitPoint = {\n x: event.clientX,\n y: event.clientY\n };\n const exitSide = $a093c7e1ec25a057$var$getExitSideFromRect(exitPoint, currentTarget.getBoundingClientRect());\n const paddedExitPoints = $a093c7e1ec25a057$var$getPaddedExitPoints(exitPoint, exitSide);\n const hoverTargetPoints = $a093c7e1ec25a057$var$getPointsFromRect(hoverTarget.getBoundingClientRect());\n const graceArea = $a093c7e1ec25a057$var$getHull([\n ...paddedExitPoints,\n ...hoverTargetPoints\n ]);\n setPointerGraceArea(graceArea);\n onPointerInTransitChange(true);\n }, [\n onPointerInTransitChange\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n return ()=>handleRemoveGraceArea()\n ;\n }, [\n handleRemoveGraceArea\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (trigger && content) {\n const handleTriggerLeave = (event)=>handleCreateGraceArea(event, content)\n ;\n const handleContentLeave = (event)=>handleCreateGraceArea(event, trigger)\n ;\n trigger.addEventListener('pointerleave', handleTriggerLeave);\n content.addEventListener('pointerleave', handleContentLeave);\n return ()=>{\n trigger.removeEventListener('pointerleave', handleTriggerLeave);\n content.removeEventListener('pointerleave', handleContentLeave);\n };\n }\n }, [\n trigger,\n content,\n handleCreateGraceArea,\n handleRemoveGraceArea\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (pointerGraceArea) {\n const handleTrackPointerGrace = (event)=>{\n const target = event.target;\n const pointerPosition = {\n x: event.clientX,\n y: event.clientY\n };\n const hasEnteredTarget = (trigger === null || trigger === void 0 ? void 0 : trigger.contains(target)) || (content === null || content === void 0 ? void 0 : content.contains(target));\n const isPointerOutsideGraceArea = !$a093c7e1ec25a057$var$isPointInPolygon(pointerPosition, pointerGraceArea);\n if (hasEnteredTarget) handleRemoveGraceArea();\n else if (isPointerOutsideGraceArea) {\n handleRemoveGraceArea();\n onClose();\n }\n };\n document.addEventListener('pointermove', handleTrackPointerGrace);\n return ()=>document.removeEventListener('pointermove', handleTrackPointerGrace)\n ;\n }\n }, [\n trigger,\n content,\n pointerGraceArea,\n onClose,\n handleRemoveGraceArea\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$TooltipContentImpl, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs\n }));\n});\nconst [$a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, $a093c7e1ec25a057$var$useVisuallyHiddenContentContext] = $a093c7e1ec25a057$var$createTooltipContext($a093c7e1ec25a057$var$TOOLTIP_NAME, {\n isInside: false\n});\nconst $a093c7e1ec25a057$var$TooltipContentImpl = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeTooltip: __scopeTooltip , children: children , 'aria-label': ariaLabel , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , ...contentProps } = props;\n const context = $a093c7e1ec25a057$var$useTooltipContext($a093c7e1ec25a057$var$CONTENT_NAME, __scopeTooltip);\n const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);\n const { onClose: onClose } = context; // Close this tooltip if another one opens\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n document.addEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN, onClose);\n return ()=>document.removeEventListener($a093c7e1ec25a057$var$TOOLTIP_OPEN, onClose)\n ;\n }, [\n onClose\n ]); // Close the tooltip if the trigger is scrolled\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (context.trigger) {\n const handleScroll = (event)=>{\n const target = event.target;\n if (target !== null && target !== void 0 && target.contains(context.trigger)) onClose();\n };\n window.addEventListener('scroll', handleScroll, {\n capture: true\n });\n return ()=>window.removeEventListener('scroll', handleScroll, {\n capture: true\n })\n ;\n }\n }, [\n context.trigger,\n onClose\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_dismissable_layer__WEBPACK_IMPORTED_MODULE_11__.DismissableLayer, {\n asChild: true,\n disableOutsidePointerEvents: false,\n onEscapeKeyDown: onEscapeKeyDown,\n onPointerDownOutside: onPointerDownOutside,\n onFocusOutside: (event)=>event.preventDefault()\n ,\n onDismiss: onClose\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Content, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n \"data-state\": context.stateAttribute\n }, popperScope, contentProps, {\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n '--radix-tooltip-content-transform-origin': 'var(--radix-popper-transform-origin)',\n '--radix-tooltip-content-available-width': 'var(--radix-popper-available-width)',\n '--radix-tooltip-content-available-height': 'var(--radix-popper-available-height)',\n '--radix-tooltip-trigger-width': 'var(--radix-popper-anchor-width)',\n '--radix-tooltip-trigger-height': 'var(--radix-popper-anchor-height)'\n }\n }), /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_slot__WEBPACK_IMPORTED_MODULE_12__.Slottable, null, children), /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)($a093c7e1ec25a057$var$VisuallyHiddenContentContextProvider, {\n scope: __scopeTooltip,\n isInside: true\n }, /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_visually_hidden__WEBPACK_IMPORTED_MODULE_13__.Root, {\n id: context.contentId,\n role: \"tooltip\"\n }, ariaLabel || children))));\n});\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$e9003e2be37ec060, {\n displayName: $a093c7e1ec25a057$var$CONTENT_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * TooltipArrow\n * -----------------------------------------------------------------------------------------------*/ const $a093c7e1ec25a057$var$ARROW_NAME = 'TooltipArrow';\nconst $a093c7e1ec25a057$export$c27ee0ad710f7559 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const { __scopeTooltip: __scopeTooltip , ...arrowProps } = props;\n const popperScope = $a093c7e1ec25a057$var$usePopperScope(__scopeTooltip);\n const visuallyHiddenContentContext = $a093c7e1ec25a057$var$useVisuallyHiddenContentContext($a093c7e1ec25a057$var$ARROW_NAME, __scopeTooltip); // if the arrow is inside the `VisuallyHidden`, we don't want to render it all to\n // prevent issues in positioning the arrow due to the duplicate\n return visuallyHiddenContentContext.isInside ? null : /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_popper__WEBPACK_IMPORTED_MODULE_3__.Arrow, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, popperScope, arrowProps, {\n ref: forwardedRef\n }));\n});\n/*#__PURE__*/ Object.assign($a093c7e1ec25a057$export$c27ee0ad710f7559, {\n displayName: $a093c7e1ec25a057$var$ARROW_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ function $a093c7e1ec25a057$var$getExitSideFromRect(point, rect) {\n const top = Math.abs(rect.top - point.y);\n const bottom = Math.abs(rect.bottom - point.y);\n const right = Math.abs(rect.right - point.x);\n const left = Math.abs(rect.left - point.x);\n switch(Math.min(top, bottom, right, left)){\n case left:\n return 'left';\n case right:\n return 'right';\n case top:\n return 'top';\n case bottom:\n return 'bottom';\n default:\n throw new Error('unreachable');\n }\n}\nfunction $a093c7e1ec25a057$var$getPaddedExitPoints(exitPoint, exitSide, padding = 5) {\n const paddedExitPoints = [];\n switch(exitSide){\n case 'top':\n paddedExitPoints.push({\n x: exitPoint.x - padding,\n y: exitPoint.y + padding\n }, {\n x: exitPoint.x + padding,\n y: exitPoint.y + padding\n });\n break;\n case 'bottom':\n paddedExitPoints.push({\n x: exitPoint.x - padding,\n y: exitPoint.y - padding\n }, {\n x: exitPoint.x + padding,\n y: exitPoint.y - padding\n });\n break;\n case 'left':\n paddedExitPoints.push({\n x: exitPoint.x + padding,\n y: exitPoint.y - padding\n }, {\n x: exitPoint.x + padding,\n y: exitPoint.y + padding\n });\n break;\n case 'right':\n paddedExitPoints.push({\n x: exitPoint.x - padding,\n y: exitPoint.y - padding\n }, {\n x: exitPoint.x - padding,\n y: exitPoint.y + padding\n });\n break;\n }\n return paddedExitPoints;\n}\nfunction $a093c7e1ec25a057$var$getPointsFromRect(rect) {\n const { top: top , right: right , bottom: bottom , left: left } = rect;\n return [\n {\n x: left,\n y: top\n },\n {\n x: right,\n y: top\n },\n {\n x: right,\n y: bottom\n },\n {\n x: left,\n y: bottom\n }\n ];\n} // Determine if a point is inside of a polygon.\n// Based on https://github.com/substack/point-in-polygon\nfunction $a093c7e1ec25a057$var$isPointInPolygon(point, polygon) {\n const { x: x , y: y } = point;\n let inside = false;\n for(let i = 0, j = polygon.length - 1; i < polygon.length; j = i++){\n const xi = polygon[i].x;\n const yi = polygon[i].y;\n const xj = polygon[j].x;\n const yj = polygon[j].y; // prettier-ignore\n const intersect = yi > y !== yj > y && x < (xj - xi) * (y - yi) / (yj - yi) + xi;\n if (intersect) inside = !inside;\n }\n return inside;\n} // Returns a new array of points representing the convex hull of the given set of points.\n// https://www.nayuki.io/page/convex-hull-algorithm\nfunction $a093c7e1ec25a057$var$getHull(points) {\n const newPoints = points.slice();\n newPoints.sort((a, b)=>{\n if (a.x < b.x) return -1;\n else if (a.x > b.x) return 1;\n else if (a.y < b.y) return -1;\n else if (a.y > b.y) return 1;\n else return 0;\n });\n return $a093c7e1ec25a057$var$getHullPresorted(newPoints);\n} // Returns the convex hull, assuming that each points[i] <= points[i + 1]. Runs in O(n) time.\nfunction $a093c7e1ec25a057$var$getHullPresorted(points) {\n if (points.length <= 1) return points.slice();\n const upperHull = [];\n for(let i = 0; i < points.length; i++){\n const p = points[i];\n while(upperHull.length >= 2){\n const q = upperHull[upperHull.length - 1];\n const r = upperHull[upperHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) upperHull.pop();\n else break;\n }\n upperHull.push(p);\n }\n upperHull.pop();\n const lowerHull = [];\n for(let i1 = points.length - 1; i1 >= 0; i1--){\n const p = points[i1];\n while(lowerHull.length >= 2){\n const q = lowerHull[lowerHull.length - 1];\n const r = lowerHull[lowerHull.length - 2];\n if ((q.x - r.x) * (p.y - r.y) >= (q.y - r.y) * (p.x - r.x)) lowerHull.pop();\n else break;\n }\n lowerHull.push(p);\n }\n lowerHull.pop();\n if (upperHull.length === 1 && lowerHull.length === 1 && upperHull[0].x === lowerHull[0].x && upperHull[0].y === lowerHull[0].y) return upperHull;\n else return upperHull.concat(lowerHull);\n}\nconst $a093c7e1ec25a057$export$2881499e37b75b9a = $a093c7e1ec25a057$export$f78649fb9ca566b8;\nconst $a093c7e1ec25a057$export$be92b6f5f03c0fe9 = $a093c7e1ec25a057$export$28c660c63b792dea;\nconst $a093c7e1ec25a057$export$41fb9f06171c75f4 = $a093c7e1ec25a057$export$8c610744efcf8a1d;\nconst $a093c7e1ec25a057$export$602eac185826482c = $a093c7e1ec25a057$export$7b36b8f925ab7497;\nconst $a093c7e1ec25a057$export$7c6e2c02157bb7d2 = $a093c7e1ec25a057$export$e9003e2be37ec060;\nconst $a093c7e1ec25a057$export$21b07c8f274aebd5 = $a093c7e1ec25a057$export$c27ee0ad710f7559;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/dist/index.mjs?");
|
|
3838
|
+
|
|
3839
|
+
/***/ }),
|
|
3840
|
+
|
|
3841
|
+
/***/ "../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.mjs":
|
|
3842
|
+
/*!***********************************************************************************************!*\
|
|
3843
|
+
!*** ../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.mjs ***!
|
|
3844
|
+
\***********************************************************************************************/
|
|
3845
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3846
|
+
|
|
3847
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeEventHandlers: () => (/* binding */ $e42e1063c40fb3ef$export$b9ecd428b558ff10)\n/* harmony export */ });\nfunction $e42e1063c40fb3ef$export$b9ecd428b558ff10(originalEventHandler, ourEventHandler, { checkForDefaultPrevented: checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler === null || originalEventHandler === void 0 || originalEventHandler(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) return ourEventHandler === null || ourEventHandler === void 0 ? void 0 : ourEventHandler(event);\n };\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.mjs?");
|
|
3848
|
+
|
|
3849
|
+
/***/ }),
|
|
3850
|
+
|
|
3851
|
+
/***/ "../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-compose-refs/dist/index.mjs":
|
|
3852
|
+
/*!********************************************************************************************************!*\
|
|
3853
|
+
!*** ../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-compose-refs/dist/index.mjs ***!
|
|
3854
|
+
\********************************************************************************************************/
|
|
3855
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3856
|
+
|
|
3857
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ composeRefs: () => (/* binding */ $6ed0406888f73fc4$export$43e446d32b3d21af),\n/* harmony export */ useComposedRefs: () => (/* binding */ $6ed0406888f73fc4$export$c7b2cbe3552a0d05)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/**\n * Set a given ref to a given value\n * This utility takes care of different types of refs: callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$var$setRef(ref, value) {\n if (typeof ref === 'function') ref(value);\n else if (ref !== null && ref !== undefined) ref.current = value;\n}\n/**\n * A utility to compose multiple refs together\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$43e446d32b3d21af(...refs) {\n return (node)=>refs.forEach((ref)=>$6ed0406888f73fc4$var$setRef(ref, node)\n )\n ;\n}\n/**\n * A custom hook that composes multiple refs\n * Accepts callback refs and RefObject(s)\n */ function $6ed0406888f73fc4$export$c7b2cbe3552a0d05(...refs) {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)($6ed0406888f73fc4$export$43e446d32b3d21af(...refs), refs);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-compose-refs/dist/index.mjs?");
|
|
3858
|
+
|
|
3859
|
+
/***/ }),
|
|
3860
|
+
|
|
3861
|
+
/***/ "../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs":
|
|
3862
|
+
/*!*************************************************************************************************************!*\
|
|
3863
|
+
!*** ../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs ***!
|
|
3864
|
+
\*************************************************************************************************************/
|
|
3865
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3866
|
+
|
|
3867
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Branch: () => (/* binding */ $5cb92bef7577960e$export$aecb2ddcb55c95be),\n/* harmony export */ DismissableLayer: () => (/* binding */ $5cb92bef7577960e$export$177fb62ff3ec1f22),\n/* harmony export */ DismissableLayerBranch: () => (/* binding */ $5cb92bef7577960e$export$4d5eb2109db14228),\n/* harmony export */ Root: () => (/* binding */ $5cb92bef7577960e$export$be92b6f5f03c0fe9)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @radix-ui/primitive */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-escape-keydown */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayer\n * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME = 'DismissableLayer';\nconst $5cb92bef7577960e$var$CONTEXT_UPDATE = 'dismissableLayer.update';\nconst $5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE = 'dismissableLayer.pointerDownOutside';\nconst $5cb92bef7577960e$var$FOCUS_OUTSIDE = 'dismissableLayer.focusOutside';\nlet $5cb92bef7577960e$var$originalBodyPointerEvents;\nconst $5cb92bef7577960e$var$DismissableLayerContext = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createContext)({\n layers: new Set(),\n layersWithOutsidePointerEventsDisabled: new Set(),\n branches: new Set()\n});\nconst $5cb92bef7577960e$export$177fb62ff3ec1f22 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n var _node$ownerDocument;\n const { disableOutsidePointerEvents: disableOutsidePointerEvents = false , onEscapeKeyDown: onEscapeKeyDown , onPointerDownOutside: onPointerDownOutside , onFocusOutside: onFocusOutside , onInteractOutside: onInteractOutside , onDismiss: onDismiss , ...layerProps } = props;\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)($5cb92bef7577960e$var$DismissableLayerContext);\n const [node1, setNode] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null);\n const ownerDocument = (_node$ownerDocument = node1 === null || node1 === void 0 ? void 0 : node1.ownerDocument) !== null && _node$ownerDocument !== void 0 ? _node$ownerDocument : globalThis === null || globalThis === void 0 ? void 0 : globalThis.document;\n const [, force] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)({});\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, (node)=>setNode(node)\n );\n const layers = Array.from(context.layers);\n const [highestLayerWithOutsidePointerEventsDisabled] = [\n ...context.layersWithOutsidePointerEventsDisabled\n ].slice(-1); // prettier-ignore\n const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled); // prettier-ignore\n const index = node1 ? layers.indexOf(node1) : -1;\n const isBodyPointerEventsDisabled = context.layersWithOutsidePointerEventsDisabled.size > 0;\n const isPointerEventsEnabled = index >= highestLayerWithOutsidePointerEventsDisabledIndex;\n const pointerDownOutside = $5cb92bef7577960e$var$usePointerDownOutside((event)=>{\n const target = event.target;\n const isPointerDownOnBranch = [\n ...context.branches\n ].some((branch)=>branch.contains(target)\n );\n if (!isPointerEventsEnabled || isPointerDownOnBranch) return;\n onPointerDownOutside === null || onPointerDownOutside === void 0 || onPointerDownOutside(event);\n onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n }, ownerDocument);\n const focusOutside = $5cb92bef7577960e$var$useFocusOutside((event)=>{\n const target = event.target;\n const isFocusInBranch = [\n ...context.branches\n ].some((branch)=>branch.contains(target)\n );\n if (isFocusInBranch) return;\n onFocusOutside === null || onFocusOutside === void 0 || onFocusOutside(event);\n onInteractOutside === null || onInteractOutside === void 0 || onInteractOutside(event);\n if (!event.defaultPrevented) onDismiss === null || onDismiss === void 0 || onDismiss();\n }, ownerDocument);\n (0,_radix_ui_react_use_escape_keydown__WEBPACK_IMPORTED_MODULE_3__.useEscapeKeydown)((event)=>{\n const isHighestLayer = index === context.layers.size - 1;\n if (!isHighestLayer) return;\n onEscapeKeyDown === null || onEscapeKeyDown === void 0 || onEscapeKeyDown(event);\n if (!event.defaultPrevented && onDismiss) {\n event.preventDefault();\n onDismiss();\n }\n }, ownerDocument);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n if (!node1) return;\n if (disableOutsidePointerEvents) {\n if (context.layersWithOutsidePointerEventsDisabled.size === 0) {\n $5cb92bef7577960e$var$originalBodyPointerEvents = ownerDocument.body.style.pointerEvents;\n ownerDocument.body.style.pointerEvents = 'none';\n }\n context.layersWithOutsidePointerEventsDisabled.add(node1);\n }\n context.layers.add(node1);\n $5cb92bef7577960e$var$dispatchUpdate();\n return ()=>{\n if (disableOutsidePointerEvents && context.layersWithOutsidePointerEventsDisabled.size === 1) ownerDocument.body.style.pointerEvents = $5cb92bef7577960e$var$originalBodyPointerEvents;\n };\n }, [\n node1,\n ownerDocument,\n disableOutsidePointerEvents,\n context\n ]);\n /**\n * We purposefully prevent combining this effect with the `disableOutsidePointerEvents` effect\n * because a change to `disableOutsidePointerEvents` would remove this layer from the stack\n * and add it to the end again so the layering order wouldn't be _creation order_.\n * We only want them to be removed from context stacks when unmounted.\n */ (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n return ()=>{\n if (!node1) return;\n context.layers.delete(node1);\n context.layersWithOutsidePointerEventsDisabled.delete(node1);\n $5cb92bef7577960e$var$dispatchUpdate();\n };\n }, [\n node1,\n context\n ]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const handleUpdate = ()=>force({})\n ;\n document.addEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate);\n return ()=>document.removeEventListener($5cb92bef7577960e$var$CONTEXT_UPDATE, handleUpdate)\n ;\n }, []);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, layerProps, {\n ref: composedRefs,\n style: {\n pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? 'auto' : 'none' : undefined,\n ...props.style\n },\n onFocusCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onFocusCapture, focusOutside.onFocusCapture),\n onBlurCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onBlurCapture, focusOutside.onBlurCapture),\n onPointerDownCapture: (0,_radix_ui_primitive__WEBPACK_IMPORTED_MODULE_5__.composeEventHandlers)(props.onPointerDownCapture, pointerDownOutside.onPointerDownCapture)\n }));\n});\n/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$177fb62ff3ec1f22, {\n displayName: $5cb92bef7577960e$var$DISMISSABLE_LAYER_NAME\n});\n/* -------------------------------------------------------------------------------------------------\n * DismissableLayerBranch\n * -----------------------------------------------------------------------------------------------*/ const $5cb92bef7577960e$var$BRANCH_NAME = 'DismissableLayerBranch';\nconst $5cb92bef7577960e$export$4d5eb2109db14228 = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n const context = (0,react__WEBPACK_IMPORTED_MODULE_1__.useContext)($5cb92bef7577960e$var$DismissableLayerContext);\n const ref = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n const composedRefs = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(forwardedRef, ref);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const node = ref.current;\n if (node) {\n context.branches.add(node);\n return ()=>{\n context.branches.delete(node);\n };\n }\n }, [\n context.branches\n ]);\n return /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, props, {\n ref: composedRefs\n }));\n});\n/*#__PURE__*/ Object.assign($5cb92bef7577960e$export$4d5eb2109db14228, {\n displayName: $5cb92bef7577960e$var$BRANCH_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ /**\n * Listens for `pointerdown` outside a react subtree. We use `pointerdown` rather than `pointerup`\n * to mimic layer dismissing behaviour present in OS.\n * Returns props to pass to the node we want to check for outside events.\n */ function $5cb92bef7577960e$var$usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {\n const handlePointerDownOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onPointerDownOutside);\n const isPointerInsideReactTreeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n const handleClickRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(()=>{});\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const handlePointerDown = (event)=>{\n if (event.target && !isPointerInsideReactTreeRef.current) {\n const eventDetail = {\n originalEvent: event\n };\n function handleAndDispatchPointerDownOutsideEvent() {\n $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$POINTER_DOWN_OUTSIDE, handlePointerDownOutside, eventDetail, {\n discrete: true\n });\n }\n /**\n * On touch devices, we need to wait for a click event because browsers implement\n * a ~350ms delay between the time the user stops touching the display and when the\n * browser executres events. We need to ensure we don't reactivate pointer-events within\n * this timeframe otherwise the browser may execute events that should have been prevented.\n *\n * Additionally, this also lets us deal automatically with cancellations when a click event\n * isn't raised because the page was considered scrolled/drag-scrolled, long-pressed, etc.\n *\n * This is why we also continuously remove the previous listener, because we cannot be\n * certain that it was raised, and therefore cleaned-up.\n */ if (event.pointerType === 'touch') {\n ownerDocument.removeEventListener('click', handleClickRef.current);\n handleClickRef.current = handleAndDispatchPointerDownOutsideEvent;\n ownerDocument.addEventListener('click', handleClickRef.current, {\n once: true\n });\n } else handleAndDispatchPointerDownOutsideEvent();\n } else // We need to remove the event listener in case the outside click has been canceled.\n // See: https://github.com/radix-ui/primitives/issues/2171\n ownerDocument.removeEventListener('click', handleClickRef.current);\n isPointerInsideReactTreeRef.current = false;\n };\n /**\n * if this hook executes in a component that mounts via a `pointerdown` event, the event\n * would bubble up to the document and trigger a `pointerDownOutside` event. We avoid\n * this by delaying the event listener registration on the document.\n * This is not React specific, but rather how the DOM works, ie:\n * ```\n * button.addEventListener('pointerdown', () => {\n * console.log('I will log');\n * document.addEventListener('pointerdown', () => {\n * console.log('I will also log');\n * })\n * });\n */ const timerId = window.setTimeout(()=>{\n ownerDocument.addEventListener('pointerdown', handlePointerDown);\n }, 0);\n return ()=>{\n window.clearTimeout(timerId);\n ownerDocument.removeEventListener('pointerdown', handlePointerDown);\n ownerDocument.removeEventListener('click', handleClickRef.current);\n };\n }, [\n ownerDocument,\n handlePointerDownOutside\n ]);\n return {\n // ensures we check React component tree (not just DOM tree)\n onPointerDownCapture: ()=>isPointerInsideReactTreeRef.current = true\n };\n}\n/**\n * Listens for when focus happens outside a react subtree.\n * Returns props to pass to the root (node) of the subtree we want to check.\n */ function $5cb92bef7577960e$var$useFocusOutside(onFocusOutside, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {\n const handleFocusOutside = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_6__.useCallbackRef)(onFocusOutside);\n const isFocusInsideReactTreeRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(false);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{\n const handleFocus = (event)=>{\n if (event.target && !isFocusInsideReactTreeRef.current) {\n const eventDetail = {\n originalEvent: event\n };\n $5cb92bef7577960e$var$handleAndDispatchCustomEvent($5cb92bef7577960e$var$FOCUS_OUTSIDE, handleFocusOutside, eventDetail, {\n discrete: false\n });\n }\n };\n ownerDocument.addEventListener('focusin', handleFocus);\n return ()=>ownerDocument.removeEventListener('focusin', handleFocus)\n ;\n }, [\n ownerDocument,\n handleFocusOutside\n ]);\n return {\n onFocusCapture: ()=>isFocusInsideReactTreeRef.current = true\n ,\n onBlurCapture: ()=>isFocusInsideReactTreeRef.current = false\n };\n}\nfunction $5cb92bef7577960e$var$dispatchUpdate() {\n const event = new CustomEvent($5cb92bef7577960e$var$CONTEXT_UPDATE);\n document.dispatchEvent(event);\n}\nfunction $5cb92bef7577960e$var$handleAndDispatchCustomEvent(name, handler, detail, { discrete: discrete }) {\n const target = detail.originalEvent.target;\n const event = new CustomEvent(name, {\n bubbles: false,\n cancelable: true,\n detail: detail\n });\n if (handler) target.addEventListener(name, handler, {\n once: true\n });\n if (discrete) (0,_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_4__.dispatchDiscreteCustomEvent)(target, event);\n else target.dispatchEvent(event);\n}\nconst $5cb92bef7577960e$export$be92b6f5f03c0fe9 = $5cb92bef7577960e$export$177fb62ff3ec1f22;\nconst $5cb92bef7577960e$export$aecb2ddcb55c95be = $5cb92bef7577960e$export$4d5eb2109db14228;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs?");
|
|
3868
|
+
|
|
3869
|
+
/***/ }),
|
|
3870
|
+
|
|
3871
|
+
/***/ "../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-id/dist/index.mjs":
|
|
3872
|
+
/*!**********************************************************************************************!*\
|
|
3873
|
+
!*** ../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-id/dist/index.mjs ***!
|
|
3874
|
+
\**********************************************************************************************/
|
|
3875
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3876
|
+
|
|
3877
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useId: () => (/* binding */ $1746a345f3d73bb7$export$f680877a34711e37)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n\n\n\n\n\nconst $1746a345f3d73bb7$var$useReactId = react__WEBPACK_IMPORTED_MODULE_0__['useId'.toString()] || (()=>undefined\n);\nlet $1746a345f3d73bb7$var$count = 0;\nfunction $1746a345f3d73bb7$export$f680877a34711e37(deterministicId) {\n const [id, setId] = react__WEBPACK_IMPORTED_MODULE_0__.useState($1746a345f3d73bb7$var$useReactId()); // React versions older than 18 will have client-side ids only.\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_1__.useLayoutEffect)(()=>{\n if (!deterministicId) setId((reactId)=>reactId !== null && reactId !== void 0 ? reactId : String($1746a345f3d73bb7$var$count++)\n );\n }, [\n deterministicId\n ]);\n return deterministicId || (id ? `radix-${id}` : '');\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-id/dist/index.mjs?");
|
|
3878
|
+
|
|
3879
|
+
/***/ }),
|
|
3880
|
+
|
|
3881
|
+
/***/ "../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.mjs":
|
|
3882
|
+
/*!**************************************************************************************************!*\
|
|
3883
|
+
!*** ../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.mjs ***!
|
|
3884
|
+
\**************************************************************************************************/
|
|
3885
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3886
|
+
|
|
3887
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Portal: () => (/* binding */ $f1701beae083dbae$export$602eac185826482c),\n/* harmony export */ Root: () => (/* binding */ $f1701beae083dbae$export$be92b6f5f03c0fe9)\n/* harmony export */ });\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ \"../node_modules/@babel/runtime/helpers/esm/extends.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-primitive */ \"../node_modules/@radix-ui/react-primitive/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n/* -------------------------------------------------------------------------------------------------\n * Portal\n * -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$var$PORTAL_NAME = 'Portal';\nconst $f1701beae083dbae$export$602eac185826482c = /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)((props, forwardedRef)=>{\n var _globalThis$document;\n const { container: container = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$document = globalThis.document) === null || _globalThis$document === void 0 ? void 0 : _globalThis$document.body , ...portalProps } = props;\n return container ? /*#__PURE__*/ react_dom__WEBPACK_IMPORTED_MODULE_2__[\"default\"].createPortal(/*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_1__.createElement)(_radix_ui_react_primitive__WEBPACK_IMPORTED_MODULE_3__.Primitive.div, (0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({}, portalProps, {\n ref: forwardedRef\n })), container) : null;\n});\n/*#__PURE__*/ Object.assign($f1701beae083dbae$export$602eac185826482c, {\n displayName: $f1701beae083dbae$var$PORTAL_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $f1701beae083dbae$export$be92b6f5f03c0fe9 = $f1701beae083dbae$export$602eac185826482c;\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.mjs?");
|
|
3888
|
+
|
|
3889
|
+
/***/ }),
|
|
3890
|
+
|
|
3891
|
+
/***/ "../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-presence/dist/index.mjs":
|
|
3892
|
+
/*!****************************************************************************************************!*\
|
|
3893
|
+
!*** ../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-presence/dist/index.mjs ***!
|
|
3894
|
+
\****************************************************************************************************/
|
|
3895
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3896
|
+
|
|
3897
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Presence: () => (/* binding */ $921a889cee6df7e8$export$99c2b779aa4e8b8b)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ \"react-dom\");\n/* harmony import */ var _radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @radix-ui/react-compose-refs */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-compose-refs/dist/index.mjs\");\n/* harmony import */ var _radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @radix-ui/react-use-layout-effect */ \"../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs\");\n\n\n\n\n\n\n\n\n\n\nfunction $fe963b355347cc68$export$3e6543de14f8614f(initialState, machine) {\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)((state, event)=>{\n const nextState = machine[state][event];\n return nextState !== null && nextState !== void 0 ? nextState : state;\n }, initialState);\n}\n\n\nconst $921a889cee6df7e8$export$99c2b779aa4e8b8b = (props)=>{\n const { present: present , children: children } = props;\n const presence = $921a889cee6df7e8$var$usePresence(present);\n const child = typeof children === 'function' ? children({\n present: presence.isPresent\n }) : react__WEBPACK_IMPORTED_MODULE_0__.Children.only(children);\n const ref = (0,_radix_ui_react_compose_refs__WEBPACK_IMPORTED_MODULE_2__.useComposedRefs)(presence.ref, child.ref);\n const forceMount = typeof children === 'function';\n return forceMount || presence.isPresent ? /*#__PURE__*/ (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child, {\n ref: ref\n }) : null;\n};\n$921a889cee6df7e8$export$99c2b779aa4e8b8b.displayName = 'Presence';\n/* -------------------------------------------------------------------------------------------------\n * usePresence\n * -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$usePresence(present) {\n const [node1, setNode] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)();\n const stylesRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({});\n const prevPresentRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(present);\n const prevAnimationNameRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)('none');\n const initialState = present ? 'mounted' : 'unmounted';\n const [state, send] = $fe963b355347cc68$export$3e6543de14f8614f(initialState, {\n mounted: {\n UNMOUNT: 'unmounted',\n ANIMATION_OUT: 'unmountSuspended'\n },\n unmountSuspended: {\n MOUNT: 'mounted',\n ANIMATION_END: 'unmounted'\n },\n unmounted: {\n MOUNT: 'mounted'\n }\n });\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === 'mounted' ? currentAnimationName : 'none';\n }, [\n state\n ]);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__.useLayoutEffect)(()=>{\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(styles);\n if (present) send('MOUNT');\n else if (currentAnimationName === 'none' || (styles === null || styles === void 0 ? void 0 : styles.display) === 'none') // If there is no exit animation or the element is hidden, animations won't run\n // so we unmount instantly\n send('UNMOUNT');\n else {\n /**\n * When `present` changes to `false`, we check changes to animation-name to\n * determine whether an animation has started. We chose this approach (reading\n * computed styles) because there is no `animationrun` event and `animationstart`\n * fires after `animation-delay` has expired which would be too late.\n */ const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) send('ANIMATION_OUT');\n else send('UNMOUNT');\n }\n prevPresentRef.current = present;\n }\n }, [\n present,\n send\n ]);\n (0,_radix_ui_react_use_layout_effect__WEBPACK_IMPORTED_MODULE_3__.useLayoutEffect)(()=>{\n if (node1) {\n /**\n * Triggering an ANIMATION_OUT during an ANIMATION_IN will fire an `animationcancel`\n * event for ANIMATION_IN after we have entered `unmountSuspended` state. So, we\n * make sure we only trigger ANIMATION_END for the currently active animation.\n */ const handleAnimationEnd = (event)=>{\n const currentAnimationName = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(event.animationName);\n if (event.target === node1 && isCurrentAnimation) // With React 18 concurrency this update is applied\n // a frame after the animation ends, creating a flash of visible content.\n // By manually flushing we ensure they sync within a frame, removing the flash.\n (0,react_dom__WEBPACK_IMPORTED_MODULE_1__.flushSync)(()=>send('ANIMATION_END')\n );\n };\n const handleAnimationStart = (event)=>{\n if (event.target === node1) // if animation occurred, store its name as the previous animation.\n prevAnimationNameRef.current = $921a889cee6df7e8$var$getAnimationName(stylesRef.current);\n };\n node1.addEventListener('animationstart', handleAnimationStart);\n node1.addEventListener('animationcancel', handleAnimationEnd);\n node1.addEventListener('animationend', handleAnimationEnd);\n return ()=>{\n node1.removeEventListener('animationstart', handleAnimationStart);\n node1.removeEventListener('animationcancel', handleAnimationEnd);\n node1.removeEventListener('animationend', handleAnimationEnd);\n };\n } else // Transition to the unmounted state if the node is removed prematurely.\n // We avoid doing so during cleanup as the node may change but still exist.\n send('ANIMATION_END');\n }, [\n node1,\n send\n ]);\n return {\n isPresent: [\n 'mounted',\n 'unmountSuspended'\n ].includes(state),\n ref: (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((node)=>{\n if (node) stylesRef.current = getComputedStyle(node);\n setNode(node);\n }, [])\n };\n}\n/* -----------------------------------------------------------------------------------------------*/ function $921a889cee6df7e8$var$getAnimationName(styles) {\n return (styles === null || styles === void 0 ? void 0 : styles.animationName) || 'none';\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-presence/dist/index.mjs?");
|
|
3898
|
+
|
|
3899
|
+
/***/ }),
|
|
3900
|
+
|
|
3901
|
+
/***/ "../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs":
|
|
3902
|
+
/*!************************************************************************************************************!*\
|
|
3903
|
+
!*** ../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs ***!
|
|
3904
|
+
\************************************************************************************************************/
|
|
3905
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3906
|
+
|
|
3907
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useCallbackRef: () => (/* binding */ $b1b2314f5f9a1d84$export$25bec8c6f54ee79a)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {\n const callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(callback);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n callbackRef.current = callback;\n }); // https://github.com/facebook/react/issues/19240\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>(...args)=>{\n var _callbackRef$current;\n return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);\n }\n , []);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs?");
|
|
3908
|
+
|
|
3909
|
+
/***/ }),
|
|
3910
|
+
|
|
3911
|
+
/***/ "../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs":
|
|
3912
|
+
/*!**************************************************************************************************************!*\
|
|
3913
|
+
!*** ../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs ***!
|
|
3914
|
+
\**************************************************************************************************************/
|
|
3915
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3916
|
+
|
|
3917
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useEscapeKeydown: () => (/* binding */ $addc16e1bbe58fd0$export$3a72a57244d6e765)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n\n\n\n\n\n/**\n * Listens for when the escape key is down\n */ function $addc16e1bbe58fd0$export$3a72a57244d6e765(onEscapeKeyDownProp, ownerDocument = globalThis === null || globalThis === void 0 ? void 0 : globalThis.document) {\n const onEscapeKeyDown = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onEscapeKeyDownProp);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n const handleKeyDown = (event)=>{\n if (event.key === 'Escape') onEscapeKeyDown(event);\n };\n ownerDocument.addEventListener('keydown', handleKeyDown);\n return ()=>ownerDocument.removeEventListener('keydown', handleKeyDown)\n ;\n }, [\n onEscapeKeyDown,\n ownerDocument\n ]);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs?");
|
|
3118
3918
|
|
|
3119
3919
|
/***/ }),
|
|
3120
3920
|
|
|
@@ -3124,7 +3924,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3124
3924
|
\***********************************************************************/
|
|
3125
3925
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3126
3926
|
|
|
3127
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useCallbackRef: () => (/* binding */
|
|
3927
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useCallbackRef: () => (/* binding */ useCallbackRef)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n// packages/react/use-callback-ref/src/useCallbackRef.tsx\n\nfunction useCallbackRef(callback) {\n const callbackRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(callback);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n callbackRef.current = callback;\n });\n return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs?");
|
|
3128
3928
|
|
|
3129
3929
|
/***/ }),
|
|
3130
3930
|
|
|
@@ -3134,7 +3934,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3134
3934
|
\*****************************************************************************/
|
|
3135
3935
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3136
3936
|
|
|
3137
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useControllableState: () => (/* binding */ $71cd76cc60e0454e$export$6f32135080cb4c3)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n\n\n\n\n\nfunction $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {\n const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({\n defaultProp: defaultProp,\n onChange: onChange\n });\n const isControlled = prop !== undefined;\n const value1 = isControlled ? prop : uncontrolledProp;\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n const setValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((nextValue)=>{\n if (isControlled) {\n const setter = nextValue;\n const value = typeof nextValue === 'function' ? setter(prop) : nextValue;\n if (value !== prop) handleChange(value);\n } else setUncontrolledProp(nextValue);\n }, [\n isControlled,\n prop,\n setUncontrolledProp,\n handleChange\n ]);\n return [\n value1,\n setValue\n ];\n}\nfunction $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {\n const uncontrolledState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [\n value,\n prevValueRef,\n handleChange\n ]);\n return uncontrolledState;\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs?");
|
|
3937
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useControllableState: () => (/* binding */ $71cd76cc60e0454e$export$6f32135080cb4c3)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n\n\n\n\n\nfunction $71cd76cc60e0454e$export$6f32135080cb4c3({ prop: prop , defaultProp: defaultProp , onChange: onChange = ()=>{} }) {\n const [uncontrolledProp, setUncontrolledProp] = $71cd76cc60e0454e$var$useUncontrolledState({\n defaultProp: defaultProp,\n onChange: onChange\n });\n const isControlled = prop !== undefined;\n const value1 = isControlled ? prop : uncontrolledProp;\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n const setValue = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)((nextValue)=>{\n if (isControlled) {\n const setter = nextValue;\n const value = typeof nextValue === 'function' ? setter(prop) : nextValue;\n if (value !== prop) handleChange(value);\n } else setUncontrolledProp(nextValue);\n }, [\n isControlled,\n prop,\n setUncontrolledProp,\n handleChange\n ]);\n return [\n value1,\n setValue\n ];\n}\nfunction $71cd76cc60e0454e$var$useUncontrolledState({ defaultProp: defaultProp , onChange: onChange }) {\n const uncontrolledState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultProp);\n const [value] = uncontrolledState;\n const prevValueRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(value);\n const handleChange = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onChange);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n if (prevValueRef.current !== value) {\n handleChange(value);\n prevValueRef.current = value;\n }\n }, [\n value,\n prevValueRef,\n handleChange\n ]);\n return uncontrolledState;\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs?");
|
|
3938
|
+
|
|
3939
|
+
/***/ }),
|
|
3940
|
+
|
|
3941
|
+
/***/ "../node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs":
|
|
3942
|
+
/*!***************************************************************************************************************************!*\
|
|
3943
|
+
!*** ../node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs ***!
|
|
3944
|
+
\***************************************************************************************************************************/
|
|
3945
|
+
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3946
|
+
|
|
3947
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useCallbackRef: () => (/* binding */ $b1b2314f5f9a1d84$export$25bec8c6f54ee79a)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n\n\n\n/**\n * A custom hook that converts a callback to a ref to avoid triggering re-renders when passed as a\n * prop or avoid re-executing effects when passed as a dependency\n */ function $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(callback) {\n const callbackRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(callback);\n (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(()=>{\n callbackRef.current = callback;\n }); // https://github.com/facebook/react/issues/19240\n return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(()=>(...args)=>{\n var _callbackRef$current;\n return (_callbackRef$current = callbackRef.current) === null || _callbackRef$current === void 0 ? void 0 : _callbackRef$current.call(callbackRef, ...args);\n }\n , []);\n}\n\n\n\n\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-use-controllable-state/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs?");
|
|
3138
3948
|
|
|
3139
3949
|
/***/ }),
|
|
3140
3950
|
|
|
@@ -3144,7 +3954,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
3144
3954
|
\*************************************************************************/
|
|
3145
3955
|
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
|
3146
3956
|
|
|
3147
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useEscapeKeydown: () => (/* binding */
|
|
3957
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useEscapeKeydown: () => (/* binding */ useEscapeKeydown)\n/* harmony export */ });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var _radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @radix-ui/react-use-callback-ref */ \"../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs\");\n// packages/react/use-escape-keydown/src/useEscapeKeydown.tsx\n\n\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = (0,_radix_ui_react_use_callback_ref__WEBPACK_IMPORTED_MODULE_1__.useCallbackRef)(onEscapeKeyDownProp);\n react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\n\n//# sourceMappingURL=index.mjs.map\n\n\n//# sourceURL=webpack://@linkdlab/funcnodes_react_flow/../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs?");
|
|
3148
3958
|
|
|
3149
3959
|
/***/ }),
|
|
3150
3960
|
|
|
@@ -6768,8 +7578,10 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
6768
7578
|
/******/ // Load entry module and return exports
|
|
6769
7579
|
/******/ // This entry module can't be inlined because the eval devtool is used.
|
|
6770
7580
|
/******/ var __webpack_exports__ = __webpack_require__("./src/index.tsx");
|
|
7581
|
+
/******/ var __webpack_exports__FuncNodes = __webpack_exports__.FuncNodes;
|
|
7582
|
+
/******/ var __webpack_exports__FuncNodesReactFlowZustand = __webpack_exports__.FuncNodesReactFlowZustand;
|
|
6771
7583
|
/******/ var __webpack_exports__WebSocketWorker = __webpack_exports__.WebSocketWorker;
|
|
6772
7584
|
/******/ var __webpack_exports__default = __webpack_exports__["default"];
|
|
6773
7585
|
/******/ var __webpack_exports__helperfunctions = __webpack_exports__.helperfunctions;
|
|
6774
|
-
/******/ export { __webpack_exports__WebSocketWorker as WebSocketWorker, __webpack_exports__default as default, __webpack_exports__helperfunctions as helperfunctions };
|
|
7586
|
+
/******/ export { __webpack_exports__FuncNodes as FuncNodes, __webpack_exports__FuncNodesReactFlowZustand as FuncNodesReactFlowZustand, __webpack_exports__WebSocketWorker as WebSocketWorker, __webpack_exports__default as default, __webpack_exports__helperfunctions as helperfunctions };
|
|
6775
7587
|
/******/
|