@vonage/vivid 5.3.0 → 5.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion-item/definition.js +1 -1
- package/alert/definition.cjs +1 -1
- package/alert/definition.js +2 -2
- package/badge/definition.js +1 -1
- package/banner/definition.js +1 -1
- package/bundled/calendar-picker.template.cjs +7 -7
- package/bundled/calendar-picker.template.js +101 -101
- package/bundled/definition11.cjs +13 -13
- package/bundled/definition11.js +202 -50
- package/bundled/definition19.cjs +24 -25
- package/bundled/definition19.js +152 -164
- package/bundled/definition6.cjs +3 -3
- package/bundled/definition6.js +19 -19
- package/bundled/definition9.cjs +5 -5
- package/bundled/definition9.js +394 -392
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +82 -102
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +18 -14
- package/bundled/vivid-element.cjs +5 -1
- package/bundled/vivid-element.js +401 -358
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +14 -14
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/color-picker/definition.cjs +1 -1
- package/color-picker/definition.js +1 -1
- package/combobox/definition.cjs +7 -27
- package/combobox/definition.js +8 -28
- package/combobox/index.cjs +6 -6
- package/combobox/index.js +57 -71
- package/custom-elements.json +305 -2
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/dialog/definition.cjs +2 -2
- package/dialog/definition.js +2 -2
- package/dialog/index.cjs +7 -7
- package/dialog/index.js +6 -6
- package/elevation/definition.cjs +1 -1
- package/elevation/definition.js +1 -1
- package/fab/definition.js +1 -1
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/index.cjs +3 -4
- package/index.js +2 -3
- package/lib/accordion/accordion.d.ts +1 -1
- package/lib/accordion/definition.d.ts +1 -1
- package/lib/audio-player/audio-player.d.ts +1 -1
- package/lib/combobox/combobox.d.ts +1 -0
- package/lib/combobox/combobox.options.d.ts +1 -1
- package/lib/divider/divider.d.ts +1 -1
- package/lib/menu-item/menu-item-role.d.ts +1 -1
- package/lib/popup/popup.d.ts +1 -1
- package/lib/searchable-select/locale.d.ts +4 -0
- package/lib/searchable-select/searchable-select.d.ts +3 -0
- package/lib/select/select.d.ts +3 -1
- package/lib/slider/slider.d.ts +1 -1
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/text-area/text-area.d.ts +1 -1
- package/lib/text-field/text-field.d.ts +1 -1
- package/locales/de-DE.cjs +4 -0
- package/locales/de-DE.js +4 -0
- package/locales/en-GB.cjs +4 -0
- package/locales/en-GB.js +4 -0
- package/locales/en-US.cjs +4 -0
- package/locales/en-US.js +4 -0
- package/locales/ja-JP.cjs +4 -0
- package/locales/ja-JP.js +4 -0
- package/locales/zh-CN.cjs +4 -0
- package/locales/zh-CN.js +4 -0
- package/menu/definition.cjs +4 -4
- package/menu/definition.js +4 -4
- package/nav-disclosure/definition.js +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.js +1 -1
- package/number-field/definition.js +1 -1
- package/option/definition.cjs +6 -77
- package/option/definition.js +3 -78
- package/package.json +31 -5
- package/popup/definition.cjs +2 -2
- package/popup/definition.js +2 -2
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/rich-text-editor/definition.cjs +2 -3
- package/rich-text-editor/definition.js +1 -2
- package/rich-text-editor/index.cjs +27 -27
- package/rich-text-editor/index.js +1208 -1198
- package/searchable-select/definition.cjs +103 -11
- package/searchable-select/definition.js +103 -11
- package/searchable-select/index.cjs +81 -69
- package/searchable-select/index.js +359 -273
- package/select/definition.cjs +24 -41
- package/select/definition.js +24 -41
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/shared/aria/aria-mixin.d.ts +1 -1
- package/shared/foundation/listbox/listbox.d.ts +4 -0
- package/simple-color-picker/definition.cjs +1 -1
- package/simple-color-picker/definition.js +1 -1
- package/slider/definition.cjs +1 -1
- package/slider/definition.js +1 -1
- package/split-button/definition.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/tab/definition.js +1 -1
- package/tag/definition.js +1 -1
- package/text-field/definition.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/toggletip/definition.cjs +1 -1
- package/toggletip/definition.js +1 -1
- package/tooltip/definition.cjs +1 -1
- package/tooltip/definition.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +1 -1
- package/tree-view/definition.js +1 -1
- package/unbundled/affix.js +1 -1
- package/unbundled/calendar-picker.template.cjs +1 -1
- package/unbundled/calendar-picker.template.js +1 -1
- package/unbundled/definition.js +1 -1
- package/unbundled/definition2.js +1 -1
- package/unbundled/definition3.cjs +222 -141
- package/unbundled/definition3.js +220 -139
- package/unbundled/definition4.cjs +145 -235
- package/unbundled/definition4.js +143 -233
- package/unbundled/definition5.cjs +269 -27
- package/unbundled/definition5.js +267 -26
- package/unbundled/definition6.cjs +56 -0
- package/unbundled/definition6.js +52 -0
- package/unbundled/listbox.cjs +41 -63
- package/unbundled/listbox.js +39 -61
- package/unbundled/picker-field.template.cjs +1 -1
- package/unbundled/picker-field.template.js +1 -1
- package/unbundled/slider.template.cjs +1 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/vivid-element.cjs +1 -1
- package/unbundled/vivid-element.js +1 -1
- package/video-player/definition.cjs +56 -16
- package/video-player/definition.js +56 -16
- package/video-player/index.cjs +36 -36
- package/video-player/index.js +2461 -2445
- package/vivid.api.json +285 -38
- package/bundled/option.cjs +0 -1
- package/bundled/option.js +0 -158
- package/unbundled/option.cjs +0 -217
- package/unbundled/option.js +0 -214
package/bundled/vivid-element.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
let
|
|
1
|
+
let I;
|
|
2
2
|
const ft = "fast-kernel";
|
|
3
3
|
try {
|
|
4
4
|
if (document.currentScript)
|
|
5
|
-
|
|
5
|
+
I = document.currentScript.getAttribute(ft);
|
|
6
6
|
else {
|
|
7
7
|
const i = document.getElementsByTagName("script");
|
|
8
|
-
|
|
8
|
+
I = i[i.length - 1].getAttribute(ft);
|
|
9
9
|
}
|
|
10
10
|
} catch {
|
|
11
|
-
|
|
11
|
+
I = "isolate";
|
|
12
12
|
}
|
|
13
|
-
let
|
|
14
|
-
switch (
|
|
13
|
+
let N;
|
|
14
|
+
switch (I) {
|
|
15
15
|
case "share":
|
|
16
|
-
|
|
16
|
+
N = Object.freeze({
|
|
17
17
|
updateQueue: 1,
|
|
18
18
|
observable: 2,
|
|
19
19
|
contextEvent: 3,
|
|
@@ -21,7 +21,7 @@ switch (F) {
|
|
|
21
21
|
});
|
|
22
22
|
break;
|
|
23
23
|
case "share-v2":
|
|
24
|
-
|
|
24
|
+
N = Object.freeze({
|
|
25
25
|
updateQueue: 1.2,
|
|
26
26
|
observable: 2.2,
|
|
27
27
|
contextEvent: 3.2,
|
|
@@ -30,7 +30,7 @@ switch (F) {
|
|
|
30
30
|
break;
|
|
31
31
|
default:
|
|
32
32
|
const i = `-${Math.random().toString(36).substring(2, 8)}`;
|
|
33
|
-
|
|
33
|
+
N = Object.freeze({
|
|
34
34
|
updateQueue: `1.2${i}`,
|
|
35
35
|
observable: `2.2${i}`,
|
|
36
36
|
contextEvent: `3.2${i}`,
|
|
@@ -40,11 +40,11 @@ switch (F) {
|
|
|
40
40
|
}
|
|
41
41
|
const O = (i) => typeof i == "function", B = (i) => typeof i == "string", pe = () => {
|
|
42
42
|
};
|
|
43
|
-
var
|
|
44
|
-
function
|
|
43
|
+
var tt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
44
|
+
function di(i) {
|
|
45
45
|
return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function hi(i) {
|
|
48
48
|
if (i.__esModule) return i;
|
|
49
49
|
var t = i.default;
|
|
50
50
|
if (typeof t == "function") {
|
|
@@ -65,8 +65,8 @@ function ci(i) {
|
|
|
65
65
|
}
|
|
66
66
|
(function() {
|
|
67
67
|
if (!(typeof globalThis < "u"))
|
|
68
|
-
if (typeof
|
|
69
|
-
|
|
68
|
+
if (typeof tt < "u")
|
|
69
|
+
tt.globalThis = tt;
|
|
70
70
|
else if (typeof self < "u")
|
|
71
71
|
self.globalThis = self;
|
|
72
72
|
else if (typeof window < "u")
|
|
@@ -76,21 +76,21 @@ function ci(i) {
|
|
|
76
76
|
t.globalThis = t;
|
|
77
77
|
}
|
|
78
78
|
})();
|
|
79
|
-
const
|
|
79
|
+
const Dt = {
|
|
80
80
|
configurable: !1,
|
|
81
81
|
enumerable: !1,
|
|
82
82
|
writable: !1
|
|
83
83
|
};
|
|
84
|
-
globalThis.FAST === void 0 && Reflect.defineProperty(globalThis, "FAST", Object.assign({ value: /* @__PURE__ */ Object.create(null) },
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
84
|
+
globalThis.FAST === void 0 && Reflect.defineProperty(globalThis, "FAST", Object.assign({ value: /* @__PURE__ */ Object.create(null) }, Dt));
|
|
85
|
+
const y = globalThis.FAST;
|
|
86
|
+
if (y.getById === void 0) {
|
|
87
87
|
const i = /* @__PURE__ */ Object.create(null);
|
|
88
|
-
Reflect.defineProperty(
|
|
88
|
+
Reflect.defineProperty(y, "getById", Object.assign({ value(t, e) {
|
|
89
89
|
let s = i[t];
|
|
90
90
|
return s === void 0 && (s = e ? i[t] = e() : null), s;
|
|
91
|
-
} },
|
|
91
|
+
} }, Dt));
|
|
92
92
|
}
|
|
93
|
-
|
|
93
|
+
y.error === void 0 && Object.assign(y, {
|
|
94
94
|
warn() {
|
|
95
95
|
},
|
|
96
96
|
error(i) {
|
|
@@ -99,8 +99,8 @@ g.error === void 0 && Object.assign(g, {
|
|
|
99
99
|
addMessages() {
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
|
-
const
|
|
103
|
-
function
|
|
102
|
+
const ui = Object.freeze([]);
|
|
103
|
+
function Pt() {
|
|
104
104
|
const i = /* @__PURE__ */ new Map();
|
|
105
105
|
return Object.freeze({
|
|
106
106
|
register(t) {
|
|
@@ -131,7 +131,7 @@ function zt() {
|
|
|
131
131
|
function x(i) {
|
|
132
132
|
i.prototype.toJSON = pe;
|
|
133
133
|
}
|
|
134
|
-
const
|
|
134
|
+
const g = Object.freeze({
|
|
135
135
|
/**
|
|
136
136
|
* Not aspected.
|
|
137
137
|
*/
|
|
@@ -169,7 +169,7 @@ let H = Object.freeze({
|
|
|
169
169
|
return s;
|
|
170
170
|
}
|
|
171
171
|
});
|
|
172
|
-
const ge = H,
|
|
172
|
+
const ge = H, T = Object.freeze({
|
|
173
173
|
/**
|
|
174
174
|
* Gets the dom policy used by the templating system.
|
|
175
175
|
*/
|
|
@@ -185,7 +185,7 @@ const ge = H, $ = Object.freeze({
|
|
|
185
185
|
*/
|
|
186
186
|
setPolicy(i) {
|
|
187
187
|
if (H !== ge)
|
|
188
|
-
throw
|
|
188
|
+
throw y.error(
|
|
189
189
|
1201
|
|
190
190
|
/* Message.onlySetDOMPolicyOnce */
|
|
191
191
|
);
|
|
@@ -214,7 +214,7 @@ const ge = H, $ = Object.freeze({
|
|
|
214
214
|
setBooleanAttribute(i, t, e) {
|
|
215
215
|
e ? i.setAttribute(t, "") : i.removeAttribute(t);
|
|
216
216
|
}
|
|
217
|
-
}), Ut =
|
|
217
|
+
}), Ut = y.getById(N.updateQueue, () => {
|
|
218
218
|
const i = [], t = [], e = globalThis.requestAnimationFrame;
|
|
219
219
|
let s = !0;
|
|
220
220
|
function n() {
|
|
@@ -351,7 +351,7 @@ class Wt {
|
|
|
351
351
|
e ? (s = this.subscribers[e]) === null || s === void 0 || s.unsubscribe(t) : (n = this.subjectSubscribers) === null || n === void 0 || n.unsubscribe(t);
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
const
|
|
354
|
+
const J = Object.freeze({
|
|
355
355
|
/**
|
|
356
356
|
* The source to controller lifetime relationship is unknown.
|
|
357
357
|
*/
|
|
@@ -361,10 +361,10 @@ const G = Object.freeze({
|
|
|
361
361
|
* They can/will be GC'd together.
|
|
362
362
|
*/
|
|
363
363
|
coupled: 1
|
|
364
|
-
}),
|
|
364
|
+
}), b = y.getById(N.observable, () => {
|
|
365
365
|
const i = Ut.enqueue, t = /(:|&&|\|\||if|\?\.)/, e = /* @__PURE__ */ new WeakMap();
|
|
366
366
|
let s, n = (l) => {
|
|
367
|
-
throw
|
|
367
|
+
throw y.error(
|
|
368
368
|
1101
|
|
369
369
|
/* Message.needsArrayObservation */
|
|
370
370
|
);
|
|
@@ -383,11 +383,11 @@ const G = Object.freeze({
|
|
|
383
383
|
return s !== void 0 && s.watch(o, this.name), o[this.field];
|
|
384
384
|
}
|
|
385
385
|
setValue(o, h) {
|
|
386
|
-
const u = this.field,
|
|
387
|
-
if (
|
|
386
|
+
const u = this.field, p = o[u];
|
|
387
|
+
if (p !== h) {
|
|
388
388
|
o[u] = h;
|
|
389
|
-
const
|
|
390
|
-
O(
|
|
389
|
+
const $ = o[this.callback];
|
|
390
|
+
O($) && $.call(o, p, h), r(o).notify(this.name);
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
}
|
|
@@ -404,7 +404,7 @@ const G = Object.freeze({
|
|
|
404
404
|
return !o.isBound && this.requiresUnbind(o) && o.onUnbind(this), h;
|
|
405
405
|
}
|
|
406
406
|
requiresUnbind(o) {
|
|
407
|
-
return o.sourceLifetime !==
|
|
407
|
+
return o.sourceLifetime !== J.coupled || this.first !== this.last || this.first.propertySource !== o.source;
|
|
408
408
|
}
|
|
409
409
|
unbind(o) {
|
|
410
410
|
this.dispose();
|
|
@@ -413,13 +413,13 @@ const G = Object.freeze({
|
|
|
413
413
|
this.needsRefresh && this.last !== null && this.dispose();
|
|
414
414
|
const u = s;
|
|
415
415
|
s = this.needsRefresh ? this : void 0, this.needsRefresh = this.isVolatileBinding;
|
|
416
|
-
let
|
|
416
|
+
let p;
|
|
417
417
|
try {
|
|
418
|
-
|
|
418
|
+
p = this.expression(o, h);
|
|
419
419
|
} finally {
|
|
420
420
|
s = u;
|
|
421
421
|
}
|
|
422
|
-
return
|
|
422
|
+
return p;
|
|
423
423
|
}
|
|
424
424
|
// backwards compat with v1 kernel
|
|
425
425
|
disconnect() {
|
|
@@ -434,15 +434,15 @@ const G = Object.freeze({
|
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
watch(o, h) {
|
|
437
|
-
const u = this.last,
|
|
438
|
-
if (
|
|
437
|
+
const u = this.last, p = r(o), $ = u === null ? this.first : {};
|
|
438
|
+
if ($.propertySource = o, $.propertyName = h, $.notifier = p, p.subscribe(this, h), u !== null) {
|
|
439
439
|
if (!this.needsRefresh) {
|
|
440
440
|
let ut;
|
|
441
441
|
s = void 0, ut = u.propertySource[u.propertyName], s = this, o === ut && (this.needsRefresh = !0);
|
|
442
442
|
}
|
|
443
|
-
u.next =
|
|
443
|
+
u.next = $;
|
|
444
444
|
}
|
|
445
|
-
this.last =
|
|
445
|
+
this.last = $;
|
|
446
446
|
}
|
|
447
447
|
handleChange() {
|
|
448
448
|
this.needsQueue ? (this.needsQueue = !1, i(this)) : this.isAsync || this.call();
|
|
@@ -535,17 +535,17 @@ const G = Object.freeze({
|
|
|
535
535
|
}
|
|
536
536
|
});
|
|
537
537
|
});
|
|
538
|
-
function
|
|
539
|
-
|
|
538
|
+
function fi(i, t) {
|
|
539
|
+
b.defineProperty(i, t);
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function pi(i, t, e) {
|
|
542
542
|
return Object.assign({}, e, {
|
|
543
543
|
get() {
|
|
544
|
-
return
|
|
544
|
+
return b.trackVolatile(), e.get.apply(this);
|
|
545
545
|
}
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
|
-
const bt =
|
|
548
|
+
const bt = y.getById(N.contextEvent, () => {
|
|
549
549
|
let i = null;
|
|
550
550
|
return {
|
|
551
551
|
get() {
|
|
@@ -555,7 +555,7 @@ const bt = g.getById(k.contextEvent, () => {
|
|
|
555
555
|
i = t;
|
|
556
556
|
}
|
|
557
557
|
};
|
|
558
|
-
}),
|
|
558
|
+
}), E = Object.freeze({
|
|
559
559
|
/**
|
|
560
560
|
* A default execution context.
|
|
561
561
|
*/
|
|
@@ -563,7 +563,7 @@ const bt = g.getById(k.contextEvent, () => {
|
|
|
563
563
|
index: 0,
|
|
564
564
|
length: 0,
|
|
565
565
|
get event() {
|
|
566
|
-
return
|
|
566
|
+
return E.getEvent();
|
|
567
567
|
},
|
|
568
568
|
eventDetail() {
|
|
569
569
|
return this.event.detail;
|
|
@@ -600,10 +600,10 @@ class lt {
|
|
|
600
600
|
}
|
|
601
601
|
class ye extends lt {
|
|
602
602
|
createObserver(t) {
|
|
603
|
-
return
|
|
603
|
+
return b.binding(this.evaluate, t, this.isVolatile);
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
function qt(i, t, e =
|
|
606
|
+
function qt(i, t, e = b.isVolatileBinding(i)) {
|
|
607
607
|
return new ye(i, t, e);
|
|
608
608
|
}
|
|
609
609
|
class Qt extends lt {
|
|
@@ -620,15 +620,15 @@ function Gt(i, t) {
|
|
|
620
620
|
}
|
|
621
621
|
let gt;
|
|
622
622
|
function Jt(i) {
|
|
623
|
-
return i.map((t) => t instanceof
|
|
623
|
+
return i.map((t) => t instanceof m ? Jt(t.styles) : [t]).reduce((t, e) => t.concat(e), []);
|
|
624
624
|
}
|
|
625
|
-
class
|
|
625
|
+
class m {
|
|
626
626
|
/**
|
|
627
627
|
* Creates an instance of ElementStyles.
|
|
628
628
|
* @param styles - The styles that will be associated with elements.
|
|
629
629
|
*/
|
|
630
630
|
constructor(t) {
|
|
631
|
-
this.styles = t, this.targets = /* @__PURE__ */ new WeakSet(), this._strategy = null, this.behaviors = t.map((e) => e instanceof
|
|
631
|
+
this.styles = t, this.targets = /* @__PURE__ */ new WeakSet(), this._strategy = null, this.behaviors = t.map((e) => e instanceof m ? e.behaviors : null).reduce((e, s) => s === null ? e : e === null ? s : e.concat(s), null);
|
|
632
632
|
}
|
|
633
633
|
/**
|
|
634
634
|
* Gets the StyleStrategy associated with these element styles.
|
|
@@ -675,15 +675,15 @@ class v {
|
|
|
675
675
|
* @returns A singular ElementStyles instance or undefined.
|
|
676
676
|
*/
|
|
677
677
|
static normalize(t) {
|
|
678
|
-
return t === void 0 ? void 0 : Array.isArray(t) ? new
|
|
678
|
+
return t === void 0 ? void 0 : Array.isArray(t) ? new m(t) : t instanceof m ? t : new m([t]);
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
|
|
681
|
+
m.supportsAdoptedStyleSheets = Array.isArray(document.adoptedStyleSheets) && "replace" in CSSStyleSheet.prototype;
|
|
682
682
|
const yt = /fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/, vt = /fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/, mt = /fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/, wt = /fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/, St = /^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/, Ct = /fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;
|
|
683
683
|
function $t(i) {
|
|
684
684
|
return i && i.nodeType === Node.COMMENT_NODE;
|
|
685
685
|
}
|
|
686
|
-
const
|
|
686
|
+
const w = Object.freeze({
|
|
687
687
|
attributeMarkerName: "data-fe-b",
|
|
688
688
|
attributeBindingSeparator: " ",
|
|
689
689
|
contentBindingStartMarker(i, t) {
|
|
@@ -747,10 +747,10 @@ const m = Object.freeze({
|
|
|
747
747
|
* the binding index or null if the index cannot be retrieved.
|
|
748
748
|
*/
|
|
749
749
|
parseContentBindingStartMarker(i) {
|
|
750
|
-
return
|
|
750
|
+
return Nt(yt, i);
|
|
751
751
|
},
|
|
752
752
|
parseContentBindingEndMarker(i) {
|
|
753
|
-
return
|
|
753
|
+
return Nt(vt, i);
|
|
754
754
|
},
|
|
755
755
|
/**
|
|
756
756
|
* Parses the index of a repeat directive from a content string.
|
|
@@ -765,29 +765,29 @@ const m = Object.freeze({
|
|
|
765
765
|
* Parses element Id from element boundary markers
|
|
766
766
|
*/
|
|
767
767
|
parseElementBoundaryStartMarker(i) {
|
|
768
|
-
return
|
|
768
|
+
return kt(St, i.trim());
|
|
769
769
|
},
|
|
770
770
|
parseElementBoundaryEndMarker(i) {
|
|
771
|
-
return
|
|
771
|
+
return kt(Ct, i);
|
|
772
772
|
}
|
|
773
773
|
});
|
|
774
774
|
function Tt(i, t) {
|
|
775
775
|
const e = i.exec(t);
|
|
776
776
|
return e === null ? e : parseInt(e[1]);
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function kt(i, t) {
|
|
779
779
|
const e = i.exec(t);
|
|
780
780
|
return e === null ? e : e[1];
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function Nt(i, t) {
|
|
783
783
|
const e = i.exec(t);
|
|
784
784
|
return e === null ? e : [parseInt(e[1]), e[2]];
|
|
785
785
|
}
|
|
786
|
-
const
|
|
787
|
-
function
|
|
788
|
-
return i[
|
|
786
|
+
const z = Symbol.for("fe-hydration");
|
|
787
|
+
function U(i) {
|
|
788
|
+
return i[z] === z;
|
|
789
789
|
}
|
|
790
|
-
const ct = `fast-${Math.random().toString(36).substring(2, 8)}`,
|
|
790
|
+
const ct = `fast-${Math.random().toString(36).substring(2, 8)}`, D = `${ct}{`, _ = `}${ct}`, ve = _.length;
|
|
791
791
|
let me = 0;
|
|
792
792
|
const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
793
793
|
/**
|
|
@@ -797,7 +797,7 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
797
797
|
* @remarks
|
|
798
798
|
* Used internally by binding directives.
|
|
799
799
|
*/
|
|
800
|
-
interpolation: (i) => `${
|
|
800
|
+
interpolation: (i) => `${D}${i}${_}`,
|
|
801
801
|
/**
|
|
802
802
|
* Creates a placeholder that manifests itself as an attribute on an
|
|
803
803
|
* element.
|
|
@@ -806,15 +806,15 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
806
806
|
* @remarks
|
|
807
807
|
* Used internally by attribute directives such as `ref`, `slotted`, and `children`.
|
|
808
808
|
*/
|
|
809
|
-
attribute: (i) => `${L()}="${
|
|
809
|
+
attribute: (i) => `${L()}="${D}${i}${_}"`,
|
|
810
810
|
/**
|
|
811
811
|
* Creates a placeholder that manifests itself as a marker within the DOM structure.
|
|
812
812
|
* @param index - The directive index to create the placeholder for.
|
|
813
813
|
* @remarks
|
|
814
814
|
* Used internally by structural directives such as `repeat`.
|
|
815
815
|
*/
|
|
816
|
-
comment: (i) => `<!--${
|
|
817
|
-
}),
|
|
816
|
+
comment: (i) => `<!--${D}${i}${_}-->`
|
|
817
|
+
}), K = Object.freeze({
|
|
818
818
|
/**
|
|
819
819
|
* Parses text content or HTML attribute content, separating out the static strings
|
|
820
820
|
* from the directives.
|
|
@@ -824,7 +824,7 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
824
824
|
* directives or null if no directives are found in the string.
|
|
825
825
|
*/
|
|
826
826
|
parse(i, t) {
|
|
827
|
-
const e = i.split(
|
|
827
|
+
const e = i.split(D);
|
|
828
828
|
if (e.length === 1)
|
|
829
829
|
return null;
|
|
830
830
|
const s = [];
|
|
@@ -841,24 +841,24 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
841
841
|
}
|
|
842
842
|
return s;
|
|
843
843
|
}
|
|
844
|
-
}),
|
|
844
|
+
}), et = Pt(), k = Object.freeze({
|
|
845
845
|
/**
|
|
846
846
|
* Gets the directive definition associated with the instance.
|
|
847
847
|
* @param instance - The directive instance to retrieve the definition for.
|
|
848
848
|
*/
|
|
849
|
-
getForInstance:
|
|
849
|
+
getForInstance: et.getForInstance,
|
|
850
850
|
/**
|
|
851
851
|
* Gets the directive definition associated with the specified type.
|
|
852
852
|
* @param type - The directive type to retrieve the definition for.
|
|
853
853
|
*/
|
|
854
|
-
getByType:
|
|
854
|
+
getByType: et.getByType,
|
|
855
855
|
/**
|
|
856
856
|
* Defines an HTMLDirective based on the options.
|
|
857
857
|
* @param type - The type to define as a directive.
|
|
858
858
|
* @param options - Options that specify the directive's application.
|
|
859
859
|
*/
|
|
860
860
|
define(i, t) {
|
|
861
|
-
return t = t || {}, t.type = i,
|
|
861
|
+
return t = t || {}, t.type = i, et.register(t), i;
|
|
862
862
|
},
|
|
863
863
|
/**
|
|
864
864
|
*
|
|
@@ -869,21 +869,21 @@ const L = () => `${ct}-${++me}`, Kt = Object.freeze({
|
|
|
869
869
|
*/
|
|
870
870
|
assignAspect(i, t) {
|
|
871
871
|
if (!t) {
|
|
872
|
-
i.aspectType =
|
|
872
|
+
i.aspectType = g.content;
|
|
873
873
|
return;
|
|
874
874
|
}
|
|
875
875
|
switch (i.sourceAspect = t, t[0]) {
|
|
876
876
|
case ":":
|
|
877
|
-
i.targetAspect = t.substring(1), i.aspectType = i.targetAspect === "classList" ?
|
|
877
|
+
i.targetAspect = t.substring(1), i.aspectType = i.targetAspect === "classList" ? g.tokenList : g.property;
|
|
878
878
|
break;
|
|
879
879
|
case "?":
|
|
880
|
-
i.targetAspect = t.substring(1), i.aspectType =
|
|
880
|
+
i.targetAspect = t.substring(1), i.aspectType = g.booleanAttribute;
|
|
881
881
|
break;
|
|
882
882
|
case "@":
|
|
883
|
-
i.targetAspect = t.substring(1), i.aspectType =
|
|
883
|
+
i.targetAspect = t.substring(1), i.aspectType = g.event;
|
|
884
884
|
break;
|
|
885
885
|
default:
|
|
886
|
-
i.targetAspect = t, i.aspectType =
|
|
886
|
+
i.targetAspect = t, i.aspectType = g.attribute;
|
|
887
887
|
break;
|
|
888
888
|
}
|
|
889
889
|
}
|
|
@@ -956,23 +956,23 @@ function Ce(i, t, e) {
|
|
|
956
956
|
}
|
|
957
957
|
function $e(i, t, e) {
|
|
958
958
|
var s;
|
|
959
|
-
const n = (s =
|
|
959
|
+
const n = (s = w.parseAttributeBinding(i)) !== null && s !== void 0 ? s : w.parseEnumeratedAttributeBinding(i);
|
|
960
960
|
if (n !== null) {
|
|
961
961
|
for (const r of n) {
|
|
962
962
|
if (!t[r])
|
|
963
963
|
throw new Xt(`HydrationView was unable to successfully target factory on ${i.nodeName} inside ${i.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`, t, i);
|
|
964
|
-
|
|
964
|
+
W(t[r], i, e);
|
|
965
965
|
}
|
|
966
|
-
i.removeAttribute(
|
|
966
|
+
i.removeAttribute(w.attributeMarkerName);
|
|
967
967
|
}
|
|
968
968
|
}
|
|
969
969
|
function Te(i, t, e, s, n) {
|
|
970
|
-
if (
|
|
971
|
-
|
|
970
|
+
if (w.isElementBoundaryStartMarker(i)) {
|
|
971
|
+
ke(i, t);
|
|
972
972
|
return;
|
|
973
973
|
}
|
|
974
|
-
if (
|
|
975
|
-
const r =
|
|
974
|
+
if (w.isContentBindingStartMarker(i.data)) {
|
|
975
|
+
const r = w.parseContentBindingStartMarker(i.data);
|
|
976
976
|
if (r === null)
|
|
977
977
|
return;
|
|
978
978
|
const [a, c] = r, d = e[a], l = [];
|
|
@@ -981,7 +981,7 @@ function Te(i, t, e, s, n) {
|
|
|
981
981
|
const h = o;
|
|
982
982
|
for (; o !== null; ) {
|
|
983
983
|
if (dt(o)) {
|
|
984
|
-
const u =
|
|
984
|
+
const u = w.parseContentBindingEndMarker(o.data);
|
|
985
985
|
if (u && u[1] === c)
|
|
986
986
|
break;
|
|
987
987
|
}
|
|
@@ -992,30 +992,30 @@ function Te(i, t, e, s, n) {
|
|
|
992
992
|
throw new Error(`Error hydrating Comment node inside "${Se(u) ? u.host.nodeName : u.nodeName}".`);
|
|
993
993
|
}
|
|
994
994
|
if (o.data = "", l.length === 1 && Yt(l[0]))
|
|
995
|
-
|
|
995
|
+
W(d, l[0], s);
|
|
996
996
|
else {
|
|
997
997
|
o !== h && o.previousSibling !== null && (n[d.targetNodeId] = {
|
|
998
998
|
first: h,
|
|
999
999
|
last: o.previousSibling
|
|
1000
1000
|
});
|
|
1001
1001
|
const u = o.parentNode.insertBefore(document.createTextNode(""), o);
|
|
1002
|
-
|
|
1002
|
+
W(d, u, s);
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1007
|
-
const e =
|
|
1006
|
+
function ke(i, t) {
|
|
1007
|
+
const e = w.parseElementBoundaryStartMarker(i.data);
|
|
1008
1008
|
let s = t.nextSibling();
|
|
1009
1009
|
for (; s !== null; ) {
|
|
1010
1010
|
if (dt(s)) {
|
|
1011
|
-
const n =
|
|
1011
|
+
const n = w.parseElementBoundaryEndMarker(s.data);
|
|
1012
1012
|
if (n && n === e)
|
|
1013
1013
|
break;
|
|
1014
1014
|
}
|
|
1015
1015
|
s = t.nextSibling();
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function W(i, t, e) {
|
|
1019
1019
|
if (i.targetNodeId === void 0)
|
|
1020
1020
|
throw new Error("Factory could not be target to the node");
|
|
1021
1021
|
e[i.targetNodeId] = t;
|
|
@@ -1039,7 +1039,7 @@ class ee {
|
|
|
1039
1039
|
* The current event within an event handler.
|
|
1040
1040
|
*/
|
|
1041
1041
|
get event() {
|
|
1042
|
-
return
|
|
1042
|
+
return E.getEvent();
|
|
1043
1043
|
}
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Indicates whether the current item within a repeat context
|
|
@@ -1089,14 +1089,14 @@ class ee {
|
|
|
1089
1089
|
return this.event.target;
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
|
-
class
|
|
1092
|
+
class X extends ee {
|
|
1093
1093
|
/**
|
|
1094
1094
|
* Constructs an instance of HTMLView.
|
|
1095
1095
|
* @param fragment - The html fragment that contains the nodes for this view.
|
|
1096
1096
|
* @param behaviors - The behaviors to be applied to this view.
|
|
1097
1097
|
*/
|
|
1098
1098
|
constructor(t, e, s) {
|
|
1099
|
-
super(), this.fragment = t, this.factories = e, this.targets = s, this.behaviors = null, this.unbindables = [], this.source = null, this.isBound = !1, this.sourceLifetime =
|
|
1099
|
+
super(), this.fragment = t, this.factories = e, this.targets = s, this.behaviors = null, this.unbindables = [], this.source = null, this.isBound = !1, this.sourceLifetime = J.unknown, this.context = this, this.firstChild = t.firstChild, this.lastChild = t.lastChild;
|
|
1100
1100
|
}
|
|
1101
1101
|
/**
|
|
1102
1102
|
* Appends the view's DOM nodes to the referenced node.
|
|
@@ -1191,22 +1191,22 @@ class K extends ee {
|
|
|
1191
1191
|
}
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
|
-
x(
|
|
1195
|
-
|
|
1196
|
-
|
|
1194
|
+
x(X);
|
|
1195
|
+
b.defineProperty(X.prototype, "index");
|
|
1196
|
+
b.defineProperty(X.prototype, "length");
|
|
1197
1197
|
const A = {
|
|
1198
1198
|
unhydrated: "unhydrated",
|
|
1199
1199
|
hydrating: "hydrating",
|
|
1200
1200
|
hydrated: "hydrated"
|
|
1201
1201
|
};
|
|
1202
|
-
class
|
|
1202
|
+
class Ne extends Error {
|
|
1203
1203
|
constructor(t, e, s, n) {
|
|
1204
1204
|
super(t), this.factory = e, this.fragment = s, this.templateString = n;
|
|
1205
1205
|
}
|
|
1206
1206
|
}
|
|
1207
1207
|
class Be extends ee {
|
|
1208
1208
|
constructor(t, e, s, n) {
|
|
1209
|
-
super(), this.firstChild = t, this.lastChild = e, this.sourceTemplate = s, this.hostBindingTarget = n, this[te] =
|
|
1209
|
+
super(), this.firstChild = t, this.lastChild = e, this.sourceTemplate = s, this.hostBindingTarget = n, this[te] = z, this.context = this, this.source = null, this.isBound = !1, this.sourceLifetime = J.unknown, this.unbindables = [], this.fragment = null, this.behaviors = null, this._hydrationStage = A.unhydrated, this._bindingViewBoundaries = {}, this._targets = {}, this.factories = s.compile().factories;
|
|
1210
1210
|
}
|
|
1211
1211
|
get hydrationStage() {
|
|
1212
1212
|
return this._hydrationStage;
|
|
@@ -1255,38 +1255,49 @@ class Be extends ee {
|
|
|
1255
1255
|
t.appendChild(e);
|
|
1256
1256
|
}
|
|
1257
1257
|
bind(t, e = this) {
|
|
1258
|
-
var s
|
|
1258
|
+
var s;
|
|
1259
1259
|
if (this.hydrationStage !== A.hydrated && (this._hydrationStage = A.hydrating), this.source === t)
|
|
1260
1260
|
return;
|
|
1261
|
-
let
|
|
1262
|
-
if (
|
|
1261
|
+
let n = this.behaviors;
|
|
1262
|
+
if (n === null) {
|
|
1263
1263
|
this.source = t, this.context = e;
|
|
1264
1264
|
try {
|
|
1265
|
-
const { targets:
|
|
1266
|
-
this._targets =
|
|
1267
|
-
} catch (
|
|
1268
|
-
if (
|
|
1269
|
-
let
|
|
1270
|
-
typeof
|
|
1265
|
+
const { targets: a, boundaries: c } = Ce(this.firstChild, this.lastChild, this.factories);
|
|
1266
|
+
this._targets = a, this._bindingViewBoundaries = c;
|
|
1267
|
+
} catch (a) {
|
|
1268
|
+
if (a instanceof Xt) {
|
|
1269
|
+
let c = this.sourceTemplate.html;
|
|
1270
|
+
typeof c != "string" && (c = c.innerHTML), a.templateString = c;
|
|
1271
1271
|
}
|
|
1272
|
-
throw
|
|
1272
|
+
throw a;
|
|
1273
1273
|
}
|
|
1274
|
-
this.behaviors =
|
|
1275
|
-
const
|
|
1276
|
-
for (let
|
|
1277
|
-
const
|
|
1278
|
-
if (
|
|
1279
|
-
const
|
|
1280
|
-
|
|
1274
|
+
this.behaviors = n = new Array(this.factories.length);
|
|
1275
|
+
const r = this.factories;
|
|
1276
|
+
for (let a = 0, c = r.length; a < c; ++a) {
|
|
1277
|
+
const d = r[a];
|
|
1278
|
+
if (d.targetNodeId === "h" && this.hostBindingTarget && W(d, this.hostBindingTarget, this._targets), d.targetNodeId in this.targets) {
|
|
1279
|
+
const l = d.createBehavior();
|
|
1280
|
+
l.bind(this), n[a] = l;
|
|
1281
1281
|
} else {
|
|
1282
|
-
let
|
|
1283
|
-
|
|
1282
|
+
let l = this.sourceTemplate.html;
|
|
1283
|
+
typeof l != "string" && (l = l.innerHTML);
|
|
1284
|
+
const o = ((s = this.firstChild) === null || s === void 0 ? void 0 : s.getRootNode()).host, h = o?.nodeName || "unknown", u = d, p = [
|
|
1285
|
+
`HydrationView was unable to successfully target bindings inside "<${h.toLowerCase()}>".`,
|
|
1286
|
+
`
|
|
1287
|
+
Mismatch Details:`,
|
|
1288
|
+
` - Expected target node ID: "${d.targetNodeId}"`,
|
|
1289
|
+
` - Available target IDs: [${Object.keys(this.targets).join(", ") || "none"}]`
|
|
1290
|
+
];
|
|
1291
|
+
throw d.targetTagName && p.push(` - Expected tag name: "${d.targetTagName}"`), u.sourceAspect && p.push(` - Source aspect: "${u.sourceAspect}"`), u.aspectType !== void 0 && p.push(` - Aspect type: ${u.aspectType}`), p.push(`
|
|
1292
|
+
This usually means:`, " 1. The server-rendered HTML doesn't match the client template", " 2. The hydration markers are missing or corrupted", " 3. The DOM structure was modified before hydration", `
|
|
1293
|
+
Template: ${l.slice(0, 200)}${l.length > 200 ? "..." : ""}`), new Ne(p.join(`
|
|
1294
|
+
`), d, Zt(this.firstChild, this.lastChild).cloneContents(), l);
|
|
1284
1295
|
}
|
|
1285
1296
|
}
|
|
1286
1297
|
} else {
|
|
1287
1298
|
this.source !== null && this.evaluateUnbindables(), this.isBound = !1, this.source = t, this.context = e;
|
|
1288
|
-
for (let
|
|
1289
|
-
r
|
|
1299
|
+
for (let r = 0, a = n.length; r < a; ++r)
|
|
1300
|
+
n[r].bind(this);
|
|
1290
1301
|
}
|
|
1291
1302
|
this.isBound = !0, this._hydrationStage = A.hydrated;
|
|
1292
1303
|
}
|
|
@@ -1310,7 +1321,7 @@ class Be extends ee {
|
|
|
1310
1321
|
t.length = 0;
|
|
1311
1322
|
}
|
|
1312
1323
|
}
|
|
1313
|
-
te =
|
|
1324
|
+
te = z;
|
|
1314
1325
|
x(Be);
|
|
1315
1326
|
function xe(i) {
|
|
1316
1327
|
return i.create !== void 0;
|
|
@@ -1320,7 +1331,7 @@ function Ae(i, t, e, s) {
|
|
|
1320
1331
|
i.textContent = "";
|
|
1321
1332
|
let n = i.$fastView;
|
|
1322
1333
|
if (n === void 0)
|
|
1323
|
-
if (
|
|
1334
|
+
if (U(s) && U(e) && s.bindingViewBoundaries[this.targetNodeId] !== void 0 && s.hydrationStage !== A.hydrated) {
|
|
1324
1335
|
const r = s.bindingViewBoundaries[this.targetNodeId];
|
|
1325
1336
|
n = e.hydrate(r.first, r.last);
|
|
1326
1337
|
} else
|
|
@@ -1333,7 +1344,7 @@ function Ae(i, t, e, s) {
|
|
|
1333
1344
|
n !== void 0 && n.isComposed && (n.isComposed = !1, n.remove(), n.needsBindOnly ? n.needsBindOnly = !1 : n.unbind()), i.textContent = e;
|
|
1334
1345
|
}
|
|
1335
1346
|
}
|
|
1336
|
-
function
|
|
1347
|
+
function Me(i, t, e) {
|
|
1337
1348
|
var s;
|
|
1338
1349
|
const n = `${this.id}-t`, r = (s = i[n]) !== null && s !== void 0 ? s : i[n] = { v: 0, cv: /* @__PURE__ */ Object.create(null) }, a = r.cv;
|
|
1339
1350
|
let c = r.v;
|
|
@@ -1351,22 +1362,22 @@ function Ee(i, t, e) {
|
|
|
1351
1362
|
a[l] === c && d.remove(l);
|
|
1352
1363
|
}
|
|
1353
1364
|
}
|
|
1354
|
-
const
|
|
1355
|
-
[
|
|
1356
|
-
[
|
|
1357
|
-
[
|
|
1358
|
-
[
|
|
1359
|
-
[
|
|
1360
|
-
[
|
|
1365
|
+
const Ee = {
|
|
1366
|
+
[g.attribute]: T.setAttribute,
|
|
1367
|
+
[g.booleanAttribute]: T.setBooleanAttribute,
|
|
1368
|
+
[g.property]: (i, t, e) => i[t] = e,
|
|
1369
|
+
[g.content]: Ae,
|
|
1370
|
+
[g.tokenList]: Me,
|
|
1371
|
+
[g.event]: () => {
|
|
1361
1372
|
}
|
|
1362
1373
|
};
|
|
1363
|
-
class
|
|
1374
|
+
class M {
|
|
1364
1375
|
/**
|
|
1365
1376
|
* Creates an instance of HTMLBindingDirective.
|
|
1366
1377
|
* @param dataBinding - The binding configuration to apply.
|
|
1367
1378
|
*/
|
|
1368
1379
|
constructor(t) {
|
|
1369
|
-
this.dataBinding = t, this.updateTarget = null, this.aspectType =
|
|
1380
|
+
this.dataBinding = t, this.updateTarget = null, this.aspectType = g.content;
|
|
1370
1381
|
}
|
|
1371
1382
|
/**
|
|
1372
1383
|
* Creates HTML to be used within a template.
|
|
@@ -1381,9 +1392,9 @@ class E {
|
|
|
1381
1392
|
createBehavior() {
|
|
1382
1393
|
var t;
|
|
1383
1394
|
if (this.updateTarget === null) {
|
|
1384
|
-
const e =
|
|
1395
|
+
const e = Ee[this.aspectType], s = (t = this.dataBinding.policy) !== null && t !== void 0 ? t : this.policy;
|
|
1385
1396
|
if (!e)
|
|
1386
|
-
throw
|
|
1397
|
+
throw y.error(
|
|
1387
1398
|
1205
|
|
1388
1399
|
/* Message.unsupportedBindingBehavior */
|
|
1389
1400
|
);
|
|
@@ -1394,16 +1405,16 @@ class E {
|
|
|
1394
1405
|
/** @internal */
|
|
1395
1406
|
bind(t) {
|
|
1396
1407
|
var e;
|
|
1397
|
-
const s = t.targets[this.targetNodeId], n =
|
|
1408
|
+
const s = t.targets[this.targetNodeId], n = U(t) && t.hydrationStage && t.hydrationStage !== A.hydrated;
|
|
1398
1409
|
switch (this.aspectType) {
|
|
1399
|
-
case
|
|
1410
|
+
case g.event:
|
|
1400
1411
|
s[this.data] = t, s.addEventListener(this.targetAspect, this, this.dataBinding.options);
|
|
1401
1412
|
break;
|
|
1402
|
-
case
|
|
1413
|
+
case g.content:
|
|
1403
1414
|
t.onUnbind(this);
|
|
1404
1415
|
default:
|
|
1405
1416
|
const r = (e = s[this.data]) !== null && e !== void 0 ? e : s[this.data] = this.dataBinding.createObserver(this, this);
|
|
1406
|
-
if (r.target = s, r.controller = t, n && (this.aspectType ===
|
|
1417
|
+
if (r.target = s, r.controller = t, n && (this.aspectType === g.attribute || this.aspectType === g.booleanAttribute)) {
|
|
1407
1418
|
r.bind(t);
|
|
1408
1419
|
break;
|
|
1409
1420
|
}
|
|
@@ -1420,9 +1431,9 @@ class E {
|
|
|
1420
1431
|
handleEvent(t) {
|
|
1421
1432
|
const e = t.currentTarget[this.data];
|
|
1422
1433
|
if (e.isBound) {
|
|
1423
|
-
|
|
1434
|
+
E.setEvent(t);
|
|
1424
1435
|
const s = this.dataBinding.evaluate(e.source, e.context);
|
|
1425
|
-
|
|
1436
|
+
E.setEvent(null), s !== !0 && t.preventDefault();
|
|
1426
1437
|
}
|
|
1427
1438
|
}
|
|
1428
1439
|
/** @internal */
|
|
@@ -1431,13 +1442,13 @@ class E {
|
|
|
1431
1442
|
this.updateTarget(s, this.targetAspect, e.bind(n), n);
|
|
1432
1443
|
}
|
|
1433
1444
|
}
|
|
1434
|
-
|
|
1435
|
-
const ie = (i, t) => `${i}.${t}`, Bt = {},
|
|
1445
|
+
k.define(M, { aspected: !0 });
|
|
1446
|
+
const ie = (i, t) => `${i}.${t}`, Bt = {}, S = {
|
|
1436
1447
|
index: 0,
|
|
1437
1448
|
node: null
|
|
1438
1449
|
};
|
|
1439
1450
|
function xt(i) {
|
|
1440
|
-
i.startsWith("fast-") ||
|
|
1451
|
+
i.startsWith("fast-") || y.warn(1204, { name: i });
|
|
1441
1452
|
}
|
|
1442
1453
|
const Oe = new Proxy(document.createElement("div"), {
|
|
1443
1454
|
get(i, t) {
|
|
@@ -1487,36 +1498,36 @@ class _e {
|
|
|
1487
1498
|
s.r = e, s.h = t ?? Oe;
|
|
1488
1499
|
for (const n of this.nodeIds)
|
|
1489
1500
|
s[n];
|
|
1490
|
-
return new
|
|
1501
|
+
return new X(e, this.factories, s);
|
|
1491
1502
|
}
|
|
1492
1503
|
}
|
|
1493
1504
|
function se(i, t, e, s, n, r = !1) {
|
|
1494
1505
|
const a = e.attributes, c = i.directives;
|
|
1495
1506
|
for (let d = 0, l = a.length; d < l; ++d) {
|
|
1496
|
-
const o = a[d], h = o.value, u =
|
|
1497
|
-
let
|
|
1498
|
-
u === null ? r && (
|
|
1507
|
+
const o = a[d], h = o.value, u = K.parse(h, c);
|
|
1508
|
+
let p = null;
|
|
1509
|
+
u === null ? r && (p = new M(Gt(() => h, i.policy)), k.assignAspect(p, o.name)) : p = ht.aggregate(u, i.policy), p !== null && (e.removeAttributeNode(o), d--, l--, i.addFactory(p, t, s, n, e.tagName));
|
|
1499
1510
|
}
|
|
1500
1511
|
}
|
|
1501
1512
|
function Re(i, t, e, s, n) {
|
|
1502
|
-
const r =
|
|
1513
|
+
const r = K.parse(t.textContent, i.directives);
|
|
1503
1514
|
if (r === null)
|
|
1504
|
-
return
|
|
1515
|
+
return S.node = t.nextSibling, S.index = n + 1, S;
|
|
1505
1516
|
let a, c = a = t;
|
|
1506
1517
|
for (let d = 0, l = r.length; d < l; ++d) {
|
|
1507
1518
|
const o = r[d];
|
|
1508
|
-
d !== 0 && (n++, s = ie(e, n), a = c.parentNode.insertBefore(document.createTextNode(""), c.nextSibling)), B(o) ? a.textContent = o : (a.textContent = " ",
|
|
1519
|
+
d !== 0 && (n++, s = ie(e, n), a = c.parentNode.insertBefore(document.createTextNode(""), c.nextSibling)), B(o) ? a.textContent = o : (a.textContent = " ", k.assignAspect(o), i.addFactory(o, e, s, n, null)), c = a;
|
|
1509
1520
|
}
|
|
1510
|
-
return
|
|
1521
|
+
return S.index = n + 1, S.node = c.nextSibling, S;
|
|
1511
1522
|
}
|
|
1512
1523
|
function ne(i, t, e) {
|
|
1513
1524
|
let s = 0, n = t.firstChild;
|
|
1514
1525
|
for (; n; ) {
|
|
1515
|
-
const r =
|
|
1526
|
+
const r = je(i, e, n, s);
|
|
1516
1527
|
n = r.node, s = r.index;
|
|
1517
1528
|
}
|
|
1518
1529
|
}
|
|
1519
|
-
function
|
|
1530
|
+
function je(i, t, e, s) {
|
|
1520
1531
|
const n = ie(t, s);
|
|
1521
1532
|
switch (e.nodeType) {
|
|
1522
1533
|
case 1:
|
|
@@ -1525,7 +1536,7 @@ function Ve(i, t, e, s) {
|
|
|
1525
1536
|
case 3:
|
|
1526
1537
|
return Re(i, e, t, n, s);
|
|
1527
1538
|
case 8:
|
|
1528
|
-
const r =
|
|
1539
|
+
const r = K.parse(e.data, i.directives);
|
|
1529
1540
|
r !== null && i.addFactory(
|
|
1530
1541
|
/* eslint-disable-next-line @typescript-eslint/no-use-before-define */
|
|
1531
1542
|
ht.aggregate(r),
|
|
@@ -1536,10 +1547,10 @@ function Ve(i, t, e, s) {
|
|
|
1536
1547
|
);
|
|
1537
1548
|
break;
|
|
1538
1549
|
}
|
|
1539
|
-
return
|
|
1550
|
+
return S.index = s + 1, S.node = e.nextSibling, S;
|
|
1540
1551
|
}
|
|
1541
1552
|
function Le(i, t) {
|
|
1542
|
-
return i && i.nodeType == 8 &&
|
|
1553
|
+
return i && i.nodeType == 8 && K.parse(i.data, t) !== null;
|
|
1543
1554
|
}
|
|
1544
1555
|
const At = "TEMPLATE", ht = {
|
|
1545
1556
|
/**
|
|
@@ -1554,7 +1565,7 @@ const At = "TEMPLATE", ht = {
|
|
|
1554
1565
|
* it is recommended that you clone the original and pass the clone to this API.
|
|
1555
1566
|
* @public
|
|
1556
1567
|
*/
|
|
1557
|
-
compile(i, t, e =
|
|
1568
|
+
compile(i, t, e = T.policy) {
|
|
1558
1569
|
let s;
|
|
1559
1570
|
if (B(i)) {
|
|
1560
1571
|
s = document.createElement(At), s.innerHTML = e.createHTML(i);
|
|
@@ -1584,7 +1595,7 @@ const At = "TEMPLATE", ht = {
|
|
|
1584
1595
|
n,
|
|
1585
1596
|
/* root */
|
|
1586
1597
|
"r"
|
|
1587
|
-
),
|
|
1598
|
+
), S.node = null, r.freeze();
|
|
1588
1599
|
},
|
|
1589
1600
|
/**
|
|
1590
1601
|
* Sets the default compilation strategy that will be used by the ViewTemplate whenever
|
|
@@ -1601,7 +1612,7 @@ const At = "TEMPLATE", ht = {
|
|
|
1601
1612
|
* @param policy - The security policy to use with the aggregated bindings.
|
|
1602
1613
|
* @returns A single inline directive that aggregates the behavior of all the parts.
|
|
1603
1614
|
*/
|
|
1604
|
-
aggregate(i, t =
|
|
1615
|
+
aggregate(i, t = T.policy) {
|
|
1605
1616
|
if (i.length === 1)
|
|
1606
1617
|
return i[0];
|
|
1607
1618
|
let e, s = !1, n;
|
|
@@ -1610,14 +1621,14 @@ const At = "TEMPLATE", ht = {
|
|
|
1610
1621
|
for (let u = 0; u < r; ++u)
|
|
1611
1622
|
h += a[u](l, o);
|
|
1612
1623
|
return h;
|
|
1613
|
-
}, d = new
|
|
1614
|
-
return
|
|
1624
|
+
}, d = new M(qt(c, n ?? t, s));
|
|
1625
|
+
return k.assignAspect(d, e), d;
|
|
1615
1626
|
}
|
|
1616
|
-
},
|
|
1627
|
+
}, Ve = (
|
|
1617
1628
|
/* eslint-disable-next-line no-control-regex, max-len */
|
|
1618
1629
|
/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/
|
|
1619
1630
|
), Fe = /* @__PURE__ */ Object.create(null);
|
|
1620
|
-
class
|
|
1631
|
+
class V {
|
|
1621
1632
|
/**
|
|
1622
1633
|
* Creates an instance of InlineTemplateDirective.
|
|
1623
1634
|
* @param template - The template to inline.
|
|
@@ -1636,16 +1647,16 @@ class j {
|
|
|
1636
1647
|
return this.html;
|
|
1637
1648
|
}
|
|
1638
1649
|
}
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
function
|
|
1650
|
+
V.empty = new V("");
|
|
1651
|
+
k.define(V);
|
|
1652
|
+
function Ie(i, t, e, s = k.getForInstance(i)) {
|
|
1642
1653
|
if (s.aspected) {
|
|
1643
|
-
const n =
|
|
1644
|
-
n !== null &&
|
|
1654
|
+
const n = Ve.exec(t);
|
|
1655
|
+
n !== null && k.assignAspect(i, n[2]);
|
|
1645
1656
|
}
|
|
1646
1657
|
return i.createHTML(e);
|
|
1647
1658
|
}
|
|
1648
|
-
class
|
|
1659
|
+
class Y {
|
|
1649
1660
|
/**
|
|
1650
1661
|
* Creates an instance of ViewTemplate.
|
|
1651
1662
|
* @param html - The html representing what this template will instantiate, including placeholders for directives.
|
|
@@ -1672,7 +1683,7 @@ class X {
|
|
|
1672
1683
|
* Returns a directive that can inline the template.
|
|
1673
1684
|
*/
|
|
1674
1685
|
inline() {
|
|
1675
|
-
return new
|
|
1686
|
+
return new V(B(this.html) ? this.html : this.html.innerHTML, this.factories);
|
|
1676
1687
|
}
|
|
1677
1688
|
/**
|
|
1678
1689
|
* Sets the DOMPolicy for this template.
|
|
@@ -1684,12 +1695,12 @@ class X {
|
|
|
1684
1695
|
*/
|
|
1685
1696
|
withPolicy(t) {
|
|
1686
1697
|
if (this.result)
|
|
1687
|
-
throw
|
|
1698
|
+
throw y.error(
|
|
1688
1699
|
1208
|
|
1689
1700
|
/* Message.cannotSetTemplatePolicyAfterCompilation */
|
|
1690
1701
|
);
|
|
1691
1702
|
if (this.policy)
|
|
1692
|
-
throw
|
|
1703
|
+
throw y.error(
|
|
1693
1704
|
1207
|
|
1694
1705
|
/* Message.onlySetTemplatePolicyOnce */
|
|
1695
1706
|
);
|
|
@@ -1730,34 +1741,34 @@ class X {
|
|
|
1730
1741
|
const l = t[c];
|
|
1731
1742
|
let o = e[c], h;
|
|
1732
1743
|
if (n += l, O(o))
|
|
1733
|
-
o = new
|
|
1744
|
+
o = new M(qt(o));
|
|
1734
1745
|
else if (o instanceof lt)
|
|
1735
|
-
o = new
|
|
1736
|
-
else if (!(h =
|
|
1746
|
+
o = new M(o);
|
|
1747
|
+
else if (!(h = k.getForInstance(o))) {
|
|
1737
1748
|
const u = o;
|
|
1738
|
-
o = new
|
|
1749
|
+
o = new M(Gt(() => u));
|
|
1739
1750
|
}
|
|
1740
|
-
n +=
|
|
1751
|
+
n += Ie(o, l, a, h);
|
|
1741
1752
|
}
|
|
1742
|
-
return new
|
|
1753
|
+
return new Y(n + t[t.length - 1], r, s);
|
|
1743
1754
|
}
|
|
1744
1755
|
}
|
|
1745
|
-
x(
|
|
1756
|
+
x(Y);
|
|
1746
1757
|
const re = (i, ...t) => {
|
|
1747
1758
|
if (Array.isArray(i) && Array.isArray(i.raw))
|
|
1748
|
-
return
|
|
1749
|
-
throw
|
|
1759
|
+
return Y.create(i, t);
|
|
1760
|
+
throw y.error(
|
|
1750
1761
|
1206
|
|
1751
1762
|
/* Message.directCallToHTMLTagNotAllowed */
|
|
1752
1763
|
);
|
|
1753
1764
|
};
|
|
1754
|
-
re.partial = (i) => new
|
|
1755
|
-
const
|
|
1765
|
+
re.partial = (i) => new V(i);
|
|
1766
|
+
const Mt = "boolean", Et = "reflect", oe = Object.freeze({
|
|
1756
1767
|
/**
|
|
1757
1768
|
* Locates all attribute configurations associated with a type.
|
|
1758
1769
|
*/
|
|
1759
1770
|
locate: zt()
|
|
1760
|
-
}),
|
|
1771
|
+
}), He = {
|
|
1761
1772
|
toView(i) {
|
|
1762
1773
|
return i ? "true" : "false";
|
|
1763
1774
|
},
|
|
@@ -1771,14 +1782,14 @@ function Ot(i) {
|
|
|
1771
1782
|
const t = i * 1;
|
|
1772
1783
|
return isNaN(t) ? null : t;
|
|
1773
1784
|
}
|
|
1774
|
-
const
|
|
1785
|
+
const bi = {
|
|
1775
1786
|
toView(i) {
|
|
1776
1787
|
const t = Ot(i);
|
|
1777
1788
|
return t && t.toString();
|
|
1778
1789
|
},
|
|
1779
1790
|
fromView: Ot
|
|
1780
1791
|
};
|
|
1781
|
-
class
|
|
1792
|
+
class q {
|
|
1782
1793
|
/**
|
|
1783
1794
|
* Creates an instance of AttributeDefinition.
|
|
1784
1795
|
* @param Owner - The class constructor that owns this attribute.
|
|
@@ -1788,8 +1799,8 @@ class W {
|
|
|
1788
1799
|
* @param converter - A {@link ValueConverter} that integrates with the property getter/setter
|
|
1789
1800
|
* to convert values to and from a DOM string.
|
|
1790
1801
|
*/
|
|
1791
|
-
constructor(t, e, s = e.toLowerCase(), n =
|
|
1792
|
-
this.guards = /* @__PURE__ */ new Set(), this.Owner = t, this.name = e, this.attribute = s, this.mode = n, this.converter = r, this.fieldName = `_${e}`, this.callbackName = `${e}Changed`, this.hasCallback = this.callbackName in t.prototype, n ===
|
|
1802
|
+
constructor(t, e, s = e.toLowerCase(), n = Et, r) {
|
|
1803
|
+
this.guards = /* @__PURE__ */ new Set(), this.Owner = t, this.name = e, this.attribute = s, this.mode = n, this.converter = r, this.fieldName = `_${e}`, this.callbackName = `${e}Changed`, this.hasCallback = this.callbackName in t.prototype, n === Mt && r === void 0 && (this.converter = He);
|
|
1793
1804
|
}
|
|
1794
1805
|
/**
|
|
1795
1806
|
* Sets the value of the attribute/property on the source element.
|
|
@@ -1805,7 +1816,7 @@ class W {
|
|
|
1805
1816
|
* @param source - The source element to access.
|
|
1806
1817
|
*/
|
|
1807
1818
|
getValue(t) {
|
|
1808
|
-
return
|
|
1819
|
+
return b.track(t, this.name), t[this.fieldName];
|
|
1809
1820
|
}
|
|
1810
1821
|
/** @internal */
|
|
1811
1822
|
onAttributeChangedCallback(t, e) {
|
|
@@ -1817,12 +1828,12 @@ class W {
|
|
|
1817
1828
|
s.add(t);
|
|
1818
1829
|
const n = t[this.fieldName];
|
|
1819
1830
|
switch (e) {
|
|
1820
|
-
case
|
|
1831
|
+
case Et:
|
|
1821
1832
|
const r = this.converter;
|
|
1822
|
-
|
|
1833
|
+
T.setAttribute(t, this.attribute, r !== void 0 ? r.toView(n) : n);
|
|
1823
1834
|
break;
|
|
1824
|
-
case
|
|
1825
|
-
|
|
1835
|
+
case Mt:
|
|
1836
|
+
T.setBooleanAttribute(t, this.attribute, n);
|
|
1826
1837
|
break;
|
|
1827
1838
|
}
|
|
1828
1839
|
s.delete(t);
|
|
@@ -1842,13 +1853,13 @@ class W {
|
|
|
1842
1853
|
if (a !== void 0)
|
|
1843
1854
|
for (let c = 0, d = a.length; c < d; ++c) {
|
|
1844
1855
|
const l = a[c];
|
|
1845
|
-
B(l) ? s.push(new
|
|
1856
|
+
B(l) ? s.push(new q(t, l)) : s.push(new q(t, l.property, l.attribute, l.mode, l.converter));
|
|
1846
1857
|
}
|
|
1847
1858
|
}
|
|
1848
1859
|
return s;
|
|
1849
1860
|
}
|
|
1850
1861
|
}
|
|
1851
|
-
function
|
|
1862
|
+
function De(i, t) {
|
|
1852
1863
|
let e;
|
|
1853
1864
|
function s(n, r) {
|
|
1854
1865
|
arguments.length > 1 && (e.property = r), oe.locate(n.constructor).push(e);
|
|
@@ -1859,7 +1870,7 @@ function Pe(i, t) {
|
|
|
1859
1870
|
}
|
|
1860
1871
|
return e = i === void 0 ? {} : i, s;
|
|
1861
1872
|
}
|
|
1862
|
-
var
|
|
1873
|
+
var Pe = function(i, t, e, s) {
|
|
1863
1874
|
function n(r) {
|
|
1864
1875
|
return r instanceof e ? r : new e(function(a) {
|
|
1865
1876
|
a(r);
|
|
@@ -1886,20 +1897,22 @@ var De = function(i, t, e, s) {
|
|
|
1886
1897
|
l((s = s.apply(i, t || [])).next());
|
|
1887
1898
|
});
|
|
1888
1899
|
};
|
|
1889
|
-
const _t = { mode: "open" }, Rt = {},
|
|
1900
|
+
const _t = { mode: "open" }, Rt = {}, it = /* @__PURE__ */ new Set(), R = y.getById(N.elementRegistry, () => Pt()), ze = {
|
|
1901
|
+
deferAndHydrate: "defer-and-hydrate"
|
|
1902
|
+
};
|
|
1890
1903
|
class f {
|
|
1891
1904
|
constructor(t, e = t.definition) {
|
|
1892
1905
|
var s;
|
|
1893
1906
|
this.platformDefined = !1, B(e) && (e = { name: e }), this.type = t, this.name = e.name, this.template = e.template, this.templateOptions = e.templateOptions, this.registry = (s = e.registry) !== null && s !== void 0 ? s : customElements;
|
|
1894
|
-
const n = t.prototype, r =
|
|
1907
|
+
const n = t.prototype, r = q.collect(t, e.attributes), a = new Array(r.length), c = {}, d = {};
|
|
1895
1908
|
for (let l = 0, o = r.length; l < o; ++l) {
|
|
1896
1909
|
const h = r[l];
|
|
1897
|
-
a[l] = h.attribute, c[h.name] = h, d[h.attribute] = h,
|
|
1910
|
+
a[l] = h.attribute, c[h.name] = h, d[h.attribute] = h, b.defineProperty(n, h);
|
|
1898
1911
|
}
|
|
1899
1912
|
Reflect.defineProperty(t, "observedAttributes", {
|
|
1900
1913
|
value: a,
|
|
1901
1914
|
enumerable: !0
|
|
1902
|
-
}), this.attributes = r, this.propertyLookup = c, this.attributeLookup = d, this.shadowOptions = e.shadowOptions === void 0 ? _t : e.shadowOptions === null ? void 0 : Object.assign(Object.assign({}, _t), e.shadowOptions), this.elementOptions = e.elementOptions === void 0 ? Rt : Object.assign(Object.assign({}, Rt), e.elementOptions), this.styles =
|
|
1915
|
+
}), this.attributes = r, this.propertyLookup = c, this.attributeLookup = d, this.shadowOptions = e.shadowOptions === void 0 ? _t : e.shadowOptions === null ? void 0 : Object.assign(Object.assign({}, _t), e.shadowOptions), this.elementOptions = e.elementOptions === void 0 ? Rt : Object.assign(Object.assign({}, Rt), e.elementOptions), this.styles = m.normalize(e.styles), R.register(this), b.defineProperty(f.isRegistered, this.name), f.isRegistered[this.name] = this.type;
|
|
1903
1916
|
}
|
|
1904
1917
|
/**
|
|
1905
1918
|
* Indicates if this element has been defined in at least one registry.
|
|
@@ -1914,8 +1927,9 @@ class f {
|
|
|
1914
1927
|
* This operation is idempotent per registry.
|
|
1915
1928
|
*/
|
|
1916
1929
|
define(t = this.registry) {
|
|
1917
|
-
|
|
1918
|
-
|
|
1930
|
+
var e, s;
|
|
1931
|
+
const n = this.type;
|
|
1932
|
+
return t.get(this.name) || (this.platformDefined = !0, t.define(this.name, n, this.elementOptions), (s = (e = this.lifecycleCallbacks) === null || e === void 0 ? void 0 : e.elementDidDefine) === null || s === void 0 || s.call(e, this.name)), this;
|
|
1919
1933
|
}
|
|
1920
1934
|
/**
|
|
1921
1935
|
* Creates an instance of FASTElementDefinition.
|
|
@@ -1924,7 +1938,7 @@ class f {
|
|
|
1924
1938
|
* that describes the element to define.
|
|
1925
1939
|
*/
|
|
1926
1940
|
static compose(t, e) {
|
|
1927
|
-
return
|
|
1941
|
+
return it.has(t) || R.getByType(t) ? new f(class extends t {
|
|
1928
1942
|
}, e) : new f(t, e);
|
|
1929
1943
|
}
|
|
1930
1944
|
/**
|
|
@@ -1933,7 +1947,7 @@ class f {
|
|
|
1933
1947
|
* @internal
|
|
1934
1948
|
*/
|
|
1935
1949
|
static registerBaseType(t) {
|
|
1936
|
-
|
|
1950
|
+
it.add(t);
|
|
1937
1951
|
}
|
|
1938
1952
|
/**
|
|
1939
1953
|
* Creates an instance of FASTElementDefinition asynchronously. This option assumes
|
|
@@ -1946,33 +1960,28 @@ class f {
|
|
|
1946
1960
|
*/
|
|
1947
1961
|
static composeAsync(t, e) {
|
|
1948
1962
|
return new Promise((s) => {
|
|
1949
|
-
(
|
|
1963
|
+
(it.has(t) || R.getByType(t)) && s(new f(class extends t {
|
|
1950
1964
|
}, e));
|
|
1951
1965
|
const n = new f(t, e);
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
]).then(() => {
|
|
1959
|
-
s(n);
|
|
1960
|
-
});
|
|
1966
|
+
b.getNotifier(n).subscribe({
|
|
1967
|
+
handleChange: () => {
|
|
1968
|
+
var r, a;
|
|
1969
|
+
(a = (r = n.lifecycleCallbacks) === null || r === void 0 ? void 0 : r.templateDidUpdate) === null || a === void 0 || a.call(r, n.name), s(n);
|
|
1970
|
+
}
|
|
1971
|
+
}, "template");
|
|
1961
1972
|
});
|
|
1962
1973
|
}
|
|
1963
1974
|
}
|
|
1964
1975
|
f.isRegistered = {};
|
|
1965
1976
|
f.getByType = R.getByType;
|
|
1966
1977
|
f.getForInstance = R.getForInstance;
|
|
1967
|
-
f.registerAsync = (i) =>
|
|
1978
|
+
f.registerAsync = (i) => Pe(void 0, void 0, void 0, function* () {
|
|
1968
1979
|
return new Promise((t) => {
|
|
1969
|
-
f.isRegistered[i] && t(f.isRegistered[i]),
|
|
1970
|
-
handleChange: () => t(f.isRegistered[i])
|
|
1971
|
-
}, i);
|
|
1980
|
+
f.isRegistered[i] && t(f.isRegistered[i]), b.getNotifier(f.isRegistered).subscribe({ handleChange: () => t(f.isRegistered[i]) }, i);
|
|
1972
1981
|
});
|
|
1973
1982
|
});
|
|
1974
|
-
|
|
1975
|
-
class
|
|
1983
|
+
b.defineProperty(f.prototype, "template");
|
|
1984
|
+
class Ue extends MutationObserver {
|
|
1976
1985
|
/**
|
|
1977
1986
|
* Creates an instance of UnobservableMutationObserver.
|
|
1978
1987
|
* @param callback - The callback to invoke when observed nodes are changed.
|
|
@@ -1990,7 +1999,7 @@ class ze extends MutationObserver {
|
|
|
1990
1999
|
this.observedNodes.delete(t), this.observedNodes.size < 1 && this.disconnect();
|
|
1991
2000
|
}
|
|
1992
2001
|
}
|
|
1993
|
-
const
|
|
2002
|
+
const gi = Object.freeze({
|
|
1994
2003
|
/**
|
|
1995
2004
|
* Creates a ViewBehaviorOrchestrator.
|
|
1996
2005
|
* @param source - The source to to associate behaviors with.
|
|
@@ -2001,7 +2010,7 @@ const pi = Object.freeze({
|
|
|
2001
2010
|
let s = null, n = !1;
|
|
2002
2011
|
return {
|
|
2003
2012
|
source: i,
|
|
2004
|
-
context:
|
|
2013
|
+
context: E.default,
|
|
2005
2014
|
targets: e,
|
|
2006
2015
|
get isBound() {
|
|
2007
2016
|
return n;
|
|
@@ -2009,7 +2018,7 @@ const pi = Object.freeze({
|
|
|
2009
2018
|
addBehaviorFactory(r, a) {
|
|
2010
2019
|
var c, d, l, o;
|
|
2011
2020
|
const h = r;
|
|
2012
|
-
h.id = (c = h.id) !== null && c !== void 0 ? c : L(), h.targetNodeId = (d = h.targetNodeId) !== null && d !== void 0 ? d : L(), h.targetTagName = (l = a.tagName) !== null && l !== void 0 ? l : null, h.policy = (o = h.policy) !== null && o !== void 0 ? o :
|
|
2021
|
+
h.id = (c = h.id) !== null && c !== void 0 ? c : L(), h.targetNodeId = (d = h.targetNodeId) !== null && d !== void 0 ? d : L(), h.targetTagName = (l = a.tagName) !== null && l !== void 0 ? l : null, h.policy = (o = h.policy) !== null && o !== void 0 ? o : T.policy, this.addTarget(h.targetNodeId, a), this.addBehavior(h.createBehavior());
|
|
2013
2022
|
},
|
|
2014
2023
|
addTarget(r, a) {
|
|
2015
2024
|
e[r] = a;
|
|
@@ -2028,17 +2037,17 @@ const pi = Object.freeze({
|
|
|
2028
2037
|
}
|
|
2029
2038
|
};
|
|
2030
2039
|
}
|
|
2031
|
-
}),
|
|
2040
|
+
}), We = {
|
|
2032
2041
|
bubbles: !0,
|
|
2033
2042
|
composed: !0,
|
|
2034
2043
|
cancelable: !0
|
|
2035
2044
|
}, P = "isConnected", ae = /* @__PURE__ */ new WeakMap();
|
|
2036
|
-
function
|
|
2045
|
+
function j(i) {
|
|
2037
2046
|
var t, e;
|
|
2038
2047
|
return (e = (t = i.shadowRoot) !== null && t !== void 0 ? t : ae.get(i)) !== null && e !== void 0 ? e : null;
|
|
2039
2048
|
}
|
|
2040
|
-
let
|
|
2041
|
-
class
|
|
2049
|
+
let jt;
|
|
2050
|
+
class C extends Wt {
|
|
2042
2051
|
/**
|
|
2043
2052
|
* Creates a Controller to control the specified element.
|
|
2044
2053
|
* @param element - The element to be controlled by this controller.
|
|
@@ -2048,7 +2057,7 @@ class S extends Wt {
|
|
|
2048
2057
|
*/
|
|
2049
2058
|
constructor(t, e) {
|
|
2050
2059
|
super(t), this.boundObservables = null, this.needsInitialization = !0, this.hasExistingShadowRoot = !1, this._template = null, this.stage = 3, this.guardBehaviorConnection = !1, this.behaviors = null, this.behaviorsConnected = !1, this._mainStyles = null, this.$fastController = this, this.view = null, this.source = t, this.definition = e, this.shadowOptions = e.shadowOptions;
|
|
2051
|
-
const s =
|
|
2060
|
+
const s = b.getAccessors(t);
|
|
2052
2061
|
if (s.length > 0) {
|
|
2053
2062
|
const n = this.boundObservables = /* @__PURE__ */ Object.create(null);
|
|
2054
2063
|
for (let r = 0, a = s.length; r < a; ++r) {
|
|
@@ -2062,14 +2071,14 @@ class S extends Wt {
|
|
|
2062
2071
|
* connected to the document.
|
|
2063
2072
|
*/
|
|
2064
2073
|
get isConnected() {
|
|
2065
|
-
return
|
|
2074
|
+
return b.track(this, P), this.stage === 1;
|
|
2066
2075
|
}
|
|
2067
2076
|
/**
|
|
2068
2077
|
* The context the expression is evaluated against.
|
|
2069
2078
|
*/
|
|
2070
2079
|
get context() {
|
|
2071
2080
|
var t, e;
|
|
2072
|
-
return (e = (t = this.view) === null || t === void 0 ? void 0 : t.context) !== null && e !== void 0 ? e :
|
|
2081
|
+
return (e = (t = this.view) === null || t === void 0 ? void 0 : t.context) !== null && e !== void 0 ? e : E.default;
|
|
2073
2082
|
}
|
|
2074
2083
|
/**
|
|
2075
2084
|
* Indicates whether the controller is bound.
|
|
@@ -2165,7 +2174,7 @@ class S extends Wt {
|
|
|
2165
2174
|
return;
|
|
2166
2175
|
const s = this.source;
|
|
2167
2176
|
if (t instanceof HTMLElement)
|
|
2168
|
-
((e =
|
|
2177
|
+
((e = j(s)) !== null && e !== void 0 ? e : this.source).append(t);
|
|
2169
2178
|
else if (!t.isAttachedTo(s)) {
|
|
2170
2179
|
const n = t.behaviors;
|
|
2171
2180
|
if (t.addStylesTo(s), n !== null)
|
|
@@ -2183,7 +2192,7 @@ class S extends Wt {
|
|
|
2183
2192
|
return;
|
|
2184
2193
|
const s = this.source;
|
|
2185
2194
|
if (t instanceof HTMLElement)
|
|
2186
|
-
((e =
|
|
2195
|
+
((e = j(s)) !== null && e !== void 0 ? e : s).removeChild(t);
|
|
2187
2196
|
else if (t.isAttachedTo(s)) {
|
|
2188
2197
|
const n = t.behaviors;
|
|
2189
2198
|
if (t.removeStylesFrom(s), n !== null)
|
|
@@ -2195,7 +2204,7 @@ class S extends Wt {
|
|
|
2195
2204
|
* Runs connected lifecycle behavior on the associated element.
|
|
2196
2205
|
*/
|
|
2197
2206
|
connect() {
|
|
2198
|
-
this.stage === 3 && (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.needsInitialization ? (this.renderTemplate(this.template), this.addStyles(this.mainStyles), this.needsInitialization = !1) : this.view !== null && this.view.bind(this.source), this.stage = 1,
|
|
2207
|
+
this.stage === 3 && (this.stage = 0, this.bindObservables(), this.connectBehaviors(), this.needsInitialization ? (this.renderTemplate(this.template), this.addStyles(this.mainStyles), this.needsInitialization = !1) : this.view !== null && this.view.bind(this.source), this.stage = 1, b.notify(this, P));
|
|
2199
2208
|
}
|
|
2200
2209
|
bindObservables() {
|
|
2201
2210
|
if (this.boundObservables !== null) {
|
|
@@ -2232,7 +2241,7 @@ class S extends Wt {
|
|
|
2232
2241
|
* Runs disconnected lifecycle behavior on the associated element.
|
|
2233
2242
|
*/
|
|
2234
2243
|
disconnect() {
|
|
2235
|
-
this.stage === 1 && (this.stage = 2,
|
|
2244
|
+
this.stage === 1 && (this.stage = 2, b.notify(this, P), this.view !== null && this.view.unbind(), this.disconnectBehaviors(), this.stage = 3);
|
|
2236
2245
|
}
|
|
2237
2246
|
/**
|
|
2238
2247
|
* Runs the attribute changed callback for the associated element.
|
|
@@ -2253,11 +2262,11 @@ class S extends Wt {
|
|
|
2253
2262
|
* Only emits events if connected.
|
|
2254
2263
|
*/
|
|
2255
2264
|
emit(t, e, s) {
|
|
2256
|
-
return this.stage === 1 ? this.source.dispatchEvent(new CustomEvent(t, Object.assign(Object.assign({ detail: e },
|
|
2265
|
+
return this.stage === 1 ? this.source.dispatchEvent(new CustomEvent(t, Object.assign(Object.assign({ detail: e }, We), s))) : !1;
|
|
2257
2266
|
}
|
|
2258
2267
|
renderTemplate(t) {
|
|
2259
2268
|
var e;
|
|
2260
|
-
const s = this.source, n = (e =
|
|
2269
|
+
const s = this.source, n = (e = j(s)) !== null && e !== void 0 ? e : s;
|
|
2261
2270
|
if (this.view !== null)
|
|
2262
2271
|
this.view.dispose(), this.view = null;
|
|
2263
2272
|
else if (!this.needsInitialization || this.hasExistingShadowRoot) {
|
|
@@ -2265,7 +2274,7 @@ class S extends Wt {
|
|
|
2265
2274
|
for (let r = n.firstChild; r !== null; r = n.firstChild)
|
|
2266
2275
|
n.removeChild(r);
|
|
2267
2276
|
}
|
|
2268
|
-
t && (this.view = t.render(s, n, s), this.view.sourceLifetime =
|
|
2277
|
+
t && (this.view = t.render(s, n, s), this.view.sourceLifetime = J.coupled);
|
|
2269
2278
|
}
|
|
2270
2279
|
/**
|
|
2271
2280
|
* Locates or creates a controller for the specified element.
|
|
@@ -2282,19 +2291,19 @@ class S extends Wt {
|
|
|
2282
2291
|
return s;
|
|
2283
2292
|
const n = f.getForInstance(t);
|
|
2284
2293
|
if (n === void 0)
|
|
2285
|
-
throw
|
|
2294
|
+
throw y.error(
|
|
2286
2295
|
1401
|
|
2287
2296
|
/* Message.missingElementDefinition */
|
|
2288
2297
|
);
|
|
2289
|
-
return
|
|
2298
|
+
return b.getNotifier(n).subscribe({
|
|
2290
2299
|
handleChange: () => {
|
|
2291
|
-
|
|
2300
|
+
C.forCustomElement(t, !0), t.$fastController.connect();
|
|
2292
2301
|
}
|
|
2293
|
-
}, "template"),
|
|
2302
|
+
}, "template"), b.getNotifier(n).subscribe({
|
|
2294
2303
|
handleChange: () => {
|
|
2295
|
-
|
|
2304
|
+
C.forCustomElement(t, !0), t.$fastController.connect();
|
|
2296
2305
|
}
|
|
2297
|
-
}, "shadowOptions"), t.$fastController = new
|
|
2306
|
+
}, "shadowOptions"), t.$fastController = new jt(t, n);
|
|
2298
2307
|
}
|
|
2299
2308
|
/**
|
|
2300
2309
|
* Sets the strategy that ElementController.forCustomElement uses to construct
|
|
@@ -2302,18 +2311,18 @@ class S extends Wt {
|
|
|
2302
2311
|
* @param strategy - The strategy to use.
|
|
2303
2312
|
*/
|
|
2304
2313
|
static setStrategy(t) {
|
|
2305
|
-
|
|
2314
|
+
jt = t;
|
|
2306
2315
|
}
|
|
2307
2316
|
}
|
|
2308
|
-
x(
|
|
2309
|
-
|
|
2310
|
-
function
|
|
2317
|
+
x(C);
|
|
2318
|
+
C.setStrategy(C);
|
|
2319
|
+
function Q(i) {
|
|
2311
2320
|
var t;
|
|
2312
|
-
return "adoptedStyleSheets" in i ? i : (t =
|
|
2321
|
+
return "adoptedStyleSheets" in i ? i : (t = j(i)) !== null && t !== void 0 ? t : i.getRootNode();
|
|
2313
2322
|
}
|
|
2314
|
-
class
|
|
2323
|
+
class Z {
|
|
2315
2324
|
constructor(t) {
|
|
2316
|
-
const e =
|
|
2325
|
+
const e = Z.styleSheetCache;
|
|
2317
2326
|
this.sheets = t.map((s) => {
|
|
2318
2327
|
if (s instanceof CSSStyleSheet)
|
|
2319
2328
|
return s;
|
|
@@ -2322,24 +2331,24 @@ class Y {
|
|
|
2322
2331
|
});
|
|
2323
2332
|
}
|
|
2324
2333
|
addStylesTo(t) {
|
|
2325
|
-
le(
|
|
2334
|
+
le(Q(t), this.sheets);
|
|
2326
2335
|
}
|
|
2327
2336
|
removeStylesFrom(t) {
|
|
2328
|
-
ce(
|
|
2337
|
+
ce(Q(t), this.sheets);
|
|
2329
2338
|
}
|
|
2330
2339
|
}
|
|
2331
|
-
|
|
2332
|
-
let
|
|
2333
|
-
const
|
|
2340
|
+
Z.styleSheetCache = /* @__PURE__ */ new Map();
|
|
2341
|
+
let qe = 0;
|
|
2342
|
+
const Qe = () => `fast-${++qe}`;
|
|
2334
2343
|
function Lt(i) {
|
|
2335
2344
|
return i === document ? document.body : i;
|
|
2336
2345
|
}
|
|
2337
|
-
class
|
|
2346
|
+
class Ge {
|
|
2338
2347
|
constructor(t) {
|
|
2339
|
-
this.styles = t, this.styleClass =
|
|
2348
|
+
this.styles = t, this.styleClass = Qe();
|
|
2340
2349
|
}
|
|
2341
2350
|
addStylesTo(t) {
|
|
2342
|
-
t = Lt(
|
|
2351
|
+
t = Lt(Q(t));
|
|
2343
2352
|
const e = this.styles, s = this.styleClass;
|
|
2344
2353
|
for (let n = 0; n < e.length; n++) {
|
|
2345
2354
|
const r = document.createElement("style");
|
|
@@ -2347,7 +2356,7 @@ class Qe {
|
|
|
2347
2356
|
}
|
|
2348
2357
|
}
|
|
2349
2358
|
removeStylesFrom(t) {
|
|
2350
|
-
t = Lt(
|
|
2359
|
+
t = Lt(Q(t));
|
|
2351
2360
|
const e = t.querySelectorAll(`.${this.styleClass}`);
|
|
2352
2361
|
for (let s = 0, n = e.length; s < n; ++s)
|
|
2353
2362
|
t.removeChild(e[s]);
|
|
@@ -2358,7 +2367,7 @@ let le = (i, t) => {
|
|
|
2358
2367
|
}, ce = (i, t) => {
|
|
2359
2368
|
i.adoptedStyleSheets = i.adoptedStyleSheets.filter((e) => t.indexOf(e) === -1);
|
|
2360
2369
|
};
|
|
2361
|
-
if (
|
|
2370
|
+
if (m.supportsAdoptedStyleSheets) {
|
|
2362
2371
|
try {
|
|
2363
2372
|
document.adoptedStyleSheets.push(), document.adoptedStyleSheets.splice(), le = (i, t) => {
|
|
2364
2373
|
i.adoptedStyleSheets.push(...t);
|
|
@@ -2370,24 +2379,37 @@ if (v.supportsAdoptedStyleSheets) {
|
|
|
2370
2379
|
};
|
|
2371
2380
|
} catch {
|
|
2372
2381
|
}
|
|
2373
|
-
|
|
2382
|
+
m.setDefaultStrategy(Z);
|
|
2374
2383
|
} else
|
|
2375
|
-
|
|
2376
|
-
const
|
|
2377
|
-
class
|
|
2384
|
+
m.setDefaultStrategy(Ge);
|
|
2385
|
+
const st = "defer-hydration", F = "needs-hydration";
|
|
2386
|
+
class v extends C {
|
|
2387
|
+
/**
|
|
2388
|
+
* Configure lifecycle callbacks for hydration events
|
|
2389
|
+
*/
|
|
2390
|
+
static config(t) {
|
|
2391
|
+
return v.lifecycleCallbacks = t, this;
|
|
2392
|
+
}
|
|
2378
2393
|
static hydrationObserverHandler(t) {
|
|
2379
2394
|
for (const e of t)
|
|
2380
|
-
|
|
2395
|
+
v.hydrationObserver.unobserve(e.target), e.target.$fastController.connect();
|
|
2396
|
+
}
|
|
2397
|
+
/**
|
|
2398
|
+
* Checks if all elements have completed hydration and dispatches event if complete
|
|
2399
|
+
*/
|
|
2400
|
+
static checkHydrationComplete() {
|
|
2401
|
+
var t, e;
|
|
2402
|
+
document.querySelector(`[${F}]`) || (e = (t = v.lifecycleCallbacks) === null || t === void 0 ? void 0 : t.hydrationComplete) === null || e === void 0 || e.call(t);
|
|
2381
2403
|
}
|
|
2382
2404
|
static forCustomElement(t, e) {
|
|
2383
2405
|
const s = f.getForInstance(t);
|
|
2384
|
-
return s
|
|
2406
|
+
return s?.templateOptions === ze.deferAndHydrate && !s.template && (t.toggleAttribute(st, !0), t.toggleAttribute(F, !0)), super.forCustomElement(t, e);
|
|
2385
2407
|
}
|
|
2386
2408
|
connect() {
|
|
2387
|
-
var t, e;
|
|
2388
|
-
if (this.needsHydration === void 0 && (this.needsHydration = this.source.getAttribute(
|
|
2389
|
-
|
|
2390
|
-
attributeFilter: [
|
|
2409
|
+
var t, e, s, n, r, a;
|
|
2410
|
+
if (this.needsHydration === void 0 && (this.needsHydration = this.source.getAttribute(F) !== null), this.source.hasAttribute(st)) {
|
|
2411
|
+
v.hydrationObserver.observe(this.source, {
|
|
2412
|
+
attributeFilter: [st]
|
|
2391
2413
|
});
|
|
2392
2414
|
return;
|
|
2393
2415
|
}
|
|
@@ -2397,28 +2419,55 @@ class N extends S {
|
|
|
2397
2419
|
}
|
|
2398
2420
|
if (this.stage !== 3)
|
|
2399
2421
|
return;
|
|
2400
|
-
this.stage = 0, this.bindObservables(), this.connectBehaviors();
|
|
2401
|
-
const
|
|
2422
|
+
(e = (t = v.lifecycleCallbacks) === null || t === void 0 ? void 0 : t.elementWillHydrate) === null || e === void 0 || e.call(t, this.definition.name), this.stage = 0, this.bindObservables(), this.connectBehaviors();
|
|
2423
|
+
const c = this.source, d = (s = j(c)) !== null && s !== void 0 ? s : c;
|
|
2402
2424
|
if (this.template)
|
|
2403
|
-
if (
|
|
2404
|
-
let
|
|
2405
|
-
|
|
2425
|
+
if (U(this.template)) {
|
|
2426
|
+
let l = d.firstChild, o = d.lastChild;
|
|
2427
|
+
c.shadowRoot === null && (w.isElementBoundaryStartMarker(l) && (l.data = "", l = l.nextSibling), w.isElementBoundaryEndMarker(o) && (o.data = "", o = o.previousSibling)), this.view = this.template.hydrate(l, o, c), (n = this.view) === null || n === void 0 || n.bind(this.source);
|
|
2406
2428
|
} else
|
|
2407
2429
|
this.renderTemplate(this.template);
|
|
2408
|
-
this.addStyles(this.mainStyles), this.stage = 1, this.source.removeAttribute(
|
|
2430
|
+
this.addStyles(this.mainStyles), this.stage = 1, this.source.removeAttribute(F), this.needsInitialization = this.needsHydration = !1, b.notify(this, P), (a = (r = v.lifecycleCallbacks) === null || r === void 0 ? void 0 : r.elementDidHydrate) === null || a === void 0 || a.call(r, this.definition.name), v.checkHydrationComplete();
|
|
2409
2431
|
}
|
|
2410
2432
|
disconnect() {
|
|
2411
|
-
super.disconnect(),
|
|
2433
|
+
super.disconnect(), v.hydrationObserver.unobserve(this.source);
|
|
2412
2434
|
}
|
|
2413
2435
|
static install() {
|
|
2414
|
-
|
|
2436
|
+
C.setStrategy(v);
|
|
2415
2437
|
}
|
|
2416
2438
|
}
|
|
2417
|
-
|
|
2439
|
+
v.hydrationObserver = new Ue(v.hydrationObserverHandler);
|
|
2440
|
+
var Je = function(i, t, e, s) {
|
|
2441
|
+
function n(r) {
|
|
2442
|
+
return r instanceof e ? r : new e(function(a) {
|
|
2443
|
+
a(r);
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
return new (e || (e = Promise))(function(r, a) {
|
|
2447
|
+
function c(o) {
|
|
2448
|
+
try {
|
|
2449
|
+
l(s.next(o));
|
|
2450
|
+
} catch (h) {
|
|
2451
|
+
a(h);
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
function d(o) {
|
|
2455
|
+
try {
|
|
2456
|
+
l(s.throw(o));
|
|
2457
|
+
} catch (h) {
|
|
2458
|
+
a(h);
|
|
2459
|
+
}
|
|
2460
|
+
}
|
|
2461
|
+
function l(o) {
|
|
2462
|
+
o.done ? r(o.value) : n(o.value).then(c, d);
|
|
2463
|
+
}
|
|
2464
|
+
l((s = s.apply(i, t || [])).next());
|
|
2465
|
+
});
|
|
2466
|
+
};
|
|
2418
2467
|
function de(i) {
|
|
2419
2468
|
const t = class extends i {
|
|
2420
2469
|
constructor() {
|
|
2421
|
-
super(),
|
|
2470
|
+
super(), C.forCustomElement(this);
|
|
2422
2471
|
}
|
|
2423
2472
|
$emit(e, s, n) {
|
|
2424
2473
|
return this.$fastController.emit(e, s, n);
|
|
@@ -2435,62 +2484,56 @@ function de(i) {
|
|
|
2435
2484
|
};
|
|
2436
2485
|
return f.registerBaseType(t), t;
|
|
2437
2486
|
}
|
|
2438
|
-
function
|
|
2487
|
+
function Ke(i, t) {
|
|
2439
2488
|
return O(i) ? f.compose(i, t) : f.compose(this, i);
|
|
2440
2489
|
}
|
|
2441
|
-
function
|
|
2442
|
-
return
|
|
2443
|
-
f.composeAsync(i, t).
|
|
2444
|
-
|
|
2445
|
-
});
|
|
2446
|
-
}).then((e) => e.define().type) : new Promise((e) => {
|
|
2447
|
-
f.composeAsync(this, i).then((s) => {
|
|
2448
|
-
e(s);
|
|
2449
|
-
});
|
|
2450
|
-
}).then((e) => e.define().type);
|
|
2490
|
+
function Xe(i, t) {
|
|
2491
|
+
return Je(this, void 0, void 0, function* () {
|
|
2492
|
+
return O(i) ? (yield f.composeAsync(i, t)).define().type : (yield f.composeAsync(this, i)).define().type;
|
|
2493
|
+
});
|
|
2451
2494
|
}
|
|
2452
|
-
function
|
|
2495
|
+
function Ye(i, t) {
|
|
2453
2496
|
return O(i) ? f.compose(i, t).define().type : f.compose(this, i).define().type;
|
|
2454
2497
|
}
|
|
2455
|
-
function
|
|
2498
|
+
function Ze(i) {
|
|
2456
2499
|
return de(i);
|
|
2457
2500
|
}
|
|
2458
|
-
const
|
|
2501
|
+
const ti = Object.assign(de(HTMLElement), {
|
|
2459
2502
|
/**
|
|
2460
2503
|
* Creates a new FASTElement base class inherited from the
|
|
2461
2504
|
* provided base type.
|
|
2462
2505
|
* @param BaseType - The base element type to inherit from.
|
|
2463
2506
|
*/
|
|
2464
|
-
from:
|
|
2507
|
+
from: Ze,
|
|
2465
2508
|
/**
|
|
2466
2509
|
* Defines a platform custom element based on the provided type and definition.
|
|
2467
2510
|
* @param type - The custom element type to define.
|
|
2468
2511
|
* @param nameOrDef - The name of the element to define or a definition object
|
|
2469
2512
|
* that describes the element to define.
|
|
2470
2513
|
*/
|
|
2471
|
-
define:
|
|
2514
|
+
define: Ye,
|
|
2472
2515
|
/**
|
|
2473
2516
|
* Defines metadata for a FASTElement which can be used to later define the element.
|
|
2474
2517
|
* @public
|
|
2475
2518
|
*/
|
|
2476
|
-
compose:
|
|
2519
|
+
compose: Ke,
|
|
2477
2520
|
/**
|
|
2478
2521
|
* Defines metadata for a FASTElement which can be used after it has been resolved to define the element.
|
|
2479
2522
|
* @alpha
|
|
2480
2523
|
*/
|
|
2481
|
-
defineAsync:
|
|
2524
|
+
defineAsync: Xe
|
|
2482
2525
|
});
|
|
2483
|
-
function
|
|
2526
|
+
function ei(i, t) {
|
|
2484
2527
|
return i instanceof Function ? i(t) : i;
|
|
2485
2528
|
}
|
|
2486
|
-
const
|
|
2529
|
+
const Vt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), yi = (i) => (t = "vwc") => {
|
|
2487
2530
|
const e = (n) => `${t}-${n}`, s = (n) => {
|
|
2488
2531
|
const r = e(n.name);
|
|
2489
2532
|
let a = n.type;
|
|
2490
|
-
if (a.componentName = n.name,
|
|
2533
|
+
if (a.componentName = n.name, Vt.has(r))
|
|
2491
2534
|
return;
|
|
2492
2535
|
nt.has(a) && nt.get(a) !== r && (a = class extends a {
|
|
2493
|
-
}),
|
|
2536
|
+
}), Vt.add(r), nt.set(a, r);
|
|
2494
2537
|
for (const o of n.dependencies)
|
|
2495
2538
|
s(o);
|
|
2496
2539
|
const c = new Map([
|
|
@@ -2513,7 +2556,7 @@ const jt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), bi = (i) =
|
|
|
2513
2556
|
};
|
|
2514
2557
|
f.compose(a, {
|
|
2515
2558
|
...n.options,
|
|
2516
|
-
template:
|
|
2559
|
+
template: ei(
|
|
2517
2560
|
n.template,
|
|
2518
2561
|
l
|
|
2519
2562
|
),
|
|
@@ -2521,7 +2564,7 @@ const jt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), bi = (i) =
|
|
|
2521
2564
|
}).define();
|
|
2522
2565
|
};
|
|
2523
2566
|
s(i);
|
|
2524
|
-
},
|
|
2567
|
+
}, vi = (i, t, e, s, n) => ({
|
|
2525
2568
|
name: i,
|
|
2526
2569
|
type: t,
|
|
2527
2570
|
template: e,
|
|
@@ -2530,33 +2573,33 @@ const jt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), bi = (i) =
|
|
|
2530
2573
|
}), Ft = /* @__PURE__ */ new WeakMap(), he = (i) => {
|
|
2531
2574
|
let t = Ft.get(i);
|
|
2532
2575
|
return t || (t = [], Ft.set(i, t)), t;
|
|
2533
|
-
},
|
|
2576
|
+
}, mi = (i, t) => {
|
|
2534
2577
|
he(i).push(t);
|
|
2535
|
-
},
|
|
2578
|
+
}, ii = (i, t) => {
|
|
2536
2579
|
he(i).forEach((e) => e(i, t));
|
|
2537
|
-
},
|
|
2538
|
-
if (
|
|
2580
|
+
}, si = (i) => i === "delegate", It = (i) => `vvd${i.charAt(0).toUpperCase()}${i.slice(1)}`, ue = (i, t) => {
|
|
2581
|
+
if (si(i._vividAriaBehaviour)) {
|
|
2539
2582
|
const e = i[t];
|
|
2540
|
-
i[`_${t}`] = null, i.removeAttribute(at(t)), i[`_${t}`] = e, i[t] !== null ? i.dataset[
|
|
2583
|
+
i[`_${t}`] = null, i.removeAttribute(at(t)), i[`_${t}`] = e, i[t] !== null ? i.dataset[It(t)] = i[t] : delete i.dataset[It(t)];
|
|
2541
2584
|
} else
|
|
2542
|
-
|
|
2585
|
+
T.setAttribute(
|
|
2543
2586
|
i,
|
|
2544
2587
|
at(t),
|
|
2545
2588
|
i[t]
|
|
2546
2589
|
);
|
|
2547
|
-
},
|
|
2548
|
-
const e =
|
|
2549
|
-
e ? e.add(t) :
|
|
2550
|
-
},
|
|
2551
|
-
i.isConnected ? ue(i, t) :
|
|
2552
|
-
},
|
|
2553
|
-
const t =
|
|
2590
|
+
}, G = /* @__PURE__ */ new WeakMap(), ni = (i, t) => {
|
|
2591
|
+
const e = G.get(i);
|
|
2592
|
+
e ? e.add(t) : G.set(i, /* @__PURE__ */ new Set([t]));
|
|
2593
|
+
}, ri = (i, t) => {
|
|
2594
|
+
i.isConnected ? ue(i, t) : ni(i, t);
|
|
2595
|
+
}, oi = (i) => {
|
|
2596
|
+
const t = G.get(i);
|
|
2554
2597
|
if (t) {
|
|
2555
2598
|
for (const e of t)
|
|
2556
2599
|
ue(i, e);
|
|
2557
|
-
|
|
2600
|
+
G.delete(i);
|
|
2558
2601
|
}
|
|
2559
|
-
},
|
|
2602
|
+
}, Ht = [
|
|
2560
2603
|
"role",
|
|
2561
2604
|
"ariaAtomic",
|
|
2562
2605
|
"ariaAutoComplete",
|
|
@@ -2600,36 +2643,36 @@ const jt = /* @__PURE__ */ new Set(), nt = /* @__PURE__ */ new Map(), bi = (i) =
|
|
|
2600
2643
|
"ariaValueText",
|
|
2601
2644
|
"ariaRelevant"
|
|
2602
2645
|
// Non-standard
|
|
2603
|
-
], at = (i) => i.replace("aria", "aria-").toLowerCase(),
|
|
2646
|
+
], at = (i) => i.replace("aria", "aria-").toLowerCase(), ai = (i) => {
|
|
2604
2647
|
class t extends i {
|
|
2605
2648
|
constructor(...s) {
|
|
2606
2649
|
super(...s), this._vividAriaBehaviour = "default";
|
|
2607
|
-
for (const n of
|
|
2650
|
+
for (const n of Ht)
|
|
2608
2651
|
this[`_${n}`] = null;
|
|
2609
2652
|
}
|
|
2610
2653
|
connectedCallback() {
|
|
2611
|
-
super.connectedCallback(),
|
|
2654
|
+
super.connectedCallback(), oi(this);
|
|
2612
2655
|
}
|
|
2613
2656
|
}
|
|
2614
|
-
for (const e of
|
|
2615
|
-
|
|
2657
|
+
for (const e of Ht)
|
|
2658
|
+
De({
|
|
2616
2659
|
attribute: at(e),
|
|
2617
2660
|
mode: "fromView"
|
|
2618
2661
|
})(t.prototype, e), t.prototype[`${e}Changed`] = function() {
|
|
2619
|
-
|
|
2662
|
+
ri(this, e), this._vividAriaBehaviour !== "default" && ii(this, e);
|
|
2620
2663
|
};
|
|
2621
2664
|
return t;
|
|
2622
2665
|
};
|
|
2623
|
-
function
|
|
2666
|
+
function li() {
|
|
2624
2667
|
const i = /* @__PURE__ */ new WeakMap();
|
|
2625
2668
|
return (t) => (i.has(t) || i.set(t, []), i.get(t));
|
|
2626
2669
|
}
|
|
2627
|
-
const fe =
|
|
2670
|
+
const fe = li(), wi = (i) => (t, e) => {
|
|
2628
2671
|
fe(t.constructor).push({
|
|
2629
2672
|
newPropertyName: e,
|
|
2630
2673
|
...i
|
|
2631
2674
|
});
|
|
2632
|
-
},
|
|
2675
|
+
}, ci = (i) => {
|
|
2633
2676
|
class t extends i {
|
|
2634
2677
|
#t(s) {
|
|
2635
2678
|
let n = !1, r = !1;
|
|
@@ -2650,7 +2693,7 @@ const fe = oi(), vi = (i) => (t, e) => {
|
|
|
2650
2693
|
);
|
|
2651
2694
|
}
|
|
2652
2695
|
}
|
|
2653
|
-
}, l =
|
|
2696
|
+
}, l = b.getNotifier(this);
|
|
2654
2697
|
l.subscribe(d, s.newPropertyName), l.subscribe(d, s.deprecatedPropertyName);
|
|
2655
2698
|
}
|
|
2656
2699
|
constructor(...s) {
|
|
@@ -2661,9 +2704,9 @@ const fe = oi(), vi = (i) => (t, e) => {
|
|
|
2661
2704
|
}
|
|
2662
2705
|
return t;
|
|
2663
2706
|
};
|
|
2664
|
-
class
|
|
2707
|
+
class Si extends ai(ci(ti)) {
|
|
2665
2708
|
static {
|
|
2666
|
-
this.VIVID_VERSION = "5.
|
|
2709
|
+
this.VIVID_VERSION = "5.4.0";
|
|
2667
2710
|
}
|
|
2668
2711
|
/**
|
|
2669
2712
|
* Add data-vvd-component attribute with component name globally,
|
|
@@ -2676,40 +2719,40 @@ class mi extends ri(ai(Ye)) {
|
|
|
2676
2719
|
}
|
|
2677
2720
|
}
|
|
2678
2721
|
export {
|
|
2679
|
-
|
|
2722
|
+
hi as A,
|
|
2680
2723
|
lt as B,
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2724
|
+
T as D,
|
|
2725
|
+
E,
|
|
2726
|
+
k as H,
|
|
2684
2727
|
Kt as M,
|
|
2685
|
-
|
|
2728
|
+
b as O,
|
|
2686
2729
|
we as S,
|
|
2687
2730
|
Ut as U,
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2731
|
+
Si as V,
|
|
2732
|
+
De as a,
|
|
2733
|
+
gi as b,
|
|
2734
|
+
yi as c,
|
|
2735
|
+
vi as d,
|
|
2736
|
+
ui as e,
|
|
2694
2737
|
O as f,
|
|
2695
2738
|
qt as g,
|
|
2696
2739
|
re as h,
|
|
2697
2740
|
B as i,
|
|
2698
2741
|
at as j,
|
|
2699
|
-
|
|
2742
|
+
Ht as k,
|
|
2700
2743
|
rt as l,
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2744
|
+
U as m,
|
|
2745
|
+
bi as n,
|
|
2746
|
+
fi as o,
|
|
2704
2747
|
A as p,
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2748
|
+
X as q,
|
|
2749
|
+
wi as r,
|
|
2750
|
+
mi as s,
|
|
2751
|
+
w as t,
|
|
2709
2752
|
Gt as u,
|
|
2710
|
-
|
|
2711
|
-
|
|
2753
|
+
pi as v,
|
|
2754
|
+
m as w,
|
|
2712
2755
|
pe as x,
|
|
2713
|
-
|
|
2714
|
-
|
|
2756
|
+
di as y,
|
|
2757
|
+
tt as z
|
|
2715
2758
|
};
|