@maggioli-design-system/mds-modal 4.10.0 → 4.10.2
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-b3e2062a.js → index-a2b18c94.js} +3 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mds-modal.cjs.entry.js +26 -21
- package/dist/cjs/mds-modal.cjs.js +1 -1
- package/dist/collection/common/keyboard-manager.js +16 -11
- package/dist/collection/components/mds-modal/mds-modal.js +9 -9
- package/dist/components/mds-modal.js +25 -20
- package/dist/documentation.json +1 -1
- package/dist/esm/{index-fd30d325.js → index-87610b93.js} +3 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mds-modal.entry.js +26 -21
- package/dist/esm/mds-modal.js +2 -2
- package/dist/esm-es5/{index-fd30d325.js → index-87610b93.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mds-modal.entry.js +1 -1
- package/dist/esm-es5/mds-modal.js +1 -1
- package/dist/mds-modal/mds-modal.esm.js +1 -1
- package/dist/mds-modal/mds-modal.js +1 -1
- package/dist/mds-modal/p-0675cc57.system.entry.js +1 -0
- package/dist/mds-modal/{p-5cf75b06.system.js → p-75fb0334.system.js} +1 -1
- package/{www/build/p-14f0bf74.system.js → dist/mds-modal/p-90949b6a.system.js} +2 -2
- package/dist/mds-modal/{p-aff993b4.js → p-e0a585ff.js} +2 -2
- package/dist/mds-modal/p-fe4c6a90.entry.js +1 -0
- package/dist/stats.json +30 -30
- package/dist/types/common/keyboard-manager.d.ts +2 -1
- package/documentation.json +9 -4
- package/package.json +3 -3
- package/src/common/keyboard-manager.ts +16 -12
- package/src/components/mds-modal/mds-modal.tsx +1 -1
- package/src/fixtures/icons.json +1 -0
- package/src/fixtures/iconsauce.json +1 -0
- package/www/build/mds-modal.esm.js +1 -1
- package/www/build/mds-modal.js +1 -1
- package/www/build/p-0675cc57.system.entry.js +1 -0
- package/www/build/{p-5cf75b06.system.js → p-75fb0334.system.js} +1 -1
- package/{dist/mds-modal/p-14f0bf74.system.js → www/build/p-90949b6a.system.js} +2 -2
- package/www/build/{p-aff993b4.js → p-e0a585ff.js} +2 -2
- package/www/build/p-fe4c6a90.entry.js +1 -0
- package/dist/mds-modal/p-444a6a47.system.entry.js +0 -1
- package/dist/mds-modal/p-83ebb238.entry.js +0 -1
- package/www/build/p-444a6a47.system.entry.js +0 -1
- package/www/build/p-83ebb238.entry.js +0 -1
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -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-a2b18c94.js');
|
|
6
6
|
|
|
7
7
|
const defineCustomElements = (win, options) => {
|
|
8
8
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -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-a2b18c94.js');
|
|
6
6
|
|
|
7
7
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
8
8
|
|
|
@@ -10,9 +10,9 @@ const miBaselineClose = `<svg xmlns="http://www.w3.org/2000/svg" width="24" heig
|
|
|
10
10
|
|
|
11
11
|
class KeyboardManager {
|
|
12
12
|
constructor() {
|
|
13
|
-
this.elements =
|
|
13
|
+
this.elements = new Map();
|
|
14
14
|
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
15
|
-
if (event.code === '
|
|
15
|
+
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
16
16
|
event.target.click();
|
|
17
17
|
}
|
|
18
18
|
};
|
|
@@ -22,20 +22,25 @@ class KeyboardManager {
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
this.addElement = (el, name = 'element') => {
|
|
25
|
-
|
|
25
|
+
if (!el) {
|
|
26
|
+
throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
|
|
27
|
+
}
|
|
28
|
+
this.elements.set(name, el);
|
|
29
|
+
};
|
|
30
|
+
this.removeElement = (name = 'element') => {
|
|
31
|
+
this.detachClickBehavior(name);
|
|
32
|
+
this.elements.delete(name);
|
|
26
33
|
};
|
|
27
34
|
this.attachClickBehavior = (name = 'element') => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
35
|
+
var _a;
|
|
36
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
31
37
|
};
|
|
32
38
|
this.detachClickBehavior = (name = 'element') => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
39
|
+
var _a;
|
|
40
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
36
41
|
};
|
|
37
|
-
this.attachEscapeBehavior = (
|
|
38
|
-
this.escapeCallback =
|
|
42
|
+
this.attachEscapeBehavior = (callback) => {
|
|
43
|
+
this.escapeCallback = callback;
|
|
39
44
|
if (window !== undefined) {
|
|
40
45
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
41
46
|
}
|
|
@@ -60,15 +65,6 @@ const MdsModal = class {
|
|
|
60
65
|
this.bottom = false;
|
|
61
66
|
this.animationState = 'intro';
|
|
62
67
|
this.km = new KeyboardManager();
|
|
63
|
-
this.componentDidLoad = () => {
|
|
64
|
-
var _a;
|
|
65
|
-
this.km.addElement(this.host, 'host');
|
|
66
|
-
const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
|
|
67
|
-
if (close)
|
|
68
|
-
this.km.addElement(close, 'close');
|
|
69
|
-
this.km.attachEscapeBehavior(() => this.closeEvent.emit());
|
|
70
|
-
this.km.attachClickBehavior('close');
|
|
71
|
-
};
|
|
72
68
|
this.animationName = (customState = '', customPosition = '') => {
|
|
73
69
|
return `to-${customPosition !== '' ? customPosition : this.position}${customState !== '' ? '-' + customState : ''}`;
|
|
74
70
|
};
|
|
@@ -111,6 +107,15 @@ const MdsModal = class {
|
|
|
111
107
|
window.clearTimeout(this.animationDeelay);
|
|
112
108
|
}, 500);
|
|
113
109
|
}
|
|
110
|
+
componentDidLoad() {
|
|
111
|
+
var _a;
|
|
112
|
+
this.km.addElement(this.host, 'host');
|
|
113
|
+
const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
|
|
114
|
+
if (close)
|
|
115
|
+
this.km.addElement(close, 'close');
|
|
116
|
+
this.km.attachEscapeBehavior(() => this.closeEvent.emit());
|
|
117
|
+
this.km.attachClickBehavior('close');
|
|
118
|
+
}
|
|
114
119
|
disconnectedCallback() {
|
|
115
120
|
this.km.detachEscapeBehavior();
|
|
116
121
|
this.km.detachClickBehavior('close');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export class KeyboardManager {
|
|
2
2
|
constructor() {
|
|
3
|
-
this.elements =
|
|
3
|
+
this.elements = new Map();
|
|
4
4
|
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
5
|
-
if (event.code === '
|
|
5
|
+
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
6
6
|
event.target.click();
|
|
7
7
|
}
|
|
8
8
|
};
|
|
@@ -12,20 +12,25 @@ export class KeyboardManager {
|
|
|
12
12
|
}
|
|
13
13
|
};
|
|
14
14
|
this.addElement = (el, name = 'element') => {
|
|
15
|
-
|
|
15
|
+
if (!el) {
|
|
16
|
+
throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
|
|
17
|
+
}
|
|
18
|
+
this.elements.set(name, el);
|
|
19
|
+
};
|
|
20
|
+
this.removeElement = (name = 'element') => {
|
|
21
|
+
this.detachClickBehavior(name);
|
|
22
|
+
this.elements.delete(name);
|
|
16
23
|
};
|
|
17
24
|
this.attachClickBehavior = (name = 'element') => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
25
|
+
var _a;
|
|
26
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
21
27
|
};
|
|
22
28
|
this.detachClickBehavior = (name = 'element') => {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
26
31
|
};
|
|
27
|
-
this.attachEscapeBehavior = (
|
|
28
|
-
this.escapeCallback =
|
|
32
|
+
this.attachEscapeBehavior = (callback) => {
|
|
33
|
+
this.escapeCallback = callback;
|
|
29
34
|
if (window !== undefined) {
|
|
30
35
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
31
36
|
}
|
|
@@ -15,15 +15,6 @@ export class MdsModal {
|
|
|
15
15
|
this.bottom = false;
|
|
16
16
|
this.animationState = 'intro';
|
|
17
17
|
this.km = new KeyboardManager();
|
|
18
|
-
this.componentDidLoad = () => {
|
|
19
|
-
var _a;
|
|
20
|
-
this.km.addElement(this.host, 'host');
|
|
21
|
-
const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
|
|
22
|
-
if (close)
|
|
23
|
-
this.km.addElement(close, 'close');
|
|
24
|
-
this.km.attachEscapeBehavior(() => this.closeEvent.emit());
|
|
25
|
-
this.km.attachClickBehavior('close');
|
|
26
|
-
};
|
|
27
18
|
this.animationName = (customState = '', customPosition = '') => {
|
|
28
19
|
return `to-${customPosition !== '' ? customPosition : this.position}${customState !== '' ? '-' + customState : ''}`;
|
|
29
20
|
};
|
|
@@ -66,6 +57,15 @@ export class MdsModal {
|
|
|
66
57
|
window.clearTimeout(this.animationDeelay);
|
|
67
58
|
}, 500);
|
|
68
59
|
}
|
|
60
|
+
componentDidLoad() {
|
|
61
|
+
var _a;
|
|
62
|
+
this.km.addElement(this.host, 'host');
|
|
63
|
+
const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
|
|
64
|
+
if (close)
|
|
65
|
+
this.km.addElement(close, 'close');
|
|
66
|
+
this.km.attachEscapeBehavior(() => this.closeEvent.emit());
|
|
67
|
+
this.km.attachClickBehavior('close');
|
|
68
|
+
}
|
|
69
69
|
disconnectedCallback() {
|
|
70
70
|
this.km.detachEscapeBehavior();
|
|
71
71
|
this.km.detachClickBehavior('close');
|
|
@@ -6,9 +6,9 @@ const miBaselineClose = `<svg xmlns="http://www.w3.org/2000/svg" width="24" heig
|
|
|
6
6
|
|
|
7
7
|
class KeyboardManager {
|
|
8
8
|
constructor() {
|
|
9
|
-
this.elements =
|
|
9
|
+
this.elements = new Map();
|
|
10
10
|
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
11
|
-
if (event.code === '
|
|
11
|
+
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
12
12
|
event.target.click();
|
|
13
13
|
}
|
|
14
14
|
};
|
|
@@ -18,20 +18,25 @@ class KeyboardManager {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
this.addElement = (el, name = 'element') => {
|
|
21
|
-
|
|
21
|
+
if (!el) {
|
|
22
|
+
throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
|
|
23
|
+
}
|
|
24
|
+
this.elements.set(name, el);
|
|
25
|
+
};
|
|
26
|
+
this.removeElement = (name = 'element') => {
|
|
27
|
+
this.detachClickBehavior(name);
|
|
28
|
+
this.elements.delete(name);
|
|
22
29
|
};
|
|
23
30
|
this.attachClickBehavior = (name = 'element') => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
31
|
+
var _a;
|
|
32
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
27
33
|
};
|
|
28
34
|
this.detachClickBehavior = (name = 'element') => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
35
|
+
var _a;
|
|
36
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
32
37
|
};
|
|
33
|
-
this.attachEscapeBehavior = (
|
|
34
|
-
this.escapeCallback =
|
|
38
|
+
this.attachEscapeBehavior = (callback) => {
|
|
39
|
+
this.escapeCallback = callback;
|
|
35
40
|
if (window !== undefined) {
|
|
36
41
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
42
|
}
|
|
@@ -58,15 +63,6 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
58
63
|
this.bottom = false;
|
|
59
64
|
this.animationState = 'intro';
|
|
60
65
|
this.km = new KeyboardManager();
|
|
61
|
-
this.componentDidLoad = () => {
|
|
62
|
-
var _a;
|
|
63
|
-
this.km.addElement(this.host, 'host');
|
|
64
|
-
const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
|
|
65
|
-
if (close)
|
|
66
|
-
this.km.addElement(close, 'close');
|
|
67
|
-
this.km.attachEscapeBehavior(() => this.closeEvent.emit());
|
|
68
|
-
this.km.attachClickBehavior('close');
|
|
69
|
-
};
|
|
70
66
|
this.animationName = (customState = '', customPosition = '') => {
|
|
71
67
|
return `to-${customPosition !== '' ? customPosition : this.position}${customState !== '' ? '-' + customState : ''}`;
|
|
72
68
|
};
|
|
@@ -109,6 +105,15 @@ const MdsModal$1 = /*@__PURE__*/ proxyCustomElement(class MdsModal extends HTMLE
|
|
|
109
105
|
window.clearTimeout(this.animationDeelay);
|
|
110
106
|
}, 500);
|
|
111
107
|
}
|
|
108
|
+
componentDidLoad() {
|
|
109
|
+
var _a;
|
|
110
|
+
this.km.addElement(this.host, 'host');
|
|
111
|
+
const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
|
|
112
|
+
if (close)
|
|
113
|
+
this.km.addElement(close, 'close');
|
|
114
|
+
this.km.attachEscapeBehavior(() => this.closeEvent.emit());
|
|
115
|
+
this.km.attachClickBehavior('close');
|
|
116
|
+
}
|
|
112
117
|
disconnectedCallback() {
|
|
113
118
|
this.km.detachEscapeBehavior();
|
|
114
119
|
this.km.detachClickBehavior('close');
|
package/dist/documentation.json
CHANGED
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { b as bootstrapLazy } from './index-87610b93.js';
|
|
2
|
+
export { s as setNonce } from './index-87610b93.js';
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-87610b93.js';
|
|
2
2
|
|
|
3
3
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
4
4
|
|
|
@@ -6,9 +6,9 @@ const miBaselineClose = `<svg xmlns="http://www.w3.org/2000/svg" width="24" heig
|
|
|
6
6
|
|
|
7
7
|
class KeyboardManager {
|
|
8
8
|
constructor() {
|
|
9
|
-
this.elements =
|
|
9
|
+
this.elements = new Map();
|
|
10
10
|
this.handleClickBehaviorDispatchEvent = (event) => {
|
|
11
|
-
if (event.code === '
|
|
11
|
+
if (event.code === 'Enter' || event.code === 'NumpadEnter') {
|
|
12
12
|
event.target.click();
|
|
13
13
|
}
|
|
14
14
|
};
|
|
@@ -18,20 +18,25 @@ class KeyboardManager {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
this.addElement = (el, name = 'element') => {
|
|
21
|
-
|
|
21
|
+
if (!el) {
|
|
22
|
+
throw Error(`Passed an ${el} element parameter to KeyboardManager.addElement`);
|
|
23
|
+
}
|
|
24
|
+
this.elements.set(name, el);
|
|
25
|
+
};
|
|
26
|
+
this.removeElement = (name = 'element') => {
|
|
27
|
+
this.detachClickBehavior(name);
|
|
28
|
+
this.elements.delete(name);
|
|
22
29
|
};
|
|
23
30
|
this.attachClickBehavior = (name = 'element') => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
31
|
+
var _a;
|
|
32
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
27
33
|
};
|
|
28
34
|
this.detachClickBehavior = (name = 'element') => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
35
|
+
var _a;
|
|
36
|
+
(_a = this.elements.get(name)) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleClickBehaviorDispatchEvent);
|
|
32
37
|
};
|
|
33
|
-
this.attachEscapeBehavior = (
|
|
34
|
-
this.escapeCallback =
|
|
38
|
+
this.attachEscapeBehavior = (callback) => {
|
|
39
|
+
this.escapeCallback = callback;
|
|
35
40
|
if (window !== undefined) {
|
|
36
41
|
window.addEventListener('keydown', this.handleEscapeBehaviorDispatchEvent.bind(this));
|
|
37
42
|
}
|
|
@@ -56,15 +61,6 @@ const MdsModal = class {
|
|
|
56
61
|
this.bottom = false;
|
|
57
62
|
this.animationState = 'intro';
|
|
58
63
|
this.km = new KeyboardManager();
|
|
59
|
-
this.componentDidLoad = () => {
|
|
60
|
-
var _a;
|
|
61
|
-
this.km.addElement(this.host, 'host');
|
|
62
|
-
const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
|
|
63
|
-
if (close)
|
|
64
|
-
this.km.addElement(close, 'close');
|
|
65
|
-
this.km.attachEscapeBehavior(() => this.closeEvent.emit());
|
|
66
|
-
this.km.attachClickBehavior('close');
|
|
67
|
-
};
|
|
68
64
|
this.animationName = (customState = '', customPosition = '') => {
|
|
69
65
|
return `to-${customPosition !== '' ? customPosition : this.position}${customState !== '' ? '-' + customState : ''}`;
|
|
70
66
|
};
|
|
@@ -107,6 +103,15 @@ const MdsModal = class {
|
|
|
107
103
|
window.clearTimeout(this.animationDeelay);
|
|
108
104
|
}, 500);
|
|
109
105
|
}
|
|
106
|
+
componentDidLoad() {
|
|
107
|
+
var _a;
|
|
108
|
+
this.km.addElement(this.host, 'host');
|
|
109
|
+
const close = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.close');
|
|
110
|
+
if (close)
|
|
111
|
+
this.km.addElement(close, 'close');
|
|
112
|
+
this.km.attachEscapeBehavior(() => this.closeEvent.emit());
|
|
113
|
+
this.km.attachClickBehavior('close');
|
|
114
|
+
}
|
|
110
115
|
disconnectedCallback() {
|
|
111
116
|
this.km.detachEscapeBehavior();
|
|
112
117
|
this.km.detachClickBehavior('close');
|
package/dist/esm/mds-modal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as promiseResolve, b as bootstrapLazy } from './index-
|
|
2
|
-
export { s as setNonce } from './index-
|
|
1
|
+
import { p as promiseResolve, b as bootstrapLazy } from './index-87610b93.js';
|
|
2
|
+
export { s as setNonce } from './index-87610b93.js';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
Stencil Client Patch Browser v4.10.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function i(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,a){function o(e){try{s(t.next(e))}catch(e){a(e)}}function u(e){try{s(t["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):i(e.value).then(o,u)}s((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return s([e,n])}}function s(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1];a=u;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(u);break}if(a[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,i=n.length,a;t<i;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};var NAMESPACE="mds-modal";var scopeId;var hostTagName;var isSvgMode=false;var queuePending=false;var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}[hydrated]{visibility:inherit}";var SLOT_FB_CSS="slot-fb{display:contents}slot-fb[hidden]{display:none}";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 n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var i=null;var a=false;var o=false;var u=[];var s=function(n){for(var r=0;r<n.length;r++){i=n[r];if(Array.isArray(i)){s(i)}else if(i!=null&&typeof i!=="boolean"){if(a=typeof e!=="function"&&!isComplexType(i)){i=String(i)}if(a&&o){u[u.length-1].t+=i}else{u.push(a?newVNode(null,i):i)}o=a}}};s(r);if(n){{var f=n.className||n.class;if(f){n.class=typeof f!=="object"?f:Object.keys(f).filter((function(e){return f[e]})).join(" ")}}}var l=newVNode(e,null);l.i=n;if(u.length>0){l.o=u}return l};var newVNode=function(e,n){var r={u:0,l:e,t:n,v:null,o:null};{r.i=null}return r};var Host={};var isHost=function(e){return e&&e.l===Host};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&4){return e==="false"?false:e===""||!!e}if(n&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,n,r){var t=getElement(e);return{emit:function(e){return emitEvent(t,n,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var i=getScopeId(n);var a=styles.get(i);e=e.nodeType===11?e:doc;if(a){if(typeof a==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(i)){{u=doc.createElement("style");u.innerHTML=a;var s=(t=plt.p)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(s!=null){u.setAttribute("nonce",s)}e.insertBefore(u,e.querySelector("link"))}if(n.u&4){u.innerHTML+=SLOT_FB_CSS}if(o){o.add(i)}}}else if(!e.adoptedStyleSheets.includes(a)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[a],false)}}return i};var attachStyles=function(e){var n=e.m;var r=e.$hostElement$;var t=n.u;var i=createTime("attachStyles",n.h);var a=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=a;r.classList.add(a+"-h")}i()};var getScopeId=function(e,n){return"sc-"+e.h};var setAccessor=function(e,n,r,t,i,a){if(r!==t){var o=isMemberInElement(e,n);var u=n.toLowerCase();if(n==="class"){var s=e.classList;var f=parseClassList(r);var l=parseClassList(t);s.remove.apply(s,f.filter((function(e){return e&&!l.includes(e)})));s.add.apply(s,l.filter((function(e){return e&&!f.includes(e)})))}else if(!o&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(isMemberInElement(win,u)){n=u.slice(2)}else{n=u[2]+n.slice(3)}if(r||t){var c=n.endsWith(CAPTURE_EVENT_SUFFIX);n=n.replace(CAPTURE_EVENT_REGEX,"");if(r){plt.rel(e,n,r,c)}if(t){plt.ael(e,n,t,c)}}}else{var v=isComplexType(t);if((o||v&&t!==null)&&!i){try{if(!e.tagName.includes("-")){var d=t==null?"":t;if(n==="list"){o=false}else if(r==null||e[n]!=d){e[n]=d}}else{e[n]=t}}catch(e){}}if(t==null||t===false){if(t!==false||e.getAttribute(n)===""){{e.removeAttribute(n)}}}else if((!o||a&4||i)&&!v){t=t===true?"":t;{e.setAttribute(n,t)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var CAPTURE_EVENT_SUFFIX="Capture";var CAPTURE_EVENT_REGEX=new RegExp(CAPTURE_EVENT_SUFFIX+"$");var updateElement=function(e,n,r,t){var i=n.v.nodeType===11&&n.v.host?n.v.host:n.v;var a=e&&e.i||EMPTY_OBJ;var o=n.i||EMPTY_OBJ;{for(t in a){if(!(t in o)){setAccessor(i,t,a[t],undefined,r,n.u)}}}for(t in o){setAccessor(i,t,a[t],o[t],r,n.u)}};var createElm=function(e,n,r,t){var i=n.o[r];var a=0;var o;var u;if(i.t!==null){o=i.v=doc.createTextNode(i.t)}else{o=i.v=doc.createElement(i.l);{updateElement(null,i,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(i.o){for(a=0;a<i.o.length;++a){u=createElm(e,i,a);if(u){o.appendChild(u)}}}}o["s-hn"]=hostTagName;return o};var addVnodes=function(e,n,r,t,i,a){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;i<=a;++i){if(t[i]){u=createElm(null,r,i);if(u){t[i].v=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var i=e[t];if(i){var a=i.v;if(a){a.remove()}}}};var updateChildren=function(e,n,r,t,i){if(i===void 0){i=false}var a=0;var o=0;var u=n.length-1;var s=n[0];var f=n[u];var l=t.length-1;var c=t[0];var v=t[l];var d;while(a<=u&&o<=l){if(s==null){s=n[++a]}else if(f==null){f=n[--u]}else if(c==null){c=t[++o]}else if(v==null){v=t[--l]}else if(isSameVnode(s,c,i)){patch(s,c,i);s=n[++a];c=t[++o]}else if(isSameVnode(f,v,i)){patch(f,v,i);f=n[--u];v=t[--l]}else if(isSameVnode(s,v,i)){patch(s,v,i);e.insertBefore(s.v,f.v.nextSibling);s=n[++a];v=t[--l]}else if(isSameVnode(f,c,i)){patch(f,c,i);e.insertBefore(f.v,s.v);f=n[--u];c=t[++o]}else{{d=createElm(n&&n[o],r,o);c=t[++o]}if(d){{s.v.parentNode.insertBefore(d,s.v)}}}}if(a>u){addVnodes(e,t[l+1]==null?null:t[l+1].v,r,t,o,l)}else if(o>l){removeVnodes(n,a,u)}};var isSameVnode=function(e,n,r){if(r===void 0){r=false}if(e.l===n.l){return true}return false};var patch=function(e,n,r){if(r===void 0){r=false}var t=n.v=e.v;var i=e.o;var a=n.o;var o=n.l;var u=n.t;if(u===null){{if(o==="slot");else{updateElement(e,n,isSvgMode)}}if(i!==null&&a!==null){updateChildren(t,i,n,a,r)}else if(a!==null){if(e.t!==null){t.textContent=""}addVnodes(t,null,n,a,0,a.length-1)}else if(i!==null){removeVnodes(i,0,i.length-1)}}else if(e.t!==u){t.data=u}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var i=e.m;var a=e.S||newVNode(null,null);var o=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(i.C){o.i=o.i||{};i.C.map((function(e){var n=e[0],r=e[1];return o.i[r]=t[n]}))}if(r&&o.i){for(var u=0,s=Object.keys(o.i);u<s.length;u++){var f=s[u];if(t.hasAttribute(f)&&!["key","ref","style","class"].includes(f)){o.i[f]=t[f]}}}o.l=null;o.u|=4;e.S=o;o.v=a.v=t.shadowRoot||t;{scopeId=t["s-sc"]}patch(a,o,r)};var attachToAncestor=function(e,n){if(n&&!e.T&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.T=n})))}};var scheduleUpdate=function(e,n){{e.u|=16}if(e.u&4){e.u|=512;return}attachToAncestor(e,e._);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.m.h);var t=e.R;var i;if(n){{e.u|=256;if(e.A){e.A.map((function(e){var n=e[0],r=e[1];return safeCall(t,n,r)}));e.A=undefined}}{i=safeCall(t,"componentWillLoad")}}{i=enqueue(i,(function(){return safeCall(t,"componentWillRender")}))}r();return enqueue(i,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,i,a,o,u,s,f;return __generator(this,(function(l){i=e.$hostElement$;a=createTime("update",e.m.h);o=i["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.m.h);{callRender(e,n,i,r)}if(o){o.map((function(e){return e()}));i["s-rc"]=undefined}u();a();{s=(t=i["s-p"])!==null&&t!==void 0?t:[];f=function(){return postUpdateComponent(e)};if(s.length===0){f()}else{Promise.all(s).then(f);e.u|=4;s.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{n=n.render();{e.u&=~16}{e.u|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}return null};var postUpdateComponent=function(e){var n=e.m.h;var r=e.$hostElement$;var t=createTime("postUpdate",n);var i=e.R;var a=e._;{safeCall(i,"componentDidRender")}if(!(e.u&64)){e.u|=64;{addHydratedFlag(r)}t();{e.$(r);if(!a){appDidLoad()}}}else{t()}{if(e.T){e.T();e.T=undefined}if(e.u&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.u&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.setAttribute("hydrated","")};var getValue=function(e,n){return getHostRef(e).H.get(n)};var setValue=function(e,n,r,t){var i=getHostRef(e);var a=i.$hostElement$;var o=i.H.get(n);var u=i.u;var s=i.R;r=parsePropertyValue(r,t.V[n][0]);var f=Number.isNaN(o)&&Number.isNaN(r);var l=r!==o&&!f;if((!(u&8)||o===undefined)&&l){i.H.set(n,r);if(s){if(t.M&&u&128){var c=t.M[n];if(c){c.map((function(e){try{s[e](r,o,n)}catch(e){consoleError(e,a)}}))}}if((u&(2|16))===2){scheduleUpdate(i,false)}}}};var proxyComponent=function(e,n,r){var t;var i=e.prototype;if(n.V){if(e.watchers){n.M=e.watchers}var a=Object.entries(n.V);a.map((function(e){var t=e[0],a=e[1][0];if(a&31||r&2&&a&32){Object.defineProperty(i,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}}));if(r&1){var o=new Map;i.attributeChangedCallback=function(e,r,t){var a=this;plt.jmp((function(){var u;var s=o.get(e);if(a.hasOwnProperty(s)){t=a[s];delete a[s]}else if(i.hasOwnProperty(s)&&typeof a[s]==="number"&&a[s]==t){return}else if(s==null){var f=getHostRef(a);var l=f===null||f===void 0?void 0:f.u;if(l&&!(l&8)&&l&128&&t!==r){var c=f.R;var v=(u=n.M)===null||u===void 0?void 0:u[e];v===null||v===void 0?void 0:v.forEach((function(n){if(c[n]!=null){c[n].call(c,t,r,e)}}))}return}a[s]=t===null&&typeof a[s]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.M)!==null&&t!==void 0?t:{}),true),a.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],t=e[1];var i;var a=t[1]||r;o.set(a,r);if(t[0]&512){(i=n.C)===null||i===void 0?void 0:i.push([r,a])}return a})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var e,t,i,a,o,u,s,f;return __generator(this,(function(l){switch(l.label){case 0:if(!((n.u&32)===0))return[3,3];n.u|=32;e=loadModule(r);if(!e.then)return[3,2];t=uniqueTime();return[4,e];case 1:e=l.sent();t();l.label=2;case 2:if(!e.isProxied){{r.M=e.watchers}proxyComponent(e,r,2);e.isProxied=true}i=createTime("createInstance",r.h);{n.u|=8}try{new e(n)}catch(e){consoleError(e)}{n.u&=~8}{n.u|=128}i();if(e.style){a=e.style;o=getScopeId(r);if(!styles.has(o)){u=createTime("registerStyles",r.h);registerStyle(o,a,!!(r.u&1));u()}}l.label=3;case 3:s=n._;f=function(){return scheduleUpdate(n,true)};if(s&&s["s-rc"]){s["s-rc"].push(f)}else{f()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.u&1)===0){var n=getHostRef(e);var r=n.m;var t=createTime("connectedCallback",r.h);if(!(n.u&1)){n.u|=1;{var i=e;while(i=i.parentNode||i.host){if(i["s-p"]){attachToAncestor(n,n._=i);break}}}if(r.V){Object.entries(r.V).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var i=e[r];delete e[r];e[r]=i}}))}{initializeComponent(e,n,r)}}else{addHostEventListeners(e,n,r.k);if(n===null||n===void 0?void 0:n.R);else if(n===null||n===void 0?void 0:n.L){n.L.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){{safeCall(e,"disconnectedCallback")}};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.u&1)===0){n=getHostRef(e);{if(n.P){n.P.map((function(e){return e()}));n.P=undefined}}if(n===null||n===void 0?void 0:n.R){disconnectInstance(n.R)}else if(n===null||n===void 0?void 0:n.L){n.L.then((function(){return disconnectInstance(n.R)}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var i=[];var a=n.exclude||[];var o=win.customElements;var u=doc.head;var s=u.querySelector("meta[charset]");var f=doc.createElement("style");var l=[];var c;var v=true;Object.assign(plt,n);plt.N=new URL(n.resourcesUrl||"./",doc.baseURI).href;var d=false;e.map((function(e){e[1].map((function(n){var r;var t={u:n[0],h:n[1],V:n[2],k:n[3]};if(t.u&4){d=true}{t.V=n[2]}{t.k=n[3]}{t.C=[]}{t.M=(r=n[4])!==null&&r!==void 0?r:{}}var u=t.h;var s=function(e){__extends(n,e);function n(n){var r=e.call(this,n)||this;n=r;registerHost(n,t);if(t.u&1){{{n.attachShadow({mode:"open"})}}}return r}n.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){l.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).L};return n}(HTMLElement);t.q=e[0];if(!a.includes(u)&&!o.get(u)){i.push(u);o.define(u,proxyComponent(s,t,1))}}))}));if(d){f.innerHTML+=SLOT_FB_CSS}{f.innerHTML+=i+HYDRATED_CSS}if(f.innerHTML.length){f.setAttribute("data-styles","");var p=(r=plt.p)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(p!=null){f.setAttribute("nonce",p)}u.insertBefore(f,s?s.nextSibling:u.firstChild)}v=false;if(l.length){l.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}t()};var addHostEventListeners=function(e,n,r,t){if(r){r.map((function(r){var t=r[0],i=r[1],a=r[2];var o=getHostListenerTarget(e,t);var u=hostListenerProxy(n,a);var s=hostListenerOpts(t);plt.ael(o,i,u,s);(n.P=n.P||[]).push((function(){return plt.rel(o,i,u,s)}))}))}};var hostListenerProxy=function(e,n){return function(r){try{{if(e.u&256){e.R[n](r)}else{(e.A=e.A||[]).push([n,r])}}}catch(e){consoleError(e)}}};var getHostListenerTarget=function(e,n){if(n&4)return doc;return e};var hostListenerOpts=function(e){return(e&2)!==0};var setNonce=function(e){return plt.p=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n.R=e,n)};var registerHost=function(e,n){var r={u:0,$hostElement$:e,m:n,H:new Map};{r.L=new Promise((function(e){return r.$=e}));e["s-p"]=[];e["s-rc"]=[]}addHostEventListeners(e,r,n.k);return hostRefs.set(e,r)};var isMemberInElement=function(e,n){return n in e};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e.h.replace(/-/g,"_");var i=e.q;var a=cmpModules.get(i);if(a){return a[t]}if(!r||!BUILD.hotModuleReplacement){var o=function(e){cmpModules.set(i,e);return e[t]};switch(i){case"mds-modal":return import("./mds-modal.entry.js").then(o,consoleError)}}return import("./".concat(i,".entry.js").concat("")).then((function(e){{cmpModules.set(i,e)}return e[t]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={u:0,N:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,n,r,t){return e.addEventListener(n,r,t)},rel:function(e,n,r,t){return e.removeEventListener(n,r,t)},ce:function(e,n){return new CustomEvent(e,n)}};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,n){return function(r){e.push(r);if(!queuePending){queuePending=true;if(n&&plt.u&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var n=0;n<e.length;n++){try{e[n](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,createEvent as c,getElement as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
|
|
1
|
+
var __extends=this&&this.__extends||function(){var e=function(n,r){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r))e[r]=n[r]};return e(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(n,r);function t(){this.constructor=n}n.prototype=r===null?Object.create(r):(t.prototype=r.prototype,new t)}}();var __awaiter=this&&this.__awaiter||function(e,n,r,t){function i(e){return e instanceof r?e:new r((function(n){n(e)}))}return new(r||(r=Promise))((function(r,a){function o(e){try{s(t.next(e))}catch(e){a(e)}}function u(e){try{s(t["throw"](e))}catch(e){a(e)}}function s(e){e.done?r(e.value):i(e.value).then(o,u)}s((t=t.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},t,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(n){return s([e,n])}}function s(u){if(t)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(r=0)),r)try{if(t=1,i&&(a=u[0]&2?i["return"]:u[0]?i["throw"]||((a=i["return"])&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;if(i=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:r.label++;return{value:u[1],done:false};case 5:r.label++;i=u[1];u=[0];continue;case 7:u=r.ops.pop();r.trys.pop();continue;default:if(!(a=r.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1];a=u;break}if(a&&r.label<a[2]){r.label=a[2];r.ops.push(u);break}if(a[2])r.ops.pop();r.trys.pop();continue}u=n.call(e,r)}catch(e){u=[6,e];i=0}finally{t=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,r){if(r||arguments.length===2)for(var t=0,i=n.length,a;t<i;t++){if(a||!(t in n)){if(!a)a=Array.prototype.slice.call(n,0,t);a[t]=n[t]}}return e.concat(a||Array.prototype.slice.call(n))};var NAMESPACE="mds-modal";var scopeId;var hostTagName;var isSvgMode=false;var queuePending=false;var createTime=function(e,n){if(n===void 0){n=""}{return function(){return}}};var uniqueTime=function(e,n){{return function(){return}}};var HYDRATED_CSS="{visibility:hidden}[hydrated]{visibility:inherit}";var SLOT_FB_CSS="slot-fb{display:contents}slot-fb[hidden]{display:none}";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 n,r,t;return(t=(r=(n=e.head)===null||n===void 0?void 0:n.querySelector('meta[name="csp-nonce"]'))===null||r===void 0?void 0:r.getAttribute("content"))!==null&&t!==void 0?t:undefined}var h=function(e,n){var r=[];for(var t=2;t<arguments.length;t++){r[t-2]=arguments[t]}var i=null;var a=false;var o=false;var u=[];var s=function(n){for(var r=0;r<n.length;r++){i=n[r];if(Array.isArray(i)){s(i)}else if(i!=null&&typeof i!=="boolean"){if(a=typeof e!=="function"&&!isComplexType(i)){i=String(i)}if(a&&o){u[u.length-1].t+=i}else{u.push(a?newVNode(null,i):i)}o=a}}};s(r);if(n){{var f=n.className||n.class;if(f){n.class=typeof f!=="object"?f:Object.keys(f).filter((function(e){return f[e]})).join(" ")}}}var l=newVNode(e,null);l.i=n;if(u.length>0){l.o=u}return l};var newVNode=function(e,n){var r={u:0,l:e,t:n,v:null,o:null};{r.i=null}return r};var Host={};var isHost=function(e){return e&&e.l===Host};var parsePropertyValue=function(e,n){if(e!=null&&!isComplexType(e)){if(n&4){return e==="false"?false:e===""||!!e}if(n&1){return String(e)}return e}return e};var getElement=function(e){return getHostRef(e).$hostElement$};var createEvent=function(e,n,r){var t=getElement(e);return{emit:function(e){return emitEvent(t,n,{bubbles:!!(r&4),composed:!!(r&2),cancelable:!!(r&1),detail:e})}}};var emitEvent=function(e,n,r){var t=plt.ce(n,r);e.dispatchEvent(t);return t};var rootAppliedStyles=new WeakMap;var registerStyle=function(e,n,r){var t=styles.get(e);if(supportsConstructableStylesheets&&r){t=t||new CSSStyleSheet;if(typeof t==="string"){t=n}else{t.replaceSync(n)}}else{t=n}styles.set(e,t)};var addStyle=function(e,n,r){var t;var i=getScopeId(n);var a=styles.get(i);e=e.nodeType===11?e:doc;if(a){if(typeof a==="string"){e=e.head||e;var o=rootAppliedStyles.get(e);var u=void 0;if(!o){rootAppliedStyles.set(e,o=new Set)}if(!o.has(i)){{u=doc.createElement("style");u.innerHTML=a;var s=(t=plt.p)!==null&&t!==void 0?t:queryNonceMetaTagContent(doc);if(s!=null){u.setAttribute("nonce",s)}e.insertBefore(u,e.querySelector("link"))}if(n.u&4){u.innerHTML+=SLOT_FB_CSS}if(o){o.add(i)}}}else if(!e.adoptedStyleSheets.includes(a)){e.adoptedStyleSheets=__spreadArray(__spreadArray([],e.adoptedStyleSheets,true),[a],false)}}return i};var attachStyles=function(e){var n=e.m;var r=e.$hostElement$;var t=n.u;var i=createTime("attachStyles",n.h);var a=addStyle(r.shadowRoot?r.shadowRoot:r.getRootNode(),n);if(t&10){r["s-sc"]=a;r.classList.add(a+"-h")}i()};var getScopeId=function(e,n){return"sc-"+e.h};var setAccessor=function(e,n,r,t,i,a){if(r!==t){var o=isMemberInElement(e,n);var u=n.toLowerCase();if(n==="class"){var s=e.classList;var f=parseClassList(r);var l=parseClassList(t);s.remove.apply(s,f.filter((function(e){return e&&!l.includes(e)})));s.add.apply(s,l.filter((function(e){return e&&!f.includes(e)})))}else if(!o&&n[0]==="o"&&n[1]==="n"){if(n[2]==="-"){n=n.slice(3)}else if(isMemberInElement(win,u)){n=u.slice(2)}else{n=u[2]+n.slice(3)}if(r||t){var c=n.endsWith(CAPTURE_EVENT_SUFFIX);n=n.replace(CAPTURE_EVENT_REGEX,"");if(r){plt.rel(e,n,r,c)}if(t){plt.ael(e,n,t,c)}}}else{var v=isComplexType(t);if((o||v&&t!==null)&&!i){try{if(!e.tagName.includes("-")){var d=t==null?"":t;if(n==="list"){o=false}else if(r==null||e[n]!=d){e[n]=d}}else{e[n]=t}}catch(e){}}if(t==null||t===false){if(t!==false||e.getAttribute(n)===""){{e.removeAttribute(n)}}}else if((!o||a&4||i)&&!v){t=t===true?"":t;{e.setAttribute(n,t)}}}}};var parseClassListRegex=/\s/;var parseClassList=function(e){return!e?[]:e.split(parseClassListRegex)};var CAPTURE_EVENT_SUFFIX="Capture";var CAPTURE_EVENT_REGEX=new RegExp(CAPTURE_EVENT_SUFFIX+"$");var updateElement=function(e,n,r,t){var i=n.v.nodeType===11&&n.v.host?n.v.host:n.v;var a=e&&e.i||EMPTY_OBJ;var o=n.i||EMPTY_OBJ;{for(t in a){if(!(t in o)){setAccessor(i,t,a[t],undefined,r,n.u)}}}for(t in o){setAccessor(i,t,a[t],o[t],r,n.u)}};var createElm=function(e,n,r,t){var i=n.o[r];var a=0;var o;var u;if(i.t!==null){o=i.v=doc.createTextNode(i.t)}else{o=i.v=doc.createElement(i.l);{updateElement(null,i,isSvgMode)}if(isDef(scopeId)&&o["s-si"]!==scopeId){o.classList.add(o["s-si"]=scopeId)}if(i.o){for(a=0;a<i.o.length;++a){u=createElm(e,i,a);if(u){o.appendChild(u)}}}}o["s-hn"]=hostTagName;return o};var addVnodes=function(e,n,r,t,i,a){var o=e;var u;if(o.shadowRoot&&o.tagName===hostTagName){o=o.shadowRoot}for(;i<=a;++i){if(t[i]){u=createElm(null,r,i);if(u){t[i].v=u;o.insertBefore(u,n)}}}};var removeVnodes=function(e,n,r){for(var t=n;t<=r;++t){var i=e[t];if(i){var a=i.v;if(a){a.remove()}}}};var updateChildren=function(e,n,r,t,i){if(i===void 0){i=false}var a=0;var o=0;var u=n.length-1;var s=n[0];var f=n[u];var l=t.length-1;var c=t[0];var v=t[l];var d;while(a<=u&&o<=l){if(s==null){s=n[++a]}else if(f==null){f=n[--u]}else if(c==null){c=t[++o]}else if(v==null){v=t[--l]}else if(isSameVnode(s,c,i)){patch(s,c,i);s=n[++a];c=t[++o]}else if(isSameVnode(f,v,i)){patch(f,v,i);f=n[--u];v=t[--l]}else if(isSameVnode(s,v,i)){patch(s,v,i);e.insertBefore(s.v,f.v.nextSibling);s=n[++a];v=t[--l]}else if(isSameVnode(f,c,i)){patch(f,c,i);e.insertBefore(f.v,s.v);f=n[--u];c=t[++o]}else{{d=createElm(n&&n[o],r,o);c=t[++o]}if(d){{s.v.parentNode.insertBefore(d,s.v)}}}}if(a>u){addVnodes(e,t[l+1]==null?null:t[l+1].v,r,t,o,l)}else if(o>l){removeVnodes(n,a,u)}};var isSameVnode=function(e,n,r){if(r===void 0){r=false}if(e.l===n.l){return true}return false};var patch=function(e,n,r){if(r===void 0){r=false}var t=n.v=e.v;var i=e.o;var a=n.o;var o=n.l;var u=n.t;if(u===null){{if(o==="slot");else{updateElement(e,n,isSvgMode)}}if(i!==null&&a!==null){updateChildren(t,i,n,a,r)}else if(a!==null){if(e.t!==null){t.textContent=""}addVnodes(t,null,n,a,0,a.length-1)}else if(i!==null){removeVnodes(i,0,i.length-1)}}else if(e.t!==u){t.data=u}};var renderVdom=function(e,n,r){if(r===void 0){r=false}var t=e.$hostElement$;var i=e.m;var a=e.S||newVNode(null,null);var o=isHost(n)?n:h(null,null,n);hostTagName=t.tagName;if(i.C){o.i=o.i||{};i.C.map((function(e){var n=e[0],r=e[1];return o.i[r]=t[n]}))}if(r&&o.i){for(var u=0,s=Object.keys(o.i);u<s.length;u++){var f=s[u];if(t.hasAttribute(f)&&!["key","ref","style","class"].includes(f)){o.i[f]=t[f]}}}o.l=null;o.u|=4;e.S=o;o.v=a.v=t.shadowRoot||t;{scopeId=t["s-sc"]}patch(a,o,r)};var attachToAncestor=function(e,n){if(n&&!e.T&&n["s-p"]){n["s-p"].push(new Promise((function(n){return e.T=n})))}};var scheduleUpdate=function(e,n){{e.u|=16}if(e.u&4){e.u|=512;return}attachToAncestor(e,e._);var r=function(){return dispatchHooks(e,n)};return writeTask(r)};var dispatchHooks=function(e,n){var r=createTime("scheduleUpdate",e.m.h);var t=e.R;var i;if(n){{e.u|=256;if(e.A){e.A.map((function(e){var n=e[0],r=e[1];return safeCall(t,n,r)}));e.A=undefined}}{i=safeCall(t,"componentWillLoad")}}{i=enqueue(i,(function(){return safeCall(t,"componentWillRender")}))}r();return enqueue(i,(function(){return updateComponent(e,t,n)}))};var enqueue=function(e,n){return isPromisey(e)?e.then(n):n()};var isPromisey=function(e){return e instanceof Promise||e&&e.then&&typeof e.then==="function"};var updateComponent=function(e,n,r){return __awaiter(void 0,void 0,void 0,(function(){var t,i,a,o,u,s,f;return __generator(this,(function(l){i=e.$hostElement$;a=createTime("update",e.m.h);o=i["s-rc"];if(r){attachStyles(e)}u=createTime("render",e.m.h);{callRender(e,n,i,r)}if(o){o.map((function(e){return e()}));i["s-rc"]=undefined}u();a();{s=(t=i["s-p"])!==null&&t!==void 0?t:[];f=function(){return postUpdateComponent(e)};if(s.length===0){f()}else{Promise.all(s).then(f);e.u|=4;s.length=0}}return[2]}))}))};var callRender=function(e,n,r,t){try{n=n.render();{e.u&=~16}{e.u|=2}{{{renderVdom(e,n,t)}}}}catch(n){consoleError(n,e.$hostElement$)}return null};var postUpdateComponent=function(e){var n=e.m.h;var r=e.$hostElement$;var t=createTime("postUpdate",n);var i=e.R;var a=e._;{safeCall(i,"componentDidRender")}if(!(e.u&64)){e.u|=64;{addHydratedFlag(r)}{safeCall(i,"componentDidLoad")}t();{e.$(r);if(!a){appDidLoad()}}}else{t()}{if(e.T){e.T();e.T=undefined}if(e.u&512){nextTick((function(){return scheduleUpdate(e,false)}))}e.u&=~(4|512)}};var appDidLoad=function(e){{addHydratedFlag(doc.documentElement)}nextTick((function(){return emitEvent(win,"appload",{detail:{namespace:NAMESPACE}})}))};var safeCall=function(e,n,r){if(e&&e[n]){try{return e[n](r)}catch(e){consoleError(e)}}return undefined};var addHydratedFlag=function(e){return e.setAttribute("hydrated","")};var getValue=function(e,n){return getHostRef(e).H.get(n)};var setValue=function(e,n,r,t){var i=getHostRef(e);var a=i.$hostElement$;var o=i.H.get(n);var u=i.u;var s=i.R;r=parsePropertyValue(r,t.V[n][0]);var f=Number.isNaN(o)&&Number.isNaN(r);var l=r!==o&&!f;if((!(u&8)||o===undefined)&&l){i.H.set(n,r);if(s){if(t.M&&u&128){var c=t.M[n];if(c){c.map((function(e){try{s[e](r,o,n)}catch(e){consoleError(e,a)}}))}}if((u&(2|16))===2){scheduleUpdate(i,false)}}}};var proxyComponent=function(e,n,r){var t;var i=e.prototype;if(n.V){if(e.watchers){n.M=e.watchers}var a=Object.entries(n.V);a.map((function(e){var t=e[0],a=e[1][0];if(a&31||r&2&&a&32){Object.defineProperty(i,t,{get:function(){return getValue(this,t)},set:function(e){setValue(this,t,e,n)},configurable:true,enumerable:true})}}));if(r&1){var o=new Map;i.attributeChangedCallback=function(e,r,t){var a=this;plt.jmp((function(){var u;var s=o.get(e);if(a.hasOwnProperty(s)){t=a[s];delete a[s]}else if(i.hasOwnProperty(s)&&typeof a[s]==="number"&&a[s]==t){return}else if(s==null){var f=getHostRef(a);var l=f===null||f===void 0?void 0:f.u;if(l&&!(l&8)&&l&128&&t!==r){var c=f.R;var v=(u=n.M)===null||u===void 0?void 0:u[e];v===null||v===void 0?void 0:v.forEach((function(n){if(c[n]!=null){c[n].call(c,t,r,e)}}))}return}a[s]=t===null&&typeof a[s]==="boolean"?false:t}))};e.observedAttributes=Array.from(new Set(__spreadArray(__spreadArray([],Object.keys((t=n.M)!==null&&t!==void 0?t:{}),true),a.filter((function(e){var n=e[0],r=e[1];return r[0]&15})).map((function(e){var r=e[0],t=e[1];var i;var a=t[1]||r;o.set(a,r);if(t[0]&512){(i=n.C)===null||i===void 0?void 0:i.push([r,a])}return a})),true)))}}return e};var initializeComponent=function(e,n,r,t){return __awaiter(void 0,void 0,void 0,(function(){var e,t,i,a,o,u,s,f;return __generator(this,(function(l){switch(l.label){case 0:if(!((n.u&32)===0))return[3,3];n.u|=32;e=loadModule(r);if(!e.then)return[3,2];t=uniqueTime();return[4,e];case 1:e=l.sent();t();l.label=2;case 2:if(!e.isProxied){{r.M=e.watchers}proxyComponent(e,r,2);e.isProxied=true}i=createTime("createInstance",r.h);{n.u|=8}try{new e(n)}catch(e){consoleError(e)}{n.u&=~8}{n.u|=128}i();if(e.style){a=e.style;o=getScopeId(r);if(!styles.has(o)){u=createTime("registerStyles",r.h);registerStyle(o,a,!!(r.u&1));u()}}l.label=3;case 3:s=n._;f=function(){return scheduleUpdate(n,true)};if(s&&s["s-rc"]){s["s-rc"].push(f)}else{f()}return[2]}}))}))};var fireConnectedCallback=function(e){};var connectedCallback=function(e){if((plt.u&1)===0){var n=getHostRef(e);var r=n.m;var t=createTime("connectedCallback",r.h);if(!(n.u&1)){n.u|=1;{var i=e;while(i=i.parentNode||i.host){if(i["s-p"]){attachToAncestor(n,n._=i);break}}}if(r.V){Object.entries(r.V).map((function(n){var r=n[0],t=n[1][0];if(t&31&&e.hasOwnProperty(r)){var i=e[r];delete e[r];e[r]=i}}))}{initializeComponent(e,n,r)}}else{addHostEventListeners(e,n,r.k);if(n===null||n===void 0?void 0:n.R);else if(n===null||n===void 0?void 0:n.L){n.L.then((function(){return fireConnectedCallback()}))}}t()}};var disconnectInstance=function(e){{safeCall(e,"disconnectedCallback")}};var disconnectedCallback=function(e){return __awaiter(void 0,void 0,void 0,(function(){var n;return __generator(this,(function(r){if((plt.u&1)===0){n=getHostRef(e);{if(n.P){n.P.map((function(e){return e()}));n.P=undefined}}if(n===null||n===void 0?void 0:n.R){disconnectInstance(n.R)}else if(n===null||n===void 0?void 0:n.L){n.L.then((function(){return disconnectInstance(n.R)}))}}return[2]}))}))};var bootstrapLazy=function(e,n){if(n===void 0){n={}}var r;var t=createTime();var i=[];var a=n.exclude||[];var o=win.customElements;var u=doc.head;var s=u.querySelector("meta[charset]");var f=doc.createElement("style");var l=[];var c;var v=true;Object.assign(plt,n);plt.N=new URL(n.resourcesUrl||"./",doc.baseURI).href;var d=false;e.map((function(e){e[1].map((function(n){var r;var t={u:n[0],h:n[1],V:n[2],k:n[3]};if(t.u&4){d=true}{t.V=n[2]}{t.k=n[3]}{t.C=[]}{t.M=(r=n[4])!==null&&r!==void 0?r:{}}var u=t.h;var s=function(e){__extends(n,e);function n(n){var r=e.call(this,n)||this;n=r;registerHost(n,t);if(t.u&1){{{n.attachShadow({mode:"open"})}}}return r}n.prototype.connectedCallback=function(){var e=this;if(c){clearTimeout(c);c=null}if(v){l.push(this)}else{plt.jmp((function(){return connectedCallback(e)}))}};n.prototype.disconnectedCallback=function(){var e=this;plt.jmp((function(){return disconnectedCallback(e)}))};n.prototype.componentOnReady=function(){return getHostRef(this).L};return n}(HTMLElement);t.q=e[0];if(!a.includes(u)&&!o.get(u)){i.push(u);o.define(u,proxyComponent(s,t,1))}}))}));if(d){f.innerHTML+=SLOT_FB_CSS}{f.innerHTML+=i+HYDRATED_CSS}if(f.innerHTML.length){f.setAttribute("data-styles","");var p=(r=plt.p)!==null&&r!==void 0?r:queryNonceMetaTagContent(doc);if(p!=null){f.setAttribute("nonce",p)}u.insertBefore(f,s?s.nextSibling:u.firstChild)}v=false;if(l.length){l.map((function(e){return e.connectedCallback()}))}else{{plt.jmp((function(){return c=setTimeout(appDidLoad,30)}))}}t()};var addHostEventListeners=function(e,n,r,t){if(r){r.map((function(r){var t=r[0],i=r[1],a=r[2];var o=getHostListenerTarget(e,t);var u=hostListenerProxy(n,a);var s=hostListenerOpts(t);plt.ael(o,i,u,s);(n.P=n.P||[]).push((function(){return plt.rel(o,i,u,s)}))}))}};var hostListenerProxy=function(e,n){return function(r){try{{if(e.u&256){e.R[n](r)}else{(e.A=e.A||[]).push([n,r])}}}catch(e){consoleError(e)}}};var getHostListenerTarget=function(e,n){if(n&4)return doc;return e};var hostListenerOpts=function(e){return(e&2)!==0};var setNonce=function(e){return plt.p=e};var hostRefs=new WeakMap;var getHostRef=function(e){return hostRefs.get(e)};var registerInstance=function(e,n){return hostRefs.set(n.R=e,n)};var registerHost=function(e,n){var r={u:0,$hostElement$:e,m:n,H:new Map};{r.L=new Promise((function(e){return r.$=e}));e["s-p"]=[];e["s-rc"]=[]}addHostEventListeners(e,r,n.k);return hostRefs.set(e,r)};var isMemberInElement=function(e,n){return n in e};var consoleError=function(e,n){return(0,console.error)(e,n)};var cmpModules=new Map;var loadModule=function(e,n,r){var t=e.h.replace(/-/g,"_");var i=e.q;var a=cmpModules.get(i);if(a){return a[t]}if(!r||!BUILD.hotModuleReplacement){var o=function(e){cmpModules.set(i,e);return e[t]};switch(i){case"mds-modal":return import("./mds-modal.entry.js").then(o,consoleError)}}return import("./".concat(i,".entry.js").concat("")).then((function(e){{cmpModules.set(i,e)}return e[t]}),consoleError)};var styles=new Map;var win=typeof window!=="undefined"?window:{};var doc=win.document||{head:{}};var plt={u:0,N:"",jmp:function(e){return e()},raf:function(e){return requestAnimationFrame(e)},ael:function(e,n,r,t){return e.addEventListener(n,r,t)},rel:function(e,n,r,t){return e.removeEventListener(n,r,t)},ce:function(e,n){return new CustomEvent(e,n)}};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,n){return function(r){e.push(r);if(!queuePending){queuePending=true;if(n&&plt.u&4){nextTick(flush)}else{plt.raf(flush)}}}};var consume=function(e){for(var n=0;n<e.length;n++){try{e[n](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,createEvent as c,getElement as g,h,promiseResolve as p,registerInstance as r,setNonce as s};
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as bootstrapLazy}from"./index-
|
|
1
|
+
import{b as bootstrapLazy}from"./index-87610b93.js";export{s as setNonce}from"./index-87610b93.js";var defineCustomElements=function(e,o){if(typeof window==="undefined")return undefined;return bootstrapLazy([["mds-modal",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],o)};export{defineCustomElements};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-fd30d325.js";function r(t){var o,i,e="";if("string"==typeof t||"number"==typeof t)e+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(o=0;o<a;o++)t[o]&&(i=r(t[o]))&&(e&&(e+=" "),e+=i)}else for(i in t)t[i]&&(e&&(e+=" "),e+=i);return e}function clsx(){for(var t,o,i=0,e="",a=arguments.length;i<a;i++)(t=arguments[i])&&(o=r(t))&&(e&&(e+=" "),e+=o);return e}var miBaselineClose='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>';var KeyboardManager=function(){function t(){var t=this;this.elements=[];this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Space"||t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(o){if(o.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(o,r){if(r===void 0){r="element"}t.elements[r]=o};this.attachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].addEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.detachClickBehavior=function(o){if(o===void 0){o="element"}if(t.elements[o]){t.elements[o].removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)}};this.attachEscapeBehavior=function(o){t.escapeCallback=o;if(window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();var mdsModalCss='@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; @tailwind utilities; .svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1/1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.flex{display:-ms-flexbox;display:flex}.w-1600{width:4rem}.min-w-0{min-width:0rem}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.flex-grow{-ms-flex-positive:1;flex-grow:1}.items-center{-ms-flex-align:center;align-items:center}.gap-400{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border{border-width:1px}.border-0{border-width:0rem}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgb(var(--tone-neutral-09) / var(--tw-border-opacity))}.bg-label-amaranth-10{--tw-bg-opacity:1;background-color:rgb(var(--label-amaranth-10) / var(--tw-bg-opacity))}.bg-label-aqua-10{--tw-bg-opacity:1;background-color:rgb(var(--label-aqua-10) / var(--tw-bg-opacity))}.bg-label-blue-10{--tw-bg-opacity:1;background-color:rgb(var(--label-blue-10) / var(--tw-bg-opacity))}.bg-label-green-10{--tw-bg-opacity:1;background-color:rgb(var(--label-green-10) / var(--tw-bg-opacity))}.bg-label-lime-10{--tw-bg-opacity:1;background-color:rgb(var(--label-lime-10) / var(--tw-bg-opacity))}.bg-label-orange-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orange-10) / var(--tw-bg-opacity))}.bg-label-orchid-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orchid-10) / var(--tw-bg-opacity))}.bg-label-violet-10{--tw-bg-opacity:1;background-color:rgb(var(--label-violet-10) / var(--tw-bg-opacity))}.bg-label-yellow-10{--tw-bg-opacity:1;background-color:rgb(var(--label-yellow-10) / var(--tw-bg-opacity))}.bg-tone-neutral-10{--tw-bg-opacity:1;background-color:rgb(var(--tone-neutral-10) / var(--tw-bg-opacity))}.fill-label-amaranth-04{fill:rgb(var(--label-amaranth-04))}.fill-label-aqua-04{fill:rgb(var(--label-aqua-04))}.fill-label-blue-04{fill:rgb(var(--label-blue-04))}.fill-label-green-04{fill:rgb(var(--label-green-04))}.fill-label-lime-04{fill:rgb(var(--label-lime-04))}.fill-label-orange-04{fill:rgb(var(--label-orange-04))}.fill-label-orchid-04{fill:rgb(var(--label-orchid-04))}.fill-label-violet-04{fill:rgb(var(--label-violet-04))}.fill-label-yellow-04{fill:rgb(var(--label-yellow-04))}.fill-tone-neutral-04{fill:rgb(var(--tone-neutral-04))}.p-800{padding:2rem}.text-label-amaranth-04{--tw-text-opacity:1;color:rgb(var(--label-amaranth-04) / var(--tw-text-opacity))}.text-label-aqua-04{--tw-text-opacity:1;color:rgb(var(--label-aqua-04) / var(--tw-text-opacity))}.text-label-blue-04{--tw-text-opacity:1;color:rgb(var(--label-blue-04) / var(--tw-text-opacity))}.text-label-green-04{--tw-text-opacity:1;color:rgb(var(--label-green-04) / var(--tw-text-opacity))}.text-label-lime-04{--tw-text-opacity:1;color:rgb(var(--label-lime-04) / var(--tw-text-opacity))}.text-label-orange-04{--tw-text-opacity:1;color:rgb(var(--label-orange-04) / var(--tw-text-opacity))}.text-label-orchid-04{--tw-text-opacity:1;color:rgb(var(--label-orchid-04) / var(--tw-text-opacity))}.text-label-violet-04{--tw-text-opacity:1;color:rgb(var(--label-violet-04) / var(--tw-text-opacity))}.text-label-yellow-04{--tw-text-opacity:1;color:rgb(var(--label-yellow-04) / var(--tw-text-opacity))}.text-tone-neutral-02{--tw-text-opacity:1;color:rgb(var(--tone-neutral-02) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(var(--tone-neutral-04) / var(--tw-text-opacity))}.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{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;z-index:var(--mds-modal-z-index, 1000)}:host([position="top"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position="bottom"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}.button-close{top:0rem;border-radius:9999px;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);--mds-button-icon-color:rgb(var(--tone-neutral));--mds-button-background:transparent;height:auto;position:absolute;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transform-origin:center;transform-origin:center;-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.button-close::part(icon){height:2.25rem;width:2.25rem}.window{height:100%;gap:0rem;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;max-width:calc(100vw - 80px);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.to-bottom){padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom){-ms-flex-pack:center;justify-content:center}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot="window"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center){-ms-flex-pack:center;justify-content:center}:host(.to-center) .window,:host(.to-center)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot="window"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot="window"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .button-close,:host(.to-left-opened.to-left-outro) .button-close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .button-close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .button-close{right:0rem;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot="window"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .button-close,:host(.to-right-opened.to-right-outro) .button-close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .button-close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .button-close{left:0rem;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top){-ms-flex-pack:center;justify-content:center}:host(.to-top) .window,:host(.to-top)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot="window"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}@media (max-width: 767px){.mobile\\:w-1200{width:3rem}}';var MdsModal=function(){function t(t){var o=this;registerInstance(this,t);this.closeEvent=createEvent(this,"mdsModalClose",7);this.window=false;this.top=false;this.bottom=false;this.animationState="intro";this.km=new KeyboardManager;this.componentDidLoad=function(){var t;o.km.addElement(o.host,"host");var r=(t=o.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".close");if(r)o.km.addElement(r,"close");o.km.attachEscapeBehavior((function(){return o.closeEvent.emit()}));o.km.attachClickBehavior("close")};this.animationName=function(t,r){if(t===void 0){t=""}if(r===void 0){r=""}return"to-".concat(r!==""?r:o.position).concat(t!==""?"-"+t:"")};this.closeModal=function(t){var r;if(((r=t.target)===null||r===void 0?void 0:r.localName)!=="mds-modal"){return}o.opened=t.target!==t.currentTarget;if(!o.opened){o.closeEvent.emit()}};this.stateOpened=undefined;this.opened=false;this.position="center"}t.prototype.componentWillLoad=function(){var t;this.bottom=this.host.querySelector('[slot="bottom"]')!==null;this.top=this.host.querySelector('[slot="top"]')!==null;this.window=this.host.querySelector('[slot="window"]')!==null;this.stateOpened=this.opened;if(!this.window){this.position="right"}if(this.window){(t=this.host.querySelector('[slot="window"]'))===null||t===void 0?void 0:t.setAttribute("role","modal")}};t.prototype.componentWillRender=function(){this.animationState=this.opened?"intro":"outro";this.host.classList.add(this.animationName())};t.prototype.componentDidRender=function(){var t=this;this.animationDeelay=window.setTimeout((function(){t.animationState=t.animationState==="intro"?"outro":"intro";t.host.classList.remove(t.animationName(t.animationState==="intro"?"outro":"intro"));t.host.classList.add(t.animationName(t.animationState));window.clearTimeout(t.animationDeelay)}),500)};t.prototype.disconnectedCallback=function(){this.km.detachEscapeBehavior();this.km.detachClickBehavior("close")};t.prototype.positionChange=function(t,o){window.clearTimeout(this.animationDeelay);this.host.classList.remove(this.animationName("",o));this.host.classList.remove(this.animationName("intro",o));this.host.classList.remove(this.animationName("outro",o))};t.prototype.openedChange=function(t){this.stateOpened=t;window.clearTimeout(this.animationDeelay)};t.prototype.onModalCloseListener=function(){this.opened=false};t.prototype.onBannerCloseListener=function(){this.opened=false};t.prototype.render=function(){var t=this;return h(Host,{"aria-modal":clsx(this.opened?"true":"false"),class:clsx(this.stateOpened&&this.animationName("opened")),onClick:function(o){t.closeModal(o)}},this.window?h("slot",{name:"window"}):h("div",{class:clsx("window",(this.top||this.bottom)&&"window-".concat(this.top?"-top":"").concat(this.bottom?"-bottom":"")),role:"dialog",part:"window"},this.top&&h("slot",{name:"top"}),h("slot",null),this.bottom&&h("slot",{name:"bottom"})),!this.window&&h("mds-button",{icon:miBaselineClose,onClick:function(o){t.closeModal(o)},class:"button-close"}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{position:["positionChange"],opened:["openedChange"]}},enumerable:false,configurable:true});return t}();MdsModal.style=mdsModalCss;export{MdsModal as mds_modal};
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-87610b93.js";function r(t){var o,i,e="";if("string"==typeof t||"number"==typeof t)e+=t;else if("object"==typeof t)if(Array.isArray(t)){var a=t.length;for(o=0;o<a;o++)t[o]&&(i=r(t[o]))&&(e&&(e+=" "),e+=i)}else for(i in t)t[i]&&(e&&(e+=" "),e+=i);return e}function clsx(){for(var t,o,i=0,e="",a=arguments.length;i<a;i++)(t=arguments[i])&&(o=r(t))&&(e&&(e+=" "),e+=o);return e}var miBaselineClose='<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>';var KeyboardManager=function(){function t(){var t=this;this.elements=new Map;this.handleClickBehaviorDispatchEvent=function(t){if(t.code==="Enter"||t.code==="NumpadEnter"){t.target.click()}};this.handleEscapeBehaviorDispatchEvent=function(o){if(o.code==="Escape"&&t.escapeCallback){t.escapeCallback()}};this.addElement=function(o,r){if(r===void 0){r="element"}if(!o){throw Error("Passed an ".concat(o," element parameter to KeyboardManager.addElement"))}t.elements.set(r,o)};this.removeElement=function(o){if(o===void 0){o="element"}t.detachClickBehavior(o);t.elements.delete(o)};this.attachClickBehavior=function(o){if(o===void 0){o="element"}var r;(r=t.elements.get(o))===null||r===void 0?void 0:r.addEventListener("keydown",t.handleClickBehaviorDispatchEvent)};this.detachClickBehavior=function(o){if(o===void 0){o="element"}var r;(r=t.elements.get(o))===null||r===void 0?void 0:r.removeEventListener("keydown",t.handleClickBehaviorDispatchEvent)};this.attachEscapeBehavior=function(o){t.escapeCallback=o;if(window!==undefined){window.addEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}};this.detachEscapeBehavior=function(){t.escapeCallback=function(){return};if(window!==undefined){window.removeEventListener("keydown",t.handleEscapeBehaviorDispatchEvent.bind(t))}}}return t}();var mdsModalCss='@-webkit-keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@keyframes focus-bounce{0%,75%,100%{outline-offset:var(--magma-outline-focus-offset, 6px)}50%{outline-offset:var(--magma-outline-blur-offset, 2px)}}@tailwind components; @tailwind utilities; .svg{display:-ms-flexbox;display:flex}.svg svg{aspect-ratio:1/1;height:100%;width:100%}.animate-right-intro,.animate-right-outro{-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.flex{display:-ms-flexbox;display:flex}.w-1600{width:4rem}.min-w-0{min-width:0rem}.max-w-lg{max-width:32rem}.max-w-xl{max-width:36rem}.flex-grow{-ms-flex-positive:1;flex-grow:1}.items-center{-ms-flex-align:center;align-items:center}.gap-400{gap:1rem}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.border{border-width:1px}.border-0{border-width:0rem}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-solid{border-style:solid}.border-tone-neutral-09{--tw-border-opacity:1;border-color:rgb(var(--tone-neutral-09) / var(--tw-border-opacity))}.bg-label-amaranth-10{--tw-bg-opacity:1;background-color:rgb(var(--label-amaranth-10) / var(--tw-bg-opacity))}.bg-label-aqua-10{--tw-bg-opacity:1;background-color:rgb(var(--label-aqua-10) / var(--tw-bg-opacity))}.bg-label-blue-10{--tw-bg-opacity:1;background-color:rgb(var(--label-blue-10) / var(--tw-bg-opacity))}.bg-label-green-10{--tw-bg-opacity:1;background-color:rgb(var(--label-green-10) / var(--tw-bg-opacity))}.bg-label-lime-10{--tw-bg-opacity:1;background-color:rgb(var(--label-lime-10) / var(--tw-bg-opacity))}.bg-label-orange-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orange-10) / var(--tw-bg-opacity))}.bg-label-orchid-10{--tw-bg-opacity:1;background-color:rgb(var(--label-orchid-10) / var(--tw-bg-opacity))}.bg-label-violet-10{--tw-bg-opacity:1;background-color:rgb(var(--label-violet-10) / var(--tw-bg-opacity))}.bg-label-yellow-10{--tw-bg-opacity:1;background-color:rgb(var(--label-yellow-10) / var(--tw-bg-opacity))}.bg-tone-neutral-10{--tw-bg-opacity:1;background-color:rgb(var(--tone-neutral-10) / var(--tw-bg-opacity))}.fill-label-amaranth-04{fill:rgb(var(--label-amaranth-04))}.fill-label-aqua-04{fill:rgb(var(--label-aqua-04))}.fill-label-blue-04{fill:rgb(var(--label-blue-04))}.fill-label-green-04{fill:rgb(var(--label-green-04))}.fill-label-lime-04{fill:rgb(var(--label-lime-04))}.fill-label-orange-04{fill:rgb(var(--label-orange-04))}.fill-label-orchid-04{fill:rgb(var(--label-orchid-04))}.fill-label-violet-04{fill:rgb(var(--label-violet-04))}.fill-label-yellow-04{fill:rgb(var(--label-yellow-04))}.fill-tone-neutral-04{fill:rgb(var(--tone-neutral-04))}.p-800{padding:2rem}.text-label-amaranth-04{--tw-text-opacity:1;color:rgb(var(--label-amaranth-04) / var(--tw-text-opacity))}.text-label-aqua-04{--tw-text-opacity:1;color:rgb(var(--label-aqua-04) / var(--tw-text-opacity))}.text-label-blue-04{--tw-text-opacity:1;color:rgb(var(--label-blue-04) / var(--tw-text-opacity))}.text-label-green-04{--tw-text-opacity:1;color:rgb(var(--label-green-04) / var(--tw-text-opacity))}.text-label-lime-04{--tw-text-opacity:1;color:rgb(var(--label-lime-04) / var(--tw-text-opacity))}.text-label-orange-04{--tw-text-opacity:1;color:rgb(var(--label-orange-04) / var(--tw-text-opacity))}.text-label-orchid-04{--tw-text-opacity:1;color:rgb(var(--label-orchid-04) / var(--tw-text-opacity))}.text-label-violet-04{--tw-text-opacity:1;color:rgb(var(--label-violet-04) / var(--tw-text-opacity))}.text-label-yellow-04{--tw-text-opacity:1;color:rgb(var(--label-yellow-04) / var(--tw-text-opacity))}.text-tone-neutral-02{--tw-text-opacity:1;color:rgb(var(--tone-neutral-02) / var(--tw-text-opacity))}.text-tone-neutral-04{--tw-text-opacity:1;color:rgb(var(--tone-neutral-04) / var(--tw-text-opacity))}.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{--mds-modal-overlay-color:var(--magma-overlay-color, 0 0 0);--mds-modal-overlay-opacity:var(--magma-overlay-opacity, 0.5);--mds-modal-window-background:rgb(var(--tone-neutral));--mds-modal-window-overflow:auto;--mds-modal-window-shadow:0 25px 50px -12px rgb(0 0 0 / 0.25);--mds-modal-z-index:var(--magma-modal-z-index);-webkit-transition-duration:700ms;transition-duration:700ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1);-ms-flex-align:center;align-items:center;background-color:rgba(var(--mds-modal-overlay-color) / 0);display:-ms-flexbox;display:flex;fill:rgb(var(--tone-neutral));inset:0;-ms-flex-pack:center;justify-content:center;-webkit-perspective:600px;perspective:600px;pointer-events:none;position:fixed;z-index:var(--mds-modal-z-index, 1000)}:host([position="top"]){-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}:host([position="bottom"]){-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}:host(.to-bottom-opened),:host(.to-center-opened),:host(.to-left-opened),:host(.to-right-opened),:host(.to-top-opened){-webkit-transition-duration:500ms;transition-duration:500ms;background-color:rgba(var(--mds-modal-overlay-color) / var(--mds-modal-overlay-opacity));pointer-events:auto}.button-close{top:0rem;border-radius:9999px;opacity:0;-webkit-transition-duration:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);transition-timing-function:cubic-bezier(0.77, 0, 0.175, 1);--mds-button-icon-color:rgb(var(--tone-neutral));--mds-button-background:transparent;height:auto;position:absolute;-webkit-transform:translate(0, 24px) rotate(90deg);transform:translate(0, 24px) rotate(90deg);-webkit-transform-origin:center;transform-origin:center;-webkit-transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, -webkit-transform;transition-property:opacity, outline, outline-offset, transform;transition-property:opacity, outline, outline-offset, transform, -webkit-transform}.button-close::part(icon){height:2.25rem;width:2.25rem}.window{height:100%;gap:0rem;background-color:var(--mds-modal-window-background);-webkit-box-shadow:var(--mds-modal-window-shadow);box-shadow:var(--mds-modal-window-shadow);display:grid;grid-template-rows:1fr;max-width:calc(100vw - 80px);overflow:var(--mds-modal-window-overflow)}.window--top{grid-template-rows:auto 1fr}.window--bottom{grid-template-rows:1fr auto}.window--top-bottom{grid-template-rows:auto 1fr auto}:host(.to-bottom){padding:2rem}@media (max-width: 767px){:host(.to-bottom){padding:1rem}}:host(.to-bottom){-ms-flex-pack:center;justify-content:center}:host(.to-bottom) .window,:host(.to-bottom)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-bottom-intro) .window,:host(.to-bottom-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-bottom-opened.to-bottom-outro) .window,:host(.to-bottom-opened.to-bottom-outro)>::slotted([slot="window"]),:host(.to-bottom-opened) .window,:host(.to-bottom-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-bottom-outro) .window,:host(.to-bottom-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-center){padding:2rem}@media (max-width: 767px){:host(.to-center){padding:1rem}}:host(.to-center){-ms-flex-pack:center;justify-content:center}:host(.to-center) .window,:host(.to-center)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-center-intro) .window,:host(.to-center-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-center-opened.to-center-outro) .window,:host(.to-center-opened.to-center-outro)>::slotted([slot="window"]),:host(.to-center-opened) .window,:host(.to-center-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-center-outro) .window,:host(.to-center-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}:host(.to-left){-ms-flex-pack:start;justify-content:flex-start}:host(.to-left) .window,:host(.to-left)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-left-intro) .window,:host(.to-left-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-opened.to-left-outro) .window,:host(.to-left-opened.to-left-outro)>::slotted([slot="window"]),:host(.to-left-opened) .window,:host(.to-left-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-left-opened) .button-close,:host(.to-left-opened.to-left-outro) .button-close{opacity:1;-webkit-transform:translate(-24px, 24px) rotate(0);transform:translate(-24px, 24px) rotate(0)}:host(.to-left-outro) .window,:host(.to-left-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(-100% - 50px));transform:translateX(calc(-100% - 50px))}:host(.to-left-outro) .button-close{-webkit-transform:translate(24px, 24px) rotate(-90deg);transform:translate(24px, 24px) rotate(-90deg)}:host(.to-left) .button-close{right:0rem;-webkit-transform:translate(36px, 24px) rotate(90deg);transform:translate(36px, 24px) rotate(90deg)}:host(.to-right){-ms-flex-pack:end;justify-content:flex-end}:host(.to-right) .window,:host(.to-right)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-right-intro) .window,:host(.to-right-intro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-opened.to-right-outro) .window,:host(.to-right-opened.to-right-outro)>::slotted([slot="window"]),:host(.to-right-opened) .window,:host(.to-right-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}:host(.to-right-opened) .button-close,:host(.to-right-opened.to-right-outro) .button-close{opacity:1;-webkit-transform:translate(24px, 24px) rotate(0);transform:translate(24px, 24px) rotate(0)}:host(.to-right-outro) .window,:host(.to-right-outro)>::slotted([slot="window"]){-webkit-transform:translateX(calc(100% + 50px));transform:translateX(calc(100% + 50px))}:host(.to-right-outro) .button-close{-webkit-transform:translate(-24px, 24px) rotate(90deg);transform:translate(-24px, 24px) rotate(90deg)}:host(.to-right) .button-close{left:0rem;-webkit-transform:translate(-36px, 24px) rotate(-90deg);transform:translate(-36px, 24px) rotate(-90deg)}:host(.to-top){padding:2rem}@media (max-width: 767px){:host(.to-top){padding:1rem}}:host(.to-top){-ms-flex-pack:center;justify-content:center}:host(.to-top) .window,:host(.to-top)>::slotted([slot="window"]){opacity:0;-webkit-transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, color, fill, height, margin, opacity, padding, width, -webkit-box-shadow, -webkit-transform;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width;transition-property:background-color, border-color, box-shadow, color, fill, height, margin, opacity, padding, transform, width, -webkit-box-shadow, -webkit-transform;-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:500ms;transition-duration:500ms;-webkit-transition-timing-function:cubic-bezier(1, 0, 0, 1);transition-timing-function:cubic-bezier(1, 0, 0, 1)}:host(.to-top-intro) .window,:host(.to-top-intro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(40%);transform:rotateX(-22deg) scale(0.5) translateY(40%)}:host(.to-top-opened.to-top-outro) .window,:host(.to-top-opened.to-top-outro)>::slotted([slot="window"]),:host(.to-top-opened) .window,:host(.to-top-opened)>::slotted([slot="window"]){opacity:1;-webkit-transform:rotateX(0) scale(1) translateY(0);transform:rotateX(0) scale(1) translateY(0)}:host(.to-top-outro) .window,:host(.to-top-outro)>::slotted([slot="window"]){-webkit-transform:rotateX(-22deg) scale(0.5) translateY(-40%);transform:rotateX(-22deg) scale(0.5) translateY(-40%)}@media (max-width: 767px){.mobile\\:w-1200{width:3rem}}';var MdsModal=function(){function t(t){var o=this;registerInstance(this,t);this.closeEvent=createEvent(this,"mdsModalClose",7);this.window=false;this.top=false;this.bottom=false;this.animationState="intro";this.km=new KeyboardManager;this.animationName=function(t,r){if(t===void 0){t=""}if(r===void 0){r=""}return"to-".concat(r!==""?r:o.position).concat(t!==""?"-"+t:"")};this.closeModal=function(t){var r;if(((r=t.target)===null||r===void 0?void 0:r.localName)!=="mds-modal"){return}o.opened=t.target!==t.currentTarget;if(!o.opened){o.closeEvent.emit()}};this.stateOpened=undefined;this.opened=false;this.position="center"}t.prototype.componentWillLoad=function(){var t;this.bottom=this.host.querySelector('[slot="bottom"]')!==null;this.top=this.host.querySelector('[slot="top"]')!==null;this.window=this.host.querySelector('[slot="window"]')!==null;this.stateOpened=this.opened;if(!this.window){this.position="right"}if(this.window){(t=this.host.querySelector('[slot="window"]'))===null||t===void 0?void 0:t.setAttribute("role","modal")}};t.prototype.componentWillRender=function(){this.animationState=this.opened?"intro":"outro";this.host.classList.add(this.animationName())};t.prototype.componentDidRender=function(){var t=this;this.animationDeelay=window.setTimeout((function(){t.animationState=t.animationState==="intro"?"outro":"intro";t.host.classList.remove(t.animationName(t.animationState==="intro"?"outro":"intro"));t.host.classList.add(t.animationName(t.animationState));window.clearTimeout(t.animationDeelay)}),500)};t.prototype.componentDidLoad=function(){var t=this;var o;this.km.addElement(this.host,"host");var r=(o=this.host.shadowRoot)===null||o===void 0?void 0:o.querySelector(".close");if(r)this.km.addElement(r,"close");this.km.attachEscapeBehavior((function(){return t.closeEvent.emit()}));this.km.attachClickBehavior("close")};t.prototype.disconnectedCallback=function(){this.km.detachEscapeBehavior();this.km.detachClickBehavior("close")};t.prototype.positionChange=function(t,o){window.clearTimeout(this.animationDeelay);this.host.classList.remove(this.animationName("",o));this.host.classList.remove(this.animationName("intro",o));this.host.classList.remove(this.animationName("outro",o))};t.prototype.openedChange=function(t){this.stateOpened=t;window.clearTimeout(this.animationDeelay)};t.prototype.onModalCloseListener=function(){this.opened=false};t.prototype.onBannerCloseListener=function(){this.opened=false};t.prototype.render=function(){var t=this;return h(Host,{"aria-modal":clsx(this.opened?"true":"false"),class:clsx(this.stateOpened&&this.animationName("opened")),onClick:function(o){t.closeModal(o)}},this.window?h("slot",{name:"window"}):h("div",{class:clsx("window",(this.top||this.bottom)&&"window-".concat(this.top?"-top":"").concat(this.bottom?"-bottom":"")),role:"dialog",part:"window"},this.top&&h("slot",{name:"top"}),h("slot",null),this.bottom&&h("slot",{name:"bottom"})),!this.window&&h("mds-button",{icon:miBaselineClose,onClick:function(o){t.closeModal(o)},class:"button-close"}))};Object.defineProperty(t.prototype,"host",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{position:["positionChange"],opened:["openedChange"]}},enumerable:false,configurable:true});return t}();MdsModal.style=mdsModalCss;export{MdsModal as mds_modal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as promiseResolve,b as bootstrapLazy}from"./index-
|
|
1
|
+
import{p as promiseResolve,b as bootstrapLazy}from"./index-87610b93.js";export{s as setNonce}from"./index-87610b93.js";var patchBrowser=function(){var e=import.meta.url;var o={};if(e!==""){o.resourcesUrl=new URL(".",e).href}return promiseResolve(o)};patchBrowser().then((function(e){return bootstrapLazy([["mds-modal",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],e)}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as o}from"./p-
|
|
1
|
+
import{p as e,b as o}from"./p-e0a585ff.js";export{s as setNonce}from"./p-e0a585ff.js";(()=>{const o=import.meta.url,n={};return""!==o&&(n.resourcesUrl=new URL(".",o).href),e(n)})().then((e=>o([["p-fe4c6a90",[[1,"mds-modal",{opened:[1540],position:[1537],stateOpened:[32]},[[4,"mdsModalClose","onModalCloseListener"],[4,"mdsBannerClose","onBannerCloseListener"]],{position:["positionChange"],opened:["openedChange"]}]]]],e)));
|