@microsoft/fast-element 2.0.0-beta.16 → 2.0.0-beta.17
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/CHANGELOG.json +15 -0
- package/CHANGELOG.md +9 -1
- package/dist/dts/components/element-controller.d.ts +5 -0
- package/dist/dts/templating/html-directive.d.ts +6 -1
- package/dist/dts/templating/node-observation.d.ts +1 -1
- package/dist/dts/templating/template.d.ts +5 -0
- package/dist/dts/templating/view.d.ts +6 -1
- package/dist/dts/testing/fakes.d.ts +1 -0
- package/dist/esm/components/element-controller.js +6 -1
- package/dist/esm/observation/observable.js +5 -1
- package/dist/esm/templating/binding-signal.js +6 -1
- package/dist/esm/templating/binding-two-way.js +6 -1
- package/dist/esm/templating/binding.js +9 -1
- package/dist/esm/templating/children.js +8 -4
- package/dist/esm/templating/html-directive.js +6 -0
- package/dist/esm/templating/node-observation.js +4 -4
- package/dist/esm/templating/template.js +6 -1
- package/dist/esm/templating/view.js +6 -0
- package/dist/esm/testing/fakes.js +2 -0
- package/dist/fast-element.d.ts +5 -1
- package/dist/fast-element.debug.js +47 -7
- package/dist/fast-element.debug.min.js +1 -1
- package/dist/fast-element.js +47 -7
- package/dist/fast-element.min.js +1 -1
- package/dist/fast-element.untrimmed.d.ts +21 -1
- package/docs/api-report.md +8 -0
- package/package.json +1 -1
package/CHANGELOG.json
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/fast-element",
|
|
3
3
|
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"date": "Tue, 01 Nov 2022 23:26:26 GMT",
|
|
6
|
+
"tag": "@microsoft/fast-element_v2.0.0-beta.17",
|
|
7
|
+
"version": "2.0.0-beta.17",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "roeisenb@microsoft.com",
|
|
12
|
+
"package": "@microsoft/fast-element",
|
|
13
|
+
"commit": "a4982f452702a8fee67397767b603d4a67702b10",
|
|
14
|
+
"comment": "fix: prevent circular reference errors when stringifying DOM nodes controlled by FAST's rendering engine"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
4
19
|
{
|
|
5
20
|
"date": "Fri, 28 Oct 2022 20:44:44 GMT",
|
|
6
21
|
"tag": "@microsoft/fast-element_v2.0.0-beta.16",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
# Change Log - @microsoft/fast-element
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 01 Nov 2022 23:26:26 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.0.0-beta.17
|
|
8
|
+
|
|
9
|
+
Tue, 01 Nov 2022 23:26:26 GMT
|
|
10
|
+
|
|
11
|
+
### Changes
|
|
12
|
+
|
|
13
|
+
- fix: prevent circular reference errors when stringifying DOM nodes controlled by FAST's rendering engine (roeisenb@microsoft.com)
|
|
14
|
+
|
|
7
15
|
## 2.0.0-beta.16
|
|
8
16
|
|
|
9
17
|
Fri, 28 Oct 2022 20:44:44 GMT
|
|
@@ -125,6 +125,11 @@ export declare class ElementController<TElement extends HTMLElement = HTMLElemen
|
|
|
125
125
|
* Only emits events if connected.
|
|
126
126
|
*/
|
|
127
127
|
emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): void | boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Opts out of JSON stringification.
|
|
130
|
+
* @internal
|
|
131
|
+
*/
|
|
132
|
+
toJSON: () => undefined;
|
|
128
133
|
private renderTemplate;
|
|
129
134
|
/**
|
|
130
135
|
* Locates or creates a controller for the specified element.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { HostBehavior } from "../index.js";
|
|
2
|
-
import
|
|
2
|
+
import { Constructable } from "../interfaces.js";
|
|
3
3
|
import type { Subscriber } from "../observation/notifier.js";
|
|
4
4
|
import { Expression, ExpressionController, ExpressionObserver } from "../observation/observable.js";
|
|
5
5
|
/**
|
|
@@ -259,6 +259,11 @@ export declare abstract class StatelessAttachedAttributeDirective<TOptions> impl
|
|
|
259
259
|
* The structural id of the DOM node to which the created behavior will apply.
|
|
260
260
|
*/
|
|
261
261
|
nodeId: string;
|
|
262
|
+
/**
|
|
263
|
+
* Opts out of JSON stringification.
|
|
264
|
+
* @internal
|
|
265
|
+
*/
|
|
266
|
+
toJSON: () => undefined;
|
|
262
267
|
/**
|
|
263
268
|
* Creates an instance of RefDirective.
|
|
264
269
|
* @param options - The options to use in configuring the directive.
|
|
@@ -36,7 +36,7 @@ export declare const elements: (selector?: string) => ElementsFilter;
|
|
|
36
36
|
* Internally used by the SlottedDirective and the ChildrenDirective.
|
|
37
37
|
*/
|
|
38
38
|
export declare abstract class NodeObservationDirective<T extends NodeBehaviorOptions> extends StatelessAttachedAttributeDirective<T> {
|
|
39
|
-
private
|
|
39
|
+
private controllerProperty;
|
|
40
40
|
/**
|
|
41
41
|
* Bind this behavior to the source.
|
|
42
42
|
* @param source - The source to bind to.
|
|
@@ -75,6 +75,11 @@ export declare class ViewTemplate<TSource = any, TParent = any> implements Eleme
|
|
|
75
75
|
* host that the template is being attached to.
|
|
76
76
|
*/
|
|
77
77
|
render(source: TSource, host: Node, hostBindingTarget?: Element): HTMLView<TSource, TParent>;
|
|
78
|
+
/**
|
|
79
|
+
* Opts out of JSON stringification.
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
toJSON: () => undefined;
|
|
78
83
|
}
|
|
79
84
|
/**
|
|
80
85
|
* A marker interface used to capture types when interpolating Directive helpers
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Disposable } from "../interfaces.js";
|
|
2
2
|
import { ExecutionContext, SourceLifetime } from "../observation/observable.js";
|
|
3
3
|
import type { ViewBehaviorFactory, ViewBehaviorTargets, ViewController } from "./html-directive.js";
|
|
4
4
|
/**
|
|
@@ -185,6 +185,11 @@ export declare class HTMLView<TSource = any, TParent = any> implements ElementVi
|
|
|
185
185
|
* Unbinds a view's behaviors from its binding source.
|
|
186
186
|
*/
|
|
187
187
|
unbind(): void;
|
|
188
|
+
/**
|
|
189
|
+
* Opts out of JSON stringification.
|
|
190
|
+
* @internal
|
|
191
|
+
*/
|
|
192
|
+
toJSON: () => undefined;
|
|
188
193
|
private evaluateUnbindables;
|
|
189
194
|
/**
|
|
190
195
|
* Efficiently disposes of a contiguous range of synthetic view instances.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../interfaces.js";
|
|
1
|
+
import { noop } from "../interfaces.js";
|
|
2
2
|
import { PropertyChangeNotifier } from "../observation/notifier.js";
|
|
3
3
|
import { Observable, SourceLifetime } from "../observation/observable.js";
|
|
4
4
|
import { FAST } from "../platform.js";
|
|
@@ -58,6 +58,11 @@ export class ElementController extends PropertyChangeNotifier {
|
|
|
58
58
|
* If `null` then the element is managing its own rendering.
|
|
59
59
|
*/
|
|
60
60
|
this.view = null;
|
|
61
|
+
/**
|
|
62
|
+
* Opts out of JSON stringification.
|
|
63
|
+
* @internal
|
|
64
|
+
*/
|
|
65
|
+
this.toJSON = noop;
|
|
61
66
|
this.source = element;
|
|
62
67
|
this.definition = definition;
|
|
63
68
|
const shadowOptions = definition.shadowOptions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isFunction, isString, } from "../interfaces.js";
|
|
1
|
+
import { isFunction, isString, noop, } from "../interfaces.js";
|
|
2
2
|
import { createMetadataLocator, FAST } from "../platform.js";
|
|
3
3
|
import { Updates } from "./update-queue.js";
|
|
4
4
|
import { PropertyChangeNotifier, SubscriberSet } from "./notifier.js";
|
|
@@ -79,6 +79,10 @@ export const Observable = FAST.getById(2 /* KernelServiceId.observable */, () =>
|
|
|
79
79
|
this.propertyName = void 0;
|
|
80
80
|
this.notifier = void 0;
|
|
81
81
|
this.next = void 0;
|
|
82
|
+
/**
|
|
83
|
+
* Opts out of JSON stringification.
|
|
84
|
+
*/
|
|
85
|
+
this.toJSON = noop;
|
|
82
86
|
}
|
|
83
87
|
setMode(isAsync) {
|
|
84
88
|
this.isAsync = this.needsQueue = isAsync;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isString } from "../interfaces.js";
|
|
1
|
+
import { isString, noop } from "../interfaces.js";
|
|
2
2
|
import { Binding } from "./html-directive.js";
|
|
3
3
|
const subscribers = Object.create(null);
|
|
4
4
|
export const Signal = Object.freeze({
|
|
@@ -41,6 +41,11 @@ class SignalObserver {
|
|
|
41
41
|
this.dataBinding = dataBinding;
|
|
42
42
|
this.subscriber = subscriber;
|
|
43
43
|
this.isNotBound = true;
|
|
44
|
+
/**
|
|
45
|
+
* Opts out of JSON stringification.
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
this.toJSON = noop;
|
|
44
49
|
}
|
|
45
50
|
bind(controller) {
|
|
46
51
|
if (this.isNotBound) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isString } from "../interfaces.js";
|
|
1
|
+
import { isString, noop } from "../interfaces.js";
|
|
2
2
|
import { Observable, } from "../observation/observable.js";
|
|
3
3
|
import { FAST } from "../platform.js";
|
|
4
4
|
import { Binding } from "./html-directive.js";
|
|
@@ -25,6 +25,11 @@ class TwoWayObserver {
|
|
|
25
25
|
this.subscriber = subscriber;
|
|
26
26
|
this.dataBinding = dataBinding;
|
|
27
27
|
this.isNotBound = true;
|
|
28
|
+
/**
|
|
29
|
+
* Opts out of JSON stringification.
|
|
30
|
+
* @internal
|
|
31
|
+
*/
|
|
32
|
+
this.toJSON = noop;
|
|
28
33
|
this.notifier = Observable.binding(dataBinding.evaluate, this, dataBinding.isVolatile);
|
|
29
34
|
}
|
|
30
35
|
bind(controller) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isFunction } from "../interfaces.js";
|
|
1
|
+
import { isFunction, noop } from "../interfaces.js";
|
|
2
2
|
import { ExecutionContext, Observable, } from "../observation/observable.js";
|
|
3
3
|
import { FAST } from "../platform.js";
|
|
4
4
|
import { DOM } from "./dom.js";
|
|
@@ -19,6 +19,14 @@ class OnChangeBinding extends Binding {
|
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
class OneTimeBinding extends Binding {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
/**
|
|
25
|
+
* Opts out of JSON stringification.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
this.toJSON = noop;
|
|
29
|
+
}
|
|
22
30
|
createObserver() {
|
|
23
31
|
return this;
|
|
24
32
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isString } from "../interfaces.js";
|
|
1
|
+
import { isString, noop } from "../interfaces.js";
|
|
2
2
|
import { HTMLDirective } from "./html-directive.js";
|
|
3
3
|
import { NodeObservationDirective } from "./node-observation.js";
|
|
4
4
|
/**
|
|
@@ -24,9 +24,13 @@ export class ChildrenDirective extends NodeObservationDirective {
|
|
|
24
24
|
* @param target - The target to observe.
|
|
25
25
|
*/
|
|
26
26
|
observe(target) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
let observer = target[this.observerProperty];
|
|
28
|
+
if (!observer) {
|
|
29
|
+
observer = new MutationObserver(this.handleEvent);
|
|
30
|
+
observer.toJSON = noop;
|
|
31
|
+
observer.target = target;
|
|
32
|
+
target[this.observerProperty] = observer;
|
|
33
|
+
}
|
|
30
34
|
observer.observe(target, this.options);
|
|
31
35
|
}
|
|
32
36
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { noop } from "../interfaces.js";
|
|
1
2
|
import { ExecutionContext, } from "../observation/observable.js";
|
|
2
3
|
import { createTypeRegistry } from "../platform.js";
|
|
3
4
|
import { Markup, nextId } from "./markup.js";
|
|
@@ -201,6 +202,11 @@ export class StatelessAttachedAttributeDirective {
|
|
|
201
202
|
* The unique id of the factory.
|
|
202
203
|
*/
|
|
203
204
|
this.id = nextId();
|
|
205
|
+
/**
|
|
206
|
+
* Opts out of JSON stringification.
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
this.toJSON = noop;
|
|
204
210
|
}
|
|
205
211
|
/**
|
|
206
212
|
* Creates a placeholder string based on the directive's index within the template.
|
|
@@ -18,7 +18,7 @@ export const elements = (selector) => selector
|
|
|
18
18
|
export class NodeObservationDirective extends StatelessAttachedAttributeDirective {
|
|
19
19
|
constructor() {
|
|
20
20
|
super(...arguments);
|
|
21
|
-
this.
|
|
21
|
+
this.controllerProperty = `${this.id}-c`;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Bind this behavior to the source.
|
|
@@ -28,7 +28,7 @@ export class NodeObservationDirective extends StatelessAttachedAttributeDirectiv
|
|
|
28
28
|
*/
|
|
29
29
|
bind(controller) {
|
|
30
30
|
const target = controller.targets[this.nodeId];
|
|
31
|
-
target[this.
|
|
31
|
+
target[this.controllerProperty] = controller;
|
|
32
32
|
this.updateTarget(controller.source, this.computeNodes(target));
|
|
33
33
|
this.observe(target);
|
|
34
34
|
controller.onUnbind(this);
|
|
@@ -43,7 +43,7 @@ export class NodeObservationDirective extends StatelessAttachedAttributeDirectiv
|
|
|
43
43
|
const target = controller.targets[this.nodeId];
|
|
44
44
|
this.updateTarget(controller.source, emptyArray);
|
|
45
45
|
this.disconnect(target);
|
|
46
|
-
target[this.
|
|
46
|
+
target[this.controllerProperty] = null;
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Gets the data source for the target.
|
|
@@ -51,7 +51,7 @@ export class NodeObservationDirective extends StatelessAttachedAttributeDirectiv
|
|
|
51
51
|
* @returns The source.
|
|
52
52
|
*/
|
|
53
53
|
getSource(target) {
|
|
54
|
-
return target[this.
|
|
54
|
+
return target[this.controllerProperty].source;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Updates the source property with the computed nodes.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isFunction, isString } from "../interfaces.js";
|
|
1
|
+
import { isFunction, isString, noop } from "../interfaces.js";
|
|
2
2
|
import { bind, HTMLBindingDirective, oneTime } from "./binding.js";
|
|
3
3
|
import { Compiler } from "./compiler.js";
|
|
4
4
|
import { Aspect, Binding, HTMLDirective, } from "./html-directive.js";
|
|
@@ -15,6 +15,11 @@ export class ViewTemplate {
|
|
|
15
15
|
*/
|
|
16
16
|
constructor(html, factories) {
|
|
17
17
|
this.result = null;
|
|
18
|
+
/**
|
|
19
|
+
* Opts out of JSON stringification.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
this.toJSON = noop;
|
|
18
23
|
this.html = html;
|
|
19
24
|
this.factories = factories;
|
|
20
25
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { noop } from "../interfaces.js";
|
|
1
2
|
import { ExecutionContext, Observable, SourceLifetime, } from "../observation/observable.js";
|
|
2
3
|
function removeNodeSequence(firstNode, lastNode) {
|
|
3
4
|
const parent = firstNode.parentNode;
|
|
@@ -50,6 +51,11 @@ export class HTMLView {
|
|
|
50
51
|
* The length of the current collection within a repeat context.
|
|
51
52
|
*/
|
|
52
53
|
this.length = 0;
|
|
54
|
+
/**
|
|
55
|
+
* Opts out of JSON stringification.
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
this.toJSON = noop;
|
|
53
59
|
this.firstChild = fragment.firstChild;
|
|
54
60
|
this.lastChild = fragment.lastChild;
|
|
55
61
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ExecutionContext, } from "../index.js";
|
|
2
|
+
import { noop } from "../interfaces.js";
|
|
2
3
|
export const Fake = Object.freeze({
|
|
3
4
|
executionContext(parent, parentContext) {
|
|
4
5
|
return {
|
|
@@ -83,6 +84,7 @@ export const Fake = Object.freeze({
|
|
|
83
84
|
},
|
|
84
85
|
source: null,
|
|
85
86
|
targets,
|
|
87
|
+
toJSON: noop,
|
|
86
88
|
bind(source, context = Fake.executionContext()) {
|
|
87
89
|
if (this.isBound) {
|
|
88
90
|
return;
|
package/dist/fast-element.d.ts
CHANGED
|
@@ -760,6 +760,7 @@ export declare class ElementController<TElement extends HTMLElement = HTMLElemen
|
|
|
760
760
|
* Only emits events if connected.
|
|
761
761
|
*/
|
|
762
762
|
emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): void | boolean;
|
|
763
|
+
/* Excluded from this release type: toJSON */
|
|
763
764
|
private renderTemplate;
|
|
764
765
|
/**
|
|
765
766
|
* Locates or creates a controller for the specified element.
|
|
@@ -1510,6 +1511,7 @@ export declare class HTMLView<TSource = any, TParent = any> implements ElementVi
|
|
|
1510
1511
|
* Unbinds a view's behaviors from its binding source.
|
|
1511
1512
|
*/
|
|
1512
1513
|
unbind(): void;
|
|
1514
|
+
/* Excluded from this release type: toJSON */
|
|
1513
1515
|
private evaluateUnbindables;
|
|
1514
1516
|
/**
|
|
1515
1517
|
* Efficiently disposes of a contiguous range of synthetic view instances.
|
|
@@ -1605,7 +1607,7 @@ export declare interface NodeBehaviorOptions<T = any> {
|
|
|
1605
1607
|
* Internally used by the SlottedDirective and the ChildrenDirective.
|
|
1606
1608
|
*/
|
|
1607
1609
|
export declare abstract class NodeObservationDirective<T extends NodeBehaviorOptions> extends StatelessAttachedAttributeDirective<T> {
|
|
1608
|
-
private
|
|
1610
|
+
private controllerProperty;
|
|
1609
1611
|
/**
|
|
1610
1612
|
* Bind this behavior to the source.
|
|
1611
1613
|
* @param source - The source to bind to.
|
|
@@ -2267,6 +2269,7 @@ export declare abstract class StatelessAttachedAttributeDirective<TOptions> impl
|
|
|
2267
2269
|
* The structural id of the DOM node to which the created behavior will apply.
|
|
2268
2270
|
*/
|
|
2269
2271
|
nodeId: string;
|
|
2272
|
+
/* Excluded from this release type: toJSON */
|
|
2270
2273
|
/**
|
|
2271
2274
|
* Creates an instance of RefDirective.
|
|
2272
2275
|
* @param options - The options to use in configuring the directive.
|
|
@@ -2689,6 +2692,7 @@ export declare class ViewTemplate<TSource = any, TParent = any> implements Eleme
|
|
|
2689
2692
|
* host that the template is being attached to.
|
|
2690
2693
|
*/
|
|
2691
2694
|
render(source: TSource, host: Node, hostBindingTarget?: Element): HTMLView<TSource, TParent>;
|
|
2695
|
+
/* Excluded from this release type: toJSON */
|
|
2692
2696
|
}
|
|
2693
2697
|
|
|
2694
2698
|
/**
|
|
@@ -186,6 +186,10 @@ const isFunction = (object) => typeof object === "function";
|
|
|
186
186
|
* @internal
|
|
187
187
|
*/
|
|
188
188
|
const isString = (object) => typeof object === "string";
|
|
189
|
+
/**
|
|
190
|
+
* @internal
|
|
191
|
+
*/
|
|
192
|
+
const noop = () => void 0;
|
|
189
193
|
|
|
190
194
|
/**
|
|
191
195
|
* The default UpdateQueue.
|
|
@@ -495,6 +499,10 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
495
499
|
this.propertyName = void 0;
|
|
496
500
|
this.notifier = void 0;
|
|
497
501
|
this.next = void 0;
|
|
502
|
+
/**
|
|
503
|
+
* Opts out of JSON stringification.
|
|
504
|
+
*/
|
|
505
|
+
this.toJSON = noop;
|
|
498
506
|
}
|
|
499
507
|
setMode(isAsync) {
|
|
500
508
|
this.isAsync = this.needsQueue = isAsync;
|
|
@@ -1860,6 +1868,11 @@ class StatelessAttachedAttributeDirective {
|
|
|
1860
1868
|
* The unique id of the factory.
|
|
1861
1869
|
*/
|
|
1862
1870
|
this.id = nextId();
|
|
1871
|
+
/**
|
|
1872
|
+
* Opts out of JSON stringification.
|
|
1873
|
+
* @internal
|
|
1874
|
+
*/
|
|
1875
|
+
this.toJSON = noop;
|
|
1863
1876
|
}
|
|
1864
1877
|
/**
|
|
1865
1878
|
* Creates a placeholder string based on the directive's index within the template.
|
|
@@ -1894,6 +1907,14 @@ class OnChangeBinding extends Binding {
|
|
|
1894
1907
|
}
|
|
1895
1908
|
}
|
|
1896
1909
|
class OneTimeBinding extends Binding {
|
|
1910
|
+
constructor() {
|
|
1911
|
+
super(...arguments);
|
|
1912
|
+
/**
|
|
1913
|
+
* Opts out of JSON stringification.
|
|
1914
|
+
* @internal
|
|
1915
|
+
*/
|
|
1916
|
+
this.toJSON = noop;
|
|
1917
|
+
}
|
|
1897
1918
|
createObserver() {
|
|
1898
1919
|
return this;
|
|
1899
1920
|
}
|
|
@@ -2201,6 +2222,11 @@ class HTMLView {
|
|
|
2201
2222
|
* The length of the current collection within a repeat context.
|
|
2202
2223
|
*/
|
|
2203
2224
|
this.length = 0;
|
|
2225
|
+
/**
|
|
2226
|
+
* Opts out of JSON stringification.
|
|
2227
|
+
* @internal
|
|
2228
|
+
*/
|
|
2229
|
+
this.toJSON = noop;
|
|
2204
2230
|
this.firstChild = fragment.firstChild;
|
|
2205
2231
|
this.lastChild = fragment.lastChild;
|
|
2206
2232
|
}
|
|
@@ -2683,6 +2709,11 @@ class ViewTemplate {
|
|
|
2683
2709
|
*/
|
|
2684
2710
|
constructor(html, factories) {
|
|
2685
2711
|
this.result = null;
|
|
2712
|
+
/**
|
|
2713
|
+
* Opts out of JSON stringification.
|
|
2714
|
+
* @internal
|
|
2715
|
+
*/
|
|
2716
|
+
this.toJSON = noop;
|
|
2686
2717
|
this.html = html;
|
|
2687
2718
|
this.factories = factories;
|
|
2688
2719
|
}
|
|
@@ -3094,7 +3125,7 @@ const elements = (selector) => selector
|
|
|
3094
3125
|
class NodeObservationDirective extends StatelessAttachedAttributeDirective {
|
|
3095
3126
|
constructor() {
|
|
3096
3127
|
super(...arguments);
|
|
3097
|
-
this.
|
|
3128
|
+
this.controllerProperty = `${this.id}-c`;
|
|
3098
3129
|
}
|
|
3099
3130
|
/**
|
|
3100
3131
|
* Bind this behavior to the source.
|
|
@@ -3104,7 +3135,7 @@ class NodeObservationDirective extends StatelessAttachedAttributeDirective {
|
|
|
3104
3135
|
*/
|
|
3105
3136
|
bind(controller) {
|
|
3106
3137
|
const target = controller.targets[this.nodeId];
|
|
3107
|
-
target[this.
|
|
3138
|
+
target[this.controllerProperty] = controller;
|
|
3108
3139
|
this.updateTarget(controller.source, this.computeNodes(target));
|
|
3109
3140
|
this.observe(target);
|
|
3110
3141
|
controller.onUnbind(this);
|
|
@@ -3119,7 +3150,7 @@ class NodeObservationDirective extends StatelessAttachedAttributeDirective {
|
|
|
3119
3150
|
const target = controller.targets[this.nodeId];
|
|
3120
3151
|
this.updateTarget(controller.source, emptyArray);
|
|
3121
3152
|
this.disconnect(target);
|
|
3122
|
-
target[this.
|
|
3153
|
+
target[this.controllerProperty] = null;
|
|
3123
3154
|
}
|
|
3124
3155
|
/**
|
|
3125
3156
|
* Gets the data source for the target.
|
|
@@ -3127,7 +3158,7 @@ class NodeObservationDirective extends StatelessAttachedAttributeDirective {
|
|
|
3127
3158
|
* @returns The source.
|
|
3128
3159
|
*/
|
|
3129
3160
|
getSource(target) {
|
|
3130
|
-
return target[this.
|
|
3161
|
+
return target[this.controllerProperty].source;
|
|
3131
3162
|
}
|
|
3132
3163
|
/**
|
|
3133
3164
|
* Updates the source property with the computed nodes.
|
|
@@ -3223,9 +3254,13 @@ class ChildrenDirective extends NodeObservationDirective {
|
|
|
3223
3254
|
* @param target - The target to observe.
|
|
3224
3255
|
*/
|
|
3225
3256
|
observe(target) {
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3257
|
+
let observer = target[this.observerProperty];
|
|
3258
|
+
if (!observer) {
|
|
3259
|
+
observer = new MutationObserver(this.handleEvent);
|
|
3260
|
+
observer.toJSON = noop;
|
|
3261
|
+
observer.target = target;
|
|
3262
|
+
target[this.observerProperty] = observer;
|
|
3263
|
+
}
|
|
3229
3264
|
observer.observe(target, this.options);
|
|
3230
3265
|
}
|
|
3231
3266
|
/**
|
|
@@ -3617,6 +3652,11 @@ class ElementController extends PropertyChangeNotifier {
|
|
|
3617
3652
|
* If `null` then the element is managing its own rendering.
|
|
3618
3653
|
*/
|
|
3619
3654
|
this.view = null;
|
|
3655
|
+
/**
|
|
3656
|
+
* Opts out of JSON stringification.
|
|
3657
|
+
* @internal
|
|
3658
|
+
*/
|
|
3659
|
+
this.toJSON = noop;
|
|
3620
3660
|
this.source = element;
|
|
3621
3661
|
this.definition = definition;
|
|
3622
3662
|
const shadowOptions = definition.shadowOptions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){if("undefined"==typeof globalThis)if("undefined"!=typeof global)global.globalThis=global;else if("undefined"!=typeof self)self.globalThis=self;else if("undefined"!=typeof window)window.globalThis=window;else{const e=new Function("return this")();e.globalThis=e}}(),globalThis.trustedTypes||(globalThis.trustedTypes={createPolicy:(e,t)=>t}),void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",{value:Object.create(null),configurable:!1,enumerable:!1,writable:!1});const e=globalThis.FAST,t={1101:"Must call enableArrayObservation before observing arrays.",1201:"The HTML policy can only be set once.",1202:"To bind innerHTML, you must use a TrustedTypesPolicy.",1203:"View=>Model update skipped. To use twoWay binding, the target property must be observable.",1204:"No host element is present. Cannot bind host with ${name}.",1205:"The requested binding behavior is not supported by the binding engine.",1401:"Missing FASTElement definition.",1501:"No registration for Context/Interface '${name}'.",1502:"Dependency injection resolver for '${key}' returned a null factory.",1503:"Invalid dependency injection resolver strategy specified '${strategy}'.",1504:"Unable to autoregister dependency.",1505:"Unable to resolve dependency injection key '${key}'.",1506:"'${name}' is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.",1507:"Attempted to jitRegister something that is not a constructor '${value}'. Did you forget to register this dependency?",1508:"Attempted to jitRegister an intrinsic type '${value}'. Did you forget to add @inject(Key)?",1509:"Attempted to jitRegister an interface '${value}'.",1510:"A valid resolver was not returned from the register method.",1511:"Key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?",1512:"'${key}' not registered. Did you forget to add @singleton()?",1513:"Cyclic dependency found '${name}'.",1514:"Injected properties that are updated on changes to DOM connectivity require the target object to be an instance of FASTElement."},s=/(\$\{\w+?})/g,i=/\$\{(\w+?)}/g,n=Object.freeze({});function r(e,t){return e.split(s).map((e=>{var s;const n=e.replace(i,"$1");return String(null!==(s=t[n])&&void 0!==s?s:e)})).join("")}Object.assign(e,{addMessages(e){Object.assign(t,e)},warn(e,s=n){var i;const o=null!==(i=t[e])&&void 0!==i?i:"Unknown Warning";console.warn(r(o,s))},error(e,s=n){var i;const o=null!==(i=t[e])&&void 0!==i?i:"Unknown Error";return new Error(r(o,s))}});const o={configurable:!1,enumerable:!1,writable:!1};void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},o));const l=globalThis.FAST;if(void 0===l.getById){const e=Object.create(null);Reflect.defineProperty(l,"getById",Object.assign({value(t,s){let i=e[t];return void 0===i&&(i=s?e[t]=s():null),i}},o))}void 0===l.error&&Object.assign(l,{warn(){},error:e=>new Error(`Error ${e}`),addMessages(){}});const a=Object.freeze([]);function h(){const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t),getForInstance(t){if(null!=t)return e.get(t.constructor)}})}function c(){const e=new WeakMap;return function(t){let s=e.get(t);if(void 0===s){let i=Reflect.getPrototypeOf(t);for(;void 0===s&&null!==i;)s=e.get(i),i=Reflect.getPrototypeOf(i);s=void 0===s?[]:s.slice(0),e.set(t,s)}return s}}const d=e=>"function"==typeof e,u=e=>"string"==typeof e,f=l.getById(1,(()=>{const e=[],t=[],s=globalThis.requestAnimationFrame;let i=!0;function n(){if(t.length)throw t.shift()}function r(s){try{s.call()}catch(s){if(!i)throw e.length=0,s;t.push(s),setTimeout(n,0)}}function o(){let t=0;for(;t<e.length;)if(r(e[t]),t++,t>1024){for(let s=0,i=e.length-t;s<i;s++)e[s]=e[s+t];e.length-=t,t=0}e.length=0}function l(t){e.push(t),e.length<2&&(i?s(o):o())}return Object.freeze({enqueue:l,next:()=>new Promise(l),process:o,setMode:e=>i=e})}));class g{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const s=t.indexOf(e);-1!==s&&t.splice(s,1)}}notify(e){const t=this.spillover,s=this.subject;if(void 0===t){const t=this.sub1,i=this.sub2;void 0!==t&&t.handleChange(s,e),void 0!==i&&i.handleChange(s,e)}else for(let i=0,n=t.length;i<n;++i)t[i].handleChange(s,e)}}class p{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,s;null===(t=this.subscribers[e])||void 0===t||t.notify(e),null===(s=this.subjectSubscribers)||void 0===s||s.notify(e)}subscribe(e,t){var s,i;let n;n=t?null!==(s=this.subscribers[t])&&void 0!==s?s:this.subscribers[t]=new g(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new g(this.subject),n.subscribe(e)}unsubscribe(e,t){var s,i;t?null===(s=this.subscribers[t])||void 0===s||s.unsubscribe(e):null===(i=this.subjectSubscribers)||void 0===i||i.unsubscribe(e)}}const b=Object.freeze({unknown:void 0,coupled:1}),v=l.getById(2,(()=>{const e=f.enqueue,t=/(:|&&|\|\||if)/,s=new WeakMap;let i,n=e=>{throw l.error(1101)};function r(e){var t;let i=null!==(t=e.$fastController)&&void 0!==t?t:s.get(e);return void 0===i&&(Array.isArray(e)?i=n(e):s.set(e,i=new p(e))),i}const o=c();class a{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==i&&i.watch(e,this.name),e[this.field]}setValue(e,t){const s=this.field,i=e[s];if(i!==t){e[s]=t;const n=e[this.callback];d(n)&&n.call(e,i,t),r(e).notify(this.name)}}}class h extends g{constructor(e,t,s=!1){super(e,t),this.expression=e,this.isVolatileBinding=s,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(e){this.isAsync=this.needsQueue=e}bind(e){this.controller=e;const t=this.observe(e.source,e.context);return!e.isBound&&this.requiresUnbind(e)&&e.onUnbind(this),t}requiresUnbind(e){return e.sourceLifetime!==b.coupled||this.first!==this.last||this.first.propertySource!==e.source}unbind(e){this.dispose()}observe(e,t){this.needsRefresh&&null!==this.last&&this.dispose();const s=i;let n;i=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{n=this.expression(e,t)}finally{i=s}return n}disconnect(){this.dispose()}dispose(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(e,t){const s=this.last,n=r(e),o=null===s?this.first:{};if(o.propertySource=e,o.propertyName=t,o.notifier=n,n.subscribe(this,t),null!==s){if(!this.needsRefresh){let t;i=void 0,t=s.propertySource[s.propertyName],i=this,e===t&&(this.needsRefresh=!0)}s.next=o}this.last=o}handleChange(){this.needsQueue?(this.needsQueue=!1,e(this)):this.isAsync||this.call()}call(){null!==this.last&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let e=this.first;for(;void 0!==e;)yield e,e=e.next}}return Object.freeze({setArrayObserverFactory(e){n=e},getNotifier:r,track(e,t){i&&i.watch(e,t)},trackVolatile(){i&&(i.needsRefresh=!0)},notify(e,t){r(e).notify(t)},defineProperty(e,t){u(t)&&(t=new a(t)),o(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:o,binding(e,t,s=this.isVolatileBinding(e)){return new h(e,t,s)},isVolatileBinding:e=>t.test(e.toString())})}));function y(e,t){v.defineProperty(e,t)}function m(e,t,s){return Object.assign({},s,{get(){return v.trackVolatile(),s.get.apply(this)}})}const w=l.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}})),C=Object.freeze({default:{index:0,length:0,get event(){return C.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>w.get(),setEvent(e){w.set(e)}});class x{constructor(e,t,s){this.index=e,this.removed=t,this.addedCount=s}adjustTo(e){let t=this.index;const s=e.length;return t>s?t=s-this.addedCount:t<0&&(t=s+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}}const T=Object.freeze({reset:1,splice:2,optimized:3}),S=new x(0,a,0);S.reset=!0;const O=[S];function B(e,t,s,i,n,r){let o=0,l=0;const h=Math.min(s-t,r-n);if(0===t&&0===n&&(o=function(e,t,s){for(let i=0;i<s;++i)if(e[i]!==t[i])return i;return s}(e,i,h)),s===e.length&&r===i.length&&(l=function(e,t,s){let i=e.length,n=t.length,r=0;for(;r<s&&e[--i]===t[--n];)r++;return r}(e,i,h-o)),n+=o,r-=l,(s-=l)-(t+=o)==0&&r-n==0)return a;if(t===s){const e=new x(t,[],0);for(;n<r;)e.removed.push(i[n++]);return[e]}if(n===r)return[new x(t,[],s-t)];const c=function(e){let t=e.length-1,s=e[0].length-1,i=e[t][s];const n=[];for(;t>0||s>0;){if(0===t){n.push(2),s--;continue}if(0===s){n.push(3),t--;continue}const r=e[t-1][s-1],o=e[t-1][s],l=e[t][s-1];let a;a=o<l?o<r?o:r:l<r?l:r,a===r?(r===i?n.push(0):(n.push(1),i=r),t--,s--):a===o?(n.push(3),t--,i=o):(n.push(2),s--,i=l)}return n.reverse()}(function(e,t,s,i,n,r){const o=r-n+1,l=s-t+1,a=new Array(o);let h,c;for(let e=0;e<o;++e)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;++e)a[0][e]=e;for(let s=1;s<o;++s)for(let r=1;r<l;++r)e[t+r-1]===i[n+s-1]?a[s][r]=a[s-1][r-1]:(h=a[s-1][r]+1,c=a[s][r-1]+1,a[s][r]=h<c?h:c);return a}(e,t,s,i,n,r)),d=[];let u,f=t,g=n;for(let e=0;e<c.length;++e)switch(c[e]){case 0:void 0!==u&&(d.push(u),u=void 0),f++,g++;break;case 1:void 0===u&&(u=new x(f,[],0)),u.addedCount++,f++,u.removed.push(i[g]),g++;break;case 2:void 0===u&&(u=new x(f,[],0)),u.addedCount++,f++;break;case 3:void 0===u&&(u=new x(f,[],0)),u.removed.push(i[g]),g++}return void 0!==u&&d.push(u),d}function A(e,t){let s=!1,i=0;for(let a=0;a<t.length;a++){const h=t[a];if(h.index+=i,s)continue;const c=(n=e.index,r=e.index+e.removed.length,o=h.index,l=h.index+h.addedCount,r<o||l<n?-1:r===o||l===n?0:n<o?r<l?r-o:l-o:l<r?l-n:r-n);if(c>=0){t.splice(a,1),a--,i-=h.addedCount-h.removed.length,e.addedCount+=h.addedCount-c;const n=e.removed.length+h.removed.length-c;if(e.addedCount||n){let t=h.removed;if(e.index<h.index){const s=e.removed.slice(0,h.index-e.index);s.push(...t),t=s}if(e.index+e.removed.length>h.index+h.addedCount){const s=e.removed.slice(h.index+h.addedCount-e.index);t.push(...s)}e.removed=t,h.index<e.index&&(e.index=h.index)}else s=!0}else if(e.index<h.index){s=!0,t.splice(a,0,e),a++;const n=e.addedCount-e.removed.length;h.index+=n,i+=n}}var n,r,o,l;s||t.push(e)}let k=Object.freeze({support:T.optimized,normalize:(e,t,s)=>void 0===e?void 0===s?a:s.length>1?function(e,t){let s=[];const i=[];for(let e=0,s=t.length;e<s;e++)A(t[e],i);for(let t=0,n=i.length;t<n;++t){const n=i[t];1!==n.addedCount||1!==n.removed.length?s=s.concat(B(e,n.index,n.index+n.addedCount,n.removed,0,n.removed.length)):n.removed[0]!==e[n.index]&&s.push(n)}return s}(t,s):s:O,pop(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new x(e.length,[r],0)),r},push(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new x(e.length-i.length,[],i.length).adjustTo(e)),n},reverse(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},shift(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new x(0,[r],0)),r},sort(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},splice(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new x(+i[0],n,i.length>2?i.length-2:0).adjustTo(e)),n},unshift(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new x(0,[],i.length).adjustTo(e)),n}});const j=Object.freeze({reset:O,setDefaultStrategy(e){k=e}});function $(e,t,s){Reflect.defineProperty(e,t,{value:s,enumerable:!1})}class I extends g{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this.call=this.flush,$(e,"$fastController",this)}get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let e=this._lengthObserver;if(void 0===e){const t=this.subject;this._lengthObserver=e={length:t.length,handleChange(){this.length!==t.length&&(this.length=t.length,v.notify(e,"length"))}},this.subscribe(e)}return e}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.oldCollection;void 0===t&&void 0===s||(this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0,this.notify((null!==(e=this._strategy)&&void 0!==e?e:k).normalize(s,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,f.enqueue(this))}}let V=!1;const E=Object.freeze({enable(){if(V)return;V=!0,v.setArrayObserverFactory((e=>new I(e)));const e=Array.prototype;e.$fastPatch||($(e,"$fastPatch",1),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach((t=>{e[t.name]=function(...e){var s;const i=this.$fastController;return void 0===i?t.apply(this,e):(null!==(s=i.strategy)&&void 0!==s?s:k)[t.name](this,i,t,e)}})))}});function N(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(E.enable(),t=v.getNotifier(e)),v.track(t.lengthObserver,"length"),e.length}let M;function F(e){return e.map((e=>e instanceof L?F(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}class L{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map((e=>e instanceof L?e.behaviors:null)).reduce(((e,t)=>null===t?e:null===e?t:e.concat(t)),null)}get strategy(){return null===this._strategy&&this.withStrategy(M),this._strategy}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}withStrategy(e){return this._strategy=new e(F(this.styles)),this}static setDefaultStrategy(e){M=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new L(e):e instanceof L?e:new L([e])}}L.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const z=h(),P=Object.freeze({getForInstance:z.getForInstance,getByType:z.getByType,define:e=>(z.register({type:e}),e)});function R(){return function(e){P.define(e)}}function _(e,t){const s=[];let i="";const n=[],r=e=>{n.push(e)};for(let n=0,o=e.length-1;n<o;++n){i+=e[n];let o=t[n];void 0!==P.getForInstance(o)&&(o=o.createCSS(r)),o instanceof L||o instanceof CSSStyleSheet?(""!==i.trim()&&(s.push(i),i=""),s.push(o)):i+=o}return i+=e[e.length-1],""!==i.trim()&&s.push(i),{styles:s,behaviors:n}}const D=(e,...t)=>{const{styles:s,behaviors:i}=_(e,t),n=new L(s);return i.length?n.withBehaviors(...i):n};class H{constructor(e,t){this.behaviors=t,this.css="";const s=e.reduce(((e,t)=>(u(t)?this.css+=t:e.push(t),e)),[]);s.length&&(this.styles=new L(s))}createCSS(e){return this.behaviors.forEach(e),this.styles&&e(this),this.css}addedCallback(e){e.addStyles(this.styles)}removedCallback(e){e.removeStyles(this.styles)}}P.define(H);const U=D.partial=(e,...t)=>{const{styles:s,behaviors:i}=_(e,t);return new H(s,i)},q=Object.freeze({queueUpdate:f.enqueue,nextUpdate:f.next,processUpdates:f.process,setAttribute(e,t,s){null==s?e.removeAttribute(t):e.setAttribute(t,s)},setBooleanAttribute(e,t,s){s?e.setAttribute(t,""):e.removeAttribute(t)}}),Q=`fast-${Math.random().toString(36).substring(2,8)}`,W=`${Q}{`,K=`}${Q}`,G=K.length;let J=0;const X=()=>`${Q}-${++J}`,Y=Object.freeze({interpolation:e=>`${W}${e}${K}`,attribute:e=>`${X()}="${W}${e}${K}"`,comment:e=>`\x3c!--${W}${e}${K}--\x3e`}),Z=Object.freeze({parse(e,t){const s=e.split(W);if(1===s.length)return null;const i=[];for(let e=0,n=s.length;e<n;++e){const n=s[e],r=n.indexOf(K);let o;if(-1===r)o=n;else{const e=n.substring(0,r);i.push(t[e]),o=n.substring(r+G)}""!==o&&i.push(o)}return i}}),ee=Object.freeze({create(e){const t=[],s={};let i=null,n=!1;return{source:e,context:C.default,targets:s,get isBound(){return n},addBehaviorFactory(e,t){const s=e.nodeId||(e.nodeId=X());e.id||(e.id=X()),this.addTarget(s,t),this.addBehavior(e.createBehavior())},addTarget(e,t){s[e]=t},addBehavior(e){t.push(e),n&&e.bind(this)},onUnbind(e){null===i&&(i=[]),i.push(e)},connectedCallback(e){n||(n=!0,t.forEach((e=>e.bind(this))))},disconnectedCallback(e){n&&(n=!1,null!==i&&i.forEach((e=>e.unbind(this))))}}}}),te=h(),se=Object.freeze({getForInstance:te.getForInstance,getByType:te.getByType,define:(e,t)=>((t=t||{}).type=e,te.register(t),e)});function ie(e){return function(t){se.define(t,e)}}class ne{constructor(e,t=!1){this.evaluate=e,this.isVolatile=t}}const re=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6,assign(e,t){if(t)switch(e.sourceAspect=t,t[0]){case":":e.targetAspect=t.substring(1),e.aspectType="classList"===e.targetAspect?re.tokenList:re.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=re.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=re.event;break;default:e.targetAspect=t,e.aspectType=re.attribute}else e.aspectType=re.content}});class oe{constructor(e){this.options=e,this.id=X()}createHTML(e){return Y.attribute(e(this))}createBehavior(){return this}}const le=globalThis.TrustedHTML?e=>(t,s)=>{const i=e(t,s);if(i instanceof TrustedHTML)return i;throw l.error(1202)}:e=>e;class ae extends ne{createObserver(e,t){return v.binding(this.evaluate,t,this.isVolatile)}}class he extends ne{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function ce(e,t,s,i){if(null==s&&(s=""),s.create){e.textContent="";let t=e.$fastView;void 0===t?t=s.create():e.$fastTemplate!==s&&(t.isComposed&&(t.remove(),t.unbind()),t=s.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(i.source,i.context)):(t.isComposed=!0,t.bind(i.source,i.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=s)}else{const t=e.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=s}}function de(e,t,s){var i;const n=`${this.id}-t`,r=null!==(i=e[n])&&void 0!==i?i:e[n]={v:0,cv:Object.create(null)},o=r.cv;let l=r.v;const a=e[t];if(null!=s&&s.length){const e=s.split(/\s+/);for(let t=0,s=e.length;t<s;++t){const s=e[t];""!==s&&(o[s]=l,a.add(s))}}if(r.v=l+1,0!==l){l-=1;for(const e in o)o[e]===l&&a.remove(e)}}const ue=(e,t,s)=>e[t]=s,fe=()=>{};class ge{constructor(e){this.dataBinding=e,this.updateTarget=null,this.id=X(),this.aspectType=re.content,this.data=`${this.id}-d`}createHTML(e){return Y.interpolation(e(this))}createBehavior(){if(null===this.updateTarget)switch("innerHTML"===this.targetAspect&&(this.dataBinding.evaluate=le(this.dataBinding.evaluate)),this.aspectType){case 1:this.updateTarget=q.setAttribute;break;case 2:this.updateTarget=q.setBooleanAttribute;break;case 3:this.updateTarget=ue;break;case 4:this.updateTarget=ce;break;case 5:this.updateTarget=de;break;case 6:this.updateTarget=fe;break;default:throw l.error(1205)}return this}bind(e){var t;const s=e.targets[this.nodeId];switch(this.updateTarget){case fe:s[this.data]=e,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case ce:e.onUnbind(this);default:const i=null!==(t=s[this.data])&&void 0!==t?t:s[this.data]=this.dataBinding.createObserver(this,this);i.target=s,i.controller=e,this.updateTarget(s,this.targetAspect,i.bind(e),e)}}unbind(e){const t=e.targets[this.nodeId].$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){C.setEvent(e);const s=this.dataBinding.evaluate(t.source,t.context);C.setEvent(null),!0!==s&&e.preventDefault()}}handleChange(e,t){const s=t.target,i=t.controller;this.updateTarget(s,this.targetAspect,t.bind(i),i)}}function pe(e,t=v.isVolatileBinding(e)){return new ae(e,t)}function be(e){return new he(e)}function ve(e,t){const s=new ae(e,!1);return s.options=t,s}function ye(e){return d(e)?pe(e):e instanceof ne?e:be((()=>e))}function me(e,t){const s=e.parentNode;let i,n=e;for(;n!==t;)i=n.nextSibling,s.removeChild(n),n=i;s.removeChild(t)}se.define(ge,{aspected:!0});class we{constructor(e,t,s){this.fragment=e,this.factories=t,this.targets=s,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=b.unknown,this.context=this,this.index=0,this.length=0,this.firstChild=e.firstChild,this.lastChild=e.lastChild}get event(){return C.getEvent()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const s=e.parentNode;let i,n=this.firstChild;for(;n!==t;)i=n.nextSibling,s.insertBefore(n,e),n=i;s.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let s,i=this.firstChild;for(;i!==t;)s=i.nextSibling,e.appendChild(i),i=s;e.appendChild(t)}dispose(){me(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e)return;let s=this.behaviors;if(null===s){this.source=e,this.context=t,this.behaviors=s=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e].createBehavior();t.bind(this),s[e]=t}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=s.length;e<t;++e)s[e].bind(this)}this.isBound=!0}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,s=e.length;t<s;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(0!==e.length){me(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}}v.defineProperty(we.prototype,"index"),v.defineProperty(we.prototype,"length");const Ce=(e,t)=>`${e}.${t}`,xe={},Te={index:0,node:null};function Se(e){e.startsWith("fast-")||l.warn(1204,{name:e})}const Oe=new Proxy(document.createElement("div"),{get(e,t){Se(t);const s=Reflect.get(e,t);return d(s)?s.bind(e):s},set:(e,t,s)=>(Se(t),Reflect.set(e,t,s))});class Be{constructor(e,t){this.fragment=e,this.directives=t,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,s,i){this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(t,s,i)),e.nodeId=s,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,s){const i=this.descriptors;if("r"===t||"h"===t||i[t])return;if(!i[e]){const t=e.lastIndexOf("."),s=e.substring(0,t),i=parseInt(e.substring(t+1));this.addTargetDescriptor(s,e,i)}let n=xe[t];if(!n){const i=`_${t}`;xe[t]=n={get(){var t;return null!==(t=this[i])&&void 0!==t?t:this[i]=this[e].childNodes[s]}}}i[t]=n}createView(e){const t=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=t,s.h=null!=e?e:Oe;for(const e of this.nodeIds)s[e];return new we(t,this.factories,s)}}function Ae(e,t,s,i,n,r=!1){const o=s.attributes,l=e.directives;for(let a=0,h=o.length;a<h;++a){const c=o[a],d=c.value,u=Z.parse(d,l);let f=null;null===u?r&&(f=new ge(be((()=>d))),re.assign(f,c.name)):f=Ee.aggregate(u),null!==f&&(s.removeAttributeNode(c),a--,h--,e.addFactory(f,t,i,n))}}function ke(e,t,s){let i=0,n=t.firstChild;for(;n;){const t=je(e,s,n,i);n=t.node,i=t.index}}function je(e,t,s,i){const n=Ce(t,i);switch(s.nodeType){case 1:Ae(e,t,s,n,i),ke(e,s,n);break;case 3:return function(e,t,s,i,n){const r=Z.parse(t.textContent,e.directives);if(null===r)return Te.node=t.nextSibling,Te.index=n+1,Te;let o,l=o=t;for(let t=0,a=r.length;t<a;++t){const a=r[t];0!==t&&(n++,i=Ce(s,n),o=l.parentNode.insertBefore(document.createTextNode(""),l.nextSibling)),u(a)?o.textContent=a:(o.textContent=" ",re.assign(a),e.addFactory(a,s,i,n)),l=o}return Te.index=n+1,Te.node=l.nextSibling,Te}(e,s,t,n,i);case 8:const r=Z.parse(s.data,e.directives);null!==r&&e.addFactory(Ee.aggregate(r),t,n,i)}return Te.index=i+1,Te.node=s.nextSibling,Te}const $e={createHTML:e=>e};let Ie=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",$e):$e;const Ve=Ie,Ee={setHTMLPolicy(e){if(Ie!==Ve)throw l.error(1201);Ie=e},compile(e,t){let s;if(u(e)){s=document.createElement("TEMPLATE"),s.innerHTML=Ie.createHTML(e);const t=s.content.firstElementChild;null!==t&&"TEMPLATE"===t.tagName&&(s=t)}else s=e;const i=document.adoptNode(s.content),n=new Be(i,t);return Ae(n,"",s,"h",0,!0),(function(e,t){return e&&8==e.nodeType&&null!==Z.parse(e.data,t)}(i.firstChild,t)||1===i.childNodes.length&&Object.keys(t).length>0)&&i.insertBefore(document.createComment(""),i.firstChild),ke(n,i,"r"),Te.node=null,n.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e){if(1===e.length)return e[0];let t,s,i=!1;const n=e.length,r=e.map((e=>u(e)?()=>e:(t=e.sourceAspect||t,s=e.dataBinding||s,i=i||e.dataBinding.isVolatile,e.dataBinding.evaluate)));s.evaluate=(e,t)=>{let s="";for(let i=0;i<n;++i)s+=r[i](e,t);return s},s.isVolatile=i;const o=new ge(s);return re.assign(o,t),o}};class Ne{constructor(e,t){this.result=null,this.html=e,this.factories=t}create(e){return null===this.result&&(this.result=Ee.compile(this.html,this.factories)),this.result.createView(e)}render(e,t,s){const i=this.create(s);return i.bind(e),i.appendTo(t),i}}const Me=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function Fe(e,t,s){const i=Me.exec(t);return null!==i&&re.assign(e,i[2]),e.createHTML(s)}function Le(e,...t){let s="";const i=Object.create(null),n=e=>{var t;const s=null!==(t=e.id)&&void 0!==t?t:e.id=X();return i[s]=e,s};for(let i=0,r=e.length-1;i<r;++i){const r=e[i],o=t[i];let l;if(s+=r,d(o))s+=Fe(new ge(pe(o)),r,n);else if(u(o)){const e=Me.exec(r);if(null!==e){const t=new ge(be((()=>o)));re.assign(t,e[2]),s+=t.createHTML(n)}else s+=o}else o instanceof ne?s+=Fe(new ge(o),r,n):void 0===(l=se.getForInstance(o))?s+=Fe(new ge(be((()=>o))),r,n):l.aspected?s+=Fe(o,r,n):s+=o.createHTML(n)}return new Ne(s+e[e.length-1],i)}class ze extends oe{bind(e){e.source[this.options]=e.targets[this.nodeId]}}se.define(ze);const Pe=e=>new ze(e);function Re(e,t){const s=d(e)?e:()=>e,i=d(t)?t:()=>t;return(e,t)=>s(e,t)?i(e,t):null}const _e=Object.freeze({positioning:!1,recycle:!0});function De(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.bind(t[s])}function He(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.context.length=t.length,e.context.index=s,e.bind(t[s])}class Ue{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=De,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(e,this),this.templateBindingObserver=e.templateBinding.createObserver(e,this),e.options.positioning&&(this.bindView=He)}bind(e){this.location=e.targets[this.directive.nodeId],this.controller=e,this.items=this.itemsBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),this.observeItems(!0),this.refreshAllViews(),e.onUnbind(this)}unbind(){null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else{if(!t[0])return;t[0].reset?this.refreshAllViews():this.updateViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=a);const t=this.itemsObserver,s=this.itemsObserver=v.getNotifier(this.items),i=t!==s;i&&null!==t&&t.unsubscribe(this),(i||e)&&s.subscribe(this)}updateViews(e){const t=this.views,s=this.bindView,i=this.items,n=this.template,r=this.controller,o=this.directive.options.recycle,l=[];let a=0,h=0;for(let c=0,d=e.length;c<d;++c){const d=e[c],u=d.removed;let f=0,g=d.index;const p=g+d.addedCount,b=t.splice(d.index,u.length),v=h=l.length+b.length;for(;g<p;++g){const e=t[g],c=e?e.firstChild:this.location;let d;o&&h>0?(f<=v&&b.length>0?(d=b[f],f++):(d=l[a],a++),h--):d=n.create(),t.splice(g,0,d),s(d,i,g,r),d.insertBefore(c)}b[f]&&l.push(...b.slice(f))}for(let e=a,t=l.length;e<t;++e)l[e].dispose();if(this.directive.options.positioning)for(let e=0,s=t.length;e<s;++e){const i=t[e].context;i.length=s,i.index=e}}refreshAllViews(e=!1){const t=this.items,s=this.template,i=this.location,n=this.bindView,r=this.controller;let o=t.length,l=this.views,a=l.length;if(0!==o&&!e&&this.directive.options.recycle||(we.disposeContiguousBatch(l),a=0),0===a){this.views=l=new Array(o);for(let e=0;e<o;++e){const o=s.create();n(o,t,e,r),l[e]=o,o.insertBefore(i)}}else{let e=0;for(;e<o;++e)if(e<a){n(l[e],t,e,r)}else{const o=s.create();n(o,t,e,r),l.push(o),o.insertBefore(i)}const h=l.splice(e,a-e);for(e=0,o=h.length;e<o;++e)h[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}class qe{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,this.id=X(),E.enable()}createHTML(e){return Y.comment(e(this))}createBehavior(){return new Ue(this)}}function Qe(e,t,s=_e){const i=ye(e),n=ye(t);return new qe(i,n,Object.assign(Object.assign({},_e),s))}se.define(qe);const We=e=>1===e.nodeType,Ke=e=>e?t=>1===t.nodeType&&t.matches(e):We;class Ge extends oe{constructor(){super(...arguments),this.sourceProperty=`${this.id}-s`}bind(e){const t=e.targets[this.nodeId];t[this.sourceProperty]=e.source,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.nodeId];this.updateTarget(e.source,a),this.disconnect(t),t[this.sourceProperty]=null}getSource(e){return e[this.sourceProperty]}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}class Je extends Ge{observe(e){e.addEventListener("slotchange",this)}disconnect(e){e.removeEventListener("slotchange",this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function Xe(e){return u(e)&&(e={property:e}),new Je(e)}se.define(Je);class Ye extends Ge{constructor(e){super(e),this.observerProperty=`${this.id}-o`,this.handleEvent=(e,t)=>{const s=t.target;this.updateTarget(this.getSource(s),this.computeNodes(s))},e.childList=!0}observe(e){var t;const s=null!==(t=e[this.observerProperty])&&void 0!==t?t:e[this.observerProperty]=new MutationObserver(this.handleEvent);s.target=e,s.observe(e,this.options)}disconnect(e){const t=e[this.observerProperty];t.target=null,t.disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function Ze(e){return u(e)&&(e={property:e}),new Ye(e)}se.define(Ye);const et=Object.freeze({locate:c()}),tt={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};function st(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const it={toView(e){const t=st(e);return t?t.toString():t},fromView:st};class nt{constructor(e,t,s=t.toLowerCase(),i="reflect",n){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=s,this.mode=i,this.converter=n,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===i&&void 0===n&&(this.converter=tt)}setValue(e,t){const s=e[this.fieldName],i=this.converter;void 0!==i&&(t=i.fromView(t)),s!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](s,t),e.$fastController.notify(this.name))}getValue(e){return v.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,s=this.guards;s.has(e)||"fromView"===t||f.enqueue((()=>{s.add(e);const i=e[this.fieldName];switch(t){case"reflect":const t=this.converter;q.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break;case"boolean":q.setBooleanAttribute(e,this.attribute,i)}s.delete(e)}))}static collect(e,...t){const s=[];t.push(et.locate(e));for(let i=0,n=t.length;i<n;++i){const n=t[i];if(void 0!==n)for(let t=0,i=n.length;t<i;++t){const i=n[t];u(i)?s.push(new nt(e,i)):s.push(new nt(e,i.property,i.attribute,i.mode,i.converter))}}return s}}function rt(e,t){let s;function i(e,t){arguments.length>1&&(s.property=t),et.locate(e.constructor).push(s)}return arguments.length>1?(s={},void i(e,t)):(s=void 0===e?{}:e,i)}const ot={mode:"open"},lt={},at=new Set,ht=l.getById(4,(()=>h()));class ct{constructor(e,t=e.definition){var s;this.platformDefined=!1,u(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.registry=null!==(s=t.registry)&&void 0!==s?s:customElements;const i=e.prototype,n=nt.collect(e,t.attributes),r=new Array(n.length),o={},l={};for(let e=0,t=n.length;e<t;++e){const t=n[e];r[e]=t.attribute,o[t.name]=t,l[t.attribute]=t,v.defineProperty(i,t)}Reflect.defineProperty(e,"observedAttributes",{value:r,enumerable:!0}),this.attributes=n,this.propertyLookup=o,this.attributeLookup=l,this.shadowOptions=void 0===t.shadowOptions?ot:null===t.shadowOptions?void 0:Object.assign(Object.assign({},ot),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?lt:Object.assign(Object.assign({},lt),t.elementOptions),this.styles=L.normalize(t.styles),ht.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return at.has(e)||ht.getByType(e)?new ct(class extends e{},t):new ct(e,t)}static registerBaseType(e){at.add(e)}}ct.getByType=ht.getByType,ct.getForInstance=ht.getForInstance;const dt={bubbles:!0,composed:!0,cancelable:!0},ut=new WeakMap;function ft(e){var t,s;return null!==(s=null!==(t=e.shadowRoot)&&void 0!==t?t:ut.get(e))&&void 0!==s?s:null}let gt;class pt extends p{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this._mainStyles=null,this.$fastController=this,this.view=null,this.source=e,this.definition=t;const s=t.shadowOptions;if(void 0!==s){let t=e.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=e.attachShadow(s),"closed"===s.mode&&ut.set(e,t))}const i=v.getAccessors(e);if(i.length>0){const t=this.boundObservables=Object.create(null);for(let s=0,n=i.length;s<n;++s){const n=i[s].name,r=e[n];void 0!==r&&(delete e[n],t[n]=r)}}}get isConnected(){return v.track(this,"isConnected"),1===this.stage}get template(){var e;if(null===this._template){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=null!==(e=t.template)&&void 0!==e?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get mainStyles(){var e;if(null===this._mainStyles){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=null!==(e=t.styles)&&void 0!==e?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(null!==this._mainStyles&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}addBehavior(e){var t,s;const i=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,n=null!==(s=i.get(e))&&void 0!==s?s:0;0===n?(i.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||1!==this.stage&&0!==this.stage||e.connectedCallback(this)):i.set(e,n+1)}removeBehavior(e,t=!1){const s=this.behaviors;if(null===s)return;const i=s.get(e);void 0!==i&&(1===i||t?(s.delete(e),e.disconnectedCallback&&3!==this.stage&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):s.set(e,i-1))}addStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=ft(s))&&void 0!==t?t:this.source).append(e)}else if(!e.isAttachedTo(s)){const t=e.behaviors;if(e.addStylesTo(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.addBehavior(t[e])}}removeStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=ft(s))&&void 0!==t?t:s).removeChild(e)}else if(e.isAttachedTo(s)){const t=e.behaviors;if(e.removeStylesFrom(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.addBehavior(t[e])}}connect(){if(3!==this.stage)return;if(this.stage=0,null!==this.boundObservables){const e=this.source,t=this.boundObservables,s=Object.keys(t);for(let i=0,n=s.length;i<n;++i){const n=s[i];e[n]=t[n]}this.boundObservables=null}const e=this.behaviors;if(null!==e){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=1,v.notify(this,"isConnected")}disconnect(){if(1!==this.stage)return;this.stage=2,v.notify(this,"isConnected"),null!==this.view&&this.view.unbind();const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.stage=3}onAttributeChangedCallback(e,t,s){const i=this.definition.attributeLookup[e];void 0!==i&&i.onAttributeChangedCallback(this.source,s)}emit(e,t,s){return 1===this.stage&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},dt),s)))}renderTemplate(e){var t;const s=this.source,i=null!==(t=ft(s))&&void 0!==t?t:s;if(null!==this.view)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let e=i.firstChild;null!==e;e=i.firstChild)i.removeChild(e)}e&&(this.view=e.render(s,i,s),this.view.sourceLifetime=b.coupled)}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const s=ct.getForInstance(e);if(void 0===s)throw l.error(1401);return e.$fastController=new gt(e,s)}static setStrategy(e){gt=e}}function bt(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=ft(e))&&void 0!==t?t:e.getRootNode()}pt.setStrategy(pt);class vt{constructor(e){const t=vt.styleSheetCache;this.sheets=e.map((e=>{if(e instanceof CSSStyleSheet)return e;let s=t.get(e);return void 0===s&&(s=new CSSStyleSheet,s.replaceSync(e),t.set(e,s)),s}))}addStylesTo(e){const t=bt(e);t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=bt(e),s=this.sheets;t.adoptedStyleSheets=t.adoptedStyleSheets.filter((e=>-1===s.indexOf(e)))}}vt.styleSheetCache=new Map;let yt=0;function mt(e){return e===document?document.body:e}function wt(e){const t=class extends e{constructor(){super(),pt.forCustomElement(this)}$emit(e,t,s){return this.$fastController.emit(e,t,s)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,s){this.$fastController.onAttributeChangedCallback(e,t,s)}};return ct.registerBaseType(t),t}function Ct(e,t){return d(e)?ct.compose(e,t).define().type:ct.compose(this,e).define().type}L.setDefaultStrategy(L.supportsAdoptedStyleSheets?vt:class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++yt}addStylesTo(e){e=mt(bt(e));const t=this.styles,s=this.styleClass;for(let i=0;i<t.length;i++){const n=document.createElement("style");n.innerHTML=t[i],n.className=s,e.append(n)}}removeStylesFrom(e){const t=(e=mt(bt(e))).querySelectorAll(`.${this.styleClass}`);t[0].parentNode;for(let s=0,i=t.length;s<i;++s)e.removeChild(t[s])}});const xt=Object.assign(wt(HTMLElement),{from:function(e){return wt(e)},define:Ct,compose:function(e,t){return d(e)?ct.compose(e,t):ct.compose(this,e)}});function Tt(e){return function(t){Ct(t,e)}}export{E as ArrayObserver,re as Aspect,et as AttributeConfiguration,nt as AttributeDefinition,ne as Binding,P as CSSDirective,Ye as ChildrenDirective,Ee as Compiler,q as DOM,pt as ElementController,L as ElementStyles,C as ExecutionContext,l as FAST,xt as FASTElement,ct as FASTElementDefinition,ge as HTMLBindingDirective,se as HTMLDirective,we as HTMLView,Y as Markup,Ge as NodeObservationDirective,v as Observable,Z as Parser,p as PropertyChangeNotifier,ze as RefDirective,Ue as RepeatBehavior,qe as RepeatDirective,Je as SlottedDirective,b as SourceLifetime,x as Splice,j as SpliceStrategy,T as SpliceStrategySupport,oe as StatelessAttachedAttributeDirective,g as SubscriberSet,f as Updates,ee as ViewBehaviorOrchestrator,Ne as ViewTemplate,rt as attr,pe as bind,tt as booleanConverter,Ze as children,c as createMetadataLocator,h as createTypeRegistry,D as css,R as cssDirective,U as cssPartial,Tt as customElement,Ke as elements,a as emptyArray,Le as html,ie as htmlDirective,N as lengthOf,ve as listener,ye as normalizeBinding,it as nullableNumberConverter,y as observable,be as oneTime,Pe as ref,Qe as repeat,Xe as slotted,m as volatile,Re as when};
|
|
1
|
+
!function(){if("undefined"==typeof globalThis)if("undefined"!=typeof global)global.globalThis=global;else if("undefined"!=typeof self)self.globalThis=self;else if("undefined"!=typeof window)window.globalThis=window;else{const e=new Function("return this")();e.globalThis=e}}(),globalThis.trustedTypes||(globalThis.trustedTypes={createPolicy:(e,t)=>t}),void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",{value:Object.create(null),configurable:!1,enumerable:!1,writable:!1});const e=globalThis.FAST,t={1101:"Must call enableArrayObservation before observing arrays.",1201:"The HTML policy can only be set once.",1202:"To bind innerHTML, you must use a TrustedTypesPolicy.",1203:"View=>Model update skipped. To use twoWay binding, the target property must be observable.",1204:"No host element is present. Cannot bind host with ${name}.",1205:"The requested binding behavior is not supported by the binding engine.",1401:"Missing FASTElement definition.",1501:"No registration for Context/Interface '${name}'.",1502:"Dependency injection resolver for '${key}' returned a null factory.",1503:"Invalid dependency injection resolver strategy specified '${strategy}'.",1504:"Unable to autoregister dependency.",1505:"Unable to resolve dependency injection key '${key}'.",1506:"'${name}' is a native function and therefore cannot be safely constructed by DI. If this is intentional, please use a callback or cachedCallback resolver.",1507:"Attempted to jitRegister something that is not a constructor '${value}'. Did you forget to register this dependency?",1508:"Attempted to jitRegister an intrinsic type '${value}'. Did you forget to add @inject(Key)?",1509:"Attempted to jitRegister an interface '${value}'.",1510:"A valid resolver was not returned from the register method.",1511:"Key/value cannot be null or undefined. Are you trying to inject/register something that doesn't exist with DI?",1512:"'${key}' not registered. Did you forget to add @singleton()?",1513:"Cyclic dependency found '${name}'.",1514:"Injected properties that are updated on changes to DOM connectivity require the target object to be an instance of FASTElement."},s=/(\$\{\w+?})/g,i=/\$\{(\w+?)}/g,n=Object.freeze({});function r(e,t){return e.split(s).map((e=>{var s;const n=e.replace(i,"$1");return String(null!==(s=t[n])&&void 0!==s?s:e)})).join("")}Object.assign(e,{addMessages(e){Object.assign(t,e)},warn(e,s=n){var i;const o=null!==(i=t[e])&&void 0!==i?i:"Unknown Warning";console.warn(r(o,s))},error(e,s=n){var i;const o=null!==(i=t[e])&&void 0!==i?i:"Unknown Error";return new Error(r(o,s))}});const o={configurable:!1,enumerable:!1,writable:!1};void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},o));const l=globalThis.FAST;if(void 0===l.getById){const e=Object.create(null);Reflect.defineProperty(l,"getById",Object.assign({value(t,s){let i=e[t];return void 0===i&&(i=s?e[t]=s():null),i}},o))}void 0===l.error&&Object.assign(l,{warn(){},error:e=>new Error(`Error ${e}`),addMessages(){}});const a=Object.freeze([]);function h(){const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t),getForInstance(t){if(null!=t)return e.get(t.constructor)}})}function c(){const e=new WeakMap;return function(t){let s=e.get(t);if(void 0===s){let i=Reflect.getPrototypeOf(t);for(;void 0===s&&null!==i;)s=e.get(i),i=Reflect.getPrototypeOf(i);s=void 0===s?[]:s.slice(0),e.set(t,s)}return s}}const d=e=>"function"==typeof e,u=e=>"string"==typeof e,f=()=>{},g=l.getById(1,(()=>{const e=[],t=[],s=globalThis.requestAnimationFrame;let i=!0;function n(){if(t.length)throw t.shift()}function r(s){try{s.call()}catch(s){if(!i)throw e.length=0,s;t.push(s),setTimeout(n,0)}}function o(){let t=0;for(;t<e.length;)if(r(e[t]),t++,t>1024){for(let s=0,i=e.length-t;s<i;s++)e[s]=e[s+t];e.length-=t,t=0}e.length=0}function l(t){e.push(t),e.length<2&&(i?s(o):o())}return Object.freeze({enqueue:l,next:()=>new Promise(l),process:o,setMode:e=>i=e})}));class p{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const s=t.indexOf(e);-1!==s&&t.splice(s,1)}}notify(e){const t=this.spillover,s=this.subject;if(void 0===t){const t=this.sub1,i=this.sub2;void 0!==t&&t.handleChange(s,e),void 0!==i&&i.handleChange(s,e)}else for(let i=0,n=t.length;i<n;++i)t[i].handleChange(s,e)}}class b{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,s;null===(t=this.subscribers[e])||void 0===t||t.notify(e),null===(s=this.subjectSubscribers)||void 0===s||s.notify(e)}subscribe(e,t){var s,i;let n;n=t?null!==(s=this.subscribers[t])&&void 0!==s?s:this.subscribers[t]=new p(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new p(this.subject),n.subscribe(e)}unsubscribe(e,t){var s,i;t?null===(s=this.subscribers[t])||void 0===s||s.unsubscribe(e):null===(i=this.subjectSubscribers)||void 0===i||i.unsubscribe(e)}}const v=Object.freeze({unknown:void 0,coupled:1}),y=l.getById(2,(()=>{const e=g.enqueue,t=/(:|&&|\|\||if)/,s=new WeakMap;let i,n=e=>{throw l.error(1101)};function r(e){var t;let i=null!==(t=e.$fastController)&&void 0!==t?t:s.get(e);return void 0===i&&(Array.isArray(e)?i=n(e):s.set(e,i=new b(e))),i}const o=c();class a{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==i&&i.watch(e,this.name),e[this.field]}setValue(e,t){const s=this.field,i=e[s];if(i!==t){e[s]=t;const n=e[this.callback];d(n)&&n.call(e,i,t),r(e).notify(this.name)}}}class h extends p{constructor(e,t,s=!1){super(e,t),this.expression=e,this.isVolatileBinding=s,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0,this.toJSON=f}setMode(e){this.isAsync=this.needsQueue=e}bind(e){this.controller=e;const t=this.observe(e.source,e.context);return!e.isBound&&this.requiresUnbind(e)&&e.onUnbind(this),t}requiresUnbind(e){return e.sourceLifetime!==v.coupled||this.first!==this.last||this.first.propertySource!==e.source}unbind(e){this.dispose()}observe(e,t){this.needsRefresh&&null!==this.last&&this.dispose();const s=i;let n;i=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{n=this.expression(e,t)}finally{i=s}return n}disconnect(){this.dispose()}dispose(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(e,t){const s=this.last,n=r(e),o=null===s?this.first:{};if(o.propertySource=e,o.propertyName=t,o.notifier=n,n.subscribe(this,t),null!==s){if(!this.needsRefresh){let t;i=void 0,t=s.propertySource[s.propertyName],i=this,e===t&&(this.needsRefresh=!0)}s.next=o}this.last=o}handleChange(){this.needsQueue?(this.needsQueue=!1,e(this)):this.isAsync||this.call()}call(){null!==this.last&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let e=this.first;for(;void 0!==e;)yield e,e=e.next}}return Object.freeze({setArrayObserverFactory(e){n=e},getNotifier:r,track(e,t){i&&i.watch(e,t)},trackVolatile(){i&&(i.needsRefresh=!0)},notify(e,t){r(e).notify(t)},defineProperty(e,t){u(t)&&(t=new a(t)),o(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:o,binding(e,t,s=this.isVolatileBinding(e)){return new h(e,t,s)},isVolatileBinding:e=>t.test(e.toString())})}));function m(e,t){y.defineProperty(e,t)}function w(e,t,s){return Object.assign({},s,{get(){return y.trackVolatile(),s.get.apply(this)}})}const C=l.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}})),S=Object.freeze({default:{index:0,length:0,get event(){return S.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>C.get(),setEvent(e){C.set(e)}});class x{constructor(e,t,s){this.index=e,this.removed=t,this.addedCount=s}adjustTo(e){let t=this.index;const s=e.length;return t>s?t=s-this.addedCount:t<0&&(t=s+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}}const T=Object.freeze({reset:1,splice:2,optimized:3}),O=new x(0,a,0);O.reset=!0;const B=[O];function A(e,t,s,i,n,r){let o=0,l=0;const h=Math.min(s-t,r-n);if(0===t&&0===n&&(o=function(e,t,s){for(let i=0;i<s;++i)if(e[i]!==t[i])return i;return s}(e,i,h)),s===e.length&&r===i.length&&(l=function(e,t,s){let i=e.length,n=t.length,r=0;for(;r<s&&e[--i]===t[--n];)r++;return r}(e,i,h-o)),n+=o,r-=l,(s-=l)-(t+=o)==0&&r-n==0)return a;if(t===s){const e=new x(t,[],0);for(;n<r;)e.removed.push(i[n++]);return[e]}if(n===r)return[new x(t,[],s-t)];const c=function(e){let t=e.length-1,s=e[0].length-1,i=e[t][s];const n=[];for(;t>0||s>0;){if(0===t){n.push(2),s--;continue}if(0===s){n.push(3),t--;continue}const r=e[t-1][s-1],o=e[t-1][s],l=e[t][s-1];let a;a=o<l?o<r?o:r:l<r?l:r,a===r?(r===i?n.push(0):(n.push(1),i=r),t--,s--):a===o?(n.push(3),t--,i=o):(n.push(2),s--,i=l)}return n.reverse()}(function(e,t,s,i,n,r){const o=r-n+1,l=s-t+1,a=new Array(o);let h,c;for(let e=0;e<o;++e)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;++e)a[0][e]=e;for(let s=1;s<o;++s)for(let r=1;r<l;++r)e[t+r-1]===i[n+s-1]?a[s][r]=a[s-1][r-1]:(h=a[s-1][r]+1,c=a[s][r-1]+1,a[s][r]=h<c?h:c);return a}(e,t,s,i,n,r)),d=[];let u,f=t,g=n;for(let e=0;e<c.length;++e)switch(c[e]){case 0:void 0!==u&&(d.push(u),u=void 0),f++,g++;break;case 1:void 0===u&&(u=new x(f,[],0)),u.addedCount++,f++,u.removed.push(i[g]),g++;break;case 2:void 0===u&&(u=new x(f,[],0)),u.addedCount++,f++;break;case 3:void 0===u&&(u=new x(f,[],0)),u.removed.push(i[g]),g++}return void 0!==u&&d.push(u),d}function k(e,t){let s=!1,i=0;for(let a=0;a<t.length;a++){const h=t[a];if(h.index+=i,s)continue;const c=(n=e.index,r=e.index+e.removed.length,o=h.index,l=h.index+h.addedCount,r<o||l<n?-1:r===o||l===n?0:n<o?r<l?r-o:l-o:l<r?l-n:r-n);if(c>=0){t.splice(a,1),a--,i-=h.addedCount-h.removed.length,e.addedCount+=h.addedCount-c;const n=e.removed.length+h.removed.length-c;if(e.addedCount||n){let t=h.removed;if(e.index<h.index){const s=e.removed.slice(0,h.index-e.index);s.push(...t),t=s}if(e.index+e.removed.length>h.index+h.addedCount){const s=e.removed.slice(h.index+h.addedCount-e.index);t.push(...s)}e.removed=t,h.index<e.index&&(e.index=h.index)}else s=!0}else if(e.index<h.index){s=!0,t.splice(a,0,e),a++;const n=e.addedCount-e.removed.length;h.index+=n,i+=n}}var n,r,o,l;s||t.push(e)}let j=Object.freeze({support:T.optimized,normalize:(e,t,s)=>void 0===e?void 0===s?a:s.length>1?function(e,t){let s=[];const i=[];for(let e=0,s=t.length;e<s;e++)k(t[e],i);for(let t=0,n=i.length;t<n;++t){const n=i[t];1!==n.addedCount||1!==n.removed.length?s=s.concat(A(e,n.index,n.index+n.addedCount,n.removed,0,n.removed.length)):n.removed[0]!==e[n.index]&&s.push(n)}return s}(t,s):s:B,pop(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new x(e.length,[r],0)),r},push(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new x(e.length-i.length,[],i.length).adjustTo(e)),n},reverse(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},shift(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new x(0,[r],0)),r},sort(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},splice(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new x(+i[0],n,i.length>2?i.length-2:0).adjustTo(e)),n},unshift(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new x(0,[],i.length).adjustTo(e)),n}});const $=Object.freeze({reset:B,setDefaultStrategy(e){j=e}});function N(e,t,s){Reflect.defineProperty(e,t,{value:s,enumerable:!1})}class I extends p{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this.call=this.flush,N(e,"$fastController",this)}get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let e=this._lengthObserver;if(void 0===e){const t=this.subject;this._lengthObserver=e={length:t.length,handleChange(){this.length!==t.length&&(this.length=t.length,y.notify(e,"length"))}},this.subscribe(e)}return e}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.oldCollection;void 0===t&&void 0===s||(this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0,this.notify((null!==(e=this._strategy)&&void 0!==e?e:j).normalize(s,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,g.enqueue(this))}}let V=!1;const E=Object.freeze({enable(){if(V)return;V=!0,y.setArrayObserverFactory((e=>new I(e)));const e=Array.prototype;e.$fastPatch||(N(e,"$fastPatch",1),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach((t=>{e[t.name]=function(...e){var s;const i=this.$fastController;return void 0===i?t.apply(this,e):(null!==(s=i.strategy)&&void 0!==s?s:j)[t.name](this,i,t,e)}})))}});function M(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(E.enable(),t=y.getNotifier(e)),y.track(t.lengthObserver,"length"),e.length}let F;function L(e){return e.map((e=>e instanceof z?L(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}class z{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map((e=>e instanceof z?e.behaviors:null)).reduce(((e,t)=>null===t?e:null===e?t:e.concat(t)),null)}get strategy(){return null===this._strategy&&this.withStrategy(F),this._strategy}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}withStrategy(e){return this._strategy=new e(L(this.styles)),this}static setDefaultStrategy(e){F=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new z(e):e instanceof z?e:new z([e])}}z.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const P=h(),R=Object.freeze({getForInstance:P.getForInstance,getByType:P.getByType,define:e=>(P.register({type:e}),e)});function _(){return function(e){R.define(e)}}function D(e,t){const s=[];let i="";const n=[],r=e=>{n.push(e)};for(let n=0,o=e.length-1;n<o;++n){i+=e[n];let o=t[n];void 0!==R.getForInstance(o)&&(o=o.createCSS(r)),o instanceof z||o instanceof CSSStyleSheet?(""!==i.trim()&&(s.push(i),i=""),s.push(o)):i+=o}return i+=e[e.length-1],""!==i.trim()&&s.push(i),{styles:s,behaviors:n}}const H=(e,...t)=>{const{styles:s,behaviors:i}=D(e,t),n=new z(s);return i.length?n.withBehaviors(...i):n};class U{constructor(e,t){this.behaviors=t,this.css="";const s=e.reduce(((e,t)=>(u(t)?this.css+=t:e.push(t),e)),[]);s.length&&(this.styles=new z(s))}createCSS(e){return this.behaviors.forEach(e),this.styles&&e(this),this.css}addedCallback(e){e.addStyles(this.styles)}removedCallback(e){e.removeStyles(this.styles)}}R.define(U);const q=H.partial=(e,...t)=>{const{styles:s,behaviors:i}=D(e,t);return new U(s,i)},Q=Object.freeze({queueUpdate:g.enqueue,nextUpdate:g.next,processUpdates:g.process,setAttribute(e,t,s){null==s?e.removeAttribute(t):e.setAttribute(t,s)},setBooleanAttribute(e,t,s){s?e.setAttribute(t,""):e.removeAttribute(t)}}),J=`fast-${Math.random().toString(36).substring(2,8)}`,W=`${J}{`,K=`}${J}`,G=K.length;let X=0;const Y=()=>`${J}-${++X}`,Z=Object.freeze({interpolation:e=>`${W}${e}${K}`,attribute:e=>`${Y()}="${W}${e}${K}"`,comment:e=>`\x3c!--${W}${e}${K}--\x3e`}),ee=Object.freeze({parse(e,t){const s=e.split(W);if(1===s.length)return null;const i=[];for(let e=0,n=s.length;e<n;++e){const n=s[e],r=n.indexOf(K);let o;if(-1===r)o=n;else{const e=n.substring(0,r);i.push(t[e]),o=n.substring(r+G)}""!==o&&i.push(o)}return i}}),te=Object.freeze({create(e){const t=[],s={};let i=null,n=!1;return{source:e,context:S.default,targets:s,get isBound(){return n},addBehaviorFactory(e,t){const s=e.nodeId||(e.nodeId=Y());e.id||(e.id=Y()),this.addTarget(s,t),this.addBehavior(e.createBehavior())},addTarget(e,t){s[e]=t},addBehavior(e){t.push(e),n&&e.bind(this)},onUnbind(e){null===i&&(i=[]),i.push(e)},connectedCallback(e){n||(n=!0,t.forEach((e=>e.bind(this))))},disconnectedCallback(e){n&&(n=!1,null!==i&&i.forEach((e=>e.unbind(this))))}}}}),se=h(),ie=Object.freeze({getForInstance:se.getForInstance,getByType:se.getByType,define:(e,t)=>((t=t||{}).type=e,se.register(t),e)});function ne(e){return function(t){ie.define(t,e)}}class re{constructor(e,t=!1){this.evaluate=e,this.isVolatile=t}}const oe=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6,assign(e,t){if(t)switch(e.sourceAspect=t,t[0]){case":":e.targetAspect=t.substring(1),e.aspectType="classList"===e.targetAspect?oe.tokenList:oe.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=oe.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=oe.event;break;default:e.targetAspect=t,e.aspectType=oe.attribute}else e.aspectType=oe.content}});class le{constructor(e){this.options=e,this.id=Y(),this.toJSON=f}createHTML(e){return Z.attribute(e(this))}createBehavior(){return this}}const ae=globalThis.TrustedHTML?e=>(t,s)=>{const i=e(t,s);if(i instanceof TrustedHTML)return i;throw l.error(1202)}:e=>e;class he extends re{createObserver(e,t){return y.binding(this.evaluate,t,this.isVolatile)}}class ce extends re{constructor(){super(...arguments),this.toJSON=f}createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function de(e,t,s,i){if(null==s&&(s=""),s.create){e.textContent="";let t=e.$fastView;void 0===t?t=s.create():e.$fastTemplate!==s&&(t.isComposed&&(t.remove(),t.unbind()),t=s.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(i.source,i.context)):(t.isComposed=!0,t.bind(i.source,i.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=s)}else{const t=e.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=s}}function ue(e,t,s){var i;const n=`${this.id}-t`,r=null!==(i=e[n])&&void 0!==i?i:e[n]={v:0,cv:Object.create(null)},o=r.cv;let l=r.v;const a=e[t];if(null!=s&&s.length){const e=s.split(/\s+/);for(let t=0,s=e.length;t<s;++t){const s=e[t];""!==s&&(o[s]=l,a.add(s))}}if(r.v=l+1,0!==l){l-=1;for(const e in o)o[e]===l&&a.remove(e)}}const fe=(e,t,s)=>e[t]=s,ge=()=>{};class pe{constructor(e){this.dataBinding=e,this.updateTarget=null,this.id=Y(),this.aspectType=oe.content,this.data=`${this.id}-d`}createHTML(e){return Z.interpolation(e(this))}createBehavior(){if(null===this.updateTarget)switch("innerHTML"===this.targetAspect&&(this.dataBinding.evaluate=ae(this.dataBinding.evaluate)),this.aspectType){case 1:this.updateTarget=Q.setAttribute;break;case 2:this.updateTarget=Q.setBooleanAttribute;break;case 3:this.updateTarget=fe;break;case 4:this.updateTarget=de;break;case 5:this.updateTarget=ue;break;case 6:this.updateTarget=ge;break;default:throw l.error(1205)}return this}bind(e){var t;const s=e.targets[this.nodeId];switch(this.updateTarget){case ge:s[this.data]=e,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case de:e.onUnbind(this);default:const i=null!==(t=s[this.data])&&void 0!==t?t:s[this.data]=this.dataBinding.createObserver(this,this);i.target=s,i.controller=e,this.updateTarget(s,this.targetAspect,i.bind(e),e)}}unbind(e){const t=e.targets[this.nodeId].$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){S.setEvent(e);const s=this.dataBinding.evaluate(t.source,t.context);S.setEvent(null),!0!==s&&e.preventDefault()}}handleChange(e,t){const s=t.target,i=t.controller;this.updateTarget(s,this.targetAspect,t.bind(i),i)}}function be(e,t=y.isVolatileBinding(e)){return new he(e,t)}function ve(e){return new ce(e)}function ye(e,t){const s=new he(e,!1);return s.options=t,s}function me(e){return d(e)?be(e):e instanceof re?e:ve((()=>e))}function we(e,t){const s=e.parentNode;let i,n=e;for(;n!==t;)i=n.nextSibling,s.removeChild(n),n=i;s.removeChild(t)}ie.define(pe,{aspected:!0});class Ce{constructor(e,t,s){this.fragment=e,this.factories=t,this.targets=s,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=v.unknown,this.context=this,this.index=0,this.length=0,this.toJSON=f,this.firstChild=e.firstChild,this.lastChild=e.lastChild}get event(){return S.getEvent()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const s=e.parentNode;let i,n=this.firstChild;for(;n!==t;)i=n.nextSibling,s.insertBefore(n,e),n=i;s.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let s,i=this.firstChild;for(;i!==t;)s=i.nextSibling,e.appendChild(i),i=s;e.appendChild(t)}dispose(){we(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e)return;let s=this.behaviors;if(null===s){this.source=e,this.context=t,this.behaviors=s=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e].createBehavior();t.bind(this),s[e]=t}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=s.length;e<t;++e)s[e].bind(this)}this.isBound=!0}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,s=e.length;t<s;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(0!==e.length){we(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}}y.defineProperty(Ce.prototype,"index"),y.defineProperty(Ce.prototype,"length");const Se=(e,t)=>`${e}.${t}`,xe={},Te={index:0,node:null};function Oe(e){e.startsWith("fast-")||l.warn(1204,{name:e})}const Be=new Proxy(document.createElement("div"),{get(e,t){Oe(t);const s=Reflect.get(e,t);return d(s)?s.bind(e):s},set:(e,t,s)=>(Oe(t),Reflect.set(e,t,s))});class Ae{constructor(e,t){this.fragment=e,this.directives=t,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,s,i){this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(t,s,i)),e.nodeId=s,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,s){const i=this.descriptors;if("r"===t||"h"===t||i[t])return;if(!i[e]){const t=e.lastIndexOf("."),s=e.substring(0,t),i=parseInt(e.substring(t+1));this.addTargetDescriptor(s,e,i)}let n=xe[t];if(!n){const i=`_${t}`;xe[t]=n={get(){var t;return null!==(t=this[i])&&void 0!==t?t:this[i]=this[e].childNodes[s]}}}i[t]=n}createView(e){const t=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=t,s.h=null!=e?e:Be;for(const e of this.nodeIds)s[e];return new Ce(t,this.factories,s)}}function ke(e,t,s,i,n,r=!1){const o=s.attributes,l=e.directives;for(let a=0,h=o.length;a<h;++a){const c=o[a],d=c.value,u=ee.parse(d,l);let f=null;null===u?r&&(f=new pe(ve((()=>d))),oe.assign(f,c.name)):f=Ee.aggregate(u),null!==f&&(s.removeAttributeNode(c),a--,h--,e.addFactory(f,t,i,n))}}function je(e,t,s){let i=0,n=t.firstChild;for(;n;){const t=$e(e,s,n,i);n=t.node,i=t.index}}function $e(e,t,s,i){const n=Se(t,i);switch(s.nodeType){case 1:ke(e,t,s,n,i),je(e,s,n);break;case 3:return function(e,t,s,i,n){const r=ee.parse(t.textContent,e.directives);if(null===r)return Te.node=t.nextSibling,Te.index=n+1,Te;let o,l=o=t;for(let t=0,a=r.length;t<a;++t){const a=r[t];0!==t&&(n++,i=Se(s,n),o=l.parentNode.insertBefore(document.createTextNode(""),l.nextSibling)),u(a)?o.textContent=a:(o.textContent=" ",oe.assign(a),e.addFactory(a,s,i,n)),l=o}return Te.index=n+1,Te.node=l.nextSibling,Te}(e,s,t,n,i);case 8:const r=ee.parse(s.data,e.directives);null!==r&&e.addFactory(Ee.aggregate(r),t,n,i)}return Te.index=i+1,Te.node=s.nextSibling,Te}const Ne={createHTML:e=>e};let Ie=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",Ne):Ne;const Ve=Ie,Ee={setHTMLPolicy(e){if(Ie!==Ve)throw l.error(1201);Ie=e},compile(e,t){let s;if(u(e)){s=document.createElement("TEMPLATE"),s.innerHTML=Ie.createHTML(e);const t=s.content.firstElementChild;null!==t&&"TEMPLATE"===t.tagName&&(s=t)}else s=e;const i=document.adoptNode(s.content),n=new Ae(i,t);return ke(n,"",s,"h",0,!0),(function(e,t){return e&&8==e.nodeType&&null!==ee.parse(e.data,t)}(i.firstChild,t)||1===i.childNodes.length&&Object.keys(t).length>0)&&i.insertBefore(document.createComment(""),i.firstChild),je(n,i,"r"),Te.node=null,n.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e){if(1===e.length)return e[0];let t,s,i=!1;const n=e.length,r=e.map((e=>u(e)?()=>e:(t=e.sourceAspect||t,s=e.dataBinding||s,i=i||e.dataBinding.isVolatile,e.dataBinding.evaluate)));s.evaluate=(e,t)=>{let s="";for(let i=0;i<n;++i)s+=r[i](e,t);return s},s.isVolatile=i;const o=new pe(s);return oe.assign(o,t),o}};class Me{constructor(e,t){this.result=null,this.toJSON=f,this.html=e,this.factories=t}create(e){return null===this.result&&(this.result=Ee.compile(this.html,this.factories)),this.result.createView(e)}render(e,t,s){const i=this.create(s);return i.bind(e),i.appendTo(t),i}}const Fe=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function Le(e,t,s){const i=Fe.exec(t);return null!==i&&oe.assign(e,i[2]),e.createHTML(s)}function ze(e,...t){let s="";const i=Object.create(null),n=e=>{var t;const s=null!==(t=e.id)&&void 0!==t?t:e.id=Y();return i[s]=e,s};for(let i=0,r=e.length-1;i<r;++i){const r=e[i],o=t[i];let l;if(s+=r,d(o))s+=Le(new pe(be(o)),r,n);else if(u(o)){const e=Fe.exec(r);if(null!==e){const t=new pe(ve((()=>o)));oe.assign(t,e[2]),s+=t.createHTML(n)}else s+=o}else o instanceof re?s+=Le(new pe(o),r,n):void 0===(l=ie.getForInstance(o))?s+=Le(new pe(ve((()=>o))),r,n):l.aspected?s+=Le(o,r,n):s+=o.createHTML(n)}return new Me(s+e[e.length-1],i)}class Pe extends le{bind(e){e.source[this.options]=e.targets[this.nodeId]}}ie.define(Pe);const Re=e=>new Pe(e);function _e(e,t){const s=d(e)?e:()=>e,i=d(t)?t:()=>t;return(e,t)=>s(e,t)?i(e,t):null}const De=Object.freeze({positioning:!1,recycle:!0});function He(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.bind(t[s])}function Ue(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.context.length=t.length,e.context.index=s,e.bind(t[s])}class qe{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=He,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(e,this),this.templateBindingObserver=e.templateBinding.createObserver(e,this),e.options.positioning&&(this.bindView=Ue)}bind(e){this.location=e.targets[this.directive.nodeId],this.controller=e,this.items=this.itemsBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),this.observeItems(!0),this.refreshAllViews(),e.onUnbind(this)}unbind(){null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else{if(!t[0])return;t[0].reset?this.refreshAllViews():this.updateViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=a);const t=this.itemsObserver,s=this.itemsObserver=y.getNotifier(this.items),i=t!==s;i&&null!==t&&t.unsubscribe(this),(i||e)&&s.subscribe(this)}updateViews(e){const t=this.views,s=this.bindView,i=this.items,n=this.template,r=this.controller,o=this.directive.options.recycle,l=[];let a=0,h=0;for(let c=0,d=e.length;c<d;++c){const d=e[c],u=d.removed;let f=0,g=d.index;const p=g+d.addedCount,b=t.splice(d.index,u.length),v=h=l.length+b.length;for(;g<p;++g){const e=t[g],c=e?e.firstChild:this.location;let d;o&&h>0?(f<=v&&b.length>0?(d=b[f],f++):(d=l[a],a++),h--):d=n.create(),t.splice(g,0,d),s(d,i,g,r),d.insertBefore(c)}b[f]&&l.push(...b.slice(f))}for(let e=a,t=l.length;e<t;++e)l[e].dispose();if(this.directive.options.positioning)for(let e=0,s=t.length;e<s;++e){const i=t[e].context;i.length=s,i.index=e}}refreshAllViews(e=!1){const t=this.items,s=this.template,i=this.location,n=this.bindView,r=this.controller;let o=t.length,l=this.views,a=l.length;if(0!==o&&!e&&this.directive.options.recycle||(Ce.disposeContiguousBatch(l),a=0),0===a){this.views=l=new Array(o);for(let e=0;e<o;++e){const o=s.create();n(o,t,e,r),l[e]=o,o.insertBefore(i)}}else{let e=0;for(;e<o;++e)if(e<a){n(l[e],t,e,r)}else{const o=s.create();n(o,t,e,r),l.push(o),o.insertBefore(i)}const h=l.splice(e,a-e);for(e=0,o=h.length;e<o;++e)h[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}class Qe{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,this.id=Y(),E.enable()}createHTML(e){return Z.comment(e(this))}createBehavior(){return new qe(this)}}function Je(e,t,s=De){const i=me(e),n=me(t);return new Qe(i,n,Object.assign(Object.assign({},De),s))}ie.define(Qe);const We=e=>1===e.nodeType,Ke=e=>e?t=>1===t.nodeType&&t.matches(e):We;class Ge extends le{constructor(){super(...arguments),this.controllerProperty=`${this.id}-c`}bind(e){const t=e.targets[this.nodeId];t[this.controllerProperty]=e,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.nodeId];this.updateTarget(e.source,a),this.disconnect(t),t[this.controllerProperty]=null}getSource(e){return e[this.controllerProperty].source}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}class Xe extends Ge{observe(e){e.addEventListener("slotchange",this)}disconnect(e){e.removeEventListener("slotchange",this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function Ye(e){return u(e)&&(e={property:e}),new Xe(e)}ie.define(Xe);class Ze extends Ge{constructor(e){super(e),this.observerProperty=`${this.id}-o`,this.handleEvent=(e,t)=>{const s=t.target;this.updateTarget(this.getSource(s),this.computeNodes(s))},e.childList=!0}observe(e){let t=e[this.observerProperty];t||(t=new MutationObserver(this.handleEvent),t.toJSON=f,t.target=e,e[this.observerProperty]=t),t.observe(e,this.options)}disconnect(e){const t=e[this.observerProperty];t.target=null,t.disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function et(e){return u(e)&&(e={property:e}),new Ze(e)}ie.define(Ze);const tt=Object.freeze({locate:c()}),st={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};function it(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const nt={toView(e){const t=it(e);return t?t.toString():t},fromView:it};class rt{constructor(e,t,s=t.toLowerCase(),i="reflect",n){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=s,this.mode=i,this.converter=n,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===i&&void 0===n&&(this.converter=st)}setValue(e,t){const s=e[this.fieldName],i=this.converter;void 0!==i&&(t=i.fromView(t)),s!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](s,t),e.$fastController.notify(this.name))}getValue(e){return y.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,s=this.guards;s.has(e)||"fromView"===t||g.enqueue((()=>{s.add(e);const i=e[this.fieldName];switch(t){case"reflect":const t=this.converter;Q.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break;case"boolean":Q.setBooleanAttribute(e,this.attribute,i)}s.delete(e)}))}static collect(e,...t){const s=[];t.push(tt.locate(e));for(let i=0,n=t.length;i<n;++i){const n=t[i];if(void 0!==n)for(let t=0,i=n.length;t<i;++t){const i=n[t];u(i)?s.push(new rt(e,i)):s.push(new rt(e,i.property,i.attribute,i.mode,i.converter))}}return s}}function ot(e,t){let s;function i(e,t){arguments.length>1&&(s.property=t),tt.locate(e.constructor).push(s)}return arguments.length>1?(s={},void i(e,t)):(s=void 0===e?{}:e,i)}const lt={mode:"open"},at={},ht=new Set,ct=l.getById(4,(()=>h()));class dt{constructor(e,t=e.definition){var s;this.platformDefined=!1,u(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.registry=null!==(s=t.registry)&&void 0!==s?s:customElements;const i=e.prototype,n=rt.collect(e,t.attributes),r=new Array(n.length),o={},l={};for(let e=0,t=n.length;e<t;++e){const t=n[e];r[e]=t.attribute,o[t.name]=t,l[t.attribute]=t,y.defineProperty(i,t)}Reflect.defineProperty(e,"observedAttributes",{value:r,enumerable:!0}),this.attributes=n,this.propertyLookup=o,this.attributeLookup=l,this.shadowOptions=void 0===t.shadowOptions?lt:null===t.shadowOptions?void 0:Object.assign(Object.assign({},lt),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?at:Object.assign(Object.assign({},at),t.elementOptions),this.styles=z.normalize(t.styles),ct.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return ht.has(e)||ct.getByType(e)?new dt(class extends e{},t):new dt(e,t)}static registerBaseType(e){ht.add(e)}}dt.getByType=ct.getByType,dt.getForInstance=ct.getForInstance;const ut={bubbles:!0,composed:!0,cancelable:!0},ft=new WeakMap;function gt(e){var t,s;return null!==(s=null!==(t=e.shadowRoot)&&void 0!==t?t:ft.get(e))&&void 0!==s?s:null}let pt;class bt extends b{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this._mainStyles=null,this.$fastController=this,this.view=null,this.toJSON=f,this.source=e,this.definition=t;const s=t.shadowOptions;if(void 0!==s){let t=e.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=e.attachShadow(s),"closed"===s.mode&&ft.set(e,t))}const i=y.getAccessors(e);if(i.length>0){const t=this.boundObservables=Object.create(null);for(let s=0,n=i.length;s<n;++s){const n=i[s].name,r=e[n];void 0!==r&&(delete e[n],t[n]=r)}}}get isConnected(){return y.track(this,"isConnected"),1===this.stage}get template(){var e;if(null===this._template){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=null!==(e=t.template)&&void 0!==e?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get mainStyles(){var e;if(null===this._mainStyles){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=null!==(e=t.styles)&&void 0!==e?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(null!==this._mainStyles&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}addBehavior(e){var t,s;const i=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,n=null!==(s=i.get(e))&&void 0!==s?s:0;0===n?(i.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||1!==this.stage&&0!==this.stage||e.connectedCallback(this)):i.set(e,n+1)}removeBehavior(e,t=!1){const s=this.behaviors;if(null===s)return;const i=s.get(e);void 0!==i&&(1===i||t?(s.delete(e),e.disconnectedCallback&&3!==this.stage&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):s.set(e,i-1))}addStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=gt(s))&&void 0!==t?t:this.source).append(e)}else if(!e.isAttachedTo(s)){const t=e.behaviors;if(e.addStylesTo(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.addBehavior(t[e])}}removeStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=gt(s))&&void 0!==t?t:s).removeChild(e)}else if(e.isAttachedTo(s)){const t=e.behaviors;if(e.removeStylesFrom(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.addBehavior(t[e])}}connect(){if(3!==this.stage)return;if(this.stage=0,null!==this.boundObservables){const e=this.source,t=this.boundObservables,s=Object.keys(t);for(let i=0,n=s.length;i<n;++i){const n=s[i];e[n]=t[n]}this.boundObservables=null}const e=this.behaviors;if(null!==e){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=1,y.notify(this,"isConnected")}disconnect(){if(1!==this.stage)return;this.stage=2,y.notify(this,"isConnected"),null!==this.view&&this.view.unbind();const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.stage=3}onAttributeChangedCallback(e,t,s){const i=this.definition.attributeLookup[e];void 0!==i&&i.onAttributeChangedCallback(this.source,s)}emit(e,t,s){return 1===this.stage&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},ut),s)))}renderTemplate(e){var t;const s=this.source,i=null!==(t=gt(s))&&void 0!==t?t:s;if(null!==this.view)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let e=i.firstChild;null!==e;e=i.firstChild)i.removeChild(e)}e&&(this.view=e.render(s,i,s),this.view.sourceLifetime=v.coupled)}static forCustomElement(e){const t=e.$fastController;if(void 0!==t)return t;const s=dt.getForInstance(e);if(void 0===s)throw l.error(1401);return e.$fastController=new pt(e,s)}static setStrategy(e){pt=e}}function vt(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=gt(e))&&void 0!==t?t:e.getRootNode()}bt.setStrategy(bt);class yt{constructor(e){const t=yt.styleSheetCache;this.sheets=e.map((e=>{if(e instanceof CSSStyleSheet)return e;let s=t.get(e);return void 0===s&&(s=new CSSStyleSheet,s.replaceSync(e),t.set(e,s)),s}))}addStylesTo(e){const t=vt(e);t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=vt(e),s=this.sheets;t.adoptedStyleSheets=t.adoptedStyleSheets.filter((e=>-1===s.indexOf(e)))}}yt.styleSheetCache=new Map;let mt=0;function wt(e){return e===document?document.body:e}function Ct(e){const t=class extends e{constructor(){super(),bt.forCustomElement(this)}$emit(e,t,s){return this.$fastController.emit(e,t,s)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,s){this.$fastController.onAttributeChangedCallback(e,t,s)}};return dt.registerBaseType(t),t}function St(e,t){return d(e)?dt.compose(e,t).define().type:dt.compose(this,e).define().type}z.setDefaultStrategy(z.supportsAdoptedStyleSheets?yt:class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++mt}addStylesTo(e){e=wt(vt(e));const t=this.styles,s=this.styleClass;for(let i=0;i<t.length;i++){const n=document.createElement("style");n.innerHTML=t[i],n.className=s,e.append(n)}}removeStylesFrom(e){const t=(e=wt(vt(e))).querySelectorAll(`.${this.styleClass}`);t[0].parentNode;for(let s=0,i=t.length;s<i;++s)e.removeChild(t[s])}});const xt=Object.assign(Ct(HTMLElement),{from:function(e){return Ct(e)},define:St,compose:function(e,t){return d(e)?dt.compose(e,t):dt.compose(this,e)}});function Tt(e){return function(t){St(t,e)}}export{E as ArrayObserver,oe as Aspect,tt as AttributeConfiguration,rt as AttributeDefinition,re as Binding,R as CSSDirective,Ze as ChildrenDirective,Ee as Compiler,Q as DOM,bt as ElementController,z as ElementStyles,S as ExecutionContext,l as FAST,xt as FASTElement,dt as FASTElementDefinition,pe as HTMLBindingDirective,ie as HTMLDirective,Ce as HTMLView,Z as Markup,Ge as NodeObservationDirective,y as Observable,ee as Parser,b as PropertyChangeNotifier,Pe as RefDirective,qe as RepeatBehavior,Qe as RepeatDirective,Xe as SlottedDirective,v as SourceLifetime,x as Splice,$ as SpliceStrategy,T as SpliceStrategySupport,le as StatelessAttachedAttributeDirective,p as SubscriberSet,g as Updates,te as ViewBehaviorOrchestrator,Me as ViewTemplate,ot as attr,be as bind,st as booleanConverter,et as children,c as createMetadataLocator,h as createTypeRegistry,H as css,_ as cssDirective,q as cssPartial,Tt as customElement,Ke as elements,a as emptyArray,ze as html,ne as htmlDirective,M as lengthOf,ye as listener,me as normalizeBinding,nt as nullableNumberConverter,m as observable,ve as oneTime,Re as ref,Je as repeat,Ye as slotted,w as volatile,_e as when};
|
package/dist/fast-element.js
CHANGED
|
@@ -125,6 +125,10 @@ const isFunction = (object) => typeof object === "function";
|
|
|
125
125
|
* @internal
|
|
126
126
|
*/
|
|
127
127
|
const isString = (object) => typeof object === "string";
|
|
128
|
+
/**
|
|
129
|
+
* @internal
|
|
130
|
+
*/
|
|
131
|
+
const noop = () => void 0;
|
|
128
132
|
|
|
129
133
|
/**
|
|
130
134
|
* The default UpdateQueue.
|
|
@@ -434,6 +438,10 @@ const Observable = FAST.getById(2 /* KernelServiceId.observable */, () => {
|
|
|
434
438
|
this.propertyName = void 0;
|
|
435
439
|
this.notifier = void 0;
|
|
436
440
|
this.next = void 0;
|
|
441
|
+
/**
|
|
442
|
+
* Opts out of JSON stringification.
|
|
443
|
+
*/
|
|
444
|
+
this.toJSON = noop;
|
|
437
445
|
}
|
|
438
446
|
setMode(isAsync) {
|
|
439
447
|
this.isAsync = this.needsQueue = isAsync;
|
|
@@ -1799,6 +1807,11 @@ class StatelessAttachedAttributeDirective {
|
|
|
1799
1807
|
* The unique id of the factory.
|
|
1800
1808
|
*/
|
|
1801
1809
|
this.id = nextId();
|
|
1810
|
+
/**
|
|
1811
|
+
* Opts out of JSON stringification.
|
|
1812
|
+
* @internal
|
|
1813
|
+
*/
|
|
1814
|
+
this.toJSON = noop;
|
|
1802
1815
|
}
|
|
1803
1816
|
/**
|
|
1804
1817
|
* Creates a placeholder string based on the directive's index within the template.
|
|
@@ -1833,6 +1846,14 @@ class OnChangeBinding extends Binding {
|
|
|
1833
1846
|
}
|
|
1834
1847
|
}
|
|
1835
1848
|
class OneTimeBinding extends Binding {
|
|
1849
|
+
constructor() {
|
|
1850
|
+
super(...arguments);
|
|
1851
|
+
/**
|
|
1852
|
+
* Opts out of JSON stringification.
|
|
1853
|
+
* @internal
|
|
1854
|
+
*/
|
|
1855
|
+
this.toJSON = noop;
|
|
1856
|
+
}
|
|
1836
1857
|
createObserver() {
|
|
1837
1858
|
return this;
|
|
1838
1859
|
}
|
|
@@ -2140,6 +2161,11 @@ class HTMLView {
|
|
|
2140
2161
|
* The length of the current collection within a repeat context.
|
|
2141
2162
|
*/
|
|
2142
2163
|
this.length = 0;
|
|
2164
|
+
/**
|
|
2165
|
+
* Opts out of JSON stringification.
|
|
2166
|
+
* @internal
|
|
2167
|
+
*/
|
|
2168
|
+
this.toJSON = noop;
|
|
2143
2169
|
this.firstChild = fragment.firstChild;
|
|
2144
2170
|
this.lastChild = fragment.lastChild;
|
|
2145
2171
|
}
|
|
@@ -2622,6 +2648,11 @@ class ViewTemplate {
|
|
|
2622
2648
|
*/
|
|
2623
2649
|
constructor(html, factories) {
|
|
2624
2650
|
this.result = null;
|
|
2651
|
+
/**
|
|
2652
|
+
* Opts out of JSON stringification.
|
|
2653
|
+
* @internal
|
|
2654
|
+
*/
|
|
2655
|
+
this.toJSON = noop;
|
|
2625
2656
|
this.html = html;
|
|
2626
2657
|
this.factories = factories;
|
|
2627
2658
|
}
|
|
@@ -3033,7 +3064,7 @@ const elements = (selector) => selector
|
|
|
3033
3064
|
class NodeObservationDirective extends StatelessAttachedAttributeDirective {
|
|
3034
3065
|
constructor() {
|
|
3035
3066
|
super(...arguments);
|
|
3036
|
-
this.
|
|
3067
|
+
this.controllerProperty = `${this.id}-c`;
|
|
3037
3068
|
}
|
|
3038
3069
|
/**
|
|
3039
3070
|
* Bind this behavior to the source.
|
|
@@ -3043,7 +3074,7 @@ class NodeObservationDirective extends StatelessAttachedAttributeDirective {
|
|
|
3043
3074
|
*/
|
|
3044
3075
|
bind(controller) {
|
|
3045
3076
|
const target = controller.targets[this.nodeId];
|
|
3046
|
-
target[this.
|
|
3077
|
+
target[this.controllerProperty] = controller;
|
|
3047
3078
|
this.updateTarget(controller.source, this.computeNodes(target));
|
|
3048
3079
|
this.observe(target);
|
|
3049
3080
|
controller.onUnbind(this);
|
|
@@ -3058,7 +3089,7 @@ class NodeObservationDirective extends StatelessAttachedAttributeDirective {
|
|
|
3058
3089
|
const target = controller.targets[this.nodeId];
|
|
3059
3090
|
this.updateTarget(controller.source, emptyArray);
|
|
3060
3091
|
this.disconnect(target);
|
|
3061
|
-
target[this.
|
|
3092
|
+
target[this.controllerProperty] = null;
|
|
3062
3093
|
}
|
|
3063
3094
|
/**
|
|
3064
3095
|
* Gets the data source for the target.
|
|
@@ -3066,7 +3097,7 @@ class NodeObservationDirective extends StatelessAttachedAttributeDirective {
|
|
|
3066
3097
|
* @returns The source.
|
|
3067
3098
|
*/
|
|
3068
3099
|
getSource(target) {
|
|
3069
|
-
return target[this.
|
|
3100
|
+
return target[this.controllerProperty].source;
|
|
3070
3101
|
}
|
|
3071
3102
|
/**
|
|
3072
3103
|
* Updates the source property with the computed nodes.
|
|
@@ -3162,9 +3193,13 @@ class ChildrenDirective extends NodeObservationDirective {
|
|
|
3162
3193
|
* @param target - The target to observe.
|
|
3163
3194
|
*/
|
|
3164
3195
|
observe(target) {
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3196
|
+
let observer = target[this.observerProperty];
|
|
3197
|
+
if (!observer) {
|
|
3198
|
+
observer = new MutationObserver(this.handleEvent);
|
|
3199
|
+
observer.toJSON = noop;
|
|
3200
|
+
observer.target = target;
|
|
3201
|
+
target[this.observerProperty] = observer;
|
|
3202
|
+
}
|
|
3168
3203
|
observer.observe(target, this.options);
|
|
3169
3204
|
}
|
|
3170
3205
|
/**
|
|
@@ -3556,6 +3591,11 @@ class ElementController extends PropertyChangeNotifier {
|
|
|
3556
3591
|
* If `null` then the element is managing its own rendering.
|
|
3557
3592
|
*/
|
|
3558
3593
|
this.view = null;
|
|
3594
|
+
/**
|
|
3595
|
+
* Opts out of JSON stringification.
|
|
3596
|
+
* @internal
|
|
3597
|
+
*/
|
|
3598
|
+
this.toJSON = noop;
|
|
3559
3599
|
this.source = element;
|
|
3560
3600
|
this.definition = definition;
|
|
3561
3601
|
const shadowOptions = definition.shadowOptions;
|
package/dist/fast-element.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){if("undefined"==typeof globalThis)if("undefined"!=typeof global)global.globalThis=global;else if("undefined"!=typeof self)self.globalThis=self;else if("undefined"!=typeof window)window.globalThis=window;else{const e=new Function("return this")();e.globalThis=e}}(),globalThis.trustedTypes||(globalThis.trustedTypes={createPolicy:(e,t)=>t});const e={configurable:!1,enumerable:!1,writable:!1};void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},e));const t=globalThis.FAST;if(void 0===t.getById){const s=Object.create(null);Reflect.defineProperty(t,"getById",Object.assign({value(e,t){let i=s[e];return void 0===i&&(i=t?s[e]=t():null),i}},e))}void 0===t.error&&Object.assign(t,{warn(){},error:e=>new Error(`Error ${e}`),addMessages(){}});const s=Object.freeze([]);function i(){const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t),getForInstance(t){if(null!=t)return e.get(t.constructor)}})}function n(){const e=new WeakMap;return function(t){let s=e.get(t);if(void 0===s){let i=Reflect.getPrototypeOf(t);for(;void 0===s&&null!==i;)s=e.get(i),i=Reflect.getPrototypeOf(i);s=void 0===s?[]:s.slice(0),e.set(t,s)}return s}}const r=e=>"function"==typeof e,o=e=>"string"==typeof e,l=t.getById(1,(()=>{const e=[],t=[],s=globalThis.requestAnimationFrame;let i=!0;function n(){if(t.length)throw t.shift()}function r(s){try{s.call()}catch(s){if(!i)throw e.length=0,s;t.push(s),setTimeout(n,0)}}function o(){let t=0;for(;t<e.length;)if(r(e[t]),t++,t>1024){for(let s=0,i=e.length-t;s<i;s++)e[s]=e[s+t];e.length-=t,t=0}e.length=0}function l(t){e.push(t),e.length<2&&(i?s(o):o())}return Object.freeze({enqueue:l,next:()=>new Promise(l),process:o,setMode:e=>i=e})}));class a{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const s=t.indexOf(e);-1!==s&&t.splice(s,1)}}notify(e){const t=this.spillover,s=this.subject;if(void 0===t){const t=this.sub1,i=this.sub2;void 0!==t&&t.handleChange(s,e),void 0!==i&&i.handleChange(s,e)}else for(let i=0,n=t.length;i<n;++i)t[i].handleChange(s,e)}}class h{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,s;null===(t=this.subscribers[e])||void 0===t||t.notify(e),null===(s=this.subjectSubscribers)||void 0===s||s.notify(e)}subscribe(e,t){var s,i;let n;n=t?null!==(s=this.subscribers[t])&&void 0!==s?s:this.subscribers[t]=new a(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new a(this.subject),n.subscribe(e)}unsubscribe(e,t){var s,i;t?null===(s=this.subscribers[t])||void 0===s||s.unsubscribe(e):null===(i=this.subjectSubscribers)||void 0===i||i.unsubscribe(e)}}const c=Object.freeze({unknown:void 0,coupled:1}),d=t.getById(2,(()=>{const e=l.enqueue,s=/(:|&&|\|\||if)/,i=new WeakMap;let d,u=e=>{throw t.error(1101)};function f(e){var t;let s=null!==(t=e.$fastController)&&void 0!==t?t:i.get(e);return void 0===s&&(Array.isArray(e)?s=u(e):i.set(e,s=new h(e))),s}const p=n();class g{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==d&&d.watch(e,this.name),e[this.field]}setValue(e,t){const s=this.field,i=e[s];if(i!==t){e[s]=t;const n=e[this.callback];r(n)&&n.call(e,i,t),f(e).notify(this.name)}}}class b extends a{constructor(e,t,s=!1){super(e,t),this.expression=e,this.isVolatileBinding=s,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(e){this.isAsync=this.needsQueue=e}bind(e){this.controller=e;const t=this.observe(e.source,e.context);return!e.isBound&&this.requiresUnbind(e)&&e.onUnbind(this),t}requiresUnbind(e){return e.sourceLifetime!==c.coupled||this.first!==this.last||this.first.propertySource!==e.source}unbind(e){this.dispose()}observe(e,t){this.needsRefresh&&null!==this.last&&this.dispose();const s=d;let i;d=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{i=this.expression(e,t)}finally{d=s}return i}disconnect(){this.dispose()}dispose(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(e,t){const s=this.last,i=f(e),n=null===s?this.first:{};if(n.propertySource=e,n.propertyName=t,n.notifier=i,i.subscribe(this,t),null!==s){if(!this.needsRefresh){let t;d=void 0,t=s.propertySource[s.propertyName],d=this,e===t&&(this.needsRefresh=!0)}s.next=n}this.last=n}handleChange(){this.needsQueue?(this.needsQueue=!1,e(this)):this.isAsync||this.call()}call(){null!==this.last&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let e=this.first;for(;void 0!==e;)yield e,e=e.next}}return Object.freeze({setArrayObserverFactory(e){u=e},getNotifier:f,track(e,t){d&&d.watch(e,t)},trackVolatile(){d&&(d.needsRefresh=!0)},notify(e,t){f(e).notify(t)},defineProperty(e,t){o(t)&&(t=new g(t)),p(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:p,binding(e,t,s=this.isVolatileBinding(e)){return new b(e,t,s)},isVolatileBinding:e=>s.test(e.toString())})}));function u(e,t){d.defineProperty(e,t)}function f(e,t,s){return Object.assign({},s,{get(){return d.trackVolatile(),s.get.apply(this)}})}const p=t.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}})),g=Object.freeze({default:{index:0,length:0,get event(){return g.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>p.get(),setEvent(e){p.set(e)}});class b{constructor(e,t,s){this.index=e,this.removed=t,this.addedCount=s}adjustTo(e){let t=this.index;const s=e.length;return t>s?t=s-this.addedCount:t<0&&(t=s+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}}const v=Object.freeze({reset:1,splice:2,optimized:3}),y=new b(0,s,0);y.reset=!0;const m=[y];function w(e,t,i,n,r,o){let l=0,a=0;const h=Math.min(i-t,o-r);if(0===t&&0===r&&(l=function(e,t,s){for(let i=0;i<s;++i)if(e[i]!==t[i])return i;return s}(e,n,h)),i===e.length&&o===n.length&&(a=function(e,t,s){let i=e.length,n=t.length,r=0;for(;r<s&&e[--i]===t[--n];)r++;return r}(e,n,h-l)),r+=l,o-=a,(i-=a)-(t+=l)==0&&o-r==0)return s;if(t===i){const e=new b(t,[],0);for(;r<o;)e.removed.push(n[r++]);return[e]}if(r===o)return[new b(t,[],i-t)];const c=function(e){let t=e.length-1,s=e[0].length-1,i=e[t][s];const n=[];for(;t>0||s>0;){if(0===t){n.push(2),s--;continue}if(0===s){n.push(3),t--;continue}const r=e[t-1][s-1],o=e[t-1][s],l=e[t][s-1];let a;a=o<l?o<r?o:r:l<r?l:r,a===r?(r===i?n.push(0):(n.push(1),i=r),t--,s--):a===o?(n.push(3),t--,i=o):(n.push(2),s--,i=l)}return n.reverse()}(function(e,t,s,i,n,r){const o=r-n+1,l=s-t+1,a=new Array(o);let h,c;for(let e=0;e<o;++e)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;++e)a[0][e]=e;for(let s=1;s<o;++s)for(let r=1;r<l;++r)e[t+r-1]===i[n+s-1]?a[s][r]=a[s-1][r-1]:(h=a[s-1][r]+1,c=a[s][r-1]+1,a[s][r]=h<c?h:c);return a}(e,t,i,n,r,o)),d=[];let u,f=t,p=r;for(let e=0;e<c.length;++e)switch(c[e]){case 0:void 0!==u&&(d.push(u),u=void 0),f++,p++;break;case 1:void 0===u&&(u=new b(f,[],0)),u.addedCount++,f++,u.removed.push(n[p]),p++;break;case 2:void 0===u&&(u=new b(f,[],0)),u.addedCount++,f++;break;case 3:void 0===u&&(u=new b(f,[],0)),u.removed.push(n[p]),p++}return void 0!==u&&d.push(u),d}function C(e,t){let s=!1,i=0;for(let a=0;a<t.length;a++){const h=t[a];if(h.index+=i,s)continue;const c=(n=e.index,r=e.index+e.removed.length,o=h.index,l=h.index+h.addedCount,r<o||l<n?-1:r===o||l===n?0:n<o?r<l?r-o:l-o:l<r?l-n:r-n);if(c>=0){t.splice(a,1),a--,i-=h.addedCount-h.removed.length,e.addedCount+=h.addedCount-c;const n=e.removed.length+h.removed.length-c;if(e.addedCount||n){let t=h.removed;if(e.index<h.index){const s=e.removed.slice(0,h.index-e.index);s.push(...t),t=s}if(e.index+e.removed.length>h.index+h.addedCount){const s=e.removed.slice(h.index+h.addedCount-e.index);t.push(...s)}e.removed=t,h.index<e.index&&(e.index=h.index)}else s=!0}else if(e.index<h.index){s=!0,t.splice(a,0,e),a++;const n=e.addedCount-e.removed.length;h.index+=n,i+=n}}var n,r,o,l;s||t.push(e)}let x=Object.freeze({support:v.optimized,normalize:(e,t,i)=>void 0===e?void 0===i?s:i.length>1?function(e,t){let s=[];const i=[];for(let e=0,s=t.length;e<s;e++)C(t[e],i);for(let t=0,n=i.length;t<n;++t){const n=i[t];1!==n.addedCount||1!==n.removed.length?s=s.concat(w(e,n.index,n.index+n.addedCount,n.removed,0,n.removed.length)):n.removed[0]!==e[n.index]&&s.push(n)}return s}(t,i):i:m,pop(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new b(e.length,[r],0)),r},push(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new b(e.length-i.length,[],i.length).adjustTo(e)),n},reverse(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},shift(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new b(0,[r],0)),r},sort(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},splice(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new b(+i[0],n,i.length>2?i.length-2:0).adjustTo(e)),n},unshift(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new b(0,[],i.length).adjustTo(e)),n}});const S=Object.freeze({reset:m,setDefaultStrategy(e){x=e}});function T(e,t,s){Reflect.defineProperty(e,t,{value:s,enumerable:!1})}class O extends a{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this.call=this.flush,T(e,"$fastController",this)}get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let e=this._lengthObserver;if(void 0===e){const t=this.subject;this._lengthObserver=e={length:t.length,handleChange(){this.length!==t.length&&(this.length=t.length,d.notify(e,"length"))}},this.subscribe(e)}return e}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.oldCollection;void 0===t&&void 0===s||(this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0,this.notify((null!==(e=this._strategy)&&void 0!==e?e:x).normalize(s,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,l.enqueue(this))}}let B=!1;const A=Object.freeze({enable(){if(B)return;B=!0,d.setArrayObserverFactory((e=>new O(e)));const e=Array.prototype;e.$fastPatch||(T(e,"$fastPatch",1),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach((t=>{e[t.name]=function(...e){var s;const i=this.$fastController;return void 0===i?t.apply(this,e):(null!==(s=i.strategy)&&void 0!==s?s:x)[t.name](this,i,t,e)}})))}});function k(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(A.enable(),t=d.getNotifier(e)),d.track(t.lengthObserver,"length"),e.length}let j;function $(e){return e.map((e=>e instanceof V?$(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}class V{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map((e=>e instanceof V?e.behaviors:null)).reduce(((e,t)=>null===t?e:null===e?t:e.concat(t)),null)}get strategy(){return null===this._strategy&&this.withStrategy(j),this._strategy}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}withStrategy(e){return this._strategy=new e($(this.styles)),this}static setDefaultStrategy(e){j=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new V(e):e instanceof V?e:new V([e])}}V.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const I=i(),N=Object.freeze({getForInstance:I.getForInstance,getByType:I.getByType,define:e=>(I.register({type:e}),e)});function E(){return function(e){N.define(e)}}function L(e,t){const s=[];let i="";const n=[],r=e=>{n.push(e)};for(let n=0,o=e.length-1;n<o;++n){i+=e[n];let o=t[n];void 0!==N.getForInstance(o)&&(o=o.createCSS(r)),o instanceof V||o instanceof CSSStyleSheet?(""!==i.trim()&&(s.push(i),i=""),s.push(o)):i+=o}return i+=e[e.length-1],""!==i.trim()&&s.push(i),{styles:s,behaviors:n}}const z=(e,...t)=>{const{styles:s,behaviors:i}=L(e,t),n=new V(s);return i.length?n.withBehaviors(...i):n};class F{constructor(e,t){this.behaviors=t,this.css="";const s=e.reduce(((e,t)=>(o(t)?this.css+=t:e.push(t),e)),[]);s.length&&(this.styles=new V(s))}createCSS(e){return this.behaviors.forEach(e),this.styles&&e(this),this.css}addedCallback(e){e.addStyles(this.styles)}removedCallback(e){e.removeStyles(this.styles)}}N.define(F);const M=z.partial=(e,...t)=>{const{styles:s,behaviors:i}=L(e,t);return new F(s,i)},_=Object.freeze({queueUpdate:l.enqueue,nextUpdate:l.next,processUpdates:l.process,setAttribute(e,t,s){null==s?e.removeAttribute(t):e.setAttribute(t,s)},setBooleanAttribute(e,t,s){s?e.setAttribute(t,""):e.removeAttribute(t)}}),P=`fast-${Math.random().toString(36).substring(2,8)}`,R=`${P}{`,H=`}${P}`,q=H.length;let D=0;const U=()=>`${P}-${++D}`,Q=Object.freeze({interpolation:e=>`${R}${e}${H}`,attribute:e=>`${U()}="${R}${e}${H}"`,comment:e=>`\x3c!--${R}${e}${H}--\x3e`}),W=Object.freeze({parse(e,t){const s=e.split(R);if(1===s.length)return null;const i=[];for(let e=0,n=s.length;e<n;++e){const n=s[e],r=n.indexOf(H);let o;if(-1===r)o=n;else{const e=n.substring(0,r);i.push(t[e]),o=n.substring(r+q)}""!==o&&i.push(o)}return i}}),G=Object.freeze({create(e){const t=[],s={};let i=null,n=!1;return{source:e,context:g.default,targets:s,get isBound(){return n},addBehaviorFactory(e,t){const s=e.nodeId||(e.nodeId=U());e.id||(e.id=U()),this.addTarget(s,t),this.addBehavior(e.createBehavior())},addTarget(e,t){s[e]=t},addBehavior(e){t.push(e),n&&e.bind(this)},onUnbind(e){null===i&&(i=[]),i.push(e)},connectedCallback(e){n||(n=!0,t.forEach((e=>e.bind(this))))},disconnectedCallback(e){n&&(n=!1,null!==i&&i.forEach((e=>e.unbind(this))))}}}}),J=i(),K=Object.freeze({getForInstance:J.getForInstance,getByType:J.getByType,define:(e,t)=>((t=t||{}).type=e,J.register(t),e)});function X(e){return function(t){K.define(t,e)}}class Y{constructor(e,t=!1){this.evaluate=e,this.isVolatile=t}}const Z=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6,assign(e,t){if(t)switch(e.sourceAspect=t,t[0]){case":":e.targetAspect=t.substring(1),e.aspectType="classList"===e.targetAspect?Z.tokenList:Z.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=Z.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=Z.event;break;default:e.targetAspect=t,e.aspectType=Z.attribute}else e.aspectType=Z.content}});class ee{constructor(e){this.options=e,this.id=U()}createHTML(e){return Q.attribute(e(this))}createBehavior(){return this}}const te=globalThis.TrustedHTML?e=>(s,i)=>{const n=e(s,i);if(n instanceof TrustedHTML)return n;throw t.error(1202)}:e=>e;class se extends Y{createObserver(e,t){return d.binding(this.evaluate,t,this.isVolatile)}}class ie extends Y{createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function ne(e,t,s,i){if(null==s&&(s=""),s.create){e.textContent="";let t=e.$fastView;void 0===t?t=s.create():e.$fastTemplate!==s&&(t.isComposed&&(t.remove(),t.unbind()),t=s.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(i.source,i.context)):(t.isComposed=!0,t.bind(i.source,i.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=s)}else{const t=e.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=s}}function re(e,t,s){var i;const n=`${this.id}-t`,r=null!==(i=e[n])&&void 0!==i?i:e[n]={v:0,cv:Object.create(null)},o=r.cv;let l=r.v;const a=e[t];if(null!=s&&s.length){const e=s.split(/\s+/);for(let t=0,s=e.length;t<s;++t){const s=e[t];""!==s&&(o[s]=l,a.add(s))}}if(r.v=l+1,0!==l){l-=1;for(const e in o)o[e]===l&&a.remove(e)}}const oe=(e,t,s)=>e[t]=s,le=()=>{};class ae{constructor(e){this.dataBinding=e,this.updateTarget=null,this.id=U(),this.aspectType=Z.content,this.data=`${this.id}-d`}createHTML(e){return Q.interpolation(e(this))}createBehavior(){if(null===this.updateTarget)switch("innerHTML"===this.targetAspect&&(this.dataBinding.evaluate=te(this.dataBinding.evaluate)),this.aspectType){case 1:this.updateTarget=_.setAttribute;break;case 2:this.updateTarget=_.setBooleanAttribute;break;case 3:this.updateTarget=oe;break;case 4:this.updateTarget=ne;break;case 5:this.updateTarget=re;break;case 6:this.updateTarget=le;break;default:throw t.error(1205)}return this}bind(e){var t;const s=e.targets[this.nodeId];switch(this.updateTarget){case le:s[this.data]=e,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case ne:e.onUnbind(this);default:const i=null!==(t=s[this.data])&&void 0!==t?t:s[this.data]=this.dataBinding.createObserver(this,this);i.target=s,i.controller=e,this.updateTarget(s,this.targetAspect,i.bind(e),e)}}unbind(e){const t=e.targets[this.nodeId].$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){g.setEvent(e);const s=this.dataBinding.evaluate(t.source,t.context);g.setEvent(null),!0!==s&&e.preventDefault()}}handleChange(e,t){const s=t.target,i=t.controller;this.updateTarget(s,this.targetAspect,t.bind(i),i)}}function he(e,t=d.isVolatileBinding(e)){return new se(e,t)}function ce(e){return new ie(e)}function de(e,t){const s=new se(e,!1);return s.options=t,s}function ue(e){return r(e)?he(e):e instanceof Y?e:ce((()=>e))}function fe(e,t){const s=e.parentNode;let i,n=e;for(;n!==t;)i=n.nextSibling,s.removeChild(n),n=i;s.removeChild(t)}K.define(ae,{aspected:!0});class pe{constructor(e,t,s){this.fragment=e,this.factories=t,this.targets=s,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=c.unknown,this.context=this,this.index=0,this.length=0,this.firstChild=e.firstChild,this.lastChild=e.lastChild}get event(){return g.getEvent()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const s=e.parentNode;let i,n=this.firstChild;for(;n!==t;)i=n.nextSibling,s.insertBefore(n,e),n=i;s.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let s,i=this.firstChild;for(;i!==t;)s=i.nextSibling,e.appendChild(i),i=s;e.appendChild(t)}dispose(){fe(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e)return;let s=this.behaviors;if(null===s){this.source=e,this.context=t,this.behaviors=s=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e].createBehavior();t.bind(this),s[e]=t}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=s.length;e<t;++e)s[e].bind(this)}this.isBound=!0}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,s=e.length;t<s;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(0!==e.length){fe(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}}d.defineProperty(pe.prototype,"index"),d.defineProperty(pe.prototype,"length");const ge=(e,t)=>`${e}.${t}`,be={},ve={index:0,node:null};function ye(e){e.startsWith("fast-")||t.warn(1204,{name:e})}const me=new Proxy(document.createElement("div"),{get(e,t){ye(t);const s=Reflect.get(e,t);return r(s)?s.bind(e):s},set:(e,t,s)=>(ye(t),Reflect.set(e,t,s))});class we{constructor(e,t){this.fragment=e,this.directives=t,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,s,i){this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(t,s,i)),e.nodeId=s,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,s){const i=this.descriptors;if("r"===t||"h"===t||i[t])return;if(!i[e]){const t=e.lastIndexOf("."),s=e.substring(0,t),i=parseInt(e.substring(t+1));this.addTargetDescriptor(s,e,i)}let n=be[t];if(!n){const i=`_${t}`;be[t]=n={get(){var t;return null!==(t=this[i])&&void 0!==t?t:this[i]=this[e].childNodes[s]}}}i[t]=n}createView(e){const t=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=t,s.h=null!=e?e:me;for(const e of this.nodeIds)s[e];return new pe(t,this.factories,s)}}function Ce(e,t,s,i,n,r=!1){const o=s.attributes,l=e.directives;for(let a=0,h=o.length;a<h;++a){const c=o[a],d=c.value,u=W.parse(d,l);let f=null;null===u?r&&(f=new ae(ce((()=>d))),Z.assign(f,c.name)):f=Ae.aggregate(u),null!==f&&(s.removeAttributeNode(c),a--,h--,e.addFactory(f,t,i,n))}}function xe(e,t,s){let i=0,n=t.firstChild;for(;n;){const t=Se(e,s,n,i);n=t.node,i=t.index}}function Se(e,t,s,i){const n=ge(t,i);switch(s.nodeType){case 1:Ce(e,t,s,n,i),xe(e,s,n);break;case 3:return function(e,t,s,i,n){const r=W.parse(t.textContent,e.directives);if(null===r)return ve.node=t.nextSibling,ve.index=n+1,ve;let l,a=l=t;for(let t=0,h=r.length;t<h;++t){const h=r[t];0!==t&&(n++,i=ge(s,n),l=a.parentNode.insertBefore(document.createTextNode(""),a.nextSibling)),o(h)?l.textContent=h:(l.textContent=" ",Z.assign(h),e.addFactory(h,s,i,n)),a=l}return ve.index=n+1,ve.node=a.nextSibling,ve}(e,s,t,n,i);case 8:const r=W.parse(s.data,e.directives);null!==r&&e.addFactory(Ae.aggregate(r),t,n,i)}return ve.index=i+1,ve.node=s.nextSibling,ve}const Te={createHTML:e=>e};let Oe=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",Te):Te;const Be=Oe,Ae={setHTMLPolicy(e){if(Oe!==Be)throw t.error(1201);Oe=e},compile(e,t){let s;if(o(e)){s=document.createElement("TEMPLATE"),s.innerHTML=Oe.createHTML(e);const t=s.content.firstElementChild;null!==t&&"TEMPLATE"===t.tagName&&(s=t)}else s=e;const i=document.adoptNode(s.content),n=new we(i,t);return Ce(n,"",s,"h",0,!0),(function(e,t){return e&&8==e.nodeType&&null!==W.parse(e.data,t)}(i.firstChild,t)||1===i.childNodes.length&&Object.keys(t).length>0)&&i.insertBefore(document.createComment(""),i.firstChild),xe(n,i,"r"),ve.node=null,n.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e){if(1===e.length)return e[0];let t,s,i=!1;const n=e.length,r=e.map((e=>o(e)?()=>e:(t=e.sourceAspect||t,s=e.dataBinding||s,i=i||e.dataBinding.isVolatile,e.dataBinding.evaluate)));s.evaluate=(e,t)=>{let s="";for(let i=0;i<n;++i)s+=r[i](e,t);return s},s.isVolatile=i;const l=new ae(s);return Z.assign(l,t),l}};class ke{constructor(e,t){this.result=null,this.html=e,this.factories=t}create(e){return null===this.result&&(this.result=Ae.compile(this.html,this.factories)),this.result.createView(e)}render(e,t,s){const i=this.create(s);return i.bind(e),i.appendTo(t),i}}const je=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function $e(e,t,s){const i=je.exec(t);return null!==i&&Z.assign(e,i[2]),e.createHTML(s)}function Ve(e,...t){let s="";const i=Object.create(null),n=e=>{var t;const s=null!==(t=e.id)&&void 0!==t?t:e.id=U();return i[s]=e,s};for(let i=0,l=e.length-1;i<l;++i){const l=e[i],a=t[i];let h;if(s+=l,r(a))s+=$e(new ae(he(a)),l,n);else if(o(a)){const e=je.exec(l);if(null!==e){const t=new ae(ce((()=>a)));Z.assign(t,e[2]),s+=t.createHTML(n)}else s+=a}else a instanceof Y?s+=$e(new ae(a),l,n):void 0===(h=K.getForInstance(a))?s+=$e(new ae(ce((()=>a))),l,n):h.aspected?s+=$e(a,l,n):s+=a.createHTML(n)}return new ke(s+e[e.length-1],i)}class Ie extends ee{bind(e){e.source[this.options]=e.targets[this.nodeId]}}K.define(Ie);const Ne=e=>new Ie(e);function Ee(e,t){const s=r(e)?e:()=>e,i=r(t)?t:()=>t;return(e,t)=>s(e,t)?i(e,t):null}const Le=Object.freeze({positioning:!1,recycle:!0});function ze(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.bind(t[s])}function Fe(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.context.length=t.length,e.context.index=s,e.bind(t[s])}class Me{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=ze,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(e,this),this.templateBindingObserver=e.templateBinding.createObserver(e,this),e.options.positioning&&(this.bindView=Fe)}bind(e){this.location=e.targets[this.directive.nodeId],this.controller=e,this.items=this.itemsBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),this.observeItems(!0),this.refreshAllViews(),e.onUnbind(this)}unbind(){null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else{if(!t[0])return;t[0].reset?this.refreshAllViews():this.updateViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=s);const t=this.itemsObserver,i=this.itemsObserver=d.getNotifier(this.items),n=t!==i;n&&null!==t&&t.unsubscribe(this),(n||e)&&i.subscribe(this)}updateViews(e){const t=this.views,s=this.bindView,i=this.items,n=this.template,r=this.controller,o=this.directive.options.recycle,l=[];let a=0,h=0;for(let c=0,d=e.length;c<d;++c){const d=e[c],u=d.removed;let f=0,p=d.index;const g=p+d.addedCount,b=t.splice(d.index,u.length),v=h=l.length+b.length;for(;p<g;++p){const e=t[p],c=e?e.firstChild:this.location;let d;o&&h>0?(f<=v&&b.length>0?(d=b[f],f++):(d=l[a],a++),h--):d=n.create(),t.splice(p,0,d),s(d,i,p,r),d.insertBefore(c)}b[f]&&l.push(...b.slice(f))}for(let e=a,t=l.length;e<t;++e)l[e].dispose();if(this.directive.options.positioning)for(let e=0,s=t.length;e<s;++e){const i=t[e].context;i.length=s,i.index=e}}refreshAllViews(e=!1){const t=this.items,s=this.template,i=this.location,n=this.bindView,r=this.controller;let o=t.length,l=this.views,a=l.length;if(0!==o&&!e&&this.directive.options.recycle||(pe.disposeContiguousBatch(l),a=0),0===a){this.views=l=new Array(o);for(let e=0;e<o;++e){const o=s.create();n(o,t,e,r),l[e]=o,o.insertBefore(i)}}else{let e=0;for(;e<o;++e)if(e<a){n(l[e],t,e,r)}else{const o=s.create();n(o,t,e,r),l.push(o),o.insertBefore(i)}const h=l.splice(e,a-e);for(e=0,o=h.length;e<o;++e)h[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}class _e{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,this.id=U(),A.enable()}createHTML(e){return Q.comment(e(this))}createBehavior(){return new Me(this)}}function Pe(e,t,s=Le){const i=ue(e),n=ue(t);return new _e(i,n,Object.assign(Object.assign({},Le),s))}K.define(_e);const Re=e=>1===e.nodeType,He=e=>e?t=>1===t.nodeType&&t.matches(e):Re;class qe extends ee{constructor(){super(...arguments),this.sourceProperty=`${this.id}-s`}bind(e){const t=e.targets[this.nodeId];t[this.sourceProperty]=e.source,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.nodeId];this.updateTarget(e.source,s),this.disconnect(t),t[this.sourceProperty]=null}getSource(e){return e[this.sourceProperty]}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}class De extends qe{observe(e){e.addEventListener("slotchange",this)}disconnect(e){e.removeEventListener("slotchange",this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function Ue(e){return o(e)&&(e={property:e}),new De(e)}K.define(De);class Qe extends qe{constructor(e){super(e),this.observerProperty=`${this.id}-o`,this.handleEvent=(e,t)=>{const s=t.target;this.updateTarget(this.getSource(s),this.computeNodes(s))},e.childList=!0}observe(e){var t;const s=null!==(t=e[this.observerProperty])&&void 0!==t?t:e[this.observerProperty]=new MutationObserver(this.handleEvent);s.target=e,s.observe(e,this.options)}disconnect(e){const t=e[this.observerProperty];t.target=null,t.disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function We(e){return o(e)&&(e={property:e}),new Qe(e)}K.define(Qe);const Ge=Object.freeze({locate:n()}),Je={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};function Ke(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const Xe={toView(e){const t=Ke(e);return t?t.toString():t},fromView:Ke};class Ye{constructor(e,t,s=t.toLowerCase(),i="reflect",n){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=s,this.mode=i,this.converter=n,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===i&&void 0===n&&(this.converter=Je)}setValue(e,t){const s=e[this.fieldName],i=this.converter;void 0!==i&&(t=i.fromView(t)),s!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](s,t),e.$fastController.notify(this.name))}getValue(e){return d.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,s=this.guards;s.has(e)||"fromView"===t||l.enqueue((()=>{s.add(e);const i=e[this.fieldName];switch(t){case"reflect":const t=this.converter;_.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break;case"boolean":_.setBooleanAttribute(e,this.attribute,i)}s.delete(e)}))}static collect(e,...t){const s=[];t.push(Ge.locate(e));for(let i=0,n=t.length;i<n;++i){const n=t[i];if(void 0!==n)for(let t=0,i=n.length;t<i;++t){const i=n[t];o(i)?s.push(new Ye(e,i)):s.push(new Ye(e,i.property,i.attribute,i.mode,i.converter))}}return s}}function Ze(e,t){let s;function i(e,t){arguments.length>1&&(s.property=t),Ge.locate(e.constructor).push(s)}return arguments.length>1?(s={},void i(e,t)):(s=void 0===e?{}:e,i)}const et={mode:"open"},tt={},st=new Set,it=t.getById(4,(()=>i()));class nt{constructor(e,t=e.definition){var s;this.platformDefined=!1,o(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.registry=null!==(s=t.registry)&&void 0!==s?s:customElements;const i=e.prototype,n=Ye.collect(e,t.attributes),r=new Array(n.length),l={},a={};for(let e=0,t=n.length;e<t;++e){const t=n[e];r[e]=t.attribute,l[t.name]=t,a[t.attribute]=t,d.defineProperty(i,t)}Reflect.defineProperty(e,"observedAttributes",{value:r,enumerable:!0}),this.attributes=n,this.propertyLookup=l,this.attributeLookup=a,this.shadowOptions=void 0===t.shadowOptions?et:null===t.shadowOptions?void 0:Object.assign(Object.assign({},et),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?tt:Object.assign(Object.assign({},tt),t.elementOptions),this.styles=V.normalize(t.styles),it.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return st.has(e)||it.getByType(e)?new nt(class extends e{},t):new nt(e,t)}static registerBaseType(e){st.add(e)}}nt.getByType=it.getByType,nt.getForInstance=it.getForInstance;const rt={bubbles:!0,composed:!0,cancelable:!0},ot=new WeakMap;function lt(e){var t,s;return null!==(s=null!==(t=e.shadowRoot)&&void 0!==t?t:ot.get(e))&&void 0!==s?s:null}let at;class ht extends h{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this._mainStyles=null,this.$fastController=this,this.view=null,this.source=e,this.definition=t;const s=t.shadowOptions;if(void 0!==s){let t=e.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=e.attachShadow(s),"closed"===s.mode&&ot.set(e,t))}const i=d.getAccessors(e);if(i.length>0){const t=this.boundObservables=Object.create(null);for(let s=0,n=i.length;s<n;++s){const n=i[s].name,r=e[n];void 0!==r&&(delete e[n],t[n]=r)}}}get isConnected(){return d.track(this,"isConnected"),1===this.stage}get template(){var e;if(null===this._template){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=null!==(e=t.template)&&void 0!==e?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get mainStyles(){var e;if(null===this._mainStyles){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=null!==(e=t.styles)&&void 0!==e?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(null!==this._mainStyles&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}addBehavior(e){var t,s;const i=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,n=null!==(s=i.get(e))&&void 0!==s?s:0;0===n?(i.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||1!==this.stage&&0!==this.stage||e.connectedCallback(this)):i.set(e,n+1)}removeBehavior(e,t=!1){const s=this.behaviors;if(null===s)return;const i=s.get(e);void 0!==i&&(1===i||t?(s.delete(e),e.disconnectedCallback&&3!==this.stage&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):s.set(e,i-1))}addStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=lt(s))&&void 0!==t?t:this.source).append(e)}else if(!e.isAttachedTo(s)){const t=e.behaviors;if(e.addStylesTo(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.addBehavior(t[e])}}removeStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=lt(s))&&void 0!==t?t:s).removeChild(e)}else if(e.isAttachedTo(s)){const t=e.behaviors;if(e.removeStylesFrom(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.addBehavior(t[e])}}connect(){if(3!==this.stage)return;if(this.stage=0,null!==this.boundObservables){const e=this.source,t=this.boundObservables,s=Object.keys(t);for(let i=0,n=s.length;i<n;++i){const n=s[i];e[n]=t[n]}this.boundObservables=null}const e=this.behaviors;if(null!==e){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=1,d.notify(this,"isConnected")}disconnect(){if(1!==this.stage)return;this.stage=2,d.notify(this,"isConnected"),null!==this.view&&this.view.unbind();const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.stage=3}onAttributeChangedCallback(e,t,s){const i=this.definition.attributeLookup[e];void 0!==i&&i.onAttributeChangedCallback(this.source,s)}emit(e,t,s){return 1===this.stage&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},rt),s)))}renderTemplate(e){var t;const s=this.source,i=null!==(t=lt(s))&&void 0!==t?t:s;if(null!==this.view)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let e=i.firstChild;null!==e;e=i.firstChild)i.removeChild(e)}e&&(this.view=e.render(s,i,s),this.view.sourceLifetime=c.coupled)}static forCustomElement(e){const s=e.$fastController;if(void 0!==s)return s;const i=nt.getForInstance(e);if(void 0===i)throw t.error(1401);return e.$fastController=new at(e,i)}static setStrategy(e){at=e}}function ct(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=lt(e))&&void 0!==t?t:e.getRootNode()}ht.setStrategy(ht);class dt{constructor(e){const t=dt.styleSheetCache;this.sheets=e.map((e=>{if(e instanceof CSSStyleSheet)return e;let s=t.get(e);return void 0===s&&(s=new CSSStyleSheet,s.replaceSync(e),t.set(e,s)),s}))}addStylesTo(e){const t=ct(e);t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=ct(e),s=this.sheets;t.adoptedStyleSheets=t.adoptedStyleSheets.filter((e=>-1===s.indexOf(e)))}}dt.styleSheetCache=new Map;let ut=0;function ft(e){return e===document?document.body:e}function pt(e){const t=class extends e{constructor(){super(),ht.forCustomElement(this)}$emit(e,t,s){return this.$fastController.emit(e,t,s)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,s){this.$fastController.onAttributeChangedCallback(e,t,s)}};return nt.registerBaseType(t),t}function gt(e,t){return r(e)?nt.compose(e,t).define().type:nt.compose(this,e).define().type}V.setDefaultStrategy(V.supportsAdoptedStyleSheets?dt:class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++ut}addStylesTo(e){e=ft(ct(e));const t=this.styles,s=this.styleClass;for(let i=0;i<t.length;i++){const n=document.createElement("style");n.innerHTML=t[i],n.className=s,e.append(n)}}removeStylesFrom(e){const t=(e=ft(ct(e))).querySelectorAll(`.${this.styleClass}`);t[0].parentNode;for(let s=0,i=t.length;s<i;++s)e.removeChild(t[s])}});const bt=Object.assign(pt(HTMLElement),{from:function(e){return pt(e)},define:gt,compose:function(e,t){return r(e)?nt.compose(e,t):nt.compose(this,e)}});function vt(e){return function(t){gt(t,e)}}export{A as ArrayObserver,Z as Aspect,Ge as AttributeConfiguration,Ye as AttributeDefinition,Y as Binding,N as CSSDirective,Qe as ChildrenDirective,Ae as Compiler,_ as DOM,ht as ElementController,V as ElementStyles,g as ExecutionContext,t as FAST,bt as FASTElement,nt as FASTElementDefinition,ae as HTMLBindingDirective,K as HTMLDirective,pe as HTMLView,Q as Markup,qe as NodeObservationDirective,d as Observable,W as Parser,h as PropertyChangeNotifier,Ie as RefDirective,Me as RepeatBehavior,_e as RepeatDirective,De as SlottedDirective,c as SourceLifetime,b as Splice,S as SpliceStrategy,v as SpliceStrategySupport,ee as StatelessAttachedAttributeDirective,a as SubscriberSet,l as Updates,G as ViewBehaviorOrchestrator,ke as ViewTemplate,Ze as attr,he as bind,Je as booleanConverter,We as children,n as createMetadataLocator,i as createTypeRegistry,z as css,E as cssDirective,M as cssPartial,vt as customElement,He as elements,s as emptyArray,Ve as html,X as htmlDirective,k as lengthOf,de as listener,ue as normalizeBinding,Xe as nullableNumberConverter,u as observable,ce as oneTime,Ne as ref,Pe as repeat,Ue as slotted,f as volatile,Ee as when};
|
|
1
|
+
!function(){if("undefined"==typeof globalThis)if("undefined"!=typeof global)global.globalThis=global;else if("undefined"!=typeof self)self.globalThis=self;else if("undefined"!=typeof window)window.globalThis=window;else{const e=new Function("return this")();e.globalThis=e}}(),globalThis.trustedTypes||(globalThis.trustedTypes={createPolicy:(e,t)=>t});const e={configurable:!1,enumerable:!1,writable:!1};void 0===globalThis.FAST&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},e));const t=globalThis.FAST;if(void 0===t.getById){const s=Object.create(null);Reflect.defineProperty(t,"getById",Object.assign({value(e,t){let i=s[e];return void 0===i&&(i=t?s[e]=t():null),i}},e))}void 0===t.error&&Object.assign(t,{warn(){},error:e=>new Error(`Error ${e}`),addMessages(){}});const s=Object.freeze([]);function i(){const e=new Map;return Object.freeze({register:t=>!e.has(t.type)&&(e.set(t.type,t),!0),getByType:t=>e.get(t),getForInstance(t){if(null!=t)return e.get(t.constructor)}})}function n(){const e=new WeakMap;return function(t){let s=e.get(t);if(void 0===s){let i=Reflect.getPrototypeOf(t);for(;void 0===s&&null!==i;)s=e.get(i),i=Reflect.getPrototypeOf(i);s=void 0===s?[]:s.slice(0),e.set(t,s)}return s}}const r=e=>"function"==typeof e,o=e=>"string"==typeof e,l=()=>{},a=t.getById(1,(()=>{const e=[],t=[],s=globalThis.requestAnimationFrame;let i=!0;function n(){if(t.length)throw t.shift()}function r(s){try{s.call()}catch(s){if(!i)throw e.length=0,s;t.push(s),setTimeout(n,0)}}function o(){let t=0;for(;t<e.length;)if(r(e[t]),t++,t>1024){for(let s=0,i=e.length-t;s<i;s++)e[s]=e[s+t];e.length-=t,t=0}e.length=0}function l(t){e.push(t),e.length<2&&(i?s(o):o())}return Object.freeze({enqueue:l,next:()=>new Promise(l),process:o,setMode:e=>i=e})}));class h{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=e,this.sub1=t}has(e){return void 0===this.spillover?this.sub1===e||this.sub2===e:-1!==this.spillover.indexOf(e)}subscribe(e){const t=this.spillover;if(void 0===t){if(this.has(e))return;if(void 0===this.sub1)return void(this.sub1=e);if(void 0===this.sub2)return void(this.sub2=e);this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else{-1===t.indexOf(e)&&t.push(e)}}unsubscribe(e){const t=this.spillover;if(void 0===t)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const s=t.indexOf(e);-1!==s&&t.splice(s,1)}}notify(e){const t=this.spillover,s=this.subject;if(void 0===t){const t=this.sub1,i=this.sub2;void 0!==t&&t.handleChange(s,e),void 0!==i&&i.handleChange(s,e)}else for(let i=0,n=t.length;i<n;++i)t[i].handleChange(s,e)}}class c{constructor(e){this.subscribers={},this.subjectSubscribers=null,this.subject=e}notify(e){var t,s;null===(t=this.subscribers[e])||void 0===t||t.notify(e),null===(s=this.subjectSubscribers)||void 0===s||s.notify(e)}subscribe(e,t){var s,i;let n;n=t?null!==(s=this.subscribers[t])&&void 0!==s?s:this.subscribers[t]=new h(this.subject):null!==(i=this.subjectSubscribers)&&void 0!==i?i:this.subjectSubscribers=new h(this.subject),n.subscribe(e)}unsubscribe(e,t){var s,i;t?null===(s=this.subscribers[t])||void 0===s||s.unsubscribe(e):null===(i=this.subjectSubscribers)||void 0===i||i.unsubscribe(e)}}const d=Object.freeze({unknown:void 0,coupled:1}),u=t.getById(2,(()=>{const e=a.enqueue,s=/(:|&&|\|\||if)/,i=new WeakMap;let u,f=e=>{throw t.error(1101)};function p(e){var t;let s=null!==(t=e.$fastController)&&void 0!==t?t:i.get(e);return void 0===s&&(Array.isArray(e)?s=f(e):i.set(e,s=new c(e))),s}const g=n();class b{constructor(e){this.name=e,this.field=`_${e}`,this.callback=`${e}Changed`}getValue(e){return void 0!==u&&u.watch(e,this.name),e[this.field]}setValue(e,t){const s=this.field,i=e[s];if(i!==t){e[s]=t;const n=e[this.callback];r(n)&&n.call(e,i,t),p(e).notify(this.name)}}}class v extends h{constructor(e,t,s=!1){super(e,t),this.expression=e,this.isVolatileBinding=s,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0,this.toJSON=l}setMode(e){this.isAsync=this.needsQueue=e}bind(e){this.controller=e;const t=this.observe(e.source,e.context);return!e.isBound&&this.requiresUnbind(e)&&e.onUnbind(this),t}requiresUnbind(e){return e.sourceLifetime!==d.coupled||this.first!==this.last||this.first.propertySource!==e.source}unbind(e){this.dispose()}observe(e,t){this.needsRefresh&&null!==this.last&&this.dispose();const s=u;let i;u=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;try{i=this.expression(e,t)}finally{u=s}return i}disconnect(){this.dispose()}dispose(){if(null!==this.last){let e=this.first;for(;void 0!==e;)e.notifier.unsubscribe(this,e.propertyName),e=e.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(e,t){const s=this.last,i=p(e),n=null===s?this.first:{};if(n.propertySource=e,n.propertyName=t,n.notifier=i,i.subscribe(this,t),null!==s){if(!this.needsRefresh){let t;u=void 0,t=s.propertySource[s.propertyName],u=this,e===t&&(this.needsRefresh=!0)}s.next=n}this.last=n}handleChange(){this.needsQueue?(this.needsQueue=!1,e(this)):this.isAsync||this.call()}call(){null!==this.last&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let e=this.first;for(;void 0!==e;)yield e,e=e.next}}return Object.freeze({setArrayObserverFactory(e){f=e},getNotifier:p,track(e,t){u&&u.watch(e,t)},trackVolatile(){u&&(u.needsRefresh=!0)},notify(e,t){p(e).notify(t)},defineProperty(e,t){o(t)&&(t=new b(t)),g(e).push(t),Reflect.defineProperty(e,t.name,{enumerable:!0,get(){return t.getValue(this)},set(e){t.setValue(this,e)}})},getAccessors:g,binding(e,t,s=this.isVolatileBinding(e)){return new v(e,t,s)},isVolatileBinding:e=>s.test(e.toString())})}));function f(e,t){u.defineProperty(e,t)}function p(e,t,s){return Object.assign({},s,{get(){return u.trackVolatile(),s.get.apply(this)}})}const g=t.getById(3,(()=>{let e=null;return{get:()=>e,set(t){e=t}}})),b=Object.freeze({default:{index:0,length:0,get event(){return b.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent:()=>g.get(),setEvent(e){g.set(e)}});class v{constructor(e,t,s){this.index=e,this.removed=t,this.addedCount=s}adjustTo(e){let t=this.index;const s=e.length;return t>s?t=s-this.addedCount:t<0&&(t=s+this.removed.length+t-this.addedCount),this.index=t<0?0:t,this}}const y=Object.freeze({reset:1,splice:2,optimized:3}),m=new v(0,s,0);m.reset=!0;const w=[m];function C(e,t,i,n,r,o){let l=0,a=0;const h=Math.min(i-t,o-r);if(0===t&&0===r&&(l=function(e,t,s){for(let i=0;i<s;++i)if(e[i]!==t[i])return i;return s}(e,n,h)),i===e.length&&o===n.length&&(a=function(e,t,s){let i=e.length,n=t.length,r=0;for(;r<s&&e[--i]===t[--n];)r++;return r}(e,n,h-l)),r+=l,o-=a,(i-=a)-(t+=l)==0&&o-r==0)return s;if(t===i){const e=new v(t,[],0);for(;r<o;)e.removed.push(n[r++]);return[e]}if(r===o)return[new v(t,[],i-t)];const c=function(e){let t=e.length-1,s=e[0].length-1,i=e[t][s];const n=[];for(;t>0||s>0;){if(0===t){n.push(2),s--;continue}if(0===s){n.push(3),t--;continue}const r=e[t-1][s-1],o=e[t-1][s],l=e[t][s-1];let a;a=o<l?o<r?o:r:l<r?l:r,a===r?(r===i?n.push(0):(n.push(1),i=r),t--,s--):a===o?(n.push(3),t--,i=o):(n.push(2),s--,i=l)}return n.reverse()}(function(e,t,s,i,n,r){const o=r-n+1,l=s-t+1,a=new Array(o);let h,c;for(let e=0;e<o;++e)a[e]=new Array(l),a[e][0]=e;for(let e=0;e<l;++e)a[0][e]=e;for(let s=1;s<o;++s)for(let r=1;r<l;++r)e[t+r-1]===i[n+s-1]?a[s][r]=a[s-1][r-1]:(h=a[s-1][r]+1,c=a[s][r-1]+1,a[s][r]=h<c?h:c);return a}(e,t,i,n,r,o)),d=[];let u,f=t,p=r;for(let e=0;e<c.length;++e)switch(c[e]){case 0:void 0!==u&&(d.push(u),u=void 0),f++,p++;break;case 1:void 0===u&&(u=new v(f,[],0)),u.addedCount++,f++,u.removed.push(n[p]),p++;break;case 2:void 0===u&&(u=new v(f,[],0)),u.addedCount++,f++;break;case 3:void 0===u&&(u=new v(f,[],0)),u.removed.push(n[p]),p++}return void 0!==u&&d.push(u),d}function x(e,t){let s=!1,i=0;for(let a=0;a<t.length;a++){const h=t[a];if(h.index+=i,s)continue;const c=(n=e.index,r=e.index+e.removed.length,o=h.index,l=h.index+h.addedCount,r<o||l<n?-1:r===o||l===n?0:n<o?r<l?r-o:l-o:l<r?l-n:r-n);if(c>=0){t.splice(a,1),a--,i-=h.addedCount-h.removed.length,e.addedCount+=h.addedCount-c;const n=e.removed.length+h.removed.length-c;if(e.addedCount||n){let t=h.removed;if(e.index<h.index){const s=e.removed.slice(0,h.index-e.index);s.push(...t),t=s}if(e.index+e.removed.length>h.index+h.addedCount){const s=e.removed.slice(h.index+h.addedCount-e.index);t.push(...s)}e.removed=t,h.index<e.index&&(e.index=h.index)}else s=!0}else if(e.index<h.index){s=!0,t.splice(a,0,e),a++;const n=e.addedCount-e.removed.length;h.index+=n,i+=n}}var n,r,o,l;s||t.push(e)}let S=Object.freeze({support:y.optimized,normalize:(e,t,i)=>void 0===e?void 0===i?s:i.length>1?function(e,t){let s=[];const i=[];for(let e=0,s=t.length;e<s;e++)x(t[e],i);for(let t=0,n=i.length;t<n;++t){const n=i[t];1!==n.addedCount||1!==n.removed.length?s=s.concat(C(e,n.index,n.index+n.addedCount,n.removed,0,n.removed.length)):n.removed[0]!==e[n.index]&&s.push(n)}return s}(t,i):i:w,pop(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new v(e.length,[r],0)),r},push(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new v(e.length-i.length,[],i.length).adjustTo(e)),n},reverse(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},shift(e,t,s,i){const n=e.length>0,r=s.apply(e,i);return n&&t.addSplice(new v(0,[r],0)),r},sort(e,t,s,i){const n=s.apply(e,i);return t.reset(e),n},splice(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new v(+i[0],n,i.length>2?i.length-2:0).adjustTo(e)),n},unshift(e,t,s,i){const n=s.apply(e,i);return t.addSplice(new v(0,[],i.length).adjustTo(e)),n}});const T=Object.freeze({reset:w,setDefaultStrategy(e){S=e}});function O(e,t,s){Reflect.defineProperty(e,t,{value:s,enumerable:!1})}class B extends h{constructor(e){super(e),this.oldCollection=void 0,this.splices=void 0,this.needsQueue=!0,this._strategy=null,this._lengthObserver=void 0,this.call=this.flush,O(e,"$fastController",this)}get strategy(){return this._strategy}set strategy(e){this._strategy=e}get lengthObserver(){let e=this._lengthObserver;if(void 0===e){const t=this.subject;this._lengthObserver=e={length:t.length,handleChange(){this.length!==t.length&&(this.length=t.length,u.notify(e,"length"))}},this.subscribe(e)}return e}subscribe(e){this.flush(),super.subscribe(e)}addSplice(e){void 0===this.splices?this.splices=[e]:this.splices.push(e),this.enqueue()}reset(e){this.oldCollection=e,this.enqueue()}flush(){var e;const t=this.splices,s=this.oldCollection;void 0===t&&void 0===s||(this.needsQueue=!0,this.splices=void 0,this.oldCollection=void 0,this.notify((null!==(e=this._strategy)&&void 0!==e?e:S).normalize(s,this.subject,t)))}enqueue(){this.needsQueue&&(this.needsQueue=!1,a.enqueue(this))}}let A=!1;const k=Object.freeze({enable(){if(A)return;A=!0,u.setArrayObserverFactory((e=>new B(e)));const e=Array.prototype;e.$fastPatch||(O(e,"$fastPatch",1),[e.pop,e.push,e.reverse,e.shift,e.sort,e.splice,e.unshift].forEach((t=>{e[t.name]=function(...e){var s;const i=this.$fastController;return void 0===i?t.apply(this,e):(null!==(s=i.strategy)&&void 0!==s?s:S)[t.name](this,i,t,e)}})))}});function j(e){if(!e)return 0;let t=e.$fastController;return void 0===t&&(k.enable(),t=u.getNotifier(e)),u.track(t.lengthObserver,"length"),e.length}let $;function N(e){return e.map((e=>e instanceof V?N(e.styles):[e])).reduce(((e,t)=>e.concat(t)),[])}class V{constructor(e){this.styles=e,this.targets=new WeakSet,this._strategy=null,this.behaviors=e.map((e=>e instanceof V?e.behaviors:null)).reduce(((e,t)=>null===t?e:null===e?t:e.concat(t)),null)}get strategy(){return null===this._strategy&&this.withStrategy($),this._strategy}addStylesTo(e){this.strategy.addStylesTo(e),this.targets.add(e)}removeStylesFrom(e){this.strategy.removeStylesFrom(e),this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=null===this.behaviors?e:this.behaviors.concat(e),this}withStrategy(e){return this._strategy=new e(N(this.styles)),this}static setDefaultStrategy(e){$=e}static normalize(e){return void 0===e?void 0:Array.isArray(e)?new V(e):e instanceof V?e:new V([e])}}V.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const I=i(),E=Object.freeze({getForInstance:I.getForInstance,getByType:I.getByType,define:e=>(I.register({type:e}),e)});function L(){return function(e){E.define(e)}}function z(e,t){const s=[];let i="";const n=[],r=e=>{n.push(e)};for(let n=0,o=e.length-1;n<o;++n){i+=e[n];let o=t[n];void 0!==E.getForInstance(o)&&(o=o.createCSS(r)),o instanceof V||o instanceof CSSStyleSheet?(""!==i.trim()&&(s.push(i),i=""),s.push(o)):i+=o}return i+=e[e.length-1],""!==i.trim()&&s.push(i),{styles:s,behaviors:n}}const F=(e,...t)=>{const{styles:s,behaviors:i}=z(e,t),n=new V(s);return i.length?n.withBehaviors(...i):n};class M{constructor(e,t){this.behaviors=t,this.css="";const s=e.reduce(((e,t)=>(o(t)?this.css+=t:e.push(t),e)),[]);s.length&&(this.styles=new V(s))}createCSS(e){return this.behaviors.forEach(e),this.styles&&e(this),this.css}addedCallback(e){e.addStyles(this.styles)}removedCallback(e){e.removeStyles(this.styles)}}E.define(M);const _=F.partial=(e,...t)=>{const{styles:s,behaviors:i}=z(e,t);return new M(s,i)},P=Object.freeze({queueUpdate:a.enqueue,nextUpdate:a.next,processUpdates:a.process,setAttribute(e,t,s){null==s?e.removeAttribute(t):e.setAttribute(t,s)},setBooleanAttribute(e,t,s){s?e.setAttribute(t,""):e.removeAttribute(t)}}),R=`fast-${Math.random().toString(36).substring(2,8)}`,H=`${R}{`,q=`}${R}`,D=q.length;let U=0;const Q=()=>`${R}-${++U}`,J=Object.freeze({interpolation:e=>`${H}${e}${q}`,attribute:e=>`${Q()}="${H}${e}${q}"`,comment:e=>`\x3c!--${H}${e}${q}--\x3e`}),W=Object.freeze({parse(e,t){const s=e.split(H);if(1===s.length)return null;const i=[];for(let e=0,n=s.length;e<n;++e){const n=s[e],r=n.indexOf(q);let o;if(-1===r)o=n;else{const e=n.substring(0,r);i.push(t[e]),o=n.substring(r+D)}""!==o&&i.push(o)}return i}}),G=Object.freeze({create(e){const t=[],s={};let i=null,n=!1;return{source:e,context:b.default,targets:s,get isBound(){return n},addBehaviorFactory(e,t){const s=e.nodeId||(e.nodeId=Q());e.id||(e.id=Q()),this.addTarget(s,t),this.addBehavior(e.createBehavior())},addTarget(e,t){s[e]=t},addBehavior(e){t.push(e),n&&e.bind(this)},onUnbind(e){null===i&&(i=[]),i.push(e)},connectedCallback(e){n||(n=!0,t.forEach((e=>e.bind(this))))},disconnectedCallback(e){n&&(n=!1,null!==i&&i.forEach((e=>e.unbind(this))))}}}}),K=i(),X=Object.freeze({getForInstance:K.getForInstance,getByType:K.getByType,define:(e,t)=>((t=t||{}).type=e,K.register(t),e)});function Y(e){return function(t){X.define(t,e)}}class Z{constructor(e,t=!1){this.evaluate=e,this.isVolatile=t}}const ee=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6,assign(e,t){if(t)switch(e.sourceAspect=t,t[0]){case":":e.targetAspect=t.substring(1),e.aspectType="classList"===e.targetAspect?ee.tokenList:ee.property;break;case"?":e.targetAspect=t.substring(1),e.aspectType=ee.booleanAttribute;break;case"@":e.targetAspect=t.substring(1),e.aspectType=ee.event;break;default:e.targetAspect=t,e.aspectType=ee.attribute}else e.aspectType=ee.content}});class te{constructor(e){this.options=e,this.id=Q(),this.toJSON=l}createHTML(e){return J.attribute(e(this))}createBehavior(){return this}}const se=globalThis.TrustedHTML?e=>(s,i)=>{const n=e(s,i);if(n instanceof TrustedHTML)return n;throw t.error(1202)}:e=>e;class ie extends Z{createObserver(e,t){return u.binding(this.evaluate,t,this.isVolatile)}}class ne extends Z{constructor(){super(...arguments),this.toJSON=l}createObserver(){return this}bind(e){return this.evaluate(e.source,e.context)}}function re(e,t,s,i){if(null==s&&(s=""),s.create){e.textContent="";let t=e.$fastView;void 0===t?t=s.create():e.$fastTemplate!==s&&(t.isComposed&&(t.remove(),t.unbind()),t=s.create()),t.isComposed?t.needsBindOnly&&(t.needsBindOnly=!1,t.bind(i.source,i.context)):(t.isComposed=!0,t.bind(i.source,i.context),t.insertBefore(e),e.$fastView=t,e.$fastTemplate=s)}else{const t=e.$fastView;void 0!==t&&t.isComposed&&(t.isComposed=!1,t.remove(),t.needsBindOnly?t.needsBindOnly=!1:t.unbind()),e.textContent=s}}function oe(e,t,s){var i;const n=`${this.id}-t`,r=null!==(i=e[n])&&void 0!==i?i:e[n]={v:0,cv:Object.create(null)},o=r.cv;let l=r.v;const a=e[t];if(null!=s&&s.length){const e=s.split(/\s+/);for(let t=0,s=e.length;t<s;++t){const s=e[t];""!==s&&(o[s]=l,a.add(s))}}if(r.v=l+1,0!==l){l-=1;for(const e in o)o[e]===l&&a.remove(e)}}const le=(e,t,s)=>e[t]=s,ae=()=>{};class he{constructor(e){this.dataBinding=e,this.updateTarget=null,this.id=Q(),this.aspectType=ee.content,this.data=`${this.id}-d`}createHTML(e){return J.interpolation(e(this))}createBehavior(){if(null===this.updateTarget)switch("innerHTML"===this.targetAspect&&(this.dataBinding.evaluate=se(this.dataBinding.evaluate)),this.aspectType){case 1:this.updateTarget=P.setAttribute;break;case 2:this.updateTarget=P.setBooleanAttribute;break;case 3:this.updateTarget=le;break;case 4:this.updateTarget=re;break;case 5:this.updateTarget=oe;break;case 6:this.updateTarget=ae;break;default:throw t.error(1205)}return this}bind(e){var t;const s=e.targets[this.nodeId];switch(this.updateTarget){case ae:s[this.data]=e,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case re:e.onUnbind(this);default:const i=null!==(t=s[this.data])&&void 0!==t?t:s[this.data]=this.dataBinding.createObserver(this,this);i.target=s,i.controller=e,this.updateTarget(s,this.targetAspect,i.bind(e),e)}}unbind(e){const t=e.targets[this.nodeId].$fastView;void 0!==t&&t.isComposed&&(t.unbind(),t.needsBindOnly=!0)}handleEvent(e){const t=e.currentTarget[this.data];if(t.isBound){b.setEvent(e);const s=this.dataBinding.evaluate(t.source,t.context);b.setEvent(null),!0!==s&&e.preventDefault()}}handleChange(e,t){const s=t.target,i=t.controller;this.updateTarget(s,this.targetAspect,t.bind(i),i)}}function ce(e,t=u.isVolatileBinding(e)){return new ie(e,t)}function de(e){return new ne(e)}function ue(e,t){const s=new ie(e,!1);return s.options=t,s}function fe(e){return r(e)?ce(e):e instanceof Z?e:de((()=>e))}function pe(e,t){const s=e.parentNode;let i,n=e;for(;n!==t;)i=n.nextSibling,s.removeChild(n),n=i;s.removeChild(t)}X.define(he,{aspected:!0});class ge{constructor(e,t,s){this.fragment=e,this.factories=t,this.targets=s,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=d.unknown,this.context=this,this.index=0,this.length=0,this.toJSON=l,this.firstChild=e.firstChild,this.lastChild=e.lastChild}get event(){return b.getEvent()}get isEven(){return this.index%2==0}get isOdd(){return this.index%2!=0}get isFirst(){return 0===this.index}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const s=e.parentNode;let i,n=this.firstChild;for(;n!==t;)i=n.nextSibling,s.insertBefore(n,e),n=i;s.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let s,i=this.firstChild;for(;i!==t;)s=i.nextSibling,e.appendChild(i),i=s;e.appendChild(t)}dispose(){pe(this.firstChild,this.lastChild),this.unbind()}onUnbind(e){this.unbindables.push(e)}bind(e,t=this){if(this.source===e)return;let s=this.behaviors;if(null===s){this.source=e,this.context=t,this.behaviors=s=new Array(this.factories.length);const i=this.factories;for(let e=0,t=i.length;e<t;++e){const t=i[e].createBehavior();t.bind(this),s[e]=t}}else{null!==this.source&&this.evaluateUnbindables(),this.isBound=!1,this.source=e,this.context=t;for(let e=0,t=s.length;e<t;++e)s[e].bind(this)}this.isBound=!0}unbind(){this.isBound&&null!==this.source&&(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const e=this.unbindables;for(let t=0,s=e.length;t<s;++t)e[t].unbind(this);e.length=0}static disposeContiguousBatch(e){if(0!==e.length){pe(e[0].firstChild,e[e.length-1].lastChild);for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}}u.defineProperty(ge.prototype,"index"),u.defineProperty(ge.prototype,"length");const be=(e,t)=>`${e}.${t}`,ve={},ye={index:0,node:null};function me(e){e.startsWith("fast-")||t.warn(1204,{name:e})}const we=new Proxy(document.createElement("div"),{get(e,t){me(t);const s=Reflect.get(e,t);return r(s)?s.bind(e):s},set:(e,t,s)=>(me(t),Reflect.set(e,t,s))});class Ce{constructor(e,t){this.fragment=e,this.directives=t,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(e,t,s,i){this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(t,s,i)),e.nodeId=s,this.factories.push(e)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(e,t,s){const i=this.descriptors;if("r"===t||"h"===t||i[t])return;if(!i[e]){const t=e.lastIndexOf("."),s=e.substring(0,t),i=parseInt(e.substring(t+1));this.addTargetDescriptor(s,e,i)}let n=ve[t];if(!n){const i=`_${t}`;ve[t]=n={get(){var t;return null!==(t=this[i])&&void 0!==t?t:this[i]=this[e].childNodes[s]}}}i[t]=n}createView(e){const t=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=t,s.h=null!=e?e:we;for(const e of this.nodeIds)s[e];return new ge(t,this.factories,s)}}function xe(e,t,s,i,n,r=!1){const o=s.attributes,l=e.directives;for(let a=0,h=o.length;a<h;++a){const c=o[a],d=c.value,u=W.parse(d,l);let f=null;null===u?r&&(f=new he(de((()=>d))),ee.assign(f,c.name)):f=ke.aggregate(u),null!==f&&(s.removeAttributeNode(c),a--,h--,e.addFactory(f,t,i,n))}}function Se(e,t,s){let i=0,n=t.firstChild;for(;n;){const t=Te(e,s,n,i);n=t.node,i=t.index}}function Te(e,t,s,i){const n=be(t,i);switch(s.nodeType){case 1:xe(e,t,s,n,i),Se(e,s,n);break;case 3:return function(e,t,s,i,n){const r=W.parse(t.textContent,e.directives);if(null===r)return ye.node=t.nextSibling,ye.index=n+1,ye;let l,a=l=t;for(let t=0,h=r.length;t<h;++t){const h=r[t];0!==t&&(n++,i=be(s,n),l=a.parentNode.insertBefore(document.createTextNode(""),a.nextSibling)),o(h)?l.textContent=h:(l.textContent=" ",ee.assign(h),e.addFactory(h,s,i,n)),a=l}return ye.index=n+1,ye.node=a.nextSibling,ye}(e,s,t,n,i);case 8:const r=W.parse(s.data,e.directives);null!==r&&e.addFactory(ke.aggregate(r),t,n,i)}return ye.index=i+1,ye.node=s.nextSibling,ye}const Oe={createHTML:e=>e};let Be=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",Oe):Oe;const Ae=Be,ke={setHTMLPolicy(e){if(Be!==Ae)throw t.error(1201);Be=e},compile(e,t){let s;if(o(e)){s=document.createElement("TEMPLATE"),s.innerHTML=Be.createHTML(e);const t=s.content.firstElementChild;null!==t&&"TEMPLATE"===t.tagName&&(s=t)}else s=e;const i=document.adoptNode(s.content),n=new Ce(i,t);return xe(n,"",s,"h",0,!0),(function(e,t){return e&&8==e.nodeType&&null!==W.parse(e.data,t)}(i.firstChild,t)||1===i.childNodes.length&&Object.keys(t).length>0)&&i.insertBefore(document.createComment(""),i.firstChild),Se(n,i,"r"),ye.node=null,n.freeze()},setDefaultStrategy(e){this.compile=e},aggregate(e){if(1===e.length)return e[0];let t,s,i=!1;const n=e.length,r=e.map((e=>o(e)?()=>e:(t=e.sourceAspect||t,s=e.dataBinding||s,i=i||e.dataBinding.isVolatile,e.dataBinding.evaluate)));s.evaluate=(e,t)=>{let s="";for(let i=0;i<n;++i)s+=r[i](e,t);return s},s.isVolatile=i;const l=new he(s);return ee.assign(l,t),l}};class je{constructor(e,t){this.result=null,this.toJSON=l,this.html=e,this.factories=t}create(e){return null===this.result&&(this.result=ke.compile(this.html,this.factories)),this.result.createView(e)}render(e,t,s){const i=this.create(s);return i.bind(e),i.appendTo(t),i}}const $e=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function Ne(e,t,s){const i=$e.exec(t);return null!==i&&ee.assign(e,i[2]),e.createHTML(s)}function Ve(e,...t){let s="";const i=Object.create(null),n=e=>{var t;const s=null!==(t=e.id)&&void 0!==t?t:e.id=Q();return i[s]=e,s};for(let i=0,l=e.length-1;i<l;++i){const l=e[i],a=t[i];let h;if(s+=l,r(a))s+=Ne(new he(ce(a)),l,n);else if(o(a)){const e=$e.exec(l);if(null!==e){const t=new he(de((()=>a)));ee.assign(t,e[2]),s+=t.createHTML(n)}else s+=a}else a instanceof Z?s+=Ne(new he(a),l,n):void 0===(h=X.getForInstance(a))?s+=Ne(new he(de((()=>a))),l,n):h.aspected?s+=Ne(a,l,n):s+=a.createHTML(n)}return new je(s+e[e.length-1],i)}class Ie extends te{bind(e){e.source[this.options]=e.targets[this.nodeId]}}X.define(Ie);const Ee=e=>new Ie(e);function Le(e,t){const s=r(e)?e:()=>e,i=r(t)?t:()=>t;return(e,t)=>s(e,t)?i(e,t):null}const ze=Object.freeze({positioning:!1,recycle:!0});function Fe(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.bind(t[s])}function Me(e,t,s,i){e.context.parent=i.source,e.context.parentContext=i.context,e.context.length=t.length,e.context.index=s,e.bind(t[s])}class _e{constructor(e){this.directive=e,this.items=null,this.itemsObserver=null,this.bindView=Fe,this.views=[],this.itemsBindingObserver=e.dataBinding.createObserver(e,this),this.templateBindingObserver=e.templateBinding.createObserver(e,this),e.options.positioning&&(this.bindView=Me)}bind(e){this.location=e.targets[this.directive.nodeId],this.controller=e,this.items=this.itemsBindingObserver.bind(e),this.template=this.templateBindingObserver.bind(e),this.observeItems(!0),this.refreshAllViews(),e.onUnbind(this)}unbind(){null!==this.itemsObserver&&this.itemsObserver.unsubscribe(this),this.unbindAllViews()}handleChange(e,t){if(t===this.itemsBindingObserver)this.items=this.itemsBindingObserver.bind(this.controller),this.observeItems(),this.refreshAllViews();else if(t===this.templateBindingObserver)this.template=this.templateBindingObserver.bind(this.controller),this.refreshAllViews(!0);else{if(!t[0])return;t[0].reset?this.refreshAllViews():this.updateViews(t)}}observeItems(e=!1){if(!this.items)return void(this.items=s);const t=this.itemsObserver,i=this.itemsObserver=u.getNotifier(this.items),n=t!==i;n&&null!==t&&t.unsubscribe(this),(n||e)&&i.subscribe(this)}updateViews(e){const t=this.views,s=this.bindView,i=this.items,n=this.template,r=this.controller,o=this.directive.options.recycle,l=[];let a=0,h=0;for(let c=0,d=e.length;c<d;++c){const d=e[c],u=d.removed;let f=0,p=d.index;const g=p+d.addedCount,b=t.splice(d.index,u.length),v=h=l.length+b.length;for(;p<g;++p){const e=t[p],c=e?e.firstChild:this.location;let d;o&&h>0?(f<=v&&b.length>0?(d=b[f],f++):(d=l[a],a++),h--):d=n.create(),t.splice(p,0,d),s(d,i,p,r),d.insertBefore(c)}b[f]&&l.push(...b.slice(f))}for(let e=a,t=l.length;e<t;++e)l[e].dispose();if(this.directive.options.positioning)for(let e=0,s=t.length;e<s;++e){const i=t[e].context;i.length=s,i.index=e}}refreshAllViews(e=!1){const t=this.items,s=this.template,i=this.location,n=this.bindView,r=this.controller;let o=t.length,l=this.views,a=l.length;if(0!==o&&!e&&this.directive.options.recycle||(ge.disposeContiguousBatch(l),a=0),0===a){this.views=l=new Array(o);for(let e=0;e<o;++e){const o=s.create();n(o,t,e,r),l[e]=o,o.insertBefore(i)}}else{let e=0;for(;e<o;++e)if(e<a){n(l[e],t,e,r)}else{const o=s.create();n(o,t,e,r),l.push(o),o.insertBefore(i)}const h=l.splice(e,a-e);for(e=0,o=h.length;e<o;++e)h[e].dispose()}}unbindAllViews(){const e=this.views;for(let t=0,s=e.length;t<s;++t)e[t].unbind()}}class Pe{constructor(e,t,s){this.dataBinding=e,this.templateBinding=t,this.options=s,this.id=Q(),k.enable()}createHTML(e){return J.comment(e(this))}createBehavior(){return new _e(this)}}function Re(e,t,s=ze){const i=fe(e),n=fe(t);return new Pe(i,n,Object.assign(Object.assign({},ze),s))}X.define(Pe);const He=e=>1===e.nodeType,qe=e=>e?t=>1===t.nodeType&&t.matches(e):He;class De extends te{constructor(){super(...arguments),this.controllerProperty=`${this.id}-c`}bind(e){const t=e.targets[this.nodeId];t[this.controllerProperty]=e,this.updateTarget(e.source,this.computeNodes(t)),this.observe(t),e.onUnbind(this)}unbind(e){const t=e.targets[this.nodeId];this.updateTarget(e.source,s),this.disconnect(t),t[this.controllerProperty]=null}getSource(e){return e[this.controllerProperty].source}updateTarget(e,t){e[this.options.property]=t}computeNodes(e){let t=this.getNodes(e);return"filter"in this.options&&(t=t.filter(this.options.filter)),t}}class Ue extends De{observe(e){e.addEventListener("slotchange",this)}disconnect(e){e.removeEventListener("slotchange",this)}getNodes(e){return e.assignedNodes(this.options)}handleEvent(e){const t=e.currentTarget;this.updateTarget(this.getSource(t),this.computeNodes(t))}}function Qe(e){return o(e)&&(e={property:e}),new Ue(e)}X.define(Ue);class Je extends De{constructor(e){super(e),this.observerProperty=`${this.id}-o`,this.handleEvent=(e,t)=>{const s=t.target;this.updateTarget(this.getSource(s),this.computeNodes(s))},e.childList=!0}observe(e){let t=e[this.observerProperty];t||(t=new MutationObserver(this.handleEvent),t.toJSON=l,t.target=e,e[this.observerProperty]=t),t.observe(e,this.options)}disconnect(e){const t=e[this.observerProperty];t.target=null,t.disconnect()}getNodes(e){return"selector"in this.options?Array.from(e.querySelectorAll(this.options.selector)):Array.from(e.childNodes)}}function We(e){return o(e)&&(e={property:e}),new Je(e)}X.define(Je);const Ge=Object.freeze({locate:n()}),Ke={toView:e=>e?"true":"false",fromView:e=>null!=e&&"false"!==e&&!1!==e&&0!==e};function Xe(e){if(null==e)return null;const t=1*e;return isNaN(t)?null:t}const Ye={toView(e){const t=Xe(e);return t?t.toString():t},fromView:Xe};class Ze{constructor(e,t,s=t.toLowerCase(),i="reflect",n){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=s,this.mode=i,this.converter=n,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,"boolean"===i&&void 0===n&&(this.converter=Ke)}setValue(e,t){const s=e[this.fieldName],i=this.converter;void 0!==i&&(t=i.fromView(t)),s!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](s,t),e.$fastController.notify(this.name))}getValue(e){return u.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,s=this.guards;s.has(e)||"fromView"===t||a.enqueue((()=>{s.add(e);const i=e[this.fieldName];switch(t){case"reflect":const t=this.converter;P.setAttribute(e,this.attribute,void 0!==t?t.toView(i):i);break;case"boolean":P.setBooleanAttribute(e,this.attribute,i)}s.delete(e)}))}static collect(e,...t){const s=[];t.push(Ge.locate(e));for(let i=0,n=t.length;i<n;++i){const n=t[i];if(void 0!==n)for(let t=0,i=n.length;t<i;++t){const i=n[t];o(i)?s.push(new Ze(e,i)):s.push(new Ze(e,i.property,i.attribute,i.mode,i.converter))}}return s}}function et(e,t){let s;function i(e,t){arguments.length>1&&(s.property=t),Ge.locate(e.constructor).push(s)}return arguments.length>1?(s={},void i(e,t)):(s=void 0===e?{}:e,i)}const tt={mode:"open"},st={},it=new Set,nt=t.getById(4,(()=>i()));class rt{constructor(e,t=e.definition){var s;this.platformDefined=!1,o(t)&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template,this.registry=null!==(s=t.registry)&&void 0!==s?s:customElements;const i=e.prototype,n=Ze.collect(e,t.attributes),r=new Array(n.length),l={},a={};for(let e=0,t=n.length;e<t;++e){const t=n[e];r[e]=t.attribute,l[t.name]=t,a[t.attribute]=t,u.defineProperty(i,t)}Reflect.defineProperty(e,"observedAttributes",{value:r,enumerable:!0}),this.attributes=n,this.propertyLookup=l,this.attributeLookup=a,this.shadowOptions=void 0===t.shadowOptions?tt:null===t.shadowOptions?void 0:Object.assign(Object.assign({},tt),t.shadowOptions),this.elementOptions=void 0===t.elementOptions?st:Object.assign(Object.assign({},st),t.elementOptions),this.styles=V.normalize(t.styles),nt.register(this)}get isDefined(){return this.platformDefined}define(e=this.registry){const t=this.type;return e.get(this.name)||(this.platformDefined=!0,e.define(this.name,t,this.elementOptions)),this}static compose(e,t){return it.has(e)||nt.getByType(e)?new rt(class extends e{},t):new rt(e,t)}static registerBaseType(e){it.add(e)}}rt.getByType=nt.getByType,rt.getForInstance=nt.getForInstance;const ot={bubbles:!0,composed:!0,cancelable:!0},lt=new WeakMap;function at(e){var t,s;return null!==(s=null!==(t=e.shadowRoot)&&void 0!==t?t:lt.get(e))&&void 0!==s?s:null}let ht;class ct extends c{constructor(e,t){super(e),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this._mainStyles=null,this.$fastController=this,this.view=null,this.toJSON=l,this.source=e,this.definition=t;const s=t.shadowOptions;if(void 0!==s){let t=e.shadowRoot;t?this.hasExistingShadowRoot=!0:(t=e.attachShadow(s),"closed"===s.mode&<.set(e,t))}const i=u.getAccessors(e);if(i.length>0){const t=this.boundObservables=Object.create(null);for(let s=0,n=i.length;s<n;++s){const n=i[s].name,r=e[n];void 0!==r&&(delete e[n],t[n]=r)}}}get isConnected(){return u.track(this,"isConnected"),1===this.stage}get template(){var e;if(null===this._template){const t=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():t.template&&(this._template=null!==(e=t.template)&&void 0!==e?e:null)}return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get mainStyles(){var e;if(null===this._mainStyles){const t=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():t.styles&&(this._mainStyles=null!==(e=t.styles)&&void 0!==e?e:null)}return this._mainStyles}set mainStyles(e){this._mainStyles!==e&&(null!==this._mainStyles&&this.removeStyles(this._mainStyles),this._mainStyles=e,this.needsInitialization||this.addStyles(e))}addBehavior(e){var t,s;const i=null!==(t=this.behaviors)&&void 0!==t?t:this.behaviors=new Map,n=null!==(s=i.get(e))&&void 0!==s?s:0;0===n?(i.set(e,1),e.addedCallback&&e.addedCallback(this),!e.connectedCallback||this.guardBehaviorConnection||1!==this.stage&&0!==this.stage||e.connectedCallback(this)):i.set(e,n+1)}removeBehavior(e,t=!1){const s=this.behaviors;if(null===s)return;const i=s.get(e);void 0!==i&&(1===i||t?(s.delete(e),e.disconnectedCallback&&3!==this.stage&&e.disconnectedCallback(this),e.removedCallback&&e.removedCallback(this)):s.set(e,i-1))}addStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=at(s))&&void 0!==t?t:this.source).append(e)}else if(!e.isAttachedTo(s)){const t=e.behaviors;if(e.addStylesTo(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.addBehavior(t[e])}}removeStyles(e){var t;if(!e)return;const s=this.source;if(e instanceof HTMLElement){(null!==(t=at(s))&&void 0!==t?t:s).removeChild(e)}else if(e.isAttachedTo(s)){const t=e.behaviors;if(e.removeStylesFrom(s),null!==t)for(let e=0,s=t.length;e<s;++e)this.addBehavior(t[e])}}connect(){if(3!==this.stage)return;if(this.stage=0,null!==this.boundObservables){const e=this.source,t=this.boundObservables,s=Object.keys(t);for(let i=0,n=s.length;i<n;++i){const n=s[i];e[n]=t[n]}this.boundObservables=null}const e=this.behaviors;if(null!==e){this.guardBehaviorConnection=!0;for(const t of e.keys())t.connectedCallback&&t.connectedCallback(this);this.guardBehaviorConnection=!1}this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):null!==this.view&&this.view.bind(this.source),this.stage=1,u.notify(this,"isConnected")}disconnect(){if(1!==this.stage)return;this.stage=2,u.notify(this,"isConnected"),null!==this.view&&this.view.unbind();const e=this.behaviors;if(null!==e)for(const t of e.keys())t.disconnectedCallback&&t.disconnectedCallback(this);this.stage=3}onAttributeChangedCallback(e,t,s){const i=this.definition.attributeLookup[e];void 0!==i&&i.onAttributeChangedCallback(this.source,s)}emit(e,t,s){return 1===this.stage&&this.source.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},ot),s)))}renderTemplate(e){var t;const s=this.source,i=null!==(t=at(s))&&void 0!==t?t:s;if(null!==this.view)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let e=i.firstChild;null!==e;e=i.firstChild)i.removeChild(e)}e&&(this.view=e.render(s,i,s),this.view.sourceLifetime=d.coupled)}static forCustomElement(e){const s=e.$fastController;if(void 0!==s)return s;const i=rt.getForInstance(e);if(void 0===i)throw t.error(1401);return e.$fastController=new ht(e,i)}static setStrategy(e){ht=e}}function dt(e){var t;return"adoptedStyleSheets"in e?e:null!==(t=at(e))&&void 0!==t?t:e.getRootNode()}ct.setStrategy(ct);class ut{constructor(e){const t=ut.styleSheetCache;this.sheets=e.map((e=>{if(e instanceof CSSStyleSheet)return e;let s=t.get(e);return void 0===s&&(s=new CSSStyleSheet,s.replaceSync(e),t.set(e,s)),s}))}addStylesTo(e){const t=dt(e);t.adoptedStyleSheets=[...t.adoptedStyleSheets,...this.sheets]}removeStylesFrom(e){const t=dt(e),s=this.sheets;t.adoptedStyleSheets=t.adoptedStyleSheets.filter((e=>-1===s.indexOf(e)))}}ut.styleSheetCache=new Map;let ft=0;function pt(e){return e===document?document.body:e}function gt(e){const t=class extends e{constructor(){super(),ct.forCustomElement(this)}$emit(e,t,s){return this.$fastController.emit(e,t,s)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,t,s){this.$fastController.onAttributeChangedCallback(e,t,s)}};return rt.registerBaseType(t),t}function bt(e,t){return r(e)?rt.compose(e,t).define().type:rt.compose(this,e).define().type}V.setDefaultStrategy(V.supportsAdoptedStyleSheets?ut:class{constructor(e){this.styles=e,this.styleClass="fast-"+ ++ft}addStylesTo(e){e=pt(dt(e));const t=this.styles,s=this.styleClass;for(let i=0;i<t.length;i++){const n=document.createElement("style");n.innerHTML=t[i],n.className=s,e.append(n)}}removeStylesFrom(e){const t=(e=pt(dt(e))).querySelectorAll(`.${this.styleClass}`);t[0].parentNode;for(let s=0,i=t.length;s<i;++s)e.removeChild(t[s])}});const vt=Object.assign(gt(HTMLElement),{from:function(e){return gt(e)},define:bt,compose:function(e,t){return r(e)?rt.compose(e,t):rt.compose(this,e)}});function yt(e){return function(t){bt(t,e)}}export{k as ArrayObserver,ee as Aspect,Ge as AttributeConfiguration,Ze as AttributeDefinition,Z as Binding,E as CSSDirective,Je as ChildrenDirective,ke as Compiler,P as DOM,ct as ElementController,V as ElementStyles,b as ExecutionContext,t as FAST,vt as FASTElement,rt as FASTElementDefinition,he as HTMLBindingDirective,X as HTMLDirective,ge as HTMLView,J as Markup,De as NodeObservationDirective,u as Observable,W as Parser,c as PropertyChangeNotifier,Ie as RefDirective,_e as RepeatBehavior,Pe as RepeatDirective,Ue as SlottedDirective,d as SourceLifetime,v as Splice,T as SpliceStrategy,y as SpliceStrategySupport,te as StatelessAttachedAttributeDirective,h as SubscriberSet,a as Updates,G as ViewBehaviorOrchestrator,je as ViewTemplate,et as attr,ce as bind,Ke as booleanConverter,We as children,n as createMetadataLocator,i as createTypeRegistry,F as css,L as cssDirective,_ as cssPartial,yt as customElement,qe as elements,s as emptyArray,Ve as html,Y as htmlDirective,j as lengthOf,ue as listener,fe as normalizeBinding,Ye as nullableNumberConverter,f as observable,de as oneTime,Ee as ref,Re as repeat,Qe as slotted,p as volatile,Le as when};
|
|
@@ -783,6 +783,11 @@ export declare class ElementController<TElement extends HTMLElement = HTMLElemen
|
|
|
783
783
|
* Only emits events if connected.
|
|
784
784
|
*/
|
|
785
785
|
emit(type: string, detail?: any, options?: Omit<CustomEventInit, "detail">): void | boolean;
|
|
786
|
+
/**
|
|
787
|
+
* Opts out of JSON stringification.
|
|
788
|
+
* @internal
|
|
789
|
+
*/
|
|
790
|
+
toJSON: () => undefined;
|
|
786
791
|
private renderTemplate;
|
|
787
792
|
/**
|
|
788
793
|
* Locates or creates a controller for the specified element.
|
|
@@ -1585,6 +1590,11 @@ export declare class HTMLView<TSource = any, TParent = any> implements ElementVi
|
|
|
1585
1590
|
* Unbinds a view's behaviors from its binding source.
|
|
1586
1591
|
*/
|
|
1587
1592
|
unbind(): void;
|
|
1593
|
+
/**
|
|
1594
|
+
* Opts out of JSON stringification.
|
|
1595
|
+
* @internal
|
|
1596
|
+
*/
|
|
1597
|
+
toJSON: () => undefined;
|
|
1588
1598
|
private evaluateUnbindables;
|
|
1589
1599
|
/**
|
|
1590
1600
|
* Efficiently disposes of a contiguous range of synthetic view instances.
|
|
@@ -1686,7 +1696,7 @@ export declare interface NodeBehaviorOptions<T = any> {
|
|
|
1686
1696
|
* Internally used by the SlottedDirective and the ChildrenDirective.
|
|
1687
1697
|
*/
|
|
1688
1698
|
export declare abstract class NodeObservationDirective<T extends NodeBehaviorOptions> extends StatelessAttachedAttributeDirective<T> {
|
|
1689
|
-
private
|
|
1699
|
+
private controllerProperty;
|
|
1690
1700
|
/**
|
|
1691
1701
|
* Bind this behavior to the source.
|
|
1692
1702
|
* @param source - The source to bind to.
|
|
@@ -2354,6 +2364,11 @@ export declare abstract class StatelessAttachedAttributeDirective<TOptions> impl
|
|
|
2354
2364
|
* The structural id of the DOM node to which the created behavior will apply.
|
|
2355
2365
|
*/
|
|
2356
2366
|
nodeId: string;
|
|
2367
|
+
/**
|
|
2368
|
+
* Opts out of JSON stringification.
|
|
2369
|
+
* @internal
|
|
2370
|
+
*/
|
|
2371
|
+
toJSON: () => undefined;
|
|
2357
2372
|
/**
|
|
2358
2373
|
* Creates an instance of RefDirective.
|
|
2359
2374
|
* @param options - The options to use in configuring the directive.
|
|
@@ -2790,6 +2805,11 @@ export declare class ViewTemplate<TSource = any, TParent = any> implements Eleme
|
|
|
2790
2805
|
* host that the template is being attached to.
|
|
2791
2806
|
*/
|
|
2792
2807
|
render(source: TSource, host: Node, hostBindingTarget?: Element): HTMLView<TSource, TParent>;
|
|
2808
|
+
/**
|
|
2809
|
+
* Opts out of JSON stringification.
|
|
2810
|
+
* @internal
|
|
2811
|
+
*/
|
|
2812
|
+
toJSON: () => undefined;
|
|
2793
2813
|
}
|
|
2794
2814
|
|
|
2795
2815
|
/**
|
package/docs/api-report.md
CHANGED
|
@@ -262,6 +262,8 @@ export class ElementController<TElement extends HTMLElement = HTMLElement> exten
|
|
|
262
262
|
readonly source: TElement;
|
|
263
263
|
get template(): ElementViewTemplate<TElement> | null;
|
|
264
264
|
set template(value: ElementViewTemplate<TElement> | null);
|
|
265
|
+
// @internal
|
|
266
|
+
toJSON: () => undefined;
|
|
265
267
|
readonly view: ElementView<TElement> | null;
|
|
266
268
|
}
|
|
267
269
|
|
|
@@ -518,6 +520,8 @@ export class HTMLView<TSource = any, TParent = any> implements ElementView<TSour
|
|
|
518
520
|
readonly sourceLifetime: SourceLifetime;
|
|
519
521
|
// (undocumented)
|
|
520
522
|
readonly targets: ViewBehaviorTargets;
|
|
523
|
+
// @internal
|
|
524
|
+
toJSON: () => undefined;
|
|
521
525
|
unbind(): void;
|
|
522
526
|
}
|
|
523
527
|
|
|
@@ -758,6 +762,8 @@ export abstract class StatelessAttachedAttributeDirective<TOptions> implements H
|
|
|
758
762
|
nodeId: string;
|
|
759
763
|
// (undocumented)
|
|
760
764
|
protected options: TOptions;
|
|
765
|
+
// @internal
|
|
766
|
+
toJSON: () => undefined;
|
|
761
767
|
}
|
|
762
768
|
|
|
763
769
|
// @public
|
|
@@ -908,6 +914,8 @@ export class ViewTemplate<TSource = any, TParent = any> implements ElementViewTe
|
|
|
908
914
|
readonly factories: Record<string, ViewBehaviorFactory>;
|
|
909
915
|
readonly html: string | HTMLTemplateElement;
|
|
910
916
|
render(source: TSource, host: Node, hostBindingTarget?: Element): HTMLView<TSource, TParent>;
|
|
917
|
+
// @internal
|
|
918
|
+
toJSON: () => undefined;
|
|
911
919
|
}
|
|
912
920
|
|
|
913
921
|
// @public
|