@baloise/ds-core 17.2.3 → 17.2.4-nightly.20250113
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/components/all.d.ts +2 -0
- package/components/all.js +3 -0
- package/components/array.js +1 -1856
- package/components/bal-app.js +1 -93
- package/components/bal-app2.js +95 -0
- package/components/bal-carousel.js +4 -1
- package/components/bal-date-calendar2.js +1 -1
- package/components/bal-doc-app.d.ts +11 -0
- package/components/bal-doc-app.js +262 -0
- package/components/bal-footer.js +44 -41
- package/components/bal-tabs2.js +3 -2
- package/components/index.js +5 -304
- package/components/index4.js +1642 -342
- package/components/index5.js +558 -0
- package/components/initialize.js +303 -0
- package/components/swiper.util.js +25 -5
- package/components/tokens.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.esm.js +1 -1
- package/dist/baloise-design-system/baloise-design-system.js +1 -1
- package/dist/baloise-design-system/index.esm.js +1 -1
- package/dist/baloise-design-system/{p-bdb87be782.system.entry.js → p-024a907ee6.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-079850e6.system.js +1 -0
- package/dist/baloise-design-system/p-0b8169c8.js +1 -0
- package/dist/baloise-design-system/{p-00ae3132.system.js → p-0c533bdb.system.js} +1 -1
- package/dist/baloise-design-system/p-0e323fe0.system.js +1 -1
- package/dist/baloise-design-system/p-1c191e7d.js +1 -0
- package/dist/baloise-design-system/{p-99d46d1583.system.entry.js → p-2d4e4a9385.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-d777c285e4.system.entry.js → p-321817c0e0.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-bd6fd5de36.entry.js → p-3514ce1a41.entry.js} +1 -1
- package/dist/baloise-design-system/{p-356aa83c1a.system.entry.js → p-36e5adc450.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-378298ca40.system.entry.js → p-377a3a3191.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-3e7da614.system.js → p-3b5affcf.system.js} +1 -1
- package/dist/baloise-design-system/p-40b1d8d96d.entry.js +1 -0
- package/dist/baloise-design-system/{p-5bcd9a5b.js → p-4d9be9b0.js} +1 -1
- package/dist/baloise-design-system/{p-db14671c52.system.entry.js → p-4f91fba696.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-5622c208.system.js +1 -0
- package/dist/baloise-design-system/p-58d2a0b5.system.js +1 -0
- package/dist/baloise-design-system/{p-91d1c6f64b.entry.js → p-6115e6e6e5.entry.js} +1 -1
- package/dist/baloise-design-system/p-73bec757.js +1 -0
- package/dist/baloise-design-system/{p-43a1210363.system.entry.js → p-74df65cb38.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-783d9ffa8a.entry.js → p-759fb356a5.entry.js} +1 -1
- package/dist/baloise-design-system/{p-b590137a20.system.entry.js → p-760ba9b15a.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-5e1cab7609.entry.js → p-8afcf3f1f4.entry.js} +1 -1
- package/dist/baloise-design-system/p-8c24fdcf6c.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-edb1324d.system.js → p-92ea6416.system.js} +1 -1
- package/dist/baloise-design-system/p-960c5007.js +1 -0
- package/dist/baloise-design-system/p-96122c3e5b.entry.js +1 -0
- package/dist/baloise-design-system/p-9ad648deea.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-5032cc512d.entry.js → p-9e60067798.entry.js} +1 -1
- package/dist/baloise-design-system/{p-ac5bae9bc0.entry.js → p-ad08b31d77.entry.js} +1 -1
- package/dist/baloise-design-system/{p-62b1464a63.entry.js → p-b29ff928d7.entry.js} +1 -1
- package/dist/baloise-design-system/p-c0e04c2072.system.entry.js +1 -0
- package/dist/baloise-design-system/{p-8e3818cabc.system.entry.js → p-c2ba4f2747.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-455872a1.system.js → p-c9b8e360.system.js} +1 -1
- package/dist/baloise-design-system/{p-d9be99b1f3.entry.js → p-d5e9b00c3a.entry.js} +1 -1
- package/dist/baloise-design-system/p-d7d8f1901f.entry.js +1 -0
- package/dist/baloise-design-system/{p-d34610d0b3.system.entry.js → p-da7b998034.system.entry.js} +1 -1
- package/dist/baloise-design-system/{p-41dc0f2a79.system.entry.js → p-e221899f60.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e53217f8.js +1 -1
- package/dist/baloise-design-system/{p-c24eef72ab.system.entry.js → p-e5ba3ccf78.system.entry.js} +1 -1
- package/dist/baloise-design-system/p-e9445f4362.entry.js +1 -0
- package/dist/baloise-design-system/{p-4ab7dd0d1e.entry.js → p-ebcb6393d4.entry.js} +1 -1
- package/dist/baloise-design-system/{p-272b503d.system.js → p-f7a3e1be.system.js} +1 -1
- package/dist/baloise-design-system/p-f7f06d0340.entry.js +1 -0
- package/dist/baloise-design-system/{p-aece54af.js → p-fb6a55d1.js} +1 -1
- package/dist/baloise-design-system/{p-e8e685e210.entry.js → p-fb880d2a58.entry.js} +1 -1
- package/dist/cjs/app-globals-25e25924.js +7 -0
- package/dist/cjs/bal-app.cjs.entry.js +1 -1
- package/dist/cjs/bal-carousel_2.cjs.entry.js +8 -5
- package/dist/cjs/bal-doc-app.cjs.entry.js +233 -0
- package/dist/cjs/bal-footer.cjs.entry.js +37 -10
- package/dist/cjs/bal-hint_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-list_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-logo.cjs.entry.js +3 -3
- package/dist/cjs/bal-nav_8.cjs.entry.js +3 -3
- package/dist/cjs/bal-navbar_5.cjs.entry.js +3 -3
- package/dist/cjs/bal-pagination.cjs.entry.js +3 -3
- package/dist/cjs/bal-progress-bar.cjs.entry.js +4 -4
- package/dist/cjs/bal-segment_2.cjs.entry.js +4 -4
- package/dist/cjs/bal-shape.cjs.entry.js +1 -1
- package/dist/cjs/bal-steps.cjs.entry.js +3 -3
- package/dist/cjs/bal-tab-item_2.cjs.entry.js +7 -6
- package/dist/cjs/baloise-design-system.cjs.js +3 -2
- package/dist/cjs/{breakpoints.decorator-ea5d7550.js → breakpoints.decorator-25a3cd48.js} +1 -1
- package/dist/cjs/{breakpoints.subject-235affbc.js → breakpoints.subject-282f1545.js} +1 -1
- package/dist/cjs/{app-globals-a3f2765f.js → global-85ebe098.js} +2 -4
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/initialize-367b85e5.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/{swiper.util-2c1a9dd3.js → swiper.util-abdf50f1.js} +25 -5
- package/dist/cjs/{tokens.esm-50d692f1.js → tokens.esm-e9f615df.js} +1 -1
- package/dist/cjs/{window-resize.decorator-af016113.js → window-resize.decorator-ac9f991f.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/bal-app/bal-app.css +1 -1
- package/dist/collection/components/bal-carousel/bal-carousel.js +4 -1
- package/dist/collection/components/bal-footer/bal-footer.css +1 -1
- package/dist/collection/components/bal-footer/bal-footer.i18n.js +32 -0
- package/dist/collection/components/bal-footer/bal-footer.js +4 -9
- package/dist/collection/components/bal-tabs/bal-tabs.js +3 -2
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.css +1 -0
- package/dist/collection/components/docs/bal-doc-app/bal-doc-app.js +247 -0
- package/dist/collection/utils/constants/version.constant.js +1 -1
- package/dist/collection/utils/swiper/swiper.util.js +25 -5
- package/dist/esm/app-globals-83570026.js +5 -0
- package/dist/esm/bal-app.entry.js +1 -1
- package/dist/esm/bal-carousel_2.entry.js +8 -5
- package/dist/esm/bal-doc-app.entry.js +229 -0
- package/dist/esm/bal-footer.entry.js +37 -10
- package/dist/esm/bal-hint_5.entry.js +3 -3
- package/dist/esm/bal-list_8.entry.js +3 -3
- package/dist/esm/bal-logo.entry.js +3 -3
- package/dist/esm/bal-nav_8.entry.js +3 -3
- package/dist/esm/bal-navbar_5.entry.js +3 -3
- package/dist/esm/bal-pagination.entry.js +3 -3
- package/dist/esm/bal-progress-bar.entry.js +4 -4
- package/dist/esm/bal-segment_2.entry.js +4 -4
- package/dist/esm/bal-shape.entry.js +1 -1
- package/dist/esm/bal-steps.entry.js +3 -3
- package/dist/esm/bal-tab-item_2.entry.js +7 -6
- package/dist/esm/baloise-design-system.js +3 -2
- package/dist/esm/{breakpoints.decorator-761b6833.js → breakpoints.decorator-d9f053c9.js} +1 -1
- package/dist/esm/{breakpoints.subject-55ab8bb6.js → breakpoints.subject-8e63b492.js} +1 -1
- package/dist/esm/{app-globals-92fef8fd.js → global-88c7b04e.js} +2 -4
- package/dist/esm/index.js +3 -3
- package/dist/esm/initialize-22c1bebc.js +1 -1
- package/dist/esm/loader.js +3 -2
- package/dist/esm/{swiper.util-3e090584.js → swiper.util-0589b550.js} +25 -5
- package/dist/esm/{tokens.esm-8a7ec399.js → tokens.esm-50d8cc25.js} +1 -1
- package/dist/esm/{window-resize.decorator-1dd80b10.js → window-resize.decorator-c1666a38.js} +1 -1
- package/dist/esm-es5/app-globals-83570026.js +1 -0
- package/dist/esm-es5/bal-app.entry.js +1 -1
- package/dist/esm-es5/bal-carousel_2.entry.js +1 -1
- package/dist/esm-es5/bal-doc-app.entry.js +1 -0
- package/dist/esm-es5/bal-footer.entry.js +1 -1
- package/dist/esm-es5/bal-hint_5.entry.js +1 -1
- package/dist/esm-es5/bal-list_8.entry.js +1 -1
- package/dist/esm-es5/bal-logo.entry.js +1 -1
- package/dist/esm-es5/bal-nav_8.entry.js +1 -1
- package/dist/esm-es5/bal-navbar_5.entry.js +1 -1
- package/dist/esm-es5/bal-pagination.entry.js +1 -1
- package/dist/esm-es5/bal-progress-bar.entry.js +1 -1
- package/dist/esm-es5/bal-segment_2.entry.js +1 -1
- package/dist/esm-es5/bal-shape.entry.js +1 -1
- package/dist/esm-es5/bal-steps.entry.js +1 -1
- package/dist/esm-es5/bal-tab-item_2.entry.js +1 -1
- package/dist/esm-es5/baloise-design-system.js +1 -1
- package/dist/esm-es5/breakpoints.decorator-d9f053c9.js +1 -0
- package/dist/esm-es5/{breakpoints.subject-55ab8bb6.js → breakpoints.subject-8e63b492.js} +1 -1
- package/dist/esm-es5/global-88c7b04e.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/initialize-22c1bebc.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/swiper.util-0589b550.js +1 -0
- package/dist/esm-es5/{window-resize.decorator-1dd80b10.js → window-resize.decorator-c1666a38.js} +1 -1
- package/dist/types/components/bal-carousel/bal-carousel.d.ts +1 -0
- package/dist/types/components/bal-footer/bal-footer.d.ts +0 -1
- package/dist/types/components/bal-footer/bal-footer.i18n.d.ts +5 -0
- package/dist/types/components/docs/bal-doc-app/bal-doc-app.d.ts +21 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/types/home/runner/work/design-system/design-system/packages/core/.stencil/packages/icons/src/index.d.ts +82 -0
- package/dist/types/utils/swiper/swiper.util.d.ts +2 -1
- package/package.json +7 -7
- package/dist/baloise-design-system/p-05986dc964.entry.js +0 -1
- package/dist/baloise-design-system/p-1050501432.entry.js +0 -1
- package/dist/baloise-design-system/p-12ff7815.js +0 -1
- package/dist/baloise-design-system/p-345ec2f4.system.js +0 -1
- package/dist/baloise-design-system/p-4d67c12e48.system.entry.js +0 -1
- package/dist/baloise-design-system/p-68e05bd5.js +0 -1
- package/dist/baloise-design-system/p-70f7b546.system.js +0 -1
- package/dist/baloise-design-system/p-757f93ffe9.entry.js +0 -1
- package/dist/baloise-design-system/p-8c564c0a3c.entry.js +0 -1
- package/dist/baloise-design-system/p-b7f9f79521.system.entry.js +0 -1
- package/dist/baloise-design-system/p-c42db517.js +0 -1
- package/dist/esm-es5/app-globals-92fef8fd.js +0 -1
- package/dist/esm-es5/breakpoints.decorator-761b6833.js +0 -1
- package/dist/esm-es5/swiper.util-3e090584.js +0 -1
- /package/dist/baloise-design-system/{p-210346c9.js → p-27728acd.js} +0 -0
- /package/dist/baloise-design-system/{p-b0fcd760.system.js → p-dfc275a4.system.js} +0 -0
- /package/dist/esm-es5/{tokens.esm-8a7ec399.js → tokens.esm-50d8cc25.js} +0 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
import { c as commonjsGlobal } from './_commonjsHelpers.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
5
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
6
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
7
|
+
* Released under MIT license <https://lodash.com/license>
|
|
8
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
9
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Used as references for various `Number` constants. */
|
|
13
|
+
var INFINITY = 1 / 0,
|
|
14
|
+
MAX_SAFE_INTEGER = 9007199254740991,
|
|
15
|
+
MAX_INTEGER = 1.7976931348623157e+308,
|
|
16
|
+
NAN = 0 / 0;
|
|
17
|
+
|
|
18
|
+
/** `Object#toString` result references. */
|
|
19
|
+
var symbolTag = '[object Symbol]';
|
|
20
|
+
|
|
21
|
+
/** Used to match leading and trailing whitespace. */
|
|
22
|
+
var reTrim = /^\s+|\s+$/g;
|
|
23
|
+
|
|
24
|
+
/** Used to detect bad signed hexadecimal string values. */
|
|
25
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
|
26
|
+
|
|
27
|
+
/** Used to detect binary string values. */
|
|
28
|
+
var reIsBinary = /^0b[01]+$/i;
|
|
29
|
+
|
|
30
|
+
/** Used to detect octal string values. */
|
|
31
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
|
32
|
+
|
|
33
|
+
/** Used to compose unicode character classes. */
|
|
34
|
+
var rsAstralRange = '\\ud800-\\udfff',
|
|
35
|
+
rsComboMarksRange = '\\u0300-\\u036f\\ufe20-\\ufe23',
|
|
36
|
+
rsComboSymbolsRange = '\\u20d0-\\u20f0',
|
|
37
|
+
rsVarRange = '\\ufe0e\\ufe0f';
|
|
38
|
+
|
|
39
|
+
/** Used to compose unicode capture groups. */
|
|
40
|
+
var rsAstral = '[' + rsAstralRange + ']',
|
|
41
|
+
rsCombo = '[' + rsComboMarksRange + rsComboSymbolsRange + ']',
|
|
42
|
+
rsFitz = '\\ud83c[\\udffb-\\udfff]',
|
|
43
|
+
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
|
|
44
|
+
rsNonAstral = '[^' + rsAstralRange + ']',
|
|
45
|
+
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
|
|
46
|
+
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
|
|
47
|
+
rsZWJ = '\\u200d';
|
|
48
|
+
|
|
49
|
+
/** Used to compose unicode regexes. */
|
|
50
|
+
var reOptMod = rsModifier + '?',
|
|
51
|
+
rsOptVar = '[' + rsVarRange + ']?',
|
|
52
|
+
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
|
|
53
|
+
rsSeq = rsOptVar + reOptMod + rsOptJoin,
|
|
54
|
+
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
|
|
55
|
+
|
|
56
|
+
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
|
|
57
|
+
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
|
|
58
|
+
|
|
59
|
+
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
|
|
60
|
+
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboMarksRange + rsComboSymbolsRange + rsVarRange + ']');
|
|
61
|
+
|
|
62
|
+
/** Built-in method references without a dependency on `root`. */
|
|
63
|
+
var freeParseInt = parseInt;
|
|
64
|
+
|
|
65
|
+
/** Detect free variable `global` from Node.js. */
|
|
66
|
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
67
|
+
|
|
68
|
+
/** Detect free variable `self`. */
|
|
69
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
70
|
+
|
|
71
|
+
/** Used as a reference to the global object. */
|
|
72
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Gets the size of an ASCII `string`.
|
|
76
|
+
*
|
|
77
|
+
* @private
|
|
78
|
+
* @param {string} string The string inspect.
|
|
79
|
+
* @returns {number} Returns the string size.
|
|
80
|
+
*/
|
|
81
|
+
var asciiSize = baseProperty('length');
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Converts an ASCII `string` to an array.
|
|
85
|
+
*
|
|
86
|
+
* @private
|
|
87
|
+
* @param {string} string The string to convert.
|
|
88
|
+
* @returns {Array} Returns the converted array.
|
|
89
|
+
*/
|
|
90
|
+
function asciiToArray(string) {
|
|
91
|
+
return string.split('');
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* The base implementation of `_.property` without support for deep paths.
|
|
96
|
+
*
|
|
97
|
+
* @private
|
|
98
|
+
* @param {string} key The key of the property to get.
|
|
99
|
+
* @returns {Function} Returns the new accessor function.
|
|
100
|
+
*/
|
|
101
|
+
function baseProperty(key) {
|
|
102
|
+
return function(object) {
|
|
103
|
+
return object == null ? undefined : object[key];
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Checks if `string` contains Unicode symbols.
|
|
109
|
+
*
|
|
110
|
+
* @private
|
|
111
|
+
* @param {string} string The string to inspect.
|
|
112
|
+
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
|
|
113
|
+
*/
|
|
114
|
+
function hasUnicode(string) {
|
|
115
|
+
return reHasUnicode.test(string);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Gets the number of symbols in `string`.
|
|
120
|
+
*
|
|
121
|
+
* @private
|
|
122
|
+
* @param {string} string The string to inspect.
|
|
123
|
+
* @returns {number} Returns the string size.
|
|
124
|
+
*/
|
|
125
|
+
function stringSize(string) {
|
|
126
|
+
return hasUnicode(string)
|
|
127
|
+
? unicodeSize(string)
|
|
128
|
+
: asciiSize(string);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Converts `string` to an array.
|
|
133
|
+
*
|
|
134
|
+
* @private
|
|
135
|
+
* @param {string} string The string to convert.
|
|
136
|
+
* @returns {Array} Returns the converted array.
|
|
137
|
+
*/
|
|
138
|
+
function stringToArray(string) {
|
|
139
|
+
return hasUnicode(string)
|
|
140
|
+
? unicodeToArray(string)
|
|
141
|
+
: asciiToArray(string);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Gets the size of a Unicode `string`.
|
|
146
|
+
*
|
|
147
|
+
* @private
|
|
148
|
+
* @param {string} string The string inspect.
|
|
149
|
+
* @returns {number} Returns the string size.
|
|
150
|
+
*/
|
|
151
|
+
function unicodeSize(string) {
|
|
152
|
+
var result = reUnicode.lastIndex = 0;
|
|
153
|
+
while (reUnicode.test(string)) {
|
|
154
|
+
result++;
|
|
155
|
+
}
|
|
156
|
+
return result;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Converts a Unicode `string` to an array.
|
|
161
|
+
*
|
|
162
|
+
* @private
|
|
163
|
+
* @param {string} string The string to convert.
|
|
164
|
+
* @returns {Array} Returns the converted array.
|
|
165
|
+
*/
|
|
166
|
+
function unicodeToArray(string) {
|
|
167
|
+
return string.match(reUnicode) || [];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/** Used for built-in method references. */
|
|
171
|
+
var objectProto = Object.prototype;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Used to resolve the
|
|
175
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
176
|
+
* of values.
|
|
177
|
+
*/
|
|
178
|
+
var objectToString = objectProto.toString;
|
|
179
|
+
|
|
180
|
+
/** Built-in value references. */
|
|
181
|
+
var Symbol = root.Symbol;
|
|
182
|
+
|
|
183
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
184
|
+
var nativeCeil = Math.ceil,
|
|
185
|
+
nativeFloor = Math.floor;
|
|
186
|
+
|
|
187
|
+
/** Used to convert symbols to primitives and strings. */
|
|
188
|
+
var symbolProto = Symbol ? Symbol.prototype : undefined,
|
|
189
|
+
symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The base implementation of `_.repeat` which doesn't coerce arguments.
|
|
193
|
+
*
|
|
194
|
+
* @private
|
|
195
|
+
* @param {string} string The string to repeat.
|
|
196
|
+
* @param {number} n The number of times to repeat the string.
|
|
197
|
+
* @returns {string} Returns the repeated string.
|
|
198
|
+
*/
|
|
199
|
+
function baseRepeat(string, n) {
|
|
200
|
+
var result = '';
|
|
201
|
+
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
|
|
202
|
+
return result;
|
|
203
|
+
}
|
|
204
|
+
// Leverage the exponentiation by squaring algorithm for a faster repeat.
|
|
205
|
+
// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
|
|
206
|
+
do {
|
|
207
|
+
if (n % 2) {
|
|
208
|
+
result += string;
|
|
209
|
+
}
|
|
210
|
+
n = nativeFloor(n / 2);
|
|
211
|
+
if (n) {
|
|
212
|
+
string += string;
|
|
213
|
+
}
|
|
214
|
+
} while (n);
|
|
215
|
+
|
|
216
|
+
return result;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* The base implementation of `_.slice` without an iteratee call guard.
|
|
221
|
+
*
|
|
222
|
+
* @private
|
|
223
|
+
* @param {Array} array The array to slice.
|
|
224
|
+
* @param {number} [start=0] The start position.
|
|
225
|
+
* @param {number} [end=array.length] The end position.
|
|
226
|
+
* @returns {Array} Returns the slice of `array`.
|
|
227
|
+
*/
|
|
228
|
+
function baseSlice(array, start, end) {
|
|
229
|
+
var index = -1,
|
|
230
|
+
length = array.length;
|
|
231
|
+
|
|
232
|
+
if (start < 0) {
|
|
233
|
+
start = -start > length ? 0 : (length + start);
|
|
234
|
+
}
|
|
235
|
+
end = end > length ? length : end;
|
|
236
|
+
if (end < 0) {
|
|
237
|
+
end += length;
|
|
238
|
+
}
|
|
239
|
+
length = start > end ? 0 : ((end - start) >>> 0);
|
|
240
|
+
start >>>= 0;
|
|
241
|
+
|
|
242
|
+
var result = Array(length);
|
|
243
|
+
while (++index < length) {
|
|
244
|
+
result[index] = array[index + start];
|
|
245
|
+
}
|
|
246
|
+
return result;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* The base implementation of `_.toString` which doesn't convert nullish
|
|
251
|
+
* values to empty strings.
|
|
252
|
+
*
|
|
253
|
+
* @private
|
|
254
|
+
* @param {*} value The value to process.
|
|
255
|
+
* @returns {string} Returns the string.
|
|
256
|
+
*/
|
|
257
|
+
function baseToString(value) {
|
|
258
|
+
// Exit early for strings to avoid a performance hit in some environments.
|
|
259
|
+
if (typeof value == 'string') {
|
|
260
|
+
return value;
|
|
261
|
+
}
|
|
262
|
+
if (isSymbol(value)) {
|
|
263
|
+
return symbolToString ? symbolToString.call(value) : '';
|
|
264
|
+
}
|
|
265
|
+
var result = (value + '');
|
|
266
|
+
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* Casts `array` to a slice if it's needed.
|
|
271
|
+
*
|
|
272
|
+
* @private
|
|
273
|
+
* @param {Array} array The array to inspect.
|
|
274
|
+
* @param {number} start The start position.
|
|
275
|
+
* @param {number} [end=array.length] The end position.
|
|
276
|
+
* @returns {Array} Returns the cast slice.
|
|
277
|
+
*/
|
|
278
|
+
function castSlice(array, start, end) {
|
|
279
|
+
var length = array.length;
|
|
280
|
+
end = end === undefined ? length : end;
|
|
281
|
+
return (!start && end >= length) ? array : baseSlice(array, start, end);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* Creates the padding for `string` based on `length`. The `chars` string
|
|
286
|
+
* is truncated if the number of characters exceeds `length`.
|
|
287
|
+
*
|
|
288
|
+
* @private
|
|
289
|
+
* @param {number} length The padding length.
|
|
290
|
+
* @param {string} [chars=' '] The string used as padding.
|
|
291
|
+
* @returns {string} Returns the padding for `string`.
|
|
292
|
+
*/
|
|
293
|
+
function createPadding(length, chars) {
|
|
294
|
+
chars = chars === undefined ? ' ' : baseToString(chars);
|
|
295
|
+
|
|
296
|
+
var charsLength = chars.length;
|
|
297
|
+
if (charsLength < 2) {
|
|
298
|
+
return charsLength ? baseRepeat(chars, length) : chars;
|
|
299
|
+
}
|
|
300
|
+
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
|
|
301
|
+
return hasUnicode(chars)
|
|
302
|
+
? castSlice(stringToArray(result), 0, length).join('')
|
|
303
|
+
: result.slice(0, length);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Checks if `value` is the
|
|
308
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
309
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
310
|
+
*
|
|
311
|
+
* @static
|
|
312
|
+
* @memberOf _
|
|
313
|
+
* @since 0.1.0
|
|
314
|
+
* @category Lang
|
|
315
|
+
* @param {*} value The value to check.
|
|
316
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
317
|
+
* @example
|
|
318
|
+
*
|
|
319
|
+
* _.isObject({});
|
|
320
|
+
* // => true
|
|
321
|
+
*
|
|
322
|
+
* _.isObject([1, 2, 3]);
|
|
323
|
+
* // => true
|
|
324
|
+
*
|
|
325
|
+
* _.isObject(_.noop);
|
|
326
|
+
* // => true
|
|
327
|
+
*
|
|
328
|
+
* _.isObject(null);
|
|
329
|
+
* // => false
|
|
330
|
+
*/
|
|
331
|
+
function isObject(value) {
|
|
332
|
+
var type = typeof value;
|
|
333
|
+
return !!value && (type == 'object' || type == 'function');
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
338
|
+
* and has a `typeof` result of "object".
|
|
339
|
+
*
|
|
340
|
+
* @static
|
|
341
|
+
* @memberOf _
|
|
342
|
+
* @since 4.0.0
|
|
343
|
+
* @category Lang
|
|
344
|
+
* @param {*} value The value to check.
|
|
345
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
346
|
+
* @example
|
|
347
|
+
*
|
|
348
|
+
* _.isObjectLike({});
|
|
349
|
+
* // => true
|
|
350
|
+
*
|
|
351
|
+
* _.isObjectLike([1, 2, 3]);
|
|
352
|
+
* // => true
|
|
353
|
+
*
|
|
354
|
+
* _.isObjectLike(_.noop);
|
|
355
|
+
* // => false
|
|
356
|
+
*
|
|
357
|
+
* _.isObjectLike(null);
|
|
358
|
+
* // => false
|
|
359
|
+
*/
|
|
360
|
+
function isObjectLike(value) {
|
|
361
|
+
return !!value && typeof value == 'object';
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Checks if `value` is classified as a `Symbol` primitive or object.
|
|
366
|
+
*
|
|
367
|
+
* @static
|
|
368
|
+
* @memberOf _
|
|
369
|
+
* @since 4.0.0
|
|
370
|
+
* @category Lang
|
|
371
|
+
* @param {*} value The value to check.
|
|
372
|
+
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
|
|
373
|
+
* @example
|
|
374
|
+
*
|
|
375
|
+
* _.isSymbol(Symbol.iterator);
|
|
376
|
+
* // => true
|
|
377
|
+
*
|
|
378
|
+
* _.isSymbol('abc');
|
|
379
|
+
* // => false
|
|
380
|
+
*/
|
|
381
|
+
function isSymbol(value) {
|
|
382
|
+
return typeof value == 'symbol' ||
|
|
383
|
+
(isObjectLike(value) && objectToString.call(value) == symbolTag);
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Converts `value` to a finite number.
|
|
388
|
+
*
|
|
389
|
+
* @static
|
|
390
|
+
* @memberOf _
|
|
391
|
+
* @since 4.12.0
|
|
392
|
+
* @category Lang
|
|
393
|
+
* @param {*} value The value to convert.
|
|
394
|
+
* @returns {number} Returns the converted number.
|
|
395
|
+
* @example
|
|
396
|
+
*
|
|
397
|
+
* _.toFinite(3.2);
|
|
398
|
+
* // => 3.2
|
|
399
|
+
*
|
|
400
|
+
* _.toFinite(Number.MIN_VALUE);
|
|
401
|
+
* // => 5e-324
|
|
402
|
+
*
|
|
403
|
+
* _.toFinite(Infinity);
|
|
404
|
+
* // => 1.7976931348623157e+308
|
|
405
|
+
*
|
|
406
|
+
* _.toFinite('3.2');
|
|
407
|
+
* // => 3.2
|
|
408
|
+
*/
|
|
409
|
+
function toFinite(value) {
|
|
410
|
+
if (!value) {
|
|
411
|
+
return value === 0 ? value : 0;
|
|
412
|
+
}
|
|
413
|
+
value = toNumber(value);
|
|
414
|
+
if (value === INFINITY || value === -INFINITY) {
|
|
415
|
+
var sign = (value < 0 ? -1 : 1);
|
|
416
|
+
return sign * MAX_INTEGER;
|
|
417
|
+
}
|
|
418
|
+
return value === value ? value : 0;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Converts `value` to an integer.
|
|
423
|
+
*
|
|
424
|
+
* **Note:** This method is loosely based on
|
|
425
|
+
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
|
|
426
|
+
*
|
|
427
|
+
* @static
|
|
428
|
+
* @memberOf _
|
|
429
|
+
* @since 4.0.0
|
|
430
|
+
* @category Lang
|
|
431
|
+
* @param {*} value The value to convert.
|
|
432
|
+
* @returns {number} Returns the converted integer.
|
|
433
|
+
* @example
|
|
434
|
+
*
|
|
435
|
+
* _.toInteger(3.2);
|
|
436
|
+
* // => 3
|
|
437
|
+
*
|
|
438
|
+
* _.toInteger(Number.MIN_VALUE);
|
|
439
|
+
* // => 0
|
|
440
|
+
*
|
|
441
|
+
* _.toInteger(Infinity);
|
|
442
|
+
* // => 1.7976931348623157e+308
|
|
443
|
+
*
|
|
444
|
+
* _.toInteger('3.2');
|
|
445
|
+
* // => 3
|
|
446
|
+
*/
|
|
447
|
+
function toInteger(value) {
|
|
448
|
+
var result = toFinite(value),
|
|
449
|
+
remainder = result % 1;
|
|
450
|
+
|
|
451
|
+
return result === result ? (remainder ? result - remainder : result) : 0;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
/**
|
|
455
|
+
* Converts `value` to a number.
|
|
456
|
+
*
|
|
457
|
+
* @static
|
|
458
|
+
* @memberOf _
|
|
459
|
+
* @since 4.0.0
|
|
460
|
+
* @category Lang
|
|
461
|
+
* @param {*} value The value to process.
|
|
462
|
+
* @returns {number} Returns the number.
|
|
463
|
+
* @example
|
|
464
|
+
*
|
|
465
|
+
* _.toNumber(3.2);
|
|
466
|
+
* // => 3.2
|
|
467
|
+
*
|
|
468
|
+
* _.toNumber(Number.MIN_VALUE);
|
|
469
|
+
* // => 5e-324
|
|
470
|
+
*
|
|
471
|
+
* _.toNumber(Infinity);
|
|
472
|
+
* // => Infinity
|
|
473
|
+
*
|
|
474
|
+
* _.toNumber('3.2');
|
|
475
|
+
* // => 3.2
|
|
476
|
+
*/
|
|
477
|
+
function toNumber(value) {
|
|
478
|
+
if (typeof value == 'number') {
|
|
479
|
+
return value;
|
|
480
|
+
}
|
|
481
|
+
if (isSymbol(value)) {
|
|
482
|
+
return NAN;
|
|
483
|
+
}
|
|
484
|
+
if (isObject(value)) {
|
|
485
|
+
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
|
|
486
|
+
value = isObject(other) ? (other + '') : other;
|
|
487
|
+
}
|
|
488
|
+
if (typeof value != 'string') {
|
|
489
|
+
return value === 0 ? value : +value;
|
|
490
|
+
}
|
|
491
|
+
value = value.replace(reTrim, '');
|
|
492
|
+
var isBinary = reIsBinary.test(value);
|
|
493
|
+
return (isBinary || reIsOctal.test(value))
|
|
494
|
+
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
|
|
495
|
+
: (reIsBadHex.test(value) ? NAN : +value);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/**
|
|
499
|
+
* Converts `value` to a string. An empty string is returned for `null`
|
|
500
|
+
* and `undefined` values. The sign of `-0` is preserved.
|
|
501
|
+
*
|
|
502
|
+
* @static
|
|
503
|
+
* @memberOf _
|
|
504
|
+
* @since 4.0.0
|
|
505
|
+
* @category Lang
|
|
506
|
+
* @param {*} value The value to process.
|
|
507
|
+
* @returns {string} Returns the string.
|
|
508
|
+
* @example
|
|
509
|
+
*
|
|
510
|
+
* _.toString(null);
|
|
511
|
+
* // => ''
|
|
512
|
+
*
|
|
513
|
+
* _.toString(-0);
|
|
514
|
+
* // => '-0'
|
|
515
|
+
*
|
|
516
|
+
* _.toString([1, 2, 3]);
|
|
517
|
+
* // => '1,2,3'
|
|
518
|
+
*/
|
|
519
|
+
function toString(value) {
|
|
520
|
+
return value == null ? '' : baseToString(value);
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/**
|
|
524
|
+
* Pads `string` on the left side if it's shorter than `length`. Padding
|
|
525
|
+
* characters are truncated if they exceed `length`.
|
|
526
|
+
*
|
|
527
|
+
* @static
|
|
528
|
+
* @memberOf _
|
|
529
|
+
* @since 4.0.0
|
|
530
|
+
* @category String
|
|
531
|
+
* @param {string} [string=''] The string to pad.
|
|
532
|
+
* @param {number} [length=0] The padding length.
|
|
533
|
+
* @param {string} [chars=' '] The string used as padding.
|
|
534
|
+
* @returns {string} Returns the padded string.
|
|
535
|
+
* @example
|
|
536
|
+
*
|
|
537
|
+
* _.padStart('abc', 6);
|
|
538
|
+
* // => ' abc'
|
|
539
|
+
*
|
|
540
|
+
* _.padStart('abc', 6, '_-');
|
|
541
|
+
* // => '_-_abc'
|
|
542
|
+
*
|
|
543
|
+
* _.padStart('abc', 3);
|
|
544
|
+
* // => 'abc'
|
|
545
|
+
*/
|
|
546
|
+
function padStart(string, length, chars) {
|
|
547
|
+
string = toString(string);
|
|
548
|
+
length = toInteger(length);
|
|
549
|
+
|
|
550
|
+
var strLength = length ? stringSize(string) : 0;
|
|
551
|
+
return (length && strLength < length)
|
|
552
|
+
? (createPadding(length - strLength, chars) + string)
|
|
553
|
+
: string;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
var lodash_padstart = padStart;
|
|
557
|
+
|
|
558
|
+
export { lodash_padstart as l };
|