@xplortech/apollo-core 1.0.0-beta.5 → 1.0.0-beta.6
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/style.css +1 -1
- package/dist/apollo-core/apollo-core.css +9 -5841
- package/dist/apollo-core/apollo-core.esm.js +1 -125
- package/dist/apollo-core/index.esm.js +0 -1
- package/dist/apollo-core/p-ee16942f.entry.js +1 -0
- package/dist/cjs/apollo-core.cjs.js +4 -112
- package/dist/cjs/index.cjs.js +0 -1
- package/dist/cjs/loader.cjs.js +2 -18
- package/dist/cjs/xpl-application-shell.cjs.entry.js +1 -1
- package/dist/cjs/xpl-avatar_12.cjs.entry.js +17 -17
- package/dist/cjs/xpl-backdrop.cjs.entry.js +1 -1
- package/dist/cjs/xpl-button-row.cjs.entry.js +1 -1
- package/dist/cjs/xpl-choicelist.cjs.entry.js +1 -1
- package/dist/cjs/xpl-divider.cjs.entry.js +1 -1
- package/dist/cjs/xpl-dropdown-group_3.cjs.entry.js +4 -1
- package/dist/cjs/xpl-dropdown_2.cjs.entry.js +1 -2
- package/dist/cjs/xpl-grid-item.cjs.entry.js +1 -1
- package/dist/cjs/xpl-grid.cjs.entry.js +1 -1
- package/dist/cjs/xpl-input.cjs.entry.js +4 -21
- package/dist/cjs/xpl-list.cjs.entry.js +2 -2
- package/dist/cjs/xpl-main-nav.cjs.entry.js +1 -1
- package/dist/cjs/xpl-pagination.cjs.entry.js +1 -1
- package/dist/cjs/xpl-select.cjs.entry.js +3 -44
- package/dist/cjs/xpl-toggle.cjs.entry.js +3 -3
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/xpl-choicelist/choice.js +1 -0
- package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +3 -3
- package/dist/collection/components/xpl-dropdown/dropdownoption.js +1 -0
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.js +2 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown-option/xpl-dropdown-option.js +4 -1
- package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +16 -8
- package/dist/collection/components/xpl-list/listitem.js +1 -0
- package/dist/collection/components/xpl-list/xpl-list.js +2 -2
- package/dist/collection/components/xpl-select/selectchoice.js +1 -0
- package/dist/collection/components/xpl-select/xpl-select.js +2 -1
- package/dist/collection/components/xpl-table/xpl-table.js +17 -17
- package/dist/custom-elements/index.js +23 -604
- package/dist/esm/apollo-core.js +4 -112
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +2 -18
- package/dist/esm/xpl-application-shell.entry.js +1 -1
- package/dist/esm/xpl-avatar_12.entry.js +17 -17
- package/dist/esm/xpl-backdrop.entry.js +1 -1
- package/dist/esm/xpl-button-row.entry.js +1 -1
- package/dist/esm/xpl-choicelist.entry.js +1 -1
- package/dist/esm/xpl-divider.entry.js +1 -1
- package/dist/esm/xpl-dropdown-group_3.entry.js +4 -1
- package/dist/esm/xpl-dropdown_2.entry.js +1 -2
- package/dist/esm/xpl-grid-item.entry.js +1 -1
- package/dist/esm/xpl-grid.entry.js +1 -1
- package/dist/esm/xpl-input.entry.js +3 -20
- package/dist/esm/xpl-list.entry.js +2 -2
- package/dist/esm/xpl-main-nav.entry.js +1 -1
- package/dist/esm/xpl-pagination.entry.js +1 -1
- package/dist/esm/xpl-select.entry.js +2 -43
- package/dist/esm/xpl-toggle.entry.js +2 -2
- package/dist/types/components/xpl-choicelist/choice.d.ts +5 -5
- package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +2 -1
- package/dist/types/components/xpl-dropdown/dropdownoption.d.ts +8 -10
- package/dist/types/components/xpl-dropdown/xpl-dropdown-group/xpl-dropdown-group.d.ts +1 -0
- package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +6 -4
- package/dist/types/components/xpl-list/listitem.d.ts +15 -19
- package/dist/types/components/xpl-list/xpl-list.d.ts +1 -0
- package/dist/types/components/xpl-select/selectchoice.d.ts +3 -2
- package/dist/types/components/xpl-select/xpl-select.d.ts +1 -0
- package/dist/types/components/xpl-table/xpl-table.d.ts +5 -6
- package/dist/types/components.d.ts +17 -6
- package/package.json +2 -2
- package/dist/apollo-core/app-globals-0f993ce5.js +0 -3
- package/dist/apollo-core/css-shim-bbdf0cc6.js +0 -4
- package/dist/apollo-core/dom-1f98a75f.js +0 -73
- package/dist/apollo-core/index-5b4a209e.js +0 -2938
- package/dist/apollo-core/index-912d1a21.js +0 -584
- package/dist/apollo-core/p-50eb8239.entry.js +0 -1
- package/dist/apollo-core/regular-133c23b5.js +0 -16052
- package/dist/apollo-core/shadow-css-67b66845.js +0 -389
- package/dist/apollo-core/xpl-application-shell.entry.js +0 -60
- package/dist/apollo-core/xpl-avatar.entry.js +0 -19
- package/dist/apollo-core/xpl-backdrop.entry.js +0 -21
- package/dist/apollo-core/xpl-badge.entry.js +0 -17
- package/dist/apollo-core/xpl-breadcrumb-item.entry.js +0 -17
- package/dist/apollo-core/xpl-breadcrumbs.entry.js +0 -12
- package/dist/apollo-core/xpl-button-row.entry.js +0 -18
- package/dist/apollo-core/xpl-button.entry.js +0 -60
- package/dist/apollo-core/xpl-checkbox.entry.js +0 -25
- package/dist/apollo-core/xpl-choicelist.entry.js +0 -39
- package/dist/apollo-core/xpl-content-area.entry.js +0 -16
- package/dist/apollo-core/xpl-divider.entry.js +0 -14
- package/dist/apollo-core/xpl-dropdown-group.entry.js +0 -31
- package/dist/apollo-core/xpl-dropdown-heading.entry.js +0 -12
- package/dist/apollo-core/xpl-dropdown-option.entry.js +0 -61
- package/dist/apollo-core/xpl-dropdown.entry.js +0 -104
- package/dist/apollo-core/xpl-grid-item.entry.js +0 -21
- package/dist/apollo-core/xpl-grid.entry.js +0 -31
- package/dist/apollo-core/xpl-input.entry.js +0 -2547
- package/dist/apollo-core/xpl-list.entry.js +0 -57
- package/dist/apollo-core/xpl-main-nav.entry.js +0 -26
- package/dist/apollo-core/xpl-nav-item.entry.js +0 -26
- package/dist/apollo-core/xpl-pagination.entry.js +0 -72
- package/dist/apollo-core/xpl-radio.entry.js +0 -25
- package/dist/apollo-core/xpl-secondary-nav.entry.js +0 -12
- package/dist/apollo-core/xpl-select.entry.js +0 -662
- package/dist/apollo-core/xpl-table.entry.js +0 -91
- package/dist/apollo-core/xpl-tag.entry.js +0 -17
- package/dist/apollo-core/xpl-toggle.entry.js +0 -30
- package/dist/apollo-core/xpl-utility-bar.entry.js +0 -27
- package/dist/cjs/app-globals-3a1e7e63.js +0 -5
- package/dist/cjs/css-shim-a7379e2b.js +0 -6
- package/dist/cjs/dom-3e7d9c3b.js +0 -75
- package/dist/cjs/index-318d5fc7.js +0 -586
- package/dist/cjs/index-88e58962.js +0 -2975
- package/dist/cjs/regular-503465f4.js +0 -16054
- package/dist/cjs/shadow-css-09555044.js +0 -391
- package/dist/cjs/xpl-avatar.cjs.entry.js +0 -23
- package/dist/cjs/xpl-badge.cjs.entry.js +0 -21
- package/dist/cjs/xpl-breadcrumb-item.cjs.entry.js +0 -21
- package/dist/cjs/xpl-breadcrumbs.cjs.entry.js +0 -16
- package/dist/cjs/xpl-button.cjs.entry.js +0 -64
- package/dist/cjs/xpl-checkbox.cjs.entry.js +0 -29
- package/dist/cjs/xpl-content-area.cjs.entry.js +0 -20
- package/dist/cjs/xpl-dropdown-group.cjs.entry.js +0 -35
- package/dist/cjs/xpl-dropdown-heading.cjs.entry.js +0 -16
- package/dist/cjs/xpl-dropdown-option.cjs.entry.js +0 -65
- package/dist/cjs/xpl-dropdown.cjs.entry.js +0 -108
- package/dist/cjs/xpl-nav-item.cjs.entry.js +0 -30
- package/dist/cjs/xpl-radio.cjs.entry.js +0 -29
- package/dist/cjs/xpl-secondary-nav.cjs.entry.js +0 -16
- package/dist/cjs/xpl-table.cjs.entry.js +0 -95
- package/dist/cjs/xpl-tag.cjs.entry.js +0 -21
- package/dist/cjs/xpl-utility-bar.cjs.entry.js +0 -31
- package/dist/esm/app-globals-0f993ce5.js +0 -3
- package/dist/esm/css-shim-bbdf0cc6.js +0 -4
- package/dist/esm/dom-1f98a75f.js +0 -73
- package/dist/esm/index-5b4a209e.js +0 -2938
- package/dist/esm/index-912d1a21.js +0 -584
- package/dist/esm/regular-133c23b5.js +0 -16052
- package/dist/esm/shadow-css-67b66845.js +0 -389
- package/dist/esm/xpl-avatar.entry.js +0 -19
- package/dist/esm/xpl-badge.entry.js +0 -17
- package/dist/esm/xpl-breadcrumb-item.entry.js +0 -17
- package/dist/esm/xpl-breadcrumbs.entry.js +0 -12
- package/dist/esm/xpl-button.entry.js +0 -60
- package/dist/esm/xpl-checkbox.entry.js +0 -25
- package/dist/esm/xpl-content-area.entry.js +0 -16
- package/dist/esm/xpl-dropdown-group.entry.js +0 -31
- package/dist/esm/xpl-dropdown-heading.entry.js +0 -12
- package/dist/esm/xpl-dropdown-option.entry.js +0 -61
- package/dist/esm/xpl-dropdown.entry.js +0 -104
- package/dist/esm/xpl-nav-item.entry.js +0 -26
- package/dist/esm/xpl-radio.entry.js +0 -25
- package/dist/esm/xpl-secondary-nav.entry.js +0 -12
- package/dist/esm/xpl-table.entry.js +0 -91
- package/dist/esm/xpl-tag.entry.js +0 -17
- package/dist/esm/xpl-utility-bar.entry.js +0 -27
|
@@ -1,584 +0,0 @@
|
|
|
1
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
2
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
3
|
-
// generators (like Math.random()).
|
|
4
|
-
var getRandomValues;
|
|
5
|
-
var rnds8 = new Uint8Array(16);
|
|
6
|
-
function rng() {
|
|
7
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
8
|
-
if (!getRandomValues) {
|
|
9
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
|
|
10
|
-
// find the complete implementation of crypto (msCrypto) on IE11.
|
|
11
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
|
|
12
|
-
|
|
13
|
-
if (!getRandomValues) {
|
|
14
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return getRandomValues(rnds8);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const REGEX = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
22
|
-
|
|
23
|
-
function validate(uuid) {
|
|
24
|
-
return typeof uuid === 'string' && REGEX.test(uuid);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
29
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
var byteToHex = [];
|
|
33
|
-
|
|
34
|
-
for (var i = 0; i < 256; ++i) {
|
|
35
|
-
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function stringify(arr) {
|
|
39
|
-
var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
40
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
41
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
42
|
-
var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
43
|
-
// of the following:
|
|
44
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
45
|
-
// "undefined" in the uuid)
|
|
46
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
47
|
-
|
|
48
|
-
if (!validate(uuid)) {
|
|
49
|
-
throw TypeError('Stringified UUID is invalid');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return uuid;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
// Inspired by https://github.com/LiosK/UUID.js
|
|
57
|
-
// and http://docs.python.org/library/uuid.html
|
|
58
|
-
|
|
59
|
-
var _nodeId;
|
|
60
|
-
|
|
61
|
-
var _clockseq; // Previous uuid creation time
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
var _lastMSecs = 0;
|
|
65
|
-
var _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
|
|
66
|
-
|
|
67
|
-
function v1(options, buf, offset) {
|
|
68
|
-
var i = buf && offset || 0;
|
|
69
|
-
var b = buf || new Array(16);
|
|
70
|
-
options = options || {};
|
|
71
|
-
var node = options.node || _nodeId;
|
|
72
|
-
var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
|
|
73
|
-
// specified. We do this lazily to minimize issues related to insufficient
|
|
74
|
-
// system entropy. See #189
|
|
75
|
-
|
|
76
|
-
if (node == null || clockseq == null) {
|
|
77
|
-
var seedBytes = options.random || (options.rng || rng)();
|
|
78
|
-
|
|
79
|
-
if (node == null) {
|
|
80
|
-
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
81
|
-
node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (clockseq == null) {
|
|
85
|
-
// Per 4.2.2, randomize (14 bit) clockseq
|
|
86
|
-
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
|
87
|
-
}
|
|
88
|
-
} // UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
|
89
|
-
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
|
90
|
-
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
|
91
|
-
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
95
|
-
// cycle to simulate higher resolution clock
|
|
96
|
-
|
|
97
|
-
var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
|
|
98
|
-
|
|
99
|
-
var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
|
|
100
|
-
|
|
101
|
-
if (dt < 0 && options.clockseq === undefined) {
|
|
102
|
-
clockseq = clockseq + 1 & 0x3fff;
|
|
103
|
-
} // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
|
104
|
-
// time interval
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
108
|
-
nsecs = 0;
|
|
109
|
-
} // Per 4.2.1.2 Throw error if too many uuids are requested
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (nsecs >= 10000) {
|
|
113
|
-
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
_lastMSecs = msecs;
|
|
117
|
-
_lastNSecs = nsecs;
|
|
118
|
-
_clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
|
119
|
-
|
|
120
|
-
msecs += 12219292800000; // `time_low`
|
|
121
|
-
|
|
122
|
-
var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
123
|
-
b[i++] = tl >>> 24 & 0xff;
|
|
124
|
-
b[i++] = tl >>> 16 & 0xff;
|
|
125
|
-
b[i++] = tl >>> 8 & 0xff;
|
|
126
|
-
b[i++] = tl & 0xff; // `time_mid`
|
|
127
|
-
|
|
128
|
-
var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
|
|
129
|
-
b[i++] = tmh >>> 8 & 0xff;
|
|
130
|
-
b[i++] = tmh & 0xff; // `time_high_and_version`
|
|
131
|
-
|
|
132
|
-
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
|
133
|
-
|
|
134
|
-
b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
|
135
|
-
|
|
136
|
-
b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
|
|
137
|
-
|
|
138
|
-
b[i++] = clockseq & 0xff; // `node`
|
|
139
|
-
|
|
140
|
-
for (var n = 0; n < 6; ++n) {
|
|
141
|
-
b[i + n] = node[n];
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return buf || stringify(b);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function parse(uuid) {
|
|
148
|
-
if (!validate(uuid)) {
|
|
149
|
-
throw TypeError('Invalid UUID');
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
var v;
|
|
153
|
-
var arr = new Uint8Array(16); // Parse ########-....-....-....-............
|
|
154
|
-
|
|
155
|
-
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
|
156
|
-
arr[1] = v >>> 16 & 0xff;
|
|
157
|
-
arr[2] = v >>> 8 & 0xff;
|
|
158
|
-
arr[3] = v & 0xff; // Parse ........-####-....-....-............
|
|
159
|
-
|
|
160
|
-
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
|
161
|
-
arr[5] = v & 0xff; // Parse ........-....-####-....-............
|
|
162
|
-
|
|
163
|
-
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
|
164
|
-
arr[7] = v & 0xff; // Parse ........-....-....-####-............
|
|
165
|
-
|
|
166
|
-
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
|
167
|
-
arr[9] = v & 0xff; // Parse ........-....-....-....-############
|
|
168
|
-
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
|
|
169
|
-
|
|
170
|
-
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
|
171
|
-
arr[11] = v / 0x100000000 & 0xff;
|
|
172
|
-
arr[12] = v >>> 24 & 0xff;
|
|
173
|
-
arr[13] = v >>> 16 & 0xff;
|
|
174
|
-
arr[14] = v >>> 8 & 0xff;
|
|
175
|
-
arr[15] = v & 0xff;
|
|
176
|
-
return arr;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
function stringToBytes(str) {
|
|
180
|
-
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
|
181
|
-
|
|
182
|
-
var bytes = [];
|
|
183
|
-
|
|
184
|
-
for (var i = 0; i < str.length; ++i) {
|
|
185
|
-
bytes.push(str.charCodeAt(i));
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
return bytes;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
192
|
-
var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
193
|
-
function v35 (name, version, hashfunc) {
|
|
194
|
-
function generateUUID(value, namespace, buf, offset) {
|
|
195
|
-
if (typeof value === 'string') {
|
|
196
|
-
value = stringToBytes(value);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
if (typeof namespace === 'string') {
|
|
200
|
-
namespace = parse(namespace);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
if (namespace.length !== 16) {
|
|
204
|
-
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
|
205
|
-
} // Compute hash of namespace and value, Per 4.3
|
|
206
|
-
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
|
|
207
|
-
// hashfunc([...namespace, ... value])`
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
var bytes = new Uint8Array(16 + value.length);
|
|
211
|
-
bytes.set(namespace);
|
|
212
|
-
bytes.set(value, namespace.length);
|
|
213
|
-
bytes = hashfunc(bytes);
|
|
214
|
-
bytes[6] = bytes[6] & 0x0f | version;
|
|
215
|
-
bytes[8] = bytes[8] & 0x3f | 0x80;
|
|
216
|
-
|
|
217
|
-
if (buf) {
|
|
218
|
-
offset = offset || 0;
|
|
219
|
-
|
|
220
|
-
for (var i = 0; i < 16; ++i) {
|
|
221
|
-
buf[offset + i] = bytes[i];
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
return buf;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return stringify(bytes);
|
|
228
|
-
} // Function#name is not settable on some platforms (#270)
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
try {
|
|
232
|
-
generateUUID.name = name; // eslint-disable-next-line no-empty
|
|
233
|
-
} catch (err) {} // For CommonJS default export support
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
generateUUID.DNS = DNS;
|
|
237
|
-
generateUUID.URL = URL;
|
|
238
|
-
return generateUUID;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/*
|
|
242
|
-
* Browser-compatible JavaScript MD5
|
|
243
|
-
*
|
|
244
|
-
* Modification of JavaScript MD5
|
|
245
|
-
* https://github.com/blueimp/JavaScript-MD5
|
|
246
|
-
*
|
|
247
|
-
* Copyright 2011, Sebastian Tschan
|
|
248
|
-
* https://blueimp.net
|
|
249
|
-
*
|
|
250
|
-
* Licensed under the MIT license:
|
|
251
|
-
* https://opensource.org/licenses/MIT
|
|
252
|
-
*
|
|
253
|
-
* Based on
|
|
254
|
-
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
|
255
|
-
* Digest Algorithm, as defined in RFC 1321.
|
|
256
|
-
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
|
|
257
|
-
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
|
258
|
-
* Distributed under the BSD License
|
|
259
|
-
* See http://pajhome.org.uk/crypt/md5 for more info.
|
|
260
|
-
*/
|
|
261
|
-
function md5(bytes) {
|
|
262
|
-
if (typeof bytes === 'string') {
|
|
263
|
-
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
|
|
264
|
-
|
|
265
|
-
bytes = new Uint8Array(msg.length);
|
|
266
|
-
|
|
267
|
-
for (var i = 0; i < msg.length; ++i) {
|
|
268
|
-
bytes[i] = msg.charCodeAt(i);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
|
|
273
|
-
}
|
|
274
|
-
/*
|
|
275
|
-
* Convert an array of little-endian words to an array of bytes
|
|
276
|
-
*/
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
function md5ToHexEncodedArray(input) {
|
|
280
|
-
var output = [];
|
|
281
|
-
var length32 = input.length * 32;
|
|
282
|
-
var hexTab = '0123456789abcdef';
|
|
283
|
-
|
|
284
|
-
for (var i = 0; i < length32; i += 8) {
|
|
285
|
-
var x = input[i >> 5] >>> i % 32 & 0xff;
|
|
286
|
-
var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
|
|
287
|
-
output.push(hex);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
return output;
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Calculate output length with padding and bit length
|
|
294
|
-
*/
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
function getOutputLength(inputLength8) {
|
|
298
|
-
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
|
|
299
|
-
}
|
|
300
|
-
/*
|
|
301
|
-
* Calculate the MD5 of an array of little-endian words, and a bit length.
|
|
302
|
-
*/
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
function wordsToMd5(x, len) {
|
|
306
|
-
/* append padding */
|
|
307
|
-
x[len >> 5] |= 0x80 << len % 32;
|
|
308
|
-
x[getOutputLength(len) - 1] = len;
|
|
309
|
-
var a = 1732584193;
|
|
310
|
-
var b = -271733879;
|
|
311
|
-
var c = -1732584194;
|
|
312
|
-
var d = 271733878;
|
|
313
|
-
|
|
314
|
-
for (var i = 0; i < x.length; i += 16) {
|
|
315
|
-
var olda = a;
|
|
316
|
-
var oldb = b;
|
|
317
|
-
var oldc = c;
|
|
318
|
-
var oldd = d;
|
|
319
|
-
a = md5ff(a, b, c, d, x[i], 7, -680876936);
|
|
320
|
-
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
|
|
321
|
-
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
|
|
322
|
-
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
|
|
323
|
-
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
|
|
324
|
-
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
|
|
325
|
-
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
|
|
326
|
-
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
|
|
327
|
-
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
|
|
328
|
-
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
|
|
329
|
-
c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
|
|
330
|
-
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
|
|
331
|
-
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
|
|
332
|
-
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
|
|
333
|
-
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
|
|
334
|
-
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
|
|
335
|
-
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
|
|
336
|
-
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
|
|
337
|
-
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
|
|
338
|
-
b = md5gg(b, c, d, a, x[i], 20, -373897302);
|
|
339
|
-
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
|
|
340
|
-
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
|
|
341
|
-
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
|
|
342
|
-
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
|
|
343
|
-
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
|
|
344
|
-
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
|
|
345
|
-
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
|
|
346
|
-
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
|
|
347
|
-
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
|
|
348
|
-
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
|
|
349
|
-
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
|
|
350
|
-
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
|
|
351
|
-
a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
|
|
352
|
-
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
|
|
353
|
-
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
|
|
354
|
-
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
|
|
355
|
-
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
|
|
356
|
-
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
|
|
357
|
-
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
|
|
358
|
-
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
|
|
359
|
-
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
|
|
360
|
-
d = md5hh(d, a, b, c, x[i], 11, -358537222);
|
|
361
|
-
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
|
|
362
|
-
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
|
|
363
|
-
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
|
|
364
|
-
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
|
|
365
|
-
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
|
|
366
|
-
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
|
|
367
|
-
a = md5ii(a, b, c, d, x[i], 6, -198630844);
|
|
368
|
-
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
|
|
369
|
-
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
|
|
370
|
-
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
|
|
371
|
-
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
|
|
372
|
-
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
|
|
373
|
-
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
|
|
374
|
-
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
|
|
375
|
-
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
|
|
376
|
-
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
|
|
377
|
-
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
|
|
378
|
-
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
|
|
379
|
-
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
|
|
380
|
-
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
|
|
381
|
-
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
|
|
382
|
-
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
|
|
383
|
-
a = safeAdd(a, olda);
|
|
384
|
-
b = safeAdd(b, oldb);
|
|
385
|
-
c = safeAdd(c, oldc);
|
|
386
|
-
d = safeAdd(d, oldd);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
return [a, b, c, d];
|
|
390
|
-
}
|
|
391
|
-
/*
|
|
392
|
-
* Convert an array bytes to an array of little-endian words
|
|
393
|
-
* Characters >255 have their high-byte silently ignored.
|
|
394
|
-
*/
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
function bytesToWords(input) {
|
|
398
|
-
if (input.length === 0) {
|
|
399
|
-
return [];
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
var length8 = input.length * 8;
|
|
403
|
-
var output = new Uint32Array(getOutputLength(length8));
|
|
404
|
-
|
|
405
|
-
for (var i = 0; i < length8; i += 8) {
|
|
406
|
-
output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
return output;
|
|
410
|
-
}
|
|
411
|
-
/*
|
|
412
|
-
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
|
|
413
|
-
* to work around bugs in some JS interpreters.
|
|
414
|
-
*/
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
function safeAdd(x, y) {
|
|
418
|
-
var lsw = (x & 0xffff) + (y & 0xffff);
|
|
419
|
-
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
|
420
|
-
return msw << 16 | lsw & 0xffff;
|
|
421
|
-
}
|
|
422
|
-
/*
|
|
423
|
-
* Bitwise rotate a 32-bit number to the left.
|
|
424
|
-
*/
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
function bitRotateLeft(num, cnt) {
|
|
428
|
-
return num << cnt | num >>> 32 - cnt;
|
|
429
|
-
}
|
|
430
|
-
/*
|
|
431
|
-
* These functions implement the four basic operations the algorithm uses.
|
|
432
|
-
*/
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
function md5cmn(q, a, b, x, s, t) {
|
|
436
|
-
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
function md5ff(a, b, c, d, x, s, t) {
|
|
440
|
-
return md5cmn(b & c | ~b & d, a, b, x, s, t);
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
function md5gg(a, b, c, d, x, s, t) {
|
|
444
|
-
return md5cmn(b & d | c & ~d, a, b, x, s, t);
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
function md5hh(a, b, c, d, x, s, t) {
|
|
448
|
-
return md5cmn(b ^ c ^ d, a, b, x, s, t);
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
function md5ii(a, b, c, d, x, s, t) {
|
|
452
|
-
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
var v3 = v35('v3', 0x30, md5);
|
|
456
|
-
|
|
457
|
-
function v4(options, buf, offset) {
|
|
458
|
-
options = options || {};
|
|
459
|
-
var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
460
|
-
|
|
461
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
462
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
463
|
-
|
|
464
|
-
if (buf) {
|
|
465
|
-
offset = offset || 0;
|
|
466
|
-
|
|
467
|
-
for (var i = 0; i < 16; ++i) {
|
|
468
|
-
buf[offset + i] = rnds[i];
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
return buf;
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
return stringify(rnds);
|
|
475
|
-
}
|
|
476
|
-
|
|
477
|
-
// Adapted from Chris Veness' SHA1 code at
|
|
478
|
-
// http://www.movable-type.co.uk/scripts/sha1.html
|
|
479
|
-
function f(s, x, y, z) {
|
|
480
|
-
switch (s) {
|
|
481
|
-
case 0:
|
|
482
|
-
return x & y ^ ~x & z;
|
|
483
|
-
|
|
484
|
-
case 1:
|
|
485
|
-
return x ^ y ^ z;
|
|
486
|
-
|
|
487
|
-
case 2:
|
|
488
|
-
return x & y ^ x & z ^ y & z;
|
|
489
|
-
|
|
490
|
-
case 3:
|
|
491
|
-
return x ^ y ^ z;
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
function ROTL(x, n) {
|
|
496
|
-
return x << n | x >>> 32 - n;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
function sha1(bytes) {
|
|
500
|
-
var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
|
|
501
|
-
var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];
|
|
502
|
-
|
|
503
|
-
if (typeof bytes === 'string') {
|
|
504
|
-
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
|
|
505
|
-
|
|
506
|
-
bytes = [];
|
|
507
|
-
|
|
508
|
-
for (var i = 0; i < msg.length; ++i) {
|
|
509
|
-
bytes.push(msg.charCodeAt(i));
|
|
510
|
-
}
|
|
511
|
-
} else if (!Array.isArray(bytes)) {
|
|
512
|
-
// Convert Array-like to Array
|
|
513
|
-
bytes = Array.prototype.slice.call(bytes);
|
|
514
|
-
}
|
|
515
|
-
|
|
516
|
-
bytes.push(0x80);
|
|
517
|
-
var l = bytes.length / 4 + 2;
|
|
518
|
-
var N = Math.ceil(l / 16);
|
|
519
|
-
var M = new Array(N);
|
|
520
|
-
|
|
521
|
-
for (var _i = 0; _i < N; ++_i) {
|
|
522
|
-
var arr = new Uint32Array(16);
|
|
523
|
-
|
|
524
|
-
for (var j = 0; j < 16; ++j) {
|
|
525
|
-
arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
M[_i] = arr;
|
|
529
|
-
}
|
|
530
|
-
|
|
531
|
-
M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);
|
|
532
|
-
M[N - 1][14] = Math.floor(M[N - 1][14]);
|
|
533
|
-
M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;
|
|
534
|
-
|
|
535
|
-
for (var _i2 = 0; _i2 < N; ++_i2) {
|
|
536
|
-
var W = new Uint32Array(80);
|
|
537
|
-
|
|
538
|
-
for (var t = 0; t < 16; ++t) {
|
|
539
|
-
W[t] = M[_i2][t];
|
|
540
|
-
}
|
|
541
|
-
|
|
542
|
-
for (var _t = 16; _t < 80; ++_t) {
|
|
543
|
-
W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
var a = H[0];
|
|
547
|
-
var b = H[1];
|
|
548
|
-
var c = H[2];
|
|
549
|
-
var d = H[3];
|
|
550
|
-
var e = H[4];
|
|
551
|
-
|
|
552
|
-
for (var _t2 = 0; _t2 < 80; ++_t2) {
|
|
553
|
-
var s = Math.floor(_t2 / 20);
|
|
554
|
-
var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;
|
|
555
|
-
e = d;
|
|
556
|
-
d = c;
|
|
557
|
-
c = ROTL(b, 30) >>> 0;
|
|
558
|
-
b = a;
|
|
559
|
-
a = T;
|
|
560
|
-
}
|
|
561
|
-
|
|
562
|
-
H[0] = H[0] + a >>> 0;
|
|
563
|
-
H[1] = H[1] + b >>> 0;
|
|
564
|
-
H[2] = H[2] + c >>> 0;
|
|
565
|
-
H[3] = H[3] + d >>> 0;
|
|
566
|
-
H[4] = H[4] + e >>> 0;
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
var v5 = v35('v5', 0x50, sha1);
|
|
573
|
-
|
|
574
|
-
const nil = '00000000-0000-0000-0000-000000000000';
|
|
575
|
-
|
|
576
|
-
function version(uuid) {
|
|
577
|
-
if (!validate(uuid)) {
|
|
578
|
-
throw TypeError('Invalid UUID');
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
return parseInt(uuid.substr(14, 1), 16);
|
|
582
|
-
}
|
|
583
|
-
|
|
584
|
-
export { v4 as v };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as s,H as i,g as l,c as e}from"./p-d4aa2fa9.js";import{v as a}from"./p-ad90fe4d.js";const n=class{constructor(s){t(this,s),this.disabled=!1}render(){let t="xpl-avatar";this.size&&(t+=` xpl-avatar--${this.size}`),this.color&&(t+=` xpl-avatar--${this.color}`);const l=s("div",null,this.src?s("img",{alt:this.name,src:this.src}):s("div",{class:"xpl-avatar__placeholder"},s("slot",null)),this.status&&s("div",{class:`xpl-avatar__dot--${this.status}`}));return s(i,null,this.href&&!this.disabled?s("a",{href:this.href,class:t,target:this.target},l):s("div",this.href&&this.disabled?{class:t+" xpl-avatar--disabled"}:{class:t},l))}},r=class{constructor(s){t(this,s)}render(){let t="xpl-badge";return this.dot&&(t+=" xpl-badge--dot"),this.variant&&(t+=" xpl-badge--"+this.variant),s(i,null,s("div",{class:t},s("slot",null)))}},h=class{constructor(s){t(this,s),this.chevron='<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="chevron-right" class="svg-inline--fa fa-chevron-right fa-w-10" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512">\n <path fill="currentColor" d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"></path>\n </svg>\n '}render(){return s(i,{class:"xpl-breadcrumb-item",role:"listitem"},s("li",{role:"none"},s("slot",null)),s("span",{innerHTML:`${this.chevron}`}))}},c=class{constructor(s){t(this,s)}render(){return s(i,null,s("nav",{class:"xpl-breadcrumbs","aria-label":"Breadcrumb"},s("ol",{role:"list"},s("slot",null))))}},o=class{constructor(s){t(this,s),this.size="default",this.variant="primary",this.state="neutral"}componentDidRender(){const t=this.el.attributes,s=Object.keys(t).filter((s=>{const i=t[s].name;return!!i&&(i.includes("data-test")||i.includes("aria-"))})).reduce(((s,i)=>Object.assign(Object.assign({},s),{[t[i].name]:t[i].value})),{}),i=this.el.querySelector("button");Object.keys(s).forEach((t=>{i.setAttribute(t,s[t]),this.el.removeAttribute(t)}))}render(){let t=`xpl-button\n xpl-button--${this.size}\n xpl-button--${this.state}\n xpl-button--${this.variant}`;return this.iconOnly&&(t+=" xpl-button--icon-only"),this.fullWidth&&(t+=" xpl-button--full-width"),this.link&&this.disabled&&(t+=" xpl-button--link-disabled"),s(i,{class:t},this.link?s("slot",null):s("button",{disabled:this.disabled,name:this.name,type:this.type,value:this.value},s("slot",null)))}get el(){return l(this)}},d=class{constructor(s){t(this,s),this.checkboxChange=e(this,"checkboxChange",7),this.id=a()}render(){return s(i,{class:{"xpl-checkbox-radio-container":!0,styled:this.styled,disabled:this.disabled}},s("input",{class:"xpl-checkbox",type:"checkbox",checked:this.checked,disabled:this.disabled,id:this.id,indeterminate:this.indeterminate,onChange:()=>this.checkboxChange.emit(this.input.checked),name:this.name,ref:t=>this.input=t,required:this.required,value:this.value}),s("label",{class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},s("slot",null),this.description&&s("small",{class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)))}},p=class{constructor(s){t(this,s),this.size="wide"}render(){return s(i,null,s("main",{class:`xpl-content-area-wrapper xpl-content-area-wrapper__${this.size}`},s("div",{class:"xpl-content-area"},s("slot",null))))}},u=class{constructor(s){t(this,s),this.navOpen=e(this,"navOpen",7),this.navControl=!1}onNavToggle(){window.innerWidth<=640&&this.navOpen.emit(!1)}render(){return s(i,{class:"xpl-nav-item",role:"listitem",onClick:()=>{this.navControl&&this.onNavToggle()}},s("slot",{name:"link"},s("slot",{name:"icon"}),s("slot",null)))}},b=class{constructor(s){t(this,s),this.radioChange=e(this,"radioChange",7),this.id=a()}render(){return s(i,{class:{"xpl-checkbox-radio-container":!0,styled:this.styled,disabled:this.disabled}},s("input",{class:"xpl-radio",type:"radio",checked:this.checked,disabled:this.disabled,id:this.id,name:this.name,required:this.required,value:this.value,onChange:()=>this.radioChange.emit(!0)}),s("label",{class:{"xpl-label":!0,"xpl-label--disabled":this.disabled},htmlFor:this.id},s("slot",null),this.description&&s("small",{class:{"xpl-description":!0,"xpl-description--disabled":this.disabled}},this.description)))}},x=class{constructor(s){t(this,s)}render(){return s(i,{class:"xpl-secondary-nav"},s("nav",{"aria-label":"Secondary Nav"},s("slot",null)))}},v=class{constructor(s){t(this,s),this.tableSelect=e(this,"tableSelect",7),this.areAllSelected=!1,this.hasScrolled=!1,this.selectAll=t=>{const{target:s}=t;if(!(s instanceof HTMLInputElement))return;const{checked:i}=s;this.areAllSelected=i,this.selected=this.selected.map((()=>i)),this.onChange()},this.selectOne=(t,s)=>{const{target:i}=t;if(!(i instanceof HTMLInputElement))return;const{checked:l}=i;this.areAllSelected=!1,this.selected=this.selected.map(((t,i)=>i===s?l:t)),this.onChange()},this.onChange=()=>{this.tableSelect.emit({selected:this.selected,areAllSelected:this.areAllSelected})},this.onScroll=()=>{this.hasScrolled=this.container.scrollLeft>0},this.sortBy=(t,s=!0)=>{this.rowData.sort(((i,l)=>{const e=i[t],a=l[t];if("number"==typeof e&&"number"==typeof a){const t=s?1:-1;return e>a?t:-t}return-1})),this.rowData=Array.from(this.rowData),this.render()}}componentWillLoad(){this.areAllSelected=!1,this.rowData=void 0!==this.data?Array.from(this.data):[],this.selected=new Array(this.rowData.length).fill(!1)}render(){let t="xpl-table";return this.striped&&(t+=" xpl-table--striped"),this.freeze&&(t+=" xpl-table--freeze"),this.hasScrolled&&(t+=" xpl-table--has-scrolled"),s(i,null,s("div",{class:"xpl-table-container",onScroll:this.onScroll,ref:t=>this.container=t},s("table",{class:t},this.columns&&s("thead",null,this.columns.map(((t,i)=>s("th",null,this.multiselect&&0===i?s("label",{htmlFor:"__xpl-table-th"},s("input",{checked:this.areAllSelected,id:"__xpl-table-th",indeterminate:!this.areAllSelected&&this.selected.some((t=>t)),onChange:t=>{this.selectAll(t)},type:"checkbox"}),t):t)))),s("tbody",null,this.rowData.map(((t,i)=>s("tr",{class:this.selected&&this.selected[i]?"xpl-table-row-selected":""},t.map(((t,l)=>s("td",null,this.multiselect&&0===l?s("label",{htmlFor:"__xpl-table-row-"+i},s("input",{id:"__xpl-table-row-"+i,checked:this.selected[i],type:"checkbox",onChange:t=>this.selectOne(t,i)}),s("div",{innerHTML:t})):s("div",{innerHTML:t})))))))))))}},m=class{constructor(s){t(this,s),this.navOpen=e(this,"navOpen",7),this.open=!0,this.bars='\n <svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="bars" class="svg-inline--fa fa-bars fa-w-14 xpl-utility-nav__bars" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="currentColor" d="M16 132h416c8.837 0 16-7.163 16-16V76c0-8.837-7.163-16-16-16H16C7.163 60 0 67.163 0 76v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16zm0 160h416c8.837 0 16-7.163 16-16v-40c0-8.837-7.163-16-16-16H16c-8.837 0-16 7.163-16 16v40c0 8.837 7.163 16 16 16z"></path></svg>\n '}onNavToggle(){this.open=!this.open,this.navOpen.emit(this.open)}componentWillLoad(){this.open=void 0!==this.isNavOpenAtStartup?this.isNavOpenAtStartup:this.open}render(){return s(i,null,s("nav",{"aria-label":"utility navigation bar",class:"xpl-utility-bar"},this.navControl?s("div",null,s("button",{class:"xpl-utility-bar__nav-control",onClick:()=>this.onNavToggle(),innerHTML:`${this.bars}`}),s("slot",{name:"aside"})):s("slot",{name:"aside"}),s("slot",{name:"main"})))}};export{n as xpl_avatar,r as xpl_badge,h as xpl_breadcrumb_item,c as xpl_breadcrumbs,o as xpl_button,d as xpl_checkbox,p as xpl_content_area,u as xpl_nav_item,b as xpl_radio,x as xpl_secondary_nav,v as xpl_table,m as xpl_utility_bar}
|