@aurelia/runtime-html
Advanced tools
Comparing version 0.3.0-dev.20190117 to 0.3.0-dev.20190127
import { IIndexable, IServiceLocator } from '@aurelia/kernel'; | ||
import { DelegationStrategy, IBinding, IBindScope, IConnectableBinding, IDOM, IsBindingBehavior, IScope, LifecycleFlags, State } from '@aurelia/runtime'; | ||
import { DelegationStrategy, IBinding, IConnectableBinding, IDOM, IsBindingBehavior, IScope, LifecycleFlags, State } from '@aurelia/runtime'; | ||
import { IEventManager } from '../observation/event-manager'; | ||
@@ -8,4 +8,4 @@ export interface Listener extends IConnectableBinding { | ||
dom: IDOM; | ||
$nextBind: IBindScope; | ||
$prevBind: IBindScope; | ||
$nextBinding: IBinding; | ||
$prevBinding: IBinding; | ||
$state: State; | ||
@@ -26,5 +26,5 @@ $scope: IScope; | ||
$unbind(flags: LifecycleFlags): void; | ||
observeProperty(obj: IIndexable, propertyName: string): void; | ||
observeProperty(flags: LifecycleFlags, obj: IIndexable, propertyName: string): void; | ||
handleChange(newValue: unknown, previousValue: unknown, flags: LifecycleFlags): void; | ||
} | ||
//# sourceMappingURL=listener.d.ts.map |
import { Constructable, IRegistry } from '@aurelia/kernel'; | ||
import { ICustomElementType, IDOM, INode, IRenderContext, IRenderingEngine, ITemplate, IView, IViewFactory, TemplateDefinition } from '@aurelia/runtime'; | ||
import { ICustomElementType, IDOM, INode, IRenderContext, IRenderingEngine, ITemplate, IView, IViewFactory, LifecycleFlags, TemplateDefinition } from '@aurelia/runtime'; | ||
import { HTMLTargetedInstruction } from './definitions'; | ||
@@ -14,5 +14,5 @@ export declare function createElement<T extends INode = Node>(dom: IDOM<T>, tagOrType: string | Constructable, props?: Record<string, string | HTMLTargetedInstruction>, children?: ArrayLike<unknown>): RenderPlan<T>; | ||
getElementTemplate(engine: IRenderingEngine, Type?: ICustomElementType<T>): ITemplate<T>; | ||
createView(engine: IRenderingEngine, parentContext?: IRenderContext): IView; | ||
createView(flags: LifecycleFlags, engine: IRenderingEngine, parentContext?: IRenderContext): IView; | ||
getViewFactory(engine: IRenderingEngine, parentContext?: IRenderContext): IViewFactory; | ||
} | ||
//# sourceMappingURL=create-element.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { AttributeInstruction, DelegationStrategy, Interpolation, IsBindingBehavior, ITargetedInstruction, NodeInstruction } from '@aurelia/runtime'; | ||
import { AttributeInstruction, DelegationStrategy, IInterpolationExpression, IsBindingBehavior, ITargetedInstruction, NodeInstruction } from '@aurelia/runtime'; | ||
export declare const enum HTMLTargetedInstructionType { | ||
@@ -15,3 +15,3 @@ textBinding = "ha", | ||
type: HTMLTargetedInstructionType.textBinding; | ||
from: string | Interpolation; | ||
from: string | IInterpolationExpression; | ||
} | ||
@@ -18,0 +18,0 @@ export interface IListenerBindingInstruction extends ITargetedInstruction { |
@@ -21,5 +21,7 @@ import { IContainer, IResolver } from '@aurelia/kernel'; | ||
readonly HTMLElement: typeof HTMLElement; | ||
private readonly wnd; | ||
private readonly doc; | ||
constructor(wnd: Window, doc: Document, TNode: typeof Node, TElement: typeof Element, THTMLElement: typeof HTMLElement); | ||
readonly CustomEvent: typeof CustomEvent; | ||
readonly window: Window; | ||
readonly document: Document; | ||
constructor(window: Window, document: Document, TNode: typeof Node, TElement: typeof Element, THTMLElement: typeof HTMLElement, TCustomEvent: typeof CustomEvent); | ||
static register(container: IContainer): IResolver<HTMLDOM>; | ||
addEventListener(eventName: string, subscriber: EventListenerOrEventListenerObject, publisher?: Node, options?: boolean | AddEventListenerOptions): void; | ||
@@ -31,2 +33,5 @@ appendChild(parent: Node, child: Node): void; | ||
createElement(name: string): HTMLElement; | ||
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>; | ||
createCustomEvent<T = any>(eventType: string, options?: CustomEventInit<T>): CustomEvent<T>; | ||
dispatchEvent(evt: Event): void; | ||
createNodeObserver(node: Node, cb: MutationCallback, init: MutationObserverInit): MutationObserver; | ||
@@ -45,4 +50,6 @@ createTemplate(markup?: unknown): HTMLTemplateElement; | ||
} | ||
declare const $DOM: HTMLDOM; | ||
export { $DOM as DOM }; | ||
export interface AuMarker extends INode { | ||
} | ||
//# sourceMappingURL=dom.d.ts.map |
import { InterfaceSymbol, IRegistry } from '@aurelia/kernel'; | ||
import { IDOM, IExpressionParser, IInstructionRenderer, IObserverLocator, IRenderable, IRenderContext } from '@aurelia/runtime'; | ||
import { IDOM, IExpressionParser, IInstructionRenderer, IObserverLocator, IRenderable, IRenderContext, LifecycleFlags } from '@aurelia/runtime'; | ||
import { IListenerBindingInstruction, ISetAttributeInstruction, IStylePropertyBindingInstruction, ITextBindingInstruction } from './definitions'; | ||
@@ -11,3 +11,3 @@ import { IEventManager } from './observation/event-manager'; | ||
constructor(parser: IExpressionParser, observerLocator: IObserverLocator); | ||
render(dom: IDOM, context: IRenderContext, renderable: IRenderable, target: ChildNode, instruction: ITextBindingInstruction): void; | ||
render(flags: LifecycleFlags, dom: IDOM, context: IRenderContext, renderable: IRenderable, target: ChildNode, instruction: ITextBindingInstruction): void; | ||
} | ||
@@ -20,7 +20,7 @@ export declare class ListenerBindingRenderer implements IInstructionRenderer { | ||
constructor(parser: IExpressionParser, eventManager: IEventManager); | ||
render(dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: IListenerBindingInstruction): void; | ||
render(flags: LifecycleFlags, dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: IListenerBindingInstruction): void; | ||
} | ||
export declare class SetAttributeRenderer implements IInstructionRenderer { | ||
static readonly register: IRegistry['register']; | ||
render(dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: ISetAttributeInstruction): void; | ||
render(flags: LifecycleFlags, dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: ISetAttributeInstruction): void; | ||
} | ||
@@ -33,4 +33,4 @@ export declare class StylePropertyBindingRenderer implements IInstructionRenderer { | ||
constructor(parser: IExpressionParser, observerLocator: IObserverLocator); | ||
render(dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: IStylePropertyBindingInstruction): void; | ||
render(flags: LifecycleFlags, dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: IStylePropertyBindingInstruction): void; | ||
} | ||
//# sourceMappingURL=html-renderer.d.ts.map |
@@ -20,4 +20,4 @@ export { Listener } from './binding/listener'; | ||
export { HTMLAttributeInstruction, HTMLInstructionRow, HTMLNodeInstruction, HTMLTargetedInstruction, HTMLTargetedInstructionType, IListenerBindingInstruction, ISetAttributeInstruction, isHTMLTargetedInstruction, IStylePropertyBindingInstruction, ITextBindingInstruction } from './definitions'; | ||
export { NodeType, HTMLDOM } from './dom'; | ||
export { NodeType, HTMLDOM, DOM } from './dom'; | ||
export { CaptureBindingInstruction, DelegateBindingInstruction, SetAttributeInstruction, StylePropertyBindingInstruction, TextBindingInstruction, TriggerBindingInstruction } from './instructions'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,1 @@ | ||
function __decorate(t,e,s,i){var r,n,o=arguments.length,h=3>o?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.t)h=Reflect.t(t,e,s,i);else for(n=t.length-1;n>=0;n--)(r=t[n])&&(h=(3>o?r(h):o>3?r(e,s,h):r(e,s))||h);return o>3&&h&&Object.defineProperty(e,s,h),h}function findOriginalEventTarget(t){return t.s&&t.s()[0]||t.i&&t.i()[0]||t.path&&t.path[0]||t.target}function stopPropagation(){this.o(),this.h=1}function handleCapturedEvent(t){t.h=0;let e=findOriginalEventTarget(t);const s=[];for(;e;){if(e.l){const i=e.l[t.type];i&&(t.stopPropagation!==stopPropagation&&(t.o=t.stopPropagation,t.stopPropagation=stopPropagation),s.push(i))}e=e.parentNode}for(let e=s.length-1;e>=0&&!t.h;e--){const i=s[e];"handleEvent"in i?i.u(t):i(t)}}function handleDelegatedEvent(t){t.h=0;let e=findOriginalEventTarget(t);for(;e&&!t.h;){if(e.g){const s=e.g[t.type];s&&(t.stopPropagation!==stopPropagation&&(t.o=t.stopPropagation,t.stopPropagation=stopPropagation),"handleEvent"in s?s.u(t):s(t))}e=e.parentNode}}function defaultMatcher$1(t,e){return t===e}function handleSelfEvent(t){const e=findOriginalEventTarget(t);if(this.target===e)return this.p(t)}function isHTMLTargetedInstruction(value){const type=value.type;return"string"==typeof type&&2===type.length}function createElement(dom,t,e,s){return"string"==typeof t?createElementForTag(dom,t,e,s):createElementForType(dom,t,e,s)}function createElementForTag(dom,t,e,s){const instructions=[],i=[],dependencies=[],r=dom.createElement(t);let n=0;return e&&Object.keys(e).forEach(to=>{const value=e[to];isHTMLTargetedInstruction(value)?(n=1,instructions.push(value)):dom.setAttribute(r,to,value)}),n&&(dom.v(r),i.push(instructions)),s&&addChildren(dom,r,s,i,dependencies),new RenderPlan(dom,r,i,dependencies)}function createElementForType(dom,t,e,s){const i=t.description.name,instructions=[],r=[instructions],dependencies=[],n=[],bindables=t.description.bindables,o=dom.createElement(i);return dom.v(o),dependencies.includes(t)||dependencies.push(t),instructions.push(new HydrateElementInstruction(i,n)),e&&Object.keys(e).forEach(to=>{const value=e[to];isHTMLTargetedInstruction(value)?n.push(value):n.push(bindables[to]?{type:"re",to,value}:new SetAttributeInstruction(value,to))}),s&&addChildren(dom,o,s,r,dependencies),new RenderPlan(dom,o,r,dependencies)}function addChildren(dom,t,e,s,dependencies){for(let i=0,r=e.length;r>i;++i){const r=e[i];switch(typeof r){case"string":dom.appendChild(t,dom.createTextNode(r));break;case"object":dom.A(r)?dom.appendChild(t,r):"mergeInto"in r&&r.T(t,s,dependencies)}}}function isRenderLocation(t){return"au-end"===t.textContent}var HTMLTargetedInstructionType,NodeType;import{DI,Registration,Reporter,PLATFORM}from"@aurelia/kernel";import{LifecycleFlags,hasBind,hasUnbind,targetObserver,DelegationStrategy,ITargetObserverLocator,SetterObserver,IDOM,ITargetAccessorLocator,ILifecycle,BindingBehaviorResource,BindingMode,IObserverLocator,buildTemplateDefinition,HydrateElementInstruction,IRenderable,ITargetedInstruction,IRenderingEngine,CompositionCoordinator,bindable,CustomElementResource,INode,ITemplateFactory,CompiledTemplate,NodeSequence,IExpressionParser,instructionRenderer,ensureExpression,MultiInterpolationBinding,InterpolationBinding,addBindable,Binding,IProjectorLocator,BasicConfiguration}from"@aurelia/runtime";class Listener{constructor(dom,t,e,s,i,preventDefault,r,n){this.dom=dom,this.B=null,this.R=null,this.$state=0,this.S=e,this.m=n,this.preventDefault=preventDefault,this.L=s,this.target=i,this.O=t,this.I=r}C(t){const e=this.$scope.M;e.D=t;const s=this.L.evaluate(LifecycleFlags.P,this.$scope,this.m);return delete e.D,1!=s&&this.preventDefault&&t.preventDefault(),s}u(t){this.C(t)}F(t,e){if(2&this.$state){if(this.$scope===e)return;this.N(t|LifecycleFlags.k)}this.$state|=1,this.$scope=e;const s=this.L;hasBind(s)&&s.bind(t,e,this),this._=this.I.addEventListener(this.dom,this.target,this.O,this,this.S),this.$state|=2,this.$state&=-2}N(t){if(!(2&this.$state))return;this.$state|=64;const e=this.L;hasUnbind(e)&&e.j(t,this.$scope,this),this.$scope=null,this._.V(),this._=null,this.$state&=-67}H(t,e){}U(t,e,s){}}let AttributeNSAccessor=class{constructor(t,e,s,i,r){this.$=1,this.attributeName=i,this.q=t,this.G=e,this.oldValue=this.X=this.Z(),this.J=s,this.K=r}Z(){return this.G.getAttributeNS(this.K,this.attributeName)}W(t){this.G.setAttributeNS(this.K,this.attributeName,t)}};AttributeNSAccessor=__decorate([targetObserver("")],AttributeNSAccessor);const handleEventFlags=LifecycleFlags.Y|LifecycleFlags.tt,defaultHandleBatchedChangeFlags=LifecycleFlags.et|LifecycleFlags.st,defaultMatcher=(t,e)=>t===e;let CheckedObserver=class{constructor(t,e,s,i){this.$=1,this._=s,this.q=t,this.G=e,this.it=i}Z(){return this.X}W(t,e){this.rt||(this.rt=this.G.nt&&(this.G.nt.ot||this.G.nt.value),this.rt&&this.rt.subscribe(this)),this.ht&&(this.ht.ct(this),this.ht=null),"checkbox"===this.G.type&&Array.isArray(t)&&(this.ht=this.it.at(t),this.ht.lt(this)),this.ut()}dt(){this.ut(),this.gt(defaultHandleBatchedChangeFlags)}U(t,e,s){this.ut(),this.gt(s)}ut(){const value=this.X,t=this.G,e=t.hasOwnProperty("model")?t.ot:t.value,s=t.bt||defaultMatcher;t.checked="radio"===t.type?!!s(value,e):1==value?1:Array.isArray(value)?-1!==value.findIndex(t=>!!s(t,e)):0}gt(t){t&LifecycleFlags.k||this.X!==this.oldValue&&this.pt(this.X,this.oldValue,t)}u(){let value=this.X;const t=this.G,e=t.hasOwnProperty("model")?t.ot:t.value;let s;const i=t.bt||defaultMatcher;if("checkbox"===t.type){if(Array.isArray(value))return s=value.findIndex(t=>!!i(t,e)),void(t.checked&&-1===s?value.push(e):t.checked||-1===s||value.splice(s,1));value=t.checked}else{if(!t.checked)return;value=e}this.oldValue=this.X,this.X=value,this.gt(handleEventFlags)}subscribe(t){this.ft()||this._.subscribe(this.G,this),this.vt(t)}unsubscribe(t){this.At(t)&&!this.ft()&&this._.V()}j(){this.ht&&(this.ht.ct(this),this.ht=null),this.rt&&this.rt.unsubscribe(this)}};CheckedObserver=__decorate([targetObserver()],CheckedObserver);let ClassAttributeAccessor=class{constructor(t,e){this.$=1,this.Tt=1,this.q=t,this.Bt=null,this.G=e,this.version=0}Z(){return this.X}W(t){const e=this.Bt||{};let s,name,i=this.version;if(t.length){const r=this.G;for(let n=0,o=(s=t.split(/\s+/)).length;o>n;n++)(name=s[n]).length&&(e[name]=i,r.classList.add(name))}if(this.Bt=e,this.version+=1,0!==i)for(name in i-=1,e)e.hasOwnProperty(name)&&e[name]===i&&this.G.classList.remove(name)}};ClassAttributeAccessor=__decorate([targetObserver("")],ClassAttributeAccessor);let DataAttributeAccessor=class{constructor(t,e,s){this.$=1,this.q=t,this.G=e,this.oldValue=this.X=this.Z(),this.J=s}Z(){return this.G.getAttribute(this.J)}W(t){null===t?this.G.removeAttribute(this.J):this.G.setAttribute(this.J,t)}};DataAttributeAccessor=__decorate([targetObserver()],DataAttributeAccessor);let ElementPropertyAccessor=class{constructor(t,e,s){this.$=1,this.q=t,this.G=e,this.J=s}Z(){return this.G[this.J]}W(value){this.G[this.J]=value}};ElementPropertyAccessor=__decorate([targetObserver("")],ElementPropertyAccessor);class ListenerTracker{constructor(dom,t,e,s){this.dom=dom,this.Rt=s,this.count=0,this.St=t,this.listener=e}Lt(){this.count++,1===this.count&&this.dom.addEventListener(this.St,this.listener,null,this.Rt)}Et(){this.count--,0===this.count&&this.dom.removeEventListener(this.St,this.listener,null,this.Rt)}V(){this.count>0&&(this.count=0,this.dom.removeEventListener(this.St,this.listener,null,this.Rt))}}class DelegateOrCaptureSubscription{constructor(t,e,s,i){this.Ot=t,this.yt=e,this.O=s,e[s]=i}V(){this.Ot.Et(),this.yt[this.O]=null}}class TriggerSubscription{constructor(dom,t,e,s){this.dom=dom,this.target=t,this.O=e,this.It=s,dom.addEventListener(e,s,t)}V(){this.dom.removeEventListener(this.O,this.It,this.target)}}class EventSubscriber{constructor(dom,t){this.dom=dom,this.Ct=t,this.target=null,this._=null}subscribe(t,e){this.target=t,this._=e;const s=this.dom.addEventListener,i=this.Ct;for(let r=0,n=i.length;n>r;++r)s(i[r],e,t)}V(){const t=this.target,e=this._,s=this.Ct,i=this.dom.removeEventListener;for(let r=0,n=s.length;n>r;++r)i(s[r],e,t);this.target=this._=null}}const IEventManager=DI.Mt("IEventManager").wt(t=>t.singleton(EventManager));class EventManager{constructor(){this.Dt={},this.Pt={},this.Dt={},this.Pt={}}addEventListener(dom,t,e,s,strategy){let i,r,n;if(strategy===DelegationStrategy.Ft){(n=(i=this.Dt)[e]||(i[e]=new ListenerTracker(dom,e,handleDelegatedEvent,0))).Lt();const r=t.g||(t.g={});return new DelegateOrCaptureSubscription(n,r,e,s)}if(strategy===DelegationStrategy.Nt){(n=(r=this.Pt)[e]||(r[e]=new ListenerTracker(dom,e,handleCapturedEvent,1))).Lt();const i=t.l||(t.l={});return new DelegateOrCaptureSubscription(n,i,e,s)}return new TriggerSubscription(dom,t,e,s)}V(){let t;const{Dt:e,Pt:s}=this;for(t in e)e[t].V();for(t in s)s[t].V()}}const handleEventFlags$1=LifecycleFlags.Y|LifecycleFlags.tt,childObserverOptions={kt:1,xt:1,_t:1};let SelectValueObserver=class{constructor(t,e,s,i,dom){this.$=1,this.q=t,this.G=e,this._=s,this.it=i,this.dom=dom}Z(){return this.X}W(t,e){const s=Array.isArray(t);if(!s&&null!=t&&this.G.multiple)throw Error("Only null or Array instances can be bound to a multi-select.");this.ht&&(this.ht.ct(this),this.ht=null),s&&(this.ht=this.it.at(t),this.ht.lt(this)),this.jt(),this.gt(e)}dt(t){this.jt(t)}U(t,e,s){this.Vt(t,s)}gt(t){if(t&LifecycleFlags.k)return;const e=this.oldValue,s=this.X;s!==e&&this.pt(s,e,t)}u(){this.Ht()&&this.gt(handleEventFlags$1)}jt(t){const e=this.X,s=Array.isArray(e),i=this.G,r=i.bt||defaultMatcher$1,n=i.options;let o=n.length;for(;o--;){const t=n[o],i=t.hasOwnProperty("model")?t.ot:t.value;t.selected=s?-1!==e.findIndex(t=>!!r(i,t)):!!r(i,e)}}Ht(){const t=this.G,e=t.options,s=e.length,i=this.X;let r=0;if(t.multiple){if(!Array.isArray(i))return 1;let n;const o=t.bt||defaultMatcher$1,h=[];for(;s>r;)(n=e[r]).selected&&h.push(n.hasOwnProperty("model")?n.ot:n.value),++r;for(r=0;i.length>r;){const t=i[r];-1===h.findIndex(e=>!!o(t,e))?i.splice(r,1):++r}for(r=0;h.length>r;){const t=h[r];-1===i.findIndex(e=>!!o(t,e))&&i.push(t),++r}return 0}let value=null;for(;s>r;){const t=e[r];if(t.selected){value=t.hasOwnProperty("model")?t.ot:t.value;break}++r}return this.oldValue=this.X,this.X=value,1}subscribe(t){this.ft()||this._.subscribe(this.G,this),this.vt(t)}unsubscribe(t){this.At(t)&&!this.ft()&&this._.V()}bind(){this.Ut=this.dom.$t(this.G,this.qt.bind(this),childObserverOptions)}j(){this.Ut.disconnect(),this.Ut=null,this.ht&&(this.ht.ct(this),this.ht=null)}qt(){this.jt(),this.Ht()&&this.gt(handleEventFlags$1)}};SelectValueObserver=__decorate([targetObserver()],SelectValueObserver);let StyleAttributeAccessor=class{constructor(t,e){this.$=1,this.oldValue=this.X=e.style.cssText,this.q=t,this.G=e,this.zt=null,this.version=0}Z(){return this.G.style.cssText}Gt(t,value){let e="";null!=value&&"function"==typeof value.indexOf&&-1!==value.indexOf("!important")&&(e="important",value=value.replace("!important","")),this.G.style.setProperty(t,value,e)}W(t){const e=this.zt||{};let s,i=this.version;if(null!==t)if(t instanceof Object){let value;for(s in t)t.hasOwnProperty(s)&&(value=t[s],e[s=s.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)]=i,this.Gt(s,value))}else if(t.length){const r=/\s*([\w\-]+)\s*:\s*((?:(?:[\w\-]+\(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[\w\-]+\(\s*(?:[^"](?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^\)]*)\),?|[^\)]*)\),?|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^;]*),?\s*)+);?/g;let n;for(;null!==(n=r.exec(t));)(s=n[1])&&(e[s]=i,this.Gt(s,n[2]))}if(this.zt=e,this.version+=1,0!==i)for(s in i-=1,e)e.hasOwnProperty(s)&&e[s]===i&&this.G.style.removeProperty(s)}};StyleAttributeAccessor=__decorate([targetObserver()],StyleAttributeAccessor);const inputValueDefaults={button:"",Xt:"on",color:"#000000",Zt:"",Jt:"",email:"",Kt:"",hidden:"",Qt:"",Wt:"",number:"",password:"",Yt:"on",range:"50",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",te:""},handleEventFlags$2=LifecycleFlags.Y|LifecycleFlags.tt;let ValueAttributeObserver=class{constructor(t,e,s,i){if(this.$=1,this._=i,this.q=t,this.G=e,this.J=s,"value"===s){const t=e.type;this.defaultValue=inputValueDefaults[t||"text"],"file"===t&&(this.flush=this.ee)}else this.defaultValue="";this.oldValue=this.X=e[s]}Z(){return this.G[this.J]}W(t,e){this.G[this.J]=t,e&LifecycleFlags.k||this.pt(this.X,this.oldValue,e)}u(){const t=this.oldValue=this.X,e=this.X=this.Z();t!==e&&(this.pt(e,t,handleEventFlags$2),this.oldValue=e)}subscribe(t){this.ft()||(this.oldValue=this.Z(),this._.subscribe(this.G,this)),this.vt(t)}unsubscribe(t){this.At(t)&&!this.ft()&&this._.V()}ee(){const t=this.X;this.oldValue!==t&&""===t&&(this.W(t,this.se),this.oldValue=this.X)}};ValueAttributeObserver=__decorate([targetObserver("")],ValueAttributeObserver);const xlinkNS="http://www.w3.org/1999/xlink",xmlNS="http://www.w3.org/XML/1998/namespace",xmlnsNS="http://www.w3.org/2000/xmlns/",nsAttributes=(function(t){return t["ie"]=["actuate",xlinkNS],t["re"]=["arcrole",xlinkNS],t["ne"]=["href",xlinkNS],t["oe"]=["role",xlinkNS],t["he"]=["show",xlinkNS],t["ce"]=["title",xlinkNS],t["ae"]=["type",xlinkNS],t["le"]=["lang",xmlNS],t["ue"]=["space",xmlNS],t.de=["xmlns",xmlnsNS],t["ge"]=["xlink",xmlnsNS],t})(Object.create(null)),inputEvents=["change","input"],selectEvents=["change"],contentEvents=["change","input","blur","keyup","paste"],scrollEvents=["scroll"],overrideProps=(function(t){return t.be=1,t.style=1,t.pe=1,t.checked=1,t.value=1,t.ot=1,t["ie"]=1,t["re"]=1,t["ne"]=1,t["oe"]=1,t["he"]=1,t["ce"]=1,t["ae"]=1,t["le"]=1,t["ue"]=1,t.de=1,t["ge"]=1,t})(Object.create(null));class TargetObserverLocator{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITargetObserverLocator,this).register(t)}fe(t,e,s,i){switch(i){case"checked":return new CheckedObserver(t,s,new EventSubscriber(this.dom,inputEvents),e);case"value":return"SELECT"===s.tagName?new SelectValueObserver(t,s,new EventSubscriber(this.dom,selectEvents),e,this.dom):new ValueAttributeObserver(t,s,i,new EventSubscriber(this.dom,inputEvents));case"files":return new ValueAttributeObserver(t,s,i,new EventSubscriber(this.dom,inputEvents));case"textContent":case"innerHTML":return new ValueAttributeObserver(t,s,i,new EventSubscriber(this.dom,contentEvents));case"scrollTop":case"scrollLeft":return new ValueAttributeObserver(t,s,i,new EventSubscriber(this.dom,scrollEvents));case"class":return new ClassAttributeAccessor(t,s);case"style":case"css":return new StyleAttributeAccessor(t,s);case"model":return new SetterObserver(s,i);case"role":return new DataAttributeAccessor(t,s,i);default:if(void 0!==nsAttributes[i]){const e=nsAttributes[i];return new AttributeNSAccessor(t,s,i,e[0],e[1])}const r=i.slice(0,5);if("aria-"===r||"data-"===r)return new DataAttributeAccessor(t,s,i)}return null}ve(t,e){return 1==overrideProps[e]}Ae(t){return this.dom.A(t)}}TargetObserverLocator.inject=[IDOM];class TargetAccessorLocator{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITargetAccessorLocator,this).register(t)}Te(t,e,s){switch(s){case"textContent":return new ElementPropertyAccessor(t,e,s);case"class":return new ClassAttributeAccessor(t,e);case"style":case"css":return new StyleAttributeAccessor(t,e);case"src":case"href":case"role":return new DataAttributeAccessor(t,e,s);default:if(void 0!==nsAttributes[s]){const i=nsAttributes[s];return new AttributeNSAccessor(t,e,s,i[0],i[1])}const i=s.slice(0,5);return"aria-"===i||"data-"===i?new DataAttributeAccessor(t,e,s):new ElementPropertyAccessor(t,e,s)}}Ae(t){return this.dom.A(t)}}TargetAccessorLocator.inject=[IDOM];const ISVGAnalyzer=DI.Mt("ISVGAnalyzer").wt(t=>t.singleton(class{Be(t,e){return 0}}));class AttrBindingBehavior{bind(t,e,s){s.targetObserver=new DataAttributeAccessor(s.m.get(ILifecycle),s.target,s.Re)}j(t,e,s){}}BindingBehaviorResource.Se("attr",AttrBindingBehavior);class SelfBindingBehavior{bind(t,e,s){if(!s.C||!s.O)throw Reporter.error(8);s.p=s.C,s.C=handleSelfEvent}j(t,e,s){s.C=s.p,s.p=null}}BindingBehaviorResource.Se("self",SelfBindingBehavior);class UpdateTriggerBindingBehavior{constructor(t){this.it=t}bind(t,e,s,...i){if(0===i.length)throw Reporter.error(9);if(s.mode!==BindingMode.me&&s.mode!==BindingMode.Le)throw Reporter.error(10);const r=this.it.fe(s.target,s.Re);if(!r._)throw Reporter.error(10);s.targetObserver=r,r.Ee=s.targetObserver._,r._=new EventSubscriber(s.m.get(IDOM),i)}j(t,e,s){s.targetObserver._.V(),s.targetObserver._=s.targetObserver.Ee,s.targetObserver.Ee=null}}UpdateTriggerBindingBehavior.inject=[IObserverLocator],BindingBehaviorResource.Se("updateTrigger",UpdateTriggerBindingBehavior),(function(HTMLTargetedInstructionType){HTMLTargetedInstructionType.Oe="ha",HTMLTargetedInstructionType.ye="hb",HTMLTargetedInstructionType.Ie="hc",HTMLTargetedInstructionType.setAttribute="hd"})(HTMLTargetedInstructionType||(HTMLTargetedInstructionType={}));class TextBindingInstruction{constructor(from){this.type="ha",this.from=from}}class TriggerBindingInstruction{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=1,this.strategy=DelegationStrategy.Ce,this.to=to}}class DelegateBindingInstruction{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=DelegationStrategy.Ft,this.to=to}}class CaptureBindingInstruction{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=DelegationStrategy.Nt,this.to=to}}class StylePropertyBindingInstruction{constructor(from,to){this.type="hc",this.from=from,this.to=to}}class SetAttributeInstruction{constructor(value,to){this.type="hd",this.to=to,this.value=value}}class RenderPlan{constructor(dom,t,instructions,dependencies){this.dom=dom,this.dependencies=dependencies,this.instructions=instructions,this.we=t}get Me(){return this.De||(this.De=buildTemplateDefinition(null,null,this.we,null,"string"==typeof this.we,null,this.instructions,this.dependencies))}Pe(t,e){return t.Pe(this.dom,this.Me,null,e)}Fe(t,e){return this.Ne(t,e).create()}Ne(t,e){return t.Ne(this.dom,this.Me,e)}T(t,instructions,dependencies){this.dom.appendChild(t,this.we),instructions.push(...this.instructions),dependencies.push(...this.dependencies)}}const composeSource={name:"au-compose",containerless:1},composeProps=["subject","composing"];class Compose{constructor(dom,t,e,s,i){this.dom=dom,this.subject=null,this.ke=0,this.xe=i,this._e=null,this.je=t,this.Ve=s,this.xe.He=(()=>{this.ke=0}),this.properties=e.instructions.filter(t=>!composeProps.includes(t.to)).reduce((t,e)=>(e.to&&(t[e.to]=e),t),{})}Ue(t){this.$e(this.subject,null,t),this.xe.Ue(t,this.$scope)}qe(t){this.xe.qe(t)}ze(t){this.xe.ze(t)}Ge(t){this._e=null,this.xe.Ge(t)}Xe(t){this.xe.Xe(t)}Ze(t,e,s){this.$e(t,e,s)}$e(t,e,s){this._e!==t&&(this._e=t,t=t instanceof Promise?t.then(t=>this.Je(t,s)):this.Je(t,s),this.ke=1,this.xe.Ke(t,s))}Je(t,e){const s=this.Qe(t);return s?(s.We(this.Ye.host),s.ts(this.je.$scope),s):null}Qe(t){return t?"lockScope"in t?t:"createView"in t?t.Fe(this.Ve,this.je.$context):"create"in t?t.create():"template"in t?this.Ve.Ne(this.dom,t,this.je.$context).create():createElement(this.dom,t,this.properties,this.Ye.children).Fe(this.Ve,this.je.$context):null}}Compose.inject=[IDOM,IRenderable,ITargetedInstruction,IRenderingEngine,CompositionCoordinator],__decorate([bindable],Compose.prototype,"subject",void 0),__decorate([bindable],Compose.prototype,"composing",void 0),CustomElementResource.Se(composeSource,Compose),(function(NodeType){NodeType[NodeType.Element=1]="Element",NodeType[NodeType.Attr=2]="Attr",NodeType[NodeType.Text=3]="Text",NodeType[NodeType.CDATASection=4]="CDATASection",NodeType[NodeType.EntityReference=5]="EntityReference",NodeType[NodeType.Entity=6]="Entity",NodeType[NodeType.ProcessingInstruction=7]="ProcessingInstruction",NodeType[NodeType.Comment=8]="Comment",NodeType[NodeType.Document=9]="Document",NodeType[NodeType.DocumentType=10]="DocumentType",NodeType[NodeType.DocumentFragment=11]="DocumentFragment",NodeType[NodeType.Notation=12]="Notation"})(NodeType||(NodeType={}));class HTMLDOM{constructor(t,e,s,i,r){this.es=t,this.ss=e,this.Node=s,this.Element=i,this.HTMLElement=r}addEventListener(t,e,s,i){(s||this.ss).addEventListener(t,e,i)}appendChild(t,e){t.appendChild(e)}cloneNode(t,e){return t.cloneNode(0!=e)}rs(t){if(this.ns(t))return t;if(null===t.parentNode)throw Reporter.error(52);const e=this.ss.createComment("au-end"),s=this.ss.createComment("au-start");return t.parentNode.replaceChild(e,t),e.parentNode.insertBefore(s,e),e.os=s,s.$nodes=null,e}createDocumentFragment(t){if(null==t)return this.ss.createDocumentFragment();if(this.A(t)){if(void 0!==t.content)return t.content;const e=this.ss.createDocumentFragment();return e.appendChild(t),e}return this.hs(t).content}createElement(name){return this.ss.createElement(name)}$t(t,e,s){if("undefined"==typeof MutationObserver)return{disconnect(){},observe(){},takeRecords:()=>PLATFORM.cs};const i=new MutationObserver(e);return i.observe(t,s),i}hs(t){if(null==t)return this.ss.createElement("template");const template=this.ss.createElement("template");return template.innerHTML=""+t,template}createTextNode(t){return this.ss.createTextNode(t)}insertBefore(t,e){e.parentNode.insertBefore(t,e)}as(t){return"AU-M"===t.nodeName}A(t){return null!=t&&t.nodeType>0}ns(t){return"au-end"===t.textContent}v(t){t.className="au"}ls(t,e){t.us(INode,e),t.us(this.Node,e),t.us(this.Element,e),t.us(this.HTMLElement,e)}remove(t){t.remove?t.remove():t.parentNode.removeChild(t)}removeEventListener(t,e,s,i){(s||this.ss).removeEventListener(t,e,i)}setAttribute(t,name,value){t.setAttribute(name,value)}}class TextNodeSequence{constructor(dom,t){this.dom=dom,this.firstChild=t,this.lastChild=t,this.childNodes=[t],this.targets=[new AuMarker(t)]}ds(){return this.targets}insertBefore(t){t.parentNode.insertBefore(this.firstChild,t)}gs(t){t.appendChild(this.firstChild)}remove(){this.firstChild.remove()}}class FragmentNodeSequence{constructor(dom,t){this.dom=dom,this.bs=t;const e=t.querySelectorAll(".au");let s=0,i=e.length;const targets=this.targets=Array(i);for(;i>s;){const t=e[s];targets[s]="AU-M"===t.nodeName?this.dom.rs(t):t,++s}const r=t.childNodes;s=0;const childNodes=this.childNodes=Array(i=r.length);for(;i>s;)childNodes[s]=r[s],++s;this.firstChild=t.firstChild,this.lastChild=t.lastChild,this.start=this.end=null}ds(){return this.targets}insertBefore(t){if(t.parentNode.insertBefore(this.bs,t),isRenderLocation(t)){this.end=t;const e=this.start=t.os;e.$nodes=null===e.$nodes?this:PLATFORM.ps}}gs(t){t.appendChild(this.bs),this.start=this.end=null}remove(){const t=this.bs;if(null!==this.start&&this.start.$nodes===this){const e=this.end;let s,i=this.start.nextSibling;for(;i!==e;)s=i.nextSibling,t.appendChild(i),i=s;this.start.$nodes=null,this.start=this.end=null}else{let e=this.firstChild;if(e.parentNode!==t){const s=this.lastChild;let i;for(;null!==e&&(i=e.nextSibling,t.appendChild(e),e!==s);)e=i}}}}class NodeSequenceFactory{constructor(dom,t){this.dom=dom;const e=dom.createDocumentFragment(t),childNodes=e.childNodes;switch(childNodes.length){case 0:return void(this.fs=(()=>NodeSequence.empty));case 2:const t=childNodes[0];if("AU-M"===t.nodeName||"#comment"===t.nodeName){const t=childNodes[1];if(3===t.nodeType&&0===t.textContent.length)return this.vs=0,this.we=t,void(this.As=TextNodeSequence)}default:this.vs=1,this.we=e,this.As=FragmentNodeSequence}}fs(){return new this.As(this.dom,this.we.cloneNode(this.vs))}}class AuMarker{get parentNode(){return this.nextSibling.parentNode}constructor(t){this.nextSibling=t,this.textContent=""}remove(){}}(t=>{t.previousSibling=null,t.childNodes=PLATFORM.cs,t.nodeName="AU-M",t.nodeType=1})(AuMarker.prototype);class HTMLTemplateFactory{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITemplateFactory,this).register(t)}create(t,e){return new CompiledTemplate(this.dom,e,new NodeSequenceFactory(this.dom,e.template),t)}}HTMLTemplateFactory.inject=[IDOM];let TextBindingRenderer=class{constructor(t,e){this.Ts=t,this.it=e}Bs(dom,t,e,s,i){const r=s.nextSibling;let n;dom.as(s)&&dom.remove(s);const o=ensureExpression(this.Ts,i.from,2048);n=o.Rs?new MultiInterpolationBinding(this.it,o,r,"textContent",BindingMode.Ss,t):new InterpolationBinding(o.ms,o,r,"textContent",BindingMode.Ss,this.it,t,1),addBindable(e,n)}};TextBindingRenderer.inject=[IExpressionParser,IObserverLocator],TextBindingRenderer=__decorate([instructionRenderer("ha")],TextBindingRenderer);let ListenerBindingRenderer=class{constructor(t,e){this.Ts=t,this.I=e}Bs(dom,t,e,s,i){const r=ensureExpression(this.Ts,i.from,80|i.strategy+6),n=new Listener(dom,i.to,i.strategy,r,s,i.preventDefault,this.I,t);addBindable(e,n)}};ListenerBindingRenderer.inject=[IExpressionParser,IEventManager],ListenerBindingRenderer=__decorate([instructionRenderer("hb")],ListenerBindingRenderer);let SetAttributeRenderer=class{Bs(dom,t,e,s,i){s.setAttribute(i.to,i.value)}};SetAttributeRenderer=__decorate([instructionRenderer("hd")],SetAttributeRenderer);let StylePropertyBindingRenderer=class{constructor(t,e){this.Ts=t,this.it=e}Bs(dom,t,e,s,i){const r=ensureExpression(this.Ts,i.from,48|BindingMode.Ss),n=new Binding(r,s.style,i.to,BindingMode.Ss,this.it,t);addBindable(e,n)}};StylePropertyBindingRenderer.inject=[IExpressionParser,IObserverLocator],StylePropertyBindingRenderer=__decorate([instructionRenderer("hc")],StylePropertyBindingRenderer);const defaultShadowOptions={mode:"open"};class HTMLProjectorLocator{static register(t){return Registration.singleton(IProjectorLocator,this).register(t)}Ls(dom,t,host,def){if(def.shadowOptions||def.hasSlots){if(def.containerless)throw Reporter.error(21);return new ShadowDOMProjector(dom,t,host,def)}return def.containerless?new ContainerlessProjector(dom,t,host):new HostProjector(t,host)}}const childObserverOptions$1={kt:1};class ShadowDOMProjector{constructor(dom,$customElement,host,t){let shadowOptions;this.dom=dom,this.host=host,this.shadowRoot=host.Es(shadowOptions=null!=t.shadowOptions&&"object"==typeof t.shadowOptions&&"mode"in t.shadowOptions?t.shadowOptions:defaultShadowOptions),this.host.$customElement=$customElement,this.shadowRoot.$customElement=$customElement}get children(){return this.shadowRoot.childNodes}Os(t){this.dom.$t(this.shadowRoot,t,childObserverOptions$1)}ys(){return this.shadowRoot}Is(t){t.gs(this.shadowRoot)}Cs(t){t.remove()}}class ContainerlessProjector{constructor(dom,$customElement,host){this.childNodes=host.childNodes.length?PLATFORM.toArray(host.childNodes):PLATFORM.cs,this.host=dom.rs(host),this.host.$customElement=$customElement}get children(){return this.childNodes}Os(t){new MutationObserver(t).observe(this.host,childObserverOptions$1)}ys(){return this.host.ws()}Is(t){t.insertBefore(this.host)}Cs(t){t.remove()}}class HostProjector{constructor($customElement,host){this.host=host,this.host.$customElement=$customElement}get children(){return this.host.childNodes}Os(t){}ys(){return this.host.ws()}Is(t){t.gs(this.host)}Cs(t){t.remove()}}const IProjectorLocatorRegistration=HTMLProjectorLocator,ITargetAccessorLocatorRegistration=TargetAccessorLocator,ITargetObserverLocatorRegistration=TargetObserverLocator,ITemplateFactoryRegistration=HTMLTemplateFactory,DefaultComponents=[HTMLProjectorLocator,TargetAccessorLocator,TargetObserverLocator,HTMLTemplateFactory],AttrBindingBehaviorRegistration=AttrBindingBehavior,SelfBindingBehaviorRegistration=SelfBindingBehavior,UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehavior,ComposeRegistration=Compose,DefaultResources=[AttrBindingBehavior,SelfBindingBehavior,UpdateTriggerBindingBehavior,Compose],ListenerBindingRendererRegistration=ListenerBindingRenderer,SetAttributeRendererRegistration=SetAttributeRenderer,StylePropertyBindingRendererRegistration=StylePropertyBindingRenderer,TextBindingRendererRegistration=TextBindingRenderer,DefaultRenderers=[ListenerBindingRenderer,SetAttributeRenderer,StylePropertyBindingRenderer,TextBindingRenderer],BasicConfiguration$1={register:t=>BasicConfiguration.register(t).register(...DefaultComponents,...DefaultResources,...DefaultRenderers),Ms(){return this.register(DI.Ms())}};export{Listener,AttributeNSAccessor,CheckedObserver,ClassAttributeAccessor,DataAttributeAccessor,ElementPropertyAccessor,ListenerTracker,DelegateOrCaptureSubscription,TriggerSubscription,IEventManager,EventSubscriber,TargetAccessorLocator,TargetObserverLocator,SelectValueObserver,StyleAttributeAccessor,ISVGAnalyzer,ValueAttributeObserver,AttrBindingBehavior,SelfBindingBehavior,UpdateTriggerBindingBehavior,Compose,IProjectorLocatorRegistration,ITargetAccessorLocatorRegistration,ITargetObserverLocatorRegistration,ITemplateFactoryRegistration,DefaultComponents,AttrBindingBehaviorRegistration,SelfBindingBehaviorRegistration,UpdateTriggerBindingBehaviorRegistration,ComposeRegistration,DefaultResources,ListenerBindingRendererRegistration,SetAttributeRendererRegistration,StylePropertyBindingRendererRegistration,TextBindingRendererRegistration,DefaultRenderers,BasicConfiguration$1 as BasicConfiguration,createElement,RenderPlan,HTMLTargetedInstructionType,isHTMLTargetedInstruction,NodeType,HTMLDOM,CaptureBindingInstruction,DelegateBindingInstruction,SetAttributeInstruction,StylePropertyBindingInstruction,TextBindingInstruction,TriggerBindingInstruction}; | ||
function __decorate(t,e,s,i){var r,n,o=arguments.length,h=3>o?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,s,i);else for(n=t.length-1;n>=0;n--)(r=t[n])&&(h=(3>o?r(h):o>3?r(e,s,h):r(e,s))||h);return o>3&&h&&Object.defineProperty(e,s,h),h}function findOriginalEventTarget(t){return t.t&&t.t()[0]||t.s&&t.s()[0]||t.path&&t.path[0]||t.target}function stopPropagation(){this.i(),this.o=1}function handleCapturedEvent(t){t.o=0;let e=findOriginalEventTarget(t);const s=[];for(;e;){if(e.h){const i=e.h[t.type];i&&(t.stopPropagation!==stopPropagation&&(t.i=t.stopPropagation,t.stopPropagation=stopPropagation),s.push(i))}e=e.parentNode}for(let e=s.length-1;e>=0&&!t.o;e--){const i=s[e];"handleEvent"in i?i.l(t):i(t)}}function handleDelegatedEvent(t){t.o=0;let e=findOriginalEventTarget(t);for(;e&&!t.o;){if(e.u){const s=e.u[t.type];s&&(t.stopPropagation!==stopPropagation&&(t.i=t.stopPropagation,t.stopPropagation=stopPropagation),"handleEvent"in s?s.l(t):s(t))}e=e.parentNode}}function defaultMatcher$1(t,e){return t===e}function handleSelfEvent(t){const e=findOriginalEventTarget(t);if(this.target===e)return this.g(t)}function isHTMLTargetedInstruction(value){const type=value.type;return"string"==typeof type&&2===type.length}function createElement(dom,t,e,s){return"string"==typeof t?createElementForTag(dom,t,e,s):createElementForType(dom,t,e,s)}function createElementForTag(dom,t,e,s){const instructions=[],i=[],dependencies=[],r=dom.createElement(t);let n=0;return e&&Object.keys(e).forEach(to=>{const value=e[to];isHTMLTargetedInstruction(value)?(n=1,instructions.push(value)):dom.setAttribute(r,to,value)}),n&&(dom.p(r),i.push(instructions)),s&&addChildren(dom,r,s,i,dependencies),new RenderPlan(dom,r,i,dependencies)}function createElementForType(dom,t,e,s){const i=t.description.name,instructions=[],r=[instructions],dependencies=[],n=[],bindables=t.description.bindables,o=dom.createElement(i);return dom.p(o),dependencies.includes(t)||dependencies.push(t),instructions.push(new HydrateElementInstruction(i,n)),e&&Object.keys(e).forEach(to=>{const value=e[to];isHTMLTargetedInstruction(value)?n.push(value):n.push(bindables[to]?{type:"re",to,value}:new SetAttributeInstruction(value,to))}),s&&addChildren(dom,o,s,r,dependencies),new RenderPlan(dom,o,r,dependencies)}function addChildren(dom,t,e,s,dependencies){for(let i=0,r=e.length;r>i;++i){const r=e[i];switch(typeof r){case"string":dom.appendChild(t,dom.createTextNode(r));break;case"object":dom.v(r)?dom.appendChild(t,r):"mergeInto"in r&&r.A(t,s,dependencies)}}}function isRenderLocation(t){return"au-end"===t.textContent}var HTMLTargetedInstructionType,NodeType;import{DI,Registration,Reporter,PLATFORM}from"@aurelia/kernel";import{LifecycleFlags,hasBind,hasUnbind,targetObserver,DelegationStrategy,ITargetObserverLocator,SetterObserver,IDOM,ITargetAccessorLocator,ILifecycle,BindingBehaviorResource,BindingMode,IObserverLocator,buildTemplateDefinition,HydrateElementInstruction,IRenderable,ITargetedInstruction,IRenderingEngine,CompositionCoordinator,bindable,CustomElementResource,DOM,INode,ITemplateFactory,CompiledTemplate,NodeSequence,IExpressionParser,instructionRenderer,ensureExpression,MultiInterpolationBinding,InterpolationBinding,addBinding,Binding,IProjectorLocator,BasicConfiguration}from"@aurelia/runtime";class Listener{constructor(dom,t,e,s,i,preventDefault,r,n){this.dom=dom,this.T=null,this.m=null,this.$state=0,this.B=e,this.R=n,this.preventDefault=preventDefault,this.S=s,this.target=i,this.O=t,this.L=r}C(t){const e=this.$scope.I;e.M=t;const s=this.S.evaluate(LifecycleFlags.D,this.$scope,this.R);return Reflect.deleteProperty(e,"$event"),1!=s&&this.preventDefault&&t.preventDefault(),s}l(t){this.C(t)}P(t,e){if(2&this.$state){if(this.$scope===e)return;this.F(t|LifecycleFlags.N)}this.$state|=1,this.$scope=e;const s=this.S;hasBind(s)&&s.bind(t,e,this),this.V=this.L.addEventListener(this.dom,this.target,this.O,this,this.B),this.$state|=2,this.$state&=-2}F(t){if(!(2&this.$state))return;this.$state|=64;const e=this.S;hasUnbind(e)&&e.k(t,this.$scope,this),this.$scope=null,this.V._(),this.V=null,this.$state&=-67}j(t,e,s){}H(t,e,s){}}let AttributeNSAccessor=class{constructor(t,e,s,i,r){this.$=1,this.attributeName=i,this.U=t,this.q=e,this.oldValue=this.G=this.X(),this.Z=s,this.J=r}X(){return this.q.getAttributeNS(this.J,this.attributeName)}K(t){this.q.setAttributeNS(this.J,this.attributeName,t)}};AttributeNSAccessor=__decorate([targetObserver("")],AttributeNSAccessor);const handleEventFlags=LifecycleFlags.W|LifecycleFlags.Y,defaultHandleBatchedChangeFlags=LifecycleFlags.tt|LifecycleFlags.et,defaultMatcher=(t,e)=>t===e;let CheckedObserver=class{constructor(t,e,s,i,r){this.st=t&LifecycleFlags.it,this.$=1,this.V=i,this.U=e,this.q=s,this.rt=r}X(){return this.G}K(t,e){this.nt||(this.nt=this.q.ot&&(this.q.ot.ht||this.q.ot.value),this.nt&&this.nt.subscribe(this)),this.ct&&(this.ct.at(this),this.ct=null),"checkbox"===this.q.type&&Array.isArray(t)&&(this.ct=this.rt.lt(this.st|e,t),this.ct.ut(this)),this.dt()}gt(){this.dt(),this.bt(defaultHandleBatchedChangeFlags)}H(t,e,s){this.dt(),this.bt(s)}dt(){const value=this.G,t=this.q,e=t.hasOwnProperty("model")?t.ht:t.value,s=t.pt||defaultMatcher;t.checked="radio"===t.type?!!s(value,e):1==value?1:Array.isArray(value)?-1!==value.findIndex(t=>!!s(t,e)):0}bt(t){t&LifecycleFlags.N||this.G!==this.oldValue&&this.ft(this.G,this.oldValue,this.st|t)}l(){let value=this.G;const t=this.q,e=t.hasOwnProperty("model")?t.ht:t.value;let s;const i=t.pt||defaultMatcher;if("checkbox"===t.type){if(Array.isArray(value))return s=value.findIndex(t=>!!i(t,e)),void(t.checked&&-1===s?value.push(e):t.checked||-1===s||value.splice(s,1));value=t.checked}else{if(!t.checked)return;value=e}this.oldValue=this.G,this.G=value,this.bt(handleEventFlags)}subscribe(t){this.vt()||this.V.subscribe(this.q,this),this.At(t)}unsubscribe(t){this.Tt(t)&&!this.vt()&&this.V._()}k(){this.ct&&(this.ct.at(this),this.ct=null),this.nt&&this.nt.unsubscribe(this)}};CheckedObserver=__decorate([targetObserver()],CheckedObserver);let ClassAttributeAccessor=class{constructor(t,e){this.$=1,this.yt=1,this.U=t,this.Bt=null,this.q=e,this.version=0}X(){return this.G}K(t){const e=this.Bt||{};let s,name,i=this.version;if(t.length){const r=this.q;for(let n=0,o=(s=t.split(/\s+/)).length;o>n;n++)(name=s[n]).length&&(e[name]=i,r.classList.add(name))}if(this.Bt=e,this.version+=1,0!==i)for(name in i-=1,e)e.hasOwnProperty(name)&&e[name]===i&&this.q.classList.remove(name)}};ClassAttributeAccessor=__decorate([targetObserver("")],ClassAttributeAccessor);let DataAttributeAccessor=class{constructor(t,e,s){this.$=1,this.U=t,this.q=e,this.oldValue=this.G=this.X(),this.Z=s}X(){return this.q.getAttribute(this.Z)}K(t){null===t?this.q.removeAttribute(this.Z):this.q.setAttribute(this.Z,t)}};DataAttributeAccessor=__decorate([targetObserver()],DataAttributeAccessor);let ElementPropertyAccessor=class{constructor(t,e,s){this.$=1,this.U=t,this.q=e,this.Z=s}X(){return this.q[this.Z]}K(value){this.q[this.Z]=value}};ElementPropertyAccessor=__decorate([targetObserver("")],ElementPropertyAccessor);class ListenerTracker{constructor(dom,t,e,s){this.dom=dom,this.Rt=s,this.count=0,this.St=t,this.listener=e}Ot(){this.count++,1===this.count&&this.dom.addEventListener(this.St,this.listener,null,this.Rt)}Lt(){this.count--,0===this.count&&this.dom.removeEventListener(this.St,this.listener,null,this.Rt)}_(){this.count>0&&(this.count=0,this.dom.removeEventListener(this.St,this.listener,null,this.Rt))}}class DelegateOrCaptureSubscription{constructor(t,e,s,i){this.Et=t,this.wt=e,this.O=s,e[s]=i}_(){this.Et.Lt(),this.wt[this.O]=null}}class TriggerSubscription{constructor(dom,t,e,s){this.dom=dom,this.target=t,this.O=e,this.Ct=s,dom.addEventListener(e,s,t)}_(){this.dom.removeEventListener(this.O,this.Ct,this.target)}}class EventSubscriber{constructor(dom,t){this.dom=dom,this.It=t,this.target=null,this.V=null}subscribe(t,e){this.target=t,this.V=e;const s=this.dom.addEventListener,i=this.It;for(let r=0,n=i.length;n>r;++r)s(i[r],e,t)}_(){const t=this.target,e=this.V,s=this.It,i=this.dom.removeEventListener;for(let r=0,n=s.length;n>r;++r)i(s[r],e,t);this.target=this.V=null}}const IEventManager=DI.Dt("IEventManager").Mt(t=>t.singleton(EventManager));class EventManager{constructor(){this.Pt={},this.Ft={},this.Pt={},this.Ft={}}addEventListener(dom,t,e,s,strategy){let i,r,n;if(strategy===DelegationStrategy.xt){(n=(i=this.Pt)[e]||(i[e]=new ListenerTracker(dom,e,handleDelegatedEvent,0))).Ot();const r=t.u||(t.u={});return new DelegateOrCaptureSubscription(n,r,e,s)}if(strategy===DelegationStrategy.Nt){(n=(r=this.Ft)[e]||(r[e]=new ListenerTracker(dom,e,handleCapturedEvent,1))).Ot();const i=t.h||(t.h={});return new DelegateOrCaptureSubscription(n,i,e,s)}return new TriggerSubscription(dom,t,e,s)}_(){let t;const{Pt:e,Ft:s}=this;for(t in e)e[t]._();for(t in s)s[t]._()}}const handleEventFlags$1=LifecycleFlags.W|LifecycleFlags.Y,childObserverOptions={Vt:1,kt:1,_t:1};let SelectValueObserver=class{constructor(t,e,s,i,r,dom){this.st=t&LifecycleFlags.it,this.$=1,this.U=e,this.q=s,this.V=i,this.rt=r,this.dom=dom}X(){return this.G}K(t,e){const s=Array.isArray(t);if(!s&&null!=t&&this.q.multiple)throw Error("Only null or Array instances can be bound to a multi-select.");this.ct&&(this.ct.at(this),this.ct=null),s&&(this.ct=this.rt.lt(this.st|e,t),this.ct.ut(this)),this.jt(),this.bt(e)}gt(t){this.jt(t)}H(t,e,s){this.Ht(t,this.st|s)}bt(t){if(t&LifecycleFlags.N)return;const e=this.oldValue,s=this.G;s!==e&&this.ft(s,e,this.st|t)}l(){this.$t()&&this.bt(handleEventFlags$1)}jt(t){const e=this.G,s=Array.isArray(e),i=this.q,r=i.pt||defaultMatcher$1,n=i.options;let o=n.length;for(;o--;){const t=n[o],i=t.hasOwnProperty("model")?t.ht:t.value;t.selected=s?-1!==e.findIndex(t=>!!r(i,t)):!!r(i,e)}}$t(){const t=this.q,e=t.options,s=e.length,i=this.G;let r=0;if(t.multiple){if(!Array.isArray(i))return 1;let n;const o=t.pt||defaultMatcher$1,h=[];for(;s>r;)(n=e[r]).selected&&h.push(n.hasOwnProperty("model")?n.ht:n.value),++r;for(r=0;i.length>r;){const t=i[r];-1===h.findIndex(e=>!!o(t,e))?i.splice(r,1):++r}for(r=0;h.length>r;){const t=h[r];-1===i.findIndex(e=>!!o(t,e))&&i.push(t),++r}return 0}let value=null;for(;s>r;){const t=e[r];if(t.selected){value=t.hasOwnProperty("model")?t.ht:t.value;break}++r}return this.oldValue=this.G,this.G=value,1}subscribe(t){this.vt()||this.V.subscribe(this.q,this),this.At(t)}unsubscribe(t){this.Tt(t)&&!this.vt()&&this.V._()}bind(){this.Ut=this.dom.qt(this.q,this.zt.bind(this),childObserverOptions)}k(){this.Ut.disconnect(),this.Ut=null,this.ct&&(this.ct.at(this),this.ct=null)}zt(){this.jt(),this.$t()&&this.bt(handleEventFlags$1)}};SelectValueObserver=__decorate([targetObserver()],SelectValueObserver);let StyleAttributeAccessor=class{constructor(t,e){this.$=1,this.oldValue=this.G=e.style.cssText,this.U=t,this.q=e,this.Gt=null,this.version=0}X(){return this.q.style.cssText}Xt(t,value){let e="";null!=value&&"function"==typeof value.indexOf&&-1!==value.indexOf("!important")&&(e="important",value=value.replace("!important","")),this.q.style.setProperty(t,value,e)}K(t){const e=this.Gt||{};let s,i=this.version;if(null!==t)if(t instanceof Object){let value;for(s in t)t.hasOwnProperty(s)&&(value=t[s],e[s=s.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)]=i,this.Xt(s,value))}else if(t.length){const r=/\s*([\w\-]+)\s*:\s*((?:(?:[\w\-]+\(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[\w\-]+\(\s*(?:[^"](?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^\)]*)\),?|[^\)]*)\),?|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^;]*),?\s*)+);?/g;let n;for(;null!==(n=r.exec(t));)(s=n[1])&&(e[s]=i,this.Xt(s,n[2]))}if(this.Gt=e,this.version+=1,0!==i)for(s in i-=1,e)e.hasOwnProperty(s)&&e[s]===i&&this.q.style.removeProperty(s)}};StyleAttributeAccessor=__decorate([targetObserver()],StyleAttributeAccessor);const inputValueDefaults={button:"",Zt:"on",color:"#000000",Jt:"",Kt:"",email:"",Qt:"",hidden:"",Wt:"",Yt:"",number:"",password:"",te:"on",range:"50",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",ee:""},handleEventFlags$2=LifecycleFlags.W|LifecycleFlags.Y;let ValueAttributeObserver=class{constructor(t,e,s,i){if(this.$=1,this.V=i,this.U=t,this.q=e,this.Z=s,"value"===s){const t=e.type;this.defaultValue=inputValueDefaults[t||"text"],"file"===t&&(this.flush=this.se)}else this.defaultValue="";this.oldValue=this.G=e[s]}X(){return this.q[this.Z]}K(t,e){this.q[this.Z]=t,e&LifecycleFlags.N||this.ft(this.G,this.oldValue,e)}l(){const t=this.oldValue=this.G,e=this.G=this.X();t!==e&&(this.ft(e,t,handleEventFlags$2),this.oldValue=e)}subscribe(t){this.vt()||(this.oldValue=this.X(),this.V.subscribe(this.q,this)),this.At(t)}unsubscribe(t){this.Tt(t)&&!this.vt()&&this.V._()}se(){const t=this.G;this.oldValue!==t&&""===t&&(this.K(t,this.ie),this.oldValue=this.G)}};ValueAttributeObserver=__decorate([targetObserver("")],ValueAttributeObserver);const xlinkNS="http://www.w3.org/1999/xlink",xmlNS="http://www.w3.org/XML/1998/namespace",xmlnsNS="http://www.w3.org/2000/xmlns/",nsAttributes=(function(t){return t["re"]=["actuate",xlinkNS],t["ne"]=["arcrole",xlinkNS],t["oe"]=["href",xlinkNS],t["he"]=["role",xlinkNS],t["ce"]=["show",xlinkNS],t["ae"]=["title",xlinkNS],t["le"]=["type",xlinkNS],t["ue"]=["lang",xmlNS],t["de"]=["space",xmlNS],t.ge=["xmlns",xmlnsNS],t["be"]=["xlink",xmlnsNS],t})(Object.create(null)),inputEvents=["change","input"],selectEvents=["change"],contentEvents=["change","input","blur","keyup","paste"],scrollEvents=["scroll"],overrideProps=(function(t){return t.pe=1,t.style=1,t.fe=1,t.checked=1,t.value=1,t.ht=1,t["re"]=1,t["ne"]=1,t["oe"]=1,t["he"]=1,t["ce"]=1,t["ae"]=1,t["le"]=1,t["ue"]=1,t["de"]=1,t.ge=1,t["be"]=1,t})(Object.create(null));class TargetObserverLocator{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITargetObserverLocator,this).register(t)}ve(t,e,s,i,r){switch(r){case"checked":return new CheckedObserver(t,e,i,new EventSubscriber(this.dom,inputEvents),s);case"value":return"SELECT"===i.tagName?new SelectValueObserver(t,e,i,new EventSubscriber(this.dom,selectEvents),s,this.dom):new ValueAttributeObserver(e,i,r,new EventSubscriber(this.dom,inputEvents));case"files":return new ValueAttributeObserver(e,i,r,new EventSubscriber(this.dom,inputEvents));case"textContent":case"innerHTML":return new ValueAttributeObserver(e,i,r,new EventSubscriber(this.dom,contentEvents));case"scrollTop":case"scrollLeft":return new ValueAttributeObserver(e,i,r,new EventSubscriber(this.dom,scrollEvents));case"class":return new ClassAttributeAccessor(e,i);case"style":case"css":return new StyleAttributeAccessor(e,i);case"model":return new SetterObserver(t,i,r);case"role":return new DataAttributeAccessor(e,i,r);default:if(void 0!==nsAttributes[r]){const t=nsAttributes[r];return new AttributeNSAccessor(e,i,r,t[0],t[1])}const n=r.slice(0,5);if("aria-"===n||"data-"===n)return new DataAttributeAccessor(e,i,r)}return null}Ae(t,e,s){return 1==overrideProps[s]}Te(t,e){return this.dom.v(e)}}TargetObserverLocator.inject=[IDOM];class TargetAccessorLocator{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITargetAccessorLocator,this).register(t)}me(t,e,s,i){switch(i){case"textContent":return new ElementPropertyAccessor(e,s,i);case"class":return new ClassAttributeAccessor(e,s);case"style":case"css":return new StyleAttributeAccessor(e,s);case"src":case"href":case"role":return new DataAttributeAccessor(e,s,i);default:if(void 0!==nsAttributes[i]){const t=nsAttributes[i];return new AttributeNSAccessor(e,s,i,t[0],t[1])}const t=i.slice(0,5);return"aria-"===t||"data-"===t?new DataAttributeAccessor(e,s,i):new ElementPropertyAccessor(e,s,i)}}Te(t,e){return this.dom.v(e)}}TargetAccessorLocator.inject=[IDOM];const ISVGAnalyzer=DI.Dt("ISVGAnalyzer").Mt(t=>t.singleton(class{ye(t,e){return 0}}));class AttrBindingBehavior{bind(t,e,s){s.targetObserver=new DataAttributeAccessor(s.R.get(ILifecycle),s.target,s.Be)}k(t,e,s){}}BindingBehaviorResource.Re("attr",AttrBindingBehavior);class SelfBindingBehavior{bind(t,e,s){if(!s.C||!s.O)throw Reporter.error(8);s.g=s.C,s.C=handleSelfEvent}k(t,e,s){s.C=s.g,s.g=null}}BindingBehaviorResource.Re("self",SelfBindingBehavior);class UpdateTriggerBindingBehavior{constructor(t){this.rt=t}bind(t,e,s,...i){if(0===i.length)throw Reporter.error(9);if(s.mode!==BindingMode.Se&&s.mode!==BindingMode.Oe)throw Reporter.error(10);this.st=t&LifecycleFlags.it;const r=this.rt.ve(this.st|t,s.target,s.Be);if(!r.V)throw Reporter.error(10);s.targetObserver=r,r.Le=s.targetObserver.V,r.V=new EventSubscriber(s.R.get(IDOM),i)}k(t,e,s){s.targetObserver.V._(),s.targetObserver.V=s.targetObserver.Le,s.targetObserver.Le=null}}UpdateTriggerBindingBehavior.inject=[IObserverLocator],BindingBehaviorResource.Re("updateTrigger",UpdateTriggerBindingBehavior),(function(HTMLTargetedInstructionType){HTMLTargetedInstructionType.Ee="ha",HTMLTargetedInstructionType.we="hb",HTMLTargetedInstructionType.Ce="hc",HTMLTargetedInstructionType.setAttribute="hd"})(HTMLTargetedInstructionType||(HTMLTargetedInstructionType={}));class TextBindingInstruction{constructor(from){this.type="ha",this.from=from}}class TriggerBindingInstruction{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=1,this.strategy=DelegationStrategy.Ie,this.to=to}}class DelegateBindingInstruction{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=DelegationStrategy.xt,this.to=to}}class CaptureBindingInstruction{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=DelegationStrategy.Nt,this.to=to}}class StylePropertyBindingInstruction{constructor(from,to){this.type="hc",this.from=from,this.to=to}}class SetAttributeInstruction{constructor(value,to){this.type="hd",this.to=to,this.value=value}}class RenderPlan{constructor(dom,t,instructions,dependencies){this.dom=dom,this.dependencies=dependencies,this.instructions=instructions,this.Me=t}get De(){return this.Pe||(this.Pe=buildTemplateDefinition(null,null,this.Me,null,"string"==typeof this.Me,null,this.instructions,this.dependencies))}Fe(t,e){return t.Fe(this.dom,this.De,null,e)}xe(t,e,s){return this.Ne(e,s).create()}Ne(t,e){return t.Ne(this.dom,this.De,e)}A(t,instructions,dependencies){this.dom.appendChild(t,this.Me),instructions.push(...this.instructions),dependencies.push(...this.dependencies)}}const composeSource={name:"au-compose",containerless:1},composeProps=["subject","composing"];class Compose{constructor(dom,t,e,s,i){this.dom=dom,this.subject=null,this.Ve=0,this.ke=i,this._e=null,this.je=t,this.He=s,this.ke.$e=(()=>{this.Ve=0}),this.properties=e.instructions.filter(t=>!composeProps.includes(t.to)).reduce((t,e)=>(e.to&&(t[e.to]=e),t),{})}Ue(t){this.qe(this.subject,null,t),this.ke.Ue(t,this.$scope)}ze(t){this.ke.ze(t)}Ge(t){this.ke.Ge(t)}Xe(t){this._e=null,this.ke.Xe(t)}Ze(t){this.ke.Ze(t)}Je(t,e,s){this.qe(t,e,s)}qe(t,e,s){this._e!==t&&(this._e=t,t=t instanceof Promise?t.then(t=>this.Ke(t,s)):this.Ke(t,s),this.Ve=1,this.ke.Qe(t,s))}Ke(t,e){const s=this.We(t,e);return s?(s.Ye(this.ts.host),s.es(this.je.$scope),s):null}We(t,e){return t?"lockScope"in t?t:"createView"in t?t.xe(e,this.He,this.je.$context):"create"in t?t.create():"template"in t?this.He.Ne(this.dom,t,this.je.$context).create():createElement(this.dom,t,this.properties,this.ts.children).xe(e,this.He,this.je.$context):null}}Compose.inject=[IDOM,IRenderable,ITargetedInstruction,IRenderingEngine,CompositionCoordinator],__decorate([bindable],Compose.prototype,"subject",void 0),__decorate([bindable],Compose.prototype,"composing",void 0),CustomElementResource.Re(composeSource,Compose),(function(NodeType){NodeType[NodeType.Element=1]="Element",NodeType[NodeType.Attr=2]="Attr",NodeType[NodeType.Text=3]="Text",NodeType[NodeType.CDATASection=4]="CDATASection",NodeType[NodeType.EntityReference=5]="EntityReference",NodeType[NodeType.Entity=6]="Entity",NodeType[NodeType.ProcessingInstruction=7]="ProcessingInstruction",NodeType[NodeType.Comment=8]="Comment",NodeType[NodeType.Document=9]="Document",NodeType[NodeType.DocumentType=10]="DocumentType",NodeType[NodeType.DocumentFragment=11]="DocumentFragment",NodeType[NodeType.Notation=12]="Notation"})(NodeType||(NodeType={}));class HTMLDOM{constructor(t,e,s,i,r,n){this.window=t,this.document=e,this.Node=s,this.Element=i,this.HTMLElement=r,this.CustomEvent=n,DOM.ss&&(Reporter.write(1001),DOM.rs()),DOM.initialize(this)}static register(t){return Registration.ns(IDOM,this).register(t)}addEventListener(t,e,s,i){(s||this.document).addEventListener(t,e,i)}appendChild(t,e){t.appendChild(e)}cloneNode(t,e){return t.cloneNode(0!=e)}os(t){if(this.hs(t))return t;if(null===t.parentNode)throw Reporter.error(52);const e=this.document.createComment("au-end"),s=this.document.createComment("au-start");return t.parentNode.replaceChild(e,t),e.parentNode.insertBefore(s,e),e.cs=s,s.$nodes=null,e}createDocumentFragment(t){if(null==t)return this.document.createDocumentFragment();if(this.v(t)){if(void 0!==t.content)return t.content;const e=this.document.createDocumentFragment();return e.appendChild(t),e}return this.as(t).content}createElement(name){return this.document.createElement(name)}fetch(t,e){return this.window.fetch(t,e)}ls(t,e){return new this.CustomEvent(t,e)}dispatchEvent(t){this.document.dispatchEvent(t)}qt(t,e,s){if("undefined"==typeof MutationObserver)return{disconnect(){},observe(){},takeRecords:()=>PLATFORM.us};const i=new MutationObserver(e);return i.observe(t,s),i}as(t){if(null==t)return this.document.createElement("template");const template=this.document.createElement("template");return template.innerHTML=""+t,template}createTextNode(t){return this.document.createTextNode(t)}insertBefore(t,e){e.parentNode.insertBefore(t,e)}ds(t){return"AU-M"===t.nodeName}v(t){return null!=t&&t.nodeType>0}hs(t){return"au-end"===t.textContent}p(t){t.className="au"}gs(t,e){t.bs(INode,e),t.bs(this.Node,e),t.bs(this.Element,e),t.bs(this.HTMLElement,e)}remove(t){t.remove?t.remove():t.parentNode.removeChild(t)}removeEventListener(t,e,s,i){(s||this.document).removeEventListener(t,e,i)}setAttribute(t,name,value){t.setAttribute(name,value)}}const $DOM=DOM;class TextNodeSequence{constructor(dom,t){this.dom=dom,this.firstChild=t,this.lastChild=t,this.childNodes=[t],this.targets=[new AuMarker(t)]}ps(){return this.targets}insertBefore(t){t.parentNode.insertBefore(this.firstChild,t)}fs(t){t.appendChild(this.firstChild)}remove(){this.firstChild.remove()}}class FragmentNodeSequence{constructor(dom,t){this.dom=dom,this.vs=t;const e=t.querySelectorAll(".au");let s=0,i=e.length;const targets=this.targets=Array(i);for(;i>s;){const t=e[s];targets[s]="AU-M"===t.nodeName?this.dom.os(t):t,++s}const r=t.childNodes;s=0;const childNodes=this.childNodes=Array(i=r.length);for(;i>s;)childNodes[s]=r[s],++s;this.firstChild=t.firstChild,this.lastChild=t.lastChild,this.start=this.end=null}ps(){return this.targets}insertBefore(t){if(t.parentNode.insertBefore(this.vs,t),isRenderLocation(t)){this.end=t;const e=this.start=t.cs;e.$nodes=null===e.$nodes?this:PLATFORM.As}}fs(t){t.appendChild(this.vs),this.start=this.end=null}remove(){const t=this.vs;if(null!==this.start&&this.start.$nodes===this){const e=this.end;let s,i=this.start.nextSibling;for(;i!==e;)s=i.nextSibling,t.appendChild(i),i=s;this.start.$nodes=null,this.start=this.end=null}else{let e=this.firstChild;if(e.parentNode!==t){const s=this.lastChild;let i;for(;null!==e&&(i=e.nextSibling,t.appendChild(e),e!==s);)e=i}}}}class NodeSequenceFactory{constructor(dom,t){this.dom=dom;const e=dom.createDocumentFragment(t),childNodes=e.childNodes;switch(childNodes.length){case 0:return void(this.Ts=(()=>NodeSequence.empty));case 2:const t=childNodes[0];if("AU-M"===t.nodeName||"#comment"===t.nodeName){const t=childNodes[1];if(3===t.nodeType&&0===t.textContent.length)return this.ms=0,this.Me=t,void(this.ys=TextNodeSequence)}default:this.ms=1,this.Me=e,this.ys=FragmentNodeSequence}}Ts(){return new this.ys(this.dom,this.Me.cloneNode(this.ms))}}class AuMarker{get parentNode(){return this.nextSibling.parentNode}constructor(t){this.nextSibling=t,this.textContent=""}remove(){}}(t=>{t.previousSibling=null,t.childNodes=PLATFORM.us,t.nodeName="AU-M",t.nodeType=1})(AuMarker.prototype);class HTMLTemplateFactory{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITemplateFactory,this).register(t)}create(t,e){return new CompiledTemplate(this.dom,e,new NodeSequenceFactory(this.dom,e.template),t)}}HTMLTemplateFactory.inject=[IDOM];let TextBindingRenderer=class{constructor(t,e){this.Bs=t,this.rt=e}Rs(t,dom,e,s,i,r){const n=i.nextSibling;let o;dom.ds(i)&&dom.remove(i);const h=ensureExpression(this.Bs,r.from,2048);o=h.Ss?new MultiInterpolationBinding(this.rt,h,n,"textContent",BindingMode.Os,e):new InterpolationBinding(h.Ls,h,n,"textContent",BindingMode.Os,this.rt,e,1),addBinding(s,o)}};TextBindingRenderer.inject=[IExpressionParser,IObserverLocator],TextBindingRenderer=__decorate([instructionRenderer("ha")],TextBindingRenderer);let ListenerBindingRenderer=class{constructor(t,e){this.Bs=t,this.L=e}Rs(t,dom,e,s,i,r){const n=ensureExpression(this.Bs,r.from,80|r.strategy+6),o=new Listener(dom,r.to,r.strategy,n,i,r.preventDefault,this.L,e);addBinding(s,o)}};ListenerBindingRenderer.inject=[IExpressionParser,IEventManager],ListenerBindingRenderer=__decorate([instructionRenderer("hb")],ListenerBindingRenderer);let SetAttributeRenderer=class{Rs(t,dom,e,s,i,r){i.setAttribute(r.to,r.value)}};SetAttributeRenderer=__decorate([instructionRenderer("hd")],SetAttributeRenderer);let StylePropertyBindingRenderer=class{constructor(t,e){this.Bs=t,this.rt=e}Rs(t,dom,e,s,i,r){const n=ensureExpression(this.Bs,r.from,48|BindingMode.Os),o=new Binding(n,i.style,r.to,BindingMode.Os,this.rt,e);addBinding(s,o)}};StylePropertyBindingRenderer.inject=[IExpressionParser,IObserverLocator],StylePropertyBindingRenderer=__decorate([instructionRenderer("hc")],StylePropertyBindingRenderer);const defaultShadowOptions={mode:"open"};class HTMLProjectorLocator{static register(t){return Registration.singleton(IProjectorLocator,this).register(t)}Es(dom,t,host,def){if(def.shadowOptions||def.hasSlots){if(def.containerless)throw Reporter.error(21);return new ShadowDOMProjector(dom,t,host,def)}return def.containerless?new ContainerlessProjector(dom,t,host):new HostProjector(t,host)}}const childObserverOptions$1={Vt:1};class ShadowDOMProjector{constructor(dom,$customElement,host,t){let shadowOptions;this.dom=dom,this.host=host,this.shadowRoot=host.ws(shadowOptions=null!=t.shadowOptions&&"object"==typeof t.shadowOptions&&"mode"in t.shadowOptions?t.shadowOptions:defaultShadowOptions),this.host.$customElement=$customElement,this.shadowRoot.$customElement=$customElement}get children(){return this.shadowRoot.childNodes}Cs(t){this.dom.qt(this.shadowRoot,t,childObserverOptions$1)}Is(){return this.shadowRoot}Ms(t){t.fs(this.shadowRoot)}Ds(t){t.remove()}}class ContainerlessProjector{constructor(dom,$customElement,host){this.childNodes=host.childNodes.length?PLATFORM.toArray(host.childNodes):PLATFORM.us,this.host=dom.os(host),this.host.$customElement=$customElement}get children(){return this.childNodes}Cs(t){new MutationObserver(t).observe(this.host,childObserverOptions$1)}Is(){return this.host.Ps()}Ms(t){t.insertBefore(this.host)}Ds(t){t.remove()}}class HostProjector{constructor($customElement,host){this.host=host,this.host.$customElement=$customElement}get children(){return this.host.childNodes}Cs(t){}Is(){return this.host.Ps()}Ms(t){t.fs(this.host)}Ds(t){t.remove()}}const IProjectorLocatorRegistration=HTMLProjectorLocator,ITargetAccessorLocatorRegistration=TargetAccessorLocator,ITargetObserverLocatorRegistration=TargetObserverLocator,ITemplateFactoryRegistration=HTMLTemplateFactory,DefaultComponents=[HTMLProjectorLocator,TargetAccessorLocator,TargetObserverLocator,HTMLTemplateFactory],AttrBindingBehaviorRegistration=AttrBindingBehavior,SelfBindingBehaviorRegistration=SelfBindingBehavior,UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehavior,ComposeRegistration=Compose,DefaultResources=[AttrBindingBehavior,SelfBindingBehavior,UpdateTriggerBindingBehavior,Compose],ListenerBindingRendererRegistration=ListenerBindingRenderer,SetAttributeRendererRegistration=SetAttributeRenderer,StylePropertyBindingRendererRegistration=StylePropertyBindingRenderer,TextBindingRendererRegistration=TextBindingRenderer,DefaultRenderers=[ListenerBindingRenderer,SetAttributeRenderer,StylePropertyBindingRenderer,TextBindingRenderer],BasicConfiguration$1={register:t=>BasicConfiguration.register(t).register(...DefaultComponents,...DefaultResources,...DefaultRenderers),Fs(){return this.register(DI.Fs())}};export{Listener,AttributeNSAccessor,CheckedObserver,ClassAttributeAccessor,DataAttributeAccessor,ElementPropertyAccessor,ListenerTracker,DelegateOrCaptureSubscription,TriggerSubscription,IEventManager,EventSubscriber,TargetAccessorLocator,TargetObserverLocator,SelectValueObserver,StyleAttributeAccessor,ISVGAnalyzer,ValueAttributeObserver,AttrBindingBehavior,SelfBindingBehavior,UpdateTriggerBindingBehavior,Compose,IProjectorLocatorRegistration,ITargetAccessorLocatorRegistration,ITargetObserverLocatorRegistration,ITemplateFactoryRegistration,DefaultComponents,AttrBindingBehaviorRegistration,SelfBindingBehaviorRegistration,UpdateTriggerBindingBehaviorRegistration,ComposeRegistration,DefaultResources,ListenerBindingRendererRegistration,SetAttributeRendererRegistration,StylePropertyBindingRendererRegistration,TextBindingRendererRegistration,DefaultRenderers,BasicConfiguration$1 as BasicConfiguration,createElement,RenderPlan,HTMLTargetedInstructionType,isHTMLTargetedInstruction,NodeType,HTMLDOM,$DOM as DOM,CaptureBindingInstruction,DelegateBindingInstruction,SetAttributeInstruction,StylePropertyBindingInstruction,TextBindingInstruction,TriggerBindingInstruction}; |
@@ -1,1 +0,1 @@ | ||
this.au=this.au||{},this.au.runtimeHtml=(function(t,kernel,runtime){"use strict";function s(t,s,i,h){var n,e,r=arguments.length,o=3>r?s:null===h?h=Object.getOwnPropertyDescriptor(s,i):h;if("object"==typeof Reflect&&"function"==typeof Reflect.t)o=Reflect.t(t,s,i,h);else for(e=t.length-1;e>=0;e--)(n=t[e])&&(o=(3>r?n(o):r>3?n(s,i,o):n(s,i))||o);return r>3&&o&&Object.defineProperty(s,i,o),o}function i(t){return t.s&&t.s()[0]||t.i&&t.i()[0]||t.path&&t.path[0]||t.target}function h(){this.h(),this.o=1}function n(t){t.o=0;let s=i(t);const n=[];for(;s;){if(s.u){const i=s.u[t.type];i&&(t.stopPropagation!==h&&(t.h=t.stopPropagation,t.stopPropagation=h),n.push(i))}s=s.parentNode}for(let s=n.length-1;s>=0&&!t.o;s--){const i=n[s];"handleEvent"in i?i.l(t):i(t)}}function e(t){t.o=0;let s=i(t);for(;s&&!t.o;){if(s.g){const i=s.g[t.type];i&&(t.stopPropagation!==h&&(t.h=t.stopPropagation,t.stopPropagation=h),"handleEvent"in i?i.l(t):i(t))}s=s.parentNode}}function r(t,s){return t===s}function o(t){const s=i(t);if(this.target===s)return this.m(t)}function isHTMLTargetedInstruction(value){const type=value.type;return"string"==typeof type&&2===type.length}function createElement(dom,t,s,i){return"string"==typeof t?(function(dom,s,i,h){const instructions=[],n=[],dependencies=[],e=dom.createElement(t);let r=0;return i&&Object.keys(i).forEach(to=>{const value=i[to];isHTMLTargetedInstruction(value)?(r=1,instructions.push(value)):dom.setAttribute(e,to,value)}),r&&(dom.p(e),n.push(instructions)),h&&c(dom,e,h,n,dependencies),new RenderPlan(dom,e,n,dependencies)})(dom,0,s,i):(function(dom,t,s,i){const h=t.description.name,instructions=[],n=[instructions],dependencies=[],e=[],bindables=t.description.bindables,r=dom.createElement(h);return dom.p(r),dependencies.includes(t)||dependencies.push(t),instructions.push(new runtime.HydrateElementInstruction(h,e)),s&&Object.keys(s).forEach(to=>{const value=s[to];if(isHTMLTargetedInstruction(value))e.push(value);else{e.push(bindables[to]?{type:"re",to,value}:new SetAttributeInstruction(value,to))}}),i&&c(dom,r,i,n,dependencies),new RenderPlan(dom,r,n,dependencies)})(dom,t,s,i)}function c(dom,t,s,i,dependencies){for(let h=0,n=s.length;n>h;++h){const n=s[h];switch(typeof n){case"string":dom.appendChild(t,dom.createTextNode(n));break;case"object":dom.C(n)?dom.appendChild(t,n):"mergeInto"in n&&n.v(t,i,dependencies)}}}var u,HTMLTargetedInstructionType,NodeType,l;class Listener{constructor(dom,t,s,i,h,preventDefault,n,e){this.dom=dom,this.A=null,this.j=null,this.$state=0,this.T=s,this.O=e,this.preventDefault=preventDefault,this.M=i,this.target=h,this.k=t,this.L=n}V(t){const s=this.$scope.N;s.R=t;const i=this.M.evaluate(runtime.LifecycleFlags.S,this.$scope,this.O);return delete s.R,1!=i&&this.preventDefault&&t.preventDefault(),i}l(t){this.V(t)}B(t,s){if(2&this.$state){if(this.$scope===s)return;this.D(t|runtime.LifecycleFlags.U)}this.$state|=1,this.$scope=s;const i=this.M;runtime.hasBind(i)&&i.bind(t,s,this),this.F=this.L.addEventListener(this.dom,this.target,this.k,this,this.T),this.$state|=2,this.$state&=-2}D(t){if(!(2&this.$state))return;this.$state|=64;const s=this.M;runtime.hasUnbind(s)&&s.H(t,this.$scope,this),this.$scope=null,this.F.I(),this.F=null,this.$state&=-67}q(t,s){}G(t,s,i){}}t.AttributeNSAccessor=class{constructor(t,s,i,h,n){this.P=1,this.attributeName=h,this.X=t,this.Z=s,this.oldValue=this.$=this.J(),this.K=i,this.W=n}J(){return this.Z.getAttributeNS(this.W,this.attributeName)}Y(t){this.Z.setAttributeNS(this.W,this.attributeName,t)}},t.AttributeNSAccessor=s([runtime.targetObserver("")],t.AttributeNSAccessor);const a=runtime.LifecycleFlags._|runtime.LifecycleFlags.tt,f=runtime.LifecycleFlags.st|runtime.LifecycleFlags.it,d=(t,s)=>t===s;t.CheckedObserver=class{constructor(t,s,i,h){this.P=1,this.F=i,this.X=t,this.Z=s,this.ht=h}J(){return this.$}Y(t,s){this.nt||(this.nt=this.Z.et&&(this.Z.et.rt||this.Z.et.value),this.nt&&this.nt.subscribe(this)),this.ot&&(this.ot.ct(this),this.ot=null),"checkbox"===this.Z.type&&Array.isArray(t)&&(this.ot=this.ht.ut(t),this.ot.lt(this)),this.at()}ft(){this.at(),this.dt(f)}G(t,s,i){this.at(),this.dt(i)}at(){const value=this.$,t=this.Z,s=t.hasOwnProperty("model")?t.rt:t.value,i=t.wt||d;t.checked="radio"===t.type?!!i(value,s):1==value?1:Array.isArray(value)?-1!==value.findIndex(t=>!!i(t,s)):0}dt(t){t&runtime.LifecycleFlags.U||this.$!==this.oldValue&&this.bt(this.$,this.oldValue,t)}l(){let value=this.$;const t=this.Z,s=t.hasOwnProperty("model")?t.rt:t.value;let i;const h=t.wt||d;if("checkbox"===t.type){if(Array.isArray(value))return i=value.findIndex(t=>!!h(t,s)),void(t.checked&&-1===i?value.push(s):t.checked||-1===i||value.splice(i,1));value=t.checked}else{if(!t.checked)return;value=s}this.oldValue=this.$,this.$=value,this.dt(a)}subscribe(t){this.gt()||this.F.subscribe(this.Z,this),this.pt(t)}unsubscribe(t){this.Ct(t)&&!this.gt()&&this.F.I()}H(){this.ot&&(this.ot.ct(this),this.ot=null),this.nt&&this.nt.unsubscribe(this)}},t.CheckedObserver=s([runtime.targetObserver()],t.CheckedObserver),t.ClassAttributeAccessor=class{constructor(t,s){this.P=1,this.vt=1,this.X=t,this.Et=null,this.Z=s,this.version=0}J(){return this.$}Y(t){const s=this.Et||{};let i,name,h=this.version;if(t.length){const n=this.Z;for(let e=0,r=(i=t.split(/\s+/)).length;r>e;e++)(name=i[e]).length&&(s[name]=h,n.classList.add(name))}if(this.Et=s,this.version+=1,0!==h)for(name in h-=1,s)s.hasOwnProperty(name)&&s[name]===h&&this.Z.classList.remove(name)}},t.ClassAttributeAccessor=s([runtime.targetObserver("")],t.ClassAttributeAccessor),t.DataAttributeAccessor=class{constructor(t,s,i){this.P=1,this.X=t,this.Z=s,this.oldValue=this.$=this.J(),this.K=i}J(){return this.Z.getAttribute(this.K)}Y(t){null===t?this.Z.removeAttribute(this.K):this.Z.setAttribute(this.K,t)}},t.DataAttributeAccessor=s([runtime.targetObserver()],t.DataAttributeAccessor),t.ElementPropertyAccessor=class{constructor(t,s,i){this.P=1,this.X=t,this.Z=s,this.K=i}J(){return this.Z[this.K]}Y(value){this.Z[this.K]=value}},t.ElementPropertyAccessor=s([runtime.targetObserver("")],t.ElementPropertyAccessor);class ListenerTracker{constructor(dom,t,s,i){this.dom=dom,this.At=i,this.count=0,this.jt=t,this.listener=s}Tt(){this.count++,1===this.count&&this.dom.addEventListener(this.jt,this.listener,null,this.At)}Ot(){this.count--,0===this.count&&this.dom.removeEventListener(this.jt,this.listener,null,this.At)}I(){this.count>0&&(this.count=0,this.dom.removeEventListener(this.jt,this.listener,null,this.At))}}class DelegateOrCaptureSubscription{constructor(t,s,i,h){this.Mt=t,this.kt=s,this.k=i,s[i]=h}I(){this.Mt.Ot(),this.kt[this.k]=null}}class TriggerSubscription{constructor(dom,t,s,i){this.dom=dom,this.target=t,this.k=s,this.Lt=i,dom.addEventListener(s,i,t)}I(){this.dom.removeEventListener(this.k,this.Lt,this.target)}}class EventSubscriber{constructor(dom,t){this.dom=dom,this.Vt=t,this.target=null,this.F=null}subscribe(t,s){this.target=t,this.F=s;const i=this.dom.addEventListener,h=this.Vt;for(let n=0,e=h.length;e>n;++n)i(h[n],s,t)}I(){const t=this.target,s=this.F,i=this.Vt,h=this.dom.removeEventListener;for(let n=0,e=i.length;e>n;++n)h(i[n],s,t);this.target=this.F=null}}const IEventManager=kernel.DI.Rt("IEventManager").Nt(t=>t.singleton(w));class w{constructor(){this.St={},this.yt={},this.St={},this.yt={}}addEventListener(dom,t,s,i,strategy){let h,r,o;if(strategy===runtime.DelegationStrategy.Bt){(o=(h=this.St)[s]||(h[s]=new ListenerTracker(dom,s,e,0))).Tt();const n=t.g||(t.g={});return new DelegateOrCaptureSubscription(o,n,s,i)}if(strategy===runtime.DelegationStrategy.zt){(o=(r=this.yt)[s]||(r[s]=new ListenerTracker(dom,s,n,1))).Tt();const h=t.u||(t.u={});return new DelegateOrCaptureSubscription(o,h,s,i)}return new TriggerSubscription(dom,t,s,i)}I(){let t;const{St:s,yt:i}=this;for(t in s)s[t].I();for(t in i)i[t].I()}}const b=runtime.LifecycleFlags._|runtime.LifecycleFlags.tt,g={Dt:1,Ut:1,Ft:1};t.SelectValueObserver=class{constructor(t,s,i,h,dom){this.P=1,this.X=t,this.Z=s,this.F=i,this.ht=h,this.dom=dom}J(){return this.$}Y(t,s){const i=Array.isArray(t);if(!i&&null!=t&&this.Z.multiple)throw Error("Only null or Array instances can be bound to a multi-select.");this.ot&&(this.ot.ct(this),this.ot=null),i&&(this.ot=this.ht.ut(t),this.ot.lt(this)),this.Ht(),this.dt(s)}ft(t){this.Ht(t)}G(t,s,i){this.It(t,i)}dt(t){if(t&runtime.LifecycleFlags.U)return;const s=this.oldValue,i=this.$;i!==s&&this.bt(i,s,t)}l(){this.qt()&&this.dt(b)}Ht(t){const s=this.$,i=Array.isArray(s),h=this.Z,n=h.wt||r,e=h.options;let o=e.length;for(;o--;){const t=e[o],h=t.hasOwnProperty("model")?t.rt:t.value;t.selected=i?-1!==s.findIndex(t=>!!n(h,t)):!!n(h,s)}}qt(){const t=this.Z,s=t.options,i=s.length,h=this.$;let n=0;if(t.multiple){if(!Array.isArray(h))return 1;let e;const o=t.wt||r,c=[];for(;i>n;)(e=s[n]).selected&&c.push(e.hasOwnProperty("model")?e.rt:e.value),++n;for(n=0;h.length>n;){const t=h[n];-1===c.findIndex(s=>!!o(t,s))?h.splice(n,1):++n}for(n=0;c.length>n;){const t=c[n];-1===h.findIndex(s=>!!o(t,s))&&h.push(t),++n}return 0}let value=null;for(;i>n;){const t=s[n];if(t.selected){value=t.hasOwnProperty("model")?t.rt:t.value;break}++n}return this.oldValue=this.$,this.$=value,1}subscribe(t){this.gt()||this.F.subscribe(this.Z,this),this.pt(t)}unsubscribe(t){this.Ct(t)&&!this.gt()&&this.F.I()}bind(){this.Gt=this.dom.Pt(this.Z,this.Xt.bind(this),g)}H(){this.Gt.disconnect(),this.Gt=null,this.ot&&(this.ot.ct(this),this.ot=null)}Xt(){this.Ht(),this.qt()&&this.dt(b)}},t.SelectValueObserver=s([runtime.targetObserver()],t.SelectValueObserver),t.StyleAttributeAccessor=class{constructor(t,s){this.P=1,this.oldValue=this.$=s.style.cssText,this.X=t,this.Z=s,this.Zt=null,this.version=0}J(){return this.Z.style.cssText}$t(t,value){let s="";null!=value&&"function"==typeof value.indexOf&&-1!==value.indexOf("!important")&&(s="important",value=value.replace("!important","")),this.Z.style.setProperty(t,value,s)}Y(t){const s=this.Zt||{};let i,h=this.version;if(null!==t)if(t instanceof Object){let value;for(i in t)t.hasOwnProperty(i)&&(value=t[i],s[i=i.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)]=h,this.$t(i,value))}else if(t.length){const n=/\s*([\w\-]+)\s*:\s*((?:(?:[\w\-]+\(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[\w\-]+\(\s*(?:[^"](?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^\)]*)\),?|[^\)]*)\),?|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^;]*),?\s*)+);?/g;let e;for(;null!==(e=n.exec(t));)(i=e[1])&&(s[i]=h,this.$t(i,e[2]))}if(this.Zt=s,this.version+=1,0!==h)for(i in h-=1,s)s.hasOwnProperty(i)&&s[i]===h&&this.Z.style.removeProperty(i)}},t.StyleAttributeAccessor=s([runtime.targetObserver()],t.StyleAttributeAccessor);const m={button:"",Jt:"on",color:"#000000",Kt:"",Qt:"",email:"",Wt:"",hidden:"",Yt:"",_t:"",number:"",password:"",xt:"on",range:"50",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",ts:""},p=runtime.LifecycleFlags._|runtime.LifecycleFlags.tt;t.ValueAttributeObserver=class{constructor(t,s,i,h){if(this.P=1,this.F=h,this.X=t,this.Z=s,this.K=i,"value"===i){const t=s.type;this.defaultValue=m[t||"text"],"file"===t&&(this.flush=this.ss)}else this.defaultValue="";this.oldValue=this.$=s[i]}J(){return this.Z[this.K]}Y(t,s){this.Z[this.K]=t,s&runtime.LifecycleFlags.U||this.bt(this.$,this.oldValue,s)}l(){const t=this.oldValue=this.$,s=this.$=this.J();t!==s&&(this.bt(s,t,p),this.oldValue=s)}subscribe(t){this.gt()||(this.oldValue=this.J(),this.F.subscribe(this.Z,this)),this.pt(t)}unsubscribe(t){this.Ct(t)&&!this.gt()&&this.F.I()}ss(){const t=this.$;this.oldValue!==t&&""===t&&(this.Y(t,this.hs),this.oldValue=this.$)}},t.ValueAttributeObserver=s([runtime.targetObserver("")],t.ValueAttributeObserver);const C="http://www.w3.org/1999/xlink",v="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",A=((u=Object.create(null))["ns"]=["actuate",C],u["es"]=["arcrole",C],u["rs"]=["href",C],u["os"]=["role",C],u["cs"]=["show",C],u["us"]=["title",C],u["ls"]=["type",C],u["as"]=["lang",v],u["fs"]=["space",v],u.ds=["xmlns",E],u["ws"]=["xlink",E],u),j=["change","input"],T=["change"],O=["change","input","blur","keyup","paste"],M=["scroll"],k=(function(t){return t.bs=1,t.style=1,t.gs=1,t.checked=1,t.value=1,t.rt=1,t["ns"]=1,t["es"]=1,t["rs"]=1,t["os"]=1,t["cs"]=1,t["us"]=1,t["ls"]=1,t["as"]=1,t["fs"]=1,t.ds=1,t["ws"]=1,t})(Object.create(null));class TargetObserverLocator{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITargetObserverLocator,this).register(t)}ms(s,i,h,n){switch(n){case"checked":return new t.CheckedObserver(s,h,new EventSubscriber(this.dom,j),i);case"value":return"SELECT"===h.tagName?new t.SelectValueObserver(s,h,new EventSubscriber(this.dom,T),i,this.dom):new t.ValueAttributeObserver(s,h,n,new EventSubscriber(this.dom,j));case"files":return new t.ValueAttributeObserver(s,h,n,new EventSubscriber(this.dom,j));case"textContent":case"innerHTML":return new t.ValueAttributeObserver(s,h,n,new EventSubscriber(this.dom,O));case"scrollTop":case"scrollLeft":return new t.ValueAttributeObserver(s,h,n,new EventSubscriber(this.dom,M));case"class":return new t.ClassAttributeAccessor(s,h);case"style":case"css":return new t.StyleAttributeAccessor(s,h);case"model":return new runtime.SetterObserver(h,n);case"role":return new t.DataAttributeAccessor(s,h,n);default:if(void 0!==A[n]){const i=A[n];return new t.AttributeNSAccessor(s,h,n,i[0],i[1])}const e=n.slice(0,5);if("aria-"===e||"data-"===e)return new t.DataAttributeAccessor(s,h,n)}return null}ps(t,s){return 1==k[s]}Cs(t){return this.dom.C(t)}}TargetObserverLocator.inject=[runtime.IDOM];class TargetAccessorLocator{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITargetAccessorLocator,this).register(t)}vs(s,i,h){switch(h){case"textContent":return new t.ElementPropertyAccessor(s,i,h);case"class":return new t.ClassAttributeAccessor(s,i);case"style":case"css":return new t.StyleAttributeAccessor(s,i);case"src":case"href":case"role":return new t.DataAttributeAccessor(s,i,h);default:if(void 0!==A[h]){const n=A[h];return new t.AttributeNSAccessor(s,i,h,n[0],n[1])}const n=h.slice(0,5);return"aria-"===n||"data-"===n?new t.DataAttributeAccessor(s,i,h):new t.ElementPropertyAccessor(s,i,h)}}Cs(t){return this.dom.C(t)}}TargetAccessorLocator.inject=[runtime.IDOM];const ISVGAnalyzer=kernel.DI.Rt("ISVGAnalyzer").Nt(t=>t.singleton(class{Es(t,s){return 0}}));class AttrBindingBehavior{bind(s,i,h){h.targetObserver=new t.DataAttributeAccessor(h.O.get(runtime.ILifecycle),h.target,h.As)}H(t,s,i){}}runtime.BindingBehaviorResource.js("attr",AttrBindingBehavior);class SelfBindingBehavior{bind(t,s,i){if(!i.V||!i.k)throw kernel.Reporter.error(8);i.m=i.V,i.V=o}H(t,s,i){i.V=i.m,i.m=null}}runtime.BindingBehaviorResource.js("self",SelfBindingBehavior);class UpdateTriggerBindingBehavior{constructor(t){this.ht=t}bind(t,s,i,...h){if(0===h.length)throw kernel.Reporter.error(9);if(i.mode!==runtime.BindingMode.Ts&&i.mode!==runtime.BindingMode.Os)throw kernel.Reporter.error(10);const targetObserver=this.ht.ms(i.target,i.As);if(!targetObserver.F)throw kernel.Reporter.error(10);i.targetObserver=targetObserver,targetObserver.Ms=i.targetObserver.F,targetObserver.F=new EventSubscriber(i.O.get(runtime.IDOM),h)}H(t,s,i){i.targetObserver.F.I(),i.targetObserver.F=i.targetObserver.Ms,i.targetObserver.Ms=null}}UpdateTriggerBindingBehavior.inject=[runtime.IObserverLocator],runtime.BindingBehaviorResource.js("updateTrigger",UpdateTriggerBindingBehavior),(HTMLTargetedInstructionType=t.HTMLTargetedInstructionType||(t.HTMLTargetedInstructionType={})).ks="ha",HTMLTargetedInstructionType.Ls="hb",HTMLTargetedInstructionType.Vs="hc",HTMLTargetedInstructionType.setAttribute="hd";class SetAttributeInstruction{constructor(value,to){this.type="hd",this.to=to,this.value=value}}class RenderPlan{constructor(dom,t,instructions,dependencies){this.dom=dom,this.dependencies=dependencies,this.instructions=instructions,this.Ns=t}get Rs(){return this.Ss||(this.Ss=runtime.buildTemplateDefinition(null,null,this.Ns,null,"string"==typeof this.Ns,null,this.instructions,this.dependencies))}ys(t,s){return t.ys(this.dom,this.Rs,null,s)}Bs(t,s){return this.zs(t,s).create()}zs(t,s){return t.zs(this.dom,this.Rs,s)}v(t,instructions,dependencies){this.dom.appendChild(t,this.Ns),instructions.push(...this.instructions),dependencies.push(...this.dependencies)}}const L=["subject","composing"];class Compose{constructor(dom,t,s,i,h){this.dom=dom,this.subject=null,this.Ds=0,this.Us=h,this.Fs=null,this.Hs=t,this.Is=i,this.Us.qs=(()=>{this.Ds=0}),this.properties=s.instructions.filter(t=>!L.includes(t.to)).reduce((t,s)=>(s.to&&(t[s.to]=s),t),{})}Gs(t){this.Ps(this.subject,null,t),this.Us.Gs(t,this.$scope)}Xs(t){this.Us.Xs(t)}Zs(t){this.Us.Zs(t)}$s(t){this.Fs=null,this.Us.$s(t)}Js(t){this.Us.Js(t)}Ks(t,s,i){this.Ps(t,s,i)}Ps(t,s,i){this.Fs!==t&&(this.Fs=t,t=t instanceof Promise?t.then(t=>this.Qs(t,i)):this.Qs(t,i),this.Ds=1,this.Us.Ws(t,i))}Qs(t,s){const i=this.Ys(t);return i?(i._s(this.xs.host),i.ti(this.Hs.$scope),i):null}Ys(t){return t?"lockScope"in t?t:"createView"in t?t.Bs(this.Is,this.Hs.$context):"create"in t?t.create():"template"in t?this.Is.zs(this.dom,t,this.Hs.$context).create():createElement(this.dom,t,this.properties,this.xs.children).Bs(this.Is,this.Hs.$context):null}}Compose.inject=[runtime.IDOM,runtime.IRenderable,runtime.ITargetedInstruction,runtime.IRenderingEngine,runtime.CompositionCoordinator],s([runtime.bindable],Compose.prototype,"subject",void 0),s([runtime.bindable],Compose.prototype,"composing",void 0),runtime.CustomElementResource.js({name:"au-compose",containerless:1},Compose),(NodeType=t.NodeType||(t.NodeType={}))[NodeType.Element=1]="Element",NodeType[NodeType.Attr=2]="Attr",NodeType[NodeType.Text=3]="Text",NodeType[NodeType.CDATASection=4]="CDATASection",NodeType[NodeType.EntityReference=5]="EntityReference",NodeType[NodeType.Entity=6]="Entity",NodeType[NodeType.ProcessingInstruction=7]="ProcessingInstruction",NodeType[NodeType.Comment=8]="Comment",NodeType[NodeType.Document=9]="Document",NodeType[NodeType.DocumentType=10]="DocumentType",NodeType[NodeType.DocumentFragment=11]="DocumentFragment",NodeType[NodeType.Notation=12]="Notation";class V{constructor(dom,t){this.dom=dom,this.firstChild=t,this.lastChild=t,this.childNodes=[t],this.targets=[new S(t)]}si(){return this.targets}insertBefore(t){t.parentNode.insertBefore(this.firstChild,t)}ii(t){t.appendChild(this.firstChild)}remove(){this.firstChild.remove()}}class N{constructor(dom,t){this.dom=dom,this.hi=t;const s=t.querySelectorAll(".au");let i=0,h=s.length;const targets=this.targets=Array(h);for(;h>i;){const t=s[i];targets[i]="AU-M"===t.nodeName?this.dom.ni(t):t,++i}const n=t.childNodes;i=0;const childNodes=this.childNodes=Array(h=n.length);for(;h>i;)childNodes[i]=n[i],++i;this.firstChild=t.firstChild,this.lastChild=t.lastChild,this.start=this.end=null}si(){return this.targets}insertBefore(t){if(t.parentNode.insertBefore(this.hi,t),"au-end"===t.textContent){this.end=t;const s=this.start=t.ei;s.$nodes=null===s.$nodes?this:kernel.PLATFORM.ri}}ii(t){t.appendChild(this.hi),this.start=this.end=null}remove(){const t=this.hi;if(null!==this.start&&this.start.$nodes===this){const s=this.end;let i,h=this.start.nextSibling;for(;h!==s;)i=h.nextSibling,t.appendChild(h),h=i;this.start.$nodes=null,this.start=this.end=null}else{let s=this.firstChild;if(s.parentNode!==t){const i=this.lastChild;let h;for(;null!==s&&(h=s.nextSibling,t.appendChild(s),s!==i);)s=h}}}}class R{constructor(dom,t){this.dom=dom;const s=dom.createDocumentFragment(t),childNodes=s.childNodes;switch(childNodes.length){case 0:return void(this.oi=(()=>runtime.NodeSequence.empty));case 2:const t=childNodes[0];if("AU-M"===t.nodeName||"#comment"===t.nodeName){const t=childNodes[1];if(3===t.nodeType&&0===t.textContent.length)return this.ci=0,this.Ns=t,void(this.ui=V)}default:this.ci=1,this.Ns=s,this.ui=N}}oi(){return new this.ui(this.dom,this.Ns.cloneNode(this.ci))}}class S{get parentNode(){return this.nextSibling.parentNode}constructor(t){this.nextSibling=t,this.textContent=""}remove(){}}(l=S.prototype).previousSibling=null,l.childNodes=kernel.PLATFORM.li,l.nodeName="AU-M",l.nodeType=1;class y{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITemplateFactory,this).register(t)}create(t,s){return new runtime.CompiledTemplate(this.dom,s,new R(this.dom,s.template),t)}}y.inject=[runtime.IDOM];let B=class{constructor(t,s){this.ai=t,this.ht=s}fi(dom,t,s,i,h){const n=i.nextSibling;let bindable;dom.di(i)&&dom.remove(i);const e=runtime.ensureExpression(this.ai,h.from,2048);bindable=e.wi?new runtime.MultiInterpolationBinding(this.ht,e,n,"textContent",runtime.BindingMode.bi,t):new runtime.InterpolationBinding(e.gi,e,n,"textContent",runtime.BindingMode.bi,this.ht,t,1),runtime.addBindable(s,bindable)}};B.inject=[runtime.IExpressionParser,runtime.IObserverLocator],B=s([runtime.instructionRenderer("ha")],B);let z=class{constructor(t,s){this.ai=t,this.L=s}fi(dom,t,s,i,h){const n=runtime.ensureExpression(this.ai,h.from,80|h.strategy+6),bindable=new Listener(dom,h.to,h.strategy,n,i,h.preventDefault,this.L,t);runtime.addBindable(s,bindable)}};z.inject=[runtime.IExpressionParser,IEventManager],z=s([runtime.instructionRenderer("hb")],z);let D=class{fi(dom,t,s,i,h){i.setAttribute(h.to,h.value)}};D=s([runtime.instructionRenderer("hd")],D);let U=class{constructor(t,s){this.ai=t,this.ht=s}fi(dom,t,s,i,h){const n=runtime.ensureExpression(this.ai,h.from,48|runtime.BindingMode.bi),bindable=new runtime.Binding(n,i.style,h.to,runtime.BindingMode.bi,this.ht,t);runtime.addBindable(s,bindable)}};U.inject=[runtime.IExpressionParser,runtime.IObserverLocator],U=s([runtime.instructionRenderer("hc")],U);const F={mode:"open"},H={Dt:1};class I{constructor(dom,$customElement,host,t){let shadowOptions;this.dom=dom,this.host=host,this.shadowRoot=host.mi(shadowOptions=null!=t.shadowOptions&&"object"==typeof t.shadowOptions&&"mode"in t.shadowOptions?t.shadowOptions:F),this.host.$customElement=$customElement,this.shadowRoot.$customElement=$customElement}get children(){return this.shadowRoot.childNodes}pi(t){this.dom.Pt(this.shadowRoot,t,H)}Ci(){return this.shadowRoot}vi(t){t.ii(this.shadowRoot)}Ei(t){t.remove()}}class q{constructor(dom,$customElement,host){this.childNodes=host.childNodes.length?kernel.PLATFORM.toArray(host.childNodes):kernel.PLATFORM.li,this.host=dom.ni(host),this.host.$customElement=$customElement}get children(){return this.childNodes}pi(t){new MutationObserver(t).observe(this.host,H)}Ci(){return this.host.Ai()}vi(t){t.insertBefore(this.host)}Ei(t){t.remove()}}class G{constructor($customElement,host){this.host=host,this.host.$customElement=$customElement}get children(){return this.host.childNodes}pi(t){}Ci(){return this.host.Ai()}vi(t){t.ii(this.host)}Ei(t){t.remove()}}const IProjectorLocatorRegistration=class{static register(t){return kernel.Registration.singleton(runtime.IProjectorLocator,this).register(t)}ji(dom,t,host,def){if(def.shadowOptions||def.hasSlots){if(def.containerless)throw kernel.Reporter.error(21);return new I(dom,t,host,def)}return def.containerless?new q(dom,t,host):new G(t,host)}},ITargetAccessorLocatorRegistration=TargetAccessorLocator,ITargetObserverLocatorRegistration=TargetObserverLocator,ITemplateFactoryRegistration=y,DefaultComponents=[IProjectorLocatorRegistration,ITargetAccessorLocatorRegistration,ITargetObserverLocatorRegistration,ITemplateFactoryRegistration],AttrBindingBehaviorRegistration=AttrBindingBehavior,SelfBindingBehaviorRegistration=SelfBindingBehavior,UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehavior,ComposeRegistration=Compose,DefaultResources=[AttrBindingBehaviorRegistration,SelfBindingBehaviorRegistration,UpdateTriggerBindingBehaviorRegistration,ComposeRegistration],ListenerBindingRendererRegistration=z,SetAttributeRendererRegistration=D,StylePropertyBindingRendererRegistration=U,TextBindingRendererRegistration=B,DefaultRenderers=[ListenerBindingRendererRegistration,SetAttributeRendererRegistration,StylePropertyBindingRendererRegistration,TextBindingRendererRegistration],BasicConfiguration={register:t=>runtime.BasicConfiguration.register(t).register(...DefaultComponents,...DefaultResources,...DefaultRenderers),Ti(){return this.register(kernel.DI.Ti())}};return t.Listener=Listener,t.ListenerTracker=ListenerTracker,t.DelegateOrCaptureSubscription=DelegateOrCaptureSubscription,t.TriggerSubscription=TriggerSubscription,t.IEventManager=IEventManager,t.EventSubscriber=EventSubscriber,t.TargetAccessorLocator=TargetAccessorLocator,t.TargetObserverLocator=TargetObserverLocator,t.ISVGAnalyzer=ISVGAnalyzer,t.AttrBindingBehavior=AttrBindingBehavior,t.SelfBindingBehavior=SelfBindingBehavior,t.UpdateTriggerBindingBehavior=UpdateTriggerBindingBehavior,t.Compose=Compose,t.IProjectorLocatorRegistration=IProjectorLocatorRegistration,t.ITargetAccessorLocatorRegistration=ITargetAccessorLocatorRegistration,t.ITargetObserverLocatorRegistration=ITargetObserverLocatorRegistration,t.ITemplateFactoryRegistration=ITemplateFactoryRegistration,t.DefaultComponents=DefaultComponents,t.AttrBindingBehaviorRegistration=AttrBindingBehaviorRegistration,t.SelfBindingBehaviorRegistration=SelfBindingBehaviorRegistration,t.UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehaviorRegistration,t.ComposeRegistration=ComposeRegistration,t.DefaultResources=DefaultResources,t.ListenerBindingRendererRegistration=ListenerBindingRendererRegistration,t.SetAttributeRendererRegistration=SetAttributeRendererRegistration,t.StylePropertyBindingRendererRegistration=StylePropertyBindingRendererRegistration,t.TextBindingRendererRegistration=TextBindingRendererRegistration,t.DefaultRenderers=DefaultRenderers,t.BasicConfiguration=BasicConfiguration,t.createElement=createElement,t.RenderPlan=RenderPlan,t.isHTMLTargetedInstruction=isHTMLTargetedInstruction,t.HTMLDOM=class{constructor(t,s,i,h,n){this.Oi=t,this.Mi=s,this.Node=i,this.Element=h,this.HTMLElement=n}addEventListener(t,s,i,h){(i||this.Mi).addEventListener(t,s,h)}appendChild(t,s){t.appendChild(s)}cloneNode(t,s){return t.cloneNode(0!=s)}ni(t){if(this.ki(t))return t;if(null===t.parentNode)throw kernel.Reporter.error(52);const s=this.Mi.createComment("au-end"),i=this.Mi.createComment("au-start");return t.parentNode.replaceChild(s,t),s.parentNode.insertBefore(i,s),s.ei=i,i.$nodes=null,s}createDocumentFragment(t){if(null==t)return this.Mi.createDocumentFragment();if(this.C(t)){if(void 0!==t.content)return t.content;const s=this.Mi.createDocumentFragment();return s.appendChild(t),s}return this.Li(t).content}createElement(name){return this.Mi.createElement(name)}Pt(t,s,i){if("undefined"==typeof MutationObserver)return{disconnect(){},observe(){},takeRecords:()=>kernel.PLATFORM.li};const h=new MutationObserver(s);return h.observe(t,i),h}Li(t){if(null==t)return this.Mi.createElement("template");const template=this.Mi.createElement("template");return template.innerHTML=""+t,template}createTextNode(t){return this.Mi.createTextNode(t)}insertBefore(t,s){s.parentNode.insertBefore(t,s)}di(t){return"AU-M"===t.nodeName}C(t){return null!=t&&t.nodeType>0}ki(t){return"au-end"===t.textContent}p(t){t.className="au"}Vi(t,s){t.Ni(runtime.INode,s),t.Ni(this.Node,s),t.Ni(this.Element,s),t.Ni(this.HTMLElement,s)}remove(t){t.remove?t.remove():t.parentNode.removeChild(t)}removeEventListener(t,s,i,h){(i||this.Mi).removeEventListener(t,s,h)}setAttribute(t,name,value){t.setAttribute(name,value)}},t.CaptureBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=runtime.DelegationStrategy.zt,this.to=to}},t.DelegateBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=runtime.DelegationStrategy.Bt,this.to=to}},t.SetAttributeInstruction=SetAttributeInstruction,t.StylePropertyBindingInstruction=class{constructor(from,to){this.type="hc",this.from=from,this.to=to}},t.TextBindingInstruction=class{constructor(from){this.type="ha",this.from=from}},t.TriggerBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=1,this.strategy=runtime.DelegationStrategy.Ri,this.to=to}},t})({},kernel,runtime); | ||
this.au=this.au||{},this.au.runtimeHtml=(function(t,kernel,runtime){"use strict";function s(t,s,i,e){var h,n,r=arguments.length,c=3>r?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,s,i,e);else for(n=t.length-1;n>=0;n--)(h=t[n])&&(c=(3>r?h(c):r>3?h(s,i,c):h(s,i))||c);return r>3&&c&&Object.defineProperty(s,i,c),c}function i(t){return t.t&&t.t()[0]||t.s&&t.s()[0]||t.path&&t.path[0]||t.target}function e(){this.i(),this.h=1}function h(t){t.h=0;let s=i(t);const h=[];for(;s;){if(s.o){const i=s.o[t.type];i&&(t.stopPropagation!==e&&(t.i=t.stopPropagation,t.stopPropagation=e),h.push(i))}s=s.parentNode}for(let s=h.length-1;s>=0&&!t.h;s--){const i=h[s];"handleEvent"in i?i.l(t):i(t)}}function n(t){t.h=0;let s=i(t);for(;s&&!t.h;){if(s.u){const i=s.u[t.type];i&&(t.stopPropagation!==e&&(t.i=t.stopPropagation,t.stopPropagation=e),"handleEvent"in i?i.l(t):i(t))}s=s.parentNode}}function r(t,s){return t===s}function c(t){const s=i(t);if(this.target===s)return this.g(t)}function isHTMLTargetedInstruction(value){const type=value.type;return"string"==typeof type&&2===type.length}function createElement(dom,t,s,i){return"string"==typeof t?(function(dom,s,i,e){const instructions=[],h=[],dependencies=[],n=dom.createElement(t);let r=0;return i&&Object.keys(i).forEach(to=>{const value=i[to];isHTMLTargetedInstruction(value)?(r=1,instructions.push(value)):dom.setAttribute(n,to,value)}),r&&(dom.p(n),h.push(instructions)),e&&o(dom,n,e,h,dependencies),new RenderPlan(dom,n,h,dependencies)})(dom,0,s,i):(function(dom,t,s,i){const e=t.description.name,instructions=[],h=[instructions],dependencies=[],n=[],bindables=t.description.bindables,r=dom.createElement(e);return dom.p(r),dependencies.includes(t)||dependencies.push(t),instructions.push(new runtime.HydrateElementInstruction(e,n)),s&&Object.keys(s).forEach(to=>{const value=s[to];if(isHTMLTargetedInstruction(value))n.push(value);else{n.push(bindables[to]?{type:"re",to,value}:new SetAttributeInstruction(value,to))}}),i&&o(dom,r,i,h,dependencies),new RenderPlan(dom,r,h,dependencies)})(dom,t,s,i)}function o(dom,t,s,i,dependencies){for(let e=0,h=s.length;h>e;++e){const h=s[e];switch(typeof h){case"string":dom.appendChild(t,dom.createTextNode(h));break;case"object":dom.m(h)?dom.appendChild(t,h):"mergeInto"in h&&h.v(t,i,dependencies)}}}var l,HTMLTargetedInstructionType,NodeType,u;class Listener{constructor(dom,t,s,i,e,preventDefault,h,n){this.dom=dom,this.C=null,this.V=null,this.$state=0,this.A=s,this.T=n,this.preventDefault=preventDefault,this.k=i,this.target=e,this.j=t,this.O=h}L(t){const s=this.$scope.M;s.S=t;const i=this.k.evaluate(runtime.LifecycleFlags.R,this.$scope,this.T);return Reflect.deleteProperty(s,"$event"),1!=i&&this.preventDefault&&t.preventDefault(),i}l(t){this.L(t)}N(t,s){if(2&this.$state){if(this.$scope===s)return;this.D(t|runtime.LifecycleFlags.I)}this.$state|=1,this.$scope=s;const i=this.k;runtime.hasBind(i)&&i.bind(t,s,this),this.B=this.O.addEventListener(this.dom,this.target,this.j,this,this.A),this.$state|=2,this.$state&=-2}D(t){if(!(2&this.$state))return;this.$state|=64;const s=this.k;runtime.hasUnbind(s)&&s.F(t,this.$scope,this),this.$scope=null,this.B.P(),this.B=null,this.$state&=-67}U(t,s,i){}$(t,s,i){}}t.AttributeNSAccessor=class{constructor(t,s,i,e,h){this.H=1,this.attributeName=e,this.q=t,this.G=s,this.oldValue=this.X=this.Z(),this._=i,this.J=h}Z(){return this.G.getAttributeNS(this.J,this.attributeName)}K(t){this.G.setAttributeNS(this.J,this.attributeName,t)}},t.AttributeNSAccessor=s([runtime.targetObserver("")],t.AttributeNSAccessor);const a=runtime.LifecycleFlags.W|runtime.LifecycleFlags.Y,d=runtime.LifecycleFlags.tt|runtime.LifecycleFlags.st,f=(t,s)=>t===s;t.CheckedObserver=class{constructor(t,s,i,e,h){this.it=t&runtime.LifecycleFlags.et,this.H=1,this.B=e,this.q=s,this.G=i,this.ht=h}Z(){return this.X}K(t,s){this.nt||(this.nt=this.G.rt&&(this.G.rt.ct||this.G.rt.value),this.nt&&this.nt.subscribe(this)),this.ot&&(this.ot.lt(this),this.ot=null),"checkbox"===this.G.type&&Array.isArray(t)&&(this.ot=this.ht.ut(this.it|s,t),this.ot.at(this)),this.dt()}ft(){this.dt(),this.wt(d)}$(t,s,i){this.dt(),this.wt(i)}dt(){const value=this.X,t=this.G,s=t.hasOwnProperty("model")?t.ct:t.value,i=t.bt||f;t.checked="radio"===t.type?!!i(value,s):1==value?1:Array.isArray(value)?-1!==value.findIndex(t=>!!i(t,s)):0}wt(t){t&runtime.LifecycleFlags.I||this.X!==this.oldValue&&this.gt(this.X,this.oldValue,this.it|t)}l(){let value=this.X;const t=this.G,s=t.hasOwnProperty("model")?t.ct:t.value;let i;const e=t.bt||f;if("checkbox"===t.type){if(Array.isArray(value))return i=value.findIndex(t=>!!e(t,s)),void(t.checked&&-1===i?value.push(s):t.checked||-1===i||value.splice(i,1));value=t.checked}else{if(!t.checked)return;value=s}this.oldValue=this.X,this.X=value,this.wt(a)}subscribe(t){this.pt()||this.B.subscribe(this.G,this),this.vt(t)}unsubscribe(t){this.yt(t)&&!this.pt()&&this.B.P()}F(){this.ot&&(this.ot.lt(this),this.ot=null),this.nt&&this.nt.unsubscribe(this)}},t.CheckedObserver=s([runtime.targetObserver()],t.CheckedObserver),t.ClassAttributeAccessor=class{constructor(t,s){this.H=1,this.Ct=1,this.q=t,this.Et=null,this.G=s,this.version=0}Z(){return this.X}K(t){const s=this.Et||{};let i,name,e=this.version;if(t.length){const h=this.G;for(let n=0,r=(i=t.split(/\s+/)).length;r>n;n++)(name=i[n]).length&&(s[name]=e,h.classList.add(name))}if(this.Et=s,this.version+=1,0!==e)for(name in e-=1,s)s.hasOwnProperty(name)&&s[name]===e&&this.G.classList.remove(name)}},t.ClassAttributeAccessor=s([runtime.targetObserver("")],t.ClassAttributeAccessor),t.DataAttributeAccessor=class{constructor(t,s,i){this.H=1,this.q=t,this.G=s,this.oldValue=this.X=this.Z(),this._=i}Z(){return this.G.getAttribute(this._)}K(t){null===t?this.G.removeAttribute(this._):this.G.setAttribute(this._,t)}},t.DataAttributeAccessor=s([runtime.targetObserver()],t.DataAttributeAccessor),t.ElementPropertyAccessor=class{constructor(t,s,i){this.H=1,this.q=t,this.G=s,this._=i}Z(){return this.G[this._]}K(value){this.G[this._]=value}},t.ElementPropertyAccessor=s([runtime.targetObserver("")],t.ElementPropertyAccessor);class ListenerTracker{constructor(dom,t,s,i){this.dom=dom,this.Vt=i,this.count=0,this.At=t,this.listener=s}Tt(){this.count++,1===this.count&&this.dom.addEventListener(this.At,this.listener,null,this.Vt)}kt(){this.count--,0===this.count&&this.dom.removeEventListener(this.At,this.listener,null,this.Vt)}P(){this.count>0&&(this.count=0,this.dom.removeEventListener(this.At,this.listener,null,this.Vt))}}class DelegateOrCaptureSubscription{constructor(t,s,i,e){this.jt=t,this.xt=s,this.j=i,s[i]=e}P(){this.jt.kt(),this.xt[this.j]=null}}class TriggerSubscription{constructor(dom,t,s,i){this.dom=dom,this.target=t,this.j=s,this.Ot=i,dom.addEventListener(s,i,t)}P(){this.dom.removeEventListener(this.j,this.Ot,this.target)}}class EventSubscriber{constructor(dom,t){this.dom=dom,this.Lt=t,this.target=null,this.B=null}subscribe(t,s){this.target=t,this.B=s;const i=this.dom.addEventListener,e=this.Lt;for(let h=0,n=e.length;n>h;++h)i(e[h],s,t)}P(){const t=this.target,s=this.B,i=this.Lt,e=this.dom.removeEventListener;for(let h=0,n=i.length;n>h;++h)e(i[h],s,t);this.target=this.B=null}}const IEventManager=kernel.DI.St("IEventManager").Mt(t=>t.singleton(w));class w{constructor(){this.Rt={},this.Nt={},this.Rt={},this.Nt={}}addEventListener(dom,t,s,i,strategy){let e,r,c;if(strategy===runtime.DelegationStrategy.Dt){(c=(e=this.Rt)[s]||(e[s]=new ListenerTracker(dom,s,n,0))).Tt();const h=t.u||(t.u={});return new DelegateOrCaptureSubscription(c,h,s,i)}if(strategy===runtime.DelegationStrategy.It){(c=(r=this.Nt)[s]||(r[s]=new ListenerTracker(dom,s,h,1))).Tt();const e=t.o||(t.o={});return new DelegateOrCaptureSubscription(c,e,s,i)}return new TriggerSubscription(dom,t,s,i)}P(){let t;const{Rt:s,Nt:i}=this;for(t in s)s[t].P();for(t in i)i[t].P()}}const b=runtime.LifecycleFlags.W|runtime.LifecycleFlags.Y,g={Bt:1,Ft:1,Pt:1};t.SelectValueObserver=class{constructor(t,s,i,e,h,dom){this.it=t&runtime.LifecycleFlags.et,this.H=1,this.q=s,this.G=i,this.B=e,this.ht=h,this.dom=dom}Z(){return this.X}K(t,s){const i=Array.isArray(t);if(!i&&null!=t&&this.G.multiple)throw Error("Only null or Array instances can be bound to a multi-select.");this.ot&&(this.ot.lt(this),this.ot=null),i&&(this.ot=this.ht.ut(this.it|s,t),this.ot.at(this)),this.zt(),this.wt(s)}ft(t){this.zt(t)}$(t,s,i){this.Ut(t,this.it|i)}wt(t){if(t&runtime.LifecycleFlags.I)return;const s=this.oldValue,i=this.X;i!==s&&this.gt(i,s,this.it|t)}l(){this.$t()&&this.wt(b)}zt(t){const s=this.X,i=Array.isArray(s),e=this.G,h=e.bt||r,n=e.options;let c=n.length;for(;c--;){const t=n[c],e=t.hasOwnProperty("model")?t.ct:t.value;t.selected=i?-1!==s.findIndex(t=>!!h(e,t)):!!h(e,s)}}$t(){const t=this.G,s=t.options,i=s.length,e=this.X;let h=0;if(t.multiple){if(!Array.isArray(e))return 1;let n;const c=t.bt||r,o=[];for(;i>h;)(n=s[h]).selected&&o.push(n.hasOwnProperty("model")?n.ct:n.value),++h;for(h=0;e.length>h;){const t=e[h];-1===o.findIndex(s=>!!c(t,s))?e.splice(h,1):++h}for(h=0;o.length>h;){const t=o[h];-1===e.findIndex(s=>!!c(t,s))&&e.push(t),++h}return 0}let value=null;for(;i>h;){const t=s[h];if(t.selected){value=t.hasOwnProperty("model")?t.ct:t.value;break}++h}return this.oldValue=this.X,this.X=value,1}subscribe(t){this.pt()||this.B.subscribe(this.G,this),this.vt(t)}unsubscribe(t){this.yt(t)&&!this.pt()&&this.B.P()}bind(){this.Ht=this.dom.qt(this.G,this.Gt.bind(this),g)}F(){this.Ht.disconnect(),this.Ht=null,this.ot&&(this.ot.lt(this),this.ot=null)}Gt(){this.zt(),this.$t()&&this.wt(b)}},t.SelectValueObserver=s([runtime.targetObserver()],t.SelectValueObserver),t.StyleAttributeAccessor=class{constructor(t,s){this.H=1,this.oldValue=this.X=s.style.cssText,this.q=t,this.G=s,this.Xt=null,this.version=0}Z(){return this.G.style.cssText}Zt(t,value){let s="";null!=value&&"function"==typeof value.indexOf&&-1!==value.indexOf("!important")&&(s="important",value=value.replace("!important","")),this.G.style.setProperty(t,value,s)}K(t){const s=this.Xt||{};let i,e=this.version;if(null!==t)if(t instanceof Object){let value;for(i in t)t.hasOwnProperty(i)&&(value=t[i],s[i=i.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)]=e,this.Zt(i,value))}else if(t.length){const h=/\s*([\w\-]+)\s*:\s*((?:(?:[\w\-]+\(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[\w\-]+\(\s*(?:[^"](?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^\)]*)\),?|[^\)]*)\),?|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^;]*),?\s*)+);?/g;let n;for(;null!==(n=h.exec(t));)(i=n[1])&&(s[i]=e,this.Zt(i,n[2]))}if(this.Xt=s,this.version+=1,0!==e)for(i in e-=1,s)s.hasOwnProperty(i)&&s[i]===e&&this.G.style.removeProperty(i)}},t.StyleAttributeAccessor=s([runtime.targetObserver()],t.StyleAttributeAccessor);const p={button:"",_t:"on",color:"#000000",Jt:"",Kt:"",email:"",Qt:"",hidden:"",Wt:"",Yt:"",number:"",password:"",ts:"on",range:"50",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",ss:""},m=runtime.LifecycleFlags.W|runtime.LifecycleFlags.Y;t.ValueAttributeObserver=class{constructor(t,s,i,e){if(this.H=1,this.B=e,this.q=t,this.G=s,this._=i,"value"===i){const t=s.type;this.defaultValue=p[t||"text"],"file"===t&&(this.flush=this.es)}else this.defaultValue="";this.oldValue=this.X=s[i]}Z(){return this.G[this._]}K(t,s){this.G[this._]=t,s&runtime.LifecycleFlags.I||this.gt(this.X,this.oldValue,s)}l(){const t=this.oldValue=this.X,s=this.X=this.Z();t!==s&&(this.gt(s,t,m),this.oldValue=s)}subscribe(t){this.pt()||(this.oldValue=this.Z(),this.B.subscribe(this.G,this)),this.vt(t)}unsubscribe(t){this.yt(t)&&!this.pt()&&this.B.P()}es(){const t=this.X;this.oldValue!==t&&""===t&&(this.K(t,this.hs),this.oldValue=this.X)}},t.ValueAttributeObserver=s([runtime.targetObserver("")],t.ValueAttributeObserver);const v="http://www.w3.org/1999/xlink",y="http://www.w3.org/XML/1998/namespace",C="http://www.w3.org/2000/xmlns/",E=((l=Object.create(null))["ns"]=["actuate",v],l["rs"]=["arcrole",v],l["cs"]=["href",v],l["os"]=["role",v],l["ls"]=["show",v],l["us"]=["title",v],l["as"]=["type",v],l["ds"]=["lang",y],l["fs"]=["space",y],l.ws=["xmlns",C],l["bs"]=["xlink",C],l),V=["change","input"],A=["change"],T=["change","input","blur","keyup","paste"],k=["scroll"],j=(function(t){return t.gs=1,t.style=1,t.ps=1,t.checked=1,t.value=1,t.ct=1,t["ns"]=1,t["rs"]=1,t["cs"]=1,t["os"]=1,t["ls"]=1,t["us"]=1,t["as"]=1,t["ds"]=1,t["fs"]=1,t.ws=1,t["bs"]=1,t})(Object.create(null));class TargetObserverLocator{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITargetObserverLocator,this).register(t)}ms(s,i,e,h,n){switch(n){case"checked":return new t.CheckedObserver(s,i,h,new EventSubscriber(this.dom,V),e);case"value":return"SELECT"===h.tagName?new t.SelectValueObserver(s,i,h,new EventSubscriber(this.dom,A),e,this.dom):new t.ValueAttributeObserver(i,h,n,new EventSubscriber(this.dom,V));case"files":return new t.ValueAttributeObserver(i,h,n,new EventSubscriber(this.dom,V));case"textContent":case"innerHTML":return new t.ValueAttributeObserver(i,h,n,new EventSubscriber(this.dom,T));case"scrollTop":case"scrollLeft":return new t.ValueAttributeObserver(i,h,n,new EventSubscriber(this.dom,k));case"class":return new t.ClassAttributeAccessor(i,h);case"style":case"css":return new t.StyleAttributeAccessor(i,h);case"model":return new runtime.SetterObserver(s,h,n);case"role":return new t.DataAttributeAccessor(i,h,n);default:if(void 0!==E[n]){const s=E[n];return new t.AttributeNSAccessor(i,h,n,s[0],s[1])}const r=n.slice(0,5);if("aria-"===r||"data-"===r)return new t.DataAttributeAccessor(i,h,n)}return null}vs(t,s,i){return 1==j[i]}ys(t,s){return this.dom.m(s)}}TargetObserverLocator.inject=[runtime.IDOM];class TargetAccessorLocator{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITargetAccessorLocator,this).register(t)}Cs(s,i,e,h){switch(h){case"textContent":return new t.ElementPropertyAccessor(i,e,h);case"class":return new t.ClassAttributeAccessor(i,e);case"style":case"css":return new t.StyleAttributeAccessor(i,e);case"src":case"href":case"role":return new t.DataAttributeAccessor(i,e,h);default:if(void 0!==E[h]){const s=E[h];return new t.AttributeNSAccessor(i,e,h,s[0],s[1])}const s=h.slice(0,5);return"aria-"===s||"data-"===s?new t.DataAttributeAccessor(i,e,h):new t.ElementPropertyAccessor(i,e,h)}}ys(t,s){return this.dom.m(s)}}TargetAccessorLocator.inject=[runtime.IDOM];const ISVGAnalyzer=kernel.DI.St("ISVGAnalyzer").Mt(t=>t.singleton(class{Es(t,s){return 0}}));class AttrBindingBehavior{bind(s,i,e){e.targetObserver=new t.DataAttributeAccessor(e.T.get(runtime.ILifecycle),e.target,e.Vs)}F(t,s,i){}}runtime.BindingBehaviorResource.As("attr",AttrBindingBehavior);class SelfBindingBehavior{bind(t,s,i){if(!i.L||!i.j)throw kernel.Reporter.error(8);i.g=i.L,i.L=c}F(t,s,i){i.L=i.g,i.g=null}}runtime.BindingBehaviorResource.As("self",SelfBindingBehavior);class UpdateTriggerBindingBehavior{constructor(t){this.ht=t}bind(t,s,i,...e){if(0===e.length)throw kernel.Reporter.error(9);if(i.mode!==runtime.BindingMode.Ts&&i.mode!==runtime.BindingMode.ks)throw kernel.Reporter.error(10);this.it=t&runtime.LifecycleFlags.et;const targetObserver=this.ht.ms(this.it|t,i.target,i.Vs);if(!targetObserver.B)throw kernel.Reporter.error(10);i.targetObserver=targetObserver,targetObserver.js=i.targetObserver.B,targetObserver.B=new EventSubscriber(i.T.get(runtime.IDOM),e)}F(t,s,i){i.targetObserver.B.P(),i.targetObserver.B=i.targetObserver.js,i.targetObserver.js=null}}UpdateTriggerBindingBehavior.inject=[runtime.IObserverLocator],runtime.BindingBehaviorResource.As("updateTrigger",UpdateTriggerBindingBehavior),(HTMLTargetedInstructionType=t.HTMLTargetedInstructionType||(t.HTMLTargetedInstructionType={})).xs="ha",HTMLTargetedInstructionType.Os="hb",HTMLTargetedInstructionType.Ls="hc",HTMLTargetedInstructionType.setAttribute="hd";class SetAttributeInstruction{constructor(value,to){this.type="hd",this.to=to,this.value=value}}class RenderPlan{constructor(dom,t,instructions,dependencies){this.dom=dom,this.dependencies=dependencies,this.instructions=instructions,this.Ms=t}get Ss(){return this.Rs||(this.Rs=runtime.buildTemplateDefinition(null,null,this.Ms,null,"string"==typeof this.Ms,null,this.instructions,this.dependencies))}Ns(t,s){return t.Ns(this.dom,this.Ss,null,s)}Ds(t,s,i){return this.Is(s,i).create()}Is(t,s){return t.Is(this.dom,this.Ss,s)}v(t,instructions,dependencies){this.dom.appendChild(t,this.Ms),instructions.push(...this.instructions),dependencies.push(...this.dependencies)}}const x=["subject","composing"];class Compose{constructor(dom,t,s,i,e){this.dom=dom,this.subject=null,this.Bs=0,this.Fs=e,this.Ps=null,this.zs=t,this.Us=i,this.Fs.$s=(()=>{this.Bs=0}),this.properties=s.instructions.filter(t=>!x.includes(t.to)).reduce((t,s)=>(s.to&&(t[s.to]=s),t),{})}Hs(t){this.qs(this.subject,null,t),this.Fs.Hs(t,this.$scope)}Gs(t){this.Fs.Gs(t)}Xs(t){this.Fs.Xs(t)}Zs(t){this.Ps=null,this.Fs.Zs(t)}_s(t){this.Fs._s(t)}Js(t,s,i){this.qs(t,s,i)}qs(t,s,i){this.Ps!==t&&(this.Ps=t,t=t instanceof Promise?t.then(t=>this.Ks(t,i)):this.Ks(t,i),this.Bs=1,this.Fs.Qs(t,i))}Ks(t,s){const i=this.Ws(t,s);return i?(i.Ys(this.ti.host),i.si(this.zs.$scope),i):null}Ws(t,s){return t?"lockScope"in t?t:"createView"in t?t.Ds(s,this.Us,this.zs.$context):"create"in t?t.create():"template"in t?this.Us.Is(this.dom,t,this.zs.$context).create():createElement(this.dom,t,this.properties,this.ti.children).Ds(s,this.Us,this.zs.$context):null}}Compose.inject=[runtime.IDOM,runtime.IRenderable,runtime.ITargetedInstruction,runtime.IRenderingEngine,runtime.CompositionCoordinator],s([runtime.bindable],Compose.prototype,"subject",void 0),s([runtime.bindable],Compose.prototype,"composing",void 0),runtime.CustomElementResource.As({name:"au-compose",containerless:1},Compose),(NodeType=t.NodeType||(t.NodeType={}))[NodeType.Element=1]="Element",NodeType[NodeType.Attr=2]="Attr",NodeType[NodeType.Text=3]="Text",NodeType[NodeType.CDATASection=4]="CDATASection",NodeType[NodeType.EntityReference=5]="EntityReference",NodeType[NodeType.Entity=6]="Entity",NodeType[NodeType.ProcessingInstruction=7]="ProcessingInstruction",NodeType[NodeType.Comment=8]="Comment",NodeType[NodeType.Document=9]="Document",NodeType[NodeType.DocumentType=10]="DocumentType",NodeType[NodeType.DocumentFragment=11]="DocumentFragment",NodeType[NodeType.Notation=12]="Notation";const O=runtime.DOM;class L{constructor(dom,t){this.dom=dom,this.firstChild=t,this.lastChild=t,this.childNodes=[t],this.targets=[new R(t)]}ii(){return this.targets}insertBefore(t){t.parentNode.insertBefore(this.firstChild,t)}ei(t){t.appendChild(this.firstChild)}remove(){this.firstChild.remove()}}class M{constructor(dom,t){this.dom=dom,this.hi=t;const s=t.querySelectorAll(".au");let i=0,e=s.length;const targets=this.targets=Array(e);for(;e>i;){const t=s[i];targets[i]="AU-M"===t.nodeName?this.dom.ni(t):t,++i}const h=t.childNodes;i=0;const childNodes=this.childNodes=Array(e=h.length);for(;e>i;)childNodes[i]=h[i],++i;this.firstChild=t.firstChild,this.lastChild=t.lastChild,this.start=this.end=null}ii(){return this.targets}insertBefore(t){if(t.parentNode.insertBefore(this.hi,t),"au-end"===t.textContent){this.end=t;const s=this.start=t.ri;s.$nodes=null===s.$nodes?this:kernel.PLATFORM.ci}}ei(t){t.appendChild(this.hi),this.start=this.end=null}remove(){const t=this.hi;if(null!==this.start&&this.start.$nodes===this){const s=this.end;let i,e=this.start.nextSibling;for(;e!==s;)i=e.nextSibling,t.appendChild(e),e=i;this.start.$nodes=null,this.start=this.end=null}else{let s=this.firstChild;if(s.parentNode!==t){const i=this.lastChild;let e;for(;null!==s&&(e=s.nextSibling,t.appendChild(s),s!==i);)s=e}}}}class S{constructor(dom,t){this.dom=dom;const s=dom.createDocumentFragment(t),childNodes=s.childNodes;switch(childNodes.length){case 0:return void(this.oi=(()=>runtime.NodeSequence.empty));case 2:const t=childNodes[0];if("AU-M"===t.nodeName||"#comment"===t.nodeName){const t=childNodes[1];if(3===t.nodeType&&0===t.textContent.length)return this.li=0,this.Ms=t,void(this.ui=L)}default:this.li=1,this.Ms=s,this.ui=M}}oi(){return new this.ui(this.dom,this.Ms.cloneNode(this.li))}}class R{get parentNode(){return this.nextSibling.parentNode}constructor(t){this.nextSibling=t,this.textContent=""}remove(){}}(u=R.prototype).previousSibling=null,u.childNodes=kernel.PLATFORM.ai,u.nodeName="AU-M",u.nodeType=1;class N{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITemplateFactory,this).register(t)}create(t,s){return new runtime.CompiledTemplate(this.dom,s,new S(this.dom,s.template),t)}}N.inject=[runtime.IDOM];let D=class{constructor(t,s){this.di=t,this.ht=s}fi(t,dom,s,i,e,h){const n=e.nextSibling;let r;dom.wi(e)&&dom.remove(e);const c=runtime.ensureExpression(this.di,h.from,2048);r=c.bi?new runtime.MultiInterpolationBinding(this.ht,c,n,"textContent",runtime.BindingMode.gi,s):new runtime.InterpolationBinding(c.pi,c,n,"textContent",runtime.BindingMode.gi,this.ht,s,1),runtime.addBinding(i,r)}};D.inject=[runtime.IExpressionParser,runtime.IObserverLocator],D=s([runtime.instructionRenderer("ha")],D);let I=class{constructor(t,s){this.di=t,this.O=s}fi(t,dom,s,i,e,h){const n=runtime.ensureExpression(this.di,h.from,80|h.strategy+6),r=new Listener(dom,h.to,h.strategy,n,e,h.preventDefault,this.O,s);runtime.addBinding(i,r)}};I.inject=[runtime.IExpressionParser,IEventManager],I=s([runtime.instructionRenderer("hb")],I);let B=class{fi(t,dom,s,i,e,h){e.setAttribute(h.to,h.value)}};B=s([runtime.instructionRenderer("hd")],B);let F=class{constructor(t,s){this.di=t,this.ht=s}fi(t,dom,s,i,e,h){const n=runtime.ensureExpression(this.di,h.from,48|runtime.BindingMode.gi),r=new runtime.Binding(n,e.style,h.to,runtime.BindingMode.gi,this.ht,s);runtime.addBinding(i,r)}};F.inject=[runtime.IExpressionParser,runtime.IObserverLocator],F=s([runtime.instructionRenderer("hc")],F);const P={mode:"open"},z={Bt:1};class U{constructor(dom,$customElement,host,t){let shadowOptions;this.dom=dom,this.host=host,this.shadowRoot=host.mi(shadowOptions=null!=t.shadowOptions&&"object"==typeof t.shadowOptions&&"mode"in t.shadowOptions?t.shadowOptions:P),this.host.$customElement=$customElement,this.shadowRoot.$customElement=$customElement}get children(){return this.shadowRoot.childNodes}vi(t){this.dom.qt(this.shadowRoot,t,z)}yi(){return this.shadowRoot}Ci(t){t.ei(this.shadowRoot)}Ei(t){t.remove()}}class ${constructor(dom,$customElement,host){this.childNodes=host.childNodes.length?kernel.PLATFORM.toArray(host.childNodes):kernel.PLATFORM.ai,this.host=dom.ni(host),this.host.$customElement=$customElement}get children(){return this.childNodes}vi(t){new MutationObserver(t).observe(this.host,z)}yi(){return this.host.Vi()}Ci(t){t.insertBefore(this.host)}Ei(t){t.remove()}}class H{constructor($customElement,host){this.host=host,this.host.$customElement=$customElement}get children(){return this.host.childNodes}vi(t){}yi(){return this.host.Vi()}Ci(t){t.ei(this.host)}Ei(t){t.remove()}}const IProjectorLocatorRegistration=class{static register(t){return kernel.Registration.singleton(runtime.IProjectorLocator,this).register(t)}Ai(dom,t,host,def){if(def.shadowOptions||def.hasSlots){if(def.containerless)throw kernel.Reporter.error(21);return new U(dom,t,host,def)}return def.containerless?new $(dom,t,host):new H(t,host)}},ITargetAccessorLocatorRegistration=TargetAccessorLocator,ITargetObserverLocatorRegistration=TargetObserverLocator,ITemplateFactoryRegistration=N,DefaultComponents=[IProjectorLocatorRegistration,ITargetAccessorLocatorRegistration,ITargetObserverLocatorRegistration,ITemplateFactoryRegistration],AttrBindingBehaviorRegistration=AttrBindingBehavior,SelfBindingBehaviorRegistration=SelfBindingBehavior,UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehavior,ComposeRegistration=Compose,DefaultResources=[AttrBindingBehaviorRegistration,SelfBindingBehaviorRegistration,UpdateTriggerBindingBehaviorRegistration,ComposeRegistration],ListenerBindingRendererRegistration=I,SetAttributeRendererRegistration=B,StylePropertyBindingRendererRegistration=F,TextBindingRendererRegistration=D,DefaultRenderers=[ListenerBindingRendererRegistration,SetAttributeRendererRegistration,StylePropertyBindingRendererRegistration,TextBindingRendererRegistration],BasicConfiguration={register:t=>runtime.BasicConfiguration.register(t).register(...DefaultComponents,...DefaultResources,...DefaultRenderers),Ti(){return this.register(kernel.DI.Ti())}};return t.Listener=Listener,t.ListenerTracker=ListenerTracker,t.DelegateOrCaptureSubscription=DelegateOrCaptureSubscription,t.TriggerSubscription=TriggerSubscription,t.IEventManager=IEventManager,t.EventSubscriber=EventSubscriber,t.TargetAccessorLocator=TargetAccessorLocator,t.TargetObserverLocator=TargetObserverLocator,t.ISVGAnalyzer=ISVGAnalyzer,t.AttrBindingBehavior=AttrBindingBehavior,t.SelfBindingBehavior=SelfBindingBehavior,t.UpdateTriggerBindingBehavior=UpdateTriggerBindingBehavior,t.Compose=Compose,t.IProjectorLocatorRegistration=IProjectorLocatorRegistration,t.ITargetAccessorLocatorRegistration=ITargetAccessorLocatorRegistration,t.ITargetObserverLocatorRegistration=ITargetObserverLocatorRegistration,t.ITemplateFactoryRegistration=ITemplateFactoryRegistration,t.DefaultComponents=DefaultComponents,t.AttrBindingBehaviorRegistration=AttrBindingBehaviorRegistration,t.SelfBindingBehaviorRegistration=SelfBindingBehaviorRegistration,t.UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehaviorRegistration,t.ComposeRegistration=ComposeRegistration,t.DefaultResources=DefaultResources,t.ListenerBindingRendererRegistration=ListenerBindingRendererRegistration,t.SetAttributeRendererRegistration=SetAttributeRendererRegistration,t.StylePropertyBindingRendererRegistration=StylePropertyBindingRendererRegistration,t.TextBindingRendererRegistration=TextBindingRendererRegistration,t.DefaultRenderers=DefaultRenderers,t.BasicConfiguration=BasicConfiguration,t.createElement=createElement,t.RenderPlan=RenderPlan,t.isHTMLTargetedInstruction=isHTMLTargetedInstruction,t.HTMLDOM=class{constructor(t,s,i,e,h,n){this.window=t,this.document=s,this.Node=i,this.Element=e,this.HTMLElement=h,this.CustomEvent=n,runtime.DOM.ki&&(kernel.Reporter.write(1001),runtime.DOM.ji()),runtime.DOM.initialize(this)}static register(t){return kernel.Registration.xi(runtime.IDOM,this).register(t)}addEventListener(t,s,i,e){(i||this.document).addEventListener(t,s,e)}appendChild(t,s){t.appendChild(s)}cloneNode(t,s){return t.cloneNode(0!=s)}ni(t){if(this.Oi(t))return t;if(null===t.parentNode)throw kernel.Reporter.error(52);const s=this.document.createComment("au-end"),i=this.document.createComment("au-start");return t.parentNode.replaceChild(s,t),s.parentNode.insertBefore(i,s),s.ri=i,i.$nodes=null,s}createDocumentFragment(t){if(null==t)return this.document.createDocumentFragment();if(this.m(t)){if(void 0!==t.content)return t.content;const s=this.document.createDocumentFragment();return s.appendChild(t),s}return this.Li(t).content}createElement(name){return this.document.createElement(name)}fetch(t,s){return this.window.fetch(t,s)}Mi(t,s){return new this.CustomEvent(t,s)}dispatchEvent(t){this.document.dispatchEvent(t)}qt(t,s,i){if("undefined"==typeof MutationObserver)return{disconnect(){},observe(){},takeRecords:()=>kernel.PLATFORM.ai};const e=new MutationObserver(s);return e.observe(t,i),e}Li(t){if(null==t)return this.document.createElement("template");const template=this.document.createElement("template");return template.innerHTML=""+t,template}createTextNode(t){return this.document.createTextNode(t)}insertBefore(t,s){s.parentNode.insertBefore(t,s)}wi(t){return"AU-M"===t.nodeName}m(t){return null!=t&&t.nodeType>0}Oi(t){return"au-end"===t.textContent}p(t){t.className="au"}Si(t,s){t.Ri(runtime.INode,s),t.Ri(this.Node,s),t.Ri(this.Element,s),t.Ri(this.HTMLElement,s)}remove(t){t.remove?t.remove():t.parentNode.removeChild(t)}removeEventListener(t,s,i,e){(i||this.document).removeEventListener(t,s,e)}setAttribute(t,name,value){t.setAttribute(name,value)}},t.DOM=O,t.CaptureBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=runtime.DelegationStrategy.It,this.to=to}},t.DelegateBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=runtime.DelegationStrategy.Dt,this.to=to}},t.SetAttributeInstruction=SetAttributeInstruction,t.StylePropertyBindingInstruction=class{constructor(from,to){this.type="hc",this.from=from,this.to=to}},t.TextBindingInstruction=class{constructor(from){this.type="ha",this.from=from}},t.TriggerBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=1,this.strategy=runtime.DelegationStrategy.Ni,this.to=to}},t})({},kernel,runtime); |
@@ -1,1 +0,1 @@ | ||
System.register("runtimeHtml",["@aurelia/kernel","@aurelia/runtime"],function(t){"use strict";var DI,Registration,Reporter,PLATFORM,LifecycleFlags,hasBind,hasUnbind,targetObserver,DelegationStrategy,ITargetObserverLocator,SetterObserver,IDOM,ITargetAccessorLocator,ILifecycle,BindingBehaviorResource,BindingMode,IObserverLocator,buildTemplateDefinition,HydrateElementInstruction,IRenderable,ITargetedInstruction,IRenderingEngine,CompositionCoordinator,bindable,CustomElementResource,INode,ITemplateFactory,CompiledTemplate,NodeSequence,IExpressionParser,instructionRenderer,ensureExpression,MultiInterpolationBinding,InterpolationBinding,addBindable,Binding,IProjectorLocator,BasicConfiguration;return{t:[function(t){DI=t.DI,Registration=t.Registration,Reporter=t.Reporter,PLATFORM=t.PLATFORM},function(t){LifecycleFlags=t.LifecycleFlags,hasBind=t.hasBind,hasUnbind=t.hasUnbind,targetObserver=t.targetObserver,DelegationStrategy=t.DelegationStrategy,ITargetObserverLocator=t.ITargetObserverLocator,SetterObserver=t.SetterObserver,IDOM=t.IDOM,ITargetAccessorLocator=t.ITargetAccessorLocator,ILifecycle=t.ILifecycle,BindingBehaviorResource=t.BindingBehaviorResource,BindingMode=t.BindingMode,IObserverLocator=t.IObserverLocator,buildTemplateDefinition=t.buildTemplateDefinition,HydrateElementInstruction=t.HydrateElementInstruction,IRenderable=t.IRenderable,ITargetedInstruction=t.ITargetedInstruction,IRenderingEngine=t.IRenderingEngine,CompositionCoordinator=t.CompositionCoordinator,bindable=t.bindable,CustomElementResource=t.CustomElementResource,INode=t.INode,ITemplateFactory=t.ITemplateFactory,CompiledTemplate=t.CompiledTemplate,NodeSequence=t.NodeSequence,IExpressionParser=t.IExpressionParser,instructionRenderer=t.instructionRenderer,ensureExpression=t.ensureExpression,MultiInterpolationBinding=t.MultiInterpolationBinding,InterpolationBinding=t.InterpolationBinding,addBindable=t.addBindable,Binding=t.Binding,IProjectorLocator=t.IProjectorLocator,BasicConfiguration=t.BasicConfiguration}],s(){function s(t,s,i,e){var h,r,n=arguments.length,o=3>n?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.i)o=Reflect.i(t,s,i,e);else for(r=t.length-1;r>=0;r--)(h=t[r])&&(o=(3>n?h(o):n>3?h(s,i,o):h(s,i))||o);return n>3&&o&&Object.defineProperty(s,i,o),o}function i(t){return t.h&&t.h()[0]||t.o&&t.o()[0]||t.path&&t.path[0]||t.target}function e(){this.u(),this.l=1}function h(t){t.l=0;let s=i(t);const h=[];for(;s;){if(s.g){const i=s.g[t.type];i&&(t.stopPropagation!==e&&(t.u=t.stopPropagation,t.stopPropagation=e),h.push(i))}s=s.parentNode}for(let s=h.length-1;s>=0&&!t.l;s--){const i=h[s];"handleEvent"in i?i.p(t):i(t)}}function r(t){t.l=0;let s=i(t);for(;s&&!t.l;){if(s.m){const i=s.m[t.type];i&&(t.stopPropagation!==e&&(t.u=t.stopPropagation,t.stopPropagation=e),"handleEvent"in i?i.p(t):i(t))}s=s.parentNode}}function n(t,s){return t===s}function o(t){const s=i(t);if(this.target===s)return this.A(t)}function isHTMLTargetedInstruction(value){const type=value.type;return"string"==typeof type&&2===type.length}function createElement(dom,t,s,i){return"string"==typeof t?(function(dom,s,i,e){const instructions=[],h=[],dependencies=[],r=dom.createElement(t);let n=0;return i&&Object.keys(i).forEach(to=>{const value=i[to];isHTMLTargetedInstruction(value)?(n=1,instructions.push(value)):dom.setAttribute(r,to,value)}),n&&(dom.v(r),h.push(instructions)),e&&c(dom,r,e,h,dependencies),new RenderPlan(dom,r,h,dependencies)})(dom,0,s,i):(function(dom,t,s,i){const e=t.description.name,instructions=[],h=[instructions],dependencies=[],r=[],bindables=t.description.bindables,n=dom.createElement(e);return dom.v(n),dependencies.includes(t)||dependencies.push(t),instructions.push(new HydrateElementInstruction(e,r)),s&&Object.keys(s).forEach(to=>{const value=s[to];if(isHTMLTargetedInstruction(value))r.push(value);else{r.push(bindables[to]?{type:"re",to,value}:new SetAttributeInstruction(value,to))}}),i&&c(dom,n,i,h,dependencies),new RenderPlan(dom,n,h,dependencies)})(dom,t,s,i)}function c(dom,t,s,i,dependencies){for(let e=0,h=s.length;h>e;++e){const h=s[e];switch(typeof h){case"string":dom.appendChild(t,dom.createTextNode(h));break;case"object":dom.C(h)?dom.appendChild(t,h):"mergeInto"in h&&h.T(t,i,dependencies)}}}var HTMLTargetedInstructionType,NodeType,u,l;t({createElement,HTMLTargetedInstructionType:void 0,isHTMLTargetedInstruction,NodeType:void 0});class Listener{constructor(dom,t,s,i,e,preventDefault,h,r){this.dom=dom,this.R=null,this.B=null,this.$state=0,this.S=s,this.O=r,this.preventDefault=preventDefault,this.L=i,this.target=e,this.I=t,this.M=h}j(t){const s=this.$scope.V;s.k=t;const i=this.L.evaluate(LifecycleFlags.D,this.$scope,this.O);return delete s.k,1!=i&&this.preventDefault&&t.preventDefault(),i}p(t){this.j(t)}N(t,s){if(2&this.$state){if(this.$scope===s)return;this.H(t|LifecycleFlags.P)}this.$state|=1,this.$scope=s;const i=this.L;hasBind(i)&&i.bind(t,s,this),this.U=this.M.addEventListener(this.dom,this.target,this.I,this,this.S),this.$state|=2,this.$state&=-2}H(t){if(!(2&this.$state))return;this.$state|=64;const s=this.L;hasUnbind(s)&&s.F(t,this.$scope,this),this.$scope=null,this.U.G(),this.U=null,this.$state&=-67}q(t,s){}X(t,s,i){}}t("Listener",Listener);let AttributeNSAccessor=t("AttributeNSAccessor",class{constructor(t,s,i,e,h){this.Z=1,this.attributeName=e,this.$=t,this.J=s,this.oldValue=this.K=this.W(),this.Y=i,this._=h}W(){return this.J.getAttributeNS(this._,this.attributeName)}tt(t){this.J.setAttributeNS(this._,this.attributeName,t)}});AttributeNSAccessor=t("AttributeNSAccessor",s([targetObserver("")],AttributeNSAccessor));const a=LifecycleFlags.st|LifecycleFlags.it,f=LifecycleFlags.et|LifecycleFlags.ht,d=(t,s)=>t===s;let CheckedObserver=t("CheckedObserver",class{constructor(t,s,i,e){this.Z=1,this.U=i,this.$=t,this.J=s,this.rt=e}W(){return this.K}tt(t,s){this.nt||(this.nt=this.J.ot&&(this.J.ot.ct||this.J.ot.value),this.nt&&this.nt.subscribe(this)),this.ut&&(this.ut.lt(this),this.ut=null),"checkbox"===this.J.type&&Array.isArray(t)&&(this.ut=this.rt.at(t),this.ut.ft(this)),this.dt()}gt(){this.dt(),this.bt(f)}X(t,s,i){this.dt(),this.bt(i)}dt(){const value=this.K,t=this.J,s=t.hasOwnProperty("model")?t.ct:t.value,i=t.wt||d;t.checked="radio"===t.type?!!i(value,s):1==value?1:Array.isArray(value)?-1!==value.findIndex(t=>!!i(t,s)):0}bt(t){t&LifecycleFlags.P||this.K!==this.oldValue&&this.pt(this.K,this.oldValue,t)}p(){let value=this.K;const t=this.J,s=t.hasOwnProperty("model")?t.ct:t.value;let i;const e=t.wt||d;if("checkbox"===t.type){if(Array.isArray(value))return i=value.findIndex(t=>!!e(t,s)),void(t.checked&&-1===i?value.push(s):t.checked||-1===i||value.splice(i,1));value=t.checked}else{if(!t.checked)return;value=s}this.oldValue=this.K,this.K=value,this.bt(a)}subscribe(t){this.At()||this.U.subscribe(this.J,this),this.vt(t)}unsubscribe(t){this.Ct(t)&&!this.At()&&this.U.G()}F(){this.ut&&(this.ut.lt(this),this.ut=null),this.nt&&this.nt.unsubscribe(this)}});CheckedObserver=t("CheckedObserver",s([targetObserver()],CheckedObserver));let ClassAttributeAccessor=t("ClassAttributeAccessor",class{constructor(t,s){this.Z=1,this.Tt=1,this.$=t,this.Et=null,this.J=s,this.version=0}W(){return this.K}tt(t){const s=this.Et||{};let i,name,e=this.version;if(t.length){const h=this.J;for(let r=0,n=(i=t.split(/\s+/)).length;n>r;r++)(name=i[r]).length&&(s[name]=e,h.classList.add(name))}if(this.Et=s,this.version+=1,0!==e)for(name in e-=1,s)s.hasOwnProperty(name)&&s[name]===e&&this.J.classList.remove(name)}});ClassAttributeAccessor=t("ClassAttributeAccessor",s([targetObserver("")],ClassAttributeAccessor));let DataAttributeAccessor=t("DataAttributeAccessor",class{constructor(t,s,i){this.Z=1,this.$=t,this.J=s,this.oldValue=this.K=this.W(),this.Y=i}W(){return this.J.getAttribute(this.Y)}tt(t){null===t?this.J.removeAttribute(this.Y):this.J.setAttribute(this.Y,t)}});DataAttributeAccessor=t("DataAttributeAccessor",s([targetObserver()],DataAttributeAccessor));let ElementPropertyAccessor=t("ElementPropertyAccessor",class{constructor(t,s,i){this.Z=1,this.$=t,this.J=s,this.Y=i}W(){return this.J[this.Y]}tt(value){this.J[this.Y]=value}});ElementPropertyAccessor=t("ElementPropertyAccessor",s([targetObserver("")],ElementPropertyAccessor));class ListenerTracker{constructor(dom,t,s,i){this.dom=dom,this.Rt=i,this.count=0,this.Bt=t,this.listener=s}St(){this.count++,1===this.count&&this.dom.addEventListener(this.Bt,this.listener,null,this.Rt)}Ot(){this.count--,0===this.count&&this.dom.removeEventListener(this.Bt,this.listener,null,this.Rt)}G(){this.count>0&&(this.count=0,this.dom.removeEventListener(this.Bt,this.listener,null,this.Rt))}}t("ListenerTracker",ListenerTracker);class DelegateOrCaptureSubscription{constructor(t,s,i,e){this.yt=t,this.Lt=s,this.I=i,s[i]=e}G(){this.yt.Ot(),this.Lt[this.I]=null}}t("DelegateOrCaptureSubscription",DelegateOrCaptureSubscription);class TriggerSubscription{constructor(dom,t,s,i){this.dom=dom,this.target=t,this.I=s,this.It=i,dom.addEventListener(s,i,t)}G(){this.dom.removeEventListener(this.I,this.It,this.target)}}t("TriggerSubscription",TriggerSubscription);class EventSubscriber{constructor(dom,t){this.dom=dom,this.Mt=t,this.target=null,this.U=null}subscribe(t,s){this.target=t,this.U=s;const i=this.dom.addEventListener,e=this.Mt;for(let h=0,r=e.length;r>h;++h)i(e[h],s,t)}G(){const t=this.target,s=this.U,i=this.Mt,e=this.dom.removeEventListener;for(let h=0,r=i.length;r>h;++h)e(i[h],s,t);this.target=this.U=null}}t("EventSubscriber",EventSubscriber);const IEventManager=t("IEventManager",DI.Vt("IEventManager").jt(t=>t.singleton(g)));class g{constructor(){this.kt={},this.Dt={},this.kt={},this.Dt={}}addEventListener(dom,t,s,i,strategy){let e,n,o;if(strategy===DelegationStrategy.Nt){(o=(e=this.kt)[s]||(e[s]=new ListenerTracker(dom,s,r,0))).St();const h=t.m||(t.m={});return new DelegateOrCaptureSubscription(o,h,s,i)}if(strategy===DelegationStrategy.Ht){(o=(n=this.Dt)[s]||(n[s]=new ListenerTracker(dom,s,h,1))).St();const e=t.g||(t.g={});return new DelegateOrCaptureSubscription(o,e,s,i)}return new TriggerSubscription(dom,t,s,i)}G(){let t;const{kt:s,Dt:i}=this;for(t in s)s[t].G();for(t in i)i[t].G()}}const b=LifecycleFlags.st|LifecycleFlags.it,w={Pt:1,Ut:1,zt:1};let SelectValueObserver=t("SelectValueObserver",class{constructor(t,s,i,e,dom){this.Z=1,this.$=t,this.J=s,this.U=i,this.rt=e,this.dom=dom}W(){return this.K}tt(t,s){const i=Array.isArray(t);if(!i&&null!=t&&this.J.multiple)throw Error("Only null or Array instances can be bound to a multi-select.");this.ut&&(this.ut.lt(this),this.ut=null),i&&(this.ut=this.rt.at(t),this.ut.ft(this)),this.Ft(),this.bt(s)}gt(t){this.Ft(t)}X(t,s,i){this.Gt(t,i)}bt(t){if(t&LifecycleFlags.P)return;const s=this.oldValue,i=this.K;i!==s&&this.pt(i,s,t)}p(){this.qt()&&this.bt(b)}Ft(t){const s=this.K,i=Array.isArray(s),e=this.J,h=e.wt||n,r=e.options;let o=r.length;for(;o--;){const t=r[o],e=t.hasOwnProperty("model")?t.ct:t.value;t.selected=i?-1!==s.findIndex(t=>!!h(e,t)):!!h(e,s)}}qt(){const t=this.J,s=t.options,i=s.length,e=this.K;let h=0;if(t.multiple){if(!Array.isArray(e))return 1;let r;const o=t.wt||n,c=[];for(;i>h;)(r=s[h]).selected&&c.push(r.hasOwnProperty("model")?r.ct:r.value),++h;for(h=0;e.length>h;){const t=e[h];-1===c.findIndex(s=>!!o(t,s))?e.splice(h,1):++h}for(h=0;c.length>h;){const t=c[h];-1===e.findIndex(s=>!!o(t,s))&&e.push(t),++h}return 0}let value=null;for(;i>h;){const t=s[h];if(t.selected){value=t.hasOwnProperty("model")?t.ct:t.value;break}++h}return this.oldValue=this.K,this.K=value,1}subscribe(t){this.At()||this.U.subscribe(this.J,this),this.vt(t)}unsubscribe(t){this.Ct(t)&&!this.At()&&this.U.G()}bind(){this.Xt=this.dom.Zt(this.J,this.$t.bind(this),w)}F(){this.Xt.disconnect(),this.Xt=null,this.ut&&(this.ut.lt(this),this.ut=null)}$t(){this.Ft(),this.qt()&&this.bt(b)}});SelectValueObserver=t("SelectValueObserver",s([targetObserver()],SelectValueObserver));let StyleAttributeAccessor=t("StyleAttributeAccessor",class{constructor(t,s){this.Z=1,this.oldValue=this.K=s.style.cssText,this.$=t,this.J=s,this.Jt=null,this.version=0}W(){return this.J.style.cssText}Kt(t,value){let s="";null!=value&&"function"==typeof value.indexOf&&-1!==value.indexOf("!important")&&(s="important",value=value.replace("!important","")),this.J.style.setProperty(t,value,s)}tt(t){const s=this.Jt||{};let i,e=this.version;if(null!==t)if(t instanceof Object){let value;for(i in t)t.hasOwnProperty(i)&&(value=t[i],s[i=i.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)]=e,this.Kt(i,value))}else if(t.length){const h=/\s*([\w\-]+)\s*:\s*((?:(?:[\w\-]+\(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[\w\-]+\(\s*(?:[^"](?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^\)]*)\),?|[^\)]*)\),?|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^;]*),?\s*)+);?/g;let r;for(;null!==(r=h.exec(t));)(i=r[1])&&(s[i]=e,this.Kt(i,r[2]))}if(this.Jt=s,this.version+=1,0!==e)for(i in e-=1,s)s.hasOwnProperty(i)&&s[i]===e&&this.J.style.removeProperty(i)}});StyleAttributeAccessor=t("StyleAttributeAccessor",s([targetObserver()],StyleAttributeAccessor));const p={button:"",Qt:"on",color:"#000000",Wt:"",Yt:"",email:"",_t:"",hidden:"",xt:"",ts:"",number:"",password:"",ss:"on",range:"50",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",es:""},m=LifecycleFlags.st|LifecycleFlags.it;let ValueAttributeObserver=t("ValueAttributeObserver",class{constructor(t,s,i,e){if(this.Z=1,this.U=e,this.$=t,this.J=s,this.Y=i,"value"===i){const t=s.type;this.defaultValue=p[t||"text"],"file"===t&&(this.flush=this.hs)}else this.defaultValue="";this.oldValue=this.K=s[i]}W(){return this.J[this.Y]}tt(t,s){this.J[this.Y]=t,s&LifecycleFlags.P||this.pt(this.K,this.oldValue,s)}p(){const t=this.oldValue=this.K,s=this.K=this.W();t!==s&&(this.pt(s,t,m),this.oldValue=s)}subscribe(t){this.At()||(this.oldValue=this.W(),this.U.subscribe(this.J,this)),this.vt(t)}unsubscribe(t){this.Ct(t)&&!this.At()&&this.U.G()}hs(){const t=this.K;this.oldValue!==t&&""===t&&(this.tt(t,this.rs),this.oldValue=this.K)}});ValueAttributeObserver=t("ValueAttributeObserver",s([targetObserver("")],ValueAttributeObserver));const A="http://www.w3.org/1999/xlink",v="http://www.w3.org/XML/1998/namespace",C="http://www.w3.org/2000/xmlns/",T=((u=Object.create(null))["ns"]=["actuate",A],u["os"]=["arcrole",A],u["cs"]=["href",A],u["us"]=["role",A],u["ls"]=["show",A],u["as"]=["title",A],u["fs"]=["type",A],u["ds"]=["lang",v],u["gs"]=["space",v],u.bs=["xmlns",C],u["ws"]=["xlink",C],u),E=["change","input"],R=["change"],B=["change","input","blur","keyup","paste"],S=["scroll"],O=(function(t){return t.ps=1,t.style=1,t.ms=1,t.checked=1,t.value=1,t.ct=1,t["ns"]=1,t["os"]=1,t["cs"]=1,t["us"]=1,t["ls"]=1,t["as"]=1,t["fs"]=1,t["ds"]=1,t["gs"]=1,t.bs=1,t["ws"]=1,t})(Object.create(null));class TargetObserverLocator{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITargetObserverLocator,this).register(t)}As(t,s,i,e){switch(e){case"checked":return new CheckedObserver(t,i,new EventSubscriber(this.dom,E),s);case"value":return"SELECT"===i.tagName?new SelectValueObserver(t,i,new EventSubscriber(this.dom,R),s,this.dom):new ValueAttributeObserver(t,i,e,new EventSubscriber(this.dom,E));case"files":return new ValueAttributeObserver(t,i,e,new EventSubscriber(this.dom,E));case"textContent":case"innerHTML":return new ValueAttributeObserver(t,i,e,new EventSubscriber(this.dom,B));case"scrollTop":case"scrollLeft":return new ValueAttributeObserver(t,i,e,new EventSubscriber(this.dom,S));case"class":return new ClassAttributeAccessor(t,i);case"style":case"css":return new StyleAttributeAccessor(t,i);case"model":return new SetterObserver(i,e);case"role":return new DataAttributeAccessor(t,i,e);default:if(void 0!==T[e]){const s=T[e];return new AttributeNSAccessor(t,i,e,s[0],s[1])}const h=e.slice(0,5);if("aria-"===h||"data-"===h)return new DataAttributeAccessor(t,i,e)}return null}vs(t,s){return 1==O[s]}Cs(t){return this.dom.C(t)}}t("TargetObserverLocator",TargetObserverLocator),TargetObserverLocator.inject=[IDOM];class TargetAccessorLocator{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITargetAccessorLocator,this).register(t)}Ts(t,s,i){switch(i){case"textContent":return new ElementPropertyAccessor(t,s,i);case"class":return new ClassAttributeAccessor(t,s);case"style":case"css":return new StyleAttributeAccessor(t,s);case"src":case"href":case"role":return new DataAttributeAccessor(t,s,i);default:if(void 0!==T[i]){const e=T[i];return new AttributeNSAccessor(t,s,i,e[0],e[1])}const e=i.slice(0,5);return"aria-"===e||"data-"===e?new DataAttributeAccessor(t,s,i):new ElementPropertyAccessor(t,s,i)}}Cs(t){return this.dom.C(t)}}t("TargetAccessorLocator",TargetAccessorLocator),TargetAccessorLocator.inject=[IDOM],t("ISVGAnalyzer",DI.Vt("ISVGAnalyzer").jt(t=>t.singleton(class{Es(t,s){return 0}})));class AttrBindingBehavior{bind(t,s,i){i.targetObserver=new DataAttributeAccessor(i.O.get(ILifecycle),i.target,i.Rs)}F(t,s,i){}}t("AttrBindingBehavior",AttrBindingBehavior),BindingBehaviorResource.Bs("attr",AttrBindingBehavior);class SelfBindingBehavior{bind(t,s,i){if(!i.j||!i.I)throw Reporter.error(8);i.A=i.j,i.j=o}F(t,s,i){i.j=i.A,i.A=null}}t("SelfBindingBehavior",SelfBindingBehavior),BindingBehaviorResource.Bs("self",SelfBindingBehavior);class UpdateTriggerBindingBehavior{constructor(t){this.rt=t}bind(t,s,i,...e){if(0===e.length)throw Reporter.error(9);if(i.mode!==BindingMode.Ss&&i.mode!==BindingMode.Os)throw Reporter.error(10);const h=this.rt.As(i.target,i.Rs);if(!h.U)throw Reporter.error(10);i.targetObserver=h,h.ys=i.targetObserver.U,h.U=new EventSubscriber(i.O.get(IDOM),e)}F(t,s,i){i.targetObserver.U.G(),i.targetObserver.U=i.targetObserver.ys,i.targetObserver.ys=null}}t("UpdateTriggerBindingBehavior",UpdateTriggerBindingBehavior),UpdateTriggerBindingBehavior.inject=[IObserverLocator],BindingBehaviorResource.Bs("updateTrigger",UpdateTriggerBindingBehavior),(function(HTMLTargetedInstructionType){HTMLTargetedInstructionType.Ls="ha",HTMLTargetedInstructionType.Is="hb",HTMLTargetedInstructionType.Ms="hc",HTMLTargetedInstructionType.setAttribute="hd"})(HTMLTargetedInstructionType||(HTMLTargetedInstructionType=t("HTMLTargetedInstructionType",{}))),t("TextBindingInstruction",class{constructor(from){this.type="ha",this.from=from}}),t("TriggerBindingInstruction",class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=1,this.strategy=DelegationStrategy.js,this.to=to}}),t("DelegateBindingInstruction",class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=DelegationStrategy.Nt,this.to=to}}),t("CaptureBindingInstruction",class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=DelegationStrategy.Ht,this.to=to}}),t("StylePropertyBindingInstruction",class{constructor(from,to){this.type="hc",this.from=from,this.to=to}});class SetAttributeInstruction{constructor(value,to){this.type="hd",this.to=to,this.value=value}}t("SetAttributeInstruction",SetAttributeInstruction);class RenderPlan{constructor(dom,t,instructions,dependencies){this.dom=dom,this.dependencies=dependencies,this.instructions=instructions,this.Vs=t}get ks(){return this.Ds||(this.Ds=buildTemplateDefinition(null,null,this.Vs,null,"string"==typeof this.Vs,null,this.instructions,this.dependencies))}Ns(t,s){return t.Ns(this.dom,this.ks,null,s)}Hs(t,s){return this.Ps(t,s).create()}Ps(t,s){return t.Ps(this.dom,this.ks,s)}T(t,instructions,dependencies){this.dom.appendChild(t,this.Vs),instructions.push(...this.instructions),dependencies.push(...this.dependencies)}}t("RenderPlan",RenderPlan);const y=["subject","composing"];class Compose{constructor(dom,t,s,i,e){this.dom=dom,this.subject=null,this.Us=0,this.zs=e,this.Fs=null,this.Gs=t,this.qs=i,this.zs.Xs=(()=>{this.Us=0}),this.properties=s.instructions.filter(t=>!y.includes(t.to)).reduce((t,s)=>(s.to&&(t[s.to]=s),t),{})}Zs(t){this.$s(this.subject,null,t),this.zs.Zs(t,this.$scope)}Js(t){this.zs.Js(t)}Ks(t){this.zs.Ks(t)}Qs(t){this.Fs=null,this.zs.Qs(t)}Ws(t){this.zs.Ws(t)}Ys(t,s,i){this.$s(t,s,i)}$s(t,s,i){this.Fs!==t&&(this.Fs=t,t=t instanceof Promise?t.then(t=>this._s(t,i)):this._s(t,i),this.Us=1,this.zs.xs(t,i))}_s(t,s){const i=this.ti(t);return i?(i.si(this.ii.host),i.ei(this.Gs.$scope),i):null}ti(t){return t?"lockScope"in t?t:"createView"in t?t.Hs(this.qs,this.Gs.$context):"create"in t?t.create():"template"in t?this.qs.Ps(this.dom,t,this.Gs.$context).create():createElement(this.dom,t,this.properties,this.ii.children).Hs(this.qs,this.Gs.$context):null}}t("Compose",Compose),Compose.inject=[IDOM,IRenderable,ITargetedInstruction,IRenderingEngine,CompositionCoordinator],s([bindable],Compose.prototype,"subject",void 0),s([bindable],Compose.prototype,"composing",void 0),CustomElementResource.Bs({name:"au-compose",containerless:1},Compose),(function(NodeType){NodeType[NodeType.Element=1]="Element",NodeType[NodeType.Attr=2]="Attr",NodeType[NodeType.Text=3]="Text",NodeType[NodeType.CDATASection=4]="CDATASection",NodeType[NodeType.EntityReference=5]="EntityReference",NodeType[NodeType.Entity=6]="Entity",NodeType[NodeType.ProcessingInstruction=7]="ProcessingInstruction",NodeType[NodeType.Comment=8]="Comment",NodeType[NodeType.Document=9]="Document",NodeType[NodeType.DocumentType=10]="DocumentType",NodeType[NodeType.DocumentFragment=11]="DocumentFragment",NodeType[NodeType.Notation=12]="Notation"})(NodeType||(NodeType=t("NodeType",{}))),t("HTMLDOM",class{constructor(t,s,i,e,h){this.hi=t,this.ri=s,this.Node=i,this.Element=e,this.HTMLElement=h}addEventListener(t,s,i,e){(i||this.ri).addEventListener(t,s,e)}appendChild(t,s){t.appendChild(s)}cloneNode(t,s){return t.cloneNode(0!=s)}ni(t){if(this.oi(t))return t;if(null===t.parentNode)throw Reporter.error(52);const s=this.ri.createComment("au-end"),i=this.ri.createComment("au-start");return t.parentNode.replaceChild(s,t),s.parentNode.insertBefore(i,s),s.ci=i,i.$nodes=null,s}createDocumentFragment(t){if(null==t)return this.ri.createDocumentFragment();if(this.C(t)){if(void 0!==t.content)return t.content;const s=this.ri.createDocumentFragment();return s.appendChild(t),s}return this.ui(t).content}createElement(name){return this.ri.createElement(name)}Zt(t,s,i){if("undefined"==typeof MutationObserver)return{disconnect(){},observe(){},takeRecords:()=>PLATFORM.li};const e=new MutationObserver(s);return e.observe(t,i),e}ui(t){if(null==t)return this.ri.createElement("template");const template=this.ri.createElement("template");return template.innerHTML=""+t,template}createTextNode(t){return this.ri.createTextNode(t)}insertBefore(t,s){s.parentNode.insertBefore(t,s)}ai(t){return"AU-M"===t.nodeName}C(t){return null!=t&&t.nodeType>0}oi(t){return"au-end"===t.textContent}v(t){t.className="au"}fi(t,s){t.di(INode,s),t.di(this.Node,s),t.di(this.Element,s),t.di(this.HTMLElement,s)}remove(t){t.remove?t.remove():t.parentNode.removeChild(t)}removeEventListener(t,s,i,e){(i||this.ri).removeEventListener(t,s,e)}setAttribute(t,name,value){t.setAttribute(name,value)}});class L{constructor(dom,t){this.dom=dom,this.firstChild=t,this.lastChild=t,this.childNodes=[t],this.targets=[new j(t)]}gi(){return this.targets}insertBefore(t){t.parentNode.insertBefore(this.firstChild,t)}bi(t){t.appendChild(this.firstChild)}remove(){this.firstChild.remove()}}class I{constructor(dom,t){this.dom=dom,this.wi=t;const s=t.querySelectorAll(".au");let i=0,e=s.length;const targets=this.targets=Array(e);for(;e>i;){const t=s[i];targets[i]="AU-M"===t.nodeName?this.dom.ni(t):t,++i}const h=t.childNodes;i=0;const childNodes=this.childNodes=Array(e=h.length);for(;e>i;)childNodes[i]=h[i],++i;this.firstChild=t.firstChild,this.lastChild=t.lastChild,this.start=this.end=null}gi(){return this.targets}insertBefore(t){if(t.parentNode.insertBefore(this.wi,t),"au-end"===t.textContent){this.end=t;const s=this.start=t.ci;s.$nodes=null===s.$nodes?this:PLATFORM.pi}}bi(t){t.appendChild(this.wi),this.start=this.end=null}remove(){const t=this.wi;if(null!==this.start&&this.start.$nodes===this){const s=this.end;let i,e=this.start.nextSibling;for(;e!==s;)i=e.nextSibling,t.appendChild(e),e=i;this.start.$nodes=null,this.start=this.end=null}else{let s=this.firstChild;if(s.parentNode!==t){const i=this.lastChild;let e;for(;null!==s&&(e=s.nextSibling,t.appendChild(s),s!==i);)s=e}}}}class M{constructor(dom,t){this.dom=dom;const s=dom.createDocumentFragment(t),childNodes=s.childNodes;switch(childNodes.length){case 0:return void(this.mi=(()=>NodeSequence.empty));case 2:const t=childNodes[0];if("AU-M"===t.nodeName||"#comment"===t.nodeName){const t=childNodes[1];if(3===t.nodeType&&0===t.textContent.length)return this.Ai=0,this.Vs=t,void(this.vi=L)}default:this.Ai=1,this.Vs=s,this.vi=I}}mi(){return new this.vi(this.dom,this.Vs.cloneNode(this.Ai))}}class j{get parentNode(){return this.nextSibling.parentNode}constructor(t){this.nextSibling=t,this.textContent=""}remove(){}}(l=j.prototype).previousSibling=null,l.childNodes=PLATFORM.li,l.nodeName="AU-M",l.nodeType=1;class V{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITemplateFactory,this).register(t)}create(t,s){return new CompiledTemplate(this.dom,s,new M(this.dom,s.template),t)}}V.inject=[IDOM];let k=class{constructor(t,s){this.Ci=t,this.rt=s}Ti(dom,t,s,i,e){const h=i.nextSibling;let r;dom.ai(i)&&dom.remove(i);const n=ensureExpression(this.Ci,e.from,2048);r=n.Ei?new MultiInterpolationBinding(this.rt,n,h,"textContent",BindingMode.Ri,t):new InterpolationBinding(n.Bi,n,h,"textContent",BindingMode.Ri,this.rt,t,1),addBindable(s,r)}};k.inject=[IExpressionParser,IObserverLocator],k=s([instructionRenderer("ha")],k);let D=class{constructor(t,s){this.Ci=t,this.M=s}Ti(dom,t,s,i,e){const h=ensureExpression(this.Ci,e.from,80|e.strategy+6),r=new Listener(dom,e.to,e.strategy,h,i,e.preventDefault,this.M,t);addBindable(s,r)}};D.inject=[IExpressionParser,IEventManager],D=s([instructionRenderer("hb")],D);let N=class{Ti(dom,t,s,i,e){i.setAttribute(e.to,e.value)}};N=s([instructionRenderer("hd")],N);let H=class{constructor(t,s){this.Ci=t,this.rt=s}Ti(dom,t,s,i,e){const h=ensureExpression(this.Ci,e.from,48|BindingMode.Ri),r=new Binding(h,i.style,e.to,BindingMode.Ri,this.rt,t);addBindable(s,r)}};H.inject=[IExpressionParser,IObserverLocator],H=s([instructionRenderer("hc")],H);const P={mode:"open"},U={Pt:1};class z{constructor(dom,$customElement,host,t){let shadowOptions;this.dom=dom,this.host=host,this.shadowRoot=host.Si(shadowOptions=null!=t.shadowOptions&&"object"==typeof t.shadowOptions&&"mode"in t.shadowOptions?t.shadowOptions:P),this.host.$customElement=$customElement,this.shadowRoot.$customElement=$customElement}get children(){return this.shadowRoot.childNodes}Oi(t){this.dom.Zt(this.shadowRoot,t,U)}yi(){return this.shadowRoot}Li(t){t.bi(this.shadowRoot)}Ii(t){t.remove()}}class F{constructor(dom,$customElement,host){this.childNodes=host.childNodes.length?PLATFORM.toArray(host.childNodes):PLATFORM.li,this.host=dom.ni(host),this.host.$customElement=$customElement}get children(){return this.childNodes}Oi(t){new MutationObserver(t).observe(this.host,U)}yi(){return this.host.Mi()}Li(t){t.insertBefore(this.host)}Ii(t){t.remove()}}class G{constructor($customElement,host){this.host=host,this.host.$customElement=$customElement}get children(){return this.host.childNodes}Oi(t){}yi(){return this.host.Mi()}Li(t){t.bi(this.host)}Ii(t){t.remove()}}const IProjectorLocatorRegistration=t("IProjectorLocatorRegistration",class{static register(t){return Registration.singleton(IProjectorLocator,this).register(t)}ji(dom,t,host,def){if(def.shadowOptions||def.hasSlots){if(def.containerless)throw Reporter.error(21);return new z(dom,t,host,def)}return def.containerless?new F(dom,t,host):new G(t,host)}}),ITargetAccessorLocatorRegistration=t("ITargetAccessorLocatorRegistration",TargetAccessorLocator),ITargetObserverLocatorRegistration=t("ITargetObserverLocatorRegistration",TargetObserverLocator),ITemplateFactoryRegistration=t("ITemplateFactoryRegistration",V),DefaultComponents=t("DefaultComponents",[IProjectorLocatorRegistration,ITargetAccessorLocatorRegistration,ITargetObserverLocatorRegistration,ITemplateFactoryRegistration]),AttrBindingBehaviorRegistration=t("AttrBindingBehaviorRegistration",AttrBindingBehavior),SelfBindingBehaviorRegistration=t("SelfBindingBehaviorRegistration",SelfBindingBehavior),UpdateTriggerBindingBehaviorRegistration=t("UpdateTriggerBindingBehaviorRegistration",UpdateTriggerBindingBehavior),ComposeRegistration=t("ComposeRegistration",Compose),DefaultResources=t("DefaultResources",[AttrBindingBehaviorRegistration,SelfBindingBehaviorRegistration,UpdateTriggerBindingBehaviorRegistration,ComposeRegistration]),ListenerBindingRendererRegistration=t("ListenerBindingRendererRegistration",D),SetAttributeRendererRegistration=t("SetAttributeRendererRegistration",N),StylePropertyBindingRendererRegistration=t("StylePropertyBindingRendererRegistration",H),TextBindingRendererRegistration=t("TextBindingRendererRegistration",k),DefaultRenderers=t("DefaultRenderers",[ListenerBindingRendererRegistration,SetAttributeRendererRegistration,StylePropertyBindingRendererRegistration,TextBindingRendererRegistration]);t("BasicConfiguration",{register:t=>BasicConfiguration.register(t).register(...DefaultComponents,...DefaultResources,...DefaultRenderers),Vi(){return this.register(DI.Vi())}})}}}); | ||
System.register("runtimeHtml",["@aurelia/kernel","@aurelia/runtime"],function(t){"use strict";var DI,Registration,Reporter,PLATFORM,LifecycleFlags,hasBind,hasUnbind,targetObserver,DelegationStrategy,ITargetObserverLocator,SetterObserver,IDOM,ITargetAccessorLocator,ILifecycle,BindingBehaviorResource,BindingMode,IObserverLocator,buildTemplateDefinition,HydrateElementInstruction,IRenderable,ITargetedInstruction,IRenderingEngine,CompositionCoordinator,bindable,CustomElementResource,DOM,INode,ITemplateFactory,CompiledTemplate,NodeSequence,IExpressionParser,instructionRenderer,ensureExpression,MultiInterpolationBinding,InterpolationBinding,addBinding,Binding,IProjectorLocator,BasicConfiguration;return{t:[function(t){DI=t.DI,Registration=t.Registration,Reporter=t.Reporter,PLATFORM=t.PLATFORM},function(t){LifecycleFlags=t.LifecycleFlags,hasBind=t.hasBind,hasUnbind=t.hasUnbind,targetObserver=t.targetObserver,DelegationStrategy=t.DelegationStrategy,ITargetObserverLocator=t.ITargetObserverLocator,SetterObserver=t.SetterObserver,IDOM=t.IDOM,ITargetAccessorLocator=t.ITargetAccessorLocator,ILifecycle=t.ILifecycle,BindingBehaviorResource=t.BindingBehaviorResource,BindingMode=t.BindingMode,IObserverLocator=t.IObserverLocator,buildTemplateDefinition=t.buildTemplateDefinition,HydrateElementInstruction=t.HydrateElementInstruction,IRenderable=t.IRenderable,ITargetedInstruction=t.ITargetedInstruction,IRenderingEngine=t.IRenderingEngine,CompositionCoordinator=t.CompositionCoordinator,bindable=t.bindable,CustomElementResource=t.CustomElementResource,DOM=t.DOM,INode=t.INode,ITemplateFactory=t.ITemplateFactory,CompiledTemplate=t.CompiledTemplate,NodeSequence=t.NodeSequence,IExpressionParser=t.IExpressionParser,instructionRenderer=t.instructionRenderer,ensureExpression=t.ensureExpression,MultiInterpolationBinding=t.MultiInterpolationBinding,InterpolationBinding=t.InterpolationBinding,addBinding=t.addBinding,Binding=t.Binding,IProjectorLocator=t.IProjectorLocator,BasicConfiguration=t.BasicConfiguration}],s(){function s(t,s,i,e){var n,r,h=arguments.length,o=3>h?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,i,e);else for(r=t.length-1;r>=0;r--)(n=t[r])&&(o=(3>h?n(o):h>3?n(s,i,o):n(s,i))||o);return h>3&&o&&Object.defineProperty(s,i,o),o}function i(t){return t.i&&t.i()[0]||t.h&&t.h()[0]||t.path&&t.path[0]||t.target}function e(){this.o(),this.l=1}function n(t){t.l=0;let s=i(t);const n=[];for(;s;){if(s.u){const i=s.u[t.type];i&&(t.stopPropagation!==e&&(t.o=t.stopPropagation,t.stopPropagation=e),n.push(i))}s=s.parentNode}for(let s=n.length-1;s>=0&&!t.l;s--){const i=n[s];"handleEvent"in i?i.g(t):i(t)}}function r(t){t.l=0;let s=i(t);for(;s&&!t.l;){if(s.p){const i=s.p[t.type];i&&(t.stopPropagation!==e&&(t.o=t.stopPropagation,t.stopPropagation=e),"handleEvent"in i?i.g(t):i(t))}s=s.parentNode}}function h(t,s){return t===s}function o(t){const s=i(t);if(this.target===s)return this.m(t)}function isHTMLTargetedInstruction(value){const type=value.type;return"string"==typeof type&&2===type.length}function createElement(dom,t,s,i){return"string"==typeof t?(function(dom,s,i,e){const instructions=[],n=[],dependencies=[],r=dom.createElement(t);let h=0;return i&&Object.keys(i).forEach(to=>{const value=i[to];isHTMLTargetedInstruction(value)?(h=1,instructions.push(value)):dom.setAttribute(r,to,value)}),h&&(dom.v(r),n.push(instructions)),e&&c(dom,r,e,n,dependencies),new RenderPlan(dom,r,n,dependencies)})(dom,0,s,i):(function(dom,t,s,i){const e=t.description.name,instructions=[],n=[instructions],dependencies=[],r=[],bindables=t.description.bindables,h=dom.createElement(e);return dom.v(h),dependencies.includes(t)||dependencies.push(t),instructions.push(new HydrateElementInstruction(e,r)),s&&Object.keys(s).forEach(to=>{const value=s[to];if(isHTMLTargetedInstruction(value))r.push(value);else{r.push(bindables[to]?{type:"re",to,value}:new SetAttributeInstruction(value,to))}}),i&&c(dom,h,i,n,dependencies),new RenderPlan(dom,h,n,dependencies)})(dom,t,s,i)}function c(dom,t,s,i,dependencies){for(let e=0,n=s.length;n>e;++e){const n=s[e];switch(typeof n){case"string":dom.appendChild(t,dom.createTextNode(n));break;case"object":dom.A(n)?dom.appendChild(t,n):"mergeInto"in n&&n.C(t,i,dependencies)}}}var HTMLTargetedInstructionType,NodeType,l,u;t({createElement,HTMLTargetedInstructionType:void 0,isHTMLTargetedInstruction,NodeType:void 0});class Listener{constructor(dom,t,s,i,e,preventDefault,n,r){this.dom=dom,this.T=null,this.R=null,this.$state=0,this.S=s,this.V=r,this.preventDefault=preventDefault,this.B=i,this.target=e,this.O=t,this.L=n}k(t){const s=this.$scope.I;s.j=t;const i=this.B.evaluate(LifecycleFlags.M,this.$scope,this.V);return Reflect.deleteProperty(s,"$event"),1!=i&&this.preventDefault&&t.preventDefault(),i}g(t){this.k(t)}D(t,s){if(2&this.$state){if(this.$scope===s)return;this.N(t|LifecycleFlags.P)}this.$state|=1,this.$scope=s;const i=this.B;hasBind(i)&&i.bind(t,s,this),this.H=this.L.addEventListener(this.dom,this.target,this.O,this,this.S),this.$state|=2,this.$state&=-2}N(t){if(!(2&this.$state))return;this.$state|=64;const s=this.B;hasUnbind(s)&&s.F(t,this.$scope,this),this.$scope=null,this.H.U(),this.H=null,this.$state&=-67}$(t,s,i){}G(t,s,i){}}t("Listener",Listener);let AttributeNSAccessor=t("AttributeNSAccessor",class{constructor(t,s,i,e,n){this.q=1,this.attributeName=e,this.X=t,this.Z=s,this.oldValue=this._=this.J(),this.K=i,this.W=n}J(){return this.Z.getAttributeNS(this.W,this.attributeName)}Y(t){this.Z.setAttributeNS(this.W,this.attributeName,t)}});AttributeNSAccessor=t("AttributeNSAccessor",s([targetObserver("")],AttributeNSAccessor));const a=LifecycleFlags.tt|LifecycleFlags.st,d=LifecycleFlags.it|LifecycleFlags.et,f=(t,s)=>t===s;let CheckedObserver=t("CheckedObserver",class{constructor(t,s,i,e,n){this.nt=t&LifecycleFlags.rt,this.q=1,this.H=e,this.X=s,this.Z=i,this.ht=n}J(){return this._}Y(t,s){this.ot||(this.ot=this.Z.ct&&(this.Z.ct.lt||this.Z.ct.value),this.ot&&this.ot.subscribe(this)),this.ut&&(this.ut.at(this),this.ut=null),"checkbox"===this.Z.type&&Array.isArray(t)&&(this.ut=this.ht.dt(this.nt|s,t),this.ut.ft(this)),this.gt()}bt(){this.gt(),this.wt(d)}G(t,s,i){this.gt(),this.wt(i)}gt(){const value=this._,t=this.Z,s=t.hasOwnProperty("model")?t.lt:t.value,i=t.pt||f;t.checked="radio"===t.type?!!i(value,s):1==value?1:Array.isArray(value)?-1!==value.findIndex(t=>!!i(t,s)):0}wt(t){t&LifecycleFlags.P||this._!==this.oldValue&&this.vt(this._,this.oldValue,this.nt|t)}g(){let value=this._;const t=this.Z,s=t.hasOwnProperty("model")?t.lt:t.value;let i;const e=t.pt||f;if("checkbox"===t.type){if(Array.isArray(value))return i=value.findIndex(t=>!!e(t,s)),void(t.checked&&-1===i?value.push(s):t.checked||-1===i||value.splice(i,1));value=t.checked}else{if(!t.checked)return;value=s}this.oldValue=this._,this._=value,this.wt(a)}subscribe(t){this.yt()||this.H.subscribe(this.Z,this),this.At(t)}unsubscribe(t){this.Ct(t)&&!this.yt()&&this.H.U()}F(){this.ut&&(this.ut.at(this),this.ut=null),this.ot&&this.ot.unsubscribe(this)}});CheckedObserver=t("CheckedObserver",s([targetObserver()],CheckedObserver));let ClassAttributeAccessor=t("ClassAttributeAccessor",class{constructor(t,s){this.q=1,this.Tt=1,this.X=t,this.Et=null,this.Z=s,this.version=0}J(){return this._}Y(t){const s=this.Et||{};let i,name,e=this.version;if(t.length){const n=this.Z;for(let r=0,h=(i=t.split(/\s+/)).length;h>r;r++)(name=i[r]).length&&(s[name]=e,n.classList.add(name))}if(this.Et=s,this.version+=1,0!==e)for(name in e-=1,s)s.hasOwnProperty(name)&&s[name]===e&&this.Z.classList.remove(name)}});ClassAttributeAccessor=t("ClassAttributeAccessor",s([targetObserver("")],ClassAttributeAccessor));let DataAttributeAccessor=t("DataAttributeAccessor",class{constructor(t,s,i){this.q=1,this.X=t,this.Z=s,this.oldValue=this._=this.J(),this.K=i}J(){return this.Z.getAttribute(this.K)}Y(t){null===t?this.Z.removeAttribute(this.K):this.Z.setAttribute(this.K,t)}});DataAttributeAccessor=t("DataAttributeAccessor",s([targetObserver()],DataAttributeAccessor));let ElementPropertyAccessor=t("ElementPropertyAccessor",class{constructor(t,s,i){this.q=1,this.X=t,this.Z=s,this.K=i}J(){return this.Z[this.K]}Y(value){this.Z[this.K]=value}});ElementPropertyAccessor=t("ElementPropertyAccessor",s([targetObserver("")],ElementPropertyAccessor));class ListenerTracker{constructor(dom,t,s,i){this.dom=dom,this.Rt=i,this.count=0,this.St=t,this.listener=s}Vt(){this.count++,1===this.count&&this.dom.addEventListener(this.St,this.listener,null,this.Rt)}Bt(){this.count--,0===this.count&&this.dom.removeEventListener(this.St,this.listener,null,this.Rt)}U(){this.count>0&&(this.count=0,this.dom.removeEventListener(this.St,this.listener,null,this.Rt))}}t("ListenerTracker",ListenerTracker);class DelegateOrCaptureSubscription{constructor(t,s,i,e){this.Ot=t,this.Lt=s,this.O=i,s[i]=e}U(){this.Ot.Bt(),this.Lt[this.O]=null}}t("DelegateOrCaptureSubscription",DelegateOrCaptureSubscription);class TriggerSubscription{constructor(dom,t,s,i){this.dom=dom,this.target=t,this.O=s,this.kt=i,dom.addEventListener(s,i,t)}U(){this.dom.removeEventListener(this.O,this.kt,this.target)}}t("TriggerSubscription",TriggerSubscription);class EventSubscriber{constructor(dom,t){this.dom=dom,this.It=t,this.target=null,this.H=null}subscribe(t,s){this.target=t,this.H=s;const i=this.dom.addEventListener,e=this.It;for(let n=0,r=e.length;r>n;++n)i(e[n],s,t)}U(){const t=this.target,s=this.H,i=this.It,e=this.dom.removeEventListener;for(let n=0,r=i.length;r>n;++n)e(i[n],s,t);this.target=this.H=null}}t("EventSubscriber",EventSubscriber);const IEventManager=t("IEventManager",DI.xt("IEventManager").jt(t=>t.singleton(g)));class g{constructor(){this.Mt={},this.Dt={},this.Mt={},this.Dt={}}addEventListener(dom,t,s,i,strategy){let e,h,o;if(strategy===DelegationStrategy.Nt){(o=(e=this.Mt)[s]||(e[s]=new ListenerTracker(dom,s,r,0))).Vt();const n=t.p||(t.p={});return new DelegateOrCaptureSubscription(o,n,s,i)}if(strategy===DelegationStrategy.Pt){(o=(h=this.Dt)[s]||(h[s]=new ListenerTracker(dom,s,n,1))).Vt();const e=t.u||(t.u={});return new DelegateOrCaptureSubscription(o,e,s,i)}return new TriggerSubscription(dom,t,s,i)}U(){let t;const{Mt:s,Dt:i}=this;for(t in s)s[t].U();for(t in i)i[t].U()}}const b=LifecycleFlags.tt|LifecycleFlags.st,w={Ht:1,Ft:1,Ut:1};let SelectValueObserver=t("SelectValueObserver",class{constructor(t,s,i,e,n,dom){this.nt=t&LifecycleFlags.rt,this.q=1,this.X=s,this.Z=i,this.H=e,this.ht=n,this.dom=dom}J(){return this._}Y(t,s){const i=Array.isArray(t);if(!i&&null!=t&&this.Z.multiple)throw Error("Only null or Array instances can be bound to a multi-select.");this.ut&&(this.ut.at(this),this.ut=null),i&&(this.ut=this.ht.dt(this.nt|s,t),this.ut.ft(this)),this.zt(),this.wt(s)}bt(t){this.zt(t)}G(t,s,i){this.$t(t,this.nt|i)}wt(t){if(t&LifecycleFlags.P)return;const s=this.oldValue,i=this._;i!==s&&this.vt(i,s,this.nt|t)}g(){this.Gt()&&this.wt(b)}zt(t){const s=this._,i=Array.isArray(s),e=this.Z,n=e.pt||h,r=e.options;let o=r.length;for(;o--;){const t=r[o],e=t.hasOwnProperty("model")?t.lt:t.value;t.selected=i?-1!==s.findIndex(t=>!!n(e,t)):!!n(e,s)}}Gt(){const t=this.Z,s=t.options,i=s.length,e=this._;let n=0;if(t.multiple){if(!Array.isArray(e))return 1;let r;const o=t.pt||h,c=[];for(;i>n;)(r=s[n]).selected&&c.push(r.hasOwnProperty("model")?r.lt:r.value),++n;for(n=0;e.length>n;){const t=e[n];-1===c.findIndex(s=>!!o(t,s))?e.splice(n,1):++n}for(n=0;c.length>n;){const t=c[n];-1===e.findIndex(s=>!!o(t,s))&&e.push(t),++n}return 0}let value=null;for(;i>n;){const t=s[n];if(t.selected){value=t.hasOwnProperty("model")?t.lt:t.value;break}++n}return this.oldValue=this._,this._=value,1}subscribe(t){this.yt()||this.H.subscribe(this.Z,this),this.At(t)}unsubscribe(t){this.Ct(t)&&!this.yt()&&this.H.U()}bind(){this.qt=this.dom.Xt(this.Z,this.Zt.bind(this),w)}F(){this.qt.disconnect(),this.qt=null,this.ut&&(this.ut.at(this),this.ut=null)}Zt(){this.zt(),this.Gt()&&this.wt(b)}});SelectValueObserver=t("SelectValueObserver",s([targetObserver()],SelectValueObserver));let StyleAttributeAccessor=t("StyleAttributeAccessor",class{constructor(t,s){this.q=1,this.oldValue=this._=s.style.cssText,this.X=t,this.Z=s,this._t=null,this.version=0}J(){return this.Z.style.cssText}Jt(t,value){let s="";null!=value&&"function"==typeof value.indexOf&&-1!==value.indexOf("!important")&&(s="important",value=value.replace("!important","")),this.Z.style.setProperty(t,value,s)}Y(t){const s=this._t||{};let i,e=this.version;if(null!==t)if(t instanceof Object){let value;for(i in t)t.hasOwnProperty(i)&&(value=t[i],s[i=i.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)]=e,this.Jt(i,value))}else if(t.length){const n=/\s*([\w\-]+)\s*:\s*((?:(?:[\w\-]+\(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[\w\-]+\(\s*(?:[^"](?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^\)]*)\),?|[^\)]*)\),?|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^;]*),?\s*)+);?/g;let r;for(;null!==(r=n.exec(t));)(i=r[1])&&(s[i]=e,this.Jt(i,r[2]))}if(this._t=s,this.version+=1,0!==e)for(i in e-=1,s)s.hasOwnProperty(i)&&s[i]===e&&this.Z.style.removeProperty(i)}});StyleAttributeAccessor=t("StyleAttributeAccessor",s([targetObserver()],StyleAttributeAccessor));const p={button:"",Kt:"on",color:"#000000",Qt:"",Wt:"",email:"",Yt:"",hidden:"",ts:"",ss:"",number:"",password:"",es:"on",range:"50",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",ns:""},m=LifecycleFlags.tt|LifecycleFlags.st;let ValueAttributeObserver=t("ValueAttributeObserver",class{constructor(t,s,i,e){if(this.q=1,this.H=e,this.X=t,this.Z=s,this.K=i,"value"===i){const t=s.type;this.defaultValue=p[t||"text"],"file"===t&&(this.flush=this.rs)}else this.defaultValue="";this.oldValue=this._=s[i]}J(){return this.Z[this.K]}Y(t,s){this.Z[this.K]=t,s&LifecycleFlags.P||this.vt(this._,this.oldValue,s)}g(){const t=this.oldValue=this._,s=this._=this.J();t!==s&&(this.vt(s,t,m),this.oldValue=s)}subscribe(t){this.yt()||(this.oldValue=this.J(),this.H.subscribe(this.Z,this)),this.At(t)}unsubscribe(t){this.Ct(t)&&!this.yt()&&this.H.U()}rs(){const t=this._;this.oldValue!==t&&""===t&&(this.Y(t,this.hs),this.oldValue=this._)}});ValueAttributeObserver=t("ValueAttributeObserver",s([targetObserver("")],ValueAttributeObserver));const v="http://www.w3.org/1999/xlink",y="http://www.w3.org/XML/1998/namespace",A="http://www.w3.org/2000/xmlns/",C=((l=Object.create(null))["os"]=["actuate",v],l["cs"]=["arcrole",v],l["ls"]=["href",v],l["us"]=["role",v],l["as"]=["show",v],l["ds"]=["title",v],l["fs"]=["type",v],l["gs"]=["lang",y],l["bs"]=["space",y],l.ws=["xmlns",A],l["ps"]=["xlink",A],l),T=["change","input"],E=["change"],R=["change","input","blur","keyup","paste"],S=["scroll"],V=(function(t){return t.ms=1,t.style=1,t.vs=1,t.checked=1,t.value=1,t.lt=1,t["os"]=1,t["cs"]=1,t["ls"]=1,t["us"]=1,t["as"]=1,t["ds"]=1,t["fs"]=1,t["gs"]=1,t["bs"]=1,t.ws=1,t["ps"]=1,t})(Object.create(null));class TargetObserverLocator{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITargetObserverLocator,this).register(t)}ys(t,s,i,e,n){switch(n){case"checked":return new CheckedObserver(t,s,e,new EventSubscriber(this.dom,T),i);case"value":return"SELECT"===e.tagName?new SelectValueObserver(t,s,e,new EventSubscriber(this.dom,E),i,this.dom):new ValueAttributeObserver(s,e,n,new EventSubscriber(this.dom,T));case"files":return new ValueAttributeObserver(s,e,n,new EventSubscriber(this.dom,T));case"textContent":case"innerHTML":return new ValueAttributeObserver(s,e,n,new EventSubscriber(this.dom,R));case"scrollTop":case"scrollLeft":return new ValueAttributeObserver(s,e,n,new EventSubscriber(this.dom,S));case"class":return new ClassAttributeAccessor(s,e);case"style":case"css":return new StyleAttributeAccessor(s,e);case"model":return new SetterObserver(t,e,n);case"role":return new DataAttributeAccessor(s,e,n);default:if(void 0!==C[n]){const t=C[n];return new AttributeNSAccessor(s,e,n,t[0],t[1])}const r=n.slice(0,5);if("aria-"===r||"data-"===r)return new DataAttributeAccessor(s,e,n)}return null}As(t,s,i){return 1==V[i]}Cs(t,s){return this.dom.A(s)}}t("TargetObserverLocator",TargetObserverLocator),TargetObserverLocator.inject=[IDOM];class TargetAccessorLocator{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITargetAccessorLocator,this).register(t)}Ts(t,s,i,e){switch(e){case"textContent":return new ElementPropertyAccessor(s,i,e);case"class":return new ClassAttributeAccessor(s,i);case"style":case"css":return new StyleAttributeAccessor(s,i);case"src":case"href":case"role":return new DataAttributeAccessor(s,i,e);default:if(void 0!==C[e]){const t=C[e];return new AttributeNSAccessor(s,i,e,t[0],t[1])}const t=e.slice(0,5);return"aria-"===t||"data-"===t?new DataAttributeAccessor(s,i,e):new ElementPropertyAccessor(s,i,e)}}Cs(t,s){return this.dom.A(s)}}t("TargetAccessorLocator",TargetAccessorLocator),TargetAccessorLocator.inject=[IDOM],t("ISVGAnalyzer",DI.xt("ISVGAnalyzer").jt(t=>t.singleton(class{Es(t,s){return 0}})));class AttrBindingBehavior{bind(t,s,i){i.targetObserver=new DataAttributeAccessor(i.V.get(ILifecycle),i.target,i.Rs)}F(t,s,i){}}t("AttrBindingBehavior",AttrBindingBehavior),BindingBehaviorResource.Ss("attr",AttrBindingBehavior);class SelfBindingBehavior{bind(t,s,i){if(!i.k||!i.O)throw Reporter.error(8);i.m=i.k,i.k=o}F(t,s,i){i.k=i.m,i.m=null}}t("SelfBindingBehavior",SelfBindingBehavior),BindingBehaviorResource.Ss("self",SelfBindingBehavior);class UpdateTriggerBindingBehavior{constructor(t){this.ht=t}bind(t,s,i,...e){if(0===e.length)throw Reporter.error(9);if(i.mode!==BindingMode.Vs&&i.mode!==BindingMode.Bs)throw Reporter.error(10);this.nt=t&LifecycleFlags.rt;const n=this.ht.ys(this.nt|t,i.target,i.Rs);if(!n.H)throw Reporter.error(10);i.targetObserver=n,n.Os=i.targetObserver.H,n.H=new EventSubscriber(i.V.get(IDOM),e)}F(t,s,i){i.targetObserver.H.U(),i.targetObserver.H=i.targetObserver.Os,i.targetObserver.Os=null}}t("UpdateTriggerBindingBehavior",UpdateTriggerBindingBehavior),UpdateTriggerBindingBehavior.inject=[IObserverLocator],BindingBehaviorResource.Ss("updateTrigger",UpdateTriggerBindingBehavior),(function(HTMLTargetedInstructionType){HTMLTargetedInstructionType.Ls="ha",HTMLTargetedInstructionType.ks="hb",HTMLTargetedInstructionType.Is="hc",HTMLTargetedInstructionType.setAttribute="hd"})(HTMLTargetedInstructionType||(HTMLTargetedInstructionType=t("HTMLTargetedInstructionType",{}))),t("TextBindingInstruction",class{constructor(from){this.type="ha",this.from=from}}),t("TriggerBindingInstruction",class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=1,this.strategy=DelegationStrategy.js,this.to=to}}),t("DelegateBindingInstruction",class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=DelegationStrategy.Nt,this.to=to}}),t("CaptureBindingInstruction",class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=DelegationStrategy.Pt,this.to=to}}),t("StylePropertyBindingInstruction",class{constructor(from,to){this.type="hc",this.from=from,this.to=to}});class SetAttributeInstruction{constructor(value,to){this.type="hd",this.to=to,this.value=value}}t("SetAttributeInstruction",SetAttributeInstruction);class RenderPlan{constructor(dom,t,instructions,dependencies){this.dom=dom,this.dependencies=dependencies,this.instructions=instructions,this.xs=t}get Ms(){return this.Ds||(this.Ds=buildTemplateDefinition(null,null,this.xs,null,"string"==typeof this.xs,null,this.instructions,this.dependencies))}Ns(t,s){return t.Ns(this.dom,this.Ms,null,s)}Ps(t,s,i){return this.Hs(s,i).create()}Hs(t,s){return t.Hs(this.dom,this.Ms,s)}C(t,instructions,dependencies){this.dom.appendChild(t,this.xs),instructions.push(...this.instructions),dependencies.push(...this.dependencies)}}t("RenderPlan",RenderPlan);const B=["subject","composing"];class Compose{constructor(dom,t,s,i,e){this.dom=dom,this.subject=null,this.Fs=0,this.Us=e,this.zs=null,this.$s=t,this.Gs=i,this.Us.qs=(()=>{this.Fs=0}),this.properties=s.instructions.filter(t=>!B.includes(t.to)).reduce((t,s)=>(s.to&&(t[s.to]=s),t),{})}Xs(t){this.Zs(this.subject,null,t),this.Us.Xs(t,this.$scope)}_s(t){this.Us._s(t)}Js(t){this.Us.Js(t)}Ks(t){this.zs=null,this.Us.Ks(t)}Qs(t){this.Us.Qs(t)}Ws(t,s,i){this.Zs(t,s,i)}Zs(t,s,i){this.zs!==t&&(this.zs=t,t=t instanceof Promise?t.then(t=>this.Ys(t,i)):this.Ys(t,i),this.Fs=1,this.Us.ti(t,i))}Ys(t,s){const i=this.si(t,s);return i?(i.ii(this.ei.host),i.ni(this.$s.$scope),i):null}si(t,s){return t?"lockScope"in t?t:"createView"in t?t.Ps(s,this.Gs,this.$s.$context):"create"in t?t.create():"template"in t?this.Gs.Hs(this.dom,t,this.$s.$context).create():createElement(this.dom,t,this.properties,this.ei.children).Ps(s,this.Gs,this.$s.$context):null}}t("Compose",Compose),Compose.inject=[IDOM,IRenderable,ITargetedInstruction,IRenderingEngine,CompositionCoordinator],s([bindable],Compose.prototype,"subject",void 0),s([bindable],Compose.prototype,"composing",void 0),CustomElementResource.Ss({name:"au-compose",containerless:1},Compose),(function(NodeType){NodeType[NodeType.Element=1]="Element",NodeType[NodeType.Attr=2]="Attr",NodeType[NodeType.Text=3]="Text",NodeType[NodeType.CDATASection=4]="CDATASection",NodeType[NodeType.EntityReference=5]="EntityReference",NodeType[NodeType.Entity=6]="Entity",NodeType[NodeType.ProcessingInstruction=7]="ProcessingInstruction",NodeType[NodeType.Comment=8]="Comment",NodeType[NodeType.Document=9]="Document",NodeType[NodeType.DocumentType=10]="DocumentType",NodeType[NodeType.DocumentFragment=11]="DocumentFragment",NodeType[NodeType.Notation=12]="Notation"})(NodeType||(NodeType=t("NodeType",{}))),t("HTMLDOM",class{constructor(t,s,i,e,n,r){this.window=t,this.document=s,this.Node=i,this.Element=e,this.HTMLElement=n,this.CustomEvent=r,DOM.ri&&(Reporter.write(1001),DOM.hi()),DOM.initialize(this)}static register(t){return Registration.oi(IDOM,this).register(t)}addEventListener(t,s,i,e){(i||this.document).addEventListener(t,s,e)}appendChild(t,s){t.appendChild(s)}cloneNode(t,s){return t.cloneNode(0!=s)}ci(t){if(this.li(t))return t;if(null===t.parentNode)throw Reporter.error(52);const s=this.document.createComment("au-end"),i=this.document.createComment("au-start");return t.parentNode.replaceChild(s,t),s.parentNode.insertBefore(i,s),s.ui=i,i.$nodes=null,s}createDocumentFragment(t){if(null==t)return this.document.createDocumentFragment();if(this.A(t)){if(void 0!==t.content)return t.content;const s=this.document.createDocumentFragment();return s.appendChild(t),s}return this.ai(t).content}createElement(name){return this.document.createElement(name)}fetch(t,s){return this.window.fetch(t,s)}di(t,s){return new this.CustomEvent(t,s)}dispatchEvent(t){this.document.dispatchEvent(t)}Xt(t,s,i){if("undefined"==typeof MutationObserver)return{disconnect(){},observe(){},takeRecords:()=>PLATFORM.fi};const e=new MutationObserver(s);return e.observe(t,i),e}ai(t){if(null==t)return this.document.createElement("template");const template=this.document.createElement("template");return template.innerHTML=""+t,template}createTextNode(t){return this.document.createTextNode(t)}insertBefore(t,s){s.parentNode.insertBefore(t,s)}gi(t){return"AU-M"===t.nodeName}A(t){return null!=t&&t.nodeType>0}li(t){return"au-end"===t.textContent}v(t){t.className="au"}bi(t,s){t.wi(INode,s),t.wi(this.Node,s),t.wi(this.Element,s),t.wi(this.HTMLElement,s)}remove(t){t.remove?t.remove():t.parentNode.removeChild(t)}removeEventListener(t,s,i,e){(i||this.document).removeEventListener(t,s,e)}setAttribute(t,name,value){t.setAttribute(name,value)}}),t("DOM",DOM);class O{constructor(dom,t){this.dom=dom,this.firstChild=t,this.lastChild=t,this.childNodes=[t],this.targets=[new I(t)]}pi(){return this.targets}insertBefore(t){t.parentNode.insertBefore(this.firstChild,t)}mi(t){t.appendChild(this.firstChild)}remove(){this.firstChild.remove()}}class L{constructor(dom,t){this.dom=dom,this.vi=t;const s=t.querySelectorAll(".au");let i=0,e=s.length;const targets=this.targets=Array(e);for(;e>i;){const t=s[i];targets[i]="AU-M"===t.nodeName?this.dom.ci(t):t,++i}const n=t.childNodes;i=0;const childNodes=this.childNodes=Array(e=n.length);for(;e>i;)childNodes[i]=n[i],++i;this.firstChild=t.firstChild,this.lastChild=t.lastChild,this.start=this.end=null}pi(){return this.targets}insertBefore(t){if(t.parentNode.insertBefore(this.vi,t),"au-end"===t.textContent){this.end=t;const s=this.start=t.ui;s.$nodes=null===s.$nodes?this:PLATFORM.yi}}mi(t){t.appendChild(this.vi),this.start=this.end=null}remove(){const t=this.vi;if(null!==this.start&&this.start.$nodes===this){const s=this.end;let i,e=this.start.nextSibling;for(;e!==s;)i=e.nextSibling,t.appendChild(e),e=i;this.start.$nodes=null,this.start=this.end=null}else{let s=this.firstChild;if(s.parentNode!==t){const i=this.lastChild;let e;for(;null!==s&&(e=s.nextSibling,t.appendChild(s),s!==i);)s=e}}}}class k{constructor(dom,t){this.dom=dom;const s=dom.createDocumentFragment(t),childNodes=s.childNodes;switch(childNodes.length){case 0:return void(this.Ai=(()=>NodeSequence.empty));case 2:const t=childNodes[0];if("AU-M"===t.nodeName||"#comment"===t.nodeName){const t=childNodes[1];if(3===t.nodeType&&0===t.textContent.length)return this.Ci=0,this.xs=t,void(this.Ti=O)}default:this.Ci=1,this.xs=s,this.Ti=L}}Ai(){return new this.Ti(this.dom,this.xs.cloneNode(this.Ci))}}class I{get parentNode(){return this.nextSibling.parentNode}constructor(t){this.nextSibling=t,this.textContent=""}remove(){}}(u=I.prototype).previousSibling=null,u.childNodes=PLATFORM.fi,u.nodeName="AU-M",u.nodeType=1;class j{constructor(dom){this.dom=dom}static register(t){return Registration.singleton(ITemplateFactory,this).register(t)}create(t,s){return new CompiledTemplate(this.dom,s,new k(this.dom,s.template),t)}}j.inject=[IDOM];let x=class{constructor(t,s){this.Ei=t,this.ht=s}Ri(t,dom,s,i,e,n){const r=e.nextSibling;let h;dom.gi(e)&&dom.remove(e);const o=ensureExpression(this.Ei,n.from,2048);h=o.Si?new MultiInterpolationBinding(this.ht,o,r,"textContent",BindingMode.Vi,s):new InterpolationBinding(o.Bi,o,r,"textContent",BindingMode.Vi,this.ht,s,1),addBinding(i,h)}};x.inject=[IExpressionParser,IObserverLocator],x=s([instructionRenderer("ha")],x);let M=class{constructor(t,s){this.Ei=t,this.L=s}Ri(t,dom,s,i,e,n){const r=ensureExpression(this.Ei,n.from,80|n.strategy+6),h=new Listener(dom,n.to,n.strategy,r,e,n.preventDefault,this.L,s);addBinding(i,h)}};M.inject=[IExpressionParser,IEventManager],M=s([instructionRenderer("hb")],M);let D=class{Ri(t,dom,s,i,e,n){e.setAttribute(n.to,n.value)}};D=s([instructionRenderer("hd")],D);let N=class{constructor(t,s){this.Ei=t,this.ht=s}Ri(t,dom,s,i,e,n){const r=ensureExpression(this.Ei,n.from,48|BindingMode.Vi),h=new Binding(r,e.style,n.to,BindingMode.Vi,this.ht,s);addBinding(i,h)}};N.inject=[IExpressionParser,IObserverLocator],N=s([instructionRenderer("hc")],N);const P={mode:"open"},H={Ht:1};class F{constructor(dom,$customElement,host,t){let shadowOptions;this.dom=dom,this.host=host,this.shadowRoot=host.Oi(shadowOptions=null!=t.shadowOptions&&"object"==typeof t.shadowOptions&&"mode"in t.shadowOptions?t.shadowOptions:P),this.host.$customElement=$customElement,this.shadowRoot.$customElement=$customElement}get children(){return this.shadowRoot.childNodes}Li(t){this.dom.Xt(this.shadowRoot,t,H)}ki(){return this.shadowRoot}Ii(t){t.mi(this.shadowRoot)}ji(t){t.remove()}}class U{constructor(dom,$customElement,host){this.childNodes=host.childNodes.length?PLATFORM.toArray(host.childNodes):PLATFORM.fi,this.host=dom.ci(host),this.host.$customElement=$customElement}get children(){return this.childNodes}Li(t){new MutationObserver(t).observe(this.host,H)}ki(){return this.host.xi()}Ii(t){t.insertBefore(this.host)}ji(t){t.remove()}}class z{constructor($customElement,host){this.host=host,this.host.$customElement=$customElement}get children(){return this.host.childNodes}Li(t){}ki(){return this.host.xi()}Ii(t){t.mi(this.host)}ji(t){t.remove()}}const IProjectorLocatorRegistration=t("IProjectorLocatorRegistration",class{static register(t){return Registration.singleton(IProjectorLocator,this).register(t)}Mi(dom,t,host,def){if(def.shadowOptions||def.hasSlots){if(def.containerless)throw Reporter.error(21);return new F(dom,t,host,def)}return def.containerless?new U(dom,t,host):new z(t,host)}}),ITargetAccessorLocatorRegistration=t("ITargetAccessorLocatorRegistration",TargetAccessorLocator),ITargetObserverLocatorRegistration=t("ITargetObserverLocatorRegistration",TargetObserverLocator),ITemplateFactoryRegistration=t("ITemplateFactoryRegistration",j),DefaultComponents=t("DefaultComponents",[IProjectorLocatorRegistration,ITargetAccessorLocatorRegistration,ITargetObserverLocatorRegistration,ITemplateFactoryRegistration]),AttrBindingBehaviorRegistration=t("AttrBindingBehaviorRegistration",AttrBindingBehavior),SelfBindingBehaviorRegistration=t("SelfBindingBehaviorRegistration",SelfBindingBehavior),UpdateTriggerBindingBehaviorRegistration=t("UpdateTriggerBindingBehaviorRegistration",UpdateTriggerBindingBehavior),ComposeRegistration=t("ComposeRegistration",Compose),DefaultResources=t("DefaultResources",[AttrBindingBehaviorRegistration,SelfBindingBehaviorRegistration,UpdateTriggerBindingBehaviorRegistration,ComposeRegistration]),ListenerBindingRendererRegistration=t("ListenerBindingRendererRegistration",M),SetAttributeRendererRegistration=t("SetAttributeRendererRegistration",D),StylePropertyBindingRendererRegistration=t("StylePropertyBindingRendererRegistration",N),TextBindingRendererRegistration=t("TextBindingRendererRegistration",x),DefaultRenderers=t("DefaultRenderers",[ListenerBindingRendererRegistration,SetAttributeRendererRegistration,StylePropertyBindingRendererRegistration,TextBindingRendererRegistration]);t("BasicConfiguration",{register:t=>BasicConfiguration.register(t).register(...DefaultComponents,...DefaultResources,...DefaultRenderers),Di(){return this.register(DI.Di())}})}}}); |
@@ -1,1 +0,1 @@ | ||
(function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@aurelia/kernel"),require("@aurelia/runtime")):"function"==typeof define&&define.t?define(["exports","@aurelia/kernel","@aurelia/runtime"],s):s((t=t||self).runtimeHtml={},t.kernel,t.runtime)})(this,function(t,kernel,runtime){"use strict";function s(t,s,i,h){var e,n,r=arguments.length,o=3>r?s:null===h?h=Object.getOwnPropertyDescriptor(s,i):h;if("object"==typeof Reflect&&"function"==typeof Reflect.s)o=Reflect.s(t,s,i,h);else for(n=t.length-1;n>=0;n--)(e=t[n])&&(o=(3>r?e(o):r>3?e(s,i,o):e(s,i))||o);return r>3&&o&&Object.defineProperty(s,i,o),o}function i(t){return t.i&&t.i()[0]||t.h&&t.h()[0]||t.path&&t.path[0]||t.target}function h(){this.o(),this.u=1}function e(t){t.u=0;let s=i(t);const e=[];for(;s;){if(s.l){const i=s.l[t.type];i&&(t.stopPropagation!==h&&(t.o=t.stopPropagation,t.stopPropagation=h),e.push(i))}s=s.parentNode}for(let s=e.length-1;s>=0&&!t.u;s--){const i=e[s];"handleEvent"in i?i.g(t):i(t)}}function n(t){t.u=0;let s=i(t);for(;s&&!t.u;){if(s.p){const i=s.p[t.type];i&&(t.stopPropagation!==h&&(t.o=t.stopPropagation,t.stopPropagation=h),"handleEvent"in i?i.g(t):i(t))}s=s.parentNode}}function r(t,s){return t===s}function o(t){const s=i(t);if(this.target===s)return this.m(t)}function isHTMLTargetedInstruction(value){const type=value.type;return"string"==typeof type&&2===type.length}function createElement(dom,t,s,i){return"string"==typeof t?(function(dom,s,i,h){const instructions=[],e=[],dependencies=[],n=dom.createElement(t);let r=0;return i&&Object.keys(i).forEach(to=>{const value=i[to];isHTMLTargetedInstruction(value)?(r=1,instructions.push(value)):dom.setAttribute(n,to,value)}),r&&(dom.C(n),e.push(instructions)),h&&c(dom,n,h,e,dependencies),new RenderPlan(dom,n,e,dependencies)})(dom,0,s,i):(function(dom,t,s,i){const h=t.description.name,instructions=[],e=[instructions],dependencies=[],n=[],bindables=t.description.bindables,r=dom.createElement(h);return dom.C(r),dependencies.includes(t)||dependencies.push(t),instructions.push(new runtime.HydrateElementInstruction(h,n)),s&&Object.keys(s).forEach(to=>{const value=s[to];if(isHTMLTargetedInstruction(value))n.push(value);else{n.push(bindables[to]?{type:"re",to,value}:new SetAttributeInstruction(value,to))}}),i&&c(dom,r,i,e,dependencies),new RenderPlan(dom,r,e,dependencies)})(dom,t,s,i)}function c(dom,t,s,i,dependencies){for(let h=0,e=s.length;e>h;++h){const e=s[h];switch(typeof e){case"string":dom.appendChild(t,dom.createTextNode(e));break;case"object":dom.v(e)?dom.appendChild(t,e):"mergeInto"in e&&e.A(t,i,dependencies)}}}var u,HTMLTargetedInstructionType,NodeType,l;class Listener{constructor(dom,t,s,i,h,preventDefault,e,n){this.dom=dom,this.j=null,this.O=null,this.$state=0,this.T=s,this.M=n,this.preventDefault=preventDefault,this.k=i,this.target=h,this.L=t,this.V=e}N(t){const s=this.$scope.R;s.S=t;const i=this.k.evaluate(runtime.LifecycleFlags.B,this.$scope,this.M);return delete s.S,1!=i&&this.preventDefault&&t.preventDefault(),i}g(t){this.N(t)}D(t,s){if(2&this.$state){if(this.$scope===s)return;this.U(t|runtime.LifecycleFlags.q)}this.$state|=1,this.$scope=s;const i=this.k;runtime.hasBind(i)&&i.bind(t,s,this),this.F=this.V.addEventListener(this.dom,this.target,this.L,this,this.T),this.$state|=2,this.$state&=-2}U(t){if(!(2&this.$state))return;this.$state|=64;const s=this.k;runtime.hasUnbind(s)&&s.H(t,this.$scope,this),this.$scope=null,this.F.I(),this.F=null,this.$state&=-67}G(t,s){}P(t,s,i){}}t.AttributeNSAccessor=class{constructor(t,s,i,h,e){this.X=1,this.attributeName=h,this.Z=t,this.$=s,this.oldValue=this._=this.J(),this.K=i,this.W=e}J(){return this.$.getAttributeNS(this.W,this.attributeName)}Y(t){this.$.setAttributeNS(this.W,this.attributeName,t)}},t.AttributeNSAccessor=s([runtime.targetObserver("")],t.AttributeNSAccessor);const a=runtime.LifecycleFlags.tt|runtime.LifecycleFlags.st,f=runtime.LifecycleFlags.it|runtime.LifecycleFlags.ht,d=(t,s)=>t===s;t.CheckedObserver=class{constructor(t,s,i,h){this.X=1,this.F=i,this.Z=t,this.$=s,this.et=h}J(){return this._}Y(t,s){this.nt||(this.nt=this.$.rt&&(this.$.rt.ot||this.$.rt.value),this.nt&&this.nt.subscribe(this)),this.ct&&(this.ct.ut(this),this.ct=null),"checkbox"===this.$.type&&Array.isArray(t)&&(this.ct=this.et.lt(t),this.ct.at(this)),this.ft()}dt(){this.ft(),this.wt(f)}P(t,s,i){this.ft(),this.wt(i)}ft(){const value=this._,t=this.$,s=t.hasOwnProperty("model")?t.ot:t.value,i=t.bt||d;t.checked="radio"===t.type?!!i(value,s):1==value?1:Array.isArray(value)?-1!==value.findIndex(t=>!!i(t,s)):0}wt(t){t&runtime.LifecycleFlags.q||this._!==this.oldValue&&this.gt(this._,this.oldValue,t)}g(){let value=this._;const t=this.$,s=t.hasOwnProperty("model")?t.ot:t.value;let i;const h=t.bt||d;if("checkbox"===t.type){if(Array.isArray(value))return i=value.findIndex(t=>!!h(t,s)),void(t.checked&&-1===i?value.push(s):t.checked||-1===i||value.splice(i,1));value=t.checked}else{if(!t.checked)return;value=s}this.oldValue=this._,this._=value,this.wt(a)}subscribe(t){this.pt()||this.F.subscribe(this.$,this),this.Ct(t)}unsubscribe(t){this.vt(t)&&!this.pt()&&this.F.I()}H(){this.ct&&(this.ct.ut(this),this.ct=null),this.nt&&this.nt.unsubscribe(this)}},t.CheckedObserver=s([runtime.targetObserver()],t.CheckedObserver),t.ClassAttributeAccessor=class{constructor(t,s){this.X=1,this.Et=1,this.Z=t,this.At=null,this.$=s,this.version=0}J(){return this._}Y(t){const s=this.At||{};let i,name,h=this.version;if(t.length){const e=this.$;for(let n=0,r=(i=t.split(/\s+/)).length;r>n;n++)(name=i[n]).length&&(s[name]=h,e.classList.add(name))}if(this.At=s,this.version+=1,0!==h)for(name in h-=1,s)s.hasOwnProperty(name)&&s[name]===h&&this.$.classList.remove(name)}},t.ClassAttributeAccessor=s([runtime.targetObserver("")],t.ClassAttributeAccessor),t.DataAttributeAccessor=class{constructor(t,s,i){this.X=1,this.Z=t,this.$=s,this.oldValue=this._=this.J(),this.K=i}J(){return this.$.getAttribute(this.K)}Y(t){null===t?this.$.removeAttribute(this.K):this.$.setAttribute(this.K,t)}},t.DataAttributeAccessor=s([runtime.targetObserver()],t.DataAttributeAccessor),t.ElementPropertyAccessor=class{constructor(t,s,i){this.X=1,this.Z=t,this.$=s,this.K=i}J(){return this.$[this.K]}Y(value){this.$[this.K]=value}},t.ElementPropertyAccessor=s([runtime.targetObserver("")],t.ElementPropertyAccessor);class ListenerTracker{constructor(dom,t,s,i){this.dom=dom,this.jt=i,this.count=0,this.Ot=t,this.listener=s}Tt(){this.count++,1===this.count&&this.dom.addEventListener(this.Ot,this.listener,null,this.jt)}Mt(){this.count--,0===this.count&&this.dom.removeEventListener(this.Ot,this.listener,null,this.jt)}I(){this.count>0&&(this.count=0,this.dom.removeEventListener(this.Ot,this.listener,null,this.jt))}}class DelegateOrCaptureSubscription{constructor(t,s,i,h){this.kt=t,this.yt=s,this.L=i,s[i]=h}I(){this.kt.Mt(),this.yt[this.L]=null}}class TriggerSubscription{constructor(dom,t,s,i){this.dom=dom,this.target=t,this.L=s,this.Lt=i,dom.addEventListener(s,i,t)}I(){this.dom.removeEventListener(this.L,this.Lt,this.target)}}class EventSubscriber{constructor(dom,t){this.dom=dom,this.Vt=t,this.target=null,this.F=null}subscribe(t,s){this.target=t,this.F=s;const i=this.dom.addEventListener,h=this.Vt;for(let e=0,n=h.length;n>e;++e)i(h[e],s,t)}I(){const t=this.target,s=this.F,i=this.Vt,h=this.dom.removeEventListener;for(let e=0,n=i.length;n>e;++e)h(i[e],s,t);this.target=this.F=null}}const IEventManager=kernel.DI.Rt("IEventManager").Nt(t=>t.singleton(w));class w{constructor(){this.St={},this.Bt={},this.St={},this.Bt={}}addEventListener(dom,t,s,i,strategy){let h,r,o;if(strategy===runtime.DelegationStrategy.zt){(o=(h=this.St)[s]||(h[s]=new ListenerTracker(dom,s,n,0))).Tt();const e=t.p||(t.p={});return new DelegateOrCaptureSubscription(o,e,s,i)}if(strategy===runtime.DelegationStrategy.Dt){(o=(r=this.Bt)[s]||(r[s]=new ListenerTracker(dom,s,e,1))).Tt();const h=t.l||(t.l={});return new DelegateOrCaptureSubscription(o,h,s,i)}return new TriggerSubscription(dom,t,s,i)}I(){let t;const{St:s,Bt:i}=this;for(t in s)s[t].I();for(t in i)i[t].I()}}const b=runtime.LifecycleFlags.tt|runtime.LifecycleFlags.st,g={Ut:1,qt:1,Ft:1};t.SelectValueObserver=class{constructor(t,s,i,h,dom){this.X=1,this.Z=t,this.$=s,this.F=i,this.et=h,this.dom=dom}J(){return this._}Y(t,s){const i=Array.isArray(t);if(!i&&null!=t&&this.$.multiple)throw Error("Only null or Array instances can be bound to a multi-select.");this.ct&&(this.ct.ut(this),this.ct=null),i&&(this.ct=this.et.lt(t),this.ct.at(this)),this.Ht(),this.wt(s)}dt(t){this.Ht(t)}P(t,s,i){this.It(t,i)}wt(t){if(t&runtime.LifecycleFlags.q)return;const s=this.oldValue,i=this._;i!==s&&this.gt(i,s,t)}g(){this.Gt()&&this.wt(b)}Ht(t){const s=this._,i=Array.isArray(s),h=this.$,e=h.bt||r,n=h.options;let o=n.length;for(;o--;){const t=n[o],h=t.hasOwnProperty("model")?t.ot:t.value;t.selected=i?-1!==s.findIndex(t=>!!e(h,t)):!!e(h,s)}}Gt(){const t=this.$,s=t.options,i=s.length,h=this._;let e=0;if(t.multiple){if(!Array.isArray(h))return 1;let n;const o=t.bt||r,c=[];for(;i>e;)(n=s[e]).selected&&c.push(n.hasOwnProperty("model")?n.ot:n.value),++e;for(e=0;h.length>e;){const t=h[e];-1===c.findIndex(s=>!!o(t,s))?h.splice(e,1):++e}for(e=0;c.length>e;){const t=c[e];-1===h.findIndex(s=>!!o(t,s))&&h.push(t),++e}return 0}let value=null;for(;i>e;){const t=s[e];if(t.selected){value=t.hasOwnProperty("model")?t.ot:t.value;break}++e}return this.oldValue=this._,this._=value,1}subscribe(t){this.pt()||this.F.subscribe(this.$,this),this.Ct(t)}unsubscribe(t){this.vt(t)&&!this.pt()&&this.F.I()}bind(){this.Pt=this.dom.Xt(this.$,this.Zt.bind(this),g)}H(){this.Pt.disconnect(),this.Pt=null,this.ct&&(this.ct.ut(this),this.ct=null)}Zt(){this.Ht(),this.Gt()&&this.wt(b)}},t.SelectValueObserver=s([runtime.targetObserver()],t.SelectValueObserver),t.StyleAttributeAccessor=class{constructor(t,s){this.X=1,this.oldValue=this._=s.style.cssText,this.Z=t,this.$=s,this.$t=null,this.version=0}J(){return this.$.style.cssText}_t(t,value){let s="";null!=value&&"function"==typeof value.indexOf&&-1!==value.indexOf("!important")&&(s="important",value=value.replace("!important","")),this.$.style.setProperty(t,value,s)}Y(t){const s=this.$t||{};let i,h=this.version;if(null!==t)if(t instanceof Object){let value;for(i in t)t.hasOwnProperty(i)&&(value=t[i],s[i=i.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)]=h,this._t(i,value))}else if(t.length){const e=/\s*([\w\-]+)\s*:\s*((?:(?:[\w\-]+\(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[\w\-]+\(\s*(?:[^"](?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^\)]*)\),?|[^\)]*)\),?|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^;]*),?\s*)+);?/g;let n;for(;null!==(n=e.exec(t));)(i=n[1])&&(s[i]=h,this._t(i,n[2]))}if(this.$t=s,this.version+=1,0!==h)for(i in h-=1,s)s.hasOwnProperty(i)&&s[i]===h&&this.$.style.removeProperty(i)}},t.StyleAttributeAccessor=s([runtime.targetObserver()],t.StyleAttributeAccessor);const p={button:"",Jt:"on",color:"#000000",Kt:"",Qt:"",email:"",Wt:"",hidden:"",Yt:"",xt:"",number:"",password:"",ts:"on",range:"50",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",ss:""},m=runtime.LifecycleFlags.tt|runtime.LifecycleFlags.st;t.ValueAttributeObserver=class{constructor(t,s,i,h){if(this.X=1,this.F=h,this.Z=t,this.$=s,this.K=i,"value"===i){const t=s.type;this.defaultValue=p[t||"text"],"file"===t&&(this.flush=this.hs)}else this.defaultValue="";this.oldValue=this._=s[i]}J(){return this.$[this.K]}Y(t,s){this.$[this.K]=t,s&runtime.LifecycleFlags.q||this.gt(this._,this.oldValue,s)}g(){const t=this.oldValue=this._,s=this._=this.J();t!==s&&(this.gt(s,t,m),this.oldValue=s)}subscribe(t){this.pt()||(this.oldValue=this.J(),this.F.subscribe(this.$,this)),this.Ct(t)}unsubscribe(t){this.vt(t)&&!this.pt()&&this.F.I()}hs(){const t=this._;this.oldValue!==t&&""===t&&(this.Y(t,this.es),this.oldValue=this._)}},t.ValueAttributeObserver=s([runtime.targetObserver("")],t.ValueAttributeObserver);const C="http://www.w3.org/1999/xlink",v="http://www.w3.org/XML/1998/namespace",E="http://www.w3.org/2000/xmlns/",A=((u=Object.create(null))["ns"]=["actuate",C],u["rs"]=["arcrole",C],u["os"]=["href",C],u["cs"]=["role",C],u["us"]=["show",C],u["ls"]=["title",C],u["as"]=["type",C],u["fs"]=["lang",v],u["ds"]=["space",v],u.ws=["xmlns",E],u["bs"]=["xlink",E],u),j=["change","input"],O=["change"],T=["change","input","blur","keyup","paste"],M=["scroll"],k=(function(t){return t.gs=1,t.style=1,t.ps=1,t.checked=1,t.value=1,t.ot=1,t["ns"]=1,t["rs"]=1,t["os"]=1,t["cs"]=1,t["us"]=1,t["ls"]=1,t["as"]=1,t["fs"]=1,t["ds"]=1,t.ws=1,t["bs"]=1,t})(Object.create(null));class TargetObserverLocator{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITargetObserverLocator,this).register(t)}ms(s,i,h,e){switch(e){case"checked":return new t.CheckedObserver(s,h,new EventSubscriber(this.dom,j),i);case"value":return"SELECT"===h.tagName?new t.SelectValueObserver(s,h,new EventSubscriber(this.dom,O),i,this.dom):new t.ValueAttributeObserver(s,h,e,new EventSubscriber(this.dom,j));case"files":return new t.ValueAttributeObserver(s,h,e,new EventSubscriber(this.dom,j));case"textContent":case"innerHTML":return new t.ValueAttributeObserver(s,h,e,new EventSubscriber(this.dom,T));case"scrollTop":case"scrollLeft":return new t.ValueAttributeObserver(s,h,e,new EventSubscriber(this.dom,M));case"class":return new t.ClassAttributeAccessor(s,h);case"style":case"css":return new t.StyleAttributeAccessor(s,h);case"model":return new runtime.SetterObserver(h,e);case"role":return new t.DataAttributeAccessor(s,h,e);default:if(void 0!==A[e]){const i=A[e];return new t.AttributeNSAccessor(s,h,e,i[0],i[1])}const n=e.slice(0,5);if("aria-"===n||"data-"===n)return new t.DataAttributeAccessor(s,h,e)}return null}Cs(t,s){return 1==k[s]}vs(t){return this.dom.v(t)}}TargetObserverLocator.inject=[runtime.IDOM];class TargetAccessorLocator{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITargetAccessorLocator,this).register(t)}Es(s,i,h){switch(h){case"textContent":return new t.ElementPropertyAccessor(s,i,h);case"class":return new t.ClassAttributeAccessor(s,i);case"style":case"css":return new t.StyleAttributeAccessor(s,i);case"src":case"href":case"role":return new t.DataAttributeAccessor(s,i,h);default:if(void 0!==A[h]){const e=A[h];return new t.AttributeNSAccessor(s,i,h,e[0],e[1])}const e=h.slice(0,5);return"aria-"===e||"data-"===e?new t.DataAttributeAccessor(s,i,h):new t.ElementPropertyAccessor(s,i,h)}}vs(t){return this.dom.v(t)}}TargetAccessorLocator.inject=[runtime.IDOM];const ISVGAnalyzer=kernel.DI.Rt("ISVGAnalyzer").Nt(t=>t.singleton(class{As(t,s){return 0}}));class AttrBindingBehavior{bind(s,i,h){h.targetObserver=new t.DataAttributeAccessor(h.M.get(runtime.ILifecycle),h.target,h.js)}H(t,s,i){}}runtime.BindingBehaviorResource.Os("attr",AttrBindingBehavior);class SelfBindingBehavior{bind(t,s,i){if(!i.N||!i.L)throw kernel.Reporter.error(8);i.m=i.N,i.N=o}H(t,s,i){i.N=i.m,i.m=null}}runtime.BindingBehaviorResource.Os("self",SelfBindingBehavior);class UpdateTriggerBindingBehavior{constructor(t){this.et=t}bind(t,s,i,...h){if(0===h.length)throw kernel.Reporter.error(9);if(i.mode!==runtime.BindingMode.Ts&&i.mode!==runtime.BindingMode.Ms)throw kernel.Reporter.error(10);const targetObserver=this.et.ms(i.target,i.js);if(!targetObserver.F)throw kernel.Reporter.error(10);i.targetObserver=targetObserver,targetObserver.ks=i.targetObserver.F,targetObserver.F=new EventSubscriber(i.M.get(runtime.IDOM),h)}H(t,s,i){i.targetObserver.F.I(),i.targetObserver.F=i.targetObserver.ks,i.targetObserver.ks=null}}UpdateTriggerBindingBehavior.inject=[runtime.IObserverLocator],runtime.BindingBehaviorResource.Os("updateTrigger",UpdateTriggerBindingBehavior),(HTMLTargetedInstructionType=t.HTMLTargetedInstructionType||(t.HTMLTargetedInstructionType={})).ys="ha",HTMLTargetedInstructionType.Ls="hb",HTMLTargetedInstructionType.Vs="hc",HTMLTargetedInstructionType.setAttribute="hd";class SetAttributeInstruction{constructor(value,to){this.type="hd",this.to=to,this.value=value}}class RenderPlan{constructor(dom,t,instructions,dependencies){this.dom=dom,this.dependencies=dependencies,this.instructions=instructions,this.Ns=t}get Rs(){return this.Ss||(this.Ss=runtime.buildTemplateDefinition(null,null,this.Ns,null,"string"==typeof this.Ns,null,this.instructions,this.dependencies))}Bs(t,s){return t.Bs(this.dom,this.Rs,null,s)}zs(t,s){return this.Ds(t,s).create()}Ds(t,s){return t.Ds(this.dom,this.Rs,s)}A(t,instructions,dependencies){this.dom.appendChild(t,this.Ns),instructions.push(...this.instructions),dependencies.push(...this.dependencies)}}const y=["subject","composing"];class Compose{constructor(dom,t,s,i,h){this.dom=dom,this.subject=null,this.Us=0,this.qs=h,this.Fs=null,this.Hs=t,this.Is=i,this.qs.Gs=(()=>{this.Us=0}),this.properties=s.instructions.filter(t=>!y.includes(t.to)).reduce((t,s)=>(s.to&&(t[s.to]=s),t),{})}Ps(t){this.Xs(this.subject,null,t),this.qs.Ps(t,this.$scope)}Zs(t){this.qs.Zs(t)}$s(t){this.qs.$s(t)}_s(t){this.Fs=null,this.qs._s(t)}Js(t){this.qs.Js(t)}Ks(t,s,i){this.Xs(t,s,i)}Xs(t,s,i){this.Fs!==t&&(this.Fs=t,t=t instanceof Promise?t.then(t=>this.Qs(t,i)):this.Qs(t,i),this.Us=1,this.qs.Ws(t,i))}Qs(t,s){const i=this.Ys(t);return i?(i.xs(this.ti.host),i.si(this.Hs.$scope),i):null}Ys(t){return t?"lockScope"in t?t:"createView"in t?t.zs(this.Is,this.Hs.$context):"create"in t?t.create():"template"in t?this.Is.Ds(this.dom,t,this.Hs.$context).create():createElement(this.dom,t,this.properties,this.ti.children).zs(this.Is,this.Hs.$context):null}}Compose.inject=[runtime.IDOM,runtime.IRenderable,runtime.ITargetedInstruction,runtime.IRenderingEngine,runtime.CompositionCoordinator],s([runtime.bindable],Compose.prototype,"subject",void 0),s([runtime.bindable],Compose.prototype,"composing",void 0),runtime.CustomElementResource.Os({name:"au-compose",containerless:1},Compose),(NodeType=t.NodeType||(t.NodeType={}))[NodeType.Element=1]="Element",NodeType[NodeType.Attr=2]="Attr",NodeType[NodeType.Text=3]="Text",NodeType[NodeType.CDATASection=4]="CDATASection",NodeType[NodeType.EntityReference=5]="EntityReference",NodeType[NodeType.Entity=6]="Entity",NodeType[NodeType.ProcessingInstruction=7]="ProcessingInstruction",NodeType[NodeType.Comment=8]="Comment",NodeType[NodeType.Document=9]="Document",NodeType[NodeType.DocumentType=10]="DocumentType",NodeType[NodeType.DocumentFragment=11]="DocumentFragment",NodeType[NodeType.Notation=12]="Notation";class L{constructor(dom,t){this.dom=dom,this.firstChild=t,this.lastChild=t,this.childNodes=[t],this.targets=[new R(t)]}ii(){return this.targets}insertBefore(t){t.parentNode.insertBefore(this.firstChild,t)}hi(t){t.appendChild(this.firstChild)}remove(){this.firstChild.remove()}}class V{constructor(dom,t){this.dom=dom,this.ei=t;const s=t.querySelectorAll(".au");let i=0,h=s.length;const targets=this.targets=Array(h);for(;h>i;){const t=s[i];targets[i]="AU-M"===t.nodeName?this.dom.ni(t):t,++i}const e=t.childNodes;i=0;const childNodes=this.childNodes=Array(h=e.length);for(;h>i;)childNodes[i]=e[i],++i;this.firstChild=t.firstChild,this.lastChild=t.lastChild,this.start=this.end=null}ii(){return this.targets}insertBefore(t){if(t.parentNode.insertBefore(this.ei,t),"au-end"===t.textContent){this.end=t;const s=this.start=t.ri;s.$nodes=null===s.$nodes?this:kernel.PLATFORM.oi}}hi(t){t.appendChild(this.ei),this.start=this.end=null}remove(){const t=this.ei;if(null!==this.start&&this.start.$nodes===this){const s=this.end;let i,h=this.start.nextSibling;for(;h!==s;)i=h.nextSibling,t.appendChild(h),h=i;this.start.$nodes=null,this.start=this.end=null}else{let s=this.firstChild;if(s.parentNode!==t){const i=this.lastChild;let h;for(;null!==s&&(h=s.nextSibling,t.appendChild(s),s!==i);)s=h}}}}class N{constructor(dom,t){this.dom=dom;const s=dom.createDocumentFragment(t),childNodes=s.childNodes;switch(childNodes.length){case 0:return void(this.ci=(()=>runtime.NodeSequence.empty));case 2:const t=childNodes[0];if("AU-M"===t.nodeName||"#comment"===t.nodeName){const t=childNodes[1];if(3===t.nodeType&&0===t.textContent.length)return this.ui=0,this.Ns=t,void(this.li=L)}default:this.ui=1,this.Ns=s,this.li=V}}ci(){return new this.li(this.dom,this.Ns.cloneNode(this.ui))}}class R{get parentNode(){return this.nextSibling.parentNode}constructor(t){this.nextSibling=t,this.textContent=""}remove(){}}(l=R.prototype).previousSibling=null,l.childNodes=kernel.PLATFORM.ai,l.nodeName="AU-M",l.nodeType=1;class S{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITemplateFactory,this).register(t)}create(t,s){return new runtime.CompiledTemplate(this.dom,s,new N(this.dom,s.template),t)}}S.inject=[runtime.IDOM];let B=class{constructor(t,s){this.fi=t,this.et=s}di(dom,t,s,i,h){const e=i.nextSibling;let bindable;dom.wi(i)&&dom.remove(i);const n=runtime.ensureExpression(this.fi,h.from,2048);bindable=n.bi?new runtime.MultiInterpolationBinding(this.et,n,e,"textContent",runtime.BindingMode.gi,t):new runtime.InterpolationBinding(n.pi,n,e,"textContent",runtime.BindingMode.gi,this.et,t,1),runtime.addBindable(s,bindable)}};B.inject=[runtime.IExpressionParser,runtime.IObserverLocator],B=s([runtime.instructionRenderer("ha")],B);let z=class{constructor(t,s){this.fi=t,this.V=s}di(dom,t,s,i,h){const e=runtime.ensureExpression(this.fi,h.from,80|h.strategy+6),bindable=new Listener(dom,h.to,h.strategy,e,i,h.preventDefault,this.V,t);runtime.addBindable(s,bindable)}};z.inject=[runtime.IExpressionParser,IEventManager],z=s([runtime.instructionRenderer("hb")],z);let D=class{di(dom,t,s,i,h){i.setAttribute(h.to,h.value)}};D=s([runtime.instructionRenderer("hd")],D);let U=class{constructor(t,s){this.fi=t,this.et=s}di(dom,t,s,i,h){const e=runtime.ensureExpression(this.fi,h.from,48|runtime.BindingMode.gi),bindable=new runtime.Binding(e,i.style,h.to,runtime.BindingMode.gi,this.et,t);runtime.addBindable(s,bindable)}};U.inject=[runtime.IExpressionParser,runtime.IObserverLocator],U=s([runtime.instructionRenderer("hc")],U);const q={mode:"open"},F={Ut:1};class H{constructor(dom,$customElement,host,t){let shadowOptions;this.dom=dom,this.host=host,this.shadowRoot=host.mi(shadowOptions=null!=t.shadowOptions&&"object"==typeof t.shadowOptions&&"mode"in t.shadowOptions?t.shadowOptions:q),this.host.$customElement=$customElement,this.shadowRoot.$customElement=$customElement}get children(){return this.shadowRoot.childNodes}Ci(t){this.dom.Xt(this.shadowRoot,t,F)}vi(){return this.shadowRoot}Ei(t){t.hi(this.shadowRoot)}Ai(t){t.remove()}}class I{constructor(dom,$customElement,host){this.childNodes=host.childNodes.length?kernel.PLATFORM.toArray(host.childNodes):kernel.PLATFORM.ai,this.host=dom.ni(host),this.host.$customElement=$customElement}get children(){return this.childNodes}Ci(t){new MutationObserver(t).observe(this.host,F)}vi(){return this.host.ji()}Ei(t){t.insertBefore(this.host)}Ai(t){t.remove()}}class G{constructor($customElement,host){this.host=host,this.host.$customElement=$customElement}get children(){return this.host.childNodes}Ci(t){}vi(){return this.host.ji()}Ei(t){t.hi(this.host)}Ai(t){t.remove()}}const IProjectorLocatorRegistration=class{static register(t){return kernel.Registration.singleton(runtime.IProjectorLocator,this).register(t)}Oi(dom,t,host,def){if(def.shadowOptions||def.hasSlots){if(def.containerless)throw kernel.Reporter.error(21);return new H(dom,t,host,def)}return def.containerless?new I(dom,t,host):new G(t,host)}},ITargetAccessorLocatorRegistration=TargetAccessorLocator,ITargetObserverLocatorRegistration=TargetObserverLocator,ITemplateFactoryRegistration=S,DefaultComponents=[IProjectorLocatorRegistration,ITargetAccessorLocatorRegistration,ITargetObserverLocatorRegistration,ITemplateFactoryRegistration],AttrBindingBehaviorRegistration=AttrBindingBehavior,SelfBindingBehaviorRegistration=SelfBindingBehavior,UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehavior,ComposeRegistration=Compose,DefaultResources=[AttrBindingBehaviorRegistration,SelfBindingBehaviorRegistration,UpdateTriggerBindingBehaviorRegistration,ComposeRegistration],ListenerBindingRendererRegistration=z,SetAttributeRendererRegistration=D,StylePropertyBindingRendererRegistration=U,TextBindingRendererRegistration=B,DefaultRenderers=[ListenerBindingRendererRegistration,SetAttributeRendererRegistration,StylePropertyBindingRendererRegistration,TextBindingRendererRegistration],BasicConfiguration={register:t=>runtime.BasicConfiguration.register(t).register(...DefaultComponents,...DefaultResources,...DefaultRenderers),Ti(){return this.register(kernel.DI.Ti())}};t.Listener=Listener,t.ListenerTracker=ListenerTracker,t.DelegateOrCaptureSubscription=DelegateOrCaptureSubscription,t.TriggerSubscription=TriggerSubscription,t.IEventManager=IEventManager,t.EventSubscriber=EventSubscriber,t.TargetAccessorLocator=TargetAccessorLocator,t.TargetObserverLocator=TargetObserverLocator,t.ISVGAnalyzer=ISVGAnalyzer,t.AttrBindingBehavior=AttrBindingBehavior,t.SelfBindingBehavior=SelfBindingBehavior,t.UpdateTriggerBindingBehavior=UpdateTriggerBindingBehavior,t.Compose=Compose,t.IProjectorLocatorRegistration=IProjectorLocatorRegistration,t.ITargetAccessorLocatorRegistration=ITargetAccessorLocatorRegistration,t.ITargetObserverLocatorRegistration=ITargetObserverLocatorRegistration,t.ITemplateFactoryRegistration=ITemplateFactoryRegistration,t.DefaultComponents=DefaultComponents,t.AttrBindingBehaviorRegistration=AttrBindingBehaviorRegistration,t.SelfBindingBehaviorRegistration=SelfBindingBehaviorRegistration,t.UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehaviorRegistration,t.ComposeRegistration=ComposeRegistration,t.DefaultResources=DefaultResources,t.ListenerBindingRendererRegistration=ListenerBindingRendererRegistration,t.SetAttributeRendererRegistration=SetAttributeRendererRegistration,t.StylePropertyBindingRendererRegistration=StylePropertyBindingRendererRegistration,t.TextBindingRendererRegistration=TextBindingRendererRegistration,t.DefaultRenderers=DefaultRenderers,t.BasicConfiguration=BasicConfiguration,t.createElement=createElement,t.RenderPlan=RenderPlan,t.isHTMLTargetedInstruction=isHTMLTargetedInstruction,t.HTMLDOM=class{constructor(t,s,i,h,e){this.Mi=t,this.ki=s,this.Node=i,this.Element=h,this.HTMLElement=e}addEventListener(t,s,i,h){(i||this.ki).addEventListener(t,s,h)}appendChild(t,s){t.appendChild(s)}cloneNode(t,s){return t.cloneNode(0!=s)}ni(t){if(this.yi(t))return t;if(null===t.parentNode)throw kernel.Reporter.error(52);const s=this.ki.createComment("au-end"),i=this.ki.createComment("au-start");return t.parentNode.replaceChild(s,t),s.parentNode.insertBefore(i,s),s.ri=i,i.$nodes=null,s}createDocumentFragment(t){if(null==t)return this.ki.createDocumentFragment();if(this.v(t)){if(void 0!==t.content)return t.content;const s=this.ki.createDocumentFragment();return s.appendChild(t),s}return this.Li(t).content}createElement(name){return this.ki.createElement(name)}Xt(t,s,i){if("undefined"==typeof MutationObserver)return{disconnect(){},observe(){},takeRecords:()=>kernel.PLATFORM.ai};const h=new MutationObserver(s);return h.observe(t,i),h}Li(t){if(null==t)return this.ki.createElement("template");const template=this.ki.createElement("template");return template.innerHTML=""+t,template}createTextNode(t){return this.ki.createTextNode(t)}insertBefore(t,s){s.parentNode.insertBefore(t,s)}wi(t){return"AU-M"===t.nodeName}v(t){return null!=t&&t.nodeType>0}yi(t){return"au-end"===t.textContent}C(t){t.className="au"}Vi(t,s){t.Ni(runtime.INode,s),t.Ni(this.Node,s),t.Ni(this.Element,s),t.Ni(this.HTMLElement,s)}remove(t){t.remove?t.remove():t.parentNode.removeChild(t)}removeEventListener(t,s,i,h){(i||this.ki).removeEventListener(t,s,h)}setAttribute(t,name,value){t.setAttribute(name,value)}},t.CaptureBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=runtime.DelegationStrategy.Dt,this.to=to}},t.DelegateBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=runtime.DelegationStrategy.zt,this.to=to}},t.SetAttributeInstruction=SetAttributeInstruction,t.StylePropertyBindingInstruction=class{constructor(from,to){this.type="hc",this.from=from,this.to=to}},t.TextBindingInstruction=class{constructor(from){this.type="ha",this.from=from}},t.TriggerBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=1,this.strategy=runtime.DelegationStrategy.Ri,this.to=to}},Object.defineProperty(t,"Si",{value:1})}); | ||
(function(t,s){"object"==typeof exports&&"undefined"!=typeof module?s(exports,require("@aurelia/kernel"),require("@aurelia/runtime")):"function"==typeof define&&define.amd?define(["exports","@aurelia/kernel","@aurelia/runtime"],s):s((t=t||self).runtimeHtml={},t.kernel,t.runtime)})(this,function(t,kernel,runtime){"use strict";function s(t,s,i,e){var h,n,r=arguments.length,o=3>r?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,i,e);else for(n=t.length-1;n>=0;n--)(h=t[n])&&(o=(3>r?h(o):r>3?h(s,i,o):h(s,i))||o);return r>3&&o&&Object.defineProperty(s,i,o),o}function i(t){return t.t&&t.t()[0]||t.s&&t.s()[0]||t.path&&t.path[0]||t.target}function e(){this.i(),this.h=1}function h(t){t.h=0;let s=i(t);const h=[];for(;s;){if(s.o){const i=s.o[t.type];i&&(t.stopPropagation!==e&&(t.i=t.stopPropagation,t.stopPropagation=e),h.push(i))}s=s.parentNode}for(let s=h.length-1;s>=0&&!t.h;s--){const i=h[s];"handleEvent"in i?i.l(t):i(t)}}function n(t){t.h=0;let s=i(t);for(;s&&!t.h;){if(s.u){const i=s.u[t.type];i&&(t.stopPropagation!==e&&(t.i=t.stopPropagation,t.stopPropagation=e),"handleEvent"in i?i.l(t):i(t))}s=s.parentNode}}function r(t,s){return t===s}function o(t){const s=i(t);if(this.target===s)return this.g(t)}function isHTMLTargetedInstruction(value){const type=value.type;return"string"==typeof type&&2===type.length}function createElement(dom,t,s,i){return"string"==typeof t?(function(dom,s,i,e){const instructions=[],h=[],dependencies=[],n=dom.createElement(t);let r=0;return i&&Object.keys(i).forEach(to=>{const value=i[to];isHTMLTargetedInstruction(value)?(r=1,instructions.push(value)):dom.setAttribute(n,to,value)}),r&&(dom.p(n),h.push(instructions)),e&&c(dom,n,e,h,dependencies),new RenderPlan(dom,n,h,dependencies)})(dom,0,s,i):(function(dom,t,s,i){const e=t.description.name,instructions=[],h=[instructions],dependencies=[],n=[],bindables=t.description.bindables,r=dom.createElement(e);return dom.p(r),dependencies.includes(t)||dependencies.push(t),instructions.push(new runtime.HydrateElementInstruction(e,n)),s&&Object.keys(s).forEach(to=>{const value=s[to];if(isHTMLTargetedInstruction(value))n.push(value);else{n.push(bindables[to]?{type:"re",to,value}:new SetAttributeInstruction(value,to))}}),i&&c(dom,r,i,h,dependencies),new RenderPlan(dom,r,h,dependencies)})(dom,t,s,i)}function c(dom,t,s,i,dependencies){for(let e=0,h=s.length;h>e;++e){const h=s[e];switch(typeof h){case"string":dom.appendChild(t,dom.createTextNode(h));break;case"object":dom.m(h)?dom.appendChild(t,h):"mergeInto"in h&&h.v(t,i,dependencies)}}}var l,HTMLTargetedInstructionType,NodeType,u;class Listener{constructor(dom,t,s,i,e,preventDefault,h,n){this.dom=dom,this.C=null,this.V=null,this.$state=0,this.A=s,this.j=n,this.preventDefault=preventDefault,this.k=i,this.target=e,this.T=t,this.O=h}M(t){const s=this.$scope.L;s.S=t;const i=this.k.evaluate(runtime.LifecycleFlags.R,this.$scope,this.j);return Reflect.deleteProperty(s,"$event"),1!=i&&this.preventDefault&&t.preventDefault(),i}l(t){this.M(t)}N(t,s){if(2&this.$state){if(this.$scope===s)return;this.D(t|runtime.LifecycleFlags.I)}this.$state|=1,this.$scope=s;const i=this.k;runtime.hasBind(i)&&i.bind(t,s,this),this.B=this.O.addEventListener(this.dom,this.target,this.T,this,this.A),this.$state|=2,this.$state&=-2}D(t){if(!(2&this.$state))return;this.$state|=64;const s=this.k;runtime.hasUnbind(s)&&s.F(t,this.$scope,this),this.$scope=null,this.B.P(),this.B=null,this.$state&=-67}U(t,s,i){}$(t,s,i){}}t.AttributeNSAccessor=class{constructor(t,s,i,e,h){this.q=1,this.attributeName=e,this.H=t,this._=s,this.oldValue=this.G=this.X(),this.Z=i,this.J=h}X(){return this._.getAttributeNS(this.J,this.attributeName)}K(t){this._.setAttributeNS(this.J,this.attributeName,t)}},t.AttributeNSAccessor=s([runtime.targetObserver("")],t.AttributeNSAccessor);const a=runtime.LifecycleFlags.W|runtime.LifecycleFlags.Y,f=runtime.LifecycleFlags.tt|runtime.LifecycleFlags.st,d=(t,s)=>t===s;t.CheckedObserver=class{constructor(t,s,i,e,h){this.it=t&runtime.LifecycleFlags.et,this.q=1,this.B=e,this.H=s,this._=i,this.ht=h}X(){return this.G}K(t,s){this.nt||(this.nt=this._.rt&&(this._.rt.ot||this._.rt.value),this.nt&&this.nt.subscribe(this)),this.ct&&(this.ct.lt(this),this.ct=null),"checkbox"===this._.type&&Array.isArray(t)&&(this.ct=this.ht.ut(this.it|s,t),this.ct.at(this)),this.ft()}dt(){this.ft(),this.wt(f)}$(t,s,i){this.ft(),this.wt(i)}ft(){const value=this.G,t=this._,s=t.hasOwnProperty("model")?t.ot:t.value,i=t.bt||d;t.checked="radio"===t.type?!!i(value,s):1==value?1:Array.isArray(value)?-1!==value.findIndex(t=>!!i(t,s)):0}wt(t){t&runtime.LifecycleFlags.I||this.G!==this.oldValue&&this.gt(this.G,this.oldValue,this.it|t)}l(){let value=this.G;const t=this._,s=t.hasOwnProperty("model")?t.ot:t.value;let i;const e=t.bt||d;if("checkbox"===t.type){if(Array.isArray(value))return i=value.findIndex(t=>!!e(t,s)),void(t.checked&&-1===i?value.push(s):t.checked||-1===i||value.splice(i,1));value=t.checked}else{if(!t.checked)return;value=s}this.oldValue=this.G,this.G=value,this.wt(a)}subscribe(t){this.pt()||this.B.subscribe(this._,this),this.vt(t)}unsubscribe(t){this.yt(t)&&!this.pt()&&this.B.P()}F(){this.ct&&(this.ct.lt(this),this.ct=null),this.nt&&this.nt.unsubscribe(this)}},t.CheckedObserver=s([runtime.targetObserver()],t.CheckedObserver),t.ClassAttributeAccessor=class{constructor(t,s){this.q=1,this.Ct=1,this.H=t,this.Et=null,this._=s,this.version=0}X(){return this.G}K(t){const s=this.Et||{};let i,name,e=this.version;if(t.length){const h=this._;for(let n=0,r=(i=t.split(/\s+/)).length;r>n;n++)(name=i[n]).length&&(s[name]=e,h.classList.add(name))}if(this.Et=s,this.version+=1,0!==e)for(name in e-=1,s)s.hasOwnProperty(name)&&s[name]===e&&this._.classList.remove(name)}},t.ClassAttributeAccessor=s([runtime.targetObserver("")],t.ClassAttributeAccessor),t.DataAttributeAccessor=class{constructor(t,s,i){this.q=1,this.H=t,this._=s,this.oldValue=this.G=this.X(),this.Z=i}X(){return this._.getAttribute(this.Z)}K(t){null===t?this._.removeAttribute(this.Z):this._.setAttribute(this.Z,t)}},t.DataAttributeAccessor=s([runtime.targetObserver()],t.DataAttributeAccessor),t.ElementPropertyAccessor=class{constructor(t,s,i){this.q=1,this.H=t,this._=s,this.Z=i}X(){return this._[this.Z]}K(value){this._[this.Z]=value}},t.ElementPropertyAccessor=s([runtime.targetObserver("")],t.ElementPropertyAccessor);class ListenerTracker{constructor(dom,t,s,i){this.dom=dom,this.Vt=i,this.count=0,this.At=t,this.listener=s}jt(){this.count++,1===this.count&&this.dom.addEventListener(this.At,this.listener,null,this.Vt)}kt(){this.count--,0===this.count&&this.dom.removeEventListener(this.At,this.listener,null,this.Vt)}P(){this.count>0&&(this.count=0,this.dom.removeEventListener(this.At,this.listener,null,this.Vt))}}class DelegateOrCaptureSubscription{constructor(t,s,i,e){this.Tt=t,this.xt=s,this.T=i,s[i]=e}P(){this.Tt.kt(),this.xt[this.T]=null}}class TriggerSubscription{constructor(dom,t,s,i){this.dom=dom,this.target=t,this.T=s,this.Ot=i,dom.addEventListener(s,i,t)}P(){this.dom.removeEventListener(this.T,this.Ot,this.target)}}class EventSubscriber{constructor(dom,t){this.dom=dom,this.Mt=t,this.target=null,this.B=null}subscribe(t,s){this.target=t,this.B=s;const i=this.dom.addEventListener,e=this.Mt;for(let h=0,n=e.length;n>h;++h)i(e[h],s,t)}P(){const t=this.target,s=this.B,i=this.Mt,e=this.dom.removeEventListener;for(let h=0,n=i.length;n>h;++h)e(i[h],s,t);this.target=this.B=null}}const IEventManager=kernel.DI.St("IEventManager").Lt(t=>t.singleton(w));class w{constructor(){this.Rt={},this.Nt={},this.Rt={},this.Nt={}}addEventListener(dom,t,s,i,strategy){let e,r,o;if(strategy===runtime.DelegationStrategy.Dt){(o=(e=this.Rt)[s]||(e[s]=new ListenerTracker(dom,s,n,0))).jt();const h=t.u||(t.u={});return new DelegateOrCaptureSubscription(o,h,s,i)}if(strategy===runtime.DelegationStrategy.It){(o=(r=this.Nt)[s]||(r[s]=new ListenerTracker(dom,s,h,1))).jt();const e=t.o||(t.o={});return new DelegateOrCaptureSubscription(o,e,s,i)}return new TriggerSubscription(dom,t,s,i)}P(){let t;const{Rt:s,Nt:i}=this;for(t in s)s[t].P();for(t in i)i[t].P()}}const b=runtime.LifecycleFlags.W|runtime.LifecycleFlags.Y,g={Bt:1,Ft:1,Pt:1};t.SelectValueObserver=class{constructor(t,s,i,e,h,dom){this.it=t&runtime.LifecycleFlags.et,this.q=1,this.H=s,this._=i,this.B=e,this.ht=h,this.dom=dom}X(){return this.G}K(t,s){const i=Array.isArray(t);if(!i&&null!=t&&this._.multiple)throw Error("Only null or Array instances can be bound to a multi-select.");this.ct&&(this.ct.lt(this),this.ct=null),i&&(this.ct=this.ht.ut(this.it|s,t),this.ct.at(this)),this.zt(),this.wt(s)}dt(t){this.zt(t)}$(t,s,i){this.Ut(t,this.it|i)}wt(t){if(t&runtime.LifecycleFlags.I)return;const s=this.oldValue,i=this.G;i!==s&&this.gt(i,s,this.it|t)}l(){this.$t()&&this.wt(b)}zt(t){const s=this.G,i=Array.isArray(s),e=this._,h=e.bt||r,n=e.options;let o=n.length;for(;o--;){const t=n[o],e=t.hasOwnProperty("model")?t.ot:t.value;t.selected=i?-1!==s.findIndex(t=>!!h(e,t)):!!h(e,s)}}$t(){const t=this._,s=t.options,i=s.length,e=this.G;let h=0;if(t.multiple){if(!Array.isArray(e))return 1;let n;const o=t.bt||r,c=[];for(;i>h;)(n=s[h]).selected&&c.push(n.hasOwnProperty("model")?n.ot:n.value),++h;for(h=0;e.length>h;){const t=e[h];-1===c.findIndex(s=>!!o(t,s))?e.splice(h,1):++h}for(h=0;c.length>h;){const t=c[h];-1===e.findIndex(s=>!!o(t,s))&&e.push(t),++h}return 0}let value=null;for(;i>h;){const t=s[h];if(t.selected){value=t.hasOwnProperty("model")?t.ot:t.value;break}++h}return this.oldValue=this.G,this.G=value,1}subscribe(t){this.pt()||this.B.subscribe(this._,this),this.vt(t)}unsubscribe(t){this.yt(t)&&!this.pt()&&this.B.P()}bind(){this.qt=this.dom.Ht(this._,this._t.bind(this),g)}F(){this.qt.disconnect(),this.qt=null,this.ct&&(this.ct.lt(this),this.ct=null)}_t(){this.zt(),this.$t()&&this.wt(b)}},t.SelectValueObserver=s([runtime.targetObserver()],t.SelectValueObserver),t.StyleAttributeAccessor=class{constructor(t,s){this.q=1,this.oldValue=this.G=s.style.cssText,this.H=t,this._=s,this.Gt=null,this.version=0}X(){return this._.style.cssText}Xt(t,value){let s="";null!=value&&"function"==typeof value.indexOf&&-1!==value.indexOf("!important")&&(s="important",value=value.replace("!important","")),this._.style.setProperty(t,value,s)}K(t){const s=this.Gt||{};let i,e=this.version;if(null!==t)if(t instanceof Object){let value;for(i in t)t.hasOwnProperty(i)&&(value=t[i],s[i=i.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)]=e,this.Xt(i,value))}else if(t.length){const h=/\s*([\w\-]+)\s*:\s*((?:(?:[\w\-]+\(\s*(?:"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[\w\-]+\(\s*(?:[^"](?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^\)]*)\),?|[^\)]*)\),?|"(?:\\"|[^"])*"|'(?:\\'|[^'])*'|[^;]*),?\s*)+);?/g;let n;for(;null!==(n=h.exec(t));)(i=n[1])&&(s[i]=e,this.Xt(i,n[2]))}if(this.Gt=s,this.version+=1,0!==e)for(i in e-=1,s)s.hasOwnProperty(i)&&s[i]===e&&this._.style.removeProperty(i)}},t.StyleAttributeAccessor=s([runtime.targetObserver()],t.StyleAttributeAccessor);const p={button:"",Zt:"on",color:"#000000",Jt:"",Kt:"",email:"",Qt:"",hidden:"",Wt:"",Yt:"",number:"",password:"",ts:"on",range:"50",reset:"",search:"",submit:"",tel:"",text:"",time:"",url:"",ss:""},m=runtime.LifecycleFlags.W|runtime.LifecycleFlags.Y;t.ValueAttributeObserver=class{constructor(t,s,i,e){if(this.q=1,this.B=e,this.H=t,this._=s,this.Z=i,"value"===i){const t=s.type;this.defaultValue=p[t||"text"],"file"===t&&(this.flush=this.es)}else this.defaultValue="";this.oldValue=this.G=s[i]}X(){return this._[this.Z]}K(t,s){this._[this.Z]=t,s&runtime.LifecycleFlags.I||this.gt(this.G,this.oldValue,s)}l(){const t=this.oldValue=this.G,s=this.G=this.X();t!==s&&(this.gt(s,t,m),this.oldValue=s)}subscribe(t){this.pt()||(this.oldValue=this.X(),this.B.subscribe(this._,this)),this.vt(t)}unsubscribe(t){this.yt(t)&&!this.pt()&&this.B.P()}es(){const t=this.G;this.oldValue!==t&&""===t&&(this.K(t,this.hs),this.oldValue=this.G)}},t.ValueAttributeObserver=s([runtime.targetObserver("")],t.ValueAttributeObserver);const v="http://www.w3.org/1999/xlink",y="http://www.w3.org/XML/1998/namespace",C="http://www.w3.org/2000/xmlns/",E=((l=Object.create(null))["ns"]=["actuate",v],l["rs"]=["arcrole",v],l["os"]=["href",v],l["cs"]=["role",v],l["ls"]=["show",v],l["us"]=["title",v],l["as"]=["type",v],l["fs"]=["lang",y],l["ds"]=["space",y],l.ws=["xmlns",C],l["bs"]=["xlink",C],l),V=["change","input"],A=["change"],j=["change","input","blur","keyup","paste"],k=["scroll"],T=(function(t){return t.gs=1,t.style=1,t.ps=1,t.checked=1,t.value=1,t.ot=1,t["ns"]=1,t["rs"]=1,t["os"]=1,t["cs"]=1,t["ls"]=1,t["us"]=1,t["as"]=1,t["fs"]=1,t["ds"]=1,t.ws=1,t["bs"]=1,t})(Object.create(null));class TargetObserverLocator{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITargetObserverLocator,this).register(t)}ms(s,i,e,h,n){switch(n){case"checked":return new t.CheckedObserver(s,i,h,new EventSubscriber(this.dom,V),e);case"value":return"SELECT"===h.tagName?new t.SelectValueObserver(s,i,h,new EventSubscriber(this.dom,A),e,this.dom):new t.ValueAttributeObserver(i,h,n,new EventSubscriber(this.dom,V));case"files":return new t.ValueAttributeObserver(i,h,n,new EventSubscriber(this.dom,V));case"textContent":case"innerHTML":return new t.ValueAttributeObserver(i,h,n,new EventSubscriber(this.dom,j));case"scrollTop":case"scrollLeft":return new t.ValueAttributeObserver(i,h,n,new EventSubscriber(this.dom,k));case"class":return new t.ClassAttributeAccessor(i,h);case"style":case"css":return new t.StyleAttributeAccessor(i,h);case"model":return new runtime.SetterObserver(s,h,n);case"role":return new t.DataAttributeAccessor(i,h,n);default:if(void 0!==E[n]){const s=E[n];return new t.AttributeNSAccessor(i,h,n,s[0],s[1])}const r=n.slice(0,5);if("aria-"===r||"data-"===r)return new t.DataAttributeAccessor(i,h,n)}return null}vs(t,s,i){return 1==T[i]}ys(t,s){return this.dom.m(s)}}TargetObserverLocator.inject=[runtime.IDOM];class TargetAccessorLocator{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITargetAccessorLocator,this).register(t)}Cs(s,i,e,h){switch(h){case"textContent":return new t.ElementPropertyAccessor(i,e,h);case"class":return new t.ClassAttributeAccessor(i,e);case"style":case"css":return new t.StyleAttributeAccessor(i,e);case"src":case"href":case"role":return new t.DataAttributeAccessor(i,e,h);default:if(void 0!==E[h]){const s=E[h];return new t.AttributeNSAccessor(i,e,h,s[0],s[1])}const s=h.slice(0,5);return"aria-"===s||"data-"===s?new t.DataAttributeAccessor(i,e,h):new t.ElementPropertyAccessor(i,e,h)}}ys(t,s){return this.dom.m(s)}}TargetAccessorLocator.inject=[runtime.IDOM];const ISVGAnalyzer=kernel.DI.St("ISVGAnalyzer").Lt(t=>t.singleton(class{Es(t,s){return 0}}));class AttrBindingBehavior{bind(s,i,e){e.targetObserver=new t.DataAttributeAccessor(e.j.get(runtime.ILifecycle),e.target,e.Vs)}F(t,s,i){}}runtime.BindingBehaviorResource.As("attr",AttrBindingBehavior);class SelfBindingBehavior{bind(t,s,i){if(!i.M||!i.T)throw kernel.Reporter.error(8);i.g=i.M,i.M=o}F(t,s,i){i.M=i.g,i.g=null}}runtime.BindingBehaviorResource.As("self",SelfBindingBehavior);class UpdateTriggerBindingBehavior{constructor(t){this.ht=t}bind(t,s,i,...e){if(0===e.length)throw kernel.Reporter.error(9);if(i.mode!==runtime.BindingMode.js&&i.mode!==runtime.BindingMode.ks)throw kernel.Reporter.error(10);this.it=t&runtime.LifecycleFlags.et;const targetObserver=this.ht.ms(this.it|t,i.target,i.Vs);if(!targetObserver.B)throw kernel.Reporter.error(10);i.targetObserver=targetObserver,targetObserver.Ts=i.targetObserver.B,targetObserver.B=new EventSubscriber(i.j.get(runtime.IDOM),e)}F(t,s,i){i.targetObserver.B.P(),i.targetObserver.B=i.targetObserver.Ts,i.targetObserver.Ts=null}}UpdateTriggerBindingBehavior.inject=[runtime.IObserverLocator],runtime.BindingBehaviorResource.As("updateTrigger",UpdateTriggerBindingBehavior),(HTMLTargetedInstructionType=t.HTMLTargetedInstructionType||(t.HTMLTargetedInstructionType={})).xs="ha",HTMLTargetedInstructionType.Os="hb",HTMLTargetedInstructionType.Ms="hc",HTMLTargetedInstructionType.setAttribute="hd";class SetAttributeInstruction{constructor(value,to){this.type="hd",this.to=to,this.value=value}}class RenderPlan{constructor(dom,t,instructions,dependencies){this.dom=dom,this.dependencies=dependencies,this.instructions=instructions,this.Ls=t}get Ss(){return this.Rs||(this.Rs=runtime.buildTemplateDefinition(null,null,this.Ls,null,"string"==typeof this.Ls,null,this.instructions,this.dependencies))}Ns(t,s){return t.Ns(this.dom,this.Ss,null,s)}Ds(t,s,i){return this.Is(s,i).create()}Is(t,s){return t.Is(this.dom,this.Ss,s)}v(t,instructions,dependencies){this.dom.appendChild(t,this.Ls),instructions.push(...this.instructions),dependencies.push(...this.dependencies)}}const x=["subject","composing"];class Compose{constructor(dom,t,s,i,e){this.dom=dom,this.subject=null,this.Bs=0,this.Fs=e,this.Ps=null,this.zs=t,this.Us=i,this.Fs.$s=(()=>{this.Bs=0}),this.properties=s.instructions.filter(t=>!x.includes(t.to)).reduce((t,s)=>(s.to&&(t[s.to]=s),t),{})}qs(t){this.Hs(this.subject,null,t),this.Fs.qs(t,this.$scope)}_s(t){this.Fs._s(t)}Gs(t){this.Fs.Gs(t)}Xs(t){this.Ps=null,this.Fs.Xs(t)}Zs(t){this.Fs.Zs(t)}Js(t,s,i){this.Hs(t,s,i)}Hs(t,s,i){this.Ps!==t&&(this.Ps=t,t=t instanceof Promise?t.then(t=>this.Ks(t,i)):this.Ks(t,i),this.Bs=1,this.Fs.Qs(t,i))}Ks(t,s){const i=this.Ws(t,s);return i?(i.Ys(this.ti.host),i.si(this.zs.$scope),i):null}Ws(t,s){return t?"lockScope"in t?t:"createView"in t?t.Ds(s,this.Us,this.zs.$context):"create"in t?t.create():"template"in t?this.Us.Is(this.dom,t,this.zs.$context).create():createElement(this.dom,t,this.properties,this.ti.children).Ds(s,this.Us,this.zs.$context):null}}Compose.inject=[runtime.IDOM,runtime.IRenderable,runtime.ITargetedInstruction,runtime.IRenderingEngine,runtime.CompositionCoordinator],s([runtime.bindable],Compose.prototype,"subject",void 0),s([runtime.bindable],Compose.prototype,"composing",void 0),runtime.CustomElementResource.As({name:"au-compose",containerless:1},Compose),(NodeType=t.NodeType||(t.NodeType={}))[NodeType.Element=1]="Element",NodeType[NodeType.Attr=2]="Attr",NodeType[NodeType.Text=3]="Text",NodeType[NodeType.CDATASection=4]="CDATASection",NodeType[NodeType.EntityReference=5]="EntityReference",NodeType[NodeType.Entity=6]="Entity",NodeType[NodeType.ProcessingInstruction=7]="ProcessingInstruction",NodeType[NodeType.Comment=8]="Comment",NodeType[NodeType.Document=9]="Document",NodeType[NodeType.DocumentType=10]="DocumentType",NodeType[NodeType.DocumentFragment=11]="DocumentFragment",NodeType[NodeType.Notation=12]="Notation";const O=runtime.DOM;class M{constructor(dom,t){this.dom=dom,this.firstChild=t,this.lastChild=t,this.childNodes=[t],this.targets=[new R(t)]}ii(){return this.targets}insertBefore(t){t.parentNode.insertBefore(this.firstChild,t)}ei(t){t.appendChild(this.firstChild)}remove(){this.firstChild.remove()}}class L{constructor(dom,t){this.dom=dom,this.hi=t;const s=t.querySelectorAll(".au");let i=0,e=s.length;const targets=this.targets=Array(e);for(;e>i;){const t=s[i];targets[i]="AU-M"===t.nodeName?this.dom.ni(t):t,++i}const h=t.childNodes;i=0;const childNodes=this.childNodes=Array(e=h.length);for(;e>i;)childNodes[i]=h[i],++i;this.firstChild=t.firstChild,this.lastChild=t.lastChild,this.start=this.end=null}ii(){return this.targets}insertBefore(t){if(t.parentNode.insertBefore(this.hi,t),"au-end"===t.textContent){this.end=t;const s=this.start=t.ri;s.$nodes=null===s.$nodes?this:kernel.PLATFORM.oi}}ei(t){t.appendChild(this.hi),this.start=this.end=null}remove(){const t=this.hi;if(null!==this.start&&this.start.$nodes===this){const s=this.end;let i,e=this.start.nextSibling;for(;e!==s;)i=e.nextSibling,t.appendChild(e),e=i;this.start.$nodes=null,this.start=this.end=null}else{let s=this.firstChild;if(s.parentNode!==t){const i=this.lastChild;let e;for(;null!==s&&(e=s.nextSibling,t.appendChild(s),s!==i);)s=e}}}}class S{constructor(dom,t){this.dom=dom;const s=dom.createDocumentFragment(t),childNodes=s.childNodes;switch(childNodes.length){case 0:return void(this.ci=(()=>runtime.NodeSequence.empty));case 2:const t=childNodes[0];if("AU-M"===t.nodeName||"#comment"===t.nodeName){const t=childNodes[1];if(3===t.nodeType&&0===t.textContent.length)return this.li=0,this.Ls=t,void(this.ui=M)}default:this.li=1,this.Ls=s,this.ui=L}}ci(){return new this.ui(this.dom,this.Ls.cloneNode(this.li))}}class R{get parentNode(){return this.nextSibling.parentNode}constructor(t){this.nextSibling=t,this.textContent=""}remove(){}}(u=R.prototype).previousSibling=null,u.childNodes=kernel.PLATFORM.ai,u.nodeName="AU-M",u.nodeType=1;class N{constructor(dom){this.dom=dom}static register(t){return kernel.Registration.singleton(runtime.ITemplateFactory,this).register(t)}create(t,s){return new runtime.CompiledTemplate(this.dom,s,new S(this.dom,s.template),t)}}N.inject=[runtime.IDOM];let D=class{constructor(t,s){this.fi=t,this.ht=s}di(t,dom,s,i,e,h){const n=e.nextSibling;let r;dom.wi(e)&&dom.remove(e);const o=runtime.ensureExpression(this.fi,h.from,2048);r=o.bi?new runtime.MultiInterpolationBinding(this.ht,o,n,"textContent",runtime.BindingMode.gi,s):new runtime.InterpolationBinding(o.pi,o,n,"textContent",runtime.BindingMode.gi,this.ht,s,1),runtime.addBinding(i,r)}};D.inject=[runtime.IExpressionParser,runtime.IObserverLocator],D=s([runtime.instructionRenderer("ha")],D);let I=class{constructor(t,s){this.fi=t,this.O=s}di(t,dom,s,i,e,h){const n=runtime.ensureExpression(this.fi,h.from,80|h.strategy+6),r=new Listener(dom,h.to,h.strategy,n,e,h.preventDefault,this.O,s);runtime.addBinding(i,r)}};I.inject=[runtime.IExpressionParser,IEventManager],I=s([runtime.instructionRenderer("hb")],I);let B=class{di(t,dom,s,i,e,h){e.setAttribute(h.to,h.value)}};B=s([runtime.instructionRenderer("hd")],B);let F=class{constructor(t,s){this.fi=t,this.ht=s}di(t,dom,s,i,e,h){const n=runtime.ensureExpression(this.fi,h.from,48|runtime.BindingMode.gi),r=new runtime.Binding(n,e.style,h.to,runtime.BindingMode.gi,this.ht,s);runtime.addBinding(i,r)}};F.inject=[runtime.IExpressionParser,runtime.IObserverLocator],F=s([runtime.instructionRenderer("hc")],F);const P={mode:"open"},z={Bt:1};class U{constructor(dom,$customElement,host,t){let shadowOptions;this.dom=dom,this.host=host,this.shadowRoot=host.mi(shadowOptions=null!=t.shadowOptions&&"object"==typeof t.shadowOptions&&"mode"in t.shadowOptions?t.shadowOptions:P),this.host.$customElement=$customElement,this.shadowRoot.$customElement=$customElement}get children(){return this.shadowRoot.childNodes}vi(t){this.dom.Ht(this.shadowRoot,t,z)}yi(){return this.shadowRoot}Ci(t){t.ei(this.shadowRoot)}Ei(t){t.remove()}}class ${constructor(dom,$customElement,host){this.childNodes=host.childNodes.length?kernel.PLATFORM.toArray(host.childNodes):kernel.PLATFORM.ai,this.host=dom.ni(host),this.host.$customElement=$customElement}get children(){return this.childNodes}vi(t){new MutationObserver(t).observe(this.host,z)}yi(){return this.host.Vi()}Ci(t){t.insertBefore(this.host)}Ei(t){t.remove()}}class q{constructor($customElement,host){this.host=host,this.host.$customElement=$customElement}get children(){return this.host.childNodes}vi(t){}yi(){return this.host.Vi()}Ci(t){t.ei(this.host)}Ei(t){t.remove()}}const IProjectorLocatorRegistration=class{static register(t){return kernel.Registration.singleton(runtime.IProjectorLocator,this).register(t)}Ai(dom,t,host,def){if(def.shadowOptions||def.hasSlots){if(def.containerless)throw kernel.Reporter.error(21);return new U(dom,t,host,def)}return def.containerless?new $(dom,t,host):new q(t,host)}},ITargetAccessorLocatorRegistration=TargetAccessorLocator,ITargetObserverLocatorRegistration=TargetObserverLocator,ITemplateFactoryRegistration=N,DefaultComponents=[IProjectorLocatorRegistration,ITargetAccessorLocatorRegistration,ITargetObserverLocatorRegistration,ITemplateFactoryRegistration],AttrBindingBehaviorRegistration=AttrBindingBehavior,SelfBindingBehaviorRegistration=SelfBindingBehavior,UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehavior,ComposeRegistration=Compose,DefaultResources=[AttrBindingBehaviorRegistration,SelfBindingBehaviorRegistration,UpdateTriggerBindingBehaviorRegistration,ComposeRegistration],ListenerBindingRendererRegistration=I,SetAttributeRendererRegistration=B,StylePropertyBindingRendererRegistration=F,TextBindingRendererRegistration=D,DefaultRenderers=[ListenerBindingRendererRegistration,SetAttributeRendererRegistration,StylePropertyBindingRendererRegistration,TextBindingRendererRegistration],BasicConfiguration={register:t=>runtime.BasicConfiguration.register(t).register(...DefaultComponents,...DefaultResources,...DefaultRenderers),ji(){return this.register(kernel.DI.ji())}};t.Listener=Listener,t.ListenerTracker=ListenerTracker,t.DelegateOrCaptureSubscription=DelegateOrCaptureSubscription,t.TriggerSubscription=TriggerSubscription,t.IEventManager=IEventManager,t.EventSubscriber=EventSubscriber,t.TargetAccessorLocator=TargetAccessorLocator,t.TargetObserverLocator=TargetObserverLocator,t.ISVGAnalyzer=ISVGAnalyzer,t.AttrBindingBehavior=AttrBindingBehavior,t.SelfBindingBehavior=SelfBindingBehavior,t.UpdateTriggerBindingBehavior=UpdateTriggerBindingBehavior,t.Compose=Compose,t.IProjectorLocatorRegistration=IProjectorLocatorRegistration,t.ITargetAccessorLocatorRegistration=ITargetAccessorLocatorRegistration,t.ITargetObserverLocatorRegistration=ITargetObserverLocatorRegistration,t.ITemplateFactoryRegistration=ITemplateFactoryRegistration,t.DefaultComponents=DefaultComponents,t.AttrBindingBehaviorRegistration=AttrBindingBehaviorRegistration,t.SelfBindingBehaviorRegistration=SelfBindingBehaviorRegistration,t.UpdateTriggerBindingBehaviorRegistration=UpdateTriggerBindingBehaviorRegistration,t.ComposeRegistration=ComposeRegistration,t.DefaultResources=DefaultResources,t.ListenerBindingRendererRegistration=ListenerBindingRendererRegistration,t.SetAttributeRendererRegistration=SetAttributeRendererRegistration,t.StylePropertyBindingRendererRegistration=StylePropertyBindingRendererRegistration,t.TextBindingRendererRegistration=TextBindingRendererRegistration,t.DefaultRenderers=DefaultRenderers,t.BasicConfiguration=BasicConfiguration,t.createElement=createElement,t.RenderPlan=RenderPlan,t.isHTMLTargetedInstruction=isHTMLTargetedInstruction,t.HTMLDOM=class{constructor(t,s,i,e,h,n){this.window=t,this.document=s,this.Node=i,this.Element=e,this.HTMLElement=h,this.CustomEvent=n,runtime.DOM.ki&&(kernel.Reporter.write(1001),runtime.DOM.Ti()),runtime.DOM.initialize(this)}static register(t){return kernel.Registration.xi(runtime.IDOM,this).register(t)}addEventListener(t,s,i,e){(i||this.document).addEventListener(t,s,e)}appendChild(t,s){t.appendChild(s)}cloneNode(t,s){return t.cloneNode(0!=s)}ni(t){if(this.Oi(t))return t;if(null===t.parentNode)throw kernel.Reporter.error(52);const s=this.document.createComment("au-end"),i=this.document.createComment("au-start");return t.parentNode.replaceChild(s,t),s.parentNode.insertBefore(i,s),s.ri=i,i.$nodes=null,s}createDocumentFragment(t){if(null==t)return this.document.createDocumentFragment();if(this.m(t)){if(void 0!==t.content)return t.content;const s=this.document.createDocumentFragment();return s.appendChild(t),s}return this.Mi(t).content}createElement(name){return this.document.createElement(name)}fetch(t,s){return this.window.fetch(t,s)}Li(t,s){return new this.CustomEvent(t,s)}dispatchEvent(t){this.document.dispatchEvent(t)}Ht(t,s,i){if("undefined"==typeof MutationObserver)return{disconnect(){},observe(){},takeRecords:()=>kernel.PLATFORM.ai};const e=new MutationObserver(s);return e.observe(t,i),e}Mi(t){if(null==t)return this.document.createElement("template");const template=this.document.createElement("template");return template.innerHTML=""+t,template}createTextNode(t){return this.document.createTextNode(t)}insertBefore(t,s){s.parentNode.insertBefore(t,s)}wi(t){return"AU-M"===t.nodeName}m(t){return null!=t&&t.nodeType>0}Oi(t){return"au-end"===t.textContent}p(t){t.className="au"}Si(t,s){t.Ri(runtime.INode,s),t.Ri(this.Node,s),t.Ri(this.Element,s),t.Ri(this.HTMLElement,s)}remove(t){t.remove?t.remove():t.parentNode.removeChild(t)}removeEventListener(t,s,i,e){(i||this.document).removeEventListener(t,s,e)}setAttribute(t,name,value){t.setAttribute(name,value)}},t.DOM=O,t.CaptureBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=runtime.DelegationStrategy.It,this.to=to}},t.DelegateBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=0,this.strategy=runtime.DelegationStrategy.Dt,this.to=to}},t.SetAttributeInstruction=SetAttributeInstruction,t.StylePropertyBindingInstruction=class{constructor(from,to){this.type="hc",this.from=from,this.to=to}},t.TextBindingInstruction=class{constructor(from){this.type="ha",this.from=from}},t.TriggerBindingInstruction=class{constructor(from,to){this.type="hb",this.from=from,this.preventDefault=1,this.strategy=runtime.DelegationStrategy.Ni,this.to=to}},Object.defineProperty(t,"Di",{value:1})}); |
@@ -1,7 +0,7 @@ | ||
import { DelegationStrategy, Interpolation, IsBindingBehavior, ITargetedInstruction } from '@aurelia/runtime'; | ||
import { DelegationStrategy, IInterpolationExpression, IsBindingBehavior, ITargetedInstruction } from '@aurelia/runtime'; | ||
import { HTMLTargetedInstructionType, IListenerBindingInstruction, IStylePropertyBindingInstruction, ITextBindingInstruction } from './definitions'; | ||
export declare class TextBindingInstruction implements ITextBindingInstruction { | ||
type: HTMLTargetedInstructionType.textBinding; | ||
from: string | Interpolation; | ||
constructor(from: string | Interpolation); | ||
from: string | IInterpolationExpression; | ||
constructor(from: string | IInterpolationExpression); | ||
} | ||
@@ -8,0 +8,0 @@ export declare class TriggerBindingInstruction implements IListenerBindingInstruction { |
@@ -17,2 +17,3 @@ import { IBatchedCollectionSubscriber, IBindingTargetObserver, ILifecycle, IObserverLocator, IPropertySubscriber, LifecycleFlags, ObserversLookup, SetterObserver } from '@aurelia/runtime'; | ||
readonly isDOMObserver: true; | ||
readonly persistentFlags: LifecycleFlags; | ||
currentFlags: LifecycleFlags; | ||
@@ -29,3 +30,3 @@ currentValue: unknown; | ||
private valueObserver; | ||
constructor(lifecycle: ILifecycle, obj: IInputElement, handler: IEventSubscriber, observerLocator: IObserverLocator); | ||
constructor(flags: LifecycleFlags, lifecycle: ILifecycle, obj: IInputElement, handler: IEventSubscriber, observerLocator: IObserverLocator); | ||
getValue(): unknown; | ||
@@ -32,0 +33,0 @@ setValueCore(newValue: unknown, flags: LifecycleFlags): void; |
import { IContainer, InterfaceSymbol, IResolver } from '@aurelia/kernel'; | ||
import { IBindingTargetAccessor, IBindingTargetObserver, IDOM, ILifecycle, IObserverLocator, ITargetAccessorLocator, ITargetObserverLocator } from '@aurelia/runtime'; | ||
import { IBindingTargetAccessor, IBindingTargetObserver, IDOM, ILifecycle, IObserverLocator, ITargetAccessorLocator, ITargetObserverLocator, LifecycleFlags } from '@aurelia/runtime'; | ||
export declare class TargetObserverLocator implements ITargetObserverLocator { | ||
@@ -8,5 +8,5 @@ static readonly inject: ReadonlyArray<InterfaceSymbol>; | ||
static register(container: IContainer): IResolver<ITargetObserverLocator>; | ||
getObserver(lifecycle: ILifecycle, observerLocator: IObserverLocator, obj: Node, propertyName: string): IBindingTargetObserver | IBindingTargetAccessor; | ||
overridesAccessor(obj: Node, propertyName: string): boolean; | ||
handles(obj: unknown): boolean; | ||
getObserver(flags: LifecycleFlags, lifecycle: ILifecycle, observerLocator: IObserverLocator, obj: Node, propertyName: string): IBindingTargetObserver | IBindingTargetAccessor; | ||
overridesAccessor(flags: LifecycleFlags, obj: Node, propertyName: string): boolean; | ||
handles(flags: LifecycleFlags, obj: unknown): boolean; | ||
} | ||
@@ -18,5 +18,5 @@ export declare class TargetAccessorLocator implements ITargetAccessorLocator { | ||
static register(container: IContainer): IResolver<ITargetAccessorLocator>; | ||
getAccessor(lifecycle: ILifecycle, obj: Node, propertyName: string): IBindingTargetAccessor; | ||
handles(obj: Node): boolean; | ||
getAccessor(flags: LifecycleFlags, lifecycle: ILifecycle, obj: Node, propertyName: string): IBindingTargetAccessor; | ||
handles(flags: LifecycleFlags, obj: Node): boolean; | ||
} | ||
//# sourceMappingURL=observer-locator.d.ts.map |
@@ -15,2 +15,3 @@ import { IBatchedCollectionSubscriber, IBindingTargetObserver, IDOM, ILifecycle, IndexMap, IObserverLocator, IPropertySubscriber, LifecycleFlags } from '@aurelia/runtime'; | ||
readonly isDOMObserver: true; | ||
readonly persistentFlags: LifecycleFlags; | ||
lifecycle: ILifecycle; | ||
@@ -28,3 +29,3 @@ obj: ISelectElement; | ||
private nodeObserver; | ||
constructor(lifecycle: ILifecycle, obj: ISelectElement, handler: IEventSubscriber, observerLocator: IObserverLocator, dom: IDOM); | ||
constructor(flags: LifecycleFlags, lifecycle: ILifecycle, obj: ISelectElement, handler: IEventSubscriber, observerLocator: IObserverLocator, dom: IDOM); | ||
getValue(): unknown; | ||
@@ -31,0 +32,0 @@ setValueCore(newValue: unknown, flags: LifecycleFlags): void; |
@@ -16,2 +16,3 @@ import { InterfaceSymbol, IRegistry } from '@aurelia/kernel'; | ||
static register: IRegistry['register']; | ||
persistentFlags: LifecycleFlags; | ||
private readonly observerLocator; | ||
@@ -18,0 +19,0 @@ constructor(observerLocator: IObserverLocator); |
{ | ||
"name": "@aurelia/runtime-html", | ||
"version": "0.3.0-dev.20190117", | ||
"version": "0.3.0-dev.20190127", | ||
"main": "dist/index.umd.js", | ||
@@ -43,4 +43,4 @@ "module": "dist/index.es6.js", | ||
"dependencies": { | ||
"@aurelia/kernel": "^0.3.0-dev.20190117", | ||
"@aurelia/runtime": "^0.3.0-dev.20190117" | ||
"@aurelia/kernel": "^0.3.0-dev.20190127", | ||
"@aurelia/runtime": "^0.3.0-dev.20190127" | ||
}, | ||
@@ -54,6 +54,6 @@ "devDependencies": { | ||
"tslint-microsoft-contrib": "^6.0.0", | ||
"tslint-sonarts": "^1.8.0", | ||
"tslint-sonarts": "^1.9.0", | ||
"typescript": "^3.2.2" | ||
}, | ||
"gitHead": "fc70bbb68456039ff8979410c8bfa686501a8a96" | ||
"gitHead": "1a1aac20fb016a424083bb203e60ba45f399b1da" | ||
} |
@@ -7,3 +7,2 @@ import { IDisposable, IIndexable, IServiceLocator, Tracer } from '@aurelia/kernel'; | ||
IBinding, | ||
IBindScope, | ||
IConnectableBinding, | ||
@@ -24,4 +23,4 @@ IDOM, | ||
public $nextBind: IBindScope; | ||
public $prevBind: IBindScope; | ||
public $nextBinding: IBinding; | ||
public $prevBinding: IBinding; | ||
public $state: State; | ||
@@ -52,4 +51,4 @@ public $scope: IScope; | ||
this.dom = dom; | ||
this.$nextBind = null; | ||
this.$prevBind = null; | ||
this.$nextBinding = null; | ||
this.$prevBinding = null; | ||
this.$state = State.none; | ||
@@ -74,3 +73,3 @@ | ||
delete overrideContext.$event; | ||
Reflect.deleteProperty(overrideContext, '$event'); | ||
@@ -146,3 +145,3 @@ if (result !== true && this.preventDefault) { | ||
public observeProperty(obj: IIndexable, propertyName: string): void { | ||
public observeProperty(flags: LifecycleFlags, obj: IIndexable, propertyName: string): void { | ||
return; | ||
@@ -149,0 +148,0 @@ } |
@@ -13,2 +13,3 @@ import { Constructable, IRegistry, Tracer } from '@aurelia/kernel'; | ||
IViewFactory, | ||
LifecycleFlags, | ||
TargetedInstructionType, | ||
@@ -22,3 +23,8 @@ TemplateDefinition | ||
export function createElement<T extends INode = Node>(dom: IDOM<T>, tagOrType: string | Constructable, props?: Record<string, string | HTMLTargetedInstruction>, children?: ArrayLike<unknown>): RenderPlan<T> { | ||
export function createElement<T extends INode = Node>( | ||
dom: IDOM<T>, | ||
tagOrType: string | Constructable, | ||
props?: Record<string, string | HTMLTargetedInstruction>, | ||
children?: ArrayLike<unknown> | ||
): RenderPlan<T> { | ||
if (typeof tagOrType === 'string') { | ||
@@ -60,3 +66,3 @@ return createElementForTag(dom, tagOrType, props, children); | ||
public createView(engine: IRenderingEngine, parentContext?: IRenderContext): IView { | ||
public createView(flags: LifecycleFlags, engine: IRenderingEngine, parentContext?: IRenderContext): IView { | ||
return this.getViewFactory(engine, parentContext).create(); | ||
@@ -63,0 +69,0 @@ } |
import { | ||
AttributeInstruction, | ||
DelegationStrategy, | ||
Interpolation, | ||
IInterpolationExpression, | ||
IsBindingBehavior, | ||
@@ -38,3 +38,3 @@ ITargetedInstruction, | ||
type: HTMLTargetedInstructionType.textBinding; | ||
from: string | Interpolation; | ||
from: string | IInterpolationExpression; | ||
} | ||
@@ -41,0 +41,0 @@ |
import { | ||
Constructable, | ||
DI, | ||
IContainer, | ||
@@ -11,4 +10,6 @@ IResolver, | ||
} from '@aurelia/kernel'; | ||
import { | ||
CompiledTemplate, | ||
DOM, | ||
IDOM, | ||
@@ -48,28 +49,43 @@ INode, | ||
public readonly HTMLElement: typeof HTMLElement; | ||
private readonly wnd: Window; | ||
private readonly doc: Document; | ||
public readonly CustomEvent: typeof CustomEvent; | ||
public readonly window: Window; | ||
public readonly document: Document; | ||
constructor( | ||
wnd: Window, | ||
doc: Document, | ||
window: Window, | ||
document: Document, | ||
TNode: typeof Node, | ||
TElement: typeof Element, | ||
THTMLElement: typeof HTMLElement | ||
THTMLElement: typeof HTMLElement, | ||
TCustomEvent: typeof CustomEvent | ||
) { | ||
this.wnd = wnd; | ||
this.doc = doc; | ||
this.window = window; | ||
this.document = document; | ||
this.Node = TNode; | ||
this.Element = TElement; | ||
this.HTMLElement = THTMLElement; | ||
this.CustomEvent = TCustomEvent; | ||
if (DOM.isInitialized) { | ||
Reporter.write(1001); // TODO: create reporters code // DOM already initialized (just info) | ||
DOM.destroy(); | ||
} | ||
DOM.initialize(this); | ||
} | ||
public static register(container: IContainer): IResolver<HTMLDOM> { | ||
return Registration.alias(IDOM, this).register(container); | ||
} | ||
public addEventListener(eventName: string, subscriber: EventListenerOrEventListenerObject, publisher?: Node, options?: boolean | AddEventListenerOptions): void { | ||
(publisher || this.doc).addEventListener(eventName, subscriber, options); | ||
(publisher || this.document).addEventListener(eventName, subscriber, options); | ||
} | ||
public appendChild(parent: Node, child: Node): void { | ||
parent.appendChild(child); | ||
} | ||
public cloneNode<T>(node: T, deep?: boolean): T { | ||
return (node as unknown as Node).cloneNode(deep !== false) as unknown as T; | ||
} | ||
public convertToRenderLocation(node: Node): IRenderLocation { | ||
@@ -79,17 +95,25 @@ if (this.isRenderLocation(node)) { | ||
} | ||
if (node.parentNode === null) { | ||
throw Reporter.error(52); | ||
} | ||
const locationEnd = this.doc.createComment('au-end'); | ||
const locationStart = this.doc.createComment('au-start'); | ||
const locationEnd = this.document.createComment('au-end'); | ||
const locationStart = this.document.createComment('au-start'); | ||
node.parentNode.replaceChild(locationEnd, node); | ||
locationEnd.parentNode.insertBefore(locationStart, locationEnd); | ||
(locationEnd as IRenderLocation).$start = locationStart as IRenderLocation; | ||
(locationStart as IRenderLocation).$nodes = null; | ||
return locationEnd as IRenderLocation; | ||
} | ||
public createDocumentFragment(markupOrNode?: string | Node): DocumentFragment { | ||
if (markupOrNode === undefined || markupOrNode === null) { | ||
return this.doc.createDocumentFragment(); | ||
return this.document.createDocumentFragment(); | ||
} | ||
if (this.isNodeInstance(markupOrNode)) { | ||
@@ -99,11 +123,28 @@ if ((markupOrNode as HTMLTemplateElement).content !== undefined) { | ||
} | ||
const fragment = this.doc.createDocumentFragment(); | ||
const fragment = this.document.createDocumentFragment(); | ||
fragment.appendChild(markupOrNode); | ||
return fragment; | ||
} | ||
return this.createTemplate(markupOrNode).content; | ||
} | ||
public createElement(name: string): HTMLElement { | ||
return this.doc.createElement(name); | ||
return this.document.createElement(name); | ||
} | ||
public fetch(input: RequestInfo, init?: RequestInit): Promise<Response> { | ||
return this.window.fetch(input, init); | ||
} | ||
// tslint:disable-next-line:no-any // this is how the DOM is typed | ||
public createCustomEvent<T = any>(eventType: string, options?: CustomEventInit<T>): CustomEvent<T> { | ||
return new this.CustomEvent(eventType, options); | ||
} | ||
public dispatchEvent(evt: Event): void { | ||
this.document.dispatchEvent(evt); | ||
} | ||
public createNodeObserver(node: Node, cb: MutationCallback, init: MutationObserverInit): MutationObserver { | ||
@@ -118,2 +159,3 @@ if (typeof MutationObserver === 'undefined') { | ||
} | ||
const observer = new MutationObserver(cb); | ||
@@ -123,28 +165,37 @@ observer.observe(node, init); | ||
} | ||
public createTemplate(markup?: unknown): HTMLTemplateElement { | ||
if (markup === undefined || markup === null) { | ||
return this.doc.createElement('template'); | ||
return this.document.createElement('template'); | ||
} | ||
const template = this.doc.createElement('template'); | ||
const template = this.document.createElement('template'); | ||
template.innerHTML = (markup as string | object).toString(); | ||
return template; | ||
} | ||
public createTextNode(text: string): Text { | ||
return this.doc.createTextNode(text); | ||
return this.document.createTextNode(text); | ||
} | ||
public insertBefore(nodeToInsert: Node, referenceNode: Node): void { | ||
referenceNode.parentNode.insertBefore(nodeToInsert, referenceNode); | ||
} | ||
public isMarker(node: unknown): node is HTMLElement { | ||
return (node as AuMarker).nodeName === 'AU-M'; | ||
} | ||
public isNodeInstance(potentialNode: unknown): potentialNode is Node { | ||
return potentialNode !== null && potentialNode !== undefined && (potentialNode as Node).nodeType > 0; | ||
} | ||
public isRenderLocation(node: unknown): node is IRenderLocation { | ||
return (node as Comment).textContent === 'au-end'; | ||
} | ||
public makeTarget(node: unknown): void { | ||
(node as Element).className = 'au'; | ||
} | ||
public registerElementResolver(container: IContainer, resolver: IResolver): void { | ||
@@ -156,2 +207,3 @@ container.registerResolver(INode, resolver); | ||
} | ||
public remove(node: Node): void { | ||
@@ -164,5 +216,7 @@ if ((node as ChildNode).remove) { | ||
} | ||
public removeEventListener(eventName: string, subscriber: EventListenerOrEventListenerObject, publisher?: Node, options?: boolean | EventListenerOptions): void { | ||
(publisher || this.doc).removeEventListener(eventName, subscriber, options); | ||
(publisher || this.document).removeEventListener(eventName, subscriber, options); | ||
} | ||
public setAttribute(node: Element, name: string, value: unknown): void { | ||
@@ -173,2 +227,5 @@ node.setAttribute(name, value as string); | ||
const $DOM = DOM as unknown as HTMLDOM; | ||
export { $DOM as DOM }; | ||
/** | ||
@@ -240,2 +297,3 @@ * A specialized INodeSequence with optimizations for text (interpolation) bindings | ||
const targets = this.targets = Array(ii); | ||
while (i < ii) { | ||
@@ -246,2 +304,3 @@ // eagerly convert all markers to RenderLocations (otherwise the renderer | ||
const target = targetNodeList[i]; | ||
if (target.nodeName === 'AU-M') { | ||
@@ -257,2 +316,3 @@ // note the renderer will still call this method, but it will just return the | ||
} | ||
const childNodeList = fragment.childNodes; | ||
@@ -401,2 +461,3 @@ i = 0; | ||
} | ||
public readonly nextSibling: Node; | ||
@@ -415,2 +476,3 @@ public readonly previousSibling: Node; | ||
} | ||
public remove(): void { /* do nothing */ } | ||
@@ -417,0 +479,0 @@ } |
import { InterfaceSymbol, IRegistry, Tracer } from '@aurelia/kernel'; | ||
import { | ||
addBindable, | ||
addBinding, | ||
Binding, | ||
@@ -16,2 +16,3 @@ BindingMode, | ||
IRenderContext, | ||
LifecycleFlags, | ||
MultiInterpolationBinding | ||
@@ -45,3 +46,3 @@ } from '@aurelia/runtime'; | ||
public render(dom: IDOM, context: IRenderContext, renderable: IRenderable, target: ChildNode, instruction: ITextBindingInstruction): void { | ||
public render(flags: LifecycleFlags, dom: IDOM, context: IRenderContext, renderable: IRenderable, target: ChildNode, instruction: ITextBindingInstruction): void { | ||
if (Tracer.enabled) { Tracer.enter('TextBindingRenderer.render', slice.call(arguments)); } | ||
@@ -52,10 +53,10 @@ const next = target.nextSibling; | ||
} | ||
let bindable: MultiInterpolationBinding | InterpolationBinding; | ||
let binding: MultiInterpolationBinding | InterpolationBinding; | ||
const expr = ensureExpression(this.parser, instruction.from, BindingType.Interpolation); | ||
if (expr.isMulti) { | ||
bindable = new MultiInterpolationBinding(this.observerLocator, expr, next, 'textContent', BindingMode.toView, context); | ||
binding = new MultiInterpolationBinding(this.observerLocator, expr, next, 'textContent', BindingMode.toView, context); | ||
} else { | ||
bindable = new InterpolationBinding(expr.firstExpression, expr, next, 'textContent', BindingMode.toView, this.observerLocator, context, true); | ||
binding = new InterpolationBinding(expr.firstExpression, expr, next, 'textContent', BindingMode.toView, this.observerLocator, context, true); | ||
} | ||
addBindable(renderable, bindable); | ||
addBinding(renderable, binding); | ||
if (Tracer.enabled) { Tracer.leave(); } | ||
@@ -79,7 +80,7 @@ } | ||
public render(dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: IListenerBindingInstruction): void { | ||
public render(flags: LifecycleFlags, dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: IListenerBindingInstruction): void { | ||
if (Tracer.enabled) { Tracer.enter('ListenerBindingRenderer.render', slice.call(arguments)); } | ||
const expr = ensureExpression(this.parser, instruction.from, BindingType.IsEventCommand | (instruction.strategy + BindingType.DelegationStrategyDelta)); | ||
const bindable = new Listener(dom, instruction.to, instruction.strategy, expr, target, instruction.preventDefault, this.eventManager, context); | ||
addBindable(renderable, bindable); | ||
const binding = new Listener(dom, instruction.to, instruction.strategy, expr, target, instruction.preventDefault, this.eventManager, context); | ||
addBinding(renderable, binding); | ||
if (Tracer.enabled) { Tracer.leave(); } | ||
@@ -94,3 +95,3 @@ } | ||
public render(dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: ISetAttributeInstruction): void { | ||
public render(flags: LifecycleFlags, dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: ISetAttributeInstruction): void { | ||
if (Tracer.enabled) { Tracer.enter('SetAttributeRenderer.render', slice.call(arguments)); } | ||
@@ -116,9 +117,9 @@ target.setAttribute(instruction.to, instruction.value); | ||
public render(dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: IStylePropertyBindingInstruction): void { | ||
public render(flags: LifecycleFlags, dom: IDOM, context: IRenderContext, renderable: IRenderable, target: HTMLElement, instruction: IStylePropertyBindingInstruction): void { | ||
if (Tracer.enabled) { Tracer.enter('StylePropertyBindingRenderer.render', slice.call(arguments)); } | ||
const expr = ensureExpression(this.parser, instruction.from, BindingType.IsPropertyCommand | BindingMode.toView); | ||
const bindable = new Binding(expr, target.style, instruction.to, BindingMode.toView, this.observerLocator, context); | ||
addBindable(renderable, bindable); | ||
const binding = new Binding(expr, target.style, instruction.to, BindingMode.toView, this.observerLocator, context); | ||
addBinding(renderable, binding); | ||
if (Tracer.enabled) { Tracer.leave(); } | ||
} | ||
} |
@@ -112,3 +112,4 @@ export { | ||
NodeType, | ||
HTMLDOM | ||
HTMLDOM, | ||
DOM | ||
} from './dom'; | ||
@@ -115,0 +116,0 @@ export { |
import { | ||
DelegationStrategy, | ||
Interpolation, | ||
IInterpolationExpression, | ||
IsBindingBehavior, | ||
@@ -17,5 +17,5 @@ ITargetedInstruction | ||
public from: string | Interpolation; | ||
public from: string | IInterpolationExpression; | ||
constructor(from: string | Interpolation) { | ||
constructor(from: string | IInterpolationExpression) { | ||
this.type = HTMLTargetedInstructionType.textBinding; | ||
@@ -22,0 +22,0 @@ |
@@ -42,2 +42,3 @@ import { | ||
public readonly isDOMObserver: true; | ||
public readonly persistentFlags: LifecycleFlags; | ||
public currentFlags: LifecycleFlags; | ||
@@ -56,3 +57,10 @@ public currentValue: unknown; | ||
constructor(lifecycle: ILifecycle, obj: IInputElement, handler: IEventSubscriber, observerLocator: IObserverLocator) { | ||
constructor( | ||
flags: LifecycleFlags, | ||
lifecycle: ILifecycle, | ||
obj: IInputElement, | ||
handler: IEventSubscriber, | ||
observerLocator: IObserverLocator | ||
) { | ||
this.persistentFlags = flags & LifecycleFlags.persistentBindingFlags; | ||
this.isDOMObserver = true; | ||
@@ -81,3 +89,3 @@ this.handler = handler; | ||
if (this.obj.type === 'checkbox' && Array.isArray(newValue)) { | ||
this.arrayObserver = this.observerLocator.getArrayObserver(newValue); | ||
this.arrayObserver = this.observerLocator.getArrayObserver(this.persistentFlags | flags, newValue); | ||
this.arrayObserver.subscribeBatched(this); | ||
@@ -127,3 +135,3 @@ } | ||
} | ||
this.callSubscribers(this.currentValue, this.oldValue, flags); | ||
this.callSubscribers(this.currentValue, this.oldValue, this.persistentFlags | flags); | ||
} | ||
@@ -130,0 +138,0 @@ |
@@ -11,2 +11,3 @@ | ||
ITargetObserverLocator, | ||
LifecycleFlags, | ||
SetterObserver | ||
@@ -87,9 +88,9 @@ } from '@aurelia/runtime'; | ||
public getObserver(lifecycle: ILifecycle, observerLocator: IObserverLocator, obj: Node, propertyName: string): IBindingTargetObserver | IBindingTargetAccessor { | ||
public getObserver(flags: LifecycleFlags, lifecycle: ILifecycle, observerLocator: IObserverLocator, obj: Node, propertyName: string): IBindingTargetObserver | IBindingTargetAccessor { | ||
switch (propertyName) { | ||
case 'checked': | ||
return new CheckedObserver(lifecycle, obj as IInputElement, new EventSubscriber(this.dom, inputEvents), observerLocator); | ||
return new CheckedObserver(flags, lifecycle, obj as IInputElement, new EventSubscriber(this.dom, inputEvents), observerLocator); | ||
case 'value': | ||
if (obj['tagName'] === 'SELECT') { | ||
return new SelectValueObserver(lifecycle, obj as ISelectElement, new EventSubscriber(this.dom, selectEvents), observerLocator, this.dom); | ||
return new SelectValueObserver(flags, lifecycle, obj as ISelectElement, new EventSubscriber(this.dom, selectEvents), observerLocator, this.dom); | ||
} | ||
@@ -111,3 +112,3 @@ return new ValueAttributeObserver(lifecycle, obj, propertyName, new EventSubscriber(this.dom, inputEvents)); | ||
case 'model': | ||
return new SetterObserver(obj, propertyName); | ||
return new SetterObserver(flags, obj, propertyName); | ||
case 'role': | ||
@@ -130,7 +131,7 @@ return new DataAttributeAccessor(lifecycle, obj as HTMLElement, propertyName); | ||
public overridesAccessor(obj: Node, propertyName: string): boolean { | ||
public overridesAccessor(flags: LifecycleFlags, obj: Node, propertyName: string): boolean { | ||
return overrideProps[propertyName] === true; | ||
} | ||
public handles(obj: unknown): boolean { | ||
public handles(flags: LifecycleFlags, obj: unknown): boolean { | ||
return this.dom.isNodeInstance(obj); | ||
@@ -153,3 +154,3 @@ } | ||
public getAccessor(lifecycle: ILifecycle, obj: Node, propertyName: string): IBindingTargetAccessor { | ||
public getAccessor(flags: LifecycleFlags, lifecycle: ILifecycle, obj: Node, propertyName: string): IBindingTargetAccessor { | ||
switch (propertyName) { | ||
@@ -186,5 +187,5 @@ case 'textContent': | ||
public handles(obj: Node): boolean { | ||
public handles(flags: LifecycleFlags, obj: Node): boolean { | ||
return this.dom.isNodeInstance(obj); | ||
} | ||
} |
@@ -44,2 +44,3 @@ import { | ||
public readonly isDOMObserver: true; | ||
public readonly persistentFlags: LifecycleFlags; | ||
public lifecycle: ILifecycle; | ||
@@ -61,2 +62,3 @@ public obj: ISelectElement; | ||
constructor( | ||
flags: LifecycleFlags, | ||
lifecycle: ILifecycle, | ||
@@ -68,2 +70,3 @@ obj: ISelectElement, | ||
) { | ||
this.persistentFlags = flags & LifecycleFlags.persistentBindingFlags; | ||
this.isDOMObserver = true; | ||
@@ -91,3 +94,3 @@ this.lifecycle = lifecycle; | ||
if (isArray) { | ||
this.arrayObserver = this.observerLocator.getArrayObserver(newValue as unknown[]); | ||
this.arrayObserver = this.observerLocator.getArrayObserver(this.persistentFlags | flags, newValue as unknown[]); | ||
this.arrayObserver.subscribeBatched(this); | ||
@@ -108,3 +111,3 @@ } | ||
public handleChange(newValue: unknown, previousValue: unknown, flags: LifecycleFlags): void { | ||
this.setValue(newValue, flags); | ||
this.setValue(newValue, this.persistentFlags | flags); | ||
} | ||
@@ -121,3 +124,3 @@ | ||
} | ||
this.callSubscribers(newValue, oldValue, flags); | ||
this.callSubscribers(newValue, oldValue, this.persistentFlags | flags); | ||
} | ||
@@ -124,0 +127,0 @@ |
@@ -25,2 +25,3 @@ import { InterfaceSymbol, IRegistry, Reporter } from '@aurelia/kernel'; | ||
public persistentFlags: LifecycleFlags; | ||
private readonly observerLocator: IObserverLocator; | ||
@@ -41,4 +42,6 @@ | ||
this.persistentFlags = flags & LifecycleFlags.persistentBindingFlags; | ||
// ensure the binding's target observer has been set. | ||
const targetObserver = this.observerLocator.getObserver(binding.target, binding.targetProperty) as UpdateTriggerableObserver; | ||
const targetObserver = this.observerLocator.getObserver(this.persistentFlags | flags, binding.target, binding.targetProperty) as UpdateTriggerableObserver; | ||
if (!targetObserver.handler) { | ||
@@ -45,0 +48,0 @@ throw Reporter.error(10); |
@@ -132,3 +132,3 @@ import { Constructable, Immutable, InterfaceSymbol, IRegistry } from '@aurelia/kernel'; | ||
private resolveView(subject: Subject<T> | null, flags: LifecycleFlags): IView<T> | null { | ||
const view = this.provideViewFor(subject); | ||
const view = this.provideViewFor(subject, flags); | ||
@@ -144,3 +144,3 @@ if (view) { | ||
private provideViewFor(subject: Subject<T> | null): IView<T> | null { | ||
private provideViewFor(subject: Subject<T> | null, flags: LifecycleFlags): IView<T> | null { | ||
if (!subject) { | ||
@@ -156,2 +156,3 @@ return null; | ||
return subject.createView( | ||
flags, | ||
this.renderingEngine, | ||
@@ -181,2 +182,3 @@ this.renderable.$context | ||
).createView( | ||
flags, | ||
this.renderingEngine, | ||
@@ -183,0 +185,0 @@ this.renderable.$context |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1279339
11755