j-templates 6.0.35 → 6.0.36
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/Store/Tree/observableScope.d.ts +2 -2
- package/Store/Tree/observableScope.js +3 -3
- package/Utils/emitter.d.ts +1 -3
- package/Utils/emitter.js +4 -5
- package/jTemplates.js +1 -1
- package/jTemplates.js.map +1 -1
- package/package.json +1 -1
|
@@ -34,17 +34,17 @@ export interface IObservableScope<T> extends IDestroyable {
|
|
|
34
34
|
getFunction: {
|
|
35
35
|
(): T;
|
|
36
36
|
};
|
|
37
|
+
setCallback: EmitterCallback;
|
|
37
38
|
async: boolean;
|
|
38
39
|
value: T;
|
|
39
40
|
promise: Promise<T> | null;
|
|
40
41
|
dirty: boolean;
|
|
41
42
|
emitter: Emitter;
|
|
42
43
|
emitters: (Emitter | null)[];
|
|
43
|
-
|
|
44
|
+
calcFunctions: ICalcFunction<any>[] | null;
|
|
44
45
|
destroyed: boolean;
|
|
45
46
|
watchEmitters: Emitter[] | null;
|
|
46
47
|
watchEmittersSet: Set<Emitter> | null;
|
|
47
|
-
calcFunctions: ICalcFunction<any>[] | null;
|
|
48
48
|
}
|
|
49
49
|
export declare function CalcScope<T>(callback: () => T): T;
|
|
50
50
|
export declare namespace ObservableScope {
|
|
@@ -81,10 +81,10 @@ function CalcScope(callback) {
|
|
|
81
81
|
dirty: true,
|
|
82
82
|
emitter: emitter_1.Emitter.Create(),
|
|
83
83
|
emitters: [],
|
|
84
|
+
calcFunctions: null,
|
|
84
85
|
destroyed: false,
|
|
85
86
|
watchEmitters: null,
|
|
86
87
|
watchEmittersSet: null,
|
|
87
|
-
calcFunctions: null,
|
|
88
88
|
setCallback: function () {
|
|
89
89
|
return OnSet(scope);
|
|
90
90
|
},
|
|
@@ -97,8 +97,8 @@ function CalcScope(callback) {
|
|
|
97
97
|
return;
|
|
98
98
|
watchingScope.watchEmitters ??= [];
|
|
99
99
|
if (watchingScope.watchEmitters.length === 10)
|
|
100
|
-
watchingScope.watchEmittersSet
|
|
101
|
-
if (
|
|
100
|
+
watchingScope.watchEmittersSet ??= new Set(watchingScope.watchEmitters);
|
|
101
|
+
if (watchingScope.watchEmittersSet === null ? !watchingScope.watchEmitters.includes(emitter) : !watchingScope.watchEmittersSet.has(emitter)) {
|
|
102
102
|
watchingScope.watchEmittersSet?.add(emitter);
|
|
103
103
|
watchingScope.watchEmitters.push(emitter);
|
|
104
104
|
}
|
package/Utils/emitter.d.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export type EmitterCallback<T extends readonly any[] = any[]> = (...args: T) => boolean | void;
|
|
2
|
-
export type Emitter =
|
|
3
|
-
_id: number;
|
|
4
|
-
};
|
|
2
|
+
export type Emitter = [number, ...EmitterCallback[]];
|
|
5
3
|
export declare namespace Emitter {
|
|
6
4
|
function Create(): Emitter;
|
|
7
5
|
function On(emitter: Emitter, callback: EmitterCallback): void;
|
package/Utils/emitter.js
CHANGED
|
@@ -6,8 +6,7 @@ var Emitter;
|
|
|
6
6
|
(function (Emitter) {
|
|
7
7
|
let globalId = 0;
|
|
8
8
|
function Create() {
|
|
9
|
-
const emitter = [];
|
|
10
|
-
emitter._id = globalId++;
|
|
9
|
+
const emitter = [++globalId];
|
|
11
10
|
return emitter;
|
|
12
11
|
}
|
|
13
12
|
Emitter.Create = Create;
|
|
@@ -17,7 +16,7 @@ var Emitter;
|
|
|
17
16
|
Emitter.On = On;
|
|
18
17
|
function Emit(emitter, ...args) {
|
|
19
18
|
let removed = false;
|
|
20
|
-
for (let x =
|
|
19
|
+
for (let x = 1; x < emitter.length; x++) {
|
|
21
20
|
if (emitter[x] === null || emitter[x](...args) === true) {
|
|
22
21
|
removed = true;
|
|
23
22
|
emitter[x] = null;
|
|
@@ -29,7 +28,7 @@ var Emitter;
|
|
|
29
28
|
Emitter.Emit = Emit;
|
|
30
29
|
function Remove(emitter, callback) {
|
|
31
30
|
const index = emitter.indexOf(callback);
|
|
32
|
-
if (index >=
|
|
31
|
+
if (index >= 1)
|
|
33
32
|
emitter[index] = null;
|
|
34
33
|
}
|
|
35
34
|
Emitter.Remove = Remove;
|
|
@@ -42,6 +41,6 @@ var Emitter;
|
|
|
42
41
|
}
|
|
43
42
|
Emitter.Sort = Sort;
|
|
44
43
|
function Compare(a, b) {
|
|
45
|
-
return a
|
|
44
|
+
return a[0] - b[0];
|
|
46
45
|
}
|
|
47
46
|
})(Emitter || (exports.Emitter = Emitter = {}));
|
package/jTemplates.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var __webpack_modules__={390:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAssignment=function(e,t){let n,o;return function(r){if(r===n)return;n=r,o??={};const i=r&&Object.keys(r);for(let n=0;i&&n<i.length;n++){const r=i[n];o[r]??=t(e,r)}const s=Object.keys(o);for(let e=0;e<s.length;e++)o[s[e]](r)}}},642:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateEventAssignment=function(e,t){let n;return function(o){const r=o&&o[t];r!==n&&(n&&e.removeEventListener(t,n),r&&e.addEventListener(t,r),n=r)}}},543:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateNodeValueAssignment=function(e){let t=e.nodeValue;return function(n){n!==t&&(e.nodeValue=n,t=n)}},t.CreatePropertyAssignment=function(e){const t=[["",null,null]];function n(n,o,r){r>=t.length||t[r][0]!==n?(t[r]=[n,o,u(n)],t[r][2](e,o)):t[r][1]!==o&&(t[r][1]=o,t[r][2](e,o))}return function(o){if(null===o){for(let n=0;n<t.length;n++)t[n][2](e,null);return void(t.length>0&&t.splice(0))}const i=r(o,n);i<t.length&&t.splice(i)}};const o=n(874);function r(e,t,n=0,i=""){const s=Object.keys(e);for(let c=0;c<s.length;c++){const u=e[s[c]];"object"===(0,o.JsonType)(u)?n=r(u,t,n,`${i}${s[c]}.`):(t(`${i}${s[c]}`,u,n),n++)}return n}function i(e,t){e.nodeValue=t}function s(e,t){e.value=t}function c(e,t){e.className=t}function u(e){switch(e){case"nodeValue":return i;case"value":return s;case"className":return c;default:return new Function("t","v",`t.${e} = v;`)}}},641:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DOMNodeConfig=void 0;const o=n(819),r=n(496),i=n(543),s=n(642),c=n(390),u=n(543);let a=r.List.Create(),l=!1;function d(){let e;for(r.List.Add(a,null);e=r.List.Pop(a);)e();0===a.size?l=!1:o.wndw.requestAnimationFrame(d)}t.DOMNodeConfig={createNode:(e,t)=>t?o.wndw.document.createElementNS(t,e):o.wndw.document.createElement(e),createTextNode:(e="")=>o.wndw.document.createTextNode(e),scheduleUpdate(e){r.List.Add(a,e),l||(l=!0,o.wndw.requestAnimationFrame(d))},addListener(e,t,n){e.addEventListener(t,n)},removeListener(e,t,n){e.removeEventListener(t,n)},addChild(e,t){e.appendChild(t)},addChildFirst(e,n){t.DOMNodeConfig.addChildBefore(e,e.firstChild,n)},addChildBefore(e,n,o){n?o!==n&&e.insertBefore(o,n):t.DOMNodeConfig.addChild(e,o)},addChildAfter(e,n,o){n?t.DOMNodeConfig.addChildBefore(e,n.nextSibling,o):t.DOMNodeConfig.addChildFirst(e,o)},removeChild(e,t){e.removeChild(t)},remove(e){e&&e.parentNode&&e.parentNode.removeChild(e)},createTextAssignment:e=>(0,i.CreateNodeValueAssignment)(e),setText(e,t){e.nodeValue=t},getAttribute:(e,t)=>e.getAttribute(t),setAttribute(e,t,n){e.setAttribute(t,n)},createPropertyAssignment:e=>(0,u.CreatePropertyAssignment)(e),createEventAssignment:e=>(0,c.CreateAssignment)(e,s.CreateEventAssignment),fireEvent(e,t,n){var o=new CustomEvent(t,n);e.dispatchEvent(o)},getFirstChild:e=>e.firstChild,getLastChild:e=>e.lastChild,getNextSibling:e=>e.nextSibling,replaceChildren(e,t){e.replaceChildren(...t)}}},774:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.div=function(e,t){return o.ElementNode.Create("div",null,e,t)},t.a=function(e,t){return o.ElementNode.Create("a",null,e,t)},t.ul=function(e,t){return o.ElementNode.Create("ul",null,e,t)},t.li=function(e,t){return o.ElementNode.Create("li",null,e,t)},t.br=function(e){return o.ElementNode.Create("br",null,e,null)},t.b=function(e,t){return o.ElementNode.Create("b",null,e,t)},t.span=function(e,t){return o.ElementNode.Create("span",null,e,t)},t.img=function(e){return o.ElementNode.Create("img",null,e,null)},t.video=function(e,t){return o.ElementNode.Create("video",null,e,t)},t.source=function(e){return o.ElementNode.Create("source",null,e,null)},t.input=function(e){return o.ElementNode.Create("input",null,e,null)},t.textarea=function(e){return o.ElementNode.Create("textarea",null,e,null)},t.select=function(e,t){return o.ElementNode.Create("select",null,e,t)},t.option=function(e,t){return o.ElementNode.Create("option",null,e,t)},t.h1=function(e,t){return o.ElementNode.Create("h1",null,e,t)},t.h2=function(e,t){return o.ElementNode.Create("h2",null,e,t)},t.h3=function(e,t){return o.ElementNode.Create("h3",null,e,t)},t.p=function(e,t){return o.ElementNode.Create("p",null,e,t)},t.style=function(e,t){return o.ElementNode.Create("style",null,e,t)},t.button=function(e,t){return o.ElementNode.Create("button",null,e,t)},t.table=function(e,t){return o.ElementNode.Create("table",null,e,t)},t.tbody=function(e,t){return o.ElementNode.Create("tbody",null,e,t)},t.th=function(e,t){return o.ElementNode.Create("th",null,e,t)},t.tr=function(e,t){return o.ElementNode.Create("tr",null,e,t)},t.td=function(e,t){return o.ElementNode.Create("td",null,e,t)};const o=n(413)},147:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(774),t),r(n(716),t),r(n(543),t),r(n(642),t)},716:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.svg=function(e,t){return o.ElementNode.Create("svg",r,e,t)},t.g=function(e,t){return o.ElementNode.Create("g",r,e,t)},t.circle=function(e,t){return o.ElementNode.Create("circle",r,e,t)};const o=n(413),r="http://www.w3.org/2000/svg"},819:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.wndw=void 0,t.wndw="undefined"!=typeof window?window:function(){try{return Object(function(){var e=new Error("Cannot find module 'jsdom'");throw e.code="MODULE_NOT_FOUND",e}())("").window}catch(e){return}}()},173:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BoundNode=void 0;const o=n(267),r=n(948);var i;function s(e,t){if(t)for(var n in t)o.NodeConfig.getAttribute(e.node,n)!==t[n]&&o.NodeConfig.setAttribute(e.node,n,t[n])}!function(e){function t(e,t){const n=Object.keys(t),o={};for(let r=0;r<n.length;r++){const i=n[r],s=t[i];o[i]=function(...t){if(!e.destroyed)return s(...t)}}return o}e.Init=function(e){const n=e.nodeDef;if(n.props)if(e.assignProperties=o.NodeConfig.createPropertyAssignment(e.node),"function"==typeof n.props){const t=r.ObservableScope.Create(n.props);e.scopes??=[],e.scopes.push(t),r.ObservableScope.Watch(t,(function(t){!function(e,t){e.setProperties||(e.setProperties=!0,o.NodeConfig.scheduleUpdate((function(){if(e.setProperties=!1,e.destroyed)return;const n=r.ObservableScope.Value(t);e.assignProperties(n||null)})))}(e,t)}));const i=r.ObservableScope.Value(t);e.assignProperties(i)}else e.assignProperties(n.props),e.assignProperties=null;if(n.attrs)if("function"==typeof n.attrs){const t=r.ObservableScope.Create(n.attrs);e.scopes??=[],e.scopes.push(t),r.ObservableScope.Watch(t,(function(t){!function(e,t){e.setAttributes||(e.setAttributes=!0,o.NodeConfig.scheduleUpdate((function(){e.setAttributes=!1,e.destroyed||s(e,r.ObservableScope.Value(t))})))}(e,t)})),s(e,r.ObservableScope.Value(t))}else s(e,n.attrs);if(n.on)if(e.assignEvents=o.NodeConfig.createEventAssignment(e.node),"function"==typeof n.on){const i=r.ObservableScope.Create(n.on),s=r.ObservableScope.Create((function(){const n=r.ObservableScope.Value(i);return t(e,n)}));e.scopes??=[],e.scopes.push(i,s),r.ObservableScope.Watch(s,(function(t){!function(e,t){e.setEvents||(e.setEvents=!0,o.NodeConfig.scheduleUpdate((function(){if(e.setEvents=!1,e.destroyed)return;const n=r.ObservableScope.Value(t);e.assignEvents(n)})))}(e,t)}));const c=r.ObservableScope.Value(s);e.assignEvents(c)}else e.assignEvents(t(e,n.on)),e.assignEvents=null;if(n.text)if(e.assignText=o.NodeConfig.createTextAssignment(e.node),"function"==typeof n.text){const t=r.ObservableScope.Create(n.text);e.scopes??=[],e.scopes.push(t),r.ObservableScope.Watch(t,(function(t){!function(e,t){e.setText||(e.setText=!0,o.NodeConfig.scheduleUpdate((function(){if(e.setText=!1,e.destroyed)return;const n=r.ObservableScope.Value(t);e.assignText(n)})))}(e,t)}));const i=r.ObservableScope.Value(t);e.assignText(i)}else e.assignText(n.text),e.assignText=null}}(i||(t.BoundNode=i={}))},342:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const o=n(64),r=n(230),i=n(334),s=n(948);class c{get Injector(){return this.nodeRef.injector}get Destroyed(){return this.nodeRef.destroyed}get Scope(){return this.scope}get Data(){return this.scope.Value}get NodeRef(){return this.nodeRef}get Templates(){return this.templates}constructor(e,t,n,o){this.nodeRef=n,this.componentEvents=o,this.scope="function"==typeof e?new s.ObservableScope(e):new s.ObservableScope((()=>e)),this.templates=t||{}}Template(){return[]}Bound(){}Fire(e,t){var n=this.componentEvents&&this.componentEvents[e];n&&n(t)}Destroy(){this.scope.Destroy(),i.Destroy.All(this)}}t.Component=c,function(e){function t(e,t,n){return r.ComponentNode.ToFunction(e,t,n)}function n(e,t){o.NodeRef.Init(t);var n=o.NodeRef.Wrap(e);o.NodeRef.AddChild(n,t)}e.ToFunction=t,e.Register=function(e,o){const r=t(`${e}-component`,void 0,o);class i extends HTMLElement{constructor(){super(),n(this.attachShadow({mode:"open"}),r({}))}}customElements.define(e,i)},e.Attach=n}(c||(t.Component=c={}))},230:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentNode=void 0;const o=n(173),r=n(64),i=n(267),s=n(342),c=n(880),u=n(334),a=n(224),l=n(496);var d;function f(e){const t=e.component.Template();return Array.isArray(t)?t:[t]}function h(e,t){(0,a.Thread)((function(){if(e.destroyed)return;const n=c.Injector.Scope(e.injector,f,e);(0,a.Schedule)((function(){r.NodeRef.InitAll(e,n)})),(0,a.Thread)((function(){if(e.destroyed)return;const o=l.List.Create();l.List.Add(o,{value:void 0,init:!0,nodes:n}),t?(r.NodeRef.ReconcileChildren(e,o),l.List.Clear(o)):i.NodeConfig.scheduleUpdate((function(){e.destroyed||(r.NodeRef.ReconcileChildren(e,o),l.List.Clear(o))}))})),e.component.Bound!==s.Component.prototype.Bound&&(0,a.After)((function(){i.NodeConfig.scheduleUpdate((()=>setTimeout((()=>e.component.Bound()),0)))}))}))}!function(e){e.Fire=function(e,t){var n=this.componentEvents&&this.componentEvents[e];n&&n(t)},e.ToFunction=function(e,t,n){return function(o,i){return function(e,t,n,o,i){var s=r.NodeRef.Create(e,t,r.NodeRefType.ComponentNode);return s.nodeDef=n,s.constructor=o,s.templates=i,s}(e,t,o,n,i)}},e.Init=function(e){var t,n=e.nodeDef,s=n.on;n.on=null,e.component=new e.constructor(n.data,e.templates,e,s),t=e,u.PreReq.Has(t.component)?function(e){return new Promise((t=>{(0,a.Thread)((function(){const n=c.Injector.Scope(e.injector,u.PreReqTemplate.Get,e.component);(0,a.Schedule)((function(){e.destroyed||r.NodeRef.InitAll(e,n)})),(0,a.Thread)((function(){if(!e.destroyed){for(var o=0;o<n.length;o++)r.NodeRef.AddChild(e,n[o]);u.PreReq.All(e.component).then((function(){if(!e.destroyed){for(var o=0;o<n.length;o++)r.NodeRef.Destroy(n[o]);i.NodeConfig.scheduleUpdate((function(){if(!e.destroyed){for(var o=0;o<n.length;o++)r.NodeRef.DetachChild(e,n[o]);t()}}))}}))}}))}))}))}(t).then((function(){h(t,!1)})):h(t,!0),o.BoundNode.Init(e)}}(d||(t.ComponentNode=d={}))},413:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ElementNode=void 0;const o=n(948),r=n(880),i=n(496),s=n(224),c=n(173),u=n(267),a=n(64),l=[];var d;function f(e){return e.value}function h(e,t,n=!1){(0,s.Synch)((function(){!function(e,t){const n=i.List.Create(),o=e.nodeList,c=o&&i.List.ToNodeMap(o,f);for(let s=0;s<t.length;s++){let u=null;if(c){const e=c.get(t[s]);if(e){let t=e.length-1;for(;t>=0&&!u;t--)u=e[t],e[t]=null}}u?(i.List.RemoveNode(o,u),i.List.AddNode(n,u)):u=i.List.Add(n,{value:t[s],init:!1,nodes:r.Injector.Scope(e.injector,p,e.children,t[s])})}let u=n.head;for(;u;){const t=u.data;!t.init&&(0,s.Schedule)((function(){e.destroyed||0===n.size||(a.NodeRef.InitAll(e,t.nodes),t.init=!0)})),u=u.next}if(o){let t=o.head;for(;t;){const n=t.data;t=t.next;for(let t=0;t<n.nodes.length;t++)e.childNodes.delete(n.nodes[t]);a.NodeRef.DestroyAll(n.nodes)}i.List.Clear(o)}e.nodeList=n}(e,t);const o=e.nodeList,c=o.size;(0,s.Thread)((function(t){e.destroyed||(n||!t?a.NodeRef.ReconcileChildren(e,o):u.NodeConfig.scheduleUpdate((function(){e.destroyed||o.size!==c||a.NodeRef.ReconcileChildren(e,o)})))}))}))}function p(e,t){const n=e(t);if("string"==typeof n||!n){const n=a.NodeRef.Create("text",null,a.NodeRefType.BoundNode);return n.nodeDef={text:function(){return e(t)}},[n]}return Array.isArray(n)?n:[n]}!function(e){e.Create=function(e,t,n,o){var r=a.NodeRef.Create(e,t,a.NodeRefType.ElementNode);return r.nodeDef=n,Array.isArray(o)?r.childrenArray=o:void 0!==o&&(r.children=o),r},e.Init=function(e){const t=e.nodeDef;if(null!==e.childrenArray||null!==e.children&&!t.data)n=e,(0,s.Synch)((function(){const e=n.childrenArray||r.Injector.Scope(n.injector,p,n.children,!0);n.childrenArray=null,e.length>0&&((0,s.Schedule)((function(){n.destroyed||a.NodeRef.InitAll(n,e)})),(0,s.Thread)((function(){if(n.destroyed)return;const t=i.List.Create();i.List.Add(t,{value:null,init:!0,nodes:e}),a.NodeRef.ReconcileChildren(n,t),i.List.Clear(t)})))}));else if(null!==e.children){const n=o.ObservableScope.Create(t.data),r=o.ObservableScope.Create((function(){const e=o.ObservableScope.Value(n);return e?Array.isArray(e)?e:[e]:l}));e.childNodes=new Set,e.scopes??=[],e.scopes.push(n,r),o.ObservableScope.Watch(r,(function(){!function(e,t){e.setData||(e.setData=!0,u.NodeConfig.scheduleUpdate((function(){e.setData=!1,e.destroyed||h(e,o.ObservableScope.Value(t))})))}(e,r)})),h(e,o.ObservableScope.Value(r),!0)}var n;c.BoundNode.Init(e)}}(d||(t.ElementNode=d={}))},267:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeConfig=void 0;const o=n(641);t.NodeConfig=o.DOMNodeConfig},64:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRef=t.NodeRefType=void 0;const o=n(267),r=n(880),i=n(173),s=n(413),c=n(230),u=n(890);var a,l;!function(e){e[e.NodeRef=0]="NodeRef",e[e.BoundNode=1]="BoundNode",e[e.ElementNode=2]="ElementNode",e[e.ComponentNode=3]="ComponentNode"}(a||(t.NodeRefType=a={})),function(e){function t(e,t,n){switch(n){case a.NodeRef:return{node:null,nodeType:e,nodeNamespace:t,type:a.NodeRef,injector:r.Injector.Current()||new r.Injector,parent:null,childNodes:null,destroyed:!1};case a.BoundNode:return{node:null,nodeDef:null,nodeType:e,nodeNamespace:t,type:a.BoundNode,injector:r.Injector.Current()||new r.Injector,parent:null,childNodes:null,destroyed:!1,lastEvents:null,setProperties:!1,assignProperties:null,assignEvents:null,assignText:null,setAttributes:!1,setEvents:!1,setText:!1,scopes:null};case a.ElementNode:return{node:null,nodeDef:null,nodeType:e,nodeNamespace:t,type:a.ElementNode,injector:r.Injector.Current()||new r.Injector,parent:null,childNodes:null,destroyed:!1,lastEvents:null,setProperties:!1,assignProperties:null,assignEvents:null,assignText:null,setAttributes:!1,setEvents:!1,children:null,childrenArray:null,nodeList:null,setData:!1,setText:!1,scopes:null};case a.ComponentNode:return{node:null,nodeDef:null,nodeType:e,nodeNamespace:t,type:a.ComponentNode,injector:r.Injector.Current()||new r.Injector,parent:null,childNodes:null,destroyed:!1,setProperties:!1,assignProperties:null,assignEvents:null,setAttributes:!1,setEvents:!1,component:null,componentEvents:null,scopes:null}}}function n(e){if(!e.node)switch(e.node="text"===e.nodeType?o.NodeConfig.createTextNode():o.NodeConfig.createNode(e.nodeType,e.nodeNamespace),e.childNodes="text"!==e.nodeType?[]:null,e.type){case a.BoundNode:i.BoundNode.Init(e);break;case a.ElementNode:s.ElementNode.Init(e);break;case a.ComponentNode:c.ComponentNode.Init(e)}}function l(e,t){Array.isArray(e.childNodes)?e.childNodes.push(t):e.childNodes.add(t)}function d(e){if(!e.destroyed){if(e.destroyed=!0,Array.isArray(e.childNodes))for(let t=0;t<e.childNodes.length;t++)d(e.childNodes[t]);else e.childNodes?.forEach(d);switch(e.type){case a.ComponentNode:e.component?.Destroy();case a.BoundNode:e.assignEvents?.(null);case a.ElementNode:for(let t=0;e.scopes&&t<e.scopes.length;t++)u.ObservableScope.Destroy(e.scopes[t])}e.node=null}}e.Wrap=function(e){var n=t(null,null,a.NodeRef);return n.node=e,n.childNodes=new Set,n},e.Create=t,e.Init=n,e.InitAll=function(e,t){for(var o=0;o<t.length;o++)t[o].parent=e,l(e,t[o]),n(t[o])},e.AddChild=function(e,t){t.parent=e,l(e,t),o.NodeConfig.addChild(e.node,t.node)},e.AddChildAfter=function(e,t,n){if(t&&t.parent!==e)throw"currentChild is not valid";n.parent=e,l(e,n),o.NodeConfig.addChildAfter(e.node,t&&t.node,n.node)},e.ReconcileChildren=function(e,t){const n=e.node;if(0===t.size)return void o.NodeConfig.replaceChildren(n,[]);let r,i=!1,s=!1;for(let e=t.head;null!==e;e=e.next)for(let t=0;t<e.data.nodes.length;t++){const c=r?o.NodeConfig.getNextSibling(r):o.NodeConfig.getFirstChild(n),u=e.data.nodes[t].node;c!==u?(o.NodeConfig.addChildBefore(n,c,u),!s&&i&&c&&o.NodeConfig.removeChild(n,c),s=i,i=!0):(i=!1,s=!1),r=u}let c=o.NodeConfig.getLastChild(n);for(;r&&r!==c;)o.NodeConfig.removeChild(n,c),c=o.NodeConfig.getLastChild(n)},e.DetachChild=function(e,t){!Array.isArray(e.childNodes)&&e.childNodes.delete(t)&&(o.NodeConfig.removeChild(e.node,t.node),t.parent=null)},e.Destroy=d,e.DestroyAll=function(e){for(let t=0;t<e.length;t++)d(e[t])}}(l||(t.NodeRef=l={}))},377:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiffAsync=void 0;const o=n(521),r=n(547);t.DiffAsync=class{constructor(e){this.workerQueue=new o.WorkerQueue(r.DiffWorker.Create()),this.workerQueue.Push({method:"create",arguments:e?[e.toString()]:[]})}async DiffPath(e,t){return await this.workerQueue.Push({method:"diffpath",arguments:[e,t]})}async DiffBatch(e){return await this.workerQueue.Push({method:"diffbatch",arguments:[e]})}Destroy(){this.workerQueue.Destroy()}}},606:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiffSync=void 0;const o=n(874),r=(0,n(285).DiffTreeFactory)(o.JsonDiffFactory);t.DiffSync=class{constructor(e){this.diffTree=new r(e)}DiffPath(e,t){return this.diffTree.DiffPath(e,t)}DiffBatch(e){return this.diffTree.DiffBatch(e)}}},285:(__unused_webpack_module,exports)=>{function DiffTreeFactory(jsonDiffFactory,worker){const{JsonDiff,JsonType,JsonDeepClone}=jsonDiffFactory(),ctx=this;if(worker&&ctx){let diffTree=null;ctx.onmessage=function(event){const data=event.data;switch(data.method){case"create":{const keyFunc=data.arguments[0]?eval(data.arguments[0]):void 0;diffTree=new DiffTree(keyFunc),ctx.postMessage(null);break}case"diffpath":{const e=diffTree.DiffPath(data.arguments[0],data.arguments[1]);ctx.postMessage(e);break}case"diffbatch":{const e=diffTree.DiffBatch(data.arguments[0]);ctx.postMessage(e);break}case"getpath":{const e=diffTree.GetPath(data.arguments[0]);ctx.postMessage(e);break}}}}function FlattenValue(e,t,n){switch(JsonType(t)){case"array":const o=t;for(let t=0;t<o.length;t++)FlattenValue(e,o[t],n);break;case"object":const r=t,i=n(r);i&&(e[i]=r);const s=Object.keys(r);for(let t=0;t<s.length;t++)FlattenValue(e,r[s[t]],n)}return e}function GetPathValue(e,t){if(""===t)return e;const n=t.split(".");let o=e;for(let e=0;e<n.length;e++)o=o[n[e]];return o}function SetPathValue(e,t,n){if(0===t.length)return;let o=e,r=0;for(;r<t.length-1;r++)o=o[t[r]];o[t[r]]=n}function ResolveKeyPath(e,t,n){const o=t.split("."),r=new Array(o.length-1);let i=e;for(let e=0;e<o.length-1;e++)i=i[o[e]],r[e]=i;let s=r.length-1;for(;s>=0&&("object"!==JsonType(r[s])||!n(r[s]));s--);if(s>=0){const e=n(r[s]);return o.splice(0,s+1,e),o.join(".")}return t}function UpdateSource(e,t,n,o){const r=[];if(o){const i=ResolveKeyPath(e,t,o);if(i!==t){const t=UpdateSource(e,i,n,o);r.push(...t)}}const i=GetPathValue(e,t);if(JsonDiff(n,i,t,r),o){let t={};t=FlattenValue(t,n,o),t=JsonDeepClone(t);const i=Object.keys(t);for(let n=0;n<i.length;n++)JsonDiff(t[i[n]],e[i[n]],i[n],r)}const s=r.filter((e=>void 0!==e.value));for(let t=0;t<s.length;t++)SetPathValue(e,s[t].path,s[t].value);return r}class DiffTree{constructor(e){this.keyFunc=e,this.rootState={}}DiffBatch(e){return e.map((({path:e,value:t})=>this.DiffPath(e,t))).flat(1)}DiffPath(e,t){return UpdateSource(this.rootState,e,t,this.keyFunc)}GetPath(e){return GetPathValue(this.rootState,e)}}return DiffTree}Object.defineProperty(exports,"__esModule",{value:!0}),exports.DiffTreeFactory=DiffTreeFactory},547:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiffWorker=void 0;const o=n(874),r=n(285);var i;!function(e){let t=null,n=null;"undefined"!=typeof Worker&&(t=Worker,n=URL.createObjectURL(new Blob([`(${r.DiffTreeFactory}).call(this, (${o.JsonDiffFactory}), true)`]))),e.Create=function(){if(!t)throw"Worker is not available";return new t(n)}}(i||(t.DiffWorker=i={}))},521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerQueue=void 0;const o=n(496);t.WorkerQueue=class{constructor(e){this.worker=e,this.callbacks=o.List.Create(),this.worker.onerror=e=>{const t=o.List.Pop(this.callbacks);t&&t(null,e)},this.worker.onmessage=e=>{const t=o.List.Pop(this.callbacks);t&&t(e.data)}}Push(e){return new Promise(((t,n)=>{o.List.Add(this.callbacks,(function(e,o){o?n(o):t(e)})),this.worker.postMessage(e)}))}Destroy(){this.worker.terminate()}}},501:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Store=void 0;const o=n(318);t.Store=class{constructor(e){this.keyFunc=e,this.rootMap=new Map;const t=e&&(t=>{const n=e(t);if(void 0===n)return;const r=this.rootMap.get(n);if(void 0===r)throw`No root object found for key: ${n}`;return r[o.GET_OBSERVABLE_VALUE][n]});this.createNode=t?o.ObservableNode.CreateFactory(t):o.ObservableNode.Create}Get(e,t){let n=this.rootMap.get(e);return void 0===n&&(n=this.createNode({[e]:t}),this.rootMap.set(e,n)),n[e]}UpdateRootMap(e){for(let t=0;t<e.length;){const n=e[t].path[0],o=t;for(;t<e.length&&e[t].path[0]===n;)t++;const r=e.slice(o,t);this.UpdateRootObject(r[0].path[0],r)}}UpdateRootObject(e,t){const n=this.rootMap.get(e);if(void 0!==n)o.ObservableNode.ApplyDiff(n,t);else{if(t.length>1||t[0].path.length>1)throw`Unable to initialize root path ${e} with ${t.length} results and initial path ${t[0].path}`;const n=this.createNode({[e]:t[0].value});this.rootMap.set(e,n)}}}},161:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StoreAsync=void 0;const o=n(263),r=n(874),i=n(377),s=n(318),c=n(501);class u extends c.Store{constructor(e){super(e),this.queue=new o.AsyncQueue,this.diff=new i.DiffAsync(e)}async Write(e,t){await this.queue.Next((async()=>{if(!(t=t||this.keyFunc?.(e)))throw"No key provided for data";const n=await this.diff.DiffPath(t,e);this.UpdateRootMap(n)}))}async Patch(e,t){await this.queue.Next((async()=>{const n=this.Get(e);if(void 0===n)throw"Unable to patch undefined value";const o=n.toJSON(),i=(0,r.JsonMerge)(o,t),s=await this.diff.DiffPath(e,i);this.UpdateRootMap(s)}))}async Push(e,...t){await this.queue.Next((async()=>{const n=this.Get(e),o=t.map((function(t,o){return{path:`${e}.${n.length+o}`,value:t}})),r=await this.diff.DiffBatch(o);this.UpdateRootMap(r)}))}async Splice(e,t,n,...o){return await this.queue.Next((async()=>{const i=this.Get(e)[s.GET_OBSERVABLE_VALUE].slice(),c=(0,r.JsonDeepClone)(i.splice(t,n,...o)),u=await this.diff.DiffPath(e,i);return this.UpdateRootMap(u),c}))}Destroy(){this.queue.Stop(),this.diff.Destroy()}}t.StoreAsync=u},961:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StoreSync=void 0;const o=n(874),r=n(606),i=n(318),s=n(501);class c extends s.Store{constructor(e){super(e),this.diff=new r.DiffSync(e)}Write(e,t){if(!(t=t||this.keyFunc?.(e)))throw"No key provided for data";const n=this.diff.DiffPath(t,e);this.UpdateRootMap(n)}Patch(e,t){const n=this.Get(e);if(void 0===n)throw"Unable to patch undefined value";const r=n.toJSON(),i=(0,o.JsonMerge)(r,t),s=this.diff.DiffPath(e,i);this.UpdateRootMap(s)}Push(e,...t){const n=this.Get(e),o=t.map((function(t,o){return{path:`${e}.${n.length+o}`,value:t}})),r=this.diff.DiffBatch(o);this.UpdateRootMap(r)}Splice(e,t,n,...r){const s=this.Get(e)[i.GET_OBSERVABLE_VALUE].slice(),c=(0,o.JsonDeepClone)(s.splice(t,n,...r)),u=this.diff.DiffPath(e,s);return this.UpdateRootMap(u),c}}t.StoreSync=c},318:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableNode=t.GET_TO_JSON=t.GET_OBSERVABLE_VALUE=t.IS_OBSERVABLE_NODE=void 0;const o=n(874),r=n(130),i=n(948);t.IS_OBSERVABLE_NODE="____isObservableNode",t.GET_OBSERVABLE_VALUE="____getObservableValue",t.GET_TO_JSON="toJSON";const s=new WeakMap,c=new WeakMap,u=new WeakMap;function a(e,t){return{...Object.getOwnPropertyDescriptor(e,t),configurable:!0}}function l(e,t){return{...Object.getOwnPropertyDescriptor(e,t),configurable:!0}}function d(e,t){return Object.hasOwn(e,t)}function f(e,t){return Object.hasOwn(e,t)}function h(e){return Object.keys(e)}function p(e){return Object.keys(e)}function v(e,n=(0,r.JsonType)(e)){if("value"===n)return e;if(!0===e[t.IS_OBSERVABLE_NODE])return e[t.GET_OBSERVABLE_VALUE];switch(n){case"object":{const t=Object.keys(e);for(let n=0;n<t.length;n++)e[t[n]]=v(e[t[n]])}case"array":for(let t=0;t<e.length;t++)e[t]=v(e[t])}return e}function b(e){function n(e){return _(e=v(e))}const b=void 0!==e?function t(o){switch((0,r.JsonType)(o)){case"array":return n(o).map(t);case"object":{const r=e(o)??o,i=n(r),s=Object.keys(i),c={};for(let e=0;e<s.length;e++)c[s[e]]=t(r[s[e]]);return c}default:return o}}:function(e){return e},y=void 0!==e;function g(e){const t=new Proxy(e,{get:E,set:C,has:d,ownKeys:h,getOwnPropertyDescriptor:a});return u.set(e,{}),s.set(e,t),t}function m(e,n,o){if(y)throw"Object is readonly";if(n===t.IS_OBSERVABLE_NODE)throw`Cannot assign read-only property: ${t.IS_OBSERVABLE_NODE}`;o=v(o),e[n]=o;const r=c.get(e);return i.ObservableScope.Update(r),!0}function O(e,n){if(y)switch(n){case"push":case"unshift":case"splice":case"pop":case"shift":case"sort":case"reverse":if(y)throw"Object is readonly"}switch(n){case t.IS_OBSERVABLE_NODE:return!0;case t.GET_TO_JSON:return function(){return b(e)};case t.GET_OBSERVABLE_VALUE:return e;default:{const t=c.get(e),o=(e=i.ObservableScope.Value(t))[n];return"symbol"==typeof n?o:"function"==typeof o?function(...o){const r="slice"===n?e.slice(...o):e.slice();for(let e=0;e<r.length;e++)r[e]=_(r[e]);let s="slice"===n?r:r[n](...o);switch(n){case"push":case"unshift":case"splice":case"pop":case"shift":case"sort":case"reverse":e.length=r.length;for(let t=0;t<r.length;t++)e[t]=v(r[t]);i.ObservableScope.Update(t)}return s}:_(o)}}}function N(e,t,n){e[t]=n;const o=u.get(e);i.ObservableScope.Update(o&&o[t]||c.get(e))}function C(e,n,i){if(y)throw"Object is readonly";if(n===t.IS_OBSERVABLE_NODE)throw`Cannot assign read-only property: ${t.IS_OBSERVABLE_NODE}`;const s=(0,r.JsonType)(i);if("value"===s)i!==e[n]&&N(e,n,i);else{i=v(i,s);const t=(0,o.JsonDiff)(i,e[n]);for(let o=0;o<t.length;o++)if(0===t[o].path.length)N(e,n,t[o].value);else{const r=t[o].path;let i=e[n],s=0;for(;s<r.length-1;s++)i=i[r[s]];N(i,r[s],t[o].value)}}return!0}function E(e,n){switch(n){case t.IS_OBSERVABLE_NODE:return!0;case t.GET_TO_JSON:return function(){return b(e)};case t.GET_OBSERVABLE_VALUE:return e;default:return function(e,t){const n=u.get(e);return n[t]??=i.ObservableScope.Create((function(){return _(e[t])})),i.ObservableScope.Value(n[t])}(e,n)}}function _(t){switch((0,r.JsonType)(t)){case"object":{let n=s.get(t)??g(t);if(void 0!==e){const t=e(n);void 0!==t&&(n=s.get(t)??g(t))}return n}case"array":{const e=s.get(t)??function(e){const t=i.ObservableScope.Create((()=>e)),n=new Proxy(e,{get:O,set:m,has:f,ownKeys:p,getOwnPropertyDescriptor:l});return c.set(e,t),s.set(e,n),n}(t);return i.ObservableScope.Touch(c.get(t)),e}default:return t}}return n}const y=b();var g;!function(e){e.Create=function(e){return y(e)},e.Touch=function(e){const t=c.get(e);i.ObservableScope.Update(t)},e.ApplyDiff=function(n,o){const r=[["",n[t.GET_OBSERVABLE_VALUE]]];for(let t=0;t<o.length;t++){const{path:n,value:i}=o[t];let s=0;for(;s<n.length-1;s++){const e=n[s],t=r[s][1],o=s+1;if(r.length<=o)r.push([e,t[e]]);else if(r[o][0]!==e){r[o][0]=e,r[o][1]=t[e];const n=o+1;n<r.length&&(r[n][0]=null)}}const c=r[s][1];c[n[s]]=i,e.Touch(c)}},e.CreateFactory=function(e){return b(e)}}(g||(t.ObservableNode=g={}))},948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableScope=t.ObservableScopeWrapper=t.ObservableScopeValue=void 0,t.CalcScope=function(e){const t=e();return a&&(u.calcFunctions??=[],u.calcFunctions.push({getFunction:e,value:t})),t};const o=n(116),r=n(496);class i{get Value(){return c.Value(this.scope)}constructor(e){this.scope=e}}t.ObservableScopeValue=i;class s extends i{constructor(e){super(e),e.emitter&&(this.scopeEmitter=o.Emitter.Create(),o.Emitter.On(e.emitter,(()=>o.Emitter.Emit(this.scopeEmitter,this))))}Scope(e){return new c((()=>e(this.Value)))}Watch(e){this.scopeEmitter&&(o.Emitter.On(this.scopeEmitter,e),e(this))}Unwatch(e){this.scopeEmitter&&o.Emitter.Remove(this.scopeEmitter,e)}Destroy(){v(this.scope),this.scopeEmitter&&o.Emitter.Clear(this.scopeEmitter)}}t.ObservableScopeWrapper=s;class c extends s{constructor(e){super(c.Create(e))}}t.ObservableScope=c;let u=null,a=!1;function l(e){const t=e.promise;!function(e){if(!e.dirty)return;e.dirty=!1,e.watchEmitters=null,e.calcFunctions=null;const t=function(e){const t=u,n=a;u=e,a=!0;const o=e.getFunction();return u.watchEmittersSet=null,u=t,a=n,o}(e);e.async?e.promise=t.then((function(t){return e.value=t,t})):e.value=t,function(e){const t=e.watchEmitters;if(null===t){if(e.emitters.length>0){for(let t=0;t<e.emitters.length;t++)o.Emitter.Remove(e.emitters[t],e.setCallback);e.emitters=[]}return}o.Emitter.Sort(t);const n=e.emitters;let r=0,i=0;for(;r<n.length;r++){let s=i;for(;s<t.length&&n[r]!==t[s];s++)o.Emitter.On(t[i],e.setCallback);if(s===t.length)o.Emitter.Remove(n[r],e.setCallback);else{for(let n=i;n<s;n++)o.Emitter.On(t[n],e.setCallback);i=s+1}}for(;i<t.length;i++)o.Emitter.On(t[i],e.setCallback);e.emitters=t}(e)}(e),e.async&&t!==e.promise&&e.promise.then((function(){o.Emitter.Emit(e.emitter,e)}))}!function(e){function t(e){a&&(u.watchEmitters??=[],10===u.watchEmitters.length&&(u.watchEmittersSet=new Set(u.watchEmitters)),(null===u.watchEmittersSet&&!u.watchEmitters.includes(e)||null!==u.watchEmittersSet&&!u.watchEmittersSet.has(e))&&(u.watchEmittersSet?.add(e),u.watchEmitters.push(e)))}e.Create=function(e){const t={getFunction:e,value:null,promise:null,async:"AsyncFunction"===e[Symbol.toStringTag],dirty:!0,emitter:o.Emitter.Create(),emitters:[],destroyed:!1,watchEmitters:null,watchEmittersSet:null,calcFunctions:null,setCallback:function(){return p(t)}};return t},e.Register=t,e.Value=function(e){if(e)return t(e.emitter),l(e),e.value},e.Watching=function(){return a},e.Touch=function(e){e&&e.emitter&&t(e.emitter)},e.Watch=function(e,t){e&&e.emitter&&o.Emitter.On(e.emitter,t)},e.Unwatch=function(e,t){e&&e.emitter&&o.Emitter.Remove(e.emitter,t)},e.Update=function(e){p(e)},e.Destroy=function(e){v(e)}}(c||(t.ObservableScope=c={}));const d=r.List.Create();function f(){const e=r.List.Split(d,0);for(let t=e.head;null!==t;t=t.next)l(t.data);r.List.Clear(e)}function h(e){const t=e.getFunction(),n=e.value!==t;return e.value=t,n}function p(e){return!e||e.dirty||e.destroyed?e?.destroyed:(function(e){e.dirty=null===e.calcFunctions||e.calcFunctions.some(h),e.dirty&&(e.async?function(e){r.List.Add(d,e),1===d.size&&queueMicrotask(f)}(e):o.Emitter.Emit(e.emitter,e))}(e),!1)}function v(e){if(!e)return;const t=e.emitters;e.emitters=null,e.emitter=null,e.getFunction=null,e.setCallback=null,e.calcFunctions=null,e.destroyed=!0;for(let n=0;n<t.length;n++)o.Emitter.Remove(t[n],e.setCallback)}},890:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableNode=t.ObservableScope=t.StoreAsync=t.StoreSync=void 0;var o=n(961);Object.defineProperty(t,"StoreSync",{enumerable:!0,get:function(){return o.StoreSync}});var r=n(161);Object.defineProperty(t,"StoreAsync",{enumerable:!0,get:function(){return r.StoreAsync}});var i=n(948);Object.defineProperty(t,"ObservableScope",{enumerable:!0,get:function(){return i.ObservableScope}});var s=n(318);Object.defineProperty(t,"ObservableNode",{enumerable:!0,get:function(){return s.ObservableNode}})},20:(e,t)=>{var n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Animation=t.AnimationType=void 0,function(e){e.EaseIn=function*(e){for(var t=1/e,n=t,o=0;o<e;o++,n+=t)yield(1-n)*(1-n)*(1-n)*0+3*(1-n)*(1-n)*n*1+3*(1-n)*n*n*1+n*n*n*1},e.Linear=function*(e){for(var t=1/e,n=t,o=0;o<e;o++,n+=t)yield n}}(n||(n={})),function(e){e[e.Linear=0]="Linear",e[e.EaseIn=1]="EaseIn"}(o||(t.AnimationType=o={})),t.Animation=class{get Running(){return this.running}get Start(){return this.start}get End(){return this.end}get Enabled(){return this.enabled}constructor(e,t,n){this.running=!1,this.start=null,this.end=null,this.enabled=!0,this.type=e,this.frameCount=Math.ceil(t/1e3*60),this.frameTimings=[];for(var o=t/this.frameCount,r=0;r<this.frameCount;r++)this.frameTimings[r]=(r+1)*o;this.update=n,this.animationTimeouts=[]}Animate(e,t){if(this.enabled){var r=t-e;if(0!==r)return this.Cancel(),this.running=!0,this.start=e,this.end=t,new Promise((t=>{var i=n[o[this.type]],s=0;for(var c of i(this.frameCount)){var u=c*r+e;this.SetTimeout(s,u,s===this.frameCount-1?t:null),s++}})).then((()=>{this.running=!1,this.start=null,this.end=null}))}}Disable(){this.Cancel(),this.enabled=!1}Enable(){this.enabled=!0}Cancel(){for(var e=0;e<this.animationTimeouts.length;e++)clearTimeout(this.animationTimeouts[e]);this.running=!1,this.start=null,this.end=null}Destroy(){this.Cancel()}SetTimeout(e,t,n){this.animationTimeouts[e]=setTimeout((()=>{this.update(t),n&&n()}),this.frameTimings[e])}}},959:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveNulls=function(e,t=0){let n=t;for(;n<e.length&&null!==e[n];n++);let o=n+1;for(;o<e.length&&null===e[o];o++);for(;o<e.length;)for(e[n]=e[o],n++,o++;o<e.length&&null===e[o];o++);e.splice(n)},t.ArrayDiff=function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;let n=0;for(;n<e.length&&e[n]===t[n];n++);return n<e.length}},263:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncQueue=void 0;const o=n(496);t.AsyncQueue=class{constructor(){this.running=!1,this.queue=o.List.Create()}Next(e){const t=new Promise(((t,n)=>{o.List.Add(this.queue,(async function(){try{const n=await e();t(n)}catch(e){n(e)}}))}));return this.Start(),t}Stop(){o.List.Clear(this.queue)}Start(){this.running||(this.running=!0,this.ExecuteQueue())}async ExecuteQueue(){const e=o.List.Pop(this.queue);null!==e?(await e(),this.ExecuteQueue()):this.running=!1}}},334:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.State=function(){return d},t.Value=function(){return f},t.Scope=function(){return h},t.Inject=function(e){return p.bind(null,e)},t.Destroy=v,t.PreReqTemplate=y,t.PreReq=m;const o=n(948),r=n(318),i=new WeakMap,s=new WeakMap,c=new WeakMap;function u(e){const t=i.get(e)??{};return i.set(e,t),t}function a(e){const t=s.get(e)??{};return s.set(e,t),t}function l(e){const t=c.get(e)??[];return c.set(e,t),t}function d(e,t){return{configurable:!1,enumerable:!0,get:function(){const e=u(this);return e[t]??=r.ObservableNode.Create({root:void 0}),e[t].root},set:function(e){const n=u(this);void 0===n[t]?n[t]=r.ObservableNode.Create({root:e}):n[t].root=e}}}function f(e,t){return{configurable:!1,enumerable:!0,get:function(){const e=a(this),n=e[t]??=[null,void 0];return n[0]??=function(e){return o.ObservableScope.Create((function(){return e[1]}))}(n),o.ObservableScope.Value(n[0])},set:function(e){const n=a(this);n[t]??=[null,void 0];const r=n[t];r[1]=e,o.ObservableScope.Update(r[0])}}}function h(e,t,n){if(!n||!n.get)throw"Scope decorator requires a getter";if(n&&n.set)throw"Scope decorator does not support setters";const r=n.get;return{configurable:!1,enumerable:!0,get:function(){const e=a(this);e[t]??=[null,void 0];const n=e[t];return null===n[0]&&(n[0]=o.ObservableScope.Create(r.bind(this))),o.ObservableScope.Value(n[0])}}}function p(e,t,n,o){return{configurable:!1,enumerable:!0,get:function(){return this.Injector.Get(e)},set:function(t){this.Injector.Set(e,t)}}}function v(){return b}function b(e,t){l(e).push(t)}function y(e){return g.bind(null,e)}function g(e,t){t.prototype.PreReqTemplateDecorator_Template=e}function m(){return O}function O(e,t){var n=e;n.PreReqDecorator_PreReqs=n.PreReqDecorator_PreReqs||[],n.PreReqDecorator_PreReqs.push(t)}!function(e){e.All=function(e){const t=s.get(e);if(void 0!==t){const e=Object.keys(t);for(let n=0;n<e.length;n++)o.ObservableScope.Destroy(t[e[n]][0])}const n=l(Object.getPrototypeOf(e));for(let t=0;t<n.length;t++)e[n[t]].Destroy()}}(v||(t.Destroy=v={})),function(e){e.Get=function(e){var t=e&&e.PreReqTemplateDecorator_Template,n=t?t():[];return Array.isArray(n)||(n=[n]),n}}(y||(t.PreReqTemplate=y={})),function(e){function t(e){return e&&e.PreReqDecorator_PreReqs||[]}e.All=function(e){var n=t(e).map((t=>e[t]&&e[t].Init||Promise.resolve()));return Promise.all(n)},e.Has=function(e){return t(e).length>0}}(m||(t.PreReq=m={}))},116:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=void 0;const o=n(959);var r;!function(e){let t=0;function n(e,t){return e._id-t._id}e.Create=function(){const e=[];return e._id=t++,e},e.On=function(e,t){e.push(t)},e.Emit=function(e,...t){let n=!1;for(let o=0;o<e.length;o++)null!==e[o]&&!0!==e[o](...t)||(n=!0,e[o]=null);n&&(0,o.RemoveNulls)(e)},e.Remove=function(e,t){const n=e.indexOf(t);n>=0&&(e[n]=null)},e.Clear=function(e){e.splice(0)},e.Sort=function(e){return e.sort(n)}}(r||(t.Emitter=r={}))},586:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(334),t),r(n(20),t)},880:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Injector=void 0;class n{constructor(){this.parent=n.Current(),this.typeMap=new Map}Get(e){if(0===this.typeMap.size)return this.parent&&this.parent.Get(e);var t=this.typeMap.get(e);return t||(t=this.parent&&this.parent.Get(e)),t}Set(e,t){this.typeMap.set(e,t)}}t.Injector=n,function(e){var t=null;function n(){return t}e.Current=n,e.Scope=function(e,o,...r){var i=n();t=e;const s=o(...r);return t=i,s}}(n||(t.Injector=n={}))},874:(e,t)=>{var n;function o(){const e=Object.getPrototypeOf({}),t=Object.getPrototypeOf([]),n=Object.getPrototypeOf(""),o=Object.getPrototypeOf(0);function r(r){if(null==r)return"value";switch(Object.getPrototypeOf(r)){case n:case o:return"value";case e:return"object";case t:return"array"}return Array.isArray(r)?"array":"value"}function i(e,t,n,o){if(t===n)return!1;const s=r(t),c=r(n),u=o.length;let a=!0;if(s===c)switch(s){case"array":a=function(e,t,n,o){if(0===n.length||0===t.length)return n.length!==t.length;let r=!0;if(t.length!==n.length&&o.push({path:e.concat("length"),value:t.length}),t.length>0||n.length>0)for(let s=0;s<t.length;s++){const c=e.concat(s),u=n[s];r=i(c,t[s],u,o)&&r}else r=!1;return r}(e,t,n,o);break;case"object":a=function(e,t,n,o){const r=Object.keys(t).sort(),s=Object.keys(n).sort();if(0===r.length&&0===s.length)return!1;if(r.length<s.length)return!0;let c=0,u=0;for(;c<r.length;){const a=e.concat(r[c]);u<s.length&&r[c]===s[u]?(i(a,t[r[c]],n[s[u]],o),u++):void 0!==t[r[c]]&&o.push({path:a,value:t[r[c]]}),c++}return u<s.length}(e,t,n,o)}return!!a&&(o.length>u&&o.splice(u),o.push({path:e,value:t}),!0)}return{JsonDiff:function(e,t,n,o){const r=o??[];return i(n?n.split("."):[],e,t,r),r},JsonType:r,JsonDeepClone:function e(t){switch(r(t)){case"array":return t.map(e);case"object":{const n={},o=Object.keys(t);for(let r=0;r<o.length;r++)n[o[r]]=e(t[o[r]]);return n}default:return t}},JsonMerge:function e(t,n){if(void 0===n)return t;const o=r(t);if(o!==r(n))return n;switch(o){case"array":{const o=n;return t.map((function(t,n){return e(t,o[n])}))}case"object":{const o=t,r=n,i=Object.keys(o),s={};for(let t=0;t<i.length;t++)s[i[t]]=e(o[i[t]],r[i[t]]);return s}default:return n}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.JsonMerge=t.JsonDeepClone=t.JsonType=t.JsonDiff=void 0,t.JsonDiffFactory=o,n=o(),t.JsonDiff=n.JsonDiff,t.JsonType=n.JsonType,t.JsonDeepClone=n.JsonDeepClone,t.JsonMerge=n.JsonMerge},130:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JsonType=void 0;var o=n(874);Object.defineProperty(t,"JsonType",{enumerable:!0,get:function(){return o.JsonType}})},496:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.List=void 0,function(e){let t=0,n=!1;const o={head:null,tail:null,size:0};function r(e){const t=a(o)??{previous:null,next:null,data:null};return t.data=e,t}function i(){n=!1,t<o.size&&(t=o.size);const e=Math.floor(t/10);u(o,e)}function s(){n||(n=!0,requestIdleCallback(i))}function c(e){e&&(e.previous=null,e.next=null,e.data=null,l(o,e),s())}function u(e,t){let n=0,o=e.head;for(;o&&n<t;)o=o.next,n++;const r={head:null,tail:null,size:0};return o&&(r.head=o,r.tail=e.tail,r.size=e.size-t,e.tail=o.previous,e.size=t,0===e.size?e.head=null:e.tail.next=null,o.previous=null),r}function a(e){if(0===e.size)return null;const t=e.head;return e.head=t.next,e.head&&(e.head.previous=null),e.size--,0===e.size&&(e.tail=null),t.previous=null,t.next=null,t}function l(e,t){return 0===e.size?(e.head=t,e.tail=t,e.size=1):(t.previous=e.tail,e.tail.next=t,e.tail=t,e.size++),t}function d(e,t){if(0!==t.size){if(0===e.size)return e.head=t.head,t.head=null,e.tail=t.tail,t.tail=null,e.size=t.size,void(t.size=0);e.tail.next=t.head,t.head.previous=e.tail,e.tail=t.tail,e.size+=t.size,t.head=null,t.tail=null,t.size=0}}e.Create=function(){return{head:null,tail:null,size:0}},e.Split=u,e.Clear=function(e){let t=e.head;for(;t;)t.data=null,t=t.next;d(o,e),s()},e.Push=function(e,t){const n=r(t);return 0===e.size?(e.head=n,e.tail=n,e.size=1):(n.next=e.head,e.head.previous=n,e.head=n,e.size++),n},e.PopNode=a,e.Pop=function(e){const t=a(e),n=t?.data;return c(t),n},e.Add=function(e,t){return l(e,r(t))},e.AddNode=l,e.AddBefore=function(t,n,o){if(!n)return e.Add(t,o);const i=r(o),s=n.previous;return i.next=n,n.previous=i,t.head===n&&(t.head=i),s&&(s.next=i,i.previous=s),t.size++,i},e.AddAfter=function(t,n,o){if(!n)return e.Push(t,o);const i=r(o),s=n.next;return n.next=i,i.previous=n,t.tail===n&&(t.tail=i),s&&(s.previous=i,i.next=s),t.size++,i},e.Remove=function(e){if(0===e.size)return null;var t=e.tail;e.tail=t.previous,e.tail&&(e.tail.next=null),e.size--,0===e.size&&(e.head=null);const n=t.data;return c(t),n},e.RemoveNode=function(e,t){if(e.head===t)e.head=t.next;else if(e.tail===t)e.tail=t.previous;else{const e=t.previous,n=t.next;e.next=n,n.previous=e}t.next=t.previous=null,e.size--,e.size>0&&(e.head.previous=e.tail.next=null)},e.ForEach=function(e,t){let n=e.head;for(;n;)t(n.data),n=n.next},e.Append=d,e.ToNodeMap=function(e,t){const n=new Map;for(let o=e.head;null!==o;o=o.next){const e=t(o.data),r=n.get(e);void 0===r?n.set(e,[o]):r[r.length]=o}return n}}(n||(t.List=n={}))},224:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Schedule=b,t.After=function(e){v(e,!1,!1)},t.Callback=function(e){return function(t,n,o,r){b((function(){e(t,n,o,r)}))}},t.Synch=g,t.Thread=m,t.ThreadAsync=function(e){return new Promise((t=>m((function(n){e(n),m(t)}))))};const o=n(496),r=16,i=o.List.Create();let s=null,c=!1;const u=setTimeout;function a(){return this.end-Date.now()}function l(){return{end:Date.now()+r,timeRemaining:a}}function d(e=l()){let t;for(;e.timeRemaining()>0&&(t=o.List.Pop(i));)p(t,e);i.size>0?u(d):c=!1}function f(e){o.List.Add(i,e),c||(c=!0,u(d))}function h(e,t){const n=e.workEndNode;e.workEndNode=e.workList.head,t(!0),e.workEndNode=n}function p(e,t=l()){const n=s;s=e;const r=e.async;let i;for(;r===e.async&&t.timeRemaining()>0&&(i=o.List.Pop(e.workList));)h(e,i);e.workList.size>0&&f(e),s=n}function v(e,t,n){s=s||{async:!1,workEndNode:null,workList:o.List.Create()},s.async=s.async||n,t?o.List.AddBefore(s.workList,s.workEndNode,e):s.workEndNode?o.List.AddAfter(s.workList,s.workEndNode,e):s.workEndNode=o.List.Add(s.workList,e)}function b(e){v(e,!0,!0)}var y=!1;function g(e){s||y?e(!1):(y=!0,function(e){e(!1),s&&(s.async?f(s):p(s)),s=null}(e),y=!1)}function m(e){s?v(e,!0,!1):g(e)}},156:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calc=t.Component=void 0;var o=n(342);Object.defineProperty(t,"Component",{enumerable:!0,get:function(){return o.Component}});var r=n(948);Object.defineProperty(t,"calc",{enumerable:!0,get:function(){return r.CalcScope}})},576:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableNode=t.ObservableScope=void 0,r(n(156),t),r(n(586),t);var i=n(890);Object.defineProperty(t,"ObservableScope",{enumerable:!0,get:function(){return i.ObservableScope}}),Object.defineProperty(t,"ObservableNode",{enumerable:!0,get:function(){return i.ObservableNode}}),r(n(147),t)}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}var __webpack_exports__={};(()=>{const e=__webpack_require__(576);for(var t in e)window[t]=e[t]})()})();
|
|
1
|
+
(()=>{"use strict";var __webpack_modules__={390:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateAssignment=function(e,t){let n,o;return function(r){if(r===n)return;n=r,o??={};const i=r&&Object.keys(r);for(let n=0;i&&n<i.length;n++){const r=i[n];o[r]??=t(e,r)}const s=Object.keys(o);for(let e=0;e<s.length;e++)o[s[e]](r)}}},642:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateEventAssignment=function(e,t){let n;return function(o){const r=o&&o[t];r!==n&&(n&&e.removeEventListener(t,n),r&&e.addEventListener(t,r),n=r)}}},543:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CreateNodeValueAssignment=function(e){let t=e.nodeValue;return function(n){n!==t&&(e.nodeValue=n,t=n)}},t.CreatePropertyAssignment=function(e){const t=[["",null,null]];function n(n,o,r){r>=t.length||t[r][0]!==n?(t[r]=[n,o,u(n)],t[r][2](e,o)):t[r][1]!==o&&(t[r][1]=o,t[r][2](e,o))}return function(o){if(null===o){for(let n=0;n<t.length;n++)t[n][2](e,null);return void(t.length>0&&t.splice(0))}const i=r(o,n);i<t.length&&t.splice(i)}};const o=n(874);function r(e,t,n=0,i=""){const s=Object.keys(e);for(let c=0;c<s.length;c++){const u=e[s[c]];"object"===(0,o.JsonType)(u)?n=r(u,t,n,`${i}${s[c]}.`):(t(`${i}${s[c]}`,u,n),n++)}return n}function i(e,t){e.nodeValue=t}function s(e,t){e.value=t}function c(e,t){e.className=t}function u(e){switch(e){case"nodeValue":return i;case"value":return s;case"className":return c;default:return new Function("t","v",`t.${e} = v;`)}}},641:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DOMNodeConfig=void 0;const o=n(819),r=n(496),i=n(543),s=n(642),c=n(390),u=n(543);let a=r.List.Create(),l=!1;function d(){let e;for(r.List.Add(a,null);e=r.List.Pop(a);)e();0===a.size?l=!1:o.wndw.requestAnimationFrame(d)}t.DOMNodeConfig={createNode:(e,t)=>t?o.wndw.document.createElementNS(t,e):o.wndw.document.createElement(e),createTextNode:(e="")=>o.wndw.document.createTextNode(e),scheduleUpdate(e){r.List.Add(a,e),l||(l=!0,o.wndw.requestAnimationFrame(d))},addListener(e,t,n){e.addEventListener(t,n)},removeListener(e,t,n){e.removeEventListener(t,n)},addChild(e,t){e.appendChild(t)},addChildFirst(e,n){t.DOMNodeConfig.addChildBefore(e,e.firstChild,n)},addChildBefore(e,n,o){n?o!==n&&e.insertBefore(o,n):t.DOMNodeConfig.addChild(e,o)},addChildAfter(e,n,o){n?t.DOMNodeConfig.addChildBefore(e,n.nextSibling,o):t.DOMNodeConfig.addChildFirst(e,o)},removeChild(e,t){e.removeChild(t)},remove(e){e&&e.parentNode&&e.parentNode.removeChild(e)},createTextAssignment:e=>(0,i.CreateNodeValueAssignment)(e),setText(e,t){e.nodeValue=t},getAttribute:(e,t)=>e.getAttribute(t),setAttribute(e,t,n){e.setAttribute(t,n)},createPropertyAssignment:e=>(0,u.CreatePropertyAssignment)(e),createEventAssignment:e=>(0,c.CreateAssignment)(e,s.CreateEventAssignment),fireEvent(e,t,n){var o=new CustomEvent(t,n);e.dispatchEvent(o)},getFirstChild:e=>e.firstChild,getLastChild:e=>e.lastChild,getNextSibling:e=>e.nextSibling,replaceChildren(e,t){e.replaceChildren(...t)}}},774:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.div=function(e,t){return o.ElementNode.Create("div",null,e,t)},t.a=function(e,t){return o.ElementNode.Create("a",null,e,t)},t.ul=function(e,t){return o.ElementNode.Create("ul",null,e,t)},t.li=function(e,t){return o.ElementNode.Create("li",null,e,t)},t.br=function(e){return o.ElementNode.Create("br",null,e,null)},t.b=function(e,t){return o.ElementNode.Create("b",null,e,t)},t.span=function(e,t){return o.ElementNode.Create("span",null,e,t)},t.img=function(e){return o.ElementNode.Create("img",null,e,null)},t.video=function(e,t){return o.ElementNode.Create("video",null,e,t)},t.source=function(e){return o.ElementNode.Create("source",null,e,null)},t.input=function(e){return o.ElementNode.Create("input",null,e,null)},t.textarea=function(e){return o.ElementNode.Create("textarea",null,e,null)},t.select=function(e,t){return o.ElementNode.Create("select",null,e,t)},t.option=function(e,t){return o.ElementNode.Create("option",null,e,t)},t.h1=function(e,t){return o.ElementNode.Create("h1",null,e,t)},t.h2=function(e,t){return o.ElementNode.Create("h2",null,e,t)},t.h3=function(e,t){return o.ElementNode.Create("h3",null,e,t)},t.p=function(e,t){return o.ElementNode.Create("p",null,e,t)},t.style=function(e,t){return o.ElementNode.Create("style",null,e,t)},t.button=function(e,t){return o.ElementNode.Create("button",null,e,t)},t.table=function(e,t){return o.ElementNode.Create("table",null,e,t)},t.tbody=function(e,t){return o.ElementNode.Create("tbody",null,e,t)},t.th=function(e,t){return o.ElementNode.Create("th",null,e,t)},t.tr=function(e,t){return o.ElementNode.Create("tr",null,e,t)},t.td=function(e,t){return o.ElementNode.Create("td",null,e,t)};const o=n(413)},147:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(774),t),r(n(716),t),r(n(543),t),r(n(642),t)},716:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.svg=function(e,t){return o.ElementNode.Create("svg",r,e,t)},t.g=function(e,t){return o.ElementNode.Create("g",r,e,t)},t.circle=function(e,t){return o.ElementNode.Create("circle",r,e,t)};const o=n(413),r="http://www.w3.org/2000/svg"},819:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.wndw=void 0,t.wndw="undefined"!=typeof window?window:function(){try{return Object(function(){var e=new Error("Cannot find module 'jsdom'");throw e.code="MODULE_NOT_FOUND",e}())("").window}catch(e){return}}()},173:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BoundNode=void 0;const o=n(267),r=n(948);var i;function s(e,t){if(t)for(var n in t)o.NodeConfig.getAttribute(e.node,n)!==t[n]&&o.NodeConfig.setAttribute(e.node,n,t[n])}!function(e){function t(e,t){const n=Object.keys(t),o={};for(let r=0;r<n.length;r++){const i=n[r],s=t[i];o[i]=function(...t){if(!e.destroyed)return s(...t)}}return o}e.Init=function(e){const n=e.nodeDef;if(n.props)if(e.assignProperties=o.NodeConfig.createPropertyAssignment(e.node),"function"==typeof n.props){const t=r.ObservableScope.Create(n.props);e.scopes??=[],e.scopes.push(t),r.ObservableScope.Watch(t,(function(t){!function(e,t){e.setProperties||(e.setProperties=!0,o.NodeConfig.scheduleUpdate((function(){if(e.setProperties=!1,e.destroyed)return;const n=r.ObservableScope.Value(t);e.assignProperties(n||null)})))}(e,t)}));const i=r.ObservableScope.Value(t);e.assignProperties(i)}else e.assignProperties(n.props),e.assignProperties=null;if(n.attrs)if("function"==typeof n.attrs){const t=r.ObservableScope.Create(n.attrs);e.scopes??=[],e.scopes.push(t),r.ObservableScope.Watch(t,(function(t){!function(e,t){e.setAttributes||(e.setAttributes=!0,o.NodeConfig.scheduleUpdate((function(){e.setAttributes=!1,e.destroyed||s(e,r.ObservableScope.Value(t))})))}(e,t)})),s(e,r.ObservableScope.Value(t))}else s(e,n.attrs);if(n.on)if(e.assignEvents=o.NodeConfig.createEventAssignment(e.node),"function"==typeof n.on){const i=r.ObservableScope.Create(n.on),s=r.ObservableScope.Create((function(){const n=r.ObservableScope.Value(i);return t(e,n)}));e.scopes??=[],e.scopes.push(i,s),r.ObservableScope.Watch(s,(function(t){!function(e,t){e.setEvents||(e.setEvents=!0,o.NodeConfig.scheduleUpdate((function(){if(e.setEvents=!1,e.destroyed)return;const n=r.ObservableScope.Value(t);e.assignEvents(n)})))}(e,t)}));const c=r.ObservableScope.Value(s);e.assignEvents(c)}else e.assignEvents(t(e,n.on)),e.assignEvents=null;if(n.text)if(e.assignText=o.NodeConfig.createTextAssignment(e.node),"function"==typeof n.text){const t=r.ObservableScope.Create(n.text);e.scopes??=[],e.scopes.push(t),r.ObservableScope.Watch(t,(function(t){!function(e,t){e.setText||(e.setText=!0,o.NodeConfig.scheduleUpdate((function(){if(e.setText=!1,e.destroyed)return;const n=r.ObservableScope.Value(t);e.assignText(n)})))}(e,t)}));const i=r.ObservableScope.Value(t);e.assignText(i)}else e.assignText(n.text),e.assignText=null}}(i||(t.BoundNode=i={}))},342:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;const o=n(64),r=n(230),i=n(334),s=n(948);class c{get Injector(){return this.nodeRef.injector}get Destroyed(){return this.nodeRef.destroyed}get Scope(){return this.scope}get Data(){return this.scope.Value}get NodeRef(){return this.nodeRef}get Templates(){return this.templates}constructor(e,t,n,o){this.nodeRef=n,this.componentEvents=o,this.scope="function"==typeof e?new s.ObservableScope(e):new s.ObservableScope((()=>e)),this.templates=t||{}}Template(){return[]}Bound(){}Fire(e,t){var n=this.componentEvents&&this.componentEvents[e];n&&n(t)}Destroy(){this.scope.Destroy(),i.Destroy.All(this)}}t.Component=c,function(e){function t(e,t,n){return r.ComponentNode.ToFunction(e,t,n)}function n(e,t){o.NodeRef.Init(t);var n=o.NodeRef.Wrap(e);o.NodeRef.AddChild(n,t)}e.ToFunction=t,e.Register=function(e,o){const r=t(`${e}-component`,void 0,o);class i extends HTMLElement{constructor(){super(),n(this.attachShadow({mode:"open"}),r({}))}}customElements.define(e,i)},e.Attach=n}(c||(t.Component=c={}))},230:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentNode=void 0;const o=n(173),r=n(64),i=n(267),s=n(342),c=n(880),u=n(334),a=n(224),l=n(496);var d;function f(e){const t=e.component.Template();return Array.isArray(t)?t:[t]}function h(e,t){(0,a.Thread)((function(){if(e.destroyed)return;const n=c.Injector.Scope(e.injector,f,e);(0,a.Schedule)((function(){r.NodeRef.InitAll(e,n)})),(0,a.Thread)((function(){if(e.destroyed)return;const o=l.List.Create();l.List.Add(o,{value:void 0,init:!0,nodes:n}),t?(r.NodeRef.ReconcileChildren(e,o),l.List.Clear(o)):i.NodeConfig.scheduleUpdate((function(){e.destroyed||(r.NodeRef.ReconcileChildren(e,o),l.List.Clear(o))}))})),e.component.Bound!==s.Component.prototype.Bound&&(0,a.After)((function(){i.NodeConfig.scheduleUpdate((()=>setTimeout((()=>e.component.Bound()),0)))}))}))}!function(e){e.Fire=function(e,t){var n=this.componentEvents&&this.componentEvents[e];n&&n(t)},e.ToFunction=function(e,t,n){return function(o,i){return function(e,t,n,o,i){var s=r.NodeRef.Create(e,t,r.NodeRefType.ComponentNode);return s.nodeDef=n,s.constructor=o,s.templates=i,s}(e,t,o,n,i)}},e.Init=function(e){var t,n=e.nodeDef,s=n.on;n.on=null,e.component=new e.constructor(n.data,e.templates,e,s),t=e,u.PreReq.Has(t.component)?function(e){return new Promise((t=>{(0,a.Thread)((function(){const n=c.Injector.Scope(e.injector,u.PreReqTemplate.Get,e.component);(0,a.Schedule)((function(){e.destroyed||r.NodeRef.InitAll(e,n)})),(0,a.Thread)((function(){if(!e.destroyed){for(var o=0;o<n.length;o++)r.NodeRef.AddChild(e,n[o]);u.PreReq.All(e.component).then((function(){if(!e.destroyed){for(var o=0;o<n.length;o++)r.NodeRef.Destroy(n[o]);i.NodeConfig.scheduleUpdate((function(){if(!e.destroyed){for(var o=0;o<n.length;o++)r.NodeRef.DetachChild(e,n[o]);t()}}))}}))}}))}))}))}(t).then((function(){h(t,!1)})):h(t,!0),o.BoundNode.Init(e)}}(d||(t.ComponentNode=d={}))},413:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ElementNode=void 0;const o=n(948),r=n(880),i=n(496),s=n(224),c=n(173),u=n(267),a=n(64),l=[];var d;function f(e){return e.value}function h(e,t,n=!1){(0,s.Synch)((function(){!function(e,t){const n=i.List.Create(),o=e.nodeList,c=o&&i.List.ToNodeMap(o,f);for(let s=0;s<t.length;s++){let u=null;if(c){const e=c.get(t[s]);if(e){let t=e.length-1;for(;t>=0&&!u;t--)u=e[t],e[t]=null}}u?(i.List.RemoveNode(o,u),i.List.AddNode(n,u)):u=i.List.Add(n,{value:t[s],init:!1,nodes:r.Injector.Scope(e.injector,p,e.children,t[s])})}let u=n.head;for(;u;){const t=u.data;!t.init&&(0,s.Schedule)((function(){e.destroyed||0===n.size||(a.NodeRef.InitAll(e,t.nodes),t.init=!0)})),u=u.next}if(o){let t=o.head;for(;t;){const n=t.data;t=t.next;for(let t=0;t<n.nodes.length;t++)e.childNodes.delete(n.nodes[t]);a.NodeRef.DestroyAll(n.nodes)}i.List.Clear(o)}e.nodeList=n}(e,t);const o=e.nodeList,c=o.size;(0,s.Thread)((function(t){e.destroyed||(n||!t?a.NodeRef.ReconcileChildren(e,o):u.NodeConfig.scheduleUpdate((function(){e.destroyed||o.size!==c||a.NodeRef.ReconcileChildren(e,o)})))}))}))}function p(e,t){const n=e(t);if("string"==typeof n||!n){const n=a.NodeRef.Create("text",null,a.NodeRefType.BoundNode);return n.nodeDef={text:function(){return e(t)}},[n]}return Array.isArray(n)?n:[n]}!function(e){e.Create=function(e,t,n,o){var r=a.NodeRef.Create(e,t,a.NodeRefType.ElementNode);return r.nodeDef=n,Array.isArray(o)?r.childrenArray=o:void 0!==o&&(r.children=o),r},e.Init=function(e){const t=e.nodeDef;if(null!==e.childrenArray||null!==e.children&&!t.data)n=e,(0,s.Synch)((function(){const e=n.childrenArray||r.Injector.Scope(n.injector,p,n.children,!0);n.childrenArray=null,e.length>0&&((0,s.Schedule)((function(){n.destroyed||a.NodeRef.InitAll(n,e)})),(0,s.Thread)((function(){if(n.destroyed)return;const t=i.List.Create();i.List.Add(t,{value:null,init:!0,nodes:e}),a.NodeRef.ReconcileChildren(n,t),i.List.Clear(t)})))}));else if(null!==e.children){const n=o.ObservableScope.Create(t.data),r=o.ObservableScope.Create((function(){const e=o.ObservableScope.Value(n);return e?Array.isArray(e)?e:[e]:l}));e.childNodes=new Set,e.scopes??=[],e.scopes.push(n,r),o.ObservableScope.Watch(r,(function(){!function(e,t){e.setData||(e.setData=!0,u.NodeConfig.scheduleUpdate((function(){e.setData=!1,e.destroyed||h(e,o.ObservableScope.Value(t))})))}(e,r)})),h(e,o.ObservableScope.Value(r),!0)}var n;c.BoundNode.Init(e)}}(d||(t.ElementNode=d={}))},267:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeConfig=void 0;const o=n(641);t.NodeConfig=o.DOMNodeConfig},64:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NodeRef=t.NodeRefType=void 0;const o=n(267),r=n(880),i=n(173),s=n(413),c=n(230),u=n(890);var a,l;!function(e){e[e.NodeRef=0]="NodeRef",e[e.BoundNode=1]="BoundNode",e[e.ElementNode=2]="ElementNode",e[e.ComponentNode=3]="ComponentNode"}(a||(t.NodeRefType=a={})),function(e){function t(e,t,n){switch(n){case a.NodeRef:return{node:null,nodeType:e,nodeNamespace:t,type:a.NodeRef,injector:r.Injector.Current()||new r.Injector,parent:null,childNodes:null,destroyed:!1};case a.BoundNode:return{node:null,nodeDef:null,nodeType:e,nodeNamespace:t,type:a.BoundNode,injector:r.Injector.Current()||new r.Injector,parent:null,childNodes:null,destroyed:!1,lastEvents:null,setProperties:!1,assignProperties:null,assignEvents:null,assignText:null,setAttributes:!1,setEvents:!1,setText:!1,scopes:null};case a.ElementNode:return{node:null,nodeDef:null,nodeType:e,nodeNamespace:t,type:a.ElementNode,injector:r.Injector.Current()||new r.Injector,parent:null,childNodes:null,destroyed:!1,lastEvents:null,setProperties:!1,assignProperties:null,assignEvents:null,assignText:null,setAttributes:!1,setEvents:!1,children:null,childrenArray:null,nodeList:null,setData:!1,setText:!1,scopes:null};case a.ComponentNode:return{node:null,nodeDef:null,nodeType:e,nodeNamespace:t,type:a.ComponentNode,injector:r.Injector.Current()||new r.Injector,parent:null,childNodes:null,destroyed:!1,setProperties:!1,assignProperties:null,assignEvents:null,setAttributes:!1,setEvents:!1,component:null,componentEvents:null,scopes:null}}}function n(e){if(!e.node)switch(e.node="text"===e.nodeType?o.NodeConfig.createTextNode():o.NodeConfig.createNode(e.nodeType,e.nodeNamespace),e.childNodes="text"!==e.nodeType?[]:null,e.type){case a.BoundNode:i.BoundNode.Init(e);break;case a.ElementNode:s.ElementNode.Init(e);break;case a.ComponentNode:c.ComponentNode.Init(e)}}function l(e,t){Array.isArray(e.childNodes)?e.childNodes.push(t):e.childNodes.add(t)}function d(e){if(!e.destroyed){if(e.destroyed=!0,Array.isArray(e.childNodes))for(let t=0;t<e.childNodes.length;t++)d(e.childNodes[t]);else e.childNodes?.forEach(d);switch(e.type){case a.ComponentNode:e.component?.Destroy();case a.BoundNode:e.assignEvents?.(null);case a.ElementNode:for(let t=0;e.scopes&&t<e.scopes.length;t++)u.ObservableScope.Destroy(e.scopes[t])}e.node=null}}e.Wrap=function(e){var n=t(null,null,a.NodeRef);return n.node=e,n.childNodes=new Set,n},e.Create=t,e.Init=n,e.InitAll=function(e,t){for(var o=0;o<t.length;o++)t[o].parent=e,l(e,t[o]),n(t[o])},e.AddChild=function(e,t){t.parent=e,l(e,t),o.NodeConfig.addChild(e.node,t.node)},e.AddChildAfter=function(e,t,n){if(t&&t.parent!==e)throw"currentChild is not valid";n.parent=e,l(e,n),o.NodeConfig.addChildAfter(e.node,t&&t.node,n.node)},e.ReconcileChildren=function(e,t){const n=e.node;if(0===t.size)return void o.NodeConfig.replaceChildren(n,[]);let r,i=!1,s=!1;for(let e=t.head;null!==e;e=e.next)for(let t=0;t<e.data.nodes.length;t++){const c=r?o.NodeConfig.getNextSibling(r):o.NodeConfig.getFirstChild(n),u=e.data.nodes[t].node;c!==u?(o.NodeConfig.addChildBefore(n,c,u),!s&&i&&c&&o.NodeConfig.removeChild(n,c),s=i,i=!0):(i=!1,s=!1),r=u}let c=o.NodeConfig.getLastChild(n);for(;r&&r!==c;)o.NodeConfig.removeChild(n,c),c=o.NodeConfig.getLastChild(n)},e.DetachChild=function(e,t){!Array.isArray(e.childNodes)&&e.childNodes.delete(t)&&(o.NodeConfig.removeChild(e.node,t.node),t.parent=null)},e.Destroy=d,e.DestroyAll=function(e){for(let t=0;t<e.length;t++)d(e[t])}}(l||(t.NodeRef=l={}))},377:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiffAsync=void 0;const o=n(521),r=n(547);t.DiffAsync=class{constructor(e){this.workerQueue=new o.WorkerQueue(r.DiffWorker.Create()),this.workerQueue.Push({method:"create",arguments:e?[e.toString()]:[]})}async DiffPath(e,t){return await this.workerQueue.Push({method:"diffpath",arguments:[e,t]})}async DiffBatch(e){return await this.workerQueue.Push({method:"diffbatch",arguments:[e]})}Destroy(){this.workerQueue.Destroy()}}},606:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiffSync=void 0;const o=n(874),r=(0,n(285).DiffTreeFactory)(o.JsonDiffFactory);t.DiffSync=class{constructor(e){this.diffTree=new r(e)}DiffPath(e,t){return this.diffTree.DiffPath(e,t)}DiffBatch(e){return this.diffTree.DiffBatch(e)}}},285:(__unused_webpack_module,exports)=>{function DiffTreeFactory(jsonDiffFactory,worker){const{JsonDiff,JsonType,JsonDeepClone}=jsonDiffFactory(),ctx=this;if(worker&&ctx){let diffTree=null;ctx.onmessage=function(event){const data=event.data;switch(data.method){case"create":{const keyFunc=data.arguments[0]?eval(data.arguments[0]):void 0;diffTree=new DiffTree(keyFunc),ctx.postMessage(null);break}case"diffpath":{const e=diffTree.DiffPath(data.arguments[0],data.arguments[1]);ctx.postMessage(e);break}case"diffbatch":{const e=diffTree.DiffBatch(data.arguments[0]);ctx.postMessage(e);break}case"getpath":{const e=diffTree.GetPath(data.arguments[0]);ctx.postMessage(e);break}}}}function FlattenValue(e,t,n){switch(JsonType(t)){case"array":const o=t;for(let t=0;t<o.length;t++)FlattenValue(e,o[t],n);break;case"object":const r=t,i=n(r);i&&(e[i]=r);const s=Object.keys(r);for(let t=0;t<s.length;t++)FlattenValue(e,r[s[t]],n)}return e}function GetPathValue(e,t){if(""===t)return e;const n=t.split(".");let o=e;for(let e=0;e<n.length;e++)o=o[n[e]];return o}function SetPathValue(e,t,n){if(0===t.length)return;let o=e,r=0;for(;r<t.length-1;r++)o=o[t[r]];o[t[r]]=n}function ResolveKeyPath(e,t,n){const o=t.split("."),r=new Array(o.length-1);let i=e;for(let e=0;e<o.length-1;e++)i=i[o[e]],r[e]=i;let s=r.length-1;for(;s>=0&&("object"!==JsonType(r[s])||!n(r[s]));s--);if(s>=0){const e=n(r[s]);return o.splice(0,s+1,e),o.join(".")}return t}function UpdateSource(e,t,n,o){const r=[];if(o){const i=ResolveKeyPath(e,t,o);if(i!==t){const t=UpdateSource(e,i,n,o);r.push(...t)}}const i=GetPathValue(e,t);if(JsonDiff(n,i,t,r),o){let t={};t=FlattenValue(t,n,o),t=JsonDeepClone(t);const i=Object.keys(t);for(let n=0;n<i.length;n++)JsonDiff(t[i[n]],e[i[n]],i[n],r)}const s=r.filter((e=>void 0!==e.value));for(let t=0;t<s.length;t++)SetPathValue(e,s[t].path,s[t].value);return r}class DiffTree{constructor(e){this.keyFunc=e,this.rootState={}}DiffBatch(e){return e.map((({path:e,value:t})=>this.DiffPath(e,t))).flat(1)}DiffPath(e,t){return UpdateSource(this.rootState,e,t,this.keyFunc)}GetPath(e){return GetPathValue(this.rootState,e)}}return DiffTree}Object.defineProperty(exports,"__esModule",{value:!0}),exports.DiffTreeFactory=DiffTreeFactory},547:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiffWorker=void 0;const o=n(874),r=n(285);var i;!function(e){let t=null,n=null;"undefined"!=typeof Worker&&(t=Worker,n=URL.createObjectURL(new Blob([`(${r.DiffTreeFactory}).call(this, (${o.JsonDiffFactory}), true)`]))),e.Create=function(){if(!t)throw"Worker is not available";return new t(n)}}(i||(t.DiffWorker=i={}))},521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WorkerQueue=void 0;const o=n(496);t.WorkerQueue=class{constructor(e){this.worker=e,this.callbacks=o.List.Create(),this.worker.onerror=e=>{const t=o.List.Pop(this.callbacks);t&&t(null,e)},this.worker.onmessage=e=>{const t=o.List.Pop(this.callbacks);t&&t(e.data)}}Push(e){return new Promise(((t,n)=>{o.List.Add(this.callbacks,(function(e,o){o?n(o):t(e)})),this.worker.postMessage(e)}))}Destroy(){this.worker.terminate()}}},501:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Store=void 0;const o=n(318);t.Store=class{constructor(e){this.keyFunc=e,this.rootMap=new Map;const t=e&&(t=>{const n=e(t);if(void 0===n)return;const r=this.rootMap.get(n);if(void 0===r)throw`No root object found for key: ${n}`;return r[o.GET_OBSERVABLE_VALUE][n]});this.createNode=t?o.ObservableNode.CreateFactory(t):o.ObservableNode.Create}Get(e,t){let n=this.rootMap.get(e);return void 0===n&&(n=this.createNode({[e]:t}),this.rootMap.set(e,n)),n[e]}UpdateRootMap(e){for(let t=0;t<e.length;){const n=e[t].path[0],o=t;for(;t<e.length&&e[t].path[0]===n;)t++;const r=e.slice(o,t);this.UpdateRootObject(r[0].path[0],r)}}UpdateRootObject(e,t){const n=this.rootMap.get(e);if(void 0!==n)o.ObservableNode.ApplyDiff(n,t);else{if(t.length>1||t[0].path.length>1)throw`Unable to initialize root path ${e} with ${t.length} results and initial path ${t[0].path}`;const n=this.createNode({[e]:t[0].value});this.rootMap.set(e,n)}}}},161:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StoreAsync=void 0;const o=n(263),r=n(874),i=n(377),s=n(318),c=n(501);class u extends c.Store{constructor(e){super(e),this.queue=new o.AsyncQueue,this.diff=new i.DiffAsync(e)}async Write(e,t){await this.queue.Next((async()=>{if(!(t=t||this.keyFunc?.(e)))throw"No key provided for data";const n=await this.diff.DiffPath(t,e);this.UpdateRootMap(n)}))}async Patch(e,t){await this.queue.Next((async()=>{const n=this.Get(e);if(void 0===n)throw"Unable to patch undefined value";const o=n.toJSON(),i=(0,r.JsonMerge)(o,t),s=await this.diff.DiffPath(e,i);this.UpdateRootMap(s)}))}async Push(e,...t){await this.queue.Next((async()=>{const n=this.Get(e),o=t.map((function(t,o){return{path:`${e}.${n.length+o}`,value:t}})),r=await this.diff.DiffBatch(o);this.UpdateRootMap(r)}))}async Splice(e,t,n,...o){return await this.queue.Next((async()=>{const i=this.Get(e)[s.GET_OBSERVABLE_VALUE].slice(),c=(0,r.JsonDeepClone)(i.splice(t,n,...o)),u=await this.diff.DiffPath(e,i);return this.UpdateRootMap(u),c}))}Destroy(){this.queue.Stop(),this.diff.Destroy()}}t.StoreAsync=u},961:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StoreSync=void 0;const o=n(874),r=n(606),i=n(318),s=n(501);class c extends s.Store{constructor(e){super(e),this.diff=new r.DiffSync(e)}Write(e,t){if(!(t=t||this.keyFunc?.(e)))throw"No key provided for data";const n=this.diff.DiffPath(t,e);this.UpdateRootMap(n)}Patch(e,t){const n=this.Get(e);if(void 0===n)throw"Unable to patch undefined value";const r=n.toJSON(),i=(0,o.JsonMerge)(r,t),s=this.diff.DiffPath(e,i);this.UpdateRootMap(s)}Push(e,...t){const n=this.Get(e),o=t.map((function(t,o){return{path:`${e}.${n.length+o}`,value:t}})),r=this.diff.DiffBatch(o);this.UpdateRootMap(r)}Splice(e,t,n,...r){const s=this.Get(e)[i.GET_OBSERVABLE_VALUE].slice(),c=(0,o.JsonDeepClone)(s.splice(t,n,...r)),u=this.diff.DiffPath(e,s);return this.UpdateRootMap(u),c}}t.StoreSync=c},318:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableNode=t.GET_TO_JSON=t.GET_OBSERVABLE_VALUE=t.IS_OBSERVABLE_NODE=void 0;const o=n(874),r=n(130),i=n(948);t.IS_OBSERVABLE_NODE="____isObservableNode",t.GET_OBSERVABLE_VALUE="____getObservableValue",t.GET_TO_JSON="toJSON";const s=new WeakMap,c=new WeakMap,u=new WeakMap;function a(e,t){return{...Object.getOwnPropertyDescriptor(e,t),configurable:!0}}function l(e,t){return{...Object.getOwnPropertyDescriptor(e,t),configurable:!0}}function d(e,t){return Object.hasOwn(e,t)}function f(e,t){return Object.hasOwn(e,t)}function h(e){return Object.keys(e)}function p(e){return Object.keys(e)}function v(e,n=(0,r.JsonType)(e)){if("value"===n)return e;if(!0===e[t.IS_OBSERVABLE_NODE])return e[t.GET_OBSERVABLE_VALUE];switch(n){case"object":{const t=Object.keys(e);for(let n=0;n<t.length;n++)e[t[n]]=v(e[t[n]])}case"array":for(let t=0;t<e.length;t++)e[t]=v(e[t])}return e}function b(e){function n(e){return _(e=v(e))}const b=void 0!==e?function t(o){switch((0,r.JsonType)(o)){case"array":return n(o).map(t);case"object":{const r=e(o)??o,i=n(r),s=Object.keys(i),c={};for(let e=0;e<s.length;e++)c[s[e]]=t(r[s[e]]);return c}default:return o}}:function(e){return e},y=void 0!==e;function g(e){const t=new Proxy(e,{get:E,set:C,has:d,ownKeys:h,getOwnPropertyDescriptor:a});return u.set(e,{}),s.set(e,t),t}function m(e,n,o){if(y)throw"Object is readonly";if(n===t.IS_OBSERVABLE_NODE)throw`Cannot assign read-only property: ${t.IS_OBSERVABLE_NODE}`;o=v(o),e[n]=o;const r=c.get(e);return i.ObservableScope.Update(r),!0}function O(e,n){if(y)switch(n){case"push":case"unshift":case"splice":case"pop":case"shift":case"sort":case"reverse":if(y)throw"Object is readonly"}switch(n){case t.IS_OBSERVABLE_NODE:return!0;case t.GET_TO_JSON:return function(){return b(e)};case t.GET_OBSERVABLE_VALUE:return e;default:{const t=c.get(e),o=(e=i.ObservableScope.Value(t))[n];return"symbol"==typeof n?o:"function"==typeof o?function(...o){const r="slice"===n?e.slice(...o):e.slice();for(let e=0;e<r.length;e++)r[e]=_(r[e]);let s="slice"===n?r:r[n](...o);switch(n){case"push":case"unshift":case"splice":case"pop":case"shift":case"sort":case"reverse":e.length=r.length;for(let t=0;t<r.length;t++)e[t]=v(r[t]);i.ObservableScope.Update(t)}return s}:_(o)}}}function N(e,t,n){e[t]=n;const o=u.get(e);i.ObservableScope.Update(o&&o[t]||c.get(e))}function C(e,n,i){if(y)throw"Object is readonly";if(n===t.IS_OBSERVABLE_NODE)throw`Cannot assign read-only property: ${t.IS_OBSERVABLE_NODE}`;const s=(0,r.JsonType)(i);if("value"===s)i!==e[n]&&N(e,n,i);else{i=v(i,s);const t=(0,o.JsonDiff)(i,e[n]);for(let o=0;o<t.length;o++)if(0===t[o].path.length)N(e,n,t[o].value);else{const r=t[o].path;let i=e[n],s=0;for(;s<r.length-1;s++)i=i[r[s]];N(i,r[s],t[o].value)}}return!0}function E(e,n){switch(n){case t.IS_OBSERVABLE_NODE:return!0;case t.GET_TO_JSON:return function(){return b(e)};case t.GET_OBSERVABLE_VALUE:return e;default:return function(e,t){const n=u.get(e);return n[t]??=i.ObservableScope.Create((function(){return _(e[t])})),i.ObservableScope.Value(n[t])}(e,n)}}function _(t){switch((0,r.JsonType)(t)){case"object":{let n=s.get(t)??g(t);if(void 0!==e){const t=e(n);void 0!==t&&(n=s.get(t)??g(t))}return n}case"array":{const e=s.get(t)??function(e){const t=i.ObservableScope.Create((()=>e)),n=new Proxy(e,{get:O,set:m,has:f,ownKeys:p,getOwnPropertyDescriptor:l});return c.set(e,t),s.set(e,n),n}(t);return i.ObservableScope.Touch(c.get(t)),e}default:return t}}return n}const y=b();var g;!function(e){e.Create=function(e){return y(e)},e.Touch=function(e){const t=c.get(e);i.ObservableScope.Update(t)},e.ApplyDiff=function(n,o){const r=[["",n[t.GET_OBSERVABLE_VALUE]]];for(let t=0;t<o.length;t++){const{path:n,value:i}=o[t];let s=0;for(;s<n.length-1;s++){const e=n[s],t=r[s][1],o=s+1;if(r.length<=o)r.push([e,t[e]]);else if(r[o][0]!==e){r[o][0]=e,r[o][1]=t[e];const n=o+1;n<r.length&&(r[n][0]=null)}}const c=r[s][1];c[n[s]]=i,e.Touch(c)}},e.CreateFactory=function(e){return b(e)}}(g||(t.ObservableNode=g={}))},948:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableScope=t.ObservableScopeWrapper=t.ObservableScopeValue=void 0,t.CalcScope=function(e){const t=e();return a&&(u.calcFunctions??=[],u.calcFunctions.push({getFunction:e,value:t})),t};const o=n(116),r=n(496);class i{get Value(){return c.Value(this.scope)}constructor(e){this.scope=e}}t.ObservableScopeValue=i;class s extends i{constructor(e){super(e),e.emitter&&(this.scopeEmitter=o.Emitter.Create(),o.Emitter.On(e.emitter,(()=>o.Emitter.Emit(this.scopeEmitter,this))))}Scope(e){return new c((()=>e(this.Value)))}Watch(e){this.scopeEmitter&&(o.Emitter.On(this.scopeEmitter,e),e(this))}Unwatch(e){this.scopeEmitter&&o.Emitter.Remove(this.scopeEmitter,e)}Destroy(){v(this.scope),this.scopeEmitter&&o.Emitter.Clear(this.scopeEmitter)}}t.ObservableScopeWrapper=s;class c extends s{constructor(e){super(c.Create(e))}}t.ObservableScope=c;let u=null,a=!1;function l(e){const t=e.promise;!function(e){if(!e.dirty)return;e.dirty=!1,e.watchEmitters=null,e.calcFunctions=null;const t=function(e){const t=u,n=a;u=e,a=!0;const o=e.getFunction();return u.watchEmittersSet=null,u=t,a=n,o}(e);e.async?e.promise=t.then((function(t){return e.value=t,t})):e.value=t,function(e){const t=e.watchEmitters;if(null===t){if(e.emitters.length>0){for(let t=0;t<e.emitters.length;t++)o.Emitter.Remove(e.emitters[t],e.setCallback);e.emitters=[]}return}o.Emitter.Sort(t);const n=e.emitters;let r=0,i=0;for(;r<n.length;r++){let s=i;for(;s<t.length&&n[r]!==t[s];s++)o.Emitter.On(t[i],e.setCallback);if(s===t.length)o.Emitter.Remove(n[r],e.setCallback);else{for(let n=i;n<s;n++)o.Emitter.On(t[n],e.setCallback);i=s+1}}for(;i<t.length;i++)o.Emitter.On(t[i],e.setCallback);e.emitters=t}(e)}(e),e.async&&t!==e.promise&&e.promise.then((function(){o.Emitter.Emit(e.emitter,e)}))}!function(e){function t(e){a&&(u.watchEmitters??=[],10===u.watchEmitters.length&&(u.watchEmittersSet??=new Set(u.watchEmitters)),(null===u.watchEmittersSet?u.watchEmitters.includes(e):u.watchEmittersSet.has(e))||(u.watchEmittersSet?.add(e),u.watchEmitters.push(e)))}e.Create=function(e){const t={getFunction:e,value:null,promise:null,async:"AsyncFunction"===e[Symbol.toStringTag],dirty:!0,emitter:o.Emitter.Create(),emitters:[],calcFunctions:null,destroyed:!1,watchEmitters:null,watchEmittersSet:null,setCallback:function(){return p(t)}};return t},e.Register=t,e.Value=function(e){if(e)return t(e.emitter),l(e),e.value},e.Watching=function(){return a},e.Touch=function(e){e&&e.emitter&&t(e.emitter)},e.Watch=function(e,t){e&&e.emitter&&o.Emitter.On(e.emitter,t)},e.Unwatch=function(e,t){e&&e.emitter&&o.Emitter.Remove(e.emitter,t)},e.Update=function(e){p(e)},e.Destroy=function(e){v(e)}}(c||(t.ObservableScope=c={}));const d=r.List.Create();function f(){const e=r.List.Split(d,0);for(let t=e.head;null!==t;t=t.next)l(t.data);r.List.Clear(e)}function h(e){const t=e.getFunction(),n=e.value!==t;return e.value=t,n}function p(e){return!e||e.dirty||e.destroyed?e?.destroyed:(function(e){e.dirty=null===e.calcFunctions||e.calcFunctions.some(h),e.dirty&&(e.async?function(e){r.List.Add(d,e),1===d.size&&queueMicrotask(f)}(e):o.Emitter.Emit(e.emitter,e))}(e),!1)}function v(e){if(!e)return;const t=e.emitters;e.emitters=null,e.emitter=null,e.getFunction=null,e.setCallback=null,e.calcFunctions=null,e.destroyed=!0;for(let n=0;n<t.length;n++)o.Emitter.Remove(t[n],e.setCallback)}},890:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableNode=t.ObservableScope=t.StoreAsync=t.StoreSync=void 0;var o=n(961);Object.defineProperty(t,"StoreSync",{enumerable:!0,get:function(){return o.StoreSync}});var r=n(161);Object.defineProperty(t,"StoreAsync",{enumerable:!0,get:function(){return r.StoreAsync}});var i=n(948);Object.defineProperty(t,"ObservableScope",{enumerable:!0,get:function(){return i.ObservableScope}});var s=n(318);Object.defineProperty(t,"ObservableNode",{enumerable:!0,get:function(){return s.ObservableNode}})},20:(e,t)=>{var n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.Animation=t.AnimationType=void 0,function(e){e.EaseIn=function*(e){for(var t=1/e,n=t,o=0;o<e;o++,n+=t)yield(1-n)*(1-n)*(1-n)*0+3*(1-n)*(1-n)*n*1+3*(1-n)*n*n*1+n*n*n*1},e.Linear=function*(e){for(var t=1/e,n=t,o=0;o<e;o++,n+=t)yield n}}(n||(n={})),function(e){e[e.Linear=0]="Linear",e[e.EaseIn=1]="EaseIn"}(o||(t.AnimationType=o={})),t.Animation=class{get Running(){return this.running}get Start(){return this.start}get End(){return this.end}get Enabled(){return this.enabled}constructor(e,t,n){this.running=!1,this.start=null,this.end=null,this.enabled=!0,this.type=e,this.frameCount=Math.ceil(t/1e3*60),this.frameTimings=[];for(var o=t/this.frameCount,r=0;r<this.frameCount;r++)this.frameTimings[r]=(r+1)*o;this.update=n,this.animationTimeouts=[]}Animate(e,t){if(this.enabled){var r=t-e;if(0!==r)return this.Cancel(),this.running=!0,this.start=e,this.end=t,new Promise((t=>{var i=n[o[this.type]],s=0;for(var c of i(this.frameCount)){var u=c*r+e;this.SetTimeout(s,u,s===this.frameCount-1?t:null),s++}})).then((()=>{this.running=!1,this.start=null,this.end=null}))}}Disable(){this.Cancel(),this.enabled=!1}Enable(){this.enabled=!0}Cancel(){for(var e=0;e<this.animationTimeouts.length;e++)clearTimeout(this.animationTimeouts[e]);this.running=!1,this.start=null,this.end=null}Destroy(){this.Cancel()}SetTimeout(e,t,n){this.animationTimeouts[e]=setTimeout((()=>{this.update(t),n&&n()}),this.frameTimings[e])}}},959:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RemoveNulls=function(e,t=0){let n=t;for(;n<e.length&&null!==e[n];n++);let o=n+1;for(;o<e.length&&null===e[o];o++);for(;o<e.length;)for(e[n]=e[o],n++,o++;o<e.length&&null===e[o];o++);e.splice(n)},t.ArrayDiff=function(e,t){if(e===t)return!1;if(!e||!t||e.length!==t.length)return!0;let n=0;for(;n<e.length&&e[n]===t[n];n++);return n<e.length}},263:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncQueue=void 0;const o=n(496);t.AsyncQueue=class{constructor(){this.running=!1,this.queue=o.List.Create()}Next(e){const t=new Promise(((t,n)=>{o.List.Add(this.queue,(async function(){try{const n=await e();t(n)}catch(e){n(e)}}))}));return this.Start(),t}Stop(){o.List.Clear(this.queue)}Start(){this.running||(this.running=!0,this.ExecuteQueue())}async ExecuteQueue(){const e=o.List.Pop(this.queue);null!==e?(await e(),this.ExecuteQueue()):this.running=!1}}},334:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.State=function(){return d},t.Value=function(){return f},t.Scope=function(){return h},t.Inject=function(e){return p.bind(null,e)},t.Destroy=v,t.PreReqTemplate=y,t.PreReq=m;const o=n(948),r=n(318),i=new WeakMap,s=new WeakMap,c=new WeakMap;function u(e){const t=i.get(e)??{};return i.set(e,t),t}function a(e){const t=s.get(e)??{};return s.set(e,t),t}function l(e){const t=c.get(e)??[];return c.set(e,t),t}function d(e,t){return{configurable:!1,enumerable:!0,get:function(){const e=u(this);return e[t]??=r.ObservableNode.Create({root:void 0}),e[t].root},set:function(e){const n=u(this);void 0===n[t]?n[t]=r.ObservableNode.Create({root:e}):n[t].root=e}}}function f(e,t){return{configurable:!1,enumerable:!0,get:function(){const e=a(this),n=e[t]??=[null,void 0];return n[0]??=function(e){return o.ObservableScope.Create((function(){return e[1]}))}(n),o.ObservableScope.Value(n[0])},set:function(e){const n=a(this);n[t]??=[null,void 0];const r=n[t];r[1]=e,o.ObservableScope.Update(r[0])}}}function h(e,t,n){if(!n||!n.get)throw"Scope decorator requires a getter";if(n&&n.set)throw"Scope decorator does not support setters";const r=n.get;return{configurable:!1,enumerable:!0,get:function(){const e=a(this);e[t]??=[null,void 0];const n=e[t];return null===n[0]&&(n[0]=o.ObservableScope.Create(r.bind(this))),o.ObservableScope.Value(n[0])}}}function p(e,t,n,o){return{configurable:!1,enumerable:!0,get:function(){return this.Injector.Get(e)},set:function(t){this.Injector.Set(e,t)}}}function v(){return b}function b(e,t){l(e).push(t)}function y(e){return g.bind(null,e)}function g(e,t){t.prototype.PreReqTemplateDecorator_Template=e}function m(){return O}function O(e,t){var n=e;n.PreReqDecorator_PreReqs=n.PreReqDecorator_PreReqs||[],n.PreReqDecorator_PreReqs.push(t)}!function(e){e.All=function(e){const t=s.get(e);if(void 0!==t){const e=Object.keys(t);for(let n=0;n<e.length;n++)o.ObservableScope.Destroy(t[e[n]][0])}const n=l(Object.getPrototypeOf(e));for(let t=0;t<n.length;t++)e[n[t]].Destroy()}}(v||(t.Destroy=v={})),function(e){e.Get=function(e){var t=e&&e.PreReqTemplateDecorator_Template,n=t?t():[];return Array.isArray(n)||(n=[n]),n}}(y||(t.PreReqTemplate=y={})),function(e){function t(e){return e&&e.PreReqDecorator_PreReqs||[]}e.All=function(e){var n=t(e).map((t=>e[t]&&e[t].Init||Promise.resolve()));return Promise.all(n)},e.Has=function(e){return t(e).length>0}}(m||(t.PreReq=m={}))},116:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=void 0;const o=n(959);var r;!function(e){let t=0;function n(e,t){return e[0]-t[0]}e.Create=function(){return[++t]},e.On=function(e,t){e.push(t)},e.Emit=function(e,...t){let n=!1;for(let o=1;o<e.length;o++)null!==e[o]&&!0!==e[o](...t)||(n=!0,e[o]=null);n&&(0,o.RemoveNulls)(e)},e.Remove=function(e,t){const n=e.indexOf(t);n>=1&&(e[n]=null)},e.Clear=function(e){e.splice(0)},e.Sort=function(e){return e.sort(n)}}(r||(t.Emitter=r={}))},586:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(334),t),r(n(20),t)},880:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Injector=void 0;class n{constructor(){this.parent=n.Current(),this.typeMap=new Map}Get(e){if(0===this.typeMap.size)return this.parent&&this.parent.Get(e);var t=this.typeMap.get(e);return t||(t=this.parent&&this.parent.Get(e)),t}Set(e,t){this.typeMap.set(e,t)}}t.Injector=n,function(e){var t=null;function n(){return t}e.Current=n,e.Scope=function(e,o,...r){var i=n();t=e;const s=o(...r);return t=i,s}}(n||(t.Injector=n={}))},874:(e,t)=>{var n;function o(){const e=Object.getPrototypeOf({}),t=Object.getPrototypeOf([]),n=Object.getPrototypeOf(""),o=Object.getPrototypeOf(0);function r(r){if(null==r)return"value";switch(Object.getPrototypeOf(r)){case n:case o:return"value";case e:return"object";case t:return"array"}return Array.isArray(r)?"array":"value"}function i(e,t,n,o){if(t===n)return!1;const s=r(t),c=r(n),u=o.length;let a=!0;if(s===c)switch(s){case"array":a=function(e,t,n,o){if(0===n.length||0===t.length)return n.length!==t.length;let r=!0;if(t.length!==n.length&&o.push({path:e.concat("length"),value:t.length}),t.length>0||n.length>0)for(let s=0;s<t.length;s++){const c=e.concat(s),u=n[s];r=i(c,t[s],u,o)&&r}else r=!1;return r}(e,t,n,o);break;case"object":a=function(e,t,n,o){const r=Object.keys(t).sort(),s=Object.keys(n).sort();if(0===r.length&&0===s.length)return!1;if(r.length<s.length)return!0;let c=0,u=0;for(;c<r.length;){const a=e.concat(r[c]);u<s.length&&r[c]===s[u]?(i(a,t[r[c]],n[s[u]],o),u++):void 0!==t[r[c]]&&o.push({path:a,value:t[r[c]]}),c++}return u<s.length}(e,t,n,o)}return!!a&&(o.length>u&&o.splice(u),o.push({path:e,value:t}),!0)}return{JsonDiff:function(e,t,n,o){const r=o??[];return i(n?n.split("."):[],e,t,r),r},JsonType:r,JsonDeepClone:function e(t){switch(r(t)){case"array":return t.map(e);case"object":{const n={},o=Object.keys(t);for(let r=0;r<o.length;r++)n[o[r]]=e(t[o[r]]);return n}default:return t}},JsonMerge:function e(t,n){if(void 0===n)return t;const o=r(t);if(o!==r(n))return n;switch(o){case"array":{const o=n;return t.map((function(t,n){return e(t,o[n])}))}case"object":{const o=t,r=n,i=Object.keys(o),s={};for(let t=0;t<i.length;t++)s[i[t]]=e(o[i[t]],r[i[t]]);return s}default:return n}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.JsonMerge=t.JsonDeepClone=t.JsonType=t.JsonDiff=void 0,t.JsonDiffFactory=o,n=o(),t.JsonDiff=n.JsonDiff,t.JsonType=n.JsonType,t.JsonDeepClone=n.JsonDeepClone,t.JsonMerge=n.JsonMerge},130:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JsonType=void 0;var o=n(874);Object.defineProperty(t,"JsonType",{enumerable:!0,get:function(){return o.JsonType}})},496:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),t.List=void 0,function(e){let t=0,n=!1;const o={head:null,tail:null,size:0};function r(e){const t=a(o)??{previous:null,next:null,data:null};return t.data=e,t}function i(){n=!1,t<o.size&&(t=o.size);const e=Math.floor(t/10);u(o,e)}function s(){n||(n=!0,requestIdleCallback(i))}function c(e){e&&(e.previous=null,e.next=null,e.data=null,l(o,e),s())}function u(e,t){let n=0,o=e.head;for(;o&&n<t;)o=o.next,n++;const r={head:null,tail:null,size:0};return o&&(r.head=o,r.tail=e.tail,r.size=e.size-t,e.tail=o.previous,e.size=t,0===e.size?e.head=null:e.tail.next=null,o.previous=null),r}function a(e){if(0===e.size)return null;const t=e.head;return e.head=t.next,e.head&&(e.head.previous=null),e.size--,0===e.size&&(e.tail=null),t.previous=null,t.next=null,t}function l(e,t){return 0===e.size?(e.head=t,e.tail=t,e.size=1):(t.previous=e.tail,e.tail.next=t,e.tail=t,e.size++),t}function d(e,t){if(0!==t.size){if(0===e.size)return e.head=t.head,t.head=null,e.tail=t.tail,t.tail=null,e.size=t.size,void(t.size=0);e.tail.next=t.head,t.head.previous=e.tail,e.tail=t.tail,e.size+=t.size,t.head=null,t.tail=null,t.size=0}}e.Create=function(){return{head:null,tail:null,size:0}},e.Split=u,e.Clear=function(e){let t=e.head;for(;t;)t.data=null,t=t.next;d(o,e),s()},e.Push=function(e,t){const n=r(t);return 0===e.size?(e.head=n,e.tail=n,e.size=1):(n.next=e.head,e.head.previous=n,e.head=n,e.size++),n},e.PopNode=a,e.Pop=function(e){const t=a(e),n=t?.data;return c(t),n},e.Add=function(e,t){return l(e,r(t))},e.AddNode=l,e.AddBefore=function(t,n,o){if(!n)return e.Add(t,o);const i=r(o),s=n.previous;return i.next=n,n.previous=i,t.head===n&&(t.head=i),s&&(s.next=i,i.previous=s),t.size++,i},e.AddAfter=function(t,n,o){if(!n)return e.Push(t,o);const i=r(o),s=n.next;return n.next=i,i.previous=n,t.tail===n&&(t.tail=i),s&&(s.previous=i,i.next=s),t.size++,i},e.Remove=function(e){if(0===e.size)return null;var t=e.tail;e.tail=t.previous,e.tail&&(e.tail.next=null),e.size--,0===e.size&&(e.head=null);const n=t.data;return c(t),n},e.RemoveNode=function(e,t){if(e.head===t)e.head=t.next;else if(e.tail===t)e.tail=t.previous;else{const e=t.previous,n=t.next;e.next=n,n.previous=e}t.next=t.previous=null,e.size--,e.size>0&&(e.head.previous=e.tail.next=null)},e.ForEach=function(e,t){let n=e.head;for(;n;)t(n.data),n=n.next},e.Append=d,e.ToNodeMap=function(e,t){const n=new Map;for(let o=e.head;null!==o;o=o.next){const e=t(o.data),r=n.get(e);void 0===r?n.set(e,[o]):r[r.length]=o}return n}}(n||(t.List=n={}))},224:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Schedule=b,t.After=function(e){v(e,!1,!1)},t.Callback=function(e){return function(t,n,o,r){b((function(){e(t,n,o,r)}))}},t.Synch=g,t.Thread=m,t.ThreadAsync=function(e){return new Promise((t=>m((function(n){e(n),m(t)}))))};const o=n(496),r=16,i=o.List.Create();let s=null,c=!1;const u=setTimeout;function a(){return this.end-Date.now()}function l(){return{end:Date.now()+r,timeRemaining:a}}function d(e=l()){let t;for(;e.timeRemaining()>0&&(t=o.List.Pop(i));)p(t,e);i.size>0?u(d):c=!1}function f(e){o.List.Add(i,e),c||(c=!0,u(d))}function h(e,t){const n=e.workEndNode;e.workEndNode=e.workList.head,t(!0),e.workEndNode=n}function p(e,t=l()){const n=s;s=e;const r=e.async;let i;for(;r===e.async&&t.timeRemaining()>0&&(i=o.List.Pop(e.workList));)h(e,i);e.workList.size>0&&f(e),s=n}function v(e,t,n){s=s||{async:!1,workEndNode:null,workList:o.List.Create()},s.async=s.async||n,t?o.List.AddBefore(s.workList,s.workEndNode,e):s.workEndNode?o.List.AddAfter(s.workList,s.workEndNode,e):s.workEndNode=o.List.Add(s.workList,e)}function b(e){v(e,!0,!0)}var y=!1;function g(e){s||y?e(!1):(y=!0,function(e){e(!1),s&&(s.async?f(s):p(s)),s=null}(e),y=!1)}function m(e){s?v(e,!0,!1):g(e)}},156:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.calc=t.Component=void 0;var o=n(342);Object.defineProperty(t,"Component",{enumerable:!0,get:function(){return o.Component}});var r=n(948);Object.defineProperty(t,"calc",{enumerable:!0,get:function(){return r.CalcScope}})},576:function(e,t,n){var o=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,r)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||o(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableNode=t.ObservableScope=void 0,r(n(156),t),r(n(586),t);var i=n(890);Object.defineProperty(t,"ObservableScope",{enumerable:!0,get:function(){return i.ObservableScope}}),Object.defineProperty(t,"ObservableNode",{enumerable:!0,get:function(){return i.ObservableNode}}),r(n(147),t)}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var n=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(n.exports,n,n.exports,__webpack_require__),n.exports}var __webpack_exports__={};(()=>{const e=__webpack_require__(576);for(var t in e)window[t]=e[t]})()})();
|
|
2
2
|
//# sourceMappingURL=jTemplates.js.map
|