@razorpay/blade 8.12.1 → 8.13.0
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.
- package/build/components/index.d.ts +794 -599
- package/build/components/index.native.d.ts +1469 -1343
- package/build/components/index.native.js +904 -2182
- package/build/components/index.native.js.map +1 -1
- package/build/components/index.web.js +2432 -3688
- package/build/components/index.web.js.map +1 -1
- package/build/css/bankingThemeDarkDesktop.css +1 -1
- package/build/css/bankingThemeDarkMobile.css +1 -1
- package/build/css/bankingThemeLightDesktop.css +1 -1
- package/build/css/bankingThemeLightMobile.css +1 -1
- package/build/css/paymentThemeDarkDesktop.css +1 -1
- package/build/css/paymentThemeDarkMobile.css +1 -1
- package/build/css/paymentThemeLightDesktop.css +1 -1
- package/build/css/paymentThemeLightMobile.css +1 -1
- package/build/tokens/index.d.ts +3 -0
- package/build/tokens/index.native.d.ts +3 -0
- package/build/tokens/index.native.js +32 -169
- package/build/tokens/index.native.js.map +1 -1
- package/build/tokens/index.web.js +4371 -4567
- package/build/tokens/index.web.js.map +1 -1
- package/build/utils/index.d.ts +31 -397
- package/build/utils/index.native.d.ts +28 -395
- package/build/utils/index.native.js +10 -4531
- package/build/utils/index.native.js.map +1 -1
- package/build/utils/index.web.js +72 -4873
- package/build/utils/index.web.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import _extends from '@babel/runtime/helpers/extends';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import React__default, { useMemo, useCallback, useState, useEffect, useRef, createContext, useContext, Fragment as Fragment$1, Children, cloneElement, forwardRef } from 'react';
|
|
4
|
-
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
5
4
|
import { Appearance, Platform, View, SectionList, TouchableOpacity, Image, Pressable, Linking, AccessibilityInfo, Dimensions, Keyboard, findNodeHandle, StyleSheet, Modal as Modal$1 } from 'react-native';
|
|
6
5
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
7
|
-
import Animated, { Easing, Keyframe, useSharedValue, useAnimatedStyle, withTiming, withRepeat, cancelAnimation, interpolate, withSequence, withDelay, interpolateColor, useDerivedValue, runOnJS } from 'react-native-reanimated';
|
|
8
6
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
9
7
|
import styled, { ThemeProvider } from 'styled-components/native';
|
|
8
|
+
import Animated, { Easing, Keyframe, useSharedValue, useAnimatedStyle, withTiming, withRepeat, cancelAnimation, interpolate, withSequence, withDelay, interpolateColor, useDerivedValue, runOnJS } from 'react-native-reanimated';
|
|
9
|
+
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
10
10
|
import { PortalProvider, PortalHost, Portal } from '@gorhom/portal';
|
|
11
11
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
12
12
|
import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
|
|
@@ -17,407 +17,289 @@ import '@floating-ui/react';
|
|
|
17
17
|
import { ClipPath as ClipPath$1, Circle as Circle$1, Defs as Defs$1, G as G$1, Path as Path$1, Rect as Rect$1, Svg as Svg$1 } from 'react-native-svg';
|
|
18
18
|
import { useFloating, shift, flip, offset, arrow } from '@floating-ui/react-native';
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var getColorScheme=function getColorScheme(){var colorScheme=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'light';if(colorScheme==='light'||colorScheme==='dark'){return colorScheme;}if(colorScheme==='system'){var _Appearance$getColorS;return (_Appearance$getColorS=Appearance.getColorScheme())!=null?_Appearance$getColorS:'light';}return 'light';};
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
* Removes all key-value entries from the list cache.
|
|
24
|
-
*
|
|
25
|
-
* @private
|
|
26
|
-
* @name clear
|
|
27
|
-
* @memberOf ListCache
|
|
28
|
-
*/
|
|
22
|
+
var getMediaQuery=function getMediaQuery(_ref){var min=_ref.min,max=_ref.max;return "screen and (min-width: "+min+"px)"+(max?" and (max-width: "+max+"px)":'');};
|
|
29
23
|
|
|
30
|
-
function
|
|
31
|
-
this.__data__ = [];
|
|
32
|
-
this.size = 0;
|
|
33
|
-
}
|
|
24
|
+
var getPlatformType=function getPlatformType(){if(typeof navigator!=='undefined'&&navigator.product==='ReactNative'){return 'react-native';}if(typeof document!=='undefined'){return 'browser';}if(typeof process!=='undefined'){return 'node';}return 'unknown';};
|
|
34
25
|
|
|
35
|
-
var
|
|
26
|
+
var deviceType={desktop:'desktop',mobile:'mobile'};var useBreakpoint=function useBreakpoint(_ref){var _window;var breakpoints=_ref.breakpoints;var supportsMatchMedia=typeof document!=='undefined'&&typeof window!=='undefined'&&typeof((_window=window)==null?void 0:_window.matchMedia)==='function';var breakpointsTokenAndQueryCollection=useMemo(function(){return supportsMatchMedia?Object.entries(breakpoints).map(function(_ref2,index,breakpointsArray){var _breakpointsArray;var _ref3=_slicedToArray(_ref2,2),token=_ref3[0],screenSize=_ref3[1];var min=screenSize;var maxValue=(_breakpointsArray=breakpointsArray[index+1])==null?void 0:_breakpointsArray[1];var mediaQuery=getMediaQuery({min:min,max:maxValue?maxValue-1:undefined});return {token:token,screenSize:screenSize,mediaQuery:mediaQuery};}):[];},[breakpoints,supportsMatchMedia]);var getMatchedDeviceType=useCallback(function(matchedBreakpoint){var matchedDeviceType=deviceType.mobile;var platform=getPlatformType();if(platform==='react-native'){matchedDeviceType=deviceType.mobile;}else if(platform==='browser'){if(matchedBreakpoint&&['base','xs','s'].includes(matchedBreakpoint)){matchedDeviceType=deviceType.mobile;}else {matchedDeviceType=deviceType.desktop;}}else if(platform==='node'){matchedDeviceType=deviceType.desktop;}return matchedDeviceType;},[]);var getMatchedBreakpoint=useCallback(function(event){var _breakpointsTokenAndQ,_breakpointsTokenAndQ2;var matchedBreakpoint=(_breakpointsTokenAndQ=(_breakpointsTokenAndQ2=breakpointsTokenAndQueryCollection.find(function(_ref4){var _ref4$mediaQuery=_ref4.mediaQuery,mediaQuery=_ref4$mediaQuery===void 0?'':_ref4$mediaQuery;if((event==null?void 0:event.media)===mediaQuery){return true;}if(window.matchMedia(mediaQuery).matches){return true;}return false;}))==null?void 0:_breakpointsTokenAndQ2.token)!=null?_breakpointsTokenAndQ:undefined;return matchedBreakpoint;},[breakpointsTokenAndQueryCollection]);var _useState=useState(function(){var matchedBreakpoint=getMatchedBreakpoint();var matchedDeviceType=getMatchedDeviceType(matchedBreakpoint);return {matchedBreakpoint:matchedBreakpoint,matchedDeviceType:matchedDeviceType};}),_useState2=_slicedToArray(_useState,2),breakpointAndDevice=_useState2[0],setBreakpointAndDevice=_useState2[1];useEffect(function(){if(!supportsMatchMedia){return undefined;}var handleMediaQueryChange=function handleMediaQueryChange(event){setBreakpointAndDevice(function(){var matchedBreakpoint=getMatchedBreakpoint(event);var matchedDeviceType=getMatchedDeviceType(matchedBreakpoint);return {matchedBreakpoint:matchedBreakpoint,matchedDeviceType:matchedDeviceType};});};var mediaQueryInstances=breakpointsTokenAndQueryCollection.map(function(_ref5){var _ref5$mediaQuery=_ref5.mediaQuery,mediaQuery=_ref5$mediaQuery===void 0?'':_ref5$mediaQuery;var mediaQueryInstance=window.matchMedia(mediaQuery);if(mediaQueryInstance.addEventListener){mediaQueryInstance.addEventListener('change',handleMediaQueryChange);}else {mediaQueryInstance.addListener(handleMediaQueryChange);}return mediaQueryInstance;});return function(){mediaQueryInstances.forEach(function(mediaQueryInstance){if(mediaQueryInstance.removeEventListener){mediaQueryInstance.removeEventListener('change',handleMediaQueryChange);}else {mediaQueryInstance.removeListener(handleMediaQueryChange);}});};},[breakpointsTokenAndQueryCollection,getMatchedBreakpoint,getMatchedDeviceType,supportsMatchMedia]);return breakpointAndDevice;};
|
|
27
|
+
|
|
28
|
+
var colorSchemeNamesInput=['light','dark','system'];
|
|
29
|
+
|
|
30
|
+
var useColorScheme=function useColorScheme(){var initialColorScheme=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'light';var _useState=useState(function(){return getColorScheme(initialColorScheme);}),_useState2=_slicedToArray(_useState,2),colorSchemeState=_useState2[0],setColorSchemeState=_useState2[1];var setColorScheme=useCallback(function setThemeMode(colorScheme){if(!colorSchemeNamesInput.includes(colorScheme)){throw new Error("[useColorScheme]: Expected color scheme to be one of ["+colorSchemeNamesInput.toString()+"] but received "+colorScheme);}setColorSchemeState(getColorScheme(colorScheme));},[]);return {colorScheme:colorSchemeState,setColorScheme:setColorScheme};};
|
|
31
|
+
|
|
32
|
+
var isReactNative$4=function isReactNative(){return getPlatformType()==='react-native';};
|
|
33
|
+
|
|
34
|
+
var castWebType=function castWebType(value){return value;};var castNativeType=function castNativeType(value){return value;};
|
|
35
|
+
|
|
36
|
+
function makeBorderSize(size){if(typeof size==='number'){return size+"px";}return size;}
|
|
37
|
+
|
|
38
|
+
var makeMotionTime=function makeMotionTime(time){return time;};
|
|
39
|
+
|
|
40
|
+
var makeSpace=function makeSpace(size){return size+"px";};
|
|
41
|
+
|
|
42
|
+
var makeTypographySize=function makeTypographySize(size){return size+"px";};
|
|
43
|
+
|
|
44
|
+
var makeSize=function makeSize(size){return size+"px";};
|
|
45
|
+
|
|
46
|
+
var toTitleCase=function toTitleCase(inputString){return inputString.toLowerCase().split(' ').map(function(word){return word.charAt(0).toUpperCase()+word.slice(1);}).join(' ');};
|
|
47
|
+
|
|
48
|
+
function usePrevious(value){var ref=useRef();useEffect(function(){ref.current=value;},[value]);return ref.current;}
|
|
49
|
+
|
|
50
|
+
var isRoleMenu=function isRoleMenu(dropdownTriggerer){return isReactNative$4()||dropdownTriggerer!=='SelectInput';};var getActionListContainerRole=function getActionListContainerRole(hasFooterAction,dropdownTriggerer){if(hasFooterAction){return 'dialog';}if(isRoleMenu(dropdownTriggerer)){return 'menu';}return 'listbox';};var getActionListSectionRole=function getActionListSectionRole(){if(isReactNative$4()){return undefined;}return 'group';};var getActionListFooterRole=function getActionListFooterRole(){if(isReactNative$4()){return undefined;}return 'group';};var getSeparatorRole=function getSeparatorRole(){if(isReactNative$4()){return undefined;}return 'separator';};var getActionListItemWrapperRole=function getActionListItemWrapperRole(hasFooterAction,dropdownTriggerer){if(isRoleMenu(dropdownTriggerer)){return undefined;}if(hasFooterAction){return 'listbox';}return undefined;};var getActionListItemRole=function getActionListItemRole(dropdownTriggerer,href,selectionType){if(href){return 'link';}if(isRoleMenu(dropdownTriggerer)){if(selectionType==='multiple'){return 'menuitemcheckbox';}return 'menuitem';}return 'option';};
|
|
51
|
+
|
|
52
|
+
var componentIds$1={ActionList:'ActionList',ActionListHeader:'ActionListHeader',ActionListHeaderIcon:'ActionListHeaderIcon',ActionListFooter:'ActionListFooter',ActionListFooterIcon:'ActionListFooterIcon',ActionListItem:'ActionListItem',ActionListItemAsset:'ActionListItemAsset',ActionListItemIcon:'ActionListItemIcon',ActionListItemText:'ActionListItemText',ActionListSection:'ActionListSection'};
|
|
53
|
+
|
|
54
|
+
var getComponentId=function getComponentId(component){var _component$type;if(!React__default.isValidElement(component))return null;return (_component$type=component.type)==null?void 0:_component$type.componentId;};var isValidAllowedChildren=function isValidAllowedChildren(component,id){return getComponentId(component)===id;};
|
|
55
|
+
|
|
56
|
+
var getActionListSectionPosition=function getActionListSectionPosition(children){var childComponentIdArray=React__default.Children.toArray(children).map(function(child){return getComponentId(child);});var lastActionListSectionIndex=childComponentIdArray.lastIndexOf(componentIds$1.ActionListSection);var isActionListItemPresentAfterSection=childComponentIdArray.slice(lastActionListSectionIndex).includes(componentIds$1.ActionListItem);return {isActionListItemPresentAfterSection:isActionListItemPresentAfterSection,lastActionListSectionIndex:lastActionListSectionIndex};};var actionListAllowedChildren=[componentIds$1.ActionListFooter,componentIds$1.ActionListHeader,componentIds$1.ActionListItem,componentIds$1.ActionListSection];var getActionListProperties=function getActionListProperties(children){var sectionData=[];var currentSection=null;var actionListOptions=[];var actionListHeaderChild=null;var actionListFooterChild=null;var getActionListItemWithId=function getActionListItemWithId(child,hideDivider){if(React__default.isValidElement(child)&&!child.props.isDisabled){actionListOptions.push({title:child.props.title,value:child.props.value,onClickTrigger:function onClickTrigger(value){var _child$props$isSelect;var anchorLink=child.props.href;child.props.onClick==null?void 0:child.props.onClick({name:child.props.value,value:(_child$props$isSelect=child.props.isSelected)!=null?_child$props$isSelect:value});if(anchorLink&&!isReactNative$4()){var _child$props$target;var target=(_child$props$target=child.props.target)!=null?_child$props$target:'_self';window.open(anchorLink,target);if(window.top){window.top.open(anchorLink,target);}}}});var currentIndex=actionListOptions.length-1;var foundSection=sectionData.find(function(v){return v.title===currentSection;});if(foundSection){foundSection==null?void 0:foundSection.data.push(_extends({},child.props,{_index:currentIndex}));}else {sectionData.push({title:currentSection,hideDivider:hideDivider,data:[_extends({},child.props,{_index:currentIndex})]});}var clonedChild=React__default.cloneElement(child,{_index:currentIndex});return clonedChild;}return child;};var isActionListItemPresentAfterSection;var lastActionListSectionIndex;if(isReactNative$4()){var _getActionListSection=getActionListSectionPosition(children);isActionListItemPresentAfterSection=_getActionListSection.isActionListItemPresentAfterSection;lastActionListSectionIndex=_getActionListSection.lastActionListSectionIndex;}var childrenWithId=React__default.Children.map(children,function(child,index){if(React__default.isValidElement(child)){if(isValidAllowedChildren(child,componentIds$1.ActionListHeader)){actionListHeaderChild=child;return null;}if(isValidAllowedChildren(child,componentIds$1.ActionListFooter)){actionListFooterChild=child;return null;}if(isValidAllowedChildren(child,componentIds$1.ActionListSection)){var shouldHideDivider=index===lastActionListSectionIndex&&!isActionListItemPresentAfterSection;return React__default.cloneElement(child,{children:React__default.Children.map(child.props.children,function(childInSection){currentSection=child.props.title;if(isValidAllowedChildren(childInSection,componentIds$1.ActionListItem)){return getActionListItemWithId(childInSection,shouldHideDivider);}return childInSection;}),_hideDivider:isReactNative$4()?shouldHideDivider:undefined});}if(isValidAllowedChildren(child,componentIds$1.ActionListItem)){return getActionListItemWithId(child,true);}throw new Error("[ActionList]: Only "+actionListAllowedChildren.join(', ')+" supported inside ActionList");}return child;});return {sectionData:sectionData,childrenWithId:childrenWithId,actionListFooterChild:actionListFooterChild,actionListHeaderChild:actionListHeaderChild,actionListOptions:actionListOptions};};var validateActionListItemProps=function validateActionListItemProps(_ref){var leading=_ref.leading,trailing=_ref.trailing;React__default.Children.map(trailing,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemText)){throw new Error("[ActionListItem]: Only "+componentIds$1.ActionListItemIcon+" and "+componentIds$1.ActionListItemText+" are allowed in trailing prop");}});React__default.Children.map(leading,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemText)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemAsset)){throw new Error("[ActionListItem]: Only "+componentIds$1.ActionListItemIcon+", "+componentIds$1.ActionListItemAsset+", and "+componentIds$1.ActionListItemText+" are allowed in leading prop");}});};var getNormalTextColor=function getNormalTextColor(isDisabled){var _ref2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},isMuted=_ref2.isMuted;if(isDisabled){return 'surface.text.placeholder.lowContrast';}if(isMuted){return 'surface.text.muted.lowContrast';}return 'surface.text.normal.lowContrast';};
|
|
57
|
+
|
|
58
|
+
var getBaseActionListStyles=function getBaseActionListStyles(props){var theme=props.theme,_props$surfaceLevel=props.surfaceLevel,surfaceLevel=_props$surfaceLevel===void 0?2:_props$surfaceLevel,isInBottomSheet=props.isInBottomSheet;var backgroundColor=theme.colors.surface.background["level"+surfaceLevel].lowContrast;return {backgroundColor:backgroundColor,borderWidth:isInBottomSheet?undefined:theme.border.width.thin,borderColor:theme.colors.surface.border.normal.lowContrast,borderStyle:isInBottomSheet?undefined:'solid',borderRadius:makeSize(theme.border.radius.medium),boxShadow:isInBottomSheet||isReactNative$4()?undefined:castWebType(theme.elevation.midRaised)};};
|
|
59
|
+
|
|
60
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
36
61
|
|
|
37
62
|
/**
|
|
38
|
-
*
|
|
39
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
40
|
-
* comparison between two values to determine if they are equivalent.
|
|
63
|
+
* Checks if `value` is classified as an `Array` object.
|
|
41
64
|
*
|
|
42
65
|
* @static
|
|
43
66
|
* @memberOf _
|
|
44
|
-
* @since
|
|
67
|
+
* @since 0.1.0
|
|
45
68
|
* @category Lang
|
|
46
|
-
* @param {*} value The value to
|
|
47
|
-
* @
|
|
48
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
69
|
+
* @param {*} value The value to check.
|
|
70
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
49
71
|
* @example
|
|
50
72
|
*
|
|
51
|
-
*
|
|
52
|
-
* var other = { 'a': 1 };
|
|
53
|
-
*
|
|
54
|
-
* _.eq(object, object);
|
|
73
|
+
* _.isArray([1, 2, 3]);
|
|
55
74
|
* // => true
|
|
56
75
|
*
|
|
57
|
-
* _.
|
|
76
|
+
* _.isArray(document.body.children);
|
|
58
77
|
* // => false
|
|
59
78
|
*
|
|
60
|
-
* _.
|
|
61
|
-
* // => true
|
|
62
|
-
*
|
|
63
|
-
* _.eq('a', Object('a'));
|
|
79
|
+
* _.isArray('abc');
|
|
64
80
|
* // => false
|
|
65
81
|
*
|
|
66
|
-
* _.
|
|
67
|
-
* // =>
|
|
82
|
+
* _.isArray(_.noop);
|
|
83
|
+
* // => false
|
|
68
84
|
*/
|
|
69
85
|
|
|
70
|
-
|
|
71
|
-
return value === other || (value !== value && other !== other);
|
|
72
|
-
}
|
|
86
|
+
var isArray$4 = Array.isArray;
|
|
73
87
|
|
|
74
|
-
var
|
|
88
|
+
var isArray_1 = isArray$4;
|
|
75
89
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
80
|
-
*
|
|
81
|
-
* @private
|
|
82
|
-
* @param {Array} array The array to inspect.
|
|
83
|
-
* @param {*} key The key to search for.
|
|
84
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
85
|
-
*/
|
|
86
|
-
function assocIndexOf$4(array, key) {
|
|
87
|
-
var length = array.length;
|
|
88
|
-
while (length--) {
|
|
89
|
-
if (eq$3(array[length][0], key)) {
|
|
90
|
-
return length;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
return -1;
|
|
94
|
-
}
|
|
90
|
+
/** Detect free variable `global` from Node.js. */
|
|
95
91
|
|
|
96
|
-
var
|
|
92
|
+
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
97
93
|
|
|
98
|
-
var
|
|
94
|
+
var _freeGlobal = freeGlobal$1;
|
|
99
95
|
|
|
100
|
-
|
|
101
|
-
var arrayProto = Array.prototype;
|
|
96
|
+
var freeGlobal = _freeGlobal;
|
|
102
97
|
|
|
103
|
-
/**
|
|
104
|
-
var
|
|
98
|
+
/** Detect free variable `self`. */
|
|
99
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
105
100
|
|
|
106
|
-
/**
|
|
107
|
-
|
|
108
|
-
*
|
|
109
|
-
* @private
|
|
110
|
-
* @name delete
|
|
111
|
-
* @memberOf ListCache
|
|
112
|
-
* @param {string} key The key of the value to remove.
|
|
113
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
114
|
-
*/
|
|
115
|
-
function listCacheDelete$1(key) {
|
|
116
|
-
var data = this.__data__,
|
|
117
|
-
index = assocIndexOf$3(data, key);
|
|
101
|
+
/** Used as a reference to the global object. */
|
|
102
|
+
var root$7 = freeGlobal || freeSelf || Function('return this')();
|
|
118
103
|
|
|
119
|
-
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
var lastIndex = data.length - 1;
|
|
123
|
-
if (index == lastIndex) {
|
|
124
|
-
data.pop();
|
|
125
|
-
} else {
|
|
126
|
-
splice.call(data, index, 1);
|
|
127
|
-
}
|
|
128
|
-
--this.size;
|
|
129
|
-
return true;
|
|
130
|
-
}
|
|
104
|
+
var _root = root$7;
|
|
131
105
|
|
|
132
|
-
var
|
|
106
|
+
var root$6 = _root;
|
|
133
107
|
|
|
134
|
-
|
|
108
|
+
/** Built-in value references. */
|
|
109
|
+
var Symbol$3 = root$6.Symbol;
|
|
135
110
|
|
|
136
|
-
|
|
137
|
-
* Gets the list cache value for `key`.
|
|
138
|
-
*
|
|
139
|
-
* @private
|
|
140
|
-
* @name get
|
|
141
|
-
* @memberOf ListCache
|
|
142
|
-
* @param {string} key The key of the value to get.
|
|
143
|
-
* @returns {*} Returns the entry value.
|
|
144
|
-
*/
|
|
145
|
-
function listCacheGet$1(key) {
|
|
146
|
-
var data = this.__data__,
|
|
147
|
-
index = assocIndexOf$2(data, key);
|
|
111
|
+
var _Symbol = Symbol$3;
|
|
148
112
|
|
|
149
|
-
|
|
150
|
-
}
|
|
113
|
+
var Symbol$2 = _Symbol;
|
|
151
114
|
|
|
152
|
-
|
|
115
|
+
/** Used for built-in method references. */
|
|
116
|
+
var objectProto$8 = Object.prototype;
|
|
153
117
|
|
|
154
|
-
|
|
118
|
+
/** Used to check objects for own properties. */
|
|
119
|
+
var hasOwnProperty$6 = objectProto$8.hasOwnProperty;
|
|
155
120
|
|
|
156
121
|
/**
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
* @name has
|
|
161
|
-
* @memberOf ListCache
|
|
162
|
-
* @param {string} key The key of the entry to check.
|
|
163
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
122
|
+
* Used to resolve the
|
|
123
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
124
|
+
* of values.
|
|
164
125
|
*/
|
|
165
|
-
|
|
166
|
-
return assocIndexOf$1(this.__data__, key) > -1;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
var _listCacheHas = listCacheHas$1;
|
|
126
|
+
var nativeObjectToString$1 = objectProto$8.toString;
|
|
170
127
|
|
|
171
|
-
|
|
128
|
+
/** Built-in value references. */
|
|
129
|
+
var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
|
|
172
130
|
|
|
173
131
|
/**
|
|
174
|
-
*
|
|
132
|
+
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
175
133
|
*
|
|
176
134
|
* @private
|
|
177
|
-
* @
|
|
178
|
-
* @
|
|
179
|
-
* @param {string} key The key of the value to set.
|
|
180
|
-
* @param {*} value The value to set.
|
|
181
|
-
* @returns {Object} Returns the list cache instance.
|
|
135
|
+
* @param {*} value The value to query.
|
|
136
|
+
* @returns {string} Returns the raw `toStringTag`.
|
|
182
137
|
*/
|
|
183
|
-
function
|
|
184
|
-
var
|
|
185
|
-
|
|
138
|
+
function getRawTag$1(value) {
|
|
139
|
+
var isOwn = hasOwnProperty$6.call(value, symToStringTag$1),
|
|
140
|
+
tag = value[symToStringTag$1];
|
|
186
141
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
|
|
142
|
+
try {
|
|
143
|
+
value[symToStringTag$1] = undefined;
|
|
144
|
+
var unmasked = true;
|
|
145
|
+
} catch (e) {}
|
|
146
|
+
|
|
147
|
+
var result = nativeObjectToString$1.call(value);
|
|
148
|
+
if (unmasked) {
|
|
149
|
+
if (isOwn) {
|
|
150
|
+
value[symToStringTag$1] = tag;
|
|
151
|
+
} else {
|
|
152
|
+
delete value[symToStringTag$1];
|
|
153
|
+
}
|
|
192
154
|
}
|
|
193
|
-
return
|
|
155
|
+
return result;
|
|
194
156
|
}
|
|
195
157
|
|
|
196
|
-
var
|
|
158
|
+
var _getRawTag = getRawTag$1;
|
|
197
159
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
listCacheHas = _listCacheHas,
|
|
202
|
-
listCacheSet = _listCacheSet;
|
|
160
|
+
/** Used for built-in method references. */
|
|
161
|
+
|
|
162
|
+
var objectProto$7 = Object.prototype;
|
|
203
163
|
|
|
204
164
|
/**
|
|
205
|
-
*
|
|
165
|
+
* Used to resolve the
|
|
166
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
167
|
+
* of values.
|
|
168
|
+
*/
|
|
169
|
+
var nativeObjectToString = objectProto$7.toString;
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Converts `value` to a string using `Object.prototype.toString`.
|
|
206
173
|
*
|
|
207
174
|
* @private
|
|
208
|
-
* @
|
|
209
|
-
* @
|
|
175
|
+
* @param {*} value The value to convert.
|
|
176
|
+
* @returns {string} Returns the converted string.
|
|
210
177
|
*/
|
|
211
|
-
function
|
|
212
|
-
|
|
213
|
-
length = entries == null ? 0 : entries.length;
|
|
214
|
-
|
|
215
|
-
this.clear();
|
|
216
|
-
while (++index < length) {
|
|
217
|
-
var entry = entries[index];
|
|
218
|
-
this.set(entry[0], entry[1]);
|
|
219
|
-
}
|
|
178
|
+
function objectToString$1(value) {
|
|
179
|
+
return nativeObjectToString.call(value);
|
|
220
180
|
}
|
|
221
181
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
ListCache$4.prototype.set = listCacheSet;
|
|
182
|
+
var _objectToString = objectToString$1;
|
|
183
|
+
|
|
184
|
+
var Symbol$1 = _Symbol,
|
|
185
|
+
getRawTag = _getRawTag,
|
|
186
|
+
objectToString = _objectToString;
|
|
228
187
|
|
|
229
|
-
|
|
188
|
+
/** `Object#toString` result references. */
|
|
189
|
+
var nullTag = '[object Null]',
|
|
190
|
+
undefinedTag = '[object Undefined]';
|
|
230
191
|
|
|
231
|
-
|
|
192
|
+
/** Built-in value references. */
|
|
193
|
+
var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
|
|
232
194
|
|
|
233
195
|
/**
|
|
234
|
-
*
|
|
196
|
+
* The base implementation of `getTag` without fallbacks for buggy environments.
|
|
235
197
|
*
|
|
236
198
|
* @private
|
|
237
|
-
* @
|
|
238
|
-
* @
|
|
199
|
+
* @param {*} value The value to query.
|
|
200
|
+
* @returns {string} Returns the `toStringTag`.
|
|
239
201
|
*/
|
|
240
|
-
function
|
|
241
|
-
|
|
242
|
-
|
|
202
|
+
function baseGetTag$6(value) {
|
|
203
|
+
if (value == null) {
|
|
204
|
+
return value === undefined ? undefinedTag : nullTag;
|
|
205
|
+
}
|
|
206
|
+
return (symToStringTag && symToStringTag in Object(value))
|
|
207
|
+
? getRawTag(value)
|
|
208
|
+
: objectToString(value);
|
|
243
209
|
}
|
|
244
210
|
|
|
245
|
-
var
|
|
211
|
+
var _baseGetTag = baseGetTag$6;
|
|
246
212
|
|
|
247
213
|
/**
|
|
248
|
-
*
|
|
214
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
215
|
+
* and has a `typeof` result of "object".
|
|
249
216
|
*
|
|
250
|
-
* @
|
|
251
|
-
* @
|
|
252
|
-
* @
|
|
253
|
-
* @
|
|
254
|
-
* @
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
function stackDelete$1(key) {
|
|
258
|
-
var data = this.__data__,
|
|
259
|
-
result = data['delete'](key);
|
|
260
|
-
|
|
261
|
-
this.size = data.size;
|
|
262
|
-
return result;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
var _stackDelete = stackDelete$1;
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
* Gets the stack value for `key`.
|
|
217
|
+
* @static
|
|
218
|
+
* @memberOf _
|
|
219
|
+
* @since 4.0.0
|
|
220
|
+
* @category Lang
|
|
221
|
+
* @param {*} value The value to check.
|
|
222
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
223
|
+
* @example
|
|
269
224
|
*
|
|
270
|
-
*
|
|
271
|
-
*
|
|
272
|
-
* @memberOf Stack
|
|
273
|
-
* @param {string} key The key of the value to get.
|
|
274
|
-
* @returns {*} Returns the entry value.
|
|
275
|
-
*/
|
|
276
|
-
|
|
277
|
-
function stackGet$1(key) {
|
|
278
|
-
return this.__data__.get(key);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
var _stackGet = stackGet$1;
|
|
282
|
-
|
|
283
|
-
/**
|
|
284
|
-
* Checks if a stack value for `key` exists.
|
|
225
|
+
* _.isObjectLike({});
|
|
226
|
+
* // => true
|
|
285
227
|
*
|
|
286
|
-
*
|
|
287
|
-
*
|
|
288
|
-
* @memberOf Stack
|
|
289
|
-
* @param {string} key The key of the entry to check.
|
|
290
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
291
|
-
*/
|
|
292
|
-
|
|
293
|
-
function stackHas$1(key) {
|
|
294
|
-
return this.__data__.has(key);
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
var _stackHas = stackHas$1;
|
|
298
|
-
|
|
299
|
-
/** Detect free variable `global` from Node.js. */
|
|
300
|
-
|
|
301
|
-
var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
302
|
-
|
|
303
|
-
var _freeGlobal = freeGlobal$1;
|
|
304
|
-
|
|
305
|
-
var freeGlobal = _freeGlobal;
|
|
306
|
-
|
|
307
|
-
/** Detect free variable `self`. */
|
|
308
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
309
|
-
|
|
310
|
-
/** Used as a reference to the global object. */
|
|
311
|
-
var root$8 = freeGlobal || freeSelf || Function('return this')();
|
|
312
|
-
|
|
313
|
-
var _root = root$8;
|
|
314
|
-
|
|
315
|
-
var root$7 = _root;
|
|
316
|
-
|
|
317
|
-
/** Built-in value references. */
|
|
318
|
-
var Symbol$5 = root$7.Symbol;
|
|
319
|
-
|
|
320
|
-
var _Symbol = Symbol$5;
|
|
321
|
-
|
|
322
|
-
var Symbol$4 = _Symbol;
|
|
323
|
-
|
|
324
|
-
/** Used for built-in method references. */
|
|
325
|
-
var objectProto$c = Object.prototype;
|
|
326
|
-
|
|
327
|
-
/** Used to check objects for own properties. */
|
|
328
|
-
var hasOwnProperty$a = objectProto$c.hasOwnProperty;
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* Used to resolve the
|
|
332
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
333
|
-
* of values.
|
|
334
|
-
*/
|
|
335
|
-
var nativeObjectToString$1 = objectProto$c.toString;
|
|
336
|
-
|
|
337
|
-
/** Built-in value references. */
|
|
338
|
-
var symToStringTag$1 = Symbol$4 ? Symbol$4.toStringTag : undefined;
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
|
|
228
|
+
* _.isObjectLike([1, 2, 3]);
|
|
229
|
+
* // => true
|
|
342
230
|
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
*
|
|
231
|
+
* _.isObjectLike(_.noop);
|
|
232
|
+
* // => false
|
|
233
|
+
*
|
|
234
|
+
* _.isObjectLike(null);
|
|
235
|
+
* // => false
|
|
346
236
|
*/
|
|
347
|
-
function getRawTag$1(value) {
|
|
348
|
-
var isOwn = hasOwnProperty$a.call(value, symToStringTag$1),
|
|
349
|
-
tag = value[symToStringTag$1];
|
|
350
|
-
|
|
351
|
-
try {
|
|
352
|
-
value[symToStringTag$1] = undefined;
|
|
353
|
-
var unmasked = true;
|
|
354
|
-
} catch (e) {}
|
|
355
237
|
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
if (isOwn) {
|
|
359
|
-
value[symToStringTag$1] = tag;
|
|
360
|
-
} else {
|
|
361
|
-
delete value[symToStringTag$1];
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
return result;
|
|
238
|
+
function isObjectLike$5(value) {
|
|
239
|
+
return value != null && typeof value == 'object';
|
|
365
240
|
}
|
|
366
241
|
|
|
367
|
-
var
|
|
368
|
-
|
|
369
|
-
/** Used for built-in method references. */
|
|
242
|
+
var isObjectLike_1 = isObjectLike$5;
|
|
370
243
|
|
|
371
|
-
var
|
|
244
|
+
var baseGetTag$5 = _baseGetTag,
|
|
245
|
+
isObjectLike$4 = isObjectLike_1;
|
|
372
246
|
|
|
373
|
-
/**
|
|
374
|
-
|
|
375
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
376
|
-
* of values.
|
|
377
|
-
*/
|
|
378
|
-
var nativeObjectToString = objectProto$b.toString;
|
|
247
|
+
/** `Object#toString` result references. */
|
|
248
|
+
var symbolTag = '[object Symbol]';
|
|
379
249
|
|
|
380
250
|
/**
|
|
381
|
-
*
|
|
251
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
382
252
|
*
|
|
383
|
-
* @
|
|
384
|
-
* @
|
|
385
|
-
* @
|
|
253
|
+
* @static
|
|
254
|
+
* @memberOf _
|
|
255
|
+
* @since 4.0.0
|
|
256
|
+
* @category Lang
|
|
257
|
+
* @param {*} value The value to check.
|
|
258
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
259
|
+
* @example
|
|
260
|
+
*
|
|
261
|
+
* _.isSymbol(Symbol.iterator);
|
|
262
|
+
* // => true
|
|
263
|
+
*
|
|
264
|
+
* _.isSymbol('abc');
|
|
265
|
+
* // => false
|
|
386
266
|
*/
|
|
387
|
-
function
|
|
388
|
-
return
|
|
267
|
+
function isSymbol$4(value) {
|
|
268
|
+
return typeof value == 'symbol' ||
|
|
269
|
+
(isObjectLike$4(value) && baseGetTag$5(value) == symbolTag);
|
|
389
270
|
}
|
|
390
271
|
|
|
391
|
-
var
|
|
392
|
-
|
|
393
|
-
var Symbol$3 = _Symbol,
|
|
394
|
-
getRawTag = _getRawTag,
|
|
395
|
-
objectToString = _objectToString;
|
|
272
|
+
var isSymbol_1 = isSymbol$4;
|
|
396
273
|
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
undefinedTag = '[object Undefined]';
|
|
274
|
+
var isArray$3 = isArray_1,
|
|
275
|
+
isSymbol$3 = isSymbol_1;
|
|
400
276
|
|
|
401
|
-
/**
|
|
402
|
-
var
|
|
277
|
+
/** Used to match property names within property paths. */
|
|
278
|
+
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
|
|
279
|
+
reIsPlainProp = /^\w*$/;
|
|
403
280
|
|
|
404
281
|
/**
|
|
405
|
-
*
|
|
282
|
+
* Checks if `value` is a property name and not a property path.
|
|
406
283
|
*
|
|
407
284
|
* @private
|
|
408
|
-
* @param {*} value The value to
|
|
409
|
-
* @
|
|
285
|
+
* @param {*} value The value to check.
|
|
286
|
+
* @param {Object} [object] The object to query keys on.
|
|
287
|
+
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
410
288
|
*/
|
|
411
|
-
function
|
|
412
|
-
if (value
|
|
413
|
-
return
|
|
289
|
+
function isKey$1(value, object) {
|
|
290
|
+
if (isArray$3(value)) {
|
|
291
|
+
return false;
|
|
414
292
|
}
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
293
|
+
var type = typeof value;
|
|
294
|
+
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
|
|
295
|
+
value == null || isSymbol$3(value)) {
|
|
296
|
+
return true;
|
|
297
|
+
}
|
|
298
|
+
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
299
|
+
(object != null && value in Object(object));
|
|
418
300
|
}
|
|
419
301
|
|
|
420
|
-
var
|
|
302
|
+
var _isKey = isKey$1;
|
|
421
303
|
|
|
422
304
|
/**
|
|
423
305
|
* Checks if `value` is the
|
|
@@ -445,15 +327,15 @@ var _baseGetTag = baseGetTag$7;
|
|
|
445
327
|
* // => false
|
|
446
328
|
*/
|
|
447
329
|
|
|
448
|
-
function isObject$
|
|
330
|
+
function isObject$3(value) {
|
|
449
331
|
var type = typeof value;
|
|
450
332
|
return value != null && (type == 'object' || type == 'function');
|
|
451
333
|
}
|
|
452
334
|
|
|
453
|
-
var isObject_1 = isObject$
|
|
335
|
+
var isObject_1 = isObject$3;
|
|
454
336
|
|
|
455
|
-
var baseGetTag$
|
|
456
|
-
isObject$
|
|
337
|
+
var baseGetTag$4 = _baseGetTag,
|
|
338
|
+
isObject$2 = isObject_1;
|
|
457
339
|
|
|
458
340
|
/** `Object#toString` result references. */
|
|
459
341
|
var asyncTag = '[object AsyncFunction]',
|
|
@@ -478,22 +360,22 @@ var asyncTag = '[object AsyncFunction]',
|
|
|
478
360
|
* _.isFunction(/abc/);
|
|
479
361
|
* // => false
|
|
480
362
|
*/
|
|
481
|
-
function isFunction$
|
|
482
|
-
if (!isObject$
|
|
363
|
+
function isFunction$2(value) {
|
|
364
|
+
if (!isObject$2(value)) {
|
|
483
365
|
return false;
|
|
484
366
|
}
|
|
485
367
|
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
486
368
|
// in Safari 9 which returns 'object' for typed arrays and other constructors.
|
|
487
|
-
var tag = baseGetTag$
|
|
369
|
+
var tag = baseGetTag$4(value);
|
|
488
370
|
return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
489
371
|
}
|
|
490
372
|
|
|
491
|
-
var isFunction_1 = isFunction$
|
|
373
|
+
var isFunction_1 = isFunction$2;
|
|
492
374
|
|
|
493
|
-
var root$
|
|
375
|
+
var root$5 = _root;
|
|
494
376
|
|
|
495
377
|
/** Used to detect overreaching core-js shims. */
|
|
496
|
-
var coreJsData$1 = root$
|
|
378
|
+
var coreJsData$1 = root$5['__core-js_shared__'];
|
|
497
379
|
|
|
498
380
|
var _coreJsData = coreJsData$1;
|
|
499
381
|
|
|
@@ -520,10 +402,10 @@ var _isMasked = isMasked$1;
|
|
|
520
402
|
|
|
521
403
|
/** Used for built-in method references. */
|
|
522
404
|
|
|
523
|
-
var funcProto$
|
|
405
|
+
var funcProto$1 = Function.prototype;
|
|
524
406
|
|
|
525
407
|
/** Used to resolve the decompiled source of functions. */
|
|
526
|
-
var funcToString$
|
|
408
|
+
var funcToString$1 = funcProto$1.toString;
|
|
527
409
|
|
|
528
410
|
/**
|
|
529
411
|
* Converts `func` to its source code.
|
|
@@ -535,7 +417,7 @@ var funcToString$2 = funcProto$2.toString;
|
|
|
535
417
|
function toSource$2(func) {
|
|
536
418
|
if (func != null) {
|
|
537
419
|
try {
|
|
538
|
-
return funcToString$
|
|
420
|
+
return funcToString$1.call(func);
|
|
539
421
|
} catch (e) {}
|
|
540
422
|
try {
|
|
541
423
|
return (func + '');
|
|
@@ -546,9 +428,9 @@ function toSource$2(func) {
|
|
|
546
428
|
|
|
547
429
|
var _toSource = toSource$2;
|
|
548
430
|
|
|
549
|
-
var isFunction$
|
|
431
|
+
var isFunction$1 = isFunction_1,
|
|
550
432
|
isMasked = _isMasked,
|
|
551
|
-
isObject$
|
|
433
|
+
isObject$1 = isObject_1,
|
|
552
434
|
toSource$1 = _toSource;
|
|
553
435
|
|
|
554
436
|
/**
|
|
@@ -561,18 +443,18 @@ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
|
561
443
|
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
562
444
|
|
|
563
445
|
/** Used for built-in method references. */
|
|
564
|
-
var funcProto
|
|
565
|
-
objectProto$
|
|
446
|
+
var funcProto = Function.prototype,
|
|
447
|
+
objectProto$6 = Object.prototype;
|
|
566
448
|
|
|
567
449
|
/** Used to resolve the decompiled source of functions. */
|
|
568
|
-
var funcToString
|
|
450
|
+
var funcToString = funcProto.toString;
|
|
569
451
|
|
|
570
452
|
/** Used to check objects for own properties. */
|
|
571
|
-
var hasOwnProperty$
|
|
453
|
+
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
572
454
|
|
|
573
455
|
/** Used to detect if a method is native. */
|
|
574
456
|
var reIsNative = RegExp('^' +
|
|
575
|
-
funcToString
|
|
457
|
+
funcToString.call(hasOwnProperty$5).replace(reRegExpChar, '\\$&')
|
|
576
458
|
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
577
459
|
);
|
|
578
460
|
|
|
@@ -585,10 +467,10 @@ var reIsNative = RegExp('^' +
|
|
|
585
467
|
* else `false`.
|
|
586
468
|
*/
|
|
587
469
|
function baseIsNative$1(value) {
|
|
588
|
-
if (!isObject$
|
|
470
|
+
if (!isObject$1(value) || isMasked(value)) {
|
|
589
471
|
return false;
|
|
590
472
|
}
|
|
591
|
-
var pattern = isFunction$
|
|
473
|
+
var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor;
|
|
592
474
|
return pattern.test(toSource$1(value));
|
|
593
475
|
}
|
|
594
476
|
|
|
@@ -620,20 +502,12 @@ var baseIsNative = _baseIsNative,
|
|
|
620
502
|
* @param {string} key The key of the method to get.
|
|
621
503
|
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
622
504
|
*/
|
|
623
|
-
function getNative$
|
|
505
|
+
function getNative$6(object, key) {
|
|
624
506
|
var value = getValue(object, key);
|
|
625
507
|
return baseIsNative(value) ? value : undefined;
|
|
626
508
|
}
|
|
627
509
|
|
|
628
|
-
var _getNative = getNative$
|
|
629
|
-
|
|
630
|
-
var getNative$6 = _getNative,
|
|
631
|
-
root$5 = _root;
|
|
632
|
-
|
|
633
|
-
/* Built-in method references that are verified to be native. */
|
|
634
|
-
var Map$3 = getNative$6(root$5, 'Map');
|
|
635
|
-
|
|
636
|
-
var _Map = Map$3;
|
|
510
|
+
var _getNative = getNative$6;
|
|
637
511
|
|
|
638
512
|
var getNative$5 = _getNative;
|
|
639
513
|
|
|
@@ -683,10 +557,10 @@ var nativeCreate$2 = _nativeCreate;
|
|
|
683
557
|
var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
|
|
684
558
|
|
|
685
559
|
/** Used for built-in method references. */
|
|
686
|
-
var objectProto$
|
|
560
|
+
var objectProto$5 = Object.prototype;
|
|
687
561
|
|
|
688
562
|
/** Used to check objects for own properties. */
|
|
689
|
-
var hasOwnProperty$
|
|
563
|
+
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
690
564
|
|
|
691
565
|
/**
|
|
692
566
|
* Gets the hash value for `key`.
|
|
@@ -703,7 +577,7 @@ function hashGet$1(key) {
|
|
|
703
577
|
var result = data[key];
|
|
704
578
|
return result === HASH_UNDEFINED$1 ? undefined : result;
|
|
705
579
|
}
|
|
706
|
-
return hasOwnProperty$
|
|
580
|
+
return hasOwnProperty$4.call(data, key) ? data[key] : undefined;
|
|
707
581
|
}
|
|
708
582
|
|
|
709
583
|
var _hashGet = hashGet$1;
|
|
@@ -711,10 +585,10 @@ var _hashGet = hashGet$1;
|
|
|
711
585
|
var nativeCreate$1 = _nativeCreate;
|
|
712
586
|
|
|
713
587
|
/** Used for built-in method references. */
|
|
714
|
-
var objectProto$
|
|
588
|
+
var objectProto$4 = Object.prototype;
|
|
715
589
|
|
|
716
590
|
/** Used to check objects for own properties. */
|
|
717
|
-
var hasOwnProperty$
|
|
591
|
+
var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
|
|
718
592
|
|
|
719
593
|
/**
|
|
720
594
|
* Checks if a hash value for `key` exists.
|
|
@@ -727,7 +601,7 @@ var hasOwnProperty$7 = objectProto$8.hasOwnProperty;
|
|
|
727
601
|
*/
|
|
728
602
|
function hashHas$1(key) {
|
|
729
603
|
var data = this.__data__;
|
|
730
|
-
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$
|
|
604
|
+
return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty$3.call(data, key);
|
|
731
605
|
}
|
|
732
606
|
|
|
733
607
|
var _hashHas = hashHas$1;
|
|
@@ -789,1328 +663,389 @@ Hash$1.prototype.set = hashSet;
|
|
|
789
663
|
|
|
790
664
|
var _Hash = Hash$1;
|
|
791
665
|
|
|
792
|
-
var Hash = _Hash,
|
|
793
|
-
ListCache$2 = _ListCache,
|
|
794
|
-
Map$2 = _Map;
|
|
795
|
-
|
|
796
|
-
/**
|
|
797
|
-
* Removes all key-value entries from the map.
|
|
798
|
-
*
|
|
799
|
-
* @private
|
|
800
|
-
* @name clear
|
|
801
|
-
* @memberOf MapCache
|
|
802
|
-
*/
|
|
803
|
-
function mapCacheClear$1() {
|
|
804
|
-
this.size = 0;
|
|
805
|
-
this.__data__ = {
|
|
806
|
-
'hash': new Hash,
|
|
807
|
-
'map': new (Map$2 || ListCache$2),
|
|
808
|
-
'string': new Hash
|
|
809
|
-
};
|
|
810
|
-
}
|
|
811
|
-
|
|
812
|
-
var _mapCacheClear = mapCacheClear$1;
|
|
813
|
-
|
|
814
|
-
/**
|
|
815
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
816
|
-
*
|
|
817
|
-
* @private
|
|
818
|
-
* @param {*} value The value to check.
|
|
819
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
820
|
-
*/
|
|
821
|
-
|
|
822
|
-
function isKeyable$1(value) {
|
|
823
|
-
var type = typeof value;
|
|
824
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
825
|
-
? (value !== '__proto__')
|
|
826
|
-
: (value === null);
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
var _isKeyable = isKeyable$1;
|
|
830
|
-
|
|
831
|
-
var isKeyable = _isKeyable;
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* Gets the data for `map`.
|
|
835
|
-
*
|
|
836
|
-
* @private
|
|
837
|
-
* @param {Object} map The map to query.
|
|
838
|
-
* @param {string} key The reference key.
|
|
839
|
-
* @returns {*} Returns the map data.
|
|
840
|
-
*/
|
|
841
|
-
function getMapData$4(map, key) {
|
|
842
|
-
var data = map.__data__;
|
|
843
|
-
return isKeyable(key)
|
|
844
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
845
|
-
: data.map;
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
var _getMapData = getMapData$4;
|
|
849
|
-
|
|
850
|
-
var getMapData$3 = _getMapData;
|
|
851
|
-
|
|
852
|
-
/**
|
|
853
|
-
* Removes `key` and its value from the map.
|
|
854
|
-
*
|
|
855
|
-
* @private
|
|
856
|
-
* @name delete
|
|
857
|
-
* @memberOf MapCache
|
|
858
|
-
* @param {string} key The key of the value to remove.
|
|
859
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
860
|
-
*/
|
|
861
|
-
function mapCacheDelete$1(key) {
|
|
862
|
-
var result = getMapData$3(this, key)['delete'](key);
|
|
863
|
-
this.size -= result ? 1 : 0;
|
|
864
|
-
return result;
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
var _mapCacheDelete = mapCacheDelete$1;
|
|
868
|
-
|
|
869
|
-
var getMapData$2 = _getMapData;
|
|
870
|
-
|
|
871
|
-
/**
|
|
872
|
-
* Gets the map value for `key`.
|
|
873
|
-
*
|
|
874
|
-
* @private
|
|
875
|
-
* @name get
|
|
876
|
-
* @memberOf MapCache
|
|
877
|
-
* @param {string} key The key of the value to get.
|
|
878
|
-
* @returns {*} Returns the entry value.
|
|
879
|
-
*/
|
|
880
|
-
function mapCacheGet$1(key) {
|
|
881
|
-
return getMapData$2(this, key).get(key);
|
|
882
|
-
}
|
|
883
|
-
|
|
884
|
-
var _mapCacheGet = mapCacheGet$1;
|
|
885
|
-
|
|
886
|
-
var getMapData$1 = _getMapData;
|
|
887
|
-
|
|
888
|
-
/**
|
|
889
|
-
* Checks if a map value for `key` exists.
|
|
890
|
-
*
|
|
891
|
-
* @private
|
|
892
|
-
* @name has
|
|
893
|
-
* @memberOf MapCache
|
|
894
|
-
* @param {string} key The key of the entry to check.
|
|
895
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
896
|
-
*/
|
|
897
|
-
function mapCacheHas$1(key) {
|
|
898
|
-
return getMapData$1(this, key).has(key);
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
var _mapCacheHas = mapCacheHas$1;
|
|
902
|
-
|
|
903
|
-
var getMapData = _getMapData;
|
|
904
|
-
|
|
905
|
-
/**
|
|
906
|
-
* Sets the map `key` to `value`.
|
|
907
|
-
*
|
|
908
|
-
* @private
|
|
909
|
-
* @name set
|
|
910
|
-
* @memberOf MapCache
|
|
911
|
-
* @param {string} key The key of the value to set.
|
|
912
|
-
* @param {*} value The value to set.
|
|
913
|
-
* @returns {Object} Returns the map cache instance.
|
|
914
|
-
*/
|
|
915
|
-
function mapCacheSet$1(key, value) {
|
|
916
|
-
var data = getMapData(this, key),
|
|
917
|
-
size = data.size;
|
|
918
|
-
|
|
919
|
-
data.set(key, value);
|
|
920
|
-
this.size += data.size == size ? 0 : 1;
|
|
921
|
-
return this;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
var _mapCacheSet = mapCacheSet$1;
|
|
925
|
-
|
|
926
|
-
var mapCacheClear = _mapCacheClear,
|
|
927
|
-
mapCacheDelete = _mapCacheDelete,
|
|
928
|
-
mapCacheGet = _mapCacheGet,
|
|
929
|
-
mapCacheHas = _mapCacheHas,
|
|
930
|
-
mapCacheSet = _mapCacheSet;
|
|
931
|
-
|
|
932
|
-
/**
|
|
933
|
-
* Creates a map cache object to store key-value pairs.
|
|
934
|
-
*
|
|
935
|
-
* @private
|
|
936
|
-
* @constructor
|
|
937
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
938
|
-
*/
|
|
939
|
-
function MapCache$2(entries) {
|
|
940
|
-
var index = -1,
|
|
941
|
-
length = entries == null ? 0 : entries.length;
|
|
942
|
-
|
|
943
|
-
this.clear();
|
|
944
|
-
while (++index < length) {
|
|
945
|
-
var entry = entries[index];
|
|
946
|
-
this.set(entry[0], entry[1]);
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
// Add methods to `MapCache`.
|
|
951
|
-
MapCache$2.prototype.clear = mapCacheClear;
|
|
952
|
-
MapCache$2.prototype['delete'] = mapCacheDelete;
|
|
953
|
-
MapCache$2.prototype.get = mapCacheGet;
|
|
954
|
-
MapCache$2.prototype.has = mapCacheHas;
|
|
955
|
-
MapCache$2.prototype.set = mapCacheSet;
|
|
956
|
-
|
|
957
|
-
var _MapCache = MapCache$2;
|
|
958
|
-
|
|
959
|
-
var ListCache$1 = _ListCache,
|
|
960
|
-
Map$1 = _Map,
|
|
961
|
-
MapCache$1 = _MapCache;
|
|
962
|
-
|
|
963
|
-
/** Used as the size to enable large array optimizations. */
|
|
964
|
-
var LARGE_ARRAY_SIZE = 200;
|
|
965
|
-
|
|
966
|
-
/**
|
|
967
|
-
* Sets the stack `key` to `value`.
|
|
968
|
-
*
|
|
969
|
-
* @private
|
|
970
|
-
* @name set
|
|
971
|
-
* @memberOf Stack
|
|
972
|
-
* @param {string} key The key of the value to set.
|
|
973
|
-
* @param {*} value The value to set.
|
|
974
|
-
* @returns {Object} Returns the stack cache instance.
|
|
975
|
-
*/
|
|
976
|
-
function stackSet$1(key, value) {
|
|
977
|
-
var data = this.__data__;
|
|
978
|
-
if (data instanceof ListCache$1) {
|
|
979
|
-
var pairs = data.__data__;
|
|
980
|
-
if (!Map$1 || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
|
|
981
|
-
pairs.push([key, value]);
|
|
982
|
-
this.size = ++data.size;
|
|
983
|
-
return this;
|
|
984
|
-
}
|
|
985
|
-
data = this.__data__ = new MapCache$1(pairs);
|
|
986
|
-
}
|
|
987
|
-
data.set(key, value);
|
|
988
|
-
this.size = data.size;
|
|
989
|
-
return this;
|
|
990
|
-
}
|
|
991
|
-
|
|
992
|
-
var _stackSet = stackSet$1;
|
|
993
|
-
|
|
994
|
-
var ListCache = _ListCache,
|
|
995
|
-
stackClear = _stackClear,
|
|
996
|
-
stackDelete = _stackDelete,
|
|
997
|
-
stackGet = _stackGet,
|
|
998
|
-
stackHas = _stackHas,
|
|
999
|
-
stackSet = _stackSet;
|
|
1000
|
-
|
|
1001
|
-
/**
|
|
1002
|
-
* Creates a stack cache object to store key-value pairs.
|
|
1003
|
-
*
|
|
1004
|
-
* @private
|
|
1005
|
-
* @constructor
|
|
1006
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
1007
|
-
*/
|
|
1008
|
-
function Stack$1(entries) {
|
|
1009
|
-
var data = this.__data__ = new ListCache(entries);
|
|
1010
|
-
this.size = data.size;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
// Add methods to `Stack`.
|
|
1014
|
-
Stack$1.prototype.clear = stackClear;
|
|
1015
|
-
Stack$1.prototype['delete'] = stackDelete;
|
|
1016
|
-
Stack$1.prototype.get = stackGet;
|
|
1017
|
-
Stack$1.prototype.has = stackHas;
|
|
1018
|
-
Stack$1.prototype.set = stackSet;
|
|
1019
|
-
|
|
1020
|
-
var _Stack = Stack$1;
|
|
1021
|
-
|
|
1022
|
-
var getNative$4 = _getNative;
|
|
1023
|
-
|
|
1024
|
-
var defineProperty$2 = (function() {
|
|
1025
|
-
try {
|
|
1026
|
-
var func = getNative$4(Object, 'defineProperty');
|
|
1027
|
-
func({}, '', {});
|
|
1028
|
-
return func;
|
|
1029
|
-
} catch (e) {}
|
|
1030
|
-
}());
|
|
1031
|
-
|
|
1032
|
-
var _defineProperty = defineProperty$2;
|
|
1033
|
-
|
|
1034
|
-
var defineProperty$1 = _defineProperty;
|
|
1035
|
-
|
|
1036
|
-
/**
|
|
1037
|
-
* The base implementation of `assignValue` and `assignMergeValue` without
|
|
1038
|
-
* value checks.
|
|
1039
|
-
*
|
|
1040
|
-
* @private
|
|
1041
|
-
* @param {Object} object The object to modify.
|
|
1042
|
-
* @param {string} key The key of the property to assign.
|
|
1043
|
-
* @param {*} value The value to assign.
|
|
1044
|
-
*/
|
|
1045
|
-
function baseAssignValue$3(object, key, value) {
|
|
1046
|
-
if (key == '__proto__' && defineProperty$1) {
|
|
1047
|
-
defineProperty$1(object, key, {
|
|
1048
|
-
'configurable': true,
|
|
1049
|
-
'enumerable': true,
|
|
1050
|
-
'value': value,
|
|
1051
|
-
'writable': true
|
|
1052
|
-
});
|
|
1053
|
-
} else {
|
|
1054
|
-
object[key] = value;
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
var _baseAssignValue = baseAssignValue$3;
|
|
1059
|
-
|
|
1060
|
-
var baseAssignValue$2 = _baseAssignValue,
|
|
1061
|
-
eq$2 = eq_1;
|
|
1062
|
-
|
|
1063
|
-
/** Used for built-in method references. */
|
|
1064
|
-
var objectProto$7 = Object.prototype;
|
|
1065
|
-
|
|
1066
|
-
/** Used to check objects for own properties. */
|
|
1067
|
-
var hasOwnProperty$6 = objectProto$7.hasOwnProperty;
|
|
1068
|
-
|
|
1069
|
-
/**
|
|
1070
|
-
* Assigns `value` to `key` of `object` if the existing value is not equivalent
|
|
1071
|
-
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
1072
|
-
* for equality comparisons.
|
|
1073
|
-
*
|
|
1074
|
-
* @private
|
|
1075
|
-
* @param {Object} object The object to modify.
|
|
1076
|
-
* @param {string} key The key of the property to assign.
|
|
1077
|
-
* @param {*} value The value to assign.
|
|
1078
|
-
*/
|
|
1079
|
-
function assignValue$1(object, key, value) {
|
|
1080
|
-
var objValue = object[key];
|
|
1081
|
-
if (!(hasOwnProperty$6.call(object, key) && eq$2(objValue, value)) ||
|
|
1082
|
-
(value === undefined && !(key in object))) {
|
|
1083
|
-
baseAssignValue$2(object, key, value);
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
|
|
1087
|
-
var _assignValue = assignValue$1;
|
|
1088
|
-
|
|
1089
|
-
var assignValue = _assignValue,
|
|
1090
|
-
baseAssignValue$1 = _baseAssignValue;
|
|
1091
|
-
|
|
1092
|
-
/**
|
|
1093
|
-
* Copies properties of `source` to `object`.
|
|
1094
|
-
*
|
|
1095
|
-
* @private
|
|
1096
|
-
* @param {Object} source The object to copy properties from.
|
|
1097
|
-
* @param {Array} props The property identifiers to copy.
|
|
1098
|
-
* @param {Object} [object={}] The object to copy properties to.
|
|
1099
|
-
* @param {Function} [customizer] The function to customize copied values.
|
|
1100
|
-
* @returns {Object} Returns `object`.
|
|
1101
|
-
*/
|
|
1102
|
-
function copyObject$1(source, props, object, customizer) {
|
|
1103
|
-
var isNew = !object;
|
|
1104
|
-
object || (object = {});
|
|
1105
|
-
|
|
1106
|
-
var index = -1,
|
|
1107
|
-
length = props.length;
|
|
1108
|
-
|
|
1109
|
-
while (++index < length) {
|
|
1110
|
-
var key = props[index];
|
|
1111
|
-
|
|
1112
|
-
var newValue = customizer
|
|
1113
|
-
? customizer(object[key], source[key], key, object, source)
|
|
1114
|
-
: undefined;
|
|
1115
|
-
|
|
1116
|
-
if (newValue === undefined) {
|
|
1117
|
-
newValue = source[key];
|
|
1118
|
-
}
|
|
1119
|
-
if (isNew) {
|
|
1120
|
-
baseAssignValue$1(object, key, newValue);
|
|
1121
|
-
} else {
|
|
1122
|
-
assignValue(object, key, newValue);
|
|
1123
|
-
}
|
|
1124
|
-
}
|
|
1125
|
-
return object;
|
|
1126
|
-
}
|
|
1127
|
-
|
|
1128
|
-
var _copyObject = copyObject$1;
|
|
1129
|
-
|
|
1130
|
-
/**
|
|
1131
|
-
* The base implementation of `_.times` without support for iteratee shorthands
|
|
1132
|
-
* or max array length checks.
|
|
1133
|
-
*
|
|
1134
|
-
* @private
|
|
1135
|
-
* @param {number} n The number of times to invoke `iteratee`.
|
|
1136
|
-
* @param {Function} iteratee The function invoked per iteration.
|
|
1137
|
-
* @returns {Array} Returns the array of results.
|
|
1138
|
-
*/
|
|
1139
|
-
|
|
1140
|
-
function baseTimes$1(n, iteratee) {
|
|
1141
|
-
var index = -1,
|
|
1142
|
-
result = Array(n);
|
|
1143
|
-
|
|
1144
|
-
while (++index < n) {
|
|
1145
|
-
result[index] = iteratee(index);
|
|
1146
|
-
}
|
|
1147
|
-
return result;
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
var _baseTimes = baseTimes$1;
|
|
1151
|
-
|
|
1152
|
-
/**
|
|
1153
|
-
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1154
|
-
* and has a `typeof` result of "object".
|
|
1155
|
-
*
|
|
1156
|
-
* @static
|
|
1157
|
-
* @memberOf _
|
|
1158
|
-
* @since 4.0.0
|
|
1159
|
-
* @category Lang
|
|
1160
|
-
* @param {*} value The value to check.
|
|
1161
|
-
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1162
|
-
* @example
|
|
1163
|
-
*
|
|
1164
|
-
* _.isObjectLike({});
|
|
1165
|
-
* // => true
|
|
1166
|
-
*
|
|
1167
|
-
* _.isObjectLike([1, 2, 3]);
|
|
1168
|
-
* // => true
|
|
1169
|
-
*
|
|
1170
|
-
* _.isObjectLike(_.noop);
|
|
1171
|
-
* // => false
|
|
1172
|
-
*
|
|
1173
|
-
* _.isObjectLike(null);
|
|
1174
|
-
* // => false
|
|
1175
|
-
*/
|
|
1176
|
-
|
|
1177
|
-
function isObjectLike$7(value) {
|
|
1178
|
-
return value != null && typeof value == 'object';
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
var isObjectLike_1 = isObjectLike$7;
|
|
1182
|
-
|
|
1183
|
-
var baseGetTag$5 = _baseGetTag,
|
|
1184
|
-
isObjectLike$6 = isObjectLike_1;
|
|
1185
|
-
|
|
1186
|
-
/** `Object#toString` result references. */
|
|
1187
|
-
var argsTag$1 = '[object Arguments]';
|
|
1188
|
-
|
|
1189
|
-
/**
|
|
1190
|
-
* The base implementation of `_.isArguments`.
|
|
1191
|
-
*
|
|
1192
|
-
* @private
|
|
1193
|
-
* @param {*} value The value to check.
|
|
1194
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1195
|
-
*/
|
|
1196
|
-
function baseIsArguments$1(value) {
|
|
1197
|
-
return isObjectLike$6(value) && baseGetTag$5(value) == argsTag$1;
|
|
1198
|
-
}
|
|
1199
|
-
|
|
1200
|
-
var _baseIsArguments = baseIsArguments$1;
|
|
1201
|
-
|
|
1202
|
-
var baseIsArguments = _baseIsArguments,
|
|
1203
|
-
isObjectLike$5 = isObjectLike_1;
|
|
1204
|
-
|
|
1205
|
-
/** Used for built-in method references. */
|
|
1206
|
-
var objectProto$6 = Object.prototype;
|
|
1207
|
-
|
|
1208
|
-
/** Used to check objects for own properties. */
|
|
1209
|
-
var hasOwnProperty$5 = objectProto$6.hasOwnProperty;
|
|
1210
|
-
|
|
1211
|
-
/** Built-in value references. */
|
|
1212
|
-
var propertyIsEnumerable = objectProto$6.propertyIsEnumerable;
|
|
1213
|
-
|
|
1214
|
-
/**
|
|
1215
|
-
* Checks if `value` is likely an `arguments` object.
|
|
1216
|
-
*
|
|
1217
|
-
* @static
|
|
1218
|
-
* @memberOf _
|
|
1219
|
-
* @since 0.1.0
|
|
1220
|
-
* @category Lang
|
|
1221
|
-
* @param {*} value The value to check.
|
|
1222
|
-
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1223
|
-
* else `false`.
|
|
1224
|
-
* @example
|
|
1225
|
-
*
|
|
1226
|
-
* _.isArguments(function() { return arguments; }());
|
|
1227
|
-
* // => true
|
|
1228
|
-
*
|
|
1229
|
-
* _.isArguments([1, 2, 3]);
|
|
1230
|
-
* // => false
|
|
1231
|
-
*/
|
|
1232
|
-
var isArguments$3 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
1233
|
-
return isObjectLike$5(value) && hasOwnProperty$5.call(value, 'callee') &&
|
|
1234
|
-
!propertyIsEnumerable.call(value, 'callee');
|
|
1235
|
-
};
|
|
1236
|
-
|
|
1237
|
-
var isArguments_1 = isArguments$3;
|
|
1238
|
-
|
|
1239
|
-
/**
|
|
1240
|
-
* Checks if `value` is classified as an `Array` object.
|
|
1241
|
-
*
|
|
1242
|
-
* @static
|
|
1243
|
-
* @memberOf _
|
|
1244
|
-
* @since 0.1.0
|
|
1245
|
-
* @category Lang
|
|
1246
|
-
* @param {*} value The value to check.
|
|
1247
|
-
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
1248
|
-
* @example
|
|
1249
|
-
*
|
|
1250
|
-
* _.isArray([1, 2, 3]);
|
|
1251
|
-
* // => true
|
|
1252
|
-
*
|
|
1253
|
-
* _.isArray(document.body.children);
|
|
1254
|
-
* // => false
|
|
1255
|
-
*
|
|
1256
|
-
* _.isArray('abc');
|
|
1257
|
-
* // => false
|
|
1258
|
-
*
|
|
1259
|
-
* _.isArray(_.noop);
|
|
1260
|
-
* // => false
|
|
1261
|
-
*/
|
|
1262
|
-
|
|
1263
|
-
var isArray$6 = Array.isArray;
|
|
1264
|
-
|
|
1265
|
-
var isArray_1 = isArray$6;
|
|
1266
|
-
|
|
1267
|
-
var isBuffer$3 = {exports: {}};
|
|
1268
|
-
|
|
1269
|
-
/**
|
|
1270
|
-
* This method returns `false`.
|
|
1271
|
-
*
|
|
1272
|
-
* @static
|
|
1273
|
-
* @memberOf _
|
|
1274
|
-
* @since 4.13.0
|
|
1275
|
-
* @category Util
|
|
1276
|
-
* @returns {boolean} Returns `false`.
|
|
1277
|
-
* @example
|
|
1278
|
-
*
|
|
1279
|
-
* _.times(2, _.stubFalse);
|
|
1280
|
-
* // => [false, false]
|
|
1281
|
-
*/
|
|
1282
|
-
|
|
1283
|
-
function stubFalse() {
|
|
1284
|
-
return false;
|
|
1285
|
-
}
|
|
1286
|
-
|
|
1287
|
-
var stubFalse_1 = stubFalse;
|
|
1288
|
-
|
|
1289
|
-
(function (module, exports) {
|
|
1290
|
-
var root = _root,
|
|
1291
|
-
stubFalse = stubFalse_1;
|
|
1292
|
-
|
|
1293
|
-
/** Detect free variable `exports`. */
|
|
1294
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
1295
|
-
|
|
1296
|
-
/** Detect free variable `module`. */
|
|
1297
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
1298
|
-
|
|
1299
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1300
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1301
|
-
|
|
1302
|
-
/** Built-in value references. */
|
|
1303
|
-
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
1304
|
-
|
|
1305
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1306
|
-
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
1307
|
-
|
|
1308
|
-
/**
|
|
1309
|
-
* Checks if `value` is a buffer.
|
|
1310
|
-
*
|
|
1311
|
-
* @static
|
|
1312
|
-
* @memberOf _
|
|
1313
|
-
* @since 4.3.0
|
|
1314
|
-
* @category Lang
|
|
1315
|
-
* @param {*} value The value to check.
|
|
1316
|
-
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
1317
|
-
* @example
|
|
1318
|
-
*
|
|
1319
|
-
* _.isBuffer(new Buffer(2));
|
|
1320
|
-
* // => true
|
|
1321
|
-
*
|
|
1322
|
-
* _.isBuffer(new Uint8Array(2));
|
|
1323
|
-
* // => false
|
|
1324
|
-
*/
|
|
1325
|
-
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1326
|
-
|
|
1327
|
-
module.exports = isBuffer;
|
|
1328
|
-
}(isBuffer$3, isBuffer$3.exports));
|
|
1329
|
-
|
|
1330
|
-
/** Used as references for various `Number` constants. */
|
|
1331
|
-
|
|
1332
|
-
var MAX_SAFE_INTEGER$1 = 9007199254740991;
|
|
1333
|
-
|
|
1334
|
-
/** Used to detect unsigned integer values. */
|
|
1335
|
-
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
1336
|
-
|
|
1337
|
-
/**
|
|
1338
|
-
* Checks if `value` is a valid array-like index.
|
|
1339
|
-
*
|
|
1340
|
-
* @private
|
|
1341
|
-
* @param {*} value The value to check.
|
|
1342
|
-
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
|
|
1343
|
-
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
|
|
1344
|
-
*/
|
|
1345
|
-
function isIndex$2(value, length) {
|
|
1346
|
-
var type = typeof value;
|
|
1347
|
-
length = length == null ? MAX_SAFE_INTEGER$1 : length;
|
|
1348
|
-
|
|
1349
|
-
return !!length &&
|
|
1350
|
-
(type == 'number' ||
|
|
1351
|
-
(type != 'symbol' && reIsUint.test(value))) &&
|
|
1352
|
-
(value > -1 && value % 1 == 0 && value < length);
|
|
1353
|
-
}
|
|
1354
|
-
|
|
1355
|
-
var _isIndex = isIndex$2;
|
|
1356
|
-
|
|
1357
|
-
/** Used as references for various `Number` constants. */
|
|
1358
|
-
|
|
1359
|
-
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1360
|
-
|
|
1361
|
-
/**
|
|
1362
|
-
* Checks if `value` is a valid array-like length.
|
|
1363
|
-
*
|
|
1364
|
-
* **Note:** This method is loosely based on
|
|
1365
|
-
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
1366
|
-
*
|
|
1367
|
-
* @static
|
|
1368
|
-
* @memberOf _
|
|
1369
|
-
* @since 4.0.0
|
|
1370
|
-
* @category Lang
|
|
1371
|
-
* @param {*} value The value to check.
|
|
1372
|
-
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
1373
|
-
* @example
|
|
1374
|
-
*
|
|
1375
|
-
* _.isLength(3);
|
|
1376
|
-
* // => true
|
|
1377
|
-
*
|
|
1378
|
-
* _.isLength(Number.MIN_VALUE);
|
|
1379
|
-
* // => false
|
|
1380
|
-
*
|
|
1381
|
-
* _.isLength(Infinity);
|
|
1382
|
-
* // => false
|
|
1383
|
-
*
|
|
1384
|
-
* _.isLength('3');
|
|
1385
|
-
* // => false
|
|
1386
|
-
*/
|
|
1387
|
-
function isLength$2(value) {
|
|
1388
|
-
return typeof value == 'number' &&
|
|
1389
|
-
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
var isLength_1 = isLength$2;
|
|
1393
|
-
|
|
1394
|
-
var baseGetTag$4 = _baseGetTag,
|
|
1395
|
-
isLength$1 = isLength_1,
|
|
1396
|
-
isObjectLike$4 = isObjectLike_1;
|
|
1397
|
-
|
|
1398
|
-
/** `Object#toString` result references. */
|
|
1399
|
-
var argsTag = '[object Arguments]',
|
|
1400
|
-
arrayTag = '[object Array]',
|
|
1401
|
-
boolTag = '[object Boolean]',
|
|
1402
|
-
dateTag = '[object Date]',
|
|
1403
|
-
errorTag = '[object Error]',
|
|
1404
|
-
funcTag = '[object Function]',
|
|
1405
|
-
mapTag$2 = '[object Map]',
|
|
1406
|
-
numberTag$1 = '[object Number]',
|
|
1407
|
-
objectTag$2 = '[object Object]',
|
|
1408
|
-
regexpTag = '[object RegExp]',
|
|
1409
|
-
setTag$2 = '[object Set]',
|
|
1410
|
-
stringTag = '[object String]',
|
|
1411
|
-
weakMapTag$1 = '[object WeakMap]';
|
|
1412
|
-
|
|
1413
|
-
var arrayBufferTag = '[object ArrayBuffer]',
|
|
1414
|
-
dataViewTag$1 = '[object DataView]',
|
|
1415
|
-
float32Tag = '[object Float32Array]',
|
|
1416
|
-
float64Tag = '[object Float64Array]',
|
|
1417
|
-
int8Tag = '[object Int8Array]',
|
|
1418
|
-
int16Tag = '[object Int16Array]',
|
|
1419
|
-
int32Tag = '[object Int32Array]',
|
|
1420
|
-
uint8Tag = '[object Uint8Array]',
|
|
1421
|
-
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
1422
|
-
uint16Tag = '[object Uint16Array]',
|
|
1423
|
-
uint32Tag = '[object Uint32Array]';
|
|
1424
|
-
|
|
1425
|
-
/** Used to identify `toStringTag` values of typed arrays. */
|
|
1426
|
-
var typedArrayTags = {};
|
|
1427
|
-
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
1428
|
-
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
1429
|
-
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
1430
|
-
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
1431
|
-
typedArrayTags[uint32Tag] = true;
|
|
1432
|
-
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
|
1433
|
-
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
1434
|
-
typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] =
|
|
1435
|
-
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
1436
|
-
typedArrayTags[mapTag$2] = typedArrayTags[numberTag$1] =
|
|
1437
|
-
typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] =
|
|
1438
|
-
typedArrayTags[setTag$2] = typedArrayTags[stringTag] =
|
|
1439
|
-
typedArrayTags[weakMapTag$1] = false;
|
|
1440
|
-
|
|
1441
|
-
/**
|
|
1442
|
-
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
1443
|
-
*
|
|
1444
|
-
* @private
|
|
1445
|
-
* @param {*} value The value to check.
|
|
1446
|
-
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
1447
|
-
*/
|
|
1448
|
-
function baseIsTypedArray$1(value) {
|
|
1449
|
-
return isObjectLike$4(value) &&
|
|
1450
|
-
isLength$1(value.length) && !!typedArrayTags[baseGetTag$4(value)];
|
|
1451
|
-
}
|
|
1452
|
-
|
|
1453
|
-
var _baseIsTypedArray = baseIsTypedArray$1;
|
|
1454
|
-
|
|
1455
|
-
/**
|
|
1456
|
-
* The base implementation of `_.unary` without support for storing metadata.
|
|
1457
|
-
*
|
|
1458
|
-
* @private
|
|
1459
|
-
* @param {Function} func The function to cap arguments for.
|
|
1460
|
-
* @returns {Function} Returns the new capped function.
|
|
1461
|
-
*/
|
|
1462
|
-
|
|
1463
|
-
function baseUnary$1(func) {
|
|
1464
|
-
return function(value) {
|
|
1465
|
-
return func(value);
|
|
1466
|
-
};
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
var _baseUnary = baseUnary$1;
|
|
1470
|
-
|
|
1471
|
-
var _nodeUtil = {exports: {}};
|
|
1472
|
-
|
|
1473
|
-
(function (module, exports) {
|
|
1474
|
-
var freeGlobal = _freeGlobal;
|
|
1475
|
-
|
|
1476
|
-
/** Detect free variable `exports`. */
|
|
1477
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
1478
|
-
|
|
1479
|
-
/** Detect free variable `module`. */
|
|
1480
|
-
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
1481
|
-
|
|
1482
|
-
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1483
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1484
|
-
|
|
1485
|
-
/** Detect free variable `process` from Node.js. */
|
|
1486
|
-
var freeProcess = moduleExports && freeGlobal.process;
|
|
1487
|
-
|
|
1488
|
-
/** Used to access faster Node.js helpers. */
|
|
1489
|
-
var nodeUtil = (function() {
|
|
1490
|
-
try {
|
|
1491
|
-
// Use `util.types` for Node.js 10+.
|
|
1492
|
-
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
1493
|
-
|
|
1494
|
-
if (types) {
|
|
1495
|
-
return types;
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
// Legacy `process.binding('util')` for Node.js < 10.
|
|
1499
|
-
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
1500
|
-
} catch (e) {}
|
|
1501
|
-
}());
|
|
1502
|
-
|
|
1503
|
-
module.exports = nodeUtil;
|
|
1504
|
-
}(_nodeUtil, _nodeUtil.exports));
|
|
1505
|
-
|
|
1506
|
-
var baseIsTypedArray = _baseIsTypedArray,
|
|
1507
|
-
baseUnary = _baseUnary,
|
|
1508
|
-
nodeUtil$2 = _nodeUtil.exports;
|
|
1509
|
-
|
|
1510
|
-
/* Node.js helper references. */
|
|
1511
|
-
var nodeIsTypedArray = nodeUtil$2 && nodeUtil$2.isTypedArray;
|
|
1512
|
-
|
|
1513
|
-
/**
|
|
1514
|
-
* Checks if `value` is classified as a typed array.
|
|
1515
|
-
*
|
|
1516
|
-
* @static
|
|
1517
|
-
* @memberOf _
|
|
1518
|
-
* @since 3.0.0
|
|
1519
|
-
* @category Lang
|
|
1520
|
-
* @param {*} value The value to check.
|
|
1521
|
-
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
1522
|
-
* @example
|
|
1523
|
-
*
|
|
1524
|
-
* _.isTypedArray(new Uint8Array);
|
|
1525
|
-
* // => true
|
|
1526
|
-
*
|
|
1527
|
-
* _.isTypedArray([]);
|
|
1528
|
-
* // => false
|
|
1529
|
-
*/
|
|
1530
|
-
var isTypedArray$3 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
1531
|
-
|
|
1532
|
-
var isTypedArray_1 = isTypedArray$3;
|
|
1533
|
-
|
|
1534
|
-
var baseTimes = _baseTimes,
|
|
1535
|
-
isArguments$2 = isArguments_1,
|
|
1536
|
-
isArray$5 = isArray_1,
|
|
1537
|
-
isBuffer$2 = isBuffer$3.exports,
|
|
1538
|
-
isIndex$1 = _isIndex,
|
|
1539
|
-
isTypedArray$2 = isTypedArray_1;
|
|
1540
|
-
|
|
1541
|
-
/** Used for built-in method references. */
|
|
1542
|
-
var objectProto$5 = Object.prototype;
|
|
1543
|
-
|
|
1544
|
-
/** Used to check objects for own properties. */
|
|
1545
|
-
var hasOwnProperty$4 = objectProto$5.hasOwnProperty;
|
|
1546
|
-
|
|
1547
|
-
/**
|
|
1548
|
-
* Creates an array of the enumerable property names of the array-like `value`.
|
|
1549
|
-
*
|
|
1550
|
-
* @private
|
|
1551
|
-
* @param {*} value The value to query.
|
|
1552
|
-
* @param {boolean} inherited Specify returning inherited property names.
|
|
1553
|
-
* @returns {Array} Returns the array of property names.
|
|
1554
|
-
*/
|
|
1555
|
-
function arrayLikeKeys$1(value, inherited) {
|
|
1556
|
-
var isArr = isArray$5(value),
|
|
1557
|
-
isArg = !isArr && isArguments$2(value),
|
|
1558
|
-
isBuff = !isArr && !isArg && isBuffer$2(value),
|
|
1559
|
-
isType = !isArr && !isArg && !isBuff && isTypedArray$2(value),
|
|
1560
|
-
skipIndexes = isArr || isArg || isBuff || isType,
|
|
1561
|
-
result = skipIndexes ? baseTimes(value.length, String) : [],
|
|
1562
|
-
length = result.length;
|
|
1563
|
-
|
|
1564
|
-
for (var key in value) {
|
|
1565
|
-
if ((inherited || hasOwnProperty$4.call(value, key)) &&
|
|
1566
|
-
!(skipIndexes && (
|
|
1567
|
-
// Safari 9 has enumerable `arguments.length` in strict mode.
|
|
1568
|
-
key == 'length' ||
|
|
1569
|
-
// Node.js 0.10 has enumerable non-index properties on buffers.
|
|
1570
|
-
(isBuff && (key == 'offset' || key == 'parent')) ||
|
|
1571
|
-
// PhantomJS 2 has enumerable non-index properties on typed arrays.
|
|
1572
|
-
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
|
|
1573
|
-
// Skip index properties.
|
|
1574
|
-
isIndex$1(key, length)
|
|
1575
|
-
))) {
|
|
1576
|
-
result.push(key);
|
|
1577
|
-
}
|
|
1578
|
-
}
|
|
1579
|
-
return result;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
var _arrayLikeKeys = arrayLikeKeys$1;
|
|
1583
|
-
|
|
1584
|
-
/** Used for built-in method references. */
|
|
1585
|
-
|
|
1586
|
-
var objectProto$4 = Object.prototype;
|
|
1587
|
-
|
|
1588
|
-
/**
|
|
1589
|
-
* Checks if `value` is likely a prototype object.
|
|
1590
|
-
*
|
|
1591
|
-
* @private
|
|
1592
|
-
* @param {*} value The value to check.
|
|
1593
|
-
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
1594
|
-
*/
|
|
1595
|
-
function isPrototype$4(value) {
|
|
1596
|
-
var Ctor = value && value.constructor,
|
|
1597
|
-
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$4;
|
|
1598
|
-
|
|
1599
|
-
return value === proto;
|
|
1600
|
-
}
|
|
1601
|
-
|
|
1602
|
-
var _isPrototype = isPrototype$4;
|
|
1603
|
-
|
|
1604
|
-
/**
|
|
1605
|
-
* Creates a unary function that invokes `func` with its argument transformed.
|
|
1606
|
-
*
|
|
1607
|
-
* @private
|
|
1608
|
-
* @param {Function} func The function to wrap.
|
|
1609
|
-
* @param {Function} transform The argument transform.
|
|
1610
|
-
* @returns {Function} Returns the new function.
|
|
1611
|
-
*/
|
|
1612
|
-
|
|
1613
|
-
function overArg$2(func, transform) {
|
|
1614
|
-
return function(arg) {
|
|
1615
|
-
return func(transform(arg));
|
|
1616
|
-
};
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
var _overArg = overArg$2;
|
|
1620
|
-
|
|
1621
|
-
var overArg$1 = _overArg;
|
|
1622
|
-
|
|
1623
|
-
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1624
|
-
var nativeKeys$1 = overArg$1(Object.keys, Object);
|
|
1625
|
-
|
|
1626
|
-
var _nativeKeys = nativeKeys$1;
|
|
1627
|
-
|
|
1628
|
-
var isPrototype$3 = _isPrototype,
|
|
1629
|
-
nativeKeys = _nativeKeys;
|
|
1630
|
-
|
|
1631
|
-
/** Used for built-in method references. */
|
|
1632
|
-
var objectProto$3 = Object.prototype;
|
|
1633
|
-
|
|
1634
|
-
/** Used to check objects for own properties. */
|
|
1635
|
-
var hasOwnProperty$3 = objectProto$3.hasOwnProperty;
|
|
1636
|
-
|
|
1637
666
|
/**
|
|
1638
|
-
*
|
|
667
|
+
* Removes all key-value entries from the list cache.
|
|
1639
668
|
*
|
|
1640
669
|
* @private
|
|
1641
|
-
* @
|
|
1642
|
-
* @
|
|
670
|
+
* @name clear
|
|
671
|
+
* @memberOf ListCache
|
|
1643
672
|
*/
|
|
1644
|
-
function baseKeys$1(object) {
|
|
1645
|
-
if (!isPrototype$3(object)) {
|
|
1646
|
-
return nativeKeys(object);
|
|
1647
|
-
}
|
|
1648
|
-
var result = [];
|
|
1649
|
-
for (var key in Object(object)) {
|
|
1650
|
-
if (hasOwnProperty$3.call(object, key) && key != 'constructor') {
|
|
1651
|
-
result.push(key);
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
return result;
|
|
1655
|
-
}
|
|
1656
673
|
|
|
1657
|
-
|
|
674
|
+
function listCacheClear$1() {
|
|
675
|
+
this.__data__ = [];
|
|
676
|
+
this.size = 0;
|
|
677
|
+
}
|
|
1658
678
|
|
|
1659
|
-
var
|
|
1660
|
-
isLength = isLength_1;
|
|
679
|
+
var _listCacheClear = listCacheClear$1;
|
|
1661
680
|
|
|
1662
681
|
/**
|
|
1663
|
-
*
|
|
1664
|
-
*
|
|
1665
|
-
*
|
|
682
|
+
* Performs a
|
|
683
|
+
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
684
|
+
* comparison between two values to determine if they are equivalent.
|
|
1666
685
|
*
|
|
1667
686
|
* @static
|
|
1668
687
|
* @memberOf _
|
|
1669
688
|
* @since 4.0.0
|
|
1670
689
|
* @category Lang
|
|
1671
|
-
* @param {*} value The value to
|
|
1672
|
-
* @
|
|
690
|
+
* @param {*} value The value to compare.
|
|
691
|
+
* @param {*} other The other value to compare.
|
|
692
|
+
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
1673
693
|
* @example
|
|
1674
694
|
*
|
|
1675
|
-
*
|
|
1676
|
-
*
|
|
695
|
+
* var object = { 'a': 1 };
|
|
696
|
+
* var other = { 'a': 1 };
|
|
1677
697
|
*
|
|
1678
|
-
* _.
|
|
698
|
+
* _.eq(object, object);
|
|
1679
699
|
* // => true
|
|
1680
700
|
*
|
|
1681
|
-
* _.
|
|
701
|
+
* _.eq(object, other);
|
|
702
|
+
* // => false
|
|
703
|
+
*
|
|
704
|
+
* _.eq('a', 'a');
|
|
1682
705
|
* // => true
|
|
1683
706
|
*
|
|
1684
|
-
* _.
|
|
707
|
+
* _.eq('a', Object('a'));
|
|
1685
708
|
* // => false
|
|
709
|
+
*
|
|
710
|
+
* _.eq(NaN, NaN);
|
|
711
|
+
* // => true
|
|
1686
712
|
*/
|
|
1687
|
-
|
|
1688
|
-
|
|
713
|
+
|
|
714
|
+
function eq$1(value, other) {
|
|
715
|
+
return value === other || (value !== value && other !== other);
|
|
1689
716
|
}
|
|
1690
717
|
|
|
1691
|
-
var
|
|
718
|
+
var eq_1 = eq$1;
|
|
719
|
+
|
|
720
|
+
var eq = eq_1;
|
|
1692
721
|
|
|
1693
722
|
/**
|
|
1694
|
-
*
|
|
1695
|
-
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
|
|
1696
|
-
* except that it includes inherited enumerable properties.
|
|
723
|
+
* Gets the index at which the `key` is found in `array` of key-value pairs.
|
|
1697
724
|
*
|
|
1698
725
|
* @private
|
|
1699
|
-
* @param {
|
|
1700
|
-
* @
|
|
726
|
+
* @param {Array} array The array to inspect.
|
|
727
|
+
* @param {*} key The key to search for.
|
|
728
|
+
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
1701
729
|
*/
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
result.push(key);
|
|
730
|
+
function assocIndexOf$4(array, key) {
|
|
731
|
+
var length = array.length;
|
|
732
|
+
while (length--) {
|
|
733
|
+
if (eq(array[length][0], key)) {
|
|
734
|
+
return length;
|
|
1708
735
|
}
|
|
1709
736
|
}
|
|
1710
|
-
return
|
|
737
|
+
return -1;
|
|
1711
738
|
}
|
|
1712
739
|
|
|
1713
|
-
var
|
|
740
|
+
var _assocIndexOf = assocIndexOf$4;
|
|
1714
741
|
|
|
1715
|
-
var
|
|
1716
|
-
isPrototype$2 = _isPrototype,
|
|
1717
|
-
nativeKeysIn = _nativeKeysIn;
|
|
742
|
+
var assocIndexOf$3 = _assocIndexOf;
|
|
1718
743
|
|
|
1719
744
|
/** Used for built-in method references. */
|
|
1720
|
-
var
|
|
745
|
+
var arrayProto = Array.prototype;
|
|
1721
746
|
|
|
1722
|
-
/**
|
|
1723
|
-
var
|
|
747
|
+
/** Built-in value references. */
|
|
748
|
+
var splice = arrayProto.splice;
|
|
1724
749
|
|
|
1725
750
|
/**
|
|
1726
|
-
*
|
|
751
|
+
* Removes `key` and its value from the list cache.
|
|
1727
752
|
*
|
|
1728
753
|
* @private
|
|
1729
|
-
* @
|
|
1730
|
-
* @
|
|
754
|
+
* @name delete
|
|
755
|
+
* @memberOf ListCache
|
|
756
|
+
* @param {string} key The key of the value to remove.
|
|
757
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
1731
758
|
*/
|
|
1732
|
-
function
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
}
|
|
1736
|
-
var isProto = isPrototype$2(object),
|
|
1737
|
-
result = [];
|
|
759
|
+
function listCacheDelete$1(key) {
|
|
760
|
+
var data = this.__data__,
|
|
761
|
+
index = assocIndexOf$3(data, key);
|
|
1738
762
|
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
result.push(key);
|
|
1742
|
-
}
|
|
763
|
+
if (index < 0) {
|
|
764
|
+
return false;
|
|
1743
765
|
}
|
|
1744
|
-
|
|
766
|
+
var lastIndex = data.length - 1;
|
|
767
|
+
if (index == lastIndex) {
|
|
768
|
+
data.pop();
|
|
769
|
+
} else {
|
|
770
|
+
splice.call(data, index, 1);
|
|
771
|
+
}
|
|
772
|
+
--this.size;
|
|
773
|
+
return true;
|
|
1745
774
|
}
|
|
1746
775
|
|
|
1747
|
-
var
|
|
776
|
+
var _listCacheDelete = listCacheDelete$1;
|
|
1748
777
|
|
|
1749
|
-
var
|
|
1750
|
-
baseKeysIn = _baseKeysIn,
|
|
1751
|
-
isArrayLike$3 = isArrayLike_1;
|
|
778
|
+
var assocIndexOf$2 = _assocIndexOf;
|
|
1752
779
|
|
|
1753
780
|
/**
|
|
1754
|
-
*
|
|
1755
|
-
*
|
|
1756
|
-
* **Note:** Non-object values are coerced to objects.
|
|
1757
|
-
*
|
|
1758
|
-
* @static
|
|
1759
|
-
* @memberOf _
|
|
1760
|
-
* @since 3.0.0
|
|
1761
|
-
* @category Object
|
|
1762
|
-
* @param {Object} object The object to query.
|
|
1763
|
-
* @returns {Array} Returns the array of property names.
|
|
1764
|
-
* @example
|
|
1765
|
-
*
|
|
1766
|
-
* function Foo() {
|
|
1767
|
-
* this.a = 1;
|
|
1768
|
-
* this.b = 2;
|
|
1769
|
-
* }
|
|
1770
|
-
*
|
|
1771
|
-
* Foo.prototype.c = 3;
|
|
781
|
+
* Gets the list cache value for `key`.
|
|
1772
782
|
*
|
|
1773
|
-
*
|
|
1774
|
-
*
|
|
783
|
+
* @private
|
|
784
|
+
* @name get
|
|
785
|
+
* @memberOf ListCache
|
|
786
|
+
* @param {string} key The key of the value to get.
|
|
787
|
+
* @returns {*} Returns the entry value.
|
|
1775
788
|
*/
|
|
1776
|
-
function
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
var keysIn_1 = keysIn$2;
|
|
1781
|
-
|
|
1782
|
-
var _cloneBuffer = {exports: {}};
|
|
1783
|
-
|
|
1784
|
-
(function (module, exports) {
|
|
1785
|
-
var root = _root;
|
|
1786
|
-
|
|
1787
|
-
/** Detect free variable `exports`. */
|
|
1788
|
-
var freeExports = exports && !exports.nodeType && exports;
|
|
789
|
+
function listCacheGet$1(key) {
|
|
790
|
+
var data = this.__data__,
|
|
791
|
+
index = assocIndexOf$2(data, key);
|
|
1789
792
|
|
|
1790
|
-
|
|
1791
|
-
|
|
793
|
+
return index < 0 ? undefined : data[index][1];
|
|
794
|
+
}
|
|
1792
795
|
|
|
1793
|
-
|
|
1794
|
-
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
796
|
+
var _listCacheGet = listCacheGet$1;
|
|
1795
797
|
|
|
1796
|
-
|
|
1797
|
-
var Buffer = moduleExports ? root.Buffer : undefined,
|
|
1798
|
-
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
|
|
798
|
+
var assocIndexOf$1 = _assocIndexOf;
|
|
1799
799
|
|
|
1800
800
|
/**
|
|
1801
|
-
*
|
|
801
|
+
* Checks if a list cache value for `key` exists.
|
|
1802
802
|
*
|
|
1803
803
|
* @private
|
|
1804
|
-
* @
|
|
1805
|
-
* @
|
|
1806
|
-
* @
|
|
804
|
+
* @name has
|
|
805
|
+
* @memberOf ListCache
|
|
806
|
+
* @param {string} key The key of the entry to check.
|
|
807
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
1807
808
|
*/
|
|
1808
|
-
function
|
|
1809
|
-
|
|
1810
|
-
return buffer.slice();
|
|
1811
|
-
}
|
|
1812
|
-
var length = buffer.length,
|
|
1813
|
-
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
|
|
1814
|
-
|
|
1815
|
-
buffer.copy(result);
|
|
1816
|
-
return result;
|
|
809
|
+
function listCacheHas$1(key) {
|
|
810
|
+
return assocIndexOf$1(this.__data__, key) > -1;
|
|
1817
811
|
}
|
|
1818
812
|
|
|
1819
|
-
|
|
1820
|
-
|
|
813
|
+
var _listCacheHas = listCacheHas$1;
|
|
814
|
+
|
|
815
|
+
var assocIndexOf = _assocIndexOf;
|
|
1821
816
|
|
|
1822
817
|
/**
|
|
1823
|
-
*
|
|
818
|
+
* Sets the list cache `key` to `value`.
|
|
1824
819
|
*
|
|
1825
820
|
* @private
|
|
1826
|
-
* @
|
|
1827
|
-
* @
|
|
1828
|
-
* @
|
|
821
|
+
* @name set
|
|
822
|
+
* @memberOf ListCache
|
|
823
|
+
* @param {string} key The key of the value to set.
|
|
824
|
+
* @param {*} value The value to set.
|
|
825
|
+
* @returns {Object} Returns the list cache instance.
|
|
1829
826
|
*/
|
|
827
|
+
function listCacheSet$1(key, value) {
|
|
828
|
+
var data = this.__data__,
|
|
829
|
+
index = assocIndexOf(data, key);
|
|
1830
830
|
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
while (++index < length) {
|
|
1837
|
-
array[index] = source[index];
|
|
831
|
+
if (index < 0) {
|
|
832
|
+
++this.size;
|
|
833
|
+
data.push([key, value]);
|
|
834
|
+
} else {
|
|
835
|
+
data[index][1] = value;
|
|
1838
836
|
}
|
|
1839
|
-
return
|
|
837
|
+
return this;
|
|
1840
838
|
}
|
|
1841
839
|
|
|
1842
|
-
var
|
|
1843
|
-
|
|
1844
|
-
var overArg = _overArg;
|
|
1845
|
-
|
|
1846
|
-
/** Built-in value references. */
|
|
1847
|
-
var getPrototype$2 = overArg(Object.getPrototypeOf, Object);
|
|
1848
|
-
|
|
1849
|
-
var _getPrototype = getPrototype$2;
|
|
1850
|
-
|
|
1851
|
-
var getNative$3 = _getNative,
|
|
1852
|
-
root$4 = _root;
|
|
1853
|
-
|
|
1854
|
-
/* Built-in method references that are verified to be native. */
|
|
1855
|
-
var DataView$1 = getNative$3(root$4, 'DataView');
|
|
1856
|
-
|
|
1857
|
-
var _DataView = DataView$1;
|
|
1858
|
-
|
|
1859
|
-
var getNative$2 = _getNative,
|
|
1860
|
-
root$3 = _root;
|
|
1861
|
-
|
|
1862
|
-
/* Built-in method references that are verified to be native. */
|
|
1863
|
-
var Promise$2 = getNative$2(root$3, 'Promise');
|
|
1864
|
-
|
|
1865
|
-
var _Promise = Promise$2;
|
|
1866
|
-
|
|
1867
|
-
var getNative$1 = _getNative,
|
|
1868
|
-
root$2 = _root;
|
|
1869
|
-
|
|
1870
|
-
/* Built-in method references that are verified to be native. */
|
|
1871
|
-
var Set$2 = getNative$1(root$2, 'Set');
|
|
1872
|
-
|
|
1873
|
-
var _Set = Set$2;
|
|
1874
|
-
|
|
1875
|
-
var getNative = _getNative,
|
|
1876
|
-
root$1 = _root;
|
|
1877
|
-
|
|
1878
|
-
/* Built-in method references that are verified to be native. */
|
|
1879
|
-
var WeakMap$1 = getNative(root$1, 'WeakMap');
|
|
1880
|
-
|
|
1881
|
-
var _WeakMap = WeakMap$1;
|
|
1882
|
-
|
|
1883
|
-
var DataView = _DataView,
|
|
1884
|
-
Map = _Map,
|
|
1885
|
-
Promise$1 = _Promise,
|
|
1886
|
-
Set$1 = _Set,
|
|
1887
|
-
WeakMap = _WeakMap,
|
|
1888
|
-
baseGetTag$3 = _baseGetTag,
|
|
1889
|
-
toSource = _toSource;
|
|
1890
|
-
|
|
1891
|
-
/** `Object#toString` result references. */
|
|
1892
|
-
var mapTag$1 = '[object Map]',
|
|
1893
|
-
objectTag$1 = '[object Object]',
|
|
1894
|
-
promiseTag = '[object Promise]',
|
|
1895
|
-
setTag$1 = '[object Set]',
|
|
1896
|
-
weakMapTag = '[object WeakMap]';
|
|
1897
|
-
|
|
1898
|
-
var dataViewTag = '[object DataView]';
|
|
840
|
+
var _listCacheSet = listCacheSet$1;
|
|
1899
841
|
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
weakMapCtorString = toSource(WeakMap);
|
|
842
|
+
var listCacheClear = _listCacheClear,
|
|
843
|
+
listCacheDelete = _listCacheDelete,
|
|
844
|
+
listCacheGet = _listCacheGet,
|
|
845
|
+
listCacheHas = _listCacheHas,
|
|
846
|
+
listCacheSet = _listCacheSet;
|
|
1906
847
|
|
|
1907
848
|
/**
|
|
1908
|
-
*
|
|
849
|
+
* Creates an list cache object.
|
|
1909
850
|
*
|
|
1910
851
|
* @private
|
|
1911
|
-
* @
|
|
1912
|
-
* @
|
|
852
|
+
* @constructor
|
|
853
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
1913
854
|
*/
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
if ((DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
1918
|
-
(Map && getTag$1(new Map) != mapTag$1) ||
|
|
1919
|
-
(Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag) ||
|
|
1920
|
-
(Set$1 && getTag$1(new Set$1) != setTag$1) ||
|
|
1921
|
-
(WeakMap && getTag$1(new WeakMap) != weakMapTag)) {
|
|
1922
|
-
getTag$1 = function(value) {
|
|
1923
|
-
var result = baseGetTag$3(value),
|
|
1924
|
-
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
1925
|
-
ctorString = Ctor ? toSource(Ctor) : '';
|
|
855
|
+
function ListCache$1(entries) {
|
|
856
|
+
var index = -1,
|
|
857
|
+
length = entries == null ? 0 : entries.length;
|
|
1926
858
|
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
case setCtorString: return setTag$1;
|
|
1933
|
-
case weakMapCtorString: return weakMapTag;
|
|
1934
|
-
}
|
|
1935
|
-
}
|
|
1936
|
-
return result;
|
|
1937
|
-
};
|
|
859
|
+
this.clear();
|
|
860
|
+
while (++index < length) {
|
|
861
|
+
var entry = entries[index];
|
|
862
|
+
this.set(entry[0], entry[1]);
|
|
863
|
+
}
|
|
1938
864
|
}
|
|
1939
865
|
|
|
1940
|
-
|
|
866
|
+
// Add methods to `ListCache`.
|
|
867
|
+
ListCache$1.prototype.clear = listCacheClear;
|
|
868
|
+
ListCache$1.prototype['delete'] = listCacheDelete;
|
|
869
|
+
ListCache$1.prototype.get = listCacheGet;
|
|
870
|
+
ListCache$1.prototype.has = listCacheHas;
|
|
871
|
+
ListCache$1.prototype.set = listCacheSet;
|
|
1941
872
|
|
|
1942
|
-
var
|
|
873
|
+
var _ListCache = ListCache$1;
|
|
1943
874
|
|
|
1944
|
-
|
|
1945
|
-
|
|
875
|
+
var getNative$4 = _getNative,
|
|
876
|
+
root$4 = _root;
|
|
877
|
+
|
|
878
|
+
/* Built-in method references that are verified to be native. */
|
|
879
|
+
var Map$2 = getNative$4(root$4, 'Map');
|
|
1946
880
|
|
|
1947
|
-
var
|
|
881
|
+
var _Map = Map$2;
|
|
1948
882
|
|
|
1949
|
-
var
|
|
883
|
+
var Hash = _Hash,
|
|
884
|
+
ListCache = _ListCache,
|
|
885
|
+
Map$1 = _Map;
|
|
1950
886
|
|
|
1951
887
|
/**
|
|
1952
|
-
*
|
|
888
|
+
* Removes all key-value entries from the map.
|
|
1953
889
|
*
|
|
1954
890
|
* @private
|
|
1955
|
-
* @
|
|
1956
|
-
* @
|
|
891
|
+
* @name clear
|
|
892
|
+
* @memberOf MapCache
|
|
1957
893
|
*/
|
|
1958
|
-
function
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
894
|
+
function mapCacheClear$1() {
|
|
895
|
+
this.size = 0;
|
|
896
|
+
this.__data__ = {
|
|
897
|
+
'hash': new Hash,
|
|
898
|
+
'map': new (Map$1 || ListCache),
|
|
899
|
+
'string': new Hash
|
|
900
|
+
};
|
|
1962
901
|
}
|
|
1963
902
|
|
|
1964
|
-
var
|
|
1965
|
-
|
|
1966
|
-
var Symbol$2 = _Symbol;
|
|
1967
|
-
|
|
1968
|
-
/** Used to convert symbols to primitives and strings. */
|
|
1969
|
-
var symbolProto$2 = Symbol$2 ? Symbol$2.prototype : undefined;
|
|
1970
|
-
symbolProto$2 ? symbolProto$2.valueOf : undefined;
|
|
1971
|
-
|
|
1972
|
-
var cloneArrayBuffer = _cloneArrayBuffer;
|
|
903
|
+
var _mapCacheClear = mapCacheClear$1;
|
|
1973
904
|
|
|
1974
905
|
/**
|
|
1975
|
-
*
|
|
906
|
+
* Checks if `value` is suitable for use as unique object key.
|
|
1976
907
|
*
|
|
1977
908
|
* @private
|
|
1978
|
-
* @param {
|
|
1979
|
-
* @
|
|
1980
|
-
* @returns {Object} Returns the cloned typed array.
|
|
909
|
+
* @param {*} value The value to check.
|
|
910
|
+
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
1981
911
|
*/
|
|
1982
|
-
function cloneTypedArray$1(typedArray, isDeep) {
|
|
1983
|
-
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
|
1984
|
-
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
|
1985
|
-
}
|
|
1986
912
|
|
|
1987
|
-
|
|
913
|
+
function isKeyable$1(value) {
|
|
914
|
+
var type = typeof value;
|
|
915
|
+
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
916
|
+
? (value !== '__proto__')
|
|
917
|
+
: (value === null);
|
|
918
|
+
}
|
|
1988
919
|
|
|
1989
|
-
var
|
|
920
|
+
var _isKeyable = isKeyable$1;
|
|
1990
921
|
|
|
1991
|
-
|
|
1992
|
-
var objectCreate = Object.create;
|
|
922
|
+
var isKeyable = _isKeyable;
|
|
1993
923
|
|
|
1994
924
|
/**
|
|
1995
|
-
*
|
|
1996
|
-
* properties to the created object.
|
|
925
|
+
* Gets the data for `map`.
|
|
1997
926
|
*
|
|
1998
927
|
* @private
|
|
1999
|
-
* @param {Object}
|
|
2000
|
-
* @
|
|
928
|
+
* @param {Object} map The map to query.
|
|
929
|
+
* @param {string} key The reference key.
|
|
930
|
+
* @returns {*} Returns the map data.
|
|
2001
931
|
*/
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
return
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
if (objectCreate) {
|
|
2009
|
-
return objectCreate(proto);
|
|
2010
|
-
}
|
|
2011
|
-
object.prototype = proto;
|
|
2012
|
-
var result = new object;
|
|
2013
|
-
object.prototype = undefined;
|
|
2014
|
-
return result;
|
|
2015
|
-
};
|
|
2016
|
-
}());
|
|
932
|
+
function getMapData$4(map, key) {
|
|
933
|
+
var data = map.__data__;
|
|
934
|
+
return isKeyable(key)
|
|
935
|
+
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
936
|
+
: data.map;
|
|
937
|
+
}
|
|
2017
938
|
|
|
2018
|
-
var
|
|
939
|
+
var _getMapData = getMapData$4;
|
|
2019
940
|
|
|
2020
|
-
var
|
|
2021
|
-
getPrototype$1 = _getPrototype,
|
|
2022
|
-
isPrototype$1 = _isPrototype;
|
|
941
|
+
var getMapData$3 = _getMapData;
|
|
2023
942
|
|
|
2024
943
|
/**
|
|
2025
|
-
*
|
|
944
|
+
* Removes `key` and its value from the map.
|
|
2026
945
|
*
|
|
2027
946
|
* @private
|
|
2028
|
-
* @
|
|
2029
|
-
* @
|
|
947
|
+
* @name delete
|
|
948
|
+
* @memberOf MapCache
|
|
949
|
+
* @param {string} key The key of the value to remove.
|
|
950
|
+
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
2030
951
|
*/
|
|
2031
|
-
function
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
952
|
+
function mapCacheDelete$1(key) {
|
|
953
|
+
var result = getMapData$3(this, key)['delete'](key);
|
|
954
|
+
this.size -= result ? 1 : 0;
|
|
955
|
+
return result;
|
|
2035
956
|
}
|
|
2036
957
|
|
|
2037
|
-
var
|
|
2038
|
-
|
|
2039
|
-
var nodeUtil$1 = _nodeUtil.exports;
|
|
2040
|
-
|
|
2041
|
-
/* Node.js helper references. */
|
|
2042
|
-
nodeUtil$1 && nodeUtil$1.isMap;
|
|
958
|
+
var _mapCacheDelete = mapCacheDelete$1;
|
|
2043
959
|
|
|
2044
|
-
var
|
|
960
|
+
var getMapData$2 = _getMapData;
|
|
2045
961
|
|
|
2046
|
-
|
|
2047
|
-
|
|
962
|
+
/**
|
|
963
|
+
* Gets the map value for `key`.
|
|
964
|
+
*
|
|
965
|
+
* @private
|
|
966
|
+
* @name get
|
|
967
|
+
* @memberOf MapCache
|
|
968
|
+
* @param {string} key The key of the value to get.
|
|
969
|
+
* @returns {*} Returns the entry value.
|
|
970
|
+
*/
|
|
971
|
+
function mapCacheGet$1(key) {
|
|
972
|
+
return getMapData$2(this, key).get(key);
|
|
973
|
+
}
|
|
2048
974
|
|
|
2049
|
-
var
|
|
975
|
+
var _mapCacheGet = mapCacheGet$1;
|
|
2050
976
|
|
|
2051
|
-
var
|
|
977
|
+
var getMapData$1 = _getMapData;
|
|
2052
978
|
|
|
2053
|
-
|
|
979
|
+
/**
|
|
980
|
+
* Checks if a map value for `key` exists.
|
|
981
|
+
*
|
|
982
|
+
* @private
|
|
983
|
+
* @name has
|
|
984
|
+
* @memberOf MapCache
|
|
985
|
+
* @param {string} key The key of the entry to check.
|
|
986
|
+
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
987
|
+
*/
|
|
988
|
+
function mapCacheHas$1(key) {
|
|
989
|
+
return getMapData$1(this, key).has(key);
|
|
990
|
+
}
|
|
2054
991
|
|
|
2055
|
-
var
|
|
2056
|
-
isObjectLike$3 = isObjectLike_1;
|
|
992
|
+
var _mapCacheHas = mapCacheHas$1;
|
|
2057
993
|
|
|
2058
|
-
|
|
2059
|
-
var symbolTag = '[object Symbol]';
|
|
994
|
+
var getMapData = _getMapData;
|
|
2060
995
|
|
|
2061
996
|
/**
|
|
2062
|
-
*
|
|
2063
|
-
*
|
|
2064
|
-
* @static
|
|
2065
|
-
* @memberOf _
|
|
2066
|
-
* @since 4.0.0
|
|
2067
|
-
* @category Lang
|
|
2068
|
-
* @param {*} value The value to check.
|
|
2069
|
-
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
2070
|
-
* @example
|
|
2071
|
-
*
|
|
2072
|
-
* _.isSymbol(Symbol.iterator);
|
|
2073
|
-
* // => true
|
|
997
|
+
* Sets the map `key` to `value`.
|
|
2074
998
|
*
|
|
2075
|
-
*
|
|
2076
|
-
*
|
|
999
|
+
* @private
|
|
1000
|
+
* @name set
|
|
1001
|
+
* @memberOf MapCache
|
|
1002
|
+
* @param {string} key The key of the value to set.
|
|
1003
|
+
* @param {*} value The value to set.
|
|
1004
|
+
* @returns {Object} Returns the map cache instance.
|
|
2077
1005
|
*/
|
|
2078
|
-
function
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
}
|
|
1006
|
+
function mapCacheSet$1(key, value) {
|
|
1007
|
+
var data = getMapData(this, key),
|
|
1008
|
+
size = data.size;
|
|
2082
1009
|
|
|
2083
|
-
|
|
1010
|
+
data.set(key, value);
|
|
1011
|
+
this.size += data.size == size ? 0 : 1;
|
|
1012
|
+
return this;
|
|
1013
|
+
}
|
|
2084
1014
|
|
|
2085
|
-
var
|
|
2086
|
-
isSymbol$3 = isSymbol_1;
|
|
1015
|
+
var _mapCacheSet = mapCacheSet$1;
|
|
2087
1016
|
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
1017
|
+
var mapCacheClear = _mapCacheClear,
|
|
1018
|
+
mapCacheDelete = _mapCacheDelete,
|
|
1019
|
+
mapCacheGet = _mapCacheGet,
|
|
1020
|
+
mapCacheHas = _mapCacheHas,
|
|
1021
|
+
mapCacheSet = _mapCacheSet;
|
|
2091
1022
|
|
|
2092
1023
|
/**
|
|
2093
|
-
*
|
|
1024
|
+
* Creates a map cache object to store key-value pairs.
|
|
2094
1025
|
*
|
|
2095
1026
|
* @private
|
|
2096
|
-
* @
|
|
2097
|
-
* @param {
|
|
2098
|
-
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
|
|
1027
|
+
* @constructor
|
|
1028
|
+
* @param {Array} [entries] The key-value pairs to cache.
|
|
2099
1029
|
*/
|
|
2100
|
-
function
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
1030
|
+
function MapCache$1(entries) {
|
|
1031
|
+
var index = -1,
|
|
1032
|
+
length = entries == null ? 0 : entries.length;
|
|
1033
|
+
|
|
1034
|
+
this.clear();
|
|
1035
|
+
while (++index < length) {
|
|
1036
|
+
var entry = entries[index];
|
|
1037
|
+
this.set(entry[0], entry[1]);
|
|
2108
1038
|
}
|
|
2109
|
-
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
|
|
2110
|
-
(object != null && value in Object(object));
|
|
2111
1039
|
}
|
|
2112
1040
|
|
|
2113
|
-
|
|
1041
|
+
// Add methods to `MapCache`.
|
|
1042
|
+
MapCache$1.prototype.clear = mapCacheClear;
|
|
1043
|
+
MapCache$1.prototype['delete'] = mapCacheDelete;
|
|
1044
|
+
MapCache$1.prototype.get = mapCacheGet;
|
|
1045
|
+
MapCache$1.prototype.has = mapCacheHas;
|
|
1046
|
+
MapCache$1.prototype.set = mapCacheSet;
|
|
1047
|
+
|
|
1048
|
+
var _MapCache = MapCache$1;
|
|
2114
1049
|
|
|
2115
1050
|
var MapCache = _MapCache;
|
|
2116
1051
|
|
|
@@ -2264,17 +1199,17 @@ function arrayMap$1(array, iteratee) {
|
|
|
2264
1199
|
|
|
2265
1200
|
var _arrayMap = arrayMap$1;
|
|
2266
1201
|
|
|
2267
|
-
var Symbol
|
|
1202
|
+
var Symbol = _Symbol,
|
|
2268
1203
|
arrayMap = _arrayMap,
|
|
2269
|
-
isArray$
|
|
1204
|
+
isArray$2 = isArray_1,
|
|
2270
1205
|
isSymbol$2 = isSymbol_1;
|
|
2271
1206
|
|
|
2272
1207
|
/** Used as references for various `Number` constants. */
|
|
2273
1208
|
var INFINITY$1 = 1 / 0;
|
|
2274
1209
|
|
|
2275
1210
|
/** Used to convert symbols to primitives and strings. */
|
|
2276
|
-
var symbolProto
|
|
2277
|
-
symbolToString = symbolProto
|
|
1211
|
+
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
1212
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
2278
1213
|
|
|
2279
1214
|
/**
|
|
2280
1215
|
* The base implementation of `_.toString` which doesn't convert nullish
|
|
@@ -2289,7 +1224,7 @@ function baseToString$1(value) {
|
|
|
2289
1224
|
if (typeof value == 'string') {
|
|
2290
1225
|
return value;
|
|
2291
1226
|
}
|
|
2292
|
-
if (isArray$
|
|
1227
|
+
if (isArray$2(value)) {
|
|
2293
1228
|
// Recursively convert values (susceptible to call stack limits).
|
|
2294
1229
|
return arrayMap(value, baseToString$1) + '';
|
|
2295
1230
|
}
|
|
@@ -2331,7 +1266,7 @@ function toString$1(value) {
|
|
|
2331
1266
|
|
|
2332
1267
|
var toString_1 = toString$1;
|
|
2333
1268
|
|
|
2334
|
-
var isArray$
|
|
1269
|
+
var isArray$1 = isArray_1,
|
|
2335
1270
|
isKey = _isKey,
|
|
2336
1271
|
stringToPath = _stringToPath,
|
|
2337
1272
|
toString = toString_1;
|
|
@@ -2345,7 +1280,7 @@ var isArray$2 = isArray_1,
|
|
|
2345
1280
|
* @returns {Array} Returns the cast property path array.
|
|
2346
1281
|
*/
|
|
2347
1282
|
function castPath$1(value, object) {
|
|
2348
|
-
if (isArray$
|
|
1283
|
+
if (isArray$1(value)) {
|
|
2349
1284
|
return value;
|
|
2350
1285
|
}
|
|
2351
1286
|
return isKey(value, object) ? [value] : stringToPath(toString(value));
|
|
@@ -2434,804 +1369,579 @@ function get(object, path, defaultValue) {
|
|
|
2434
1369
|
|
|
2435
1370
|
var get_1 = get;
|
|
2436
1371
|
|
|
2437
|
-
|
|
1372
|
+
/** Used for built-in method references. */
|
|
2438
1373
|
|
|
2439
|
-
var
|
|
1374
|
+
var objectProto$3 = Object.prototype;
|
|
2440
1375
|
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
1376
|
+
/**
|
|
1377
|
+
* Checks if `value` is likely a prototype object.
|
|
1378
|
+
*
|
|
1379
|
+
* @private
|
|
1380
|
+
* @param {*} value The value to check.
|
|
1381
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
1382
|
+
*/
|
|
1383
|
+
function isPrototype$2(value) {
|
|
1384
|
+
var Ctor = value && value.constructor,
|
|
1385
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto$3;
|
|
2449
1386
|
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
1387
|
+
return value === proto;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
var _isPrototype = isPrototype$2;
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
1394
|
+
*
|
|
1395
|
+
* @private
|
|
1396
|
+
* @param {Function} func The function to wrap.
|
|
1397
|
+
* @param {Function} transform The argument transform.
|
|
1398
|
+
* @returns {Function} Returns the new function.
|
|
1399
|
+
*/
|
|
1400
|
+
|
|
1401
|
+
function overArg$1(func, transform) {
|
|
1402
|
+
return function(arg) {
|
|
1403
|
+
return func(transform(arg));
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
var _overArg = overArg$1;
|
|
1408
|
+
|
|
1409
|
+
var overArg = _overArg;
|
|
1410
|
+
|
|
1411
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1412
|
+
var nativeKeys$1 = overArg(Object.keys, Object);
|
|
1413
|
+
|
|
1414
|
+
var _nativeKeys = nativeKeys$1;
|
|
1415
|
+
|
|
1416
|
+
var isPrototype$1 = _isPrototype,
|
|
1417
|
+
nativeKeys = _nativeKeys;
|
|
2453
1418
|
|
|
2454
1419
|
/** Used for built-in method references. */
|
|
2455
|
-
var objectProto$
|
|
1420
|
+
var objectProto$2 = Object.prototype;
|
|
2456
1421
|
|
|
2457
1422
|
/** Used to check objects for own properties. */
|
|
2458
|
-
var hasOwnProperty$
|
|
1423
|
+
var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
|
|
2459
1424
|
|
|
2460
1425
|
/**
|
|
2461
|
-
*
|
|
2462
|
-
*
|
|
2463
|
-
* Objects are considered empty if they have no own enumerable string keyed
|
|
2464
|
-
* properties.
|
|
2465
|
-
*
|
|
2466
|
-
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
2467
|
-
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
2468
|
-
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
2469
|
-
*
|
|
2470
|
-
* @static
|
|
2471
|
-
* @memberOf _
|
|
2472
|
-
* @since 0.1.0
|
|
2473
|
-
* @category Lang
|
|
2474
|
-
* @param {*} value The value to check.
|
|
2475
|
-
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
2476
|
-
* @example
|
|
2477
|
-
*
|
|
2478
|
-
* _.isEmpty(null);
|
|
2479
|
-
* // => true
|
|
2480
|
-
*
|
|
2481
|
-
* _.isEmpty(true);
|
|
2482
|
-
* // => true
|
|
2483
|
-
*
|
|
2484
|
-
* _.isEmpty(1);
|
|
2485
|
-
* // => true
|
|
2486
|
-
*
|
|
2487
|
-
* _.isEmpty([1, 2, 3]);
|
|
2488
|
-
* // => false
|
|
1426
|
+
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
|
|
2489
1427
|
*
|
|
2490
|
-
*
|
|
2491
|
-
*
|
|
1428
|
+
* @private
|
|
1429
|
+
* @param {Object} object The object to query.
|
|
1430
|
+
* @returns {Array} Returns the array of property names.
|
|
2492
1431
|
*/
|
|
2493
|
-
function
|
|
2494
|
-
if (
|
|
2495
|
-
return
|
|
2496
|
-
}
|
|
2497
|
-
if (isArrayLike$2(value) &&
|
|
2498
|
-
(isArray$1(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
2499
|
-
isBuffer$1(value) || isTypedArray$1(value) || isArguments$1(value))) {
|
|
2500
|
-
return !value.length;
|
|
2501
|
-
}
|
|
2502
|
-
var tag = getTag(value);
|
|
2503
|
-
if (tag == mapTag || tag == setTag) {
|
|
2504
|
-
return !value.size;
|
|
2505
|
-
}
|
|
2506
|
-
if (isPrototype(value)) {
|
|
2507
|
-
return !baseKeys(value).length;
|
|
1432
|
+
function baseKeys$1(object) {
|
|
1433
|
+
if (!isPrototype$1(object)) {
|
|
1434
|
+
return nativeKeys(object);
|
|
2508
1435
|
}
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
1436
|
+
var result = [];
|
|
1437
|
+
for (var key in Object(object)) {
|
|
1438
|
+
if (hasOwnProperty$2.call(object, key) && key != 'constructor') {
|
|
1439
|
+
result.push(key);
|
|
2512
1440
|
}
|
|
2513
1441
|
}
|
|
2514
|
-
return
|
|
1442
|
+
return result;
|
|
2515
1443
|
}
|
|
2516
1444
|
|
|
2517
|
-
var
|
|
1445
|
+
var _baseKeys = baseKeys$1;
|
|
2518
1446
|
|
|
2519
|
-
var
|
|
1447
|
+
var getNative$3 = _getNative,
|
|
1448
|
+
root$3 = _root;
|
|
2520
1449
|
|
|
2521
|
-
|
|
2522
|
-
var
|
|
2523
|
-
symbolProto ? symbolProto.valueOf : undefined;
|
|
1450
|
+
/* Built-in method references that are verified to be native. */
|
|
1451
|
+
var DataView$1 = getNative$3(root$3, 'DataView');
|
|
2524
1452
|
|
|
2525
|
-
var
|
|
1453
|
+
var _DataView = DataView$1;
|
|
2526
1454
|
|
|
2527
|
-
var
|
|
1455
|
+
var getNative$2 = _getNative,
|
|
1456
|
+
root$2 = _root;
|
|
2528
1457
|
|
|
2529
|
-
|
|
1458
|
+
/* Built-in method references that are verified to be native. */
|
|
1459
|
+
var Promise$2 = getNative$2(root$2, 'Promise');
|
|
2530
1460
|
|
|
2531
|
-
var
|
|
1461
|
+
var _Promise = Promise$2;
|
|
2532
1462
|
|
|
2533
|
-
|
|
1463
|
+
var getNative$1 = _getNative,
|
|
1464
|
+
root$1 = _root;
|
|
2534
1465
|
|
|
2535
|
-
|
|
1466
|
+
/* Built-in method references that are verified to be native. */
|
|
1467
|
+
var Set$2 = getNative$1(root$1, 'Set');
|
|
2536
1468
|
|
|
2537
|
-
var
|
|
1469
|
+
var _Set = Set$2;
|
|
2538
1470
|
|
|
2539
|
-
var
|
|
1471
|
+
var getNative = _getNative,
|
|
1472
|
+
root = _root;
|
|
2540
1473
|
|
|
2541
|
-
|
|
1474
|
+
/* Built-in method references that are verified to be native. */
|
|
1475
|
+
var WeakMap$1 = getNative(root, 'WeakMap');
|
|
2542
1476
|
|
|
2543
|
-
var
|
|
2544
|
-
eq$1 = eq_1;
|
|
1477
|
+
var _WeakMap = WeakMap$1;
|
|
2545
1478
|
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
*/
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
}
|
|
1479
|
+
var DataView = _DataView,
|
|
1480
|
+
Map = _Map,
|
|
1481
|
+
Promise$1 = _Promise,
|
|
1482
|
+
Set$1 = _Set,
|
|
1483
|
+
WeakMap = _WeakMap,
|
|
1484
|
+
baseGetTag$3 = _baseGetTag,
|
|
1485
|
+
toSource = _toSource;
|
|
1486
|
+
|
|
1487
|
+
/** `Object#toString` result references. */
|
|
1488
|
+
var mapTag$2 = '[object Map]',
|
|
1489
|
+
objectTag$1 = '[object Object]',
|
|
1490
|
+
promiseTag = '[object Promise]',
|
|
1491
|
+
setTag$2 = '[object Set]',
|
|
1492
|
+
weakMapTag$1 = '[object WeakMap]';
|
|
2561
1493
|
|
|
2562
|
-
var
|
|
1494
|
+
var dataViewTag$1 = '[object DataView]';
|
|
1495
|
+
|
|
1496
|
+
/** Used to detect maps, sets, and weakmaps. */
|
|
1497
|
+
var dataViewCtorString = toSource(DataView),
|
|
1498
|
+
mapCtorString = toSource(Map),
|
|
1499
|
+
promiseCtorString = toSource(Promise$1),
|
|
1500
|
+
setCtorString = toSource(Set$1),
|
|
1501
|
+
weakMapCtorString = toSource(WeakMap);
|
|
2563
1502
|
|
|
2564
1503
|
/**
|
|
2565
|
-
*
|
|
1504
|
+
* Gets the `toStringTag` of `value`.
|
|
2566
1505
|
*
|
|
2567
1506
|
* @private
|
|
2568
|
-
* @param {
|
|
2569
|
-
* @returns {
|
|
1507
|
+
* @param {*} value The value to query.
|
|
1508
|
+
* @returns {string} Returns the `toStringTag`.
|
|
2570
1509
|
*/
|
|
1510
|
+
var getTag$1 = baseGetTag$3;
|
|
1511
|
+
|
|
1512
|
+
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
|
|
1513
|
+
if ((DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag$1) ||
|
|
1514
|
+
(Map && getTag$1(new Map) != mapTag$2) ||
|
|
1515
|
+
(Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag) ||
|
|
1516
|
+
(Set$1 && getTag$1(new Set$1) != setTag$2) ||
|
|
1517
|
+
(WeakMap && getTag$1(new WeakMap) != weakMapTag$1)) {
|
|
1518
|
+
getTag$1 = function(value) {
|
|
1519
|
+
var result = baseGetTag$3(value),
|
|
1520
|
+
Ctor = result == objectTag$1 ? value.constructor : undefined,
|
|
1521
|
+
ctorString = Ctor ? toSource(Ctor) : '';
|
|
2571
1522
|
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
while (length--) {
|
|
2580
|
-
var key = props[fromRight ? length : ++index];
|
|
2581
|
-
if (iteratee(iterable[key], key, iterable) === false) {
|
|
2582
|
-
break;
|
|
1523
|
+
if (ctorString) {
|
|
1524
|
+
switch (ctorString) {
|
|
1525
|
+
case dataViewCtorString: return dataViewTag$1;
|
|
1526
|
+
case mapCtorString: return mapTag$2;
|
|
1527
|
+
case promiseCtorString: return promiseTag;
|
|
1528
|
+
case setCtorString: return setTag$2;
|
|
1529
|
+
case weakMapCtorString: return weakMapTag$1;
|
|
2583
1530
|
}
|
|
2584
1531
|
}
|
|
2585
|
-
return
|
|
1532
|
+
return result;
|
|
2586
1533
|
};
|
|
2587
1534
|
}
|
|
2588
1535
|
|
|
2589
|
-
var
|
|
1536
|
+
var _getTag = getTag$1;
|
|
1537
|
+
|
|
1538
|
+
var baseGetTag$2 = _baseGetTag,
|
|
1539
|
+
isObjectLike$3 = isObjectLike_1;
|
|
2590
1540
|
|
|
2591
|
-
|
|
1541
|
+
/** `Object#toString` result references. */
|
|
1542
|
+
var argsTag$1 = '[object Arguments]';
|
|
2592
1543
|
|
|
2593
1544
|
/**
|
|
2594
|
-
* The base implementation of `
|
|
2595
|
-
* properties returned by `keysFunc` and invokes `iteratee` for each property.
|
|
2596
|
-
* Iteratee functions may exit iteration early by explicitly returning `false`.
|
|
1545
|
+
* The base implementation of `_.isArguments`.
|
|
2597
1546
|
*
|
|
2598
1547
|
* @private
|
|
2599
|
-
* @param {
|
|
2600
|
-
* @
|
|
2601
|
-
* @param {Function} keysFunc The function to get the keys of `object`.
|
|
2602
|
-
* @returns {Object} Returns `object`.
|
|
1548
|
+
* @param {*} value The value to check.
|
|
1549
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
2603
1550
|
*/
|
|
2604
|
-
|
|
1551
|
+
function baseIsArguments$1(value) {
|
|
1552
|
+
return isObjectLike$3(value) && baseGetTag$2(value) == argsTag$1;
|
|
1553
|
+
}
|
|
2605
1554
|
|
|
2606
|
-
var
|
|
1555
|
+
var _baseIsArguments = baseIsArguments$1;
|
|
2607
1556
|
|
|
2608
|
-
var
|
|
1557
|
+
var baseIsArguments = _baseIsArguments,
|
|
2609
1558
|
isObjectLike$2 = isObjectLike_1;
|
|
2610
1559
|
|
|
1560
|
+
/** Used for built-in method references. */
|
|
1561
|
+
var objectProto$1 = Object.prototype;
|
|
1562
|
+
|
|
1563
|
+
/** Used to check objects for own properties. */
|
|
1564
|
+
var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
|
|
1565
|
+
|
|
1566
|
+
/** Built-in value references. */
|
|
1567
|
+
var propertyIsEnumerable = objectProto$1.propertyIsEnumerable;
|
|
1568
|
+
|
|
2611
1569
|
/**
|
|
2612
|
-
*
|
|
2613
|
-
* is an object.
|
|
1570
|
+
* Checks if `value` is likely an `arguments` object.
|
|
2614
1571
|
*
|
|
2615
1572
|
* @static
|
|
2616
1573
|
* @memberOf _
|
|
2617
|
-
* @since
|
|
1574
|
+
* @since 0.1.0
|
|
2618
1575
|
* @category Lang
|
|
2619
1576
|
* @param {*} value The value to check.
|
|
2620
|
-
* @returns {boolean} Returns `true` if `value` is an
|
|
1577
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
2621
1578
|
* else `false`.
|
|
2622
1579
|
* @example
|
|
2623
1580
|
*
|
|
2624
|
-
* _.
|
|
2625
|
-
* // => true
|
|
2626
|
-
*
|
|
2627
|
-
* _.isArrayLikeObject(document.body.children);
|
|
1581
|
+
* _.isArguments(function() { return arguments; }());
|
|
2628
1582
|
* // => true
|
|
2629
1583
|
*
|
|
2630
|
-
* _.
|
|
2631
|
-
* // => false
|
|
2632
|
-
*
|
|
2633
|
-
* _.isArrayLikeObject(_.noop);
|
|
1584
|
+
* _.isArguments([1, 2, 3]);
|
|
2634
1585
|
* // => false
|
|
2635
1586
|
*/
|
|
2636
|
-
|
|
2637
|
-
return isObjectLike$2(value) &&
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
var isArrayLikeObject_1 = isArrayLikeObject$1;
|
|
2641
|
-
|
|
2642
|
-
var baseGetTag$1 = _baseGetTag,
|
|
2643
|
-
getPrototype = _getPrototype,
|
|
2644
|
-
isObjectLike$1 = isObjectLike_1;
|
|
2645
|
-
|
|
2646
|
-
/** `Object#toString` result references. */
|
|
2647
|
-
var objectTag = '[object Object]';
|
|
2648
|
-
|
|
2649
|
-
/** Used for built-in method references. */
|
|
2650
|
-
var funcProto = Function.prototype,
|
|
2651
|
-
objectProto = Object.prototype;
|
|
1587
|
+
var isArguments$1 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
|
|
1588
|
+
return isObjectLike$2(value) && hasOwnProperty$1.call(value, 'callee') &&
|
|
1589
|
+
!propertyIsEnumerable.call(value, 'callee');
|
|
1590
|
+
};
|
|
2652
1591
|
|
|
2653
|
-
|
|
2654
|
-
var funcToString = funcProto.toString;
|
|
1592
|
+
var isArguments_1 = isArguments$1;
|
|
2655
1593
|
|
|
2656
|
-
/** Used
|
|
2657
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1594
|
+
/** Used as references for various `Number` constants. */
|
|
2658
1595
|
|
|
2659
|
-
|
|
2660
|
-
var objectCtorString = funcToString.call(Object);
|
|
1596
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
2661
1597
|
|
|
2662
1598
|
/**
|
|
2663
|
-
* Checks if `value` is a
|
|
2664
|
-
*
|
|
1599
|
+
* Checks if `value` is a valid array-like length.
|
|
1600
|
+
*
|
|
1601
|
+
* **Note:** This method is loosely based on
|
|
1602
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
2665
1603
|
*
|
|
2666
1604
|
* @static
|
|
2667
1605
|
* @memberOf _
|
|
2668
|
-
* @since 0.
|
|
1606
|
+
* @since 4.0.0
|
|
2669
1607
|
* @category Lang
|
|
2670
1608
|
* @param {*} value The value to check.
|
|
2671
|
-
* @returns {boolean} Returns `true` if `value` is a
|
|
1609
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
2672
1610
|
* @example
|
|
2673
1611
|
*
|
|
2674
|
-
*
|
|
2675
|
-
*
|
|
2676
|
-
* }
|
|
1612
|
+
* _.isLength(3);
|
|
1613
|
+
* // => true
|
|
2677
1614
|
*
|
|
2678
|
-
* _.
|
|
1615
|
+
* _.isLength(Number.MIN_VALUE);
|
|
2679
1616
|
* // => false
|
|
2680
1617
|
*
|
|
2681
|
-
* _.
|
|
1618
|
+
* _.isLength(Infinity);
|
|
2682
1619
|
* // => false
|
|
2683
1620
|
*
|
|
2684
|
-
* _.
|
|
2685
|
-
* // =>
|
|
2686
|
-
*
|
|
2687
|
-
* _.isPlainObject(Object.create(null));
|
|
2688
|
-
* // => true
|
|
2689
|
-
*/
|
|
2690
|
-
function isPlainObject$1(value) {
|
|
2691
|
-
if (!isObjectLike$1(value) || baseGetTag$1(value) != objectTag) {
|
|
2692
|
-
return false;
|
|
2693
|
-
}
|
|
2694
|
-
var proto = getPrototype(value);
|
|
2695
|
-
if (proto === null) {
|
|
2696
|
-
return true;
|
|
2697
|
-
}
|
|
2698
|
-
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
2699
|
-
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
|
|
2700
|
-
funcToString.call(Ctor) == objectCtorString;
|
|
2701
|
-
}
|
|
2702
|
-
|
|
2703
|
-
var isPlainObject_1 = isPlainObject$1;
|
|
2704
|
-
|
|
2705
|
-
/**
|
|
2706
|
-
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
|
|
2707
|
-
*
|
|
2708
|
-
* @private
|
|
2709
|
-
* @param {Object} object The object to query.
|
|
2710
|
-
* @param {string} key The key of the property to get.
|
|
2711
|
-
* @returns {*} Returns the property value.
|
|
1621
|
+
* _.isLength('3');
|
|
1622
|
+
* // => false
|
|
2712
1623
|
*/
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
return;
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
|
-
if (key == '__proto__') {
|
|
2720
|
-
return;
|
|
2721
|
-
}
|
|
2722
|
-
|
|
2723
|
-
return object[key];
|
|
1624
|
+
function isLength$2(value) {
|
|
1625
|
+
return typeof value == 'number' &&
|
|
1626
|
+
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
2724
1627
|
}
|
|
2725
1628
|
|
|
2726
|
-
var
|
|
1629
|
+
var isLength_1 = isLength$2;
|
|
2727
1630
|
|
|
2728
|
-
var
|
|
2729
|
-
|
|
1631
|
+
var isFunction = isFunction_1,
|
|
1632
|
+
isLength$1 = isLength_1;
|
|
2730
1633
|
|
|
2731
1634
|
/**
|
|
2732
|
-
*
|
|
2733
|
-
*
|
|
1635
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
1636
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
1637
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
2734
1638
|
*
|
|
2735
1639
|
* @static
|
|
2736
1640
|
* @memberOf _
|
|
2737
|
-
* @since
|
|
1641
|
+
* @since 4.0.0
|
|
2738
1642
|
* @category Lang
|
|
2739
|
-
* @param {*} value The value to
|
|
2740
|
-
* @returns {
|
|
1643
|
+
* @param {*} value The value to check.
|
|
1644
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
2741
1645
|
* @example
|
|
2742
1646
|
*
|
|
2743
|
-
*
|
|
2744
|
-
*
|
|
2745
|
-
* }
|
|
1647
|
+
* _.isArrayLike([1, 2, 3]);
|
|
1648
|
+
* // => true
|
|
2746
1649
|
*
|
|
2747
|
-
*
|
|
1650
|
+
* _.isArrayLike(document.body.children);
|
|
1651
|
+
* // => true
|
|
2748
1652
|
*
|
|
2749
|
-
* _.
|
|
2750
|
-
* // =>
|
|
1653
|
+
* _.isArrayLike('abc');
|
|
1654
|
+
* // => true
|
|
2751
1655
|
*
|
|
2752
|
-
* _.
|
|
2753
|
-
* // =>
|
|
1656
|
+
* _.isArrayLike(_.noop);
|
|
1657
|
+
* // => false
|
|
2754
1658
|
*/
|
|
2755
|
-
function
|
|
2756
|
-
return
|
|
1659
|
+
function isArrayLike$1(value) {
|
|
1660
|
+
return value != null && isLength$1(value.length) && !isFunction(value);
|
|
2757
1661
|
}
|
|
2758
1662
|
|
|
2759
|
-
var
|
|
1663
|
+
var isArrayLike_1 = isArrayLike$1;
|
|
2760
1664
|
|
|
2761
|
-
var
|
|
2762
|
-
cloneBuffer = _cloneBuffer.exports,
|
|
2763
|
-
cloneTypedArray = _cloneTypedArray,
|
|
2764
|
-
copyArray = _copyArray,
|
|
2765
|
-
initCloneObject = _initCloneObject,
|
|
2766
|
-
isArguments = isArguments_1,
|
|
2767
|
-
isArray = isArray_1,
|
|
2768
|
-
isArrayLikeObject = isArrayLikeObject_1,
|
|
2769
|
-
isBuffer = isBuffer$3.exports,
|
|
2770
|
-
isFunction = isFunction_1,
|
|
2771
|
-
isObject$3 = isObject_1,
|
|
2772
|
-
isPlainObject = isPlainObject_1,
|
|
2773
|
-
isTypedArray = isTypedArray_1,
|
|
2774
|
-
safeGet$1 = _safeGet,
|
|
2775
|
-
toPlainObject = toPlainObject_1;
|
|
1665
|
+
var isBuffer$1 = {exports: {}};
|
|
2776
1666
|
|
|
2777
1667
|
/**
|
|
2778
|
-
*
|
|
2779
|
-
* deep merges and tracks traversed objects enabling objects with circular
|
|
2780
|
-
* references to be merged.
|
|
1668
|
+
* This method returns `false`.
|
|
2781
1669
|
*
|
|
2782
|
-
* @
|
|
2783
|
-
* @
|
|
2784
|
-
* @
|
|
2785
|
-
* @
|
|
2786
|
-
* @
|
|
2787
|
-
* @
|
|
2788
|
-
*
|
|
2789
|
-
*
|
|
2790
|
-
*
|
|
1670
|
+
* @static
|
|
1671
|
+
* @memberOf _
|
|
1672
|
+
* @since 4.13.0
|
|
1673
|
+
* @category Util
|
|
1674
|
+
* @returns {boolean} Returns `false`.
|
|
1675
|
+
* @example
|
|
1676
|
+
*
|
|
1677
|
+
* _.times(2, _.stubFalse);
|
|
1678
|
+
* // => [false, false]
|
|
2791
1679
|
*/
|
|
2792
|
-
function baseMergeDeep$1(object, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
2793
|
-
var objValue = safeGet$1(object, key),
|
|
2794
|
-
srcValue = safeGet$1(source, key),
|
|
2795
|
-
stacked = stack.get(srcValue);
|
|
2796
|
-
|
|
2797
|
-
if (stacked) {
|
|
2798
|
-
assignMergeValue$1(object, key, stacked);
|
|
2799
|
-
return;
|
|
2800
|
-
}
|
|
2801
|
-
var newValue = customizer
|
|
2802
|
-
? customizer(objValue, srcValue, (key + ''), object, source, stack)
|
|
2803
|
-
: undefined;
|
|
2804
1680
|
|
|
2805
|
-
|
|
1681
|
+
function stubFalse() {
|
|
1682
|
+
return false;
|
|
1683
|
+
}
|
|
2806
1684
|
|
|
2807
|
-
|
|
2808
|
-
var isArr = isArray(srcValue),
|
|
2809
|
-
isBuff = !isArr && isBuffer(srcValue),
|
|
2810
|
-
isTyped = !isArr && !isBuff && isTypedArray(srcValue);
|
|
1685
|
+
var stubFalse_1 = stubFalse;
|
|
2811
1686
|
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
newValue = objValue;
|
|
2816
|
-
}
|
|
2817
|
-
else if (isArrayLikeObject(objValue)) {
|
|
2818
|
-
newValue = copyArray(objValue);
|
|
2819
|
-
}
|
|
2820
|
-
else if (isBuff) {
|
|
2821
|
-
isCommon = false;
|
|
2822
|
-
newValue = cloneBuffer(srcValue, true);
|
|
2823
|
-
}
|
|
2824
|
-
else if (isTyped) {
|
|
2825
|
-
isCommon = false;
|
|
2826
|
-
newValue = cloneTypedArray(srcValue, true);
|
|
2827
|
-
}
|
|
2828
|
-
else {
|
|
2829
|
-
newValue = [];
|
|
2830
|
-
}
|
|
2831
|
-
}
|
|
2832
|
-
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
|
|
2833
|
-
newValue = objValue;
|
|
2834
|
-
if (isArguments(objValue)) {
|
|
2835
|
-
newValue = toPlainObject(objValue);
|
|
2836
|
-
}
|
|
2837
|
-
else if (!isObject$3(objValue) || isFunction(objValue)) {
|
|
2838
|
-
newValue = initCloneObject(srcValue);
|
|
2839
|
-
}
|
|
2840
|
-
}
|
|
2841
|
-
else {
|
|
2842
|
-
isCommon = false;
|
|
2843
|
-
}
|
|
2844
|
-
}
|
|
2845
|
-
if (isCommon) {
|
|
2846
|
-
// Recursively merge objects and arrays (susceptible to call stack limits).
|
|
2847
|
-
stack.set(srcValue, newValue);
|
|
2848
|
-
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
|
|
2849
|
-
stack['delete'](srcValue);
|
|
2850
|
-
}
|
|
2851
|
-
assignMergeValue$1(object, key, newValue);
|
|
2852
|
-
}
|
|
1687
|
+
(function (module, exports) {
|
|
1688
|
+
var root = _root,
|
|
1689
|
+
stubFalse = stubFalse_1;
|
|
2853
1690
|
|
|
2854
|
-
|
|
1691
|
+
/** Detect free variable `exports`. */
|
|
1692
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
2855
1693
|
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
baseFor = _baseFor,
|
|
2859
|
-
baseMergeDeep = _baseMergeDeep,
|
|
2860
|
-
isObject$2 = isObject_1,
|
|
2861
|
-
keysIn = keysIn_1,
|
|
2862
|
-
safeGet = _safeGet;
|
|
1694
|
+
/** Detect free variable `module`. */
|
|
1695
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
2863
1696
|
|
|
2864
|
-
/**
|
|
2865
|
-
|
|
2866
|
-
*
|
|
2867
|
-
* @private
|
|
2868
|
-
* @param {Object} object The destination object.
|
|
2869
|
-
* @param {Object} source The source object.
|
|
2870
|
-
* @param {number} srcIndex The index of `source`.
|
|
2871
|
-
* @param {Function} [customizer] The function to customize merged values.
|
|
2872
|
-
* @param {Object} [stack] Tracks traversed source values and their merged
|
|
2873
|
-
* counterparts.
|
|
2874
|
-
*/
|
|
2875
|
-
function baseMerge$1(object, source, srcIndex, customizer, stack) {
|
|
2876
|
-
if (object === source) {
|
|
2877
|
-
return;
|
|
2878
|
-
}
|
|
2879
|
-
baseFor(source, function(srcValue, key) {
|
|
2880
|
-
stack || (stack = new Stack);
|
|
2881
|
-
if (isObject$2(srcValue)) {
|
|
2882
|
-
baseMergeDeep(object, source, key, srcIndex, baseMerge$1, customizer, stack);
|
|
2883
|
-
}
|
|
2884
|
-
else {
|
|
2885
|
-
var newValue = customizer
|
|
2886
|
-
? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
|
|
2887
|
-
: undefined;
|
|
1697
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1698
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
2888
1699
|
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
}
|
|
2892
|
-
assignMergeValue(object, key, newValue);
|
|
2893
|
-
}
|
|
2894
|
-
}, keysIn);
|
|
2895
|
-
}
|
|
1700
|
+
/** Built-in value references. */
|
|
1701
|
+
var Buffer = moduleExports ? root.Buffer : undefined;
|
|
2896
1702
|
|
|
2897
|
-
|
|
1703
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1704
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
|
|
2898
1705
|
|
|
2899
1706
|
/**
|
|
2900
|
-
*
|
|
1707
|
+
* Checks if `value` is a buffer.
|
|
2901
1708
|
*
|
|
2902
1709
|
* @static
|
|
2903
|
-
* @since 0.1.0
|
|
2904
1710
|
* @memberOf _
|
|
2905
|
-
* @
|
|
2906
|
-
* @
|
|
2907
|
-
* @
|
|
1711
|
+
* @since 4.3.0
|
|
1712
|
+
* @category Lang
|
|
1713
|
+
* @param {*} value The value to check.
|
|
1714
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
2908
1715
|
* @example
|
|
2909
1716
|
*
|
|
2910
|
-
*
|
|
2911
|
-
*
|
|
2912
|
-
* console.log(_.identity(object) === object);
|
|
1717
|
+
* _.isBuffer(new Buffer(2));
|
|
2913
1718
|
* // => true
|
|
2914
|
-
*/
|
|
2915
|
-
|
|
2916
|
-
function identity$2(value) {
|
|
2917
|
-
return value;
|
|
2918
|
-
}
|
|
2919
|
-
|
|
2920
|
-
var identity_1 = identity$2;
|
|
2921
|
-
|
|
2922
|
-
/**
|
|
2923
|
-
* A faster alternative to `Function#apply`, this function invokes `func`
|
|
2924
|
-
* with the `this` binding of `thisArg` and the arguments of `args`.
|
|
2925
1719
|
*
|
|
2926
|
-
*
|
|
2927
|
-
*
|
|
2928
|
-
* @param {*} thisArg The `this` binding of `func`.
|
|
2929
|
-
* @param {Array} args The arguments to invoke `func` with.
|
|
2930
|
-
* @returns {*} Returns the result of `func`.
|
|
1720
|
+
* _.isBuffer(new Uint8Array(2));
|
|
1721
|
+
* // => false
|
|
2931
1722
|
*/
|
|
1723
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
2932
1724
|
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
case 0: return func.call(thisArg);
|
|
2936
|
-
case 1: return func.call(thisArg, args[0]);
|
|
2937
|
-
case 2: return func.call(thisArg, args[0], args[1]);
|
|
2938
|
-
case 3: return func.call(thisArg, args[0], args[1], args[2]);
|
|
2939
|
-
}
|
|
2940
|
-
return func.apply(thisArg, args);
|
|
2941
|
-
}
|
|
1725
|
+
module.exports = isBuffer;
|
|
1726
|
+
}(isBuffer$1, isBuffer$1.exports));
|
|
2942
1727
|
|
|
2943
|
-
var
|
|
1728
|
+
var baseGetTag$1 = _baseGetTag,
|
|
1729
|
+
isLength = isLength_1,
|
|
1730
|
+
isObjectLike$1 = isObjectLike_1;
|
|
2944
1731
|
|
|
2945
|
-
|
|
1732
|
+
/** `Object#toString` result references. */
|
|
1733
|
+
var argsTag = '[object Arguments]',
|
|
1734
|
+
arrayTag = '[object Array]',
|
|
1735
|
+
boolTag = '[object Boolean]',
|
|
1736
|
+
dateTag = '[object Date]',
|
|
1737
|
+
errorTag = '[object Error]',
|
|
1738
|
+
funcTag = '[object Function]',
|
|
1739
|
+
mapTag$1 = '[object Map]',
|
|
1740
|
+
numberTag$1 = '[object Number]',
|
|
1741
|
+
objectTag = '[object Object]',
|
|
1742
|
+
regexpTag = '[object RegExp]',
|
|
1743
|
+
setTag$1 = '[object Set]',
|
|
1744
|
+
stringTag = '[object String]',
|
|
1745
|
+
weakMapTag = '[object WeakMap]';
|
|
2946
1746
|
|
|
2947
|
-
|
|
2948
|
-
|
|
1747
|
+
var arrayBufferTag = '[object ArrayBuffer]',
|
|
1748
|
+
dataViewTag = '[object DataView]',
|
|
1749
|
+
float32Tag = '[object Float32Array]',
|
|
1750
|
+
float64Tag = '[object Float64Array]',
|
|
1751
|
+
int8Tag = '[object Int8Array]',
|
|
1752
|
+
int16Tag = '[object Int16Array]',
|
|
1753
|
+
int32Tag = '[object Int32Array]',
|
|
1754
|
+
uint8Tag = '[object Uint8Array]',
|
|
1755
|
+
uint8ClampedTag = '[object Uint8ClampedArray]',
|
|
1756
|
+
uint16Tag = '[object Uint16Array]',
|
|
1757
|
+
uint32Tag = '[object Uint32Array]';
|
|
1758
|
+
|
|
1759
|
+
/** Used to identify `toStringTag` values of typed arrays. */
|
|
1760
|
+
var typedArrayTags = {};
|
|
1761
|
+
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
|
|
1762
|
+
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
|
|
1763
|
+
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
|
|
1764
|
+
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
|
|
1765
|
+
typedArrayTags[uint32Tag] = true;
|
|
1766
|
+
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
|
|
1767
|
+
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
|
|
1768
|
+
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
|
|
1769
|
+
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
|
|
1770
|
+
typedArrayTags[mapTag$1] = typedArrayTags[numberTag$1] =
|
|
1771
|
+
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
|
|
1772
|
+
typedArrayTags[setTag$1] = typedArrayTags[stringTag] =
|
|
1773
|
+
typedArrayTags[weakMapTag] = false;
|
|
2949
1774
|
|
|
2950
1775
|
/**
|
|
2951
|
-
*
|
|
1776
|
+
* The base implementation of `_.isTypedArray` without Node.js optimizations.
|
|
2952
1777
|
*
|
|
2953
1778
|
* @private
|
|
2954
|
-
* @param {
|
|
2955
|
-
* @
|
|
2956
|
-
* @param {Function} transform The rest array transform.
|
|
2957
|
-
* @returns {Function} Returns the new function.
|
|
1779
|
+
* @param {*} value The value to check.
|
|
1780
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
2958
1781
|
*/
|
|
2959
|
-
function
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
var args = arguments,
|
|
2963
|
-
index = -1,
|
|
2964
|
-
length = nativeMax(args.length - start, 0),
|
|
2965
|
-
array = Array(length);
|
|
2966
|
-
|
|
2967
|
-
while (++index < length) {
|
|
2968
|
-
array[index] = args[start + index];
|
|
2969
|
-
}
|
|
2970
|
-
index = -1;
|
|
2971
|
-
var otherArgs = Array(start + 1);
|
|
2972
|
-
while (++index < start) {
|
|
2973
|
-
otherArgs[index] = args[index];
|
|
2974
|
-
}
|
|
2975
|
-
otherArgs[start] = transform(array);
|
|
2976
|
-
return apply(func, this, otherArgs);
|
|
2977
|
-
};
|
|
1782
|
+
function baseIsTypedArray$1(value) {
|
|
1783
|
+
return isObjectLike$1(value) &&
|
|
1784
|
+
isLength(value.length) && !!typedArrayTags[baseGetTag$1(value)];
|
|
2978
1785
|
}
|
|
2979
1786
|
|
|
2980
|
-
var
|
|
1787
|
+
var _baseIsTypedArray = baseIsTypedArray$1;
|
|
2981
1788
|
|
|
2982
1789
|
/**
|
|
2983
|
-
*
|
|
2984
|
-
*
|
|
2985
|
-
* @static
|
|
2986
|
-
* @memberOf _
|
|
2987
|
-
* @since 2.4.0
|
|
2988
|
-
* @category Util
|
|
2989
|
-
* @param {*} value The value to return from the new function.
|
|
2990
|
-
* @returns {Function} Returns the new constant function.
|
|
2991
|
-
* @example
|
|
2992
|
-
*
|
|
2993
|
-
* var objects = _.times(2, _.constant({ 'a': 1 }));
|
|
2994
|
-
*
|
|
2995
|
-
* console.log(objects);
|
|
2996
|
-
* // => [{ 'a': 1 }, { 'a': 1 }]
|
|
1790
|
+
* The base implementation of `_.unary` without support for storing metadata.
|
|
2997
1791
|
*
|
|
2998
|
-
*
|
|
2999
|
-
*
|
|
1792
|
+
* @private
|
|
1793
|
+
* @param {Function} func The function to cap arguments for.
|
|
1794
|
+
* @returns {Function} Returns the new capped function.
|
|
3000
1795
|
*/
|
|
3001
1796
|
|
|
3002
|
-
function
|
|
3003
|
-
return function() {
|
|
3004
|
-
return value;
|
|
1797
|
+
function baseUnary$1(func) {
|
|
1798
|
+
return function(value) {
|
|
1799
|
+
return func(value);
|
|
3005
1800
|
};
|
|
3006
1801
|
}
|
|
3007
1802
|
|
|
3008
|
-
var
|
|
1803
|
+
var _baseUnary = baseUnary$1;
|
|
3009
1804
|
|
|
3010
|
-
var
|
|
3011
|
-
defineProperty = _defineProperty,
|
|
3012
|
-
identity$1 = identity_1;
|
|
1805
|
+
var _nodeUtil = {exports: {}};
|
|
3013
1806
|
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
*
|
|
3017
|
-
* @private
|
|
3018
|
-
* @param {Function} func The function to modify.
|
|
3019
|
-
* @param {Function} string The `toString` result.
|
|
3020
|
-
* @returns {Function} Returns `func`.
|
|
3021
|
-
*/
|
|
3022
|
-
var baseSetToString$1 = !defineProperty ? identity$1 : function(func, string) {
|
|
3023
|
-
return defineProperty(func, 'toString', {
|
|
3024
|
-
'configurable': true,
|
|
3025
|
-
'enumerable': false,
|
|
3026
|
-
'value': constant(string),
|
|
3027
|
-
'writable': true
|
|
3028
|
-
});
|
|
3029
|
-
};
|
|
1807
|
+
(function (module, exports) {
|
|
1808
|
+
var freeGlobal = _freeGlobal;
|
|
3030
1809
|
|
|
3031
|
-
|
|
1810
|
+
/** Detect free variable `exports`. */
|
|
1811
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
3032
1812
|
|
|
3033
|
-
/**
|
|
1813
|
+
/** Detect free variable `module`. */
|
|
1814
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
3034
1815
|
|
|
3035
|
-
|
|
3036
|
-
|
|
1816
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1817
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
3037
1818
|
|
|
3038
|
-
|
|
3039
|
-
var
|
|
1819
|
+
/** Detect free variable `process` from Node.js. */
|
|
1820
|
+
var freeProcess = moduleExports && freeGlobal.process;
|
|
3040
1821
|
|
|
3041
|
-
/**
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
* @private
|
|
3047
|
-
* @param {Function} func The function to restrict.
|
|
3048
|
-
* @returns {Function} Returns the new shortable function.
|
|
3049
|
-
*/
|
|
3050
|
-
function shortOut$1(func) {
|
|
3051
|
-
var count = 0,
|
|
3052
|
-
lastCalled = 0;
|
|
3053
|
-
|
|
3054
|
-
return function() {
|
|
3055
|
-
var stamp = nativeNow(),
|
|
3056
|
-
remaining = HOT_SPAN - (stamp - lastCalled);
|
|
3057
|
-
|
|
3058
|
-
lastCalled = stamp;
|
|
3059
|
-
if (remaining > 0) {
|
|
3060
|
-
if (++count >= HOT_COUNT) {
|
|
3061
|
-
return arguments[0];
|
|
3062
|
-
}
|
|
3063
|
-
} else {
|
|
3064
|
-
count = 0;
|
|
3065
|
-
}
|
|
3066
|
-
return func.apply(undefined, arguments);
|
|
3067
|
-
};
|
|
3068
|
-
}
|
|
1822
|
+
/** Used to access faster Node.js helpers. */
|
|
1823
|
+
var nodeUtil = (function() {
|
|
1824
|
+
try {
|
|
1825
|
+
// Use `util.types` for Node.js 10+.
|
|
1826
|
+
var types = freeModule && freeModule.require && freeModule.require('util').types;
|
|
3069
1827
|
|
|
3070
|
-
|
|
1828
|
+
if (types) {
|
|
1829
|
+
return types;
|
|
1830
|
+
}
|
|
3071
1831
|
|
|
3072
|
-
|
|
3073
|
-
|
|
1832
|
+
// Legacy `process.binding('util')` for Node.js < 10.
|
|
1833
|
+
return freeProcess && freeProcess.binding && freeProcess.binding('util');
|
|
1834
|
+
} catch (e) {}
|
|
1835
|
+
}());
|
|
3074
1836
|
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
*
|
|
3078
|
-
* @private
|
|
3079
|
-
* @param {Function} func The function to modify.
|
|
3080
|
-
* @param {Function} string The `toString` result.
|
|
3081
|
-
* @returns {Function} Returns `func`.
|
|
3082
|
-
*/
|
|
3083
|
-
var setToString$1 = shortOut(baseSetToString);
|
|
1837
|
+
module.exports = nodeUtil;
|
|
1838
|
+
}(_nodeUtil, _nodeUtil.exports));
|
|
3084
1839
|
|
|
3085
|
-
var
|
|
1840
|
+
var baseIsTypedArray = _baseIsTypedArray,
|
|
1841
|
+
baseUnary = _baseUnary,
|
|
1842
|
+
nodeUtil = _nodeUtil.exports;
|
|
3086
1843
|
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
setToString = _setToString;
|
|
1844
|
+
/* Node.js helper references. */
|
|
1845
|
+
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
3090
1846
|
|
|
3091
1847
|
/**
|
|
3092
|
-
*
|
|
1848
|
+
* Checks if `value` is classified as a typed array.
|
|
3093
1849
|
*
|
|
3094
|
-
* @
|
|
3095
|
-
* @
|
|
3096
|
-
* @
|
|
3097
|
-
* @
|
|
1850
|
+
* @static
|
|
1851
|
+
* @memberOf _
|
|
1852
|
+
* @since 3.0.0
|
|
1853
|
+
* @category Lang
|
|
1854
|
+
* @param {*} value The value to check.
|
|
1855
|
+
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
|
|
1856
|
+
* @example
|
|
1857
|
+
*
|
|
1858
|
+
* _.isTypedArray(new Uint8Array);
|
|
1859
|
+
* // => true
|
|
1860
|
+
*
|
|
1861
|
+
* _.isTypedArray([]);
|
|
1862
|
+
* // => false
|
|
3098
1863
|
*/
|
|
3099
|
-
|
|
3100
|
-
return setToString(overRest(func, start, identity), func + '');
|
|
3101
|
-
}
|
|
1864
|
+
var isTypedArray$1 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
|
|
3102
1865
|
|
|
3103
|
-
var
|
|
1866
|
+
var isTypedArray_1 = isTypedArray$1;
|
|
3104
1867
|
|
|
3105
|
-
var
|
|
1868
|
+
var baseKeys = _baseKeys,
|
|
1869
|
+
getTag = _getTag,
|
|
1870
|
+
isArguments = isArguments_1,
|
|
1871
|
+
isArray = isArray_1,
|
|
3106
1872
|
isArrayLike = isArrayLike_1,
|
|
3107
|
-
|
|
3108
|
-
|
|
1873
|
+
isBuffer = isBuffer$1.exports,
|
|
1874
|
+
isPrototype = _isPrototype,
|
|
1875
|
+
isTypedArray = isTypedArray_1;
|
|
3109
1876
|
|
|
3110
|
-
/**
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
* @private
|
|
3114
|
-
* @param {*} value The potential iteratee value argument.
|
|
3115
|
-
* @param {*} index The potential iteratee index or key argument.
|
|
3116
|
-
* @param {*} object The potential iteratee object argument.
|
|
3117
|
-
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
|
|
3118
|
-
* else `false`.
|
|
3119
|
-
*/
|
|
3120
|
-
function isIterateeCall$1(value, index, object) {
|
|
3121
|
-
if (!isObject$1(object)) {
|
|
3122
|
-
return false;
|
|
3123
|
-
}
|
|
3124
|
-
var type = typeof index;
|
|
3125
|
-
if (type == 'number'
|
|
3126
|
-
? (isArrayLike(object) && isIndex(index, object.length))
|
|
3127
|
-
: (type == 'string' && index in object)
|
|
3128
|
-
) {
|
|
3129
|
-
return eq(object[index], value);
|
|
3130
|
-
}
|
|
3131
|
-
return false;
|
|
3132
|
-
}
|
|
1877
|
+
/** `Object#toString` result references. */
|
|
1878
|
+
var mapTag = '[object Map]',
|
|
1879
|
+
setTag = '[object Set]';
|
|
3133
1880
|
|
|
3134
|
-
|
|
1881
|
+
/** Used for built-in method references. */
|
|
1882
|
+
var objectProto = Object.prototype;
|
|
3135
1883
|
|
|
3136
|
-
|
|
3137
|
-
|
|
1884
|
+
/** Used to check objects for own properties. */
|
|
1885
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
3138
1886
|
|
|
3139
1887
|
/**
|
|
3140
|
-
*
|
|
1888
|
+
* Checks if `value` is an empty object, collection, map, or set.
|
|
3141
1889
|
*
|
|
3142
|
-
*
|
|
3143
|
-
*
|
|
3144
|
-
* @returns {Function} Returns the new assigner function.
|
|
3145
|
-
*/
|
|
3146
|
-
function createAssigner$1(assigner) {
|
|
3147
|
-
return baseRest(function(object, sources) {
|
|
3148
|
-
var index = -1,
|
|
3149
|
-
length = sources.length,
|
|
3150
|
-
customizer = length > 1 ? sources[length - 1] : undefined,
|
|
3151
|
-
guard = length > 2 ? sources[2] : undefined;
|
|
3152
|
-
|
|
3153
|
-
customizer = (assigner.length > 3 && typeof customizer == 'function')
|
|
3154
|
-
? (length--, customizer)
|
|
3155
|
-
: undefined;
|
|
3156
|
-
|
|
3157
|
-
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
|
|
3158
|
-
customizer = length < 3 ? undefined : customizer;
|
|
3159
|
-
length = 1;
|
|
3160
|
-
}
|
|
3161
|
-
object = Object(object);
|
|
3162
|
-
while (++index < length) {
|
|
3163
|
-
var source = sources[index];
|
|
3164
|
-
if (source) {
|
|
3165
|
-
assigner(object, source, index, customizer);
|
|
3166
|
-
}
|
|
3167
|
-
}
|
|
3168
|
-
return object;
|
|
3169
|
-
});
|
|
3170
|
-
}
|
|
3171
|
-
|
|
3172
|
-
var _createAssigner = createAssigner$1;
|
|
3173
|
-
|
|
3174
|
-
var baseMerge = _baseMerge,
|
|
3175
|
-
createAssigner = _createAssigner;
|
|
3176
|
-
|
|
3177
|
-
/**
|
|
3178
|
-
* This method is like `_.assign` except that it recursively merges own and
|
|
3179
|
-
* inherited enumerable string keyed properties of source objects into the
|
|
3180
|
-
* destination object. Source properties that resolve to `undefined` are
|
|
3181
|
-
* skipped if a destination value exists. Array and plain object properties
|
|
3182
|
-
* are merged recursively. Other objects and value types are overridden by
|
|
3183
|
-
* assignment. Source objects are applied from left to right. Subsequent
|
|
3184
|
-
* sources overwrite property assignments of previous sources.
|
|
1890
|
+
* Objects are considered empty if they have no own enumerable string keyed
|
|
1891
|
+
* properties.
|
|
3185
1892
|
*
|
|
3186
|
-
*
|
|
1893
|
+
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
1894
|
+
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
1895
|
+
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
3187
1896
|
*
|
|
3188
1897
|
* @static
|
|
3189
1898
|
* @memberOf _
|
|
3190
|
-
* @since 0.
|
|
3191
|
-
* @category
|
|
3192
|
-
* @param {
|
|
3193
|
-
* @
|
|
3194
|
-
* @returns {Object} Returns `object`.
|
|
1899
|
+
* @since 0.1.0
|
|
1900
|
+
* @category Lang
|
|
1901
|
+
* @param {*} value The value to check.
|
|
1902
|
+
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
3195
1903
|
* @example
|
|
3196
1904
|
*
|
|
3197
|
-
*
|
|
3198
|
-
*
|
|
3199
|
-
*
|
|
1905
|
+
* _.isEmpty(null);
|
|
1906
|
+
* // => true
|
|
1907
|
+
*
|
|
1908
|
+
* _.isEmpty(true);
|
|
1909
|
+
* // => true
|
|
1910
|
+
*
|
|
1911
|
+
* _.isEmpty(1);
|
|
1912
|
+
* // => true
|
|
3200
1913
|
*
|
|
3201
|
-
*
|
|
3202
|
-
*
|
|
3203
|
-
* };
|
|
1914
|
+
* _.isEmpty([1, 2, 3]);
|
|
1915
|
+
* // => false
|
|
3204
1916
|
*
|
|
3205
|
-
* _.
|
|
3206
|
-
* // =>
|
|
1917
|
+
* _.isEmpty({ 'a': 1 });
|
|
1918
|
+
* // => false
|
|
3207
1919
|
*/
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
var getActionListSectionPosition=function getActionListSectionPosition(children){var childComponentIdArray=React__default.Children.toArray(children).map(function(child){return getComponentId(child);});var lastActionListSectionIndex=childComponentIdArray.lastIndexOf(componentIds$1.ActionListSection);var isActionListItemPresentAfterSection=childComponentIdArray.slice(lastActionListSectionIndex).includes(componentIds$1.ActionListItem);return {isActionListItemPresentAfterSection:isActionListItemPresentAfterSection,lastActionListSectionIndex:lastActionListSectionIndex};};var actionListAllowedChildren=[componentIds$1.ActionListFooter,componentIds$1.ActionListHeader,componentIds$1.ActionListItem,componentIds$1.ActionListSection];var getActionListProperties=function getActionListProperties(children){var sectionData=[];var currentSection=null;var actionListOptions=[];var actionListHeaderChild=null;var actionListFooterChild=null;var getActionListItemWithId=function getActionListItemWithId(child,hideDivider){if(React__default.isValidElement(child)&&!child.props.isDisabled){actionListOptions.push({title:child.props.title,value:child.props.value,onClickTrigger:function onClickTrigger(value){var _child$props$isSelect;var anchorLink=child.props.href;child.props.onClick==null?void 0:child.props.onClick({name:child.props.value,value:(_child$props$isSelect=child.props.isSelected)!=null?_child$props$isSelect:value});if(anchorLink&&!isReactNative$4()){var _child$props$target;var target=(_child$props$target=child.props.target)!=null?_child$props$target:'_self';window.open(anchorLink,target);if(window.top){window.top.open(anchorLink,target);}}}});var currentIndex=actionListOptions.length-1;var foundSection=sectionData.find(function(v){return v.title===currentSection;});if(foundSection){foundSection==null?void 0:foundSection.data.push(_extends({},child.props,{_index:currentIndex}));}else {sectionData.push({title:currentSection,hideDivider:hideDivider,data:[_extends({},child.props,{_index:currentIndex})]});}var clonedChild=React__default.cloneElement(child,{_index:currentIndex});return clonedChild;}return child;};var isActionListItemPresentAfterSection;var lastActionListSectionIndex;if(isReactNative$4()){var _getActionListSection=getActionListSectionPosition(children);isActionListItemPresentAfterSection=_getActionListSection.isActionListItemPresentAfterSection;lastActionListSectionIndex=_getActionListSection.lastActionListSectionIndex;}var childrenWithId=React__default.Children.map(children,function(child,index){if(React__default.isValidElement(child)){if(isValidAllowedChildren(child,componentIds$1.ActionListHeader)){actionListHeaderChild=child;return null;}if(isValidAllowedChildren(child,componentIds$1.ActionListFooter)){actionListFooterChild=child;return null;}if(isValidAllowedChildren(child,componentIds$1.ActionListSection)){var shouldHideDivider=index===lastActionListSectionIndex&&!isActionListItemPresentAfterSection;return React__default.cloneElement(child,{children:React__default.Children.map(child.props.children,function(childInSection){currentSection=child.props.title;if(isValidAllowedChildren(childInSection,componentIds$1.ActionListItem)){return getActionListItemWithId(childInSection,shouldHideDivider);}return childInSection;}),_hideDivider:isReactNative$4()?shouldHideDivider:undefined});}if(isValidAllowedChildren(child,componentIds$1.ActionListItem)){return getActionListItemWithId(child,true);}throw new Error("[ActionList]: Only "+actionListAllowedChildren.join(', ')+" supported inside ActionList");}return child;});return {sectionData:sectionData,childrenWithId:childrenWithId,actionListFooterChild:actionListFooterChild,actionListHeaderChild:actionListHeaderChild,actionListOptions:actionListOptions};};var validateActionListItemProps=function validateActionListItemProps(_ref){var leading=_ref.leading,trailing=_ref.trailing;React__default.Children.map(trailing,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemText)){throw new Error("[ActionListItem]: Only "+componentIds$1.ActionListItemIcon+" and "+componentIds$1.ActionListItemText+" are allowed in trailing prop");}});React__default.Children.map(leading,function(child){if(!isValidAllowedChildren(child,componentIds$1.ActionListItemIcon)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemText)&&!isValidAllowedChildren(child,componentIds$1.ActionListItemAsset)){throw new Error("[ActionListItem]: Only "+componentIds$1.ActionListItemIcon+", "+componentIds$1.ActionListItemAsset+", and "+componentIds$1.ActionListItemText+" are allowed in leading prop");}});};var getNormalTextColor=function getNormalTextColor(isDisabled){var _ref2=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},isMuted=_ref2.isMuted;if(isDisabled){return 'surface.text.placeholder.lowContrast';}if(isMuted){return 'surface.text.muted.lowContrast';}return 'surface.text.normal.lowContrast';};
|
|
1920
|
+
function isEmpty(value) {
|
|
1921
|
+
if (value == null) {
|
|
1922
|
+
return true;
|
|
1923
|
+
}
|
|
1924
|
+
if (isArrayLike(value) &&
|
|
1925
|
+
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
|
|
1926
|
+
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
|
|
1927
|
+
return !value.length;
|
|
1928
|
+
}
|
|
1929
|
+
var tag = getTag(value);
|
|
1930
|
+
if (tag == mapTag || tag == setTag) {
|
|
1931
|
+
return !value.size;
|
|
1932
|
+
}
|
|
1933
|
+
if (isPrototype(value)) {
|
|
1934
|
+
return !baseKeys(value).length;
|
|
1935
|
+
}
|
|
1936
|
+
for (var key in value) {
|
|
1937
|
+
if (hasOwnProperty.call(value, key)) {
|
|
1938
|
+
return false;
|
|
1939
|
+
}
|
|
1940
|
+
}
|
|
1941
|
+
return true;
|
|
1942
|
+
}
|
|
3233
1943
|
|
|
3234
|
-
var
|
|
1944
|
+
var isEmpty_1 = isEmpty;
|
|
3235
1945
|
|
|
3236
1946
|
var breakpoints={base:0,xs:320,s:480,m:768,l:1024,xl:1200};
|
|
3237
1947
|
|
|
@@ -3239,11 +1949,17 @@ var fontFamily={text:'Lato',code:Platform.OS==='ios'?'Courier':'monospace'};
|
|
|
3239
1949
|
|
|
3240
1950
|
var fontWeight={regular:400,bold:700};({onDesktop:{fonts:{family:_extends({},fontFamily),size:{10:9,25:10,50:11,75:12,100:14,200:16,300:18,400:20,500:22,600:24,700:28,800:32,900:36,1000:40},weight:_extends({},fontWeight)},lineHeights:{0:0,25:14,50:16,75:18,100:20,200:24,300:24,400:28,500:32,600:40,700:40,800:48}},onMobile:{fonts:{family:_extends({},fontFamily),size:{10:9,25:10,50:11,75:12,100:14,200:16,300:16,400:18,500:20,600:20,700:24,800:28,900:32,1000:32},weight:_extends({},fontWeight)},lineHeights:{0:0,25:14,50:16,75:18,100:20,200:20,300:24,400:24,500:28,600:32,700:40,800:40}}});
|
|
3241
1951
|
|
|
1952
|
+
var makeBezier=function makeBezier(x1,y1,x2,y2){return Easing.bezier(x1,y1,x2,y2);};
|
|
1953
|
+
|
|
3242
1954
|
({standard:{attentive:makeBezier(0.5,0,0.3,1.5),effective:makeBezier(0.3,0,0.2,1),revealing:makeBezier(0.5,0,0,1),wary:makeBezier(1,0.5,0,0.5)},entrance:{attentive:makeBezier(0.5,0,0.3,1.5),effective:makeBezier(0,0,0.2,1),revealing:makeBezier(0,0,0,1)},exit:{attentive:makeBezier(0.7,0,0.5,1),effective:makeBezier(0.17,0,1,1),revealing:makeBezier(0.5,0,1,1)}});
|
|
3243
1955
|
|
|
3244
1956
|
var size={0:0,1:1,2:2,3:3,4:4,5:5,6:6,8:8,10:10,12:12,16:16,18:18,20:20,24:24,28:28,32:32,36:36,40:40,44:44,48:48,56:56,100:100,120:120,140:140,160:160,200:200,300:300,360:360,400:400,584:584,640:640,760:760,800:800,1024:1024,1136:1136};
|
|
3245
1957
|
|
|
3246
|
-
var _excluded$4W=["base"];var getResponsiveValue=function getResponsiveValue(value){var breakpoint=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'base';if(value===undefined||value===null){return undefined;}if(typeof value==='string'||typeof value==='number'||Array.isArray(value)){if(breakpoint==='base'){return value;}return undefined;}if(isEmpty_1(value)){return undefined;}if(isReactNative$4()){var priorityArray=[value.s,value.xs,value.base];return priorityArray.find(function(val){return val!==undefined;});}return value[breakpoint];};var getSpacingValue=function getSpacingValue(spacingValue,theme,breakpoint){if(isEmpty_1(spacingValue)){return undefined;}var responsiveSpacingValue=getResponsiveValue(spacingValue,breakpoint);if(isEmpty_1(responsiveSpacingValue)){return undefined;}if(responsiveSpacingValue==='auto'){return responsiveSpacingValue;}if(Array.isArray(responsiveSpacingValue)){return responsiveSpacingValue.map(function(value){return getSpacingValue(value,theme);}).join(' ');}if(typeof responsiveSpacingValue==='string'&&responsiveSpacingValue.startsWith('spacing.')){var spacingReturnValue=get_1(theme,responsiveSpacingValue);return isEmpty_1(spacingReturnValue)?makeSpace(spacingReturnValue):undefined;}return responsiveSpacingValue;};var getColorValue=function getColorValue(color,theme,breakpoint){var responsiveBackgroundValue=getResponsiveValue(color,breakpoint);var tokenValue=get_1(theme,"colors."+responsiveBackgroundValue);return tokenValue!=null?tokenValue:responsiveBackgroundValue;};var getBorderRadiusValue=function getBorderRadiusValue(borderRadius,theme,breakpoint){var responsiveBorderRadiusValue=getResponsiveValue(borderRadius,breakpoint);return isEmpty_1(responsiveBorderRadiusValue)?undefined:makeBorderSize(get_1(theme,"border.radius."+responsiveBorderRadiusValue));};var getBorderWidthValue=function getBorderWidthValue(borderWidth,theme,breakpoint){var responsiveBorderWidthValue=getResponsiveValue(borderWidth,breakpoint);return isEmpty_1(responsiveBorderWidthValue)?undefined:makeBorderSize(get_1(theme,"border.width."+responsiveBorderWidthValue));};var getAllProps=function getAllProps(props,breakpoint){var _props$paddingTop,_props$paddingBottom,_props$paddingRight,_props$paddingLeft,_props$marginBottom,_props$marginTop,_props$marginRight,_props$marginLeft;var hasBorder=props.borderBottom||props.borderTop||props.borderLeft||props.borderRight||props.borderBottomColor||props.borderTopColor||props.borderLeftColor||props.borderRightColor||props.borderBottomWidth||props.borderTopWidth||props.borderLeftWidth||props.borderRightWidth;return {display:getResponsiveValue(props.display,breakpoint),overflow:getResponsiveValue(props.overflow,breakpoint),overflowX:getResponsiveValue(props.overflowX,breakpoint),overflowY:getResponsiveValue(props.overflowY,breakpoint),textAlign:getResponsiveValue(props.textAlign,breakpoint),flex:getResponsiveValue(props.flex,breakpoint),flexWrap:getResponsiveValue(props.flexWrap,breakpoint),flexDirection:getResponsiveValue(props.flexDirection,breakpoint),flexGrow:getResponsiveValue(props.flexGrow,breakpoint),flexShrink:getResponsiveValue(props.flexShrink,breakpoint),flexBasis:getResponsiveValue(props.flexBasis,breakpoint),alignItems:getResponsiveValue(props.alignItems,breakpoint),alignContent:getResponsiveValue(props.alignContent,breakpoint),alignSelf:getResponsiveValue(props.alignSelf,breakpoint),justifyItems:getResponsiveValue(props.justifyItems,breakpoint),justifyContent:getResponsiveValue(props.justifyContent,breakpoint),justifySelf:getResponsiveValue(props.justifySelf,breakpoint),order:getResponsiveValue(props.order,breakpoint),position:getResponsiveValue(props.position,breakpoint),zIndex:getResponsiveValue(props.zIndex,breakpoint),grid:getResponsiveValue(props.grid,breakpoint),gridColumn:getResponsiveValue(props.gridColumn,breakpoint),gridRow:getResponsiveValue(props.gridRow,breakpoint),gridRowStart:getResponsiveValue(props.gridRowStart,breakpoint),gridRowEnd:getResponsiveValue(props.gridRowEnd,breakpoint),gridArea:getResponsiveValue(props.gridArea,breakpoint),gridAutoFlow:getResponsiveValue(props.gridAutoFlow,breakpoint),gridAutoRows:getResponsiveValue(props.gridAutoRows,breakpoint),gridAutoColumns:getResponsiveValue(props.gridAutoColumns,breakpoint),gridTemplate:getResponsiveValue(props.gridTemplate,breakpoint),gridTemplateAreas:getResponsiveValue(props.gridTemplateAreas,breakpoint),gridTemplateColumns:getResponsiveValue(props.gridTemplateColumns,breakpoint),gridTemplateRows:getResponsiveValue(props.gridTemplateRows,breakpoint),padding:getSpacingValue(props.padding,props.theme,breakpoint),paddingTop:getSpacingValue((_props$paddingTop=props.paddingTop)!=null?_props$paddingTop:props.paddingY,props.theme,breakpoint),paddingBottom:getSpacingValue((_props$paddingBottom=props.paddingBottom)!=null?_props$paddingBottom:props.paddingY,props.theme,breakpoint),paddingRight:getSpacingValue((_props$paddingRight=props.paddingRight)!=null?_props$paddingRight:props.paddingX,props.theme,breakpoint),paddingLeft:getSpacingValue((_props$paddingLeft=props.paddingLeft)!=null?_props$paddingLeft:props.paddingX,props.theme,breakpoint),margin:getSpacingValue(props.margin,props.theme,breakpoint),marginBottom:getSpacingValue((_props$marginBottom=props.marginBottom)!=null?_props$marginBottom:props.marginY,props.theme,breakpoint),marginTop:getSpacingValue((_props$marginTop=props.marginTop)!=null?_props$marginTop:props.marginY,props.theme,breakpoint),marginRight:getSpacingValue((_props$marginRight=props.marginRight)!=null?_props$marginRight:props.marginX,props.theme,breakpoint),marginLeft:getSpacingValue((_props$marginLeft=props.marginLeft)!=null?_props$marginLeft:props.marginX,props.theme,breakpoint),height:getSpacingValue(props.height,props.theme,breakpoint),minHeight:getSpacingValue(props.minHeight,props.theme,breakpoint),maxHeight:getSpacingValue(props.maxHeight,props.theme,breakpoint),width:getSpacingValue(props.width,props.theme,breakpoint),minWidth:getSpacingValue(props.minWidth,props.theme,breakpoint),maxWidth:getSpacingValue(props.maxWidth,props.theme,breakpoint),gap:getSpacingValue(props.gap,props.theme,breakpoint),rowGap:getSpacingValue(props.rowGap,props.theme,breakpoint),columnGap:getSpacingValue(props.columnGap,props.theme,breakpoint),top:getSpacingValue(props.top,props.theme,breakpoint),right:getSpacingValue(props.right,props.theme,breakpoint),bottom:getSpacingValue(props.bottom,props.theme,breakpoint),left:getSpacingValue(props.left,props.theme,breakpoint),backgroundColor:getColorValue(props.backgroundColor,props.theme,breakpoint),borderRadius:getBorderRadiusValue(props.borderRadius,props.theme,breakpoint),lineHeight:getSpacingValue(props.lineHeight,props.theme,breakpoint),border:getResponsiveValue(props.border,breakpoint),borderTop:getResponsiveValue(props.borderTop,breakpoint),borderRight:getResponsiveValue(props.borderRight,breakpoint),borderBottom:getResponsiveValue(props.borderBottom,breakpoint),borderLeft:getResponsiveValue(props.borderLeft,breakpoint),borderWidth:getBorderWidthValue(props.borderWidth,props.theme,breakpoint),borderColor:getColorValue(props.borderColor,props.theme,breakpoint),borderTopWidth:getBorderWidthValue(props.borderTopWidth,props.theme,breakpoint),borderTopColor:getColorValue(props.borderTopColor,props.theme,breakpoint),borderRightWidth:getBorderWidthValue(props.borderRightWidth,props.theme,breakpoint),borderRightColor:getColorValue(props.borderRightColor,props.theme,breakpoint),borderBottomWidth:getBorderWidthValue(props.borderBottomWidth,props.theme,breakpoint),borderBottomColor:getColorValue(props.borderBottomColor,props.theme,breakpoint),borderLeftWidth:getBorderWidthValue(props.borderLeftWidth,props.theme,breakpoint),borderLeftColor:getColorValue(props.borderLeftColor,props.theme,breakpoint),borderTopLeftRadius:getBorderRadiusValue(props.borderTopLeftRadius,props.theme,breakpoint),borderTopRightRadius:getBorderRadiusValue(props.borderTopRightRadius,props.theme,breakpoint),borderBottomRightRadius:getBorderRadiusValue(props.borderBottomRightRadius,props.theme,breakpoint),borderBottomLeftRadius:getBorderRadiusValue(props.borderBottomLeftRadius,props.theme,breakpoint),borderStyle:hasBorder?'solid':undefined,touchAction:getResponsiveValue(props.touchAction,breakpoint),userSelect:getResponsiveValue(props.userSelect,breakpoint),pointerEvents:getResponsiveValue(props.pointerEvents),opacity:getResponsiveValue(props.opacity,breakpoint)};};var shouldAddBreakpoint=function shouldAddBreakpoint(cssProps){var firstDefinedValue=Object.values(cssProps).find(function(cssValue){return cssValue!==undefined&&cssValue!==null;});return firstDefinedValue!==undefined;};var getAllMediaQueries=function getAllMediaQueries(props){if(isReactNative$4()){return {};}breakpoints.base;var breakpointsWithoutBase=_objectWithoutProperties(breakpoints,_excluded$4W);return Object.fromEntries(Object.entries(breakpointsWithoutBase).map(function(_ref){var _ref2=_slicedToArray(_ref,2),breakpointKey=_ref2[0],breakpointValue=_ref2[1];var cssPropsForCurrentBreakpoint=getAllProps(props,breakpointKey);if(!shouldAddBreakpoint(cssPropsForCurrentBreakpoint)){return [];}var mediaQuery="@media "+getMediaQuery({min:breakpointValue});return [mediaQuery,cssPropsForCurrentBreakpoint];}));};var getBaseBoxStyles=function getBaseBoxStyles(props){return _extends({},getAllProps(props),getAllMediaQueries(props));};
|
|
1958
|
+
var _excluded$4W=["base"];var getResponsiveValue=function getResponsiveValue(value){var breakpoint=arguments.length>1&&arguments[1]!==undefined?arguments[1]:'base';if(value===undefined||value===null){return undefined;}if(typeof value==='string'||typeof value==='number'||Array.isArray(value)){if(breakpoint==='base'){return value;}return undefined;}if(isEmpty_1(value)){return undefined;}if(isReactNative$4()){var priorityArray=[value.s,value.xs,value.base];return priorityArray.find(function(val){return val!==undefined;});}return value[breakpoint];};var getSpacingValue=function getSpacingValue(spacingValue,theme,breakpoint){if(isEmpty_1(spacingValue)){return undefined;}var responsiveSpacingValue=getResponsiveValue(spacingValue,breakpoint);if(isEmpty_1(responsiveSpacingValue)){return undefined;}if(responsiveSpacingValue==='auto'){return responsiveSpacingValue;}if(Array.isArray(responsiveSpacingValue)){return responsiveSpacingValue.map(function(value){return getSpacingValue(value,theme);}).join(' ');}if(typeof responsiveSpacingValue==='string'&&responsiveSpacingValue.startsWith('spacing.')){var spacingReturnValue=get_1(theme,responsiveSpacingValue);return isEmpty_1(spacingReturnValue)?makeSpace(spacingReturnValue):undefined;}return responsiveSpacingValue;};var getColorValue=function getColorValue(color,theme,breakpoint){var responsiveBackgroundValue=getResponsiveValue(color,breakpoint);var tokenValue=get_1(theme,"colors."+responsiveBackgroundValue);return tokenValue!=null?tokenValue:responsiveBackgroundValue;};var getBorderRadiusValue=function getBorderRadiusValue(borderRadius,theme,breakpoint){var responsiveBorderRadiusValue=getResponsiveValue(borderRadius,breakpoint);return isEmpty_1(responsiveBorderRadiusValue)?undefined:makeBorderSize(get_1(theme,"border.radius."+responsiveBorderRadiusValue));};var getBorderWidthValue=function getBorderWidthValue(borderWidth,theme,breakpoint){var responsiveBorderWidthValue=getResponsiveValue(borderWidth,breakpoint);return isEmpty_1(responsiveBorderWidthValue)?undefined:makeBorderSize(get_1(theme,"border.width."+responsiveBorderWidthValue));};var getAllProps=function getAllProps(props,breakpoint){var _props$paddingTop,_props$paddingBottom,_props$paddingRight,_props$paddingLeft,_props$marginBottom,_props$marginTop,_props$marginRight,_props$marginLeft;var hasBorder=props.borderBottom||props.borderTop||props.borderLeft||props.borderRight||props.borderBottomColor||props.borderTopColor||props.borderLeftColor||props.borderRightColor||props.borderBottomWidth||props.borderTopWidth||props.borderLeftWidth||props.borderRightWidth;return {display:getResponsiveValue(props.display,breakpoint),overflow:getResponsiveValue(props.overflow,breakpoint),overflowX:getResponsiveValue(props.overflowX,breakpoint),overflowY:getResponsiveValue(props.overflowY,breakpoint),textAlign:getResponsiveValue(props.textAlign,breakpoint),flex:getResponsiveValue(props.flex,breakpoint),flexWrap:getResponsiveValue(props.flexWrap,breakpoint),flexDirection:getResponsiveValue(props.flexDirection,breakpoint),flexGrow:getResponsiveValue(props.flexGrow,breakpoint),flexShrink:getResponsiveValue(props.flexShrink,breakpoint),flexBasis:getResponsiveValue(props.flexBasis,breakpoint),alignItems:getResponsiveValue(props.alignItems,breakpoint),alignContent:getResponsiveValue(props.alignContent,breakpoint),alignSelf:getResponsiveValue(props.alignSelf,breakpoint),justifyItems:getResponsiveValue(props.justifyItems,breakpoint),justifyContent:getResponsiveValue(props.justifyContent,breakpoint),justifySelf:getResponsiveValue(props.justifySelf,breakpoint),order:getResponsiveValue(props.order,breakpoint),position:getResponsiveValue(props.position,breakpoint),zIndex:getResponsiveValue(props.zIndex,breakpoint),grid:getResponsiveValue(props.grid,breakpoint),gridColumn:getResponsiveValue(props.gridColumn,breakpoint),gridRow:getResponsiveValue(props.gridRow,breakpoint),gridRowStart:getResponsiveValue(props.gridRowStart,breakpoint),gridRowEnd:getResponsiveValue(props.gridRowEnd,breakpoint),gridArea:getResponsiveValue(props.gridArea,breakpoint),gridAutoFlow:getResponsiveValue(props.gridAutoFlow,breakpoint),gridAutoRows:getResponsiveValue(props.gridAutoRows,breakpoint),gridAutoColumns:getResponsiveValue(props.gridAutoColumns,breakpoint),gridTemplate:getResponsiveValue(props.gridTemplate,breakpoint),gridTemplateAreas:getResponsiveValue(props.gridTemplateAreas,breakpoint),gridTemplateColumns:getResponsiveValue(props.gridTemplateColumns,breakpoint),gridTemplateRows:getResponsiveValue(props.gridTemplateRows,breakpoint),padding:getSpacingValue(props.padding,props.theme,breakpoint),paddingTop:getSpacingValue((_props$paddingTop=props.paddingTop)!=null?_props$paddingTop:props.paddingY,props.theme,breakpoint),paddingBottom:getSpacingValue((_props$paddingBottom=props.paddingBottom)!=null?_props$paddingBottom:props.paddingY,props.theme,breakpoint),paddingRight:getSpacingValue((_props$paddingRight=props.paddingRight)!=null?_props$paddingRight:props.paddingX,props.theme,breakpoint),paddingLeft:getSpacingValue((_props$paddingLeft=props.paddingLeft)!=null?_props$paddingLeft:props.paddingX,props.theme,breakpoint),margin:getSpacingValue(props.margin,props.theme,breakpoint),marginBottom:getSpacingValue((_props$marginBottom=props.marginBottom)!=null?_props$marginBottom:props.marginY,props.theme,breakpoint),marginTop:getSpacingValue((_props$marginTop=props.marginTop)!=null?_props$marginTop:props.marginY,props.theme,breakpoint),marginRight:getSpacingValue((_props$marginRight=props.marginRight)!=null?_props$marginRight:props.marginX,props.theme,breakpoint),marginLeft:getSpacingValue((_props$marginLeft=props.marginLeft)!=null?_props$marginLeft:props.marginX,props.theme,breakpoint),height:getSpacingValue(props.height,props.theme,breakpoint),minHeight:getSpacingValue(props.minHeight,props.theme,breakpoint),maxHeight:getSpacingValue(props.maxHeight,props.theme,breakpoint),width:getSpacingValue(props.width,props.theme,breakpoint),minWidth:getSpacingValue(props.minWidth,props.theme,breakpoint),maxWidth:getSpacingValue(props.maxWidth,props.theme,breakpoint),gap:getSpacingValue(props.gap,props.theme,breakpoint),rowGap:getSpacingValue(props.rowGap,props.theme,breakpoint),columnGap:getSpacingValue(props.columnGap,props.theme,breakpoint),top:getSpacingValue(props.top,props.theme,breakpoint),right:getSpacingValue(props.right,props.theme,breakpoint),bottom:getSpacingValue(props.bottom,props.theme,breakpoint),left:getSpacingValue(props.left,props.theme,breakpoint),backgroundColor:getColorValue(props.backgroundColor,props.theme,breakpoint),backgroundImage:getResponsiveValue(props.backgroundImage,breakpoint),backgroundSize:getResponsiveValue(props.backgroundSize,breakpoint),backgroundPosition:getResponsiveValue(props.backgroundPosition,breakpoint),backgroundOrigin:getResponsiveValue(props.backgroundOrigin,breakpoint),backgroundRepeat:getResponsiveValue(props.backgroundRepeat,breakpoint),borderRadius:getBorderRadiusValue(props.borderRadius,props.theme,breakpoint),lineHeight:getSpacingValue(props.lineHeight,props.theme,breakpoint),border:getResponsiveValue(props.border,breakpoint),borderTop:getResponsiveValue(props.borderTop,breakpoint),borderRight:getResponsiveValue(props.borderRight,breakpoint),borderBottom:getResponsiveValue(props.borderBottom,breakpoint),borderLeft:getResponsiveValue(props.borderLeft,breakpoint),borderWidth:getBorderWidthValue(props.borderWidth,props.theme,breakpoint),borderColor:getColorValue(props.borderColor,props.theme,breakpoint),borderTopWidth:getBorderWidthValue(props.borderTopWidth,props.theme,breakpoint),borderTopColor:getColorValue(props.borderTopColor,props.theme,breakpoint),borderRightWidth:getBorderWidthValue(props.borderRightWidth,props.theme,breakpoint),borderRightColor:getColorValue(props.borderRightColor,props.theme,breakpoint),borderBottomWidth:getBorderWidthValue(props.borderBottomWidth,props.theme,breakpoint),borderBottomColor:getColorValue(props.borderBottomColor,props.theme,breakpoint),borderLeftWidth:getBorderWidthValue(props.borderLeftWidth,props.theme,breakpoint),borderLeftColor:getColorValue(props.borderLeftColor,props.theme,breakpoint),borderTopLeftRadius:getBorderRadiusValue(props.borderTopLeftRadius,props.theme,breakpoint),borderTopRightRadius:getBorderRadiusValue(props.borderTopRightRadius,props.theme,breakpoint),borderBottomRightRadius:getBorderRadiusValue(props.borderBottomRightRadius,props.theme,breakpoint),borderBottomLeftRadius:getBorderRadiusValue(props.borderBottomLeftRadius,props.theme,breakpoint),borderStyle:hasBorder?'solid':undefined,touchAction:getResponsiveValue(props.touchAction,breakpoint),userSelect:getResponsiveValue(props.userSelect,breakpoint),pointerEvents:getResponsiveValue(props.pointerEvents),opacity:getResponsiveValue(props.opacity,breakpoint)};};var shouldAddBreakpoint=function shouldAddBreakpoint(cssProps){var firstDefinedValue=Object.values(cssProps).find(function(cssValue){return cssValue!==undefined&&cssValue!==null;});return firstDefinedValue!==undefined;};var getAllMediaQueries=function getAllMediaQueries(props){if(isReactNative$4()){return {};}breakpoints.base;var breakpointsWithoutBase=_objectWithoutProperties(breakpoints,_excluded$4W);return Object.fromEntries(Object.entries(breakpointsWithoutBase).map(function(_ref){var _ref2=_slicedToArray(_ref,2),breakpointKey=_ref2[0],breakpointValue=_ref2[1];var cssPropsForCurrentBreakpoint=getAllProps(props,breakpointKey);if(!shouldAddBreakpoint(cssPropsForCurrentBreakpoint)){return [];}var mediaQuery="@media "+getMediaQuery({min:breakpointValue});return [mediaQuery,cssPropsForCurrentBreakpoint];}));};var getBaseBoxStyles=function getBaseBoxStyles(props){return _extends({},getAllProps(props),getAllMediaQueries(props));};
|
|
1959
|
+
|
|
1960
|
+
var MetaConstants={Accordion:'accordion',AccordionButton:'accordion-button',AccordionItem:'accordion-item',ActionList:'action-list',ActionListFooter:'action-list-footer',ActionListHeader:'action-list-header',ActionListItem:'action-list-item',ActionListSection:'action-list-section',Alert:'alert',Amount:'amount',Badge:'badge',Box:'box',BaseBox:'base-box',BaseText:'base-text',Button:'button',Checkbox:'checkbox',CheckboxGroup:'checkbox-group',CheckboxLabel:'checkbox-label',Code:'code',Component:'blade-component',Counter:'counter',DropdownOverlay:'dropdown-overlay',Icon:'icon',IconButton:'icon-button',Indicator:'indicator',Link:'link',List:'list',ListItem:'list-item',OTPInput:'otp-input',PasswordInput:'password-input',TextArea:'textarea',TextInput:'textinput',ProgressBar:'progress-bar',Radio:'radio',RadioGroup:'radio-group',RadioLabel:'radio-label',SkipNav:'skipnav',Spinner:'spinner',SelectInput:'select-input',Tooltip:'tooltip',TooltipInteractiveWrapper:'tooltip-interactive-wrapper',BottomSheet:'bottom-sheet',BottomSheetBody:'bottom-sheet-body',BottomSheetHeader:'bottom-sheet-header',BottomSheetFooter:'bottom-sheet-footer',BottomSheetGrabHandle:'bottomsheet-grab-handle',Card:'card',CardBody:'card-body',CardHeader:'card-header',CardFooter:'card-footer',Collapsible:'collapsible',CollapsibleBody:'collapsible-body',CollapsibleButton:'collapsible-button',CollapsibleLink:'collapsible-link',Modal:'modal',ModalBody:'modal-body',ModalHeader:'modal-header',ModalFooter:'modal-footer',ModalBackdrop:'modal-backdrop',ModalScrollOverlay:'modal-scroll-overlay',VisuallyHidden:'visually-hidden',FormLabel:'form-label',Switch:'switch',SwitchLabel:'switch-label',StyledBaseInput:'styled-base-input'};
|
|
1961
|
+
|
|
1962
|
+
var metaAttribute=function metaAttribute(_ref){var testID=_ref.testID,name=_ref.name;return _extends({},name?_defineProperty({},"data-"+MetaConstants.Component,name):{},testID?{testID:testID}:{});};
|
|
3247
1963
|
|
|
3248
1964
|
var isSupportedOnReactNativeElement=function isSupportedOnReactNativeElement(prop){return !prop.startsWith('padding')&&!prop.startsWith('margin')&&prop!=='flex';};var BaseBox=styled(View).attrs(function(props){return _extends({},metaAttribute({name:props['data-blade-component']||MetaConstants.BaseBox}));}).withConfig({shouldForwardProp:function shouldForwardProp(prop,defaultValidator){return isSupportedOnReactNativeElement(prop)&&defaultValidator(prop);}})(function(props){var cssObject=getBaseBoxStyles(props);return cssObject;});
|
|
3249
1965
|
|
|
@@ -3279,15 +1995,21 @@ var useMemoizedStyles=function useMemoizedStyles(boxProps){return getBaseBoxStyl
|
|
|
3279
1995
|
|
|
3280
1996
|
var useStyledProps=function useStyledProps(props){var styledPropsStyles=getStyledProps(props);var styledPropsCSSObject=useMemoizedStyles(_extends({},styledPropsStyles,{theme:props.theme}));var styledPropsWithoutUndefined=removeUndefinedStyledProps(styledPropsCSSObject);return styledPropsWithoutUndefined;};
|
|
3281
1997
|
|
|
1998
|
+
var accessibilityValue={valueMax:'max',valueMin:'min',valueNow:'now',valueText:'text'};var accessibilityState={selected:'selected',disabled:'disabled',expanded:'expanded',busy:'busy',checked:'checked'};var accessibilityValueKeys=Object.keys(accessibilityValue);var accessibilityStateKeys=Object.keys(accessibilityState);var accessibilityMap=_extends({},accessibilityState,accessibilityValue,{activeDescendant:'accessibilityActiveDescendant',atomic:'accessibilityAtomic',autoComplete:'accessibilityAutoComplete',colCount:'accessibilityColCount',colIndex:'accessibilityColIndex',colSpan:'accessibilityColSpan',controls:'accessibilityControls',describedBy:'accessibilityDescribedBy',details:'accessibilityDetails',errorMessage:'accessibilityErrorMessage',flowTo:'accessibilityFlowTo',hasPopup:'accessibilityHasPopup',hidden:'accessibilityHidden',invalid:'accessibilityInvalid',keyShortcuts:'accessibilityKeyShortcuts',label:'accessibilityLabel',labelledBy:'accessibilityLabelledBy',liveRegion:'accessibilityLiveRegion',modal:'accessibilityModal',multiline:'accessibilityMultiline',multiSelectable:'accessibilityMultiSelectable',orientation:'accessibilityOrientation',owns:'accessibilityOwns',placeholder:'accessibilityPlaceholder',posInSet:'accessibilityPosInSet',pressed:'accessibilityPressed',readOnly:'accessibilityReadOnly',required:'accessibilityRequired',role:'accessibilityRole',roleDescription:'accessibilityRoleDescription',rowCount:'accessibilityRowCount',rowIndex:'accessibilityRowIndex',rowSpan:'accessibilityRowSpan',setSize:'accessibilitySetSize',sort:'accessibilitySort',current:'accessibilityCurrent',dropEffect:'accessibilityDropEffect',grabbed:'accessibilityGrabbed',level:'accessibilityLevel',relevant:'accessibilityRelevant'});var accessibilityRoleMap={alert:'alert',button:'button',checkbox:'checkbox',combobox:'combobox',image:'image',link:'link',list:'list',menu:'menu',menubar:'menubar',menuitem:'menuitem',progressbar:'progressbar',radio:'radio',radiogroup:'radiogroup',scrollbar:'scrollbar',search:'search',spinbutton:'spinbutton',switch:'switch',tab:'tab',tablist:'tablist',timer:'timer',togglebutton:'togglebutton',toolbar:'toolbar',heading:'header',slider:'adjustable',img:'image',presentation:'none',region:'summary',imagebutton:'imagebutton',keyboardkey:'keyboardkey',label:'label',text:'text',meter:'progressbar'};
|
|
1999
|
+
|
|
2000
|
+
var makeAccessible=function makeAccessible(props){var newProps={};for(var key in props){var propKey=key;var propValue=props[propKey];var accessibilityAttribute=accessibilityMap[propKey];if(accessibilityStateKeys.includes(propKey)){newProps.accessibilityState=_extends({},newProps.accessibilityState,_defineProperty({},accessibilityAttribute,propValue));continue;}if(accessibilityValueKeys.includes(propKey)){newProps.accessibilityValue=_extends({},newProps.accessibilityValue,_defineProperty({},accessibilityAttribute,propValue));continue;}if(propKey==='hidden'){if(propValue===true){newProps.accessibilityElementsHidden=true;newProps.importantForAccessibility='no-hide-descendants';}delete newProps.accessibilityHidden;continue;}if(accessibilityAttribute){newProps[accessibilityAttribute]=propValue;}else {console.warn("[Blade: makeAccessible]: No mapping found for "+propKey+". Make sure you have entered valid key");}}if(newProps.accessibilityRole){var role=accessibilityRoleMap[newProps.accessibilityRole];newProps.accessibilityRole=role;if(!role){var validRoles=Object.keys(accessibilityRoleMap).join(', ');console.log("[Blade: makeAccessible]: Unsupported accessibility role for react-native. Expected one of "+validRoles+" but found "+props.role);delete newProps.accessibilityRole;}}return newProps;};
|
|
2001
|
+
|
|
3282
2002
|
var _excluded$4T=["color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","numberOfLines","lineHeight","textAlign","as"],_excluded2$1=["id","color","fontFamily","fontSize","fontWeight","fontStyle","textDecorationLine","lineHeight","textAlign","children","truncateAfterLines","className","style","accessibilityProps","componentName","testID"];var StyledBaseText=styled.Text(function(_ref){var color=_ref.color,fontFamily=_ref.fontFamily,fontSize=_ref.fontSize,fontWeight=_ref.fontWeight,fontStyle=_ref.fontStyle,textDecorationLine=_ref.textDecorationLine,numberOfLines=_ref.numberOfLines,lineHeight=_ref.lineHeight,textAlign=_ref.textAlign;_ref.as;var props=_objectWithoutProperties(_ref,_excluded$4T);var styledPropsCSSObject=useStyledProps(props);return _extends({},getBaseTextStyles({color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,numberOfLines:numberOfLines,lineHeight:lineHeight,textAlign:textAlign,theme:props.theme}),styledPropsCSSObject);});var BaseText=function BaseText(_ref2){var id=_ref2.id,color=_ref2.color,fontFamily=_ref2.fontFamily,fontSize=_ref2.fontSize,fontWeight=_ref2.fontWeight,fontStyle=_ref2.fontStyle,textDecorationLine=_ref2.textDecorationLine,lineHeight=_ref2.lineHeight,textAlign=_ref2.textAlign,children=_ref2.children,truncateAfterLines=_ref2.truncateAfterLines,className=_ref2.className,style=_ref2.style,_ref2$accessibilityPr=_ref2.accessibilityProps,accessibilityProps=_ref2$accessibilityPr===void 0?{}:_ref2$accessibilityPr,_ref2$componentName=_ref2.componentName,componentName=_ref2$componentName===void 0?MetaConstants.BaseText:_ref2$componentName,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded2$1);return jsx(StyledBaseText,_extends({},styledProps,{color:color,fontFamily:fontFamily,fontSize:fontSize,fontWeight:fontWeight,fontStyle:fontStyle,textDecorationLine:textDecorationLine,lineHeight:lineHeight,as:undefined,textAlign:textAlign,numberOfLines:truncateAfterLines,className:className,style:style,id:id},makeAccessible(accessibilityProps),metaAttribute({name:componentName,testID:testID}),{children:children}));};
|
|
3283
2003
|
|
|
3284
2004
|
var useValidateAsProp=function useValidateAsProp(_ref){var as=_ref.as,componentName=_ref.componentName,validAsValues=_ref.validAsValues;React__default.useEffect(function(){if(as&&!validAsValues.includes(as)){throw new Error("[Blade "+componentName+"]: Invalid `as` prop value - "+as+". Only "+validAsValues.join(', ')+" are accepted");}},[as,componentName,validAsValues]);};
|
|
3285
2005
|
|
|
3286
|
-
var _excluded$4S=["as","size","type","contrast","color","children","testID","textAlign"];var validAsValues$2=['span','h1','h2','h3','h4','h5','h6'];var getProps$3=function getProps(_ref){var as=_ref.as,size=_ref.size,type=_ref.type,contrast=_ref.contrast,color=_ref.color,testID=_ref.testID;var isPlatformWeb=getPlatformType()==='browser'||getPlatformType()==='node';var colorContrast=contrast?contrast+"Contrast":'lowContrast';var props={color:color!=null?color:"surface.text."+(type!=null?type:'normal')+"."+colorContrast,fontSize:600,fontWeight:'bold',fontStyle:'normal',lineHeight:700,fontFamily:'text',accessibilityProps:isPlatformWeb?{}:{role:'heading'},componentName:'title',testID:testID};if(size==='small'){props.fontSize=600;props.lineHeight=500;props.as=isPlatformWeb?'h3':undefined;}else if(size==='medium'){props.fontSize=700;props.lineHeight=600;props.as=isPlatformWeb?'h2':undefined;}else if(size==='large'){props.fontSize=800;props.lineHeight=700;props.as=isPlatformWeb?'h1':undefined;}else if(size==='xlarge'){props.fontSize=1000;props.lineHeight=800;props.as=isPlatformWeb?'h1':undefined;}props.as=as||props.as;return props;};var Title=function Title(_ref2){var as=_ref2.as,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$type=_ref2.type,type=_ref2$type===void 0?'normal':_ref2$type,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,color=_ref2.color,children=_ref2.children,testID=_ref2.testID,textAlign=_ref2.textAlign,styledProps=_objectWithoutProperties(_ref2,_excluded$4S);useValidateAsProp({componentName:'Title',as:as,validAsValues:validAsValues$2});var props=getProps$3({as:as,size:size,type:type,contrast:contrast,color:color,testID:testID});return jsx(BaseText,_extends({},props,{textAlign:textAlign},getStyledProps(styledProps),{children:children}));};
|
|
2006
|
+
var _excluded$4S=["as","size","type","contrast","color","children","testID","textAlign","textDecorationLine"];var validAsValues$2=['span','h1','h2','h3','h4','h5','h6'];var getProps$3=function getProps(_ref){var as=_ref.as,size=_ref.size,type=_ref.type,contrast=_ref.contrast,color=_ref.color,testID=_ref.testID;var isPlatformWeb=getPlatformType()==='browser'||getPlatformType()==='node';var colorContrast=contrast?contrast+"Contrast":'lowContrast';var props={color:color!=null?color:"surface.text."+(type!=null?type:'normal')+"."+colorContrast,fontSize:600,fontWeight:'bold',fontStyle:'normal',lineHeight:700,fontFamily:'text',accessibilityProps:isPlatformWeb?{}:{role:'heading'},componentName:'title',testID:testID};if(size==='small'){props.fontSize=600;props.lineHeight=500;props.as=isPlatformWeb?'h3':undefined;}else if(size==='medium'){props.fontSize=700;props.lineHeight=600;props.as=isPlatformWeb?'h2':undefined;}else if(size==='large'){props.fontSize=800;props.lineHeight=700;props.as=isPlatformWeb?'h1':undefined;}else if(size==='xlarge'){props.fontSize=1000;props.lineHeight=800;props.as=isPlatformWeb?'h1':undefined;}props.as=as||props.as;return props;};var Title=function Title(_ref2){var as=_ref2.as,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$type=_ref2.type,type=_ref2$type===void 0?'normal':_ref2$type,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,color=_ref2.color,children=_ref2.children,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,styledProps=_objectWithoutProperties(_ref2,_excluded$4S);useValidateAsProp({componentName:'Title',as:as,validAsValues:validAsValues$2});var props=getProps$3({as:as,size:size,type:type,contrast:contrast,color:color,testID:testID});return jsx(BaseText,_extends({},props,{textAlign:textAlign,textDecorationLine:textDecorationLine},getStyledProps(styledProps),{children:children}));};
|
|
3287
2007
|
|
|
3288
|
-
var _excluded$4R=["as","variant","size","type","weight","contrast","color","children","testID","textAlign"];var validAsValues$1=['span','h1','h2','h3','h4','h5','h6'];var getProps$2=function getProps(_ref){var as=_ref.as,variant=_ref.variant,size=_ref.size,type=_ref.type,weight=_ref.weight,contrast=_ref.contrast,color=_ref.color,testID=_ref.testID;var colorContrast=contrast?contrast+"Contrast":'lowContrast';var props={color:color!=null?color:"surface.text."+(type!=null?type:'normal')+"."+colorContrast,fontSize:200,fontWeight:weight!=null?weight:'bold',fontStyle:'normal',lineHeight:300,fontFamily:'text',accessibilityProps:isReactNative$4()?{role:'heading'}:{},componentName:'heading',testID:testID};if(variant==='regular'){if(!size||size==='small'){props.fontSize=200;props.lineHeight=300;props.as='h6';}else if(size==='medium'){props.fontSize=300;props.lineHeight=200;props.as='h5';}else if(size==='large'){props.fontSize=400;props.lineHeight=400;props.as='h4';}}else if(variant==='subheading'){if(weight==='regular'){throw new Error("[Blade: Heading]: weight cannot be 'regular' when variant is 'subheading'");}if(size){throw new Error("[Blade: Heading]: size prop cannot be added when variant is 'subheading'. Use variant 'regular' or remove size prop");}props.fontSize=75;props.lineHeight=50;props.as='p';}props.as=as||props.as;return props;};var Heading=function Heading(_ref2){var as=_ref2.as,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'regular':_ref2$variant,size=_ref2.size,_ref2$type=_ref2.type,type=_ref2$type===void 0?'normal':_ref2$type,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'bold':_ref2$weight,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,color=_ref2.color,children=_ref2.children,testID=_ref2.testID,textAlign=_ref2.textAlign,styledProps=_objectWithoutProperties(_ref2,_excluded$4R);useValidateAsProp({componentName:'Heading',as:as,validAsValues:validAsValues$1});var props=getProps$2({as:as,variant:variant,size:size,type:type,weight:weight,color:color,contrast:contrast,testID:testID});return jsx(BaseText,_extends({},props,{textAlign:textAlign},getStyledProps(styledProps),{children:children}));};
|
|
2008
|
+
var _excluded$4R=["as","variant","size","type","weight","contrast","color","children","testID","textAlign","textDecorationLine"];var validAsValues$1=['span','h1','h2','h3','h4','h5','h6'];var getProps$2=function getProps(_ref){var as=_ref.as,variant=_ref.variant,size=_ref.size,type=_ref.type,weight=_ref.weight,contrast=_ref.contrast,color=_ref.color,testID=_ref.testID;var colorContrast=contrast?contrast+"Contrast":'lowContrast';var props={color:color!=null?color:"surface.text."+(type!=null?type:'normal')+"."+colorContrast,fontSize:200,fontWeight:weight!=null?weight:'bold',fontStyle:'normal',lineHeight:300,fontFamily:'text',accessibilityProps:isReactNative$4()?{role:'heading'}:{},componentName:'heading',testID:testID};if(variant==='regular'){if(!size||size==='small'){props.fontSize=200;props.lineHeight=300;props.as='h6';}else if(size==='medium'){props.fontSize=300;props.lineHeight=200;props.as='h5';}else if(size==='large'){props.fontSize=400;props.lineHeight=400;props.as='h4';}}else if(variant==='subheading'){if(weight==='regular'){throw new Error("[Blade: Heading]: weight cannot be 'regular' when variant is 'subheading'");}if(size){throw new Error("[Blade: Heading]: size prop cannot be added when variant is 'subheading'. Use variant 'regular' or remove size prop");}props.fontSize=75;props.lineHeight=50;props.as='p';}props.as=as||props.as;return props;};var Heading=function Heading(_ref2){var as=_ref2.as,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'regular':_ref2$variant,size=_ref2.size,_ref2$type=_ref2.type,type=_ref2$type===void 0?'normal':_ref2$type,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'bold':_ref2$weight,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,color=_ref2.color,children=_ref2.children,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,styledProps=_objectWithoutProperties(_ref2,_excluded$4R);useValidateAsProp({componentName:'Heading',as:as,validAsValues:validAsValues$1});var props=getProps$2({as:as,variant:variant,size:size,type:type,weight:weight,color:color,contrast:contrast,testID:testID});return jsx(BaseText,_extends({},props,{textAlign:textAlign,textDecorationLine:textDecorationLine},getStyledProps(styledProps),{children:children}));};
|
|
2009
|
+
|
|
2010
|
+
var assignWithoutSideEffects=function assignWithoutSideEffects(component,sourceObj){return _extends(component,sourceObj);};
|
|
3289
2011
|
|
|
3290
|
-
var _excluded$4Q=["as","variant","weight","size","type","contrast","truncateAfterLines","children","color","testID","textAlign"];var validAsValues=['p','span','div','abbr','figcaption','cite','q'];var getTextProps=function getTextProps(_ref){var variant=_ref.variant,type=_ref.type,weight=_ref.weight,size=_ref.size,color=_ref.color,contrast=_ref.contrast,testID=_ref.testID,textAlign=_ref.textAlign;var colorContrast=contrast?contrast+"Contrast":'lowContrast';var props={color:color!=null?color:"surface.text."+(type!=null?type:'normal')+"."+colorContrast,fontSize:100,fontWeight:weight!=null?weight:'regular',fontStyle:'normal',lineHeight:100,fontFamily:'text',componentName:'text',testID:testID,textAlign:textAlign};if(variant==='body'){if(size==='xsmall'){props.fontSize=25;props.lineHeight=50;}if(size==='small'){props.fontSize=75;props.lineHeight=50;}if(size==='medium'){props.fontSize=100;props.lineHeight=100;}if(size==='large'){props.fontSize=200;props.lineHeight=300;}}if(variant==='caption'){if(size==='medium'){props.fontSize=50;props.lineHeight=50;}else {throw new Error("[Blade: Text]: size cannot be '"+size+"' when variant is 'caption'");}props.fontStyle='italic';}return props;};var _Text=function _Text(_ref2){var _ref2$as=_ref2.as,as=_ref2$as===void 0?'p':_ref2$as,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'body':_ref2$variant,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,_ref2$type=_ref2.type,type=_ref2$type===void 0?'normal':_ref2$type,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,truncateAfterLines=_ref2.truncateAfterLines,children=_ref2.children,color=_ref2.color,testID=_ref2.testID,textAlign=_ref2.textAlign,styledProps=_objectWithoutProperties(_ref2,_excluded$4Q);var props=_extends({as:as,truncateAfterLines:truncateAfterLines},getTextProps({variant:variant,type:type,weight:weight,color:color,size:size,contrast:contrast,testID:testID,textAlign:textAlign}));useValidateAsProp({componentName:'Text',as:as,validAsValues:validAsValues});return jsx(BaseText,_extends({},props,getStyledProps(styledProps),{children:children}));};var Text=assignWithoutSideEffects(_Text,{displayName:'Text',componentId:'Text'});
|
|
2012
|
+
var _excluded$4Q=["as","variant","weight","size","type","contrast","truncateAfterLines","children","color","testID","textAlign","textDecorationLine"];var validAsValues=['p','span','div','abbr','figcaption','cite','q'];var getTextProps=function getTextProps(_ref){var variant=_ref.variant,type=_ref.type,weight=_ref.weight,size=_ref.size,color=_ref.color,contrast=_ref.contrast,testID=_ref.testID,textAlign=_ref.textAlign,textDecorationLine=_ref.textDecorationLine;var colorContrast=contrast?contrast+"Contrast":'lowContrast';var props={color:color!=null?color:"surface.text."+(type!=null?type:'normal')+"."+colorContrast,fontSize:100,fontWeight:weight!=null?weight:'regular',fontStyle:'normal',lineHeight:100,fontFamily:'text',componentName:'text',testID:testID,textAlign:textAlign,textDecorationLine:textDecorationLine};if(variant==='body'){if(size==='xsmall'){props.fontSize=25;props.lineHeight=50;}if(size==='small'){props.fontSize=75;props.lineHeight=50;}if(size==='medium'){props.fontSize=100;props.lineHeight=100;}if(size==='large'){props.fontSize=200;props.lineHeight=300;}}if(variant==='caption'){if(size==='medium'){props.fontSize=50;props.lineHeight=50;}else {throw new Error("[Blade: Text]: size cannot be '"+size+"' when variant is 'caption'");}props.fontStyle='italic';}return props;};var _Text=function _Text(_ref2){var _ref2$as=_ref2.as,as=_ref2$as===void 0?'p':_ref2$as,_ref2$variant=_ref2.variant,variant=_ref2$variant===void 0?'body':_ref2$variant,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,_ref2$type=_ref2.type,type=_ref2$type===void 0?'normal':_ref2$type,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,truncateAfterLines=_ref2.truncateAfterLines,children=_ref2.children,color=_ref2.color,testID=_ref2.testID,textAlign=_ref2.textAlign,textDecorationLine=_ref2.textDecorationLine,styledProps=_objectWithoutProperties(_ref2,_excluded$4Q);var props=_extends({as:as,truncateAfterLines:truncateAfterLines},getTextProps({variant:variant,type:type,weight:weight,color:color,size:size,contrast:contrast,testID:testID,textAlign:textAlign,textDecorationLine:textDecorationLine}));useValidateAsProp({componentName:'Text',as:as,validAsValues:validAsValues});return jsx(BaseText,_extends({},props,getStyledProps(styledProps),{children:children}));};var Text=assignWithoutSideEffects(_Text,{displayName:'Text',componentId:'Text'});
|
|
3291
2013
|
|
|
3292
2014
|
var _excluded$4P=["children","size","weight","isHighlighted","color","testID"];var platformType=getPlatformType();var isPlatformWeb=platformType==='browser'||platformType==='node';var getCodeFontSizeAndLineHeight=function getCodeFontSizeAndLineHeight(size){switch(size){case'medium':return {fontSize:75,lineHeight:75};case'small':return {fontSize:25,lineHeight:25};default:throw new Error("[Blade Code]: Unexpected size: "+size);}};var CodeContainer=styled(BaseBox)(function(props){var padding=makeSpace(props.theme.spacing[0])+" "+makeSpace(props.theme.spacing[2]);return {padding:padding,backgroundColor:props.isHighlighted?props.theme.colors.brand.gray.a100.lowContrast:undefined,borderRadius:props.theme.border.radius.medium,display:isPlatformWeb?'inline-block':'flex',alignSelf:isPlatformWeb?undefined:'center',verticalAlign:'middle',lineHeight:makeTypographySize(props.theme.typography.lineHeights[0])};});var getCodeColor=function getCodeColor(_ref){var isHighlighted=_ref.isHighlighted,color=_ref.color;if(isHighlighted){if(color){throw new Error('[Blade: Code]: `color` prop cannot be used without `isHighlighted={false}`');}return 'surface.text.subtle.lowContrast';}if(color){return color;}return 'surface.text.normal.lowContrast';};var Code=function Code(_ref2){var children=_ref2.children,_ref2$size=_ref2.size,size=_ref2$size===void 0?'small':_ref2$size,_ref2$weight=_ref2.weight,weight=_ref2$weight===void 0?'regular':_ref2$weight,_ref2$isHighlighted=_ref2.isHighlighted,isHighlighted=_ref2$isHighlighted===void 0?true:_ref2$isHighlighted,color=_ref2.color,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded$4P);var _getCodeFontSizeAndLi=getCodeFontSizeAndLineHeight(size),fontSize=_getCodeFontSizeAndLi.fontSize,lineHeight=_getCodeFontSizeAndLi.lineHeight;var codeTextColor=React__default.useMemo(function(){return getCodeColor({isHighlighted:isHighlighted,color:color});},[isHighlighted,color]);return jsx(CodeContainer,_extends({size:size,isHighlighted:isHighlighted,as:isPlatformWeb?'span':undefined},metaAttribute({name:MetaConstants.Code,testID:testID}),getStyledProps(styledProps),{children:jsx(BaseText,{color:codeTextColor,fontFamily:"code",fontSize:fontSize,fontWeight:weight,as:isPlatformWeb?'code':undefined,lineHeight:lineHeight,children:children})}));};
|
|
3293
2015
|
|
|
@@ -3341,14 +2063,14 @@ var _excluded$4O=["children","height","viewBox","width","fill"];var StyledSvg$1=
|
|
|
3341
2063
|
|
|
3342
2064
|
var svgSize={small:{width:size[8],height:size[8]},medium:{width:size[12],height:size[12]}};var CheckedIcon$1=function CheckedIcon(_ref){var color=_ref.color,size=_ref.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M6.90237 1.76413C7.03254 1.89431 7.03254 2.10536 6.90237 2.23554L3.2357 5.90221C3.10553 6.03238 2.89447 6.03238 2.7643 5.90221L1.09763 4.23554C0.967456 4.10536 0.967456 3.89431 1.09763 3.76414C1.22781 3.63396 1.43886 3.63396 1.56904 3.76414L3 5.1951L6.43096 1.76413C6.56114 1.63396 6.77219 1.63396 6.90237 1.76413Z",fill:color,stroke:"white",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var IndeterminateIcon=function IndeterminateIcon(_ref2){var color=_ref2.color,size=_ref2.size;var width=makeSpace(svgSize[size].width);var height=makeSpace(svgSize[size].height);return jsx(Svg,{width:width,height:height,viewBox:"0 0 8 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M1.3335 3.99984C1.3335 3.81574 1.48273 3.6665 1.66683 3.6665H6.3335C6.51759 3.6665 6.66683 3.81574 6.66683 3.99984C6.66683 4.18393 6.51759 4.33317 6.3335 4.33317H1.66683C1.48273 4.33317 1.3335 4.18393 1.3335 3.99984Z",fill:color,stroke:"white",strokeWidth:"0.5",strokeLinecap:"round",strokeLinejoin:"round"})});};var CheckboxIcon=function CheckboxIcon(_ref3){var isChecked=_ref3.isChecked,isIndeterminate=_ref3.isIndeterminate,isDisabled=_ref3.isDisabled,isNegative=_ref3.isNegative,size=_ref3.size;var _useTheme=useTheme(),theme=_useTheme.theme;var defaultIconColor=get_1(theme,'colors.brand.gray.200.lowContrast');var disabledIconColor=get_1(theme,'colors.brand.gray.500.lowContrast');var iconColor=isDisabled?disabledIconColor:defaultIconColor;return jsxs(CheckboxIconWrapper,_extends({size:size,isIndeterminate:isIndeterminate,isDisabled:isDisabled,isNegative:isNegative,isChecked:!!(isChecked||isIndeterminate)},metaAttribute({name:'checkbox-icon-wrapper'}),{children:[jsx(Fade$1,{show:isIndeterminate,styles:{position:'absolute',display:'flex'},children:jsx(IndeterminateIcon,{size:size,color:iconColor})}),jsx(Fade$1,{show:Boolean(isChecked)&&!isIndeterminate,styles:{position:'absolute',display:'flex'},children:isChecked?jsx(CheckedIcon$1,{size:size,color:iconColor}):null})]}));};
|
|
3343
2065
|
|
|
3344
|
-
function useControllableState(props){var valueProp=props.value,defaultValue=props.defaultValue,onChange=props.onChange;var _React$useState=React.useState(defaultValue),_React$useState2=_slicedToArray(_React$useState,2),valueState=_React$useState2[0],setValue=_React$useState2[1];var _React$useRef=React.useRef(valueProp!==undefined),isControlled=_React$useRef.current;var value=isControlled&&typeof valueProp!=='undefined'?valueProp:valueState;var updateValue=React.useCallback(function(next){var nextValue=next(value);if(!isControlled)setValue(nextValue);onChange==null?void 0:onChange(nextValue);},[onChange,value]);return [value,updateValue];}
|
|
3345
|
-
|
|
3346
2066
|
var isBrowser=getPlatformType()=='browser';var useIsomorphicLayoutEffect=isBrowser?React.useLayoutEffect:React.useEffect;
|
|
3347
2067
|
|
|
3348
2068
|
var handoffComplete=false;var id=0;var genId=function genId(){return ++id;};var useId=function useId(prefix,idProp){var initialId=idProp||(handoffComplete?genId():null);var _React$useState=React.useState(initialId),_React$useState2=_slicedToArray(_React$useState,2),uid=_React$useState2[0],setUid=_React$useState2[1];useIsomorphicLayoutEffect(function(){if(uid===null)setUid(genId());},[]);React.useEffect(function(){if(!handoffComplete){handoffComplete=true;}},[]);var id=uid!=null?uid.toString():undefined;return prefix?prefix+"-"+id:id;};
|
|
3349
2069
|
|
|
3350
2070
|
var useFormId=function useFormId(prefix){var baseId=useId(prefix);var inputId=useId(baseId+"-input");var errorTextId=useId(baseId+"-errortext");var helpTextId=useId(baseId+"-helptext");var successTextId=useId(baseId+"-successtext");var labelId=useId(baseId+"-label");return {baseId:baseId,inputId:inputId,errorTextId:errorTextId,helpTextId:helpTextId,successTextId:successTextId,labelId:labelId};};
|
|
3351
2071
|
|
|
2072
|
+
function useControllableState(props){var valueProp=props.value,defaultValue=props.defaultValue,onChange=props.onChange;var _React$useState=React.useState(defaultValue),_React$useState2=_slicedToArray(_React$useState,2),valueState=_React$useState2[0],setValue=_React$useState2[1];var _React$useRef=React.useRef(valueProp!==undefined),isControlled=_React$useRef.current;var value=isControlled&&typeof valueProp!=='undefined'?valueProp:valueState;var updateValue=React.useCallback(function(next){var nextValue=next(value);if(!isControlled)setValue(nextValue);onChange==null?void 0:onChange(nextValue);},[onChange,value]);return [value,updateValue];}
|
|
2073
|
+
|
|
3352
2074
|
function setMixed(element,mixed){if(mixed){element.indeterminate=true;}else if(element.indeterminate){element.indeterminate=false;}}var useCheckbox=function useCheckbox(_ref){var _ref$role=_ref.role,role=_ref$role===void 0?'checkbox':_ref$role,isChecked=_ref.isChecked,defaultChecked=_ref.defaultChecked,isIndeterminate=_ref.isIndeterminate,isDisabled=_ref.isDisabled,isRequired=_ref.isRequired,hasError=_ref.hasError,hasHelperText=_ref.hasHelperText,onChange=_ref.onChange,name=_ref.name,value=_ref.value;var inputRef=React__default.useRef(null);var isReactNative=getPlatformType()==='react-native';if(isChecked&&defaultChecked){throw new Error("[Blade useCheckbox] Do not provide both 'isChecked' and 'defaultChecked' to useCheckbox. Consider if you want this component to be controlled or uncontrolled.");}var _useControllableState=useControllableState({value:isChecked,defaultValue:defaultChecked!=null?defaultChecked:false}),_useControllableState2=_slicedToArray(_useControllableState,2),checkboxState=_useControllableState2[0],setCheckboxStateChange=_useControllableState2[1];var handleOnChange=function handleOnChange(event){if(isDisabled){event.stopPropagation();event.preventDefault();return;}setCheckboxStateChange(function(checked){onChange==null?void 0:onChange({isChecked:!checked,event:event,value:value});return !checked;});};React__default.useEffect(function(){var element=inputRef.current;if(!element)return;setMixed(element,isIndeterminate);},[isIndeterminate]);var state={isReactNative:isReactNative,isChecked:checkboxState,setChecked:setCheckboxStateChange};var _useFormId=useFormId('checkbox'),inputId=_useFormId.inputId,errorTextId=_useFormId.errorTextId,helpTextId=_useFormId.helpTextId;var accessibilityProps=makeAccessible(_extends({role:role,required:Boolean(isRequired),invalid:Boolean(hasError),disabled:Boolean(isDisabled),checked:checkboxState},hasError?{errorMessage:errorTextId}:{},hasHelperText?{describedBy:helpTextId}:{}));if(isReactNative){return {state:state,inputProps:_extends({onPress:handleOnChange,name:name,value:value},accessibilityProps)};}return {state:state,ids:{inputId:inputId,errorTextId:errorTextId,helpTextId:helpTextId},inputProps:_extends({ref:inputRef,onChange:handleOnChange,type:'checkbox',name:name,value:value,checked:checkboxState,disabled:isDisabled,required:isRequired},accessibilityProps)};};
|
|
3353
2075
|
|
|
3354
2076
|
var FormHintWrapper=function FormHintWrapper(_ref){var children=_ref.children;return jsx(BaseBox,{display:"flex",flexDirection:"row",alignItems:"center",children:children});};
|
|
@@ -3953,7 +2675,7 @@ var dimensions={medium:16,large:20,xlarge:24};var motion={duration:'duration.2xg
|
|
|
3953
2675
|
|
|
3954
2676
|
var SpinnerIcon=function SpinnerIcon(_ref){var dimensions=_ref.dimensions,color=_ref.color;return jsxs(Svg,{width:dimensions,height:dimensions,viewBox:"0 0 24 24",fill:"none",children:[jsx(Path,{fillOpacity:0.2,d:"M24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12ZM3 12C3 16.9706 7.02944 21 12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12Z",fill:color}),jsx(Path,{d:"M24 12C24 13.8937 23.5518 15.7606 22.6921 17.4479C21.8324 19.1352 20.5855 20.5951 19.0534 21.7082C17.5214 22.8213 15.7476 23.556 13.8772 23.8523C12.0068 24.1485 10.0928 23.9979 8.29181 23.4127L9.21886 20.5595C10.5696 20.9984 12.0051 21.1114 13.4079 20.8892C14.8107 20.667 16.141 20.116 17.2901 19.2812C18.4391 18.4463 19.3743 17.3514 20.0191 16.0859C20.6639 14.8204 21 13.4203 21 12H24Z",fill:color}),jsx(Path,{d:"M-1.33514e-05 12C-1.33514e-05 10.1063 0.448176 8.23944 1.30791 6.55211C2.16764 4.86479 3.41451 3.4049 4.94656 2.2918C6.47862 1.17869 8.25236 0.443983 10.1228 0.147739C11.9932 -0.148504 13.9072 0.00212896 15.7082 0.587322L14.7811 3.44049C13.4304 3.0016 11.9949 2.88862 10.5921 3.11081C9.18927 3.33299 7.85896 3.88402 6.70992 4.71885C5.56088 5.55367 4.62573 6.64859 3.98093 7.91409C3.33613 9.17958 2.99999 10.5797 2.99999 12H-1.33514e-05Z",fill:color})]});};
|
|
3955
2677
|
|
|
3956
|
-
var SpinningBox=function SpinningBox(_ref){var children=_ref.children;var _useTheme=useTheme(),theme=_useTheme.theme;var duration=castNativeType(makeMotionTime(get_1(theme.motion,motion.duration)));var easing=get_1(theme.motion,motion.easing);var rotation=useSharedValue(0);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {transform:[{rotateZ:rotation.value+"deg"}]};};_f._closure={rotation:rotation};_f.asString="function _f(){const{rotation}=jsThis._closure;{return{transform:[{rotateZ:rotation.value+\"deg\"}]};}}";_f.__workletHash=16442698185463;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Spinner/BaseSpinner/SpinningBox.native.tsx (
|
|
2678
|
+
var SpinningBox=function SpinningBox(_ref){var children=_ref.children;var _useTheme=useTheme(),theme=_useTheme.theme;var duration=castNativeType(makeMotionTime(get_1(theme.motion,motion.duration)));var easing=get_1(theme.motion,motion.easing);var rotation=useSharedValue(0);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {transform:[{rotateZ:rotation.value+"deg"}]};};_f._closure={rotation:rotation};_f.asString="function _f(){const{rotation}=jsThis._closure;{return{transform:[{rotateZ:rotation.value+\"deg\"}]};}}";_f.__workletHash=16442698185463;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Spinner/BaseSpinner/SpinningBox.native.tsx (23:42)";_f.__optimalization=3;return _f;}(),[rotation.value]);React__default.useEffect(function(){rotation.value=withRepeat(withTiming(360,{duration:duration,easing:easing}),-1);return function(){cancelAnimation(rotation);};},[duration,easing,rotation]);return jsx(BaseBox,{alignSelf:"center",children:jsx(Animated.View,{style:animatedStyles,children:children})});};
|
|
3957
2679
|
|
|
3958
2680
|
var _excluded$v=["label","labelPosition","accessibilityLabel","contrast","intent","size","testID"];var getColor=function getColor(_ref){var contrast=_ref.contrast,intent=_ref.intent,theme=_ref.theme;if(intent){return get_1(theme.colors,"feedback."+intent+".action.icon.primary.disabled."+contrast+"Contrast");}else if(contrast=='low'){return get_1(theme.colors,'brand.gray.700.lowContrast');}else {return get_1(theme.colors,'brand.gray.700.highContrast');}};var BaseSpinner=function BaseSpinner(_ref2){var label=_ref2.label,_ref2$labelPosition=_ref2.labelPosition,labelPosition=_ref2$labelPosition===void 0?'right':_ref2$labelPosition,accessibilityLabel=_ref2.accessibilityLabel,_ref2$contrast=_ref2.contrast,contrast=_ref2$contrast===void 0?'low':_ref2$contrast,intent=_ref2.intent,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,testID=_ref2.testID,styledProps=_objectWithoutProperties(_ref2,_excluded$v);var _useTheme=useTheme(),theme=_useTheme.theme;return jsx(BaseBox,_extends({display:"flex"},metaAttribute({name:MetaConstants.Spinner,testID:testID}),getStyledProps(styledProps),{children:jsxs(BaseBox,_extends({display:"flex",alignItems:"center",flexDirection:labelPosition==='right'?'row':'column'},makeAccessible({label:accessibilityLabel,role:'progressbar'}),{children:[jsx(SpinningBox,{children:jsx(SpinnerIcon,{dimensions:makeSize(dimensions[size]),color:getColor({contrast:contrast,intent:intent,theme:theme})})}),label&&label.trim().length>0?jsx(BaseBox,{marginLeft:labelPosition==='right'?'spacing.3':'spacing.0',marginTop:labelPosition==='bottom'?'spacing.3':'spacing.0',children:jsx(Text,{variant:"body",weight:"regular",type:"subdued",size:"small",contrast:contrast,children:label})}):null]}))}));};
|
|
3959
2681
|
|
|
@@ -3981,7 +2703,7 @@ var _excluded$r=["children","contrast","fontWeight","icon","size","variant","tes
|
|
|
3981
2703
|
|
|
3982
2704
|
var validBoxAsValues=['div','section','footer','header','main','aside','nav','span','label'];
|
|
3983
2705
|
|
|
3984
|
-
var validateBackgroundString=function validateBackgroundString(stringBackgroundColorValue){if(!stringBackgroundColorValue.startsWith('surface.background')){throw new Error("[Blade - Box]: Oops! Currently you can only use `surface.background.*` tokens with backgroundColor property but we received `"+stringBackgroundColorValue+"` instead.\n\n Do you have a usecase of using other values? Create an issue on https://github.com/razorpay/blade repo to let us know and we can discuss \u2728");}};var validateBackgroundProp=function validateBackgroundProp(responsiveBackgroundColor){if(responsiveBackgroundColor){if(typeof responsiveBackgroundColor==='string'){validateBackgroundString(responsiveBackgroundColor);return;}Object.values(responsiveBackgroundColor).forEach(function(backgroundColor){validateBackgroundString(backgroundColor);});}};var makeBoxProps=function makeBoxProps(props){return {display:props.display,overflow:props.overflow,overflowX:props.overflowX,overflowY:props.overflowY,height:props.height,minHeight:props.minHeight,maxHeight:props.maxHeight,width:props.width,minWidth:props.minWidth,maxWidth:props.maxWidth,textAlign:props.textAlign,flex:props.flex,flexWrap:props.flexWrap,flexDirection:props.flexDirection,flexGrow:props.flexGrow,flexShrink:props.flexShrink,flexBasis:props.flexBasis,alignItems:props.alignItems,alignContent:props.alignContent,alignSelf:props.alignSelf,justifyItems:props.justifyItems,justifyContent:props.justifyContent,justifySelf:props.justifySelf,placeSelf:props.placeSelf,order:props.order,grid:props.grid,gridColumn:props.gridColumn,gridRow:props.gridRow,gridRowStart:props.gridRowStart,gridRowEnd:props.gridRowEnd,gridColumnStart:props.gridColumnStart,gridColumnEnd:props.gridColumnEnd,gridArea:props.gridArea,gridAutoFlow:props.gridAutoFlow,gridAutoRows:props.gridAutoRows,gridAutoColumns:props.gridAutoColumns,gridTemplate:props.gridTemplate,gridTemplateAreas:props.gridTemplateAreas,gridTemplateColumns:props.gridTemplateColumns,gridTemplateRows:props.gridTemplateRows,padding:props.padding,paddingTop:props.paddingTop,paddingBottom:props.paddingBottom,paddingRight:props.paddingRight,paddingLeft:props.paddingLeft,paddingX:props.paddingX,paddingY:props.paddingY,margin:props.margin,marginBottom:props.marginBottom,marginTop:props.marginTop,marginRight:props.marginRight,marginLeft:props.marginLeft,marginX:props.marginX,marginY:props.marginY,gap:props.gap,rowGap:props.rowGap,columnGap:props.columnGap,position:props.position,zIndex:props.zIndex,top:props.top,right:props.right,bottom:props.bottom,left:props.left,backgroundColor:props.backgroundColor,borderWidth:props.borderWidth,borderColor:props.borderColor,borderTopWidth:props.borderTopWidth,borderTopColor:props.borderTopColor,borderRightWidth:props.borderRightWidth,borderRightColor:props.borderRightColor,borderBottomWidth:props.borderBottomWidth,borderBottomColor:props.borderBottomColor,borderLeftWidth:props.borderLeftWidth,borderLeftColor:props.borderLeftColor,borderRadius:props.borderRadius,borderTopLeftRadius:props.borderTopLeftRadius,borderTopRightRadius:props.borderTopRightRadius,borderBottomRightRadius:props.borderBottomRightRadius,borderBottomLeftRadius:props.borderBottomLeftRadius,onMouseEnter:props.onMouseEnter,onMouseLeave:props.onMouseLeave,onMouseOver:props.onMouseOver,onScroll:props.onScroll,children:props.children,tabIndex:props.tabIndex,as:isReactNative$4()?undefined:props.as};};var _Box=function _Box(props,ref){React__default.useEffect(function(){validateBackgroundProp(props.backgroundColor);},[props.backgroundColor]);React__default.useEffect(function(){if(props.as){if(isReactNative$4()){throw new Error('[Blade - Box]: `as` prop is not supported on React Native');}if(!validBoxAsValues.includes(props.as)){throw new Error("[Blade - Box]: Invalid `as` prop value - "+props.as+". Only "+validBoxAsValues.join(', ')+" are valid values");}}},[props.as]);return jsx(BaseBox,_extends({ref:ref},metaAttribute({name:MetaConstants.Box,testID:props.testID}),makeBoxProps(props)));};var Box=assignWithoutSideEffects(React__default.forwardRef(_Box),{displayName:'Box'});
|
|
2706
|
+
var validateBackgroundString=function validateBackgroundString(stringBackgroundColorValue){if(!stringBackgroundColorValue.startsWith('surface.background')){throw new Error("[Blade - Box]: Oops! Currently you can only use `surface.background.*` tokens with backgroundColor property but we received `"+stringBackgroundColorValue+"` instead.\n\n Do you have a usecase of using other values? Create an issue on https://github.com/razorpay/blade repo to let us know and we can discuss \u2728");}};var validateBackgroundProp=function validateBackgroundProp(responsiveBackgroundColor){if(responsiveBackgroundColor){if(typeof responsiveBackgroundColor==='string'){validateBackgroundString(responsiveBackgroundColor);return;}Object.values(responsiveBackgroundColor).forEach(function(backgroundColor){validateBackgroundString(backgroundColor);});}};var makeBoxProps=function makeBoxProps(props){return {display:props.display,overflow:props.overflow,overflowX:props.overflowX,overflowY:props.overflowY,height:props.height,minHeight:props.minHeight,maxHeight:props.maxHeight,width:props.width,minWidth:props.minWidth,maxWidth:props.maxWidth,textAlign:props.textAlign,flex:props.flex,flexWrap:props.flexWrap,flexDirection:props.flexDirection,flexGrow:props.flexGrow,flexShrink:props.flexShrink,flexBasis:props.flexBasis,alignItems:props.alignItems,alignContent:props.alignContent,alignSelf:props.alignSelf,justifyItems:props.justifyItems,justifyContent:props.justifyContent,justifySelf:props.justifySelf,placeSelf:props.placeSelf,order:props.order,grid:props.grid,gridColumn:props.gridColumn,gridRow:props.gridRow,gridRowStart:props.gridRowStart,gridRowEnd:props.gridRowEnd,gridColumnStart:props.gridColumnStart,gridColumnEnd:props.gridColumnEnd,gridArea:props.gridArea,gridAutoFlow:props.gridAutoFlow,gridAutoRows:props.gridAutoRows,gridAutoColumns:props.gridAutoColumns,gridTemplate:props.gridTemplate,gridTemplateAreas:props.gridTemplateAreas,gridTemplateColumns:props.gridTemplateColumns,gridTemplateRows:props.gridTemplateRows,padding:props.padding,paddingTop:props.paddingTop,paddingBottom:props.paddingBottom,paddingRight:props.paddingRight,paddingLeft:props.paddingLeft,paddingX:props.paddingX,paddingY:props.paddingY,margin:props.margin,marginBottom:props.marginBottom,marginTop:props.marginTop,marginRight:props.marginRight,marginLeft:props.marginLeft,marginX:props.marginX,marginY:props.marginY,gap:props.gap,rowGap:props.rowGap,columnGap:props.columnGap,position:props.position,zIndex:props.zIndex,top:props.top,right:props.right,bottom:props.bottom,left:props.left,backgroundColor:props.backgroundColor,backgroundImage:props.backgroundImage,backgroundSize:props.backgroundSize,backgroundPosition:props.backgroundPosition,backgroundOrigin:props.backgroundOrigin,backgroundRepeat:props.backgroundRepeat,borderWidth:props.borderWidth,borderColor:props.borderColor,borderTopWidth:props.borderTopWidth,borderTopColor:props.borderTopColor,borderRightWidth:props.borderRightWidth,borderRightColor:props.borderRightColor,borderBottomWidth:props.borderBottomWidth,borderBottomColor:props.borderBottomColor,borderLeftWidth:props.borderLeftWidth,borderLeftColor:props.borderLeftColor,borderRadius:props.borderRadius,borderTopLeftRadius:props.borderTopLeftRadius,borderTopRightRadius:props.borderTopRightRadius,borderBottomRightRadius:props.borderBottomRightRadius,borderBottomLeftRadius:props.borderBottomLeftRadius,onMouseEnter:props.onMouseEnter,onMouseLeave:props.onMouseLeave,onMouseOver:props.onMouseOver,onScroll:props.onScroll,children:props.children,tabIndex:props.tabIndex,as:isReactNative$4()?undefined:props.as};};var _Box=function _Box(props,ref){React__default.useEffect(function(){validateBackgroundProp(props.backgroundColor);},[props.backgroundColor]);React__default.useEffect(function(){if(props.as){if(isReactNative$4()){throw new Error('[Blade - Box]: `as` prop is not supported on React Native');}if(!validBoxAsValues.includes(props.as)){throw new Error("[Blade - Box]: Invalid `as` prop value - "+props.as+". Only "+validBoxAsValues.join(', ')+" are valid values");}}},[props.as]);return jsx(BaseBox,_extends({ref:ref},metaAttribute({name:MetaConstants.Box,testID:props.testID}),makeBoxProps(props)));};var Box=assignWithoutSideEffects(React__default.forwardRef(_Box),{displayName:'Box'});
|
|
3985
2707
|
|
|
3986
2708
|
var _excluded$q=["children","surfaceLevel","elevation"];var CardSurfaceStyled=styled(BaseBox)(function(_ref){var surfaceLevel=_ref.surfaceLevel,elevation=_ref.elevation,theme=_ref.theme;var backgroundColor=theme.colors.surface.background["level"+surfaceLevel].lowContrast;return {width:'100%',display:'flex',flexDirection:'column',borderWidth:elevation==='none'?""+theme.border.width.thin:undefined,borderStyle:elevation==='none'?'solid':undefined,borderColor:elevation==='none'?""+theme.colors.surface.border.normal.lowContrast:undefined,backgroundColor:backgroundColor};});var CardSurface=function CardSurface(_ref2){var children=_ref2.children,surfaceLevel=_ref2.surfaceLevel,elevation=_ref2.elevation,props=_objectWithoutProperties(_ref2,_excluded$q);var _useTheme=useTheme(),theme=_useTheme.theme;return jsx(CardSurfaceStyled,_extends({},props,{surfaceLevel:surfaceLevel,elevation:elevation,style:castNativeType(theme.elevation[elevation]),children:children}));};
|
|
3987
2709
|
|
|
@@ -4255,7 +2977,7 @@ var clamp_1 = clamp;
|
|
|
4255
2977
|
|
|
4256
2978
|
var indeterminateAnimation={scaleXInitial:1,scaleXMid:5,scaleXFinal:1,leftInitial:'-8%',leftMid:'50%',leftFinal:'103%',fillWidth:'5%'};var pulseAnimation={opacityInitial:0,opacityMid:0.25,opacityFinal:0,backgroundColor:'white'};
|
|
4257
2979
|
|
|
4258
|
-
var ProgressBarIndeterminateFilledContainer=styled(Animated.View)(function(_ref){var backgroundColor=_ref.backgroundColor;return {backgroundColor:backgroundColor,height:'100%',width:indeterminateAnimation.fillWidth,position:'absolute'};});var ProgressBarDeterminateFilledContainer=styled(Animated.View)(function(_ref2){var backgroundColor=_ref2.backgroundColor,progress=_ref2.progress;return {backgroundColor:backgroundColor,height:'100%',width:progress+"%"};});var ProgressBarPulseAnimation=styled(Animated.View)({backgroundColor:pulseAnimation.backgroundColor,opacity:pulseAnimation.opacityInitial,width:'100%',height:'100%'});var ProgressBarFilled=function ProgressBarFilled(_ref3){var backgroundColor=_ref3.backgroundColor,progress=_ref3.progress,fillMotionDuration=_ref3.fillMotionDuration,motionEasing=_ref3.motionEasing,pulseMotionDuration=_ref3.pulseMotionDuration,pulseMotionDelay=_ref3.pulseMotionDelay,variant=_ref3.variant,isIndeterminate=_ref3.isIndeterminate,indeterminateMotionDuration=_ref3.indeterminateMotionDuration;var animatedWidth=useSharedValue(progress);var animatedOpacity=useSharedValue(pulseAnimation.opacityInitial);var animatedScaleX=useSharedValue(indeterminateAnimation.scaleXInitial);var animatedLeft=useSharedValue(indeterminateAnimation.leftInitial);var _useTheme=useTheme(),theme=_useTheme.theme;var fillAndPulseEasing=get_1(theme.motion,motionEasing);var pulseDuration=castNativeType(makeMotionTime(get_1(theme.motion,pulseMotionDuration)))/2;useEffect(function(){var fillDuration=castNativeType(makeMotionTime(get_1(theme.motion,fillMotionDuration)));animatedWidth.value=withTiming(progress,{duration:fillDuration,easing:fillAndPulseEasing});return function(){cancelAnimation(animatedWidth);};},[progress,animatedWidth,fillMotionDuration,theme,fillAndPulseEasing]);var progressFillAnimatedStyle=useAnimatedStyle(function(){var _f=function _f(){return {width:animatedWidth.value+"%"};};_f._closure={animatedWidth:animatedWidth};_f.asString="function _f(){const{animatedWidth}=jsThis._closure;{return{width:animatedWidth.value+\"%\"};}}";_f.__workletHash=1064279234695;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/ProgressBar/ProgressBarFilled.native.tsx (
|
|
2980
|
+
var ProgressBarIndeterminateFilledContainer=styled(Animated.View)(function(_ref){var backgroundColor=_ref.backgroundColor;return {backgroundColor:backgroundColor,height:'100%',width:indeterminateAnimation.fillWidth,position:'absolute'};});var ProgressBarDeterminateFilledContainer=styled(Animated.View)(function(_ref2){var backgroundColor=_ref2.backgroundColor,progress=_ref2.progress;return {backgroundColor:backgroundColor,height:'100%',width:progress+"%"};});var ProgressBarPulseAnimation=styled(Animated.View)({backgroundColor:pulseAnimation.backgroundColor,opacity:pulseAnimation.opacityInitial,width:'100%',height:'100%'});var ProgressBarFilled=function ProgressBarFilled(_ref3){var backgroundColor=_ref3.backgroundColor,progress=_ref3.progress,fillMotionDuration=_ref3.fillMotionDuration,motionEasing=_ref3.motionEasing,pulseMotionDuration=_ref3.pulseMotionDuration,pulseMotionDelay=_ref3.pulseMotionDelay,variant=_ref3.variant,isIndeterminate=_ref3.isIndeterminate,indeterminateMotionDuration=_ref3.indeterminateMotionDuration;var animatedWidth=useSharedValue(progress);var animatedOpacity=useSharedValue(pulseAnimation.opacityInitial);var animatedScaleX=useSharedValue(indeterminateAnimation.scaleXInitial);var animatedLeft=useSharedValue(indeterminateAnimation.leftInitial);var _useTheme=useTheme(),theme=_useTheme.theme;var fillAndPulseEasing=get_1(theme.motion,motionEasing);var pulseDuration=castNativeType(makeMotionTime(get_1(theme.motion,pulseMotionDuration)))/2;useEffect(function(){var fillDuration=castNativeType(makeMotionTime(get_1(theme.motion,fillMotionDuration)));animatedWidth.value=withTiming(progress,{duration:fillDuration,easing:fillAndPulseEasing});return function(){cancelAnimation(animatedWidth);};},[progress,animatedWidth,fillMotionDuration,theme,fillAndPulseEasing]);var progressFillAnimatedStyle=useAnimatedStyle(function(){var _f=function _f(){return {width:animatedWidth.value+"%"};};_f._closure={animatedWidth:animatedWidth};_f.asString="function _f(){const{animatedWidth}=jsThis._closure;{return{width:animatedWidth.value+\"%\"};}}";_f.__workletHash=1064279234695;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/ProgressBar/ProgressBarFilled.native.tsx (78:53)";_f.__optimalization=3;return _f;}());useEffect(function(){if(variant==='progress'&&isIndeterminate){var indeterminateDuration=castNativeType(makeMotionTime(get_1(theme.motion,indeterminateMotionDuration)));var indeterminateEasing=Easing.linear;animatedLeft.value=withRepeat(withTiming(indeterminateAnimation.leftFinal,{duration:indeterminateDuration,easing:indeterminateEasing}),-1);animatedScaleX.value=withRepeat(withSequence(withTiming(indeterminateAnimation.scaleXMid,{duration:indeterminateDuration/2,easing:indeterminateEasing}),withTiming(indeterminateAnimation.scaleXFinal,{duration:indeterminateDuration/2,easing:indeterminateEasing})),-1);}return function(){cancelAnimation(animatedLeft);cancelAnimation(animatedScaleX);};},[animatedLeft,animatedScaleX,indeterminateMotionDuration,isIndeterminate,theme,variant]);var indeterminateAnimatedStyle=useAnimatedStyle(function(){var _f=function _f(){return {left:animatedLeft.value,transform:[{scaleX:animatedScaleX.value}]};};_f._closure={animatedLeft:animatedLeft,animatedScaleX:animatedScaleX};_f.asString="function _f(){const{animatedLeft,animatedScaleX}=jsThis._closure;{return{left:animatedLeft.value,transform:[{scaleX:animatedScaleX.value}]};}}";_f.__workletHash=2119202994717;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/ProgressBar/ProgressBarFilled.native.tsx (124:54)";_f.__optimalization=3;return _f;}());useEffect(function(){var pulsatingAnimationTimingConfig={duration:pulseDuration,easing:fillAndPulseEasing};if(variant==='progress'){animatedOpacity.value=withDelay(castNativeType(makeMotionTime(get_1(theme.motion,pulseMotionDelay))),withRepeat(withSequence(withTiming(pulseAnimation.opacityMid,pulsatingAnimationTimingConfig),withTiming(pulseAnimation.opacityFinal,pulsatingAnimationTimingConfig)),-1));}return function(){cancelAnimation(animatedOpacity);};},[animatedOpacity,fillAndPulseEasing,pulseDuration,pulseMotionDelay,theme,variant]);var pulseAnimatedStyle=useAnimatedStyle(function(){var _f=function _f(){return {opacity:animatedOpacity.value};};_f._closure={animatedOpacity:animatedOpacity};_f.asString="function _f(){const{animatedOpacity}=jsThis._closure;{return{opacity:animatedOpacity.value};}}";_f.__workletHash=3015944804182;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/ProgressBar/ProgressBarFilled.native.tsx (156:46)";_f.__optimalization=3;return _f;}());var ProgressBarFilledContainer=isIndeterminate?ProgressBarIndeterminateFilledContainer:ProgressBarDeterminateFilledContainer;return jsx(ProgressBarFilledContainer,{style:isIndeterminate?indeterminateAnimatedStyle:progressFillAnimatedStyle,backgroundColor:backgroundColor,progress:progress,children:jsx(ProgressBarPulseAnimation,{style:pulseAnimatedStyle})});};
|
|
4259
2981
|
|
|
4260
2982
|
var _excluded$7=["accessibilityLabel","contrast","intent","isIndeterminate","label","showPercentage","size","value","variant","min","max","testID"];var progressBarHeight={small:size[2],medium:size[4]};var ProgressBar=function ProgressBar(_ref){var _label$trim;var accessibilityLabel=_ref.accessibilityLabel,_ref$contrast=_ref.contrast,contrast=_ref$contrast===void 0?'low':_ref$contrast,intent=_ref.intent,_ref$isIndeterminate=_ref.isIndeterminate,isIndeterminate=_ref$isIndeterminate===void 0?false:_ref$isIndeterminate,label=_ref.label,_ref$showPercentage=_ref.showPercentage,showPercentage=_ref$showPercentage===void 0?true:_ref$showPercentage,_ref$size=_ref.size,size=_ref$size===void 0?'small':_ref$size,_ref$value=_ref.value,value=_ref$value===void 0?0:_ref$value,_ref$variant=_ref.variant,variant=_ref$variant===void 0?'progress':_ref$variant,_ref$min=_ref.min,min=_ref$min===void 0?0:_ref$min,_ref$max=_ref.max,max=_ref$max===void 0?100:_ref$max,testID=_ref.testID,styledProps=_objectWithoutProperties(_ref,_excluded$7);var _useTheme=useTheme(),theme=_useTheme.theme;var id=useId(variant);if(variant==='meter'&&isIndeterminate){throw new Error("[Blade: ProgressBar]: Cannot set 'isIndeterminate' when 'variant' is 'meter'.");}var unfilledBackgroundColor=theme.colors.brand.gray.a100[contrast+"Contrast"];var filledBackgroundColor=intent?theme.colors.feedback.background[intent].highContrast:theme.colors.brand.primary[500];var hasLabel=label&&((_label$trim=label.trim())==null?void 0:_label$trim.length)>0;var isMeter=variant==='meter';var progressValue=clamp_1(value,min,max);var percentageProgressValue=Math.floor((progressValue-min)*100/(max-min));var shouldShowPercentage=showPercentage&&!isMeter&&!isIndeterminate;var accessibilityProps={role:'progressbar',label:accessibilityLabel!=null?accessibilityLabel:label,valueNow:percentageProgressValue,valueText:percentageProgressValue+"%",valueMin:min,valueMax:max};if(isMeter){accessibilityProps.role='meter';accessibilityProps.valueNow=progressValue;accessibilityProps.valueText=""+progressValue;}if(isIndeterminate){accessibilityProps.valueNow=undefined;accessibilityProps.valueMin=undefined;accessibilityProps.valueMax=undefined;accessibilityProps.valueText=undefined;}return jsxs(BaseBox,_extends({},getStyledProps(styledProps),{children:[jsxs(BaseBox,{display:"flex",flexDirection:"row",justifyContent:hasLabel?'space-between':'flex-end',children:[hasLabel?jsx(FormLabel,{as:"label",htmlFor:id,contrast:contrast,children:label}):null,shouldShowPercentage?jsx(BaseBox,{marginBottom:"spacing.2",children:jsx(Text,{type:"subdued",variant:"body",contrast:contrast,size:"small",children:percentageProgressValue+"%"})}):null]}),jsx(BaseBox,_extends({id:id},metaAttribute({name:MetaConstants.ProgressBar,testID:testID}),makeAccessible({role:accessibilityProps.role,label:accessibilityProps.label,valueNow:accessibilityProps.valueNow,valueText:accessibilityProps.valueText,valueMin:accessibilityProps.valueMin,valueMax:accessibilityProps.valueMax}),{children:jsx(BaseBox,{backgroundColor:unfilledBackgroundColor,height:makeSize(progressBarHeight[size]),overflow:"hidden",position:"relative",children:jsx(ProgressBarFilled,{backgroundColor:filledBackgroundColor,progress:percentageProgressValue,fillMotionDuration:"duration.2xgentle",pulseMotionDuration:"duration.2xgentle",indeterminateMotionDuration:"duration.2xgentle",pulseMotionDelay:"delay.long",motionEasing:"easing.standard.revealing",variant:variant,isIndeterminate:isIndeterminate})})}))]}));};
|
|
4261
2983
|
|
|
@@ -4322,13 +3044,13 @@ var isNumber_1 = isNumber;
|
|
|
4322
3044
|
|
|
4323
3045
|
var switchSizes={track:{desktop:{small:{width:size[28],height:'spacing.5'},medium:{width:size[36],height:'spacing.6'}},mobile:{small:{width:size[36],height:'spacing.6'},medium:{width:size[44],height:'spacing.7'}}},thumb:{desktop:{small:{width:'spacing.4',height:'spacing.4'},medium:{width:'spacing.5',height:'spacing.5'}},mobile:{small:{width:'spacing.5',height:'spacing.5'},medium:{width:'spacing.6',height:'spacing.6'}}}};var switchColors={track:{default:{background:{checked:'colors.brand.primary.500',unchecked:'colors.brand.gray.500.lowContrast'}},disabled:{background:{checked:'colors.brand.primary.400',unchecked:'colors.brand.gray.a100.lowContrast'}}},thumb:{default:{background:'colors.brand.gray.700.highContrast'},disabled:{background:'colors.brand.gray.200.lowContrast'}},thumbIcon:{default:{fill:'colors.brand.gray.200.highContrast'},disabled:{fill:'colors.surface.text.placeholder.lowContrast'}}};var switchMotion={easing:{thumb:'motion.easing.standard.effective',thumbIcon:'motion.easing.standard.effective',track:'motion.easing.standard.effective'},duration:{thumb:'motion.duration.xquick',thumbIcon:'motion.duration.xquick',track:'motion.duration.xquick'}};var switchHoverTokens={default:{background:{checked:'colors.brand.primary.600',unchecked:'colors.brand.gray.600.lowContrast'}}};
|
|
4324
3046
|
|
|
4325
|
-
var AnimatedThumbIcon=function AnimatedThumbIcon(_ref){var children=_ref.children,isChecked=_ref.isChecked,width=_ref.width,height=_ref.height,viewBox=_ref.viewBox,fill=_ref.fill;var _useTheme=useTheme(),theme=_useTheme.theme;var opacity=useSharedValue(isChecked?1:0);var easing=get_1(theme,switchMotion.easing.thumbIcon);var duration=get_1(theme,switchMotion.duration.thumbIcon);React__default.useEffect(function(){opacity.value=withTiming(isChecked?1:0,{duration:duration,easing:easing});},[isChecked]);var opacityStyle=useAnimatedStyle(function(){var _f=function _f(){return {opacity:interpolate(opacity.value,[0,0.2,1],[0,0,1])};};_f._closure={interpolate:interpolate,opacity:opacity};_f.asString="function _f(){const{interpolate,opacity}=jsThis._closure;{return{opacity:interpolate(opacity.value,[0,0.2,1],[0,0,1])};}}";_f.__workletHash=8673532426119;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Switch/AnimatedThumbIcon.native.tsx (
|
|
3047
|
+
var AnimatedThumbIcon=function AnimatedThumbIcon(_ref){var children=_ref.children,isChecked=_ref.isChecked,width=_ref.width,height=_ref.height,viewBox=_ref.viewBox,fill=_ref.fill;var _useTheme=useTheme(),theme=_useTheme.theme;var opacity=useSharedValue(isChecked?1:0);var easing=get_1(theme,switchMotion.easing.thumbIcon);var duration=get_1(theme,switchMotion.duration.thumbIcon);React__default.useEffect(function(){opacity.value=withTiming(isChecked?1:0,{duration:duration,easing:easing});},[isChecked]);var opacityStyle=useAnimatedStyle(function(){var _f=function _f(){return {opacity:interpolate(opacity.value,[0,0.2,1],[0,0,1])};};_f._closure={interpolate:interpolate,opacity:opacity};_f.asString="function _f(){const{interpolate,opacity}=jsThis._closure;{return{opacity:interpolate(opacity.value,[0,0.2,1],[0,0,1])};}}";_f.__workletHash=8673532426119;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Switch/AnimatedThumbIcon.native.tsx (39:40)";_f.__optimalization=3;return _f;}(),[]);return jsx(Animated.View,{style:opacityStyle,children:jsx(Svg,{width:width,height:height,viewBox:viewBox,fill:fill,children:children})});};
|
|
4326
3048
|
|
|
4327
3049
|
var switchIconSize={desktop:{small:size[6],medium:'spacing.3'},mobile:{small:'spacing.3',medium:size[10]}};var ThumbIcon=function ThumbIcon(_ref){var isChecked=_ref.isChecked,isDisabled=_ref.isDisabled,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var width=switchIconSize[matchedDeviceType][size];var height=switchIconSize[matchedDeviceType][size];var finalWidth=isNumber_1(width)?makeSize(width):makeSpace(get_1(theme,width));var finalHeight=isNumber_1(height)?makeSize(height):makeSpace(get_1(theme,height));var variant=isDisabled?'disabled':'default';var fillColor=get_1(theme,switchColors.thumbIcon[variant].fill);return jsx(AnimatedThumbIcon,{isChecked:Boolean(isChecked),width:finalWidth,height:finalHeight,viewBox:"0 0 11 8",fill:"none",children:jsx(Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M8.81891 0.546661C9.12722 0.238352 9.62709 0.238353 9.9354 0.546661C10.2437 0.85497 10.2437 1.35484 9.9354 1.66315L4.14592 7.45262C3.83761 7.76093 3.33775 7.76093 3.02944 7.45262L0.397858 4.82104C0.0895488 4.51273 0.0895488 4.01286 0.397857 3.70456C0.706166 3.39625 1.20603 3.39625 1.51434 3.70456L3.58768 5.77789L8.81891 0.546661Z",fill:fillColor})});};
|
|
4328
3050
|
|
|
4329
3051
|
var Thumb=styled(BaseBox)(function(_ref){var theme=_ref.theme,_ref$size=_ref.size,size=_ref$size===void 0?'medium':_ref$size,deviceType=_ref.deviceType;var width=switchSizes.thumb[deviceType][size].width;var height=switchSizes.thumb[deviceType][size].height;var finalWidth=isNumber_1(width)?makeSize(width):makeSpace(get_1(theme,width));var finalHeight=isNumber_1(height)?makeSize(height):makeSpace(get_1(theme,height));var reactNativeStyles={left:0,margin:makeSpace(theme.spacing[1])};return _extends({display:'flex',alignItems:'center',justifyContent:'center',width:finalWidth,height:finalHeight,position:isReactNative$4()?'absolute':'relative'},isReactNative$4()&&reactNativeStyles);});
|
|
4330
3052
|
|
|
4331
|
-
var StyledAnimatedThumb=styled(Animated.View)(function(_ref){var theme=_ref.theme,isDisabled=_ref.isDisabled;var variant=isDisabled?'disabled':'default';var backgroundColor=get_1(theme,switchColors.thumb[variant].background);return {display:'flex',alignItems:'center',justifyContent:'center',flexShrink:0,width:'100%',height:'100%',borderRadius:makeBorderSize(theme.border.radius.max),backgroundColor:backgroundColor,position:'absolute'};});var AnimatedThumb=function AnimatedThumb(_ref2){var isChecked=_ref2.isChecked,isDisabled=_ref2.isDisabled,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,children=_ref2.children,isPressed=_ref2.isPressed;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var sharedLeft=useSharedValue(isChecked?1:0);var sharedWidth=useSharedValue(isPressed?1:0);var sharedShouldShiftOffset=useSharedValue(Boolean(isChecked&&isPressed));var easing=get_1(theme,switchMotion.easing.thumb);var duration=get_1(theme,switchMotion.duration.thumb);var thumbWidth=switchSizes.thumb[matchedDeviceType][size].width;var finalWidth=isNumber_1(thumbWidth)?thumbWidth:get_1(theme,thumbWidth);React__default.useEffect(function(){sharedLeft.value=withTiming(isChecked?1:0,{duration:duration,easing:easing});},[isChecked]);React__default.useEffect(function(){sharedWidth.value=withTiming(isPressed?1:0,{duration:duration,easing:easing});},[isPressed]);React__default.useEffect(function(){sharedShouldShiftOffset.value=Boolean(isChecked&&isPressed);},[isChecked,isPressed]);var thumbAnimation=useAnimatedStyle(function(){var _f=function _f(){return {width:interpolate(sharedWidth.value,[0,1],[finalWidth,finalWidth*1.25]),left:withTiming(sharedShouldShiftOffset.value?finalWidth*-0.25:0,{easing:easing,duration:duration}),transform:[{translateX:interpolate(sharedLeft.value,[0,1],[0,finalWidth])}]};};_f._closure={interpolate:interpolate,sharedWidth:sharedWidth,finalWidth:finalWidth,withTiming:withTiming,sharedShouldShiftOffset:sharedShouldShiftOffset,easing:easing,duration:duration,sharedLeft:sharedLeft};_f.asString="function _f(){const{interpolate,sharedWidth,finalWidth,withTiming,sharedShouldShiftOffset,easing,duration,sharedLeft}=jsThis._closure;{return{width:interpolate(sharedWidth.value,[0,1],[finalWidth,finalWidth*1.25]),left:withTiming(sharedShouldShiftOffset.value?finalWidth*-0.25:0,{easing:easing,duration:duration}),transform:[{translateX:interpolate(sharedLeft.value,[0,1],[0,finalWidth])}]};}}";_f.__workletHash=3540722145532;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Switch/AnimatedThumb.native.tsx (
|
|
3053
|
+
var StyledAnimatedThumb=styled(Animated.View)(function(_ref){var theme=_ref.theme,isDisabled=_ref.isDisabled;var variant=isDisabled?'disabled':'default';var backgroundColor=get_1(theme,switchColors.thumb[variant].background);return {display:'flex',alignItems:'center',justifyContent:'center',flexShrink:0,width:'100%',height:'100%',borderRadius:makeBorderSize(theme.border.radius.max),backgroundColor:backgroundColor,position:'absolute'};});var AnimatedThumb=function AnimatedThumb(_ref2){var isChecked=_ref2.isChecked,isDisabled=_ref2.isDisabled,_ref2$size=_ref2.size,size=_ref2$size===void 0?'medium':_ref2$size,children=_ref2.children,isPressed=_ref2.isPressed;var _useTheme=useTheme(),theme=_useTheme.theme;var _useBreakpoint=useBreakpoint({breakpoints:theme.breakpoints}),matchedDeviceType=_useBreakpoint.matchedDeviceType;var sharedLeft=useSharedValue(isChecked?1:0);var sharedWidth=useSharedValue(isPressed?1:0);var sharedShouldShiftOffset=useSharedValue(Boolean(isChecked&&isPressed));var easing=get_1(theme,switchMotion.easing.thumb);var duration=get_1(theme,switchMotion.duration.thumb);var thumbWidth=switchSizes.thumb[matchedDeviceType][size].width;var finalWidth=isNumber_1(thumbWidth)?thumbWidth:get_1(theme,thumbWidth);React__default.useEffect(function(){sharedLeft.value=withTiming(isChecked?1:0,{duration:duration,easing:easing});},[isChecked]);React__default.useEffect(function(){sharedWidth.value=withTiming(isPressed?1:0,{duration:duration,easing:easing});},[isPressed]);React__default.useEffect(function(){sharedShouldShiftOffset.value=Boolean(isChecked&&isPressed);},[isChecked,isPressed]);var thumbAnimation=useAnimatedStyle(function(){var _f=function _f(){return {width:interpolate(sharedWidth.value,[0,1],[finalWidth,finalWidth*1.25]),left:withTiming(sharedShouldShiftOffset.value?finalWidth*-0.25:0,{easing:easing,duration:duration}),transform:[{translateX:interpolate(sharedLeft.value,[0,1],[0,finalWidth])}]};};_f._closure={interpolate:interpolate,sharedWidth:sharedWidth,finalWidth:finalWidth,withTiming:withTiming,sharedShouldShiftOffset:sharedShouldShiftOffset,easing:easing,duration:duration,sharedLeft:sharedLeft};_f.asString="function _f(){const{interpolate,sharedWidth,finalWidth,withTiming,sharedShouldShiftOffset,easing,duration,sharedLeft}=jsThis._closure;{return{width:interpolate(sharedWidth.value,[0,1],[finalWidth,finalWidth*1.25]),left:withTiming(sharedShouldShiftOffset.value?finalWidth*-0.25:0,{easing:easing,duration:duration}),transform:[{translateX:interpolate(sharedLeft.value,[0,1],[0,finalWidth])}]};}}";_f.__workletHash=3540722145532;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Switch/AnimatedThumb.native.tsx (74:42)";_f.__optimalization=2;return _f;}(),[]);return jsx(StyledAnimatedThumb,{style:thumbAnimation,isDisabled:isDisabled,children:children});};
|
|
4332
3054
|
|
|
4333
3055
|
var getTrackStyles=function getTrackStyles(_ref){var isChecked=_ref.isChecked,isDisabled=_ref.isDisabled,deviceType=_ref.deviceType,size=_ref.size,theme=_ref.theme;var variant='default';if(isDisabled)variant='disabled';var checked=isChecked?'checked':'unchecked';var background=switchColors.track[variant].background[checked];var backgroundColor=get_1(theme,background);var widthToken=switchSizes.track[deviceType][size].width;var heightToken=switchSizes.track[deviceType][size].height;var width=isNumber_1(widthToken)?makeSize(widthToken):makeSpace(get_1(theme,widthToken));var height=isNumber_1(heightToken)?makeSize(heightToken):makeSpace(get_1(theme,heightToken));return {pointerEvents:'none',position:'relative',display:'flex',alignItems:'center',margin:makeSpace(theme.spacing[1]),padding:makeSpace(theme.spacing[1]),width:width,height:height,borderRadius:makeSize(theme.border.radius.max),backgroundColor:backgroundColor,transitionTimingFunction:""+theme.motion.easing.standard.effective,transitionDuration:isReactNative$4()?undefined:""+makeMotionTime(theme.motion.duration['2xquick'])};};
|
|
4334
3056
|
|
|
@@ -4376,9 +3098,9 @@ var CollapsibleContext=createContext(null);var useCollapsible=function useCollap
|
|
|
4376
3098
|
|
|
4377
3099
|
var getCollapsibleBodyContentBoxProps=function getCollapsibleBodyContentBoxProps(_ref){var direction=_ref.direction;return {marginTop:direction==='bottom'?'spacing.5':'spacing.0',marginBottom:direction==='top'?'spacing.5':'spacing.0'};};var getOpacity=function getOpacity(_ref2){var isExpanded=_ref2.isExpanded;return isExpanded?1:0.8;};var getTransitionDuration=function getTransitionDuration(theme){return makeMotionTime(theme.motion.duration.xmoderate);};var getTransitionEasing=function getTransitionEasing(theme){return theme.motion.easing.standard.effective;};var getCollapsibleChevronIconTransforms=function getCollapsibleChevronIconTransforms(_ref3){var direction=_ref3.direction;var transformExpanded,transformCollapsed;if(direction==='bottom'){transformExpanded=-180;transformCollapsed=0;}else {transformExpanded=0;transformCollapsed=-180;}return {transformExpanded:transformExpanded,transformCollapsed:transformCollapsed};};
|
|
4378
3100
|
|
|
4379
|
-
var CollapsibleChevronIcon=function CollapsibleChevronIcon(props){var _useCollapsible=useCollapsible(),isExpanded=_useCollapsible.isExpanded,direction=_useCollapsible.direction;var _useTheme=useTheme(),theme=_useTheme.theme;var _getCollapsibleChevro=getCollapsibleChevronIconTransforms({direction:direction}),transformExpanded=_getCollapsibleChevro.transformExpanded,transformCollapsed=_getCollapsibleChevro.transformCollapsed;var duration=castNativeType(getTransitionDuration(theme));var easing=castNativeType(getTransitionEasing(theme));var rotateZ=useDerivedValue(function(){var _f=function _f(){return withTiming(isExpanded?transformExpanded:transformCollapsed,{duration:duration,easing:easing});};_f._closure={withTiming:withTiming,isExpanded:isExpanded,transformExpanded:transformExpanded,transformCollapsed:transformCollapsed,duration:duration,easing:easing};_f.asString="function _f(){const{withTiming,isExpanded,transformExpanded,transformCollapsed,duration,easing}=jsThis._closure;{return withTiming(isExpanded?transformExpanded:transformCollapsed,{duration:duration,easing:easing});}}";_f.__workletHash=6055948545361;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Collapsible/CollapsibleChevronIcon.native.tsx (
|
|
3101
|
+
var CollapsibleChevronIcon=function CollapsibleChevronIcon(props){var _useCollapsible=useCollapsible(),isExpanded=_useCollapsible.isExpanded,direction=_useCollapsible.direction;var _useTheme=useTheme(),theme=_useTheme.theme;var _getCollapsibleChevro=getCollapsibleChevronIconTransforms({direction:direction}),transformExpanded=_getCollapsibleChevro.transformExpanded,transformCollapsed=_getCollapsibleChevro.transformCollapsed;var duration=castNativeType(getTransitionDuration(theme));var easing=castNativeType(getTransitionEasing(theme));var rotateZ=useDerivedValue(function(){var _f=function _f(){return withTiming(isExpanded?transformExpanded:transformCollapsed,{duration:duration,easing:easing});};_f._closure={withTiming:withTiming,isExpanded:isExpanded,transformExpanded:transformExpanded,transformCollapsed:transformCollapsed,duration:duration,easing:easing};_f.asString="function _f(){const{withTiming,isExpanded,transformExpanded,transformCollapsed,duration,easing}=jsThis._closure;{return withTiming(isExpanded?transformExpanded:transformCollapsed,{duration:duration,easing:easing});}}";_f.__workletHash=6055948545361;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Collapsible/CollapsibleChevronIcon.native.tsx (25:34)";return _f;}());var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {transform:[{rotateZ:rotateZ.value+"deg"}]};};_f._closure={rotateZ:rotateZ};_f.asString="function _f(){const{rotateZ}=jsThis._closure;{return{transform:[{rotateZ:rotateZ.value+\"deg\"}]};}}";_f.__workletHash=15898834984503;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Collapsible/CollapsibleChevronIcon.native.tsx (28:42)";_f.__optimalization=3;return _f;}());return jsx(Animated.View,_extends({style:animatedStyles},makeAccessible({hidden:true}),{children:jsx(ChevronDownIcon,_extends({},props))}));};
|
|
4380
3102
|
|
|
4381
|
-
var _AccordionButton=function _AccordionButton(_ref){var index=_ref.index,Icon=_ref.icon,children=_ref.children;var _useCollapsible=useCollapsible(),onExpandChange=_useCollapsible.onExpandChange,isExpanded=_useCollapsible.isExpanded,collapsibleBodyId=_useCollapsible.collapsibleBodyId;var _useAccordion=useAccordion(),showNumberPrefix=_useAccordion.showNumberPrefix,expandedIndex=_useAccordion.expandedIndex;var _useTheme=useTheme(),theme=_useTheme.theme;var toggleCollapse=function toggleCollapse(){return onExpandChange(!isExpanded);};var isItemExpanded=expandedIndex===index;var isPressed=useSharedValue(false);var duration=castNativeType(getTransitionDuration$1(theme));var easing=castNativeType(getTransitionEasing$1(theme));var activeBackgroundColor=useSharedValue(getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:true}));var inActiveBackgroundColor=useSharedValue(getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:false}));useEffect(function(){activeBackgroundColor.value=getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:true});inActiveBackgroundColor.value=getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:false});},[isExpanded,activeBackgroundColor,inActiveBackgroundColor,theme]);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {backgroundColor:withTiming(isPressed.value?activeBackgroundColor.value:inActiveBackgroundColor.value,{duration:duration,easing:easing})};};_f._closure={withTiming:withTiming,isPressed:isPressed,activeBackgroundColor:activeBackgroundColor,inActiveBackgroundColor:inActiveBackgroundColor,duration:duration,easing:easing};_f.asString="function _f(){const{withTiming,isPressed,activeBackgroundColor,inActiveBackgroundColor,duration,easing}=jsThis._closure;{return{backgroundColor:withTiming(isPressed.value?activeBackgroundColor.value:inActiveBackgroundColor.value,{duration:duration,easing:easing})};}}";_f.__workletHash=12210880793787;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Accordion/AccordionButton.native.tsx (
|
|
3103
|
+
var _AccordionButton=function _AccordionButton(_ref){var index=_ref.index,Icon=_ref.icon,children=_ref.children;var _useCollapsible=useCollapsible(),onExpandChange=_useCollapsible.onExpandChange,isExpanded=_useCollapsible.isExpanded,collapsibleBodyId=_useCollapsible.collapsibleBodyId;var _useAccordion=useAccordion(),showNumberPrefix=_useAccordion.showNumberPrefix,expandedIndex=_useAccordion.expandedIndex;var _useTheme=useTheme(),theme=_useTheme.theme;var toggleCollapse=function toggleCollapse(){return onExpandChange(!isExpanded);};var isItemExpanded=expandedIndex===index;var isPressed=useSharedValue(false);var duration=castNativeType(getTransitionDuration$1(theme));var easing=castNativeType(getTransitionEasing$1(theme));var activeBackgroundColor=useSharedValue(getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:true}));var inActiveBackgroundColor=useSharedValue(getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:false}));useEffect(function(){activeBackgroundColor.value=getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:true});inActiveBackgroundColor.value=getBackgroundColor({theme:theme,isExpanded:isExpanded,isActive:false});},[isExpanded,activeBackgroundColor,inActiveBackgroundColor,theme]);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){return {backgroundColor:withTiming(isPressed.value?activeBackgroundColor.value:inActiveBackgroundColor.value,{duration:duration,easing:easing})};};_f._closure={withTiming:withTiming,isPressed:isPressed,activeBackgroundColor:activeBackgroundColor,inActiveBackgroundColor:inActiveBackgroundColor,duration:duration,easing:easing};_f.asString="function _f(){const{withTiming,isPressed,activeBackgroundColor,inActiveBackgroundColor,duration,easing}=jsThis._closure;{return{backgroundColor:withTiming(isPressed.value?activeBackgroundColor.value:inActiveBackgroundColor.value,{duration:duration,easing:easing})};}}";_f.__workletHash=12210880793787;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Accordion/AccordionButton.native.tsx (51:42)";_f.__optimalization=2;return _f;}());var _showNumberPrefix=typeof index==='number'&&showNumberPrefix;var _index=_showNumberPrefix?jsxs(Heading,{size:"small",marginRight:"spacing.2",children:[index+1,"."]}):null;var a11yLabel=_showNumberPrefix?index+1+". "+children:children;var renderChildren=function renderChildren(_ref2){var pressed=_ref2.pressed;isPressed.value=pressed;var iconColor=pressed?'surface.action.icon.focus.lowContrast':'surface.action.icon.default.lowContrast';var _icon=Icon&&jsx(Icon,{size:"medium",color:iconColor,marginRight:"spacing.3",marginY:"spacing.2"});if(_index&&_icon){throw new Error("[Blade: Accordion]: showNumberPrefix and icon shouldn't be used together");}return jsxs(BaseBox,{display:"flex",flexDirection:"row",flex:1,justifyContent:"space-between",alignItems:"center",children:[jsxs(BaseBox,{display:"flex",flexDirection:"row",alignItems:"flex-start",marginRight:"spacing.5",flexShrink:1,children:[_index,_icon,jsx(Heading,{size:"small",children:children})]}),jsx(BaseBox,{children:jsx(CollapsibleChevronIcon,{color:iconColor,size:"large"})})]});};return jsx(StyledAccordionButton,_extends({isExpanded:isExpanded,onPress:toggleCollapse,style:animatedStyles},makeAccessible({role:'button',expanded:isItemExpanded,controls:collapsibleBodyId,label:a11yLabel}),metaAttribute({name:MetaConstants.AccordionButton}),{children:renderChildren}));};var AccordionButton=assignWithoutSideEffects(_AccordionButton,{componentId:MetaConstants.AccordionButton});
|
|
4382
3104
|
|
|
4383
3105
|
var MAX_WIDTH={s:makeSize(Dimensions.get('window').width-size[40]),m:makeSize(size[640]),l:makeSize(size[1136])};var nativeStyles=StyleSheet.create({collapsibleBodyExpanded:{position:'relative'},collapsibleBodyCollapsed:{position:'absolute'}});var MAX_WIDTH_NO_RESTRICTIONS=undefined;
|
|
4384
3106
|
|
|
@@ -4398,11 +3120,11 @@ var ARROW_WIDTH=14;var ARROW_HEIGHT=7;
|
|
|
4398
3120
|
|
|
4399
3121
|
var getPlacementParts=function getPlacementParts(placement){var _ref=placement.split('-'),_ref2=_slicedToArray(_ref,2),side=_ref2[0],alignment=_ref2[1];return [side,alignment];};var mergeProps=function mergeProps(base,overrides){var props=_extends({},base);var _loop=function _loop(key){if(!overrides.hasOwnProperty(key))return "continue";var overrideValue=overrides[key];if(typeof overrideValue==='function'){var baseValue=base[key];if(typeof baseValue==='function'){props[key]=function(){overrideValue.apply(void 0,arguments);baseValue.apply(void 0,arguments);};return "continue";}}props[key]=overrideValue;};for(var key in overrides){var _ret=_loop(key);if(_ret==="continue")continue;}return props;};
|
|
4400
3122
|
|
|
4401
|
-
var StyledSvg=styled(Svg)(function(_ref){var styles=_ref.styles;return styles;});var TooltipArrow=React.forwardRef(function(_ref2,ref){var context=_ref2.context;var _useTheme=useTheme(),theme=_useTheme.theme;var placement=context.placement,floating=context.elements.floating,arrow=context.middlewareData.arrow;var width=ARROW_WIDTH;var height=ARROW_HEIGHT;var strokeWidth=theme.border.width.thin*2;if(!ref){console.warn('Floating UI: The `ref` prop is required for the `FloatingArrow`','component.');}if(!floating){return jsx(Fragment,{});}var _getPlacementParts=getPlacementParts(placement),_getPlacementParts2=_slicedToArray(_getPlacementParts,1),side=_getPlacementParts2[0];var svgX=width/2;var svgY=0;var dValue='M0,0'+(" H"+width)+(" L"+(width-svgX)+","+(height-svgY))+(" Q"+width/2+","+height+" "+svgX+","+(height-svgY))+' Z';var staticSide={top:'bottom',right:'left',bottom:'top',left:'right'}[side];var rotation={top:0,bottom:180,left:-90,right:90}[side];var newStyles={};if(arrow){var _newStyles;var x=arrow.x,y=arrow.y;newStyles=(_newStyles={width:makeSize(size[20]),height:makeSize(size[20]),position:'absolute',left:x!=null?x+"px":undefined,top:y!=null?y+"px":undefined,right:undefined,bottom:undefined},_defineProperty
|
|
3123
|
+
var StyledSvg=styled(Svg)(function(_ref){var styles=_ref.styles;return styles;});var TooltipArrow=React.forwardRef(function(_ref2,ref){var context=_ref2.context;var _useTheme=useTheme(),theme=_useTheme.theme;var placement=context.placement,floating=context.elements.floating,arrow=context.middlewareData.arrow;var width=ARROW_WIDTH;var height=ARROW_HEIGHT;var strokeWidth=theme.border.width.thin*2;if(!ref){console.warn('Floating UI: The `ref` prop is required for the `FloatingArrow`','component.');}if(!floating){return jsx(Fragment,{});}var _getPlacementParts=getPlacementParts(placement),_getPlacementParts2=_slicedToArray(_getPlacementParts,1),side=_getPlacementParts2[0];var svgX=width/2;var svgY=0;var dValue='M0,0'+(" H"+width)+(" L"+(width-svgX)+","+(height-svgY))+(" Q"+width/2+","+height+" "+svgX+","+(height-svgY))+' Z';var staticSide={top:'bottom',right:'left',bottom:'top',left:'right'}[side];var rotation={top:0,bottom:180,left:-90,right:90}[side];var newStyles={};if(arrow){var _newStyles;var x=arrow.x,y=arrow.y;newStyles=(_newStyles={width:makeSize(size[20]),height:makeSize(size[20]),position:'absolute',left:x!=null?x+"px":undefined,top:y!=null?y+"px":undefined,right:undefined,bottom:undefined},_defineProperty(_newStyles,staticSide,-width+"px"),_defineProperty(_newStyles,"transform","rotate("+rotation+"deg)"),_newStyles);}var strokeColor=theme.colors.brand.gray[300].highContrast;return jsx(View,{collapsable:false,style:{position:'absolute',left:0,right:0,top:0,bottom:0},children:jsxs(StyledSvg,{ref:ref,width:width+"px",height:width+"px",viewBox:"0 0 "+width+" "+width,styles:newStyles,children:[jsx(Path,{fill:"none",stroke:strokeColor,strokeWidth:strokeWidth+"px",d:dValue}),jsx(Path,{fill:theme.colors.brand.gray[200].highContrast,stroke:"none",d:dValue})]})});});
|
|
4402
3124
|
|
|
4403
3125
|
var getTooltipContentWrapperStyles=function getTooltipContentWrapperStyles(_ref){var theme=_ref.theme,styles=_ref.styles;return _extends({backgroundColor:theme.colors.brand.gray[200].highContrast,borderWidth:makeBorderSize(theme.border.width.thin),borderRadius:makeBorderSize(theme.border.radius.medium),borderColor:theme.colors.brand.gray[300].highContrast,borderStyle:'solid',boxShadow:isReactNative$4()?undefined:castWebType(theme.elevation.lowRaised)},styles);};
|
|
4404
3126
|
|
|
4405
|
-
var _excluded=["children","styles","side","isVisible"];var StyledTooltipContentWrapper=styled(BaseBox)(function(_ref){var theme=_ref.theme,styles=_ref.styles;return getTooltipContentWrapperStyles({theme:theme,styles:styles});});var TooltipContentWrapper=React__default.forwardRef(function(_ref2,ref){var children=_ref2.children,styles=_ref2.styles,side=_ref2.side,isVisible=_ref2.isVisible,props=_objectWithoutProperties(_ref2,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var isOppositeAxis=side==='right'||side==='bottom';var isHorizontal=side==='left'||side==='right';var offset=isOppositeAxis?-size[4]:size[4];var translate=useSharedValue(offset);var opacity=useSharedValue(0);var easing=theme.motion.easing.entrance.effective;var duration=theme.motion.duration.quick;React__default.useEffect(function(){var timings={easing:easing,duration:duration};opacity.value=withDelay(duration,withTiming(isVisible?1:0,timings));translate.value=withDelay(duration,withTiming(isVisible?0:offset,timings));},[isVisible]);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){var transform=isHorizontal?'translateX':'translateY';return {opacity:opacity.value,transform:[_defineProperty
|
|
3127
|
+
var _excluded=["children","styles","side","isVisible"];var StyledTooltipContentWrapper=styled(BaseBox)(function(_ref){var theme=_ref.theme,styles=_ref.styles;return getTooltipContentWrapperStyles({theme:theme,styles:styles});});var TooltipContentWrapper=React__default.forwardRef(function(_ref2,ref){var children=_ref2.children,styles=_ref2.styles,side=_ref2.side,isVisible=_ref2.isVisible,props=_objectWithoutProperties(_ref2,_excluded);var _useTheme=useTheme(),theme=_useTheme.theme;var isOppositeAxis=side==='right'||side==='bottom';var isHorizontal=side==='left'||side==='right';var offset=isOppositeAxis?-size[4]:size[4];var translate=useSharedValue(offset);var opacity=useSharedValue(0);var easing=theme.motion.easing.entrance.effective;var duration=theme.motion.duration.quick;React__default.useEffect(function(){var timings={easing:easing,duration:duration};opacity.value=withDelay(duration,withTiming(isVisible?1:0,timings));translate.value=withDelay(duration,withTiming(isVisible?0:offset,timings));},[isVisible]);var animatedStyles=useAnimatedStyle(function(){var _f=function _f(){var transform=isHorizontal?'translateX':'translateY';return {opacity:opacity.value,transform:[_defineProperty({},transform,translate.value)]};};_f._closure={isHorizontal:isHorizontal,opacity:opacity,translate:translate};_f.asString="function _f(){const{isHorizontal,opacity,translate}=jsThis._closure;{const transform=isHorizontal?'translateX':'translateY';return{opacity:opacity.value,transform:[{[transform]:translate.value}]};}}";_f.__workletHash=16340719645714;_f.__location="/home/runner/work/blade/blade/packages/blade/src/components/Tooltip/TooltipContentWrapper.native.tsx (49:44)";_f.__optimalization=3;return _f;}(),[isVisible]);return jsx(Animated.View,{style:animatedStyles,children:jsx(StyledTooltipContentWrapper,_extends({styles:styles,style:castNativeType(theme.elevation.lowRaised),elevation:20,ref:ref,collapse:false},props,{children:children}))});});
|
|
4406
3128
|
|
|
4407
3129
|
var TooltipContent=React__default.forwardRef(function(_ref,ref){var children=_ref.children,arrow=_ref.arrow,side=_ref.side,style=_ref.style,isVisible=_ref.isVisible;return jsxs(TooltipContentWrapper,{position:isReactNative$4()?'absolute':'relative',paddingTop:"spacing.3",paddingBottom:"spacing.3",paddingLeft:"spacing.4",paddingRight:"spacing.4",maxWidth:makeSize(size[200]),ref:ref,styles:style,side:side,isVisible:isVisible,children:[jsx(Text,{variant:"body",size:"small",weight:"regular",contrast:"high",color:"feedback.text.neutral.highContrast",children:children}),arrow]});});
|
|
4408
3130
|
|