@maggioli-design-system/mds-progress 2.1.1 → 2.2.1
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/dist/cjs/{index-db3031a9.js → index-1d846f7a.js} +91 -5
- package/dist/cjs/loader.cjs.js +3 -2
- package/dist/cjs/mds-progress.cjs.entry.js +1 -1
- package/dist/cjs/mds-progress.cjs.js +6 -2
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/mds-progress/mds-progress.css +1 -1
- package/dist/collection/dictionary/icon.js +3 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.js +1 -1
- package/dist/esm/{index-c2cf8238.js → index-b254472d.js} +91 -6
- package/dist/esm/loader.js +3 -2
- package/dist/esm/mds-progress.entry.js +1 -1
- package/dist/esm/mds-progress.js +3 -2
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm-es5/index-b254472d.js +2 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-progress.entry.js +1 -1
- package/dist/esm-es5/mds-progress.js +1 -1
- package/dist/mds-progress/mds-progress.esm.js +1 -1
- package/dist/mds-progress/mds-progress.js +1 -1
- package/dist/mds-progress/p-86f204e8.system.js +2 -0
- package/dist/mds-progress/{p-5109fda1.system.entry.js → p-8e872f12.system.entry.js} +1 -1
- package/dist/mds-progress/p-ae3a1868.system.js +1 -0
- package/dist/mds-progress/{p-70726ba7.entry.js → p-b46a06eb.entry.js} +1 -1
- package/dist/mds-progress/p-d657b3ae.js +2 -0
- package/dist/stats.json +53 -26
- package/dist/types/components/mds-progress/meta/types.d.ts +1 -1
- package/dist/types/dictionary/icon.d.ts +2 -1
- package/dist/types/stencil-public-runtime.d.ts +59 -3
- package/dist/types/types/autocomplete.d.ts +2 -2
- package/dist/types/types/button.d.ts +4 -4
- package/dist/types/types/floating-ui.d.ts +2 -2
- package/dist/types/types/form-rel.d.ts +1 -1
- package/dist/types/types/input-text-type.d.ts +1 -1
- package/dist/types/types/input-value-type.d.ts +1 -1
- package/dist/types/types/loading.d.ts +1 -1
- package/dist/types/types/typography.d.ts +8 -8
- package/dist/types/types/variant.d.ts +10 -10
- package/loader/index.d.ts +9 -0
- package/package.json +4 -4
- package/readme.md +11 -0
- package/src/components/mds-progress/mds-progress.css +1 -1
- package/src/components/mds-progress/readme.md +11 -0
- package/src/components/mds-progress/test/mds-progress.e2e.ts +1 -1
- package/src/dictionary/icon.ts +4 -0
- package/src/fixtures/icons.json +176 -0
- package/src/fixtures/iconsauce.json +175 -0
- package/www/build/mds-progress.esm.js +1 -1
- package/www/build/mds-progress.js +1 -1
- package/www/build/p-86f204e8.system.js +2 -0
- package/www/build/{p-5109fda1.system.entry.js → p-8e872f12.system.entry.js} +1 -1
- package/www/build/p-ae3a1868.system.js +1 -0
- package/www/build/{p-70726ba7.entry.js → p-b46a06eb.entry.js} +1 -1
- package/www/build/p-d657b3ae.js +2 -0
- package/dist/esm-es5/index-c2cf8238.js +0 -2
- package/dist/mds-progress/p-2301a024.system.js +0 -1
- package/dist/mds-progress/p-763baf47.js +0 -2
- package/dist/mds-progress/p-c94616ee.system.js +0 -2
- package/www/build/p-2301a024.system.js +0 -1
- package/www/build/p-763baf47.js +0 -2
- package/www/build/p-c94616ee.system.js +0 -2
|
@@ -48,7 +48,7 @@ const uniqueTime = (key, measureText) => {
|
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
|
-
const HYDRATED_CSS = '{visibility:hidden}
|
|
51
|
+
const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
|
|
52
52
|
/**
|
|
53
53
|
* Default style mode id
|
|
54
54
|
*/
|
|
@@ -63,6 +63,18 @@ const isComplexType = (o) => {
|
|
|
63
63
|
o = typeof o;
|
|
64
64
|
return o === 'object' || o === 'function';
|
|
65
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
68
|
+
* out of a DOM's head.
|
|
69
|
+
*
|
|
70
|
+
* @param doc The DOM containing the `head` to query against
|
|
71
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
72
|
+
* exists or the tag has no content.
|
|
73
|
+
*/
|
|
74
|
+
function queryNonceMetaTagContent(doc) {
|
|
75
|
+
var _a, _b, _c;
|
|
76
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
77
|
+
}
|
|
66
78
|
/**
|
|
67
79
|
* Production h() function based on Preact by
|
|
68
80
|
* Jason Miller (@developit)
|
|
@@ -71,7 +83,6 @@ const isComplexType = (o) => {
|
|
|
71
83
|
*
|
|
72
84
|
* Modified for Stencil's compiler and vdom
|
|
73
85
|
*/
|
|
74
|
-
// const stack: any[] = [];
|
|
75
86
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
76
87
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
77
88
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -122,6 +133,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
122
133
|
}
|
|
123
134
|
return vnode;
|
|
124
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
138
|
+
* possible text content.
|
|
139
|
+
*
|
|
140
|
+
* @param tag the tag for this element
|
|
141
|
+
* @param text possible text content for the node
|
|
142
|
+
* @returns a newly-minted virtual DOM node
|
|
143
|
+
*/
|
|
125
144
|
const newVNode = (tag, text) => {
|
|
126
145
|
const vnode = {
|
|
127
146
|
$flags$: 0,
|
|
@@ -136,6 +155,12 @@ const newVNode = (tag, text) => {
|
|
|
136
155
|
return vnode;
|
|
137
156
|
};
|
|
138
157
|
const Host = {};
|
|
158
|
+
/**
|
|
159
|
+
* Check whether a given node is a Host node or not
|
|
160
|
+
*
|
|
161
|
+
* @param node the virtual DOM node to check
|
|
162
|
+
* @returns whether it's a Host node or not
|
|
163
|
+
*/
|
|
139
164
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
140
165
|
/**
|
|
141
166
|
* Parse a new property value for a given property type.
|
|
@@ -210,6 +235,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
210
235
|
styles.set(scopeId, style);
|
|
211
236
|
};
|
|
212
237
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
238
|
+
var _a;
|
|
213
239
|
let scopeId = getScopeId(cmpMeta);
|
|
214
240
|
const style = styles.get(scopeId);
|
|
215
241
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -229,6 +255,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
229
255
|
styleElm = doc.createElement('style');
|
|
230
256
|
styleElm.innerHTML = style;
|
|
231
257
|
}
|
|
258
|
+
// Apply CSP nonce to the style tag if it exists
|
|
259
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
260
|
+
if (nonce != null) {
|
|
261
|
+
styleElm.setAttribute('nonce', nonce);
|
|
262
|
+
}
|
|
232
263
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
233
264
|
}
|
|
234
265
|
if (appliedStyles) {
|
|
@@ -409,6 +440,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
409
440
|
}
|
|
410
441
|
return elm;
|
|
411
442
|
};
|
|
443
|
+
/**
|
|
444
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
445
|
+
* add them to the DOM in the appropriate place.
|
|
446
|
+
*
|
|
447
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
448
|
+
* DOM nodes
|
|
449
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
450
|
+
* inserted before (optional)
|
|
451
|
+
* @param parentVNode the parent virtual DOM node
|
|
452
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
453
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
454
|
+
* creating DOM nodes (inclusive)
|
|
455
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
456
|
+
* creating DOM nodes (inclusive)
|
|
457
|
+
*/
|
|
412
458
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
413
459
|
let containerElm = (parentElm);
|
|
414
460
|
let childNode;
|
|
@@ -425,6 +471,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
425
471
|
}
|
|
426
472
|
}
|
|
427
473
|
};
|
|
474
|
+
/**
|
|
475
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
476
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
477
|
+
* should no longer be shown.
|
|
478
|
+
*
|
|
479
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
480
|
+
*
|
|
481
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
482
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
483
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
484
|
+
* @param vnode a VNode
|
|
485
|
+
* @param elm an element
|
|
486
|
+
*/
|
|
428
487
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
429
488
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
430
489
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -616,7 +675,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
616
675
|
*
|
|
617
676
|
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
618
677
|
* changing order within a `children` array or something along those lines then
|
|
619
|
-
* we could obtain a false
|
|
678
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
679
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
620
680
|
*
|
|
621
681
|
* @param leftVNode the first VNode to check
|
|
622
682
|
* @param rightVNode the second VNode to check
|
|
@@ -666,6 +726,18 @@ const patch = (oldVNode, newVNode) => {
|
|
|
666
726
|
}
|
|
667
727
|
}
|
|
668
728
|
};
|
|
729
|
+
/**
|
|
730
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
731
|
+
*
|
|
732
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
733
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
734
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
735
|
+
* relocation, and reflecting attributes.
|
|
736
|
+
*
|
|
737
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
738
|
+
* the DOM node into which it should be rendered.
|
|
739
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
740
|
+
*/
|
|
669
741
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
670
742
|
const hostElm = hostRef.$hostElement$;
|
|
671
743
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -838,8 +910,8 @@ const safeCall = (instance, method, arg) => {
|
|
|
838
910
|
const then = (promise, thenFn) => {
|
|
839
911
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
840
912
|
};
|
|
841
|
-
const addHydratedFlag = (elm) => elm.
|
|
842
|
-
|
|
913
|
+
const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
|
|
914
|
+
;
|
|
843
915
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
844
916
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
845
917
|
// check our new property value against our internal value
|
|
@@ -1113,6 +1185,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1113
1185
|
}
|
|
1114
1186
|
};
|
|
1115
1187
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1188
|
+
var _a;
|
|
1116
1189
|
const endBootstrap = createTime();
|
|
1117
1190
|
const cmpTags = [];
|
|
1118
1191
|
const exclude = options.exclude || [];
|
|
@@ -1192,6 +1265,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1192
1265
|
{
|
|
1193
1266
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1194
1267
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1268
|
+
// Apply CSP nonce to the style tag if it exists
|
|
1269
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1270
|
+
if (nonce != null) {
|
|
1271
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
1272
|
+
}
|
|
1195
1273
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1196
1274
|
}
|
|
1197
1275
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1207,6 +1285,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1207
1285
|
// Fallback appLoad event
|
|
1208
1286
|
endBootstrap();
|
|
1209
1287
|
};
|
|
1288
|
+
/**
|
|
1289
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1290
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1291
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
1292
|
+
* @returns void
|
|
1293
|
+
*/
|
|
1294
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1210
1295
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1211
1296
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1212
1297
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1319,3 +1404,4 @@ exports.getElement = getElement;
|
|
|
1319
1404
|
exports.h = h;
|
|
1320
1405
|
exports.promiseResolve = promiseResolve;
|
|
1321
1406
|
exports.registerInstance = registerInstance;
|
|
1407
|
+
exports.setNonce = setNonce;
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1d846f7a.js');
|
|
6
6
|
|
|
7
7
|
/*
|
|
8
|
-
Stencil Client Patch Esm v2.
|
|
8
|
+
Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com
|
|
9
9
|
*/
|
|
10
10
|
const patchEsm = () => {
|
|
11
11
|
return index.promiseResolve();
|
|
@@ -18,4 +18,5 @@ const defineCustomElements = (win, options) => {
|
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
exports.setNonce = index.setNonce;
|
|
21
22
|
exports.defineCustomElements = defineCustomElements;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-1d846f7a.js');
|
|
6
6
|
|
|
7
7
|
const mdsProgressCss = "@tailwind utilities; :host{--background:rgb(var(--tone-neutral-08));--color:rgb(var(--brand-maggioli-03));--duration:500ms;--radius:0.5rem;--thickness:0.5rem;display:-ms-flexbox;display:flex;width:100%;overflow:hidden;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms;background-color:var(--background);border-radius:var(--radius);height:var(--thickness);min-width:var(--thickness)}:host([direction=vertical]){height:100%;width:auto;-ms-flex-direction:column;flex-direction:column;height:unset;width:var(--thickness);min-height:var(--thickness)}.progress{-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--color);border-radius:var(--radius);-webkit-transition-duration:var(--duration);transition-duration:var(--duration);-webkit-transition-property:background-color, flex-grow;transition-property:background-color, flex-grow;transition-property:background-color, flex-grow, -ms-flex-positive}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([variant=dark]){--color:rgb(var(--tone-neutral-04));--background:rgb(var(--tone-neutral-08))}:host([variant=light]){--color:rgb(var(--tone-neutral));--background:rgb(var(--tone-neutral-05))}:host([variant=error]){--color:rgb(var(--status-error-06));--background:rgb(var(--status-error-09))}:host([variant=warning]){--color:rgb(var(--status-warning-06));--background:rgb(var(--status-warning-09))}:host([variant=success]){--color:rgb(var(--status-success-06));--background:rgb(var(--status-success-09))}:host([variant=info]){--color:rgb(var(--status-info-06));--background:rgb(var(--status-info-09))}:host([variant=primary]){--color:rgb(var(--brand-maggioli-03));--background:rgb(var(--tone-neutral-08))}";
|
|
8
8
|
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-1d846f7a.js');
|
|
4
6
|
|
|
5
7
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
8
|
+
Stencil Client Patch Browser v2.22.2 | MIT Licensed | https://stenciljs.com
|
|
7
9
|
*/
|
|
8
10
|
const patchBrowser = () => {
|
|
9
11
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-progress.cjs.js', document.baseURI).href));
|
|
@@ -17,3 +19,5 @@ const patchBrowser = () => {
|
|
|
17
19
|
patchBrowser().then(options => {
|
|
18
20
|
return index.bootstrapLazy([["mds-progress.cjs",[[1,"mds-progress",{"progress":[2],"direction":[513],"variant":[513],"steps":[1],"currentStep":[32]}]]]], options);
|
|
19
21
|
});
|
|
22
|
+
|
|
23
|
+
exports.setNonce = index.setNonce;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import jsonIconsDictionary from '../fixtures/icons.json';
|
|
2
|
+
import jsonMggIconsDictionary from '../fixtures/iconsauce.json';
|
|
2
3
|
const iconsDictionary = jsonIconsDictionary;
|
|
3
|
-
|
|
4
|
+
const mggIconsDictionary = jsonMggIconsDictionary;
|
|
5
|
+
export { iconsDictionary, mggIconsDictionary, };
|
|
@@ -13,6 +13,15 @@ export { MdsProgress as MdsProgress } from '../types/components/mds-progress/mds
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const setAssetPath: (path: string) => void;
|
|
15
15
|
|
|
16
|
+
/**
|
|
17
|
+
* Used to specify a nonce value that corresponds with an application's CSP.
|
|
18
|
+
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
|
|
19
|
+
* Alternatively, the nonce value can be set on a meta tag in the DOM head
|
|
20
|
+
* (<meta name="csp-nonce" content="{ nonce value here }" />) which
|
|
21
|
+
* will result in the same behavior.
|
|
22
|
+
*/
|
|
23
|
+
export declare const setNonce: (nonce: string) => void
|
|
24
|
+
|
|
16
25
|
export interface SetPlatformOptions {
|
|
17
26
|
raf?: (c: FrameRequestCallback) => number;
|
|
18
27
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
package/dist/components/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
1
|
+
export { setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
2
|
export { MdsProgress, defineCustomElement as defineCustomElementMdsProgress } from './mds-progress.js';
|
|
@@ -26,7 +26,7 @@ const uniqueTime = (key, measureText) => {
|
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
const HYDRATED_CSS = '{visibility:hidden}
|
|
29
|
+
const HYDRATED_CSS = '{visibility:hidden}[hydrated]{visibility:inherit}';
|
|
30
30
|
/**
|
|
31
31
|
* Default style mode id
|
|
32
32
|
*/
|
|
@@ -41,6 +41,18 @@ const isComplexType = (o) => {
|
|
|
41
41
|
o = typeof o;
|
|
42
42
|
return o === 'object' || o === 'function';
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* Helper method for querying a `meta` tag that contains a nonce value
|
|
46
|
+
* out of a DOM's head.
|
|
47
|
+
*
|
|
48
|
+
* @param doc The DOM containing the `head` to query against
|
|
49
|
+
* @returns The content of the meta tag representing the nonce value, or `undefined` if no tag
|
|
50
|
+
* exists or the tag has no content.
|
|
51
|
+
*/
|
|
52
|
+
function queryNonceMetaTagContent(doc) {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
return (_c = (_b = (_a = doc.head) === null || _a === void 0 ? void 0 : _a.querySelector('meta[name="csp-nonce"]')) === null || _b === void 0 ? void 0 : _b.getAttribute('content')) !== null && _c !== void 0 ? _c : undefined;
|
|
55
|
+
}
|
|
44
56
|
/**
|
|
45
57
|
* Production h() function based on Preact by
|
|
46
58
|
* Jason Miller (@developit)
|
|
@@ -49,7 +61,6 @@ const isComplexType = (o) => {
|
|
|
49
61
|
*
|
|
50
62
|
* Modified for Stencil's compiler and vdom
|
|
51
63
|
*/
|
|
52
|
-
// const stack: any[] = [];
|
|
53
64
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, child?: d.ChildType): d.VNode;
|
|
54
65
|
// export function h(nodeName: string | d.FunctionalComponent, vnodeData: d.PropsType, ...children: d.ChildType[]): d.VNode;
|
|
55
66
|
const h = (nodeName, vnodeData, ...children) => {
|
|
@@ -100,6 +111,14 @@ const h = (nodeName, vnodeData, ...children) => {
|
|
|
100
111
|
}
|
|
101
112
|
return vnode;
|
|
102
113
|
};
|
|
114
|
+
/**
|
|
115
|
+
* A utility function for creating a virtual DOM node from a tag and some
|
|
116
|
+
* possible text content.
|
|
117
|
+
*
|
|
118
|
+
* @param tag the tag for this element
|
|
119
|
+
* @param text possible text content for the node
|
|
120
|
+
* @returns a newly-minted virtual DOM node
|
|
121
|
+
*/
|
|
103
122
|
const newVNode = (tag, text) => {
|
|
104
123
|
const vnode = {
|
|
105
124
|
$flags$: 0,
|
|
@@ -114,6 +133,12 @@ const newVNode = (tag, text) => {
|
|
|
114
133
|
return vnode;
|
|
115
134
|
};
|
|
116
135
|
const Host = {};
|
|
136
|
+
/**
|
|
137
|
+
* Check whether a given node is a Host node or not
|
|
138
|
+
*
|
|
139
|
+
* @param node the virtual DOM node to check
|
|
140
|
+
* @returns whether it's a Host node or not
|
|
141
|
+
*/
|
|
117
142
|
const isHost = (node) => node && node.$tag$ === Host;
|
|
118
143
|
/**
|
|
119
144
|
* Parse a new property value for a given property type.
|
|
@@ -188,6 +213,7 @@ const registerStyle = (scopeId, cssText, allowCS) => {
|
|
|
188
213
|
styles.set(scopeId, style);
|
|
189
214
|
};
|
|
190
215
|
const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
216
|
+
var _a;
|
|
191
217
|
let scopeId = getScopeId(cmpMeta);
|
|
192
218
|
const style = styles.get(scopeId);
|
|
193
219
|
// if an element is NOT connected then getRootNode() will return the wrong root node
|
|
@@ -207,6 +233,11 @@ const addStyle = (styleContainerNode, cmpMeta, mode, hostElm) => {
|
|
|
207
233
|
styleElm = doc.createElement('style');
|
|
208
234
|
styleElm.innerHTML = style;
|
|
209
235
|
}
|
|
236
|
+
// Apply CSP nonce to the style tag if it exists
|
|
237
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
238
|
+
if (nonce != null) {
|
|
239
|
+
styleElm.setAttribute('nonce', nonce);
|
|
240
|
+
}
|
|
210
241
|
styleContainerNode.insertBefore(styleElm, styleContainerNode.querySelector('link'));
|
|
211
242
|
}
|
|
212
243
|
if (appliedStyles) {
|
|
@@ -387,6 +418,21 @@ const createElm = (oldParentVNode, newParentVNode, childIndex, parentElm) => {
|
|
|
387
418
|
}
|
|
388
419
|
return elm;
|
|
389
420
|
};
|
|
421
|
+
/**
|
|
422
|
+
* Create DOM nodes corresponding to a list of {@link d.Vnode} objects and
|
|
423
|
+
* add them to the DOM in the appropriate place.
|
|
424
|
+
*
|
|
425
|
+
* @param parentElm the DOM node which should be used as a parent for the new
|
|
426
|
+
* DOM nodes
|
|
427
|
+
* @param before a child of the `parentElm` which the new children should be
|
|
428
|
+
* inserted before (optional)
|
|
429
|
+
* @param parentVNode the parent virtual DOM node
|
|
430
|
+
* @param vnodes the new child virtual DOM nodes to produce DOM nodes for
|
|
431
|
+
* @param startIdx the index in the child virtual DOM nodes at which to start
|
|
432
|
+
* creating DOM nodes (inclusive)
|
|
433
|
+
* @param endIdx the index in the child virtual DOM nodes at which to stop
|
|
434
|
+
* creating DOM nodes (inclusive)
|
|
435
|
+
*/
|
|
390
436
|
const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
391
437
|
let containerElm = (parentElm);
|
|
392
438
|
let childNode;
|
|
@@ -403,6 +449,19 @@ const addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) =>
|
|
|
403
449
|
}
|
|
404
450
|
}
|
|
405
451
|
};
|
|
452
|
+
/**
|
|
453
|
+
* Remove the DOM elements corresponding to a list of {@link d.VNode} objects.
|
|
454
|
+
* This can be used to, for instance, clean up after a list of children which
|
|
455
|
+
* should no longer be shown.
|
|
456
|
+
*
|
|
457
|
+
* This function also handles some of Stencil's slot relocation logic.
|
|
458
|
+
*
|
|
459
|
+
* @param vnodes a list of virtual DOM nodes to remove
|
|
460
|
+
* @param startIdx the index at which to start removing nodes (inclusive)
|
|
461
|
+
* @param endIdx the index at which to stop removing nodes (inclusive)
|
|
462
|
+
* @param vnode a VNode
|
|
463
|
+
* @param elm an element
|
|
464
|
+
*/
|
|
406
465
|
const removeVnodes = (vnodes, startIdx, endIdx, vnode, elm) => {
|
|
407
466
|
for (; startIdx <= endIdx; ++startIdx) {
|
|
408
467
|
if ((vnode = vnodes[startIdx])) {
|
|
@@ -594,7 +653,8 @@ const updateChildren = (parentElm, oldCh, newVNode, newCh) => {
|
|
|
594
653
|
*
|
|
595
654
|
* So, in other words, if `key` attrs are not set on VNodes which may be
|
|
596
655
|
* changing order within a `children` array or something along those lines then
|
|
597
|
-
* we could obtain a false
|
|
656
|
+
* we could obtain a false negative and then have to do needless re-rendering
|
|
657
|
+
* (i.e. we'd say two VNodes aren't equal when in fact they should be).
|
|
598
658
|
*
|
|
599
659
|
* @param leftVNode the first VNode to check
|
|
600
660
|
* @param rightVNode the second VNode to check
|
|
@@ -644,6 +704,18 @@ const patch = (oldVNode, newVNode) => {
|
|
|
644
704
|
}
|
|
645
705
|
}
|
|
646
706
|
};
|
|
707
|
+
/**
|
|
708
|
+
* The main entry point for Stencil's virtual DOM-based rendering engine
|
|
709
|
+
*
|
|
710
|
+
* Given a {@link d.HostRef} container and some virtual DOM nodes, this
|
|
711
|
+
* function will handle creating a virtual DOM tree with a single root, patching
|
|
712
|
+
* the current virtual DOM tree onto an old one (if any), dealing with slot
|
|
713
|
+
* relocation, and reflecting attributes.
|
|
714
|
+
*
|
|
715
|
+
* @param hostRef data needed to root and render the virtual DOM tree, such as
|
|
716
|
+
* the DOM node into which it should be rendered.
|
|
717
|
+
* @param renderFnResults the virtual DOM nodes to be rendered
|
|
718
|
+
*/
|
|
647
719
|
const renderVdom = (hostRef, renderFnResults) => {
|
|
648
720
|
const hostElm = hostRef.$hostElement$;
|
|
649
721
|
const cmpMeta = hostRef.$cmpMeta$;
|
|
@@ -816,8 +888,8 @@ const safeCall = (instance, method, arg) => {
|
|
|
816
888
|
const then = (promise, thenFn) => {
|
|
817
889
|
return promise && promise.then ? promise.then(thenFn) : thenFn();
|
|
818
890
|
};
|
|
819
|
-
const addHydratedFlag = (elm) => elm.
|
|
820
|
-
|
|
891
|
+
const addHydratedFlag = (elm) => elm.setAttribute('hydrated', '')
|
|
892
|
+
;
|
|
821
893
|
const getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
822
894
|
const setValue = (ref, propName, newVal, cmpMeta) => {
|
|
823
895
|
// check our new property value against our internal value
|
|
@@ -1091,6 +1163,7 @@ const disconnectedCallback = (elm) => {
|
|
|
1091
1163
|
}
|
|
1092
1164
|
};
|
|
1093
1165
|
const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
1166
|
+
var _a;
|
|
1094
1167
|
const endBootstrap = createTime();
|
|
1095
1168
|
const cmpTags = [];
|
|
1096
1169
|
const exclude = options.exclude || [];
|
|
@@ -1170,6 +1243,11 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1170
1243
|
{
|
|
1171
1244
|
visibilityStyle.innerHTML = cmpTags + HYDRATED_CSS;
|
|
1172
1245
|
visibilityStyle.setAttribute('data-styles', '');
|
|
1246
|
+
// Apply CSP nonce to the style tag if it exists
|
|
1247
|
+
const nonce = (_a = plt.$nonce$) !== null && _a !== void 0 ? _a : queryNonceMetaTagContent(doc);
|
|
1248
|
+
if (nonce != null) {
|
|
1249
|
+
visibilityStyle.setAttribute('nonce', nonce);
|
|
1250
|
+
}
|
|
1173
1251
|
head.insertBefore(visibilityStyle, metaCharset ? metaCharset.nextSibling : head.firstChild);
|
|
1174
1252
|
}
|
|
1175
1253
|
// Process deferred connectedCallbacks now all components have been registered
|
|
@@ -1185,6 +1263,13 @@ const bootstrapLazy = (lazyBundles, options = {}) => {
|
|
|
1185
1263
|
// Fallback appLoad event
|
|
1186
1264
|
endBootstrap();
|
|
1187
1265
|
};
|
|
1266
|
+
/**
|
|
1267
|
+
* Assigns the given value to the nonce property on the runtime platform object.
|
|
1268
|
+
* During runtime, this value is used to set the nonce attribute on all dynamically created script and style tags.
|
|
1269
|
+
* @param nonce The value to be assigned to the platform nonce property.
|
|
1270
|
+
* @returns void
|
|
1271
|
+
*/
|
|
1272
|
+
const setNonce = (nonce) => (plt.$nonce$ = nonce);
|
|
1188
1273
|
const hostRefs = /*@__PURE__*/ new WeakMap();
|
|
1189
1274
|
const getHostRef = (ref) => hostRefs.get(ref);
|
|
1190
1275
|
const registerInstance = (lazyInstance, hostRef) => hostRefs.set((hostRef.$lazyInstance$ = lazyInstance), hostRef);
|
|
@@ -1291,4 +1376,4 @@ const flush = () => {
|
|
|
1291
1376
|
const nextTick = /*@__PURE__*/ (cb) => promiseResolve().then(cb);
|
|
1292
1377
|
const writeTask = /*@__PURE__*/ queueTask(queueDomWrites, true);
|
|
1293
1378
|
|
|
1294
|
-
export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r };
|
|
1379
|
+
export { Host as H, bootstrapLazy as b, getElement as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-b254472d.js';
|
|
2
|
+
export { s as setNonce } from './index-b254472d.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
Stencil Client Patch Esm v2.
|
|
5
|
+
Stencil Client Patch Esm v2.22.2 | MIT Licensed | https://stenciljs.com
|
|
5
6
|
*/
|
|
6
7
|
const patchEsm = () => {
|
|
7
8
|
return promiseResolve();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, h, H as Host, g as getElement } from './index-b254472d.js';
|
|
2
2
|
|
|
3
3
|
const mdsProgressCss = "@tailwind utilities; :host{--background:rgb(var(--tone-neutral-08));--color:rgb(var(--brand-maggioli-03));--duration:500ms;--radius:0.5rem;--thickness:0.5rem;display:-ms-flexbox;display:flex;width:100%;overflow:hidden;-webkit-transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, fill, stroke, -webkit-text-decoration-color;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-property:color, background-color, border-color, text-decoration-color, fill, stroke, -webkit-text-decoration-color;-webkit-transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transition-duration:150ms;transition-duration:150ms;background-color:var(--background);border-radius:var(--radius);height:var(--thickness);min-width:var(--thickness)}:host([direction=vertical]){height:100%;width:auto;-ms-flex-direction:column;flex-direction:column;height:unset;width:var(--thickness);min-height:var(--thickness)}.progress{-webkit-transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);transition-timing-function:cubic-bezier(0.19, 1, 0.22, 1);background-color:var(--color);border-radius:var(--radius);-webkit-transition-duration:var(--duration);transition-duration:var(--duration);-webkit-transition-property:background-color, flex-grow;transition-property:background-color, flex-grow;transition-property:background-color, flex-grow, -ms-flex-positive}.fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host([variant=dark]){--color:rgb(var(--tone-neutral-04));--background:rgb(var(--tone-neutral-08))}:host([variant=light]){--color:rgb(var(--tone-neutral));--background:rgb(var(--tone-neutral-05))}:host([variant=error]){--color:rgb(var(--status-error-06));--background:rgb(var(--status-error-09))}:host([variant=warning]){--color:rgb(var(--status-warning-06));--background:rgb(var(--status-warning-09))}:host([variant=success]){--color:rgb(var(--status-success-06));--background:rgb(var(--status-success-09))}:host([variant=info]){--color:rgb(var(--status-info-06));--background:rgb(var(--status-info-09))}:host([variant=primary]){--color:rgb(var(--brand-maggioli-03));--background:rgb(var(--tone-neutral-08))}";
|
|
4
4
|
|
package/dist/esm/mds-progress.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-b254472d.js';
|
|
2
|
+
export { s as setNonce } from './index-b254472d.js';
|
|
2
3
|
|
|
3
4
|
/*
|
|
4
|
-
Stencil Client Patch Browser v2.
|
|
5
|
+
Stencil Client Patch Browser v2.22.2 | MIT Licensed | https://stenciljs.com
|
|
5
6
|
*/
|
|
6
7
|
const patchBrowser = () => {
|
|
7
8
|
const importMeta = import.meta.url;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
1
|
+
var __assign=this&&this.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},__assign.apply(this,arguments)},StyleNode=function(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""};function parse(e){return parseCss(lex(e=clean(e)),e)}function clean(e){return e.replace(RX.comments,"").replace(RX.port,"")}function lex(e){var t=new StyleNode;t.start=0,t.end=e.length;for(var r=t,n=0,s=e.length;n<s;n++)if(e[n]===OPEN_BRACE){r.rules||(r.rules=[]);var o=r,a=o.rules[o.rules.length-1]||null;(r=new StyleNode).start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===CLOSE_BRACE&&(r.end=n+1,r=r.parent||t);return t}function parseCss(e,t){var r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){var n=e.previous?e.previous.end:e.parent.start;r=(r=(r=_expandUnicodeEscapes(r=t.substring(n,e.start-1))).replace(RX.multipleSpaces," ")).substring(r.lastIndexOf(";")+1);var s=e.parsedSelector=e.selector=r.trim();e.atRule=0===s.indexOf(AT_START),e.atRule?0===s.indexOf(MEDIA_START)?e.type=types.MEDIA_RULE:s.match(RX.keyframesRule)&&(e.type=types.KEYFRAMES_RULE,e.keyframesName=e.selector.split(RX.multipleSpaces).pop()):0===s.indexOf(VAR_START)?e.type=types.MIXIN_RULE:e.type=types.STYLE_RULE}var o=e.rules;if(o)for(var a=0,i=o.length,l=void 0;a<i&&(l=o[a]);a++)parseCss(l,t);return e}function _expandUnicodeEscapes(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){for(var e=arguments[1],t=6-e.length;t--;)e="0"+e;return"\\"+e}))}var types={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},OPEN_BRACE="{",CLOSE_BRACE="}",RX={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},VAR_START="--",MEDIA_START="@media",AT_START="@",VAR_USAGE_START=/\bvar\(/,VAR_ASSIGN_START=/\B--[\w-]+\s*:/,COMMENTS=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,TRAILING_LINES=/^[\t ]+\n/gm;function findRegex(e,t,r){e.lastIndex=0;var n=t.substring(r).match(e);if(n){var s=r+n.index;return{start:s,end:s+n[0].length}}return null}function resolveVar(e,t,r){return e[t]?e[t]:r?executeTemplate(r,e):""}function findVarEndIndex(e,t){for(var r=0,n=t;n<e.length;n++){var s=e[n];if("("===s)r++;else if(")"===s&&--r<=0)return n+1}return n}function parseVar(e,t){var r=findRegex(VAR_USAGE_START,e,t);if(!r)return null;var n=findVarEndIndex(e,r.start),s=e.substring(r.end,n-1).split(","),o=s[0],a=s.slice(1);return{start:r.start,end:n,propName:o.trim(),fallback:a.length>0?a.join(",").trim():void 0}}function compileVar(e,t,r){var n=parseVar(e,r);if(!n)return t.push(e.substring(r,e.length)),e.length;var s=n.propName,o=null!=n.fallback?compileTemplate(n.fallback):void 0;return t.push(e.substring(r,n.start),(function(e){return resolveVar(e,s,o)})),n.end}function executeTemplate(e,t){for(var r="",n=0;n<e.length;n++){var s=e[n];r+="string"==typeof s?s:s(t)}return r}function findEndValue(e,t){for(var r=!1,n=!1,s=t;s<e.length;s++){var o=e[s];if(r)n&&'"'===o&&(r=!1),n||"'"!==o||(r=!1);else if('"'===o)r=!0,n=!0;else if("'"===o)r=!0,n=!1;else{if(";"===o)return s+1;if("}"===o)return s}}return s}function removeCustomAssigns(e){for(var t="",r=0;;){var n=findRegex(VAR_ASSIGN_START,e,r),s=n?n.start:e.length;if(t+=e.substring(r,s),!n)break;r=findEndValue(e,s)}return t}function compileTemplate(e){var t=0;e=removeCustomAssigns(e=e.replace(COMMENTS,"")).replace(TRAILING_LINES,"");for(var r=[];t<e.length;)t=compileVar(e,r,t);return r}function resolveValues(e){var t={};e.forEach((function(e){e.declarations.forEach((function(e){t[e.prop]=e.value}))}));for(var r={},n=Object.entries(t),s=function(e){var t=!1;if(n.forEach((function(e){var n=e[0],s=executeTemplate(e[1],r);s!==r[n]&&(r[n]=s,t=!0)})),!t)return"break"},o=0;o<10;o++){if("break"===s())break}return r}function getSelectors(e,t){if(void 0===t&&(t=0),!e.rules)return[];var r=[];return e.rules.filter((function(e){return e.type===types.STYLE_RULE})).forEach((function(e){var n=getDeclarations(e.cssText);n.length>0&&e.parsedSelector.split(",").forEach((function(e){e=e.trim(),r.push({selector:e,declarations:n,specificity:computeSpecificity(),nu:t})})),t++})),r}function computeSpecificity(e){return 1}var IMPORTANT="!important",FIND_DECLARATIONS=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gm;function getDeclarations(e){for(var t,r=[];t=FIND_DECLARATIONS.exec(e.trim());){var n=normalizeValue(t[2]),s=n.value,o=n.important;r.push({prop:t[1].trim(),value:compileTemplate(s),important:o})}return r}function normalizeValue(e){var t=(e=e.replace(/\s+/gim," ").trim()).endsWith(IMPORTANT);return t&&(e=e.slice(0,e.length-IMPORTANT.length).trim()),{value:e,important:t}}function getActiveSelectors(e,t,r){var n=[],s=getScopesForElement(t,e);return r.forEach((function(e){return n.push(e)})),s.forEach((function(e){return n.push(e)})),sortSelectors(getSelectorsForScopes(n).filter((function(t){return matches(e,t.selector)})))}function getScopesForElement(e,t){for(var r=[];t;){var n=e.get(t);n&&r.push(n),t=t.parentElement}return r}function getSelectorsForScopes(e){var t=[];return e.forEach((function(e){t.push.apply(t,e.selectors)})),t}function sortSelectors(e){return e.sort((function(e,t){return e.specificity===t.specificity?e.nu-t.nu:e.specificity-t.specificity})),e}function matches(e,t){return":root"===t||"html"===t||e.matches(t)}function parseCSS(e){var t=parse(e),r=compileTemplate(e);return{original:e,template:r,selectors:getSelectors(t),usesCssVars:r.length>1}}function addGlobalStyle(e,t){if(e.some((function(e){return e.styleEl===t})))return!1;var r=parseCSS(t.textContent);return r.styleEl=t,e.push(r),!0}function updateGlobalScopes(e){var t=resolveValues(getSelectorsForScopes(e));e.forEach((function(e){e.usesCssVars&&(e.styleEl.textContent=executeTemplate(e.template,t))}))}function reScope(e,t){var r=e.template.map((function(r){return"string"==typeof r?replaceScope(r,e.scopeId,t):r})),n=e.selectors.map((function(r){return __assign(__assign({},r),{selector:replaceScope(r.selector,e.scopeId,t)})}));return __assign(__assign({},e),{template:r,selectors:n,scopeId:t})}function replaceScope(e,t,r){return e=replaceAll(e,"\\.".concat(t),".".concat(r))}function replaceAll(e,t,r){return e.replace(new RegExp(t,"g"),r)}function loadDocument(e,t){return loadDocumentStyles(e,t),loadDocumentLinks(e,t).then((function(){updateGlobalScopes(t)}))}function startWatcher(e,t){"undefined"!=typeof MutationObserver&&new MutationObserver((function(){loadDocumentStyles(e,t)&&updateGlobalScopes(t)})).observe(document.head,{childList:!0})}function loadDocumentLinks(e,t){for(var r=[],n=e.querySelectorAll('link[rel="stylesheet"][href]:not([data-no-shim])'),s=0;s<n.length;s++)r.push(addGlobalLink(e,t,n[s]));return Promise.all(r)}function loadDocumentStyles(e,t){return Array.from(e.querySelectorAll("style:not([data-styles]):not([data-no-shim])")).map((function(e){return addGlobalStyle(t,e)})).some(Boolean)}function addGlobalLink(e,t,r){var n=r.href;return fetch(n).then((function(e){return e.text()})).then((function(s){if(hasCssVariables(s)&&r.parentNode){hasRelativeUrls(s)&&(s=fixRelativeUrls(s,n));var o=e.createElement("style");o.setAttribute("data-styles",""),o.textContent=s,addGlobalStyle(t,o),r.parentNode.insertBefore(o,r),r.remove()}})).catch((function(e){console.error(e)}))}var CSS_VARIABLE_REGEXP=/[\s;{]--[-a-zA-Z0-9]+\s*:/m;function hasCssVariables(e){return e.indexOf("var(")>-1||CSS_VARIABLE_REGEXP.test(e)}var CSS_URL_REGEXP=/url[\s]*\([\s]*['"]?(?!(?:https?|data)\:|\/)([^\'\"\)]*)[\s]*['"]?\)[\s]*/gim;function hasRelativeUrls(e){return CSS_URL_REGEXP.lastIndex=0,CSS_URL_REGEXP.test(e)}function fixRelativeUrls(e,t){var r=t.replace(/[^/]*$/,"");return e.replace(CSS_URL_REGEXP,(function(e,t){var n=r+t;return e.replace(t,n)}))}var CustomStyle=function(){function e(e,t){this.win=e,this.doc=t,this.count=0,this.hostStyleMap=new WeakMap,this.hostScopeMap=new WeakMap,this.globalScopes=[],this.scopesMap=new Map,this.didInit=!1}return e.prototype.i=function(){var e=this;return this.didInit||!this.win.requestAnimationFrame?Promise.resolve():(this.didInit=!0,new Promise((function(t){e.win.requestAnimationFrame((function(){startWatcher(e.doc,e.globalScopes),loadDocument(e.doc,e.globalScopes).then((function(){return t()}))}))})))},e.prototype.addLink=function(e){var t=this;return addGlobalLink(this.doc,this.globalScopes,e).then((function(){t.updateGlobal()}))},e.prototype.addGlobalStyle=function(e){addGlobalStyle(this.globalScopes,e)&&this.updateGlobal()},e.prototype.createHostStyle=function(e,t,r,n){if(this.hostScopeMap.has(e))throw new Error("host style already created");var s=this.registerHostTemplate(r,t,n),o=this.doc.createElement("style");return o.setAttribute("data-no-shim",""),s.usesCssVars?n?(o["s-sc"]=t="".concat(s.scopeId,"-").concat(this.count),o.textContent="/*needs update*/",this.hostStyleMap.set(e,o),this.hostScopeMap.set(e,reScope(s,t)),this.count++):(s.styleEl=o,s.usesCssVars||(o.textContent=executeTemplate(s.template,{})),this.globalScopes.push(s),this.updateGlobal(),this.hostScopeMap.set(e,s)):o.textContent=r,o},e.prototype.removeHost=function(e){var t=this.hostStyleMap.get(e);t&&t.remove(),this.hostStyleMap.delete(e),this.hostScopeMap.delete(e)},e.prototype.updateHost=function(e){var t=this.hostScopeMap.get(e);if(t&&t.usesCssVars&&t.isScoped){var r=this.hostStyleMap.get(e);if(r){var n=resolveValues(getActiveSelectors(e,this.hostScopeMap,this.globalScopes));r.textContent=executeTemplate(t.template,n)}}},e.prototype.updateGlobal=function(){updateGlobalScopes(this.globalScopes)},e.prototype.registerHostTemplate=function(e,t,r){var n=this.scopesMap.get(t);return n||((n=parseCSS(e)).scopeId=t,n.isScoped=r,this.scopesMap.set(t,n)),n},e}();!function(e){!e||e.__cssshim||e.CSS&&e.CSS.supports&&e.CSS.supports("color","var(--c)")||(e.__cssshim=new CustomStyle(e,e.document))}("undefined"!=typeof window&&window);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(t,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r))e[r]=t[r]};return e(t,r)};return function(t,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();var __awaiter=this&&this.__awaiter||function(e,t,r,n){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function i(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?r(e.value):a(e.value).then(s,i)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,a,o,s;return s={next:i(0),throw:i(1),return:i(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function i(e){return function(t){return l([e,t])}}function l(i){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,i[0]&&(r=0)),r)try{if(n=1,a&&(o=i[0]&2?a["return"]:i[0]?a["throw"]||((o=a["return"])&&o.call(a),0):a.next)&&!(o=o.call(a,i[1])).done)return o;if(a=0,o)i=[i[0]&2,o.value];switch(i[0]){case 0:case 1:o=i;break;case 4:r.label++;return{value:i[1],done:false};case 5:r.label++;a=i[1];i=[0];continue;case 7:i=r.ops.pop();r.trys.pop();continue;default:if(!(o=r.trys,o=o.length>0&&o[o.length-1])&&(i[0]===6||i[0]===2)){r=0;continue}if(i[0]===3&&(!o||i[1]>o[0]&&i[1]<o[3])){r.label=i[1];break}if(i[0]===6&&r.label<o[1]){r.label=o[1];o=i;break}if(o&&r.label<o[2]){r.label=o[2];r.ops.push(i);break}if(o[2])r.ops.pop();r.trys.pop();continue}i=t.call(e,r)}catch(e){i=[6,e];a=0}finally{n=o=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,o;n<a;n++){if(o||!(n in t)){if(!o)o=Array.prototype.slice.call(t,0,n);o[n]=t[n]}}return e.concat(o||Array.prototype.slice.call(t))};var NAMESPACE="mds-progress";var scopeId;var hostTagName;var isSvgMode=false;var queuePending=false;var createTime=function(e,t){if(t===void 0){t=""}{return function(){return}}};var uniqueTime=function(e,t){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}[hydrated]{visibility:inherit}";var EMPTY_OBJ={};var isDef=function(e){return e!=null};var isComplexType=function(e){e=typeof e;return e==="object"||e==="function"};function queryNonceMetaTagContent(e){var t,r,n;return(n=(r=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&n!==void 0?n:undefined}var h=function(e,t){var r=[];for(var n=2;n<arguments.length;n++){r[n-2]=arguments[n]}var a=null;var o=false;var s=false;var i=[];var l=function(t){for(var r=0;r<t.length;r++){a=t[r];if(Array.isArray(a)){l(a)}else if(a!=null&&typeof a!=="boolean"){if(o=typeof e!=="function"&&!isComplexType(a)){a=String(a)}if(o&&s){i[i.length-1].$text$+=a}else{i.push(o?newVNode(null,a):a)}s=o}}};l(r);if(t){{var u=t.className||t.class;if(u){t.class=typeof u!=="object"?u:Object.keys(u).filter((function(e){return u[e]})).join(" ")}}}var c=newVNode(e,null);c.$attrs$=t;if(i.length>0){c.$children$=i}return c};var newVNode=function(e,t){var r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};{r.$attrs$=null}return r};var Host={};var isHost=function(e){return e&&e.$tag$===Host};var parsePropertyValue=function(e,t){if(e!=null&&!isComplexType(e)){if(t&2){return parseFloat(e)}if(t&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var emitEvent=function(e,t,r){var n=plt.ce(t,r);e.dispatchEvent(n);return n};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,t,r){var n=styles.get(e);if(supportsConstructableStylesheets&&r){n=n||new CSSStyleSheet;if(typeof n==="string"){n=t}else{n.replaceSync(t)}}else{n=t}styles.set(e,n)};var addStyle=function(e,t,r,n){var a;var o=getScopeId(t);var s=styles.get(o);e=e.nodeType===11?e:doc;if(s){if(typeof s==="string"){e=e.head||e;var i=rootAppliedStyles.get(e);var l=void 0;if(!i){rootAppliedStyles.set(e,i=new Set)}if(!i.has(o)){{{l=doc.createElement("style");l.innerHTML=s}var u=(a=plt.$nonce$)!==null&&a!==void 0?a:queryNonceMetaTagContent(doc);if(u!=null){l.setAttribute("nonce",u)}e.insertBefore(l,e.querySelector("link"))}if(i){i.add(o)}}}else if(!e.adoptedStyleSheets.includes(s)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[s],false)}}return o};var attachStyles=function(e){var t=e.$cmpMeta$;var r=e.$hostElement$;var n=t.$flags$;var a=createTime("attachStyles",t.$tagName$);var o=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),t);if(n&10){r["s-sc"]=o;r.classList.add(o+"-h")}a()};var getScopeId=function(e,t){return"sc-"+e.$tagName$};var setAccessor=function(e,t,r,n,a,o){if(r!==n){var s=isMemberInElement(e,t);t.toLowerCase();if(t==="class"){var i=e.classList;var l=parseClassList(r);var u=parseClassList(n);i.remove.apply(i,l.filter((function(e){return e&&!u.includes(e)})));i.add.apply(i,u.filter((function(e){return e&&!l.includes(e)})))}else if(t==="style"){{for(var c in r){if(!n||n[c]==null){if(c.includes("-")){e.style.removeProperty(c)}else{e.style[c]=""}}}}for(var c in n){if(!r||n[c]!==r[c]){if(c.includes("-")){e.style.setProperty(c,n[c])}else{e.style[c]=n[c]}}}}else{var f=isComplexType(n);if((s||f&&n!==null)&&!a){try{if(!e.tagName.includes("-")){var $=n==null?"":n;if(t==="list"){s=false}else if(r==null||e[t]!=$){e[t]=$}}else{e[t]=n}}catch(e){}}if(n==null||n===false){if(n!==false||e.getAttribute(t)===""){{e.removeAttribute(t)}}}else if((!s||o&4||a)&&!f){n=n===true?"":n;{e.setAttribute(t,n)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var updateElement=function(e,t,r,n){var a=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$;var o=e&&e.$attrs$||EMPTY_OBJ;var s=t.$attrs$||EMPTY_OBJ;{for(n in o){if(!(n in s)){setAccessor(a,n,o[n],undefined,r,t.$flags$)}}}for(n in s){setAccessor(a,n,o[n],s[n],r,t.$flags$)}};var createElm=function(e,t,r,n){var a=t.$children$[r];var o=0;var s;var i;{s=a.$elm$=doc.createElement(a.$tag$);{updateElement(null,a,isSvgMode)}if(isDef(scopeId)&&s["s-si"]!==scopeId){s.classList.add(s["s-si"]=scopeId)}if(a.$children$){for(o=0;o<a.$children$.length;++o){i=createElm(e,a,o);if(i){s.appendChild(i)}}}}return s};var addVnodes=function(e,t,r,n,a,o){var s=e;var i;if(s.shadowRoot&&s.tagName===hostTagName){s=s.shadowRoot}for(;a<=o;++a){if(n[a]){i=createElm(null,r,a);if(i){n[a].$elm$=i;s.insertBefore(i,t)}}}};var removeVnodes=function(e,t,r,n,a){for(;t<=r;++t){if(n=e[t]){a=n.$elm$;a.remove()}}};var updateChildren=function(e,t,r,n){var a=0;var o=0;var s=t.length-1;var i=t[0];var l=t[s];var u=n.length-1;var c=n[0];var f=n[u];var $;while(a<=s&&o<=u){if(i==null){i=t[++a]}else if(l==null){l=t[--s]}else if(c==null){c=n[++o]}else if(f==null){f=n[--u]}else if(isSameVnode(i,c)){patch(i,c);i=t[++a];c=n[++o]}else if(isSameVnode(l,f)){patch(l,f);l=t[--s];f=n[--u]}else if(isSameVnode(i,f)){patch(i,f);e.insertBefore(i.$elm$,l.$elm$.nextSibling);i=t[++a];f=n[--u]}else if(isSameVnode(l,c)){patch(l,c);e.insertBefore(l.$elm$,i.$elm$);l=t[--s];c=n[++o]}else{{$=createElm(t&&t[o],r,o);c=n[++o]}if($){{i.$elm$.parentNode.insertBefore($,i.$elm$)}}}}if(a>s){addVnodes(e,n[u+1]==null?null:n[u+1].$elm$,r,n,o,u)}else if(o>u){removeVnodes(t,a,s)}};var isSameVnode=function(e,t){if(e.$tag$===t.$tag$){return true}return false};var patch=function(e,t){var r=t.$elm$=e.$elm$;var n=e.$children$;var a=t.$children$;{{{updateElement(e,t,isSvgMode)}}if(n!==null&&a!==null){updateChildren(r,n,t,a)}else if(a!==null){addVnodes(r,null,t,a,0,a.length-1)}else if(n!==null){removeVnodes(n,0,n.length-1)}}};var renderVdom=function(e,t){var r=e.$hostElement$;var n=e.$cmpMeta$;var a=e.$vnode$||newVNode(null,null);var o=isHost(t)?t:h(null,null,t);hostTagName=r.tagName;if(n.$attrsToReflect$){o.$attrs$=o.$attrs$||{};n.$attrsToReflect$.map((function(e){var t=e[0],n=e[1];return o.$attrs$[n]=r[t]}))}o.$tag$=null;o.$flags$|=4;e.$vnode$=o;o.$elm$=a.$elm$=r.shadowRoot||r;{scopeId=r["s-sc"]}patch(a,o)};var attachToAncestor=function(e,t){if(t&&!e.$onRenderResolve$&&t["s-p"]){t["s-p"].push(new Promise((function(t){return e.$onRenderResolve$=t})))}};var scheduleUpdate=function(e,t){{e.$flags$|=16}if(e.$flags$&4){e.$flags$|=512;return}attachToAncestor(e,e.$ancestorComponent$);var r=function(){return dispatchHooks(e,t)};return writeTask(r)};var dispatchHooks=function(e,t){var r=createTime("scheduleUpdate",e.$cmpMeta$.$tagName$);var n=e.$lazyInstance$;var a;if(t){{a=safeCall(n,"componentWillLoad")}}r();return then(a,(function(){return updateComponent(e,n,t)}))};var updateComponent=function(e,t,r){return __awaiter(void 0,void 0,void 0,(function(){var n,a,o,s,i,l;return __generator(this,(function(u){n=e.$hostElement$;a=createTime("update",e.$cmpMeta$.$tagName$);o=n["s-rc"];if(r){attachStyles(e)}s=createTime("render",e.$cmpMeta$.$tagName$);{callRender(e,t)}if(o){o.map((function(e){return e()}));n["s-rc"]=undefined}s();a();{i=n["s-p"];l=function(){return postUpdateComponent(e)};if(i.length===0){l()}else{Promise.all(i).then(l);e.$flags$|=4;i.length=0}}return[2]}))}))};var callRender=function(e,t,r){try{t=t.render();{e.$flags$&=~16}{e.$flags$|=2}{{{renderVdom(e,t)}}}}catch(t){consoleError(t,e.$hostElement$)}return null};var postUpdateComponent=function(e){var t=e.$cmpMeta$.$tagName$;var r=e.$hostElement$;var n=createTime("postUpdate",t);var a=e.$ancestorComponent$;if(!(e.$flags$&64)){e.$flags$|=64;{addHydratedFlag(r)}n();{e.$onReadyResolve$(r);if(!a){appDidLoad()}}}else{n()}{if(e.$onRenderResolve$){e.$onRenderResolve$();e.$onRenderResolve$=undefined}if(e.$flags$&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.$flags$&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,t,r){if(e&&e[t]){try{return e[t](r)}catch(e){consoleError(e)}}return undefined};var then=function(e,t){return e&&e.then?e.then(t):t()};var addHydratedFlag=function(e){return e.setAttribute("hydrated","")};var getValue=function(e,t){return getHostRef(e).$instanceValues$.get(t)};var setValue=function(e,t,r,n){var a=getHostRef(e);var o=a.$hostElement$;var s=a.$instanceValues$.get(t);var i=a.$flags$;var l=a.$lazyInstance$;r=parsePropertyValue(r,n.$members$[t][0]);var u=Number.isNaN(s)&&Number.isNaN(r);var c=r!==s&&!u;if((!(i&8)||s===undefined)&&c){a.$instanceValues$.set(t,r);if(l){if(n.$watchers$&&i&128){var f=n.$watchers$[t];if(f){f.map((function(e){try{l[e](r,s,t)}catch(e){consoleError(e,o)}}))}}if((i&(2|16))===2){scheduleUpdate(a,false)}}}};var proxyComponent=function(e,t,r){if(t.$members$){if(e.watchers){t.$watchers$=e.watchers}var n=Object.entries(t.$members$);var a=e.prototype;n.map((function(e){var n=e[0],o=e[1][0];if(o&31||r&2&&o&32){Object.defineProperty(a,n,{get:function(){return getValue(this,n)},set:function(e){setValue(this,n,e,t)},configurable:true,enumerable:true})}}));if(r&1){var o=new Map;a.attributeChangedCallback=function(e,t,r){var n=this;plt.jmp((function(){var t=o.get(e);if(n.hasOwnProperty(t)){r=n[t];delete n[t]}else if(a.hasOwnProperty(t)&&typeof n[t]==="number"&&n[t]==r){return}n[t]=r===null&&typeof n[t]==="boolean"?false:r}))};e.observedAttributes=n.filter((function(e){var t=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],n=e[1];var a=n[1]||r;o.set(a,r);if(n[0]&512){t.$attrsToReflect$.push([r,a])}return a}))}}return e};var initializeComponent=function(e,t,r,n,a){return __awaiter(void 0,void 0,void 0,(function(){var e,n,o,s,i,l,u;return __generator(this,(function(c){switch(c.label){case 0:if(!((t.$flags$&32)===0))return[3,3];t.$flags$|=32;a=loadModule(r);if(!a.then)return[3,2];e=uniqueTime();return[4,a];case 1:a=c.sent();e();c.label=2;case 2:if(!a.isProxied){{r.$watchers$=a.watchers}proxyComponent(a,r,2);a.isProxied=true}n=createTime("createInstance",r.$tagName$);{t.$flags$|=8}try{new a(t)}catch(e){consoleError(e)}{t.$flags$&=~8}{t.$flags$|=128}n();if(a.style){o=a.style;s=getScopeId(r);if(!styles.has(s)){i=createTime("registerStyles",r.$tagName$);registerStyle(s,o,!!(r.$flags$&1));i()}}c.label=3;case 3:l=t.$ancestorComponent$;u=function(){return scheduleUpdate(t,true)};if(l&&l["s-rc"]){l["s-rc"].push(u)}else{u()}return[2]}}))}))};var connectedCallback=function(e){if((plt.$flags$&1)===0){var t=getHostRef(e);var r=t.$cmpMeta$;var n=createTime("connectedCallback",r.$tagName$);if(!(t.$flags$&1)){t.$flags$|=1;{var a=e;while(a=a.parentNode||a.host){if(a["s-p"]){attachToAncestor(t,t.$ancestorComponent$=a);break}}}if(r.$members$){Object.entries(r.$members$).map((function(t){var r=t[0],n=t[1][0];if(n&31&&e.hasOwnProperty(r)){var a=e[r];delete e[r];e[r]=a}}))}{initializeComponent(e,t,r)}}n()}};var disconnectedCallback=function(e){if((plt.$flags$&1)===0){getHostRef(e)}};var bootstrapLazy=function(e,t){if(t===void 0){t={}}var r;var n=createTime();var a=[];var o=t.exclude||[];var s=win.customElements;var i=doc.head;var l=i.querySelector("meta[charset]");var u=doc.createElement("style");var c=[];var f;var $=true;Object.assign(plt,t);plt.$resourcesUrl$=new URL(t.resourcesUrl||"./",doc.baseURI).href;e.map((function(e){e[1].map((function(t){var r={$flags$:t[0],$tagName$:t[1],$members$:t[2],$listeners$:t[3]};{r.$members$=t[2]}{r.$attrsToReflect$=[]}{r.$watchers$={}}var n=r.$tagName$;var i=function(e){__extends(t,e);function t(t){var n=e.call(this,t)||this;t=n;registerHost(t,r);if(r.$flags$&1){{{t.attachShadow({mode:"open"})}}}return n}t.prototype.connectedCallback=function(){var e=this;if(f){clearTimeout(f);f=null}if($){c.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};t.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};t.prototype.componentOnReady=function(){return getHostRef(this).$onReadyPromise$};return t}(HTMLElement);r.$lazyBundleId$=e[0];if(!o.includes(n)&&!s.get(n)){a.push(n);s.define(n,proxyComponent(i,r,1))}}))}));{u.innerHTML=a+HYDRATED_CSS;u.setAttribute("data-styles","");var d=(r=plt.$nonce$)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(d!=null){u.setAttribute("nonce",d)}i.insertBefore(u,l?l.nextSibling:i.firstChild)}$=false;if(c.length){c.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return f=setTimeout(appDidLoad,30)}))}}n()};var setNonce=function(e){return plt.$nonce$=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,t){return hostRefs.set(t.$lazyInstance$=e,t)};var registerHost=function(e,t){var r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};{r.$onReadyPromise$=new Promise((function(e){return r.$onReadyResolve$=e}));e["s-p"]=[];e["s-rc"]=[]}return hostRefs.set(e,r)};var isMemberInElement=function(e,t){return t in e};var consoleError=function(e,t){return(0,console.error)(e,t)};var cmpModules=new Map;var loadModule=function(e,t,r){var n=e.$tagName$.replace(/-/g,"_");var a=e.$lazyBundleId$;var o=cmpModules.get(a);if(o){return o[n]}
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/return import("./".concat(a,".entry.js").concat("")).then((function(e){{cmpModules.set(a,e)}return e[n]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={$flags$:0,$resourcesUrl$:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,t,r,n){return e.addEventListener(t,r,n)},rel:function(e,t,r,n){return e.removeEventListener(t,r,n)},ce:function(e,t){return new CustomEvent(e,t)}};var promiseResolve=function(e){return Promise.resolve(e)};var supportsConstructableStylesheets=function(){try{new CSSStyleSheet;return typeof(new CSSStyleSheet).replaceSync==="function"}catch(e){}return false}();var queueDomReads=[];var queueDomWrites=[];var queueTask=function(e,t){return function(r){e.push(r);if(!queuePending){queuePending=true;if(t&&plt.$flags$&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var t=0;t<e.length;t++){try{e[t](performance.now())}catch(e){consoleError(e)}}e.length=0};var flush=function(){consume(queueDomReads);{consume(queueDomWrites);if(queuePending=queueDomReads.length>0){plt.raf(flush)}}};var nextTick=function(e){return promiseResolve().then(e)};var writeTask=queueTask(queueDomWrites,true);export{Host as H,bootstrapLazy as b,getElement as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-b254472d.js";export{s as setNonce}from"./index-b254472d.js";var patchEsm=function(){return promiseResolve()};var defineCustomElements=function(e,r){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){return bootstrapLazy([["mds-progress",[[1,"mds-progress",{progress:[2],direction:[513],variant:[513],steps:[1],currentStep:[32]}]]]],r)}))};export{defineCustomElements};
|