Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/55/9771bc66a42bfee7aa2ba6a11fe11452d6e125f2bd71a65b3a2f6fb2ec4c0b53e3fadb
T
2025-11-07 20:14:32 +00:00

1 line
10 KiB
Plaintext

{"dependencies":[{"name":"react","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":15},"end":{"line":3,"column":31,"index":46}}],"key":"RtGiGa+/H7VrI7GDQDLhO1UbpU8=","exportNames":["*"],"imports":1}},{"name":"./NavigationContext.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":4,"column":0,"index":47},"end":{"line":4,"column":59,"index":106}}],"key":"RM0XoJ1uy5+hqq85ZlLNt6FYuco=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, '__esModule', {\n value: true\n });\n function _interopNamespace(e) {\n if (e && e.__esModule) return e;\n var n = {};\n if (e) Object.keys(e).forEach(function (k) {\n var d = Object.getOwnPropertyDescriptor(e, k);\n Object.defineProperty(n, k, d.get ? d : {\n enumerable: true,\n get: function () {\n return e[k];\n }\n });\n });\n n.default = e;\n return n;\n }\n exports.useFocusEvents = useFocusEvents;\n var _react = require(_dependencyMap[0], \"react\");\n var React = _interopNamespace(_react);\n var _NavigationContextJs = require(_dependencyMap[1], \"./NavigationContext.js\");\n /**\n * Hook to take care of emitting `focus` and `blur` events.\n */\n function useFocusEvents(_ref) {\n var state = _ref.state,\n emitter = _ref.emitter;\n var navigation = React.useContext(_NavigationContextJs.NavigationContext);\n var lastFocusedKeyRef = React.useRef(undefined);\n var currentFocusedKey = state.routes[state.index].key;\n\n // When the parent screen changes its focus state, we also need to change child's focus\n // Coz the child screen can't be focused if the parent screen is out of focus\n React.useEffect(() => navigation?.addListener('focus', () => {\n lastFocusedKeyRef.current = currentFocusedKey;\n emitter.emit({\n type: 'focus',\n target: currentFocusedKey\n });\n }), [currentFocusedKey, emitter, navigation]);\n React.useEffect(() => navigation?.addListener('blur', () => {\n lastFocusedKeyRef.current = undefined;\n emitter.emit({\n type: 'blur',\n target: currentFocusedKey\n });\n }), [currentFocusedKey, emitter, navigation]);\n React.useEffect(() => {\n var lastFocusedKey = lastFocusedKeyRef.current;\n lastFocusedKeyRef.current = currentFocusedKey;\n\n // We wouldn't have `lastFocusedKey` on initial mount\n // Fire focus event for the current route on mount if there's no parent navigator\n if (lastFocusedKey === undefined && !navigation) {\n emitter.emit({\n type: 'focus',\n target: currentFocusedKey\n });\n }\n\n // We should only emit events when the focused key changed and navigator is focused\n // When navigator is not focused, screens inside shouldn't receive focused status either\n if (lastFocusedKey === currentFocusedKey || !(navigation ? navigation.isFocused() : true)) {\n return;\n }\n if (lastFocusedKey === undefined) {\n // Only fire events after initial mount\n return;\n }\n emitter.emit({\n type: 'blur',\n target: lastFocusedKey\n });\n emitter.emit({\n type: 'focus',\n target: currentFocusedKey\n });\n }, [currentFocusedKey, emitter, navigation]);\n }\n});","lineCount":84,"map":[[2,2,1,0],[2,14,1,12],[4,2,1,13,"Object"],[4,8,1,13],[4,9,1,13,"defineProperty"],[4,23,1,13],[4,24,1,13,"exports"],[4,31,1,13],[5,4,1,13,"value"],[5,9,1,13],[6,2,1,13],[7,2,1,13],[7,11,1,13,"_interopNamespace"],[7,29,1,13,"e"],[7,30,1,13],[8,4,1,13],[8,8,1,13,"e"],[8,9,1,13],[8,13,1,13,"e"],[8,14,1,13],[8,15,1,13,"__esModule"],[8,25,1,13],[8,34,1,13,"e"],[8,35,1,13],[9,4,1,13],[9,8,1,13,"n"],[9,9,1,13],[10,4,1,13],[10,8,1,13,"e"],[10,9,1,13],[10,11,1,13,"Object"],[10,17,1,13],[10,18,1,13,"keys"],[10,22,1,13],[10,23,1,13,"e"],[10,24,1,13],[10,26,1,13,"forEach"],[10,33,1,13],[10,44,1,13,"k"],[10,45,1,13],[11,6,1,13],[11,10,1,13,"d"],[11,11,1,13],[11,14,1,13,"Object"],[11,20,1,13],[11,21,1,13,"getOwnPropertyDescriptor"],[11,45,1,13],[11,46,1,13,"e"],[11,47,1,13],[11,49,1,13,"k"],[11,50,1,13],[12,6,1,13,"Object"],[12,12,1,13],[12,13,1,13,"defineProperty"],[12,27,1,13],[12,28,1,13,"n"],[12,29,1,13],[12,31,1,13,"k"],[12,32,1,13],[12,34,1,13,"d"],[12,35,1,13],[12,36,1,13,"get"],[12,39,1,13],[12,42,1,13,"d"],[12,43,1,13],[13,8,1,13,"enumerable"],[13,18,1,13],[14,8,1,13,"get"],[14,11,1,13],[14,22,1,13,"get"],[14,23,1,13],[15,10,1,13],[15,17,1,13,"e"],[15,18,1,13],[15,19,1,13,"k"],[15,20,1,13],[16,8,1,13],[17,6,1,13],[18,4,1,13],[19,4,1,13,"n"],[19,5,1,13],[19,6,1,13,"default"],[19,13,1,13],[19,16,1,13,"e"],[19,17,1,13],[20,4,1,13],[20,11,1,13,"n"],[20,12,1,13],[21,2,1,13],[22,2,8,0,"exports"],[22,9,8,0],[22,10,8,0,"useFocusEvents"],[22,24,8,0],[22,27,8,0,"useFocusEvents"],[22,41,8,0],[23,2,3,0],[23,6,3,0,"_react"],[23,12,3,0],[23,15,3,0,"require"],[23,22,3,0],[23,23,3,0,"_dependencyMap"],[23,37,3,0],[24,2,3,0],[24,6,3,0,"React"],[24,11,3,0],[24,14,3,0,"_interopNamespace"],[24,31,3,0],[24,32,3,0,"_react"],[24,38,3,0],[25,2,4,0],[25,6,4,0,"_NavigationContextJs"],[25,26,4,0],[25,29,4,0,"require"],[25,36,4,0],[25,37,4,0,"_dependencyMap"],[25,51,4,0],[26,2,5,0],[27,0,6,0],[28,0,7,0],[29,2,8,7],[29,11,8,16,"useFocusEvents"],[29,25,8,30,"useFocusEvents"],[29,26,8,30,"_ref"],[29,30,8,30],[29,32,11,3],[30,4,11,3],[30,8,9,2,"state"],[30,13,9,7],[30,16,9,7,"_ref"],[30,20,9,7],[30,21,9,2,"state"],[30,26,9,7],[31,6,10,2,"emitter"],[31,13,10,9],[31,16,10,9,"_ref"],[31,20,10,9],[31,21,10,2,"emitter"],[31,28,10,9],[32,4,12,2],[32,8,12,8,"navigation"],[32,18,12,18],[32,21,12,21,"React"],[32,26,12,26],[32,27,12,27,"useContext"],[32,37,12,37],[32,38,12,38,"NavigationContext"],[32,58,12,55],[32,59,12,55,"NavigationContext"],[32,76,12,55],[32,77,12,56],[33,4,13,2],[33,8,13,8,"lastFocusedKeyRef"],[33,25,13,25],[33,28,13,28,"React"],[33,33,13,33],[33,34,13,34,"useRef"],[33,40,13,40],[33,41,13,41,"undefined"],[33,50,13,50],[33,51,13,51],[34,4,14,2],[34,8,14,8,"currentFocusedKey"],[34,25,14,25],[34,28,14,28,"state"],[34,33,14,33],[34,34,14,34,"routes"],[34,40,14,40],[34,41,14,41,"state"],[34,46,14,46],[34,47,14,47,"index"],[34,52,14,52],[34,53,14,53],[34,54,14,54,"key"],[34,57,14,57],[36,4,16,2],[37,4,17,2],[38,4,18,2,"React"],[38,9,18,7],[38,10,18,8,"useEffect"],[38,19,18,17],[38,20,18,18],[38,26,18,24,"navigation"],[38,36,18,34],[38,38,18,36,"addListener"],[38,49,18,47],[38,50,18,48],[38,57,18,55],[38,59,18,57],[38,65,18,63],[39,6,19,4,"lastFocusedKeyRef"],[39,23,19,21],[39,24,19,22,"current"],[39,31,19,29],[39,34,19,32,"currentFocusedKey"],[39,51,19,49],[40,6,20,4,"emitter"],[40,13,20,11],[40,14,20,12,"emit"],[40,18,20,16],[40,19,20,17],[41,8,21,6,"type"],[41,12,21,10],[41,14,21,12],[41,21,21,19],[42,8,22,6,"target"],[42,14,22,12],[42,16,22,14,"currentFocusedKey"],[43,6,23,4],[43,7,23,5],[43,8,23,6],[44,4,24,2],[44,5,24,3],[44,6,24,4],[44,8,24,6],[44,9,24,7,"currentFocusedKey"],[44,26,24,24],[44,28,24,26,"emitter"],[44,35,24,33],[44,37,24,35,"navigation"],[44,47,24,45],[44,48,24,46],[44,49,24,47],[45,4,25,2,"React"],[45,9,25,7],[45,10,25,8,"useEffect"],[45,19,25,17],[45,20,25,18],[45,26,25,24,"navigation"],[45,36,25,34],[45,38,25,36,"addListener"],[45,49,25,47],[45,50,25,48],[45,56,25,54],[45,58,25,56],[45,64,25,62],[46,6,26,4,"lastFocusedKeyRef"],[46,23,26,21],[46,24,26,22,"current"],[46,31,26,29],[46,34,26,32,"undefined"],[46,43,26,41],[47,6,27,4,"emitter"],[47,13,27,11],[47,14,27,12,"emit"],[47,18,27,16],[47,19,27,17],[48,8,28,6,"type"],[48,12,28,10],[48,14,28,12],[48,20,28,18],[49,8,29,6,"target"],[49,14,29,12],[49,16,29,14,"currentFocusedKey"],[50,6,30,4],[50,7,30,5],[50,8,30,6],[51,4,31,2],[51,5,31,3],[51,6,31,4],[51,8,31,6],[51,9,31,7,"currentFocusedKey"],[51,26,31,24],[51,28,31,26,"emitter"],[51,35,31,33],[51,37,31,35,"navigation"],[51,47,31,45],[51,48,31,46],[51,49,31,47],[52,4,32,2,"React"],[52,9,32,7],[52,10,32,8,"useEffect"],[52,19,32,17],[52,20,32,18],[52,26,32,24],[53,6,33,4],[53,10,33,10,"lastFocusedKey"],[53,24,33,24],[53,27,33,27,"lastFocusedKeyRef"],[53,44,33,44],[53,45,33,45,"current"],[53,52,33,52],[54,6,34,4,"lastFocusedKeyRef"],[54,23,34,21],[54,24,34,22,"current"],[54,31,34,29],[54,34,34,32,"currentFocusedKey"],[54,51,34,49],[56,6,36,4],[57,6,37,4],[58,6,38,4],[58,10,38,8,"lastFocusedKey"],[58,24,38,22],[58,29,38,27,"undefined"],[58,38,38,36],[58,42,38,40],[58,43,38,41,"navigation"],[58,53,38,51],[58,55,38,53],[59,8,39,6,"emitter"],[59,15,39,13],[59,16,39,14,"emit"],[59,20,39,18],[59,21,39,19],[60,10,40,8,"type"],[60,14,40,12],[60,16,40,14],[60,23,40,21],[61,10,41,8,"target"],[61,16,41,14],[61,18,41,16,"currentFocusedKey"],[62,8,42,6],[62,9,42,7],[62,10,42,8],[63,6,43,4],[65,6,45,4],[66,6,46,4],[67,6,47,4],[67,10,47,8,"lastFocusedKey"],[67,24,47,22],[67,29,47,27,"currentFocusedKey"],[67,46,47,44],[67,50,47,48],[67,52,47,50,"navigation"],[67,62,47,60],[67,65,47,63,"navigation"],[67,75,47,73],[67,76,47,74,"isFocused"],[67,85,47,83],[67,86,47,84],[67,87,47,85],[67,90,47,88],[67,94,47,92],[67,95,47,93],[67,97,47,95],[68,8,48,6],[69,6,49,4],[70,6,50,4],[70,10,50,8,"lastFocusedKey"],[70,24,50,22],[70,29,50,27,"undefined"],[70,38,50,36],[70,40,50,38],[71,8,51,6],[72,8,52,6],[73,6,53,4],[74,6,54,4,"emitter"],[74,13,54,11],[74,14,54,12,"emit"],[74,18,54,16],[74,19,54,17],[75,8,55,6,"type"],[75,12,55,10],[75,14,55,12],[75,20,55,18],[76,8,56,6,"target"],[76,14,56,12],[76,16,56,14,"lastFocusedKey"],[77,6,57,4],[77,7,57,5],[77,8,57,6],[78,6,58,4,"emitter"],[78,13,58,11],[78,14,58,12,"emit"],[78,18,58,16],[78,19,58,17],[79,8,59,6,"type"],[79,12,59,10],[79,14,59,12],[79,21,59,19],[80,8,60,6,"target"],[80,14,60,12],[80,16,60,14,"currentFocusedKey"],[81,6,61,4],[81,7,61,5],[81,8,61,6],[82,4,62,2],[82,5,62,3],[82,7,62,5],[82,8,62,6,"currentFocusedKey"],[82,25,62,23],[82,27,62,25,"emitter"],[82,34,62,32],[82,36,62,34,"navigation"],[82,46,62,44],[82,47,62,45],[82,48,62,46],[83,2,63,0],[84,0,63,1],[84,3]],"functionMap":{"names":["<global>","useFocusEvents","React.useEffect$argument_0","navigation.addListener$argument_1"],"mappings":"AAA;OCO;kBCU,uCC;GDM,CD;kBCC,sCC;GDM,CD;kBCC;GD8B;CDC"},"hasCjsExports":false},"type":"js/module"}]}