83 lines
4.0 KiB
TypeScript
83 lines
4.0 KiB
TypeScript
/* Metro module 9766; source: modules/share/useAutocompleter.tsx; dependencies: [57, 31, 6518, 7234, 2] */
|
|
function _fun76652(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#76652, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:6, offset: 0x01ddee2e, size: 133 bytes, params: 8, frame: 18
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importDefault(57) /* metro dependency 57 */;
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/share/useAutocompleter.tsx');
|
|
exports.default = useAutocompleter;
|
|
}
|
|
|
|
function useAutocompleter({searchOptions}) { // fn#76653, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:194, offset: 0x01ddeeb3, size: 218 bytes, params: 2, frame: 18
|
|
var object2;
|
|
const binding = env0_3;
|
|
const value3 = env0_2(binding.useState({results: [], query: ''}), 2);
|
|
const property = value3[0];
|
|
const env0_1 = value3[1];
|
|
let value = importDefault(6518) /* metro dependency 6518: useInitialValue */;
|
|
value = value(_fun76654);
|
|
binding.useEffect(function() {
|
|
return _fun76657;
|
|
}, [value]);
|
|
binding.useEffect(_fun76658, [value, searchOptions]);
|
|
object2 = {};
|
|
object2.search = binding.useCallback(_fun76659, [value]);
|
|
copyDataProperties(object2, property, value3);
|
|
return object2;
|
|
}
|
|
|
|
function _fun76654() { // fn#76654, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:313, offset: 0x01ddef8d, size: 85 bytes, params: 1, frame: 11
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
value = importDefault(7234) /* metro dependency 7234: autocompleter */;
|
|
value = new value(_fun76655);
|
|
value.setLimit(20);
|
|
value.search('');
|
|
return value;
|
|
}
|
|
|
|
function _fun76656() { // fn#76656, offset: 0x01ddf004, size: 11 bytes, params: 1, frame: 1
|
|
return _fun76657;
|
|
}
|
|
|
|
function _fun76658() { // fn#76658, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:471, offset: 0x01ddf022, size: 59 bytes, params: 1, frame: 12
|
|
var binding;
|
|
if (searchOptions != null && searchOptions !== env0_2.options) {
|
|
binding = env0_2;
|
|
binding.setOptions(searchOptions);
|
|
}
|
|
}
|
|
|
|
function _fun76659({query, resultTypes}) { // fn#76659, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:548, offset: 0x01ddf05d, size: 151 bytes, params: 2, frame: 16
|
|
var binding;
|
|
if (!(env0_2.resultTypes != null && ((a0, a1) => {
|
|
var env0_0 = a1;
|
|
return a0.length === a1.size && a0.every(_fun76661);
|
|
})(resultTypes, env0_2.resultTypes))) {
|
|
binding = env0_2;
|
|
binding.setResultTypes(resultTypes);
|
|
binding.setLimit(resultTypes.length !== 1 ? 20 : 50);
|
|
}
|
|
binding = env0_2;
|
|
const search = binding.search;
|
|
const value = query.trim();
|
|
const value6 = '';
|
|
Reflect.apply(search, binding, [value6 === value ? value6 : query]);
|
|
}
|
|
|
|
function _fun76655(a0, a1) { // fn#76655, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:338, offset: 0x01ddefe2, size: 34 bytes, params: 3, frame: 11
|
|
env1_1({results: a0, query: a1});
|
|
}
|
|
|
|
function _fun76657() { // fn#76657, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:436, offset: 0x01ddf00f, size: 19 bytes, params: 1, frame: 9
|
|
return env1_2.destroy();
|
|
}
|
|
|
|
function isArrayEqualSet(a0, a1) { // fn#76660, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9952:597, offset: 0x01ddf0f4, size: 49 bytes, params: 3, frame: 12
|
|
const env0_0 = a1;
|
|
return a0.length === a1.size && a0.every(function(a0) {
|
|
return require.has(a0);
|
|
});
|
|
}
|
|
|