fix: prevent asset conflicts between React and Grid.js versions

Add coexistence checks to all enqueue methods to prevent loading
both React and Grid.js assets simultaneously.

Changes:
- ReactAdmin.php: Only enqueue React assets when ?react=1
- Init.php: Skip Grid.js when React active on admin pages
- Form.php, Coupon.php, Access.php: Restore classic assets when ?react=0
- Customer.php, Product.php, License.php: Add coexistence checks

Now the toggle between Classic and React versions works correctly.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
dwindown
2026-04-18 17:02:14 +07:00
parent bd9cdac02e
commit e8fbfb14c1
74973 changed files with 6658406 additions and 71 deletions

View File

@@ -0,0 +1,286 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
var _reactNative = require("react-native");
var _clipboard = _interopRequireDefault(require("@react-native-clipboard/clipboard"));
var _compose = require("@wordpress/compose");
var _data = require("@wordpress/data");
var _url = require("@wordpress/url");
var _element = require("@wordpress/element");
var _icons = require("@wordpress/icons");
var _bottomSheet = _interopRequireDefault(require("../bottom-sheet"));
var _bottomSheetContext = require("../bottom-sheet/bottom-sheet-context");
var _body = _interopRequireDefault(require("../../panel/body"));
var _textControl = _interopRequireDefault(require("../../text-control"));
var _toggleControl = _interopRequireDefault(require("../../toggle-control"));
var _footerMessageControl = _interopRequireDefault(require("../../footer-message-control"));
var _actions = _interopRequireDefault(require("../../panel/actions"));
var _linkRel = _interopRequireDefault(require("./link-rel"));
var _style = _interopRequireDefault(require("./style.scss"));
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const NEW_TAB_REL = 'noreferrer noopener';
function LinkSettings({
// Control link settings `BottomSheet` visibility
isVisible,
// Callback that is called on closing bottom sheet
onClose,
// Function called to set attributes
setAttributes,
// Callback that is called when url input field is empty
onEmptyURL,
// Object of available options along with specific, customizable properties.
// Available options keys:
// * url - uses `TextControl` component to set `attributes.url`
// * linkLabel - uses `TextControl` component to set `attributes.label`
// * openInNewTab - uses `ToggleControl` component to set `attributes.linkTarget` and `attributes.rel`
// * linkRel - uses `TextControl` component to set `attributes.rel`
// * footer - uses `FooterMessageControl` component to display message, e.g. about missing functionality
// Available properties:
// * label - control component label, e.g. `Button Link URL`
// * placeholder - control component placeholder, e.g. `Add URL`
// * autoFocus (url only) - whether url input should be focused on sheet opening
// * autoFill (url only) - whether url input should be filled with url from clipboard
// Example:
// const options = {
// url: {
// label: __( 'Button Link URL' ),
// placeholder: __( 'Add URL' ),
// autoFocus: true,
// autoFill: true,
// }
// }
options,
// Specifies whether settings should be wrapped into `BottomSheet`
withBottomSheet,
// Defines buttons which will be displayed below the all options.
// It's an array of objects with following properties:
// * label - button title
// * onPress - callback that is called on pressing button
// Example:
// const actions = [
// {
// label: __( 'Remove link' ),
// onPress: () => setAttributes({ url: '' }),
// },
// ];
actions,
// Specifies whether general `BottomSheet` is opened
editorSidebarOpened,
// Specifies whether icon should be displayed next to the label
showIcon,
onLinkCellPressed,
urlValue,
// Attributes properties
url,
label = '',
linkTarget,
rel = ''
}) {
const [urlInputValue, setUrlInputValue] = (0, _element.useState)('');
const [labelInputValue, setLabelInputValue] = (0, _element.useState)('');
const [linkRelInputValue, setLinkRelInputValue] = (0, _element.useState)('');
const onCloseSettingsSheetConsumed = (0, _element.useRef)(false);
const prevEditorSidebarOpenedRef = (0, _element.useRef)();
const {
onHandleClosingBottomSheet
} = (0, _element.useContext)(_bottomSheetContext.BottomSheetContext);
(0, _element.useEffect)(() => {
if (onHandleClosingBottomSheet) {
onHandleClosingBottomSheet(onCloseSettingsSheet);
}
// Disable reason: deferring this refactor to the native team.
// see https://github.com/WordPress/gutenberg/pull/41166
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [urlInputValue, labelInputValue, linkRelInputValue]);
(0, _element.useEffect)(() => {
prevEditorSidebarOpenedRef.current = editorSidebarOpened;
});
const prevEditorSidebarOpened = prevEditorSidebarOpenedRef.current;
(0, _element.useEffect)(() => {
if (url !== urlInputValue) {
setUrlInputValue(url || '');
}
// Disable reason: deferring this refactor to the native team.
// see https://github.com/WordPress/gutenberg/pull/41166
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [url]);
(0, _element.useEffect)(() => {
setLabelInputValue(label || '');
}, [label]);
(0, _element.useEffect)(() => {
setLinkRelInputValue(rel || '');
}, [rel]);
(0, _element.useEffect)(() => {
const isSettingSheetOpen = isVisible || editorSidebarOpened;
if (isSettingSheetOpen) {
onCloseSettingsSheetConsumed.current = false;
}
if (options.url.autoFill && isSettingSheetOpen && !url) {
getURLFromClipboard();
}
if (prevEditorSidebarOpened && !editorSidebarOpened) {
onSetAttributes();
}
// Disable reason: deferring this refactor to the native team.
// see https://github.com/WordPress/gutenberg/pull/41166
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [editorSidebarOpened, isVisible]);
(0, _element.useEffect)(() => {
if (!urlValue && onEmptyURL) {
onEmptyURL();
}
if ((0, _url.prependHTTP)(urlValue) !== url) {
setAttributes({
url: (0, _url.prependHTTP)(urlValue)
});
}
// Disable reason: deferring this refactor to the native team.
// see https://github.com/WordPress/gutenberg/pull/41166
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [urlValue]);
const onChangeURL = (0, _element.useCallback)(value => {
if (!value && onEmptyURL) {
onEmptyURL();
}
setUrlInputValue(value);
}, [onEmptyURL]);
const onChangeLabel = (0, _element.useCallback)(value => {
setLabelInputValue(value);
}, []);
const onSetAttributes = (0, _element.useCallback)(() => {
const newURL = (0, _url.prependHTTP)(urlInputValue);
if (url !== newURL || labelInputValue !== label || linkRelInputValue !== rel) {
setAttributes({
url: newURL,
label: labelInputValue,
rel: linkRelInputValue
});
}
// Disable reason: deferring this refactor to the native team.
// see https://github.com/WordPress/gutenberg/pull/41166
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [urlInputValue, labelInputValue, linkRelInputValue, setAttributes]);
const onCloseSettingsSheet = (0, _element.useCallback)(() => {
if (onCloseSettingsSheetConsumed.current) {
return;
}
onCloseSettingsSheetConsumed.current = true;
onSetAttributes();
if (onClose) {
onClose();
}
}, [onClose, onSetAttributes]);
const onChangeOpenInNewTab = (0, _element.useCallback)(value => {
const newLinkTarget = value ? '_blank' : undefined;
let updatedRel = linkRelInputValue;
if (newLinkTarget && !linkRelInputValue) {
updatedRel = NEW_TAB_REL;
} else if (!newLinkTarget && linkRelInputValue === NEW_TAB_REL) {
updatedRel = undefined;
}
setAttributes({
linkTarget: newLinkTarget,
rel: updatedRel
});
},
// Disable reason: deferring this refactor to the native team.
// see https://github.com/WordPress/gutenberg/pull/41166
// eslint-disable-next-line react-hooks/exhaustive-deps
[linkRelInputValue]);
const onChangeLinkRel = (0, _element.useCallback)(value => {
setLinkRelInputValue(value);
}, []);
async function getURLFromClipboard() {
const clipboardText = await _clipboard.default.getString();
if (!clipboardText) {
return;
}
// Check if pasted text is URL.
if (!(0, _url.isURL)(clipboardText)) {
return;
}
setAttributes({
url: clipboardText
});
}
function getSettings() {
return (0, _react.createElement)(_react.Fragment, null, options.url && (onLinkCellPressed ? (0, _react.createElement)(_bottomSheet.default.LinkCell, {
showIcon: showIcon,
value: url,
valueMask: options.url.valueMask,
onPress: onLinkCellPressed
}) : (0, _react.createElement)(_textControl.default, {
icon: showIcon && _icons.link,
label: options.url.label,
value: urlInputValue,
valuePlaceholder: options.url.placeholder,
onChange: onChangeURL,
onSubmit: onCloseSettingsSheet,
autoCapitalize: "none",
autoCorrect: false
// eslint-disable-next-line jsx-a11y/no-autofocus
,
autoFocus: _reactNative.Platform.OS === 'ios' && options.url.autoFocus,
keyboardType: "url"
})), options.linkLabel && (0, _react.createElement)(_textControl.default, {
label: options.linkLabel.label,
value: labelInputValue,
valuePlaceholder: options.linkLabel.placeholder,
onChange: onChangeLabel
}), !!urlInputValue && (0, _react.createElement)(_react.Fragment, null, options.openInNewTab && (0, _react.createElement)(_toggleControl.default, {
icon: showIcon && _icons.external,
label: options.openInNewTab.label,
checked: linkTarget === '_blank',
onChange: onChangeOpenInNewTab
}), options.linkRel && (0, _react.createElement)(_textControl.default, {
icon: showIcon && _linkRel.default,
label: options.linkRel.label,
value: linkRelInputValue,
valuePlaceholder: options.linkRel.placeholder,
onChange: onChangeLinkRel,
onSubmit: onCloseSettingsSheet,
autoCapitalize: "none",
autoCorrect: false,
keyboardType: "default"
})));
}
if (!withBottomSheet) {
return getSettings();
}
return (0, _react.createElement)(_react.Fragment, null, (0, _react.createElement)(_body.default, {
style: _style.default.linkSettingsPanel
}, getSettings()), options.footer && (0, _react.createElement)(_body.default, {
style: _style.default.linkSettingsPanel
}, (0, _react.createElement)(_footerMessageControl.default, {
label: options.footer.label,
separatorType: options.footer.separatorType
})), actions && (0, _react.createElement)(_actions.default, {
actions: actions
}));
}
var _default = (0, _compose.compose)([(0, _data.withSelect)(select => {
const {
isEditorSidebarOpened
} = select('core/edit-post');
return {
editorSidebarOpened: isEditorSidebarOpened()
};
})])(LinkSettings);
exports.default = _default;
//# sourceMappingURL=index.native.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,19 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
var _components = require("@wordpress/components");
/**
* WordPress dependencies
*/
var _default = (0, _react.createElement)(_components.SVG, {
viewBox: "0 0 24 24",
xmlns: "http://www.w3.org/2000/svg"
}, (0, _react.createElement)(_components.Path, {
d: "M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z"
}));
exports.default = _default;
//# sourceMappingURL=link-rel.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_components","require","_default","_react","createElement","SVG","viewBox","xmlns","Path","d","exports","default"],"sources":["@wordpress/components/src/mobile/link-settings/link-rel.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { Path, SVG } from '@wordpress/components';\n\nexport default (\n\t<SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<Path d=\"M17 16l-4-4V8.82C14.16 8.4 15 7.3 15 6c0-1.66-1.34-3-3-3S9 4.34 9 6c0 1.3.84 2.4 2 2.82V12l-4 4H3v5h5v-3.05l4-4.2 4 4.2V21h5v-5h-4z\" />\n\t</SVG>\n);\n"],"mappings":";;;;;;;AAGA,IAAAA,WAAA,GAAAC,OAAA;AAHA;AACA;AACA;AAFA,IAAAC,QAAA,GAMC,IAAAC,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAK,GAAG;EAACC,OAAO,EAAC,WAAW;EAACC,KAAK,EAAC;AAA4B,GAC1D,IAAAJ,MAAA,CAAAC,aAAA,EAACJ,WAAA,CAAAQ,IAAI;EAACC,CAAC,EAAC;AAAqI,CAAE,CAC3I,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAT,QAAA"}

View File

@@ -0,0 +1,56 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
var _element = require("@wordpress/element");
var _bottomSheet = _interopRequireDefault(require("../bottom-sheet"));
var _linkSettingsScreen = _interopRequireDefault(require("./link-settings-screen"));
var _linkPickerScreen = _interopRequireDefault(require("../link-picker/link-picker-screen"));
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const linkSettingsScreens = {
settings: 'LinkSettingsScreen',
linkPicker: 'linkPicker'
};
function LinkSettingsNavigation(props) {
if (!props.withBottomSheet) {
return (0, _react.createElement)(_linkSettingsScreen.default, {
...props
});
}
return (0, _react.createElement)(_bottomSheet.default, {
isVisible: props.isVisible,
onClose: props.onClose,
onDismiss: props.onDismiss,
testID: "link-settings-navigation",
hideHeader: true,
hasNavigation: true
}, (0, _react.createElement)(_bottomSheet.default.NavigationContainer, {
animate: true,
main: true
}, (0, _react.createElement)(_bottomSheet.default.NavigationScreen, {
name: linkSettingsScreens.settings
}, (0, _react.createElement)(_linkSettingsScreen.default, {
...props,
withBottomSheet: true
})), (0, _react.createElement)(_bottomSheet.default.NavigationScreen, {
name: linkSettingsScreens.linkPicker,
isScrollable: true,
fullScreen: true
}, (0, _react.createElement)(_linkPickerScreen.default, {
returnScreenName: linkSettingsScreens.settings
}))));
}
var _default = (0, _element.memo)(LinkSettingsNavigation);
exports.default = _default;
//# sourceMappingURL=link-settings-navigation.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_element","require","_bottomSheet","_interopRequireDefault","_linkSettingsScreen","_linkPickerScreen","linkSettingsScreens","settings","linkPicker","LinkSettingsNavigation","props","withBottomSheet","_react","createElement","default","isVisible","onClose","onDismiss","testID","hideHeader","hasNavigation","NavigationContainer","animate","main","NavigationScreen","name","isScrollable","fullScreen","returnScreenName","_default","memo","exports"],"sources":["@wordpress/components/src/mobile/link-settings/link-settings-navigation.native.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { memo } from '@wordpress/element';\n/**\n * Internal dependencies\n */\nimport BottomSheet from '../bottom-sheet';\nimport LinkSettingsScreen from './link-settings-screen';\nimport LinkPickerScreen from '../link-picker/link-picker-screen';\n\nconst linkSettingsScreens = {\n\tsettings: 'LinkSettingsScreen',\n\tlinkPicker: 'linkPicker',\n};\n\nfunction LinkSettingsNavigation( props ) {\n\tif ( ! props.withBottomSheet ) {\n\t\treturn <LinkSettingsScreen { ...props } />;\n\t}\n\treturn (\n\t\t<BottomSheet\n\t\t\tisVisible={ props.isVisible }\n\t\t\tonClose={ props.onClose }\n\t\t\tonDismiss={ props.onDismiss }\n\t\t\ttestID=\"link-settings-navigation\"\n\t\t\thideHeader\n\t\t\thasNavigation\n\t\t>\n\t\t\t<BottomSheet.NavigationContainer animate main>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ linkSettingsScreens.settings }\n\t\t\t\t>\n\t\t\t\t\t<LinkSettingsScreen { ...props } withBottomSheet />\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t\t<BottomSheet.NavigationScreen\n\t\t\t\t\tname={ linkSettingsScreens.linkPicker }\n\t\t\t\t\tisScrollable\n\t\t\t\t\tfullScreen\n\t\t\t\t>\n\t\t\t\t\t<LinkPickerScreen\n\t\t\t\t\t\treturnScreenName={ linkSettingsScreens.settings }\n\t\t\t\t\t/>\n\t\t\t\t</BottomSheet.NavigationScreen>\n\t\t\t</BottomSheet.NavigationContainer>\n\t\t</BottomSheet>\n\t);\n}\n\nexport default memo( LinkSettingsNavigation );\n"],"mappings":";;;;;;;;AAGA,IAAAA,QAAA,GAAAC,OAAA;AAIA,IAAAC,YAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,iBAAA,GAAAF,sBAAA,CAAAF,OAAA;AATA;AACA;AACA;;AAEA;AACA;AACA;;AAKA,MAAMK,mBAAmB,GAAG;EAC3BC,QAAQ,EAAE,oBAAoB;EAC9BC,UAAU,EAAE;AACb,CAAC;AAED,SAASC,sBAAsBA,CAAEC,KAAK,EAAG;EACxC,IAAK,CAAEA,KAAK,CAACC,eAAe,EAAG;IAC9B,OAAO,IAAAC,MAAA,CAAAC,aAAA,EAACT,mBAAA,CAAAU,OAAkB;MAAA,GAAMJ;IAAK,CAAI,CAAC;EAC3C;EACA,OACC,IAAAE,MAAA,CAAAC,aAAA,EAACX,YAAA,CAAAY,OAAW;IACXC,SAAS,EAAGL,KAAK,CAACK,SAAW;IAC7BC,OAAO,EAAGN,KAAK,CAACM,OAAS;IACzBC,SAAS,EAAGP,KAAK,CAACO,SAAW;IAC7BC,MAAM,EAAC,0BAA0B;IACjCC,UAAU;IACVC,aAAa;EAAA,GAEb,IAAAR,MAAA,CAAAC,aAAA,EAACX,YAAA,CAAAY,OAAW,CAACO,mBAAmB;IAACC,OAAO;IAACC,IAAI;EAAA,GAC5C,IAAAX,MAAA,CAAAC,aAAA,EAACX,YAAA,CAAAY,OAAW,CAACU,gBAAgB;IAC5BC,IAAI,EAAGnB,mBAAmB,CAACC;EAAU,GAErC,IAAAK,MAAA,CAAAC,aAAA,EAACT,mBAAA,CAAAU,OAAkB;IAAA,GAAMJ,KAAK;IAAGC,eAAe;EAAA,CAAE,CACrB,CAAC,EAC/B,IAAAC,MAAA,CAAAC,aAAA,EAACX,YAAA,CAAAY,OAAW,CAACU,gBAAgB;IAC5BC,IAAI,EAAGnB,mBAAmB,CAACE,UAAY;IACvCkB,YAAY;IACZC,UAAU;EAAA,GAEV,IAAAf,MAAA,CAAAC,aAAA,EAACR,iBAAA,CAAAS,OAAgB;IAChBc,gBAAgB,EAAGtB,mBAAmB,CAACC;EAAU,CACjD,CAC4B,CACE,CACrB,CAAC;AAEhB;AAAC,IAAAsB,QAAA,GAEc,IAAAC,aAAI,EAAErB,sBAAuB,CAAC;AAAAsB,OAAA,CAAAjB,OAAA,GAAAe,QAAA"}

View File

@@ -0,0 +1,57 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = require("react");
var _native = require("@react-navigation/native");
var _element = require("@wordpress/element");
var _ = _interopRequireDefault(require("./"));
/**
* External dependencies
*/
/**
* WordPress dependencies
*/
/**
* Internal dependencies
*/
const LinkSettingsScreen = props => {
const navigation = (0, _native.useNavigation)();
const route = (0, _native.useRoute)();
const {
url = ''
} = props;
const {
inputValue = url
} = route.params || {};
const onLinkCellPressed = () => {
if (props.onLinkCellPressed) {
props.onLinkCellPressed({
navigation
});
} else {
navigation.navigate('linkPicker', {
inputValue
});
}
};
return (0, _element.useMemo)(() => {
return (0, _react.createElement)(_.default, {
...props,
onLinkCellPressed: props.hasPicker ? onLinkCellPressed : undefined,
urlValue: inputValue
});
// Disable reason: deferring this refactor to the native team.
// see https://github.com/WordPress/gutenberg/pull/41166
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props, inputValue, navigation, route]);
};
var _default = LinkSettingsScreen;
exports.default = _default;
//# sourceMappingURL=link-settings-screen.native.js.map

View File

@@ -0,0 +1 @@
{"version":3,"names":["_native","require","_element","_","_interopRequireDefault","LinkSettingsScreen","props","navigation","useNavigation","route","useRoute","url","inputValue","params","onLinkCellPressed","navigate","useMemo","_react","createElement","default","hasPicker","undefined","urlValue","_default","exports"],"sources":["@wordpress/components/src/mobile/link-settings/link-settings-screen.native.js"],"sourcesContent":["/**\n * External dependencies\n */\nimport { useNavigation, useRoute } from '@react-navigation/native';\n\n/**\n * WordPress dependencies\n */\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport LinkSettings from './';\n\nconst LinkSettingsScreen = ( props ) => {\n\tconst navigation = useNavigation();\n\tconst route = useRoute();\n\tconst { url = '' } = props;\n\tconst { inputValue = url } = route.params || {};\n\n\tconst onLinkCellPressed = () => {\n\t\tif ( props.onLinkCellPressed ) {\n\t\t\tprops.onLinkCellPressed( { navigation } );\n\t\t} else {\n\t\t\tnavigation.navigate( 'linkPicker', { inputValue } );\n\t\t}\n\t};\n\n\treturn useMemo( () => {\n\t\treturn (\n\t\t\t<LinkSettings\n\t\t\t\t{ ...props }\n\t\t\t\tonLinkCellPressed={\n\t\t\t\t\tprops.hasPicker ? onLinkCellPressed : undefined\n\t\t\t\t}\n\t\t\t\turlValue={ inputValue }\n\t\t\t/>\n\t\t);\n\t\t// Disable reason: deferring this refactor to the native team.\n\t\t// see https://github.com/WordPress/gutenberg/pull/41166\n\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t}, [ props, inputValue, navigation, route ] );\n};\n\nexport default LinkSettingsScreen;\n"],"mappings":";;;;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,QAAA,GAAAD,OAAA;AAKA,IAAAE,CAAA,GAAAC,sBAAA,CAAAH,OAAA;AAbA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;;AAGA,MAAMI,kBAAkB,GAAKC,KAAK,IAAM;EACvC,MAAMC,UAAU,GAAG,IAAAC,qBAAa,EAAC,CAAC;EAClC,MAAMC,KAAK,GAAG,IAAAC,gBAAQ,EAAC,CAAC;EACxB,MAAM;IAAEC,GAAG,GAAG;EAAG,CAAC,GAAGL,KAAK;EAC1B,MAAM;IAAEM,UAAU,GAAGD;EAAI,CAAC,GAAGF,KAAK,CAACI,MAAM,IAAI,CAAC,CAAC;EAE/C,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;IAC/B,IAAKR,KAAK,CAACQ,iBAAiB,EAAG;MAC9BR,KAAK,CAACQ,iBAAiB,CAAE;QAAEP;MAAW,CAAE,CAAC;IAC1C,CAAC,MAAM;MACNA,UAAU,CAACQ,QAAQ,CAAE,YAAY,EAAE;QAAEH;MAAW,CAAE,CAAC;IACpD;EACD,CAAC;EAED,OAAO,IAAAI,gBAAO,EAAE,MAAM;IACrB,OACC,IAAAC,MAAA,CAAAC,aAAA,EAACf,CAAA,CAAAgB,OAAY;MAAA,GACPb,KAAK;MACVQ,iBAAiB,EAChBR,KAAK,CAACc,SAAS,GAAGN,iBAAiB,GAAGO,SACtC;MACDC,QAAQ,EAAGV;IAAY,CACvB,CAAC;IAEH;IACA;IACA;EACD,CAAC,EAAE,CAAEN,KAAK,EAAEM,UAAU,EAAEL,UAAU,EAAEE,KAAK,CAAG,CAAC;AAC9C,CAAC;AAAC,IAAAc,QAAA,GAEalB,kBAAkB;AAAAmB,OAAA,CAAAL,OAAA,GAAAI,QAAA"}