{"version":3,"file":"main.js","sources":["../../node_modules/@lernetz/ts-lib/src/core/lookup/LookupDict.ts","../../node_modules/@lernetz/ts-lib/src/core/js.ts","../../node_modules/@lernetz/ts-lib/src/core/lookup/LookupObject.ts","../../node_modules/tslib/tslib.es6.js","../../node_modules/@lernetz/ts-lib/src/core/view/Renderer.ts","../../node_modules/@lernetz/ts-lib/src/core/lang/Lang.ts","../../node_modules/@lernetz/ts-lib/src/core/ioc/IoC.ts","../../node_modules/@lernetz/ts-lib/src/core/signal/Signal.ts","../../node_modules/@lernetz/ts-lib/src/core/model/Model.ts","../../node_modules/@lernetz/ts-lib/src/core/model/Mapper.ts","../../node_modules/@lernetz/ts-lib/src/core/node/Node.ts","../../node_modules/@lernetz/ts-lib/src/core/view/expressions/Expression.ts","../../node_modules/@lernetz/ts-lib/src/core/view/expressions/AttributeExpression.ts","../../node_modules/@lernetz/ts-lib/src/core/view/expressions/CSSExpression.ts","../../node_modules/@lernetz/ts-lib/src/core/view/expressions/TextExpression.ts","../../node_modules/@lernetz/ts-lib/src/core/view/expressions/DataAttributeExpression.ts","../../node_modules/@lernetz/ts-lib/src/core/view/expressions/ViewDataExpression.ts","../../node_modules/@lernetz/ts-lib/src/core/view/expressions/ViewExpression.ts","../../node_modules/@lernetz/ts-lib/src/core/view/Template.ts","../../node_modules/@lernetz/ts-lib/src/core/request/Request.ts","../../node_modules/@lernetz/ts-lib/src/core/setup/Asset.ts","../../node_modules/@lernetz/ts-lib/src/core/setup/Setup.ts","../../node_modules/@lernetz/ts-lib/src/core/view/View.ts","../../node_modules/@lernetz/ts-lib/src/core/setup/register.ts","../../node_modules/@lernetz/ts-lib/src/components/Repeat.ts","../../typescript/components/page/Page.ts","../../typescript/templates/content-page.ts","../../typescript/components/content-page/ContentPage.ts","../../typescript/services/addTextStyles.ts","../../typescript/services/sync.ts","../../typescript/templates/download.ts","../../typescript/components/download/Download.ts","../../typescript/templates/heading.ts","../../typescript/components/heading/Heading.ts","../../typescript/templates/raw-html.ts","../../typescript/components/raw-html/RawHtml.ts","../../typescript/templates/start-page.ts","../../typescript/components/start-page/StartPage.ts","../../typescript/components/start-page/StartPageLayerItem.ts","../../typescript/components/start-page/StartPageContentLayerItem.ts","../../typescript/components/start-page/StartPageTitleLayerItem.ts","../../node_modules/@lernetz/ts-lib/src/core/util/debounce.ts","../../typescript/components/start-page/StartPageLayer.ts","../../typescript/components/start-page/StartPageVariant.ts","../../typescript/services/Asset.ts","../../typescript/templates/image.ts","../../typescript/components/image/Image.ts","../../typescript/templates/topic-page.ts","../../typescript/components/topic-page/TopicPage.ts","../../typescript/services/Selectable.ts","../../typescript/templates/site.ts","../../typescript/components/site/Site.ts","../../typescript/templates/target-audience-switch.ts","../../typescript/components/target-audience-switch/TargetAudienceSwitch.ts","../../typescript/templates/text.ts","../../typescript/components/text/Text.ts","../../typescript/templates/tip.ts","../../typescript/components/tip/Tip.ts","../../typescript/templates/topic-overview.ts","../../typescript/components/topic-overview/TopicOverview.ts","../../typescript/templates/two-column-layout.ts","../../typescript/components/two-column-layout/TwoColumnLayout.ts","../../typescript/services/GlobalsStore.ts","../../typescript/Main.ts"],"sourcesContent":["\n/**\n * An interface for any source for the LookupDict\n */\nexport interface LookupSource {\n\tlookup( key:string ):any;\n}\n\n\n/**\n * This class provides a key:value lookup mechanism where multiple sources can be added.\n */\nclass LookupDict {\n\n\tprivate sources:LookupSource[] = [];\n\n\t/**\n\t * Adds a new source to the dictionary to search for keys\n\t */\n\tadd( source:LookupSource ) {\n\t\tthis.sources.push( source );\n\t}\n\n\n\t/**\n\t * Returns the value stored behind the given key in the first of all sources\n\t */\n\tget( key:string, fallback?:string ):any {\n\n\t\tvar result, i, s = this.sources;\n\n\t\t// loop over sources to find key.\n\t\tfor( i = 0; i < s.length; i++ ) {\n\t\t\tresult = s[ i ].lookup( key );\n\t\t\tif( result != null ) return result;\n\t\t}\n\n\t\t// if fallback is provided show that\n\t\tif( fallback !== undefined ) return fallback;\n\n\t\t// not found\n\t\treturn '!{' + key + '}';\n\t}\n}\n\n\n\nexport default LookupDict;\n","/**\n * A collection of js specific helper functions.\n */\n\n/***/\n\n\ntype baseTypes = \"Array\" | \"Object\" | \"String\" | \"Date\" | \"RegExp\" | \"Function\" | \"Boolean\" | \"Number\" | \"Null\" | \"Undefined\";\n\n\n/**\n * Checks if the given input is of any of the given types.\n */\nexport function isType( input:any, checkOn:baseTypes | Array ):boolean {\n\n\t// catch single string input\n\tvar types:Array = ( !Array.isArray( checkOn ) ) ? [ checkOn ] : checkOn;\n\n\t// test on object.\n\tif( types.indexOf( \"Object\" ) >= 0 ) {\n\t\tvar match = input && input.constructor == Object;\n\t\tif( match ) return match;\n\n\t\ttypes.splice( types.indexOf( \"Object\" ), 1 );\n\t}\n\n\t// test anything else\n\tvar inputType = Object.prototype.toString.call( input ).slice(8, -1);\n\treturn types.indexOf( inputType ) >= 0;\n}\n\n\n/**\n * Applies multiple mixins to the given [[extendedClass]].\n * @param extendedClass The object that should receive the mixins.\n */\nexport function mixin( extendedClass: any, mixins: any[] ) {\n\tmixins.forEach( baseCtor => {\n\t\tObject.getOwnPropertyNames( baseCtor.prototype ).forEach( name => {\n\t\t\textendedClass.prototype[name] = baseCtor.prototype[name];\n\t\t});\n\t});\n}\n\n\n/**\n * Merges multiple objects into one. No deep clone.\n * See [`Object.assign()` on MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign).\n *\n * Note that in many cases, you can simply use [`...` spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax) instead:\n *\n * ```typescript\n * const foo = { foo: 'foo' };\n * const bar = { bar: 'bar' };\n * const foobar = { ...foo, ...bar };\n * ```\n */\nexport function assign( target:{} = {}, ...args:Object[] ) {\n\n\tvar copy = Object( target );\n\n\targs.forEach( ( source ) => {\n\t\tif( source ) {\n\t\t\tfor( var nextKey in source ) {\n\t\t\t\tif( source.hasOwnProperty( nextKey ) ) copy[ nextKey ] = source[ nextKey ];\n\t\t\t}\n\t\t}\n\t});\n\n\treturn copy;\n}\n\n\n/**\n * Shuffles an array.\n * Adapted from: http://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array\n */\nexport function shuffle(array) {\n\tvar i = array.length, t, randomIndex;\n\t// While there remain elements to shuffle...\n\twhile (0 !== i) {\n\t\t// Pick a remaining element...\n\t\trandomIndex = Math.floor(Math.random() * i);\n\t\ti -= 1;\n\t\t// And swap it with the current element.\n\t\tt = array[i];\n\t\tarray[i] = array[randomIndex];\n\t\tarray[randomIndex] = t;\n\t}\n\treturn array;\n}\n\n\n/**\n * Returns all properties including getter/setter recursive in prototype chain.\n */\nexport function getAccessorDescriptors( obj ):{[name:string]:PropertyDescriptor} {\n\tvar props = {};\n\twhile( obj ) {\n\t\tObject.getOwnPropertyNames( obj ).forEach( function( p ) {\n\t\t\tvar desc = Object.getOwnPropertyDescriptor( obj, p );\n\t\t\tif( desc && ( desc.set || desc.get ) ) props[ p ] = desc;\n\t\t});\n\t\tlet prototype = Object.getPrototypeOf( obj );\n\t\tobj = ( prototype !== Object.prototype ) ? prototype : undefined;\n\t}\n\n\treturn props;\n}\n","import { LookupSource } from './LookupDict';\nimport { isType } from '../js';\n\n/**\n * A lookup dictionary source that searches on an object for given keys.\n * It allows to search in nested objects too.\n */\nclass LookupObject implements LookupSource {\n\n\tprivate obj:Object;\n\n\tconstructor( obj:Object ) {\n\t\tthis.replace( obj );\n\t}\n\n\t/**\n\t * lookups in the object for the given key.\n\t */\n\tlookup( key:string ):any {\n\t\tvar keys = key.split( '.' );\n\t\treturn this.search( this.obj, keys );\n\t}\n\n\t/**\n\t * Adds a prefix to the search keys on this object\n\t */\n\tprefix( name:string ):void {\n\t\tvar temp = {};\n\t\ttemp[ name ] = this.obj;\n\t\tthis.obj = temp;\n\t}\n\n\treplace( obj:Object ) {\n\t\tthis.obj = ( isType( obj, 'Object' ) ) ? obj : {};\n\t}\n\n\t/**\n\t * Searches in the given object for the first key in the keys array.\n\t * If there are sub keys it digs deeper into object hierarchy.\n\t */\n\tprivate search = function( current:Object, keys:string[] ) {\n\n\t\tvar top = keys.shift();\n\n\t\t// there are sub keys to search\n\t\tif( keys.length > 0 ) {\n\t\t\treturn ( current[ top ] != undefined ) ? this.search( current[ top ], keys ) : undefined;\n\t\t} else {\n\t\t\treturn current[ top ];\n\t\t}\n\t};\n}\n\nexport default LookupObject;\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","\n/**\n* An interface of the complied template function containing also its source\n*/\ninterface CompliedTemplate {\n\t(...args ):any;\n}\n\ninterface TemplatePass {\n\tregex:RegExp;\n\tmapper:( match:string, inner:string ) => string;\n}\n\n\n/**\n *\n */\nclass Renderer {\n\n\tpublic context:any = { };\n\tpublic logging:boolean = false;\n\n\tpublic pass:TemplatePass = {\n\t\tregex:/\\[\\[([\\s\\S]+?)\\]\\]/g,\n\t\tmapper: function( match, inner ) {\n\t\t\treturn \"function() {\\n try { with( data ) {\\n return \" + inner + \" } } catch (error) { this.log( error ) } }.call( this )\";\n\t\t}\n\t};\n\n\tprivate cache:{} = {};\n\n\t/**\n\t* Renders the given data into the given template string\n\t*/\n\trender( template:string, data:any = {} ):any {\n\t\treturn this.compile(template)( data );\n\t}\n\n\t/**\n\t * Compiles a template string into a template function.\n\t */\n\tcompile( templateString:string, args:string[] = [ 'data' ] ):CompliedTemplate {\n\n\t\t// handle caching\n\t\tif( this.cache[ templateString ] ) return this.cache[ templateString ]\n\n\t\t// check if template is one single [[ .. ]] expression\n\t\tlet matches = templateString.match( /\\[\\[([\\s\\S]+?)\\]\\]/ );\n\t\tif( matches && matches[0] == templateString ) {\n\t\t\tvar source = this.parseValue( templateString );\n\t\t} else {\n\t\t\tvar source = this.parseString( templateString );\n\t\t}\n\n\t\tvar render = new Function( ...args, source ).bind( this.context );\n\n\t\t// store for caching\n\t\tthis.cache[ templateString ] = render;\n\n\t\treturn render;\n\t}\n\n\t/**\n\t\t* Turns the given template into a function body code.\n\t\t*/\n\tparseString( template:string ):string {\n\n\t\ttemplate = template.replace( this.pass.regex, ( match, inner:string ) => {\n\t\t\treturn \"' + this.empty( \" + this.pass.mapper( match, inner ) + \" ) + '\";\n\t\t});\n\n\t\treturn \"return '\" + template + \"';\";\n\t}\n\n\t/**\n\t* Turns the given template into a function body code.\n\t*/\n\tparseValue( template:string ):string {\n\t\t// simply return the inner template content\n\t\treturn template.replace( this.pass.regex, ( match, inner:string ) => {\n\t\t\treturn \"return \" + this.pass.mapper( match, inner ) + \";\";\n\t\t});\n\t}\n\n\t/**\n\t * Tests if the value of the template is empty or not\n\t */\n\tempty( data:any ):string {\n\t\treturn data || data === 0 ? data : '';\n\t}\n\n\t/**\n\t * Logs errors to the console\n\t */\n\tlog( ...params ) {\n\t\tif( !this.logging ) return;\n\n\t\tif( console ) {\n\t\t\t( console.trace ) ? console.trace( ...params ) : console.log( ...params );\n\t\t}\n\t}\n\n\t/**\n\t * Stops the debugger\n\t */\n\tdebug() {\n\t\tdebugger;\n\t}\n}\n\n\nexport var renderer = new Renderer();\nrenderer.context.empty = renderer.empty;\nrenderer.context.log = renderer.log.bind( renderer );\nrenderer.context.debug = renderer.debug;\n\n\nexport default Renderer;\n","import LookupDict from '../lookup/LookupDict';\nimport LookupObject from '../lookup/LookupObject';\nimport { renderer } from '../view/Renderer';\n\n/**\n * A class that handles translation lookups\n */\nclass Lang {\n\n\n\tprivate lookup:LookupDict;\n\n\tconstructor() {\n\t\tthis.lookup = new LookupDict();\n\t}\n\n\t/**\n\t * translates the given key.\n\t */\n\ttranslate( key:string, opts:{ data?:any, condition?:number } = {} ):any {\n\t\tif( key == undefined ) return '';\n\t\tvar def = this.lookup.get( key, key );\n\t\tif( opts.condition != undefined ) def = this.matchCondition( def, opts.condition );\n\t\tif( opts.data ) def = renderer.render( def, opts.data );\n\t\treturn def;\n\t}\n\n\tmatchCondition( value:string, num:number ) {\n\n\t\tvar parts = value.split( '|' );\n\n\t\t// check conditions\n\t\tvar found = this.parseConditions( parts, num )\n\t\tif( found ) return found.trim();\n\n\t\tif( parts.length == 1 ) return this.clearConditions( parts[0] );\n\n\t\t// check simple | split\n\t\treturn this.clearConditions( parts[ ( num == 1 ) ? 0 : 1 ] );\n\t}\n\n\tparseConditions( parts, number:number ):string {\n\t\t// loop over parts\n\t\tfor( var i = 0; i < parts.length; i++ ) {\n\t\t\tvar regex = /^[\\{\\[]([^\\[\\]\\{\\}]*)[\\}\\]](.*)/;\n\t\t\tvar match = regex.exec( parts[i] );\n\n\t\t\t// no proper condition\n\t\t\tif( match == null || match.length != 3 ) continue;\n\n\t\t\tvar value = match[2];\n\t\t\tvar condition = match[1];\n\t\t\tvar num = number;\n\n\t\t\t// range condition\n\t\t\tif( condition.indexOf( ',' ) > -1 ) {\n\n\t\t\t\tvar [ from , to ] = condition.split( ',' );\n\n\t\t\t\tif ( to == '*' && num >= parseInt( from ) ) {\n\t\t\t\t\treturn value;\n\t\t\t\t} else if ( from == '*' && num <= parseInt( to ) ) {\n\t\t\t\t\treturn value;\n\t\t\t\t} else if ( num >= parseInt( from ) && num <= parseInt( to ) ) {\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\n\t\t\t// exact condition\n\t\t\t} else if( parseInt( condition ) == num ) {\n\t\t\t\treturn value;\n\t\t\t}\n\t\t}\n\t}\n\n\tclearConditions( s:string ):string {\n\t\treturn s.replace( /^[\\{\\[]([^\\[\\]\\{\\}]*)[\\}\\]]/, '' ).trim();\n\t}\n\n\tadd( object:Object ) {\n\t\tthis.lookup.add( new LookupObject( object ) );\n\t}\n}\n\n/**\n * Define singleton for Lang\n */\nvar lang = new Lang();\n\n/**\n * Add translation into context\n */\nrenderer.context.trans = lang.translate.bind( lang );\n\nexport default lang;\n","/**\n * A class to register closure functions under a given key\n * ...\n */\nclass IoC{\n\n\tprivate map:{ [index:string]: T };\n\n\tconstructor(){\n\t\tthis.map = {};\n\t}\n\n\t/**\n\t * Registers the given closure under the given key\n\t * @param key The key to register the closure\n\t * @param closure The closure function\n\t */\n\tpublic add( key:string, closure:T ){\n\t\tthis.map[ key ] = closure;\n\t}\n\n\t/**\n\t * Returns the registered closure under the given key\n\t * @param key The key of registerd closure to look for\n\t * @return The closure under the given key or undefined, if\n\t * the key does not exist\n\t */\n\tpublic get( key:string ):T{\n\t\tvar tmp = this.map[ key ];\n\t\ttmp = ( tmp ) ? tmp : this.map[ 'default' ];\n\n\t\tif( !tmp ) throw new Error( \"No key with name: '\" + key + \"' is registered and no default fallback is defined on ioc.\" );\n\n\t\treturn tmp;\n\t}\n\n\t/**\n\t * Returns this key is registered allready\n\t * @param key The key to check if it is registered allready\n\t */\n\tpublic has( key:string ):boolean{\n\t\treturn this.map[ key ] != undefined;\n\t}\n\n\t/**\n\t * Returns all registered keys\n\t * @return Array of all the registered keys\n\t */\n\tpublic keys():string[] {\n\t\treturn Object.keys( this.map );\n\t}\n\n\t/**\n\t * Creates an alias for an already registered closure\n\t * @param newName The alias name\n\t * @param oldName The name of the already registered function\n\t */\n\tpublic alias( newName:string, oldName:string ) {\n\t\tthis.map[ newName ] = this.map[ oldName ];\n\t}\n\n\t/**\n\t * Renames an already registered closure to a new name\n\t * @param newName The new name\n\t * @param oldName The old registered name\n\t */\n\tpublic rename( newName:string, oldName:string ) {\n\t\tthis.alias( newName, oldName );\n\t\tdelete this.map[ oldName ];\n\t}\n}\n\nexport default IoC;\n","/**\n * This module contains the [[Observable]] interface and its principal implementation, [[Signal]].\n * See https://tc39.es/proposal-observable/ and https://rxjs.dev/ for more in-depth information\n * about observables.\n */\n\n\n/**\n * An [[Observer]] is a callback function that will receive `T` values from a [[Observable]]\n * after it has been [[subscribe]]d to it.\n */\nexport type Observer = (arg: T) => void;\n\n\n/**\n * A subscription gets returned to you when you [[Observable.subscribe]] an [[Observer]] to an [[Observable]].\n * It is via this object that you can [[unsubscribe]] the observer again.\n */\nexport interface Subscription {\n\n\t/**\n\t * Unsubscribes the observer from the [[Observable]] so it will no longer receive its values.\n\t */\n unsubscribe(): void;\n}\n\n\n/**\n * An [[Observable]] is a composable sequence of `T` values that will be *pushed* to observers\n * as they become available. This is the reverse of collections, which allow you to *pull* values\n * out of it via iteration.\n *\n * * `subscription = subscribe(observer)` to start receiving values.\n *\n * * `subscription.unsubscribe()` to stop receiving values.\n *\n * @example\n *\n * ```typescript\n * import {node} from '.../core/node/Node';\n *\n * const clicks = node(document.querySelector('#someElement')).clicks;\n * const subscription = clicks.subscribe(e => console.log('You clicked on ', e.target));\n * ...\n * subscription.unsubscribe();\n * ```\n *\n * @seealso https://tc39.es/proposal-observable/\n * @seealso https://rxjs.dev/\n */\nexport class Observable {\n\n private readonly subscribe_: (observer: Observer) => Subscription;\n\n\t/**\n\t * Initializes a new instance of the [[Observable]] class.\n\t *\n\t * @param subscribe The implementation of the [[subscribe]] method.\n\t */\n public constructor(subscribe: (observer: Observer) => Subscription) {\n this.subscribe_ = subscribe;\n }\n\n\t/**\n\t * Returns a new observable where all values of the original observable are delayed\n\t * as long as new values are pushed to observers. Once there hasn't been a new value for\n\t * `wait` milliseconds, the last value gets pushed.\n\t *\n\t * @param wait The number of milliseconds to wait after the last value before it is pushed.\n\t */\n public debounce(wait: number): Observable {\n return new Observable(observer => {\n let timeout;\n return this.subscribe(arg => {\n const later = () => {\n timeout = null;\n observer(arg);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n });\n });\n }\n\n\t/**\n\t * Gets a new observable containing only the values that fulfill the given predicate `fn`.\n\t * Think [Array.prototype.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).\n\t *\n\t * @param fn A predicate that specifies which values from the original observable to keep.\n\t */\n public filter(fn: (arg: T) => boolean): Observable {\n return new Observable(observer => {\n return this.subscribe(arg => {\n if (fn(arg)) {\n observer(arg);\n }\n });\n });\n }\n\n\t/**\n\t * Gets a new observable where each value has been transformed by the given function `fn`.\n\t * Think [Array.prototype.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).\n\t *\n\t * @param fn A function that maps a value to another value.\n\t */\n public map(fn: (arg: T) => U): Observable {\n return new Observable(observer => {\n return this.subscribe(arg => {\n observer(fn(arg));\n });\n });\n }\n\n\t/**\n\t * Subscribes the given `observer` (a callback function) to this observable which will start\n\t * receiving its values. Returns a [[Subscription]] via which you can [[unsubscribe]] the observer.\n\t *\n\t * @param observer The callback function that should receive `T` values from this observable.\n\t */\n public subscribe(observer: Observer): Subscription {\n return this.subscribe_(observer);\n }\n}\n\n\n/**\n * A kind of [[Observable]] that can dispatch `T` values via [[Signal.dispatch]].\n */\nexport class Signal extends Observable {\n\n private observers_?: Observer[];\n\n\t/**\n\t * Initializes a new instance of the [[Signal]] class.\n\t */\n public constructor() {\n super(observer => {\n if (!this.observers_) {\n this.observers_ = [observer];\n }\n else if (this.observers_.indexOf(observer) < 0) {\n this.observers_.push(observer);\n }\n const observers = this.observers_;\n return {\n unsubscribe: () => {\n const index = observers.indexOf(observer);\n if (index >= 0) {\n observers.splice(index, 1);\n }\n }\n };\n });\n this.observers_ = [];\n }\n\n\t/**\n\t * Dispatches the given value `arg` to this signal's observers.\n\t *\n\t * @param arg The value to dispatch to observers.\n\t */\n public dispatch(arg: T) {\n if (this.observers_) {\n for (const observer of [...this.observers_]) {\n observer(arg);\n }\n }\n }\n}\n\n/**\n * Listens to an event target event and creates an observable instance\n * @param el the event target tzo listen to\n * @param event the name of the event to listen to\n */\nexport function observable( event:string, el:EventTarget ):Observable {\n\treturn new Observable( observer => {\n\t\tlet handler = ( event ) => observer( event );\n\t\tel.addEventListener( event, handler );\n\t\treturn {\n\t\t\tunsubscribe:() => {\n\t\t\t\tel.removeEventListener( event, handler );\n\t\t\t}\n\t\t}\n\t});\n}\n","import { Observable, Signal } from '../signal/Signal';\nimport { isType } from '../js';\n\n\n/**\n * Checks whether the specified object implements [[AttributeChangeObservable]].\n *\n * @param obj The object that should be tested.\n */\nexport function isAttributeChangeObservable( obj:T ):obj is T&AttributeChangeObservable {\n\treturn obj && obj[ 'change' ] instanceof Observable;\n}\n\n\n/**\n * Describes the payload of the [[AttributeChangeObservable.change]] observable.\n */\nexport interface AttributeChange {\n\tname:string,\n\tnewValue:any,\n\toldValue:any\n}\n\n\n/**\n * Types that implement this interface publish all property value changes as an [[Observable]].\n *\n * @see Model is the main implementation of this interface inside the library.\n */\nexport interface AttributeChangeObservable {\n\n\t/**\n\t * Raised when a property's value has changed.\n\t *\n\t * @event\n\t */\n\tchange:Observable;\n}\n\n\n/**\n * A common model class that has getters and setters\n */\nclass Model implements AttributeChangeObservable {\n\n\tprivate _obj:Object;\n\n\t/**\n\t * Raised when a property's value has changed.\n\t *\n\t * @event\n\t */\n\tpublic change:Signal;\n\n\n\tconstructor( obj:Object = {} ) {\n\t\tthis._obj = obj;\n\t\tthis.change = new Signal();\n\t\tthis.generateAccessors();\n\t}\n\n\t/**\n\t * Returns the value of the model with the given key.\n\t * If the key does not exists the given optional fallback value is returned.\n\t * @param key The key on the model to lookup\n\t * @param fallback The fallback value when the key does not exists.\n\t */\n\tget( key:string, fallback:T = undefined ):T {\n\t\tvar value = this._obj[ key ];\n\t\treturn ( value !== undefined ) ? value : fallback;\n\t}\n\n\t/**\n\t * Sets the given value on the given key in the model.\n\t * @param key The key on the model to adjust its value\n\t * @param value The new value to set of the model\n\t */\n\tset( key:string, value:any ) {\n\n\t\tvar isNew = this._obj[ key ] == undefined;\n\t\tvar old = this._obj[ key ];\n\t\tif( old != value ) {\n\t\t\tthis._obj[ key ] = value;\n\t\t\tthis.change.dispatch( { name:key, newValue:value, oldValue: old } );\n\t\t}\n\t\tif( isNew ) this.generateAccessors();\n\t}\n\n\t/**\n\t * Return a clone of this object\n\t */\n\tpublic object():any{\n\t\tvar obj = {};\n\t\tfor( var attr in this._obj ){\n\t\t\tobj[attr] = this._obj[attr];\n\t\t}\n\t\treturn obj;\n\t}\n\n\t/**\n\t * Syncs the attributes of this model with the given object attributes\n\t * It only syncs builtin types. other types have to sync manually.\n\t */\n\tpublic sync( obj:any ) {\n\t\tfor( var property in obj ) {\n\t\t\tif( isType( obj[property], [ \"String\", \"Date\", \"Boolean\", \"Number\" ] ) ) {\n\t\t\t\tthis.set( property, obj[property] );\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate generateAccessors() {\n\n\t\tvar createProperty = ( name ) => {\n\t\t\tObject.defineProperty( this, name, {\n\t\t\t\tget() {\n\t\t\t\t\treturn this.get( name );\n\t\t\t\t},\n\t\t\t\tset( value ) {\n\t\t\t\t\tthis.set( name, value );\n\t\t\t\t},\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\t\t}\n\n\t\tfor( var attr in this._obj ){\n\t\t\tif( !( attr in this ) )\tcreateProperty( attr );\n\t\t}\n\t}\n}\n\nexport default Model;\n","import IoC from '../ioc/IoC';\nimport Model from './Model';\nimport { isType } from '../js';\n\nexport interface ModelConstructor {\n\tnew( json:Object ):T;\n}\n\nexport interface ModelFactoryFunction {\n\t( json:Object ):T\n}\n\nexport interface JsonFactoryFunction {\n\t( model:Model ):Object\n}\n\n/**\n * A class that helps to map models on a json structure\n */\nclass Mapper {\n\n\tpublic toModel:IoC = new IoC();\n\tpublic toJson:IoC = new IoC();\n\n\tpublic jsonLookup:( json:Object ) => string;\n\tpublic modelLookup:( model:Model ) => string;\n\n\n\tconstructor() {\n\n\t\t// setup default json to model conversion.\n\t\tthis.toModel.add( 'default', function( json:Object, data?:any ) {\n\t\t\treturn json;\n\t\t});\n\n\t\t// setup default model to json conversion\n\t\tthis.toJson.add( 'default', function( model:Model, data?:any ) {\n\t\t\treturn model;\n\t\t});\n\n\t\t// setup default lookup function for json\n\t\tthis.jsonLookup = function( json:Object ) {\n\t\t\treturn json[\"modelName\"];\n\t\t}\n\n\t\t// setup default lookup function for models\n\t\tthis.modelLookup = function( model:Model ) {\n\t\t\treturn ( model instanceof Model ) ? model.get( 'modelName' ) : 'default';\n\t\t}\n\t}\n\n\n\tpublic model( json:any ) {\n\n\t\t// if primitive type is given simply return it\n\t\tif( isType( json, [ \"String\", \"Date\", \"RegExp\", \"Function\", \"Boolean\", \"Number\", \"Null\", \"Undefined\" ] ) ) {\n\t\t\treturn json;\n\t\t}\n\n\t\t// if json array is given map each\n\t\tif( isType( json, \"Array\" ) ) {\n\t\t\treturn ( json as Array ).map( ( item ) => {\n\t\t\t\treturn this.model( item );\n\t\t\t});\n\t\t}\n\n\t\t// Object given make recursion over keys\n\t\tObject.keys( json ).forEach( ( name ) => {\n\t\t\tvar value = json[ name ];\n\n\t\t\t// only follow object or array references\n\t\t\tif( isType( value, [ \"Object\", \"Array\" ] ) ) json[ name ] = this.model( value );\n\t\t});\n\n\t\t// Finally turn object into model with ioc\n\t\treturn this.toModel.get( this.jsonLookup( json ) )( json );\n\t}\n\n\n\tpublic json( model:any ) {\n\n\t\t// if primitive type is given simply return it\n\t\tif( isType( model, [ \"String\", \"Date\", \"RegExp\", \"Function\", \"Boolean\", \"Number\", \"Null\", \"Undefined\" ] ) ) {\n\t\t\treturn model;\n\t\t}\n\n\t\t// if json array is given map each\n\t\tif( isType( model, \"Array\" ) ) {\n\t\t\treturn ( model as Array ).map( ( item ) => {\n\t\t\t\treturn this.json( item );\n\t\t\t});\n\t\t}\n\n\t\t// try to convert it with ioc\n\t\tmodel = this.toJson.get( this.modelLookup( model ) )( model );\n\n\t\t// if object given make recursion over keys\n\t\tObject.keys( model ).forEach( ( name ) => {\n\t\t\tmodel[ name ] = this.json( model[ name ] );\n\t\t});\n\n\t\t// any other types simply return\n\t\treturn model;\n\t}\n}\n\nexport var mapper = new Mapper();\n\nexport default Mapper;\n","import { Observable, observable } from \"../signal/Signal\";\nimport View from \"../view/View\";\n\n\nexport function node(html: string): NodeWrapper;\nexport function node(view: View): NodeWrapper;\nexport function node(native: Node): NodeWrapper;\nexport function node(arg: string | View | Node): NodeWrapper {\n\tif (typeof arg === 'string') {\n\n\t\t// wrap the content into new node because it can be one root node in template or its content\n\t\tlet temp = document.createElement('div' );\n\t\ttemp.innerHTML = arg;\n\n\t\t// If there is exactly one child the template has one root node - return this one.\n\t\t// otherwise if there are many or no children return the temp div as the root.\n\t\treturn new NodeWrapper( ( temp.children.length == 1 ) ? temp.children[0] : temp );\n\t}\n\telse if (arg instanceof Node) {\n\t\treturn new NodeWrapper( arg as Element );\n\t}\n\telse if ('node' in arg && arg['node'] instanceof Node) {\n\t\treturn new NodeWrapper( arg.node );\n\t}\n\telse {\n\t\treturn null;\n\t}\n}\n\n\nclass NodeWrapper {\n\n\tconstructor( public native:Element ) {}\n\n\tget clicks() {\n\t\treturn observable( 'click', this.native );\n\t}\n\tget scrolls() {\n\t\treturn observable( 'scroll', this.native );\n\t}\n\tget mouseleaves() {\n\t\treturn observable( 'mouseleave', this.native );\n\t}\n\tget mouseenters() {\n\t\treturn observable( 'mouseenter', this.native );\n\t}\n\tget mouseouts() {\n\t\treturn observable( 'mouseout', this.native );\n\t}\n\tget mouseovers() {\n\t\treturn observable( 'mouseover', this.native );\n\t}\n\tget mouseups() {\n\t\treturn observable( 'mouseup', this.native );\n\t}\n\tget mousedowns() {\n\t\treturn observable( 'mousedown', this.native );\n\t}\n\tget mousemoves() {\n\t\treturn observable( 'mousemove', this.native );\n\t}\n\tget keypresses() {\n\t\treturn observable( 'keypress', this.native );\n\t}\n\tget keydowns() {\n\t\treturn observable( 'keydown', this.native );\n\t}\n\tget keyups() {\n\t\treturn observable( 'keyup', this.native );\n\t}\n\tget focuses() {\n\t\treturn observable( 'focus', this.native );\n\t}\n\tget blurs() {\n\t\treturn observable( 'blur', this.native );\n\t}\n\tget changes() {\n\t\treturn observable( 'change', this.native );\n\t}\n\n\t/**\n\t * Removes all element within the native node\n\t */\n\tempty() {\n\t\tfor ( var i = this.native.children.length; i--; ) {\n\t\t\tthis.native.removeChild( this.native.children[i] );\n\t\t}\n\t}\n\n\t/**\n\t * Removes the given element from the dom.\n\t */\n\tremove() {\n\t\tif( this.native.parentElement ) this.native.parentElement.removeChild( this.native );\n\t}\n\n\t/**\n\t * Replaces this native node with the given newNode\n\t * @param newNode The new node to be place on position of the given existingNode\n\t */\n\treplace( newNode:Node ) {\n\t\tthis.native.parentNode.replaceChild( newNode, this.native );\n\t}\n\n\t/**\n\t * Prepends the given node to this node\n\t * @param node the new node to prepend\n\t */\n\tprepend( node:Node ) {\n\t\tthis.native.insertBefore( node, this.native.firstChild );\n\t}\n\n\n\t/**\n\t * Places a node at the given index\n\t * @param node The new node to place\n\t * @param index The index where to place the node\n\t */\n\tinsert( node:Node, index:number ) {\n\t\tthis.native.insertBefore( node, this.native.childNodes[ index ] );\n\t}\n\n\n\t/**\n\t * Check if the classname exists in the classlist of this node\n\t *\n\t * @param classname Classname to be checked\n\t * @return `true` if the class exists, `false` else\n\t */\n\thasClass( classname: string ): boolean {\n\t\treturn this.getClasses().indexOf( classname ) > -1;\n\t}\n\n\n\t/**\n\t * Adds a css class the the class list\n\t * @param name The name of the class to add\n\t */\n\taddClass( name:string ) {\n\t\tthis.setClasses( this.getClasses().concat( [ name ] ) );\n\t}\n\n\t/**\n\t * Removes a class from the list\n\t * @param name The css class to remove\n\t */\n\tremoveClass( name:string ) {\n\t\tthis.setClasses( this.getClasses().filter( current => name != current ) );\n\t}\n\n\t/**\n\t * Toggles a given class name on the node\n\t * @param name the name of the css class to toggle\n\t * @param force a flag to either force to add the class ( true ) or to remove the class (false)\n\t */\n\ttoggleClass( name:string, force?:boolean ) {\n\t\tif( force == undefined ) {\n\t\t\t( this.hasClass( name ) ) ? this.removeClass( name ) : this.addClass( name );\n\t\t} else {\n\t\t\t( force ) ? this.addClass( name ) : this.removeClass( name );\n\t\t}\n\t}\n\n\t/**\n\t * Helper function to set classes distinct\n\t */\n\tprivate setClasses( classList:string[] ) {\n\t\tlet distinct = classList.filter( ( name, index, list ) => name.length > 0 && list.indexOf( name ) === index );\n\t\tthis.native.setAttribute( 'class', distinct.join(' ') );\n\t}\n\n\tprivate getClasses():string[] {\n\t\tlet list = this.native.getAttribute('class');\n\t\treturn ( list ) ? list.split( ' ' ) : [];\n\t}\n\n\n\t/**\n\t * Returns the bounding box of this node including values for top, bottom, left, right relative to the current viewport\n\t */\n\trelativeBounds() {\n\t\tlet c = this.native.getBoundingClientRect();\n\t\tlet r = {  top: c.top, left: c.left, right: c.right, bottom: c.bottom, height: c.height, width: c.width };\n\n\t\tif ( r.height == undefined ) r.height = r.bottom - r.top;\n\t\tif ( r.width == undefined ) r.width = r.right - r.left;\n\n\t\treturn r;\n\t}\n\n\t/**\n\t * Returns the bounding box of this node including values for top, bottom, left, right in absolute document coordinates\n\t */\n\tabsoluteBounds() {\n\t\tlet box = this.relativeBounds();\n\n\t\tbox.top += document.body.scrollTop || document.documentElement.scrollTop;\n\t\tbox.bottom += document.body.scrollTop || document.documentElement.scrollTop;\n\t\tbox.left += document.body.scrollLeft || document.documentElement.scrollLeft;\n\t\tbox.right += document.body.scrollLeft || document.documentElement.scrollLeft;\n\n\t\treturn box;\n\t}\n}\n","import { renderer } from \"../Renderer\";\n\nabstract class Expression {\n\n\tprivate _template:string = \"\";\n\tprivate expressionContent:string;\n\n\tabstract update( data:any, attribute?:string );\n\n\tdestroy() {\n\t\t// Destroys this expression\n\t}\n\n\t/**\n\t * Simple test if template has the given attribute in its brankets\n\t * @param name\n\t */\n\thasAttribute( name:string ) {\n\t\tif( name == undefined ) return true;\n\t\treturn this.expressionContent.indexOf( name ) >= 0;\n\t}\n\n\tset template( t:string ) {\n\t\tthis._template = t;\n\t\tthis.expressionContent = '';\n\t\tt.replace( renderer.pass.regex, ( match, inner ) => {\n\t\t\tthis.expressionContent += inner;\n\t\t\treturn '';\n\t\t});\n\t}\n\n\tget template():string {\n\t\treturn this._template;\n\t}\n}\n\nexport function hasExpression( string:string ):boolean {\n\trenderer.pass.regex.lastIndex = 0; // reset global regex\n\treturn renderer.pass.regex.test( string );\n}\nexport function snakeToCamel( string ):string {\n\treturn string.replace( /(\\-\\w)/g, match => match[1].toUpperCase() );\n}\n\nexport function camelToSnake( string ) {\n\treturn string.split(/(?=[A-Z])/).join('-').toLowerCase();\n}\n\nexport default Expression;\n","import Expression from './Expression';\nimport { renderer } from '../Renderer';\nimport { threadId } from 'worker_threads';\n\n\nclass AttributeExpression extends Expression {\n\n\tnode:Element;\n\tattribute:string;\n\ttemplate:string;\n\n\tconstructor( node:Element, attribute:string, template:string ) {\n\t\tsuper();\n\t\tthis.node = node;\n\t\tthis.attribute = attribute;\n\t\tthis.template = template;\n\t}\n\n\tgetValue( data ) {\n\t\treturn renderer.render( this.template, data );\n\t}\n\n\tupdate( data:any, name?:string ) {\n\n\t\t// handle input\n\t\tif( this.node instanceof HTMLInputElement && this.attribute == 'value' ) {\n\t\t\tthis.node.value = this.getValue( data );\n\t\t}\n\n\t\tthis.writeValue( this.getValue( data ) );\n\t}\n\n\twriteValue( value:string ) {\n\t\tthis.node.setAttribute( this.attribute, value );\n\t}\n}\n\nexport default AttributeExpression;\n","import AttributeExpression from './AttributeExpression';\nimport { renderer } from '../Renderer';\nimport { isType } from '../../js';\n\nclass CSSExpression extends AttributeExpression {\n\n\tvalue:string;\n\n\tconstructor( node:Element, template:string ) {\n\t\tsuper( node, 'class', template );\n\t}\n\n\tgetValue( data ) {\n\t\treturn this.template.replace( renderer.pass.regex, ( match ) => {\n\t\t\tlet value = renderer.render( match, data );\n\n\t\t\t// string value simple return\n\t\t\tif( isType( value, 'String' ) ) return value;\n\n\t\t\t// object syntax for classes; filter false values and return keys as string\n\t\t\tif( isType( value, 'Object' ) ) return Object.keys( value ).filter( key => value[key] ).join( ' ' );\n\n\t\t\t// for anything else return empty string\n\t\t\treturn '';\n\t\t});\n\t}\n\n\t/**\n\t * Cache value for css merging\n\t */\n\twriteValue( value:string ) {\n\t\tsuper.writeValue( value );\n\t\tthis.value = value;\n\t}\n}\n\nexport default CSSExpression;\n","import { renderer } from '../Renderer';\nimport Expression from './Expression';\n\nclass TextExpression extends Expression {\n\n\tnode:Node;\n\n\tconstructor( node:Node ) {\n\t\tsuper();\n\t\tthis.node = node;\n\t\tthis.template = node.nodeValue;\n\t}\n\n\tupdate( data:any, name?:string ) {\n\t\tthis.node.nodeValue = renderer.render( this.template, data );\n\t}\n}\n\nexport default TextExpression;\n","import Expression from './Expression';\nimport View from '../View';\nimport { renderer } from '../Renderer';\n\nclass DataAttributeExpression extends Expression {\n\n\ttarget:any;\n\tattribute:string;\n\n\tconstructor( target:any, attribute:string, template:string ) {\n\t\tsuper();\n\t\tthis.template = template;\n\t\tthis.attribute = attribute;\n\t\tthis.target = target;\n\t}\n\n\tupdate( data:any, attribute:string ) {\n\t\tthis.target[ this.attribute ] = renderer.render( this.template, data );\n\t}\n}\n\nexport default DataAttributeExpression;\n","import { renderer } from '../Renderer';\nimport View from '../View';\nimport Expression from './Expression';\nimport ViewExpression from './ViewExpression';\n\nclass ViewDataExpression extends Expression {\n\n\texpression:ViewExpression;\n\ttemplate:string;\n\n\tconstructor( target:ViewExpression, template:string ) {\n\t\tsuper();\n\t\tthis.template = template;\n\t\tthis.expression = target;\n\t}\n\n\tupdate( data:any ) {\n\n\t\t// rerender view\n\t\tthis.expression.renderView( data );\n\t}\n\n\tvalue( data:{} ) {\n\t\treturn renderer.render( this.template, data );\n\t}\n}\n\nexport default ViewDataExpression;\n","import { renderer } from '../Renderer';\nimport { ViewFactory, TemplateContext } from '../Template';\nimport AttributeExpression from './AttributeExpression';\nimport DataAttributeExpression from './DataAttributeExpression';\nimport Expression, { snakeToCamel, hasExpression } from './Expression';\nimport ViewDataExpression from './ViewDataExpression';\nimport { Observable, observable } from '../../signal/Signal';\nimport View from '../View';\nimport CSSExpression from './CSSExpression';\n\nclass ViewExpression extends Expression {\n\n\ttarget:Element;\n\tattributes:{[key:string]:string};\n\texpressions:Expression[];\n\tcontext:TemplateContext;\n\tcontent:string;\n\tview:View;\n\n\tconstructor( target:Element, context:TemplateContext ) {\n\t\tsuper();\n\t\tthis.target = target;\n\t\tthis.context = context;\n\t\tthis.expressions = [];\n\t\tthis.parseAttributes();\n\t\tthis.template = this.attributes['view'];\n\t\tthis.content = target.innerHTML;\n\t}\n\n\tupdate( data:any, attribute?:string ) {\n\n\t\t// check if we have an expression update of the view attribute\n\t\tif( super.hasAttribute( attribute ) ) {\n\t\t\t// reset if there is already a view rendered\n\t\t\tif( this.target['_lnview'] ) this.reset();\n\t\t\tthis.renderView( data );\n\t\t} else {\n\t\t\t// update expressions only\n\t\t\tthis.expressions.forEach( exp => {\n\t\t\t\tif( exp.hasAttribute( attribute ) ) exp.update( data, attribute );\n\t\t\t});\n\t\t}\n\t}\n\n\tdestroy() {\n\t\tif( this.view ) this.view.destroy();\n\t\tfor (const exp of this.expressions ) {\n\t\t\texp.destroy();\n\t\t}\n\t}\n\n\trenderView( data ) {\n\n\t\tlet node = this.target;\n\t\tlet cssExpression:CSSExpression;\n\n\t\tlet viewName = this.attributes['view'];\n\n\t\t// if viewname is expression evaluate and write back\n\t\tif( hasExpression( viewName ) ) {\n\t\t\tviewName = renderer.render( viewName, data );\n\t\t}\n\n\t\tnode.removeAttribute( 'view' );\n\t\tnode['_lnname'] = this.getViewName( viewName );\n\n\t\tlet view = this.context.childFactory( viewName );\n\t\tthis.view = view;\n\n\t\t// set data if there is any\n\t\tif( this.attributes['data'] ) {\n\t\t\tlet dataExp = new ViewDataExpression( this, this.attributes['data'] );\n\t\t\tview.data = dataExp.value( data );\n\t\t\tthis.expressions.push( dataExp );\n\t\t\tnode.removeAttribute( 'data' );\n\t\t}\n\n\t\t// handle view attributes\n\t\tObject.keys( this.attributes ).forEach( name => {\n\n\t\t\t// ignore special view attribute\n\t\t\tif( name == 'view' || name == 'data' ) return;\n\n\t\t\tlet value = this.attributes[ name ];\n\n\t\t\t// handle events\n\t\t\tif( name.indexOf( 'on-' ) == 0 ) {\n\t\t\t\t// get signal name an subscribe\n\t\t\t\tlet signalName = snakeToCamel( name.replace( 'on-', '' ) );\n\n\t\t\t\t// look on data for signal\n\t\t\t\tif( view.data[ signalName ] instanceof Observable ) {\n\t\t\t\t\tsubscribeTo( view.data[ signalName ], value, data, this.context.view() );\n\t\t\t\t// otherwise register on node signal\n\t\t\t\t} else {\n\t\t\t\t\tsubscribeTo( observable( signalName, node ), value, data, this.context.view() );\n\t\t\t\t}\n\n\t\t\t\tnode.removeAttribute( name );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// helper function to create dataattribute expression\n\t\t\tvar expressions = this.expressions;\n\t\t\tfunction addAttributeExpression( property ) {\n\t\t\t\tlet dataExp = new DataAttributeExpression( view.data, property, value );\n\t\t\t\tdataExp.update( data, null );\n\t\t\t\texpressions.push( dataExp );\n\n\t\t\t\t// remove node attribute\n\t\t\t\tnode.removeAttribute( name );\n\t\t\t}\n\n\t\t\t// handle data-attributes\n\t\t\tif( name.indexOf( 'data-' ) == 0 ) {\n\t\t\t\taddAttributeExpression( snakeToCamel( name.substring( 5 ) ) );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// handle properties on view data\n\t\t\tvar propName = snakeToCamel( name );\n\t\t\tif( view.data instanceof Object && propName in view.data ) {\n\t\t\t\taddAttributeExpression( propName );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// handle class attribute\n\t\t\tif( name == 'class' ) {\n\t\t\t\tcssExpression = new CSSExpression( node, value );\n\t\t\t\tcssExpression.update( data );\n\t\t\t\tif( hasExpression( value ) ) this.expressions.push( cssExpression );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// handle regular node attributes\n\t\t\tif( hasExpression( value ) ) {\n\t\t\t\tlet expr = new AttributeExpression( node, name, value );\n\t\t\t\texpr.update( data );\n\t\t\t\tthis.expressions.push( expr );\n\t\t\t}\n\n\t\t});\n\n\t\tview.render( node );\n\t\tnode.setAttribute( 'view', node['_lnname'] );\n\n\t\t// if no outer expression, nothing to merge\n\t\tif( cssExpression ) {\n\t\t\tthis.mergeCSS( cssExpression, view );\n\t\t}\n\t}\n\n\tparseAttributes() {\n\t\tthis.attributes = {};\n\t\tfor (let i = 0; i < this.target.attributes.length; i++) {\n\t\t\tconst attr = this.target.attributes[i];\n this.attributes[ attr.name ] = attr.value;\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the view=\"...\" expression and all its sub expression have the attribute to update\n\t * @param name The name of the attribute to check if its in expressions\n\t */\n\thasAttribute( name?:string ) {\n\t\tif( super.hasAttribute( name ) ) return true;\n\t\treturn this.expressions.some( expr => expr.hasAttribute( name ) );\n\t}\n\n\n\t/**\n\t * Handles the merging of css from outer tenplate and inner view template on the same node\n\t * @param outer the outer cssexpression\n\t * @param view the inner view that maybe has a css experssion on root node\n\t */\n\tmergeCSS( outer:CSSExpression, view:View ) {\n\n\n\t\tlet innerClass = view.node.getAttribute( 'class' );\n\n\t\t// no change happend - nothing to merge\n\t\tif( innerClass == outer.value ) return;\n\n\t\t// search for inner cssexpression on root node.\n\t\tlet inner = view.template.expressions.filter( exp => exp instanceof CSSExpression && exp.node == view.node )[0] as CSSExpression;\n\t\tif( !inner ) {\n\t\t\t// if no expression was found but change in class -> static expression\n\t\t\tinner = new CSSExpression( view.node, '' );\n\t\t\tinner.value = innerClass;\n\t\t};\n\n\t\t// update mechanism to merge both\n\t\tfunction merge() {\n\t\t\tview.node.setAttribute( 'class', outer.value + ' ' + inner.value );\n\t\t}\n\n\t\t// handle update of one and the other\n\t\tinner.writeValue = function( value ) {\n\t\t\tinner.value = value;\n\t\t\tmerge();\n\t\t}\n\t\touter.writeValue = function( value ) {\n\t\t\touter.value = value;\n\t\t\tmerge();\n\t\t}\n\n\t\t// inital merge of both values.\n\t\tmerge();\n\t}\n\n\t/**\n\t * resets everything for a new rendering.\n\t */\n\treset() {\n\n\t\t// destroy old view\n\t\tif( this.view ) this.view.destroy();\n\n\t\t// reset expresions\n\t\tthis.expressions = [];\n\n\t\t// reset attributes\n\t\tObject.keys( this.attributes ).forEach( attr => {\n\t\t\tthis.target.setAttribute( attr, this.attributes[ attr ] );\n\t\t});\n\n\t\t// clear content\n\t\tthis.target.innerHTML = this.content;\n\n\t}\n\n\tgetViewName( key:any ) {\n\t\tif( typeof key == 'string' ) return key;\n\t\tif( typeof key == 'function' ) return key.toString().match(/function\\s(.+)\\(/)[1];\n\t\tif( typeof key == 'object' ){\n\t\t\tconst match = key.constructor.toString().match( /(function|class)\\s+(.+)\\(/ );\n\t\t\treturn ( match ) ? match[2] : '';\n\t\t}\n\t\treturn '';\n\t}\n\n}\n\nexport default ViewExpression;\n\n\n/**\n * Helper function to subscribe to signals\n * @param observable the observable to subscribe\n * @param content the string content of the on-... attribute for the oberserver callback\n * @param data the data/viewModel to look callback functions\n */\nexport function subscribeTo( observable:Observable, content:string, data:{}, view:View ) {\n\t// check for valid observable\n\tif( !observable ) return;\n\n\t// event closure\n\tif( hasExpression( content ) ) {\n\n\t\tlet callback = renderer.compile( content, [ 'event','data','view' ] );\n\n\t\tobservable.subscribe( ( event ) => {\n\t\t\tcallback( event, data, view );\n\t\t});\n\n\t// viewModel function\n\t} else if( data[ content ] ) {\n\t\tobservable.subscribe( data[ content ].bind( data ) );\n\t}\n}\n\n","import { node } from '../node/Node';\nimport AttributeExpression from './expressions/AttributeExpression';\nimport CSSExpression from './expressions/CSSExpression';\nimport Expression, { hasExpression, snakeToCamel } from './expressions/Expression';\nimport TextExpression from './expressions/TextExpression';\nimport ViewExpression, { subscribeTo } from './expressions/ViewExpression';\nimport View from './View';\nimport { observable } from '../signal/Signal';\n\n\nexport interface ViewFactory {\n\t( type:string ):View;\n}\n\nexport interface TemplateContext {\n\tdata:() => {},\n\tchildFactory:( type:string ) => View,\n\tview:() => View,\n}\n\n\nclass Template {\n\n\n\tpublic root:Element;\n\n\tpublic context:TemplateContext;\n\n\tpublic expressions:Array = [];\n\tpublic content:string;\n\n\tconstructor( content:string ) {\n\t\tthis.content = content || '';\n\t}\n\n\trender( target?:Element ) {\n\n\t\t// if there a target node given\n\t\tif( target instanceof Element ) {\n\n\t\t\t// only render if there is content to render\n\t\t\tif( this.content != '' ) {\n\n\t\t\t\t// render temp node to copy inner html\n\t\t\t\tlet temp = node( this.content ).native;\n\t\t\t\ttarget.innerHTML = temp.innerHTML;\n\n\t\t\t\t// apply all attributes on target\n\t\t\t\tfor( let i = 0; i < temp.attributes.length; i++ ) {\n\t\t\t\t\tlet name = temp.attributes[i].name;\n\t\t\t\t\ttarget.setAttribute( name, temp.getAttribute( name ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\ttarget = node( this.content ).native;\n\t\t}\n\n\t\tthis.root = target;\n\n\t\tthis.root['_lnview'] = this.context.view();\n\t}\n\n\tdestroy() {\n\t\tthis.expressions.forEach( expr => expr.destroy() );\n\t}\n\n\tprocessNode( node:Element|Text ) {\n\n\t\t// do not parse script tags\n\t\tif( node.nodeName.toLowerCase() == 'script' ) return;\n\n\t\tif( isText( node ) ) {\n\t\t\tthis.processTextNode( node );\n\t\t\treturn\n\t\t}\n\n\t\tif( node.getAttribute( 'view' ) ) {\n\t\t\tthis.processViewNode( node );\n\t\t\treturn;\n\t\t}\n\n\t\tthis.processAttributes( node );\n\t\tthis.processChildren( node );\n\n\t\tfunction isText( node:ChildNode ): node is Text {\n\t\t\treturn node.nodeType === 3 /* Node.TEXT_NODE */;\n\t\t}\n\t}\n\n\tprocessTextNode( node:Node ) {\n\t\tif( hasExpression( node.nodeValue ) ) {\n\t\t\tlet expr = new TextExpression( node );\n\t\t\tthis.expressions.push( expr );\n\t\t}\n\t}\n\n\tprocessViewNode( node:Element ) {\n\t\tlet expr = new ViewExpression( node, this.context );\n\t\tthis.expressions.push( expr );\n\t}\n\n\tprocessAttributes( node:Element ) {\n\n\t\tfor( let i = 0; i < node.attributes.length; i++ ) {\n\n\t\t\tlet name = node.attributes[i].name;\n\n\t\t\t// handle events\n\t\t\tif( name.indexOf( 'on-' ) == 0 ) {\n\n\t\t\t\t// get signal name an subscribe\n\t\t\t\tlet signalName = snakeToCamel( name.replace( 'on-', '' ) );\n\t\t\t\tsubscribeTo( observable( signalName, node ), node.getAttribute( name ), this.context.data(), this.context.view() );\n\n\t\t\t\t// remove attribute and adjust index so the next attribute won't be skipped\n\t\t\t\tnode.removeAttribute( name );\n\t\t\t\t--i;\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// handle attribute expressions\n\t\t\tif( hasExpression( node.getAttribute( name ) ) ) {\n\n\t\t\t\t// handle css special\n\t\t\t\tlet expr = ( name == 'class' ) ? new CSSExpression( node, node.getAttribute( name ) ) : new AttributeExpression( node, name, node.getAttribute( name ) );\n\t\t\t\tthis.expressions.push( expr );\n\t\t\t}\n\t\t}\n\t}\n\n\tprocessChildren( node:Element ) {\n\t\tfor (let i = 0; i < node.childNodes.length; i++) {\n\t\t\tthis.processNode( node.childNodes[i] );\n\t\t}\n\t}\n\n\n\tupdate( name?:string ) {\n\t\tthis.expressions.forEach( exp => {\n\t\t\tif( exp.hasAttribute( name ) ) exp.update( this.context.data(), name );\n\t\t});\n\t}\n\n\t/**\n\t * Returns the child view within this template.\n\t * @param name The view with the given name\n\t */\n\tfirst( name:string ) {\n\t\tvar node = this.root.querySelector( '[view=' + name + ']' );\n\t\treturn ( node && node[ '_lnview' ] ) ? node[ '_lnview' ] : null;\n\t}\n}\n\nexport default Template;\n\n\n\n\n\n\n\n\n","import { Signal } from \"../signal/Signal\";\n\n\ninterface ProgressSignal {\n\tloaded:number,\n\ttotal:number\n}\n\n/**\n * HttpRequest Class\n */\n\nexport class HttpRequest {\n\n\tprotected _method:string = 'GET';\n\tprotected _url:string;\n\tprotected _headers:{} = null;\n\tprotected request:XMLHttpRequest;\n\n\t/** @event */\n\tpublic progress:Signal = new Signal();\n\n\n\t/**\n\t * Create a new instance with the given url\n\t * @param url\n\t */\n\tconstructor( url:string ) {\n\t\tthis._url = url;\n\n\t\tthis.request = new XMLHttpRequest();\n\t\tthis.request.onprogress = ( event ) => {\n\t\t\tthis.progress.dispatch( event );\n\t\t}\n\t}\n\n\t/**\n\t * Set the method for the request\n\t * @param method\n\t */\n\tpublic method( method:string ):HttpRequest {\n\t\tthis._method = method;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Set the headers for the request\n\t * @param headers\n\t */\n\tpublic headers( headers:{} ):HttpRequest {\n\t\tthis._headers = headers;\n\t\treturn this\n\t}\n\n\t/**\n\t * Send/Load the request without sending data\n\t */\n\tpublic load():Promise {\n\t\treturn this.sendRequest().then( this.parseJson );\n\t}\n\n\t/**\n\t * Send the request with the given data\n\t * @param data\n\t */\n\tpublic send( data:any ):Promise {\n\t\treturn this.sendRequest( data ).then( this.parseJson );\n\t}\n\n\tpublic url():string {\n\t\treturn this._url;\n\t}\n\n\t/**\n\t * Open and send the request with the given parameters\n\t * and data\n\t * @param data\n\t */\n\tprivate sendRequest( data:any = null ):Promise {\n\n\t\tvar request = this.request;\n\t\tvar promise = this.promise( request );\n\n\t\trequest.open( this._method, this._url );\n\n\t\tfor( var key in this._headers ){\n\t\t\trequest.setRequestHeader( key, this._headers[key] );\n\t\t}\n\n\t\trequest.send( data );\n\n\t\treturn promise;\n\t}\n\n\t/**\n\t * Create a promise with the request\n\t * The promise resolves in case of a successful request - jejects otherwise\n\t */\n\tprivate promise( request:XMLHttpRequest ) {\n\t\treturn new Promise( ( resolve, reject ) => {\n\n\t\t\tvar errorHandler = function() {\n\t\t\t\tRequest.error.dispatch( { error: request.statusText } );\n\t\t\t\treject( Error( request.statusText ) );\n\t\t\t}\n\n\t\t\trequest.onload = function() {\n\t\t\t\tif( request.status >= 200 && request.status < 300 ) {\n\t\t\t\t\tresolve( request.responseText );\n\t\t\t\t} else {\n\t\t\t\t\terrorHandler();\n\t\t\t\t}\n\t\t\t};\n\n\t\t\trequest.onerror = errorHandler;\n\t\t});\n\t}\n\n\t/**\n\t * tries to parse response otherwise returns original string data\n\t */\n\tprivate parseJson( data:string ):string|{} {\n\t\ttry {\n\t\t\tdata = JSON.parse( data )\n\t\t\treturn data;\n\t\t} catch( e ) {\n\t\t\treturn data;\n\t\t}\n\t}\n}\n\ninterface ErrorSignal {\n\terror:string\n}\n\n/**\n * Static Request Class\n */\nexport class Request {\n\n\t/** @event */\n\tpublic static error:Signal = new Signal();\n\t/**\n\t * Creates a new post HttpRequest\n\t */\n\tpublic static post( url:string ):HttpRequest{\n\t\treturn new HttpRequest( url ).method( 'POST' );\n\t}\n\n\t/**\n\t * Creates a new get HttpRequest\n\t */\n\tpublic static get( url:string ):HttpRequest{\n\t\treturn new HttpRequest( url ).method( 'GET' );\n\t}\n\n\t/**\n\t * Creates a new put HttpRequest\n\t */\n\tpublic static put( url:string ):HttpRequest{\n\t\treturn new HttpRequest( url ).method( 'PUT' );\n\t}\n\n\t/**\n\t * Creates a new delete HttpRequest\n\t */\n\tpublic static delete( url:string ):HttpRequest{\n\t\treturn new HttpRequest( url ).method( 'DELETE' );\n\t}\n}\n\n\nexport default Request;\n","\nexport interface AssetConfig {\n\turl: string,\n\ttype?: \"js\" | \"css\",\n}\n\nexport class Asset {\n\n\t// store which assets are already loaded.\n\tstatic promises:{ [index:string]: Promise } = {};\n\n\tconfig:AssetConfig;\n\n\n\tconstructor( config:AssetConfig ) {\n\t\tif( !config.type ) config.type = this.guessType( config.url );\n\t\tthis.config = config;\n\t}\n\n\n\tload():Promise {\n\n\t\t// if not loaded create promise\n\t\tif( !Asset.promises[ this.config.url ] ) {\n\t\t\t( this.config.type == \"js\" ) ? this.loadScript() : this.loadCSS();\n\t\t}\n\n\t\treturn Asset.promises[ this.config.url ];\n\t}\n\n\t/**\n\t * Loads a js file into dom\n\t */\n\tprivate loadScript() {\n\n\t\tvar url = this.config.url;\n\n\t\tAsset.promises[ url ] = new Promise( function( resolve, reject ) {\n\t\t\tvar element = document.createElement( 'script' );\n\t\t\telement.src = url;\n\t\t\telement.addEventListener( 'load', resolve );\n\t\t\telement.addEventListener( 'error', reject );\n\t\t\tdocument.body.appendChild( element );\n\t\t}).then( function( event:Event ) {\n\t\t\tthis.finalize( url );\n\t\t\treturn event;\n\t\t}.bind( this ));\n\t}\n\n\t/**\n\t * Loads a css file into the dom\n\t */\n\tprivate loadCSS() {\n\n\t\tvar url = this.config.url;\n\n\t\tAsset.promises[ url ] = new Promise( function( resolve, reject ) {\n\t\t\tvar element = document.createElement( 'link' );\n\t\t\telement.type = 'text/css';\n\t\t\telement.rel = 'stylesheet';\n\t\t\telement.href = url;\n\t\t\telement.addEventListener( 'load', resolve );\n\t\t\telement.addEventListener( 'error', reject );\n\t\t\tdocument.head.appendChild( element );\n\t\t}).then( function( event:Event ) {\n\t\t\tthis.finalize( url );\n\t\t\treturn event;\n\t\t}.bind( this ));\n\t}\n\n\tprivate finalize( url:string ) {\n\t\tAsset[ url ] = new Promise( function( resolve, reject ) { resolve() } );\n\t}\n\n\t/**\n\t * Guesses the type based on the given url\n\t */\n\tprivate guessType( url:string ):\"js\"|\"css\" {\n\n\t\tif( url.split('.').pop() == \"js\" ) return \"js\";\n\t\tif( url.split('.').pop() == \"css\" ) return \"css\";\n\n\t\treturn \"js\";\n\t}\n}\n\nexport default Asset;\n","import LookupObject from '../lookup/LookupObject';\nimport { HttpRequest } from '../request/Request';\nimport { mapper } from '../model/Mapper';\nimport Asset from './Asset';\nimport { renderer } from '../view/Renderer';\n\nexport interface SetupConfig {\n\troutes?:{ [key:string]:{ url:string, method?:string, headers?:string } },\n\tdata?:{ [key:string]:{} },\n\tassets?:{ [key:string]:{ url:string, type?:'js'|'css' } },\n}\n\n/**\n * A class that manages external routes, data and assets.\n */\nexport class Setup {\n\n\tprivate lookup:LookupObject;\n\n\tconstructor() {\n\t\tthis.lookup = new LookupObject( { data:{}, assets:{}, routes:{} } );\n\t}\n\n\tinit( data:SetupConfig ) {\n\t\tthis.lookup.replace( data );\n\t\tmapper.model( data.data );\n\t\trenderer.context.setup = this;\n\t}\n\n\t/**\n\t * Returns a request that can load an save data to the url defined in the configuration\n\t * @param key The key under the routes definition\n\t * @param urlParams The parameters for the url\n\t */\n\troute( key:string, urlParams:{} = {} ):HttpRequest {\n\n\t\tvar config = this.search( \"routes.\" + key );\n\t\tvar url = renderer.render( config.url, urlParams );\n\t\tvar request = new HttpRequest( url );\n\n\t\tif( config.method ) request.method( config.method );\n\t\tif( config.headers ) request.headers( config.headers );\n\n\t\treturn request;\n\t}\n\n\t/**\n\t * Returns any data that is defined under the data configuration\n\t */\n\tdata( key?:string ):any {\n\t\tif( key === undefined ) return this.search( 'data' );\n\t\treturn this.search( \"data.\" + key );\n\t}\n\n\t/**\n\t * Returns a asset loader that can load additional scripts and css files.\n\t */\n\tasset( key:string ):Asset {\n\t\treturn new Asset( this.search( \"assets.\" + key ) );\n\t}\n\n\tprivate search( key ):any {\n\t\tvar config = this.lookup.lookup( key );\n\t\tif( typeof config === 'undefined' ) throw new Error( \"Could not find definition for api with key: \" + key );\n\t\treturn config;\n\t}\n}\n\n\nexport var setup = new Setup();\nexport default Setup;\n","import Template from './Template';\nimport { isAttributeChangeObservable } from '../model/Model';\nimport { setup } from '../setup/Setup';\nimport { renderer } from './Renderer';\nimport { Subscription } from '../signal/Signal';\n\n\n/**\n * This is one of the three [[ViewRegistration]] forms. It's the simplest form when you already have\n * a view class whose constructor does not take any parameters.\n *\n * @example\n *\n *```typescript\n * import register from '.../core/setup/register';\n * class AppView extends View {\n * constructor() { ... }\n * ...\n * }\n * register(({ view }) => view('App', AppView));\n * // ^^^^^^^\n *```\n */\nexport interface ViewConstructor {\n\tnew( config:ViewConfig ):View;\n}\n\n\n/**\n * This is one of the three [[ViewRegistration]] forms. This allows you to specify some common aspects\n * of a `View` class (such as its HTML `template`) without actually writing one. This is mostly useful\n * for `View`s that only need a template but no further logic.\n *\n * @example\n *\n *```typescript\n * import register from '.../core/setup/register';\n * register(({ view }) => view('App', { template: `...`, ... }));\n * // ^^^^^^^^^^^^^^^^^^^^^^^^\n *```\n */\nexport interface ViewDefinition {\n\ttemplate:string;\n\tregistrations?:ViewRegistrations|ViewRegistrationMap;\n\tgetData?():TData;\n\tinit?( this: View ):void;\n\tupdate?( this:View, name?:string ):void;\n}\n\n\n/**\n * This is one of the three [[ViewRegistration]] forms. This allows you to specify how a `View`\n * class should be instantiated.\n */\nexport interface ViewFactory {\n\t( key:unknown ):View;\n}\n\n\n/**\n * This type represents view registrations. These can be passed e.g. to:\n *\n * * [[\"core/setup/register\".RegistrationsBuilder.view]]\n * * [[ViewRegistrationMap.set]]\n * * or be stored as the values in a [[ViewRegistrations]] object.\n */\nexport type ViewRegistration = ViewConstructor|ViewDefinition|ViewFactory;\n\nexport interface ViewRegistrations {\n\t[ name:string ]:ViewRegistration;\n}\n\nexport class ViewRegistrationMap {\n\n\tpublic static union( others:(ViewRegistrations|ViewRegistrationMap)[] ):ViewRegistrationMap {\n\t\tconst union = new ViewRegistrationMap();\n\t\tfor( const other of others ) {\n\t\t\tunion.merge( other );\n\t\t}\n\t\treturn union;\n\t}\n\n\tprivate readonly _map: Map;\n\n\tpublic constructor() {\n\t\tthis._map = new Map();\n\t}\n\n\tpublic forEach( callback:( registration:ViewRegistration, key:unknown ) => void ):void {\n\t\tthis._map.forEach( callback );\n\t}\n\n\tpublic get( key:unknown ):ViewRegistration {\n\t\t// also search if there is a constructor registration\n\t\treturn this._map.get( key ) || (typeof key === 'object' && this._map.get( key.constructor ) );\n\t}\n\n\tpublic has( key:unknown ):boolean {\n\t\treturn this._map.get( key ) != undefined;\n\t}\n\n\tpublic merge( registrations:ViewRegistrations|ViewRegistrationMap ):ViewRegistrationMap {\n\t\tif( registrations instanceof ViewRegistrationMap ) {\n\t\t\tregistrations.forEach( ( registration, key ) => this.set( key, registration ) );\n\t\t}\n\t\telse {\n\t\t\tfor( const key in registrations ) {\n\t\t\t\tthis.set( key, registrations[ key ] );\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}\n\n\tpublic set( key:unknown, registration:ViewRegistration ):ViewRegistrationMap {\n\t\tthis._map.set( key, registration );\n\t\treturn this;\n\t}\n}\n\n/** @ignore */\nfunction convertToViewFactory( registration:ViewRegistration ):ViewFactory {\n\n\tif( isViewDefinition( registration ) ) {\n\t\tconst viewClass = class extends View {};\n\t\tif( registration.init ) {\n\t\t\tviewClass.prototype['init'] = registration.init;\n\t\t}\n\t\tif( registration.update ) {\n\t\t\tviewClass.prototype['update'] = registration.update;\n\t\t}\n\t\treturn () => new viewClass({ ...registration, data:registration.getData && registration.getData() });\n\t}\n\telse if( isViewConstructor( registration ) ) {\n\t\treturn () => new registration({});\n\t}\n\telse {\n\t\treturn registration;\n\t}\n\n\tfunction isViewDefinition( registration:ViewRegistration ):registration is ViewDefinition {\n\t\treturn typeof registration === 'object';\n\t}\n\n\tfunction isViewConstructor( registration:ViewConstructor|ViewFactory ):registration is ViewConstructor {\n\t\tfor ( let proto = Object.getPrototypeOf( registration ); proto; proto = Object.getPrototypeOf( proto ) ) {\n\t\t\tif( proto === View ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n}\n\n\n/** @ignore */\nconst registrations = new ViewRegistrationMap();\n\n\n/**\n * @deprecated Use local view registrations instead, i.e. pass them either to a `View` constructor, or to the `scan` function.\n * @ignore\n */\nexport const ioc = new class {\n\n\t/** Deprecated. Use `ioc[name] = factory` instead.\n\t * @deprecated\n\t */\n\tpublic add( name:string, factory:ViewFactory ):void {\n\t\tregistrations.set( name, factory );\n\t}\n\n\t/** Deprecated. Use `ioc[name]` instead.\n\t * @deprecated\n\t*/\n\tpublic has( name:string ):boolean {\n\t\treturn registrations.has( name );\n\t}\n\n\t/** Deprecated. Use `name in ioc` instead.\n\t * @deprecated\n\t*/\n\tpublic get( name:string ):ViewRegistration {\n\t\treturn registrations.get( name );\n\t}\n};\n\n\n/**\n * Registers the `View` class specified by `constructor` under the given `key`\n * such that it can be instantiated in templates using e.g. `
`.\n *\n * ### Example:\n *\n * @example\n```typescript\n class Foo extends View { ... }\n register('Foo', Foo);\n```\n *\n * Once thus registered, you will be able to instantiate `Foo` in templates e.g. as follows:\n *\n```html\n
\n```\n *\n * @param key The key (e.g. a name) under which the ad-hoc `View` class should be registered.\n * @param constructorOrFactory The `View` class, or a parameterless closure (of type `ViewFactory`) that creates a `View` instance, to associate with `key`.\n *\n * @deprecated Use local view registrations instead, i.e. pass them either to a `View` constructor, or to the `scan` function.\n * @ignore\n */\nexport function register( key:unknown, constructorOrFactory:ViewConstructor|ViewFactory );\n\n/**\n * Registers an ad-hoc `View` class created from the specified `definition` under the given `key`\n * such that it can be instantiated in templates using e.g. `
`.\n *\n * For simple views, this overload can spare you the work of writing a full-blown class.\n *\n * ### Example:\n *\n * @example\n```typescript\n register('Foo', {\n template: `
Greetings, [[name]].
`,\n data: {\n name: 'stranger'\n }\n });\n```\n *\n * Once thus registered, you will be able to instantiate `Foo` in templates e.g. as follows:\n *\n```html\n
\n```\n *\n * ### Remarks:\n *\n * Note that data binding will not work for the above component because `data` is a plain object\n * whose properties will not dispatch `change` signals. If you want data binding to work,\n * set `data` to an instance of `Model` instead of a plain object.\n *\n * @param key The key (e.g. a name) under which the ad-hoc `View` class should be registered.\n * @param definition Definition of the ad-hoc `View` class. You must specify at least its `template`.\n *\n * @deprecated Use local view registrations instead, i.e. pass them either to a `View` constructor, or to the `scan` function.\n * @ignore\n */\nexport function register( key:unknown, definition:ViewDefinition );\n\n/**\n * Registers the specified view registrations.\n *\n * @param registrations The registrations to register.\n *\n * @deprecated Use local view registrations instead, i.e. pass them either to a `View` constructor, or to the `scan` function.\n * @ignore\n */\nexport function register( registrations:ViewRegistrationMap|ViewRegistrations ):void;\n\nexport function register( keyOrRegistrations:ViewRegistrationMap|ViewRegistrations|unknown, registration?:ViewRegistration ) {\n\n\tif( !registration ) {\n\t\tif( keyOrRegistrations instanceof ViewRegistrationMap ) {\n\t\t\tkeyOrRegistrations.forEach( ( registration, key ) => {\n\t\t\t\tregister( key, registration );\n\t\t\t});\n\t\t}\n\t\telse {\n\t\t\tconst registrations = keyOrRegistrations;\n\t\t\tfor( const key in registrations ) {\n\t\t\t\tregister( key, registrations[ key ] );\n\t\t\t}\n\t\t}\n\t}\n\telse {\n\t\tregistrations.set( keyOrRegistrations, registration );\n\t}\n}\n\nexport function scan( root:Element, ...registrations:(ViewRegistrations|ViewRegistrationMap)[] ) {\n\tvar temp = new View( { data:setup.data(), registrations: ViewRegistrationMap.union( registrations ) } );\n\ttemp.render( root );\n}\n\nexport interface ViewConfig {\n\tdata?:TData,\n\tregistrations?:ViewRegistrations|ViewRegistrationMap,\n\ttemplate?:string\n}\n\n/**\n * A common view class that has a container to render content/template into.\n */\nexport class View {\n\n\tprotected _data:TData;\n\tprotected dataSubscription:Subscription;\n\n\tpublic template:Template;\n\tpublic parent:View<{}>;\n\tpublic readonly registrations:ViewRegistrations|ViewRegistrationMap;\n\n\tconstructor( config:ViewConfig ) {\n\n\t\tthis.registrations = config.registrations;\n\n\t\tthis.template = new Template( config.template );\n\t\tthis.template.context = {\n\t\t\tdata: () => this._data,\n\t\t\tchildFactory: this.createChild.bind( this ),\n\t\t\tview: () => this,\n\t\t}\n\n\t\tthis._data = config.data;\n\t}\n\n\n\t/**\n\t * Renders the view template.\n\t * If an empty target is given, the template is rendered into to given target.\n\t * If the target is not empty, the content of the target is used as the template.\n\t */\n\tpublic render( target?:Element ) {\n\n\t\t// do rendering of template\n\t\tthis.template.render( target );\n\t\tthis.template.processNode( this.template.root );\n\t\tthis.template.update();\n\n\t\t// register databinding if model is given\n\t\tif( isAttributeChangeObservable( this.data ) ) {\n\t\t\tthis.dataSubscription = this.data.change.subscribe( ( change ) => {\n\t\t\t\tthis.update( change.name );\n\t\t\t});\n\t\t}\n\n\t\t// everything is ready now we can invoke view's init\n\t\tthis.init();\n\t}\n\n\t/**\n\t * The init function is automatically called after the render function.\n\t * So everything is rendered and the node is ready to be used.\n\t * Overwrite the init function for custom dom manipulations.\n\t */\n\tprotected init() {\n\n\t}\n\n\t/**\n\t * Callback when view is destroyed\n\t */\n\tprotected deinit() {\n\n\t}\n\n\t/**\n\t * Returns the root node of the view\n\t */\n\tpublic get node():Element {\n\t\treturn this.template.root;\n\t}\n\n\tpublic destroy() {\n\t\t// unsubscript from data\n\t\tif( this.dataSubscription ) this.dataSubscription.unsubscribe();\n\t\tthis.template.destroy();\n\t\tthis.deinit();\n\t}\n\n\t/**\n\t * Updates the view if data attribute has changed\n\t */\n\tpublic update( name?:string ) {\n\t\tthis.template.update( name );\n\t}\n\n\tpublic child( name:string ):T {\n\t\treturn this.template.first( name ) as T;\n\t}\n\n\tpublic createChild( type:unknown ) {\n\t\tvar view = convertToViewFactory( this.resolve( type ) )( type );\n\t\tview.parent = this;\n\t\treturn view;\n\t}\n\n\tset data( data:TData ) {\n\t\tthis._data = data;\n\t}\n\tget data():TData {\n\t\treturn this._data;\n\t}\n\n\tprivate resolve( type:unknown ):ViewRegistration {\n\t\ttry {\n\t\t\t// Recursive lookup is done in a separate method (`resolveRecursive`)...\n\t\t\treturn this.resolveRecursive( type );\n\t\t}\n\t\tcatch (e) {\n\t\t\t// ... so that we can throw an error that mentions the original `type`\n\t\t\t// instead of always \"default\" (which is the last thing a recursive\n\t\t\t// lookup would be looking for, but not informative at all):\n\t\t\trenderer.log( 'Registration ', type, ' not found in View', this );\n\t\t\tthrow new ViewRegistrationNotFoundError( type );\n\t\t}\n\t}\n\n\tprivate resolveRecursive( type:unknown ):ViewRegistration {\n\t\tlet local = this.getRegistration( type );\n\t\tif( local ) return local;\n\n\t\t// lookup parent view\n\t\tif( this.parent ) return this.parent.resolveRecursive( type );\n\n\t\t// lookup global registry\n\t\tlet global = registrations.get( type );\n\t\tif( global ) return global;\n\n\t\t// default lookup\n\t\tif( type !== 'default' ) return this.resolveRecursive( 'default' );\n\n\t\tthrow new ViewRegistrationNotFoundError( type );\n\t}\n\n\n\tprivate getRegistration( key:unknown ):ViewRegistration {\n\n\t\tif( !this.registrations ) return undefined;\n\n\t\tif( this.registrations instanceof ViewRegistrationMap ) {\n\t\t\treturn this.registrations.get( key );\n\t\t} else {\n\t\t\t// old object lookup case\n\t\t\treturn this.registrations[ key ];\n\t\t}\n\t}\n}\n\n\n/** @ignore */\nclass ViewRegistrationNotFoundError extends Error {\n\n\tpublic constructor( public readonly key:unknown ) {\n\t\tsuper( `There is no view registration for the given key ${JSON.stringify( key )}, nor is there a \"default\" fallback.` );\n\t}\n}\n\nexport default View;\n","/**\n * This module exports the convenience function [[register]] to help you define\n * model mappings and view registrations succinctly.\n */\n\n/****/\n\nimport { mapper, ModelConstructor, ModelFactoryFunction } from '../model/Mapper';\nimport { ViewRegistration, ViewRegistrationMap } from '../view/View';\n\n\n/**\n * This convenience method helps to configure model mappings and view registrations via a fluent API.\n *\n * @param callback This callback function will receive a `builder` object which provides various methods:\n *\n * * Specify how raw data (\"JSON\") is mapped to class instances using **`.model(...)`**.\n * (This will invoke the global `mapper.toModel.add` behind the curtains.)\n *\n * * Register views using `.model(...)`**`.view(...)`** (if you want to tie a view to a certain\n * type of model class) or using **`.view(...)`** (if you want e.g. named views).\n *\n * @returns An object that can be queried for the following:\n *\n * * **`.viewRegistrations`**. Note that these are not automatically registered. You need to pass these\n * registrations on either to a `View` instance (via the constructor) or to `scan`. (You *can* also\n * register these globally using `register` (from the `core/view/View` module), however that method\n * has been marked deprecated.)\n *\n * @example\n *```typescript\n * const {viewRegistrations} = register(({model, view}) => {\n * model('App\\\\Heading', Heading).view(HeadingView);\n * });\n *\n * scan(document.body, viewRegistrations);\n *```\n *\n * Then in your templates (assuming that there is a `heading` data property which was\n * mapped from a `{ modelName: \"App\\Heading\" }` JSON object), you can resolve `heading` to a `HeadingView`\n * as follows:\n *\n *```html\n *
\n *```\n */\nexport default function register( callback:( builder:RegistrationsBuilder ) => void ):Registrations {\n\tconst builder = new RegistrationsBuilderImpl();\n\n\t// This weird hack is needed such that destructuring of `builder`\n\t// won't lose the `this` binding to `builder`:\n\tcallback({\n\t\tmodel: builder.model.bind(builder),\n\t\tview: builder.view.bind(builder),\n\t});\n\n\treturn builder;\n}\n\n/**\n * The registrations produced (and returned) by [[register]].\n */\ninterface Registrations {\n\n\t/**\n\t * The view registrations defined. Note that these are not automatically registered for you.\n\t * You will need to pass them forward to e.g. [[\"core/view/View\".View]]'s constructor, or to\n\t * the [[\"core/view/View\".scan]] method.\n\t */\n\tviewRegistrations:ViewRegistrationMap;\n}\n\n/**\n * Provides various methods that can be used to specify model mappings and view registrations.\n * An instance of this type will be passed to the `callback` that you pass to [[register]].\n */\ninterface RegistrationsBuilder {\n\n\t/**\n\t * Use this method to create an association between a model class and a view registration.\n\t * @param constructor The model class that should be associated with a view registration.\n\t *\n\t * @example\n\t *\n\t *```typescript\n\t * class Image extends Model { ... }\n\t * class ImageView extends View { ... }\n\t * register(({ model }) => model(Image).view(ImageView));\n\t *```\n\t *\n\t * After this, you will be able to resolve `Image` models to `ImageView` instances\n\t * in your templates as follows:\n\t *\n\t *```html\n\t *
\n\t *```\n\t */\n\tmodel( constructor:ModelConstructor ):ModelViewAssociationBuilder;\n\n\t/**\n\t * Use this method to map raw data with the given `modelName` to a model class,\n\t * and optionally create an association between that model class and a view registration.\n\t *\n\t * @param name The `modelName` identifying data to be mapped to the model class.\n\t * @param constructor The model class that should be mapped to.\n\t *\n\t * @example\n\t *\n\t *```typescript\n\t * class Image extends Model { ... }\n\t * register(({ model }) => model('App\\\\Image', Image));\n\t *```\n\t *\n\t * or:\n\t *\n\t *```typescript\n\t * class Image extends Model { ... }\n\t * class ImageView extends View { ... }\n\t * register(({ model }) => model('App\\\\Image', Image).view(ImageView));\n\t *```\n\t *\n\t * This second form will allow you to resolve `Image` models to `ImageView` instances\n\t * in your templates as follows:\n\t *\n\t *```html\n\t *
\n\t *```\n\t */\n\tmodel( name:string, constructor:ModelConstructor ):ModelViewAssociationBuilder;\n\n\t/**\n\t * Use this method to map raw data with the given `modelName` to a model class,\n\t * and optionally create an association between that model class and a view registration.\n\t *\n\t * @param name The `modelName` identifying data to be mapped to the model class.\n\t * @param factory A closure function that should produce an model class (`T`) instance from\n\t * the raw data object it receives.\n\t *\n\t * @example\n\t *\n\t *```typescript\n\t * class Image extends Model { ... }\n\t * register(({ model }) => model('App\\\\Image', dto => new Image(dto, ...)));\n\t *```\n\t */\n\tmodel( name:string, factory:ModelFactoryFunction ):void;\n\n\t/**\n\t * Use this method to create a view registration under the given `key`. The key can be\n\t * anything: usually, you'll want to specify a string or a class constructor.\n\t *\n\t * @param key The key that identifies the view registration.\n\t * @param registration The view registration.\n\t *\n\t * @example\n\t *\n\t *```typescript\n\t * class App extends Model { ... }\n\t * class AppView extends View { ... }\n\t * register(({ view }) => view('App', AppView));\n\t *```\n\t *\n\t * or:\n\t *\n\t *```typescript\n\t * class App extends Model { ... }\n\t * register(({ view }) => view('App', { template: `...`, getData: () => new App(...) }));\n\t *```\n\t *\n\t * Both of the examples above will allow you to \"instantiate\" an `App` view in your templates\n\t * as follows:\n\t *\n\t *```html\n\t *
\n\t *```\n\t *\n\t * Note that the `key` need not be a string. You could also specify a model class instead:\n\t *\n\t *```typescript\n\t * class App extends Model { ... }\n\t * class AppView extends View { ... }\n\t * register(({ view }) => view(App, AppView));\n\t *```\n\t *\n\t * This is equivalent to the preferable `model(App).view(AppView)` and allows you to then\n\t * resolve an `App` model to an `AppView` in your templates as follows:\n\t *\n\t *```html\n\t *
\n\t *```\n\t */\n\tview( key:unknown, registration:ViewRegistration ):void;\n}\n\n/** @ignore */\ninterface ModelViewAssociationBuilder {\n\tview( registration:ViewRegistration ):void;\n}\n\n/** @ignore */\nclass RegistrationsBuilderImpl implements RegistrationsBuilder, Registrations {\n\n\tpublic readonly viewRegistrations:ViewRegistrationMap;\n\n\tpublic constructor() {\n\t\tthis.viewRegistrations = new ViewRegistrationMap();\n\t}\n\n\tpublic model( nameOrConstructor:string|ModelConstructor, constructorOrFactory?:ModelConstructor|ModelFactoryFunction ) {\n\n\t\tconst viewRegistrations = this.viewRegistrations;\n\n\t\tif( typeof nameOrConstructor === 'string' ) {\n\t\t\tif( isModelConstructor( constructorOrFactory ) ) {\n\t\t\t\tmapper.toModel.add( nameOrConstructor, dto => new constructorOrFactory( dto ) );\n\t\t\t\treturn {\n\t\t\t\t\tview( registration:ViewRegistration ):void {\n\t\t\t\t\t\tviewRegistrations.set( constructorOrFactory, registration );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t\telse {\n\t\t\t\tmapper.toModel.add( nameOrConstructor, constructorOrFactory );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\treturn {\n\t\t\t\tview( registration:ViewRegistration ):void {\n\t\t\t\t\tviewRegistrations.set( nameOrConstructor, registration );\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tfunction isModelConstructor( fn:Function ): fn is ModelConstructor {\n\t\t\treturn !!fn.length;\n\t\t}\n\t}\n\n\tpublic view( key:unknown, registration:ViewRegistration ): void {\n\t\tthis.viewRegistrations.set( key, registration );\n\t}\n}\n","/**\n * This module contains the [[Repeat]] helper component used to repeat HTML per collection item.\n */\n\n/***/\n\nimport Model, { isAttributeChangeObservable } from '../core/model/Model';\nimport View from '../core/view/View';\nimport { node } from '../core/node/Node';\nimport { Subscription } from '../core/signal/Signal';\n\n\n/**\n * A helper view that repeats its inner HTML once for each item of a given collection.\n * Set its `items` attribute to the collection, and specify the iteration variable's name in the `as` attribute.\n * Within the repeat block, you can access the context of the outside component with `parent`.\n *\n * ### Basic usage:\n *\n * ```html\n *
\n * \n *
\n * ```\n *\n * For this to work, you must have previously registered the component under the key `repeat`.\n * For example:\n *\n * ```typescript\n * import Repeat from '.../components/Repeat';\n * ...\n * scan(document.body, { 'repeat': Repeat }, ...otherViewRegistrations);\n * ```\n */\nexport default class Repeat extends View {\n\n\titemTemplate:string;\n\tsubscription:Subscription;\n\titemSubscriptions?:Subscription[];\n\n\tconstructor() {\n\t\tsuper( { template:'', data:new RepeatModel( { as:'', items:[] } ) } );\n\t}\n\n\trender( target:Element ) {\n\n\t\t// before render get inner html for item template.\n\t\tthis.itemTemplate = target.innerHTML;\n\t\ttarget.innerHTML = '';\n\n\t\tsuper.render( target );\n\t}\n\n\tinit() {\n\t\tthis.renderItems();\n\t\tthis.subscription = this.data.change.filter( c => c.name == 'items' ).subscribe( this.renderItems.bind( this ) );\n\t}\n\n\trenderItems() {\n\n\t\tthis.destroyItems();\n\n\t\t// check for valid array\n\t\tlet items = this.data.items;\n\t\tif( !Array.isArray( items ) ) return;\n\n\t\tthis.itemSubscriptions = [];\n\n\t\tconst nodes = document.createDocumentFragment();\n\t\titems.forEach( ( item, index ) => {\n\t\t\tlet data = {\n\t\t\t\tparent:this.parent.data,\n\t\t\t\tindex:index,\n\t\t\t\titems:items,\n\t\t\t};\n\n\t\t\t// inject item\n\t\t\tdata[this.data.as] = item;\n\n\t\t\tlet temp = new View( { template:this.itemTemplate, data:data } );\n\t\t\ttemp.parent = this;\n\t\t\ttemp.render();\n\n\t\t\t// setup proper updates with prefix name\n\t\t\tif( isAttributeChangeObservable( item ) ) {\n\t\t\t\tthis.itemSubscriptions.push( item.change.subscribe( ( change ) => {\n\t\t\t\t\ttemp.template.update( this.data.as + '.' + change.name );\n\t\t\t\t}));\n\t\t\t}\n\n\t\t\tnodes.appendChild(temp.node);\n\t\t} );\n\n\t\tthis.node.appendChild(nodes);\n\t}\n\n\tdeinit() {\n\n\t\tif( this.subscription ) this.subscription.unsubscribe();\n\n\t\tthis.destroyItems();\n\t}\n\n\tprivate destroyItems() {\n\t\t// unsubscribe from items' change signal\n\t\tif( this.itemSubscriptions ) {\n\t\t\tthis.itemSubscriptions.forEach( s => s.unsubscribe() );\n\t\t\tthis.itemSubscriptions = null;\n\t\t}\n\n\t\t// destroy old views and empty node\n\t\twhile( this.node.hasChildNodes() ) {\n\t\t\tlet node = this.node.firstChild;\n\t\t\tif( node['_lnview'] ) node['_lnview'].destroy();\n\t\t\tthis.node.removeChild( node );\n\t\t}\n\t}\n}\n\n\n/** @ignore */\nclass RepeatModel extends Model {\n\tas:string;\n\titems:unknown[];\n}\n","import Model from 'ln/model/Model';\nimport {Signal} from 'ln/signal/Signal';\n\nimport {Selectable} from 'services/Selectable';\n\n\nexport abstract class Page extends Model implements Selectable {\n\n public id: string;\n public selected: boolean;\n public symbol: string;\n public symbolHref: string;\n public symbolLarge: string;\n public symbolLargeHref: string;\n\n public readonly navigateBack: Signal;\n\n public constructor(dto) {\n super({\n id: '',\n selected: false,\n symbol: '',\n symbolHref: '',\n symbolLarge: '',\n symbolLargeHref: '',\n\n ...dto,\n });\n\n this.navigateBack = new Signal();\n }\n}\n\n\nexport type TargetAudience = 'middle-school' | 'secondary-school-1';\n\n\nexport interface TargetAudienceSpecific {\n targetAudience: TargetAudience;\n}\n\n\nexport function isTargetAudienceSpecific(page: Page): page is Page & TargetAudienceSpecific {\n return typeof page['targetAudience'] === 'string';\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const contentPageTemplate = `

[[title]]

`;\n","import {Signal} from 'ln/signal/Signal';\nimport View from 'ln/view/View';\n\nimport {Page} from 'components/page/Page';\n\nimport {contentPageTemplate} from 'templates/content-page';\n\n\nexport class ContentPage extends Page {\n\n public readonly contentItems: object[];\n public readonly title: string;\n\n public constructor(dto) {\n super({\n contentItems: dto.content_items || [],\n title: '',\n\n ...dto\n });\n }\n}\n\n\nexport class ContentPageView extends View {\n\n public constructor() {\n super({\n template: contentPageTemplate,\n });\n }\n}\n","export function addTextStyles(element: HTMLElement) {\n\n const walker = element.ownerDocument.createTreeWalker(element, NodeFilter.SHOW_ELEMENT);\n while (walker.nextNode()) {\n const element = walker.currentNode;\n switch (element.localName) {\n case 'a':\n element.classList.add('text-style', '-link');\n break;\n case 'b':\n case 'em':\n case 'th':\n element.classList.add('text-style', '-para', '-em', '-color-primary');\n break;\n case 'h1':\n element.classList.add('text-style', '-h1', 'content-item', '-heading');\n break;\n case 'h2':\n element.classList.add('text-style', '-h2', 'content-item', '-heading', '-color-primary');\n break;\n case 'h3':\n element.classList.add('text-style', '-h3', 'content-item', '-heading', '-color-primary');\n break;\n case 'li':\n element.classList.add('text-style', '-para');\n break;\n case 'ol':\n element.classList.add('list-style', '-ordered');\n break;\n case 'ul':\n element.classList.add('list-style', '-unordered');\n break;\n case 'p':\n case 'td':\n element.classList.add('text-style', '-para', 'content-item', '-para');\n break;\n case 'table':\n element.classList.add('table-style');\n break;\n case 'tr':\n element.classList.add('row');\n break;\n }\n }\n}\n","import {AttributeChangeObservable} from 'ln/model/Model';\nimport {Subscription} from 'ln/signal/Signal';\n\n\nexport function sync(target: TTarget, targetProperty: keyof TTarget): SyncTarget {\n return {\n from(source: TSource, sourceProperty: keyof TSource, now?: boolean): Subscription {\n if (now) {\n target[targetProperty] = source[sourceProperty];\n }\n return source.change.filter(property => property.name === sourceProperty)\n .subscribe(property => target[targetProperty] = property.newValue);\n }\n }\n}\n\ninterface SyncTarget {\n from(source: TSource, sourceProperty: keyof TSource, now?: boolean): Subscription;\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const downloadTemplate = `
`;\n","import Model from 'ln/model/Model';\nimport View from 'ln/view/View';\n\nimport {TargetAudience} from 'components/page/Page';\n\nimport {addTextStyles} from 'services/addTextStyles';\nimport {Asset} from 'services/Asset';\nimport {GlobalsStore} from 'services/GlobalsStore';\nimport {sync} from 'services/sync';\n\nimport {downloadTemplate} from 'templates/download';\n\n\nexport class Download extends Model {\n\n public selectedTargetAudience: TargetAudience;\n public readonly file: Asset;\n public readonly targetAudience: TargetAudience;\n public readonly text: string;\n\n public constructor(dto, globalsStore: GlobalsStore) {\n super({\n selectedTargetAudience: 'secondary-school-1',\n });\n\n this.file = dto.file || null;\n this.targetAudience = dto.targetAudience || 'secondary-school-1';\n this.text = dto.text || '';\n\n sync(this, 'selectedTargetAudience').from(globalsStore, 'targetAudience', true);\n }\n}\n\n\nexport class DownloadView extends View {\n\n public constructor() {\n super({ template: downloadTemplate });\n }\n\n init(): void {\n const contentNode = this.node.querySelector('[js=\"content\"]');\n contentNode.innerHTML = this.data.text;\n addTextStyles( contentNode);\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const headingTemplate = `
`;\n","import View from 'ln/view/View';\n\nimport {addTextStyles} from 'services/addTextStyles';\n\nimport {headingTemplate} from 'templates/heading';\n\n\nexport class Heading {\n\n public readonly text: string;\n public readonly level: number;\n\n public constructor(dto) {\n this.text = dto.text;\n this.level = Number(dto.level || 3);\n }\n}\n\n\nexport class HeadingView extends View {\n\n public constructor() {\n super({\n template: headingTemplate,\n });\n }\n\n init() {\n this.node.innerHTML = `${this.data.text}`;\n addTextStyles( this.node);\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const rawHtmlTemplate = `
`;\n","import View from 'ln/view/View';\n\nimport {addTextStyles} from 'services/addTextStyles';\n\nimport {rawHtmlTemplate} from 'templates/raw-html';\n\n\nexport class RawHtml {\n\n public readonly html: string;\n\n public constructor(dto) {\n this.html = dto.html || '';\n }\n}\n\n\nexport class RawHtmlView extends View {\n\n public constructor() {\n super({ template: rawHtmlTemplate });\n }\n\n init() {\n const node = this.node;\n\n node.innerHTML = this.data.html;\n addTextStyles(node);\n\n if (node.querySelector('table')) {\n node.style.overflowX = 'auto';\n }\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const startPageTemplate = `
`;\nexport const startPageContentLayerItemTemplate = `
`;\nexport const startPageLayerTemplate = `
`;\nexport const startPageTitleLayerItemTemplate = `

[[title]]
[[subtitle]]

`;\nexport const startPageVariantTemplate = `
`;\n","import View from 'ln/view/View';\n\nimport {Page} from 'components/page/Page';\n\nimport {StartPageLayer} from 'components/start-page/StartPageLayer';\nimport {StartPageVariant} from 'components/start-page/StartPageVariant';\n\nimport {startPageTemplate} from 'templates/start-page';\n\n\nexport class StartPage extends Page {\n\n public variants: StartPageVariant[];\n\n public constructor(dto) {\n super({\n variants: [],\n\n ...dto\n });\n }\n}\n\n\ntype Monitor = (this: any, ev: Event) => void;\n\n\nexport class StartPageView extends View {\n\n private scrollMonitor: Monitor;\n private pageHeightLimiter: Monitor;\n\n public constructor() {\n super({\n template: startPageTemplate,\n });\n }\n\n init(): void {\n // Initialize initial scroll position:\n this.translateLayers();\n\n // The start page has several special needs that we need to disable when another\n // page is active (e.g. scroll monitoring and page height limiting, both because of\n // the parallax effect). So we need to watch the active page.\n\n this.pageHeightLimiter = () => window.requestAnimationFrame(this.limitPageHeight.bind(this));\n this.scrollMonitor = () => window.requestAnimationFrame(this.translateLayers.bind(this));\n\n this.enablePageHeightLimiter(this.data.selected);\n this.enableScrollMonitor(this.data.selected);\n\n this.data.change.filter(({ name }) => name === 'selected').subscribe(({ newValue }) => {\n this.enablePageHeightLimiter(newValue);\n this.enableScrollMonitor(newValue);\n });\n }\n\n private enablePageHeightLimiter(enable: boolean): void {\n const layerContainer = this.node;\n if (enable) {\n // We need to limit the page height according to the \"tallest\" parallax layer\n // so we can cut off the additional scrollable space that results from the\n // downward translation of background layers. \"Tallness\" of layers needs to\n // be recomputed when layer content changes. This is mostly the case when\n // the viewport changes size, or when images get loaded:\n window.addEventListener('resize', this.pageHeightLimiter);\n const imageNodes = layerContainer.querySelectorAll('img');\n for (let i = 0, n = imageNodes.length; i < n; ++i) {\n const imageNode: HTMLImageElement = imageNodes[i];\n imageNode.addEventListener('load', this.pageHeightLimiter);\n }\n }\n else {\n // When not on the start page, we disable the height limit & cut off:\n layerContainer.style.height = '';\n layerContainer.style.overflow = '';\n window.removeEventListener('resize', this.pageHeightLimiter);\n }\n }\n\n private limitPageHeight(): void {\n if (!this.data.selected) return; // (needed because we don't unsubscribe image `load` events)\n\n // Workaround to avoid scroll overshoot that works most of the time,\n // but can go wrong in some cases. TODO: Needs improvement!\n const layerContainer = this.node;\n const layerNodes = layerContainer.querySelectorAll('[js=\"layer\"]');\n layerContainer.style.height = '';\n layerContainer.style.overflow = '';\n window.requestAnimationFrame(() => {\n let maxHeight = 0;\n for (let i = 0, n = layerNodes.length; i < n; ++i) {\n maxHeight = Math.max(maxHeight, layerNodes[i].scrollHeight);\n }\n layerContainer.style.height = `${maxHeight}px`;\n layerContainer.style.overflow = `hidden`;\n });\n }\n\n private enableScrollMonitor(enable: boolean): void {\n if (enable) {\n window.addEventListener('scroll', this.scrollMonitor);\n }\n else {\n window.removeEventListener('scroll', this.scrollMonitor);\n }\n }\n\n private translateLayers(): void {\n const scrollTop = window.scrollY;\n const layerNodes = this.node.querySelectorAll('[js=\"layer\"]');\n for (let i = 0, n = layerNodes.length; i < n; ++i) {\n const layerNode = layerNodes[i];\n const layer: StartPageLayer = layerNode['_lnview']['data'];\n const z = layer.z / -2;\n layerNode.style.transform = `translateY(${z * scrollTop}px)`;\n }\n }\n}\n","export abstract class StartPageLayerItem {\n\n public readonly bottom: string;\n public readonly height: string;\n public readonly left: string;\n public readonly right: string;\n public readonly top: string;\n public readonly width: string;\n\n protected constructor(dto) {\n this.bottom = dto.bottom || '';\n this.height = dto.height || '';\n this.left = dto.left || '';\n this.right = dto.right || '';\n this.top = dto.top || '';\n this.width = dto.width || '';\n }\n}\n","import View from 'ln/view/View';\n\nimport {StartPageLayerItem} from 'components/start-page/StartPageLayerItem';\n\nimport {startPageContentLayerItemTemplate} from 'templates/start-page';\n\n\nexport class StartPageContentLayerItem extends StartPageLayerItem {\n\n public readonly contentItems: object[];\n\n public constructor(dto) {\n super(dto);\n\n this.contentItems = dto.content_items || [];\n }\n}\n\n\nexport class StartPageContentLayerItemView extends View {\n\n public constructor() {\n super({\n template: startPageContentLayerItemTemplate,\n });\n }\n\n init(): void {\n const node = this.node;\n node.style.bottom = this.data.bottom;\n node.style.height = this.data.height;\n node.style.left = this.data.left;\n node.style.right = this.data.right;\n node.style.top = this.data.top;\n node.style.width = this.data.width;\n }\n}\n","import View from 'ln/view/View';\n\nimport {StartPageLayerItem} from 'components/start-page/StartPageLayerItem';\n\nimport {startPageTitleLayerItemTemplate} from 'templates/start-page';\n\n\nexport class StartPageTitleLayerItem extends StartPageLayerItem {\n\n public readonly subtitle: string;\n public readonly title: string;\n public readonly useLightColor: boolean;\n\n public constructor(dto) {\n super(dto);\n\n this.useLightColor = true;\n this.subtitle = dto.subtitle || '';\n this.title = dto.title || '';\n }\n}\n\n\nexport class StartPageTitleLayerItemView extends View {\n\n public constructor() {\n super({\n template: startPageTitleLayerItemTemplate,\n });\n }\n\n init(): void {\n const node = this.node;\n node.style.bottom = this.data.bottom;\n node.style.height = this.data.height;\n node.style.left = this.data.left;\n node.style.right = this.data.right;\n node.style.top = this.data.top;\n node.style.width = this.data.width;\n }\n}\n","// Adapted from https://davidwalsh.name/javascript-debounce-function:\n\n/**\n * Returns a function that, as long as it continues to be invoked, will not\n * be triggered. The function `func` will be called after it stops being called for\n * `wait` milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing.\n *\n * @param func The function for which to derive a debounced version.\n * @param wait Delay (in milliseconds).\n * @param immediate `true` if `func` should be triggered on the leading edge of the wait; `false` otherwise.\n * */\nexport default function debounce(func: Function, wait: number, immediate: boolean = false) {\n\tlet timeout;\n\treturn function() {\n\t\tconst context = this, args = arguments;\n\t\tconst later = () => {\n\t\t\ttimeout = null;\n\t\t\tif (!immediate) func.apply(context, args);\n\t\t};\n\t\tconst callNow = immediate && !timeout;\n\t\tclearTimeout(timeout);\n\t\ttimeout = setTimeout(later, wait);\n\t\tif (callNow) func.apply(context, args);\n\t};\n};\n","import View from 'ln/view/View';\nimport {renderer} from 'ln/view/Renderer';\nimport debounce from 'ln/util/debounce';\n\nimport {StartPageLayerItem} from 'components/start-page/StartPageLayerItem';\nimport {StartPageVariant} from 'components/start-page/StartPageVariant';\n\nimport {Asset} from 'services/Asset';\n\nimport {startPageLayerTemplate} from 'templates/start-page';\n\n\nexport class StartPageLayer {\n\n public readonly backgroundImageFile: Asset;\n public readonly items: StartPageLayerItem[];\n public readonly top: number;\n public readonly z: number;\n\n public variant: StartPageVariant; // will be set by the parent (variant)\n\n public constructor(dto) {\n this.backgroundImageFile = dto.background_image_file || null;\n this.items = dto.items || [];\n this.top = dto.top || 0;\n this.z = Number(dto.z || 0);\n }\n}\n\n\nexport class StartPageLayerView extends View {\n\n private image: HTMLImageElement;\n private items: HTMLElement;\n\n public constructor() {\n super({\n template: startPageLayerTemplate,\n });\n }\n\n init(): void {\n // We only want to truly initialize (and by that we mean retrieving images\n // from the network) when the layer is actually visible. For this, we check\n // the value of the `display` property:\n const visibilityMonitor = debounce(() => {\n if (!isVisible(this.node)) return;\n window.removeEventListener('resize', visibilityMonitor);\n this.onFirstTimeVisible();\n }, 50);\n window.addEventListener('resize', visibilityMonitor);\n visibilityMonitor();\n }\n\n private onFirstTimeVisible(): void {\n this.image = this.node.querySelector('[js=\"image\"]');\n this.items = this.node.querySelector('[js=\"items\"]');\n this.items.classList.remove('_hidden');\n\n // This is how we load a layer's background image:\n //\n // 1) First we fetch a small, scaled-down (approx. 150px) version of the image\n // which we then scale up. This should give a blurry preview, but load fast.\n // Seeing a blurry placeholder is arguably better than seeing nothing and\n // a messed-up / shifted content.\n // 2) Then we load a much larger, but properly scaled version of the same image.\n // Once it's here, we exchange the blurry preview.\n //\n // Both of these images are prefetched off-screen so one doesn't witness the\n // loading in progress.\n const previewAssetPath = renderer.context.assetPath(this.data.backgroundImageFile, 'preview');\n const fullAssetPath = renderer.context.assetPath(this.data.backgroundImageFile, this.data.variant.imagePreset);\n let loadCount = 0;\n const preloadImage = document.createElement('img');\n preloadImage.addEventListener('load', () => {\n this.image.src = preloadImage.src;\n if (++loadCount < 2) {\n preloadImage.src = fullAssetPath;\n }\n });\n preloadImage.src = previewAssetPath;\n\n this.image.addEventListener('load', () => {\n this.resizeBackgroundImage();\n });\n window.addEventListener('resize', () => window.requestAnimationFrame(this.resizeBackgroundImage.bind(this)));\n }\n\n private resizeBackgroundImage(): void {\n const viewportWidth = document.body.getBoundingClientRect().width;\n const k = viewportWidth / this.image.naturalWidth;\n const width = k * this.image.naturalWidth;\n const height = k * this.image.naturalHeight;\n this.image.style.width = `${width}px`;\n this.image.style.height = `${height}px`;\n this.items.style.minWidth = `${width}px`;\n this.items.style.minHeight = `${height}px`;\n }\n}\n\n\nfunction isVisible(element: Element): boolean {\n return window.getComputedStyle(element).display !== 'none' &&\n (!element.parentElement || isVisible(element.parentElement));\n}\n","import View from 'ln/view/View';\n\nimport {StartPageLayer} from 'components/start-page/StartPageLayer';\n\nimport {startPageVariantTemplate} from 'templates/start-page';\n\n\nexport class StartPageVariant {\n\n public readonly imagePreset: string;\n public readonly layers: StartPageLayer[];\n public readonly mediaQuery: string;\n public readonly name: string;\n\n public stylesheetGenerated: boolean;\n\n public constructor(dto) {\n this.imagePreset = dto.imagePreset || 'large';\n this.layers = dto.layers || [];\n this.mediaQuery = dto.mediaQuery;\n this.name = dto.name;\n\n for (const layer of this.layers) {\n if (layer instanceof StartPageLayer) {\n layer.variant = this;\n }\n }\n }\n}\n\n\nexport class StartPageVariantView extends View {\n\n public constructor() {\n super({ template: startPageVariantTemplate });\n }\n\n init(): void {\n this.generateMediaStylesheet();\n }\n\n generateMediaStylesheet(): void {\n if (this.data.stylesheetGenerated) return;\n\n const stylesheetNode = document.createElement('style');\n stylesheetNode.innerText =\n `.start-page-variant.-${this.data.name} { display: none; }` +\n `@media ${this.data.mediaQuery} { .start-page-variant.-${this.data.name} { display: inherit; } }`;\n document.head.appendChild(stylesheetNode);\n\n this.data.stylesheetGenerated = true;\n }\n}\n","export interface Asset {\n name: string;\n file_name: string;\n mime: string;\n ext: string;\n height: number;\n id: string;\n tags: string[];\n width: number;\n}\n\n\nexport interface AssetPresetInfo {\n maxWidth: number;\n maxHeight: number;\n}\n\n\n// TODO: To be kept in sync with `laravel/config/dateneditor/assets.php`!\nexport function getAssetPresetInfo(name: string) {\n switch (name) {\n case 'medium':\n return { maxWidth: 400, maxHeight: 400 };\n\n case 'large':\n return { maxWidth: 1000, maxHeight: 1000 };\n\n case 'xlarge':\n return { maxWidth: 1600, maxHeight: 1600 };\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const imageTemplate = `

[[label]] ([[ sourceAttribution ]])

`;\n","import {renderer} from 'ln/view/Renderer';\nimport View from 'ln/view/View';\n\nimport {Asset, getAssetPresetInfo} from 'services/Asset';\n\nimport {imageTemplate} from 'templates/image';\n\n\ntype ImageStyle = '-no-float' | '-float-left' | '-float-right';\n\ntype ImageWidth = '-w1-4' | '-w1-3' | '-w1-2' | '-w2-3';\n\n\nexport class Image {\n\n public readonly file: object;\n public readonly label: string;\n public readonly sourceAttribution: string;\n public readonly style: ImageStyle;\n public readonly variants: ImageVariant[];\n public readonly width: ImageWidth;\n\n public constructor(dto) {\n this.file = dto.file || null;\n this.label = dto.label || '';\n this.sourceAttribution = dto.sourceAttribution || '';\n this.style = dto.style || '-no-float';\n this.variants = dto.variants || [];\n this.width = dto.width || '-w1-3';\n }\n}\n\n\nexport type ImageVariantName = 'mobile' | 'tablet' | 'desktop';\n\n\nexport class ImageVariant {\n\n public readonly file: Asset;\n public readonly name: ImageVariantName;\n public readonly mediaQuery?: string;\n\n public constructor(dto) {\n this.file = dto.file || null;\n this.name = dto.name || 'mobile';\n this.mediaQuery = dto.mediaQuery || '';\n }\n}\n\n\nexport class ImageView extends View {\n\n public constructor() {\n super({ template: imageTemplate })\n }\n\n init() {\n const imgNode = this.node.querySelector('[js=\"image\"]');\n imgNode.src = renderer.context.assetPath(this.data.file);\n if (this.data.variants) {\n\n // first, determine the (approximate) fraction of the viewport's width to be filled:\n let targetWidth = '100%';\n if (this.data.style !== '-no-float') {\n switch (this.data.width) {\n case '-w1-2':\n targetWidth = '50%';\n break;\n case '-w1-3':\n targetWidth = '33.33%';\n break;\n case '-w1-4':\n targetWidth = '25%';\n break;\n case '-w2-3':\n targetWidth = '66%';\n break;\n }\n }\n\n // next, compile comma-separated lists of available images and application suggestions:\n let srcset: string[] = [];\n let sizes: string[] = [];\n for (const variant of this.data.variants) {\n let presetName: string;\n let mediaQuery: string;\n switch (variant.name) {\n case 'desktop':\n presetName = 'xlarge';\n mediaQuery = '(min-width: 1080px)';\n break;\n case 'tablet':\n presetName = 'large';\n mediaQuery = '(min-width: 768px)';\n break;\n case 'mobile':\n presetName = 'medium';\n mediaQuery = '';\n targetWidth = '100%';\n break;\n }\n const presetInfo = getAssetPresetInfo(presetName);\n srcset.push(`${renderer.context.assetPath(variant.file, presetName)} ${presetInfo.maxWidth}w`);\n sizes.push(`${mediaQuery} ${targetWidth}`);\n }\n\n imgNode.srcset = srcset.join(', ');\n imgNode.sizes = sizes.join(', ');\n }\n\n const onLoad = () => window.requestAnimationFrame(() => {\n imgNode.removeEventListener('load', onLoad);\n this.limitSize();\n });\n imgNode.addEventListener('load', onLoad);\n\n window.addEventListener('resize', () => window.requestAnimationFrame(this.limitSize.bind(this)));\n }\n\n private limitSize(): void {\n const imgNode = this.node.querySelector('[js=\"image\"]');\n const measureNode = this.node.querySelector('[js=\"measure\"]');\n\n const maxWidth = measureNode.getBoundingClientRect().width;\n const maxHeight = (0.95 * window.innerHeight) - 80;\n // ^^^^^^ ^^^^\n // leave some room for label approximate height in pixels of app header\n\n if (!maxWidth || !maxHeight) {\n setTimeout(this.limitSize.bind(this), 25);\n return;\n }\n\n const {naturalWidth: width, naturalHeight: height} = imgNode;\n const kw = maxWidth / width;\n const kh = maxHeight / height;\n const k = Math.min(kw, kh);\n\n const imageNode = this.node.querySelector('[js=\"image\"]');\n imageNode.style.width = `${k * width}px`;\n imageNode.style.height = `${k * height}px`;\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const topicPageTemplate = `

[[ this.trans('topic') ]]
[[title]]

[[timeRequired]]
[[ this.trans(targetAudience) ]]
`;\n","import View from 'ln/view/View';\n\nimport {Page, TargetAudience, TargetAudienceSpecific} from 'components/page/Page';\n\nimport {topicPageTemplate} from 'templates/topic-page';\n\n\nexport class TopicPage extends Page implements TargetAudienceSpecific {\n\n public readonly classContentItems: object[];\n public readonly contentItems: object[];\n public contentItemsProperty: 'contentItems' | 'classContentItems';\n public readonly targetAudience: TargetAudience;\n public readonly timeRequired: string;\n public readonly title: string;\n\n\n public constructor(dto) {\n super({\n classContentItems: dto.class_content_items || [],\n contentItemsProperty: 'contentItems',\n contentItems: dto.content_items || [],\n targetAudience: 'middle-school',\n timeRequired: '',\n title: '',\n\n ...dto\n });\n }\n}\n\n\nexport class TopicPageView extends View {\n\n public constructor() {\n super({\n template: topicPageTemplate,\n });\n }\n\n init(): void {\n window.scroll(0, 0);\n }\n}\n","import {AttributeChangeObservable} from 'ln/model/Model';\n\n\nexport interface Selectable {\n selected: boolean;\n}\n\n\nexport function sync(master: AttributeChangeObservable, selectedPropertyName: string, selectables: Selectable[], getInitialSelection?: (selectables: Selectable[]) => Selectable) {\n if (selectables.length) {\n master.change.filter(p => p.name === selectedPropertyName).subscribe(p => {\n for (const selectable of selectables) {\n selectable.selected = selectable === p.newValue;\n }\n });\n master[selectedPropertyName] = getInitialSelection ? getInitialSelection(selectables) : selectables[0];\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const siteTemplate = `
`;\n","import Model from 'ln/model/Model';\nimport {Signal} from 'ln/signal/Signal';\nimport {renderer} from 'ln/view/Renderer';\nimport View from 'ln/view/View';\n\nimport {Page, TargetAudience, isTargetAudienceSpecific} from 'components/page/Page';\nimport {StartPage} from 'components/start-page/StartPage';\nimport {TopicPage} from 'components/topic-page/TopicPage';\n\nimport {GlobalsStore} from 'services/GlobalsStore';\nimport {sync} from 'services/sync';\nimport {sync as syncSelection} from 'services/Selectable';\n\nimport {siteTemplate} from 'templates/site';\n\n\nexport class Site extends Model {\n\n public readonly hasStartPage: boolean;\n public readonly pages: Page[];\n public readonly title: string;\n\n public menuIsOpen: boolean;\n public selectedPage: Page;\n public selectedTargetAudience: TargetAudience;\n public selectPreviousPage: Signal;\n\n public constructor(dto, private readonly globalsStore: GlobalsStore) {\n super({\n pages: [],\n title: '',\n\n menuIsOpen: false,\n selectedPage: null,\n selectedTargetAudience: 'secondary-school-1',\n\n ...dto,\n });\n\n renderer.context.globals.site = this;\n\n this.selectPreviousPage = new Signal();\n\n this.hasStartPage = this.pages.some(p => p instanceof StartPage);\n\n syncSelection(this, 'selectedPage', this.pages, pages => {\n if (!pages || !pages.length) return null;\n const startPages = pages.filter(this.isStartPage.bind(this));\n return startPages.length ? startPages[0] : pages[0];\n });\n\n for (const page of this.pages) {\n page.navigateBack.subscribe(() => this.selectPreviousPage.dispatch());\n }\n\n sync(this, 'selectedTargetAudience').from(globalsStore, 'targetAudience', true);\n }\n\n public getPagesForMenuItems(targetAudience: TargetAudience): Page[] {\n // The following condition must achieve the following:\n // 1. exclude the start page\n // 2. include all remaining pages that are not target audience-specific\n // 3. include all target audience-specific pages with a matching target audience\n return this.pages.filter(p => !(p instanceof StartPage) && (!isTargetAudienceSpecific(p) || p.targetAudience === targetAudience));\n }\n\n public getPagesForTopicOverview(targetAudience: TargetAudience): Page[] {\n // The following condition must achieve the following:\n // 1. exclude all pages that aren't topic pages\n // 2. include all topic pages with a matching target audience\n return this.pages.filter(p => p instanceof TopicPage && p.targetAudience === targetAudience);\n }\n\n public isStartPage(page: Page): boolean {\n return page instanceof StartPage;\n }\n\n public selectPage(page: Page): void {\n this.selectedPage = page;\n this.menuIsOpen = false;\n }\n\n public selectStartPage(): void {\n const startPages = this.pages.filter(p => p instanceof StartPage);\n if (startPages && startPages.length) {\n this.selectPage(startPages[0]);\n }\n }\n}\n\n\nexport class SiteView extends View {\n\n private isPoppingState: boolean;\n\n public constructor();\n public constructor(data: Site);\n public constructor(data?: Site) {\n super({ data, template: siteTemplate })\n }\n\n init(): void {\n let nextPageSymbolId = 1;\n const pageSymbolsContainerNode = this.node.querySelector('[js=\"pageSymbols\"]');\n for (const page of this.data.pages.filter(p => !!p.symbol)) {\n const symbolNode = document.createElementNS('http://www.w3.org/2000/svg', 'symbol');\n symbolNode.innerHTML = page.symbol;\n const symbolId = `page-symbol-${nextPageSymbolId++}`;\n symbolNode.firstElementChild.id = symbolId;\n page.symbolHref = '#' + symbolId;\n pageSymbolsContainerNode.appendChild(symbolNode.firstElementChild);\n }\n for (const page of this.data.pages.filter(p => !!p.symbolLarge)) {\n const symbolNode = document.createElementNS('http://www.w3.org/2000/svg', 'symbol');\n symbolNode.innerHTML = page.symbolLarge;\n const symbolId = `page-symbol-${nextPageSymbolId++}`;\n symbolNode.firstElementChild.id = symbolId;\n page.symbolLargeHref = '#' + symbolId;\n pageSymbolsContainerNode.appendChild(symbolNode.firstElementChild);\n console.log('added large icon for', page);\n }\n\n this.setupNavigationHistory();\n }\n\n private setupNavigationHistory(): void {\n history.replaceState({ selectedPageId: this.data.selectedPage.id }, '');\n this.data.change.filter(p => p.name === 'selectedPage').subscribe(this.onSelectedPageChanged.bind(this));\n this.data.selectPreviousPage.subscribe(() => {\n history.back();\n this.onPopState(history.state);\n });\n window.addEventListener('popstate', e => this.onPopState(e.state));\n }\n\n private onSelectedPageChanged(): void {\n if (this.isPoppingState) return;\n history.pushState({ selectedPageId: this.data.selectedPage.id }, '');\n }\n\n private onPopState(state: any): void {\n this.isPoppingState = true;\n try {\n if (state && 'selectedPageId' in state) {\n const pages = this.data.pages.filter(p => p.id === state.selectedPageId);\n if (pages.length) {\n this.data.selectPage(pages[0]);\n }\n }\n }\n finally {\n this.isPoppingState = false;\n }\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const targetAudienceSwitchTemplate = `
[[ this.trans('middle-school') ]]
[[ this.trans('secondary-school-1') ]]
`;\n","import Model from 'ln/model/Model';\nimport View from 'ln/view/View';\n\nimport {TargetAudience} from 'components/page/Page';\n\nimport {GlobalsStore} from 'services/GlobalsStore';\nimport {sync} from 'services/sync';\n\nimport {targetAudienceSwitchTemplate} from 'templates/target-audience-switch';\n\n\nexport class TargetAudienceSwitch extends Model {\n\n public targetAudience: TargetAudience;\n\n public constructor(private readonly globalsStore: GlobalsStore) {\n super({\n targetAudience: globalsStore.targetAudience,\n });\n\n sync(globalsStore, 'targetAudience').from(this, 'targetAudience');\n }\n}\n\n\nexport class TargetAudienceSwitchView extends View {\n\n public constructor() {\n super({ template: targetAudienceSwitchTemplate });\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const textTemplate = `
`;\n","import View from 'ln/view/View';\n\nimport {addTextStyles} from 'services/addTextStyles';\n\nimport {textTemplate} from 'templates/text';\n\n\nexport class Text {\n\n public readonly text: string;\n\n public constructor(dto) {\n this.text = dto.text;\n }\n}\n\n\nexport class TextView extends View {\n\n public constructor() {\n super({\n template: textTemplate,\n });\n }\n\n init(): void {\n this.node.innerHTML = this.data.text;\n addTextStyles( this.node);\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const tipTemplate = `
`;\n","import View from 'ln/view/View';\n\nimport {addTextStyles} from 'services/addTextStyles';\n\nimport {tipTemplate} from 'templates/tip';\n\n\nexport class Tip {\n\n public readonly text: string;\n\n public constructor(dto) {\n this.text = dto.text;\n }\n}\n\n\nexport class TipView extends View {\n\n public constructor() {\n super({\n template: tipTemplate,\n });\n }\n\n init(): void {\n const contentNode = this.node.querySelector('[js=\"content\"]');\n contentNode.innerHTML = this.data.text;\n addTextStyles( contentNode);\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const topicOverviewTemplate = `
[[topicPage.title]]
`;\n","import Model from 'ln/model/Model';\nimport View from 'ln/view/View';\n\nimport {Site} from 'components/site/Site';\nimport {TargetAudience} from 'components/page/Page';\n\nimport {sync} from 'services/sync';\nimport {GlobalsStore} from 'services/GlobalsStore';\n\nimport {topicOverviewTemplate} from 'templates/topic-overview';\n\n\nexport class TopicOverview extends Model {\n\n public site: Site;\n public targetAudience: TargetAudience;\n\n public constructor(globalsStore: GlobalsStore) {\n super({\n site: null,\n targetAudience: 'secondary-school-1',\n });\n\n sync(this, 'site').from(globalsStore, 'site', true);\n sync(this, 'targetAudience').from(globalsStore, 'targetAudience', true);\n }\n}\n\n\nexport class TopicOverviewView extends View {\n\n public constructor() {\n super({ template: topicOverviewTemplate });\n }\n}\n","/* Auto generated by gulp-typescript-template */\n\nexport const twoColumnLayoutTemplate = `
`;\n","import View from 'ln/view/View';\n\nimport {twoColumnLayoutTemplate} from 'templates/two-column-layout';\n\n\nexport class TwoColumnLayout {\n\n public readonly leftContentItems: object[];\n public readonly rightContentItems: object[];\n public readonly style: string;\n\n public constructor(dto) {\n this.leftContentItems = dto.left_content_items || [];\n this.rightContentItems = dto.right_content_items || [];\n this.style = dto.style || '';\n }\n}\n\n\nexport class TwoColumnLayoutView extends View {\n\n public constructor() {\n super({ template: twoColumnLayoutTemplate });\n }\n}\n","import Model, {AttributeChangeObservable} from 'ln/model/Model';\n\nimport {Site} from 'components/site/Site';\nimport {TargetAudience} from 'components/page/Page';\n\n\nexport interface GlobalsStore extends AttributeChangeObservable {\n site: Site;\n targetAudience: TargetAudience;\n}\n\n\nexport class DefaultGlobalsStore extends Model implements GlobalsStore {\n\n public site: Site;\n public targetAudience: TargetAudience;\n\n public constructor() {\n super({\n site: null,\n targetAudience: 'secondary-school-1',\n });\n }\n}\n","import Lang from 'ln/lang/Lang';\nimport register from 'ln/setup/register';\nimport {renderer} from 'ln/view/Renderer';\nimport {scan} from 'ln/view/View';\nimport {setup, SetupConfig} from 'ln/setup/Setup';\n\nimport Repeat from 'ln/components/Repeat';\nimport {ContentPage, ContentPageView} from 'components/content-page/ContentPage';\nimport {Download, DownloadView} from 'components/download/Download';\nimport {Heading, HeadingView} from 'components/heading/Heading';\nimport {RawHtml, RawHtmlView} from 'components/raw-html/RawHtml';\nimport {StartPage, StartPageView} from 'components/start-page/StartPage';\nimport {StartPageContentLayerItem, StartPageContentLayerItemView} from 'components/start-page/StartPageContentLayerItem';\nimport {StartPageTitleLayerItem, StartPageTitleLayerItemView} from 'components/start-page/StartPageTitleLayerItem';\nimport {StartPageLayer, StartPageLayerView} from 'components/start-page/StartPageLayer';\nimport {StartPageVariant, StartPageVariantView} from 'components/start-page/StartPageVariant';\nimport {Image, ImageView} from 'components/image/Image';\nimport {Site, SiteView} from 'components/site/Site';\nimport {TargetAudienceSwitch, TargetAudienceSwitchView} from 'components/target-audience-switch/TargetAudienceSwitch';\nimport {Text, TextView} from 'components/text/Text';\nimport {Tip, TipView} from 'components/tip/Tip';\nimport {TopicOverview, TopicOverviewView} from 'components/topic-overview/TopicOverview';\nimport {TopicPage, TopicPageView} from 'components/topic-page/TopicPage';\nimport {TwoColumnLayout, TwoColumnLayoutView} from 'components/two-column-layout/TwoColumnLayout';\n\nimport {Asset} from 'services/Asset';\nimport {GlobalsStore, DefaultGlobalsStore} from 'services/GlobalsStore';\n\n\nexport function init(data: SetupConfig) {\n\n const getSite = () => setup.data('site') as Site;\n const globalsStore = new DefaultGlobalsStore();\n\n renderer.context.globals = globalsStore;\n\n const {viewRegistrations} = register(({ view, model }) => {\n view('repeat', Repeat);\n view('Site', () => new SiteView(getSite()));\n model('App\\\\ContentPage', ContentPage).view(ContentPageView);\n model('App\\\\Download', dto => new Download(dto, globalsStore));\n view(Download, DownloadView);\n model('App\\\\Heading', Heading).view(HeadingView);\n model('App\\\\RawHtml', RawHtml).view(RawHtmlView);\n model('App\\\\StartPage', StartPage).view(StartPageView);\n model('App\\\\StartPageContentLayerItem', StartPageContentLayerItem).view(StartPageContentLayerItemView);\n model('App\\\\StartPageTitleLayerItem', StartPageTitleLayerItem).view(StartPageTitleLayerItemView);\n model('App\\\\StartPageLayer', StartPageLayer).view(StartPageLayerView);\n model('App\\\\StartPageVariant', StartPageVariant).view(StartPageVariantView);\n model('App\\\\Image', Image).view(ImageView);\n model('App\\\\Site', dto => new Site(dto, globalsStore));\n model('App\\\\TargetAudienceSwitch', () => new TargetAudienceSwitch(globalsStore));\n view(TargetAudienceSwitch, TargetAudienceSwitchView);\n model('App\\\\TopicOverview', () => new TopicOverview(globalsStore));\n view(TopicOverview, TopicOverviewView);\n model('App\\\\Text', Text).view(TextView);\n model('App\\\\Tip', Tip).view(TipView);\n model('App\\\\TopicPage', TopicPage).view(TopicPageView);\n model('App\\\\TwoColumnLayout', TwoColumnLayout).view(TwoColumnLayoutView);\n });\n\n setup.init(data);\n\n Lang.add(setup.data('lang'));\n\n renderer.context.assetPath = function(file: Asset, preset: string = 'large', ext: string = 'png') {\n if (file.ext === 'svg') {\n return decodeURIComponent(setup.route('assetDownload', { file_name: file.file_name }).url());\n }\n else {\n return decodeURIComponent(setup.route('asset', { file_name: file.file_name, preset: preset, ext: ext }).url());\n }\n };\n\n renderer.context.assetDownloadPath = function(file: Asset) {\n return decodeURIComponent(setup.route('assetDownload', { file_name: file.file_name }).url());\n };\n\n scan(document.body, viewRegistrations);\n}\n"],"names":["sync","syncSelection","Lang"],"mappings":";;;CASA;;;CAGA;KAAA;SAES,YAAO,GAAkB,EAAE,CAAC;MA6BpC;;;;KAxBA,wBAAG,GAAH,UAAK,MAAmB;SACvB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAE,MAAM,CAAE,CAAC;MAC5B;;;;KAMD,wBAAG,GAAH,UAAK,GAAU,EAAE,QAAgB;SAEhC,IAAI,MAAM,EAAE,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;;SAGhC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAG;aAC/B,MAAM,GAAG,CAAC,CAAE,CAAC,CAAE,CAAC,MAAM,CAAE,GAAG,CAAE,CAAC;aAC9B,IAAI,MAAM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