Skip to content

Instantly share code, notes, and snippets.

@vegarringdal
Last active January 18, 2018 22:10
Show Gist options
  • Save vegarringdal/6fce0c44bd035ac54cf4972841f2099c to your computer and use it in GitHub Desktop.
Save vegarringdal/6fce0c44bd035ac54cf4972841f2099c to your computer and use it in GitHub Desktop.
<template>
<div my-settings="color:blue;height:200"></div>
<template>
import html from './app.html!text';
export class App {
// return template
public loadTemplate(){
return html
}
}
import { customAttribute, IAttribute, bindable } from 'mframejs';
@customAttribute('my-settings')
export class Attribute implements IAttribute {
@bindable() public color = 'white';
@bindable() public height = '100';
@bindable() public width = '100';
public created(){
this.$element.style.backgroundColor = this.color;
this.$element.style.height = this.height +'px';
this.$element.style.width = this.width+'px';
}
}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>GistRun</title>
<link rel="stylesheet" href="styles.css">
<script src="https://unpkg.com/[email protected]"></script>
<script src="https://unpkg.com/[email protected]/dist/system.src.js"></script>
<script>
System.import('x_module_config.js')
.then(function () { System.import('main') })
.catch(console.error.bind(console));
</script>
</head>
<body>
</body>
</html>
import { configure, MF } from 'mframejs';
import { App } from './app';
import { Attribute } from './attribute';
// configure it by setting where and our main class
configure(App).then((mf: MF) => {
// register our elements/attributes
mf.register(Attribute);
// start it
mf.start(document.body);
});
/* todo: add styles */
var versions = {
typescript: '@2.6.1',
tsLib: '@1.8.0',
pluginTypescript: '@5.3.1'
};
System.config({
transpiler: 'ts',
typescriptOptions: {
experimentalDecorators: true,
emitDecoratorMetadata: true
},
packages: {
app: {
main: './main.ts',
defaultExtension: 'ts'
},
mframejs: { defaultExtension: 'js' },
text: { defaultExtension: 'js' }
},
meta: {
'typescript': { 'exports': 'ts' },
"*.txt": {
"loader": "text"
},"*.html": {
"loader": "text"
}
},
paths: {
'npm:': 'https://unpkg.com/'
},
map: {
'app': './',
'ts': 'npm:plugin-typescript' + versions.pluginTypescript + '/lib/plugin.js',
'tslib': 'npm:tslib' + versions.tsLib,
'typescript': 'npm:typescript' + versions.typescript + '/lib/typescript.js',
'mframejs':'./x_module_mframe.js',
'text': './x_module_text.js'
}
});
!function(){var e={f:{},m:{},r:function(t){var r=e.m[t];if(r)return r.m.exports;var n=e.f[t];return n?((r=e.m[t]={}).exports={},r.m={exports:r.exports},n(r.m,r.exports),r.m.exports):void 0}};e.f[0]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(1);r.MF=n.MF,r.configure=n.configure,r.Router=n.Router,r.EventAggregator=n.EventAggregator,r.Logger=n.Logger;var i=e.r(7);r.ContainerClasses=i.ContainerClasses,r.ContainerAttributes=i.ContainerAttributes,r.ContainerElements=i.ContainerElements,r.ContainerValueConverters=i.ContainerValueConverters;var s=e.r(56);r.inject=s.inject,r.transient=s.transient,r.customAttribute=s.customAttribute,r.customElement=s.customElement,r.bindable=s.bindable,r.computedFrom=s.computedFrom,r.valueConverter=s.valueConverter,r.behavior=s.behavior;var a=e.r(17);r.BindingEngine=a.BindingEngine;var o=e.r(31);r.IElement=o.IElement,r.IAttribute=o.IAttribute,r.IControllerArray=o.IControllerArray,r.IControllerObject=o.IControllerObject,r.IRepeatCache=o.IRepeatCache,r.CONSTANTS=o.CONSTANTS},e.f[1]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(2);r.DomEventHandler=n.DomEventHandler;var i=e.r(3);r.EventAggregator=i.EventAggregator;var s=e.r(4);r.Queue=s.Queue;var a=e.r(5);r.Router=a.Router;var o=e.r(6);r.configure=o.configure;var u=e.r(13);r.MF=u.MF;var l=e.r(82);r.Cache=l.Cache;var h=e.r(83);r.Logger=h.Logger},e.f[2]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(){}}();t.DomEventHandler=r},e.f[3]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.channels={}}return e.prototype.publish=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(Array.isArray(this.channels[e]))for(var n=0,i=this.channels[e].length;n<i;n++)this.channels[e][n].apply(this,t)},e.prototype.unsubscribe=function(e,t){if(Array.isArray(this.channels[e]))for(var r=0,n=this.channels[e].length;r<n;r++)this.channels[e][r]===t&&this.channels[e].splice(r,1)},e.prototype.subscribe=function(e,t){Array.isArray(this.channels[e])||(this.channels[e]=[]),this.channels[e].push(t)},e}();t.EventAggregator=r},e.f[4]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.count=0,this.tasks=[],this.topQueue=[],this.started=!1,this.index=-1}return e.prototype.finsished=function(){return 0===this.count},e.prototype.add=function(e){var t=this;this.count++,this.tasks.push(e),this.started||(this.started=!0,setTimeout(function(){t.flush()},0))},e.prototype.flush=function(){if(this.index<0){if(this.tasks.length<600)this.topQueue=this.tasks.slice(0,this.tasks.length),this.tasks=[];else{this.topQueue=this.tasks.slice(0,600);var e=this.tasks.slice(600,this.tasks.length);this.tasks=e}this.index=this.topQueue.length-1}0===this.topQueue.length&&(this.started=!1),this.runTasks()},e.prototype.reFlush=function(){var e=this;setTimeout(function(){e.flush()},0)},e.prototype.runTasks=function(){var e,t=this,r=this.topQueue[this.index];this.index--,e=function(){var r=t.topQueue[t.index];t.index--,r?(r.call(e),t.count--):t.index<0?t.reFlush():t.started=!1},r&&r.call(e),this.count--},e}();t.Queue=r},e.f[5]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=function(){function e(){var e=this;this.curRoute=0,this.started=!0,this.isNavigating=!0,this.started=!1,this.hash=window.location.hash,this.config={root:"#/",title:null,map:function(t){e.routes=t},loader:null}}return e.prototype.hashChange=function(){var e=this;this.isNavigating=!0,setTimeout(function(){if(e.hash=window.location.hash.slice(1).split("/"),"#/"!==window.location.hash&&""!==window.location.hash){var t=window.location.hash.slice(1).split("/"),r=!1;e.routes.forEach(function(n,i){t[1]===n.route&&(e.curRoute=i,r=!0)}),e.mainRouter&&r&&e.mainRouter.update()}""===window.location.hash&&(e.curRoute=0,e.mainRouter.update())},60)},e.prototype.init=function(){var e=this;if(this.started=!0,this.hash=this.config.root,this.title=this.config.title,window.addEventListener("hashchange",this.hashChange.bind(this)),this.routes.forEach(function(e){e.href="#/"+e.route}),"#/"!==window.location.hash&&""!==window.location.hash&&this.hash!==window.location.hash){this.hash=window.location.hash.slice(1).split("/");var t=!1;this.routes.forEach(function(r,n){e.hash[1]===r.route&&(e.curRoute=n,t=!0)}),this.mainRouter&&t&&this.mainRouter.update()}},e.prototype.getCurrentModule=function(){return this.routes[this.curRoute].modulePath},e.prototype.getCurrentClass=function(){return this.routes[this.curRoute].moduleClass},e.prototype.loadCurrentModule=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){switch(e.label){case 0:return[4,this.routes[this.curRoute].load()];case 1:return[2,e.sent()]}})})},e}();r.Router=i},e.f[6]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(7),s=e.r(13);r.configure=function(e){return n.__awaiter(this,void 0,void 0,function(){var t,r;return n.__generator(this,function(n){switch(n.label){case 0:return t=i.ContainerClasses.get(s.MF),r=i.ContainerClasses.get(e),null!==document.body?[3,1]:[2,new Promise(function(e){document.addEventListener("DOMContentLoaded",function(){e(t.setRootApp(r))})})];case 1:return[4,t.setRootApp(r)];case 2:return[2,n.sent()]}})})}},e.f[7]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(8);r.ContainerClasses=n.ContainerClasses;var i=e.r(9);r.ContainerAttributes=i.ContainerAttributes;var s=e.r(10);r.ContainerElements=s.ContainerElements;var a=e.r(11);r.ContainerValueConverters=a.ContainerValueConverters;var o=e.r(12);r.ContainerBehavior=o.ContainerBehavior},e.f[8]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=new Map,n=new Map,i=new Map,s=function(){function e(){}return e.get=function(e){return this.getInstance(e)},e.getInstance=function(e){return i.has(e)?this.create(e):(n.get(e)||n.set(e,this.create(e)),n.get(e))},e.create=function(e){var t=this,n=r.get(e)||[];return n=n.map(function(e){try{return t.get(e)}catch(t){return e}}),new(e.bind.apply(e,[void 0].concat(n)))},e.setDep=function(e,t){r.set(e,t)},e.regTransient=function(e){i.has(e)||i.set(e,null)},e}();t.ContainerClasses=s},e.f[9]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=new Map,n=function(){function e(){}return e.regAttribute=function(e,t){r.has(t)||r.set(t,e),r.has(t)||r.set(t,e)},e.findAttribute=function(e){return r.has(e)?r.get(e):null},e}();t.ContainerAttributes=n},e.f[10]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=new Map,n=function(){function e(){}return e.regElement=function(e,t){r.has(t)||r.set(t,e)},e.findElement=function(e){return r.has(e)?r.get(e):null},e}();t.ContainerElements=n},e.f[11]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=new Map,n=function(){function e(){}return e.regConverter=function(e,t){r.has(t)||r.set(t,e)},e.findConverter=function(e){return r.has(e)?r.get(e):null},e}();t.ContainerValueConverters=n},e.f[12]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=new Map,n=function(){function e(){}return e.regBehavior=function(e,t){r.has(t)||r.set(t,e)},e.findBehavior=function(e){return r.has(e)?r.get(e):null},e}();t.ContainerBehavior=n},e.f[13]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(14),s=e.r(3),a=e.r(56),o=e.r(5),u=e.r(4),l=e.r(65),h=e.r(70),c=e.r(72),d=function(){function e(e,t,r){this.count=0,this.eventAggregator=e,this.router=t,this.queue=r,window.Reflect||(window.Reflect=Object),this.register(h.MfRouter,c.ValueAttribute,c.IfAttribute,c.DelgateEventsAttribute,c.RepeatAttribute,c.MiscAttributes,c.CssAttribute,c.ModelAttribute,c.TriggerEventsAttribute,l.SignalBehavior,l.ThrottleBehavior,l.DebounceBehavior,l.TriggerBehavior)}return e.prototype.setRootApp=function(e){return this.app=e,this},e.prototype.start=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return this.node=e,this.app.configureRouter&&(this.app.configureRouter(this.router.config,this.router),this.router.init()),i.ViewParser.parseAndCreateElement(this.app,this.node,this),this.eventAggregator.publish("MF","MF started"),[2]})})},e.prototype.register=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]},e=n.__decorate([a.inject(s.EventAggregator,o.Router,u.Queue),n.__metadata("design:paramtypes",["function"==typeof(t=void 0!==s.EventAggregator&&s.EventAggregator)&&t||Object,"function"==typeof(r=void 0!==o.Router&&o.Router)&&r||Object,"function"==typeof(d=void 0!==u.Queue&&u.Queue)&&d||Object])],e);var t,r,d}();r.MF=d},e.f[14]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(15);r.AttributeController=n.AttributeController;var i=e.r(53);r.ElementController=i.ElementController;var s=e.r(55);r.InterpolateController=s.InterpolateController;var a=e.r(16);r.ViewController=a.ViewController;var o=e.r(54);r.ViewParser=o.ViewParser},e.f[15]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(16),i=e.r(7),s=e.r(17),a=e.r(1),o=function(){function e(e,t,r,s,o){this.parent=e,this.element=t,this.attribute=r,this.logger=a.Logger.getLogger(r.name,"attribute"),this.class=i.ContainerClasses.get(s),this.element=t,"if.bind"!==r.name&&"repeat.for"!==r.name||!e.$element?o.addAttribute(this):t&&!t.$view&&(t.$view=new n.ViewController(t),t.$view.addAttribute(this))}return e.prototype.init=function(){this.create()},e.prototype.create=function(){this.logger.log("created",this.attribute.name,this.attribute.value),this.class.$element=this.element,this.class.$parent=this.parent,this.class.$attribute=this.attribute,s.BindingEngine.subscribeClassMetaBinding(this.class),this.class.created&&this.class.created()},e.prototype.attached=function(){this.logger.log("attached",this.attribute.name,this.attribute.value),this.class.attached&&this.class.attached()},e.prototype.detached=function(){this.logger.log("detached",this.attribute.name,this.attribute.value),this.class.detached&&this.class.detached(),s.BindingEngine.unSubscribeClassMetaBinding(this.class),this.parent=null,this.element=null,this.attribute=null,this.class.$element=null,this.class.$parent=null,this.class.$attribute=null,this.class=null},e}();r.AttributeController=o},e.f[16]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.count=0,this.element=e}return e.prototype.addElement=function(e){this.count++,this.items||(this.items={}),this.items["e"+this.count]=e},e.prototype.addAttribute=function(e){this.count++,this.items||(this.items={}),this.items["a"+this.count]=e},e.prototype.addInterpolate=function(e){this.count++,this.items||(this.items={}),this.items["i"+this.count]=e},e.prototype.getElement=function(){return this.element},e.prototype.clearView=function(){for(var e in this.items)this.items[e].detached&&this.items[e].detached();this.items=null,this.element=null},e}();t.ViewController=r},e.f[17]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(18);r.BindingEngine=n.BindingEngine},e.f[18]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(19),i=e.r(20),s=e.r(23),a=e.r(28),o=e.r(41),u=e.r(42),l=e.r(44),h=e.r(45),c=e.r(46),d=e.r(50),p=e.r(51),f=e.r(52),v=e.r(1),b=function(){function e(){}return e.tokenizeParseAndTraverseAST=function(e,t){var r;if(v.Cache.expressionMapHas(e)){r=v.Cache.expressionMapGet(e).ast}else{var a=i.tokenize(e);r=s.generateAST(a)}return n.traverseAST(r,t)},e.tokenize=i.tokenize,e.traverseAST=n.traverseAST,e.generateAST=s.generateAST,e.valueConvert=n.valueConvert,e.getBehavior=n.getBehavior,e.createBindingExpression=a.createBindingExpression,e.setValue=o.setValue,e.subscribeClassProperty=u.subscribeClassProperty,e.unSubscribeClassProperty=l.unSubscribeClassProperty,e.evaluateExpression=h.evaluateExpression,e.subscribeClassArray=c.subscribeClassArray,e.unSubscribeClassArray=d.unSubscribeClassArray,e.unSubscribeClassMetaBinding=p.unSubscribeClassMetaBinding,e.subscribeClassMetaBinding=f.subscribeClassMetaBinding,e}();r.BindingEngine=b},e.f[19]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n,i,s=e.r(7),a={},o={},u=((i=function(){return function(){}}()).operator=function(e,t,r){switch(e){case"+":return t+r;case"-":return r?t-r:-t;case"*":return t*r;case"!":return!t;case"%":return t%r;case">":return t>r;case"<":return t<r;case">=":return t>=r;case"&&":return t&&r;case"||":return t||r;case"<=":return t<=r;case"===":return t===r;case"!==":return t!==r;case"/":return t/r;case"^":return t^r}},i.checkArity=function(e,t){var r;return e&&"literal"===e.arity&&(r=e.value),e&&"variable"===e.arity&&(r=u.variable(e,t)),e&&"binary"===e.arity&&(r=u.binary(e,t)),e&&"unary"===e.arity&&(r=u.binary(e,t)),e&&"ternary"===e.arity&&(r=u.ternary(e,t)),e&&"valueConverter"===e.arity&&(r=u.valueConverter(e,t)),r},i.variable=function(e,t){var r;try{switch(!0){case"null"===e.value&&"variable"===e.arity:return null;case"undefined"===e.value&&"variable"===e.arity:return;case"variable"===e.arity&&"string"==typeof e.value&&"TRUE"===e.value.toUpperCase():return!0;case"variable"===e.arity&&"string"==typeof e.value&&"FALSE"===e.value.toUpperCase():return!1}var n,i=void 0,s=void 0;a[e.value]?(i=a[e.value],s=o[e.value]):(i=e.value.split(/\.|\[([^\]]+)\]\.?/).filter(function(e){return e||null}),a[e.value]=i,o[e.value]="string"==typeof i[0]&&"$"!==i[0][0]);var u=t;t.isMultiContext&&(u=t.ctx);for(var l=0;l<i.length;l++)if(i[l])if(0===l){if(n=u[i[l]],s&&u&&u.overrideContext)for(;u.overrideContext;)i[l]in u.overrideContext&&(n=u.overrideContext[i[l]]),u=u.overrideContext}else n=n[i[l]];t.isMultiContext&&void 0===n&&(u=t,i.forEach(function(e,t){if(e)if(0===t){if(n=u[e],"string"==typeof e&&"$"!==e[0]&&u&&u.overrideContext)for(;u.overrideContext;)e in u.overrideContext&&(n=u.overrideContext[e]),u=u.overrideContext}else n=n[e]})),r=n}catch(e){}return r},i.binary=function(e,t){var r;if(e.isFunction){var n=[];e.second.forEach(function(e){n.push(u.evaluate(e,t))});var i=t;t.isMultiContext&&(i=t.ctx);var s=i[e.first.value];if(i&&i.overrideContext)for(;i.overrideContext;)i.overrideContext[e.first.value]&&(s=i.overrideContext[e.first.value]),i=i.overrideContext;return s.apply(i,n)}var a=u.checkArity(e.first,t);return r=u.checkArity(e.second,t),u.operator(e.value,a,r)},i.ternary=function(e,t){var r=u.checkArity(e.first,t),n=u.checkArity(e.second,t),i=u.checkArity(e.third,t);return r?n:i},i.valueConverter=function(e,t){var r,i=[];e.args.forEach(function(e){i.push(u.checkArity(e,t))});var a,o=s.ContainerValueConverters.findConverter(e.value);if(o){a=s.ContainerClasses.get(o);try{r=n?a.fromView.apply(t,i):a.toView.apply(t,i)}catch(t){console.log("value converter failed:"+e.value)}}else console.log("value converter does not exist:"+e.value);return r},i.evaluate=function(e,t){n=!1;for(var r=Array.isArray(e)?e:[e],i=[],s=0;s<r.length;s++){var a=void 0;switch(!0){case"literal"===r[s].arity:a=r[s].value;break;case"unary"===r[s].arity:case"binary"===r[s].arity:a=u.binary(r[s],t);break;case"variable"===r[s].arity:a=u.variable(r[s],t);break;case"ternary"===r[s].arity:a=u.ternary(r[s],t);break;case"behavior"===r[s].arity:break;case"valueConverter"===r[s].arity:a=u.valueConverter(r[s],t);break;default:console.log("unknown expression")}i.push(a)}return i.length>1?i.join(""):i[0]},i.traverseOnlyValueConverter=function(e,t,r){var i,a=[];t.args.forEach(function(e,t){t>0&&a.push(u.checkArity(e,r))}),a=[e].concat(a);var o,l=s.ContainerValueConverters.findConverter(t.value);if(l){o=s.ContainerClasses.get(l);try{i=n?o.fromView.apply(r,a):o.toView.apply(r,a)}catch(e){console.log("value converter failed:"+t.value)}}else console.log("value converter does not exist:"+t.value);return i},i.evaluateConverterFromViewOnly=function(e,t,r){var i=Array.isArray(e)?e:[e],s=[];n=!0;for(var a=!1,o=0;o<i.length;o++){var l=void 0;switch(!0){case"valueConverter"===i[o].arity:a=!0,l=u.traverseOnlyValueConverter(t,i[o],r)}l&&s.push(l)}return s.length>1?s.join(""):a?s[0]:t},i.getBehaviorFunctions=function(e){for(var t=Array.isArray(e)?e:[e],r=[],n=0;n<t.length;n++){var i=void 0;switch(!0){case"behavior"===t[n].arity:i={name:t[n].value,args:t[n].args.map(function(e){return e.value})}}i&&r.push(i)}return r},i);r.traverseAST=function(e,t){return u.evaluate(e,t)},r.valueConvert=function(e,t,r){return u.evaluateConverterFromViewOnly(e,r,t)},r.getBehavior=function(e){return u.getBehaviorFunctions(e)}},e.f[20]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(21);r.tokenize=function(e){return new n.Tokenizer(e).start()}},e.f[21]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=new(e.r(22).CharCodes),i=function(){function e(e){this.baseTokens=[],this.chars=[],this.curChar=null,this.curCharNo=0,this.curtype=null,this.expressionOriginal=e,this.isMix=-1!==e.indexOf("${"),this.isOutsideExpression=this.isMix,this.expression=this.trim(this.expressionOriginal),this.curtype=e.indexOf("${")>0?"string":null,this.curChar=this.expression.charCodeAt(this.curCharNo),this.expressionLength=this.expression.length}return e.prototype.start=function(){return this.generateBaseTokens(),this.baseTokens},e.prototype.trim=function(e){for(var t=this.isOutsideExpression,r="",i=0;i<e.length;i++)switch(!0){case t&&n.DOLLAR.has(e.charCodeAt(i))&&n.MUSTACHE_START.has(e.charCodeAt(i+1)):r+=e[i],t=!1;break;case!t&&n.MUSTACHE_END.has(e.charCodeAt(i)):r+=e[i],t=!0;break;case t&&!n.STRING_START_END.has(e.charCodeAt(i)):r+=e[i];break;case t&&n.STRING_START_END.has(e.charCodeAt(i)):r+=e[i],t=!1;break;case!t&&n.STRING_START_END.has(e.charCodeAt(i)):r+=e[i],t=!0;break;case!t&&n.WHITESPACE.has(e.charCodeAt(i)):break;case!t&&!n.WHITESPACE.has(e.charCodeAt(i)):r+=e[i]}return r},e.prototype.advance=function(){this.curCharNo++,this.curChar=this.expression.charCodeAt(this.curCharNo)},e.prototype.getString=function(){for(var e=n.STRING_START_END.has(this.curChar),t=this.expressionStart(),r=this.parsedAllChars();!e&&!t&&!r;)this.chars.push(this.curChar),this.advance(),e=n.STRING_START_END.has(this.curChar),t=this.expressionStart(),r=this.parsedAllChars();this.curtype&&this.addToken(),this.isOutsideExpression||!e||t||this.advance()},e.prototype.getNumber=function(){for(var e=n.REAL.has(this.curChar),t=this.expressionStart(),r=this.parsedAllChars();e&&!t&&!r;)this.chars.push(this.curChar),this.advance(),e=n.REAL.has(this.curChar),t=this.expressionStart(),r=this.parsedAllChars();this.addToken()},e.prototype.parsedAllChars=function(){return!(this.curCharNo<this.expressionLength)},e.prototype.getVariable=function(){for(var e=n.VARIABLE.has(this.curChar),t=this.expressionStart(),r=this.parsedAllChars();e&&!t&&!r;)this.chars.push(this.curChar),this.advance(),e=n.VARIABLE.has(this.curChar),t=this.expressionStart(),r=this.parsedAllChars();this.addToken()},e.prototype.getOperator=function(){var e=n.OPERATOR.has(this.curChar),t=this.expressionStart(),r=n.BRACKETLEFT.has(this.curChar),i=n.BRACKETRIGHT.has(this.curChar),s=this.negativeNumber(),a=this.parsedAllChars();if(r||i)this.chars.push(this.curChar),this.advance();else for(;e&&!t&&!a&&!r&&!i&&!s;)this.chars.push(this.curChar),this.advance(),e=n.OPERATOR.has(this.curChar),r=n.BRACKETLEFT.has(this.curChar),i=n.BRACKETRIGHT.has(this.curChar),t=this.expressionStart(),s=this.negativeNumber(),a=this.parsedAllChars();this.chars.length>0&&this.addToken(),s&&(this.curtype=null,this.chars.push(this.curChar),this.advance())},e.prototype.expressionStart=function(){var e=this.expression.charCodeAt(this.curCharNo),t=this.expression.charCodeAt(this.curCharNo+1);return n.DOLLAR.has(e)&&n.MUSTACHE_START.has(t)},e.prototype.negativeNumber=function(){var e=this.expression.charCodeAt(this.curCharNo-1),t=this.expression.charCodeAt(this.curCharNo),r=this.expression.charCodeAt(this.curCharNo+1);return n.OPERATOR.has(e)&&n.PLUS_OR_MINUS.has(t)&&n.NUMBERS.has(r)},e.prototype.addToken=function(){var e=this.chars.map(function(e){return String.fromCharCode(e)}).join("");this.baseTokens.push({type:this.curtype,value:"number"===this.curtype?parseFloat(e):e}),this.chars=[],this.curtype=null},e.prototype.generateBaseTokens=function(){for(var e=this.parsedAllChars();!e;){switch(!0){case this.expressionStart():this.isOutsideExpression=!1,this.curtype="operator",this.chars.push(";".charCodeAt(0)),this.addToken(),this.advance(),this.advance();break;case this.isOutsideExpression:this.getString();break;case null===this.curtype&&n.STRING_START_END.has(this.curChar):this.curtype="string",this.advance(),this.getString();break;case null===this.curtype&&n.MUSTACHE_END.has(this.curChar):this.isOutsideExpression=!0,this.curtype="operator",this.chars.push(";".charCodeAt(0)),this.addToken(),this.curtype="string",this.advance();break;case null===this.curtype&&n.NUMBERS.has(this.curChar):this.curtype="number",this.getNumber();break;case null===this.curtype&&n.VARIABLE.has(this.curChar):this.curtype="variable",this.getVariable();break;case null===this.curtype&&n.WHITESPACE.has(this.curChar):this.advance();break;case null===this.curtype&&n.OPERATOR.has(this.curChar):this.curtype="operator",this.getOperator();break;default:console.warn("bug tokenizer",String.fromCharCode(this.curChar)),console.warn("bug tokenizer",this.expression),this.advance()}e=this.parsedAllChars()}},e}();r.Tokenizer=i},e.f[22]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(){var e=this;this.WHITESPACE=new Set,[32,10,13].map(function(t){return e.WHITESPACE.add(t)}),this.STRING_START_END=new Set,["'"].map(function(t){return e.STRING_START_END.add(t.charCodeAt(0))}),this.MINUS=new Set,["-"].map(function(t){return e.MINUS.add(t.charCodeAt(0))}),this.PLUS=new Set,["+"].map(function(t){return e.PLUS.add(t.charCodeAt(0))}),this.PLUS_OR_MINUS=new Set,["+","-"].map(function(t){return e.PLUS_OR_MINUS.add(t.charCodeAt(0))}),this.UNDERSCORE=new Set,["_"].map(function(t){return e.UNDERSCORE.add(t.charCodeAt(0))}),this.DOT=new Set,["."].map(function(t){return e.DOT.add(t.charCodeAt(0))}),this.BRACKETLEFT=new Set,["("].map(function(t){return e.BRACKETLEFT.add(t.charCodeAt(0))}),this.BRACKETRIGHT=new Set,[")"].map(function(t){return e.BRACKETRIGHT.add(t.charCodeAt(0))}),this.NOT=new Set,["!"].map(function(t){return e.NOT.add(t.charCodeAt(0))}),this.ASSIGN=new Set,["="].map(function(t){return e.ASSIGN.add(t.charCodeAt(0))}),this.OPERATOR=new Set,["=","!",">","<","+","-","*","/","%","^","(",")","|","&","?",":",","].map(function(t){return e.OPERATOR.add(t.charCodeAt(0))}),this.NUMBERS=new Set,["1","2","3","4","5","6","7","8","9","0"].map(function(t){return e.NUMBERS.add(t.charCodeAt(0))}),this.LETTERS_UPPER=new Set,["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"].map(function(t){return e.LETTERS_UPPER.add(t.charCodeAt(0))}),this.LETTERS_LOWER=new Set,["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"].map(function(t){return e.LETTERS_LOWER.add(t.charCodeAt(0))}),this.LETTERS=new Set,["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"].map(function(t){return e.LETTERS.add(t.charCodeAt(0))}),this.SQUARE_BRACKET_RIGHT=new Set,["["].map(function(t){return e.SQUARE_BRACKET_RIGHT.add(t.charCodeAt(0))}),this.SQUARE_BRACKET_LEFT=new Set,["["].map(function(t){return e.SQUARE_BRACKET_LEFT.add(t.charCodeAt(0))}),this.SQUARE_BRACKETS=new Set,["[","["].map(function(t){return e.SQUARE_BRACKETS.add(t.charCodeAt(0))}),this.DOLLAR=new Set,["$"].map(function(t){return e.DOLLAR.add(t.charCodeAt(0))}),this.MUSTACHE_START=new Set,["{"].map(function(t){return e.MUSTACHE_START.add(t.charCodeAt(0))}),this.MUSTACHE_END=new Set,["}"].map(function(t){return e.MUSTACHE_END.add(t.charCodeAt(0))}),this.REAL=new Set,["1","2","3","4","5","6","7","8","9","0","."].map(function(t){return e.REAL.add(t.charCodeAt(0))}),this.VARIABLE=new Set,["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","1","2","3","4","5","6","7","8","9","0",".","$","_","[","["].map(function(t){return e.VARIABLE.add(t.charCodeAt(0))})}}();t.CharCodes=r},e.f[23]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(24),i=e.r(26),s=e.r(27),a=new n.AST,o=new i.SymbolContainer;a.addSymbolContainer(o),s.addSymbols(a),r.generateAST=function(e){return a.start(e)}},e.f[24]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(25),i=function(){function e(){this.currentStatement=null,this.currentTokenIndex=0}return e.prototype.start=function(e){return this.tokens=e,this.currentStatement=null,this.currentTokenIndex=0,this.currentToken=null,this.advance(),this.statements()},e.prototype.addSymbolContainer=function(e){this.symbolContainer=e},e.prototype.symbol=function(e,t){var r=this.symbolContainer[e];return t=t||0,r?t>=r.lbp&&(r.lbp=t):((r=new n.SymbolTemplate).id=r.value=e,r.lbp=t,this.symbolContainer[e]=r),r},e.prototype.prefix=function(e,t){var r=this.symbol(e),n=this;return r.nud=t||function(){return this.first=n.expression(70),this.arity="unary",this},r},e.prototype.infix=function(e,t,r){var n=this.symbol(e,t),i=this;return n.led=r||function(e){return this.first=e,this.second=i.expression(t),this.arity="binary",this},n},e.prototype.infixr=function(e,t,r){var n=this.symbol(e,t),i=this;return n.led=r||function(e){return this.first=e,this.second=i.expression(t-1),this.arity="binary",this},n},e.prototype.statement=function(){var e=this.currentToken;return e.std?(this.advance(),e.std()):this.expression(0)},e.prototype.statements=function(){for(var e,t=[];"}"!==this.currentToken.id&&"(end)"!==this.currentToken.id;)e=this.statement(),this.currentStatement&&(this.currentStatement.args.unshift(t.pop()),this.currentStatement=null),e&&t.push(e);return 0===t.length?null:1===t.length?t[0]:t},e.prototype.advance=function(e){var t,r,n,i;if((n=this.tokens[this.currentTokenIndex])&&e&&n.id,!(this.currentTokenIndex>=this.tokens.length))return this.currentTokenIndex+=1,i=n.value,"variable"===(t=n.type)?(t="variable",r=this.symbolContainer["(variable)"]):"operator"===t?(r=this.symbolContainer[i])||console.log("Unknown operator.",n):"string"===t||"number"===t?(t="literal",r=this.symbolContainer["(literal)"]):console.log("Unexpected token.",n),this.currentToken=Object.create(r),this.currentToken.value=i,this.currentToken.arity=t,this.currentToken;this.currentToken=this.symbolContainer["(end)"]},e.prototype.expression=function(e){var t,r=this.currentToken;this.advance(),t=r.nud();try{for(;e<this.currentToken.lbp;)r=this.currentToken,this.advance(),t=r.led(t)}catch(e){console.log("parser fail")}return t},e}();r.AST=i},e.f[25]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){}return e.prototype.nud=function(){console.error("Undefined.")},e.prototype.led=function(){console.error("Missing operator.")},e}();t.SymbolTemplate=r},e.f[26]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(){}}();t.SymbolContainer=r},e.f[27]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.addSymbols=function(e){var t=e;t.symbol("(literal)").nud=function(){return this},t.symbol("(variable)").nud=function(){return this},t.symbol("(function)").nud=function(){return this},t.symbol("(end)"),t.symbol("(name)"),t.symbol(":"),t.symbol(";"),t.symbol(")"),t.symbol("]"),t.symbol("}"),t.symbol(","),t.infix("+",50),t.infix("-",50),t.infix("*",60),t.infix("%",60),t.infix("/",60),t.infix("===",40),t.infix("!==",40),t.infix("<",40),t.infix("<=",40),t.infix(">",40),t.infix("^",70),t.infix(">=",40),t.infix("?",20,function(e){return this.first=e,this.second=t.expression(0),t.advance(":"),this.third=t.expression(0),this.arity="ternary",this}),t.infix(".",80,function(e){return this.first=e,"name"!==t.currentToken.arity&&t.currentToken.error("Expected a property name."),t.currentToken.arity="literal",this.second=t.currentToken,this.arity="binary",t.advance(),this}),t.infix("[",80,function(e){return this.first=e,this.second=t.expression(0),this.arity="binary",t.advance("]"),this}),t.infix("(",80,function(e){if(!e)return t.expression(0);var r=[];if(this.arity="binary",this.isFunction=!0,this.first=e,this.second=r,"unary"===e.arity&&"function"===e.id||"variable"===e.arity||"("===e.id||"&&"===e.id||"||"===e.id||"?"===e.id||e.error("Expected a variable name."),")"!==t.currentToken.id)for(;r.push(t.expression(0)),","===t.currentToken.id;)t.advance(",");return t.advance(")"),this}),t.prefix("-"),t.prefix("!"),t.prefix("typeof"),t.prefix("(",function(){var e=t.expression(0);return t.advance(")"),e}),t.infixr("&&",30),t.infixr("||",30),t.symbol("|").nud=function(){this.arity="valueConverter";var e=t.expression(0);this.value=e.value;var r=[];for(this.args=r;":"===t.currentToken.id;)t.advance(","),r.push(t.expression(0));return t.currentStatement=this,this},t.symbol("&").nud=function(){this.arity="behavior";var e=t.expression(0);this.value=e.value;var r=[];for(this.args=r;":"===t.currentToken.id;)t.advance(","),r.push(t.expression(0));return this},t.symbol(";").nud=function(){return null}}},e.f[28]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(20),i=e.r(23),s=e.r(29),a=e.r(1),o=e.r(31),u={},l=function(e,t){var r;u[e]?r=u[e]:(r=e.split(/\.|\[([^\]]+)\]\.?/).filter(function(e){return e||null})[0],u[e]=r);var n,i=t;if(t.isMultiContext&&(i=t.ctx),"string"==typeof r&&"$"!==r[0]&&i&&i.overrideContext)for(;i.overrideContext;)r in(i=i.overrideContext)&&(n=i);return n||t};r.createBindingExpression=function(e,t,r){var u,h,c,d;if(e){if(h=e,c=[],a.Cache.expressionMapHas(h))u=a.Cache.expressionMapGet(h),c=u.attributes,d=u.ast;else{var p=n.tokenize(h);d=i.generateAST(p),p.forEach(function(e){if("variable"===e.type){var r=l(e.value,t);"string"==typeof e.value&&"$"!==e.value[0]&&r&&r.__proto__&&r.__proto__[o.CONSTANTS.META_COMPUTEDFROM]&&r.__proto__[o.CONSTANTS.META_COMPUTEDFROM][e.value]?r.__proto__[o.CONSTANTS.META_COMPUTEDFROM][e.value].attributes.forEach(function(e){-1===c.indexOf(e)&&c.push(e)}):-1===c.indexOf(e.value)&&c.push(e.value)}}),a.Cache.expressionMapSet(h,{attributes:c,ast:d})}r.setAst(d);for(var f=0;f<c.length;f++){var v=l(c[f],t);s.ClassPropertyObserverCreator.create(v||t,c[f],r)}r.init()}},r.removeBindingExpression=function(e,t,r){if(e&&a.Cache.expressionMapHas(e))for(var n=a.Cache.expressionMapGet(e).attributes,i=0;i<n.length;i++){var o=l(n[i],t);s.ClassPropertyObserverCreator.remove(o||t,n[i],r)}}},e.f[29]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(30),i=function(){return function(){}}(),s=new Map,a=function(){function e(){}return e.create=function(t,r,n){this.classRef=t,s.has(r)?this.keyParts=s.get(r):(this.keyParts=r.split(/\.|\[([^\]]+)\]\.?/).filter(function(e){return e||null}),s.set(r,this.keyParts)),this.keyNo=0,this.keyBlock=this.keyParts[this.keyNo],e.processKeys(n),e.clear()},e.remove=function(t,r,n){this.classRef=t,s.has(r)?this.keyParts=s.get(r):(this.keyParts=r.split(/\.|\[([^\]]+)\]\.?/).filter(function(e){return e||null}),s.set(r,this.keyParts)),this.keyNo=0,this.keyBlock=this.keyParts[this.keyNo],e.removeKeys(n),e.clear()},e.clear=function(){this.classRef=null,this.keyParts=null,this.keyNo=null,this.keyBlock=null},e.nextKey=function(){this.keyNo++,this.keyBlock=this.keyParts[this.keyNo]},e.processKeys=function(e){this.classRef.__observer||(this.classRef.__observer=new i),this.classRef.__observer[this.keyBlock]?(this.classRef.__observer[this.keyBlock].subscribe(e),this.classRef.__observer[this.keyBlock].observe()):(this.classRef.__observer[this.keyBlock]=new n.ClassPropertyObserver(this.classRef,this.keyBlock),this.classRef.__observer[this.keyBlock].subscribe(e)),this.keyNo!==this.keyParts.length-1&&this.keyParts.length>1&&(this.classRef&&(this.classRef=this.classRef[this.keyBlock]),this.nextKey(),this.classRef&&this.processKeys(e))},e.removeKeys=function(e){this.classRef.__observer[this.keyBlock]&&this.classRef.__observer[this.keyBlock].unsubscribe(e),this.keyNo!==this.keyParts.length-1&&this.keyParts.length>1&&(this.classRef&&(this.classRef=this.classRef[this.keyBlock]),this.nextKey(),this.classRef&&this.removeKeys(e))},e}();r.ClassPropertyObserverCreator=a},e.f[30]=function(e,t){var r,n,i,s,a;Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){this._class=e,this.key=t,this.setterBind=this.setter.bind(this),this.getterBind=this.getter.bind(this),"object"==typeof this._class&&(this.value=this._class[this.key],this.observe())}return e.prototype.unsubscribe=function(e){this.c1===e&&(this.c1=null),this.c2===e&&(this.c2=null),this.c3===e&&(this.c3=null),this.c4===e&&(this.c4=null),this.c5===e&&(this.c5=null),this.callers&&-1!==this.callers.indexOf(e)&&this.callers.splice(this.callers.indexOf(e),1)},e.prototype.subscribe=function(e){this.c1!==e&&this.c2!==e&&this.c3!==e&&this.c4!==e&&this.c5!==e&&(this.c1?this.c2?this.c3?this.c4?this.c5?(this.callers||(this.callers=[]),-1===this.callers.indexOf(e)&&this.callers.push(e)):this.c5=e:this.c4=e:this.c3=e:this.c2=e:this.c1=e)},e.prototype.observe=function(){var e=Reflect.getOwnPropertyDescriptor(this._class.__proto__,this.key),t=null;e&&(t=e.get||e.set)&&console.log("skipping dirty observer - no-dirty //todo remove this message"),null===t&&(Reflect.defineProperty(this._class,this.key,{configurable:!0,enumerable:!0,set:this.setterBind,get:this.getterBind})||console.warn("This key could not be observed:"+this.key))},e.prototype.setter=function(e){if(e!==this.value&&("object"==typeof e&&(e&&e.__observer&&(e.__observer=null),e&&e.__observerArray&&(e.__observerArray=null)),this.value=e,this.c1&&(r=this.c1,this.c1=void 0,r.update()),this.c2&&(n=this.c2,this.c2=void 0,n.update()),this.c3&&(i=this.c3,this.c3=void 0,i.update()),this.c4&&(s=this.c4,this.c4=void 0,s.update()),this.c5&&(a=this.c5,this.c5=void 0,a.update()),this.callers&&this.callers.length>0)){var t=this.callers.slice();this.callers=[],t.forEach(function(e){e.update()})}},e.prototype.getter=function(){return this.value},e}();t.ClassPropertyObserver=o},e.f[31]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(32);r.IElement=n.IElement;var i=e.r(33);r.IAttribute=i.IAttribute;var s=e.r(34);r.IControllerArray=s.IControllerArray;var a=e.r(35);r.IControllerObject=a.IControllerObject;var o=e.r(36);r.IRepeatCache=o.IRepeatCache;var u=e.r(37);r.CONSTANTS=u.CONSTANTS;var l=e.r(38);r.IListener=l.IListener;var h=e.r(39);r.ITokens=h.ITokens;var c=e.r(40);r.INode=c.INode},e.f[32]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},e.f[33]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},e.f[34]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},e.f[35]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},e.f[36]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},e.f[37]=function(e,t){var r;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.CONSTANTS||(t.CONSTANTS={}))[r.META_BINDABLE="__meta_bindable"]="META_BINDABLE",r[r.META_COMPUTEDFROM="__meta_computed_from"]="META_COMPUTEDFROM",r[r.ELEMENT_DETACH="__MF__detach"]="ELEMENT_DETACH",r[r.ELEMENT_BINDED="__MF__binded"]="ELEMENT_BINDED",r[r.ELEMENT_ADD="__MF__add"]="ELEMENT_ADD"},e.f[38]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},e.f[39]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},e.f[40]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},e.f[41]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r={},n=function(e,t){var n;r[e]?n=r[e]:(n=e.split(/\.|\[([^\]]+)\]\.?/).filter(function(e){return e||null})[0],r[e]=n);var i,s=t;if(t.isMultiContext&&(s=t.ctx),"string"==typeof n&&"$"!==n[0]&&s&&s.overrideContext)for(;s.overrideContext;)n in(s=s.overrideContext)&&(i=s);return i||t};t.setValue=function(e,t,r){e=n(t,e);var i=t.split(/\.|\[([^\]]+)\]\.?/).filter(function(e){return e||null});try{var s;i.length>1?i.forEach(function(t,n){t&&(n===i.length-1?s[t]=r:s=0===n?e[t]:s[t])}):e[t]=r}catch(n){try{console.warn("key not found, rebuilding",t);var a,o={};i.forEach(function(e,t){e&&(t===i.length-1?0===t?(o[e]={},a=o[e]):a[e]=r:0===t?(o[e]={},a=o[e]):(a[e]={},a=a[e]))});var u=e;i.forEach(function(e,t){e&&(t===i.length-1?u[e]||(u[e]=o[e]):(u[e]||(u[e]=o[e]),o=o[e],u=u[e]))})}catch(e){console.error("key not found",t)}}}},e.f[42]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(43);r.subscribeClassProperty=function(e,t,r){var i=new n.PropertyObserverHandler(t,r);i.bind(e),r.caller=i}},e.f[43]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(19),i=e.r(28),s=e.r(1),a=e.r(7),o=function(){function e(e,t){this.value=void 0,this.oldValue=void 0,this.newValue=void 0,this.isWaiting=!1,this.isNew=!0,this.expression=e,this.listener=t,this.queue=a.ContainerClasses.get(s.Queue)}return e.prototype.bind=function(e){this.observing=!0,this.context=e,i.createBindingExpression(this.expression,this.context,this)},e.prototype.setAst=function(e){this.ast=e,this.curBehavior||this.connectBehavior()},e.prototype.init=function(){if(this.isNew){this.isNew=!1;var e=this.value,t=n.traverseAST(this.ast,this.context);this.value=t,this.listenerCall(t,e),this.isNew=!1}},e.prototype.connectBehavior=function(){var e=this,t=n.getBehavior(this.ast);t&&t.forEach(function(t){if("signal"===name){var r=a.ContainerBehavior.findBehavior(t.name);r&&(e.curBehavior=new r(e,t.args))}})},e.prototype.update=function(){this.observing&&(this.oldValue=this.value,this.newValue=n.traverseAST(this.ast,this.context),this.oldValue!==this.newValue?(this.value=this.newValue,this.isWaiting||(this.isWaiting=!0,this.queue.add(this))):(this.oldValue=null,this.newValue=null),this.bind(this.context))},e.prototype.listenerCall=function(e,t){this.listener&&this.listener.call(e,t)},e.prototype.call=function(e){var t=this.newValue,r=this.oldValue;this.oldValue=null,this.newValue=null,this.listenerCall(t,r),this.isWaiting=!1,e()},e.prototype.unbind=function(){this.observing&&i.removeBindingExpression(this.expression,this.context,this),this.listener.caller=null,this.observing=!1,this.context=null,this.listener=null,this.value=null},e}();r.PropertyObserverHandler=o},e.f[44]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.unSubscribeClassProperty=function(e,t){t.caller&&t.caller.unbind()}},e.f[45]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(19),i=e.r(20),s=e.r(23),a=e.r(1);r.evaluateExpression=function(e,t){if(e){var r=void 0;if(a.Cache.astMapHas(e))r=a.Cache.astMapGet(e);else{var o=i.tokenize(e);r=s.generateAST(o),a.Cache.astMapSet(e,r)}return n.traverseAST(r,t)}return""}},e.f[46]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(47);r.subscribeClassArray=function(e,t,r){var i=new n.ArrayObserverHandler(t,r);i.bind(e),r.caller=i}},e.f[47]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(48),i=e.r(1),s=e.r(7),a=function(){function e(e,t){this.isWaiting=!1,this.data=void 0,this.expression=e,this.listener=t,this.isWaiting=null,this.queue=s.ContainerClasses.get(i.Queue)}return e.prototype.bind=function(e){this.observing=!0,this.context=e,n.ClassArrayObserverCreator.create(this.context,this.expression,this)},e.prototype.update=function(e){this.data=e,this.observing&&(this.isWaiting||(this.isWaiting=!0,this.queue.add(this)),this.bind(this.context))},e.prototype.call=function(e){var t=this.data;this.data=null,this.listener&&this.listener.call(t),this.isWaiting=!1,e()},e.prototype.unbind=function(){this.observing&&n.ClassArrayObserverCreator.remove(this.context,this.expression,this),this.listener.caller=null,this.listener=null,this.observing=!1,this.context=null,this.data=null,this.expression=null},e}();r.ArrayObserverHandler=a},e.f[48]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(49),i=function(){return function(){}}(),s={},a=function(){function e(){}return e.create=function(t,r,n){this.classRef=t,s[r]?this.keyParts=s[r]:(this.keyParts=r.split(/\.|\[([^\]]+)\]\.?/).filter(function(e){return e||null}),s[r]=this.keyParts),this.keyNo=0,this.keyBlock=this.keyParts[this.keyNo],e.processKeys(n),e.clear()},e.remove=function(t,r,n){this.classRef=t,s[r]?this.keyParts=s[r]:(this.keyParts=r.split(/\.|\[([^\]]+)\]\.?/).filter(function(e){return e||null}),s[r]=this.keyParts),this.keyNo=0,this.keyBlock=this.keyParts[this.keyNo],e.removeKeys(n),e.clear()},e.clear=function(){this.classRef=null,this.keyParts=null,this.keyNo=null,this.keyBlock=null},e.nextKey=function(){this.keyNo++,this.keyBlock=this.keyParts[this.keyNo]},e.processKeys=function(e){this.classRef.__observerArray||(this.classRef.__observerArray=new i),this.classRef.__observerArray[this.keyBlock]?(this.classRef.__observerArray[this.keyBlock].subscribe(e),this.classRef.__observerArray[this.keyBlock].observe()):(this.classRef.__observerArray[this.keyBlock]=new n.ClassArrayObserver(this.classRef,this.keyBlock),this.classRef.__observerArray[this.keyBlock].subscribe(e)),this.keyNo!==this.keyParts.length-1&&this.keyParts.length>1&&(this.classRef&&(this.classRef=this.classRef[this.keyBlock]),this.nextKey(),this.classRef&&this.processKeys(e))},e.removeKeys=function(e){this.classRef.__observerArray&&this.classRef.__observerArray[this.keyBlock]&&this.classRef.__observerArray[this.keyBlock].unsubscribe(e),this.keyNo!==this.keyParts.length-1&&this.keyParts.length>1&&(this.classRef&&(this.classRef=this.classRef[this.keyBlock]),this.nextKey(),this.classRef&&this.removeKeys(e))},e}();r.ClassArrayObserverCreator=a},e.f[49]=function(e,t){var r,n,i,s,a;Object.defineProperty(t,"__esModule",{value:!0});["pop","push","reverse","shift","sort","splice","unshift","sort"].forEach(function(e){var t=Array.prototype[e];Array.prototype[e]=function(){return this.__array_observer__class&&this.__array_observer__class.check(arguments,e),t.apply(this,arguments)}});var o=function(){function e(e,t){this.internalEvents=[],this.timer=null,this._class=e,this.key=t,"object"==typeof this._class&&this.observe()}return e.prototype.subscribe=function(e){this.c1!==e&&this.c2!==e&&this.c3!==e&&this.c4!==e&&this.c5!==e&&(this.c1?this.c2?this.c3?this.c4?this.c5?(this.callers||(this.callers=[]),-1===this.callers.indexOf(e)&&this.callers.push(e)):this.c5=e:this.c4=e:this.c3=e:this.c2=e:this.c1=e)},e.prototype.unsubscribe=function(e){this.c1===e&&(this.c1=null),this.c2===e&&(this.c2=null),this.c3===e&&(this.c3=null),this.c4===e&&(this.c4=null),this.c5===e&&(this.c5=null),this.callers&&-1!==this.callers.indexOf(e)&&this.callers.splice(this.callers.indexOf(e),1)},e.prototype.check=function(e,t){var o=this;clearTimeout(this.timer),this.timer=0,this.internalEvents.push({event:t,args:e}),this.timer=setTimeout(function(){if(o.c1&&(r=o.c1,o.c1=void 0,r.update(o.internalEvents)),o.c2&&(n=o.c2,o.c2=void 0,n.update(o.internalEvents)),o.c3&&(i=o.c3,o.c3=void 0,i.update(o.internalEvents)),o.c4&&(s=o.c4,o.c4=void 0,s.update(o.internalEvents)),o.c5&&(a=o.c5,o.c5=void 0,a.update(o.internalEvents)),o.callers&&o.callers.length>0){var e=o.callers.slice();o.callers=[],e.forEach(function(e){e.update(o.internalEvents)})}o.internalEvents=null,o.internalEvents=[]},0)},e.prototype.observe=function(){this._class[this.key].__array_observer__class=this},e}();t.ClassArrayObserver=o},e.f[50]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.unSubscribeClassArray=function(e,t){t.caller&&t.caller.unbind()}},e.f[51]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(31),i=e.r(44);r.unSubscribeClassMetaBinding=function(e){var t=e.__proto__[n.CONSTANTS.META_BINDABLE];if(t)for(var r=0,s=Object.keys(t);r<s.length;r++){var a=s[r],o=t[a].options.subscribeInternal;o&&i.unSubscribeClassProperty(e,o);var u=t[a].options.subscribeExternal;if(e.$parent&&u&&e.$element){var l=e.$element,h=t[a].options.attribute+".bind";l.getAttribute(h)&&i.unSubscribeClassProperty(e.$parent,u)}}}},e.f[52]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(42),i=e.r(18),s=e.r(31),a=function(){function e(e,t,r){this._class=e,this.key=t,this.meta=r}return e.prototype.call=function(e,t){if(t!==e){var r=this.key,n=this._class,i=this.meta;n[r+"Changed"]&&n[r+"Changed"](e,t),i[r].options.changeHandler&&n[i[r].options.changeHandler]("key",e,t),n.$parent&&r in n.$parent&&n.$parent[r]!==e&&(n.$parent[r]=e)}},e}();r.subscribeClassMetaBinding=function(e){var t=e.__proto__[s.CONSTANTS.META_BINDABLE];if(t)for(var r=Object.keys(t),o=function(s){var o=new a(e,s,t);if(n.subscribeClassProperty(e,s,o),t[s].options.subscribeInternal=o,e.$attributes&&!e.$attribute){if(e.$element&&e.$parent){var u=e.$element,l=t[s].options.attribute+".bind";if(d=u.getAttribute(l)){var h=Object.create({call:function(t,r){r!==t&&(e[s]=t)}});n.subscribeClassProperty(e.$parent,d,h),t[s].options.subscribeExternal=h}else l=""+t[s].options.attribute,(d=u.getAttribute(l))&&(-1!==d.indexOf("${")?(m=i.BindingEngine.tokenizeParseAndTraverseAST(d,e.$parent))&&(e[s]=m):e[s]=d)}}else if(e.$element&&e.$parent)if(1===r.length&&"value"===s){u=e.$element;var c=(l=e.$attribute.name).indexOf(".bind"),d=u.getAttribute(l);-1!==c?(h=Object.create({call:function(t,r){r!==t&&(e[s]=t)}}),n.subscribeClassProperty(e.$parent,d,h),t[s].options.subscribeExternal=h):(d=u.getAttribute(l))&&(-1!==d.indexOf("${")?(m=i.BindingEngine.tokenizeParseAndTraverseAST(d,e.$parent))&&(e[s]=m):e[s]=d)}else{u=e.$element;var p,f=e.$attribute.name,v=t[s].options.attribute+".bind",b=u.getAttribute(f)?u.getAttribute(f).split(";"):null;if(b)if(b.forEach(function(e){var t=e.split(":");t&&t[0].trim()===v&&(p=t[1])}),p)h=Object.create({call:function(t,r){r!==t&&(e[s]=t)}}),n.subscribeClassProperty(e.$parent,p,h),t[s].options.subscribeExternal=h;else{var y,m;v=""+t[s].options.attribute,b.forEach(function(e){var t=e.split(":");t&&t[0].trim()===v&&(y=t[1])}),y&&(-1!==y.indexOf("${")?(m=i.BindingEngine.tokenizeParseAndTraverseAST(y,e.$parent))&&(e[s]=m):e[s]=y)}}},u=0,l=r;u<l.length;u++)o(l[u])}},e.f[53]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(54),i=e.r(16),s=e.r(7),a=e.r(17),o=e.r(1),u=function(){function e(e,t,r,n,a){this._process=!0,this.logger=o.Logger.getLogger(t.tagName,"element"),this.parent=e,this.element=t,this.templateString=a,this._class=r||s.ContainerClasses.get(n),t&&!t.$view&&(t.$view=new i.ViewController(t),t.$view.addElement(this))}return e.prototype.init=function(){var e;if(this._class.$element=this.element,this._class.$parent=this.parent,this._class.$attributes=this.element.attributes,a.BindingEngine.subscribeClassMetaBinding(this._class),this.loadTemplate(),this.create(),this.processContent(),this._process&&(e=n.ViewParser.parseNodes(this.template,this._class,this.element.$view)),this._process)for(;this.template.childNodes.length;)this.element.appendChild(this.template.firstChild);return e.reverse(),this.contentProcessed(e),e},e.prototype.loadTemplate=function(){if(this.logger.log("loadTemplate"),!this._class.loadTemplate)throw new Error("loadTemplate missing");this.templateString=this.templateString||this._class.loadTemplate(),this.template=n.ViewParser.createTemplate(null,this.templateString)},e.prototype.create=function(){this.logger.log("create"),this._class.created&&this._class.created()},e.prototype.processContent=function(){this.logger.log("processContent"),this._class.processContent&&(this._process=this._class.processContent(this.template))},e.prototype.contentProcessed=function(e){this.logger.log("contentProcessed"),this._class.contentProcessed&&this._process&&this._class.contentProcessed(e)},e.prototype.attached=function(){this.logger.log("attached"),this._class.attached&&this._class.attached()},e.prototype.detached=function(){this.logger.log("detached"),this._class.detached&&this._class.detached(),a.BindingEngine.unSubscribeClassMetaBinding(this._class),this.parent=null,this.element=null,this._class.$element=null,this._class.$parent=null,this._class.$attributes=null,this._class=null},e}();r.ElementController=u},e.f[54]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(7),i=e.r(7),s=e.r(1),a=e.r(15),o=e.r(53),u=e.r(55),l=function(){function e(){}return e.parseAndCreateElement=function(e,t,r,n){var i=new o.ElementController(r,t,e,null,n),s=i.init();i.attached(),s.forEach(function(e){e.attached&&e.attached()})},e.cleanTemplate=function(e){var t=function(e){for(var r=0;r<e.childNodes.length;r++){var n=e.childNodes[r];8===n.nodeType||3===n.nodeType&&!/\S/.test(n.nodeValue)?(e.removeChild(n),r--):1===n.nodeType&&t(n),n=null}};t(e)},e.createTemplate=function(t,r){var n;if(s.Cache.templateMapHas(r))n=s.Cache.templateMapGet(r);else{var i=document.createElement("div");i.innerHTML=r.default||r;var a=i.firstElementChild;if(!a.content)for(a.content=document.createDocumentFragment();a.childNodes[0];)a.content.appendChild(a.childNodes[0]);n=document.createElement(t||"mf-template"),e.cleanTemplate(a.content),n.appendChild(a.content),s.Cache.templateMapSet(r,n)}var o=n.cloneNode(!0);return n=null,o},e.clearAllViews=function(e){for(var t,r=document.createNodeIterator(e,NodeFilter.SHOW_ALL,function(e){return e.$view?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);t=r.nextNode();)t.$view.clearView()},e.parseNodes=function(e,t,r){var s=[],l=function(e){for(var h=0;h<e.childNodes.length;h++){var c=!1,d=e.childNodes[h];if(d.getAttribute){var p=d.getAttributeNode("if.bind");if(p){c=!0;var f=i.ContainerAttributes.findAttribute(p.name),v=new a.AttributeController(t,d,p,f,r);r=d.$view?d.$view:r,v.init(),v&&s.push(v)}else{var b=d.getAttributeNode("repeat.for");if(b){c=!0;f=i.ContainerAttributes.findAttribute(b.name),v=new a.AttributeController(t,d,b,f,r);r=d.$view?d.$view:r,v.init(),v&&s.push(v)}}}if(!c)for(var y=d.attributes||[],m=0;m<y.length;m++){var g=y[m],C=i.ContainerAttributes.findAttribute(g.name);if(!C&&g.name&&!(C=i.ContainerAttributes.findAttribute(g.name.replace(".bind","")))&&g.name&&!(C=i.ContainerAttributes.findAttribute("mframejs-event-trigger."+g.name.split(".")[1]))&&g.name&&(C=i.ContainerAttributes.findAttribute("mframejs-event-delegate."+g.name.split(".")[1])),C){v=new a.AttributeController(t,d,g,C,r);r=d.$view?d.$view:r,v.init(),v&&s.push(v)}}if(!c){if(d.textContent&&1!==d.nodeType&&-1!==d.textContent.indexOf("${")){var A=new u.InterpolateController(t,d,r);A.init(),s.push(A)}if(1===d.nodeType){var _=n.ContainerElements.findElement(d.localName);if(_){var E=new o.ElementController(t,d,null,_,null);r=d.$view?d.$view:r;var T=E.init();s.push(E),s.push.apply(s,T)}else d.childNodes&&l(d)}}}};return l({childNodes:[e]}),s},e.parseNodesWithCache=function(e,t,r,n){for(var i,s=[],l=document.createTreeWalker(e,NodeFilter.SHOW_ALL,null,!1),h=0,c=r[0].last,d=0;d<r.length;d++){if(i=l.nextNode(),r[d].no===h)switch(r[d].type){case"attribute":var p=new a.AttributeController(t,i,i.attributes[r[d].attributeCount],r[d].set,n);for(n=i.$view?i.$view:n,p.init(),s.push(p);r[d+1]&&r[d+1].no===h;){d++;var f=new a.AttributeController(t,i,i.attributes[r[d].attributeCount],r[d].set,n);n=i.$view?i.$view:n,f.init(),s.push(f)}break;case"element":var v=new o.ElementController(t,i,null,r[d].set,null);n=i.$view?i.$view:n;var b=v.init();s.push(v),s.push.apply(s,b);break;case"interpolate":var y=new u.InterpolateController(t,i,n);y.init(),s.push(y)}if(++h>c)break}return s},e.createNodeParseCache=function(e){var t=[],r=-1,s=-1,a=0,o=function(e,u){for(var l=0;l<e.childNodes.length;l++){s++;var h=t.length,c=u||!1,d=e.childNodes[l];if(d.getAttribute&&!u)if(d.getAttribute("if.bind")){c=!0;var p=d.attributes||[];r=-1;for(var f=0;f<p.length;f++){if(r++,"if.bind"===(b=p[f]).name)(v=i.ContainerAttributes.findAttribute(b.name))&&(a=s,t.push({no:s,type:"attribute",attributeCount:r,set:v}))}}else{if(d.getAttribute("repeat.for")){c=!0;p=d.attributes||[];r=-1;for(f=0;f<p.length;f++){if(r++,"repeat.for"===(b=p[f]).name)(v=i.ContainerAttributes.findAttribute(b.name))&&(a=s,t.push({no:s,type:"attribute",attributeCount:r,set:v}))}}}if(!c&&!u){p=d.attributes||[];r=-1;for(f=0;f<p.length;f++){r++;var v,b=p[f];!(v=i.ContainerAttributes.findAttribute(b.name))&&b.name&&!(v=i.ContainerAttributes.findAttribute(b.name.replace(".bind","")))&&b.name&&!(v=i.ContainerAttributes.findAttribute("mframejs-event-trigger."+b.name.split(".")[1]))&&b.name&&(v=i.ContainerAttributes.findAttribute("mframejs-event-delegate."+b.name.split(".")[1])),v&&(a=s,t.push({no:s,type:"attribute",attributeCount:r,set:v}))}}if(!c&&!u)if(d.textContent&&1!==d.nodeType)-1!==d.textContent.indexOf("${")&&(a=s,t.push({no:s,type:"interpolate",set:null,attributeCount:null}));else if(1===d.nodeType){var y=n.ContainerElements.findElement(d.localName);y&&(a=s,t.push({no:s,type:"element",set:y,attributeCount:null}))}h===t.length&&t.push({no:s+99,type:null,set:null,attributeCount:null}),d.childNodes&&o(d,c)}};return o(e,!1),t[0].last=a,t},e}();r.ViewParser=l},e.f[55]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(17),i=e.r(1),s=function(){function e(e){this.firstRun=!0,this.name="Interpolate",this.node=e}return e.prototype.call=function(e,t){(t!==e||this.firstRun)&&(this.firstRun=!1,this.node.data=e)},e}(),a=function(){function e(e,t,r){this.logger=i.Logger.getLogger(t.data.trim(),"interpolate"),this.parent=e,this.node=t,r.addInterpolate(this)}return e.prototype.init=function(){this.logger.log("init"),this.subscribeInternal=new s(this.node),n.BindingEngine.subscribeClassProperty(this.parent,this.node.data,this.subscribeInternal)},e.prototype.attached=function(){this.logger.log("attached")},e.prototype.detached=function(){this.logger.log("detached"),n.BindingEngine.unSubscribeClassProperty(this.parent,this.subscribeInternal),this.subscribeInternal=null,this.parent=null,this.node=null},e}();r.InterpolateController=a},e.f[56]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(57);r.inject=n.inject;var i=e.r(58);r.transient=i.transient;var s=e.r(59);r.customAttribute=s.customAttribute;var a=e.r(60);r.customElement=a.customElement;var o=e.r(61);r.bindable=o.bindable;var u=e.r(62);r.computedFrom=u.computedFrom;var l=e.r(63);r.valueConverter=l.valueConverter;var h=e.r(64);r.behavior=h.behavior},e.f[57]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(7);r.inject=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){n.ContainerClasses.setDep(t,e)}}},e.f[58]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(7);r.transient=function(e){n.ContainerClasses.regTransient(e)}},e.f[59]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(7),i=e.r(7);r.customAttribute=function(e){return function(t){n.ContainerClasses.regTransient(t),i.ContainerAttributes.regAttribute(t,e)}}},e.f[60]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(7),i=e.r(7);r.customElement=function(e){return function(t){n.ContainerClasses.regTransient(t),i.ContainerElements.regElement(t,e)}}},e.f[61]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(31);r.bindable=function(e){var t;return t=e,function(r,i){r[n.CONSTANTS.META_BINDABLE]||(r[n.CONSTANTS.META_BINDABLE]={});var s=i.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase();e&&(e.attribute||(e.attribute=s)),r[n.CONSTANTS.META_BINDABLE][i]||(r[n.CONSTANTS.META_BINDABLE][i]={key:i,options:t||{attribute:s}})}}},e.f[62]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(31);r.computedFrom=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e=t,function(t,r){t[n.CONSTANTS.META_COMPUTEDFROM]||(t[n.CONSTANTS.META_COMPUTEDFROM]={}),t[n.CONSTANTS.META_COMPUTEDFROM][r]||(t[n.CONSTANTS.META_COMPUTEDFROM][r]={key:r,attributes:e||{attributes:[]}})}}},e.f[63]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(7),i=e.r(7);r.valueConverter=function(e){return function(t){n.ContainerClasses.regTransient(t),i.ContainerValueConverters.regConverter(t,e)}}},e.f[64]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(7),i=e.r(7);r.behavior=function(e){return function(t){n.ContainerClasses.regTransient(t),i.ContainerBehavior.regBehavior(t,e)}}},e.f[65]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(66);r.SignalBehavior=n.SignalBehavior;var i=e.r(67);r.ThrottleBehavior=i.ThrottleBehavior;var s=e.r(68);r.DebounceBehavior=s.DebounceBehavior;var a=e.r(69);r.TriggerBehavior=a.TriggerBehavior},e.f[66]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=e.r(1),a=e.r(7).ContainerClasses.get(s.EventAggregator),o=function(){function e(e,t){this.name=t[0]||"undefined",e.listener&&"Interpolate"===e.listener.name&&(e.unbindBackup=e.unbind,e.unbind=function(){this.unbindBackup()},a.subscribe("signal-"+this.name,function(){e.update()}))}return e=n.__decorate([i.behavior("signal"),n.__metadata("design:paramtypes",[Object,Object])],e)}();r.SignalBehavior=o},e.f[67]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=function(){function e(e,t){var r=t[0]||100;e.eventHandlerBinded&&(e.eventHandlerBindedBackup=e.eventHandlerBinded,e.detachedBackup=e.detached,e.detached=function(){e.detachedBackup()},e.eventHandlerBinded=function(){var t=this;this.timerBehavior||(this.timerBehavior=setTimeout(function(){e.eventHandlerBindedBackup(),t.timerBehavior=null},r))}.bind(e))}return e=n.__decorate([i.behavior("throttle"),n.__metadata("design:paramtypes",[Object,Object])],e)}();r.ThrottleBehavior=s},e.f[68]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=function(){function e(e,t){var r=t[0]||100;e.eventHandlerBinded&&(e.eventHandlerBindedBackup=e.eventHandlerBinded,e.detachedBackup=e.detached,e.detached=function(){e.detachedBackup()},e.eventHandlerBinded=function(){this.timerBehavior&&(clearTimeout(this.timerBehavior),this.timerBehavior=null),this.timerBehavior=setTimeout(function(){e.eventHandlerBindedBackup()},r)}.bind(e))}return e=n.__decorate([i.behavior("debounce"),n.__metadata("design:paramtypes",[Object,Object])],e)}();r.DebounceBehavior=s},e.f[69]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=function(){function e(e,t){var r=t;e.eventHandlerBinded&&"trigger"in e&&r&&(e.trigger=r)}return e=n.__decorate([i.behavior("updateTrigger"),n.__metadata("design:paramtypes",[Object,Object])],e)}();r.TriggerBehavior=s},e.f[70]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(71);r.MfRouter=n.MfRouter},e.f[71]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(5),s=e.r(3),a=e.r(60),o=e.r(57),u=e.r(8),l=e.r(14),h=function(){function e(e,t){this.router=t,this.eventAggregator=e,this.router.mainRouter||(this.router.mainRouter=this)}return e.prototype.created=function(){},e.prototype.attached=function(){this.started=!0,this.loaded||this.update()},e.prototype.detached=function(){},e.prototype.loadTemplateAsync=function(){return n.__awaiter(this,void 0,void 0,function(){var e,t,r;return n.__generator(this,function(n){switch(n.label){case 0:return this.started?[3,1]:[2,"<template></template>"];case 1:return n.trys.push([1,3,,4]),e=this.router.getCurrentModule(),[4,this.router.loadCurrentModule()];case 2:return void 0===(t=n.sent())&&console.warn("route not found"+e),r=u.ContainerClasses.get(t[this.router.getCurrentClass()]),this.instance=r,[2,r.loadTemplate()];case 3:return[2,"<template>"+n.sent()+"</template>"];case 4:return[2]}})})},e.prototype.loadTemplate=function(){return this.started&&console.log("Im not supposed to trigger, BUG!!!"),"<template></template>"},e.prototype.update=function(){var e=this,t=this.instance,r=!0;if(t&&t.canDeactivate&&(r=t.canDeactivate()),r){for(t&&(t.detached&&t.detached(),l.ViewParser.clearAllViews(t.$element),t.$element=null,t.$parent=null,t.$attributes=null,t.$element=null);this.$element.firstChild;)this.$element.removeChild(this.$element.firstChild);var n=document.createElement("view");this.loadTemplateAsync().then(function(t){e.loaded=!0,l.ViewParser.parseAndCreateElement(e.instance,n,e,t),e.$element.appendChild(n),e.router.isNavigating=!1,e.instance.activated&&e.instance.activated()})}},e=n.__decorate([a.customElement("mf-router"),o.inject(s.EventAggregator,i.Router),n.__metadata("design:paramtypes",["function"==typeof(t=void 0!==s.EventAggregator&&s.EventAggregator)&&t||Object,"function"==typeof(r=void 0!==i.Router&&i.Router)&&r||Object])],e);var t,r}();r.MfRouter=h},e.f[72]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(73);r.IfAttribute=n.IfAttribute;var i=e.r(74);r.ValueAttribute=i.ValueAttribute;var s=e.r(75);r.DelgateEventsAttribute=s.DelgateEventsAttribute;var a=e.r(76);r.TriggerEventsAttribute=a.TriggerEventsAttribute;var o=e.r(77);r.RepeatAttribute=o.RepeatAttribute;var u=e.r(79);r.MiscAttributes=u.MiscAttributes;var l=e.r(80);r.CssAttribute=l.CssAttribute;var h=e.r(81);r.ModelAttribute=h.ModelAttribute},e.f[73]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=e.r(14),a=e.r(17),o=function(){function e(){}return e.prototype.created=function(){this.value=this.$attribute.value,this.$element.attributes.removeNamedItem("if.bind"),this.$element&&this.$element.$view&&(this.$view=this.$element.$view),this.elementClone=this.$element.cloneNode(!0),this.anchor=document.createComment("mf-if-bind"),this.$view&&(this.anchor.$view=this.$view),this.$element.parentNode.insertBefore(this.anchor,this.$element),this.remove(),this.added=!1},e.prototype.attached=function(){var e=this;this.subscribeCall={name:"ifAttribute",value:this.value,call:function(t){switch(!0){case t&&!e.added:e.added=!0,e.add();break;case!t&&e.added:e.remove()}}},a.BindingEngine.subscribeClassProperty(this.$parent,this.value,this.subscribeCall)},e.prototype.detached=function(){a.BindingEngine.unSubscribeClassProperty(this.$parent,this.subscribeCall)},e.prototype.add=function(){var e=this.elementClone.cloneNode(!0);this.$element=e,e.$view=new s.ViewController(e);var t=[];t=s.ViewParser.parseNodes(this.$element,this.$parent,e.$view),this.anchor.parentNode.insertBefore(this.$element,this.anchor),t.forEach(function(e){e.attached&&e.attached()}),t=null},e.prototype.remove=function(){var e=this.$element;this.added&&(this.added=!1,s.ViewParser.clearAllViews(this.$element),this.$element=null),this.anchor.parentNode.removeChild(e),e=null},e=n.__decorate([i.customAttribute("if.bind"),n.__metadata("design:paramtypes",[])],e)}();r.IfAttribute=o},e.f[74]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=e.r(17),a=e.r(1),o=e.r(7),u=function(){function e(e){this.firstRun=!0,this.name="valueAttribute",this.node=e}return e.prototype.call=function(e,t){if((t!==e||this.firstRun)&&(this.firstRun=!1,t!==e))switch(!0){case"text"===this.node.type:this.node.value=e||"";break;case"checkbox"===this.node.type:var r=this.node.hasAttribute("model.bind")?this.node.getAttributeNode("model.bind"):null;if(r&&r.getContent)(h=r.getContent())&&(Array.isArray(e)?-1!==e.indexOf(h.value)?this.node.checked=!0:this.node.checked=!1:e===h.value?this.node.checked=!0:this.node.checked=!1);else Array.isArray(e)?console.log("error: value is array, this should not happen"):this.node.checked=e||!1;break;case"radio"===this.node.type:var n=null;if((n=this.node.form?this.node.form.querySelectorAll("[name="+this.node.name+"]"):document.querySelectorAll("[name="+this.node.name+"]"))&&n.length>0){var i=this.node.hasAttribute("model.bind")?this.node.getAttributeNode("model.bind"):null;if(i&&i.getContent)(h=i.getContent())&&e===h.value&&(this.node.checked=!0)}break;case"select-one"===this.node.type:for(var s=this.node.options,a=null,o=0;o<s.length;o++){var u=s[o].hasAttribute("model.bind")?s[o].getAttributeNode("model.bind"):null;if(u&&u.getContent)(h=u.getContent())&&(Array.isArray(e)?e[0]===h.value&&(a=o):e===h.value&&(a=o))}this.node.selectedIndex=a;break;case"select-multiple"===this.node.type:var l=this.node.options;for(o=0;o<l.length;o++){var h,c=l[o].hasAttribute("model.bind")?l[o].getAttributeNode("model.bind"):null;if(c&&c.getContent)(h=c.getContent())&&(Array.isArray(e)?(-1!==e.indexOf(h.value)?l[o].selected=!0:l[o].selected=!1,0===e.length&&null===h.value&&(l[o].selected=!0)):e===h.value?l[o].selected=!0:l[o].selected=!1)}}},e}(),l=function(){function e(){this.valueConverters=[],this.eventHandlerBinded=this.eventHandler.bind(this)}return e.prototype.created=function(){var e=this;switch(this.expressionValue=this.$attribute.value,this.attributeName=this.expressionValue.split("|")[0].trim().split("&")[0].trim(),this.trigger=null,this.name=this.$attribute.name,this.propertyChangeHandler=new u(this.$element),!0){case"INPUT"===this.$element.tagName&&"text"===this.$element.type||"TEXTAREA"===this.$element.tagName:s.BindingEngine.subscribeClassProperty(this.$parent,this.expressionValue,this.propertyChangeHandler),this.connectBehavior(),this.trigger?this.trigger.forEach(function(t){e.$element.addEventListener(t,e.eventHandlerBinded,!1)}):this.$element.addEventListener("input",this.eventHandlerBinded,!1);break;case"INPUT"===this.$element.tagName&&"checkbox"===this.$element.type:s.BindingEngine.subscribeClassProperty(this.$parent,this.expressionValue,this.propertyChangeHandler),this.connectBehavior(),this.trigger?this.trigger.forEach(function(t){e.$element.addEventListener(t,e.eventHandlerBinded,!1)}):this.$element.addEventListener("click",this.eventHandlerBinded,!1);break;case"INPUT"===this.$element.tagName&&"radio"===this.$element.type:s.BindingEngine.subscribeClassProperty(this.$parent,this.expressionValue,this.propertyChangeHandler),this.connectBehavior(),this.trigger?this.trigger.forEach(function(t){e.$element.addEventListener(t,e.eventHandlerBinded,!1)}):this.$element.addEventListener("click",this.eventHandlerBinded,!1);break;case"SELECT"===this.$element.tagName:s.BindingEngine.subscribeClassProperty(this.$parent,this.expressionValue,this.propertyChangeHandler),this.connectBehavior(),this.trigger?this.trigger.forEach(function(t){e.$element.addEventListener(t,e.eventHandlerBinded,!1)}):this.$element.addEventListener("change",this.eventHandlerBinded,!1)}},e.prototype.runValueConverter=function(e){var t=a.Cache.expressionMapGet(this.expressionValue);return s.BindingEngine.valueConvert(t.ast,this.$parent,e)},e.prototype.connectBehavior=function(){var e=this;if(-1!==this.expressionValue.indexOf("&")){var t=a.Cache.expressionMapGet(this.expressionValue);if(!t){var r=s.BindingEngine.tokenize(this.expressionValue);(t={}).ast=s.BindingEngine.generateAST(r)}var n=s.BindingEngine.getBehavior(t.ast);n&&n.forEach(function(t){var r=o.ContainerBehavior.findBehavior(t.name);if(r){var n=new r(e,t.args);n=n}})}},e.prototype.detached=function(){var e=this;switch(!0){case"INPUT"===this.$element.tagName&&"text"===this.$element.type||"TEXTAREA"===this.$element.tagName:this.trigger?this.trigger.forEach(function(t){e.$element.removeEventListener(t,e.eventHandlerBinded)}):this.$element.removeEventListener("input",this.eventHandlerBinded);break;case"INPUT"===this.$element.tagName&&"checkbox"===this.$element.type:this.trigger?this.trigger.forEach(function(t){e.$element.removeEventListener(t,e.eventHandlerBinded)}):this.$element.removeEventListener("click",this.eventHandlerBinded);break;case"INPUT"===this.$element.tagName&&"radio"===this.$element.type:this.trigger?this.trigger.forEach(function(t){e.$element.removeEventListener(t,e.eventHandlerBinded)}):this.$element.removeEventListener("click",this.eventHandlerBinded);break;case"SELECT"===this.$element.tagName:this.trigger?this.trigger.forEach(function(t){e.$element.removeEventListener(t,e.eventHandlerBinded)}):this.$element.removeEventListener("change",this.eventHandlerBinded);break;default:this.$attribute.$parent=null}this.propertyChangeHandler.caller&&s.BindingEngine.unSubscribeClassProperty(this.$parent,this.propertyChangeHandler)},e.prototype.eventHandler=function(){switch(!0){case"INPUT"===this.$element.tagName&&"text"===this.$element.type||"TEXTAREA"===this.$element.tagName:s.BindingEngine.setValue(this.$parent,this.attributeName,this.runValueConverter(this.$element.value));break;case"INPUT"===this.$element.tagName&&"checkbox"===this.$element.type:var e=this.$element.hasAttribute("model.bind")?this.$element.getAttributeNode("model.bind"):null;if(e){var t,r=e.getContent().value,n=s.BindingEngine.evaluateExpression(this.$attribute.nodeValue,this.$parent),i=Array.isArray(n),a=this.$element.checked;if(i)if(a)-1===(t=n.indexOf(r))&&(n=n.concat([this.runValueConverter(r)]),s.BindingEngine.setValue(this.$parent,this.attributeName,n));else-1!==(t=n.indexOf(r))?(n.splice(t,1),n.__array_observer__class||(n=n.slice()),s.BindingEngine.setValue(this.$parent,this.attributeName,n)):this.$element.checked=!1;else s.BindingEngine.setValue(this.$parent,this.attributeName,this.runValueConverter(r)||!1)}else s.BindingEngine.setValue(this.$parent,this.attributeName,this.$element.checked||!1);break;case"INPUT"===this.$element.tagName&&"radio"===this.$element.type:var o=this.$element.hasAttribute("model.bind")?this.$element.getAttributeNode("model.bind"):null;if(o){r=s.BindingEngine.evaluateExpression(o.nodeValue,o.getContent().$parent);s.BindingEngine.setValue(this.$parent,this.attributeName,this.runValueConverter(r))}else s.BindingEngine.setValue(this.$parent,this.attributeName,this.runValueConverter(this.$element.checked));break;case"SELECT"===this.$element.tagName:var u=s.BindingEngine.evaluateExpression(this.$attribute.nodeValue,this.$parent),l=Array.isArray(u),h=this.$element.selectedOptions.length,c=null;if(h>1){for(var d=[],p=0;p<h;p++){var f=(v=this.$element.selectedOptions[p]).hasAttribute("model.bind")?v.getAttributeNode("model.bind"):null;r=s.BindingEngine.evaluateExpression(f.nodeValue,f.getContent().$parent);d.push(this.runValueConverter(r))}c=d}else if(0===h)c=null;else{var v;f=(v=this.$element.selectedOptions[0]).hasAttribute("model.bind")?v.getAttributeNode("model.bind"):null;c=r=s.BindingEngine.evaluateExpression(f.nodeValue,f.getContent().$parent)}l?s.BindingEngine.setValue(this.$parent,this.attributeName,Array.isArray(c)?c:null===c?[]:[c]):s.BindingEngine.setValue(this.$parent,this.attributeName,Array.isArray(c)?c.map(function(e){return e}):c)}},e=n.__decorate([i.customAttribute("value.bind"),i.customAttribute("checked.bind"),n.__metadata("design:paramtypes",[])],e)}();r.ValueAttribute=l},e.f[75]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=e.r(17),a=e.r(7),o=e.r(1),u=function(){function e(){}return e.prototype.created=function(){this.name=this.$attribute.name.replace(".delegate",""),this.value=this.$attribute.value,this.expressionValue=this.$attribute.value,this.eventHandlerBinded=this.eventHandler.bind(this),this.connectBehavior(),this.$element.addEventListener(this.name,this.eventHandlerBinded,!1)},e.prototype.attached=function(){},e.prototype.detached=function(){this.$element.removeEventListener(this.name,this.eventHandlerBinded)},e.prototype.eventHandler=function(e){s.BindingEngine.tokenizeParseAndTraverseAST(this.value,{ctx:this.$parent,$event:e,isMultiContext:!0})},e.prototype.connectBehavior=function(){var e=this;if(-1!==this.expressionValue.indexOf("&")){var t=o.Cache.expressionMapGet(this.expressionValue);if(!t){var r=s.BindingEngine.tokenize(this.expressionValue);(t={}).ast=s.BindingEngine.generateAST(r)}var n=s.BindingEngine.getBehavior(t.ast);n&&n.forEach(function(t){var r=a.ContainerBehavior.findBehavior(t.name);if(r){var n=new r(e,t.args);n=n}})}},e=n.__decorate([i.customAttribute("mframejs-event-delegate.delegate"),n.__metadata("design:paramtypes",[])],e)}();r.DelgateEventsAttribute=u},e.f[76]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=e.r(17),a=e.r(7),o=e.r(1),u=function(){function e(){}return e.prototype.created=function(){this.name=this.$attribute.name.replace(".trigger",""),this.value=this.$attribute.value,this.expressionValue=this.$attribute.value,this.eventHandlerBinded=this.eventHandler.bind(this),this.connectBehavior(),this.$element.addEventListener(this.name,this.eventHandlerBinded,!1)},e.prototype.attached=function(){},e.prototype.detached=function(){this.$element.removeEventListener(this.name,this.eventHandlerBinded)},e.prototype.eventHandler=function(e){s.BindingEngine.tokenizeParseAndTraverseAST(this.value,{ctx:this.$parent,$event:e,isMultiContext:!0})},e.prototype.connectBehavior=function(){var e=this;if(-1!==this.expressionValue.indexOf("&")){var t=o.Cache.expressionMapGet(this.expressionValue);if(!t){var r=s.BindingEngine.tokenize(this.expressionValue);(t={}).ast=s.BindingEngine.generateAST(r)}var n=s.BindingEngine.getBehavior(t.ast);n&&n.forEach(function(t){var r=a.ContainerBehavior.findBehavior(t.name);if(r){var n=new r(e,t.args);n=n}})}},e=n.__decorate([i.customAttribute("mframejs-event-trigger.trigger"),n.__metadata("design:paramtypes",[])],e)}();r.TriggerEventsAttribute=u},e.f[77]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=e.r(14),a=e.r(14),o=e.r(17),u=e.r(78),l=function(){function e(){this.templateArray=[],this.arrayType="object"}return e.prototype.setArrayLocalVariables=function(e,t){e.$index=t,e.$even=t%2==0,e.$odd=t%2!=0},e.prototype.created=function(){this.value=this.$attribute.value,this.loopBinded=this.loopArray.bind(this),this.$element&&this.$element.$view&&(this.$view=this.$element.$view),this.$element.attributes.removeNamedItem("repeat.for"),this.elementClone=this.$element.cloneNode(!0),this.temp=document.createElement("div");var e=document.createElement("div");if(e.appendChild(this.elementClone),this.repeatTemplateCache=s.ViewParser.createNodeParseCache(e),this.anchor=document.createComment("mf-repeat-for"),this.$view&&(this.anchor.$view=this.$view),this.remove(),this.arrayMethodCallHandler=new u.ArrayMethodCallHandler(this),this.arrayPropertyChangeHandler=new u.ArrayPropertyChange(this),this.propertyChangeHandlerSimple=new u.PropertyChangeSimple(this),this.repeatForArray=this.value.split(" "),3!==this.repeatForArray.length)console.error("unknown expression in repeat:"+this.value);else{this.rowInstanceName=this.repeatForArray[0],this.arrayVariableName=this.repeatForArray[2];var t=o.BindingEngine.evaluateExpression(this.arrayVariableName,this.$parent);Array.isArray(t)?(this.subscribeArray(),this.subscribePropArray()):"number"==typeof t?(this.arrayType="number",this.subscribePropSimple()):"string"==typeof t?(this.arrayType="string",this.subscribePropSimple()):console.error("unknown type, only support array, string and number")}},e.prototype.loopArray=function(e,t,r){var n=o.BindingEngine.evaluateExpression(this.arrayVariableName,this.$parent);if(n)if(e){if(t)for(var i=this.templateArray.length-t,s=0;s<this.templateArray.length;s++)if(s<i)this.templateArray[s].ctx[this.rowInstanceName]!==n[s]&&(this.templateArray[s].ctx[this.rowInstanceName]=n[s]);else{var a=this.templateArray.pop();s--,this.clearInRow(a)}if(r)for(i=n.length-r,s=0;s<n.length;s++)s<i?this.templateArray[s].ctx[this.rowInstanceName]!==n[s]&&(this.templateArray[s].ctx[this.rowInstanceName]=n[s]):this.push(n[s])}else for(s=0;s<n.length;s++)this.templateArray[s].ctx[this.rowInstanceName]!==n[s]&&(this.templateArray[s].ctx[this.rowInstanceName]=n[s])},e.prototype.detached=function(){this.clearTemplateArray(),this.arrayMethodCallHandler&&o.BindingEngine.unSubscribeClassArray(this.$parent,this.arrayMethodCallHandler),this.arrayPropertyChangeHandler&&o.BindingEngine.unSubscribeClassProperty(this.$parent,this.arrayPropertyChangeHandler)},e.prototype.attached=function(){var e=this;this.isAttached=!0;var t=o.BindingEngine.evaluateExpression(this.arrayVariableName,this.$parent);if(Array.isArray(t))t.forEach(function(t){e.push(t)});else{if("number"===this.arrayType&&this.templateArray.length!==t){this.clearTemplateArray();for(var r=0;r<t;r++)this.push(r)}if("string"===this.arrayType){var n="string"==typeof t?t.length:0;if(this.templateArray.length!==n){this.clearTemplateArray();for(r=0;r<n;r++)this.push(t[r])}}}},e.prototype.subscribeArray=function(){o.BindingEngine.subscribeClassArray(this.$parent,this.arrayVariableName,this.arrayMethodCallHandler)},e.prototype.subscribePropArray=function(){o.BindingEngine.subscribeClassProperty(this.$parent,this.arrayVariableName,this.arrayPropertyChangeHandler)},e.prototype.subscribePropSimple=function(){o.BindingEngine.subscribeClassProperty(this.$parent,this.arrayVariableName,this.propertyChangeHandlerSimple)},e.prototype.push=function(e,t){var r=this.elementClone.cloneNode(!0),n={};n[this.rowInstanceName]=e,n.$row=e,n.$this=n,n.overrideContext=this.$parent,this.temp.appendChild(r),r.$view=new a.ViewController(r);var i=s.ViewParser.parseNodesWithCache(this.temp,n,this.repeatTemplateCache,r.$view);if(void 0===t){var o=this.templateArray.length;this.templateArray.push({ctx:n,template:r}),this.setArrayLocalVariables(n,this.templateArray.length-1),o?this.anchor.parentNode.insertBefore(r,this.templateArray[o-1].template.nextSibling):this.anchor.parentNode.insertBefore(r,this.anchor.nextSibling)}else this.templateArray.splice(t,0,{ctx:n,template:r}),this.templateArray[t+1]?this.anchor.parentNode.insertBefore(r,this.templateArray[t+1].template):this.anchor.parentNode.appendChild(r);i.forEach(function(e){e.attached&&e.attached()})},e.prototype.pop=function(){var e=this;if(this.templateArray.length>0){var t=this.templateArray.pop();this.clearInRow(t),this.templateArray.forEach(function(t,r){e.setArrayLocalVariables(t,r)})}},e.prototype.shift=function(){var e=this;if(this.templateArray.length>0){var t=this.templateArray.shift();this.clearInRow(t),this.templateArray.forEach(function(t,r){e.setArrayLocalVariables(t,r)})}},e.prototype.splice=function(e){var t=this;if(this.templateArray.length>0){for(var r=e[0],n=e[1],i=[],s=2;s<e.length;s++)e[s]&&i.push(e[s]);if(n)for(s=r+n-1;s>r-1;s--){var a=this.templateArray.splice(s,1)[0];this.clearInRow(a)}i.forEach(function(e){t.push(e,r)}),this.templateArray.forEach(function(e,r){t.setArrayLocalVariables(e,r)})}},e.prototype.clearTemplateArray=function(){var e=document.createElement("div");this.templateArray.forEach(function(t){e.appendChild(t.template)}),this.templateArray.forEach(function(e){s.ViewParser.clearAllViews(e.template)}),e=null,this.templateArray=[]},e.prototype.remove=function(){this.clearTemplateArray(),this.$element.parentNode.replaceChild(this.anchor,this.$element)},e.prototype.clearInRow=function(e){if(e){var t=e.template.parentNode.removeChild(e.template);s.ViewParser.clearAllViews(t),t=null}},e=n.__decorate([i.customAttribute("repeat.for"),n.__metadata("design:paramtypes",[])],e)}();r.RepeatAttribute=l},e.f[78]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(17),i=function(){function e(e){this.repeat=e,this.name="repeat"+this.repeat.value}return e.prototype.call=function(e){var t=this;e.forEach(function(e){switch(e.event){case"push":for(var r=0;r<e.args.length;)t.repeat.push(e.args[r]),r++;break;case"reverse":case"sort":var i=n.BindingEngine.evaluateExpression(t.repeat.arrayVariableName,t.repeat.$parent);i&&i.forEach(function(e,r){t.repeat.templateArray[r].ctx[t.repeat.rowInstanceName]=e,t.repeat.setArrayLocalVariables(t.repeat.templateArray[r].ctx,r)});break;case"shift":t.repeat.shift();break;case"pop":t.repeat.pop();break;case"splice":t.repeat.splice(e.args)}})},e}();r.ArrayMethodCallHandler=i;var s=function(){function e(e){this.repeat=e,this.name="repeat"+this.repeat.value}return e.prototype.call=function(e){var t=this;if(this.repeat.isAttached)if(e&&this.repeat.templateArray.length!==e.length)if(0!==this.repeat.templateArray.length&&0!==e.length)this.repeat.templateArray.length>e.length?this.repeat.loopBinded(!0,this.repeat.templateArray.length-e.length,0):this.repeat.loopBinded(!0,0,e.length-this.repeat.templateArray.length),this.repeat.subscribeArray(),n.BindingEngine.unSubscribeClassArray(this.repeat.$parent,this.repeat.arrayMethodCallHandler);else{this.repeat.clearTemplateArray();var r=n.BindingEngine.evaluateExpression(this.repeat.arrayVariableName,this.repeat.$parent);r&&(r.forEach(function(e){t.repeat.push(e)}),n.BindingEngine.unSubscribeClassArray(this.repeat.$parent,this.repeat.arrayMethodCallHandler),this.repeat.subscribeArray(),r=null)}else this.repeat.loopBinded(),n.BindingEngine.unSubscribeClassArray(this.repeat.$parent,this.repeat.arrayMethodCallHandler),e&&this.repeat.subscribeArray()},e}();r.ArrayPropertyChange=s;var a=function(){function e(e){this.repeat=e,this.name="repeat"+this.repeat.value}return e.prototype.call=function(e){if(this.repeat.isAttached){if("string"===this.repeat.arrayType){var t="string"==typeof e?e.length:0;if(this.repeat.templateArray.length!==t){this.repeat.clearTemplateArray();for(var r=0;r<t;r++)this.repeat.push(e[r])}}if("number"===this.repeat.arrayType&&this.repeat.templateArray.length!==e){this.repeat.clearTemplateArray();for(r=0;r<e;r++)this.repeat.push(e)}}},e}();r.PropertyChangeSimple=a},e.f[79]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=e.r(17),a=function(){function e(){}return e.prototype.created=function(){var e=this;this.value=this.$attribute.value,this.name=this.$attribute.name.replace(".bind",""),this.init=!0,this.subscribeInternal={name:this.name+"Attribute(misc)",value:this.value,call:function(t,r){if(r!==t||e.init)switch(e.init=!1,e.name){case"readonly":t?e.$element.readOnly=t:e.$element.removeAttribute(e.name);break;case"disabled":t?e.$element.disabled=t:e.$element.removeAttribute(e.name);break;case"class":e.$element.className=t||"";break;case"show":e.$element.style.display=t?"block":"none";break;default:e.$element.setAttribute(e.name,t)}}},s.BindingEngine.subscribeClassProperty(this.$parent,this.value,this.subscribeInternal)},e.prototype.detached=function(){s.BindingEngine.unSubscribeClassProperty(this.$parent,this.subscribeInternal)},e.prototype.attached=function(){this.$element.removeAttribute(this.$attribute.name)},e=n.__decorate([i.customAttribute("href.bind"),i.customAttribute("readonly.bind"),i.customAttribute("disabled.bind"),i.customAttribute("show.bind"),i.customAttribute("class.bind"),n.__metadata("design:paramtypes",[])],e)}();r.MiscAttributes=a},e.f[80]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=e.r(17),a=function(){function e(){}return e.prototype.created=function(){var e=this;this.value=this.$attribute.value,this.$element.removeAttribute(this.$attribute.name),this.subscribeInternal={name:"cssAttribute:",value:this.value,call:function(t,r){r!==t&&e.splitAndInsert(t)}},s.BindingEngine.subscribeClassProperty(this.$parent,this.value,this.subscribeInternal)},e.prototype.splitAndInsert=function(e){var t=this;try{e.split(";").map(function(e){return e.split(":")}).map(function(e){return{attribute:e[0],value:e[1].replace(/ /g,"")}}).forEach(function(e){t.$element.style[e.attribute.trim()]=e.value.trim()})}catch(e){console.error("could not parse css values")}},e.prototype.detached=function(){s.BindingEngine.unSubscribeClassProperty(this.$parent,this.subscribeInternal)},e.prototype.attached=function(){},e=n.__decorate([i.customAttribute("css"),n.__metadata("design:paramtypes",[])],e)}();r.CssAttribute=a},e.f[81]=function(t,r){Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(84),i=e.r(56),s=e.r(17),a=function(){function e(){}return e.prototype.created=function(){var e=this;this.$attribute.getContent=function(){return e},this.expression=this.$attribute.value,this.subscribeInternal={name:"modelAttribute:",value:this.value,call:function(t,r){r!==t&&(e.value=t)}},s.BindingEngine.subscribeClassProperty(this.$parent,this.expression,this.subscribeInternal)},e.prototype.detached=function(){this.$attribute.getContent=null},e=n.__decorate([i.customAttribute("model.bind")],e)}();r.ModelAttribute=a},e.f[82]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=new Map,n=new Map,i=new Map,s=new Map,a=function(){function e(){}return e.clear=function(){r.clear(),n.clear(),i.clear(),s.clear()},e.templateMapHas=function(e){return r.has(e)},e.templateMapSet=function(e,t){return r.set(e,t)},e.templateMapGet=function(e){return r.get(e)},e.expressionMapHas=function(e){return n.has(e)},e.expressionMapSet=function(e,t){return n.set(e,t)},e.expressionMapGet=function(e){return n.get(e)},e.astMapHas=function(e){return i.has(e)},e.astMapSet=function(e,t){return i.set(e,t)},e.astMapGet=function(e){return i.get(e)},e.splitMapHas=function(e){return s.has(e)},e.splitMapSet=function(e,t){return s.set(e,t)},e.splitMapGet=function(e){return s.get(e)},e}();t.Cache=a},e.f[83]=function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r,n=!1,i=1e4,s=function(){function e(e,t){this.id=i,i++,this.name=e,this.category=t||"unamed"}return e.getLogger=function(t,i){return n?new e(t,i):r},e.enable=function(){n=!0},e.disable=function(){n=!1},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];n&&console.log("Log["+this.id+"] - ["+this.category+"] - ["+this.name+"] ",e.join(" - "))},e}();t.Logger=s,r=new s("na","na")},e.f[84]=function(e,t){var r,n,i,s,a,o,u,l,h,c,d,p,f,v,b,y,m;!function(t){var r="object"==typeof self?self:"object"==typeof this?this:{};function n(e,t){return e!==r&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(r,n){return e[r]=t?t(r,n):n}}"object"==typeof e.exports?t(n(r,n(e.exports))):t(n(r))}(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};r=function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)},n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},i=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&(r[n[i]]=e[n[i]])}return r},s=function(e,t,r,n){var i,s=arguments.length,a=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var o=e.length-1;o>=0;o--)(i=e[o])&&(a=(s<3?i(a):s>3?i(t,r,a):i(t,r))||a);return s>3&&a&&Object.defineProperty(t,r,a),a},a=function(e,t){return function(r,n){t(r,n,e)}},o=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function a(e){try{u(n.next(e))}catch(e){s(e)}}function o(e){try{u(n.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):new r(function(t){t(e.value)}).then(a,o)}u((n=n.apply(e,t||[])).next())})},l=function(e,t){var r,n,i,s,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return s={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(s){return function(o){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=n[2&s[0]?"return":s[0]?"throw":"next"])&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[0,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(6===s[0]&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],n=0}finally{r=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,o])}}},h=function(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])},c=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}},d=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return a},p=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(d(arguments[t]));return e},f=function(e){return this instanceof f?(this.v=e,this):new f(e)},v=function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){i[e]&&(n[e]=function(t){return new Promise(function(r,n){s.push([e,t,r,n])>1||o(e,t)})})}function o(e,t){try{(r=i[e](t)).value instanceof f?Promise.resolve(r.value.v).then(u,l):h(s[0][2],r)}catch(e){h(s[0][3],e)}var r}function u(e){o("next",e)}function l(e){o("throw",e)}function h(e,t){e(t),s.shift(),s.length&&o(s[0][0],s[0][1])}},b=function(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){e[n]&&(t[n]=function(t){return(r=!r)?{value:f(e[n](t)),done:"return"===n}:i?i(t):t})}},y=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):"function"==typeof c?c(e):e[Symbol.iterator]()},m=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},e("__extends",r),e("__assign",n),e("__rest",i),e("__decorate",s),e("__param",a),e("__metadata",o),e("__awaiter",u),e("__generator",l),e("__exportStar",h),e("__values",c),e("__read",d),e("__spread",p),e("__await",f),e("__asyncGenerator",v),e("__asyncDelegator",b),e("__asyncValues",y),e("__makeTemplateObject",m)})};window;var t=e.r(0);if(t)for(var r in t)window[r]=t[r]}();
exports.translate = function(load) {
if (this.builder && this.transpiler) {
load.metadata.format = 'esm';
return 'exp' + 'ort var __useDefault = ' + JSON.stringify(load.source) + '; exp' + 'ort default __useDefault;';
}
load.metadata.format = 'amd';
return 'def' + 'ine(function() {\nreturn ' + JSON.stringify(load.source) + ';\n});';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment