Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/dist
File: components.js
[49000] Fix | Delete
return undefined;
[49001] Fix | Delete
}
[49002] Fix | Delete
[49003] Fix | Delete
}
[49004] Fix | Delete
[49005] Fix | Delete
Downshift.defaultProps = {
[49006] Fix | Delete
defaultHighlightedIndex: null,
[49007] Fix | Delete
defaultIsOpen: false,
[49008] Fix | Delete
getA11yStatusMessage: getA11yStatusMessage$1,
[49009] Fix | Delete
itemToString: i => {
[49010] Fix | Delete
if (i == null) {
[49011] Fix | Delete
return '';
[49012] Fix | Delete
}
[49013] Fix | Delete
[49014] Fix | Delete
if (false) {}
[49015] Fix | Delete
[49016] Fix | Delete
return String(i);
[49017] Fix | Delete
},
[49018] Fix | Delete
onStateChange: downshift_esm_noop,
[49019] Fix | Delete
onInputValueChange: downshift_esm_noop,
[49020] Fix | Delete
onUserAction: downshift_esm_noop,
[49021] Fix | Delete
onChange: downshift_esm_noop,
[49022] Fix | Delete
onSelect: downshift_esm_noop,
[49023] Fix | Delete
onOuterClick: downshift_esm_noop,
[49024] Fix | Delete
selectedItemChanged: (prevItem, item) => prevItem !== item,
[49025] Fix | Delete
environment:
[49026] Fix | Delete
/* istanbul ignore next (ssr) */
[49027] Fix | Delete
typeof window === 'undefined' ? {} : window,
[49028] Fix | Delete
stateReducer: (state, stateToSet) => stateToSet,
[49029] Fix | Delete
suppressRefError: false,
[49030] Fix | Delete
scrollIntoView
[49031] Fix | Delete
};
[49032] Fix | Delete
Downshift.stateChangeTypes = stateChangeTypes$3;
[49033] Fix | Delete
return Downshift;
[49034] Fix | Delete
})()));
[49035] Fix | Delete
[49036] Fix | Delete
false ? 0 : void 0;
[49037] Fix | Delete
var Downshift$1 = (/* unused pure expression or super */ null && (Downshift));
[49038] Fix | Delete
[49039] Fix | Delete
function validateGetMenuPropsCalledCorrectly(node, _ref3) {
[49040] Fix | Delete
let {
[49041] Fix | Delete
refKey
[49042] Fix | Delete
} = _ref3;
[49043] Fix | Delete
[49044] Fix | Delete
if (!node) {
[49045] Fix | Delete
// eslint-disable-next-line no-console
[49046] Fix | Delete
console.error(`downshift: The ref prop "${refKey}" from getMenuProps was not applied correctly on your menu element.`);
[49047] Fix | Delete
}
[49048] Fix | Delete
}
[49049] Fix | Delete
[49050] Fix | Delete
function validateGetRootPropsCalledCorrectly(element, _ref4) {
[49051] Fix | Delete
let {
[49052] Fix | Delete
refKey
[49053] Fix | Delete
} = _ref4;
[49054] Fix | Delete
const refKeySpecified = refKey !== 'ref';
[49055] Fix | Delete
const isComposite = !isDOMElement(element);
[49056] Fix | Delete
[49057] Fix | Delete
if (isComposite && !refKeySpecified && !isForwardRef(element)) {
[49058] Fix | Delete
// eslint-disable-next-line no-console
[49059] Fix | Delete
console.error('downshift: You returned a non-DOM element. You must specify a refKey in getRootProps');
[49060] Fix | Delete
} else if (!isComposite && refKeySpecified) {
[49061] Fix | Delete
// eslint-disable-next-line no-console
[49062] Fix | Delete
console.error(`downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified "${refKey}"`);
[49063] Fix | Delete
}
[49064] Fix | Delete
[49065] Fix | Delete
if (!isForwardRef(element) && !getElementProps(element)[refKey]) {
[49066] Fix | Delete
// eslint-disable-next-line no-console
[49067] Fix | Delete
console.error(`downshift: You must apply the ref prop "${refKey}" from getRootProps onto your root element.`);
[49068] Fix | Delete
}
[49069] Fix | Delete
}
[49070] Fix | Delete
[49071] Fix | Delete
const dropdownDefaultStateValues = {
[49072] Fix | Delete
highlightedIndex: -1,
[49073] Fix | Delete
isOpen: false,
[49074] Fix | Delete
selectedItem: null,
[49075] Fix | Delete
inputValue: ''
[49076] Fix | Delete
};
[49077] Fix | Delete
[49078] Fix | Delete
function callOnChangeProps(action, state, newState) {
[49079] Fix | Delete
const {
[49080] Fix | Delete
props,
[49081] Fix | Delete
type
[49082] Fix | Delete
} = action;
[49083] Fix | Delete
const changes = {};
[49084] Fix | Delete
Object.keys(state).forEach(key => {
[49085] Fix | Delete
invokeOnChangeHandler(key, action, state, newState);
[49086] Fix | Delete
[49087] Fix | Delete
if (newState[key] !== state[key]) {
[49088] Fix | Delete
changes[key] = newState[key];
[49089] Fix | Delete
}
[49090] Fix | Delete
});
[49091] Fix | Delete
[49092] Fix | Delete
if (props.onStateChange && Object.keys(changes).length) {
[49093] Fix | Delete
props.onStateChange({
[49094] Fix | Delete
type,
[49095] Fix | Delete
...changes
[49096] Fix | Delete
});
[49097] Fix | Delete
}
[49098] Fix | Delete
}
[49099] Fix | Delete
[49100] Fix | Delete
function invokeOnChangeHandler(key, action, state, newState) {
[49101] Fix | Delete
const {
[49102] Fix | Delete
props,
[49103] Fix | Delete
type
[49104] Fix | Delete
} = action;
[49105] Fix | Delete
const handler = `on${capitalizeString(key)}Change`;
[49106] Fix | Delete
[49107] Fix | Delete
if (props[handler] && newState[key] !== undefined && newState[key] !== state[key]) {
[49108] Fix | Delete
props[handler]({
[49109] Fix | Delete
type,
[49110] Fix | Delete
...newState
[49111] Fix | Delete
});
[49112] Fix | Delete
}
[49113] Fix | Delete
}
[49114] Fix | Delete
/**
[49115] Fix | Delete
* Default state reducer that returns the changes.
[49116] Fix | Delete
*
[49117] Fix | Delete
* @param {Object} s state.
[49118] Fix | Delete
* @param {Object} a action with changes.
[49119] Fix | Delete
* @returns {Object} changes.
[49120] Fix | Delete
*/
[49121] Fix | Delete
[49122] Fix | Delete
[49123] Fix | Delete
function stateReducer(s, a) {
[49124] Fix | Delete
return a.changes;
[49125] Fix | Delete
}
[49126] Fix | Delete
/**
[49127] Fix | Delete
* Returns a message to be added to aria-live region when item is selected.
[49128] Fix | Delete
*
[49129] Fix | Delete
* @param {Object} selectionParameters Parameters required to build the message.
[49130] Fix | Delete
* @returns {string} The a11y message.
[49131] Fix | Delete
*/
[49132] Fix | Delete
[49133] Fix | Delete
[49134] Fix | Delete
function getA11ySelectionMessage(selectionParameters) {
[49135] Fix | Delete
const {
[49136] Fix | Delete
selectedItem,
[49137] Fix | Delete
itemToString: itemToStringLocal
[49138] Fix | Delete
} = selectionParameters;
[49139] Fix | Delete
return selectedItem ? `${itemToStringLocal(selectedItem)} has been selected.` : '';
[49140] Fix | Delete
}
[49141] Fix | Delete
/**
[49142] Fix | Delete
* Debounced call for updating the a11y message.
[49143] Fix | Delete
*/
[49144] Fix | Delete
[49145] Fix | Delete
[49146] Fix | Delete
const updateA11yStatus = debounce((getA11yMessage, document) => {
[49147] Fix | Delete
setStatus(getA11yMessage(), document);
[49148] Fix | Delete
}, 200); // istanbul ignore next
[49149] Fix | Delete
[49150] Fix | Delete
const downshift_esm_useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? external_React_.useLayoutEffect : external_React_.useEffect;
[49151] Fix | Delete
[49152] Fix | Delete
function useElementIds(_ref) {
[49153] Fix | Delete
let {
[49154] Fix | Delete
id = `downshift-${generateId()}`,
[49155] Fix | Delete
labelId,
[49156] Fix | Delete
menuId,
[49157] Fix | Delete
getItemId,
[49158] Fix | Delete
toggleButtonId,
[49159] Fix | Delete
inputId
[49160] Fix | Delete
} = _ref;
[49161] Fix | Delete
const elementIdsRef = (0,external_React_.useRef)({
[49162] Fix | Delete
labelId: labelId || `${id}-label`,
[49163] Fix | Delete
menuId: menuId || `${id}-menu`,
[49164] Fix | Delete
getItemId: getItemId || (index => `${id}-item-${index}`),
[49165] Fix | Delete
toggleButtonId: toggleButtonId || `${id}-toggle-button`,
[49166] Fix | Delete
inputId: inputId || `${id}-input`
[49167] Fix | Delete
});
[49168] Fix | Delete
return elementIdsRef.current;
[49169] Fix | Delete
}
[49170] Fix | Delete
[49171] Fix | Delete
function getItemIndex(index, item, items) {
[49172] Fix | Delete
if (index !== undefined) {
[49173] Fix | Delete
return index;
[49174] Fix | Delete
}
[49175] Fix | Delete
[49176] Fix | Delete
if (items.length === 0) {
[49177] Fix | Delete
return -1;
[49178] Fix | Delete
}
[49179] Fix | Delete
[49180] Fix | Delete
return items.indexOf(item);
[49181] Fix | Delete
}
[49182] Fix | Delete
[49183] Fix | Delete
function itemToString(item) {
[49184] Fix | Delete
return item ? String(item) : '';
[49185] Fix | Delete
}
[49186] Fix | Delete
[49187] Fix | Delete
function isAcceptedCharacterKey(key) {
[49188] Fix | Delete
return /^\S{1}$/.test(key);
[49189] Fix | Delete
}
[49190] Fix | Delete
[49191] Fix | Delete
function capitalizeString(string) {
[49192] Fix | Delete
return `${string.slice(0, 1).toUpperCase()}${string.slice(1)}`;
[49193] Fix | Delete
}
[49194] Fix | Delete
[49195] Fix | Delete
function downshift_esm_useLatestRef(val) {
[49196] Fix | Delete
const ref = (0,external_React_.useRef)(val); // technically this is not "concurrent mode safe" because we're manipulating
[49197] Fix | Delete
// the value during render (so it's not idempotent). However, the places this
[49198] Fix | Delete
// hook is used is to support memoizing callbacks which will be called
[49199] Fix | Delete
// *during* render, so we need the latest values *during* render.
[49200] Fix | Delete
// If not for this, then we'd probably want to use useLayoutEffect instead.
[49201] Fix | Delete
[49202] Fix | Delete
ref.current = val;
[49203] Fix | Delete
return ref;
[49204] Fix | Delete
}
[49205] Fix | Delete
/**
[49206] Fix | Delete
* Computes the controlled state using a the previous state, props,
[49207] Fix | Delete
* two reducers, one from downshift and an optional one from the user.
[49208] Fix | Delete
* Also calls the onChange handlers for state values that have changed.
[49209] Fix | Delete
*
[49210] Fix | Delete
* @param {Function} reducer Reducer function from downshift.
[49211] Fix | Delete
* @param {Object} initialState Initial state of the hook.
[49212] Fix | Delete
* @param {Object} props The hook props.
[49213] Fix | Delete
* @returns {Array} An array with the state and an action dispatcher.
[49214] Fix | Delete
*/
[49215] Fix | Delete
[49216] Fix | Delete
[49217] Fix | Delete
function useEnhancedReducer(reducer, initialState, props) {
[49218] Fix | Delete
const prevStateRef = (0,external_React_.useRef)();
[49219] Fix | Delete
const actionRef = (0,external_React_.useRef)();
[49220] Fix | Delete
const enhancedReducer = (0,external_React_.useCallback)((state, action) => {
[49221] Fix | Delete
actionRef.current = action;
[49222] Fix | Delete
state = getState(state, action.props);
[49223] Fix | Delete
const changes = reducer(state, action);
[49224] Fix | Delete
const newState = action.props.stateReducer(state, { ...action,
[49225] Fix | Delete
changes
[49226] Fix | Delete
});
[49227] Fix | Delete
return newState;
[49228] Fix | Delete
}, [reducer]);
[49229] Fix | Delete
const [state, dispatch] = (0,external_React_.useReducer)(enhancedReducer, initialState);
[49230] Fix | Delete
const propsRef = downshift_esm_useLatestRef(props);
[49231] Fix | Delete
const dispatchWithProps = (0,external_React_.useCallback)(action => dispatch({
[49232] Fix | Delete
props: propsRef.current,
[49233] Fix | Delete
...action
[49234] Fix | Delete
}), [propsRef]);
[49235] Fix | Delete
const action = actionRef.current;
[49236] Fix | Delete
(0,external_React_.useEffect)(() => {
[49237] Fix | Delete
if (action && prevStateRef.current && prevStateRef.current !== state) {
[49238] Fix | Delete
callOnChangeProps(action, getState(prevStateRef.current, action.props), state);
[49239] Fix | Delete
}
[49240] Fix | Delete
[49241] Fix | Delete
prevStateRef.current = state;
[49242] Fix | Delete
}, [state, props, action]);
[49243] Fix | Delete
return [state, dispatchWithProps];
[49244] Fix | Delete
}
[49245] Fix | Delete
/**
[49246] Fix | Delete
* Wraps the useEnhancedReducer and applies the controlled prop values before
[49247] Fix | Delete
* returning the new state.
[49248] Fix | Delete
*
[49249] Fix | Delete
* @param {Function} reducer Reducer function from downshift.
[49250] Fix | Delete
* @param {Object} initialState Initial state of the hook.
[49251] Fix | Delete
* @param {Object} props The hook props.
[49252] Fix | Delete
* @returns {Array} An array with the state and an action dispatcher.
[49253] Fix | Delete
*/
[49254] Fix | Delete
[49255] Fix | Delete
[49256] Fix | Delete
function useControlledReducer$1(reducer, initialState, props) {
[49257] Fix | Delete
const [state, dispatch] = useEnhancedReducer(reducer, initialState, props);
[49258] Fix | Delete
return [getState(state, props), dispatch];
[49259] Fix | Delete
}
[49260] Fix | Delete
[49261] Fix | Delete
const defaultProps$3 = {
[49262] Fix | Delete
itemToString,
[49263] Fix | Delete
stateReducer,
[49264] Fix | Delete
getA11ySelectionMessage,
[49265] Fix | Delete
scrollIntoView,
[49266] Fix | Delete
circularNavigation: false,
[49267] Fix | Delete
environment:
[49268] Fix | Delete
/* istanbul ignore next (ssr) */
[49269] Fix | Delete
typeof window === 'undefined' ? {} : window
[49270] Fix | Delete
};
[49271] Fix | Delete
[49272] Fix | Delete
function getDefaultValue$1(props, propKey, defaultStateValues) {
[49273] Fix | Delete
if (defaultStateValues === void 0) {
[49274] Fix | Delete
defaultStateValues = dropdownDefaultStateValues;
[49275] Fix | Delete
}
[49276] Fix | Delete
[49277] Fix | Delete
const defaultValue = props[`default${capitalizeString(propKey)}`];
[49278] Fix | Delete
[49279] Fix | Delete
if (defaultValue !== undefined) {
[49280] Fix | Delete
return defaultValue;
[49281] Fix | Delete
}
[49282] Fix | Delete
[49283] Fix | Delete
return defaultStateValues[propKey];
[49284] Fix | Delete
}
[49285] Fix | Delete
[49286] Fix | Delete
function getInitialValue$1(props, propKey, defaultStateValues) {
[49287] Fix | Delete
if (defaultStateValues === void 0) {
[49288] Fix | Delete
defaultStateValues = dropdownDefaultStateValues;
[49289] Fix | Delete
}
[49290] Fix | Delete
[49291] Fix | Delete
const value = props[propKey];
[49292] Fix | Delete
[49293] Fix | Delete
if (value !== undefined) {
[49294] Fix | Delete
return value;
[49295] Fix | Delete
}
[49296] Fix | Delete
[49297] Fix | Delete
const initialValue = props[`initial${capitalizeString(propKey)}`];
[49298] Fix | Delete
[49299] Fix | Delete
if (initialValue !== undefined) {
[49300] Fix | Delete
return initialValue;
[49301] Fix | Delete
}
[49302] Fix | Delete
[49303] Fix | Delete
return getDefaultValue$1(props, propKey, defaultStateValues);
[49304] Fix | Delete
}
[49305] Fix | Delete
[49306] Fix | Delete
function getInitialState$2(props) {
[49307] Fix | Delete
const selectedItem = getInitialValue$1(props, 'selectedItem');
[49308] Fix | Delete
const isOpen = getInitialValue$1(props, 'isOpen');
[49309] Fix | Delete
const highlightedIndex = getInitialValue$1(props, 'highlightedIndex');
[49310] Fix | Delete
const inputValue = getInitialValue$1(props, 'inputValue');
[49311] Fix | Delete
return {
[49312] Fix | Delete
highlightedIndex: highlightedIndex < 0 && selectedItem && isOpen ? props.items.indexOf(selectedItem) : highlightedIndex,
[49313] Fix | Delete
isOpen,
[49314] Fix | Delete
selectedItem,
[49315] Fix | Delete
inputValue
[49316] Fix | Delete
};
[49317] Fix | Delete
}
[49318] Fix | Delete
[49319] Fix | Delete
function getHighlightedIndexOnOpen(props, state, offset, getItemNodeFromIndex) {
[49320] Fix | Delete
const {
[49321] Fix | Delete
items,
[49322] Fix | Delete
initialHighlightedIndex,
[49323] Fix | Delete
defaultHighlightedIndex
[49324] Fix | Delete
} = props;
[49325] Fix | Delete
const {
[49326] Fix | Delete
selectedItem,
[49327] Fix | Delete
highlightedIndex
[49328] Fix | Delete
} = state;
[49329] Fix | Delete
[49330] Fix | Delete
if (items.length === 0) {
[49331] Fix | Delete
return -1;
[49332] Fix | Delete
} // initialHighlightedIndex will give value to highlightedIndex on initial state only.
[49333] Fix | Delete
[49334] Fix | Delete
[49335] Fix | Delete
if (initialHighlightedIndex !== undefined && highlightedIndex === initialHighlightedIndex) {
[49336] Fix | Delete
return initialHighlightedIndex;
[49337] Fix | Delete
}
[49338] Fix | Delete
[49339] Fix | Delete
if (defaultHighlightedIndex !== undefined) {
[49340] Fix | Delete
return defaultHighlightedIndex;
[49341] Fix | Delete
}
[49342] Fix | Delete
[49343] Fix | Delete
if (selectedItem) {
[49344] Fix | Delete
if (offset === 0) {
[49345] Fix | Delete
return items.indexOf(selectedItem);
[49346] Fix | Delete
}
[49347] Fix | Delete
[49348] Fix | Delete
return getNextWrappingIndex(offset, items.indexOf(selectedItem), items.length, getItemNodeFromIndex, false);
[49349] Fix | Delete
}
[49350] Fix | Delete
[49351] Fix | Delete
if (offset === 0) {
[49352] Fix | Delete
return -1;
[49353] Fix | Delete
}
[49354] Fix | Delete
[49355] Fix | Delete
return offset < 0 ? items.length - 1 : 0;
[49356] Fix | Delete
}
[49357] Fix | Delete
/**
[49358] Fix | Delete
* Reuse the movement tracking of mouse and touch events.
[49359] Fix | Delete
*
[49360] Fix | Delete
* @param {boolean} isOpen Whether the dropdown is open or not.
[49361] Fix | Delete
* @param {Array<Object>} downshiftElementRefs Downshift element refs to track movement (toggleButton, menu etc.)
[49362] Fix | Delete
* @param {Object} environment Environment where component/hook exists.
[49363] Fix | Delete
* @param {Function} handleBlur Handler on blur from mouse or touch.
[49364] Fix | Delete
* @returns {Object} Ref containing whether mouseDown or touchMove event is happening
[49365] Fix | Delete
*/
[49366] Fix | Delete
[49367] Fix | Delete
[49368] Fix | Delete
function useMouseAndTouchTracker(isOpen, downshiftElementRefs, environment, handleBlur) {
[49369] Fix | Delete
const mouseAndTouchTrackersRef = (0,external_React_.useRef)({
[49370] Fix | Delete
isMouseDown: false,
[49371] Fix | Delete
isTouchMove: false
[49372] Fix | Delete
});
[49373] Fix | Delete
(0,external_React_.useEffect)(() => {
[49374] Fix | Delete
// The same strategy for checking if a click occurred inside or outside downsift
[49375] Fix | Delete
// as in downshift.js.
[49376] Fix | Delete
const onMouseDown = () => {
[49377] Fix | Delete
mouseAndTouchTrackersRef.current.isMouseDown = true;
[49378] Fix | Delete
};
[49379] Fix | Delete
[49380] Fix | Delete
const onMouseUp = event => {
[49381] Fix | Delete
mouseAndTouchTrackersRef.current.isMouseDown = false;
[49382] Fix | Delete
[49383] Fix | Delete
if (isOpen && !targetWithinDownshift(event.target, downshiftElementRefs.map(ref => ref.current), environment)) {
[49384] Fix | Delete
handleBlur();
[49385] Fix | Delete
}
[49386] Fix | Delete
};
[49387] Fix | Delete
[49388] Fix | Delete
const onTouchStart = () => {
[49389] Fix | Delete
mouseAndTouchTrackersRef.current.isTouchMove = false;
[49390] Fix | Delete
};
[49391] Fix | Delete
[49392] Fix | Delete
const onTouchMove = () => {
[49393] Fix | Delete
mouseAndTouchTrackersRef.current.isTouchMove = true;
[49394] Fix | Delete
};
[49395] Fix | Delete
[49396] Fix | Delete
const onTouchEnd = event => {
[49397] Fix | Delete
if (isOpen && !mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, downshiftElementRefs.map(ref => ref.current), environment, false)) {
[49398] Fix | Delete
handleBlur();
[49399] Fix | Delete
}
[49400] Fix | Delete
};
[49401] Fix | Delete
[49402] Fix | Delete
environment.addEventListener('mousedown', onMouseDown);
[49403] Fix | Delete
environment.addEventListener('mouseup', onMouseUp);
[49404] Fix | Delete
environment.addEventListener('touchstart', onTouchStart);
[49405] Fix | Delete
environment.addEventListener('touchmove', onTouchMove);
[49406] Fix | Delete
environment.addEventListener('touchend', onTouchEnd);
[49407] Fix | Delete
return function cleanup() {
[49408] Fix | Delete
environment.removeEventListener('mousedown', onMouseDown);
[49409] Fix | Delete
environment.removeEventListener('mouseup', onMouseUp);
[49410] Fix | Delete
environment.removeEventListener('touchstart', onTouchStart);
[49411] Fix | Delete
environment.removeEventListener('touchmove', onTouchMove);
[49412] Fix | Delete
environment.removeEventListener('touchend', onTouchEnd);
[49413] Fix | Delete
}; // eslint-disable-next-line react-hooks/exhaustive-deps
[49414] Fix | Delete
}, [isOpen, environment]);
[49415] Fix | Delete
return mouseAndTouchTrackersRef;
[49416] Fix | Delete
}
[49417] Fix | Delete
/* istanbul ignore next */
[49418] Fix | Delete
// eslint-disable-next-line import/no-mutable-exports
[49419] Fix | Delete
[49420] Fix | Delete
[49421] Fix | Delete
let useGetterPropsCalledChecker = () => downshift_esm_noop;
[49422] Fix | Delete
/**
[49423] Fix | Delete
* Custom hook that checks if getter props are called correctly.
[49424] Fix | Delete
*
[49425] Fix | Delete
* @param {...any} propKeys Getter prop names to be handled.
[49426] Fix | Delete
* @returns {Function} Setter function called inside getter props to set call information.
[49427] Fix | Delete
*/
[49428] Fix | Delete
[49429] Fix | Delete
/* istanbul ignore next */
[49430] Fix | Delete
[49431] Fix | Delete
[49432] Fix | Delete
if (false) {}
[49433] Fix | Delete
[49434] Fix | Delete
function useA11yMessageSetter(getA11yMessage, dependencyArray, _ref2) {
[49435] Fix | Delete
let {
[49436] Fix | Delete
isInitialMount,
[49437] Fix | Delete
highlightedIndex,
[49438] Fix | Delete
items,
[49439] Fix | Delete
environment,
[49440] Fix | Delete
...rest
[49441] Fix | Delete
} = _ref2;
[49442] Fix | Delete
// Sets a11y status message on changes in state.
[49443] Fix | Delete
(0,external_React_.useEffect)(() => {
[49444] Fix | Delete
if (isInitialMount || false) {
[49445] Fix | Delete
return;
[49446] Fix | Delete
}
[49447] Fix | Delete
[49448] Fix | Delete
updateA11yStatus(() => getA11yMessage({
[49449] Fix | Delete
highlightedIndex,
[49450] Fix | Delete
highlightedItem: items[highlightedIndex],
[49451] Fix | Delete
resultCount: items.length,
[49452] Fix | Delete
...rest
[49453] Fix | Delete
}), environment.document); // eslint-disable-next-line react-hooks/exhaustive-deps
[49454] Fix | Delete
}, dependencyArray);
[49455] Fix | Delete
}
[49456] Fix | Delete
[49457] Fix | Delete
function useScrollIntoView(_ref3) {
[49458] Fix | Delete
let {
[49459] Fix | Delete
highlightedIndex,
[49460] Fix | Delete
isOpen,
[49461] Fix | Delete
itemRefs,
[49462] Fix | Delete
getItemNodeFromIndex,
[49463] Fix | Delete
menuElement,
[49464] Fix | Delete
scrollIntoView: scrollIntoViewProp
[49465] Fix | Delete
} = _ref3;
[49466] Fix | Delete
// used not to scroll on highlight by mouse.
[49467] Fix | Delete
const shouldScrollRef = (0,external_React_.useRef)(true); // Scroll on highlighted item if change comes from keyboard.
[49468] Fix | Delete
[49469] Fix | Delete
downshift_esm_useIsomorphicLayoutEffect(() => {
[49470] Fix | Delete
if (highlightedIndex < 0 || !isOpen || !Object.keys(itemRefs.current).length) {
[49471] Fix | Delete
return;
[49472] Fix | Delete
}
[49473] Fix | Delete
[49474] Fix | Delete
if (shouldScrollRef.current === false) {
[49475] Fix | Delete
shouldScrollRef.current = true;
[49476] Fix | Delete
} else {
[49477] Fix | Delete
scrollIntoViewProp(getItemNodeFromIndex(highlightedIndex), menuElement);
[49478] Fix | Delete
} // eslint-disable-next-line react-hooks/exhaustive-deps
[49479] Fix | Delete
[49480] Fix | Delete
}, [highlightedIndex]);
[49481] Fix | Delete
return shouldScrollRef;
[49482] Fix | Delete
} // eslint-disable-next-line import/no-mutable-exports
[49483] Fix | Delete
[49484] Fix | Delete
[49485] Fix | Delete
let useControlPropsValidator = downshift_esm_noop;
[49486] Fix | Delete
/* istanbul ignore next */
[49487] Fix | Delete
[49488] Fix | Delete
if (false) {}
[49489] Fix | Delete
[49490] Fix | Delete
/* eslint-disable complexity */
[49491] Fix | Delete
[49492] Fix | Delete
function downshiftCommonReducer(state, action, stateChangeTypes) {
[49493] Fix | Delete
const {
[49494] Fix | Delete
type,
[49495] Fix | Delete
props
[49496] Fix | Delete
} = action;
[49497] Fix | Delete
let changes;
[49498] Fix | Delete
[49499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function