Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/7e/8993908931033d5ed776d82558702ee82aae82a425f3ae2861b032afdc16c0d7b4f31f
T
2025-11-07 20:14:32 +00:00

1 line
14 KiB
Plaintext

{"dependencies":[{"name":"@react-navigation/core","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":15},"end":{"line":3,"column":69,"index":84}}],"key":"Wm75LgE4xYscVWo0KoLFlflJQCo=","exportNames":["*"],"imports":1}},{"name":"react","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":4,"column":0,"index":85},"end":{"line":4,"column":31,"index":116}}],"key":"RtGiGa+/H7VrI7GDQDLhO1UbpU8=","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.useScrollToTop = useScrollToTop;\n var _reactNavigationCore = require(_dependencyMap[0], \"@react-navigation/core\");\n var _react = require(_dependencyMap[1], \"react\");\n var React = _interopNamespace(_react);\n function getScrollableNode(ref) {\n if (ref.current == null) {\n return null;\n }\n if ('scrollToTop' in ref.current || 'scrollTo' in ref.current || 'scrollToOffset' in ref.current || 'scrollResponderScrollTo' in ref.current) {\n // This is already a scrollable node.\n return ref.current;\n } else if ('getScrollResponder' in ref.current) {\n // If the view is a wrapper like FlatList, SectionList etc.\n // We need to use `getScrollResponder` to get access to the scroll responder\n return ref.current.getScrollResponder();\n } else if ('getNode' in ref.current) {\n // When a `ScrollView` is wrapped in `Animated.createAnimatedComponent`\n // we need to use `getNode` to get the ref to the actual scrollview.\n // Note that `getNode` is deprecated in newer versions of react-native\n // this is why we check if we already have a scrollable node above.\n return ref.current.getNode();\n } else {\n return ref.current;\n }\n }\n function useScrollToTop(ref) {\n const navigation = React.useContext(_reactNavigationCore.NavigationContext);\n const route = (0, _reactNavigationCore.useRoute)();\n if (navigation === undefined) {\n throw new Error(\"Couldn't find a navigation object. Is your component inside NavigationContainer?\");\n }\n React.useEffect(() => {\n const tabNavigations = [];\n let currentNavigation = navigation;\n // If the screen is nested inside multiple tab navigators, we should scroll to top for any of them\n // So we need to find all the parent tab navigators and add the listeners there\n while (currentNavigation) {\n if (currentNavigation.getState().type === 'tab') {\n tabNavigations.push(currentNavigation);\n }\n currentNavigation = currentNavigation.getParent();\n }\n if (tabNavigations.length === 0) {\n return;\n }\n const unsubscribers = tabNavigations.map(tab => {\n return tab.addListener(\n // We don't wanna import tab types here to avoid extra deps\n // in addition, there are multiple tab implementations\n // @ts-expect-error the `tabPress` event is only available when navigation type is tab\n 'tabPress', e => {\n // We should scroll to top only when the screen is focused\n const isFocused = navigation.isFocused();\n\n // In a nested stack navigator, tab press resets the stack to first screen\n // So we should scroll to top only when we are on first screen\n const isFirst = tabNavigations.includes(navigation) || navigation.getState().routes[0].key === route.key;\n\n // Run the operation in the next frame so we're sure all listeners have been run\n // This is necessary to know if preventDefault() has been called\n requestAnimationFrame(() => {\n const scrollable = getScrollableNode(ref);\n if (isFocused && isFirst && scrollable && !e.defaultPrevented) {\n if ('scrollToTop' in scrollable) {\n scrollable.scrollToTop();\n } else if ('scrollTo' in scrollable) {\n scrollable.scrollTo({\n y: 0,\n animated: true\n });\n } else if ('scrollToOffset' in scrollable) {\n scrollable.scrollToOffset({\n offset: 0,\n animated: true\n });\n } else if ('scrollResponderScrollTo' in scrollable) {\n scrollable.scrollResponderScrollTo({\n y: 0,\n animated: true\n });\n }\n }\n });\n });\n });\n return () => {\n unsubscribers.forEach(unsubscribe => unsubscribe());\n };\n }, [navigation, ref, route.key]);\n }\n});","lineCount":112,"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,26,0,"exports"],[22,9,26,0],[22,10,26,0,"useScrollToTop"],[22,24,26,0],[22,27,26,0,"useScrollToTop"],[22,41,26,0],[23,2,3,0],[23,6,3,0,"_reactNavigationCore"],[23,26,3,0],[23,29,3,0,"require"],[23,36,3,0],[23,37,3,0,"_dependencyMap"],[23,51,3,0],[24,2,4,0],[24,6,4,0,"_react"],[24,12,4,0],[24,15,4,0,"require"],[24,22,4,0],[24,23,4,0,"_dependencyMap"],[24,37,4,0],[25,2,4,0],[25,6,4,0,"React"],[25,11,4,0],[25,14,4,0,"_interopNamespace"],[25,31,4,0],[25,32,4,0,"_react"],[25,38,4,0],[26,2,5,0],[26,11,5,9,"getScrollableNode"],[26,28,5,26,"getScrollableNode"],[26,29,5,27,"ref"],[26,32,5,30],[26,34,5,32],[27,4,6,2],[27,8,6,6,"ref"],[27,11,6,9],[27,12,6,10,"current"],[27,19,6,17],[27,23,6,21],[27,27,6,25],[27,29,6,27],[28,6,7,4],[28,13,7,11],[28,17,7,15],[29,4,8,2],[30,4,9,2],[30,8,9,6],[30,21,9,19],[30,25,9,23,"ref"],[30,28,9,26],[30,29,9,27,"current"],[30,36,9,34],[30,40,9,38],[30,50,9,48],[30,54,9,52,"ref"],[30,57,9,55],[30,58,9,56,"current"],[30,65,9,63],[30,69,9,67],[30,85,9,83],[30,89,9,87,"ref"],[30,92,9,90],[30,93,9,91,"current"],[30,100,9,98],[30,104,9,102],[30,129,9,127],[30,133,9,131,"ref"],[30,136,9,134],[30,137,9,135,"current"],[30,144,9,142],[30,146,9,144],[31,6,10,4],[32,6,11,4],[32,13,11,11,"ref"],[32,16,11,14],[32,17,11,15,"current"],[32,24,11,22],[33,4,12,2],[33,5,12,3],[33,11,12,9],[33,15,12,13],[33,35,12,33],[33,39,12,37,"ref"],[33,42,12,40],[33,43,12,41,"current"],[33,50,12,48],[33,52,12,50],[34,6,13,4],[35,6,14,4],[36,6,15,4],[36,13,15,11,"ref"],[36,16,15,14],[36,17,15,15,"current"],[36,24,15,22],[36,25,15,23,"getScrollResponder"],[36,43,15,41],[36,44,15,42],[36,45,15,43],[37,4,16,2],[37,5,16,3],[37,11,16,9],[37,15,16,13],[37,24,16,22],[37,28,16,26,"ref"],[37,31,16,29],[37,32,16,30,"current"],[37,39,16,37],[37,41,16,39],[38,6,17,4],[39,6,18,4],[40,6,19,4],[41,6,20,4],[42,6,21,4],[42,13,21,11,"ref"],[42,16,21,14],[42,17,21,15,"current"],[42,24,21,22],[42,25,21,23,"getNode"],[42,32,21,30],[42,33,21,31],[42,34,21,32],[43,4,22,2],[43,5,22,3],[43,11,22,9],[44,6,23,4],[44,13,23,11,"ref"],[44,16,23,14],[44,17,23,15,"current"],[44,24,23,22],[45,4,24,2],[46,2,25,0],[47,2,26,7],[47,11,26,16,"useScrollToTop"],[47,25,26,30,"useScrollToTop"],[47,26,26,31,"ref"],[47,29,26,34],[47,31,26,36],[48,4,27,2],[48,10,27,8,"navigation"],[48,20,27,18],[48,23,27,21,"React"],[48,28,27,26],[48,29,27,27,"useContext"],[48,39,27,37],[48,40,27,38,"NavigationContext"],[48,60,27,55],[48,61,27,55,"NavigationContext"],[48,78,27,55],[48,79,27,56],[49,4,28,2],[49,10,28,8,"route"],[49,15,28,13],[49,18,28,16],[49,22,28,16,"useRoute"],[49,42,28,24],[49,43,28,24,"useRoute"],[49,51,28,24],[49,53,28,25],[49,54,28,26],[50,4,29,2],[50,8,29,6,"navigation"],[50,18,29,16],[50,23,29,21,"undefined"],[50,32,29,30],[50,34,29,32],[51,6,30,4],[51,12,30,10],[51,16,30,14,"Error"],[51,21,30,19],[51,22,30,20],[51,104,30,102],[51,105,30,103],[52,4,31,2],[53,4,32,2,"React"],[53,9,32,7],[53,10,32,8,"useEffect"],[53,19,32,17],[53,20,32,18],[53,26,32,24],[54,6,33,4],[54,12,33,10,"tabNavigations"],[54,26,33,24],[54,29,33,27],[54,31,33,29],[55,6,34,4],[55,10,34,8,"currentNavigation"],[55,27,34,25],[55,30,34,28,"navigation"],[55,40,34,38],[56,6,35,4],[57,6,36,4],[58,6,37,4],[58,13,37,11,"currentNavigation"],[58,30,37,28],[58,32,37,30],[59,8,38,6],[59,12,38,10,"currentNavigation"],[59,29,38,27],[59,30,38,28,"getState"],[59,38,38,36],[59,39,38,37],[59,40,38,38],[59,41,38,39,"type"],[59,45,38,43],[59,50,38,48],[59,55,38,53],[59,57,38,55],[60,10,39,8,"tabNavigations"],[60,24,39,22],[60,25,39,23,"push"],[60,29,39,27],[60,30,39,28,"currentNavigation"],[60,47,39,45],[60,48,39,46],[61,8,40,6],[62,8,41,6,"currentNavigation"],[62,25,41,23],[62,28,41,26,"currentNavigation"],[62,45,41,43],[62,46,41,44,"getParent"],[62,55,41,53],[62,56,41,54],[62,57,41,55],[63,6,42,4],[64,6,43,4],[64,10,43,8,"tabNavigations"],[64,24,43,22],[64,25,43,23,"length"],[64,31,43,29],[64,36,43,34],[64,37,43,35],[64,39,43,37],[65,8,44,6],[66,6,45,4],[67,6,46,4],[67,12,46,10,"unsubscribers"],[67,25,46,23],[67,28,46,26,"tabNavigations"],[67,42,46,40],[67,43,46,41,"map"],[67,46,46,44],[67,47,46,45,"tab"],[67,50,46,48],[67,54,46,52],[68,8,47,6],[68,15,47,13,"tab"],[68,18,47,16],[68,19,47,17,"addListener"],[68,30,47,28],[69,8,48,6],[70,8,49,6],[71,8,50,6],[72,8,51,6],[72,18,51,16],[72,20,51,18,"e"],[72,21,51,19],[72,25,51,23],[73,10,52,8],[74,10,53,8],[74,16,53,14,"isFocused"],[74,25,53,23],[74,28,53,26,"navigation"],[74,38,53,36],[74,39,53,37,"isFocused"],[74,48,53,46],[74,49,53,47],[74,50,53,48],[76,10,55,8],[77,10,56,8],[78,10,57,8],[78,16,57,14,"isFirst"],[78,23,57,21],[78,26,57,24,"tabNavigations"],[78,40,57,38],[78,41,57,39,"includes"],[78,49,57,47],[78,50,57,48,"navigation"],[78,60,57,58],[78,61,57,59],[78,65,57,63,"navigation"],[78,75,57,73],[78,76,57,74,"getState"],[78,84,57,82],[78,85,57,83],[78,86,57,84],[78,87,57,85,"routes"],[78,93,57,91],[78,94,57,92],[78,95,57,93],[78,96,57,94],[78,97,57,95,"key"],[78,100,57,98],[78,105,57,103,"route"],[78,110,57,108],[78,111,57,109,"key"],[78,114,57,112],[80,10,59,8],[81,10,60,8],[82,10,61,8,"requestAnimationFrame"],[82,31,61,29],[82,32,61,30],[82,38,61,36],[83,12,62,10],[83,18,62,16,"scrollable"],[83,28,62,26],[83,31,62,29,"getScrollableNode"],[83,48,62,46],[83,49,62,47,"ref"],[83,52,62,50],[83,53,62,51],[84,12,63,10],[84,16,63,14,"isFocused"],[84,25,63,23],[84,29,63,27,"isFirst"],[84,36,63,34],[84,40,63,38,"scrollable"],[84,50,63,48],[84,54,63,52],[84,55,63,53,"e"],[84,56,63,54],[84,57,63,55,"defaultPrevented"],[84,73,63,71],[84,75,63,73],[85,14,64,12],[85,18,64,16],[85,31,64,29],[85,35,64,33,"scrollable"],[85,45,64,43],[85,47,64,45],[86,16,65,14,"scrollable"],[86,26,65,24],[86,27,65,25,"scrollToTop"],[86,38,65,36],[86,39,65,37],[86,40,65,38],[87,14,66,12],[87,15,66,13],[87,21,66,19],[87,25,66,23],[87,35,66,33],[87,39,66,37,"scrollable"],[87,49,66,47],[87,51,66,49],[88,16,67,14,"scrollable"],[88,26,67,24],[88,27,67,25,"scrollTo"],[88,35,67,33],[88,36,67,34],[89,18,68,16,"y"],[89,19,68,17],[89,21,68,19],[89,22,68,20],[90,18,69,16,"animated"],[90,26,69,24],[90,28,69,26],[91,16,70,14],[91,17,70,15],[91,18,70,16],[92,14,71,12],[92,15,71,13],[92,21,71,19],[92,25,71,23],[92,41,71,39],[92,45,71,43,"scrollable"],[92,55,71,53],[92,57,71,55],[93,16,72,14,"scrollable"],[93,26,72,24],[93,27,72,25,"scrollToOffset"],[93,41,72,39],[93,42,72,40],[94,18,73,16,"offset"],[94,24,73,22],[94,26,73,24],[94,27,73,25],[95,18,74,16,"animated"],[95,26,74,24],[95,28,74,26],[96,16,75,14],[96,17,75,15],[96,18,75,16],[97,14,76,12],[97,15,76,13],[97,21,76,19],[97,25,76,23],[97,50,76,48],[97,54,76,52,"scrollable"],[97,64,76,62],[97,66,76,64],[98,16,77,14,"scrollable"],[98,26,77,24],[98,27,77,25,"scrollResponderScrollTo"],[98,50,77,48],[98,51,77,49],[99,18,78,16,"y"],[99,19,78,17],[99,21,78,19],[99,22,78,20],[100,18,79,16,"animated"],[100,26,79,24],[100,28,79,26],[101,16,80,14],[101,17,80,15],[101,18,80,16],[102,14,81,12],[103,12,82,10],[104,10,83,8],[104,11,83,9],[104,12,83,10],[105,8,84,6],[105,9,84,7],[105,10,84,8],[106,6,85,4],[106,7,85,5],[106,8,85,6],[107,6,86,4],[107,13,86,11],[107,19,86,17],[108,8,87,6,"unsubscribers"],[108,21,87,19],[108,22,87,20,"forEach"],[108,29,87,27],[108,30,87,28,"unsubscribe"],[108,41,87,39],[108,45,87,43,"unsubscribe"],[108,56,87,54],[108,57,87,55],[108,58,87,56],[108,59,87,57],[109,6,88,4],[109,7,88,5],[110,4,89,2],[110,5,89,3],[110,7,89,5],[110,8,89,6,"navigation"],[110,18,89,16],[110,20,89,18,"ref"],[110,23,89,21],[110,25,89,23,"route"],[110,30,89,28],[110,31,89,29,"key"],[110,34,89,32],[110,35,89,33],[110,36,89,34],[111,2,90,0],[112,0,90,1],[112,3]],"functionMap":{"names":["<global>","getScrollableNode","useScrollToTop","React.useEffect$argument_0","tabNavigations.map$argument_0","tab.addListener$argument_1","requestAnimationFrame$argument_0","<anonymous>","unsubscribers.forEach$argument_0"],"mappings":"AAA;ACI;CDoB;OEC;kBCM;6CCc;kBCK;8BCU;SDsB;ODC;KDC;WIC;4BCC,4BD;KJC;GDC;CFC"},"hasCjsExports":false},"type":"js/module"}]}