@react-navigation/drawer 6.5.0 → 6.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/lib/commonjs/index.js.map +1 -1
  2. package/lib/commonjs/navigators/createDrawerNavigator.js +1 -1
  3. package/lib/commonjs/navigators/createDrawerNavigator.js.map +1 -1
  4. package/lib/commonjs/types.js.map +1 -1
  5. package/lib/commonjs/utils/DrawerGestureContext.js.map +1 -1
  6. package/lib/commonjs/utils/DrawerPositionContext.js.map +1 -1
  7. package/lib/commonjs/utils/DrawerProgressContext.js.map +1 -1
  8. package/lib/commonjs/utils/DrawerStatusContext.js.map +1 -1
  9. package/lib/commonjs/utils/getDrawerStatusFromState.js.map +1 -1
  10. package/lib/commonjs/utils/useDrawerProgress.js.map +1 -1
  11. package/lib/commonjs/utils/useDrawerStatus.js.map +1 -1
  12. package/lib/commonjs/views/DrawerContent.js +1 -1
  13. package/lib/commonjs/views/DrawerContent.js.map +1 -1
  14. package/lib/commonjs/views/DrawerContentScrollView.js +1 -1
  15. package/lib/commonjs/views/DrawerContentScrollView.js.map +1 -1
  16. package/lib/commonjs/views/DrawerItem.js +1 -1
  17. package/lib/commonjs/views/DrawerItem.js.map +1 -1
  18. package/lib/commonjs/views/DrawerItemList.js.map +1 -1
  19. package/lib/commonjs/views/DrawerToggleButton.js +1 -1
  20. package/lib/commonjs/views/DrawerToggleButton.js.map +1 -1
  21. package/lib/commonjs/views/DrawerView.js +1 -1
  22. package/lib/commonjs/views/DrawerView.js.map +1 -1
  23. package/lib/commonjs/views/GestureHandler.android.js.map +1 -1
  24. package/lib/commonjs/views/GestureHandler.ios.js.map +1 -1
  25. package/lib/commonjs/views/GestureHandler.js.map +1 -1
  26. package/lib/commonjs/views/GestureHandlerNative.js.map +1 -1
  27. package/lib/commonjs/views/ScreenFallback.js +1 -1
  28. package/lib/commonjs/views/ScreenFallback.js.map +1 -1
  29. package/lib/commonjs/views/legacy/Drawer.js +1 -1
  30. package/lib/commonjs/views/legacy/Drawer.js.map +1 -1
  31. package/lib/commonjs/views/legacy/Overlay.js +1 -1
  32. package/lib/commonjs/views/legacy/Overlay.js.map +1 -1
  33. package/lib/commonjs/views/modern/Drawer.js +10 -3
  34. package/lib/commonjs/views/modern/Drawer.js.map +1 -1
  35. package/lib/commonjs/views/modern/Overlay.js +1 -1
  36. package/lib/commonjs/views/modern/Overlay.js.map +1 -1
  37. package/lib/module/index.js.map +1 -1
  38. package/lib/module/navigators/createDrawerNavigator.js +1 -1
  39. package/lib/module/navigators/createDrawerNavigator.js.map +1 -1
  40. package/lib/module/types.js.map +1 -1
  41. package/lib/module/utils/DrawerGestureContext.js.map +1 -1
  42. package/lib/module/utils/DrawerPositionContext.js.map +1 -1
  43. package/lib/module/utils/DrawerProgressContext.js.map +1 -1
  44. package/lib/module/utils/DrawerStatusContext.js.map +1 -1
  45. package/lib/module/utils/getDrawerStatusFromState.js.map +1 -1
  46. package/lib/module/utils/useDrawerProgress.js.map +1 -1
  47. package/lib/module/utils/useDrawerStatus.js.map +1 -1
  48. package/lib/module/views/DrawerContent.js +1 -1
  49. package/lib/module/views/DrawerContent.js.map +1 -1
  50. package/lib/module/views/DrawerContentScrollView.js +1 -1
  51. package/lib/module/views/DrawerContentScrollView.js.map +1 -1
  52. package/lib/module/views/DrawerItem.js +1 -1
  53. package/lib/module/views/DrawerItem.js.map +1 -1
  54. package/lib/module/views/DrawerItemList.js.map +1 -1
  55. package/lib/module/views/DrawerToggleButton.js +1 -1
  56. package/lib/module/views/DrawerToggleButton.js.map +1 -1
  57. package/lib/module/views/DrawerView.js +1 -1
  58. package/lib/module/views/DrawerView.js.map +1 -1
  59. package/lib/module/views/GestureHandler.android.js.map +1 -1
  60. package/lib/module/views/GestureHandler.ios.js.map +1 -1
  61. package/lib/module/views/GestureHandler.js.map +1 -1
  62. package/lib/module/views/GestureHandlerNative.js.map +1 -1
  63. package/lib/module/views/ScreenFallback.js +1 -1
  64. package/lib/module/views/ScreenFallback.js.map +1 -1
  65. package/lib/module/views/legacy/Drawer.js +1 -1
  66. package/lib/module/views/legacy/Drawer.js.map +1 -1
  67. package/lib/module/views/legacy/Overlay.js +1 -1
  68. package/lib/module/views/legacy/Overlay.js.map +1 -1
  69. package/lib/module/views/modern/Drawer.js +10 -3
  70. package/lib/module/views/modern/Drawer.js.map +1 -1
  71. package/lib/module/views/modern/Overlay.js +1 -1
  72. package/lib/module/views/modern/Overlay.js.map +1 -1
  73. package/package.json +5 -5
  74. package/src/views/modern/Drawer.tsx +10 -3
@@ -1 +1 @@
1
- {"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["/**\n * Navigators\n */\nexport { default as createDrawerNavigator } from './navigators/createDrawerNavigator';\n\n/**\n * Views\n */\nexport { default as DrawerContent } from './views/DrawerContent';\nexport { default as DrawerContentScrollView } from './views/DrawerContentScrollView';\nexport { default as DrawerItem } from './views/DrawerItem';\nexport { default as DrawerItemList } from './views/DrawerItemList';\nexport { default as DrawerToggleButton } from './views/DrawerToggleButton';\nexport { default as DrawerView } from './views/DrawerView';\n\n/**\n * Utilities\n */\nexport { default as DrawerGestureContext } from './utils/DrawerGestureContext';\nexport { default as DrawerProgressContext } from './utils/DrawerProgressContext';\nexport { default as getDrawerStatusFromState } from './utils/getDrawerStatusFromState';\nexport { default as useDrawerProgress } from './utils/useDrawerProgress';\nexport { default as useDrawerStatus } from './utils/useDrawerStatus';\n\n/**\n * Types\n */\nexport type {\n DrawerContentComponentProps,\n DrawerHeaderProps,\n DrawerNavigationEventMap,\n DrawerNavigationOptions,\n DrawerNavigationProp,\n DrawerScreenProps,\n} from './types';\n"]}
1
+ {"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["/**\n * Navigators\n */\nexport { default as createDrawerNavigator } from './navigators/createDrawerNavigator';\n\n/**\n * Views\n */\nexport { default as DrawerContent } from './views/DrawerContent';\nexport { default as DrawerContentScrollView } from './views/DrawerContentScrollView';\nexport { default as DrawerItem } from './views/DrawerItem';\nexport { default as DrawerItemList } from './views/DrawerItemList';\nexport { default as DrawerToggleButton } from './views/DrawerToggleButton';\nexport { default as DrawerView } from './views/DrawerView';\n\n/**\n * Utilities\n */\nexport { default as DrawerGestureContext } from './utils/DrawerGestureContext';\nexport { default as DrawerProgressContext } from './utils/DrawerProgressContext';\nexport { default as getDrawerStatusFromState } from './utils/getDrawerStatusFromState';\nexport { default as useDrawerProgress } from './utils/useDrawerProgress';\nexport { default as useDrawerStatus } from './utils/useDrawerStatus';\n\n/**\n * Types\n */\nexport type {\n DrawerContentComponentProps,\n DrawerHeaderProps,\n DrawerNavigationEventMap,\n DrawerNavigationOptions,\n DrawerNavigationProp,\n DrawerScreenProps,\n} from './types';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AACA;;AACA;;AACA;;AACA"}
@@ -19,7 +19,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
19
19
 
20
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
21
 
22
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
22
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
23
 
24
24
  function DrawerNavigator(_ref) {
25
25
  let {
@@ -1 +1 @@
1
- {"version":3,"sources":["createDrawerNavigator.tsx"],"names":["DrawerNavigator","id","initialRouteName","defaultStatus","customDefaultStatus","backBehavior","children","screenListeners","screenOptions","restWithDeprecated","openByDefault","lazy","drawerContentOptions","rest","defaultScreenOptions","Object","assign","drawerPosition","drawerType","swipeEdgeWidth","edgeWidth","drawerHideStatusBarOnOpen","hideStatusBar","keyboardDismissMode","swipeMinDistance","minSwipeDistance","overlayColor","drawerStatusBarAnimation","statusBarAnimation","gestureHandlerProps","keys","forEach","key","undefined","JSON","stringify","state","descriptors","navigation","NavigationContent","DrawerRouter"],"mappings":";;;;;;;AAAA;;AAWA;;AACA;;AAOA;;;;;;;;;;AAWA,SAASA,eAAT,OASU;AAAA,MATe;AACvBC,IAAAA,EADuB;AAEvBC,IAAAA,gBAFuB;AAGvBC,IAAAA,aAAa,EAAEC,mBAHQ;AAIvBC,IAAAA,YAJuB;AAKvBC,IAAAA,QALuB;AAMvBC,IAAAA,eANuB;AAOvBC,IAAAA,aAPuB;AAQvB,OAAGC;AARoB,GASf;AACR,QAAM;AACJ;AACAC,IAAAA,aAFI;AAGJ;AACAC,IAAAA,IAJI;AAKJ;AACAC,IAAAA,oBANI;AAOJ,OAAGC;AAPC,MAQFJ,kBARJ;AAUA,MAA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AM;AAAE0B,IAAAA,KAAF;AAASC,IAAAA,WAAT;AAAsBC,IAAAA,UAAtB;AAAkCC,IAAAA;AAAlC,MACJ,kCAMEC,oBANF,EAMgB;AACdvC,IAAAA,EADc;AAEdC,IAAAA,gBAFc;AAGdC,IAAAA,aAHc;AAIdE,IAAAA,YAJc;AAKdC,IAAAA,QALc;AAMdC,IAAAA,eANc;AAOdC,IAAAA,aAPc;AAQdM,IAAAA;AARc,GANhB,CADF;AAkBA,sBACE,oBAAC,iBAAD,qBACE,oBAAC,mBAAD,eACMD,IADN;AAEE,IAAA,aAAa,EAAEV,aAFjB;AAGE,IAAA,KAAK,EAAEiC,KAHT;AAIE,IAAA,WAAW,EAAEC,WAJf;AAKE,IAAA,UAAU,EAAEC;AALd,KADF,CADF;AAWD;;eAEc,oCAKbtC,eALa,C","sourcesContent":["import {\n createNavigatorFactory,\n DefaultNavigatorOptions,\n DrawerActionHelpers,\n DrawerNavigationState,\n DrawerRouter,\n DrawerRouterOptions,\n DrawerStatus,\n ParamListBase,\n useNavigationBuilder,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport warnOnce from 'warn-once';\n\nimport type {\n DrawerNavigationConfig,\n DrawerNavigationEventMap,\n DrawerNavigationOptions,\n} from '../types';\nimport DrawerView from '../views/DrawerView';\n\ntype Props = DefaultNavigatorOptions<\n ParamListBase,\n DrawerNavigationState<ParamListBase>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap\n> &\n DrawerRouterOptions &\n DrawerNavigationConfig;\n\nfunction DrawerNavigator({\n id,\n initialRouteName,\n defaultStatus: customDefaultStatus,\n backBehavior,\n children,\n screenListeners,\n screenOptions,\n ...restWithDeprecated\n}: Props) {\n const {\n // @ts-expect-error: openByDefault is deprecated\n openByDefault,\n // @ts-expect-error: lazy is deprecated\n lazy,\n // @ts-expect-error: drawerContentOptions is deprecated\n drawerContentOptions,\n ...rest\n } = restWithDeprecated;\n\n let defaultScreenOptions: DrawerNavigationOptions = {};\n\n if (drawerContentOptions) {\n Object.assign(defaultScreenOptions, {\n drawerPosition: drawerContentOptions.drawerPosition,\n drawerType: drawerContentOptions.drawerType,\n swipeEdgeWidth: drawerContentOptions.edgeWidth,\n drawerHideStatusBarOnOpen: drawerContentOptions.hideStatusBar,\n keyboardDismissMode: drawerContentOptions.keyboardDismissMode,\n swipeMinDistance: drawerContentOptions.minSwipeDistance,\n overlayColor: drawerContentOptions.overlayColor,\n drawerStatusBarAnimation: drawerContentOptions.statusBarAnimation,\n gestureHandlerProps: drawerContentOptions.gestureHandlerProps,\n });\n\n (\n Object.keys(defaultScreenOptions) as (keyof DrawerNavigationOptions)[]\n ).forEach((key) => {\n if (defaultScreenOptions[key] === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete defaultScreenOptions[key];\n }\n });\n\n warnOnce(\n drawerContentOptions,\n `Drawer Navigator: 'drawerContentOptions' is deprecated. Migrate the options to 'screenOptions' instead.\\n\\nPlace the following in 'screenOptions' in your code to keep current behavior:\\n\\n${JSON.stringify(\n defaultScreenOptions,\n null,\n 2\n )}\\n\\nSee https://reactnavigation.org/docs/drawer-navigator#options for more details.`\n );\n }\n\n if (typeof lazy === 'boolean') {\n defaultScreenOptions.lazy = lazy;\n\n warnOnce(\n true,\n `Drawer Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\\n\\nSee https://reactnavigation.org/docs/drawer-navigator/#lazy for more details.`\n );\n }\n\n if (typeof openByDefault === 'boolean') {\n warnOnce(\n true,\n `Drawer Navigator: 'openByDefault' is deprecated. Use 'defaultStatus' and set it to 'open' or 'closed' instead.\\n\\nSee https://reactnavigation.org/docs/drawer-navigator/#defaultstatus for more details.`\n );\n }\n\n const defaultStatus: DrawerStatus =\n customDefaultStatus !== undefined\n ? customDefaultStatus\n : openByDefault\n ? 'open'\n : 'closed';\n\n const { state, descriptors, navigation, NavigationContent } =\n useNavigationBuilder<\n DrawerNavigationState<ParamListBase>,\n DrawerRouterOptions,\n DrawerActionHelpers<ParamListBase>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap\n >(DrawerRouter, {\n id,\n initialRouteName,\n defaultStatus,\n backBehavior,\n children,\n screenListeners,\n screenOptions,\n defaultScreenOptions,\n });\n\n return (\n <NavigationContent>\n <DrawerView\n {...rest}\n defaultStatus={defaultStatus}\n state={state}\n descriptors={descriptors}\n navigation={navigation}\n />\n </NavigationContent>\n );\n}\n\nexport default createNavigatorFactory<\n DrawerNavigationState<ParamListBase>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap,\n typeof DrawerNavigator\n>(DrawerNavigator);\n"]}
1
+ {"version":3,"names":["DrawerNavigator","id","initialRouteName","defaultStatus","customDefaultStatus","backBehavior","children","screenListeners","screenOptions","restWithDeprecated","openByDefault","lazy","drawerContentOptions","rest","defaultScreenOptions","Object","assign","drawerPosition","drawerType","swipeEdgeWidth","edgeWidth","drawerHideStatusBarOnOpen","hideStatusBar","keyboardDismissMode","swipeMinDistance","minSwipeDistance","overlayColor","drawerStatusBarAnimation","statusBarAnimation","gestureHandlerProps","keys","forEach","key","undefined","warnOnce","JSON","stringify","state","descriptors","navigation","NavigationContent","useNavigationBuilder","DrawerRouter","createNavigatorFactory"],"sources":["createDrawerNavigator.tsx"],"sourcesContent":["import {\n createNavigatorFactory,\n DefaultNavigatorOptions,\n DrawerActionHelpers,\n DrawerNavigationState,\n DrawerRouter,\n DrawerRouterOptions,\n DrawerStatus,\n ParamListBase,\n useNavigationBuilder,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport warnOnce from 'warn-once';\n\nimport type {\n DrawerNavigationConfig,\n DrawerNavigationEventMap,\n DrawerNavigationOptions,\n} from '../types';\nimport DrawerView from '../views/DrawerView';\n\ntype Props = DefaultNavigatorOptions<\n ParamListBase,\n DrawerNavigationState<ParamListBase>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap\n> &\n DrawerRouterOptions &\n DrawerNavigationConfig;\n\nfunction DrawerNavigator({\n id,\n initialRouteName,\n defaultStatus: customDefaultStatus,\n backBehavior,\n children,\n screenListeners,\n screenOptions,\n ...restWithDeprecated\n}: Props) {\n const {\n // @ts-expect-error: openByDefault is deprecated\n openByDefault,\n // @ts-expect-error: lazy is deprecated\n lazy,\n // @ts-expect-error: drawerContentOptions is deprecated\n drawerContentOptions,\n ...rest\n } = restWithDeprecated;\n\n let defaultScreenOptions: DrawerNavigationOptions = {};\n\n if (drawerContentOptions) {\n Object.assign(defaultScreenOptions, {\n drawerPosition: drawerContentOptions.drawerPosition,\n drawerType: drawerContentOptions.drawerType,\n swipeEdgeWidth: drawerContentOptions.edgeWidth,\n drawerHideStatusBarOnOpen: drawerContentOptions.hideStatusBar,\n keyboardDismissMode: drawerContentOptions.keyboardDismissMode,\n swipeMinDistance: drawerContentOptions.minSwipeDistance,\n overlayColor: drawerContentOptions.overlayColor,\n drawerStatusBarAnimation: drawerContentOptions.statusBarAnimation,\n gestureHandlerProps: drawerContentOptions.gestureHandlerProps,\n });\n\n (\n Object.keys(defaultScreenOptions) as (keyof DrawerNavigationOptions)[]\n ).forEach((key) => {\n if (defaultScreenOptions[key] === undefined) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete defaultScreenOptions[key];\n }\n });\n\n warnOnce(\n drawerContentOptions,\n `Drawer Navigator: 'drawerContentOptions' is deprecated. Migrate the options to 'screenOptions' instead.\\n\\nPlace the following in 'screenOptions' in your code to keep current behavior:\\n\\n${JSON.stringify(\n defaultScreenOptions,\n null,\n 2\n )}\\n\\nSee https://reactnavigation.org/docs/drawer-navigator#options for more details.`\n );\n }\n\n if (typeof lazy === 'boolean') {\n defaultScreenOptions.lazy = lazy;\n\n warnOnce(\n true,\n `Drawer Navigator: 'lazy' in props is deprecated. Move it to 'screenOptions' instead.\\n\\nSee https://reactnavigation.org/docs/drawer-navigator/#lazy for more details.`\n );\n }\n\n if (typeof openByDefault === 'boolean') {\n warnOnce(\n true,\n `Drawer Navigator: 'openByDefault' is deprecated. Use 'defaultStatus' and set it to 'open' or 'closed' instead.\\n\\nSee https://reactnavigation.org/docs/drawer-navigator/#defaultstatus for more details.`\n );\n }\n\n const defaultStatus: DrawerStatus =\n customDefaultStatus !== undefined\n ? customDefaultStatus\n : openByDefault\n ? 'open'\n : 'closed';\n\n const { state, descriptors, navigation, NavigationContent } =\n useNavigationBuilder<\n DrawerNavigationState<ParamListBase>,\n DrawerRouterOptions,\n DrawerActionHelpers<ParamListBase>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap\n >(DrawerRouter, {\n id,\n initialRouteName,\n defaultStatus,\n backBehavior,\n children,\n screenListeners,\n screenOptions,\n defaultScreenOptions,\n });\n\n return (\n <NavigationContent>\n <DrawerView\n {...rest}\n defaultStatus={defaultStatus}\n state={state}\n descriptors={descriptors}\n navigation={navigation}\n />\n </NavigationContent>\n );\n}\n\nexport default createNavigatorFactory<\n DrawerNavigationState<ParamListBase>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap,\n typeof DrawerNavigator\n>(DrawerNavigator);\n"],"mappings":";;;;;;;AAAA;;AAWA;;AACA;;AAOA;;;;;;;;;;AAWA,SAASA,eAAT,OASU;EAAA,IATe;IACvBC,EADuB;IAEvBC,gBAFuB;IAGvBC,aAAa,EAAEC,mBAHQ;IAIvBC,YAJuB;IAKvBC,QALuB;IAMvBC,eANuB;IAOvBC,aAPuB;IAQvB,GAAGC;EARoB,CASf;EACR,MAAM;IACJ;IACAC,aAFI;IAGJ;IACAC,IAJI;IAKJ;IACAC,oBANI;IAOJ,GAAGC;EAPC,IAQFJ,kBARJ;EAUA,IAAIK,oBAA6C,GAAG,EAApD;;EAEA,IAAIF,oBAAJ,EAA0B;IACxBG,MAAM,CAACC,MAAP,CAAcF,oBAAd,EAAoC;MAClCG,cAAc,EAAEL,oBAAoB,CAACK,cADH;MAElCC,UAAU,EAAEN,oBAAoB,CAACM,UAFC;MAGlCC,cAAc,EAAEP,oBAAoB,CAACQ,SAHH;MAIlCC,yBAAyB,EAAET,oBAAoB,CAACU,aAJd;MA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EAAEkC,KAHT;IAIE,WAAW,EAAEC,WAJf;IAKE,UAAU,EAAEC;EALd,GADF,CADF;AAWD;;eAEc,IAAAI,8BAAA,EAKb3C,eALa,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
1
+ {"version":3,"names":[],"sources":["types.tsx"],"sourcesContent":["import type { HeaderOptions } from '@react-navigation/elements';\nimport type {\n Descriptor,\n DrawerActionHelpers,\n DrawerNavigationState,\n NavigationHelpers,\n NavigationProp,\n ParamListBase,\n Route,\n RouteProp,\n} from '@react-navigation/native';\nimport type { StyleProp, TextStyle, ViewStyle } from 'react-native';\nimport type {\n PanGestureHandler,\n PanGestureHandlerProperties,\n} from 'react-native-gesture-handler';\n\nexport type Scene = {\n route: Route<string>;\n focused: boolean;\n color?: string;\n};\n\nexport type Layout = { width: number; height: number };\n\nexport type DrawerNavigationConfig = {\n /**\n * Function that returns React element to render as the content of the drawer, for example, navigation items.\n * Defaults to `DrawerContent`.\n */\n drawerContent?: (props: DrawerContentComponentProps) => React.ReactNode;\n /**\n * Whether inactive screens should be detached from the view hierarchy to save memory.\n * Make sure to call `enableScreens` from `react-native-screens` to make it work.\n * Defaults to `true`.\n */\n detachInactiveScreens?: boolean;\n /**\n * Whether to use the legacy implementation based on Reanimated 1.\n * The new implementation based on Reanimated 2 will perform better,\n * but you need additional configuration and need to use Hermes with Flipper to debug.\n *\n * This defaults to `true` if Reanimated 2 is not configured.\n *\n * Otherwise, it defaults to `false`\n */\n useLegacyImplementation?: boolean;\n};\n\nexport type DrawerNavigationOptions = HeaderOptions & {\n /**\n * Title text for the screen.\n */\n title?: string;\n\n /**\n * Whether this screens should render the first time it's accessed. Defaults to `true`.\n * Set it to `false` if you want to render the screen on initial render.\n */\n lazy?: boolean;\n\n /**\n * Function that returns a React Element to display as a header.\n */\n header?: (props: DrawerHeaderProps) => React.ReactNode;\n\n /**\n * Whether to show the header. Setting this to `false` hides the header.\n * Defaults to `true`.\n */\n headerShown?: boolean;\n\n /**\n * Title string of a screen displayed in the drawer\n * or a function that given { focused: boolean, color: string } returns a React.Node\n * When undefined, scene title is used.\n */\n drawerLabel?:\n | string\n | ((props: { color: string; focused: boolean }) => React.ReactNode);\n\n /**\n * A function that given { focused: boolean, color: string } returns a React.Node to display an icon the drawer.\n */\n drawerIcon?: (props: {\n color: string;\n size: number;\n focused: boolean;\n }) => React.ReactNode;\n\n /**\n * Color for the icon and label in the active item in the drawer.\n */\n drawerActiveTintColor?: string;\n\n /**\n * Background color for the active item in the drawer.\n */\n drawerActiveBackgroundColor?: string;\n\n /**\n * Color for the icon and label in the inactive items in the drawer.\n */\n drawerInactiveTintColor?: string;\n\n /**\n * Background color for the inactive items in the drawer.\n */\n drawerInactiveBackgroundColor?: string;\n\n /**\n * Whether label font should scale to respect Text Size accessibility settings.\n */\n drawerAllowFontScaling?: boolean;\n\n /**\n * Style object for the single item, which can contain an icon and/or a label.\n */\n drawerItemStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style object to apply to the `Text` inside content section which renders a label.\n */\n drawerLabelStyle?: StyleProp<TextStyle>;\n\n /**\n * Style object for the content section.\n */\n drawerContentContainerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style object for the wrapper view.\n */\n drawerContentStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style object for the drawer component.\n * You can pass a custom background color for a drawer or a custom width here.\n */\n drawerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Position of the drawer on the screen. Defaults to `left`.\n */\n drawerPosition?: 'left' | 'right';\n\n /**\n * Type of the drawer. It determines how the drawer looks and animates.\n * - `front`: Traditional drawer which covers the screen with a overlay behind it.\n * - `back`: The drawer is revealed behind the screen on swipe.\n * - `slide`: Both the screen and the drawer slide on swipe to reveal the drawer.\n * - `permanent`: A permanent drawer is shown as a sidebar.\n *\n * Defaults to `slide` on iOS and `front` on other platforms.\n */\n drawerType?: 'front' | 'back' | 'slide' | 'permanent';\n\n /**\n * Whether the statusbar should be hidden when the drawer is pulled or opens,\n */\n drawerHideStatusBarOnOpen?: boolean;\n\n /**\n * Animation of the statusbar when hiding it. use in combination with `drawerHideStatusBarOnOpen`.\n */\n drawerStatusBarAnimation?: 'slide' | 'none' | 'fade';\n\n /**\n * Color of the overlay to be displayed on top of the content view when drawer gets open.\n * The opacity is animated from `0` to `1` when the drawer opens.\n */\n overlayColor?: string;\n\n /**\n * Style object for the component wrapping the screen content.\n */\n sceneContainerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Props to pass to the underlying pan gesture handler.\n * Not supported on Web.\n */\n gestureHandlerProps?: PanGestureHandlerProperties;\n\n /**\n * Whether you can use swipe gestures to open or close the drawer.\n * Defaults to `true`.\n * Not supported on Web.\n */\n swipeEnabled?: boolean;\n\n /**\n * How far from the edge of the screen the swipe gesture should activate.\n * Not supported on Web.\n */\n swipeEdgeWidth?: number;\n\n /**\n * Minimum swipe distance threshold that should activate opening the drawer.\n */\n swipeMinDistance?: number;\n\n /**\n * Whether the keyboard should be dismissed when the swipe gesture begins.\n * Defaults to `'on-drag'`. Set to `'none'` to disable keyboard handling.\n */\n keyboardDismissMode?: 'on-drag' | 'none';\n\n /**\n * Whether this screen should be unmounted when navigating away from it.\n * Defaults to `false`.\n */\n unmountOnBlur?: boolean;\n\n /**\n * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.\n * Defaults to `true` when `enableFreeze()` is run at the top of the application.\n * Requires `react-native-screens` version >=3.16.0.\n *\n * Only supported on iOS and Android.\n */\n freezeOnBlur?: boolean;\n};\n\nexport type DrawerContentComponentProps = {\n state: DrawerNavigationState<ParamListBase>;\n navigation: DrawerNavigationHelpers;\n descriptors: DrawerDescriptorMap;\n};\n\nexport type DrawerHeaderProps = {\n /**\n * Layout of the screen.\n */\n layout: Layout;\n /**\n * Options for the current screen.\n */\n options: DrawerNavigationOptions;\n /**\n * Route object for the current screen.\n */\n route: RouteProp<ParamListBase>;\n /**\n * Navigation prop for the header.\n */\n navigation: DrawerNavigationProp<ParamListBase>;\n};\n\nexport type DrawerNavigationEventMap = {\n /**\n * Event which fires on tapping on the item in the drawer menu.\n */\n drawerItemPress: { data: undefined; canPreventDefault: true };\n};\n\nexport type DrawerNavigationHelpers = NavigationHelpers<\n ParamListBase,\n DrawerNavigationEventMap\n> &\n DrawerActionHelpers<ParamListBase>;\n\nexport type DrawerNavigationProp<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = keyof ParamList,\n NavigatorID extends string | undefined = undefined\n> = NavigationProp<\n ParamList,\n RouteName,\n NavigatorID,\n DrawerNavigationState<ParamList>,\n DrawerNavigationOptions,\n DrawerNavigationEventMap\n> &\n DrawerActionHelpers<ParamList>;\n\nexport type DrawerScreenProps<\n ParamList extends ParamListBase,\n RouteName extends keyof ParamList = keyof ParamList,\n NavigatorID extends string | undefined = undefined\n> = {\n navigation: DrawerNavigationProp<ParamList, RouteName, NavigatorID>;\n route: RouteProp<ParamList, RouteName>;\n};\n\nexport type DrawerDescriptor = Descriptor<\n DrawerNavigationOptions,\n DrawerNavigationProp<ParamListBase>,\n RouteProp<ParamListBase>\n>;\n\nexport type DrawerDescriptorMap = Record<string, DrawerDescriptor>;\n\nexport type DrawerProps = {\n dimensions: { width: number; height: number };\n drawerPosition: 'left' | 'right';\n drawerStyle?: StyleProp<ViewStyle>;\n drawerType: 'front' | 'back' | 'slide' | 'permanent';\n gestureHandlerProps?: React.ComponentProps<typeof PanGestureHandler>;\n hideStatusBarOnOpen: boolean;\n keyboardDismissMode: 'none' | 'on-drag';\n onClose: () => void;\n onOpen: () => void;\n open: boolean;\n overlayStyle?: StyleProp<ViewStyle>;\n renderDrawerContent: () => React.ReactNode;\n renderSceneContent: () => React.ReactNode;\n statusBarAnimation: 'slide' | 'none' | 'fade';\n swipeDistanceThreshold: number;\n swipeEdgeWidth: number;\n swipeEnabled: boolean;\n swipeVelocityThreshold: number;\n};\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerGestureContext.tsx"],"names":["React","createContext"],"mappings":";;;;;;;AAAA;;;;;;4BAEeA,KAAK,CAACC,aAAN,CAAiD,IAAjD,C","sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<React.RefObject<any> | null>(null);\n"]}
1
+ {"version":3,"names":["React","createContext"],"sources":["DrawerGestureContext.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<React.RefObject<any> | null>(null);\n"],"mappings":";;;;;;;AAAA;;;;;;4BAEeA,KAAK,CAACC,aAAN,CAAiD,IAAjD,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerPositionContext.tsx"],"names":["React","createContext","undefined"],"mappings":";;;;;;;AAAA;;;;;;4BAEeA,KAAK,CAACC,aAAN,CAAkDC,SAAlD,C","sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<'left' | 'right' | undefined>(undefined);\n"]}
1
+ {"version":3,"names":["React","createContext","undefined"],"sources":["DrawerPositionContext.tsx"],"sourcesContent":["import * as React from 'react';\n\nexport default React.createContext<'left' | 'right' | undefined>(undefined);\n"],"mappings":";;;;;;;AAAA;;;;;;4BAEeA,KAAK,CAACC,aAAN,CAAkDC,SAAlD,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerProgressContext.tsx"],"names":["React","createContext","undefined"],"mappings":";;;;;;;AAAA;;;;;;4BAGeA,KAAK,CAACC,aAAN,CAEbC,SAFa,C","sourcesContent":["import * as React from 'react';\nimport type Animated from 'react-native-reanimated';\n\nexport default React.createContext<\n Readonly<Animated.SharedValue<number>> | Animated.Node<number> | undefined\n>(undefined);\n"]}
1
+ {"version":3,"names":["React","createContext","undefined"],"sources":["DrawerProgressContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport type Animated from 'react-native-reanimated';\n\nexport default React.createContext<\n Readonly<Animated.SharedValue<number>> | Animated.Node<number> | undefined\n>(undefined);\n"],"mappings":";;;;;;;AAAA;;;;;;4BAGeA,KAAK,CAACC,aAAN,CAEbC,SAFa,C"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerStatusContext.tsx"],"names":["DrawerStatusContext","React","createContext","undefined"],"mappings":";;;;;;;AACA;;;;;;AAEA,MAAMA,mBAAmB,gBAAGC,KAAK,CAACC,aAAN,CAC1BC,SAD0B,CAA5B;eAIeH,mB","sourcesContent":["import type { DrawerStatus } from '@react-navigation/native';\nimport * as React from 'react';\n\nconst DrawerStatusContext = React.createContext<DrawerStatus | undefined>(\n undefined\n);\n\nexport default DrawerStatusContext;\n"]}
1
+ {"version":3,"names":["DrawerStatusContext","React","createContext","undefined"],"sources":["DrawerStatusContext.tsx"],"sourcesContent":["import type { DrawerStatus } from '@react-navigation/native';\nimport * as React from 'react';\n\nconst DrawerStatusContext = React.createContext<DrawerStatus | undefined>(\n undefined\n);\n\nexport default DrawerStatusContext;\n"],"mappings":";;;;;;;AACA;;;;;;AAEA,MAAMA,mBAAmB,gBAAGC,KAAK,CAACC,aAAN,CAC1BC,SAD0B,CAA5B;eAIeH,mB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["getDrawerStatusFromState.tsx"],"names":["getDrawerStatusFromState","state","history","Error","entry","find","it","type","status","default"],"mappings":";;;;;;;AAMe,SAASA,wBAAT,CACbC,KADa,EAEC;AAAA;;AACd,MAAIA,KAAK,CAACC,OAAN,IAAiB,IAArB,EAA2B;AACzB,UAAM,IAAIC,KAAJ,CACJ,sGADI,CAAN;AAGD;;AAED,QAAMC,KAAK,GAAGH,KAAK,CAACC,OAAN,CAAcG,IAAd,CAAoBC,EAAD,IAAQA,EAAE,CAACC,IAAH,KAAY,QAAvC,CAAd;AAIA,kCAAOH,KAAP,aAAOA,KAAP,uBAAOA,KAAK,CAAEI,MAAd,yDAAwBP,KAAK,CAACQ,OAA9B,uCAAyC,QAAzC;AACD","sourcesContent":["import type {\n DrawerNavigationState,\n DrawerStatus,\n ParamListBase,\n} from '@react-navigation/native';\n\nexport default function getDrawerStatusFromState(\n state: DrawerNavigationState<ParamListBase>\n): DrawerStatus {\n if (state.history == null) {\n throw new Error(\n \"Couldn't find the drawer status in the state object. Is it a valid state object of drawer navigator?\"\n );\n }\n\n const entry = state.history.find((it) => it.type === 'drawer') as\n | { type: 'drawer'; status: DrawerStatus }\n | undefined;\n\n return entry?.status ?? state.default ?? 'closed';\n}\n"]}
1
+ {"version":3,"names":["getDrawerStatusFromState","state","history","Error","entry","find","it","type","status","default"],"sources":["getDrawerStatusFromState.tsx"],"sourcesContent":["import type {\n DrawerNavigationState,\n DrawerStatus,\n ParamListBase,\n} from '@react-navigation/native';\n\nexport default function getDrawerStatusFromState(\n state: DrawerNavigationState<ParamListBase>\n): DrawerStatus {\n if (state.history == null) {\n throw new Error(\n \"Couldn't find the drawer status in the state object. Is it a valid state object of drawer navigator?\"\n );\n }\n\n const entry = state.history.find((it) => it.type === 'drawer') as\n | { type: 'drawer'; status: DrawerStatus }\n | undefined;\n\n return entry?.status ?? state.default ?? 'closed';\n}\n"],"mappings":";;;;;;;AAMe,SAASA,wBAAT,CACbC,KADa,EAEC;EAAA;;EACd,IAAIA,KAAK,CAACC,OAAN,IAAiB,IAArB,EAA2B;IACzB,MAAM,IAAIC,KAAJ,CACJ,sGADI,CAAN;EAGD;;EAED,MAAMC,KAAK,GAAGH,KAAK,CAACC,OAAN,CAAcG,IAAd,CAAoBC,EAAD,IAAQA,EAAE,CAACC,IAAH,KAAY,QAAvC,CAAd;EAIA,gCAAOH,KAAP,aAAOA,KAAP,uBAAOA,KAAK,CAAEI,MAAd,yDAAwBP,KAAK,CAACQ,OAA9B,uCAAyC,QAAzC;AACD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerProgress.tsx"],"names":["useDrawerProgress","progress","React","useContext","DrawerProgressContext","undefined","Error"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;;;AAEe,SAASA,iBAAT,GAEW;AACxB,QAAMC,QAAQ,GAAGC,KAAK,CAACC,UAAN,CAAiBC,8BAAjB,CAAjB;;AAEA,MAAIH,QAAQ,KAAKI,SAAjB,EAA4B;AAC1B,UAAM,IAAIC,KAAJ,CACJ,sEADI,CAAN;AAGD;;AAED,SAAOL,QAAP;AACD","sourcesContent":["import * as React from 'react';\nimport type Animated from 'react-native-reanimated';\n\nimport DrawerProgressContext from './DrawerProgressContext';\n\nexport default function useDrawerProgress():\n | Readonly<Animated.SharedValue<number>>\n | Animated.Node<number> {\n const progress = React.useContext(DrawerProgressContext);\n\n if (progress === undefined) {\n throw new Error(\n \"Couldn't find a drawer. Is your component inside a drawer navigator?\"\n );\n }\n\n return progress;\n}\n"]}
1
+ {"version":3,"names":["useDrawerProgress","progress","React","useContext","DrawerProgressContext","undefined","Error"],"sources":["useDrawerProgress.tsx"],"sourcesContent":["import * as React from 'react';\nimport type Animated from 'react-native-reanimated';\n\nimport DrawerProgressContext from './DrawerProgressContext';\n\nexport default function useDrawerProgress():\n | Readonly<Animated.SharedValue<number>>\n | Animated.Node<number> {\n const progress = React.useContext(DrawerProgressContext);\n\n if (progress === undefined) {\n throw new Error(\n \"Couldn't find a drawer. Is your component inside a drawer navigator?\"\n );\n }\n\n return progress;\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;;;;;;;AAEe,SAASA,iBAAT,GAEW;EACxB,MAAMC,QAAQ,GAAGC,KAAK,CAACC,UAAN,CAAiBC,8BAAjB,CAAjB;;EAEA,IAAIH,QAAQ,KAAKI,SAAjB,EAA4B;IAC1B,MAAM,IAAIC,KAAJ,CACJ,sEADI,CAAN;EAGD;;EAED,OAAOL,QAAP;AACD"}
@@ -1 +1 @@
1
- {"version":3,"sources":["useDrawerStatus.tsx"],"names":["useDrawerStatus","drawerStatus","React","useContext","DrawerStatusContext","undefined","Error"],"mappings":";;;;;;;AACA;;AAEA;;;;;;;;AAEA;AACA;AACA;AACA;AACe,SAASA,eAAT,GAAyC;AACtD,QAAMC,YAAY,GAAGC,KAAK,CAACC,UAAN,CAAiBC,4BAAjB,CAArB;;AAEA,MAAIH,YAAY,KAAKI,SAArB,EAAgC;AAC9B,UAAM,IAAIC,KAAJ,CACJ,sEADI,CAAN;AAGD;;AAED,SAAOL,YAAP;AACD","sourcesContent":["import type { DrawerStatus } from '@react-navigation/native';\nimport * as React from 'react';\n\nimport DrawerStatusContext from './DrawerStatusContext';\n\n/**\n * Hook to detect if the drawer's status in a parent navigator.\n * Returns 'open' if the drawer is open, 'closed' if the drawer is closed.\n */\nexport default function useDrawerStatus(): DrawerStatus {\n const drawerStatus = React.useContext(DrawerStatusContext);\n\n if (drawerStatus === undefined) {\n throw new Error(\n \"Couldn't find a drawer. Is your component inside a drawer navigator?\"\n );\n }\n\n return drawerStatus;\n}\n"]}
1
+ {"version":3,"names":["useDrawerStatus","drawerStatus","React","useContext","DrawerStatusContext","undefined","Error"],"sources":["useDrawerStatus.tsx"],"sourcesContent":["import type { DrawerStatus } from '@react-navigation/native';\nimport * as React from 'react';\n\nimport DrawerStatusContext from './DrawerStatusContext';\n\n/**\n * Hook to detect if the drawer's status in a parent navigator.\n * Returns 'open' if the drawer is open, 'closed' if the drawer is closed.\n */\nexport default function useDrawerStatus(): DrawerStatus {\n const drawerStatus = React.useContext(DrawerStatusContext);\n\n if (drawerStatus === undefined) {\n throw new Error(\n \"Couldn't find a drawer. Is your component inside a drawer navigator?\"\n );\n }\n\n return drawerStatus;\n}\n"],"mappings":";;;;;;;AACA;;AAEA;;;;;;;;AAEA;AACA;AACA;AACA;AACe,SAASA,eAAT,GAAyC;EACtD,MAAMC,YAAY,GAAGC,KAAK,CAACC,UAAN,CAAiBC,4BAAjB,CAArB;;EAEA,IAAIH,YAAY,KAAKI,SAArB,EAAgC;IAC9B,MAAM,IAAIC,KAAJ,CACJ,sEADI,CAAN;EAGD;;EAED,OAAOL,YAAP;AACD"}
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
19
 
20
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
21
 
22
22
  function DrawerContent(_ref) {
23
23
  let {
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerContent.tsx"],"names":["DrawerContent","descriptors","state","rest","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerContentStyle","drawerContentContainerStyle"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;;;;;;;;;AAEe,SAASA,aAAT,OAIiB;AAAA,MAJM;AACpCC,IAAAA,WADoC;AAEpCC,IAAAA,KAFoC;AAGpC,OAAGC;AAHiC,GAIN;AAC9B,QAAMC,YAAY,GAAGF,KAAK,CAACG,MAAN,CAAaH,KAAK,CAACI,KAAnB,CAArB;AACA,QAAMC,iBAAiB,GAAGN,WAAW,CAACG,YAAY,CAACI,GAAd,CAArC;AACA,QAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAzC;AAEA,QAAM;AAAEC,IAAAA,kBAAF;AAAsBC,IAAAA;AAAtB,MAAsDH,cAA5D;AAEA,sBACE,oBAAC,gCAAD,eACMN,IADN;AAEE,IAAA,qBAAqB,EAAES,2BAFzB;AAGE,IAAA,KAAK,EAAED;AAHT,mBAKE,oBAAC,uBAAD;AAAgB,IAAA,WAAW,EAAEV,WAA7B;AAA0C,IAAA,KAAK,EAAEC;AAAjD,KAA4DC,IAA5D,EALF,CADF;AASD","sourcesContent":["import * as React from 'react';\n\nimport type { DrawerContentComponentProps } from '../types';\nimport DrawerContentScrollView from './DrawerContentScrollView';\nimport DrawerItemList from './DrawerItemList';\n\nexport default function DrawerContent({\n descriptors,\n state,\n ...rest\n}: DrawerContentComponentProps) {\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor.options;\n\n const { drawerContentStyle, drawerContentContainerStyle } = focusedOptions;\n\n return (\n <DrawerContentScrollView\n {...rest}\n contentContainerStyle={drawerContentContainerStyle}\n style={drawerContentStyle}\n >\n <DrawerItemList descriptors={descriptors} state={state} {...rest} />\n </DrawerContentScrollView>\n );\n}\n"]}
1
+ {"version":3,"names":["DrawerContent","descriptors","state","rest","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerContentStyle","drawerContentContainerStyle"],"sources":["DrawerContent.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport type { DrawerContentComponentProps } from '../types';\nimport DrawerContentScrollView from './DrawerContentScrollView';\nimport DrawerItemList from './DrawerItemList';\n\nexport default function DrawerContent({\n descriptors,\n state,\n ...rest\n}: DrawerContentComponentProps) {\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor.options;\n\n const { drawerContentStyle, drawerContentContainerStyle } = focusedOptions;\n\n return (\n <DrawerContentScrollView\n {...rest}\n contentContainerStyle={drawerContentContainerStyle}\n style={drawerContentStyle}\n >\n <DrawerItemList descriptors={descriptors} state={state} {...rest} />\n </DrawerContentScrollView>\n );\n}\n"],"mappings":";;;;;;;AAAA;;AAGA;;AACA;;;;;;;;;;AAEe,SAASA,aAAT,OAIiB;EAAA,IAJM;IACpCC,WADoC;IAEpCC,KAFoC;IAGpC,GAAGC;EAHiC,CAIN;EAC9B,MAAMC,YAAY,GAAGF,KAAK,CAACG,MAAN,CAAaH,KAAK,CAACI,KAAnB,CAArB;EACA,MAAMC,iBAAiB,GAAGN,WAAW,CAACG,YAAY,CAACI,GAAd,CAArC;EACA,MAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAzC;EAEA,MAAM;IAAEC,kBAAF;IAAsBC;EAAtB,IAAsDH,cAA5D;EAEA,oBACE,oBAAC,gCAAD,eACMN,IADN;IAEE,qBAAqB,EAAES,2BAFzB;IAGE,KAAK,EAAED;EAHT,iBAKE,oBAAC,uBAAD;IAAgB,WAAW,EAAEV,WAA7B;IAA0C,KAAK,EAAEC;EAAjD,GAA4DC,IAA5D,EALF,CADF;AASD"}
@@ -19,7 +19,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
19
19
 
20
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
21
 
22
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
22
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
23
23
 
24
24
  function DrawerContentScrollView(_ref, ref) {
25
25
  let {
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerContentScrollView.tsx"],"names":["DrawerContentScrollView","ref","contentContainerStyle","style","children","rest","drawerPosition","React","useContext","DrawerPositionContext","insets","isRight","I18nManager","getConstants","isRTL","paddingTop","top","paddingStart","left","paddingEnd","right","styles","container","forwardRef","StyleSheet","create","flex"],"mappings":";;;;;;;AAAA;;AACA;;AAMA;;AAEA;;;;;;;;;;AAMA,SAASA,uBAAT,OAEEC,GAFF,EAGE;AAAA,MAFA;AAAEC,IAAAA,qBAAF;AAAyBC,IAAAA,KAAzB;AAAgCC,IAAAA,QAAhC;AAA0C,OAAGC;AAA7C,GAEA;AACA,QAAMC,cAAc,GAAGC,KAAK,CAACC,UAAN,CAAiBC,8BAAjB,CAAvB;AACA,QAAMC,MAAM,GAAG,oDAAf;AAEA,QAAMC,OAAO,GAAGC,yBAAYC,YAAZ,GAA2BC,KAA3B,GACZR,cAAc,KAAK,MADP,GAEZA,cAAc,KAAK,OAFvB;AAIA,sBACE,oBAAC,uBAAD,eACMD,IADN;AAEE,IAAA,GAAG,EAAEJ,GAFP;AAGE,IAAA,qBAAqB,EAAE,CACrB;AACEc,MAAAA,UAAU,EAAEL,MAAM,CAACM,GAAP,GAAa,CAD3B;AAEEC,MAAAA,YAAY,EAAE,CAACN,OAAD,GAAWD,MAAM,CAACQ,IAAlB,GAAyB,CAFzC;AAGEC,MAAAA,UAAU,EAAER,OAAO,GAAGD,MAAM,CAACU,KAAV,GAAkB;AAHvC,KADqB,EAMrBlB,qBANqB,CAHzB;AAWE,IAAA,KAAK,EAAE,CAACmB,MAAM,CAACC,SAAR,EAAmBnB,KAAnB;AAXT,MAaGC,QAbH,CADF;AAiBD;;4BAEcG,KAAK,CAACgB,UAAN,CAAiBvB,uBAAjB,C;;;;AAEf,MAAMqB,MAAM,GAAGG,wBAAWC,MAAX,CAAkB;AAC/BH,EAAAA,SAAS,EAAE;AACTI,IAAAA,IAAI,EAAE;AADG;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport {\n I18nManager,\n ScrollView,\n ScrollViewProps,\n StyleSheet,\n} from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport DrawerPositionContext from '../utils/DrawerPositionContext';\n\ntype Props = ScrollViewProps & {\n children: React.ReactNode;\n};\n\nfunction DrawerContentScrollView(\n { contentContainerStyle, style, children, ...rest }: Props,\n ref?: React.Ref<ScrollView>\n) {\n const drawerPosition = React.useContext(DrawerPositionContext);\n const insets = useSafeAreaInsets();\n\n const isRight = I18nManager.getConstants().isRTL\n ? drawerPosition === 'left'\n : drawerPosition === 'right';\n\n return (\n <ScrollView\n {...rest}\n ref={ref}\n contentContainerStyle={[\n {\n paddingTop: insets.top + 4,\n paddingStart: !isRight ? insets.left : 0,\n paddingEnd: isRight ? insets.right : 0,\n },\n contentContainerStyle,\n ]}\n style={[styles.container, style]}\n >\n {children}\n </ScrollView>\n );\n}\n\nexport default React.forwardRef(DrawerContentScrollView);\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"]}
1
+ {"version":3,"names":["DrawerContentScrollView","ref","contentContainerStyle","style","children","rest","drawerPosition","React","useContext","DrawerPositionContext","insets","useSafeAreaInsets","isRight","I18nManager","getConstants","isRTL","paddingTop","top","paddingStart","left","paddingEnd","right","styles","container","forwardRef","StyleSheet","create","flex"],"sources":["DrawerContentScrollView.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n I18nManager,\n ScrollView,\n ScrollViewProps,\n StyleSheet,\n} from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport DrawerPositionContext from '../utils/DrawerPositionContext';\n\ntype Props = ScrollViewProps & {\n children: React.ReactNode;\n};\n\nfunction DrawerContentScrollView(\n { contentContainerStyle, style, children, ...rest }: Props,\n ref?: React.Ref<ScrollView>\n) {\n const drawerPosition = React.useContext(DrawerPositionContext);\n const insets = useSafeAreaInsets();\n\n const isRight = I18nManager.getConstants().isRTL\n ? drawerPosition === 'left'\n : drawerPosition === 'right';\n\n return (\n <ScrollView\n {...rest}\n ref={ref}\n contentContainerStyle={[\n {\n paddingTop: insets.top + 4,\n paddingStart: !isRight ? insets.left : 0,\n paddingEnd: isRight ? insets.right : 0,\n },\n contentContainerStyle,\n ]}\n style={[styles.container, style]}\n >\n {children}\n </ScrollView>\n );\n}\n\nexport default React.forwardRef(DrawerContentScrollView);\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAMA;;AAEA;;;;;;;;;;AAMA,SAASA,uBAAT,OAEEC,GAFF,EAGE;EAAA,IAFA;IAAEC,qBAAF;IAAyBC,KAAzB;IAAgCC,QAAhC;IAA0C,GAAGC;EAA7C,CAEA;EACA,MAAMC,cAAc,GAAGC,KAAK,CAACC,UAAN,CAAiBC,8BAAjB,CAAvB;EACA,MAAMC,MAAM,GAAG,IAAAC,6CAAA,GAAf;EAEA,MAAMC,OAAO,GAAGC,wBAAA,CAAYC,YAAZ,GAA2BC,KAA3B,GACZT,cAAc,KAAK,MADP,GAEZA,cAAc,KAAK,OAFvB;EAIA,oBACE,oBAAC,uBAAD,eACMD,IADN;IAEE,GAAG,EAAEJ,GAFP;IAGE,qBAAqB,EAAE,CACrB;MACEe,UAAU,EAAEN,MAAM,CAACO,GAAP,GAAa,CAD3B;MAEEC,YAAY,EAAE,CAACN,OAAD,GAAWF,MAAM,CAACS,IAAlB,GAAyB,CAFzC;MAGEC,UAAU,EAAER,OAAO,GAAGF,MAAM,CAACW,KAAV,GAAkB;IAHvC,CADqB,EAMrBnB,qBANqB,CAHzB;IAWE,KAAK,EAAE,CAACoB,MAAM,CAACC,SAAR,EAAmBpB,KAAnB;EAXT,IAaGC,QAbH,CADF;AAiBD;;4BAEcG,KAAK,CAACiB,UAAN,CAAiBxB,uBAAjB,C;;;;AAEf,MAAMsB,MAAM,GAAGG,uBAAA,CAAWC,MAAX,CAAkB;EAC/BH,SAAS,EAAE;IACTI,IAAI,EAAE;EADG;AADoB,CAAlB,CAAf"}
@@ -21,7 +21,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
24
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
24
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
25
 
26
26
  const LinkPressable = _ref => {
27
27
  let {
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerItem.tsx"],"names":["LinkPressable","children","style","onPress","onLongPress","onPressIn","onPressOut","to","accessibilityRole","rest","Platform","OS","styles","button","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","undefined","DrawerItem","props","colors","icon","label","labelStyle","focused","allowFontScaling","activeTintColor","primary","inactiveTintColor","text","alpha","rgb","string","activeBackgroundColor","inactiveBackgroundColor","pressColor","pressOpacity","borderRadius","StyleSheet","flatten","color","backgroundColor","iconNode","size","container","wrapper","selected","marginLeft","marginVertical","fontWeight","create","marginHorizontal","overflow","flexDirection","alignItems","padding","marginRight","flex","display"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAiFA,MAAMA,aAAa,GAAG,QAgBhB;AAAA,MAhBiB;AACrBC,IAAAA,QAD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EAAE,KADR;AAEPC,IAAAA,UAAU,EAAE,QAFL;AAGPC,IAAAA,OAAO,EAAE;AAHF,GANsB;AAW/BjC,EAAAA,KAAK,EAAE;AACLkC,IAAAA,WAAW,EAAE,EADR;AAELC,IAAAA,IAAI,EAAE;AAFD,GAXwB;AAe/B/C,EAAAA,MAAM,EAAE;AACNgD,IAAAA,OAAO,EAAE;AADH;AAfuB,CAAlB,CAAf","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements';\nimport { Link, useTheme } from '@react-navigation/native';\nimport Color from 'color';\nimport * as React from 'react';\nimport {\n Platform,\n StyleProp,\n StyleSheet,\n Text,\n TextStyle,\n View,\n ViewStyle,\n} from 'react-native';\n\ntype Props = {\n /**\n * The label text of the item.\n */\n label:\n | string\n | ((props: { focused: boolean; color: string }) => React.ReactNode);\n /**\n * Icon to display for the `DrawerItem`.\n */\n icon?: (props: {\n focused: boolean;\n size: number;\n color: string;\n }) => React.ReactNode;\n /**\n * URL to use for the link to the tab.\n */\n to?: string;\n /**\n * Whether to highlight the drawer item as active.\n */\n focused?: boolean;\n /**\n * Function to execute on press.\n */\n onPress: () => void;\n /**\n * Color for the icon and label when the item is active.\n */\n activeTintColor?: string;\n /**\n * Color for the icon and label when the item is inactive.\n */\n inactiveTintColor?: string;\n /**\n * Background color for item when its active.\n */\n activeBackgroundColor?: string;\n /**\n * Background color for item when its inactive.\n */\n inactiveBackgroundColor?: string;\n /**\n * Color of the touchable effect on press.\n * Only supported on Android.\n *\n * @platform android\n */\n pressColor?: string;\n /**\n * Opacity of the touchable effect on press.\n * Only supported on iOS.\n *\n * @platform ios\n */\n pressOpacity?: number;\n /**\n * Style object for the label element.\n */\n labelStyle?: StyleProp<TextStyle>;\n /**\n * Style object for the wrapper element.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Whether label font should scale to respect Text Size accessibility settings.\n */\n allowFontScaling?: boolean;\n};\n\nconst LinkPressable = ({\n children,\n style,\n onPress,\n onLongPress,\n onPressIn,\n onPressOut,\n to,\n accessibilityRole,\n ...rest\n}: Omit<React.ComponentProps<typeof PlatformPressable>, 'style'> & {\n style: StyleProp<ViewStyle>;\n} & {\n to?: string;\n children: React.ReactNode;\n onPress?: () => void;\n}) => {\n if (Platform.OS === 'web' && to) {\n // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.\n // We need to use `onClick` to be able to prevent default browser handling of links.\n return (\n <Link\n {...rest}\n to={to}\n style={[styles.button, style]}\n onPress={(e: any) => {\n if (\n !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys\n (e.button == null || e.button === 0) // ignore everything but left clicks\n ) {\n e.preventDefault();\n onPress?.(e);\n }\n }}\n // types for PressableProps and TextProps are incompatible with each other by `null` so we\n // can't use {...rest} for these 3 props\n onLongPress={onLongPress ?? undefined}\n onPressIn={onPressIn ?? undefined}\n onPressOut={onPressOut ?? undefined}\n >\n {children}\n </Link>\n );\n } else {\n return (\n <PlatformPressable\n {...rest}\n accessibilityRole={accessibilityRole}\n onPress={onPress}\n >\n <View style={style}>{children}</View>\n </PlatformPressable>\n );\n }\n};\n\n/**\n * A component used to show an action item with an icon and a label in a navigation drawer.\n */\nexport default function DrawerItem(props: Props) {\n const { colors } = useTheme();\n\n const {\n icon,\n label,\n labelStyle,\n to,\n focused = false,\n allowFontScaling,\n activeTintColor = colors.primary,\n inactiveTintColor = Color(colors.text).alpha(0.68).rgb().string(),\n activeBackgroundColor = Color(activeTintColor).alpha(0.12).rgb().string(),\n inactiveBackgroundColor = 'transparent',\n style,\n onPress,\n pressColor,\n pressOpacity,\n ...rest\n } = props;\n\n const { borderRadius = 4 } = StyleSheet.flatten(style || {});\n const color = focused ? activeTintColor : inactiveTintColor;\n const backgroundColor = focused\n ? activeBackgroundColor\n : inactiveBackgroundColor;\n\n const iconNode = icon ? icon({ size: 24, focused, color }) : null;\n\n return (\n <View\n collapsable={false}\n {...rest}\n style={[styles.container, { borderRadius, backgroundColor }, style]}\n >\n <LinkPressable\n onPress={onPress}\n style={[styles.wrapper, { borderRadius }]}\n accessibilityRole=\"button\"\n accessibilityState={{ selected: focused }}\n pressColor={pressColor}\n pressOpacity={pressOpacity}\n to={to}\n >\n <React.Fragment>\n {iconNode}\n <View\n style={[\n styles.label,\n { marginLeft: iconNode ? 32 : 0, marginVertical: 5 },\n ]}\n >\n {typeof label === 'string' ? (\n <Text\n numberOfLines={1}\n allowFontScaling={allowFontScaling}\n style={[\n {\n color,\n fontWeight: '500',\n },\n labelStyle,\n ]}\n >\n {label}\n </Text>\n ) : (\n label({ color, focused })\n )}\n </View>\n </React.Fragment>\n </LinkPressable>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n marginHorizontal: 10,\n marginVertical: 4,\n overflow: 'hidden',\n },\n wrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n padding: 8,\n },\n label: {\n marginRight: 32,\n flex: 1,\n },\n button: {\n display: 'flex',\n },\n});\n"]}
1
+ {"version":3,"names":["LinkPressable","children","style","onPress","onLongPress","onPressIn","onPressOut","to","accessibilityRole","rest","Platform","OS","styles","button","e","metaKey","altKey","ctrlKey","shiftKey","preventDefault","undefined","DrawerItem","props","colors","useTheme","icon","label","labelStyle","focused","allowFontScaling","activeTintColor","primary","inactiveTintColor","Color","text","alpha","rgb","string","activeBackgroundColor","inactiveBackgroundColor","pressColor","pressOpacity","borderRadius","StyleSheet","flatten","color","backgroundColor","iconNode","size","container","wrapper","selected","marginLeft","marginVertical","fontWeight","create","marginHorizontal","overflow","flexDirection","alignItems","padding","marginRight","flex","display"],"sources":["DrawerItem.tsx"],"sourcesContent":["import { PlatformPressable } from '@react-navigation/elements';\nimport { Link, useTheme } from '@react-navigation/native';\nimport Color from 'color';\nimport * as React from 'react';\nimport {\n Platform,\n StyleProp,\n StyleSheet,\n Text,\n TextStyle,\n View,\n ViewStyle,\n} from 'react-native';\n\ntype Props = {\n /**\n * The label text of the item.\n */\n label:\n | string\n | ((props: { focused: boolean; color: string }) => React.ReactNode);\n /**\n * Icon to display for the `DrawerItem`.\n */\n icon?: (props: {\n focused: boolean;\n size: number;\n color: string;\n }) => React.ReactNode;\n /**\n * URL to use for the link to the tab.\n */\n to?: string;\n /**\n * Whether to highlight the drawer item as active.\n */\n focused?: boolean;\n /**\n * Function to execute on press.\n */\n onPress: () => void;\n /**\n * Color for the icon and label when the item is active.\n */\n activeTintColor?: string;\n /**\n * Color for the icon and label when the item is inactive.\n */\n inactiveTintColor?: string;\n /**\n * Background color for item when its active.\n */\n activeBackgroundColor?: string;\n /**\n * Background color for item when its inactive.\n */\n inactiveBackgroundColor?: string;\n /**\n * Color of the touchable effect on press.\n * Only supported on Android.\n *\n * @platform android\n */\n pressColor?: string;\n /**\n * Opacity of the touchable effect on press.\n * Only supported on iOS.\n *\n * @platform ios\n */\n pressOpacity?: number;\n /**\n * Style object for the label element.\n */\n labelStyle?: StyleProp<TextStyle>;\n /**\n * Style object for the wrapper element.\n */\n style?: StyleProp<ViewStyle>;\n /**\n * Whether label font should scale to respect Text Size accessibility settings.\n */\n allowFontScaling?: boolean;\n};\n\nconst LinkPressable = ({\n children,\n style,\n onPress,\n onLongPress,\n onPressIn,\n onPressOut,\n to,\n accessibilityRole,\n ...rest\n}: Omit<React.ComponentProps<typeof PlatformPressable>, 'style'> & {\n style: StyleProp<ViewStyle>;\n} & {\n to?: string;\n children: React.ReactNode;\n onPress?: () => void;\n}) => {\n if (Platform.OS === 'web' && to) {\n // React Native Web doesn't forward `onClick` if we use `TouchableWithoutFeedback`.\n // We need to use `onClick` to be able to prevent default browser handling of links.\n return (\n <Link\n {...rest}\n to={to}\n style={[styles.button, style]}\n onPress={(e: any) => {\n if (\n !(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && // ignore clicks with modifier keys\n (e.button == null || e.button === 0) // ignore everything but left clicks\n ) {\n e.preventDefault();\n onPress?.(e);\n }\n }}\n // types for PressableProps and TextProps are incompatible with each other by `null` so we\n // can't use {...rest} for these 3 props\n onLongPress={onLongPress ?? undefined}\n onPressIn={onPressIn ?? undefined}\n onPressOut={onPressOut ?? undefined}\n >\n {children}\n </Link>\n );\n } else {\n return (\n <PlatformPressable\n {...rest}\n accessibilityRole={accessibilityRole}\n onPress={onPress}\n >\n <View style={style}>{children}</View>\n </PlatformPressable>\n );\n }\n};\n\n/**\n * A component used to show an action item with an icon and a label in a navigation drawer.\n */\nexport default function DrawerItem(props: Props) {\n const { colors } = useTheme();\n\n const {\n icon,\n label,\n labelStyle,\n to,\n focused = false,\n allowFontScaling,\n activeTintColor = colors.primary,\n inactiveTintColor = Color(colors.text).alpha(0.68).rgb().string(),\n activeBackgroundColor = Color(activeTintColor).alpha(0.12).rgb().string(),\n inactiveBackgroundColor = 'transparent',\n style,\n onPress,\n pressColor,\n pressOpacity,\n ...rest\n } = props;\n\n const { borderRadius = 4 } = StyleSheet.flatten(style || {});\n const color = focused ? activeTintColor : inactiveTintColor;\n const backgroundColor = focused\n ? activeBackgroundColor\n : inactiveBackgroundColor;\n\n const iconNode = icon ? icon({ size: 24, focused, color }) : null;\n\n return (\n <View\n collapsable={false}\n {...rest}\n style={[styles.container, { borderRadius, backgroundColor }, style]}\n >\n <LinkPressable\n onPress={onPress}\n style={[styles.wrapper, { borderRadius }]}\n accessibilityRole=\"button\"\n accessibilityState={{ selected: focused }}\n pressColor={pressColor}\n pressOpacity={pressOpacity}\n to={to}\n >\n <React.Fragment>\n {iconNode}\n <View\n style={[\n styles.label,\n { marginLeft: iconNode ? 32 : 0, marginVertical: 5 },\n ]}\n >\n {typeof label === 'string' ? (\n <Text\n numberOfLines={1}\n allowFontScaling={allowFontScaling}\n style={[\n {\n color,\n fontWeight: '500',\n },\n labelStyle,\n ]}\n >\n {label}\n </Text>\n ) : (\n label({ color, focused })\n )}\n </View>\n </React.Fragment>\n </LinkPressable>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n marginHorizontal: 10,\n marginVertical: 4,\n overflow: 'hidden',\n },\n wrapper: {\n flexDirection: 'row',\n alignItems: 'center',\n padding: 8,\n },\n label: {\n marginRight: 32,\n flex: 1,\n },\n button: {\n display: 'flex',\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAiFA,MAAMA,aAAa,GAAG,QAgBhB;EAAA,IAhBiB;IACrBC,QADqB;IAErBC,KAFqB;IAGrBC,OAHqB;IAIrBC,WAJqB;IAKrBC,SALqB;IAMrBC,UANqB;IAOrBC,EAPqB;IAQrBC,iBARqB;IASrB,GAAGC;EATkB,CAgBjB;;EACJ,IAAIC,qBAAA,CAASC,EAAT,KAAgB,KAAhB,IAAyBJ,EAA7B,EAAiC;IAC/B;IACA;IACA,oBACE,oBAAC,YAAD,eACME,IADN;MAEE,EAAE,EAAEF,EAFN;MAGE,KAAK,EAAE,CAACK,MAAM,CAACC,MAAR,EAAgBX,KAAhB,CAHT;MAIE,OAAO,EAAGY,CAAD,IAAY;QACnB,IACE,EAAEA,CAAC,CAACC,OAAF,IAAaD,CAAC,CAACE,MAAf,IAAyBF,CAAC,CAACG,OAA3B,IAAsCH,CAAC,CAACI,QAA1C,OAAuD;QACtDJ,CAAC,CAACD,MAAF,IAAY,IAAZ,IAAoBC,CAAC,CAACD,MAAF,KAAa,CADlC,CADF,CAEuC;QAFvC,EAGE;UACAC,CAAC,CAACK,cAAF;UACAhB,OAAO,SAAP,IAAAA,OAAO,WAAP,YAAAA,OAAO,CAAGW,CAAH,CAAP;QACD;MACF,CAZH,CAaE;MACA;MAdF;MAeE,WAAW,EAAEV,WAAF,aAAEA,WAAF,cAAEA,WAAF,GAAiBgB,SAf9B;MAgBE,SAAS,EAAEf,SAAF,aAAEA,SAAF,cAAEA,SAAF,GAAee,SAhB1B;MAiBE,UAAU,EAAEd,UAAF,aAAEA,UAAF,cAAEA,UAAF,GAAgBc;IAjB5B,IAmBGnB,QAnBH,CADF;EAuBD,CA1BD,MA0BO;IACL,oBACE,oBAAC,2BAAD,eACMQ,IADN;MAEE,iBAAiB,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AAlB,CAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerItemList.tsx"],"names":["DrawerItemList","state","navigation","descriptors","buildLink","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerActiveTintColor","drawerInactiveTintColor","drawerActiveBackgroundColor","drawerInactiveBackgroundColor","map","route","i","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","DrawerActions","closeDrawer","CommonActions","navigate","name","merge","title","drawerLabel","drawerIcon","drawerLabelStyle","drawerItemStyle","drawerAllowFontScaling","undefined","params"],"mappings":";;;;;;;AAAA;;AAOA;;AAGA;;;;;;;;AAQA;AACA;AACA;AACe,SAASA,cAAT,OAIL;AAAA,MAJ6B;AACrCC,IAAAA,KADqC;AAErCC,IAAAA,UAFqC;AAGrCC,IAAAA;AAHqC,GAI7B;AACR,QAAMC,SAAS,GAAG,6BAAlB;AAEA,QAAMC,YAAY,GAAGJ,KAAK,CAACK,MAAN,CAAaL,KAAK,CAACM,KAAnB,CAArB;AACA,QAAMC,iBAAiB,GAAGL,WAAW,CAACE,YAAY,CAACI,GAAd,CAArC;AACA,QAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAzC;AAEA,QAAM;AACJC,IAAAA,qBADI;AAEJC,IAAAA,uBAFI;AAGJC,IAAAA,2BAHI;AAIJC,IAAAA;AAJI,MAKFL,cALJ;AAOA,SAAOT,KAAK,CAACK,MAAN,CAAaU,GAAb,CAAiB,CAACC,KAAD,EAAQC,CAAR,KAAc;AACpC,UAAMC,OAAO,GAAGD,CAAC,KAAKjB,KAAK,CAACM,KAA5B;;AAEA,UAAMa,OAAO,GAAG,MAAM;AACpB,YAAMC,KAAK,GAAGnB,UAAU,CAACoB,IAAX,CAAgB;AAC5BC,QAAAA,IAAI,EAAE,iBADsB;AAE5BC,QAAAA,MAAM,EAAEP,KAAK,CAACR,GAFc;AAG5BgB,QAAAA,iBAAiB,EAAE;AAHS,OAAhB,CAAd;;AAMA,UAAI,CAACJ,KAA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n} from '@react-navigation/native';\nimport * as React from 'react';\n\nimport type { DrawerDescriptorMap, DrawerNavigationHelpers } from '../types';\nimport DrawerItem from './DrawerItem';\n\ntype Props = {\n state: DrawerNavigationState<ParamListBase>;\n navigation: DrawerNavigationHelpers;\n descriptors: DrawerDescriptorMap;\n};\n\n/**\n * Component that renders the navigation list in the drawer.\n */\nexport default function DrawerItemList({\n state,\n navigation,\n descriptors,\n}: Props) {\n const buildLink = useLinkBuilder();\n\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor.options;\n\n const {\n drawerActiveTintColor,\n drawerInactiveTintColor,\n drawerActiveBackgroundColor,\n drawerInactiveBackgroundColor,\n } = focusedOptions;\n\n return state.routes.map((route, i) => {\n const focused = i === state.index;\n\n const onPress = () => {\n const event = navigation.emit({\n type: 'drawerItemPress',\n target: route.key,\n canPreventDefault: true,\n });\n\n if (!event.defaultPrevented) {\n navigation.dispatch({\n ...(focused\n ? DrawerActions.closeDrawer()\n : CommonActions.navigate({ name: route.name, merge: true })),\n target: state.key,\n });\n }\n };\n\n const {\n title,\n drawerLabel,\n drawerIcon,\n drawerLabelStyle,\n drawerItemStyle,\n drawerAllowFontScaling,\n } = descriptors[route.key].options;\n\n return (\n <DrawerItem\n key={route.key}\n label={\n drawerLabel !== undefined\n ? drawerLabel\n : title !== undefined\n ? title\n : route.name\n }\n icon={drawerIcon}\n focused={focused}\n activeTintColor={drawerActiveTintColor}\n inactiveTintColor={drawerInactiveTintColor}\n activeBackgroundColor={drawerActiveBackgroundColor}\n inactiveBackgroundColor={drawerInactiveBackgroundColor}\n allowFontScaling={drawerAllowFontScaling}\n labelStyle={drawerLabelStyle}\n style={drawerItemStyle}\n to={buildLink(route.name, route.params)}\n onPress={onPress}\n />\n );\n }) as React.ReactNode as React.ReactElement;\n}\n"]}
1
+ {"version":3,"names":["DrawerItemList","state","navigation","descriptors","buildLink","useLinkBuilder","focusedRoute","routes","index","focusedDescriptor","key","focusedOptions","options","drawerActiveTintColor","drawerInactiveTintColor","drawerActiveBackgroundColor","drawerInactiveBackgroundColor","map","route","i","focused","onPress","event","emit","type","target","canPreventDefault","defaultPrevented","dispatch","DrawerActions","closeDrawer","CommonActions","navigate","name","merge","title","drawerLabel","drawerIcon","drawerLabelStyle","drawerItemStyle","drawerAllowFontScaling","undefined","params"],"sources":["DrawerItemList.tsx"],"sourcesContent":["import {\n CommonActions,\n DrawerActions,\n DrawerNavigationState,\n ParamListBase,\n useLinkBuilder,\n} from '@react-navigation/native';\nimport * as React from 'react';\n\nimport type { DrawerDescriptorMap, DrawerNavigationHelpers } from '../types';\nimport DrawerItem from './DrawerItem';\n\ntype Props = {\n state: DrawerNavigationState<ParamListBase>;\n navigation: DrawerNavigationHelpers;\n descriptors: DrawerDescriptorMap;\n};\n\n/**\n * Component that renders the navigation list in the drawer.\n */\nexport default function DrawerItemList({\n state,\n navigation,\n descriptors,\n}: Props) {\n const buildLink = useLinkBuilder();\n\n const focusedRoute = state.routes[state.index];\n const focusedDescriptor = descriptors[focusedRoute.key];\n const focusedOptions = focusedDescriptor.options;\n\n const {\n drawerActiveTintColor,\n drawerInactiveTintColor,\n drawerActiveBackgroundColor,\n drawerInactiveBackgroundColor,\n } = focusedOptions;\n\n return state.routes.map((route, i) => {\n const focused = i === state.index;\n\n const onPress = () => {\n const event = navigation.emit({\n type: 'drawerItemPress',\n target: route.key,\n canPreventDefault: true,\n });\n\n if (!event.defaultPrevented) {\n navigation.dispatch({\n ...(focused\n ? DrawerActions.closeDrawer()\n : CommonActions.navigate({ name: route.name, merge: true })),\n target: state.key,\n });\n }\n };\n\n const {\n title,\n drawerLabel,\n drawerIcon,\n drawerLabelStyle,\n drawerItemStyle,\n drawerAllowFontScaling,\n } = descriptors[route.key].options;\n\n return (\n <DrawerItem\n key={route.key}\n label={\n drawerLabel !== undefined\n ? drawerLabel\n : title !== undefined\n ? title\n : route.name\n }\n icon={drawerIcon}\n focused={focused}\n activeTintColor={drawerActiveTintColor}\n inactiveTintColor={drawerInactiveTintColor}\n activeBackgroundColor={drawerActiveBackgroundColor}\n inactiveBackgroundColor={drawerInactiveBackgroundColor}\n allowFontScaling={drawerAllowFontScaling}\n labelStyle={drawerLabelStyle}\n style={drawerItemStyle}\n to={buildLink(route.name, route.params)}\n onPress={onPress}\n />\n );\n }) as React.ReactNode as React.ReactElement;\n}\n"],"mappings":";;;;;;;AAAA;;AAOA;;AAGA;;;;;;;;AAQA;AACA;AACA;AACe,SAASA,cAAT,OAIL;EAAA,IAJ6B;IACrCC,KADqC;IAErCC,UAFqC;IAGrCC;EAHqC,CAI7B;EACR,MAAMC,SAAS,GAAG,IAAAC,sBAAA,GAAlB;EAEA,MAAMC,YAAY,GAAGL,KAAK,CAACM,MAAN,CAAaN,KAAK,CAACO,KAAnB,CAArB;EACA,MAAMC,iBAAiB,GAAGN,WAAW,CAACG,YAAY,CAACI,GAAd,CAArC;EACA,MAAMC,cAAc,GAAGF,iBAAiB,CAACG,OAAzC;EAEA,MAAM;IACJC,qBADI;IAEJC,uBAFI;IAGJC,2BAHI;IAIJC;EAJI,IAKFL,cALJ;EAOA,OAAOV,KAAK,CAACM,MAAN,CAAaU,GAAb,CAAiB,CAACC,KAAD,EAAQC,CAAR,KAAc;IACpC,MAAMC,OAAO,GAAGD,CAAC,KAAKlB,KAAK,CAACO,KAA5B;;IAEA,MAAMa,OAAO,GAAG,MAAM;MACpB,MAAMC,KAAK,GAAGpB,UAAU,CAACqB,IAAX,CAAgB;QAC5BC,IAAI,EAAE,iBADsB;QAE5BC,MAAM,EAAEP,KAAK,CAACR,GAFc;QAG5BgB,iBAAiB,EAAE;MAHS,CAAhB,CAAd;;MAMA,IAAI,CAACJ,KAAK,CAACK,gBAAX,EAA6B;QAC3BzB,UAAU,CAAC0B,QAAX,CAAoB,EAClB,IAAIR,OAAO,GACPS,qBAAA,CAAcC,WAAd,EADO,GAEPC,qBAAA,CAAcC,QAAd,CAAuB;YAAEC,IAAI,EAAEf,KAAK,CAACe,IAAd;YAAoBC,KAAK,EAAE;UAA3B,CAAvB,CAFJ,CADkB;UAIlBT,MAAM,EAAExB,KAAK,CAACS;QAJI,CAApB;MAMD;IACF,CAfD;;IAiBA,MAAM;MACJyB,KADI;MAEJC,WAFI;MAGJC,UAHI;MAIJC,gBAJI;MAKJC,eALI;MAMJC;IANI,IAOFrC,WAAW,CAACe,KAAK,CAACR,GAAP,CAAX,CAAuBE,OAP3B;IASA,oBACE,oBAAC,mBAAD;MACE,GAAG,EAAEM,KAAK,CAACR,GADb;MAEE,KAAK,EACH0B,WAAW,KAAKK,SAAhB,GACIL,WADJ,GAEID,KAAK,KAAKM,SAAV,GACAN,KADA,GAEAjB,KAAK,CAACe,IAPd;MASE,IAAI,EAAEI,UATR;MAUE,OAAO,EAAEjB,OAVX;MAWE,eAAe,EAAEP,qBAXnB;MAYE,iBAAiB,EAAEC,uBAZrB;MAaE,qBAAqB,EAAEC,2BAbzB;MAcE,uBAAuB,EAAEC,6BAd3B;MAeE,gBAAgB,EAAEwB,sBAfpB;MAgBE,UAAU,EAAEF,gBAhBd;MAiBE,KAAK,EAAEC,eAjBT;MAkBE,EAAE,EAAEnC,SAAS,CAACc,KAAK,CAACe,IAAP,EAAaf,KAAK,CAACwB,MAAnB,CAlBf;MAmBE,OAAO,EAAErB;IAnBX,EADF;EAuBD,CApDM,CAAP;AAqDD"}
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
17
17
 
18
18
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
19
 
20
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
20
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
21
21
 
22
22
  function DrawerToggleButton(_ref) {
23
23
  let {
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerToggleButton.tsx"],"names":["DrawerToggleButton","tintColor","rest","navigation","borderless","dispatch","DrawerActions","toggleDrawer","styles","touchable","Platform","select","ios","undefined","default","top","right","bottom","left","icon","require","StyleSheet","create","height","width","margin","resizeMode","marginHorizontal"],"mappings":";;;;;;;AAAA;;AACA;;AAKA;;AACA;;;;;;;;AAWe,SAASA,kBAAT,OAA2D;AAAA,MAA/B;AAAEC,IAAAA,SAAF;AAAa,OAAGC;AAAhB,GAA+B;AACxE,QAAMC,UAAU,GAAG,4BAAnB;AAEA,sBACE,oBAAC,2BAAD,eACMD,IADN;AAEE,IAAA,UAAU,MAFZ;AAGE,IAAA,iBAAiB,EAAC,QAHpB;AAIE,IAAA,cAAc,EAAE;AAAEE,MAAAA,UAAU,EAAE;AAAd,KAJlB;AAKE,IAAA,OAAO,EAAE,MAAMD,UAAU,CAACE,QAAX,CAAoBC,sBAAcC,YAAd,EAApB,CALjB;AAME,IAAA,KAAK,EAAEC,MAAM,CAACC,SANhB;AAOE,IAAA,OAAO,EAAEC,sBAASC,MAAT,CAAgB;AACvBC,MAAAA,GAAG,EAAEC,SADkB;AAEvBC,MAAAA,OAAO,EAAE;AAAEC,QAAAA,GAAG,EAAE,EAAP;AAAWC,QAAAA,KAAK,EAAE,EAAlB;AAAsBC,QAAAA,MAAM,EAAE,EAA9B;AAAkCC,QAAAA,IAAI,EAAE;AAAxC;AAFc,KAAhB;AAPX,mBAYE,oBAAC,kBAAD;AACE,IAAA,KAAK,EAAE,CAACV,MAAM,CAACW,IAAR,EAAclB,SAAS,GAAG;AAAEA,MAAAA;AAAF,KAAH,GAAmB,IAA1C,CADT;AAEE,IAAA,MAAM,EAAEmB,OAAO,CAAC,iCAAD,CAFjB;AAGE,IAAA,YAAY,EAAE;AAHhB,IAZF,CADF;AAoBD;;AAED,MAAMZ,MAAM,GAAGa,wBAAWC,MAAX,CAAkB;AAC/BH,EAAAA,IAAI,EAAE;AACJI,IAAAA,MAAM,EAAE,EADJ;AAEJC,IAAAA,KAAK,EAAE,EAFH;AAGJC,IAAAA,MAAM,EAAE,CAHJ;AAIJC,IAAAA,UAAU,EAAE;AAJR,GADyB;AAO/BjB,EAAAA,SAAS,EAAE;AACTkB,IAAAA,gBAAgB,EAAE;AADT;AAPoB,CAAlB,CAAf","sourcesContent":["import { PlatformPressable } from '@react-navigation/elements';\nimport {\n DrawerActions,\n ParamListBase,\n useNavigation,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport { Image, Platform, StyleSheet } from 'react-native';\n\nimport type { DrawerNavigationProp } from '../types';\n\ntype Props = {\n accessibilityLabel?: string;\n pressColor?: string;\n pressOpacity?: number;\n tintColor?: string;\n};\n\nexport default function DrawerToggleButton({ tintColor, ...rest }: Props) {\n const navigation = useNavigation<DrawerNavigationProp<ParamListBase>>();\n\n return (\n <PlatformPressable\n {...rest}\n accessible\n accessibilityRole=\"button\"\n android_ripple={{ borderless: true }}\n onPress={() => navigation.dispatch(DrawerActions.toggleDrawer())}\n style={styles.touchable}\n hitSlop={Platform.select({\n ios: undefined,\n default: { top: 16, right: 16, bottom: 16, left: 16 },\n })}\n >\n <Image\n style={[styles.icon, tintColor ? { tintColor } : null]}\n source={require('./assets/toggle-drawer-icon.png')}\n fadeDuration={0}\n />\n </PlatformPressable>\n );\n}\n\nconst styles = StyleSheet.create({\n icon: {\n height: 24,\n width: 24,\n margin: 3,\n resizeMode: 'contain',\n },\n touchable: {\n marginHorizontal: 11,\n },\n});\n"]}
1
+ {"version":3,"names":["DrawerToggleButton","tintColor","rest","navigation","useNavigation","borderless","dispatch","DrawerActions","toggleDrawer","styles","touchable","Platform","select","ios","undefined","default","top","right","bottom","left","icon","require","StyleSheet","create","height","width","margin","resizeMode","marginHorizontal"],"sources":["DrawerToggleButton.tsx"],"sourcesContent":["import { PlatformPressable } from '@react-navigation/elements';\nimport {\n DrawerActions,\n ParamListBase,\n useNavigation,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport { Image, Platform, StyleSheet } from 'react-native';\n\nimport type { DrawerNavigationProp } from '../types';\n\ntype Props = {\n accessibilityLabel?: string;\n pressColor?: string;\n pressOpacity?: number;\n tintColor?: string;\n};\n\nexport default function DrawerToggleButton({ tintColor, ...rest }: Props) {\n const navigation = useNavigation<DrawerNavigationProp<ParamListBase>>();\n\n return (\n <PlatformPressable\n {...rest}\n accessible\n accessibilityRole=\"button\"\n android_ripple={{ borderless: true }}\n onPress={() => navigation.dispatch(DrawerActions.toggleDrawer())}\n style={styles.touchable}\n hitSlop={Platform.select({\n ios: undefined,\n default: { top: 16, right: 16, bottom: 16, left: 16 },\n })}\n >\n <Image\n style={[styles.icon, tintColor ? { tintColor } : null]}\n source={require('./assets/toggle-drawer-icon.png')}\n fadeDuration={0}\n />\n </PlatformPressable>\n );\n}\n\nconst styles = StyleSheet.create({\n icon: {\n height: 24,\n width: 24,\n margin: 3,\n resizeMode: 'contain',\n },\n touchable: {\n marginHorizontal: 11,\n },\n});\n"],"mappings":";;;;;;;AAAA;;AACA;;AAKA;;AACA;;;;;;;;AAWe,SAASA,kBAAT,OAA2D;EAAA,IAA/B;IAAEC,SAAF;IAAa,GAAGC;EAAhB,CAA+B;EACxE,MAAMC,UAAU,GAAG,IAAAC,qBAAA,GAAnB;EAEA,oBACE,oBAAC,2BAAD,eACMF,IADN;IAEE,UAAU,MAFZ;IAGE,iBAAiB,EAAC,QAHpB;IAIE,cAAc,EAAE;MAAEG,UAAU,EAAE;IAAd,CAJlB;IAKE,OAAO,EAAE,MAAMF,UAAU,CAACG,QAAX,CAAoBC,qBAAA,CAAcC,YAAd,EAApB,CALjB;IAME,KAAK,EAAEC,MAAM,CAACC,SANhB;IAOE,OAAO,EAAEC,qBAAA,CAASC,MAAT,CAAgB;MACvBC,GAAG,EAAEC,SADkB;MAEvBC,OAAO,EAAE;QAAEC,GAAG,EAAE,EAAP;QAAWC,KAAK,EAAE,EAAlB;QAAsBC,MAAM,EAAE,EAA9B;QAAkCC,IAAI,EAAE;MAAxC;IAFc,CAAhB;EAPX,iBAYE,oBAAC,kBAAD;IACE,KAAK,EAAE,CAACV,MAAM,CAACW,IAAR,EAAcnB,SAAS,GAAG;MAAEA;IAAF,CAAH,GAAmB,IAA1C,CADT;IAEE,MAAM,EAAEoB,OAAO,CAAC,iCAAD,CAFjB;IAGE,YAAY,EAAE;EAHhB,EAZF,CADF;AAoBD;;AAED,MAAMZ,MAAM,GAAGa,uBAAA,CAAWC,MAAX,CAAkB;EAC/BH,IAAI,EAAE;IACJI,MAAM,EAAE,EADJ;IAEJC,KAAK,EAAE,EAFH;IAGJC,MAAM,EAAE,CAHJ;IAIJC,UAAU,EAAE;EAJR,CADyB;EAO/BjB,SAAS,EAAE;IACTkB,gBAAgB,EAAE;EADT;AAPoB,CAAlB,CAAf"}
@@ -37,7 +37,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
37
37
 
38
38
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
39
39
 
40
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
40
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
41
41
 
42
42
  const getDefaultDrawerWidth = _ref => {
43
43
  let {
@@ -1 +1 @@
1
- {"version":3,"sources":["DrawerView.tsx"],"names":["getDefaultDrawerWidth","height","width","smallerAxisSize","Math","min","isLandscape","isTablet","appBarHeight","Platform","OS","maxWidth","GestureHandlerWrapper","GestureHandlerRootView","View","DrawerViewBase","state","navigation","descriptors","defaultStatus","drawerContent","props","detachInactiveScreens","useLegacyImplementation","Reanimated","isConfigured","legacyImplemenationNotAvailable","require","abs","undefined","Error","Drawer","default","focusedRouteKey","routes","index","key","drawerHideStatusBarOnOpen","drawerPosition","I18nManager","getConstants","isRTL","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","gestureHandlerProps","keyboardDismissMode","overlayColor","swipeEdgeWidth","swipeEnabled","swipeMinDistance","options","loaded","setLoaded","React","useState","includes","dimensions","colors","drawerStatus","handleDrawerOpen","useCallback","dispatch","DrawerActions","openDrawer","target","handleDrawerClose","closeDrawer","useEffect","handleHardwareBack","isFocused","handleEscape","e","subscription","BackHandler","addEventListener","document","body","remove","removeEventListener","renderDrawerContent","renderSceneContent","styles","content","map","route","descriptor","lazy","unmountOnBlur","freezeOnBlur","header","layout","name","headerLeft","headerShown","headerStatusBarHeight","headerTransparent","sceneContainerStyle","StyleSheet","absoluteFill","zIndex","render","backgroundColor","card","borderRightColor","border","borderRightWidth","hairlineWidth","borderLeftColor","borderLeftWidth","DrawerView","rest","create","flex"],"mappings":";;;;;;;AAAA;;AAMA;;AAOA;;AACA;;AAOA;;AACA;;AAWA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AASA,MAAMA,qBAAqB,GAAG,QAMxB;AAAA,MANyB;AAC7BC,IAAAA,MAD6B;AAE7BC,IAAAA;AAF6B,GAMzB;;AACJ;AACF;AACA;AACA;AACA;AACE,QAAMC,eAAe,GAAGC,IAAI,CAACC,GAAL,CAASJ,MAAT,EAAiBC,KAAjB,CAAxB;AACA,QAAMI,WAAW,GAAGJ,KAAK,GAAGD,MAA5B;AACA,QAAMM,QAAQ,GAAGJ,eAAe,IAAI,GAApC;AACA,QAAMK,YAAY,GAAGC,sBAASC,EAAT,KAAgB,KAAhB,GAAyBJ,WAAW,GAAG,EAAH,GAAQ,EAA5C,GAAkD,EAAvE;AACA,QAAMK,QAAQ,GAAGJ,QAAQ,GAAG,GAAH,GAAS,GAAlC;AAEA,SAAOH,IAAI,CAACC,GAAL,CAASF,eAAe,GAAGK,YAA3B,EAAyCG,QAAzC,CAAP;AACD,CAnBD;;AAqBA,MAAMC,qBAAqB,GAAGC,sCAAH,aAAGA,sCAAH,cAAGA,sCAAH,GAA6BC,iBAAxD;;AAEA,SAASC,cAAT,QAcU;AAAA;;AAAA,MAdc;AACtBC,IAAAA,KADsB;AAEtBC,IAAAA,UAFsB;AAGtBC,IAAAA,WAHsB;AAItBC,IAAAA,aAJsB;AAKtBC,IAAAA,aAAa,GAAIC,KAAD,iBACd,oBAAC,sBAAD,EAAmBA,KAAnB,CANoB;AAQtBC,IAAAA,qBAAqB,GA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AA,WAAW,EAAE,CACX;AACEpC,MAAAA,KAAK,EAAEF,qBAAqB,CAAC2D,UAAD,CAD9B;AAEE6C,MAAAA,eAAe,EAAE5C,MAAM,CAAC6C;AAF1B,KADW,EAKX7D,UAAU,KAAK,WAAf,KACGN,cAAc,KAAK,MAAnB,GACG;AACEoE,MAAAA,gBAAgB,EAAE9C,MAAM,CAAC+C,MAD3B;AAEEC,MAAAA,gBAAgB,EAAER,wBAAWS;AAF/B,KADH,GAKG;AACEC,MAAAA,eAAe,EAAElD,MAAM,CAAC+C,MAD1B;AAEEI,MAAAA,eAAe,EAAEX,wBAAWS;AAF9B,KANN,CALW,EAeXlE,WAfW,CAdf;AA+BE,IAAA,YAAY,EAAE;AAAE6D,MAAAA,eAAe,EAAEvD;AAAnB,KA/BhB;AAgCE,IAAA,mBAAmB,EAAEiC,mBAhCvB;AAiCE,IAAA,kBAAkB,EAAEC,kBAjCtB;AAkCE,IAAA,UAAU,EAAExB;AAlCd,IADF,CADF;AAwCD;;AAEc,SAASqD,UAAT,QAAoD;AAAA,MAAhC;AAAE/F,IAAAA,UAAF;AAAc,OAAGgG;AAAjB,GAAgC;AACjE,sBACE,oBAAC,gCAAD,qBACE,oBAAC,qBAAD;AAAuB,IAAA,KAAK,EAAE7B,MAAM,CAACC;AAArC,kBACE,oBAAC,cAAD;AAAgB,IAAA,UAAU,EAAEpE;AAA5B,KAA4CgG,IAA5C,EADF,CADF,CADF;AAOD;;AAED,MAAM7B,MAAM,GAAGgB,wBAAWc,MAAX,CAAkB;AAC/B7B,EAAAA,OAAO,EAAE;AACP8B,IAAAA,IAAI,EAAE;AADC;AADsB,CAAlB,CAAf","sourcesContent":["import {\n getHeaderTitle,\n Header,\n SafeAreaProviderCompat,\n Screen,\n} from '@react-navigation/elements';\nimport {\n DrawerActions,\n DrawerNavigationState,\n DrawerStatus,\n ParamListBase,\n useTheme,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n BackHandler,\n I18nManager,\n Platform,\n StyleSheet,\n View,\n} from 'react-native';\nimport * as Reanimated from 'react-native-reanimated';\nimport { useSafeAreaFrame } from 'react-native-safe-area-context';\n\nimport type {\n DrawerContentComponentProps,\n DrawerDescriptorMap,\n DrawerHeaderProps,\n DrawerNavigationConfig,\n DrawerNavigationHelpers,\n DrawerNavigationProp,\n DrawerProps,\n} from '../types';\nimport DrawerPositionContext from '../utils/DrawerPositionContext';\nimport DrawerStatusContext from '../utils/DrawerStatusContext';\nimport getDrawerStatusFromState from '../utils/getDrawerStatusFromState';\nimport DrawerContent from './DrawerContent';\nimport DrawerToggleButton from './DrawerToggleButton';\nimport { GestureHandlerRootView } from './GestureHandler';\nimport { MaybeScreen, MaybeScreenContainer } from './ScreenFallback';\n\ntype Props = DrawerNavigationConfig & {\n defaultStatus: DrawerStatus;\n state: DrawerNavigationState<ParamListBase>;\n navigation: DrawerNavigationHelpers;\n descriptors: DrawerDescriptorMap;\n};\n\nconst getDefaultDrawerWidth = ({\n height,\n width,\n}: {\n height: number;\n width: number;\n}) => {\n /*\n * Default drawer width is screen width - header height\n * with a max width of 280 on mobile and 320 on tablet\n * https://material.io/components/navigation-drawer\n */\n const smallerAxisSize = Math.min(height, width);\n const isLandscape = width > height;\n const isTablet = smallerAxisSize >= 600;\n const appBarHeight = Platform.OS === 'ios' ? (isLandscape ? 32 : 44) : 56;\n const maxWidth = isTablet ? 320 : 280;\n\n return Math.min(smallerAxisSize - appBarHeight, maxWidth);\n};\n\nconst GestureHandlerWrapper = GestureHandlerRootView ?? View;\n\nfunction DrawerViewBase({\n state,\n navigation,\n descriptors,\n defaultStatus,\n drawerContent = (props: DrawerContentComponentProps) => (\n <DrawerContent {...props} />\n ),\n detachInactiveScreens = Platform.OS === 'web' ||\n Platform.OS === 'android' ||\n Platform.OS === 'ios',\n // Reanimated 2 is not configured\n // @ts-expect-error: the type definitions are incomplete\n useLegacyImplementation = !Reanimated.isConfigured?.(),\n}: Props) {\n // Reanimated v3 dropped legacy v1 syntax\n const legacyImplemenationNotAvailable =\n require('react-native-reanimated').abs === undefined;\n\n if (useLegacyImplementation && legacyImplemenationNotAvailable) {\n throw new Error(\n 'The `useLegacyImplementation` prop is not available with Reanimated 3 as it no longer includes support for Reanimated 1 legacy API. Remove the `useLegacyImplementation` prop from `Drawer.Navigator` to be able to use it.'\n );\n }\n\n const Drawer: React.ComponentType<DrawerProps> = useLegacyImplementation\n ? require('./legacy/Drawer').default\n : require('./modern/Drawer').default;\n\n const focusedRouteKey = state.routes[state.index].key;\n const {\n drawerHideStatusBarOnOpen = false,\n drawerPosition = I18nManager.getConstants().isRTL ? 'right' : 'left',\n drawerStatusBarAnimation = 'slide',\n drawerStyle,\n drawerType = Platform.select({ ios: 'slide', default: 'front' }),\n gestureHandlerProps,\n keyboardDismissMode = 'on-drag',\n overlayColor = 'rgba(0, 0, 0, 0.5)',\n swipeEdgeWidth = 32,\n swipeEnabled = Platform.OS !== 'web' &&\n Platform.OS !== 'windows' &&\n Platform.OS !== 'macos',\n swipeMinDistance = 60,\n } = descriptors[focusedRouteKey].options;\n\n const [loaded, setLoaded] = React.useState([focusedRouteKey]);\n\n if (!loaded.includes(focusedRouteKey)) {\n setLoaded([...loaded, focusedRouteKey]);\n }\n\n const dimensions = useSafeAreaFrame();\n\n const { colors } = useTheme();\n\n const drawerStatus = getDrawerStatusFromState(state);\n\n const handleDrawerOpen = React.useCallback(() => {\n navigation.dispatch({\n ...DrawerActions.openDrawer(),\n target: state.key,\n });\n }, [navigation, state.key]);\n\n const handleDrawerClose = React.useCallback(() => {\n navigation.dispatch({\n ...DrawerActions.closeDrawer(),\n target: state.key,\n });\n }, [navigation, state.key]);\n\n React.useEffect(() => {\n if (drawerStatus === defaultStatus || drawerType === 'permanent') {\n return;\n }\n\n const handleHardwareBack = () => {\n // We shouldn't handle the back button if the parent screen isn't focused\n // This will avoid the drawer overriding event listeners from a focused screen\n if (!navigation.isFocused()) {\n return false;\n }\n\n if (defaultStatus === 'open') {\n handleDrawerOpen();\n } else {\n handleDrawerClose();\n }\n\n return true;\n };\n\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n handleHardwareBack();\n }\n };\n\n // We only add the listeners when drawer opens\n // This way we can make sure that the listener is added as late as possible\n // This will make sure that our handler will run first when back button is pressed\n const subscription = BackHandler.addEventListener(\n 'hardwareBackPress',\n handleHardwareBack\n );\n\n if (Platform.OS === 'web') {\n document?.body?.addEventListener?.('keyup', handleEscape);\n }\n\n return () => {\n subscription.remove();\n\n if (Platform.OS === 'web') {\n document?.body?.removeEventListener?.('keyup', handleEscape);\n }\n };\n }, [\n defaultStatus,\n drawerStatus,\n drawerType,\n handleDrawerClose,\n handleDrawerOpen,\n navigation,\n ]);\n\n const renderDrawerContent = () => {\n return (\n <DrawerPositionContext.Provider value={drawerPosition}>\n {drawerContent({\n state: state,\n navigation: navigation,\n descriptors: descriptors,\n })}\n </DrawerPositionContext.Provider>\n );\n };\n\n const renderSceneContent = () => {\n return (\n <MaybeScreenContainer\n enabled={detachInactiveScreens}\n hasTwoStates\n style={styles.content}\n >\n {state.routes.map((route, index) => {\n const descriptor = descriptors[route.key];\n const { lazy = true, unmountOnBlur } = descriptor.options;\n const isFocused = state.index === index;\n\n if (unmountOnBlur && !isFocused) {\n return null;\n }\n\n if (lazy && !loaded.includes(route.key) && !isFocused) {\n // Don't render a lazy screen if we've never navigated to it\n return null;\n }\n\n const {\n freezeOnBlur,\n header = ({ layout, options }: DrawerHeaderProps) => (\n <Header\n {...options}\n layout={layout}\n title={getHeaderTitle(options, route.name)}\n headerLeft={\n options.headerLeft ??\n ((props) => <DrawerToggleButton {...props} />)\n }\n />\n ),\n headerShown,\n headerStatusBarHeight,\n headerTransparent,\n sceneContainerStyle,\n } = descriptor.options;\n\n return (\n <MaybeScreen\n key={route.key}\n style={[StyleSheet.absoluteFill, { zIndex: isFocused ? 0 : -1 }]}\n visible={isFocused}\n enabled={detachInactiveScreens}\n freezeOnBlur={freezeOnBlur}\n >\n <Screen\n focused={isFocused}\n route={descriptor.route}\n navigation={descriptor.navigation}\n headerShown={headerShown}\n headerStatusBarHeight={headerStatusBarHeight}\n headerTransparent={headerTransparent}\n header={header({\n layout: dimensions,\n route: descriptor.route,\n navigation:\n descriptor.navigation as DrawerNavigationProp<ParamListBase>,\n options: descriptor.options,\n })}\n style={sceneContainerStyle}\n >\n {descriptor.render()}\n </Screen>\n </MaybeScreen>\n );\n })}\n </MaybeScreenContainer>\n );\n };\n\n return (\n <DrawerStatusContext.Provider value={drawerStatus}>\n <Drawer\n open={drawerStatus !== 'closed'}\n onOpen={handleDrawerOpen}\n onClose={handleDrawerClose}\n gestureHandlerProps={gestureHandlerProps}\n swipeEnabled={swipeEnabled}\n swipeEdgeWidth={swipeEdgeWidth}\n swipeVelocityThreshold={500}\n swipeDistanceThreshold={swipeMinDistance}\n hideStatusBarOnOpen={drawerHideStatusBarOnOpen}\n statusBarAnimation={drawerStatusBarAnimation}\n keyboardDismissMode={keyboardDismissMode}\n drawerType={drawerType}\n drawerPosition={drawerPosition}\n drawerStyle={[\n {\n width: getDefaultDrawerWidth(dimensions),\n backgroundColor: colors.card,\n },\n drawerType === 'permanent' &&\n (drawerPosition === 'left'\n ? {\n borderRightColor: colors.border,\n borderRightWidth: StyleSheet.hairlineWidth,\n }\n : {\n borderLeftColor: colors.border,\n borderLeftWidth: StyleSheet.hairlineWidth,\n }),\n drawerStyle,\n ]}\n overlayStyle={{ backgroundColor: overlayColor }}\n renderDrawerContent={renderDrawerContent}\n renderSceneContent={renderSceneContent}\n dimensions={dimensions}\n />\n </DrawerStatusContext.Provider>\n );\n}\n\nexport default function DrawerView({ navigation, ...rest }: Props) {\n return (\n <SafeAreaProviderCompat>\n <GestureHandlerWrapper style={styles.content}>\n <DrawerViewBase navigation={navigation} {...rest} />\n </GestureHandlerWrapper>\n </SafeAreaProviderCompat>\n );\n}\n\nconst styles = StyleSheet.create({\n content: {\n flex: 1,\n },\n});\n"]}
1
+ {"version":3,"names":["getDefaultDrawerWidth","height","width","smallerAxisSize","Math","min","isLandscape","isTablet","appBarHeight","Platform","OS","maxWidth","GestureHandlerWrapper","GestureHandlerRootView","View","DrawerViewBase","state","navigation","descriptors","defaultStatus","drawerContent","props","detachInactiveScreens","useLegacyImplementation","Reanimated","isConfigured","legacyImplemenationNotAvailable","require","abs","undefined","Error","Drawer","default","focusedRouteKey","routes","index","key","drawerHideStatusBarOnOpen","drawerPosition","I18nManager","getConstants","isRTL","drawerStatusBarAnimation","drawerStyle","drawerType","select","ios","gestureHandlerProps","keyboardDismissMode","overlayColor","swipeEdgeWidth","swipeEnabled","swipeMinDistance","options","loaded","setLoaded","React","useState","includes","dimensions","useSafeAreaFrame","colors","useTheme","drawerStatus","getDrawerStatusFromState","handleDrawerOpen","useCallback","dispatch","DrawerActions","openDrawer","target","handleDrawerClose","closeDrawer","useEffect","handleHardwareBack","isFocused","handleEscape","e","subscription","BackHandler","addEventListener","document","body","remove","removeEventListener","renderDrawerContent","renderSceneContent","styles","content","map","route","descriptor","lazy","unmountOnBlur","freezeOnBlur","header","layout","getHeaderTitle","name","headerLeft","headerShown","headerStatusBarHeight","headerTransparent","sceneContainerStyle","StyleSheet","absoluteFill","zIndex","render","backgroundColor","card","borderRightColor","border","borderRightWidth","hairlineWidth","borderLeftColor","borderLeftWidth","DrawerView","rest","create","flex"],"sources":["DrawerView.tsx"],"sourcesContent":["import {\n getHeaderTitle,\n Header,\n SafeAreaProviderCompat,\n Screen,\n} from '@react-navigation/elements';\nimport {\n DrawerActions,\n DrawerNavigationState,\n DrawerStatus,\n ParamListBase,\n useTheme,\n} from '@react-navigation/native';\nimport * as React from 'react';\nimport {\n BackHandler,\n I18nManager,\n Platform,\n StyleSheet,\n View,\n} from 'react-native';\nimport * as Reanimated from 'react-native-reanimated';\nimport { useSafeAreaFrame } from 'react-native-safe-area-context';\n\nimport type {\n DrawerContentComponentProps,\n DrawerDescriptorMap,\n DrawerHeaderProps,\n DrawerNavigationConfig,\n DrawerNavigationHelpers,\n DrawerNavigationProp,\n DrawerProps,\n} from '../types';\nimport DrawerPositionContext from '../utils/DrawerPositionContext';\nimport DrawerStatusContext from '../utils/DrawerStatusContext';\nimport getDrawerStatusFromState from '../utils/getDrawerStatusFromState';\nimport DrawerContent from './DrawerContent';\nimport DrawerToggleButton from './DrawerToggleButton';\nimport { GestureHandlerRootView } from './GestureHandler';\nimport { MaybeScreen, MaybeScreenContainer } from './ScreenFallback';\n\ntype Props = DrawerNavigationConfig & {\n defaultStatus: DrawerStatus;\n state: DrawerNavigationState<ParamListBase>;\n navigation: DrawerNavigationHelpers;\n descriptors: DrawerDescriptorMap;\n};\n\nconst getDefaultDrawerWidth = ({\n height,\n width,\n}: {\n height: number;\n width: number;\n}) => {\n /*\n * Default drawer width is screen width - header height\n * with a max width of 280 on mobile and 320 on tablet\n * https://material.io/components/navigation-drawer\n */\n const smallerAxisSize = Math.min(height, width);\n const isLandscape = width > height;\n const isTablet = smallerAxisSize >= 600;\n const appBarHeight = Platform.OS === 'ios' ? (isLandscape ? 32 : 44) : 56;\n const maxWidth = isTablet ? 320 : 280;\n\n return Math.min(smallerAxisSize - appBarHeight, maxWidth);\n};\n\nconst GestureHandlerWrapper = GestureHandlerRootView ?? View;\n\nfunction DrawerViewBase({\n state,\n navigation,\n descriptors,\n defaultStatus,\n drawerContent = (props: DrawerContentComponentProps) => (\n <DrawerContent {...props} />\n ),\n detachInactiveScreens = Platform.OS === 'web' ||\n Platform.OS === 'android' ||\n Platform.OS === 'ios',\n // Reanimated 2 is not configured\n // @ts-expect-error: the type definitions are incomplete\n useLegacyImplementation = !Reanimated.isConfigured?.(),\n}: Props) {\n // Reanimated v3 dropped legacy v1 syntax\n const legacyImplemenationNotAvailable =\n require('react-native-reanimated').abs === undefined;\n\n if (useLegacyImplementation && legacyImplemenationNotAvailable) {\n throw new Error(\n 'The `useLegacyImplementation` prop is not available with Reanimated 3 as it no longer includes support for Reanimated 1 legacy API. Remove the `useLegacyImplementation` prop from `Drawer.Navigator` to be able to use it.'\n );\n }\n\n const Drawer: React.ComponentType<DrawerProps> = useLegacyImplementation\n ? require('./legacy/Drawer').default\n : require('./modern/Drawer').default;\n\n const focusedRouteKey = state.routes[state.index].key;\n const {\n drawerHideStatusBarOnOpen = false,\n drawerPosition = I18nManager.getConstants().isRTL ? 'right' : 'left',\n drawerStatusBarAnimation = 'slide',\n drawerStyle,\n drawerType = Platform.select({ ios: 'slide', default: 'front' }),\n gestureHandlerProps,\n keyboardDismissMode = 'on-drag',\n overlayColor = 'rgba(0, 0, 0, 0.5)',\n swipeEdgeWidth = 32,\n swipeEnabled = Platform.OS !== 'web' &&\n Platform.OS !== 'windows' &&\n Platform.OS !== 'macos',\n swipeMinDistance = 60,\n } = descriptors[focusedRouteKey].options;\n\n const [loaded, setLoaded] = React.useState([focusedRouteKey]);\n\n if (!loaded.includes(focusedRouteKey)) {\n setLoaded([...loaded, focusedRouteKey]);\n }\n\n const dimensions = useSafeAreaFrame();\n\n const { colors } = useTheme();\n\n const drawerStatus = getDrawerStatusFromState(state);\n\n const handleDrawerOpen = React.useCallback(() => {\n navigation.dispatch({\n ...DrawerActions.openDrawer(),\n target: state.key,\n });\n }, [navigation, state.key]);\n\n const handleDrawerClose = React.useCallback(() => {\n navigation.dispatch({\n ...DrawerActions.closeDrawer(),\n target: state.key,\n });\n }, [navigation, state.key]);\n\n React.useEffect(() => {\n if (drawerStatus === defaultStatus || drawerType === 'permanent') {\n return;\n }\n\n const handleHardwareBack = () => {\n // We shouldn't handle the back button if the parent screen isn't focused\n // This will avoid the drawer overriding event listeners from a focused screen\n if (!navigation.isFocused()) {\n return false;\n }\n\n if (defaultStatus === 'open') {\n handleDrawerOpen();\n } else {\n handleDrawerClose();\n }\n\n return true;\n };\n\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === 'Escape') {\n handleHardwareBack();\n }\n };\n\n // We only add the listeners when drawer opens\n // This way we can make sure that the listener is added as late as possible\n // This will make sure that our handler will run first when back button is pressed\n const subscription = BackHandler.addEventListener(\n 'hardwareBackPress',\n handleHardwareBack\n );\n\n if (Platform.OS === 'web') {\n document?.body?.addEventListener?.('keyup', handleEscape);\n }\n\n return () => {\n subscription.remove();\n\n if (Platform.OS === 'web') {\n document?.body?.removeEventListener?.('keyup', handleEscape);\n }\n };\n }, [\n defaultStatus,\n drawerStatus,\n drawerType,\n handleDrawerClose,\n handleDrawerOpen,\n navigation,\n ]);\n\n const renderDrawerContent = () => {\n return (\n <DrawerPositionContext.Provider value={drawerPosition}>\n {drawerContent({\n state: state,\n navigation: navigation,\n descriptors: descriptors,\n })}\n </DrawerPositionContext.Provider>\n );\n };\n\n const renderSceneContent = () => {\n return (\n <MaybeScreenContainer\n enabled={detachInactiveScreens}\n hasTwoStates\n style={styles.content}\n >\n {state.routes.map((route, index) => {\n const descriptor = descriptors[route.key];\n const { lazy = true, unmountOnBlur } = descriptor.options;\n const isFocused = state.index === index;\n\n if (unmountOnBlur && !isFocused) {\n return null;\n }\n\n if (lazy && !loaded.includes(route.key) && !isFocused) {\n // Don't render a lazy screen if we've never navigated to it\n return null;\n }\n\n const {\n freezeOnBlur,\n header = ({ layout, options }: DrawerHeaderProps) => (\n <Header\n {...options}\n layout={layout}\n title={getHeaderTitle(options, route.name)}\n headerLeft={\n options.headerLeft ??\n ((props) => <DrawerToggleButton {...props} />)\n }\n />\n ),\n headerShown,\n headerStatusBarHeight,\n headerTransparent,\n sceneContainerStyle,\n } = descriptor.options;\n\n return (\n <MaybeScreen\n key={route.key}\n style={[StyleSheet.absoluteFill, { zIndex: isFocused ? 0 : -1 }]}\n visible={isFocused}\n enabled={detachInactiveScreens}\n freezeOnBlur={freezeOnBlur}\n >\n <Screen\n focused={isFocused}\n route={descriptor.route}\n navigation={descriptor.navigation}\n headerShown={headerShown}\n headerStatusBarHeight={headerStatusBarHeight}\n headerTransparent={headerTransparent}\n header={header({\n layout: dimensions,\n route: descriptor.route,\n navigation:\n descriptor.navigation as DrawerNavigationProp<ParamListBase>,\n options: descriptor.options,\n })}\n style={sceneContainerStyle}\n >\n {descriptor.render()}\n </Screen>\n </MaybeScreen>\n );\n })}\n </MaybeScreenContainer>\n );\n };\n\n return (\n <DrawerStatusContext.Provider value={drawerStatus}>\n <Drawer\n open={drawerStatus !== 'closed'}\n onOpen={handleDrawerOpen}\n onClose={handleDrawerClose}\n gestureHandlerProps={gestureHandlerProps}\n swipeEnabled={swipeEnabled}\n swipeEdgeWidth={swipeEdgeWidth}\n swipeVelocityThreshold={500}\n swipeDistanceThreshold={swipeMinDistance}\n hideStatusBarOnOpen={drawerHideStatusBarOnOpen}\n statusBarAnimation={drawerStatusBarAnimation}\n keyboardDismissMode={keyboardDismissMode}\n drawerType={drawerType}\n drawerPosition={drawerPosition}\n drawerStyle={[\n {\n width: getDefaultDrawerWidth(dimensions),\n backgroundColor: colors.card,\n },\n drawerType === 'permanent' &&\n (drawerPosition === 'left'\n ? {\n borderRightColor: colors.border,\n borderRightWidth: StyleSheet.hairlineWidth,\n }\n : {\n borderLeftColor: colors.border,\n borderLeftWidth: StyleSheet.hairlineWidth,\n }),\n drawerStyle,\n ]}\n overlayStyle={{ backgroundColor: overlayColor }}\n renderDrawerContent={renderDrawerContent}\n renderSceneContent={renderSceneContent}\n dimensions={dimensions}\n />\n </DrawerStatusContext.Provider>\n );\n}\n\nexport default function DrawerView({ navigation, ...rest }: Props) {\n return (\n <SafeAreaProviderCompat>\n <GestureHandlerWrapper style={styles.content}>\n <DrawerViewBase navigation={navigation} {...rest} />\n </GestureHandlerWrapper>\n </SafeAreaProviderCompat>\n );\n}\n\nconst styles = StyleSheet.create({\n content: {\n flex: 1,\n },\n});\n"],"mappings":";;;;;;;AAAA;;AAMA;;AAOA;;AACA;;AAOA;;AACA;;AAWA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AASA,MAAMA,qBAAqB,GAAG,QAMxB;EAAA,IANyB;IAC7BC,MAD6B;IAE7BC;EAF6B,CAMzB;;EACJ;AACF;AACA;AACA;AACA;EACE,MAAMC,e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ADC;AADsB,CAAlB,CAAf"}
@@ -1 +1 @@
1
- {"version":3,"sources":["GestureHandler.android.tsx"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './GestureHandlerNative';\n"]}
1
+ {"version":3,"names":[],"sources":["GestureHandler.android.tsx"],"sourcesContent":["export * from './GestureHandlerNative';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["GestureHandler.ios.tsx"],"names":[],"mappings":";;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './GestureHandlerNative';\n"]}
1
+ {"version":3,"names":[],"sources":["GestureHandler.ios.tsx"],"sourcesContent":["export * from './GestureHandlerNative';\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["GestureHandler.tsx"],"names":["Dummy","children","PanGestureHandler","TapGestureHandler","GestureHandlerRootView","View","GestureState","UNDETERMINED","FAILED","BEGAN","CANCELLED","ACTIVE","END"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAMA,MAAMA,KAAU,GAAG;AAAA,MAAC;AAAEC,IAAAA;AAAF,GAAD;AAAA,sBACjB,0CAAGA,QAAH,CADiB;AAAA,CAAnB;;AAIO,MAAMC,iBAAiB,GAC5BF,KADK;;AAGA,MAAMG,iBAAiB,GAC5BH,KADK;;AAGA,MAAMI,sBAAsB,GAAGC,iBAA/B;;AAEA,MAAMC,YAAY,GAAG;AAC1BC,EAAAA,YAAY,EAAE,CADY;AAE1BC,EAAAA,MAAM,EAAE,CAFkB;AAG1BC,EAAAA,KAAK,EAAE,CAHmB;AAI1BC,EAAAA,SAAS,EAAE,CAJe;AAK1BC,EAAAA,MAAM,EAAE,CALkB;AAM1BC,EAAAA,GAAG,EAAE;AANqB,CAArB","sourcesContent":["import * as React from 'react';\nimport { View } from 'react-native';\nimport type {\n PanGestureHandlerProperties,\n TapGestureHandlerProperties,\n} from 'react-native-gesture-handler';\n\nconst Dummy: any = ({ children }: { children: React.ReactNode }) => (\n <>{children}</>\n);\n\nexport const PanGestureHandler =\n Dummy as React.ComponentType<PanGestureHandlerProperties>;\n\nexport const TapGestureHandler =\n Dummy as React.ComponentType<TapGestureHandlerProperties>;\n\nexport const GestureHandlerRootView = View;\n\nexport const GestureState = {\n UNDETERMINED: 0,\n FAILED: 1,\n BEGAN: 2,\n CANCELLED: 3,\n ACTIVE: 4,\n END: 5,\n};\n\nexport type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';\n"]}
1
+ {"version":3,"names":["Dummy","children","PanGestureHandler","TapGestureHandler","GestureHandlerRootView","View","GestureState","UNDETERMINED","FAILED","BEGAN","CANCELLED","ACTIVE","END"],"sources":["GestureHandler.tsx"],"sourcesContent":["import * as React from 'react';\nimport { View } from 'react-native';\nimport type {\n PanGestureHandlerProperties,\n TapGestureHandlerProperties,\n} from 'react-native-gesture-handler';\n\nconst Dummy: any = ({ children }: { children: React.ReactNode }) => (\n <>{children}</>\n);\n\nexport const PanGestureHandler =\n Dummy as React.ComponentType<PanGestureHandlerProperties>;\n\nexport const TapGestureHandler =\n Dummy as React.ComponentType<TapGestureHandlerProperties>;\n\nexport const GestureHandlerRootView = View;\n\nexport const GestureState = {\n UNDETERMINED: 0,\n FAILED: 1,\n BEGAN: 2,\n CANCELLED: 3,\n ACTIVE: 4,\n END: 5,\n};\n\nexport type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';\n"],"mappings":";;;;;;;AAAA;;AACA;;;;;;AAMA,MAAMA,KAAU,GAAG;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,oBACjB,0CAAGA,QAAH,CADiB;AAAA,CAAnB;;AAIO,MAAMC,iBAAiB,GAC5BF,KADK;;AAGA,MAAMG,iBAAiB,GAC5BH,KADK;;AAGA,MAAMI,sBAAsB,GAAGC,iBAA/B;;AAEA,MAAMC,YAAY,GAAG;EAC1BC,YAAY,EAAE,CADY;EAE1BC,MAAM,EAAE,CAFkB;EAG1BC,KAAK,EAAE,CAHmB;EAI1BC,SAAS,EAAE,CAJe;EAK1BC,MAAM,EAAE,CALkB;EAM1BC,GAAG,EAAE;AANqB,CAArB"}
@@ -1 +1 @@
1
- {"version":3,"sources":["GestureHandlerNative.tsx"],"names":["PanGestureHandler","props","gestureRef","React","useRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAKA;;;;;;;;AAEO,SAASA,iBAAT,CAA2BC,KAA3B,EAA+D;AACpE,QAAMC,UAAU,GAAGC,KAAK,CAACC,MAAN,CAAsC,IAAtC,CAAnB;AAEA,sBACE,oBAAC,6BAAD,CAAsB,QAAtB;AAA+B,IAAA,KAAK,EAAEF;AAAtC,kBACE,oBAAC,4CAAD,EAA6BD,KAA7B,CADF,CADF;AAKD","sourcesContent":["import * as React from 'react';\nimport {\n PanGestureHandler as PanGestureHandlerNative,\n PanGestureHandlerProperties,\n} from 'react-native-gesture-handler';\n\nimport DrawerGestureContext from '../utils/DrawerGestureContext';\n\nexport function PanGestureHandler(props: PanGestureHandlerProperties) {\n const gestureRef = React.useRef<PanGestureHandlerNative>(null);\n\n return (\n <DrawerGestureContext.Provider value={gestureRef}>\n <PanGestureHandlerNative {...props} />\n </DrawerGestureContext.Provider>\n );\n}\n\nexport type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';\nexport {\n GestureHandlerRootView,\n State as GestureState,\n TapGestureHandler,\n} from 'react-native-gesture-handler';\n"]}
1
+ {"version":3,"names":["PanGestureHandler","props","gestureRef","React","useRef"],"sources":["GestureHandlerNative.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n PanGestureHandler as PanGestureHandlerNative,\n PanGestureHandlerProperties,\n} from 'react-native-gesture-handler';\n\nimport DrawerGestureContext from '../utils/DrawerGestureContext';\n\nexport function PanGestureHandler(props: PanGestureHandlerProperties) {\n const gestureRef = React.useRef<PanGestureHandlerNative>(null);\n\n return (\n <DrawerGestureContext.Provider value={gestureRef}>\n <PanGestureHandlerNative {...props} />\n </DrawerGestureContext.Provider>\n );\n}\n\nexport type { PanGestureHandlerGestureEvent } from 'react-native-gesture-handler';\nexport {\n GestureHandlerRootView,\n State as GestureState,\n TapGestureHandler,\n} from 'react-native-gesture-handler';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AAKA;;;;;;;;AAEO,SAASA,iBAAT,CAA2BC,KAA3B,EAA+D;EACpE,MAAMC,UAAU,GAAGC,KAAK,CAACC,MAAN,CAAsC,IAAtC,CAAnB;EAEA,oBACE,oBAAC,6BAAD,CAAsB,QAAtB;IAA+B,KAAK,EAAEF;EAAtC,gBACE,oBAAC,4CAAD,EAA6BD,KAA7B,CADF,CADF;AAKD"}
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
16
16
 
17
17
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
18
18
 
19
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
20
20
 
21
21
  let Screens;
22
22
 
@@ -1 +1 @@
1
- {"version":3,"sources":["ScreenFallback.tsx"],"names":["Screens","require","e","MaybeScreenContainer","enabled","rest","screensEnabled","MaybeScreen","visible","children"],"mappings":";;;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAUA,IAAIA,OAAJ;;AAEA,IAAI;AACFA,EAAAA,OAAO,GAAGC,OAAO,CAAC,sBAAD,CAAjB;AACD,CAFD,CAEE,OAAOC,CAAP,EAAU,CACV;AACD;;AAEM,MAAMC,oBAAoB,GAAG,QAO9B;AAAA;;AAAA,MAP+B;AACnCC,IAAAA,OADmC;AAEnC,OAAGC;AAFgC,GAO/B;;AACJ,kBAAIL,OAAJ,8DAAI,SAASM,cAAb,kDAAI,oCAAJ,EAAiC;AAC/B,wBAAO,oBAAC,OAAD,CAAS,eAAT;AAAyB,MAAA,OAAO,EAAEF;AAAlC,OAA+CC,IAA/C,EAAP;AACD;;AAED,sBAAO,oBAAC,iBAAD,EAAUA,IAAV,CAAP;AACD,CAbM;;;;AAeA,SAASE,WAAT,QAA4D;AAAA;;AAAA,MAAvC;AAAEC,IAAAA,OAAF;AAAWC,IAAAA,QAAX;AAAqB,OAAGJ;AAAxB,GAAuC;;AACjE,mBAAIL,OAAJ,+DAAI,UAASM,cAAb,kDAAI,qCAAJ,EAAiC;AAC/B,wBACE,oBAAC,OAAD,CAAS,MAAT;AAAgB,MAAA,aAAa,EAAEE,OAAO,GAAG,CAAH,GAAO;AAA7C,OAAoDH,IAApD,GACGI,QADH,CADF;AAKD;;AAED,sBACE,oBAAC,4BAAD;AAAoB,IAAA,OAAO,EAAED;AAA7B,KAA0CH,IAA1C,GACGI,QADH,CADF;AAKD","sourcesContent":["import { ResourceSavingView } from '@react-navigation/elements';\nimport * as React from 'react';\nimport { StyleProp, View, ViewProps, ViewStyle } from 'react-native';\n\ntype Props = {\n visible: boolean;\n children: React.ReactNode;\n enabled: boolean;\n freezeOnBlur?: boolean;\n style?: StyleProp<ViewStyle>;\n};\n\nlet Screens: typeof import('react-native-screens') | undefined;\n\ntry {\n Screens = require('react-native-screens');\n} catch (e) {\n // Ignore\n}\n\nexport const MaybeScreenContainer = ({\n enabled,\n ...rest\n}: ViewProps & {\n enabled: boolean;\n hasTwoStates: boolean;\n children: React.ReactNode;\n}) => {\n if (Screens?.screensEnabled?.()) {\n return <Screens.ScreenContainer enabled={enabled} {...rest} />;\n }\n\n return <View {...rest} />;\n};\n\nexport function MaybeScreen({ visible, children, ...rest }: Props) {\n if (Screens?.screensEnabled?.()) {\n return (\n <Screens.Screen activityState={visible ? 2 : 0} {...rest}>\n {children}\n </Screens.Screen>\n );\n }\n\n return (\n <ResourceSavingView visible={visible} {...rest}>\n {children}\n </ResourceSavingView>\n );\n}\n"]}
1
+ {"version":3,"names":["Screens","require","e","MaybeScreenContainer","enabled","rest","screensEnabled","MaybeScreen","visible","children"],"sources":["ScreenFallback.tsx"],"sourcesContent":["import { ResourceSavingView } from '@react-navigation/elements';\nimport * as React from 'react';\nimport { StyleProp, View, ViewProps, ViewStyle } from 'react-native';\n\ntype Props = {\n visible: boolean;\n children: React.ReactNode;\n enabled: boolean;\n freezeOnBlur?: boolean;\n style?: StyleProp<ViewStyle>;\n};\n\nlet Screens: typeof import('react-native-screens') | undefined;\n\ntry {\n Screens = require('react-native-screens');\n} catch (e) {\n // Ignore\n}\n\nexport const MaybeScreenContainer = ({\n enabled,\n ...rest\n}: ViewProps & {\n enabled: boolean;\n hasTwoStates: boolean;\n children: React.ReactNode;\n}) => {\n if (Screens?.screensEnabled?.()) {\n return <Screens.ScreenContainer enabled={enabled} {...rest} />;\n }\n\n return <View {...rest} />;\n};\n\nexport function MaybeScreen({ visible, children, ...rest }: Props) {\n if (Screens?.screensEnabled?.()) {\n return (\n <Screens.Screen activityState={visible ? 2 : 0} {...rest}>\n {children}\n </Screens.Screen>\n );\n }\n\n return (\n <ResourceSavingView visible={visible} {...rest}>\n {children}\n </ResourceSavingView>\n );\n}\n"],"mappings":";;;;;;;;AAAA;;AACA;;AACA;;;;;;;;AAUA,IAAIA,OAAJ;;AAEA,IAAI;EACFA,OAAO,GAAGC,OAAO,CAAC,sBAAD,CAAjB;AACD,CAFD,CAEE,OAAOC,CAAP,EAAU,CACV;AACD;;AAEM,MAAMC,oBAAoB,GAAG,QAO9B;EAAA;;EAAA,IAP+B;IACnCC,OADmC;IAEnC,GAAGC;EAFgC,CAO/B;;EACJ,gBAAIL,OAAJ,8DAAI,SAASM,cAAb,kDAAI,oCAAJ,EAAiC;IAC/B,oBAAO,oBAAC,OAAD,CAAS,eAAT;MAAyB,OAAO,EAAEF;IAAlC,GAA+CC,IAA/C,EAAP;EACD;;EAED,oBAAO,oBAAC,iBAAD,EAAUA,IAAV,CAAP;AACD,CAbM;;;;AAeA,SAASE,WAAT,QAA4D;EAAA;;EAAA,IAAvC;IAAEC,OAAF;IAAWC,QAAX;IAAqB,GAAGJ;EAAxB,CAAuC;;EACjE,iBAAIL,OAAJ,+DAAI,UAASM,cAAb,kDAAI,qCAAJ,EAAiC;IAC/B,oBACE,oBAAC,OAAD,CAAS,MAAT;MAAgB,aAAa,EAAEE,OAAO,GAAG,CAAH,GAAO;IAA7C,GAAoDH,IAApD,GACGI,QADH,CADF;EAKD;;EAED,oBACE,oBAAC,4BAAD;IAAoB,OAAO,EAAED;EAA7B,GAA0CH,IAA1C,GACGI,QADH,CADF;AAKD"}
@@ -23,7 +23,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
23
23
 
24
24
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
25
 
26
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
26
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
27
27
 
28
28
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
29
29