diff --git a/bower.json b/bower.json index 8749f12b..0df0fae9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "platypus", - "version": "0.13.7", + "version": "0.13.8", "homepage": "https://platypi.io", "authors": [ "Platypi (https://platypi.io)" diff --git a/dist/platypus.d.ts b/dist/platypus.d.ts index f3946f9d..8b330f66 100644 --- a/dist/platypus.d.ts +++ b/dist/platypus.d.ts @@ -1,5 +1,5 @@ /** - * PlatypusTS v0.13.7 (https://platypi.io) + * PlatypusTS v0.13.8 (https://platypi.io) * Copyright 2015 Platypi, LLC. All rights reserved. * * PlatypusTS is licensed under the MIT license found at @@ -284,12 +284,12 @@ declare module plat { * An InjectorObject of objects. Contains all the registered * injectables for an application. */ - var injectable: InjectorObject>; + var injectable: InjectorObject; /** * An InjectorObject of static objects. Contains all the registered * static injectables for an application. Once the injectables have been injected, they are removed from this object. */ - var staticInjectable: InjectorObject>; + var staticInjectable: InjectorObject; /** * An InjectorObject of animations. Can be either CSS or JS implementations. */ diff --git a/dist/platypus.js b/dist/platypus.js index 5de95aff..7d1f5495 100644 --- a/dist/platypus.js +++ b/dist/platypus.js @@ -6,7 +6,7 @@ var __extends = this.__extends || function (d, b) { }; /* tslint:disable */ /** - * PlatypusTS v0.13.7 (https://platypi.io) + * PlatypusTS v0.13.8 (https://platypi.io) * Copyright 2015 Platypi, LLC. All rights reserved. * * PlatypusTS is licensed under the MIT license found at @@ -25,7 +25,7 @@ var plat; var __prefix = '$', __CONTEXT = 'context', __AppStatic = __prefix + 'AppStatic', __App = __prefix + 'App', __Http = __prefix + 'Http', __HttpRequestInstance = __prefix + 'HttpRequestInstance', __HttpConfig = __prefix + 'HttpConfig', __Promise = __prefix + 'Promise', __Compat = __prefix + 'Compat', __ControlFactory = __prefix + 'ControlFactory', __AttributeControlFactory = __prefix + 'AttributeControlFactory', __Document = __prefix + 'Document', __DispatchEventInstance = __prefix + 'DispatchEventInstance', __ErrorEventStatic = __prefix + 'ErrorEventStatic', __EventManagerStatic = __prefix + 'EventManagerStatic', __LifecycleEventStatic = __prefix + 'LifecycleEventStatic', __LifecycleEventInstance = __prefix + 'LifecycleEventInstance', __Log = __prefix + 'Log', __Parser = __prefix + 'Parser', __Regex = __prefix + 'Regex', __Tokenizer = __prefix + 'Tokenizer', __NavigatorInstance = __prefix + 'NavigatorInstance', __ContextManagerStatic = __prefix + 'ContextManagerStatic', __ContextManagerInstance = __prefix + 'ContextManagerInstance', __Compiler = __prefix + 'Compiler', __CommentManagerFactory = __prefix + 'CommentManagerFactory', __CommentManagerInstance = __prefix + 'CommentManagerInstance', __ElementManagerFactory = __prefix + 'ElementManagerFactory', __ElementManagerInstance = __prefix + 'ElementManagerInstance', __NodeManagerStatic = __prefix + 'NodeManagerStatic', __TextManagerFactory = __prefix + 'TextManagerFactory', __TextManagerInstance = __prefix + 'TextManagerInstance', __CacheFactory = __prefix + 'CacheFactory', __ManagerCache = __prefix + 'ManagerCache', __TemplateCache = __prefix + 'TemplateCache', __Animator = __prefix + 'Animator', __AttributesFactory = __prefix + 'AttributesFactory', __AttributesInstance = __prefix + 'AttributesInstance', __BindableTemplatesFactory = __prefix + 'BindableTemplatesFactory', __Dom = __prefix + 'Dom', __DomEvents = __prefix + 'DomEvents', __IDomEventsConfig = __prefix + 'IDomEventsConfig', __DomEventInstance = __prefix + 'DomEventInstance', __ResourcesFactory = __prefix + 'ResourcesFactory', __ResourcesInstance = __prefix + 'ResourcesInstance', __TemplateControlFactory = __prefix + 'TemplateControlFactory', __TemplateControlInstance = __prefix + 'TemplateControlInstance', __Utils = __prefix + 'Utils', __Browser = __prefix + 'Browser', __BrowserConfig = __prefix + 'BrowserConfig', __Router = __prefix + 'Router', __RouterStatic = __prefix + 'RouterStatic', __UrlUtilsInstance = __prefix + 'UrlUtilsInstance', __Window = __prefix + 'Window', __LocalStorage = __prefix + 'LocalStorage', __SessionStorage = __prefix + 'SessionStorage', __Geolocation = __prefix + 'Geolocation', __BaseSegmentFactory = __prefix + 'BaseSegmentFactory', __BaseSegmentInstance = __prefix + 'BaseSegmentInstance', __StaticSegmentInstance = __prefix + 'StaticSegmentInstance', __VariableSegmentInstance = __prefix + 'VariableSegmentInstance', __DynamicSegmentInstance = __prefix + 'DynamicSegmentInstance', __SplatSegmentInstance = __prefix + 'SplatSegmentInstance', __StateStatic = __prefix + 'StateStatic', __StateInstance = __prefix + 'StateInstance', __RouteRecognizerInstance = __prefix + 'RouteRecognizerInstance', __InjectorStatic = __prefix + 'InjectorStatic', __History = __prefix + 'History', __Location = __prefix + 'Location', /** */ - __Plat = 'plat-', __Bind = __Plat + 'bind', __Href = __Plat + 'href', __Src = __Plat + 'src', __KeyDown = __Plat + 'keydown', __KeyPress = __Plat + 'keypress', __KeyUp = __Plat + 'keyup', __CharPress = __Plat + 'charpress', __Name = __Plat + 'name', __Options = __Plat + 'options', __Checked = __Plat + 'checked', __Disabled = __Plat + 'disabled', __Selected = __Plat + 'selected', __ReadOnly = __Plat + 'readonly', __Visible = __Plat + 'visible', __Style = __Plat + 'style', __Tap = __Plat + 'tap', __Blur = __Plat + 'blur', __Change = __Plat + 'change', __Copy = __Plat + 'copy', __Cut = __Plat + 'cut', __Paste = __Plat + 'paste', __DblTap = __Plat + 'dbltap', __Focus = __Plat + 'focus', __Submit = __Plat + 'submit', __TouchStart = __Plat + 'touchstart', __TouchEnd = __Plat + 'touchend', __TouchMove = __Plat + 'touchmove', __TouchCancel = __Plat + 'touchcancel', __Hold = __Plat + 'hold', __Release = __Plat + 'release', __Swipe = __Plat + 'swipe', __SwipeLeft = __Plat + 'swipeleft', __SwipeRight = __Plat + 'swiperight', __SwipeUp = __Plat + 'swipeup', __SwipeDown = __Plat + 'swipedown', __Track = __Plat + 'track', __TrackLeft = __Plat + 'trackleft', __TrackRight = __Plat + 'trackright', __TrackUp = __Plat + 'trackup', __TrackDown = __Plat + 'trackdown', __TrackEnd = __Plat + 'trackend', __React = __Plat + 'react', __Link = __Plat + 'link', __ForEach = __Plat + 'foreach', __Html = __Plat + 'html', __If = __Plat + 'if', __Ignore = __Plat + 'ignore', __Select = __Plat + 'select', __Template = __Plat + 'template', __Routeport = __Plat + 'routeport', __Viewport = __Plat + 'viewport', __Control = __Plat + 'control', __ViewControl = __Plat + 'viewcontrol', __Resources = __Plat + 'resources', __Context = __Plat + __CONTEXT, __Callback = __Plat + 'callback', __AttributePrefix = 'data-', + __Plat = 'plat-', __Bind = __Plat + 'bind', __Href = __Plat + 'href', __Src = __Plat + 'src', __KeyDown = __Plat + 'keydown', __KeyPress = __Plat + 'keypress', __KeyUp = __Plat + 'keyup', __CharPress = __Plat + 'charpress', __Name = __Plat + 'name', __Options = __Plat + 'options', __Checked = __Plat + 'checked', __Disabled = __Plat + 'disabled', __Selected = __Plat + 'selected', __ReadOnly = __Plat + 'readonly', __Visible = __Plat + 'visible', __Style = __Plat + 'style', __Tap = __Plat + 'tap', __Blur = __Plat + 'blur', __Change = __Plat + 'change', __Copy = __Plat + 'copy', __Cut = __Plat + 'cut', __Paste = __Plat + 'paste', __DblTap = __Plat + 'dbltap', __Focus = __Plat + 'focus', __Submit = __Plat + 'submit', __TouchStart = __Plat + 'touchstart', __TouchEnd = __Plat + 'touchend', __TouchMove = __Plat + 'touchmove', __TouchCancel = __Plat + 'touchcancel', __Hold = __Plat + 'hold', __Release = __Plat + 'release', __Swipe = __Plat + 'swipe', __SwipeLeft = __Plat + 'swipeleft', __SwipeRight = __Plat + 'swiperight', __SwipeUp = __Plat + 'swipeup', __SwipeDown = __Plat + 'swipedown', __Track = __Plat + 'track', __TrackLeft = __Plat + 'trackleft', __TrackRight = __Plat + 'trackright', __TrackUp = __Plat + 'trackup', __TrackDown = __Plat + 'trackdown', __TrackEnd = __Plat + 'trackend', __React = __Plat + 'react', __Link = __Plat + 'link', __ForEach = __Plat + 'foreach', __Html = __Plat + 'html', __If = __Plat + 'if', __Ignore = __Plat + 'ignore', __Select = __Plat + 'select', __Template = __Plat + 'template', __Routeport = __Plat + 'routeport', __Viewport = __Plat + 'viewport', __Control = __Plat + 'control', __ViewControl = __Plat + 'viewcontrol', __Resources = __Plat + 'resources', __Context = __Plat + __CONTEXT, __TemplateContext = __Template + '-' + __CONTEXT, __Callback = __Plat + 'callback', __AttributePrefix = 'data-', /** */ __TemplateControlCache = '__templateControlCache', __Head = 'head', __Meta = 'meta', __Title = 'title', __Description = 'description', __Author = 'author', __Creator = 'creator', __MetaLink = 'link', __MetaHref = 'href', __MetaName = 'name', __MetaProperty = 'property', __MetaImage = 'image', __MetaVideo = 'video', __MetaType = 'type', __Rel = 'rel', __Url = 'url', __Article = 'article:', __OpenGraph = 'og:', __Twitter = 'twitter:', __Content = 'content', @@ -2103,7 +2103,7 @@ var plat; /** * Determines if a telephone number is valid. */ - this.validateTelephone = /^\+?[0-9\.\-\s]*$/; + this.validateTelephone = /^\+?[0-9\.\(\)\s-]*$/; /** * A regular expression for matching dynamic segments in a route. */ @@ -6136,9 +6136,7 @@ var plat; if (selfNotify) { _this._notifyChildProperties(absoluteIdentifier, this, originalArray); } - else if (newLength !== oldLength) { - _this._execute(absoluteIdentifier + '.length', newLength, oldLength); - } + _this._execute(absoluteIdentifier + '.length', newLength, oldLength); return returnValue; }; }; @@ -6187,7 +6185,7 @@ var plat; else { this.__contextObjects[identifier] = value; } - if (isNull(observableListeners)) { + if (value === oldValue || isNull(observableListeners)) { return; } var listeners = observableListeners.slice(0), length = listeners.length; @@ -13966,7 +13964,20 @@ var plat; } var elementMap = ElementManager._collectAttributes(element.attributes), manager = ElementManager.getInstance(); elementMap.element = element; - elementMap.uiControlNode = uiControlNode; + if (!hasUiControl && isString(elementMap.childContext)) { + injector = injectableInjectors[__TemplateControlInstance]; + hasUiControl = true; + elementMap.uiControlNode = { + control: injector.inject(), + resourceElement: null, + nodeName: __TemplateContext, + expressions: [], + injector: injector + }; + } + else { + elementMap.uiControlNode = uiControlNode; + } manager.initialize(elementMap, parent); if (!(elementMap.hasControl || hasUiControl)) { manager.bind = function () { return []; }; diff --git a/dist/platypus.min.js b/dist/platypus.min.js index 9853b3c9..b6f02b1d 100644 --- a/dist/platypus.min.js +++ b/dist/platypus.min.js @@ -1,8 +1,8 @@ -var __extends=this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);c.prototype=b.prototype,a.prototype=new c},plat;!function(a){"use strict;";function b(){}function c(a,b,c,d,e,f){Object.defineProperty(a,b,{value:c,enumerable:d===!0,configurable:e===!0,writable:f===!0})}function d(a,b,c,d,e){Object.defineProperty(a,b,{get:function(){return c},enumerable:d===!0,configurable:e===!0})}function e(a,b,d){for(var f=[],g=3;g=0}function y(a){return"object"==typeof a&&Ye.call(a)===cf}function z(a,b,c){var d=[];return u(b)?d:t(b.filter)?b.filter(a,c):(B(function(b,c,e){a(b,c,e)&&d.push(b)},b),d)}function A(a,b){return z(function(b){return!H(function(a,c){return b[c]!==a},a)},b)}function B(a,b,c){if(u(b)||!h(b)&&!x(b))return b;var d,e,f;if(t(b.forEach))return b.forEach(a,c);if(x(b))for(d=0,f=b.length;f>d;++d)a.call(c,b[d],d,b);else{var g=Object.keys(b);for(f=g.length;g.length>0;)e=g.shift(),a.call(c,b[e],e,b)}return b}function C(a,b,c){var d=[];return u(b)?d:t(b.map)?b.map(a,c):(B(function(e,f){d.push(a.call(c,e,f,b))},b),d)}function D(a,b,c){return xa=xa||plat.acquire(Na),xa.all(C(a,b,c))}function E(a,b,c,d){xa=xa||plat.acquire(Na);var e=xa.resolve([]);if(!w(b))return e;a=a.bind(c);var f=function(b,c,d,e){return b.then(function(b){return a(c,d,e).then(function(a){return b.concat(a)})})};return d===!0?b.reduceRight(f,e):b.reduce(f,e)}function F(a,b,c){return E(a,b,c)}function G(a,b,c){return E(a,b,c,!0)}function H(a,b,c){if(u(b)||t(b))return!1;var d,e,f,g;if(t(b.some))return b.some(a,c);if(x(b)){for(d=0,f=b.length;f>d;++d)if(g=a.call(c,b[d],d,b),g===!0)return!0}else{var h=Object.keys(b);for(f=h.length;h.length>0;)if(e=h.shift(),g=a.call(c,b[e],e,b),g===!0)return!0}return!1}function I(a,b,c){return J(a,0,b,c)}function J(a,b,c,d){function e(){a.apply(d,c)}var f=setTimeout(e,b);return function(){clearTimeout(f)}}function K(a,b,c,d){function e(){a.apply(d,c)}var f=setInterval(e,b);return function(){clearInterval(f)}}function L(a,c){ya=ya||plat.acquire(Oa);var d=ya.requestAnimationFrame;if(v(d))return I(function(){a.call(c,Date.now())});var e=d(a.bind(c)),f=ya.cancelAnimationFrame||b;return function(){f(e)}}function M(a){function b(){return a+c.join("")}u(a)&&(a="");var c=Xe[a];u(c)&&(c=Xe[a]=["0","/"]);for(var d,e=c.length;e--;){if(d=c[e].charCodeAt(0),57===d)return c[e]="A",b();if(90===d)return c[e]="a",b();if(122!==d)return c[e]=String.fromCharCode(d+1),b();c[e]="0"}return c.unshift("0"),b()}function N(a){return!n(a)||q(a)?a:(a=a.charAt(0).toLowerCase()+a.slice(1),za=za||plat.acquire(Za).camelCaseRegex,a.replace(za,function(a,b,c,d){return d?c.toUpperCase():c}))}function O(a,b){return!n(a)||q(a)?a:(u(b)&&(b=""),Aa=Aa||plat.acquire(Za).capitalCaseRegex,a.replace(Aa,function(a,c){return c?b+a.toLowerCase():a.toLowerCase()}))}function P(a,b){return u(a)||delete a[b],a}function Q(a,b){return u(a)?a:a[b]}function R(a){if(!q(a)){for(var b,c=a.split("&"),d={},e=c.length,f=0;e>f;++f)b=c[f].split("="),d[b[0]]=b[1];return d}}function S(a){return!w(a)&&!h(a)||q(a)?"":"?"+C(function(a,b){return b+"="+a},a).join("&")}function T(a){return w(a)?a.reduce(function(a,b){return a&&b!==!1},!0):r(a)?a:!0}function U(a,b,c){var d=l(b),e=!k(b),f=d?b:(Ba||(Ba=plat.acquire(Ra))).createDocumentFragment();e&&(b=f);var g,h=w(a)?a:Array.prototype.slice.call(a),i=h.length;if(c===!0){var j;for(g=0;i>g;++g)j=h[g].cloneNode(!0),f.insertBefore(j,null)}else for(g=0;i>g;++g)f.insertBefore(h[g],null);return d||e||b.appendChild(f),b}function V(a){for(var b=Array.prototype.slice.call(a.childNodes);b.length>0;)a.removeChild(b.pop())}function W(a,b){if(t(a.push)||(a=Array.prototype.slice.call(a)),!u(b))return void X(a,b);for(var c;a.length>0;)c=a.pop(),b=c.parentNode,u(b)||b.removeChild(c)}function X(a,b){for(;a.length>0;)b.removeChild(a.pop())}function Y(a){ya=ya||(ya=plat.acquire(Oa)),Ba=Ba||(Ba=plat.acquire(Ra));var b=hf.exec(a),c=Ba.createElement("div");if(u(b))return c=ea(c,a),c.removeChild(c.lastChild);a=a.trim();var d=b[1];if(ya.pushState&&v(of[d]))return ea(c,a);if("body"===d)return c=ea(Ba.createElement("html"),a),c.removeChild(c.lastChild);var e=pf[d]||pf._default,f=e[0],g=e[1],h=e[2];for(c=ea(c,g+a+h);f-->0;)c=c.lastChild;return c}function Z(a,b){if(V(a),!q(b)){var c=Y(b);return c.childNodes.length>0?U(c.childNodes,a):a.insertBefore(c,null),a}}function $(a,b,c){if(!u(a)&&h(b)){v(c)&&(c=null);var d;if(k(b))return d=b,b=Array.prototype.slice.call(d.childNodes),a.insertBefore(d,c),b;t(b.push)||(b=Array.prototype.slice.call(b)),Ba=Ba||(Ba=plat.acquire(Ra));var e=b.length;d=Ba.createDocumentFragment();for(var f=0;e>f;++f)d.insertBefore(b[f],null);return a.insertBefore(d,c),b}}function _(a){var b=a.parentNode,c=$(b,a.childNodes,a);return b.removeChild(a),c}function aa(a,b){if(u(b))return b;if(a.nodeType===Node.ELEMENT_NODE)for(var c,d=a.attributes,e=d.length,f=0;e>f;++f)c=d[f],b.setAttribute(c.name,c.value);var g=a.parentNode;return $(b,a.childNodes),g.replaceChild(b,a),b}function ba(a){Ba=Ba||(Ba=plat.acquire(Ra));var b=Ba.createDocumentFragment();return q(a)||Z(b,a),b}function ca(a,b){if(!u(a)){var c,d=a.nextSibling,e=a.parentNode;if(u(b)&&(b=null),!u(e)&&(u(b)||b.parentNode===e))for(;d!==b;)c=d.nextSibling,e.removeChild(d),d=c}}function da(a,b){u(a)||(ca(a,b),fa(a),fa(b))}function ea(a,b){return ya=ya||(ya=plat.acquire(Oa)),ya.msApp?MSApp.execUnsafeLocalFunction(function(){a.innerHTML=b}):a.innerHTML=b,a}function fa(a){if(k(a)){var b=a.parentNode;u(b)||b.removeChild(a)}}function ga(a,b){var c=(a||{}).className;if(n(c)&&n(b)&&""!==b){var d,e,f=b.split(jf);if(v(a.classList)){if(q(c))return void(a.className=b);for(;f.length>0;)d=f.shift(),""!==d&&(e=new RegExp("^"+d+"\\s+|\\s+"+d+"$|\\s+"+d+"\\s+","g"),e.test(c)||(a.className+=" "+d))}else for(;f.length>0;)d=f.shift(),""!==d&&a.classList.add(d)}}function ha(a,b){var c=(a||{}).className;if(n(c)&&n(b)&&""!==b){var d,e=b.split(jf);if(v(a.classList)){if(c===b)return void(a.className="");for(;e.length>0;)d=e.shift(),""!==d&&(a.className=c=c.replace(new RegExp("^"+d+"\\s+|\\s+"+d+"$|\\s+"+d+"\\s+","g"),""))}else for(;e.length>0;)d=e.shift(),""!==d&&a.classList.remove(d)}}function ia(a,b){var c=(a||{}).className;if(n(c)&&n(b)&&""!==b){var d,e=b.split(jf);if(v(a.classList)){var f;if(""===c)a.className=b;else if(c===b)return void(a.className="");for(;e.length>0;)if(d=e.shift(),""!==d){if(f=new RegExp("^"+d+"\\s+|\\s+"+d+"$|\\s+"+d+"\\s+","g"),f.test(c)){a.className=c=c.replace(f,"");continue}a.className+=" "+d}}else for(;e.length>0;)d=e.shift(),""!==d&&a.classList.toggle(d)}}function ja(a,b,c){var d=(a||{}).className;if(n(d)&&n(c)&&""!==c){if(v(a.classList)){var e=new RegExp("^"+b+"\\s+","g"),f=new RegExp("\\s+"+b+"\\s+","g"),g=new RegExp("\\s+"+b+"$","g");return void(a.className=d.replace(e,c+" ").replace(f," "+c+" ").replace(g," "+c))}a.classList.add(c),a.classList.remove(b)}}function ka(a,b){var c=(a||{}).className;if(!n(c)||!n(b)||""===b)return!1;var d=b.split(jf);if(v(a.classList)){if(""===c)return!1;if(c===b)return!0;for(var e;d.length>0;)if(e=d.shift(),""!==e&&!new RegExp("^"+e+"\\s|\\s"+e+"$|\\s"+e+"\\s","g").test(c))return!1;return!0}for(;d.length>0;)if(e=d.shift(),""!==e&&!a.classList.contains(e))return!1;return!0}function la(a){return Ca=Ca||(Ca=plat.acquire(mb)),Da=Da||(Da=plat.acquire(Ka)),Ca.put(a,Ca.read(a).catch(function(b){return u(b)?Da.ajax({url:a}):void 0}).then(function(b){if(l(b))return Ca.put(a,b);if(!h(b)||!n(b.response))return Ea=Ea||(Ea=plat.acquire(Xa)),Ea.warn("No template found at "+a),Ca.put(a);var c=b.response;return q(c.trim())?Ca.put(a):Ca.put(a,c)}).catch(function(b){return I(function(){Ea=Ea||(Ea=plat.acquire(Xa)),Ea.error(new Error("Failure to get template from "+a+"."))}),b}))}function ma(a){var b,c=w(a);b=yf.Injector.getDependencies(c?a:[a]);for(var d=b.length,e=[],f=0;d>f;++f)e.push(b[f].inject());return c?e:e[0]}function na(){return window}function oa(a){return a.document}function pa(a){return!u(Jf[a])}function qa(a){return!u(If[a])}function ra(a){return!u(Hf[a])}function sa(a){return!v(Kf[a])}function ta(a,b,c,d,e,f){return Mf._parser=a,Mf._ContextManager=b,Mf._EventManager=c,Mf._Promise=d,Mf._dom=e,Mf._log=f,Mf}function ua(){return Nf}function va(a,b,c,d,e,f){return Sf._compat=a,Sf._EventManager=b,Sf._document=c,Sf._compiler=d,Sf._LifecycleEvent=e,Sf._log=f,Sf}function wa(a){return a.app}var xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga="$",Ha="context",Ia=Ga+"AppStatic",Ja=Ga+"App",Ka=Ga+"Http",La=Ga+"HttpRequestInstance",Ma=Ga+"HttpConfig",Na=Ga+"Promise",Oa=Ga+"Compat",Pa=Ga+"ControlFactory",Qa=Ga+"AttributeControlFactory",Ra=Ga+"Document",Sa=Ga+"DispatchEventInstance",Ta=Ga+"ErrorEventStatic",Ua=Ga+"EventManagerStatic",Va=Ga+"LifecycleEventStatic",Wa=Ga+"LifecycleEventInstance",Xa=Ga+"Log",Ya=Ga+"Parser",Za=Ga+"Regex",$a=Ga+"Tokenizer",_a=Ga+"NavigatorInstance",ab=Ga+"ContextManagerStatic",bb=Ga+"ContextManagerInstance",cb=Ga+"Compiler",db=Ga+"CommentManagerFactory",eb=Ga+"CommentManagerInstance",fb=Ga+"ElementManagerFactory",gb=Ga+"ElementManagerInstance",hb=Ga+"NodeManagerStatic",ib=Ga+"TextManagerFactory",jb=Ga+"TextManagerInstance",kb=Ga+"CacheFactory",lb=Ga+"ManagerCache",mb=Ga+"TemplateCache",nb=Ga+"Animator",ob=Ga+"AttributesFactory",pb=Ga+"AttributesInstance",qb=Ga+"BindableTemplatesFactory",rb=Ga+"Dom",sb=Ga+"DomEvents",tb=Ga+"IDomEventsConfig",ub=Ga+"DomEventInstance",vb=Ga+"ResourcesFactory",wb=Ga+"ResourcesInstance",xb=Ga+"TemplateControlFactory",yb=Ga+"TemplateControlInstance",zb=Ga+"Utils",Ab=Ga+"Browser",Bb=Ga+"BrowserConfig",Cb=Ga+"Router",Db=Ga+"RouterStatic",Eb=Ga+"UrlUtilsInstance",Fb=Ga+"Window",Gb=Ga+"LocalStorage",Hb=Ga+"SessionStorage",Ib=Ga+"BaseSegmentFactory",Jb=Ga+"BaseSegmentInstance",Kb=Ga+"StaticSegmentInstance",Lb=Ga+"VariableSegmentInstance",Mb=Ga+"DynamicSegmentInstance",Nb=Ga+"SplatSegmentInstance",Ob=Ga+"StateStatic",Pb=Ga+"StateInstance",Qb=Ga+"RouteRecognizerInstance",Rb=Ga+"InjectorStatic",Sb=Ga+"History",Tb=Ga+"Location",Ub="plat-",Vb=Ub+"bind",Wb=Ub+"href",Xb=Ub+"src",Yb=Ub+"keydown",Zb=Ub+"keypress",$b=Ub+"keyup",_b=Ub+"charpress",ac=Ub+"name",bc=Ub+"options",cc=Ub+"checked",dc=Ub+"disabled",ec=Ub+"selected",fc=Ub+"readonly",gc=Ub+"visible",hc=Ub+"style",ic=Ub+"tap",jc=Ub+"blur",kc=Ub+"change",lc=Ub+"copy",mc=Ub+"cut",nc=Ub+"paste",oc=Ub+"dbltap",pc=Ub+"focus",qc=Ub+"submit",rc=Ub+"touchstart",sc=Ub+"touchend",tc=Ub+"touchmove",uc=Ub+"touchcancel",vc=Ub+"hold",wc=Ub+"release",xc=Ub+"swipe",yc=Ub+"swipeleft",zc=Ub+"swiperight",Ac=Ub+"swipeup",Bc=Ub+"swipedown",Cc=Ub+"track",Dc=Ub+"trackleft",Ec=Ub+"trackright",Fc=Ub+"trackup",Gc=Ub+"trackdown",Hc=Ub+"trackend",Ic=Ub+"react",Jc=Ub+"link",Kc=Ub+"foreach",Lc=Ub+"html",Mc=Ub+"if",Nc=Ub+"ignore",Oc=Ub+"select",Pc=Ub+"template",Qc=Ub+"viewport",Rc=Ub+"control",Sc=Ub+"viewcontrol",Tc=Ub+"resources",Uc=Ub+Ha,Vc=Ub+"callback",Wc="data-",Xc="__templateControlCache",Yc="head",Zc="meta",$c="title",_c="description",ad="author",bd="creator",cd="link",dd="href",ed="name",fd="property",gd="image",hd="video",id="type",jd="rel",kd="url",ld="article:",md="og:",nd="twitter:",od="content",pd="ready",qd="suspend",rd="resume",sd="online",td="offline",ud="error",vd="shutdown",wd="exiting",xd="beforeLoad",yd="beforeNavigate",zd="navigated",Ad="navigating",Bd="urlChanged",Cd="pause",Dd="deviceReady",Ed="backbutton",Fd="backclick",Gd="backButtonPressed",Hd=Ub+"hide",Id=Ub+"animating",Jd=Ub+"animation",Kd=Ub+"transition",Ld=Ub+"enter",Md=Ub+"leave",Nd=Ub+"move",Od=Ub+"fadein",Pd=Ub+"fadeout",Qd="$",Rd=Qd+"tap",Sd=Qd+"dbltap",Td=Qd+"touchstart",Ud=Qd+"touchend",Vd=Qd+"touchmove",Wd=Qd+"touchcancel",Xd=Qd+"hold",Yd=Qd+"release",Zd=Qd+"swipe",$d=Qd+"swipeleft",_d=Qd+"swiperight",ae=Qd+"swipeup",be=Qd+"swipedown",ce=Qd+"track",de=Qd+"trackleft",ee=Qd+"trackright",fe=Qd+"trackup",ge=Qd+"trackdown",he=Qd+"trackend",ie={index:"index",even:"even",odd:"odd",first:"first",last:"last"},je="base",ke="variable",le="static",me="splat",ne="dynamic",oe=1e3,pe="{{",qe="}}",re="static",se="singleton",te="instance",ue="factory",ve="class",we="css",xe="-compiled",ye="-@",ze="-init",Ae=": start node",Be=": end node",Ce="popstate",De="hashchange",Ee="wrapped",Fe="plat_callback",Ge="js",He="noop",Ie="__app__",Je="resource",Ke=Je+"s",Le="alias",Me=Le+"es",Ne="observable",Oe="injectable",Pe="object",Qe="function",Re="literal",Se="root",Te="rootContext",Ue="control",Ve=Ha,We=!!Array.isArray,Xe={},Ye=Object.prototype.toString,Ze="[object ",$e=Ze+"Error]",_e=Ze+"File]",af=Ze+"Array]",bf=Ze+"Boolean]",cf=Ze+"Date]",df=Ze+"Number]",ef=Ze+"RegExp]",ff=Ze+"String]",gf=Ze+"Promise]",hf=/<([\w:]+)/,jf=/\s+/g,kf=[1,'"],lf=[1,"","
"],mf=[3,"","
"],nf=[1,'',""],of={thead:lf,tbody:lf,tfoot:lf,colgroup:lf,caption:lf,tr:[2,"","
"],col:[2,"","
"],td:mf,th:mf},pf=e(!1,!1,{},of,{option:kf,optgroup:kf,legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],text:nf,circle:nf,ellipse:nf,line:nf,path:nf,polygon:nf,polyline:nf,rect:nf,_default:[0,"",""]}),qf={},rf={},sf={},tf={},uf={},vf={},wf={},xf={};!function(a){function b(b,c,d,e,f,g){var h=b[c]=new yf.Injector(c,d,e,f);return g===!0&&(vf[c]=h),a}function c(b,c,d){var e=ma(Rb),f=ma(Ia);return f.registerApp(new e(b,c,d)),a}function d(a,c,d,e){if(!n(a))throw new Error("A Control must be registered with a string name");return a=a.toLowerCase(),"head"===a&&(e=!0),b(qf,a,c,d,e?re:void 0)}function e(a,c,d){if(!n(a))throw new Error("A ViewControl must be registered with a string name");return a=a.toLowerCase(),b(rf,a,c,d)}function f(a,c,d,e){if(n(e)){if(e=e.toLowerCase(),e===ue||e===re||e===ve)return b(tf,a,c,d,e,!0);if(e!==se&&e!==te)throw new Error("Invalid injectable type "+e+" during injectable registration.")}else e=se;return b(tf,a,c,d,e,!1)}function g(c,d,e,f){if(n(f)&&(f=f.toLowerCase(),f!==we&&f!==Ge))throw new Error('Invalid animationType "'+f+'" during animation registration.');return b(f===Ge?xf:wf,c,d,e,a.injectable.INSTANCE)}a.app=c,a.control=d,a.viewControl=e,a.injectable=f;var f;!function(a){a.STATIC=re,a.SINGLETON=se,a.INSTANCE=te,a.FACTORY=ue,a.CLASS=ve}(f=a.injectable||(a.injectable={})),a.animation=g;var g;!function(a){a.CSS=we,a.JS=Ge}(g=a.animation||(a.animation={}))}(Fa=a.register||(a.register={}));var yf;!function(a){var c=function(){function a(b,c,d,e){void 0===e&&(e=null),this.name=b,this.Constructor=c,this.type=e;var f,g=this.dependencies=a.convertDependencies(d),h=g.indexOf(He);if(Object.defineProperty(c,"__injectorName",{value:b,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(c,"__injectorDependencies",{value:g.slice(0),enumerable:!1,configurable:!0,writable:!0}),h>-1){var i=d[h];if(u(i))throw new TypeError("The dependency for "+b+" at index "+h+" is undefined, did you forget to include a file?");throw new TypeError("Could not resolve dependency "+i.slice(9,i.indexOf("("))+" for "+b+". Are you using a static injectable Type?")}if(f=a.__findCircularReferences(this),n(f))throw new Error("Circular dependency detected from "+this.name+" to "+f+".");if(b===Ia){var j=this.inject();this.dependencies=g,j.start()}}return a.initialize=function(){for(var a=vf,b=Object.keys(a),c=b.length,d=0;c>d;++d)a[b[d]].inject();vf={}},a.getDependencies=function(b){if(u(b)||q(b))return[];for(var c=[],d=b.length,e=0;d>e;++e)c.push(a.getDependency(b[e]));return c},a.getDependency=function(b){return u(b)||b===He?a.__noop():a.isInjector(b)?b:a.__locateInjector(b)},a.convertDependencies=function(b){if(!w(b))return[];for(var c=a.convertDependency,d=[],e=b.length,f=0;e>f;++f)d.push(c(b[f]));return d},a.convertDependency=function(b){return u(b)?He:a.__getInjectorName(b)},a.isInjector=function(a){return t(a.inject)&&!v(a.type)&&!v(a.name)&&!v(a.Constructor)},a.__getInjectorName=function(b){if(u(b))return He;if(n(b))return b;var c=b,d=h(c._inject)?c._inject:{};if(n(c.__injectorName)&&(b=c.__injectorName),!n(b))return new a(b,c,d.dependencies);var e=a.__findInjector.bind(a,b),f=e(tf)||e(uf)||e(vf)||e(rf)||e(qf)||e(wf)||e(xf);return!h(f)&&n(b)&&(f=uf[b]=new a(b,c,c._inject.dependencies)),h(f)?f.name:He},a.__construct=function(b,c,d){if(u(b)||u(b.prototype))return b;var e,f=Object.create(b.prototype),g=d===te;g&&(e=sf[b.__injectorName]),h(e)||(e=a.__walk(f,Object.getPrototypeOf(f),{}),g&&(sf[b.__injectorName]=e));for(var i=ma(C(function(a){return a},e)),j=Object.keys(e),k=j.length,l=0;k>l;++l)f[j[l]]=i[l];var m=f.constructor.apply(f,c);return v(m)?f:m},a.__walk=function(b,c,d){var g=c.constructor,i={};h(g._inject)&&g!==Object&&(i=a.__walk(b,Object.getPrototypeOf(c),d));var j=f(g._inject,!0);return e(!1,!1,{},d,i,j)},a.__locateInjector=function(b){if(!u(b)){var c=b;n(b.__injectorName)&&(c=b.__injectorName);var d=a.__findInjector.bind(a,c),e=d(tf)||d(uf)||d(vf)||d(qf)||d(rf)||d(wf)||d(xf);return h(e)||(t(b)?(n(c)||(c=M(Ub)),e=new a(c,b,h(b._inject)?b._injectorDependencies:[]),uf[c]=e):e=a.__wrap(b)),e}},a.__findInjector=function(b,c){if(!u(b)){if(b===a||b===Rb){var d=a.__wrap(a);return d.name=Rb,d}return n(b)?c[b]||c[b.toLowerCase()]:void 0}},a.__wrap=function(a){return{inject:function(){return a},name:Ee,dependencies:[],Constructor:a}},a.__noop=function(){return{inject:b,type:He,name:He,dependencies:[],Constructor:b}},a.__findCircularReferences=function(b){if(h(b)&&w(b.dependencies))for(var c,d,e,f=b.name,g=b.dependencies,i=[{name:f,dependencies:g.slice(0)}],j=a.__locateInjector;i.length>0;){c=i.pop(),g=c.dependencies,e=g.length;for(var k=0;e>k;++k){if(d=g[k],d===f)return c.name;b=j(d),h(b)&&w(b.dependencies)&&i.push({name:b.name,dependencies:b.dependencies.slice(0)})}}},a.prototype.inject=function(){for(var b,c,d=[],e=this.type,f=this.dependencies,g=f.length,h=0;g>h;++h)b=a.getDependency(f[h]),d.push(b.inject());return c=a.__construct(this.Constructor,d,e),n(e)&&e!==te&&this._wrapInjector(c),c.__injectable__type=e,c},a.prototype._wrapInjector=function(a){return this.inject=function(){return a},this},a}();a.Injector=c;var d;!function(a){a.control=qf,a.viewControl=rf,a.injectable=tf,a.staticInjectable=vf,a.animation=wf,a.jsAnimation=xf}(d=a.injectors||(a.injectors={}))}(yf=a.dependency||(a.dependency={})),v(window)||(v(window.plat)&&(window.plat=plat),v(window.module)&&(window.module={})),a.acquire=ma;var zf;!function(a){var b=function(){function a(){this.ERROR=5,this.WARN=4,this.INFO=3,this.DEBUG=2,this.TRACE=1,this._level=this.INFO}return a.prototype.error=function(a){throw this._log(a,this.ERROR),a},a.prototype.warn=function(a){this._log(a,this.WARN)},a.prototype.info=function(a){this._log(a,this.INFO)},a.prototype.debug=function(a){this._log(a,this.DEBUG)},a.prototype.trace=function(a){this._log(a,this.TRACE)},a.prototype.setLogLevel=function(a){switch(n(a)&&(a=this[a.toUpperCase()]),a){case this.ERROR:case this.WARN:case this.INFO:case this.DEBUG:case this.TRACE:this._level=a;break;default:this._level=this.INFO}},a.prototype._log=function(b,c){if(this._shouldLog(c)){n(b)&&(b=new Error(b));var d=this._ErrorEvent;u(d)&&(d=this._ErrorEvent=ma(Ta)),d.dispatch(ud,a,b,c)}},a.prototype._shouldLog=function(a){return s(a)||(a=this.INFO),this._level1?(a=w(h)&&h.length>1?h[1]:"",d=a[0].toUpperCase()+a.slice(1),b="WebKit|Moz|MS".match(new RegExp("("+a+")","i"))[1],c="-"+a+"-"):v(g.OLink)?a=d=b=c="":(a="o",d=b="O",c="-o-"),this.vendorPrefix={dom:b,lowerCase:a,css:c,upperCase:d},this.requestAnimationFrame=e.requestAnimationFrame||e[a+"RequestAnimationFrame"],this.cancelAnimationFrame=e.cancelAnimationFrame||e[a+"CancelRequestAnimationFrame"]||e[a+"CancelAnimationFrame"];var i=f.style;!(v(this.ANDROID)||Math.floor(this.ANDROID/10)>=44)||v(i.animation)||v(i.transition)?v(i[d+"Animation"])||v(i[d+"Transition"])||(this.animationSupported=!0,this.animationEvents={$animation:a+"Animation",$animationStart:a+"AnimationStart",$animationEnd:a+"AnimationEnd",$animationIteration:a+"AnimationIteration",$transition:a+"Transition",$transitionStart:a+"TransitionStart",$transitionEnd:a+"TransitionEnd"}):(this.animationSupported=!0,this.animationEvents={$animation:"animation",$animationStart:"animationstart",$animationEnd:"animationend",$animationIteration:"animationiteration",$transition:"transition",$transitionStart:"transitionstart",$transitionEnd:"transitionend"})},a.prototype.__determineCss=function(){var a=this._document,b=a.head,c=a.createElement("div");c.setAttribute(Hd,""),b.insertBefore(c,null);var d=this._window.getComputedStyle(c),e=d.display,f=d.visibility;this.platCss="none"===e||"hidden"===f,b.removeChild(c)},a._inject={_window:Fb,_history:Sb,_document:Ra},a}();a.Compat=Af,Fa.injectable(Oa,Af);var Bf=function(){function a(){}return a.prototype.noop=function(){},a.prototype.extend=function(a){for(var b=[],c=1;c<|~]/,this.fullUrlRegex=/^(?:[a-z0-9\-]+:)(?:\/\/)?|(?:\/\/)/i,this.validateEmail=new RegExp('^(([^<>()[\\]\\.,;:\\s@\\"]+(\\.[^<>()[\\]\\.,;:\\s@\\"]+)*)|(\\".+\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$'),this.validateTelephone=/^\+?[0-9\.\-\s]*$/,this.dynamicSegmentsRegex=/^:([^\/]+)$/,this.splatSegmentRegex=/^\*([^\/]+)$/}return Object.defineProperty(a.prototype,"newLineRegex",{get:function(){return/\r|\n/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"optionalRouteRegex",{get:function(){return/\((.*?)\)/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"namedParameterRouteRegex",{get:function(){return/(\(\?)?:\w+/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"wildcardRouteRegex",{get:function(){return/\*\w*/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"escapeRouteRegex",{get:function(){return/[\-{}\[\]+?.,\\\^$|#\s]/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"camelCaseRegex",{get:function(){return/([\-_\.\s])(\w+?)/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"capitalCaseRegex",{get:function(){return/[A-Z]/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"whiteSpaceRegex",{get:function(){return/("[^"]*?"|'[^']*?')|[\s\r\n\t\v]/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"quotationRegex",{get:function(){return/'|"/g},enumerable:!0,configurable:!0}),a}();a.Regex=b,Fa.injectable(Za,b);var c=function(){function a(){this.__previousChar="",this.__variableRegex=ma(Za).invalidVariableRegex,this.__outputQueue=[],this.__operatorStack=[],this.__argCount=[],this.__objArgCount=[],this.__lastColonChar=[],this.__lastCommaChar=[]}return a.prototype.createTokens=function(a){if(u(a))return[];this._input=a;for(var b,c=a.length,d=0,e=!1,f=this._isSpace,g=this._isAlphaNumeric,h=0;c>h;h++)if(b=a[h],!f(b)){if(g(b))h=this.__handleAplhaNumeric(h,b);else if(pa(b))switch(b){case".":h=this.__handlePeriod(h,b);break;case"{":this.__handleLeftBrace(b);break;case"}":this.__handleRightBrace(b);break;case"[":this.__handleLeftBracket(b);break;case"]":this.__handleRightBracket(b);break;case"(":this.__handleLeftParenthesis(b);break;case")":this.__handleRightParenthesis(b);break;case",":this.__handleComma(b);break;case"'":case'"':h=this.__handleStringLiteral(h,b)}else if(ra(b))switch(b){case"?":e=!0,d++,this.__handleQuestion(b);break;case":":d=this.__handleColon(b,d);break;default:h=this.__handleOtherOperator(h,b)}else if(";"===b)return this._throwError("Unexpected semicolon"),[];this.__previousChar=b}if(e&&d>0)return this._throwError("Improper ternary expression"),[];if(this.__objArgCount.length>0)return this._throwError("Improper object literal"),[];this.__popRemainingOperators();var i=this.__outputQueue;return this._resetTokenizer(),i},a.prototype._checkType=function(a,b){return b?this._isNumeric(a):this._isAlphaNumeric(a)},a.prototype._lookAhead=function(a,b,c){for(var d,e=this._input,f=e.length;++b="0"&&"9">=a},a.prototype._isSpace=function(a){return" "===a||"\r"===a||"\n"===a||" "===a||" "===a||" "===a},a.prototype._isAlphaNumeric=function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||a>="0"&&"9">=a||"@"===a||"_"===a||"$"===a},a.prototype._isStringValidVariable=function(a){return!this.__variableRegex.test(a)},a.prototype.__handleAplhaNumeric=function(a,b){var c=this._isNumeric(b),d=this._lookAhead(b,a,c);return this.__outputQueue.push(c?{val:Number(d),args:0}:{val:d,args:-1}),a+d.length-1},a.prototype.__handlePeriod=function(a,b){var c,d=this.__outputQueue,e=this.__operatorStack,f=d.length-1,g=this.__previousChar;return 0>f||this._isSpace(g)||!u(Hf[g])||"("===g||","===g?(c=this._lookAhead(b,a,!0),a+=c.length-1,d.push({val:parseFloat(c),args:0})):this._isValEqual(e[0],b)?d.push({val:b,args:0}):u(d[f])||!s(Number(d[f].val))||this._isValEqual(d[f-1],b)?e.unshift({ -val:b,args:0}):(c=this._lookAhead(b,a,!0),a+=c.length-1,d[f].val+=parseFloat(c)),a},a.prototype.__handleLeftBrace=function(a){this.__operatorStack.unshift({val:a,args:0}),this.__objArgCount.push(0),this.__lastColonChar.push(a),this.__lastCommaChar.push(a)},a.prototype.__handleRightBrace=function(a){var b=this.__operatorStack,c=b[0],d=this.__objArgCount.pop();return u(c)?this._throwError("Improper object literal"):(this._popStackForVal(c,"{","Improper object literal"),b.shift(),this.__lastColonChar.pop(),this.__lastCommaChar.pop(),void this.__outputQueue.push({val:"{}",args:d}))},a.prototype.__handleLeftBracket=function(a){var b=this.__previousChar,c=this.__operatorStack;this._isValEqual(c[0],".")&&this.__outputQueue.push(c.shift()),c.unshift({val:a,args:0}),this.__argCount.push({num:0,isArray:!("]"===b||")"===b||this._isAlphaNumeric(b))}),this.__lastCommaChar.push(a)},a.prototype.__handleRightBracket=function(a){var b=this.__operatorStack,c=b[0],d=this.__argCount.pop();return u(c)||u(d)?this._throwError("Brackets mismatch"):(d.isArray||d.num--,this._popStackForVal(c,"[","Brackets mismatch"),b.shift(),this.__lastCommaChar.pop(),void this.__outputQueue.push({val:"[]",args:"["===this.__previousChar?-1:d.num+1}))},a.prototype.__handleLeftParenthesis=function(a){var b=this.__previousChar,c=this.__operatorStack;if(this._isAlphaNumeric(b)||"]"===b||")"===b){var d=this.__outputQueue,e=d[d.length-1];this._isValEqual(e,"[]")?(c.unshift(d.pop()),c.unshift(d.pop())):this._isValEqual(e,"()")||this._isNumeric(e.val)||c.unshift(d.pop()),this.__argCount.push({num:0})}c.unshift({val:a,args:0}),this.__lastCommaChar.push(a)},a.prototype.__handleRightParenthesis=function(a){var b=this.__operatorStack,c=b[0],d=this.__argCount.pop();if(u(c))return this._throwError("Parentheses mismatch");if(this._popStackForVal(c,"(","Parentheses mismatch"),b.shift(),this.__lastCommaChar.pop(),!u(d)){var e=d.num;if("("===this.__previousChar)return void(this.__removeFnFromStack(e)&&this.__outputQueue.push({val:"()",args:0}));this.__removeFnFromStack(e+1)&&this.__outputQueue.push({val:"()",args:e+1})}},a.prototype.__handleComma=function(a){var b=this.__lastCommaChar,c=b[b.length-1];if("("===c||"["===c){var d=this.__argCount,e=d.length;if(!(e>0))return this._throwError("Mismatch with "+c);d[e-1].num++}var f=this.__operatorStack[0];return u(f)?this._throwError("Unexpected comma"):void this._popStackForVal(f,c,"Unexpected comma")},a.prototype.__handleStringLiteral=function(a,b){var c=this._lookAheadForDelimiter(b,a),d=this.__operatorStack;return this._isValEqual(d[0],"([")?d.unshift({val:c,args:0}):this.__outputQueue.push({val:c,args:0}),a+c.length+1},a.prototype.__handleQuestion=function(a){this.__lastColonChar.push(a),this.__determinePrecedence(a)},a.prototype.__handleColon=function(a,b){var c=this.__lastColonChar,d=c[c.length-1],e=this.__outputQueue;if("?"===d){var f=this.__operatorStack,g=f[0];if(u(g))return void this._throwError("Ternary mismatch");b--,c.pop(),this._popStackForVal(g,"?","Ternary mismatch"),e.push(f.shift()),f.unshift({val:a,args:-2})}else{if("{"!==d)return void this._throwError("Unexpected colon");var h=this.__objArgCount,i=e.length-1;if(h[h.length-1]++,0>i)return void this._throwError("Unexpected colon");e[i].args=1}return b},a.prototype.__handleOtherOperator=function(a,b){var c=this._lookAheadForOperatorFn(b,a);return this.__determinePrecedence(c),a+c.length-1},a.prototype.__popRemainingOperators=function(){for(var a,b,c=this.__outputQueue,d=this.__operatorStack;d.length>0;){if(a=d.shift(),b=a.val,"("===b||")"===b)return this._throwError("Parentheses mismatch");c.push(a)}},a.prototype.__determineOperator=function(a){switch(a){case"+":case"-":if(0===this.__outputQueue.length||ra(this.__previousChar))return Hf["u"+a];default:return Hf[a]}},a.prototype.__determinePrecedence=function(a){var b,c,d=this.__determineOperator(a),e=d.precedence,f="ltr"===d.associativity,g=this.__operatorStack,h=this.__outputQueue;if(0===g.length)return void g.unshift({val:a,args:d.fn.length-2});do if(c=g[0].val,"."!==c){if(b=Hf[c],u(b)||!(b.precedence0);g.unshift({val:a,args:d.fn.length-2})},a.prototype.__removeFnFromStack=function(a){for(var b,c=this.__outputQueue,d=this.__operatorStack,e=d[0],f=this._isValEqual,g=this._isValUnequal,h=!1;!u(e)&&g(e,"([")&&(this._isStringValidVariable(e.val)||f(e.val,".[]")||qa(e.val));)b=d.shift(),-1!==b.args||f(b,".[]")||(b.args=-2),c.push(b),e=d[0],h=!0;return h||g(c[c.length-a-1],"()")||(h=!0),h},a._inject={_log:Xa},a}();a.Tokenizer=c,Fa.injectable($a,c);var d=function(){function a(){this._tokens=[],this.__cache={},this.__codeArray=[],this.__identifiers=[],this.__tempIdentifiers=[],this.__aliases={}}return a.prototype.parse=function(a){var b=this.__cache[a];if(!u(b))return b;this._tokens=this._tokenizer.createTokens(a),b=this._evaluate(a);var c=b.identifiers;if(0===c.length){var d=b.evaluate(null);b.evaluate=function(){return d}}return this.__cache[a]=b,b},a.prototype.clearCache=function(a){return n(a)?void P(this.__cache,a):void(this.__cache={})},a.prototype._evaluate=function(a){for(var b,c,d,e=this._tokens,f=e.length,g=this.__tempIdentifiers,h=this.__codeArray,i=!1,j=0;f>j;j++)if(b=e[j],c=b.val,d=b.args,qa(c))switch(c){case"()":i=this.__handleFunction(j,d,i);break;case"{}":h.push(this.__convertObject(d)),g.push(".");break;default:0>d?(h.push("[]"),g.push(".")):d>0?(h.push(this.__convertArrayLiteral(d)),g.push(".")):i=this.__indexIntoObject(j,c,i)}else if(ra(c))if(0===d)h.push(this.__convertPrimitive(j,c,d));else switch(c){case"?":this.__handleQuestion();break;case":":this.__handleColon();break;case"+":case"-":1===d&&(c="u"+c);default:this.__handleOperator(c,d)}else h.push(0>d?this.__convertFunction(j,c,i):this.__convertPrimitive(j,c,d));this._popRemainingIdentifiers(),this._makeIdentifiersUnique();var k={evaluate:new Function(Ha,Me,"var initialContext;return "+(0===h.length?'"'+a+'"':h.join(""))+";"),expression:a,identifiers:this.__identifiers.slice(0),aliases:Object.keys(this.__aliases)};return this._resetParser(),k},a.prototype._peek=function(a){return this._tokens[a+1]},a.prototype._lookBack=function(a){return this._tokens[a-1]},a.prototype._popRemainingIdentifiers=function(){for(var a,b=this.__identifiers,c=this.__tempIdentifiers;c.length>0;)a=c.pop(),"."!==a&&b.push(a)},a.prototype._makeIdentifiersUnique=function(){for(var a,b=this.__identifiers,c=[],d={};b.length>0;)a=b.pop(),d[a]||(d[a]=!0,c.push(a));this.__identifiers=c},a.prototype._isValEqual=function(a,b){return u(a)||u(a.val)?u(b):""===a.val?""===b:-1!==b.indexOf(a.val)},a.prototype._isValUnequal=function(a,b){return u(a)||u(a.val)?!u(b):""===a.val?""!==b:-1===b.indexOf(a.val)},a.prototype._resetParser=function(){this._tokens=[],this.__codeArray=[],this.__identifiers=[],this.__tempIdentifiers=[],this.__aliases={}},a.prototype._throwError=function(a){this._log.error(new Error(a))},a.prototype.__convertPrimitive=function(a,b,c){if(c>0)return this.__tempIdentifiers.push("."),b;var d=s(Number(b)),e=this._peek(a),f=!(u(e)||e.args>=1),g=this._isValEqual;return sa(b)||n(b)&&(d||this._isValUnequal(e,"[]()")||g(e,"[]")&&!f)?(this.__tempIdentifiers.push("."),'"'+b+'"'):(this.__tempIdentifiers.push(!d||g(e,".[]")&&f?b:"."),b)},a.prototype.__convertFunction=function(a,b,c){if("@"===b[0])this.__aliases[b.slice(1)]=!0;else if(sa(b))return this.__tempIdentifiers.push("."),b;var d=this._peek(a),e=this._isValEqual;if(this.__tempIdentifiers.push(e(this._tokens[a-1],"()")&&e(d,".[]")?".":b),u(d))return"(initialContext = ("+this.__findInitialContext.toString()+')(context,aliases,"'+b+'"))';switch(d.val){case".":case"()":return b;default:if(!c)return"(initialContext = ("+this.__findInitialContext.toString()+')(context,aliases,"'+b+'"))'}},a.prototype.__convertObject=function(a){for(var b,c,d,e=this.__identifiers,f=this.__tempIdentifiers,g=this.__codeArray,h=0,i="{";h++1&&(c=f.pop(),f.pop(),"."!==c&&e.push(c));return i.replace(",","")+"}"},a.prototype.__convertArrayLiteral=function(a){for(var b,c=this.__identifiers,d=this.__tempIdentifiers,e=this.__codeArray,f=0,g="";f++0&&(b=d.pop(),"."!==b&&c.push(b));return"["+g.slice(0,-1)+"]"},a.prototype.__handleFunction=function(a,b,c){var d,e,f=this.__identifiers,g=this.__tempIdentifiers,h=this.__codeArray,i=0,j=this._lookBack(a),k=!u(j)&&(-2===j.args||this._isValEqual(j,".[]")),l="",m="",n="",o=!1;for(k&&(m=h.pop(),n=g.pop());i++0&&(d=g.pop(),"."!==d&&(f.push(d),o=!0));if(e=b>0?".call(initialContext || context,"+l.slice(0,l.length-1)+")":".call(initialContext || context)",c)if(c=!1,h.length>0){var p=h.pop(),r=g.length-1;0>r||"."===g[r]||""===n?""!==n&&o&&"["!==p[0]&&"]"!==p[p.length-1]&&(f[f.length-1]+="."+n):(g[r]+="."+n,f.push(g.pop())),e=q(m)?p+e:"(("+this.__indexIntoContext.toString()+")("+p+',"'+m+'") || (function () {}))'+e}else this._throwError("Improper expression or context");else k?(e="(initialContext = (("+this.__findInitialContext.toString()+')(context,aliases,"'+m+'") || (function () {}))'+e+")",f.push(m)):e=h.pop()+e;h.push(e);var s=g.length;return this._isValEqual(this._peek(a),"[]")&&s>0&&"."!==g[s-1]&&f.push(g.pop()),c},a.prototype.__indexIntoObject=function(a,b,c){var d=this._isValEqual;if(d(this._peek(a),"()"))return!0;var e,f=this.__codeArray,g=f.pop(),h=this.__identifiers,i=this.__tempIdentifiers,j=this._lookBack(a),k=i.pop(),l=!u(k);return l&&"@"===k[0]?(g="("+this.__indexIntoContext.toString()+")("+f.pop()+","+g+")",h.push(k),i.length>0&&h.push(i.pop())):d(j,"++--()[]*/%?:>=<=&&||!===")?(g="("+this.__indexIntoContext.toString()+")("+f.pop()+","+g+")",i.push(".")):"[]"!==b||u(j)||j.args>=0?(g="("+this.__indexIntoContext.toString()+")("+f.pop()+',"'+g+'")',e=i.length-1,e>=0?"."!==i[e]&&(i[e]+="."+k):l&&"."!==k&&"."!==b&&h.push(k)):(g="("+this.__indexIntoContext.toString()+")("+f.pop()+","+g+")",e=i.length-1,e>=0&&"."!==i[e]&&h.push(i.pop()),h.push(k)),f.push(g),c},a.prototype.__handleQuestion=function(){for(var a,b=this.__identifiers,c=this.__tempIdentifiers,d=this.__codeArray,e=d.pop(),f=0;2>f&&c.length>0;f++)a=c.pop(),"."!==a&&b.push(a);d.push(d.pop()+"?"+e)},a.prototype.__handleColon=function(){for(var a,b=this.__identifiers,c=this.__tempIdentifiers,d=this.__codeArray,e=d.pop(),f=0;2>f&&c.length>0;f++)a=c.pop(),"."!==a&&b.push(a);d.push(d.pop()+":"+e)},a.prototype.__handleOperator=function(a,b){for(var c,d=this.__identifiers,e=this.__tempIdentifiers,f=this.__codeArray,g=0,h="";g++0&&(c=e.pop(),"."!==c&&d.push(c));f.push("("+Hf[a].fn.toString()+")(context, aliases,"+h.slice(0,h.length-1)+")")},a.prototype.__findInitialContext=function(a,b,c){return"@"===c[0]&&null!==b&&"object"==typeof b?b[c.slice(1)]:null!==a&&"object"==typeof a?a[c]:void 0},a.prototype.__indexIntoContext=function(a,b){return null!==a&&"object"==typeof a?a[b]:void 0},a._inject={_tokenizer:$a,_log:Xa},a}();a.Parser=d,Fa.injectable(Ya,d)}(Cf=a.expressions||(a.expressions={}));var Df;!function(a){function b(a){return a.location}function c(){return d.config}a.Location=b,Fa.injectable(Tb,b,[Fb]);var d=function(){function a(){this.uid=M(Ub),this.__lastUrl=this._location.href,this.__initializing=!1,this._EventManager.on(this.uid,xd,this.initialize,this),this._compat.msApp&&(this._stack=[])}return a.prototype.initialize=function(){var b=(a.config,this._compat);this._EventManager.dispose(this.uid),this.__initializing=!0,ma(Eb);var c=this.url(),d=c,e=this._urlChanged.bind(this),f=this._dom,g=this._window;d!==c&&this.url(d,!0),b.pushState&&f.addEventListener(g,Ce,e,!1),f.addEventListener(g,De,e,!1),this.__initializing=!1},a.prototype.url=function(a,b){var c=this._location;return n(a)&&this.__lastUrl!==a&&(!b&&w(this._stack)&&this._stack.push(c.href),this._setUrl(a,b)),this.__currentUrl||c.href},a.prototype.back=function(a){s(a)||(a=1);var b=this._stack;return w(b)&&b.length>1?(this._stack=b=b.slice(0,b.length-(a-1)),this.url(b.pop()),void b.pop()):void this._history.go(-a)},a.prototype.forward=function(a){s(a)||(a=1),this._history.go(a)},a.prototype.urlUtils=function(b){b=b||this.url();var c=ma(Eb),d=a.config;return d.routingType===d.HASH&&(b=b.replace(new RegExp("#"+(d.hashPrefix||"")+"/?"),"")),c.initialize(b),c},a.prototype.isCrossDomain=function(a){if(!n(a))return!1;var b=this.urlUtils(a),c=this.urlUtils();return b.protocol!==c.protocol||b.hostname!==c.hostname||b.port!==c.port},a.prototype._urlChanged=function(){if(!this.__initializing){this.__currentUrl=null;var b=this.url(),c=a.config;if(!(this.__lastUrl===b||c.routingType===c.STATE&&b.indexOf(this.__lastUrl+"#")>-1)){this.__lastUrl=b;var d=this._EventManager;d.dispatch(Bd,this,d.DIRECT,[this.urlUtils()])}}},a.prototype._setUrl=function(b,c){b=this.formatUrl(b);var d=this.urlUtils(b),e=a.config.baseUrl,f=this._history,g=this._location;return-1===d.href.indexOf(e)?void(g.href=b):(this._regex.fullUrlRegex.test(b)||"/"===b[0]||(b=e+b),void(this._compat.pushState?(c?f.replaceState(null,"",b):f.pushState(null,"",b),this.__initializing||this._urlChanged()):(this.__currentUrl=b,c?g.replace(b):g.href=b)))},a.prototype.formatUrl=function(b){var c=a.config,d=(c.baseUrl,!this._regex.fullUrlRegex.test(b)||b.indexOf(c.baseUrl)>-1);if(!n(b))return"";if(b===c.baseUrl)return b;if("/"===b[0]&&(b=b.slice(1)),d&&c.routingType===c.HASH){var e=-1!==b.indexOf(this.urlUtils().protocol),f=c.hashPrefix||"",g=new RegExp("#"+f+"|#/");"/"!==b[b.length-1]&&-1===b.indexOf("?")&&(b+="/"),e&&!g.test(b)?b=b+"#"+f+"/":g.test(b)||(b="#"+f+("/"!==b[0]?"/":"")+b)}return d&&-1===b.indexOf(c.baseUrl)&&(b=c.baseUrl+b),b},a._inject={_EventManager:Ua,_compat:Oa,_regex:Za,_window:Fb,_location:Tb,_history:Sb,_dom:rb},a.config={HASH:"hash",STATE:"state",routingType:"hash",hashPrefix:"!",baseUrl:""},a}();a.Browser=d,Fa.injectable(Ab,d),a.IBrowserConfig=c,Fa.injectable(Bb,c);var e=function(){function a(){var b=this._browserConfig;if(q(b.baseUrl)||!this._regex.fullUrlRegex.test(b.baseUrl)){var c=this._window.location.href,d=c.replace(this._regex.initialUrlRegex,"/"),e=b.baseUrl;for(n(e)?0===e.indexOf("/")&&(e=e.slice(1)):e="",e=a.__getBaseUrl(d)+e;"/"===e[e.length-1];)e=e.slice(0,-1);b.baseUrl=e+"/"}}return a.__getQuery=function(a){return R(a)},a.__getBaseUrl=function(a){var b=ma(Za),c=ma(Tb),d=c.origin,e=c.protocol;c.host;return"file:"===e||e.indexOf("wmapp")>-1||e.indexOf("ms-appx")>-1?d=c.href:v(d)&&(d=c.protocol+"//"+c.host),d=d.replace(b.initialUrlRegex,""),d.split("?")[0].split("#")[0]+"/"},a.prototype.initialize=function(b){b=b||"";var c=a.__urlUtilsElement||(a.__urlUtilsElement=this._document.createElement("a")),d=this._browserConfig;"/"===b[0]&&0!==b.indexOf("//")&&(b=b.slice(1)),this._regex.fullUrlRegex.test(b)||(b=d.baseUrl+b),c.setAttribute("href",b),b=c.href,c.setAttribute("href",b),b=c.href;c.protocol?c.protocol.replace(/:$/,""):"";this.href=b,this.protocol=c.protocol?c.protocol.replace(/:$/,""):"",this.host=c.host,this.search=c.search?c.search.replace(/^\?/,""):"",this.hash=c.hash?c.hash.replace(/^#/,""):"",this.hostname=c.hostname,this.port=c.port;var e;e=q(d.baseUrl)?"/"===c.pathname.charAt(0)?c.pathname:"/"+c.pathname:b.replace(d.baseUrl,"/"),e=e.replace(this._regex.initialUrlRegex,"/"),this.pathname=e.split("?")[0].split("#")[0],this.query=a.__getQuery(this.search)},a.prototype.toString=function(){return this.href},a._inject={_EventManager:Ua,_document:Ra,_window:Fb,_compat:Oa,_regex:Za,_browserConfig:Bb},a}();a.UrlUtils=e,Fa.injectable(Eb,e,null,te)}(Df=a.web||(a.web={}));var Ef;!function(a){function c(){return function(){x.nextTick(g)}}function d(){var a=new r(g),b=ma(Ra),c=ma(Fb),d=b.createElement("div");return a.observe(d,{attributes:!0}),c.addEventListener("unload",function(){a.disconnect(),a=null},!1),function(){d.setAttribute("drainQueue","drainQueue")}}function f(){var a=a,b="undefined"!=typeof a?a:this;return function(){b.setTimeout(g,1)}}function g(){for(var a,b,c,d=0;d-1?"&":"?")+k+"="+j;var l=g[j];g[j]=function(b){t(a.clearTimeout)&&a.clearTimeout(),h.head.removeChild(i),v(l)?P(g,j):g[j]=l,e({response:b,status:200})},h.head.appendChild(i);var m=c.timeout;s(m)&&m>0&&(a.clearTimeout=I(function(){a.clearTimeout=J(function(){f(new B({response:"Request timed out in "+m+"ms for "+d,status:408})),g[j]=b},m-1)}))});return e.initialize(this),e},a.prototype._xhrOnReadyStateChange=function(){var a=this.xhr;if(4===a.readyState){var b=a.status;if(0===b){var c=a.response;if(u(c))try{c=a.responseText}catch(a){}return q(c)?!1:!0}return b>=200&&300>b||304===b?!0:!1}},a.prototype._sendXhrRequest=function(){var a=this,b=this.xhr,c=this.__options,d=c.method,e=c.url,f=new C(function(f,g){b.onreadystatechange=function(){var b=a._xhrOnReadyStateChange();if(!u(b)){var d=a._formatResponse(c.responseType,b);b?f(d):g(new B(d)),a.xhr=c=null}},n(d)||(a._log.info('AjaxOptions method was not of type string. Defaulting to "GET".'),d="GET"),b.open(d.toUpperCase(),e,!0,c.user,c.password);var i=c.responseType;if(a.__fileSupported||""===i||"text"===i||(i=""),"json"===i)try{b.responseType=i}catch(a){b.responseType=""}b.withCredentials=c.withCredentials;var j=c.overrideMimeType,k=c.data;if(n(j)&&!q(j)&&b.overrideMimeType(j),u(k)||""===k)a.__setHeaders(),b.send();else{var l=c.transforms||[],m=l.length,o=c.contentType,p=n(o)&&!q(o);if(m>0){for(var r=0;m>r;++r)k=l[r](k,b);p&&b.setRequestHeader("Content-Type",o),a.__setHeaders(),b.send(k)}else if(h(k))if(p){var t=o.toLowerCase();-1!==t.indexOf("x-www-form-urlencoded")?(k=a.__serializeFormData(),b.setRequestHeader("Content-Type",o),a.__setHeaders(),b.send(k)):-1!==t.indexOf("multipart/form-data")?a.__fileSupported?(k=a.__appendFormData(),a.__setHeaders(),b.send(k)):a.__submitFramedFormData().then(function(a){f(a)},function(){a.xhr=null}):(k=JSON.stringify(k),b.setRequestHeader("Content-Type",o),a.__setHeaders(),b.send(k))}else a.__setHeaders(),b.send(k);else p&&b.setRequestHeader("Content-Type",o),a.__setHeaders(),b.send(k)}var v=c.timeout;s(v)&&v>0&&(a.clearTimeout=I(function(){a.clearTimeout=J(function(){g(new B({response:"Request timed out in "+v+"ms for "+c.url,status:b.status,getAllResponseHeaders:function(){return b.getAllResponseHeaders()},xhr:b})),b.onreadystatechange=null,b.abort(),a.xhr=null},v-1)}))});return f.initialize(this),f},a.prototype._invalidOptions=function(){var a=this;return new C(function(b,c){a._log.warn("Attempting a request without specifying a url"),c(new B({response:"Attempting a request without specifying a url",status:null,getAllResponseHeaders:null,xhr:null}))})},a.prototype._formatResponse=function(a,b){var c=this.xhr,d=c.status,e=c.response;if(u(e))try{e=c.responseText}catch(a){}if(0===d&&(d=b?200:404),c.onreadystatechange=null,t(this.clearTimeout)&&this.clearTimeout(),"json"===a&&n(e))try{e=JSON.parse(e)}catch(a){}return{response:e,status:d,getAllResponseHeaders:function(){return c.getAllResponseHeaders()},xhr:c}},a.prototype.__setHeaders=function(){var a,b,c=this.__options.headers,d=Object.keys(c||{}),e=this.xhr,f=d.length;for(b=0;f>b;++b)a=d[b],e.setRequestHeader(a,c[a])},a.prototype.__serializeFormData=function(){for(var a,b,c=this.__options.data,d=Object.keys(c),e=[];d.length>0;)a=d.pop(),b=c[a],u(b)?b="":h(b)&&(this._log.warn('Invalid form entry with key "'+a+'" and value "'+b),b=JSON.stringify(b)),e.push(encodeURIComponent(a)+"="+encodeURIComponent(b));return e.join("&").replace(/%20/g,"+")},a.prototype.__appendFormData=function(){for(var a,b,c=this.__options.data,d=new FormData,e=Object.keys(c);e.length>0;)a=e.pop(),b=c[a],u(b)?d.append(a,""):h(b)?m(b)?d.append(a,b,b.name||b.fileName||"blob"):(this._log.warn('Invalid form entry with key "'+a+'" and value "'+b),d.append(a,JSON.stringify(b))):d.append(a,b);return d},a.prototype.__submitFramedFormData=function(){var a,b=this,c=this.__options,d=c.data,e=c.url,f=this._document,g=f.body,h=ma(Na),i=f.createElement("form"),j=f.createElement("iframe"),k=M("iframe_target"),l=Object.keys(d);for(j.name=i.target=k,j.src="javascript:false;",i.enctype=i.encoding="multipart/form-data",i.action=e,i.method="POST",i.style.display="none";l.length>0;)a=l.pop(),i.insertBefore(this.__createInput(a,d[a]),null);return new h(function(a,c){b.xhr.abort=function(){j.onload=null,g.removeChild(i),g.removeChild(j),c()},j.onload=function(){var c=j.contentDocument.body.innerHTML;g.removeChild(i),g.removeChild(j),a({response:c,status:200,getAllResponseHeaders:function(){return""}}),b.xhr=j.onload=null},g.insertBefore(i,null),g.insertBefore(j,null),i.submit()})},a.prototype.__createInput=function(a,b){var c=this._document,d=c.createElement("input");if(d.type="hidden",d.name=a,u(b))d.value="";else if(h(b))if(!t(b.slice)||v(b.name)||v(b.path))this._log.info('Invalid form entry with key "'+a+'" and value "'+b),d.value=JSON.stringify(b);else{var e=c.querySelectorAll('input[type="file"][name="'+a+'"]'),f=e.length;if(0===f)this._log.info('Could not find input[type="file"] with [name="'+a+'"]. Stringifying data instead.'),d.value=JSON.stringify(b);else if(1===f){d=e[0];var g=d.cloneNode(!0);d.parentNode.insertBefore(g,d)}else{for(var i,j=b.path;f-->0;)if(i=e[f],i.value===j){d=i;var k=d.cloneNode(!0);d.parentNode.insertBefore(k,d);break}-1===f&&(this._log.info('Could not find input[type="file"] with [name="'+a+'"] and [value="'+b.path+'"]. Stringifying data instead.'),d.value=JSON.stringify(b))}}else d.value=b;return d},a._inject={_browser:Ab,_window:Fb,_document:Ra,_config:Ma,_compat:Oa,_log:Xa},a}();a.HttpRequest=A;var B=function(){function a(a){this.name="AjaxError",Error.apply(this),this.response=this.message=a.response,this.status=a.status,this.getAllResponseHeaders=a.getAllResponseHeaders,this.xhr=a.xhr}return a.prototype.toString=function(){var a=this.response,b=a;return h(a)&&!a.hasOwnProperty("toString")&&(b=JSON.stringify(a)),"Request failed with status: "+this.status+" and response: "+b},a}();a.AjaxError=B,B.prototype=Error.prototype;var C=function(a){function c(b,c){a.call(this,b),this._window=ma(Fb),u(c)||(this.__http=c.__http)}return __extends(c,a),c.prototype.initialize=function(a){h(a)&&u(this.__http)&&(this.__http=a)},c.prototype.cancel=function(){var a=this.__http,c=a.xhr,d=a.jsonpCallback;t(a.clearTimeout)&&a.clearTimeout(),u(c)?u(d)||(this._window[d]=b):(c.onreadystatechange=null,c.abort(),a.xhr=null),this.__subscribers=[]},c.prototype.then=function(b,c){return a.prototype.then.call(this,b,c)},c.prototype.catch=function(b){return a.prototype.catch.call(this,b)},c}(y);a.AjaxPromise=C;var D=function(){function a(){this.responseType={DEFAULT:"",ARRAYBUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},this.contentType={ENCODED_FORM:"application/x-www-form-urlencoded;charset=utf-8",JSON:"application/json;charset=utf-8",MULTIPART_FORM:"multipart/form-data",OCTET_STREAM:"application/octet-stream;charset=utf-8",XML:"application/xml;charset=utf-8",PLAIN_TEXT:"text/plain",HTML:"text/html"}}return a.prototype.ajax=function(a){var b=ma(La);return b.initialize(a),b.execute()},a.prototype.jsonp=function(a){var b=ma(La);return b.initialize(a),b.executeJsonp()},a.prototype.json=function(a){var b=ma(La);return b.initialize(e(!1,!1,{},a,{responseType:"json"})),b.execute()},a.config={url:null,method:"GET",responseType:"",transforms:[],headers:{},withCredentials:!1,timeout:null,jsonpIdentifier:"callback",contentType:"application/json;charset=utf-8"},a}();a.Http=D,Fa.injectable(Ka,D),Fa.injectable(La,A,null,te),a.IHttpConfig=j,Fa.injectable(Ma,j)}(Ef=a.async||(a.async={}));var Ff;!function(a){function b(){return f}function c(){return a.managerCache}var d={},e={},f=function(){function a(a,b){this.__uid=a,this.__options=b,this.__size=0,u(b)&&(this.__options={timeout:0}),e[a]={}}return a.create=function(b,c){var e=d[b];return u(e)&&(e=d[b]=new a(b,c)),e},a.fetch=function(a){return d[a]},a.clear=function(){for(var a=Object.keys(d),b=a.length,c=0;b>c;++c)d[a[c]].clear();d={}},a.prototype.info=function(){return{uid:this.__uid,size:this.__size,options:this.__options}},a.prototype.put=function(a,b){var c=e[this.__uid][a];e[this.__uid][a]=b,v(c)&&this.__size++;var d=this.__options.timeout;return s(d)&&d>0&&J(this.remove,d,[a],this),b},a.prototype.read=function(a){return e[this.__uid][a]},a.prototype.remove=function(a){P(e[this.__uid],a),this.__size--},a.prototype.clear=function(){e[this.__uid]={},this.__size=0},a.prototype.dispose=function(){this.clear(),P(d,this.__uid)},a}();a.Cache=f,a.ICacheFactory=b,Fa.injectable(kb,b,null,ue),a.managerCache=f.create("__managerCache"),a.IManagerCache=c,Fa.injectable(lb,c);var g=function(a){function b(){a.call(this,"__templateCache")}return __extends(b,a),b.prototype.put=function(b,c){var d=this._Promise;if(a.prototype.put.call(this,b,d.resolve(c)),l(c))c=c.cloneNode(!0);else if(k(c)){var e=document.createDocumentFragment();e.appendChild(c.cloneNode(!0)),c=e}else(n(c)||u(c))&&(c=ba(c));return d.resolve(c)},b.prototype.read=function(b){var c=this,d=a.prototype.read.call(this,b);return u(d)?this._Promise.reject(null):d.then(function(a){return c.put(b,a)},function(a){return c._log.warn("Error retrieving template, "+b+", from promise."),null})},b._inject={_Promise:Na,_log:Xa},b}(f);a.TemplateCache=g,Fa.injectable(mb,g);var h=function(){function a(a){var b=this;this._storage=a,B(function(a,c){b[c]=a},a)}return Object.defineProperty(a.prototype,"length",{get:function(){return this._storage.length},enumerable:!0,configurable:!0}),a.prototype.clear=function(){this._storage.clear()},a.prototype.getItem=function(a){return this._storage.getItem(a)},a.prototype.key=function(a){return this._storage.key(a)},a.prototype.removeItem=function(a){this._storage.removeItem(a)},a.prototype.setItem=function(a,b){this._storage.setItem(a,b),this[a]=this.getItem(a)},a}();a.BaseStorage=h;var i=function(a){function b(){a.call(this,plat.acquire(Fb).localStorage)}return __extends(b,a),b}(h);a.LocalStorage=i,Fa.injectable(Gb,i);var j=function(a){function b(){a.call(this,plat.acquire(Fb).sessionStorage)}return __extends(b,a),b}(h);a.SessionStorage=j,Fa.injectable(Hb,j)}(Ff=a.storage||(a.storage={}));var Gf,Hf={"u+":{precedence:4,associativity:"rtl",fn:function(a,b,c){return+c(a,b)}},"+":{precedence:6,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)+d(a,b)}},"u-":{precedence:4,associativity:"rtl",fn:function(a,b,c){return-c(a,b)}},"-":{precedence:6,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)-d(a,b)}},"*":{precedence:5,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)*d(a,b)}},"/":{precedence:5,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)/d(a,b)}},"%":{precedence:5,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)%d(a,b)}},"?":{precedence:15,associativity:"rtl",fn:function(){return void 0}},":":{precedence:15,associativity:"rtl",fn:function(){return void 0}},">":{precedence:8,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>d(a,b)}},"<":{precedence:8,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>":{precedence:7,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>>d(a,b)}},"<<":{precedence:7,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)<>>":{precedence:7,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>>>d(a,b)}},"&&":{precedence:13,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)&&d(a,b); -}},"||":{precedence:14,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)||d(a,b)}},"==":{precedence:9,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)==d(a,b)}},"===":{precedence:9,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)===d(a,b)}},"!=":{precedence:9,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)!=d(a,b)}},"!==":{precedence:9,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)!==d(a,b)}},">=":{precedence:8,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>=d(a,b)}},"<=":{precedence:8,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)<=d(a,b)}},"=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"++":{precedence:3,associativity:"",fn:function(a,b,c){var d=plat.acquire(Xa);d.error(new Error("Assignment operators are not supported"))}},"--":{precedence:3,associativity:"",fn:function(a,b,c){var d=plat.acquire(Xa);d.error(new Error("Assignment operators are not supported"))}},"+=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"-=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"*=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"/=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"%=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}}},If={"()":{precedence:2,associativity:null,fn:null},"[]":{precedence:2,associativity:null,fn:null},".":{precedence:2,associativity:null,fn:null},"{}":{precedence:1,associativity:null,fn:null}},Jf={"{":{precedence:1,associativity:null,fn:null},"}":{precedence:1,associativity:null,fn:null},"[":{precedence:2,associativity:null,fn:null},"]":{precedence:2,associativity:null,fn:null},"(":{precedence:2,associativity:null,fn:null},")":{precedence:2,associativity:null,fn:null},".":{precedence:2,associativity:null,fn:null},",":{precedence:18,associativity:null,fn:null},"'":{precedence:0,associativity:null,fn:null},'"':{precedence:0,associativity:null,fn:null}},Kf={false:!1,true:!0,null:null,undefined:"undefined"};!function(a){function f(a){return i._log=a,i}var g=["push","pop","reverse","shift","sort","splice","unshift"],i=function(){function a(){this._compat=ma(Oa),this.__identifiers={},this.__identifierHash={},this.__lengthListeners={},this.__contextObjects={},this.__isArrayFunction=!1}return a.getManager=function(b){var c,d=a.__managers,e=b.uid,f=d[e];return u(f)?(c=d[e]=new a,c.context=b,c):c=f},a.dispose=function(b){if(!u(b)){var c=b.uid,d=a.__controls,e=d[c]||{},f=a.__managers,g=f[c];u(g)||(g.dispose(),P(f,c));for(var h,i=Object.keys(e);i.length>0;)for(h=e[i.shift()];h.length>0;)h.shift()();P(d,c),u(b.context)||(a.unObserve(b.context),a.defineProperty(b,Ha,b.context,!0,!0,!0))}},a.removeArrayListeners=function(b,c){var d=a.arrayChangeListeners[b];u(d)||P(d,c)},a.getContext=function(a,b){if(u(a))return a;for(b=b.slice(0);b.length>0;)if(a=a[b.shift()],u(a))return a;return a},a.defineProperty=function(a,b,d,e,f,g){c(a,b,d,e,f,g)},a.defineGetter=function(a,b,c,e,f){d(a,b,c,e,f)},a.pushRemoveListener=function(b,c,d){var e,f=a.__controls,g=f[c];u(g)&&(g=f[c]={}),e=g[b],u(e)&&(e=g[b]=[]),e.push(d)},a.spliceRemoveListener=function(b,c,d){var e,f=a.__controls,g=f[c];if(!u(g)&&(e=g[b],!u(e))){var h=e.indexOf(d);-1!==h&&(e.splice(h,1),0===e.length&&P(g,b))}},a.removeIdentifier=function(b,c){for(var d,e=b.length,f=a.__controls,g=0;e>g;++g)d=f[b[g]],u(d)||P(d,c)},a.createContext=function(b,c){var d=b.context;if(!h(d)){if(!u(d))return void a._log.warn("A child control is trying to create a child context that has a parent control with a primitive type context");d=b.context={}}for(var e,f,g=c.split(".");g.length>0;)e=g.shift(),f=d[e],u(f)&&(f=s(Number(g[0]))?d[e]=[]:d[e]={}),d=f;return d},a.unObserve=function(a){e(!0,!0,a)},a.prototype.getContext=function(a,b){return this._getContext(a.join("."),a,b)},a.prototype.observe=function(c,d){var e=this;if(q(c))return b;var f,g,i=c.split("."),j=i.pop(),k="length"===j,l=this._hasIdentifier(c),m=!u(d);if(i.length>0?(f=i.join("."),g=this._getContext(f,i,!0)):(f=j,g=this.context),!h(g))return m?(k&&(this.__lengthListeners[c]=d,a.pushRemoveListener(c,d.uid,function(){P(e.__lengthListeners,c)})),this._addObservableListener(c,d,k)):b;this.__observedIdentifier=null,this.__contextObjects[c]=g[j];var o=this.__observedIdentifier,p=!u(o),r=b;if(p&&(l=!0),m){var s=b,t=this._addObservableListener(c,d,k);p&&c!==o&&(s=this._addObservableListener(o,d,k)),r=function(){t(),s()}}var v=w(g),x=r,y=b,z=b,A=Number(j);if(v&&A>=g.length)y=this.observe(f+".length",{uid:d.uid,listener:function(a,b){A>=a||(y(),e._define(c,g,j))}}),r=function(){x(),y()};else if(!l)if(v&&k){var B=i.pop(),C=this.getContext(i,!1);if(this.__observedIdentifier=null,Q(C,B),n(this.__observedIdentifier)&&(f=this.__observedIdentifier),m){var D=d.uid;y=this.observeArrayMutation(D,b,f,g,null),z=this.observe(f,{uid:D,listener:function(a,c){y(),y=e.observeArrayMutation(D,b,f,a,c)}})}r=function(){x(),z(),y()}}else this._define(c,g,j);return r},a.prototype.observeArrayMutation=function(a,c,d,e,f){var h=(g.length,this._compat);h.proto,h.setProto;if(w(f)&&this._restoreArray(f),u(e))return b;var i=d.split("."),j=i.pop(),k=this.getContext(i,!1);this.__observedIdentifier=null,Q(k,j),n(this.__observedIdentifier)&&(d=this.__observedIdentifier);var l=[];return t(c)&&l.push(this._pushArrayListener(a,d,c)),this._overwriteArray(d,e),function(){for(;l.length>0;)l.pop()()}},a.prototype.dispose=function(){this.context=null,this.__identifiers={},this.__identifierHash={},this.__contextObjects={}},a.prototype._pushArrayListener=function(b,c,d){var e=a.arrayChangeListeners,f=e[c];u(f)&&(f=e[c]={});var g=f[b];u(g)&&(g=f[b]=[]);var h=!1,i=function(){if(!h){h=!0,a.spliceRemoveListener(c,b,i);var j=g.indexOf(d);-1!==j&&(g.splice(j,1),0===g.length&&(P(f,b),q(f)&&P(e,c)))}};return g.push(d),a.pushRemoveListener(c,b,i),i},a.prototype._restoreArray=function(a){var b=this._compat;if(b.setProto)Object.setPrototypeOf(a,Object.create(Array.prototype));else if(b.proto)a.__proto__=Object.create(Array.prototype);else for(var c,d=g.length,e=0;d>e;++e)c=g[e],a[c]=Array.prototype[c]},a.prototype._overwriteArray=function(b,c){var d,e,f=this._compat,h=g.length;if(f.proto){var i=Object.create(Array.prototype);for(e=0;h>e;++e)d=g[e],i[d]=this._overwriteArrayFunction(b,d);return void(f.setProto?Object.setPrototypeOf(c,i):c.__proto__=i)}for(e=0;h>e;++e)d=g[e],a.defineProperty(c,d,this._overwriteArrayFunction(b,d),!1,!0,!0)},a.prototype._getContext=function(a,b,c){var d=this.__contextObjects[a];return u(d)&&(d=c===!0?this.__contextObjects[a]=this._observeImmediateContext(b,a):this._getImmediateContext(b)),d},a.prototype._getImmediateContext=function(a){for(var b=this.context;a.length>0&&(b=b[a.shift()],!u(b)););return b},a.prototype._observeImmediateContext=function(a,b){return u(this.__identifiers[b])&&this.observe(b,null),this._getImmediateContext(a)},a.prototype._getValues=function(a,b,c){for(var d,e=!0,f=!0;a.length>1;)if(d=a.shift(),e&&(b=b[d],u(b)&&(e=!1)),f&&(c=c[d],u(c)&&(f=!1)),!e&&!f)return null;d=a[0];var g,h;return u(b)||(g=b[d]),u(c)||(h=c[d]),{newValue:g,oldValue:h}},a.prototype._notifyChildProperties=function(a,c,d,e){var f=this;e=e||Object.keys(this.__identifierHash[a]||{});for(var g,i,j,k,l,m,o,p,r,s,t,v=e.length,x={},y=".",z="length",A=a.length+1,B=0;v>B;++B){if(g=e[B],i=g.slice(A),k=i.split(y),m=k.pop(),o=m===z,j=k.join(y),q(j)){if(p=c,r=d,s=u(p)?void 0:p[m],t=u(r)?void 0:r[m],o&&!w(r)&&w(p)){var C=this.__lengthListeners[g];if(!u(C)){var D=C.uid,E=a.split(y),F=E.pop(),G=E.join(y),H=this._getContext(G,E,!1);this.__observedIdentifier=null,Q(H,F),n(this.__observedIdentifier)&&(G=this.__observedIdentifier);var I=this.observeArrayMutation(D,b,G,p,null);this.observe(G,{uid:D,listener:function(a,c){I(),I=f.observeArrayMutation(D,b,G,a,c)}}),P(this.__lengthListeners,g)}}}else{if(l=x[j],u(l)&&(l=x[j]=this._getValues(k,c,d),u(l))){this._execute(g,null,null);continue}p=l.newValue,r=l.oldValue,s=u(p)?void 0:p[m],t=u(r)?void 0:r[m]}x[i]={newValue:s,oldValue:t},h(p)&&(!w(p)||p.length>m)&&this._define(g,p,m),this._execute(g,s,t)}x=null},a.prototype._addObservableListener=function(b,c,d){var e=this;if(d===!0){var f=b.split(".");f.pop();var g=f.pop(),i=this.getContext(f,!1);h(i)&&(this.__observedIdentifier=null,Q(i,g),n(this.__observedIdentifier)&&(b=this.__observedIdentifier+(d===!0?".length":"")))}this.__add(b,c);var j=c.uid,k=function(){a.spliceRemoveListener(b,j,k),e._removeCallback(b,c)};return a.pushRemoveListener(b,j,k),k},a.prototype._define=function(a,b,c){h(b[c])?this.__defineObject(a,b,c):this.__definePrimitive(a,b,c)},a.prototype._overwriteArrayFunction=function(b,c){var d=a.arrayChangeListeners[b]||{},e=this;return function(){for(var f=[],g=0;g0?[h]:[]):p?(j=f.length,m=[]):(j=f.length-2,k=f[0],m=h)):(h=Array.prototype[c].apply(this,f),l=this.length,t?i=o:"push"===c?(j=f.length,k=n,m=[]):"pop"===c&&(j=0,k=l,m=n>0?[h]:[])),(q||r||"pop"===c)&&a.unObserve(h);var u,v,w,x,y=Object.keys(d),z=y.length;for(w=0;z>w;++w)for(u=d[y[w]],v=u.length,x=0;v>x;++x)u[x]([{object:this,type:c,index:k,removed:m,addedCount:j,oldArray:i}]);return s?e._notifyChildProperties(b,this,o):l!==n&&e._execute(b+".length",l,n),h}},a.prototype._removeCallback=function(a,b){var c=this.__identifiers[a];if(!u(c)){var d=c.indexOf(b);-1!==d&&(c.splice(d,1),0===c.length&&P(this.__contextObjects,a))}},a.prototype._hasIdentifier=function(a){return!q(this.__identifiers[a])},a.prototype._execute=function(a,b,c){var d=this.__identifiers[a];if(v(b)?P(this.__contextObjects,a):this.__contextObjects[a]=b,!u(d))for(var e=d.slice(0),f=e.length,g=0;f>g;++g)e[g].listener(b,c)},a.prototype.__defineObject=function(b,c,d){var e=this,f=c[d];Object.defineProperty(c,d,{configurable:!0,enumerable:!0,get:function(){return e.__observedIdentifier=b,f},set:function(g){if(f!==g){var i=f;if(f=g,!e.__isArrayFunction){a.unObserve(i);var j,k=e.__identifierHash[b],l=!1;h(k)&&(j=Object.keys(k),l=j.length>0),e._execute(b,f,i),l?(e._notifyChildProperties(b,f,i,j),h(f)||e.__definePrimitive(b,c,d)):q(e.__identifiers[b])?a.defineProperty(c,d,f,!0,!0,!0):h(f)||e.__definePrimitive(b,c,d)}}}})},a.prototype.__definePrimitive=function(b,c,d){var e=this,f=c[d],g=!u(f);w(c)&&"length"===d||Object.defineProperty(c,d,{configurable:!0,enumerable:!0,get:function(){return e.__observedIdentifier=b,f},set:function(i){if(f!==i){var j=f;if(f=i,!e.__isArrayFunction||!w(c)){var k,l=e.__identifierHash[b],m=!1;h(l)&&(k=Object.keys(l),m=k.length>0),e._execute(b,i,j),!m&&q(e.__identifiers[b])?a.defineProperty(c,d,f,!0,!0,!0):h(f)?(e.__defineObject(b,c,d),m&&e._notifyChildProperties(b,i,j,k)):g||(e.__definePrimitive(b,c,d),g=!0)}}}})},a.prototype.__add=function(a,b){var c=this.__identifiers[a],d=b.priority,e=!1;if(u(c)&&(c=this.__identifiers[a]=[]),s(d)){for(var f=c.length,g=0;f>g;++g)if(d>c[g].priority){c.splice(g,0,b),e=!0;break}}else b.priority=-1;e||c.push(b),this.__addHashValues(a)},a.prototype.__addHashValues=function(a){var b=this.__identifierHash;if(!h(b[a])){b[a]={};for(var c,d,e=".",f=a;-1!==(c=f.lastIndexOf(e));)f=f.slice(0,c),d=b[f],u(d)?(d=b[f]={},f!==a&&(d[a]=!0)):f===a||d[a]||(d[a]=!0)}},a.arrayChangeListeners={},a.__managers={},a.__controls={},a}();a.ContextManager=i,a.IContextManagerStatic=f,Fa.injectable(ab,f,[Xa],re),Fa.injectable(bb,i,null,te)}(Gf=a.observable||(a.observable={}));var Lf;!function(a){function b(){return f}function c(a,b,c,d,e){return g._log=a,g._compat=b,g._document=c,g._window=d,g._dom=e,g}function d(a){return h._EventManager=a,h}var e=function(){function a(){this.defaultPrevented=!1,this.stopped=!1}return a.prototype.initialize=function(a,b,c){this.name=a,this.direction=c||this._EventManager.UP,this.sender=b},a.prototype.preventDefault=function(){this.defaultPrevented||this._ContextManager.defineGetter(this,"defaultPrevented",!0)},a.prototype.stopPropagation=function(){this.direction===this._EventManager.UP&&(this.stopped=!0,this._EventManager.propagatingEvents[this.name]=!1)},a._inject={_EventManager:Ua,_ContextManager:ab},a}();a.DispatchEvent=e,Fa.injectable(Sa,e,null,te);var f=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.dispatch=function(a,b){var c=ma(Wa);return c.initialize(a,b),g.sendEvent(c),c},b.prototype.initialize=function(b,c){a.prototype.initialize.call(this,b,c,this._EventManager.DIRECT)},b}(e);a.LifecycleEvent=f,a.ILifecycleEventStatic=b,Fa.injectable(Va,b,null,re),Fa.injectable(Wa,f,null,te);var g=function(){function a(){}return a.initialize=function(){if(!a.__initialized){a.__initialized=!0;for(var b,c=a.__lifecycleEventListeners,d=c.length,e=a._compat,g=a._document,h=a._window,i=a._dom,j=f.dispatch;c.length>0;)b=c.pop(),g.removeEventListener(b.name,b.value,!1);if(e.cordova){var k,l=[rd,sd,td],m=e.winJs;d=l.length;for(var n=0;nh&&a.propagatingEvents[g];++h)d=a.__eventsListeners[e[h]],u(d)||u(d.listeners[g])||a.__callListeners(d.context,b,d.listeners[g],c)},a.__executeEvent=function(b,c,d){var e=a.__eventsListeners[b];if(!u(e)){var f=e.context,g=e.listeners[c.name];u(g)||a.__callListeners(f,c,g,d)}},a.__callListeners=function(b,c,d,e){var f=c.name,g=d.length,h=-1;for(e=[c].concat(e);++h0;)e[f]();P(c,d)}}},a.getInstance=function(){return new a},a.__addRemoveListener=function(b,c){var d=a.__eventListeners;return w(d[b])?void d[b].push(c):void(d[b]=[c])},a.__spliceRemoveListener=function(b,c){var d=a.__eventListeners,e=d[b];if(w(e)){var f=e.indexOf(c);if(-1===f)return;e.splice(f,1)}},a.__getControls=function(b,c,d){var e,f=[],g=a.getRootControl(b);u(g)||g[c]!==d||f.push(g);var h=g.controls;if(u(h))return f;for(var i=[].concat(h);i.length>0;)e=i.shift(),e[c]===d&&f.push(e),u(e.controls)||(i=i.concat(e.controls));return f},a.prototype.initialize=function(){},a.prototype.loaded=function(){},a.prototype.getControlsByName=function(b){return a.__getControls(this,"name",b)},a.prototype.getControlsByType=function(b){return n(b)?a.__getControls(this,"type",b):a.__getControls(this,"constructor",b)},a.prototype.addEventListener=function(c,d,e,f){if(!t(e))return this._log.warn('"Control.addEventListener" must take a function as the third argument.'),b;e=e.bind(this);var g=this.dom.addEventListener(c,d,e,f),h=this.uid;return a.__addRemoveListener(h,g),function(){g(),a.__spliceRemoveListener(h,g)}},a.prototype.observe=function(c,d){var e=this,f=h(this.context)?this:this.parent,g=a.getRootControl(f);if(u(f))return b;var i;if(q(d))i=f.absoluteContextPath;else if(n(d)){var j=(a._parser||ma(Ya)).parse(d),k=j.identifiers[0],l=k.split("."),m=l.shift().slice(1),o=l.length>0?"."+l.join("."):"";i=m===Te?Ha+o:m===Ve?f.absoluteContextPath+o:f.absoluteContextPath+"."+k}else i=f.absoluteContextPath+"."+d;var p=a._ContextManager||ma(ab),r=p.getManager(g);return r.observe(i,{listener:function(a,b){c.call(e,a,b,d)},uid:this.uid})},a.prototype.observeArray=function(c,d){var e=h(this.context)?this:this.parent,f=e.context;if(u(e)||!h(f))return b;var g,i;if(q(d))g=f,i=e.absoluteContextPath;else if(n(d)){var j=(a._parser||ma(Ya)).parse(d);g=j.evaluate(f),i=e.absoluteContextPath+"."+j.identifiers[0]}else g=f[d],i=e.absoluteContextPath+"."+d;if(!w(g))return b;var k=t(c);if(!k)return b;c=c.bind(this);var l=a._ContextManager||ma(ab),m=l.getManager(a.getRootControl(e)),o=this.uid,p=function(a){c(a,d)},r=m.observeArrayMutation(o,p,i,g,null),s=m.observe(i,{listener:function(a,b){r(),r=m.observeArrayMutation(o,p,i,a,b)},uid:o});return function(){r(),s()}},a.prototype.observeExpression=function(c,d){var e=this;if(q(d))return b;if(n(d))d=(a._parser||ma(Ya)).parse(d);else if(!t(d.evaluate))return b;var f=u(this.resources)?this.parent:this;if(u(f)||!n(f.absoluteContextPath))return b;var g,h,i,j,k=d.aliases,l=k.length,m={},o=a._ContextManager||ma(ab),p=o.getManager,r=Of.TemplateControl,s=r.findResource,v=r.evaluateExpression;for(j=0;l>j;++j)g=k[j],h=s(f,g),u(h)||(i=h.resource.type,(i===Ne||i===Re)&&(m[g]=p(h.control)));var w,x,y=d.identifiers,z=p(a.getRootControl(f)),A=[],B=f.absoluteContextPath,C=B+".",D={};for(l=y.length,j=0;l>j;++j)w=y[j],A=w.split("."),x=A[0],"@"!==w[0]?D[C+w]=z:(g=x.slice(1),g===Ve?D[B+w.replace(x,"")]=z:g===Te?D[w.replace(x,"context")]=z:(w=w.replace(x,"resources."+g+".value"),u(m[g])||(D[w]=m[g])));y=Object.keys(D),l=y.length;var E=v(d,f),F=[],G=this.uid;for(j=0;l>j;++j)w=y[j],F.push(D[w].observe(w,{uid:G,listener:function(){var a=v(d,f);c.call(e,a,E,d.expression),E=a}}));return function(){for(var a=F.length,b=0;a>b;++b)F[b]()}},a.prototype.evaluateExpression=function(a,b){return Of.TemplateControl.evaluateExpression(a,this.parent,b)},a.prototype.findProperty=function(b){for(var c,d=this,e=(a._parser||ma(Ya)).parse(b);!u(d);){if(c=e.evaluate(d),!u(c))return{expresssion:e,control:d,value:c};d=d.parent}},a.prototype.dispatchEvent=function(b,c){for(var d=[],e=2;e0&&(d=b.getResources(c,a.aliases,d),q(d))))return a.evaluate(c.context,d)},b.getResources=function(a,c,d){if(u(a))return{};var e,f,g,h=c.length,i=b.__resourceCache[a.uid];u(i)&&(i=b.__resourceCache[a.uid]={}),d=d||{};for(var j=0;h>j;++j)if(e=c[j],"@"===e[0]&&(e=e.slice(1)),e!==Ve)if(e!==Te){if(u(d[e])){if(u(i[e]))g=b.findResource(a,e);else{var k=i[e].control,l=k.resources;g=u(l)?b.findResource(a,e):{control:k,resource:l[e]}}u(g)?b._log.warn("Resource alias: "+e+" is not defined."):(i[e]=g,f=g.resource,d[e]=u(f)?f:f.value)}}else d[e]=Mf.getRootControl(a).context;else d[e]=a.context;return d},b.findResource=function(a,b){var c;if(!u(a)&&!u(a.resources)&&n(b)&&!q(b)){"@"===b[0]&&(b=b.slice(1));var d=b===Te;if(d||b===Ve||b===Ue){if(d&&(a=Mf.getRootControl(a)),c=(a.resources||{})[b],u(c))return;return{resource:c,control:a}}for(;!u(a);){if(c=(a.resources||{})[b],!u(c))return{resource:c,control:a};a=a.parent}}},b.dispose=function(a){if(!u(a)){var c=a.uid,d=a.controls,e=d&&d.slice(0),f=Mf._ContextManager,g=f.defineProperty;if(!u(e))for(var h=e.length-1,i=h;i>=0;--i)Mf.dispose(e[i]);if(t(a.dispose)&&a.dispose(),Mf.removeEventListeners(a),b.removeElement(a),b._ResourcesFactory.dispose(a),b._BindableTemplatesFactory.dispose(a),P(b.__resourceCache,a.uid),f.dispose(a),Lf.EventManager.dispose(a.uid),b._managerCache.remove(c),Mf.removeParent(a),g(a,Ke,null,!0,!0,!0),a.attributes=null,a.bindableTemplates=null,a.controls=[],a.root=null,a.innerTemplate=null,a.__injectable__type===re){var j=qf[a.type];Fa.control(a.type,a.constructor,j.dependencies,!0)}}},b.loadControl=function(a){for(var c,d=a.controls,e=d.length,f=0;e>f;++f)c=d[f],u(c.controls)?c.loaded():b.loadControl(c);a.loaded()},b.contextChanged=function(a,c,d){a.context=c,b.setContextResources(a),t(a.contextChanged)&&a.contextChanged(c,d)},b.setContextResources=function(a){var c=a.context;return u(a.resources)&&(a.resources=b._ResourcesFactory.getInstance(),a.resources.initialize(a)),a.hasOwnContext&&(u(a.resources.rootContext)?a.resources.add({root:{type:Ne,value:c}}):a.resources.rootContext.value=c),u(a.resources.context)?void a.resources.add({context:{type:Ne,value:c}}):void(a.resources.context.value=c)},b.removeElement=function(a){if(!u(a)){var b,c=a.element;return null===a.replaceWith||""===a.replaceWith||l(c)?(da(a.startNode,a.endNode),void(a.elementNodes=a.startNode=a.endNode=null)):void(u(c)||(b=c.parentNode,u(b)||b.removeChild(c),a.element=null))}},b.setAbsoluteContextPath=function(a,b){Mf._ContextManager.defineGetter(a,"absoluteContextPath",b,!1,!0)},b.determineTemplate=function(a,c){var d=b._templateCache,e=a.dom,f=b._Promise;if(u(c)){if(u(a.templateUrl)){if(u(a.templateString))return f.reject(null);var g=a.type;return d.read(g).catch(function(b){return u(b)&&(b=a.templateString),d.put(g,b)})}c=a.templateUrl}else;return e.getTemplate(c)},b.detach=function(a){if(!u(a)&&!u(a.controls)){for(var c=a.controls.slice(0),d=c.length,e=0;d>e;++e)Mf.dispose(c[e]);Mf.removeEventListeners(a),b.removeElement(a),b._ResourcesFactory.dispose(a,!0),P(b.__resourceCache,a.uid),Mf._ContextManager.dispose(a),Lf.EventManager.dispose(a.uid),b._managerCache.remove(a.uid),Mf.removeParent(a),a.controls=[],a.attributes=null}},b.getInstance=function(){return new b},b.prototype.contextChanged=function(a,b){},b.prototype.setTemplate=function(){},b.prototype.getResources=function(a,c){return b.getResources(this,a,c)},b.prototype.findResource=function(a){return b.findResource(this,a)},b.prototype.evaluateExpression=function(a,c){return b.evaluateExpression(a,this,c)},b.__resourceCache={},b}(Mf);a.TemplateControl=o,a.ITemplateControlFactory=c,Fa.injectable(xb,c,[vb,qb,lb,mb,Ya,Ka,Na,Xa],ue),Fa.injectable(yb,o,null,te);var r=function(a){function b(){a.apply(this,arguments),this.priority=120,this._listeners=[]}return __extends(b,a),b.prototype.onInput=function(a){var b=this._listeners;return b.push(a),function(){var c=b.indexOf(a);-1!==c&&b.splice(c,1)}},b.prototype.observeProperties=function(a){},b.prototype.inputChanged=function(a,b){if(a!==b)for(var c=this._listeners,d=c.length,e=0;d>e;++e)c[e](a,b)},b.prototype.dispose=function(){this._listeners=[]},b}(o);a.BindControl=r;var y=function(a){function b(){a.apply(this,arguments),this.hasOwnContext=!0}return __extends(b,a),b.dispose=function(a){o.dispose(a)},b.getInstance=function(){return new b},b.prototype.canNavigateFrom=function(){},b.prototype.canNavigateTo=function(a,b){},b.prototype.navigatingFrom=function(){},b.prototype.navigatedTo=function(a,b){},b}(o);a.ViewControl=y;var z=function(){function a(){this._domEvents=ma(sb)}return a.prototype.addEventListener=function(a,b,c,d){return this._domEvents.addEventListener(a,b,c,d)},a.prototype.appendChildren=function(a,b){return U(a,b)},a.prototype.cloneChildren=function(a,b){return U(a,b,!0)},a.prototype.clearNode=function(a){return V(a)},a.prototype.clearNodeBlock=function(a,b){return W(a,b)},a.prototype.setInnerHtml=function(a,b){return Z(a,b)},a.prototype.insertBefore=function(a,b,c){return $(a,b,c)},a.prototype.replace=function(a){return _(a)},a.prototype.replaceWith=function(a,b){return aa(a,b)},a.prototype.serializeHtml=function(a){return ba(a)},a.prototype.removeBetween=function(a,b){return ca(a,b)},a.prototype.removeAll=function(a,b){return da(a,b)},a.prototype.addClass=function(a,b){return ga(a,b)},a.prototype.removeClass=function(a,b){return ha(a,b)},a.prototype.toggleClass=function(a,b){return ia(a,b)},a.prototype.replaceClass=function(a,b,c){return ja(a,b,c)},a.prototype.hasClass=function(a,b){return ka(a,b)},a.prototype.getTemplate=function(a){return la(a)},a._inject={_domEvents:sb},a}();a.Dom=z,Fa.injectable(rb,z);var A=function(){function a(){this._ResourcesFactory=ma(vb),this._ControlFactory=ma(Pa),this._TemplateControlFactory=ma(xb),this._ContextManager=ma(ab),this._Promise=ma(Na),this._managerCache=ma(lb),this._document=ma(Ra),this._ElementManagerFactory=ma(fb),this._BindableTemplatesFactory=ma(qb),this._log=ma(Xa),this.templates={},this.cache={},this.__compiledControls=[]}return a.create=function(b,c){var d=new a;return d.control=b,u(c)||(d.templates=c.templates,d.cache=c.cache),d},a.dispose=function(a){if(!u(a)){var b=a.bindableTemplates;!u(b)&&t(b.dispose)&&b.dispose()}},a.isBoundControl=function(a){if(u(a))return!1;var b=a.parent;return u(b)?!1:0===a.type.indexOf(b.type+ye)},a.prototype.bind=function(a,b,c){return this._bind(a,b,c)},a.prototype.add=function(a,b){if(!u(b)){if(n(b))return void this._compile(a,ba(b));if(l(b))return void this._compile(a,b);var c=this._document.createDocumentFragment();if(k(b))c.appendChild(b);else{if(!x(b))return;U(b,c)}this._compile(a,c)}},a.prototype.replace=function(b,c,d,e){var f=this.control.controls[b];if(!a.isBoundControl(f))return this._log.warn("The child control at the specified index: "+b+" is not a bound control and thus cannot be replaced by BindableTemplates."),this._Promise.resolve([]);var g=f.endNode;return k(g)&&k(g.parentNode)?this._bind(c,d,e,b):(this._log.warn("The child control at the specified index: "+b+" had either no placeholding comment nodes or its comment nodes had no parent and thus cannot be replaced by BindableTemplates."),this._Promise.resolve([]))},a.prototype.dispose=function(){for(var a=this._TemplateControlFactory.dispose,b=this.__compiledControls,c=b.length,d=0;c>d;++d)a(b[d]);this.__compiledControls=[],this.control=null,this.cache={},this.templates={}},a.prototype._bind=function(a,b,c,d){var e=this,f=this.templates[a],g=u(d);return u(f)?void this._log.error(new Error("Cannot bind template, no template stored with key: "+a)):u(b)||s(b)||n(b)?(f=f.then(function(d){var f=d.cloneNode(!0),h=e._createBoundControl(a,f,b,c),i=e._createNodeMap(h,f,b);return g&&e.control.controls.push(h),e._bindTemplate(a,i)}),g?f.then(null,function(a){return I(function(){n(a)&&(a=new Error(a)),e._log.error(a)}),e._document.createDocumentFragment()}):f.then(function(a){var b=Array.prototype.slice.call(a.childNodes),c=e.control.controls[d],f=c.endNode,g=f.parentNode,h=f.nextSibling;return e._TemplateControlFactory.dispose(c),g.insertBefore(a,h),b}).then(null,function(a){return I(function(){n(a)&&(a=new Error(a)),e._log.error(a)}),e._document.createDocumentFragment()})):void this._log.warn("Cannot bind template with relativeIdentifier: "+b+". Identifier must be either a string or number")},a.prototype._bindTemplate=function(a,c){var d=this,e=c.uiControlNode.control,f=!1,g=t(e.dispose)?e.dispose.bind(e):b;return e.dispose=function(){f=!0,g(),e.dispose=g},this._bindNodeMap(a,c).then(function(){var a=d._document,b=c.element;return f?a.createDocumentFragment():(e.startNode=b.insertBefore(a.createComment(e.type+Ae),b.firstChild),e.endNode=b.insertBefore(a.createComment(e.type+Be),null),b)},function(a){return I(function(){n(a)&&(a=new Error(a)),d._log.error(a)}),null})},a.prototype._bindNodeMap=function(a,b){var c=this.cache[a],d=b.uiControlNode.control,e=b.element,f=this._managerCache; -return c.clone(e,f.read(this.control.uid),b),f.read(d.uid).bindAndLoad()},a.prototype._compile=function(a,b){var c=this._createBoundControl(a+xe,b),d=this._createNodeMap(c,b);this.__compiledControls.push(c),this._compileNodeMap(c,d,a)},a.prototype._compileNodeMap=function(a,b,c){var d=this,e=this._ElementManagerFactory.getInstance(),f=[];e.isClone=!0,e.initialize(b,null),e.setUiControlTemplate(),this.cache[c]=e,f.push(e.fulfillTemplate()),this.templates[c]=this._Promise.all(f).then(function(){var c,e,f=b.element,g=f.cloneNode(!0),h=d._document;return c=a.startNode=h.createComment(a.type+Ae),e=a.endNode=h.createComment(a.type+Be),f.insertBefore(c,f.firstChild),f.insertBefore(e,null),g})},a.prototype._createNodeMap=function(a,b,c){return{element:b,attributes:{},nodes:[],childContext:c,uiControlNode:{control:a,nodeName:a.type,expressions:[],injector:null}}},a.prototype._createBoundControl=function(a,b,c,d){var e=this._TemplateControlFactory,f=e.getInstance(),g=this._ResourcesFactory,i=this.control,j=this.cache[a],k=h(j),l=g.getInstance();if(k){var m=j.getUiControl();l.initialize(f,m.resources),l.add(d)}else l.initialize(f,d);if(f.resources=l,g.addControlResources(f),f.bindableTemplates=this._BindableTemplatesFactory.create(f,i.bindableTemplates),f.parent=i,f.controls=[],f.element=b,f.type=i.type+ye+a,f.root=this._ControlFactory.getRootControl(f),k){var n=this._ContextManager.getManager(f.root);f.absoluteContextPath=i.absoluteContextPath||Ha,u(c)||(f.absoluteContextPath+="."+c),f.context=n.getContext(f.absoluteContextPath.split("."),!1)}return f},a}();a.BindableTemplates=A,a.IBindableTemplatesFactory=d,Fa.injectable(qb,d,null,ue);var C=function(){function a(){this.__listeners={}}return a.getInstance=function(){return new a},a.prototype.initialize=function(a,b){this.__control=a;for(var c,d=Object.keys(b),e=this.__listeners,f=d.length,g=0;f>g;++g)c=d[g],this[c]=b[c],e[c]=[]},a.prototype.observe=function(a,c){var d=this.__listeners[N(c)];return u(d)?b:(a=a.bind(this.__control),d.push(a),function(){var b=d.indexOf(a);-1!==b&&d.splice(b,1)})},a.prototype._attributeChanged=function(a,b,c){for(var d=this.__listeners[N(a)],e=d.length,f=0;e>f;++f)d[f](b,c)},a}();a.Attributes=C,a.IAttributesFactory=g,Fa.injectable(pb,C,null,te),Fa.injectable(ob,g,null,ue);var D=function(){function a(){this.__resources={},this.__bound=!1}return a.create=function(c,d){if(u(d))return d;var e;switch(d.type.toLowerCase()){case Oe:var f=tf[d.value];u(f)||(d.value=f.inject());break;case Ne:a._observeResource(c,d);break;case Pe:e=d.value,n(e)&&(d.value=c.evaluateExpression(e));break;case Re:break;case Qe:e=d.value,n(e)&&(e=c[e],t(e)?d.value=e.bind(c):(a._log.warn('Attempted to create a "function" type Resource, but the function '+e+"cannot be found on your control."),d.value=b))}return d},a.addControlResources=function(b){b.resources.add({context:{value:b.context,type:Ne},control:{value:b,type:Pe}}),b.hasOwnContext&&a.__addRoot(b)},a.bindResources=function(b){var c=b.__resources;if(!u(c)){for(var d,e=b.__controlInstance,f=Object.keys(c),g=a.__controlResources,h=f.length,i=0;h>i;++i)d=f[i],g[d]!==!0&&(b[d]=c[d]=a.create(e,b[d]));b.__bound=!0}},a.dispose=function(b,c){var d=b.resources;if(!u(d)){for(var e,g,h=Object.keys(d.__resources),i=h.length,j=a._ContextManager.defineProperty,k=0;i>k;++k)e=h[k],g=d[e],u(g)||g.type!==Ne&&g.type!==Re||j(d,e,c?f(g,!0):null,!0,!0,!0);a._removeListeners(d.__controlInstance)}},a.parseElement=function(b){for(var c,d,e,f,g,h,i=Array.prototype.slice.call(b.children),j=a._regex,k=j.whiteSpaceRegex,l=j.quotationRegex,m={},n=a.__resourceTypes;i.length>0;)c=i.pop(),g=c.nodeName.toLowerCase(),n[g]&&(e=c.attributes,d={},f=e.getNamedItem(Le),u(f)||(d.alias=f.value,h=c.textContent.replace(k,"$1"),q(h)||(d.value=g===Oe||g===Re?h.replace(l,""):h,d.type=g,m[d.alias]=d)));return m},a.getInstance=function(){return new a},a._observeResource=function(b,c){var d=c.value,e=b.uid,f=a.__observableResourceRemoveListeners[e];if(u(f)&&(f=a.__observableResourceRemoveListeners[e]=[]),n(d)){u(c.initialValue)?c.initialValue=d:d=c.initialValue;var g=b.observeExpression(function(a){c.value=a},d);c.value=b.evaluateExpression(d),f.push(g)}},a._removeListeners=function(b){if(!u(b)){var c=b.uid,d=a.__observableResourceRemoveListeners[c];if(w(d))for(var e=d.length,f=0;e>f;++f)d[f]();P(a.__observableResourceRemoveListeners,c)}},a.__addRoot=function(a){a.resources.add({root:{value:a,type:Pe,alias:Se},rootContext:{value:a.context,type:Ne,alias:Te}})},a.prototype.initialize=function(b,c){if(this.__controlInstance=b,!u(c)){k(c)?c=a.parseElement(c):h(c.resources)&&(c=c.resources),this.__resources=c;for(var d,e=Object.keys(c),f=e.length,g=0;f>g;++g)d=e[g],this[d]=c[d]}},a.prototype.add=function(b){if(!u(b)){k(b)&&(b=a.parseElement(b));for(var c,d,e=Object.keys(b),f=e.length,g=this.__controlInstance,h=this.__bound,i=a.create,j=0;f>j;++j)d=e[j],c=b[d],c.alias=d,this[d]=this.__resources[d]=h?i(g,c):c}},a.INJECTABLE=Oe,a.OBJECT=Pe,a.OBSERVABLE=Ne,a.LITERAL=Re,a.FUNCTION=Qe,a.__observableResourceRemoveListeners={},a}();a.Resources=D,a.IResourcesFactory=i,Fa.injectable(vb,i,[ab,Za,Xa],ue),Fa.injectable(wb,D,null,te);var E=function(){function a(){this._gestures=a.gestures,this._androidVersion=v(this._compat.ANDROID)?-1:this._compat.ANDROID,this._android44orBelow=Math.floor(this._androidVersion/10)<=44,this._inMouse=!1,this._subscribers={},this._gestureCount={$tap:0,$dbltap:0,$hold:0,$release:0,$swipe:0,$track:0,$trackend:0},this.__hasMoved=!1,this.__hasRelease=!1,this.__detectingMove=!1,this.__tapCount=0,this.__touchCount=0,this.__cancelDeferredTap=b,this.__cancelDeferredHold=b,this.__cancelRegex=/cancel/i,this.__pointerEndRegex=/up|cancel/i,this.__reverseMap={},this.__mappedEventListener=this.__handleMappedEvent.bind(this),this.__mappedCount={$touchstart:0,$touchmove:0,$touchend:0,$touchcancel:0},this.__pointerHash={},this.__pointerEvents=[],this.__listeners={},this.__getTypes()}return a.prototype.addEventListener=function(a,c,d,e){var f=this,g=this._compat,h=g.mappedEvents,i=h[c],j=!u(i),k=this.__mappedCount,l=b,m=b,n=this._gestures,o=!1;if(j){var p=k[c];this.__reverseMap[i]=c,this.__registerElement(a,c),k[c]++,l=this.__addMappedEvent(p,i,e),g.hasTouchEvents&&!this.__cancelRegex.test(i)&&(i=i.replace("touch","mouse").replace("start","down").replace("end","up"),this.__reverseMap[i]=c,m=this.__addMappedEvent(p,i,e))}if(a.addEventListener(c,d,e),!v(a["on"+c])||v(n[c])||j)return function(){if(!o){if(j){var b=k[c];s(b)&&(b>0&&(b=--k[c]),0===b&&(l(),m())),f.__unregisterElement(a,c)}o=!0,a.removeEventListener(c,d,e)}};var q=n.$swipe,r=n.$track,t=c;if(-1!==c.indexOf(r)){var w=n.$trackend;t=c===w?w:r}else-1!==c.indexOf(q)&&(t=q);return this._gestureCount[t]++,this.__registerElement(a,c),function(){o||(o=!0,f.__removeEventListener(a,c,d,e))}},a.prototype.dispose=function(){this.__unregisterTypes(),this._gestureCount={$tap:0,$dbltap:0,$hold:0,$release:0,$swipe:0,$track:0,$trackend:0},this.__mappedCount={$touchstart:0,$touchmove:0,$touchend:0,$touchcancel:0},this._isActive=!1,this._subscribers={},this.__pointerEvents=[],this.__pointerHash={},this.__reverseMap={},this.__tapCount=this.__touchCount=0,this.__detectingMove=this.__hasMoved=this.__hasRelease=this.__haveSwipeSubscribers=!1,this.__lastMoveEvent=this.__lastTouchDown=this.__lastTouchUp=null,this.__swipeOrigin=this.__capturedTarget=this.__focusedElement=null,this.__cancelDeferredHold=this.__cancelDeferredTap=b},a.prototype._onTouchStart=function(c){var d=this;if(this.__touchCount++>0)return!0;var e=c.type;if("mousedown"!==e)this._inTouch=!0;else{if(this._inTouch===!0)return c.preventDefault(),!1;this._compat.hasTouchEvents&&(this._inMouse=!0)}if(c=this.__standardizeEventObject(c),u(c))return!0;this.__capturedTarget=this.__lastMoveEvent=null,this.__hasMoved=!1;var f=c.clientX,g=c.clientY,h=c.timeStamp,i=c.target,j=this._gestures;this.__lastTouchDown={_buttons:c._buttons,clientX:f,clientY:g,timeStamp:h,target:i,identifier:c.identifier},this.__swipeOrigin={clientX:f,clientY:g,xTimestamp:h,yTimestamp:h,xTarget:i,yTarget:i},this.__haveSwipeSubscribers=this.__findFirstSubscribers(i,[j.$swipe,j.$swipedown,j.$swipeleft,j.$swiperight,j.$swipeup]).length>0;var k=this._gestureCount,l=k.$hold<=0,m=k.$release<=0;if(("touchstart"===e||k.$track>0||k.$trackend>0||k.$swipe>0)&&(this.__registerType(this._moveEvents),this.__detectingMove=!0),l&&m)return!0;var n,o,p=a.config.intervals.holdInterval,q=!1;return l?(this.__hasRelease=!1,this.__cancelDeferredHold=J(function(){d.__hasRelease=!0},p),!0):(m?(n=this.__findFirstSubscriber(c.target,this._gestures.$hold),(q=!u(n))&&(o=function(){n.trigger(c),d.__cancelDeferredHold=b})):(this.__hasRelease=!1,n=this.__findFirstSubscriber(c.target,this._gestures.$hold),(q=!u(n))&&(o=function(){n.trigger(c),d.__hasRelease=!0,d.__cancelDeferredHold=b})),void(q&&(this.__cancelDeferredHold=J(o,p))))},a.prototype._onTouchMove=function(c){if(this.__cancelDeferredHold(),this.__cancelDeferredHold=b,this._inTouch===!0&&"mousemove"===c.type)return!0;var d=this.__standardizeEventObject(c);if(u(d))return!0;var e=this._gestureCount,f=e.$track<=0,g=e.$swipe<=0,h=a.config,i=this.__swipeOrigin,j=d.clientX,k=d.clientY,l=this.__hasMoved||this.__getDistance(i.clientX,j,i.clientY,k)>=h.distances.minScrollDistance;if(!l)return!0;if(this.__hasMoved=!0,f&&g)return!0;var m=this.__lastMoveEvent||i,n=d.direction=this.__getDirection(j-m.clientX,k-m.clientY),o=(this.__handleOriginChange(n),Math.abs(j-i.clientX)),p=Math.abs(k-i.clientY);d.velocity=this.__getVelocity(o,p,d.timeStamp-i.xTimestamp,d.timeStamp-i.yTimestamp);!g&&this._android44orBelow&&this.__haveSwipeSubscribers&&c.preventDefault(),f||this.__handleTrack(d,c),this.__lastMoveEvent=d},a.prototype._onTouchEnd=function(b){var c=b.type,d=this.__hasMoved,e="mouseup"!==c;if(this.__touchCount<=0?this.__touchCount=0:this.__touchCount--,e){if("touchend"===c){if(d)b.cancelable===!0&&b.preventDefault();else{if(this._inTouch!==!0)return this.__preventClickFromTouch(),b.cancelable===!0&&b.preventDefault(),!0;this.__handleInput(b.target),b.cancelable===!0&&b.preventDefault()}this.__preventClickFromTouch()}}else if(!v(this._inTouch)){if(!this._inMouse)return b.cancelable===!0&&b.preventDefault(),!1;this._inMouse=!1}if(this.__cancelRegex.test(c))return this.__handleCanceled(b),!0;if(b=this.__standardizeEventObject(b),u(b))return!0;e&&(this._inTouch=!1),this.__touchCount>0&&(this.__touchCount=b.touches.length),this.__clearTempStates(),this.__hasRelease&&this.__handleRelease(b),this.__handleSwipe();var f=a.config,g=f.intervals,h=b.timeStamp,i=this.__lastTouchDown;if(d)return this.__handleTrackEnd(b),this.__tapCount=0,!0;if(u(i)||h-i.timeStamp>g.tapInterval)return this.__tapCount=0,!0;var j=this.__lastTouchUp,k=b.clientX,l=b.clientY;this.__tapCount>0&&this.__getDistance(k,j.clientX,l,j.clientY)<=f.distances.maxDblTapDistance&&h-j.timeStamp<=g.dblTapInterval?this.__handleDbltap(b):this.__tapCount=0,this.__handleTap(b),this.__lastTouchUp=b},a.prototype.__clearTempStates=function(){this.__cancelDeferredHold(),this.__cancelDeferredHold=b,this.__detectingMove&&(this.__unregisterType(this._moveEvents),this.__detectingMove=!1)},a.prototype.__resetTouchEnd=function(){this.__tapCount=this.__touchCount=0,this._inTouch=this.__hasRelease=!1,this.__pointerHash={},this.__pointerEvents=[],this.__capturedTarget=null},a.prototype.__handleCanceled=function(a){var b=a.touches||this.__pointerEvents,c=this.__getTouchIndex(b);a=c>=0?b[c]:this.__standardizeEventObject(a),this._inTouch=!1,this.__clearTempStates(),this.__hasMoved&&(this._android44orBelow&&this.__handleSwipe(),this.__handleTrackEnd(a)),this.__resetTouchEnd()},a.prototype.__handleTap=function(c){var d=this;if(this.__tapCount++,!(this._gestureCount.$tap<=0)){var e=this._gestures,f=this.__findFirstSubscriber(c.target,e.$tap);if(!u(f))return a.config.intervals.dblTapZoomDelay<=0||"mouse"===c.pointerType||"mouseup"===c.type?(c._buttons=this.__lastTouchDown._buttons,void f.trigger(c)):void(this.__cancelDeferredTap=J(function(){c._buttons=d.__lastTouchDown._buttons,f.trigger(c),d.__tapCount=0,d.__cancelDeferredTap=b},a.config.intervals.dblTapZoomDelay))}},a.prototype.__handleDbltap=function(a){if(this.__tapCount=0,this.__cancelDeferredTap(),this.__cancelDeferredTap=b,!(this._gestureCount.$dbltap<=0)){var c=this.__findFirstSubscriber(a.target,this._gestures.$dbltap);u(c)||(a._buttons=this.__lastTouchDown._buttons,c.trigger(a),this.__tapCount=-1)}},a.prototype.__handleRelease=function(a){var b=this.__findFirstSubscriber(a.target,this._gestures.$release);u(b)||b.trigger(a),this.__hasRelease=!1},a.prototype.__handleSwipe=function(){if(!(this._gestureCount.$swipe<=0)){var a=this.__lastMoveEvent;if(!u(a)){for(var b=this.__swipeOrigin,c=Math.abs(a.clientX-b.clientX),d=Math.abs(a.clientY-b.clientY),e=this.__getRegisteredSwipes(a.direction,a.velocity,c,d);e.length>0;)e.pop().trigger(a);this.__lastMoveEvent=null}}},a.prototype.__handleTrack=function(a,b){var c=this._gestures,d=c.$track,e=a.direction,f=this.__capturedTarget||a.target,g=this.__findFirstSubscribers(f,[d,d+e.x,d+e.y]);if(this._android44orBelow){var h=this.__findFirstSubscribers(f,[d,c.$trackdown,c.$trackup,c.$trackleft,c.$trackright,c.$trackend]);h.length>0&&b.preventDefault()}if(g.length>0)for(this._androidVersion>-1&&b.preventDefault();g.length>0;)g.pop().trigger(a)},a.prototype.__handleTrackEnd=function(a){if(!(this._gestureCount.$trackend<=0)){var b=this.__capturedTarget||a.target,c=this.__findFirstSubscriber(b,this._gestures.$trackend);u(c)||c.trigger(a)}},a.prototype.__handleMappedEvent=function(a){var b=a.type,c=this.__reverseMap[b],d=this.__findFirstSubscriber(a.target,c);u(d)||(a=this.__standardizeEventObject(a),u(a)||d.trigger(a))},a.prototype.__getTypes=function(){var a,b,c,d=this._compat,e=d.mappedEvents,f=this.__listeners;if(d.hasPointerEvents)a=this._startEvents=e.$touchstart,b=this._moveEvents=e.$touchmove,c=this._endEvents=e.$touchend+" "+e.$touchcancel;else if(d.hasTouchEvents)a=this._startEvents=e.$touchstart+" mousedown",b=this._moveEvents=e.$touchmove+" mousemove",c=this._endEvents=e.$touchend+" mouseup "+e.$touchcancel;else{var g=e.$touchcancel;a=this._startEvents=e.$touchstart,b=this._moveEvents=e.$touchmove,c=this._endEvents=e.$touchend+(g?" "+g:"")}f[a]=this._onTouchStart.bind(this),f[b]=this._onTouchMove.bind(this),f[c]=this._onTouchEnd.bind(this)},a.prototype.__registerTypes=function(){this.__registerType(this._startEvents),this.__registerType(this._endEvents)},a.prototype.__unregisterTypes=function(){this.__unregisterType(this._startEvents),this.__unregisterType(this._endEvents),this.__detectingMove&&(this.__unregisterType(this._moveEvents),this.__detectingMove=!1)},a.prototype.__registerType=function(a){for(var b=this.__listeners[a],c=this._document,d=a.split(" "),e=d.length;e-->0;)c.addEventListener(d[e],b,!1)},a.prototype.__unregisterType=function(a){for(var b=this.__listeners[a],c=this._document,d=a.split(" "),e=d.length;e-->0;)c.removeEventListener(d[e],b,!1)},a.prototype.__registerElement=function(b,c){var d,e=b.__plat;u(e)?(d=M("domEvent_"),b.__plat=e={domEvent:d}):u(e.domEvent)&&(d=M("domEvent_"),e.domEvent=d),this._isActive||(this.__registerTypes(),u(this._isActive)&&this.__appendGestureStyle(),this._isActive=!0);var f;if(u(d)){var g=this._subscribers[e.domEvent];return v(g[c])?(f=new H(b,c),g[c]=f):g[c].count++,void g.gestureCount++}var h={gestureCount:1};f=new H(b,c),h[c]=f,this._subscribers[d]=h,v(b.className)||ga(b,a.config.styleConfig[0].className),this.__removeSelections(b)},a.prototype.__unregisterElement=function(a,b){var c=a.__plat;if(!u(c)&&!u(c.domEvent)){var d=c.domEvent,e=this._subscribers[d],f=e[b];u(f)||(f.count--,0===f.count&&P(e,b),e.gestureCount--,0===e.gestureCount&&(P(this._subscribers,d),this.__removeElement(a)))}},a.prototype.__setTouchPoint=function(a){var b=a.type,c=this._compat;return c.hasPointerEvents||c.hasMsPointerEvents?void this.__updatePointers(a,this.__pointerEndRegex.test(b)):void(a.pointerType=-1===b.indexOf("mouse")?"touch":"mouse")},a.prototype.__setCapture=function(a){u(this.__capturedTarget)&&!j(a)&&(this.__capturedTarget=a)},a.prototype.__updatePointers=function(a,b){var c,d=a.pointerId,e=this.__pointerHash,f=e[d];if(b)v(f)||(c=this.__pointerEvents.indexOf(f),c>-1&&this.__pointerEvents.splice(c,1),P(this.__pointerHash,d));else{if(1===d&&!q(e))return;a.identifier=a.pointerId,v(f)||(c=this.__pointerEvents.indexOf(f))<0?this.__pointerEvents.push(a):this.__pointerEvents.splice(c,1,a),e[d]=a}},a.prototype.__findFirstSubscriber=function(a,b){if(!u(a)){var c,d,e;do if(c=a.__plat,!v(c)&&!v(c.domEvent)&&(d=this._subscribers[c.domEvent],e=d[b],!v(e)))return e;while(!u(a=a.parentNode))}},a.prototype.__findFirstSubscribers=function(a,b){if(u(a))return[];var c,d,e,f,g,h=[];do if(c=a.__plat,!v(c)&&!v(c.domEvent))for(d=this._subscribers[c.domEvent],e=Object.keys(d);e.length>0;)f=e.pop(),g=b.indexOf(f),-1!==g&&(h.push(d[f]),b.splice(g,1));while(b.length>0&&!u(a=a.parentNode));return h},a.prototype.__addMappedEvent=function(a,b,c){var d=this,e=this._document;return 0===a&&e.addEventListener(b,this.__mappedEventListener,c),function(){e.removeEventListener(b,d.__mappedEventListener,c)}},a.prototype.__removeEventListener=function(a,b,c,d){var e=this._gestures;a.removeEventListener(b,c,d);var f=e.$swipe,g=e.$track,h=b;if(-1!==b.indexOf(g)){var i=e.$trackend;h=b===i?i:g}else-1!==b.indexOf(f)&&(h=f);this._gestureCount[h]--,this.__unregisterElement(a,b)},a.prototype.__removeElement=function(b){this.__returnSelections(b),v(b.className)||ha(b,a.config.styleConfig[0].className);var c=b.__plat;P(c,"domEvent"),q(c)&&P(b,"__plat"),q(this._subscribers)&&this.dispose()},a.prototype.__standardizeEventObject=function(a){this.__setTouchPoint(a);var b,c=-1!==this._startEvents.indexOf(a.type),d=a.touches||this.__pointerEvents,e=a.changedTouches,f=!v(e),g=a.timeStamp;if(f)if(c)b=a.preventDefault.bind(a),a=e[0],a.preventDefault=b;else{var h=this.__getTouchIndex(e);if(h>=0)b=a.preventDefault.bind(a),a=e[h],a.preventDefault=b;else if(this.__getTouchIndex(d)>=0)return null}return c&&this.__setCapture(a.target),this.__normalizeButtons(a),a.touches=d,a.offset=this.__getOffset(a),(v(a.timeStamp)||g>a.timeStamp)&&(a.timeStamp=g),a},a.prototype.__normalizeButtons=function(a){var b;if(s(a.buttons))b=0===a.buttons?1:a.buttons;else if(s(a.which)&&a.which>0)b=a.which;else switch(a.button){case-1:b=0;break;case 0:b=1;break;case 1:b=4;break;case 2:b=2;break;case 3:b=8;break;case 4:b=16;break;default:b=1}a._buttons=b},a.prototype.__getTouchIndex=function(a){for(var b=(this.__lastTouchDown||{}).identifier,c=a.length,d=0;c>d;++d)if(a[d].identifier===b)return d;return-1},a.prototype.__getOffset=function(a){var b=this.__capturedTarget||a.target;if(j(b))return{x:a.clientX,y:a.clientY};if(!v(a.offsetX)&&b===a.target)return{x:a.offsetX,y:a.offsetY};for(var c=b.offsetLeft,d=b.offsetTop;!u(b=b.offsetParent);)c+=b.offsetLeft,d+=b.offsetTop;return{x:a.clientX-c,y:a.clientY-d}},a.prototype.__getDistance=function(a,b,c,d){var e=b-a,f=d-c;return Math.sqrt(e*e+f*f)},a.prototype.__getVelocity=function(a,b,c,d){var e=0,f=0;return c>0&&(e=a/c||0),d>0&&(f=b/d||0),{x:e,y:f}},a.prototype.__getDirection=function(a,b){var c=Math.abs(a),d=Math.abs(b),e=(this.__lastMoveEvent||{}).direction||{},f=0===a?e.x||"none":0>a?"left":"right",g=0===b?e.y||"none":0>b?"up":"down";return{x:f,y:g,primary:c===d?e.primary||"none":c>d?f:g}},a.prototype.__handleOriginChange=function(a){var b=this.__lastMoveEvent;if(!u(b)){var c=b.direction,d=c.x===a.x,e=c.y===a.y;if(!d||!e){var f=this.__swipeOrigin,g=this._gestures,h=[g.$swipe,g.$swipedown,g.$swipeleft,g.$swiperight,g.$swipeup];d||(f.clientX=b.clientX,f.xTimestamp=b.timeStamp,f.xTarget=b.target,this._android44orBelow&&(this.__haveSwipeSubscribers=this.__findFirstSubscribers(f.xTarget,h).length>0)),e||(f.clientY=b.clientY,f.yTimestamp=b.timeStamp,f.yTarget=b.target,this._android44orBelow&&(this.__haveSwipeSubscribers=this.__findFirstSubscribers(f.yTarget,h).length>0))}}},a.prototype.__getRegisteredSwipes=function(b,c,d,e){var f,g=this._gestures.$swipe,h=a.config.velocities.minSwipeVelocity,i=[g],j=this.__swipeOrigin||{};return d>e?(f=j.xTarget,c.x>=h&&i.push(g+b.x)):e>d&&(f=j.yTarget,c.y>=h&&i.push(g+b.y)),this.__findFirstSubscribers(f,i)},a.prototype.__isHorizontal=function(a){return"left"===a||"right"===a},a.prototype.__appendGestureStyle=function(){var b,c,d=this._document;if(!this._compat.platCss)if(!u(d.styleSheets)&&d.styleSheets.length>0){var e=d.styleSheets[0];for(b=a.config.styleConfig,c=b.length;c-->0;)e.insertRule(this.__createStyle(b[c]),0)}else{var f=d.head,g=d.createElement("style"),h="";for(g.type="text/css",b=a.config.styleConfig,c=b.length;c-->0;)h=this.__createStyle(b[c])+h;g.textContent=h,f.appendChild(g)}},a.prototype.__createStyle=function(a){var b=a.styles||[],c=b.length,d="."+a.className+" { ",e="";c=b.length;for(var f=0;c>f;++f)e+=b[f]+";";return d+=e+" } "},a.prototype.__isFocused=function(a){return a===this.__focusedElement},a.prototype.__handleInput=function(a){var b=this,c=a.nodeName,d=this.__focusedElement||{};if(!n(c))return this.__focusedElement=null,void(t(d.blur)&&d.blur());var e;switch(c.toLowerCase()){case"input":switch(a.type){case"range":t(d.blur)&&d.blur();break;case"button":case"submit":case"checkbox":case"radio":case"file":t(d.blur)&&d.blur(),I(function(){b._document.body.contains(a)&&t(a.click)&&a.click()});break;default:return this.__focusedElement=a,a.focus(),void(e=this.addEventListener(a,"blur",function(){b.__isFocused(a)&&(b.__focusedElement=null),e()},!1))}break;case"a":case"button":case"label":t(d.blur)&&d.blur(),I(function(){b._document.body.contains(a)&&t(a.click)&&a.click()});break;case"textarea":return this.__focusedElement=a,a.focus(),void(e=this.addEventListener(a,"blur",function(){b.__isFocused(a)&&(b.__focusedElement=null),e()},!1));case"select":t(d.blur)&&d.blur(),I(function(){var c=b._document;if(c.body.contains(a)){var d=c.createEvent("MouseEvents");d.initMouseEvent("mousedown",!1,!1,null,null,null,null,null,null,null,null,null,null,null,null),a.dispatchEvent(d)}});break;default:t(d.blur)&&d.blur(),I(function(){b._document.body.contains(a)&&t(a.click)&&a.click()})}this.__focusedElement=null},a.prototype.__preventClickFromTouch=function(){var a,c=this,d=this._document,e=J(function(){d.removeEventListener("click",a,!0),d.removeEventListener("mousedown",a,!0),d.removeEventListener("mouseup",a,!0)},400);a=function(f){if(f.preventDefault(),f.stopPropagation(),d.removeEventListener(f.type,a,!0),e===b)return!1;e(),e=b;var g=c.__lastTouchDown;return u(g)||c.__isFocused(g.target)?!1:(c.__handleInput(g.target),!1)},I(function(){d.addEventListener("click",a,!0),d.addEventListener("mousedown",a,!0),d.addEventListener("mouseup",a,!0)})},a.prototype.__removeSelections=function(a){k(a)&&(v(a.onselectstart)||a.addEventListener("selectstart",this.__preventDefault,!1),v(a.ondragstart)||a.addEventListener("dragstart",this.__preventDefault,!1))},a.prototype.__returnSelections=function(a){k(a)&&(v(a.onselectstart)||a.removeEventListener("selectstart",this.__preventDefault,!1),v(a.ondragstart)||a.removeEventListener("dragstart",this.__preventDefault,!1))},a.prototype.__preventDefault=function(a){var b=a.target.nodeName;return n(b)&&(b=b.toLowerCase()),"input"===b||"textarea"===b?!0:(a.preventDefault(),!1)},a._inject={_document:Ra,_compat:Oa},a.config={intervals:{tapInterval:250,dblTapInterval:300,holdInterval:400,dblTapZoomDelay:0},distances:{minScrollDistance:3,maxDblTapDistance:10},velocities:{minSwipeVelocity:.645},styleConfig:[{className:"plat-gesture",styles:["-moz-user-select: none","-khtml-user-select: none","-webkit-touch-callout: none","-webkit-user-select: none","-webkit-user-drag: none","-webkit-tap-highlight-color: transparent","-webkit-overflow-scrolling: touch","-ms-user-select: none","-ms-touch-action: manipulation","touch-action: manipulation"]},{className:"plat-no-touch-action",styles:["-ms-touch-action: none","touch-action: none"]}]},a.gestures={$tap:Rd,$dbltap:Sd,$hold:Xd,$release:Yd,$swipe:Zd,$swipeleft:$d,$swiperight:_d,$swipeup:ae,$swipedown:be,$track:ce,$trackleft:de,$trackright:ee,$trackup:fe,$trackdown:ge,$trackend:he},a}();a.DomEvents=E,Fa.injectable(sb,E),a.IDomEventsConfig=m,Fa.injectable(tb,m);var F=function(){function a(){this._document=ma(Ra)}return a.prototype.initialize=function(a,b,c){this.element=a,this.event=b,this.eventType=n(c)?c:"CustomEvent"},a.prototype.trigger=function(a,b,c){var d=this._document.createEvent(this.eventType);return h(a)&&e(!1,!1,d,a),d.initCustomEvent(this.event,!0,!0,u(b)?0:b),(c||this.element).dispatchEvent(d)},a}();a.DomEvent=F,Fa.injectable(ub,F,null,te);var G,H=function(a){function b(b,c){a.call(this),this.count=0,this.element=b,this.event=c,this.count++}return __extends(b,a),b.prototype.trigger=function(a){var b=this._document.createEvent("CustomEvent"),c=this.element,d=a.target;this.__extendEventObject(b,a),b.initCustomEvent(this.event,!0,!0,0);var e=c.contains(d)?d.dispatchEvent(b):c.dispatchEvent(b);return e||a.preventDefault(),e},b.prototype.__extendEventObject=function(a,b){var c=b.pointerType;a.clientX=b.clientX,a.clientY=b.clientY,a.offsetX=b.offset.x,a.offsetY=b.offset.y,a.direction=b.direction||{x:"none",y:"none",primary:"none"},a.touches=b.touches,a.velocity=b.velocity||{x:0,y:0},a.identifier=b.identifier||0,a.pointerType=s(c)?this.__convertPointerType(c,b.type):c,a.screenX=b.screenX,a.screenY=b.screenY,a.pageX=b.pageX,a.pageY=b.pageY,a.buttons=b._buttons},b.prototype.__convertPointerType=function(a,b){switch(a){case MSPointerEvent.MSPOINTER_TYPE_MOUSE:return"mouse";case MSPointerEvent.MSPOINTER_TYPE_PEN:return"pen";case MSPointerEvent.MSPOINTER_TYPE_TOUCH:return"touch"}return-1===b.indexOf("mouse")?"touch":"mouse"},b}(F);!function(a){var c=function(){function a(){this._animatedElements={}}return a.prototype.create=function(a,b,c){return this._create(a,b,c,{key:null})},a.prototype.animate=function(a,b,c){return this._animate(a,b,c,{key:null})},a.prototype.enter=function(a,b,c,d,e){return this._animate(a,b,e,{key:"enter",parent:c,refChild:d})},a.prototype.leave=function(a,b,c){return this._animate(a,b,c,{key:"leave"})},a.prototype.move=function(a,b,c,d,e){return this._animate(a,b,e,{key:"move",parent:c,refChild:d})},a.prototype.show=function(a,b,c){return this._animate(a,b,c,{key:"show"})},a.prototype.hide=function(a,b,c){return this._animate(a,b,c,{key:"hide"})},a.prototype.all=function(a){for(var c=this,e=a.length,f=[],g=new d(function(b){c._Promise.all(a).then(function(){b()})}),h=0;e>h;++h)f=f.concat(a[h].getInstances());return g.initialize(f),g.then(b)},a.prototype.resolve=function(){var a=new d(function(b){b(function(){return a})});return a},a.prototype._animate=function(a,b,c,d){var e=this._create(a,b,c,d),f=e.current;return e.previous.then(function(){L(function(){f.start()})}),f},a.prototype._create=function(a,c,e,f){var g,h=this,i=wf[c],j=[],k=[];if((!this._compat.animationSupported||v(i))&&(i=xf[c],v(i)))return a=this.__constructAnimatableElements(a,{inject:b},k,j),this._handlePreInitFunctionality(a,k,f),this._handlePostInitFunctionality(a,k,f),this._handleEndFunctionality(a,k,f),g=this.resolve(),{previous:g,current:g};a=this.__constructAnimatableElements(a,i,k,j);var l=k.length;if(0===l)return this._handlePreInitFunctionality(a,k,f),this._handlePostInitFunctionality(a,k,f),this._handleEndFunctionality(a,k,f),g=this.resolve(),{previous:g,current:g};this._handlePreInitFunctionality(a,k,f);var m,n=M("animation_"),o=this.__setAnimationId(n,k),q=new d(function(b){var c=h._Promise;m=c.all(o).then(function(){for(var d=[],g=0;l>g;++g)d.push(j[g].instantiate(k[g],e));h._handlePostInitFunctionality(a,k,f);var i=c.all(d),m=h.__isParentAnimating(k),o=h.__generateAnimatedElement(n,k,q);if(!u(m)){h._handleEndFunctionality(a,k,f),o.animationEnd(!0);var r=h._animatedElements[m],s=p(r.promise)?function(){return r.promise}:function(){return q};i.then(function(){b(s)})}h.__stopChildAnimations(k),o.promise=q,i.then(function(){h._handleEndFunctionality(a,k,f),o.animationEnd(),b(function(){return q})})})});return q.initialize(j),{previous:m,current:q}},a.prototype._handlePreInitFunctionality=function(a,b,c){switch(c.key){case"move":for(var d=0;de;++e)f.insertBefore(a[e],g);break;case"show":for(d=b.length,e=0;d>e;++e)b[e].removeAttribute(Hd)}},a.prototype._handleEndFunctionality=function(a,b,c){var d,e;switch(c.key){case"leave":for(d=a.length,e=0;d>e;++e)fa(a[e]);break;case"hide":for(d=b.length,e=0;d>e;++e)b[e].setAttribute(Hd,"")}},a.prototype.__setAnimationId=function(a,b){for(var c,d,e,f=this._animatedElements,g=[],h=b.length,i=0;h>i;++i)e=b[i],d=e.__plat,v(d)?(e.__plat={animation:a},ga(e,Id)):v(d.animation)?(d.animation=a,ga(e,Id)):(c=f[d.animation],v(c)||(g.push(c.promise),c.animationEnd(!0)),d.animation=a);return g},a.prototype.__generateAnimatedElement=function(a,b,c){var d=this._animatedElements,e=function(e){var f,g,h,i=b.length;if(e===!0)return c.cancel(),void P(d,a);for(var j=0;i>j;++j)g=b[j],f=g.__plat||{},h=f.animation,v(h)||h!==a||(ha(g,Id),P(f,"animation"),q(f)&&P(g,"__plat"));P(d,a)};return d[a]={animationEnd:e}},a.prototype.__isParentAnimating=function(a){for(var b,c=a[0];!j(c=c.parentNode)&&!u(c)&&c.nodeType===Node.ELEMENT_NODE;)if(ka(c,Id)&&(b=(c.__plat||{}).animation,n(b))){if(!u(this._animatedElements[b]))return b;P(c.__plat,"animation"),q(plat)&&P(c,"__plat"),ha(c,Id)}},a.prototype.__stopChildAnimations=function(a){for(var b,c,d,e,f=this._animatedElements,g=Array.prototype.slice,h=0;h0;)d=b.pop().__plat||{},e=d.animation,u(e)||(c=f[e]||{},t(c.animationEnd)&&c.animationEnd(!0))},a.prototype.__constructAnimatableElements=function(a,b,c,d){if(!w(a))if(l(a))a=Array.prototype.slice.call(a.childNodes);else if(x(a))a=Array.prototype.slice.call(a);else{if(!k(a)||a.nodeType!==Node.ELEMENT_NODE)return[];a=[a]}for(var e,f=a.length,g=0;f>g;++g)e=a[g],k(e)&&e.nodeType===Node.ELEMENT_NODE&&(c.push(e),d.push(b.inject()));return a},a._inject={_compat:Oa,_Promise:Na,_document:Ra},a}();a.Animator=c,Fa.injectable(nb,c);var d=function(a){function c(b,c){a.call(this,b),this._Promise=ma(Na),this.__animationState=0,this.__animationInstances=[],u(c)||(this.__animationInstances=c.__animationInstances,this.__animationState=c.__animationState)}return __extends(c,a),c.prototype.initialize=function(a){q(this.__animationInstances)&&(w(a)?this.__animationInstances=a:h(a)&&(this.__animationInstances=[a]))},c.prototype.getInstances=function(){return this.__animationInstances},c.prototype.start=function(){if(!(this.__animationState>0)){for(var a,b=this.__animationInstances,c=b.length,d=0;c>d;++d)a=b[d],t(a.start)&&a.start();this.__animationState=1}},c.prototype.pause=function(){if(1!==this.__animationState)return this._Promise.resolve();for(var a,c=this.__animationInstances,d=[],e=c.length,f=0;e>f;++f)a=c[f],t(a.pause)&&d.push(a.pause());return this._Promise.all(d).then(b)},c.prototype.resume=function(){if(1!==this.__animationState)return this._Promise.resolve();for(var a,c=this.__animationInstances,d=[],e=c.length,f=0;e>f;++f)a=c[f],t(a.resume)&&d.push(a.resume());return this._Promise.all(d).then(b)},c.prototype.cancel=function(){if(2===this.__animationState)return this;for(var a,b=this.__animationInstances,c=b.length,d=0;c>d;++d)a=b[d],t(a.cancel)&&a.cancel(),t(a.end)&&a.end();return this.__animationState=2,this},c.prototype.isCanceled=function(){return 2===this.__animationState},c.prototype.then=function(b){return a.prototype.then.call(this,b)},c.prototype.catch=function(b){return a.prototype.catch.call(this,b)},c}(Ef.Promise);a.AnimationPromise=d;var e=function(){function a(){this.__eventListeners=[]}return a.prototype.initialize=function(){},a.prototype.start=function(){},a.prototype.end=function(){ -for(var a=this.__eventListeners;a.length>0;)a.pop()();t(this._resolve)&&(this._resolve(),this._resolve=null)},a.prototype.pause=function(){return this._Promise.resolve()},a.prototype.resume=function(){return this._Promise.resolve()},a.prototype.cancel=function(){this.end()},a.prototype.addEventListener=function(a,c,d){if(!t(c))return this._log.warn('An animation\'s "addEventListener" must take a function as the second argument.'),b;c=c.bind(this);var e=this.dom.addEventListener(this.element,a,function(a){a.stopPropagation(),c(a)},d),f=this.__eventListeners;return f.push(e),function(){e();var a=f.indexOf(e);-1!==a&&f.splice(a,1)}},a.prototype.instantiate=function(a,b){var c=this;this.element=a,this.options=b;var e=new d(function(a){c._resolve=a,c.initialize()});return e.initialize(this),e},a._inject={_window:Fb,_compat:Oa,_log:Xa,_Promise:Na,dom:rb,utils:zb},a}();a.BaseAnimation=e;var f=function(a){function b(){a.apply(this,arguments),this._animationEvents=this._compat.animationEvents}return __extends(b,a),b.prototype.animationStart=function(a){return this.addEventListener(this._animationEvents.$animationStart,a,!1)},b.prototype.animationEnd=function(a){return this.addEventListener(this._animationEvents.$animationEnd,a,!1)},b.prototype.animationIteration=function(a){return this.addEventListener(this._animationEvents.$animationIteration,a,!1)},b.prototype.transitionStart=function(a){return this.addEventListener(this._animationEvents.$transitionStart,a,!1)},b.prototype.transitionEnd=function(a){return this.addEventListener(this._animationEvents.$transitionEnd,a,!1)},b}(e);a.CssAnimation=f;var g=function(a){function c(){a.apply(this,arguments),this.className=Jd,this._animationCanceled=b}return __extends(c,a),c.prototype.initialize=function(){ga(this.element,this.className+ze)},c.prototype.start=function(){var a=this;this._animationCanceled=L(function(){var b=a.element,c=a.className;if(null===b.offsetParent)return a._dispose(),void a.end();ga(b,c);var d=a._animationEvents.$animation,e=a.options||{},f=a._window.getComputedStyle(b,e.pseudo),g=f[d+"Name"];return""===g||"none"===g||"paused"===f[d+"PlayState"]?(a._dispose(),void a.end()):(e.preserveInit||ha(b,c+ze),void(a._animationCanceled=a.animationEnd(function(){a._animationCanceled=L(function(){a._dispose()})})))})},c.prototype.pause=function(){var a=this;if(this._animationCanceled===b)return this._Promise.resolve();var c=this._compat.animationEvents;return new this._Promise(function(d){L(function(){a._animationCanceled!==b&&(a.element.style[c.$animation+"PlayState"]="paused"),d()})})},c.prototype.resume=function(){var a=this;if(this._animationCanceled===b)return this._Promise.resolve();var c=this._compat.animationEvents;return new this._Promise(function(d){L(function(){a._animationCanceled!==b&&(a.element.style[c.$animation+"PlayState"]="running"),d()})})},c.prototype.cancel=function(){this._animationCanceled(),this._dispose(),this.end()},c.prototype._dispose=function(){var a=this.className;ha(this.element,a+" "+a+ze),this._animationCanceled=b},c}(f);a.SimpleCssAnimation=g,Fa.animation(Jd,g);var i=function(a){function b(){a.apply(this,arguments),this.className=Od}return __extends(b,a),b}(g);a.FadeIn=i,Fa.animation(Od,i);var m=function(a){function b(){a.apply(this,arguments),this.className=Pd}return __extends(b,a),b}(g);a.FadeOut=m,Fa.animation(Pd,m);var o=function(a){function b(){a.apply(this,arguments),this.className=Ld}return __extends(b,a),b}(g);a.Enter=o,Fa.animation(Ld,o);var r=function(a){function b(){a.apply(this,arguments),this.className=Md}return __extends(b,a),b}(g);a.Leave=r,Fa.animation(Md,r);var s=function(a){function b(){a.apply(this,arguments),this.className=Nd}return __extends(b,a),b}(g);a.Move=s,Fa.animation(Nd,s);var y=function(a){function c(){a.apply(this,arguments),this.className=Kd,this._animationCanceled=b,this._modifiedProperties={},this._normalizeRegex=/-/g,this._nonNumRegex=/[^\-0-9\.]/g,this._normalizedKeys={},this._transitionCount=0,this._count=0,this._started=!1,this._usingCss=!1}return __extends(c,a),c.prototype.initialize=function(){ga(this.element,this.className+ze)},c.prototype.start=function(){var a=this;this._animationCanceled=L(function(){var b=a.element,c=a.className;null===b.offsetParent&&(a._animate(),a._dispose(),a.end()),ga(b,c),a._started=!0;var d=a.utils,e=a._animationEvents.$transition,f=a.options||{},g=f.count,h=a._window.getComputedStyle(b,f.pseudo),i=h[e+"Property"],j=h[e+"Duration"];if(d.isNumber(g)&&g>0&&(a._count=g),""===i||"none"===i||""===j||"0s"===j)return a._animate(),a._dispose(),void a.end();if(f.preserveInit===!1&&ha(b,c+ze),a._animationCanceled=a.transitionEnd(a._done),!a._animate()){if(d.isEmpty(f.properties))return void a._cssTransition(h);a._dispose(),a.end()}})},c.prototype.cancel=function(){this._animationCanceled(),this._started||this._animate(),this._dispose(),this.end()},c.prototype._dispose=function(){var a=this.className;ha(this.element,a+" "+a+ze),this._animationCanceled=b},c.prototype._done=function(a){var b=a.propertyName;if(n(b)){var c=++this._transitionCount;if(b=b.replace(this._normalizeRegex,"").toLowerCase(),c0;)a=f.shift(),b=d[a],c=e[a],n(c)?(d[a]=c,b===d[a]?k++:(h[a]=b,i[a.replace(j,"").toLowerCase()]=!0)):k++;return g>k},c.prototype._cssTransition=function(a){var c,d,e,f,g=this,h=this._animationEvents.$transition,i=a[h+"Duration"].split(","),j=a[h+"Delay"].split(","),k=a[h+"Property"].split(","),l=k.length,m=[],n=this._normalizedKeys,o=this._normalizeRegex,p=this._modifiedProperties,q=0,r=0,s=!1,t=this.utils.defer.bind(this,function(c,d){g._animationCanceled!==b&&("all"===c?s=!0:a[c]!==d&&(s=!0,p[c]=d),++rq;++q)c=k[q]=k[q].trim(),d=i.length>q?i[q].trim():i[i.length-1].trim(),e=j.length>q?j[q].trim():j[j.length-1].trim(),n[c.replace(o,"").toLowerCase()]=!0,f=a[c],m.push(f),t(this._toMs(d)+this._toMs(e),[c,f])},c.prototype._toMs=function(a){var b=this._nonNumRegex,c=a.match(b)[0],d=Number(a.replace(b,""));return this.utils.isNumber(d)?"s"===c?1e3*d:"ms"===c?d:0:0},c}(f);a.SimpleCssTransition=y,Fa.animation(Kd,y)}(G=a.animations||(a.animations={}));var K;!function(a){var c=function(a){function c(){a.apply(this,arguments)}return __extends(c,a),c.prototype.initialize=function(){var a,b=this._router=this._Router.currentRouter(),c=this._getParentViewport();u(c)||u(c._router)||(a=this._parentRouter=c._router,a.addChild(b)),this._navigator.initialize(b)},c.prototype.loaded=function(){var a=this;this._Promise.resolve(this._router.finishNavigating).then(function(){a._router.register(a)})},c.prototype.canNavigateTo=function(a){var b=this,c=this._Router.currentRouter,d=c(),e=!0,f=this._Injector.getDependency(a.delegate.view),g=f.inject(),i=a.parameters,j=c();if(!h(g))return this._Promise.resolve(null);if(d!==j){j.initialize(this._router);var k=ma(_a);g.navigator=k,k.initialize(j)}else g.navigator=this._navigator;return t(g.canNavigateTo)&&(e=g.canNavigateTo(i,a.query)),this._Promise.resolve(e).then(function(a){return b._nextInjector=f,b._nextView=g,a})},c.prototype.canNavigateFrom=function(){var a=this.controls[0],b=!0;return h(a)&&t(a.canNavigateFrom)&&(b=a.canNavigateFrom()),this._Promise.resolve(b)},c.prototype.navigateTo=function(a){var b=(this._Promise.resolve.bind(this._Promise),this._nextInjector||this._Injector.getDependency(a.delegate.view)),c=this._createNodeMap(b),d=(this.element,c.element),e=(a.parameters,a.query),f=c.uiControlNode.control;this._animator.enter(d,Ld,this.element);var g=this._managerCache.read(this.uid),h=this._ElementManagerFactory.getInstance();return g.children=[],h.initialize(c,g),t(f.navigatedTo)&&f.navigatedTo(a.parameters,e),h.setUiControlTemplate(),f.hasOwnContext?h.observeRootContext(f,h.fulfillAndLoad):h.fulfillAndLoad()},c.prototype.navigateFrom=function(){var a,c=this.controls[0];return a=h(c)&&t(c.navigatingFrom)?this._Promise.resolve(c.navigatingFrom()):this._Promise.resolve(),a.catch(b).then(function(){Mf.dispose(c)})},c.prototype.dispose=function(){this._router.unregister(this),this._navigator.dispose()},c.prototype._createNodeMap=function(a){var b=this._nextView||a.inject(),c=this._document,d=a.name,e=b.replaceWith,f=c.createElement(q(e)||"any"===e?"div":e);return f.setAttribute(Rc,d),f.className=Sc,{element:f,attributes:{},nodes:[],uiControlNode:{control:b,nodeName:d,expressions:[],injector:a,childManagerLength:0}}},c.prototype._getParentViewport=function(){for(var a=this.parent,b=this.type;!u(a)&&a.type!==b;)a=a.parent;return a},c._inject={_Router:Db,_Promise:Na,_Injector:Rb,_ElementManagerFactory:fb,_document:Ra,_managerCache:lb,_animator:nb,_navigator:_a},c}(o);a.Viewport=c,Fa.control(Qc,c);var d=function(a){function b(){a.call(this),this.replaceWith=null,this.__isFirst=!1;var b=ma(kb);this.__templateControlCache=b.create(Xc)}return __extends(b,a),b.prototype.initialize=function(){var a=this.options||{},b=a.value||{},c=this._id=b.id;if(u(c))return void this._log.warn(this.type+" instantiated without an id option");this._url=b.templateUrl;var d=this.__templateControlCache.read(c);return u(d)?(this.__isFirst=!0,void this._initializeTemplate()):void(this.__templatePromise=d)},b.prototype.loaded=function(){this.__isFirst||this._waitForTemplateControl(this.__templatePromise)},b.prototype.dispose=function(){if(this.__isFirst){var a=this.__templateControlCache;a.remove(this._id),0===a.info().size&&a.dispose()}},b.prototype._initializeTemplate=function(){var a=this,b=this._id;if(!u(b)){var c,d=this.endNode.parentNode,e=this._url;u(e)?(c=this._document.createDocumentFragment(),U(this.elementNodes,c)):(c=this._templateCache.read(e),W(this.elementNodes,d));var f;p(c)?f=c.catch(function(b){return u(b)?o.determineTemplate(a,e):void 0}).then(function(c){return a.bindableTemplates.add(b,c.cloneNode(!0)),a}):(this.bindableTemplates.add(b,c.cloneNode(!0)),f=this._Promise.resolve(this)),this.__templateControlCache.put(b,f)}},b.prototype._waitForTemplateControl=function(a){var b=this;p(a)&&a.then(function(a){return u(b._url)||b._url===a._url||b._log.warn("The specified url: "+b._url+" does not match the original "+b.type+' with id: "'+b._id+'". The original url will be loaded.'),b.__mapBindableTemplates(a),b.bindableTemplates.bind(b._id)}).then(function(a){var c=b.endNode;$(c.parentNode,a,c)}).catch(function(a){I(function(){b._log.warn("Problem resolving "+b.type+" url: "+a.response)})})},b.prototype.__mapBindableTemplates=function(a){var b=this.bindableTemplates;b.cache=a.bindableTemplates.cache,b.templates=a.bindableTemplates.templates},b._inject={_Promise:Na,_templateCache:mb,_document:Ra},b}(o);a.Template=d,Fa.control(Pc,d);var e=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.prototype.setTemplate=function(){this.innerTemplate=U(this.element.childNodes)},b.prototype.loaded=function(){this.element.appendChild(this.innerTemplate.cloneNode(!0))},b}(o);a.Ignore=e,Fa.control(Nc,e);var f=function(a){function b(){var b=this;a.call(this),this.priority=120,this._aliases={index:ie.index,even:ie.even,odd:ie.odd,first:ie.first,last:ie.last},this._blockLength=0,this._addQueue=[],this._itemLength=0,this.__listenerSet=!1,this.itemsLoaded=new this._Promise(function(a){b.__resolveFn=a})}return __extends(b,a),b.prototype.setTemplate=function(){this.bindableTemplates.add("item",this.element.childNodes)},b.prototype.contextChanged=function(a,b){w(a)?this._setListener():(this._log.debug(this.type+" context set to something other than an Array."),a=[]),this._executeEvent([{object:a,type:"splice"}])},b.prototype.loaded=function(){var a=this.options,b=this._animate=!v(a)&&a.value.animate===!0,c=this.context;if(this._container=this.element,b&&(this._animationQueue=[]),!w(c))return void(u(c)||this._log.debug(this.type+" context set to something other than an Array."));this._setAliases();var d=this._addQueue,e=c.length,f=this._addItems(0,e,0).then(function(){var a=d.indexOf(f);-1!==a&&d.splice(a,1)});d.push(f),this._setListener()},b.prototype.dispose=function(){this.__resolveFn=this._animationQueue=this._addQueue=null},b.prototype._setAliases=function(){var a=this.options;if(!v(a)){var b=a.value.aliases;if(h(b))for(var c,d=this._aliases,e=Object.keys(d),f=e.length,g=0;f>g;++g)c=b[e[g]],n(c)&&(d[e[g]]=c)}},b.prototype._addItems=function(a,b,c){var d=this,e=+(a+b),f=[],g=a;for(this._itemLength+=b;e>a;)f.push(this._bindItem(a++));return f.length>0&&(this.itemsLoaded=this._Promise.all(f).then(function(a){if(d._setBlockLength(a),c>0)for(var b=a.length,e=d._container,f=0;b>f;++f)c>f?d._appendAnimatedItem(a[f]):e.insertBefore(a[f],null);else d._appendItems(a);d._updateResource(g-1),t(d.__resolveFn)&&(d.__resolveFn(),d.__resolveFn=null)}).catch(function(a){I(function(){n(a)&&(a=new Error(a)),d._log.error(a)})})),this.itemsLoaded},b.prototype._appendItems=function(a){U(a,this._container)},b.prototype._appendAnimatedItem=function(a){if(k(a)){var b=this._animationQueue;b.push({animation:this._animator.enter(a,Ld,this._container).then(function(){b.shift()}),op:null})}},b.prototype._removeItems=function(a,b){for(var c=o.dispose,d=this.controls,e=a+b;e-->a;)c(d[e]);this._updateResource(d.length-1)},b.prototype._bindItem=function(a){return this.bindableTemplates.bind("item",a,this._getAliases(a))},b.prototype._setBlockLength=function(a){this._blockLength>0||0===a.length||(this._blockLength=a[0].childNodes.length)},b.prototype._updateResource=function(a){var b=this.controls;0>a||a>=b.length||b[a].resources.add(this._getAliases(a))},b.prototype._setListener=function(){this.__listenerSet||(this.observeArray(this._executeEvent),this.__listenerSet=!0)},b.prototype._executeEvent=function(a){var b="_"+a[0].type;t(this[b])&&this[b](a)},b.prototype._getAliases=function(a){var b=0===(1&a),c={},d=this._aliases,e=Re;return c[d.index]={value:a,type:e},c[d.even]={value:b,type:e},c[d.odd]={value:!b,type:e},c[d.first]={value:0===a,type:e},c[d.last]={value:a===this.context.length-1,type:e},c},b.prototype._push=function(a){var b=a[0],c=this._addQueue,d=b.addedCount,e=this._addItems(b.index,d,this._animate?d:0).then(function(){var a=c.indexOf(e);-1!==a&&c.splice(a,1)});c.push(e)},b.prototype._pop=function(a){var b=this,c=a[0],d=c.object.length;if(0!==c.removed.length){var e=c.object.length;this._itemLength>0&&this._itemLength--,this._Promise.all(this._addQueue).then(function(){return b._animate?void b._animateItems(d,1,Md,"leave",!1).then(function(){b._removeItems(e,1)}):void b._removeItems(e,1)})}},b.prototype._unshift=function(a){var b=a[0],c=b.addedCount,d=this._addQueue;if(this._animate){var e=this._animationQueue,f=e.length;this._animateItems(0,c,Ld,null,f>0&&"clone"===e[f-1].op)}var g=this._addItems(b.object.length-c,c,0).then(function(){var a=d.indexOf(g);-1!==a&&d.splice(a,1)});d.push(g)},b.prototype._shift=function(a){var b=this,c=this._addQueue,d=a[0];if(0!==d.removed.length){if(this._animate&&0===c.length){this._animationQueue;c=c.concat([this._animateItems(0,1,Md,"clone",!0)])}var e=d.object.length;this._itemLength>0&&this._itemLength--,this._Promise.all(c).then(function(){b._removeItems(e,1)})}},b.prototype._splice=function(a){var b,c=this,d=a[0],e=d.addedCount,f=this._addQueue,g=this._itemLength,h=this._animate;if(u(e)){h&&this._cancelCurrentAnimations();var i=d.object.length,j=g-i;return void(i>g?(b=this._addItems(g,-j,0).then(function(){var a=f.indexOf(b);-1!==a&&f.splice(a,1)}),f.push(b)):g>i&&(g>=j?this._itemLength-=j:this._itemLength=0,this._Promise.all(f).then(function(){c._removeItems(g-j,j)})))}var k=d.removed.length,l=this._animationQueue;if(e>k){var m,n=(this._Promise,e-k);if(h){m=e;var o=l.length,p=d.index;e-p>g&&(m=g-p),this._animateItems(p,m,Ld,null,o>0&&"clone"===l[o-1].op),m=e-m}else m=0;b=this._addItems(d.object.length-n,n,m).then(function(){var a=f.indexOf(b);-1!==a&&f.splice(a,1)}),f.push(b)}else if(k>e){var q=e>0;h&&!q&&0===f.length&&(f=f.concat([this._animateItems(d.index,k,Md,"clone",!0)]));var r=k-e;g>=r?this._itemLength-=r:this._itemLength=0,this._Promise.all(f).then(function(){if(h&&q){var a=l.length;c._animateItems(d.index,e,Ld,null,a>0&&"clone"===l[a-1].op)}c._removeItems(g-r,r)})}},b.prototype._calculateBlockLength=function(a,b){return this._blockLength},b.prototype._animateItems=function(a,b,c,d,e){var f=this._calculateBlockLength();if(0===f)return this._Promise.resolve();var g=a*f;switch(d){case"clone":return this._handleClonedContainerAnimation(g,b*f+g,c,e===!0);case"leave":return this._handleLeave(g,b*f+g,c);default:return this._handleSimpleAnimation(g,b*f+g,c,e===!0)}},b.prototype._handleSimpleAnimation=function(a,b,c,d){var e=this._container,f=Array.prototype.slice,g=f.call(e.childNodes,a,b);if(0===g.length)return this._Promise.resolve();var h=this._animationQueue,i=this._animator.create(g,c),j=i.current.then(function(){h.shift()}),k=function(){return i.previous.then(function(){j.start()}),j};if(d&&h.length>0){var l=this._cancelCurrentAnimations().then(k);return h.push({animation:j,op:null}),l}return h.push({animation:j,op:null}),k()},b.prototype._handleLeave=function(a,b,c){var d=this._container,e=Array.prototype.slice,f=e.call(d.childNodes,a,b);if(0===f.length)return this._Promise.resolve();var g=this._animationQueue,h=this._animator.leave(f,c).then(function(){g.shift()});return g.push({animation:h,op:"leave"}),h},b.prototype._handleClonedContainerAnimation=function(a,b,c,d){var e=this._container,f=e.cloneNode(!0),g=Array.prototype.slice,h=g.call(f.childNodes,a,b);if(0===h.length)return this._Promise.resolve();var i,j=this._animationQueue,k=this._animator.create(h,c),l=k.current.then(function(){j.shift(),u(i)||i.replaceChild(e,f)}),m=function(){return i=e.parentNode,u(i)||l.isCanceled()?(j.shift(),l):(i.replaceChild(f,e),k.previous.then(function(){l.start()}),l)};if(d&&j.length>0){var n=this._cancelCurrentAnimations().then(m);return j.push({animation:l,op:"clone"}),n}return j.push({animation:l,op:"clone"}),m()},b.prototype._cancelCurrentAnimations=function(){for(var a=this._animationQueue,b=[],c=a.length,d=0;c>d;++d)b.push(a[d].animation.cancel());return this._Promise.all(b)},b._inject={_animator:nb,_Promise:Na},b}(o);a.ForEach=f,Fa.control(Kc,f);var g=function(a){function b(){a.apply(this,arguments),this.replaceWith=Yc}return __extends(b,a),b.prototype.initialize=function(){var a=this;this.on(Ad,function(){a._removeAllElements()})},b.prototype.setTemplate=function(){var a=Zc,b=$c,c=cd,d=ad,e=id,f=bd,g=_c,h=kd,i=md,j=ld,k=nd;this._titleElement=this._createElement(b),this._ogTitleElement=this._createElement(a,i+b),this._twitterTitleElement=this._createElement(a,k+b),this._descriptionElement=this._createElement(a,g),this._ogDescriptionElement=this._createElement(a,i+g),this._twitterDescriptionElement=this._createElement(a,k+g),this._ogUrlElement=this._createElement(a,i+h),this._twitterUrlElement=this._createElement(a,k+h),this._authorElement=this._createElement(a,d),this._googleAuthorElement=this._createElement(c,d),this._fbAuthorElement=this._createElement(a,j+d),this._twitterCreatorElement=this._createElement(a,k+f),this._ogTypeElement=this._createElement(a,i+e)},b.prototype.title=function(a){return n(a)?(this._titleElement.innerText=a,this._setContent([this._ogTitleElement,this._twitterTitleElement],a),a):this._getContent(this._titleElement)},b.prototype.description=function(a){return n(a)?(this._setContent([this._descriptionElement,this._ogDescriptionElement,this._twitterDescriptionElement],a),a):this._getContent(this._descriptionElement)},b.prototype.url=function(a){return n(a)?(this._setContent([this._ogUrlElement,this._twitterUrlElement],a),a):this._getContent(this._ogUrlElement)},b.prototype.author=function(a){return n(a)?(this._setContent([this._authorElement],a),a):this._getContent(this._authorElement)},b.prototype.googleAuthor=function(a){return n(a)?(this._setContent([this._googleAuthorElement],a),a):this._getContent(this._googleAuthorElement)},b.prototype.fbAuthor=function(a){return n(a)?(this._setContent([this._fbAuthorElement],a),a):this._getContent(this._fbAuthorElement)},b.prototype.twitterCreator=function(a){return n(a)?(this._setContent([this._twitterCreatorElement],a),a):this._getContent(this._twitterCreatorElement)},b.prototype.fbType=function(a){return n(a)?(this._setContent([this._ogTypeElement],a),a):this._getContent(this._ogTypeElement)},b.prototype.images=function(a){var b=this;if(w(a)){var c,d,e=Zc,f=md,g=nd;B(function(a){c=b._createElement(e,f+gd),d=b._createElement(e,g+gd),a=b._browser.urlUtils(a).href,b._setContent([c,d],a)},a)}},b.prototype.videos=function(a){var b=this;if(w(a)){var c,d=Zc,e=md;B(function(a){c=b._createElement(d,e+hd),a=b._browser.urlUtils(a).href,b._setContent([c],a)},a)}},b.prototype.loaded=function(){this.url(this._browser.url())},b.prototype.navigated=function(a){this.url(a)},b.prototype._getContent=function(a){var b=a.nodeName.toLowerCase();return b===$c?a.innerText:b===Zc?a.getAttribute(od):b===cd?a.getAttribute(dd):void 0},b.prototype._setContent=function(a,b){for(var c,d,e=Array.prototype.slice.call(this.element.children),f=(a.length,od),g=dd,h=this.element,i=this._titleElement.nextSibling,j=this.dom,k=0;kg;++g)c=a[g],-1!==e.indexOf(c)&&d.removeChild(c)},b._inject={_document:Ra,_browser:Ab},b}(plat.ui.TemplateControl);a.Head=g;var i=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.prototype.contextChanged=function(){this.loaded()},b.prototype.loaded=function(){var a=this.context;n(a)&&Z(this.element,a)},b}(o);a.InnerHtml=i,Fa.control(Lc,i);var j=function(a){function b(){var b=this;a.call(this),this.replaceWith="select",this.priority=120,this.groups={},this.itemsLoaded=new this._Promise(function(a){b.__resolveFn=a})}return __extends(b,a),b.prototype.setTemplate=function(){this.bindableTemplates.add("option",this.element.childNodes);var a=this.options||{},b=a.value||{},c=b.default;if(h(c)){var d=this._document.createElement("option"),e=c.value,f=c.textContent;d.value=v(e)?f:e,d.textContent=v(f)?e:f,this.element.insertBefore(d,null)}if(u(b.group))this._isGrouped=!1;else{var g=this._group=b.group,i=this._document.createElement("optgroup");i.label=pe+g+qe,this.bindableTemplates.add("group",i),this._isGrouped=!0}},b.prototype.contextChanged=function(a,b){var c=this;if(q(a))return void(q(b)||this.itemsLoaded.then(function(){c._removeItems(c.controls.length)}));if(!w(a))return void this._log.debug(this.type+" context set to something other than an Array.");var d=w(a)?a.length:0,e=w(b)?b.length:0;this._setListener(),d>e?this._addItems(d-e,e):e>d&&this._removeItems(e-d)},b.prototype.loaded=function(){if(v(this._isGrouped)){var a=this.options||{},b=a.value||{};this._isGrouped=!u(this._group=b.group)}this._defaultOption=this.element.firstElementChild;var c=this.context;return w(c)?(this._addItems(c.length,0),void this._setListener()):void this._log.debug(this.type+" context set to something other than an Array.")},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.__resolveFn=null,this._defaultOption=null},b.prototype.observeProperties=function(a){var b,c=this.element;this._binder=a,c.multiple?(b=this._setSelectedIndices.bind(this),u(a.evaluate())&&this.inputChanged([]),a.observeProperty(function(){b(a.evaluate(),null,null)},null,!0)):b=this._setSelectedIndex.bind(this),a.observeProperty(b),this.addEventListener(c,"change",this._observeChange,!1)},b.prototype._setSelectedIndex=function(a,b,c,d){var e=this,f=this.element,g=f.value;if(u(a))return d!==!0&&this._document.body.contains(f)?void(f.selectedIndex=-1):void this.itemsLoaded.then(function(){u(e._binder.evaluate())&&e.inputChanged(f.value)});if(n(a)){if(g===a)return;if(!this._document.body.contains(f))return f.value=a,void(f.value!==a&&(f.value=g,this.inputChanged(f.value)))}else{var h;s(a)?(a=a.toString(),h="Trying to bind a value of type number to a "+this.type+"'s element. The value will implicitly be converted to type string."):h="Trying to bind a value that is not a string to a "+this.type+"'s element. The element's selected index will be set to -1.",this._log.debug(h)}this.itemsLoaded.then(function(){f.value=a,(f.value!==a||-1===f.selectedIndex)&&(f.selectedIndex=-1)})},b.prototype._setSelectedIndices=function(a,b,c,d){var e,f=this,g=this.element,h=g.options,i=u(h)?0:h.length,j=u(a);this.itemsLoaded.then(function(){if(!j&&w(a))for(var b,c;i-->0;)e=h[i],b=e.value,c=Number(b),-1!==a.indexOf(b)||s(c)&&-1!==a.indexOf(c)?e.selected=!0:e.selected=!1;else for(d===!0&&u(f._binder.evaluate())&&f.inputChanged(f._getSelectedValues());i-->0;){if(e=h[i],!j&&e.value===""+a)return void(e.selected=!0);e.selected=!1}})},b.prototype._observeChange=function(){var a=this.element;this.inputChanged(a.multiple?this._getSelectedValues():a.value)},b.prototype._getSelectedValues=function(){for(var a,b=this.element.options,c=b.length,d=[],e=0;c>e;++e)a=b[e],a.selected&&d.push(a.value);return d},b.prototype._setListener=function(){this.__listenerSet||(this.observeArray(this._executeEvent),this.__listenerSet=!0)},b.prototype._executeEvent=function(a){var b="_"+a[0].type;t(this[b])&&this[b](a)},b.prototype._addItems=function(a,b){for(var c=this,d=this.bindableTemplates,e=[],f=this._insertOption;a-->0;)e.push(d.bind("option",b).then(f.bind(this,b++)));return e.length>0?this.itemsLoaded=this._Promise.all(e).then(function(){t(c.__resolveFn)&&(c.__resolveFn(),c.__resolveFn=null)}):(t(this.__resolveFn)&&(this.__resolveFn(),this.__resolveFn=null),this.itemsLoaded=new this._Promise(function(a){c.__resolveFn=a})),this.itemsLoaded},b.prototype._insertOption=function(a,b){var c=this.element;if(this._isGrouped){var d=this.groups,e=(this.context[a]||{})[this._group],f=d[e];return u(f)?d[e]=this.bindableTemplates.bind("group",a).then(function(a){return f=d[e]=a.childNodes[1],f.insertBefore(b,null),c.insertBefore(a,null),f}):p(f)?f.then(function(a){a.insertBefore(b,null)}):(f.insertBefore(b,null),this._Promise.resolve())}return c.insertBefore(b,null),this._Promise.resolve()},b.prototype._removeItems=function(a){for(var b=o.dispose,c=this.controls;a-->0;)b(c.pop())},b.prototype._removeItem=function(){return this._isGrouped?void this._resetSelect():void this._removeItems(1)},b.prototype._resetSelect=function(){this._removeItems(this.controls.length),this.groups={},u(this._defaultOption)||this.element.insertBefore(this._defaultOption.cloneNode(!0),null),this._addItems(this.context.length,0)},b.prototype._push=function(a){var b=a[0];this._addItems(b.addedCount,b.index)},b.prototype._pop=function(a){var b=this;0!==a[0].removed.length&&this.itemsLoaded.then(function(){b._removeItem()})},b.prototype._unshift=function(a){if(this._isGrouped)return void this._resetSelect();var b=a[0],c=b.addedCount;this._addItems(c,b.object.length-c-1)},b.prototype._shift=function(a){var b=this;0!==a[0].removed.length&&this.itemsLoaded.then(function(){b._removeItem()})},b.prototype._splice=function(a){var b=this;if(this._isGrouped)return void this._resetSelect();var c=a[0],d=c.addedCount,e=c.removed.length;d>e?this._addItems(d-e,c.object.length-d-1):e>d&&this.itemsLoaded.then(function(){b._removeItems(e-d)})},b.prototype._sort=function(a){this._isGrouped&&this._resetSelect()},b.prototype._reverse=function(a){this._isGrouped&&this._resetSelect()},b._inject={_Promise:Na,_document:Ra},b}(r);a.Select=j,Fa.control(Oc,j);var l=function(a){function c(){a.call(this),this.__condition=!0,this.__firstTime=!0;var b=this._document;this.commentNode=b.createComment(Mc+ye+"placeholder"),this.fragmentStore=b.createDocumentFragment()}return __extends(c,a),c.prototype.contextChanged=function(){var a=this.options.value;if(!q(a))return this._setter(a)},c.prototype.setTemplate=function(){this.bindableTemplates.add("template",Array.prototype.slice.call(this.element.childNodes))},c.prototype.loaded=function(){u(this.options)&&(this._log.warn("No condition specified in "+bc+" for "+this.type+"."),this.options={value:{condition:!0},observe:b});var a=this.contextChanged();return this.__removeListener=this.options.observe(this._setter),a},c.prototype.dispose=function(){t(this.__removeListener)&&(this.__removeListener(),this.__removeListener=null),this.commentNode=null,this.fragmentStore=null},c.prototype._setter=function(a){var b,c=this,d=!!a.condition;return d!==this.__condition||this.__firstTime?(d?b=u(this.__leaveAnimation)?this._addItem():this.__leaveAnimation.cancel().then(function(){return c.__leaveAnimation=null,c._addItem()}):u(this.__enterAnimation)?(this._removeItem(),b=this._Promise.resolve(null)):b=this.__enterAnimation.cancel().then(function(){return c.__enterAnimation=null,c._removeItem()}),this.__condition=d,b):this._Promise.resolve(null)},c.prototype._addItem=function(){var a=this;return k(this.commentNode.parentNode)||this.__firstTime?this.__firstTime?(this.__firstTime=!1,this.__initialBind=this.bindableTemplates.bind("template").then(function(b){var c=a.element;return a.__initialBind=null,c.parentNode===a.fragmentStore?(c.insertBefore(b,null),a._animateEntrance()):(a.__enterAnimation=a._animator.animate(c,Ld),c.insertBefore(b,null),a.__enterAnimation)}).then(function(){a.__enterAnimation=null}),this.__initialBind):p(this.__initialBind)?this.__initialBind.then(function(){return a._animateEntrance()}):this._animateEntrance():this._Promise.resolve(null)},c.prototype._animateEntrance=function(){var a=this,c=this.commentNode,d=c.parentNode;return k(d)?this.__enterAnimation=this._animator.enter(this.element,Ld,d,c).then(function(){a.__enterAnimation=null}):this._animator.resolve().then(b)},c.prototype._removeItem=function(){var a=this;return p(this.__initialBind)?this.__initialBind.then(function(){return a._animateLeave()}):this._animateLeave()},c.prototype._animateLeave=function(){var a=this,c=this.element,d=c.parentElement,e=c.nextSibling;return k(d)?this.__leaveAnimation=this._animator.leave(c,Md).then(function(){a.__leaveAnimation=null,d.insertBefore(a.commentNode,e),a.fragmentStore.insertBefore(c,null)}):this._animator.resolve().then(b)},c._inject={_animator:nb,_Promise:Na,_document:Ra},c}(o);a.If=l,Fa.control(Mc,l);var m=function(a){function b(){a.apply(this,arguments),this.replaceWith="a",this._router=this._Router.currentRouter()}return __extends(b,a),b.prototype.initialize=function(){this._removeClickListener=this.dom.addEventListener(this.element,"click",this._handleClick,!1)},b.prototype.loaded=function(){var a=this.options,b=this.setHref.bind(this);return h(a)?(h(a.value)||(a.value={view:""}),this.addEventListener(this.element,Rd,this._handleTap,!1),b(),void a.observe(b)):(this._log.warn("No options specified for "+this.type+". Please send in options of type plat.ui.controls.ILinkOptions."),a=this.options={},a.value={view:""},void this.setHref())},b.prototype.setHref=function(){var a=this.getHref();if(!q(a)){var b=this.element;b.href=a; -}},b.prototype.getHref=function(){if(!u(this._router)){var a=this.options.value,b=a.view;if(a.isUrl!==!0){var c=a.parameters,d=a.query;if(q(b))return b;b=this._router.generate(b,c,d)}return this._browser.formatUrl(b)}},b.prototype._handleClick=function(a){var b;if(s(a.buttons))b=0===a.buttons?1:a.buttons;else if(s(a.which)&&a.which>0)b=a.which;else switch(a.button){case-1:b=0;break;case 0:b=1;break;case 1:b=4;break;case 2:b=2;break;case 3:b=8;break;case 4:b=16;break;default:b=1}1===b&&a.preventDefault()},b.prototype._handleTap=function(a){var b=this;if(1===a.buttons){var c=this.getHref();v(c)||(a.preventDefault(),L(function(){b._browser.url(c)}))}},b.prototype.dispose=function(){J(this._removeClickListener,3e3)},b._inject={_Router:Db,_Injector:Rb,_browser:Ab},b}(o);a.Link=m,Fa.control(Jc,m)}(K=a.controls||(a.controls={}))}(Of=a.ui||(a.ui={}));var Pf;!function(a){function c(a,b,c,d,e){return i._markupRegex=a.markupRegex,i._newLineRegex=a.newLineRegex,i._ContextManager=b,i._parser=c,i._TemplateControlFactory=d,i._log=e,i}function d(a,b,c,d,e,f){return j._document=a,j._managerCache=b,j._ResourcesFactory=c,j._AttributesFactory=d,j._BindableTemplatesFactory=e,j._log=f,j}function e(){return l}function f(){return m}var g=function(){function a(){}return a.prototype.compile=function(a,b){var c,d,e,f=a.childNodes,g=!u(b),h=g?this._managerCache.read(b.uid):null,i=this._ElementManagerFactory.create;if(f=v(f)?t(a.push)?a:Array.prototype.slice.call(a):Array.prototype.slice.call(f),u(h)){c=f.length;for(var j=0;c>j;++j)e=f[j],e.nodeType===Node.ELEMENT_NODE&&(u(i(e))||this.compile(e)),d=f.length,j+=d-c,c=d}else this._compileNodes(f,h)},a.prototype._compileNodes=function(a,b){for(var c,d,e,f=a.length,g=this._ElementManagerFactory.create,h=this._CommentManagerFactory.create,i=this._TextManagerFactory.create,j=0;f>j;++j){switch(c=a[j],c.nodeType){case Node.ELEMENT_NODE:d=g(c,b),u(d)||this._compileNodes(Array.prototype.slice.call(c.childNodes),d);break;case Node.TEXT_NODE:i(c,b);break;case Node.COMMENT_NODE:h(c,b)}e=a.length,j+=e-f,f=e}},a._inject={_ElementManagerFactory:fb,_TextManagerFactory:ib,_CommentManagerFactory:db,_managerCache:lb},a}();a.Compiler=g,Fa.injectable(cb,g);var i=function(){function a(){this.isClone=!1}return a.hasMarkup=function(b){return a._markupRegex.test(b)},a.findMarkup=function(b){var c,d,e,f,g=[],h=a._wrapExpression,i=a._parser;for(b=b.replace(a._newLineRegex,"");-1!==(c=b.indexOf(pe))&&-1!==(d=b.indexOf(qe));){for(0!==c&&g.push(h(b.slice(0,c)));"}"===b[++d];);e=b.slice(c+2,d-2),"="===e[0]?(f=i.parse(e.slice(1).trim()),f.oneTime=!0,g.push(f)):g.push(i.parse(e.trim())),b=b.slice(d)}return c>-1&&d>=0?g.push(h(b.slice(d))):""!==b&&g.push(h(b)),g},a.build=function(b,c){for(var d,e,f="",g=b.length,i={},j=a._TemplateControlFactory.evaluateExpression,k=0;g>k;++k)if(d=b[k],e=j(d,c,i),h(e))try{f+=JSON.stringify(e,null,4)}catch(b){u(b.description)||(b.description="Cannot stringify object: "+b.description),b.message="Cannot stringify object: "+b.message,a._log.warn(b)}else u(e)||(f+=e);return f},a.observeExpressions=function(b,c,d){for(var e,f,g,h,i,j,k=a.__findUniqueIdentifiers(b),l=k.identifiers,m=k.oneTimeIdentifiers,n={listener:d,uid:c.uid};l.length>0;)f=a.__getObservationDetails(l.pop(),c),g=f.manager,u(g)||g.observe(f.absoluteIdentifier,n);for(;m.length>0;)e=m.pop(),f=a.__getObservationDetails(e,c),g=f.manager,u(g)||f.isDefined||(h=f.absoluteIdentifier,i=g.observe(h,n),j=g.observe(h,{uid:c.uid,listener:function(){i(),j()}}))},a._wrapExpression=function(a){return{evaluate:function(){return a},identifiers:[],aliases:[],expression:a}},a.__findUniqueIdentifiers=function(a){var b,c=a.length;if(1===c)return b=a[0],b.oneTime?{identifiers:[],oneTimeIdentifiers:b.identifiers.slice(0)}:{identifiers:b.identifiers.slice(0),oneTimeIdentifiers:[]};for(var d,e,f,g,h,i={},j={},k=[],l=[],m=0;c>m;++m)for(b=a[m],h=b.oneTime,d=b.identifiers,g=d.length,f=0;g>f;++f)if(e=d[f],h){if(i[e]===!0)continue;j[e]||(j[e]=!0,l.push(e))}else i[e]||(i[e]=!0,k.push(e)),j[e]===!0&&(j[e]=!1,l.splice(l.indexOf(e),1));return{identifiers:k,oneTimeIdentifiers:l}},a.__getObservationDetails=function(b,c){var d,e=a._ContextManager,f=b.split("."),g="",h=!1;if("@"===b[0]){var i,j={},k=f.shift(),l=k.slice(1);if(f.length>0&&(g="."+f.join(".")),i=j[l],u(i)&&(i=j[l]=c.findResource(l)),!u(i)&&!u(i.resource)){var m=i.resource.type;l===Ve?(d=e.getManager(Mf.getRootControl(c)),g=c.absoluteContextPath+g):l===Te?(d=e.getManager(j[l].control),g="context"+g):(m===Ne||m===Re)&&(d=e.getManager(j[l].control),g="resources."+l+".value"+g)}}else h=!v(e.getContext(c.context,f)),h||v(e.getContext(c,f))?(d=e.getManager(Mf.getRootControl(c)),g=c.absoluteContextPath+"."+b):d=null;return{absoluteIdentifier:g,manager:d,isDefined:h}},a.prototype.initialize=function(a,b){this.nodeMap=a,this.parent=b,u(b)||(this.isClone=b.isClone,b.children.push(this))},a.prototype.getParentControl=function(){for(var a,b=this.parent;u(a)&&!u(b);)a=b.getUiControl(),b=b.parent;return a},a.prototype.clone=function(a,b){return 1},a.prototype.bind=function(){},a}();a.NodeManager=i,a.INodeManagerStatic=c,Fa.injectable(hb,c,[Za,ab,Ya,xb,Xa],re);var j=function(a){function b(){a.apply(this,arguments),this.children=[],this.type="element",this.replace=!1,this.hasOwnContext=!1}return __extends(b,a),b.create=function(a,c){var d,e=a.nodeName.toLowerCase(),f=e,g=qf[e]||rf[e],h=!0,i=!1;if(u(g)&&(a.hasAttribute(Rc)?(e=a.getAttribute(Rc).toLowerCase(),g=qf[e]||rf[e],h=!1):a.hasAttribute(Wc+Rc)&&(e=a.getAttribute(Wc+Rc).toLowerCase(),g=qf[e]||rf[e],h=!1)),!u(g)){var j=g.inject(),k=b.locateResources(a);d={control:j,resourceElement:k,nodeName:e,expressions:[],injector:g},i=!0,h&&a.setAttribute(Rc,e);var l=j.replaceWith,m="any"===l&&h;if(!q(l)&&("any"!==l||m)&&l.toLowerCase()!==f){m&&(l="div");var n=b._document.createElement(l);n.nodeType===Node.ELEMENT_NODE&&(a=aa(a,n))}}var o=b._collectAttributes(a.attributes),p=b.getInstance();return o.element=a,o.uiControlNode=d,p.initialize(o,c),o.hasControl||i?(p.setUiControlTemplate(),i?null:p):(p.bind=function(){return[]},p)},b.locateResources=function(a){for(var b,c,d=Array.prototype.slice.call(a.childNodes);d.length>0;)if(b=d.shift(),c=b.nodeName.toLowerCase(),c===Tc||c==="x-"+Tc)return a.removeChild(b);return null},b.clone=function(a,c,d,e,f){u(f)&&(f=b._cloneNodeMap(a.nodeMap,d,c.getUiControl()||c.getParentControl(),e));var g=b.getInstance(),h=!u(e);return g.nodeMap=f,g.parent=c,u(c)||c.children.push(g),g.replace=a.replace,g.replaceNodeLength=a.replaceNodeLength,g.hasOwnContext=a.hasOwnContext,g.isClone=!0,f.hasControl||h||(g.bind=function(){return[]}),h&&b._managerCache.put(e.uid,g),g},b.cloneUiControl=function(a,c){var d=a.uiControlNode;if(!u(d)&&!u(d.injector)){var e=d.control,f=d.injector.inject(),g=b._ResourcesFactory.getInstance(),h=b._AttributesFactory.getInstance();return f.parent=c,c.controls.push(f),f.controls=[],h.initialize(f,a.attributes),f.attributes=h,g.initialize(f,e.resources),f.resources=g,b._ResourcesFactory.addControlResources(f),u(e.innerTemplate)||(f.innerTemplate=e.innerTemplate.cloneNode(!0)),f.type=e.type,f.bindableTemplates=b._BindableTemplatesFactory.create(f,e.bindableTemplates),f.replaceWith=e.replaceWith,f}},b.createAttributeControls=function(a,c,d,e,f){var g,h=a.nodes,i=f===!0?e:a.element;if(k(i)){if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return f===!0?b._copyAttributeNodes(h):[];g=i.attributes}var j,l,m,o,p,q,r=a.attributes,v=[],w=h.length;for(q=0;w>q;++q)l=h[q],p=l.nodeName,m=l.injector,o=null,u(m)||(o=m.inject(),l.control=o,o.parent=c,o.element=i,j=b._AttributesFactory.getInstance(),j.initialize(o,r),o.attributes=j,o.type=p,n(o.uid)||(o.uid=M(Ub)),o.templateControl=d),f===!0&&(v.push({control:o,expressions:l.expressions,node:g?g.getNamedItem(p)||g.getNamedItem(Wc+p):null,nodeName:p,injector:m}),u(o)||(u(c)||c.controls.push(o),t(o.initialize)&&o.initialize()));if(!f)for(h.sort(function(a,b){var c=a.control,d=b.control;if(u(c))return 1;if(u(d))return-1;var e=s(c.priority)?c.priority:0,f=s(d.priority)?d.priority:0;return f-e}),q=0;w>q;++q)l=h[q],o=l.control,u(o)||(u(c)||c.controls.push(o),t(o.initialize)&&o.initialize());return v},b.getInstance=function(){var a=new b;return a._Promise=ma(Na),a._ContextManager=i._ContextManager,a._compiler=ma(cb),a._CommentManagerFactory=ma(db),a._ControlFactory=ma(Pa),a._TemplateControlFactory=i._TemplateControlFactory,a._BindableTemplatesFactory=b._BindableTemplatesFactory,a._log=b._log,a},b._collectAttributes=function(a){for(var c,d,e,f,g,h,j,k,l=[],m=i.hasMarkup,n=i.findMarkup,o=i._parser,p=(i.build,!1),q=a.length,r={},s=0;q>s;++s)c=a[s],e=c.value,d=c.name.replace(/^data-/i,"").toLowerCase(),k=qf[d]||rf[d],d===Uc?""!==e&&(f=o.parse(e),1!==f.identifiers.length&&b._log.warn("Incorrect "+Uc+": "+e+", must contain a single identifier."),g=f.identifiers[0]):d!==Rc&&(h=m(e),j=h?n(e):[],p||!h&&u(k)||(p=!0),l.push({control:null,node:c,nodeName:d,expressions:j,injector:k})),r[N(d)]=e;return{element:null,attributes:r,nodes:l,childContext:g,hasControl:p}},b._copyAttributeNodes=function(a){for(var b,c=[],d=a.length,e=0;d>e;++e)b=a[e],c.push({expressions:b.expressions,nodeName:b.nodeName});return c},b._cloneNode=function(a,b,c){return{control:c,injector:a.injector,expressions:a.expressions,node:b,nodeName:a.nodeName}},b._cloneNodeMap=function(a,c,d,e){var f=a.hasControl,g={attributes:a.attributes,childContext:a.childContext,nodes:[],element:c,uiControlNode:u(a.uiControlNode)?null:b._cloneNode(a.uiControlNode,c,e),hasControl:f};return f&&(g.nodes=b.createAttributeControls(a,d,e,c,!0)),g},b.prototype.clone=function(a,c,d){var e,f,g,h,i=this.replace,j=this.children,k=u(d)?null:d.uiControlNode.control,l=!u(k);if(l||(k=b.cloneUiControl(this.nodeMap,c.getUiControl()||c.getParentControl()),l=!u(k)),i){var m=a.parentNode.childNodes,n=Array.prototype,o=n.indexOf.call(m,a);e=n.slice.call(m,o+1,o+this.replaceNodeLength),f=b.clone(this,c,null,k,d),k.elementNodes=e,k.startNode=a,k.endNode=e.pop(),g=j.shift(),h=j.shift(),g.clone(k.startNode,f),h.clone(k.endNode,f),t(k.initialize)&&k.initialize()}else e=Array.prototype.slice.call(a.childNodes),f=b.clone(this,c,a,k,d),d=f.nodeMap,l&&(k.element=a,t(k.initialize)&&k.initialize());for(var p=j.length,q=0,r=0;p>r;++r)q+=j[r].clone(e[q],f);return i?(j.unshift(h),j.unshift(g),q+2):1},b.prototype.initialize=function(c,d,e){a.prototype.initialize.call(this,c,d);var f,g=c.uiControlNode,h=!u(g);h&&(this._populateUiControl(),f=g.control,this.hasOwnContext=f.hasOwnContext),c.hasControl&&b.createAttributeControls(c,this.getParentControl(),f),!e&&h&&t(f.initialize)&&f.initialize()},b.prototype.bind=function(){var a=this,b=this.nodeMap,c=this.getParentControl(),d=b.uiControlNode,e=[];if(!u(d)){var f,g=d.control,i=b.childContext,j=this._ContextManager.getManager,k=u(c)?Ha:c.absoluteContextPath,l=this._TemplateControlFactory,m=!g.hasOwnContext;if(e.push(g),m&&!u(i))if("@"===i[0]){var n=i.split("."),o=n.shift(),p=o.slice(1),q=l.findResource(g,p);if(h(q)){var r=q.resource;i=n.length>0?"."+n.join("."):"",p===Ve?k+=i:p===Te?k=Ha+i:r.type===Ne||r.type===Re?(k="resources."+p+".value"+i,g.root=q.control):this._log.warn('Only resources of type "observable" can be set as context.')}else this._log.warn("Could not set the context of "+g.type+' with the resource specified as "'+i+'".')}else k+="."+i;h(g.root)||(g.root=this._ControlFactory.getRootControl(g)||g),f=j(g.root);var s=!1;m?(g.context=f.getContext(k.split("."),!1),s=v(g.context)&&!this._BindableTemplatesFactory.isBoundControl(g)):k=Ha,s?this.contextPromise=new this._Promise(function(b,c){var d=f.observe(k,{uid:g.uid,listener:function(c,e){v(c)||(d(),g.context=c,a._beforeLoad(g,k),b())}})}):this._beforeLoad(g,k)}return this._observeControlIdentifiers(b.nodes,c,e,b.element),e},b.prototype.setUiControlTemplate=function(a){var b=this,c=this.nodeMap.uiControlNode;if(!u(c)){var d=c.control;return void(this.templatePromise=this._TemplateControlFactory.determineTemplate(d,a).then(function(a){b.templatePromise=null,b._initializeControl(d,a.cloneNode(!0))},function(a){if(b.templatePromise=null,u(a)){var c=a;b._BindableTemplatesFactory.isBoundControl(d)&&(c=U(d.element.childNodes)),b._initializeControl(d,c)}else I(function(){n(a)&&(a=new Error(a)),b._log.error(a)})}))}u(this.parent)&&this.bindAndLoad()},b.prototype.getUiControl=function(){var a=this.nodeMap.uiControlNode;if(!u(a))return a.control},b.prototype.fulfillTemplate=function(){var a=this;return u(this.templatePromise)?this._fulfillChildTemplates():this.templatePromise.then(function(){return a._fulfillChildTemplates()})},b.prototype.fulfillAndLoad=function(){var a=this;return this.fulfillTemplate().then(function(){return a.bindAndLoad()}).catch(function(b){I(function(){n(b)&&(b=new Error(b)),a._log.error(b)})})},b.prototype.bindAndLoad=function(){var a,b=this,c=this.bind();return a=p(this.contextPromise)?this.contextPromise.then(function(){return b._bindChildren()}):this._bindChildren(),a.then(function(){return b._loadControls(c,b.getUiControl())}).catch(function(a){I(function(){n(a)&&(a=new Error(a)),b._log.error(a)})})},b.prototype.observeRootContext=function(a,b){var c=this;return b=b.bind(this),u(a.context)?new this._Promise(function(d){var e=c._ContextManager.getManager(a).observe(Ha,{listener:function(){e(),b().then(d)},uid:a.uid})}).catch(function(a){I(function(){n(a)&&(a=new Error(a)),c._log.error(a)})}):b()},b.prototype._beforeLoad=function(a,c){var d=this._ContextManager.getManager(a.root),e=this._TemplateControlFactory;a.zCC__plat=d.observe(c,{uid:a.uid,priority:oe,listener:function(b,c){a.context=b}}),e.setAbsoluteContextPath(a,c),e.setContextResources(a),b._ResourcesFactory.bindResources(a.resources)},b.prototype._bindChildren=function(){for(var a,b=this.children,c=b.length,d=[],e=0;c>e;++e)a=b[e],a.hasOwnContext?d.push(this.isClone?a.observeRootContext(a.getUiControl(),a.bindAndLoad):a.observeRootContext(a.getUiControl(),a.fulfillAndLoad)):v(a.children)?a.bind():d.push(a.bindAndLoad());return this._Promise.all(d)},b.prototype._loadControls=function(a,b){var c,d,e,f,g=a.length,h=this._ControlFactory.load,i=u(b);if(i)f=0;else{var j=b.priority;e=s(j)?j:100,f=1}for(;g>f;++f)c=a[f],c.templateControl=b,!i&&e>c.priority&&(i=!0,d=h(b)),h(c);return i||(d=h(b)),d},b.prototype._populateUiControl=function(){var a=this.nodeMap,c=this.getParentControl(),d=a.uiControlNode,e=d.control,f=e.uid,g=e.resources,i=a.element,j=Array.prototype.slice.call(i.childNodes),k=b._AttributesFactory.getInstance(),l=this.replace=null===e.replaceWith||""===e.replaceWith;n(f)||(f=e.uid=M(Ub)),b._managerCache.put(f,this),u(c)||e.parent===c||(c.controls.push(e),e.parent=c),t(i.setAttribute)&&i.setAttribute(Hd,""),e.element=i,e.controls=[],k.initialize(e,a.attributes),e.attributes=k,h(g)&&t(g.add)?g.add(d.resourceElement):(g=b._ResourcesFactory.getInstance(),g.initialize(e,d.resourceElement),e.resources=g),b._ResourcesFactory.addControlResources(e),e.type=d.nodeName,e.bindableTemplates=e.bindableTemplates||this._BindableTemplatesFactory.create(e),!(j.length>0)||q(e.templateString)&&q(e.templateUrl)||(e.innerTemplate=U(j)),l&&this._replaceElement(e,a)},b.prototype._replaceElement=function(a,c){var d=c.element,e=d.parentNode,f=b._document,g=a.type,h=a.uid,i=a.startNode=f.createComment(g+" "+h+Ae),j=a.endNode=f.createComment(g+" "+h+Be),k=this._CommentManagerFactory.create;k(i,this),k(j,this),e.insertBefore(i,d),e.insertBefore(j,d.nextSibling),a.elementNodes=_(d),a.element=c.element=null},b.prototype._initializeControl=function(a,c){var d,e=this.nodeMap.element,f=this.replace;if(!u(c)){var g=b.locateResources(c);u(g)||a.resources.add(b._ResourcesFactory.parseElement(g)),f?(d=a.endNode,a.elementNodes=Array.prototype.slice.call(c.childNodes),$(d.parentNode,c,d)):$(e,c,e.lastChild)}if(t(a.setTemplate)&&a.setTemplate(),f){this._compiler.compile(a.elementNodes,a);var h=a.startNode,i=h.parentNode,j=Array.prototype.slice.call(i.childNodes);d=a.endNode,a.elementNodes=j.slice(j.indexOf(h)+1,j.indexOf(d)),this.replaceNodeLength=a.elementNodes.length+2}else this._compiler.compile(e,a);u(a.parent)&&this.fulfillAndLoad()},b.prototype._observeControlIdentifiers=function(a,b,c,d){for(var e,f,g,h=a.length,j=!u(b),k=0,l=this.replace,m=[];h>k;++k)e=a[k],f=e.control,j&&e.expressions.length>0&&(g=o.getInstance(),m.push(g),g.initialize(d,e,b,c,l),i.observeExpressions(e.expressions,b,g.attributeChanged.bind(g))),u(f)||c.push(f);for(h=m.length,k=0;h>k;++k)m[k].attributeChanged()},b.prototype._fulfillChildTemplates=function(){for(var a,b=this,c=this.children,d=c.length,e=[],f=0;d>f;++f)a=c[f],v(a.children)||e.push(a.fulfillTemplate());return this._Promise.all(e).catch(function(a){I(function(){n(a)&&(a=new Error(a)),b._log.error(a)})})},b._inject={_Promise:Na,_ContextManager:ab,_compiler:cb,_CommentManagerFactory:db,_ControlFactory:Pa,_TemplateControlFactory:xb,_BindableTemplatesFactory:qb,_log:Xa},b}(i);a.ElementManager=j,a.IElementManagerFactory=d,Fa.injectable(fb,d,[Ra,lb,vb,ob,qb,Xa],ue),Fa.injectable(gb,j,null,te);var l=function(a){function c(){a.apply(this,arguments),this.type="text"}return __extends(c,a),c.create=function(a,d){var e=a.nodeValue,f=new c;if(i.hasMarkup(e)){var g=i.findMarkup(e),h={nodes:[{node:a,expressions:g}]};return f.initialize(h,d),f}return f.initialize(null,d),f.bind=b,f},c._cloneNodeMap=function(a,b){var c=a.nodes[0],d={nodes:[{expressions:c.expressions,nodeName:c.nodeName,node:b}]};return d},c._clone=function(a,d,e){var f=a.nodeMap,g=new c;return u(f)?(g.initialize(null,e),g.bind=b):g.initialize(c._cloneNodeMap(f,d),e),g},c.prototype.clone=function(a,b){return c._clone(this,a,b),1},c.prototype.bind=function(){var a=this.getParentControl(),b=this.nodeMap.nodes[0],c=b.node,d=b.expressions;i.observeExpressions(b.expressions,a,this._setText.bind(this,c,a,d)),this._setText(c,a,d)},c.prototype._setText=function(a,b,c){a.nodeValue=i.build(c,b||{})},c}(i);a.TextManager=l,a.ITextManagerFactory=e,Fa.injectable(ib,e,null,ue),Fa.injectable(jb,l,null,te);var m=function(a){function b(){a.apply(this,arguments),this.type="comment"}return __extends(b,a),b.create=function(a,c){var d=new b;return d.initialize({nodes:[{node:a}]},c),d},b.prototype.clone=function(a,c){return b.create(a,c),1},b}(i);a.CommentManager=m,a.ICommentManagerFactory=f,Fa.injectable(db,f,null,ue),Fa.injectable(eb,m,null,te);var o=function(){function a(){this._lastValues={}}return a.getInstance=function(){var b=new a;return b._NodeManager=ma(hb),b._markupRegex=ma(Za).markupRegex,b},a.prototype.initialize=function(a,b,c,d,e){this.element=a,this.node=b,this.parent=c,this._controls=d,this.replace=e,"class"!==b.nodeName?this.attributeChanged=this._staticAttributeChanged:(this.attributeChanged=this._dynamicAttributeChanged,this._bindingExpressions=this._getBindingExpressions(b.expressions))},a.prototype._getBindingExpressions=function(a){return z(function(a){return a.identifiers.length>0||a.aliases.length>0||""===a.expression.trim()},a)},a.prototype._dynamicAttributeChanged=function(){var a,b,c,d=this.node,e=d.node,f=this._NodeManager.build(this._bindingExpressions,this.parent),g=f.split(/\s/),h=this._lastValues,i=this.element;for(this._NodeManager.hasMarkup(e.value)&&(e.value=e.value.replace(this._markupRegex,"")),b=g.length,c=0;b>c;++c)h[g[c]]=!0;for(g=Object.keys(h),b=g.length,c=0;b>c;++c)a=g[c],h[a]?(ga(i,a),h[a]=!1):(P(h,a),ha(i,a));f=e.value,this._notifyAttributes(d.nodeName,f)},a.prototype._staticAttributeChanged=function(){var a=this._controls,b=this.node,c=(a.length,N(b.nodeName)),d=this._NodeManager.build(b.expressions,this.parent);this._notifyAttributes(c,d),this.replace||(b.node.value=d)},a.prototype._notifyAttributes=function(a,b){for(var c,d,e=this._controls,f=e.length,g=0;f>g;++g)c=e[g].attributes,d=c[a],c[a]=b,c._attributeChanged(a,b,d)},a}();a.AttributeManager=o}(Pf=a.processing||(a.processing={}));var Qf;!function(a){function c(a){return a.history}function d(a){return r._regex=a,r}function e(){return C}function g(){return I}var i=function(){function a(){this.uid=M(Ub),this.isRoot=!1,this._removeUrlListener=b,this._ignoreOnce=!1,this._backNavigate=!1}return a.prototype.initialize=function(b){this._router=b,h(b)&&b.isRoot&&!h(a._root)&&(this.isRoot=!0,a._root=this,this._observeUrl())},a.prototype.navigate=function(a,b){var c=this;b=h(b)?b:{};var d;return this.finishNavigating().then(function(){if(d=b.isUrl?a:c._generate(a,b.parameters,b.query),!n(d)){var e=new Error("Cannot serialize url from input parameters, check your view reference.");c._log.error(e)}return c._navigate(d,b.replace)})},a.prototype.finishNavigating=function(){var c=a._root._router;return c.navigating?c.finishNavigating.catch(b):this._Promise.resolve()},a.prototype.goBack=function(b){var c=this;b=h(b)?b:{};var d=Number(b.length);if(s(d)||(d=1),!this.isRoot)return a._root.goBack(b);var e=this._browser;e.url();return this._backNavigate=!0,this.finishNavigating().then(function(){return c._goBack(d)})},a.prototype.dispose=function(){this._removeUrlListener(),P(this,"router")},a.prototype._navigate=function(b,c){var d=this;return this.isRoot?new this._Promise(function(a,e){d._resolveNavigate=a,d._rejectNavigate=e,d._browser.url(b,c)}):a._root._navigate(b,c)},a.prototype._goBack=function(a){var b=this;return new this._Promise(function(c,d){b._resolveNavigate=c,b._rejectNavigate=d,b._browser.back(a)})},a.prototype._observeUrl=function(){var a=this;if(h(this._router)){var b,c,d=(this._browserConfig,this._EventManager),e=ma(Yc),f=h(e)&&t(e.navigated),g=function(d){a._ignoreOnce=!0,a._previousUrl=b,a._browser.url(b,!c),a._history.go(-1),t(a._rejectNavigate)&&a._rejectNavigate(d),q(d)||a._log.warn(d)};this._previousUrl=this._browser.url(),d.dispose(this.uid),d.on(this.uid,Ed,function(){var b=d.dispatch(Gd,a,d.DIRECT);b.defaultPrevented||a.goBack()}),d.on(this.uid,Bd,function(h,i){return a._ignoreOnce?(a._ignoreOnce=!1,void(t(a._resolveNavigate)&&a._resolveNavigate())):(c=a._backNavigate,a._backNavigate=!1,b=a._previousUrl,h=d.dispatch(yd,a,d.DIRECT,[i]),h.defaultPrevented?void g(new Error("Navigation prevented during "+yd+" event")):void a.finishNavigating().then(function(){return d.dispatch(Ad,a,d.DIRECT,[i]),a._router.navigate(i.pathname,i.query)}).then(function(){a._previousUrl=i.pathname,t(a._resolveNavigate)&&a._resolveNavigate(),f&&e.navigated(i.href),d.dispatch(zd,a,d.DIRECT,[i])},g))})}},a.prototype._generate=function(a,b,c){return u(this._router)?void 0:q(a)?a:this._router.generate(a,b,c)},a._inject={_Promise:Na,_Injector:Rb,_browserConfig:Bb,_browser:Ab,_EventManager:Ua,_window:Fb,_log:Xa,_history:Sb},a}();a.Navigator=i,Fa.injectable(_a,i,null,te),a.History=c,Fa.injectable(Sb,c,[Fb]);var j,k=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],l=new RegExp("(\\"+k.join("|\\")+")","g"),m={},o={},p={},r=function(){function a(){this.type=je,this.name="",this.regex=""}return a.parse=function(b,c,d){if(!(n(b)&&w(c)&&h(d)))return[];"/"===b[0]&&(b=b.slice(1));for(var e,f,g,i=b.split("/"),k=i.length,l=a.__findSegment,q=[],r=a._regex,s=0;k>s;++s)e=i[s],""===e?(h(j)||(j=ma(Jb)),q.push(j)):(g=e.match(r.dynamicSegmentsRegex))?(f=g[1],q.push(l(f,Mb,m)),c.push(f),d.dynamics++):(g=e.match(r.splatSegmentRegex))?(f=g[1],q.push(l(f,Nb,o)),c.push(f),d.splats++):(q.push(l(e,Kb,p)),d.statics++);return q},a.__findSegment=function(a,b,c){var d=c[a];return h(d)||(d=c[a]=ma(b),d.initialize(a)),d},a.prototype.initialize=function(a){this.name=a},a.prototype.reduceCharacters=function(a,b){return h(this._specification)&&(b=a(b,this._specification)),b},a.prototype.generate=function(a){return this.name},a}();a.BaseSegment=r,a.IBaseSegmentFactory=d,plat.register.injectable(Ib,d,[Za],ue),plat.register.injectable(Jb,r,null,te);var x=function(a){function b(){a.apply(this,arguments),this.type=le}return __extends(b,a),b.prototype.initialize=function(b){a.prototype.initialize.call(this,b),this.regex=this.name.replace(l,"\\$1")},b.prototype.reduceCharacters=function(a,b){for(var c=this.name,d=c.length,e=b,f=0;d>f;++f)e=a(e,{validCharacters:c[f]});return e},b}(r);a.StaticSegment=x,plat.register.injectable(Kb,x,null,te);var y=function(a){function b(){a.apply(this,arguments),this.type=ke}return __extends(b,a),b.prototype.generate=function(a){return h(a)?a[this.name]:void 0},b}(r);a.VariableSegment=y,plat.register.injectable(Lb,y,null,te);var z=function(a){function b(){a.apply(this,arguments),this.type=me,this.regex="(.+)",this._specification={invalidCharacters:"",repeat:!0}}return __extends(b,a),b}(y);a.SplatSegment=z,plat.register.injectable(Nb,z,null,te);var A=function(a){function b(){a.apply(this,arguments),this.type=ne,this.regex="([^/]+)",this._specification={invalidCharacters:"/",repeat:!0}}return __extends(b,a),b}(y);a.DynamicSegment=A,plat.register.injectable(Mb,A,null,te);var C=function(){function a(){this.initialize()}return a.compile=function(a,b){return a.reduceCharacters(function(a,b){return a.add(b)},b)},a.link=function(a,b){for(var c,d,e,f,g,h=a.delegates,i=a.regex,j=h.length,k=b.match(i),l=1,m=[],n=0;j>n;++n){for(g=h[n],c=g.names,d={},e=0,f=c.length;f>e;++e)d[c[e]]=k[l++];m.push({delegate:g.delegate,parameters:d,isDynamic:f>0})}return m},a.recognize=function(a,b){for(var c,d=[],e=b.length,f=0;e>f;++f)c=b[f],d=d.concat(c.match(a));return d},a.sort=function(a){if(!w(a))return a;var b,c,d,e,f,g,h,i;return a.sort(function(a,j){if(b=a.types,f=j.types,c=b.splats,g=f.splats,c!==g)return c-g;if(d=b.statics,e=b.dynamics,h=f.statics,i=f.dynamics,c>0){if(d!==h)return h-d;if(e!==i)return i-e}return e!==i?e-i:d!==h?h=d:0})},a.prototype.initialize=function(a){this.specification=a,this.nextStates=[]},a.prototype.add=function(b){var c=this._find(b);return h(c)?c:(c=ma(a),c.initialize(b),this.nextStates.push(c),b.repeat&&c.nextStates.push(c),c)},a.prototype.match=function(a){var b,c,d=[];return this._someChildren(function(e){return b=e.specification,c=b.validCharacters,n(c)&&c.indexOf(a)>-1?void d.push(e):(c=b.invalidCharacters,void(n(c)&&-1===c.indexOf(a)&&d.push(e)))}),d},a.prototype._find=function(a){var b,c,d=a.validCharacters,e=a.invalidCharacters;return this._someChildren(function(a){return b=a.specification,b.validCharacters===d&&b.invalidCharacters===e?(c=a,!0):void 0}),c},a.prototype._someChildren=function(a){for(var b=this.nextStates,c=b.length,d=0;c>d;++d)if(a(b[d])===!0)return!0;return!1},a}();a.State=C,a.IStateStatic=e,plat.register.injectable(Ob,e,null,re),plat.register.injectable(Pb,C,null,te);var E=function(){function a(){this._namedRoutes={}}return a.prototype.register=function(a,b){if(w(a)){for(var c,d=this._rootState,e=a.length,f=["^"],g={statics:0,dynamics:0,splats:0},i=[],j=[],k=0;e>k;++k)c=this._parse(a[k],i,g),j=j.concat(c),d=this._compile(c,d,f);d=this._finalize(d,f),d.delegates=i,d.regex=new RegExp(f.join("")+"$"),d.types=g,h(b)&&n(b.name)&&(this._namedRoutes[this._toLowerCase(b.name)]={segments:j,delegates:i})}},a.prototype.recognize=function(a){var b=!1,c=[];return a=this._addLeadingSlash(a),b=this._hasTrailingSlash(a),b&&(a=a.substr(0,a.length-1)),c=this._filter(this._findStates(a)),this._link(c[0],a,b)},a.prototype.generate=function(a,b){a=this._toLowerCase(a);var c,d,e=this._namedRoutes[a],f="";if(h(e)){c=e.segments,d=c.length;for(var g=0;d>g;g++){var i=c[g];i.type!==je&&(f+="/",f+=i.generate(b))}return f=this._addLeadingSlash(f)}},a.prototype.delegatesFor=function(a){a=this._toLowerCase(a);var b,c=this._namedRoutes[a];return h(c)?(b=c.delegates,w(b)?b.slice(0):[]):[]},a.prototype.exists=function(a){return h(this._namedRoutes[this._toLowerCase(a)])},a.prototype._toLowerCase=function(a){return n(a)?a.toLowerCase():a},a.prototype._finalize=function(a,b){return a===this._rootState&&(a=a.add({validCharacters:"/"}),b.push("/")),a},a.prototype._parse=function(a,b,c){var d=[];return b.push({delegate:a.delegate,names:d}),this._BaseSegmentFactory.parse(a.pattern,d,c)},a.prototype._compile=function(a,b,c){for(var d,e=a.length,f=this._State.compile,g=0;e>g;++g)d=a[g],d.type!==je&&(b=b.add({validCharacters:"/"}),b=f(d,b),c.push("/"+d.regex));return b},a.prototype._addLeadingSlash=function(a){return a=decodeURI(a),"/"!==a[0]&&(a="/"+a),a},a.prototype._hasTrailingSlash=function(a){var b=a.length;return b>1&&"/"===a[b-1]},a.prototype._findStates=function(a){for(var b=[this._rootState],c=this._State.recognize,d=a.length,e=0;d>e&&(b=c(a[e],b),0!==b.length);++e);return b},a.prototype._filter=function(a){for(var b,c=a.length,d=[],e=0;c>e;++e)b=a[e],w(b.delegates)&&d.push(b);return this._State.sort(d)},a.prototype._link=function(a,b,c){return h(a)&&w(a.delegates)?(c&&this._isDynamic(a)&&(b+="/"),this._State.link(a,b)):void 0},a.prototype._isDynamic=function(a){return"(.+)$"===a.regex.source.slice(-5)},a._inject={_BaseSegmentFactory:Ib,_State:Ob,_rootState:Pb},a}();a.RouteRecognizer=E,plat.register.injectable(Qb,E,null,te);var G="/*childRoute",H=G.length,I=function(){function a(){this.navigating=!1,this.children=[],this.isRoot=!1,this._paramTransforms={},this._queryTransforms={},this._interceptors={},this._ports=[],this._resolve=this._Promise.resolve.bind(this._Promise),this._reject=this._Promise.reject.bind(this._Promise),this.uid=M(Ub),this.isRoot=u(a.currentRouter()),a.currentRouter(this),this.initialize()}return a.currentRouter=function(b){return u(b)||(a.__currentRouter=b),a.__currentRouter},a.prototype.initialize=function(a){this.parent=a},a.prototype.addChild=function(a){return u(a)||this.children.indexOf(a)>-1?a:(a.initialize(this),this.children.push(a),a)},a.prototype.removeChild=function(a){var b=this.children,c=this.children.indexOf(a);0>c||b.splice(c,1)},a.prototype.register=function(a){var c=this,d=this._ports;return u(a)||d.indexOf(a)>-1?this._resolve():(d.push(a),h(this.currentRouteInfo)?(this.navigating=!0,this._resolve(this.finishNavigating).catch(b).then(function(){var a=f(c.currentRouteInfo,!0);return c.finishNavigating=c._canNavigateTo(a).then(function(b){return b?(c.currentRouteInfo=void 0,c._performNavigation(a)):void 0}).then(function(){c.navigating=!1,c.currentRouteInfo=a},function(){c.navigating=!1})})):this._resolve())},a.prototype.unregister=function(a){var b=this._ports,c=b.indexOf(a);0>c||(b.splice(c,1),0!==b.length||u(this.parent)||this.parent.removeChild(this))},a.prototype.configure=function(a){var b=this;return w(a)?B(function(a){b._configureRoute(a)},a):this._configureRoute(a),this._forceNavigate()},a.prototype.unknown=function(a){return this._unknownHandler=a,this},a.prototype.param=function(a,b,c){return this._addHandler(a,b,c,this._paramTransforms)},a.prototype.queryParam=function(a,b,c){return this._addHandler(a,b,c,this._queryTransforms)},a.prototype.intercept=function(a,b){v(b)&&(b="*");var c=b;"*"!==b&&(b=this._Injector.convertDependency(b)),b===He&&(b=c);var d=this._interceptors[b];return w(d)||(d=this._interceptors[b]=[]),d.push(a),this},a.prototype.navigate=function(a,b,c){var d=this;h(b)||(b={});var e=this._resolve,g=(this._reject,S(b));if("/"===a&&(a=""),c=c===!0,!n(a)||this.navigating||!c&&a===this._previousUrl&&g===this._previousQuery)return this.navigating?this.finishNavigating.then(function(){return d.navigate(a,b,c)}):e();var i,j,k,l=this._recognizer.recognize(a);if(q(l)){if(l=this._childRecognizer.recognize(a),q(l)){if(this._previousUrl=a,this._previousQuery=g,t(this._unknownHandler)){var m={segment:a,view:void 0};return e(this._unknownHandler(m)).then(function(){var b=m.view;if(!v(b))return d.configure({pattern:a,view:b})})}return e()}if(i=l[0],i.query=b,j=i.delegate.pattern,j=j.substr(0,j.length-H),this._previousPattern===j)return this.navigating=!0,this.finishNavigating=this._navigateChildren(i).then(function(){d._previousUrl=a,d._previousQuery=g,d.navigating=!1},function(a){throw d.navigating=!1,a})}else i=l[0],i.query=b,j=i.delegate.pattern;k=this._recognizer.generate(i.delegate.view,i.parameters);var o=this._previousSegment;this._previousSegment=k,this.navigating=!0;var p=this._nextRouteInfo=f(i,!0);return this.finishNavigating=this._canNavigate(i).then(function(b){if(!b)throw d.navigating=!1,new Error("Not cleared to navigate");return d._previousUrl=a, -d._previousQuery=g,d._performNavigation(i)}).then(function(){d._previousPattern=j,d._previousSegment=k,d.currentRouteInfo=p,d.navigating=!1},function(a){throw d._previousSegment=o,d.navigating=!1,a})},a.prototype.generate=function(a,b,c){var d=a;a=this._Injector.convertDependency(a),a===He&&(a=d);for(var e=this,f="";!u(e)&&!e._recognizer.exists(a);)e=e.parent;if(u(e))throw new Error("Route for "+a+" does not exist.");for(var g,h=e._recognizer.generate(a,b);!u(e=e.parent);)g=e._previousSegment,g=u(g)||"/"===g?"":g,f=g+f;return f+h+S(c)},a.prototype._configureRoute=function(a){var b=(this._resolve,this._Injector.convertDependency(a.view)),c=a.alias||b;if(b!==He){a.view=b,a.alias=c||b;var d={pattern:a.pattern,delegate:a},e=a.pattern+G,f={pattern:e,delegate:{pattern:e,view:b,alias:c}};this._recognizer.register([d],{name:c}),this._childRecognizer.register([f])}},a.prototype._addHandler=function(a,b,c,d){v(c)&&(c="*");var e=c;if("*"!==c&&(c=this._Injector.convertDependency(c)),c===He&&(c=e),q(c)||q(b))return this;var f=d[c];h(f)||(f=d[c]={});var g=f[b];return w(g)||(g=f[b]=[]),g.push(a),this},a.prototype._forceNavigate=function(){var a,b=this,c=this._resolve;if(this.navigating)return this.finishNavigating.then(function(){return b._forceNavigate()});if(this.isRoot&&q(this._previousUrl)){var d=this._browser.urlUtils();this._previousUrl=d.pathname,a=d.query}return q(this._previousQuery)||(a=R(this._previousQuery)),q(this._previousUrl)?c():this.navigate(this._previousUrl,a,!0)},a.prototype._navigateChildren=function(a){var c=this._getChildRoute(a);return u(c)?this._resolve():D(function(b){return b.navigate(c,a.query)},this.children).then(b)},a.prototype._getChildRoute=function(a){if(!u(a)){var b=a.parameters.childRoute;return n(b)||(b=""),"/"+b}},a.prototype._performNavigation=function(a){var b=this,c=this._isSameRoute(this._nextRouteInfo);return this._performNavigateFrom(c).then(function(){return c?void 0:D(function(b){return b.navigateTo(a)},b._ports)}).then(function(){return b._navigateChildren(a)})},a.prototype._performNavigateFrom=function(a){var c=this;return D(function(a){return a._performNavigateFrom()},this.children).then(function(){return a?void 0:D(function(a){return a.navigateFrom()},c._ports)}).then(b)},a.prototype._canNavigate=function(a){var b=this,c=(this.currentRouteInfo,this._isSameRoute(this._nextRouteInfo));return this._canNavigateFrom(c).then(function(d){return d&&b._canNavigateTo(a,c)})},a.prototype._canNavigateFrom=function(a){var b=this;return this._Promise.all(this.children.reduce(function(a,b){return a.concat(b._canNavigateFrom())},[])).then(T).then(function(c){return!c||a?[c]:D(function(a){return a.canNavigateFrom()},b._ports)}).then(T)},a.prototype._canNavigateTo=function(a,b){var c=this;return q(this._ports)?this._resolve(!0):this._callAllHandlers(a.delegate.alias,a.parameters,a.query).then(function(){return c._callInterceptors(a)}).then(function(d){return d===!1||b?[d]:D(function(b){return b.canNavigateTo(a)},c._ports)}).then(T)},a.prototype._callAllHandlers=function(a,c,d){var e=this,f=this._Promise;f.resolve.bind(f);return this._callHandlers(this._queryTransforms["*"],d).then(function(){return e._callHandlers(e._queryTransforms[a],d)}).then(function(){return e._callHandlers(e._paramTransforms["*"],c,d)}).then(function(){return e._callHandlers(e._paramTransforms[a],c,d)}).then(b)},a.prototype._callHandlers=function(a,c,d){var e=this._resolve;return h(c)||(c={}),D(function(a,b){return F(function(a){return e(a(c[b],c,d))},a)},a).then(b)},a.prototype._callInterceptors=function(a){var b=this,c=this._resolve;return F(function(b){return c(b(a))},this._interceptors["*"]).then(T).then(function(d){return d?D(function(b){return c(b(a))},b._interceptors[a.delegate.alias]):[d]}).then(T)},a.prototype._isSameRoute=function(a){var b=this.currentRouteInfo;if(!h(b)||!h(a))return!1;var c=b.delegate,d=a.delegate,e=S(b.parameters),f=S(a.parameters),g=S(b.query),i=S(a.query);return c.view===d.view&&c.alias===d.alias&&c.pattern===d.pattern&&e===f&&g===i},a.prototype._clearInfo=function(){this._previousSegment=void 0,this._previousPattern=void 0,this._previousUrl=void 0,this._previousQuery=void 0,this.currentRouteInfo=void 0,this.navigating=!1,B(function(a){a._clearInfo()},this.children)},a._inject={_Promise:Na,_Injector:Rb,_EventManager:Ua,_browser:Ab,_browserConfig:Bb,_recognizer:Qb,_childRecognizer:Qb},a}();a.Router=I,plat.register.injectable(Cb,I,null,te),a.IRouterStatic=g,plat.register.injectable(Db,g)}(Qf=a.routing||(a.routing={}));var Rf;!function(a){var c=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.prototype.initialize=function(){var a=N(this.type),b=this.attributes[a];q(b)||this._isPrecompiled()||(this._label=b,this._define(b))},b.prototype.dispose=function(){for(var a=this._label,b=this.parent;!v(a)&&h(b);)h(b[a])&&k(b[a].element)&&b[a].element===this.element&&P(b,a),b=b.parent},b.prototype._define=function(a){var b=this.templateControl;u(b)||(b.name=a);for(var c=this.parent,d={element:this.element,control:b};h(c);){var e=c[a];h(e)||(c[a]=d),c=c.parent}},b.prototype._isPrecompiled=function(){for(var a=this.parent;!u(a);){if(-1!==a.type.indexOf(xe))return!0;a=a.parent}return!1},b}(Nf);a.Name=c,Fa.control(ac,c);var d=function(a){function c(){a.apply(this,arguments),this._expression=[],this._aliases=[]}return __extends(c,a),c.prototype.loaded=function(){u(this.element)||(this.attribute=N(this.type),this._setListener())},c.prototype._setListener=function(){var a=this.attributes[this.attribute];q(this.event)||q(a)||(this._parseArgs(a),this._addEventListeners())},c.prototype._addEventListeners=function(){this.addEventListener(this.element,this.event,this._onEvent,!1)},c.prototype._buildExpression=function(){var a,c,d,e,f,g=this._expression.slice(0),h=this._parser,i=this.parent,j=(!u(i),g.shift());if(u(i)||(e=i.getResources(this._aliases),f=i.context),"@"!==j[0]){if(a=this.findProperty(j),u(a))return this._log.warn("Could not find property "+j+" on any parent control."),{fn:b,context:{},args:[]};var k=a.expresssion,l=k.identifiers;if(l.length>1)return this._log.warn("Cannot have more than one identifier in a "+this.type+"'s expression."),{fn:b,context:{},args:[]};var m=l[0],n=m.split(".");n.pop(),c=0===n.length?a.control:h.parse(n.join(".")).evaluate(a.control),d=a.value}else d=u(e)?b:e[j]||b,c=void 0;for(var o=g.length,p=[],q=0;o>q;++q)p.push(h.parse(g[q]).evaluate(f,e));return{fn:d,context:c,args:p}},c.prototype._onEvent=function(a){var b=this._buildExpression(),c=b.fn;return t(c)?void c.apply(b.context,b.args.concat(a)):void this._log.warn("Cannot find registered event method "+this._expression[0]+" for control: "+this.type)},c.prototype._findAliases=function(a){for(var b,c=a.length,d={},e=[],f=[],g=this._parser;c-->0;)b=a[c].trim(),f=f.concat(g.parse(b).aliases);for(;f.length>0;)b=f.pop(),d[b]||(e.push(b),d[b]=!0);return e},c.prototype._parseArgs=function(a){if(!q(a)){var b=this._regex.argumentRegex.exec(a);u(b)?this._expression.push(a):this._expression=[a.slice(0,b.index)].concat(""!==b[1]?b[1].split(","):[]),this._aliases=this._findAliases(this._expression)}},c._inject={_parser:Ya,_regex:Za},c}(Nf);a.SimpleEventControl=d;var e=function(a){function b(){a.apply(this,arguments),this.event=Rd}return __extends(b,a),b}(d);a.Tap=e;var f=function(a){function b(){a.apply(this,arguments),this.event="blur"}return __extends(b,a),b}(d);a.Blur=f;var g=function(a){function b(){a.apply(this,arguments),this.event="change"}return __extends(b,a),b}(d);a.Change=g;var i=function(a){function b(){a.apply(this,arguments),this.event="copy"}return __extends(b,a),b}(d);a.Copy=i;var j=function(a){function b(){a.apply(this,arguments),this.event="cut"}return __extends(b,a),b}(d);a.Cut=j;var l=function(a){function b(){a.apply(this,arguments),this.event="paste"}return __extends(b,a),b}(d);a.Paste=l;var m=function(a){function b(){a.apply(this,arguments),this.event=Sd}return __extends(b,a),b}(d);a.DblTap=m;var o=function(a){function b(){a.apply(this,arguments),this.event="focus"}return __extends(b,a),b}(d);a.Focus=o;var p=function(a){function b(){a.apply(this,arguments),this.event=Td}return __extends(b,a),b}(d);a.TouchStart=p;var x=function(a){function b(){a.apply(this,arguments),this.event=Ud}return __extends(b,a),b}(d);a.TouchEnd=x;var y=function(a){function b(){a.apply(this,arguments),this.event=Vd}return __extends(b,a),b}(d);a.TouchMove=y;var z=function(a){function b(){a.apply(this,arguments),this.event=Wd}return __extends(b,a),b}(d);a.TouchCancel=z;var A=function(a){function b(){a.apply(this,arguments),this.event=Xd}return __extends(b,a),b}(d);a.Hold=A;var B=function(a){function b(){a.apply(this,arguments),this.event=Yd}return __extends(b,a),b}(d);a.Release=B;var C=function(a){function b(){a.apply(this,arguments),this.event=Zd}return __extends(b,a),b}(d);a.Swipe=C;var D=function(a){function b(){a.apply(this,arguments),this.event=$d}return __extends(b,a),b}(d);a.SwipeLeft=D;var E=function(a){function b(){a.apply(this,arguments),this.event=_d}return __extends(b,a),b}(d);a.SwipeRight=E;var F=function(a){function b(){a.apply(this,arguments),this.event=ae}return __extends(b,a),b}(d);a.SwipeUp=F;var G=function(a){function b(){a.apply(this,arguments),this.event=be}return __extends(b,a),b}(d);a.SwipeDown=G;var H=function(a){function b(){a.apply(this,arguments),this.event=ce}return __extends(b,a),b}(d);a.Track=H;var J=function(a){function b(){a.apply(this,arguments),this.event=de}return __extends(b,a),b}(d);a.TrackLeft=J;var K=function(a){function b(){a.apply(this,arguments),this.event=ee}return __extends(b,a),b}(d);a.TrackRight=K;var M=function(a){function b(){a.apply(this,arguments),this.event=fe}return __extends(b,a),b}(d);a.TrackUp=M;var O=function(a){function b(){a.apply(this,arguments),this.event=ge}return __extends(b,a),b}(d);a.TrackDown=O;var Q=function(a){function b(){a.apply(this,arguments),this.event=he}return __extends(b,a),b}(d);a.TrackEnd=Q;var R=function(a){function b(){a.apply(this,arguments),this.event="submit"}return __extends(b,a),b.prototype._onEvent=function(b){this.element.hasAttribute("action")||b.preventDefault(),a.prototype._onEvent.call(this,b)},b}(d);a.Submit=R;var S=function(b){function c(){b.apply(this,arguments),this.event="input"}return __extends(c,b),c.prototype._addEventListeners=function(){var b,c=this,d=this.element,e=this._compat,f=!1,g="input",h=function(a){f||c._onEvent(a)},i=function(a){t(b)||(b=I(function(){h(a),b=null}))};v(e.ANDROID)&&(this.addEventListener(d,"compositionstart",function(){f=!0},!1),this.addEventListener(d,"compositionend",function(a){f=!1,h(a)},!1)),this.addEventListener(d,g,h,!1),this.addEventListener(d,"change",h,!1),e.hasEvent(g)||(this.addEventListener(d,"keydown",function(b){var c=b.keyCode,d=a.KeyCodes;c===d.lwk||c===d.rwk||c>=d.shift&&c<=d.escape||c>d.space&&c<=d.down||i(b)},!1),this.addEventListener(d,"cut",i,!1),this.addEventListener(d,"paste",i,!1))},c._inject={_compat:Oa},c}(d);a.React=S,Fa.control(ic,e),Fa.control(jc,f),Fa.control(kc,g),Fa.control(lc,i),Fa.control(mc,j),Fa.control(nc,l),Fa.control(oc,m),Fa.control(pc,o),Fa.control(qc,R),Fa.control(rc,p),Fa.control(sc,x),Fa.control(tc,y),Fa.control(uc,z),Fa.control(vc,A),Fa.control(wc,B),Fa.control(xc,C),Fa.control(yc,D),Fa.control(zc,E),Fa.control(Ac,F),Fa.control(Bc,G),Fa.control(Cc,H),Fa.control(Dc,J),Fa.control(Ec,K),Fa.control(Fc,M),Fa.control(Gc,O),Fa.control(Hc,Q),Fa.control(Ic,S),a.KeyCodes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pause:19,break:19,"caps lock":20,escape:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,"left arrow":37,up:38,"up arrow":38,right:39,"right arrow":39,down:40,"down arrow":40,insert:45,delete:46,0:48,zero:48,")":48,"right parenthesis":48,1:49,one:49,"!":49,exclamation:49,"exclamation point":49,2:50,two:50,"@":50,at:50,3:51,three:51,"#":51,"number sign":51,hash:51,pound:51,4:52,four:52,$:52,dollar:52,"dollar sign":52,5:53,five:53,"%":53,percent:53,"percent sign":53,6:54,six:54,"^":54,caret:54,7:55,seven:55,"&":55,ampersand:55,8:56,eight:56,"*":56,asterisk:56,9:57,nine:57,"(":57,"left parenthesis":57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,lwk:91,"left window key":91,rwk:92,"right window key":92,select:93,"select key":93,"numpad 0":96,"numpad 1":97,"numpad 2":98,"numpad 3":99,"numpad 4":100,"numpad 5":101,"numpad 6":102,"numpad 7":103,"numpad 8":104,"numpad 9":105,multiply:106,add:107,subtract:109,"decimal point":110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,"num lock":144,"scroll lock":145,";":186,"semi-colon":186,":":186,colon:186,"=":187,equal:187,"equal sign":187,"+":187,plus:187,",":188,comma:188,"<":188,lt:188,"less than":188,"left angle bracket":188,"-":189,dash:189,_:189,underscore:189,".":190,period:190,">":190,gt:190,"greater than":190,"right angle bracket":190,"/":191,"forward slash":191,"?":191,"question mark":191,"`":192,"grave accent":192,"~":192,tilde:192,"[":219,"open bracket":219,"{":219,"open brace":219,"\\":220,"back slash":220,"|":220,pipe:220,"]":221,"close bracket":221,"}":221,"close brace":221,"'":222,"single quote":222,'"':222,"double quote":222};var T=function(b){function c(){b.apply(this,arguments),this.keyCodes={}}return __extends(c,b),c.prototype._setListener=function(){var a=this.attribute;if(!q(this.event)&&!q(a)){var c=this.attributes[a].trim();if("{"===c[0]){var d=this.evaluateExpression(c)||{method:""},e=this._filterArgs(d);return this._setKeyCodes(e),void this.addEventListener(this.element,this.event,this._onEvent,!1)}b.prototype._setListener.call(this)}},c.prototype._filterArgs=function(a){var b=a.key,c=a.keys;return this._parseArgs(a.method),w(c)?c:n(c)?[c]:w(b)?b:n(b)?[b]:void(u(a.char)&&u(a.chars)||this._log.warn(this.type+" should be using the property key or keys to denote key codes or keys and not char codes or characters."))},c.prototype._onEvent=function(a){this._compareKeys(a)&&b.prototype._onEvent.call(this,a)},c.prototype._compareKeys=function(a){var b=this.keyCodes,c=a.keyCode||a.which;return q(b)||b[c]===!0},c.prototype._setKeyCodes=function(b){w(b)||(b=[]);for(var c,d,e=b.length,f=this.keyCodes,g=0;e>g;++g)c=b[g],d=s(c)?c:a.KeyCodes[c.toLowerCase()],f[d]=!0},c}(d);a.KeyCodeEventControl=T;var U=function(a){function b(){a.apply(this,arguments),this.event="keydown"}return __extends(b,a),b}(T);a.KeyDown=U;var V=function(a){function b(){a.apply(this,arguments),this.event="keydown"}return __extends(b,a),b.prototype._onEvent=function(b){var c=this,d=b.keyCode||b.which;if(a.prototype._compareKeys.call(this,b)&&(d>=48&&90>=d||d>=186||d>=96&&111>=d))var e=this.addEventListener(this.element,"keypress",function(b){e(),a.prototype._onEvent.call(c,b)},!1)},b.prototype._compareKeys=function(a){return!0},b}(T);a.KeyPress=V;var W=function(a){function b(){a.apply(this,arguments),this.event="keyup"}return __extends(b,a),b}(T);a.KeyUp=W;var X=function(a){function b(){a.apply(this,arguments),this.event="keypress"}return __extends(b,a),b.prototype._filterArgs=function(a){var b=a.char,c=a.chars;return this._parseArgs(a.method),w(c)?c:n(c)?[c]:w(b)?b:n(b)?[b]:void(u(a.key)&&u(a.keys)||this._log.warn(this.type+" should be using the property key or keys to denote key codes or keys and not char codes or characters."))},b.prototype._onEvent=function(b){var c,d=this.keyCodes,e=b.charCode||b.which;if(e)c=String.fromCharCode(e);else if(c=b.key,!c)return;(q(d)||d[c]===!0)&&a.prototype._onEvent.call(this,b)},b.prototype._compareKeys=function(a){return!0},b.prototype._setKeyCodes=function(a){w(a)||(a=[]);for(var b,c,d=a.length,e=this.keyCodes,f=0;d>f;++f)b=a[f],c=s(b)?String.fromCharCode(b):b,e[c]=!0},b}(T);a.CharPress=X,Fa.control(Yb,U),Fa.control(Zb,V),Fa.control($b,W),Fa.control(_b,X);var Y=function(a){function b(){a.apply(this,arguments),this.property=""}return __extends(b,a),b.prototype.loaded=function(){u(this.element)||(this.attribute=N(this.type),this.setter(),this.__removeListener=this.attributes.observe(this.setter,this.attribute))},b.prototype.contextChanged=function(){u(this.element)||this.setter()},b.prototype.dispose=function(){t(this.__removeListener)&&(this.__removeListener(),this.__removeListener=null)},b.prototype.setter=function(){var a=this;L(function(){var b=a.element,c=a.property;if(k(b))switch(a.attributes[a.attribute]){case"false":case"0":case"null":case"":b.setAttribute(c,""),b[c]=!1,b.removeAttribute(c);break;default:b.setAttribute(c,c),b[c]=!0}})},b}(Nf);a.SetAttributeControl=Y;var Z=function(a){function b(){a.apply(this,arguments),this.property="checked"}return __extends(b,a),b}(Y);a.Checked=Z;var $=function(a){function b(){a.apply(this,arguments),this.property="disabled"}return __extends(b,a),b}(Y);a.Disabled=$;var _=function(a){function b(){a.apply(this,arguments),this.property="selected"}return __extends(b,a),b}(Y);a.Selected=_;var aa=function(a){function b(){a.apply(this,arguments),this.property="readonly"}return __extends(b,a),b}(Y);a.ReadOnly=aa;var ba=function(a){function c(){a.apply(this,arguments),this.property="display",this.value="none",this.importance="important",this._initialValue=""}return __extends(c,a),c.prototype.initialize=function(){var a=this.element.style||{getPropertyValue:b},c=a.getPropertyValue(this.property);this._setValue(this.value,this.importance),q(c)||"none"===c||(this._initialValue=c)},c.prototype.setter=function(){var a=this;L(function(){if(k(a.element))switch(a.attributes[a.attribute]){case"false":case"0":case"null":case"":a._setValue(a.value,a.importance);break;default:a._setValue(a._initialValue)}})},c.prototype._setValue=function(a,c){var d=this.property,e=this.element.style||{setProperty:b,removeProperty:b,getPropertyValue:b,getPropertyPriority:b},f=e.getPropertyValue(d),g=e.getPropertyPriority(d);if(a!==f||c!==g)return q(a)?void e.removeProperty(d):void e.setProperty(d,a,c)},c}(Y);a.Visible=ba;var ca=function(a){function b(){a.apply(this,arguments),this.property="style"}return __extends(b,a),b.prototype.setter=function(){var a=this,b=this.element,c=this.attributes[this.attribute];q(c)||u(b)||L(function(){b.setAttribute(a.property,c)})},b}(Y);a.Style=ca,Fa.control(cc,Z),Fa.control(dc,$),Fa.control(ec,_),Fa.control(fc,aa),Fa.control(gc,ba),Fa.control(hc,ca);var da=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.prototype.setter=function(){var a=this.element,b=this.property,c=this.attributes[this.attribute];q(c)||u(a)||v(a[b])||(a[b]=c)},b}(Y);a.ElementPropertyControl=da;var ea=function(a){function b(){a.apply(this,arguments),this.property="href"}return __extends(b,a),b}(da);a.Href=ea;var fa=function(a){function b(){a.apply(this,arguments),this.property="src"}return __extends(b,a),b.prototype.setter=function(){var a=this.element,b=this.property,c=this.attributes[this.attribute];q(c)||u(a)||v(a[b])||(a[b]=this._browser.urlUtils(c))},b._inject={_browser:Ab},b}(da);a.Src=fa,Fa.control(Wb,ea),Fa.control(Xb,fa);var ga=function(c){function d(){c.apply(this,arguments),this.priority=100,this._supportsTwoWayBinding=!1,this.__fileSupported=ma(Oa).fileSupported,this.__fileNameRegex=ma(Za).fileNameRegex,this.__isSelf=!1}return __extends(d,c),d.prototype.initialize=function(){this._determineType()},d.prototype.loaded=function(){var a=this.parent;if(!u(a)&&!u(this.element)){var b=N(this.type),c=this._parser,d=this._expression=c.parse(this.attributes[b]),e=d.identifiers;if(1!==e.length)return this._log.warn("Only 1 identifier allowed in a "+this.type+" expression"),void(this._contextExpression=null);var f=e[0].split(".");if(this._property=f.pop(),d.aliases.length>0){var g,i=d.aliases[0],j=a.findResource(i);if(h(j)){if(g=j.resource.type,g!==Ne&&g!==Re)return}else j={resource:{}};i===Ve||i===Te?this._contextExpression=c.parse(f.join(".")):(this._property="value",this._contextExpression={evaluate:function(){return j.resource},aliases:[],identifiers:[],expression:""})}else f.length>0?this._contextExpression=c.parse(f.join(".")):this._contextExpression={evaluate:function(){return a.context},aliases:[],identifiers:[],expression:""};this._supportsTwoWayBinding&&this.templateControl.observeProperties(this),this._watchExpression(),u(this._addEventType)||this._addEventType()}},d.prototype.contextChanged=function(){this._watchExpression()},d.prototype.dispose=function(){this._addEventType=null},d.prototype.evaluate=function(){var a=this._expression;if(!v(a))return this.evaluateExpression(a)},d.prototype.observeProperty=function(a,b,c){var d,e=this;if(q(b))d=this._expression.expression;else if(s(b))d=this._expression.expression+"."+b;else{var f=this._parser,g=f.parse(b),i=g.identifiers;if(1!==i.length)return void this._log.warn("Only 1 identifier path allowed when observing changes to a bound property's child with a control implementing ISupportTwoWayBinding and working with "+this.type);var j=f.parse(this._expression.expression+"."+i[0]);d=j.identifiers[0];var k=d.split("."),l=(k.pop(),k.join(".")),m=this.evaluateExpression(l);if(!h(m)){if(!u(m))return void this._log.warn("A control implementing ISupportTwoWayBinding is trying to index into a primitive type when trying to evaluate "+this.type+'="'+this._expression.expression+'"');m=this._ContextManager.createContext(this.parent,l)}}a=a.bind(this.templateControl);var n;return n=c===!0?this.observeArray(function(c){a(c,b)},d):this.observe(function(c,d){e.__isSelf||c===d||a(c,d,b)},d),a(this.evaluateExpression(d),void 0,b,!0),n},d.prototype._addTextEventListener=function(){var b,c=this,d=this.element,e=this._compat,f=!1,g="input",h=function(){f||c._propertyChanged()},i=function(){t(b)||(b=I(function(){h(),b=null}))};v(e.ANDROID)&&(this.addEventListener(d,"compositionstart",function(){f=!0},!1),this.addEventListener(d,"compositionend",function(){f=!1,h()},!1)),e.hasEvent(g)?this.addEventListener(d,g,h,!1):(this.addEventListener(d,"keydown",function(b){var c=b.keyCode||b.which,d=a.KeyCodes;c===d.lwk||c===d.rwk||c>=d.shift&&c<=d.escape||c>d.space&&c<=d.down||i()},!1),this.addEventListener(d,"cut",i,!1),this.addEventListener(d,"paste",i,!1)),this.addEventListener(d,"change",h,!1)},d.prototype._addChangeEventListener=function(){this.addEventListener(this.element,"change",this._propertyChanged,!1)},d.prototype._addButtonEventListener=function(){this.addEventListener(this.element,Rd,this._propertyChanged,!1)},d.prototype._getChecked=function(){return this.element.checked},d.prototype._getValue=function(){return this.element.value},d.prototype._getTextContent=function(){return this.element.textContent},d.prototype._getFile=function(){var a=this.element,c=a.value;return this.__fileSupported&&a.files.length>0?a.files[0]:{name:c.replace(this.__fileNameRegex,""),path:c,lastModifiedDate:void 0,type:void 0,size:void 0,msDetachStream:b,msClose:b,slice:function(){return{}}}},d.prototype._getFiles=function(){var a=this.element;if(this.__fileSupported)return Array.prototype.slice.call(a.files);for(var c,d=a.value.split(/,|;/g),e=d.length,f=[],g=0;e>g;++g)c=d[g],f.push({name:c.replace(this.__fileNameRegex,""),path:c,lastModifiedDate:void 0,type:void 0,size:void 0,msDetachStream:b,msClose:b,slice:function(){return{}}});return f},d.prototype._getSelectedValues=function(){for(var a,b=this.element.options,c=b.length,d=[],e=0;c>e;++e)a=b[e],a.selected&&d.push(a.value);return d},d.prototype._setText=function(a,b,c){return this.__isSelf?void 0:u(a)&&(a="",c===!0)?(u(this.element.value)&&this._setValue(a),void this._propertyChanged()):void this._setValue(a)},d.prototype._setRange=function(a,b,c){return this.__isSelf?void 0:q(a)&&(a=0,c===!0)?(q(this.element.value)&&this._setValue(a),void this._propertyChanged()):void this._setValue(a)},d.prototype._setHidden=function(a,b,c){return this.__isSelf?void 0:q(a)&&(a="",c===!0)?(q(this.element.value)&&this._setValue(a),void this._propertyChanged()):void this._setValue(a)},d.prototype._setValue=function(a){var b=this.element;b.value!==a&&(b.value=a)},d.prototype._setChecked=function(a,b,c){if(!this.__isSelf){if(!r(a)){if(c===!0)return void this._propertyChanged();a=!!a}this.element.checked=a}},d.prototype._setRadio=function(a){var b=this.element;if(!this.__isSelf)return u(a)&&b.checked?void this._propertyChanged():void(b.checked=b.value===a)},d.prototype._setSelectedIndex=function(a,b,c){if(!this.__isSelf){var d=this.element,e=d.value;if(u(a))return c!==!0&&this._document.body.contains(d)?void(d.selectedIndex=-1):void this._propertyChanged();if(n(a)){if(e===a)return;if(!this._document.body.contains(d))return d.value=a,void(d.value!==a&&(d.value=e,this._propertyChanged()))}else{var f;s(a)?(a=a.toString(),f="Trying to bind a value of type number to a element. The element's selected index will be set to -1.",this._log.info(f)}d.value=a,(d.value!==a||-1===d.selectedIndex)&&(d.selectedIndex=-1)}},d.prototype._setSelectedIndices=function(a,b,c){if(!this.__isSelf){var d,e=this.element.options,f=u(e)?0:e.length,g=u(a);if(!g&&w(a))for(var h,i;f-->0;)d=e[f],h=d.value,i=Number(h),-1!==a.indexOf(h)||s(i)&&-1!==a.indexOf(i)?d.selected=!0:d.selected=!1;else for(c===!0&&this._propertyChanged();f-->0;){if(d=e[f],!g&&d.value===""+a)return void(d.selected=!0);d.selected=!1}}},d.prototype._determineType=function(){if(!this._observingBindableProperty()){var a=this.element;if(!u(a))switch(a.nodeName.toLowerCase()){case"input":switch(a.type){case"button":case"submit":case"reset":case"image":this._addEventType=this._addButtonEventListener,this._getter=this._getValue;break;case"checkbox":this._addEventType=this._addChangeEventListener,this._getter=this._getChecked,this._setter=this._setChecked;break;case"radio":this._initializeRadio();break;case"range":this._addEventType=this._addChangeEventListener,this._getter=this._getValue,this._setter=this._setRange;break;case"file":var b=a.multiple;this._addEventType=this._addChangeEventListener,this._getter=b?this._getFiles:this._getFile;break;case"hidden":this._getter=this._getValue,this._setter=this._setHidden;break;default:this._addEventType=this._addTextEventListener,this._getter=this._getValue,this._setter=this._setText}break;case"textarea":this._addEventType=this._addTextEventListener,this._getter=this._getValue,this._setter=this._setText;break;case"select":this._initializeSelect();break;case"button":this._addEventType=this._addButtonEventListener,this._getter=this._getTextContent}}},d.prototype._watchExpression=function(){var a=this,b=this._contextExpression,c=this.evaluateExpression(b);if(!h(c)){if(!(u(c)&&b.identifiers.length>0))return void this._log.warn(this.type+" is trying to index into a primitive type. "+this._contextExpression.expression+" is already defined and not an object when trying to evaluate "+this.type+'="'+this._expression.expression+'"');c=this._createContext(b.identifiers[0])}var d;if(t(this._setter)){this._setter===this._setSelectedIndices&&(d=this._property,u(c[d])&&(c[d]=[]),this.observeArray(function(b){a._setter(b[0].object,null,!0)},b+"."+d));var e=this._expression;this.observeExpression(function(b,c){a._setter(b,c)},e),this._setter(this.evaluateExpression(e),void 0,!0)}},d.prototype._createContext=function(a){var b=a.split("."),c=b.shift().slice(1),d=this.parent;return c===Te?(a=b.join("."),d=this.parent.root):c===Ha&&(a=b.join(".")),this._ContextManager.createContext(d,a)},d.prototype._propertyChanged=function(){if(!u(this._contextExpression)){var a=this.evaluateExpression(this._contextExpression),b=this._property,c=this._getter();u(a)||a[b]===c||(this.__isSelf=!0,a[b]=c,this.__isSelf=!1)}},d.prototype._initializeRadio=function(){var a=this.element;if(this._addEventType=this._addChangeEventListener,this._getter=this._getValue,this._setter=this._setRadio,!a.hasAttribute("name")){var b=N(this.type),c=this.attributes[b];a.setAttribute("name",c)}a.hasAttribute("value")||a.setAttribute("value","")},d.prototype._initializeSelect=function(){var a,b=this.element,c=b.multiple,d=b.options,e=d.length;this._addEventType=this._addChangeEventListener,c?(this._getter=this._getSelectedValues,this._setter=this._setSelectedIndices):(this._getter=this._getValue,this._setter=this._setSelectedIndex);for(var f=0;e>f;++f)a=d[f],a.hasAttribute("value")||a.setAttribute("value",a.textContent)},d.prototype._observingBindableProperty=function(){var a=this,b=this.templateControl;return!u(b)&&t(b.onInput)&&t(b.observeProperties)?(b.onInput(function(b){a._getter=function(){return b},a._propertyChanged()}),this._supportsTwoWayBinding=!0):!1},d._inject={_parser:Ya,_ContextManager:ab,_compat:Oa,_document:Ra},d}(Nf);a.Bind=ga,Fa.control(Vb,ga);var ha=function(a){function b(){a.apply(this,arguments),this.property="",this.priority=200,this._listeners=[],this._boundAddListener=this._addListener.bind(this)}return __extends(b,a),b.prototype.initialize=function(){this.attribute=N(this.type),this._setProperty(this._getValue())},b.prototype.loaded=function(){this._observeProperty(),this._setProperty(this._getValue())},b.prototype.dispose=function(){t(this._removeListener)&&this._removeListener(),this._listeners=[]},b.prototype._setProperty=function(a,b){var c=this.templateControl;u(c)||(this._ContextManager.defineGetter(c,this.property,{value:a,observe:this._boundAddListener},!0,!0),this._callListeners(a,b))},b.prototype._callListeners=function(a,b){for(var c=this._listeners,d=c.length,e=0;d>e;++e)c[e](a,b)},b.prototype._addListener=function(a){var b=this._listeners;return a=a.bind(this.templateControl),b.push(a),function(){var c=b.indexOf(a);-1!==c&&b.splice(c,1)}},b.prototype._getValue=function(){return u(this.templateControl)?void 0:this.evaluateExpression(this.attributes[this.attribute])},b.prototype._observeProperty=function(){u(this.templateControl)||(this._removeListener=this.observeExpression(this._setProperty,this.attributes[this.attribute]))},b._inject={_ContextManager:ab},b}(Nf);a.ObservableAttributeControl=ha;var ia=function(a){function b(){a.apply(this,arguments),this.property="options"}return __extends(b,a),b}(ha);a.Options=ia,Fa.control(bc,ia)}(Rf=a.controls||(a.controls={}));var Sf=function(){function a(){this.uid=M(Ub),this._log=a._log;var b=this.navigator=ma(_a);b.initialize(ma(Db).currentRouter())}return a.start=function(){if(!a._compat.isCompatible)return a._log.error(new Error("PlatypusTS only supports modern browsers where Object.defineProperty is defined"));a.__addPlatCss();var b=a._EventManager;b.dispose(Ie),b.on(Ie,pd,a.__ready),b.on(Ie,vd,a.__shutdown),b.initialize()},a.registerApp=function(b){if(!u(a.app)&&n(a.app.uid)&&a._EventManager.dispose(a.app.uid),a.__injector=b,a._compat.amd){var c=a._LifecycleEvent,d=c.dispatch;I(function(){d(pd,c)})}},a.load=function(b){var c=a._LifecycleEvent,d=a._compiler,e=a._document.body,f=a._document.head;return c.dispatch(xd,a),u(b)?(e.setAttribute(Hd,""),void I(function(){d.compile([f]),d.compile([e]),e.removeAttribute(Hd)})):t(b.setAttribute)?(b.setAttribute(Hd,""),void I(function(){d.compile([b]),b.removeAttribute(Hd)})):void I(function(){d.compile([b])})},a.__ready=function(b){yf.Injector.initialize(),a.__registerAppEvents(b),b.defaultPrevented||a.load()},a.__shutdown=function(){var b,c=navigator.app,d=a._LifecycleEvent;if(!u(c)&&t(c.exitApp)){if(b=d.dispatch(wd,a),b.defaultPrevented)return;c.exitApp()}},a.__registerAppEvents=function(b){var c=a.__injector;if(!u(c)&&t(c.inject)){var d=a.app=c.inject();d.on(qd,d.suspend),d.on(rd,d.resume),d.on(sd,d.online),d.on(td,d.offline),d.on(ud,d.error),d.on(wd,d.exiting),t(d.ready)&&d.ready(b)}},a.__addPlatCss=function(){var b=a._document;if(!a._compat.platCss){if(!u(b.styleSheets)&&b.styleSheets.length>0)return void b.styleSheets[0].insertRule("[plat-hide] { display: none !important; }",0);var c=document.createElement("style");c.textContent="[plat-hide] { display: none !important; }",document.head.appendChild(c)}},a.prototype.suspend=function(a){},a.prototype.resume=function(a){}, -a.prototype.error=function(a){},a.prototype.ready=function(a){},a.prototype.exiting=function(a){},a.prototype.online=function(a){},a.prototype.offline=function(a){},a.prototype.dispatchEvent=function(b){for(var c=[],d=1;d=0}function y(a){return"object"==typeof a&&Ze.call(a)===df}function z(a,b,c){var d=[];return u(b)?d:t(b.filter)?b.filter(a,c):(B(function(b,c,e){a(b,c,e)&&d.push(b)},b),d)}function A(a,b){return z(function(b){return!H(function(a,c){return b[c]!==a},a)},b)}function B(a,b,c){if(u(b)||!h(b)&&!x(b))return b;var d,e,f;if(t(b.forEach))return b.forEach(a,c);if(x(b))for(d=0,f=b.length;f>d;++d)a.call(c,b[d],d,b);else{var g=Object.keys(b);for(f=g.length;g.length>0;)e=g.shift(),a.call(c,b[e],e,b)}return b}function C(a,b,c){var d=[];return u(b)?d:t(b.map)?b.map(a,c):(B(function(e,f){d.push(a.call(c,e,f,b))},b),d)}function D(a,b,c){return xa=xa||plat.acquire(Na),xa.all(C(a,b,c))}function E(a,b,c,d){xa=xa||plat.acquire(Na);var e=xa.resolve([]);if(!w(b))return e;a=a.bind(c);var f=function(b,c,d,e){return b.then(function(b){return a(c,d,e).then(function(a){return b.concat(a)})})};return d===!0?b.reduceRight(f,e):b.reduce(f,e)}function F(a,b,c){return E(a,b,c)}function G(a,b,c){return E(a,b,c,!0)}function H(a,b,c){if(u(b)||t(b))return!1;var d,e,f,g;if(t(b.some))return b.some(a,c);if(x(b)){for(d=0,f=b.length;f>d;++d)if(g=a.call(c,b[d],d,b),g===!0)return!0}else{var h=Object.keys(b);for(f=h.length;h.length>0;)if(e=h.shift(),g=a.call(c,b[e],e,b),g===!0)return!0}return!1}function I(a,b,c){return J(a,0,b,c)}function J(a,b,c,d){function e(){a.apply(d,c)}var f=setTimeout(e,b);return function(){clearTimeout(f)}}function K(a,b,c,d){function e(){a.apply(d,c)}var f=setInterval(e,b);return function(){clearInterval(f)}}function L(a,c){ya=ya||plat.acquire(Oa);var d=ya.requestAnimationFrame;if(v(d))return I(function(){a.call(c,Date.now())});var e=d(a.bind(c)),f=ya.cancelAnimationFrame||b;return function(){f(e)}}function M(a){function b(){return a+c.join("")}u(a)&&(a="");var c=Ye[a];u(c)&&(c=Ye[a]=["0","/"]);for(var d,e=c.length;e--;){if(d=c[e].charCodeAt(0),57===d)return c[e]="A",b();if(90===d)return c[e]="a",b();if(122!==d)return c[e]=String.fromCharCode(d+1),b();c[e]="0"}return c.unshift("0"),b()}function N(a){return!n(a)||q(a)?a:(a=a.charAt(0).toLowerCase()+a.slice(1),za=za||plat.acquire(Za).camelCaseRegex,a.replace(za,function(a,b,c,d){return d?c.toUpperCase():c}))}function O(a,b){return!n(a)||q(a)?a:(u(b)&&(b=""),Aa=Aa||plat.acquire(Za).capitalCaseRegex,a.replace(Aa,function(a,c){return c?b+a.toLowerCase():a.toLowerCase()}))}function P(a,b){return u(a)||delete a[b],a}function Q(a,b){return u(a)?a:a[b]}function R(a){if(!q(a)){for(var b,c=a.split("&"),d={},e=c.length,f=0;e>f;++f)b=c[f].split("="),d[b[0]]=b[1];return d}}function S(a){return!w(a)&&!h(a)||q(a)?"":"?"+C(function(a,b){return b+"="+a},a).join("&")}function T(a){return w(a)?a.reduce(function(a,b){return a&&b!==!1},!0):r(a)?a:!0}function U(a,b,c){var d=l(b),e=!k(b),f=d?b:(Ba||(Ba=plat.acquire(Ra))).createDocumentFragment();e&&(b=f);var g,h=w(a)?a:Array.prototype.slice.call(a),i=h.length;if(c===!0){var j;for(g=0;i>g;++g)j=h[g].cloneNode(!0),f.insertBefore(j,null)}else for(g=0;i>g;++g)f.insertBefore(h[g],null);return d||e||b.appendChild(f),b}function V(a){for(var b=Array.prototype.slice.call(a.childNodes);b.length>0;)a.removeChild(b.pop())}function W(a,b){if(t(a.push)||(a=Array.prototype.slice.call(a)),!u(b))return void X(a,b);for(var c;a.length>0;)c=a.pop(),b=c.parentNode,u(b)||b.removeChild(c)}function X(a,b){for(;a.length>0;)b.removeChild(a.pop())}function Y(a){ya=ya||(ya=plat.acquire(Oa)),Ba=Ba||(Ba=plat.acquire(Ra));var b=jf.exec(a),c=Ba.createElement("div");if(u(b))return c=ea(c,a),c.removeChild(c.lastChild);a=a.trim();var d=b[1];if(ya.pushState&&v(pf[d]))return ea(c,a);if("body"===d)return c=ea(Ba.createElement("html"),a),c.removeChild(c.lastChild);var e=qf[d]||qf._default,f=e[0],g=e[1],h=e[2];for(c=ea(c,g+a+h);f-->0;)c=c.lastChild;return c}function Z(a,b){if(V(a),!q(b)){var c=Y(b);return c.childNodes.length>0?U(c.childNodes,a):a.insertBefore(c,null),a}}function $(a,b,c){if(!u(a)&&h(b)){v(c)&&(c=null);var d;if(k(b))return d=b,b=Array.prototype.slice.call(d.childNodes),a.insertBefore(d,c),b;t(b.push)||(b=Array.prototype.slice.call(b)),Ba=Ba||(Ba=plat.acquire(Ra));var e=b.length;d=Ba.createDocumentFragment();for(var f=0;e>f;++f)d.insertBefore(b[f],null);return a.insertBefore(d,c),b}}function _(a){var b=a.parentNode,c=$(b,a.childNodes,a);return b.removeChild(a),c}function aa(a,b){if(u(b))return b;if(a.nodeType===Node.ELEMENT_NODE)for(var c,d=a.attributes,e=d.length,f=0;e>f;++f)c=d[f],b.setAttribute(c.name,c.value);var g=a.parentNode;return $(b,a.childNodes),g.replaceChild(b,a),b}function ba(a){Ba=Ba||(Ba=plat.acquire(Ra));var b=Ba.createDocumentFragment();return q(a)||Z(b,a),b}function ca(a,b){if(!u(a)){var c,d=a.nextSibling,e=a.parentNode;if(u(b)&&(b=null),!u(e)&&(u(b)||b.parentNode===e))for(;d!==b;)c=d.nextSibling,e.removeChild(d),d=c}}function da(a,b){u(a)||(ca(a,b),fa(a),fa(b))}function ea(a,b){return ya=ya||(ya=plat.acquire(Oa)),ya.msApp?MSApp.execUnsafeLocalFunction(function(){a.innerHTML=b}):a.innerHTML=b,a}function fa(a){if(k(a)){var b=a.parentNode;u(b)||b.removeChild(a)}}function ga(a,b){var c=(a||{}).className;if(n(c)&&n(b)&&""!==b){var d,e,f=b.split(kf);if(v(a.classList)){if(q(c))return void(a.className=b);for(;f.length>0;)d=f.shift(),""!==d&&(e=new RegExp("^"+d+"\\s+|\\s+"+d+"$|\\s+"+d+"\\s+","g"),e.test(c)||(a.className+=" "+d))}else for(;f.length>0;)d=f.shift(),""!==d&&a.classList.add(d)}}function ha(a,b){var c=(a||{}).className;if(n(c)&&n(b)&&""!==b){var d,e=b.split(kf);if(v(a.classList)){if(c===b)return void(a.className="");for(;e.length>0;)d=e.shift(),""!==d&&(a.className=c=c.replace(new RegExp("^"+d+"\\s+|\\s+"+d+"$|\\s+"+d+"\\s+","g"),""))}else for(;e.length>0;)d=e.shift(),""!==d&&a.classList.remove(d)}}function ia(a,b){var c=(a||{}).className;if(n(c)&&n(b)&&""!==b){var d,e=b.split(kf);if(v(a.classList)){var f;if(""===c)a.className=b;else if(c===b)return void(a.className="");for(;e.length>0;)if(d=e.shift(),""!==d){if(f=new RegExp("^"+d+"\\s+|\\s+"+d+"$|\\s+"+d+"\\s+","g"),f.test(c)){a.className=c=c.replace(f,"");continue}a.className+=" "+d}}else for(;e.length>0;)d=e.shift(),""!==d&&a.classList.toggle(d)}}function ja(a,b,c){var d=(a||{}).className;if(n(d)&&n(c)&&""!==c){if(v(a.classList)){var e=new RegExp("^"+b+"\\s+","g"),f=new RegExp("\\s+"+b+"\\s+","g"),g=new RegExp("\\s+"+b+"$","g");return void(a.className=d.replace(e,c+" ").replace(f," "+c+" ").replace(g," "+c))}a.classList.add(c),a.classList.remove(b)}}function ka(a,b){var c=(a||{}).className;if(!n(c)||!n(b)||""===b)return!1;var d=b.split(kf);if(v(a.classList)){if(""===c)return!1;if(c===b)return!0;for(var e;d.length>0;)if(e=d.shift(),""!==e&&!new RegExp("^"+e+"\\s|\\s"+e+"$|\\s"+e+"\\s","g").test(c))return!1;return!0}for(;d.length>0;)if(e=d.shift(),""!==e&&!a.classList.contains(e))return!1;return!0}function la(a){return Ca=Ca||(Ca=plat.acquire(mb)),Da=Da||(Da=plat.acquire(Ka)),Ca.put(a,Ca.read(a).catch(function(b){return u(b)?Da.ajax({url:a}):void 0}).then(function(b){if(l(b))return Ca.put(a,b);if(!h(b)||!n(b.response))return Ea=Ea||(Ea=plat.acquire(Xa)),Ea.warn("No template found at "+a),Ca.put(a);var c=b.response;return q(c.trim())?Ca.put(a):Ca.put(a,c)}).catch(function(b){return I(function(){Ea=Ea||(Ea=plat.acquire(Xa)),Ea.error(new Error("Failure to get template from "+a+"."))}),b}))}function ma(a){var b,c=w(a);b=c?zf.Injector.getDependencies(a):zf.Injector.getDependencies([a]);for(var d=b.length,e=[],f=0;d>f;++f)e.push(b[f].inject());return c?e:e[0]}function na(){return window}function oa(a){return a.document}function pa(a){return!u(Kf[a])}function qa(a){return!u(Jf[a])}function ra(a){return!u(If[a])}function sa(a){return!v(Lf[a])}function ta(a,b,c,d,e,f){return Nf._parser=a,Nf._ContextManager=b,Nf._EventManager=c,Nf._Promise=d,Nf._dom=e,Nf._log=f,Nf}function ua(){return Of}function va(a,b,c,d,e,f){return Tf._compat=a,Tf._EventManager=b,Tf._document=c,Tf._compiler=d,Tf._LifecycleEvent=e,Tf._log=f,Tf}function wa(a){return a.app}var xa,ya,za,Aa,Ba,Ca,Da,Ea,Fa,Ga="$",Ha="context",Ia=Ga+"AppStatic",Ja=Ga+"App",Ka=Ga+"Http",La=Ga+"HttpRequestInstance",Ma=Ga+"HttpConfig",Na=Ga+"Promise",Oa=Ga+"Compat",Pa=Ga+"ControlFactory",Qa=Ga+"AttributeControlFactory",Ra=Ga+"Document",Sa=Ga+"DispatchEventInstance",Ta=Ga+"ErrorEventStatic",Ua=Ga+"EventManagerStatic",Va=Ga+"LifecycleEventStatic",Wa=Ga+"LifecycleEventInstance",Xa=Ga+"Log",Ya=Ga+"Parser",Za=Ga+"Regex",$a=Ga+"Tokenizer",_a=Ga+"NavigatorInstance",ab=Ga+"ContextManagerStatic",bb=Ga+"ContextManagerInstance",cb=Ga+"Compiler",db=Ga+"CommentManagerFactory",eb=Ga+"CommentManagerInstance",fb=Ga+"ElementManagerFactory",gb=Ga+"ElementManagerInstance",hb=Ga+"NodeManagerStatic",ib=Ga+"TextManagerFactory",jb=Ga+"TextManagerInstance",kb=Ga+"CacheFactory",lb=Ga+"ManagerCache",mb=Ga+"TemplateCache",nb=Ga+"Animator",ob=Ga+"AttributesFactory",pb=Ga+"AttributesInstance",qb=Ga+"BindableTemplatesFactory",rb=Ga+"Dom",sb=Ga+"DomEvents",tb=Ga+"IDomEventsConfig",ub=Ga+"DomEventInstance",vb=Ga+"ResourcesFactory",wb=Ga+"ResourcesInstance",xb=Ga+"TemplateControlFactory",yb=Ga+"TemplateControlInstance",zb=Ga+"Utils",Ab=Ga+"Browser",Bb=Ga+"BrowserConfig",Cb=Ga+"Router",Db=Ga+"RouterStatic",Eb=Ga+"UrlUtilsInstance",Fb=Ga+"Window",Gb=Ga+"LocalStorage",Hb=Ga+"SessionStorage",Ib=Ga+"BaseSegmentFactory",Jb=Ga+"BaseSegmentInstance",Kb=Ga+"StaticSegmentInstance",Lb=Ga+"VariableSegmentInstance",Mb=Ga+"DynamicSegmentInstance",Nb=Ga+"SplatSegmentInstance",Ob=Ga+"StateStatic",Pb=Ga+"StateInstance",Qb=Ga+"RouteRecognizerInstance",Rb=Ga+"InjectorStatic",Sb=Ga+"History",Tb=Ga+"Location",Ub="plat-",Vb=Ub+"bind",Wb=Ub+"href",Xb=Ub+"src",Yb=Ub+"keydown",Zb=Ub+"keypress",$b=Ub+"keyup",_b=Ub+"charpress",ac=Ub+"name",bc=Ub+"options",cc=Ub+"checked",dc=Ub+"disabled",ec=Ub+"selected",fc=Ub+"readonly",gc=Ub+"visible",hc=Ub+"style",ic=Ub+"tap",jc=Ub+"blur",kc=Ub+"change",lc=Ub+"copy",mc=Ub+"cut",nc=Ub+"paste",oc=Ub+"dbltap",pc=Ub+"focus",qc=Ub+"submit",rc=Ub+"touchstart",sc=Ub+"touchend",tc=Ub+"touchmove",uc=Ub+"touchcancel",vc=Ub+"hold",wc=Ub+"release",xc=Ub+"swipe",yc=Ub+"swipeleft",zc=Ub+"swiperight",Ac=Ub+"swipeup",Bc=Ub+"swipedown",Cc=Ub+"track",Dc=Ub+"trackleft",Ec=Ub+"trackright",Fc=Ub+"trackup",Gc=Ub+"trackdown",Hc=Ub+"trackend",Ic=Ub+"react",Jc=Ub+"link",Kc=Ub+"foreach",Lc=Ub+"html",Mc=Ub+"if",Nc=Ub+"ignore",Oc=Ub+"select",Pc=Ub+"template",Qc=Ub+"viewport",Rc=Ub+"control",Sc=Ub+"viewcontrol",Tc=Ub+"resources",Uc=Ub+Ha,Vc=Pc+"-"+Ha,Wc=Ub+"callback",Xc="data-",Yc="__templateControlCache",Zc="head",$c="meta",_c="title",ad="description",bd="author",cd="creator",dd="link",ed="href",fd="name",gd="property",hd="image",id="video",jd="type",kd="rel",ld="url",md="article:",nd="og:",od="twitter:",pd="content",qd="ready",rd="suspend",sd="resume",td="online",ud="offline",vd="error",wd="shutdown",xd="exiting",yd="beforeLoad",zd="beforeNavigate",Ad="navigated",Bd="navigating",Cd="urlChanged",Dd="pause",Ed="deviceReady",Fd="backbutton",Gd="backclick",Hd="backButtonPressed",Id=Ub+"hide",Jd=Ub+"animating",Kd=Ub+"animation",Ld=Ub+"transition",Md=Ub+"enter",Nd=Ub+"leave",Od=Ub+"move",Pd=Ub+"fadein",Qd=Ub+"fadeout",Rd="$",Sd=Rd+"tap",Td=Rd+"dbltap",Ud=Rd+"touchstart",Vd=Rd+"touchend",Wd=Rd+"touchmove",Xd=Rd+"touchcancel",Yd=Rd+"hold",Zd=Rd+"release",$d=Rd+"swipe",_d=Rd+"swipeleft",ae=Rd+"swiperight",be=Rd+"swipeup",ce=Rd+"swipedown",de=Rd+"track",ee=Rd+"trackleft",fe=Rd+"trackright",ge=Rd+"trackup",he=Rd+"trackdown",ie=Rd+"trackend",je={index:"index",even:"even",odd:"odd",first:"first",last:"last"},ke="base",le="variable",me="static",ne="splat",oe="dynamic",pe=1e3,qe="{{",re="}}",se="static",te="singleton",ue="instance",ve="factory",we="class",xe="css",ye="-compiled",ze="-@",Ae="-init",Be=": start node",Ce=": end node",De="popstate",Ee="hashchange",Fe="wrapped",Ge="plat_callback",He="js",Ie="noop",Je="__app__",Ke="resource",Le=Ke+"s",Me="alias",Ne=Me+"es",Oe="observable",Pe="injectable",Qe="object",Re="function",Se="literal",Te="root",Ue="rootContext",Ve="control",We=Ha,Xe=!!Array.isArray,Ye={},Ze=Object.prototype.toString,$e="[object ",_e=$e+"Error]",af=$e+"File]",bf=$e+"Array]",cf=$e+"Boolean]",df=$e+"Date]",ef=$e+"Number]",ff=$e+"RegExp]",gf=$e+"String]",hf=$e+"Promise]",jf=/<([\w:]+)/,kf=/\s+/g,lf=[1,'"],mf=[1,"","
"],nf=[3,"","
"],of=[1,'',""],pf={thead:mf,tbody:mf,tfoot:mf,colgroup:mf,caption:mf,tr:[2,"","
"],col:[2,"","
"],td:nf,th:nf},qf=e(!1,!1,{},pf,{option:lf,optgroup:lf,legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],text:of,circle:of,ellipse:of,line:of,path:of,polygon:of,polyline:of,rect:of,_default:[0,"",""]}),rf={},sf={},tf={},uf={},vf={},wf={},xf={},yf={};!function(a){function b(b,c,d,e,f,g){var h=b[c]=new zf.Injector(c,d,e,f);return g===!0&&(wf[c]=h),a}function c(b,c,d){var e=ma(Rb),f=ma(Ia);return f.registerApp(new e(b,c,d)),a}function d(a,c,d,e){if(!n(a))throw new Error("A Control must be registered with a string name");return a=a.toLowerCase(),"head"===a&&(e=!0),b(rf,a,c,d,e?se:void 0)}function e(a,c,d){if(!n(a))throw new Error("A ViewControl must be registered with a string name");return a=a.toLowerCase(),b(sf,a,c,d)}function f(a,c,d,e){if(n(e)){if(e=e.toLowerCase(),e===ve||e===se||e===we)return b(uf,a,c,d,e,!0);if(e!==te&&e!==ue)throw new Error("Invalid injectable type "+e+" during injectable registration.")}else e=te;return b(uf,a,c,d,e,!1)}function g(c,d,e,f){if(n(f)&&(f=f.toLowerCase(),f!==xe&&f!==He))throw new Error('Invalid animationType "'+f+'" during animation registration.');return b(f===He?yf:xf,c,d,e,a.injectable.INSTANCE)}a.app=c,a.control=d,a.viewControl=e,a.injectable=f;var f;!function(a){a.STATIC=se,a.SINGLETON=te,a.INSTANCE=ue,a.FACTORY=ve,a.CLASS=we}(f=a.injectable||(a.injectable={})),a.animation=g;var g;!function(a){a.CSS=xe,a.JS=He}(g=a.animation||(a.animation={}))}(Fa=a.register||(a.register={}));var zf;!function(a){var c=function(){function a(b,c,d,e){void 0===e&&(e=null),this.name=b,this.Constructor=c,this.type=e;var f,g=this.dependencies=a.convertDependencies(d),h=g.indexOf(Ie);if(Object.defineProperty(c,"__injectorName",{value:b,enumerable:!1,configurable:!0,writable:!0}),Object.defineProperty(c,"__injectorDependencies",{value:g.slice(0),enumerable:!1,configurable:!0,writable:!0}),h>-1){var i=d[h];if(u(i))throw new TypeError("The dependency for "+b+" at index "+h+" is undefined, did you forget to include a file?");throw new TypeError("Could not resolve dependency "+i.slice(9,i.indexOf("("))+" for "+b+". Are you using a static injectable Type?")}if(f=a.__findCircularReferences(this),n(f))throw new Error("Circular dependency detected from "+this.name+" to "+f+".");if(b===Ia){var j=this.inject();this.dependencies=g,j.start()}}return a.initialize=function(){for(var a=wf,b=Object.keys(a),c=b.length,d=0;c>d;++d)a[b[d]].inject();wf={}},a.getDependencies=function(b){if(u(b)||q(b))return[];for(var c=[],d=b.length,e=0;d>e;++e)c.push(a.getDependency(b[e]));return c},a.getDependency=function(b){return u(b)||b===Ie?a.__noop():a.isInjector(b)?b:a.__locateInjector(b)},a.convertDependencies=function(b){if(!w(b))return[];for(var c=a.convertDependency,d=[],e=b.length,f=0;e>f;++f)d.push(c(b[f]));return d},a.convertDependency=function(b){return u(b)?Ie:a.__getInjectorName(b)},a.isInjector=function(a){return t(a.inject)&&!v(a.type)&&!v(a.name)&&!v(a.Constructor)},a.__getInjectorName=function(b){if(u(b))return Ie;if(n(b))return b;var c=b,d=h(c._inject)?c._inject:{};if(n(c.__injectorName)&&(b=c.__injectorName),!n(b))return new a(b,c,d.dependencies);var e=a.__findInjector.bind(a,b),f=e(uf)||e(vf)||e(wf)||e(sf)||e(rf)||e(xf)||e(yf);return!h(f)&&n(b)&&(f=vf[b]=new a(b,c,c._inject.dependencies)),h(f)?f.name:Ie},a.__construct=function(b,c,d){if(u(b)||u(b.prototype))return b;var e,f=Object.create(b.prototype),g=d===ue;g&&(e=tf[b.__injectorName]),h(e)||(e=a.__walk(f,Object.getPrototypeOf(f),{}),g&&(tf[b.__injectorName]=e));for(var i=ma(C(function(a){return a},e)),j=Object.keys(e),k=j.length,l=0;k>l;++l)f[j[l]]=i[l];var m=f.constructor.apply(f,c);return v(m)?f:m},a.__walk=function(b,c,d){var g=c.constructor,i={};h(g._inject)&&g!==Object&&(i=a.__walk(b,Object.getPrototypeOf(c),d));var j=f(g._inject,!0);return e(!1,!1,{},d,i,j)},a.__locateInjector=function(b){if(!u(b)){var c=b;n(b.__injectorName)&&(c=b.__injectorName);var d=a.__findInjector.bind(a,c),e=d(uf)||d(vf)||d(wf)||d(rf)||d(sf)||d(xf)||d(yf);return h(e)||(t(b)?(n(c)||(c=M(Ub)),e=new a(c,b,h(b._inject)?b._injectorDependencies:[]),vf[c]=e):e=a.__wrap(b)),e}},a.__findInjector=function(b,c){if(!u(b)){if(b===a||b===Rb){var d=a.__wrap(a);return d.name=Rb,d}return n(b)?c[b]||c[b.toLowerCase()]:void 0}},a.__wrap=function(a){return{inject:function(){return a},name:Fe,dependencies:[],Constructor:a}},a.__noop=function(){return{inject:b,type:Ie,name:Ie,dependencies:[],Constructor:b}},a.__findCircularReferences=function(b){if(h(b)&&w(b.dependencies))for(var c,d,e,f=b.name,g=b.dependencies,i=[{name:f,dependencies:g.slice(0)}],j=a.__locateInjector;i.length>0;){c=i.pop(),g=c.dependencies,e=g.length;for(var k=0;e>k;++k){if(d=g[k],d===f)return c.name;b=j(d),h(b)&&w(b.dependencies)&&i.push({name:b.name,dependencies:b.dependencies.slice(0)})}}},a.prototype.inject=function(){for(var b,c,d=[],e=this.type,f=this.dependencies,g=f.length,h=0;g>h;++h)b=a.getDependency(f[h]),d.push(b.inject());return c=a.__construct(this.Constructor,d,e),n(e)&&e!==ue&&this._wrapInjector(c),c.__injectable__type=e,c},a.prototype._wrapInjector=function(a){return this.inject=function(){return a},this},a}();a.Injector=c;var d;!function(a){a.control=rf,a.viewControl=sf,a.injectable=uf,a.staticInjectable=wf,a.animation=xf,a.jsAnimation=yf}(d=a.injectors||(a.injectors={}))}(zf=a.dependency||(a.dependency={})),v(window)||(v(window.plat)&&(window.plat=plat),v(window.module)&&(window.module={})),a.acquire=ma;var Af;!function(a){var b=function(){function a(){this.ERROR=5,this.WARN=4,this.INFO=3,this.DEBUG=2,this.TRACE=1,this._level=this.INFO}return a.prototype.error=function(a){throw this._log(a,this.ERROR),a},a.prototype.warn=function(a){this._log(a,this.WARN)},a.prototype.info=function(a){this._log(a,this.INFO)},a.prototype.debug=function(a){this._log(a,this.DEBUG)},a.prototype.trace=function(a){this._log(a,this.TRACE)},a.prototype.setLogLevel=function(a){switch(n(a)&&(a=this[a.toUpperCase()]),a){case this.ERROR:case this.WARN:case this.INFO:case this.DEBUG:case this.TRACE:this._level=a;break;default:this._level=this.INFO}},a.prototype._log=function(b,c){if(this._shouldLog(c)){n(b)&&(b=new Error(b));var d=this._ErrorEvent;u(d)&&(d=this._ErrorEvent=ma(Ta)),d.dispatch(vd,a,b,c)}},a.prototype._shouldLog=function(a){return s(a)||(a=this.INFO),this._level1?(a=w(h)&&h.length>1?h[1]:"",d=a[0].toUpperCase()+a.slice(1),b="WebKit|Moz|MS".match(new RegExp("("+a+")","i"))[1],c="-"+a+"-"):v(g.OLink)?a=d=b=c="":(a="o",d=b="O",c="-o-"),this.vendorPrefix={dom:b,lowerCase:a,css:c,upperCase:d},this.requestAnimationFrame=e.requestAnimationFrame||e[a+"RequestAnimationFrame"],this.cancelAnimationFrame=e.cancelAnimationFrame||e[a+"CancelRequestAnimationFrame"]||e[a+"CancelAnimationFrame"];var i=f.style;!(v(this.ANDROID)||Math.floor(this.ANDROID/10)>=44)||v(i.animation)||v(i.transition)?v(i[d+"Animation"])||v(i[d+"Transition"])||(this.animationSupported=!0,this.animationEvents={$animation:a+"Animation",$animationStart:a+"AnimationStart",$animationEnd:a+"AnimationEnd",$animationIteration:a+"AnimationIteration",$transition:a+"Transition",$transitionStart:a+"TransitionStart",$transitionEnd:a+"TransitionEnd"}):(this.animationSupported=!0,this.animationEvents={$animation:"animation",$animationStart:"animationstart",$animationEnd:"animationend",$animationIteration:"animationiteration",$transition:"transition",$transitionStart:"transitionstart",$transitionEnd:"transitionend"})},a.prototype.__determineCss=function(){var a=this._document,b=a.head,c=a.createElement("div");c.setAttribute(Id,""),b.insertBefore(c,null);var d=this._window.getComputedStyle(c),e=d.display,f=d.visibility;this.platCss="none"===e||"hidden"===f,b.removeChild(c)},a._inject={_window:Fb,_history:Sb,_document:Ra},a}();a.Compat=Bf,Fa.injectable(Oa,Bf);var Cf=function(){function a(){}return a.prototype.noop=function(){},a.prototype.extend=function(a){for(var b=[],c=1;c<|~]/,this.fullUrlRegex=/^(?:[a-z0-9\-]+:)(?:\/\/)?|(?:\/\/)/i,this.validateEmail=new RegExp('^(([^<>()[\\]\\.,;:\\s@\\"]+(\\.[^<>()[\\]\\.,;:\\s@\\"]+)*)|(\\".+\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$'),this.validateTelephone=/^\+?[0-9\.\(\)\s-]*$/,this.dynamicSegmentsRegex=/^:([^\/]+)$/,this.splatSegmentRegex=/^\*([^\/]+)$/}return Object.defineProperty(a.prototype,"newLineRegex",{get:function(){return/\r|\n/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"optionalRouteRegex",{get:function(){return/\((.*?)\)/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"namedParameterRouteRegex",{get:function(){return/(\(\?)?:\w+/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"wildcardRouteRegex",{get:function(){return/\*\w*/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"escapeRouteRegex",{get:function(){return/[\-{}\[\]+?.,\\\^$|#\s]/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"camelCaseRegex",{get:function(){return/([\-_\.\s])(\w+?)/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"capitalCaseRegex",{get:function(){return/[A-Z]/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"whiteSpaceRegex",{get:function(){return/("[^"]*?"|'[^']*?')|[\s\r\n\t\v]/g},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"quotationRegex",{get:function(){return/'|"/g},enumerable:!0,configurable:!0}),a}();a.Regex=b,Fa.injectable(Za,b);var c=function(){function a(){this.__previousChar="",this.__variableRegex=ma(Za).invalidVariableRegex,this.__outputQueue=[],this.__operatorStack=[],this.__argCount=[],this.__objArgCount=[],this.__lastColonChar=[],this.__lastCommaChar=[]}return a.prototype.createTokens=function(a){if(u(a))return[];this._input=a;for(var b,c=a.length,d=0,e=!1,f=this._isSpace,g=this._isAlphaNumeric,h=0;c>h;h++)if(b=a[h],!f(b)){if(g(b))h=this.__handleAplhaNumeric(h,b);else if(pa(b))switch(b){case".":h=this.__handlePeriod(h,b);break;case"{":this.__handleLeftBrace(b);break;case"}":this.__handleRightBrace(b);break;case"[":this.__handleLeftBracket(b);break;case"]":this.__handleRightBracket(b);break;case"(":this.__handleLeftParenthesis(b);break;case")":this.__handleRightParenthesis(b);break;case",":this.__handleComma(b);break;case"'":case'"':h=this.__handleStringLiteral(h,b)}else if(ra(b))switch(b){case"?":e=!0,d++,this.__handleQuestion(b);break;case":":d=this.__handleColon(b,d);break;default:h=this.__handleOtherOperator(h,b)}else if(";"===b)return this._throwError("Unexpected semicolon"),[];this.__previousChar=b}if(e&&d>0)return this._throwError("Improper ternary expression"),[];if(this.__objArgCount.length>0)return this._throwError("Improper object literal"),[];this.__popRemainingOperators();var i=this.__outputQueue;return this._resetTokenizer(),i},a.prototype._checkType=function(a,b){return b?this._isNumeric(a):this._isAlphaNumeric(a)},a.prototype._lookAhead=function(a,b,c){for(var d,e=this._input,f=e.length;++b="0"&&"9">=a},a.prototype._isSpace=function(a){return" "===a||"\r"===a||"\n"===a||" "===a||" "===a||" "===a},a.prototype._isAlphaNumeric=function(a){return a>="a"&&"z">=a||a>="A"&&"Z">=a||a>="0"&&"9">=a||"@"===a||"_"===a||"$"===a},a.prototype._isStringValidVariable=function(a){return!this.__variableRegex.test(a)},a.prototype.__handleAplhaNumeric=function(a,b){var c=this._isNumeric(b),d=this._lookAhead(b,a,c);return this.__outputQueue.push(c?{val:Number(d),args:0}:{val:d,args:-1}),a+d.length-1},a.prototype.__handlePeriod=function(a,b){var c,d=this.__outputQueue,e=this.__operatorStack,f=d.length-1,g=this.__previousChar;return 0>f||this._isSpace(g)||!u(If[g])||"("===g||","===g?(c=this._lookAhead(b,a,!0),a+=c.length-1,d.push({val:parseFloat(c),args:0})):this._isValEqual(e[0],b)?d.push({val:b,args:0}):u(d[f])||!s(Number(d[f].val))||this._isValEqual(d[f-1],b)?e.unshift({ +val:b,args:0}):(c=this._lookAhead(b,a,!0),a+=c.length-1,d[f].val+=parseFloat(c)),a},a.prototype.__handleLeftBrace=function(a){this.__operatorStack.unshift({val:a,args:0}),this.__objArgCount.push(0),this.__lastColonChar.push(a),this.__lastCommaChar.push(a)},a.prototype.__handleRightBrace=function(a){var b=this.__operatorStack,c=b[0],d=this.__objArgCount.pop();return u(c)?this._throwError("Improper object literal"):(this._popStackForVal(c,"{","Improper object literal"),b.shift(),this.__lastColonChar.pop(),this.__lastCommaChar.pop(),void this.__outputQueue.push({val:"{}",args:d}))},a.prototype.__handleLeftBracket=function(a){var b=this.__previousChar,c=this.__operatorStack;this._isValEqual(c[0],".")&&this.__outputQueue.push(c.shift()),c.unshift({val:a,args:0}),this.__argCount.push({num:0,isArray:!("]"===b||")"===b||this._isAlphaNumeric(b))}),this.__lastCommaChar.push(a)},a.prototype.__handleRightBracket=function(a){var b=this.__operatorStack,c=b[0],d=this.__argCount.pop();return u(c)||u(d)?this._throwError("Brackets mismatch"):(d.isArray||d.num--,this._popStackForVal(c,"[","Brackets mismatch"),b.shift(),this.__lastCommaChar.pop(),void this.__outputQueue.push({val:"[]",args:"["===this.__previousChar?-1:d.num+1}))},a.prototype.__handleLeftParenthesis=function(a){var b=this.__previousChar,c=this.__operatorStack;if(this._isAlphaNumeric(b)||"]"===b||")"===b){var d=this.__outputQueue,e=d[d.length-1];this._isValEqual(e,"[]")?(c.unshift(d.pop()),c.unshift(d.pop())):this._isValEqual(e,"()")||this._isNumeric(e.val)||c.unshift(d.pop()),this.__argCount.push({num:0})}c.unshift({val:a,args:0}),this.__lastCommaChar.push(a)},a.prototype.__handleRightParenthesis=function(a){var b=this.__operatorStack,c=b[0],d=this.__argCount.pop();if(u(c))return this._throwError("Parentheses mismatch");if(this._popStackForVal(c,"(","Parentheses mismatch"),b.shift(),this.__lastCommaChar.pop(),!u(d)){var e=d.num;if("("===this.__previousChar)return void(this.__removeFnFromStack(e)&&this.__outputQueue.push({val:"()",args:0}));this.__removeFnFromStack(e+1)&&this.__outputQueue.push({val:"()",args:e+1})}},a.prototype.__handleComma=function(a){var b=this.__lastCommaChar,c=b[b.length-1];if("("===c||"["===c){var d=this.__argCount,e=d.length;if(!(e>0))return this._throwError("Mismatch with "+c);d[e-1].num++}var f=this.__operatorStack[0];return u(f)?this._throwError("Unexpected comma"):void this._popStackForVal(f,c,"Unexpected comma")},a.prototype.__handleStringLiteral=function(a,b){var c=this._lookAheadForDelimiter(b,a),d=this.__operatorStack;return this._isValEqual(d[0],"([")?d.unshift({val:c,args:0}):this.__outputQueue.push({val:c,args:0}),a+c.length+1},a.prototype.__handleQuestion=function(a){this.__lastColonChar.push(a),this.__determinePrecedence(a)},a.prototype.__handleColon=function(a,b){var c=this.__lastColonChar,d=c[c.length-1],e=this.__outputQueue;if("?"===d){var f=this.__operatorStack,g=f[0];if(u(g))return void this._throwError("Ternary mismatch");b--,c.pop(),this._popStackForVal(g,"?","Ternary mismatch"),e.push(f.shift()),f.unshift({val:a,args:-2})}else{if("{"!==d)return void this._throwError("Unexpected colon");var h=this.__objArgCount,i=e.length-1;if(h[h.length-1]++,0>i)return void this._throwError("Unexpected colon");e[i].args=1}return b},a.prototype.__handleOtherOperator=function(a,b){var c=this._lookAheadForOperatorFn(b,a);return this.__determinePrecedence(c),a+c.length-1},a.prototype.__popRemainingOperators=function(){for(var a,b,c=this.__outputQueue,d=this.__operatorStack;d.length>0;){if(a=d.shift(),b=a.val,"("===b||")"===b)return this._throwError("Parentheses mismatch");c.push(a)}},a.prototype.__determineOperator=function(a){switch(a){case"+":case"-":if(0===this.__outputQueue.length||ra(this.__previousChar))return If["u"+a];default:return If[a]}},a.prototype.__determinePrecedence=function(a){var b,c,d=this.__determineOperator(a),e=d.precedence,f="ltr"===d.associativity,g=this.__operatorStack,h=this.__outputQueue;if(0===g.length)return void g.unshift({val:a,args:d.fn.length-2});do if(c=g[0].val,"."!==c){if(b=If[c],u(b)||!(b.precedence0);g.unshift({val:a,args:d.fn.length-2})},a.prototype.__removeFnFromStack=function(a){for(var b,c=this.__outputQueue,d=this.__operatorStack,e=d[0],f=this._isValEqual,g=this._isValUnequal,h=!1;!u(e)&&g(e,"([")&&(this._isStringValidVariable(e.val)||f(e.val,".[]")||qa(e.val));)b=d.shift(),-1!==b.args||f(b,".[]")||(b.args=-2),c.push(b),e=d[0],h=!0;return h||g(c[c.length-a-1],"()")||(h=!0),h},a._inject={_log:Xa},a}();a.Tokenizer=c,Fa.injectable($a,c);var d=function(){function a(){this._tokens=[],this.__cache={},this.__codeArray=[],this.__identifiers=[],this.__tempIdentifiers=[],this.__aliases={}}return a.prototype.parse=function(a){var b=this.__cache[a];if(!u(b))return b;this._tokens=this._tokenizer.createTokens(a),b=this._evaluate(a);var c=b.identifiers;if(0===c.length){var d=b.evaluate(null);b.evaluate=function(){return d}}return this.__cache[a]=b,b},a.prototype.clearCache=function(a){return n(a)?void P(this.__cache,a):void(this.__cache={})},a.prototype._evaluate=function(a){for(var b,c,d,e=this._tokens,f=e.length,g=this.__tempIdentifiers,h=this.__codeArray,i=!1,j=0;f>j;j++)if(b=e[j],c=b.val,d=b.args,qa(c))switch(c){case"()":i=this.__handleFunction(j,d,i);break;case"{}":h.push(this.__convertObject(d)),g.push(".");break;default:0>d?(h.push("[]"),g.push(".")):d>0?(h.push(this.__convertArrayLiteral(d)),g.push(".")):i=this.__indexIntoObject(j,c,i)}else if(ra(c))if(0===d)h.push(this.__convertPrimitive(j,c,d));else switch(c){case"?":this.__handleQuestion();break;case":":this.__handleColon();break;case"+":case"-":1===d&&(c="u"+c);default:this.__handleOperator(c,d)}else 0>d?h.push(this.__convertFunction(j,c,i)):h.push(this.__convertPrimitive(j,c,d));this._popRemainingIdentifiers(),this._makeIdentifiersUnique();var k={evaluate:new Function(Ha,Ne,"var initialContext;return "+(0===h.length?'"'+a+'"':h.join(""))+";"),expression:a,identifiers:this.__identifiers.slice(0),aliases:Object.keys(this.__aliases)};return this._resetParser(),k},a.prototype._peek=function(a){return this._tokens[a+1]},a.prototype._lookBack=function(a){return this._tokens[a-1]},a.prototype._popRemainingIdentifiers=function(){for(var a,b=this.__identifiers,c=this.__tempIdentifiers;c.length>0;)a=c.pop(),"."!==a&&b.push(a)},a.prototype._makeIdentifiersUnique=function(){for(var a,b=this.__identifiers,c=[],d={};b.length>0;)a=b.pop(),d[a]||(d[a]=!0,c.push(a));this.__identifiers=c},a.prototype._isValEqual=function(a,b){return u(a)||u(a.val)?u(b):""===a.val?""===b:-1!==b.indexOf(a.val)},a.prototype._isValUnequal=function(a,b){return u(a)||u(a.val)?!u(b):""===a.val?""!==b:-1===b.indexOf(a.val)},a.prototype._resetParser=function(){this._tokens=[],this.__codeArray=[],this.__identifiers=[],this.__tempIdentifiers=[],this.__aliases={}},a.prototype._throwError=function(a){this._log.error(new Error(a))},a.prototype.__convertPrimitive=function(a,b,c){if(c>0)return this.__tempIdentifiers.push("."),b;var d=s(Number(b)),e=this._peek(a),f=!(u(e)||e.args>=1),g=this._isValEqual;return sa(b)||n(b)&&(d||this._isValUnequal(e,"[]()")||g(e,"[]")&&!f)?(this.__tempIdentifiers.push("."),'"'+b+'"'):(!d||g(e,".[]")&&f?this.__tempIdentifiers.push(b):this.__tempIdentifiers.push("."),b)},a.prototype.__convertFunction=function(a,b,c){if("@"===b[0])this.__aliases[b.slice(1)]=!0;else if(sa(b))return this.__tempIdentifiers.push("."),b;var d=this._peek(a),e=this._isValEqual;if(e(this._tokens[a-1],"()")&&e(d,".[]")?this.__tempIdentifiers.push("."):this.__tempIdentifiers.push(b),u(d))return"(initialContext = ("+this.__findInitialContext.toString()+')(context,aliases,"'+b+'"))';switch(d.val){case".":case"()":return b;default:if(!c)return"(initialContext = ("+this.__findInitialContext.toString()+')(context,aliases,"'+b+'"))'}},a.prototype.__convertObject=function(a){for(var b,c,d,e=this.__identifiers,f=this.__tempIdentifiers,g=this.__codeArray,h=0,i="{";h++1&&(c=f.pop(),f.pop(),"."!==c&&e.push(c));return i.replace(",","")+"}"},a.prototype.__convertArrayLiteral=function(a){for(var b,c=this.__identifiers,d=this.__tempIdentifiers,e=this.__codeArray,f=0,g="";f++0&&(b=d.pop(),"."!==b&&c.push(b));return"["+g.slice(0,-1)+"]"},a.prototype.__handleFunction=function(a,b,c){var d,e,f=this.__identifiers,g=this.__tempIdentifiers,h=this.__codeArray,i=0,j=this._lookBack(a),k=!u(j)&&(-2===j.args||this._isValEqual(j,".[]")),l="",m="",n="",o=!1;for(k&&(m=h.pop(),n=g.pop());i++0&&(d=g.pop(),"."!==d&&(f.push(d),o=!0));if(e=b>0?".call(initialContext || context,"+l.slice(0,l.length-1)+")":".call(initialContext || context)",c)if(c=!1,h.length>0){var p=h.pop(),r=g.length-1;0>r||"."===g[r]||""===n?""!==n&&o&&"["!==p[0]&&"]"!==p[p.length-1]&&(f[f.length-1]+="."+n):(g[r]+="."+n,f.push(g.pop())),e=q(m)?p+e:"(("+this.__indexIntoContext.toString()+")("+p+',"'+m+'") || (function () {}))'+e}else this._throwError("Improper expression or context");else k?(e="(initialContext = (("+this.__findInitialContext.toString()+')(context,aliases,"'+m+'") || (function () {}))'+e+")",f.push(m)):e=h.pop()+e;h.push(e);var s=g.length;return this._isValEqual(this._peek(a),"[]")&&s>0&&"."!==g[s-1]&&f.push(g.pop()),c},a.prototype.__indexIntoObject=function(a,b,c){var d=this._isValEqual;if(d(this._peek(a),"()"))return!0;var e,f=this.__codeArray,g=f.pop(),h=this.__identifiers,i=this.__tempIdentifiers,j=this._lookBack(a),k=i.pop(),l=!u(k);return l&&"@"===k[0]?(g="("+this.__indexIntoContext.toString()+")("+f.pop()+","+g+")",h.push(k),i.length>0&&h.push(i.pop())):d(j,"++--()[]*/%?:>=<=&&||!===")?(g="("+this.__indexIntoContext.toString()+")("+f.pop()+","+g+")",i.push(".")):"[]"!==b||u(j)||j.args>=0?(g="("+this.__indexIntoContext.toString()+")("+f.pop()+',"'+g+'")',e=i.length-1,e>=0?"."!==i[e]&&(i[e]+="."+k):l&&"."!==k&&"."!==b&&h.push(k)):(g="("+this.__indexIntoContext.toString()+")("+f.pop()+","+g+")",e=i.length-1,e>=0&&"."!==i[e]&&h.push(i.pop()),h.push(k)),f.push(g),c},a.prototype.__handleQuestion=function(){for(var a,b=this.__identifiers,c=this.__tempIdentifiers,d=this.__codeArray,e=d.pop(),f=0;2>f&&c.length>0;f++)a=c.pop(),"."!==a&&b.push(a);d.push(d.pop()+"?"+e)},a.prototype.__handleColon=function(){for(var a,b=this.__identifiers,c=this.__tempIdentifiers,d=this.__codeArray,e=d.pop(),f=0;2>f&&c.length>0;f++)a=c.pop(),"."!==a&&b.push(a);d.push(d.pop()+":"+e)},a.prototype.__handleOperator=function(a,b){for(var c,d=this.__identifiers,e=this.__tempIdentifiers,f=this.__codeArray,g=0,h="";g++0&&(c=e.pop(),"."!==c&&d.push(c));f.push("("+If[a].fn.toString()+")(context, aliases,"+h.slice(0,h.length-1)+")")},a.prototype.__findInitialContext=function(a,b,c){return"@"===c[0]&&null!==b&&"object"==typeof b?b[c.slice(1)]:null!==a&&"object"==typeof a?a[c]:void 0},a.prototype.__indexIntoContext=function(a,b){return null!==a&&"object"==typeof a?a[b]:void 0},a._inject={_tokenizer:$a,_log:Xa},a}();a.Parser=d,Fa.injectable(Ya,d)}(Df=a.expressions||(a.expressions={}));var Ef;!function(a){function b(a){return a.location}function c(){return d.config}a.Location=b,Fa.injectable(Tb,b,[Fb]);var d=function(){function a(){this.uid=M(Ub),this.__lastUrl=this._location.href,this.__initializing=!1,this._EventManager.on(this.uid,yd,this.initialize,this),this._compat.msApp&&(this._stack=[])}return a.prototype.initialize=function(){var b=(a.config,this._compat);this._EventManager.dispose(this.uid),this.__initializing=!0,ma(Eb);var c=this.url(),d=c,e=this._urlChanged.bind(this),f=this._dom,g=this._window;d!==c&&this.url(d,!0),b.pushState&&f.addEventListener(g,De,e,!1),f.addEventListener(g,Ee,e,!1),this.__initializing=!1},a.prototype.url=function(a,b){var c=this._location;return n(a)&&this.__lastUrl!==a&&(!b&&w(this._stack)&&this._stack.push(c.href),this._setUrl(a,b)),this.__currentUrl||c.href},a.prototype.back=function(a){s(a)||(a=1);var b=this._stack;return w(b)&&b.length>1?(this._stack=b=b.slice(0,b.length-(a-1)),this.url(b.pop()),void b.pop()):void this._history.go(-a)},a.prototype.forward=function(a){s(a)||(a=1),this._history.go(a)},a.prototype.urlUtils=function(b){b=b||this.url();var c=ma(Eb),d=a.config;return d.routingType===d.HASH&&(b=b.replace(new RegExp("#"+(d.hashPrefix||"")+"/?"),"")),c.initialize(b),c},a.prototype.isCrossDomain=function(a){if(!n(a))return!1;var b=this.urlUtils(a),c=this.urlUtils();return b.protocol!==c.protocol||b.hostname!==c.hostname||b.port!==c.port},a.prototype._urlChanged=function(){if(!this.__initializing){this.__currentUrl=null;var b=this.url(),c=a.config;if(!(this.__lastUrl===b||c.routingType===c.STATE&&b.indexOf(this.__lastUrl+"#")>-1)){this.__lastUrl=b;var d=this._EventManager;d.dispatch(Cd,this,d.DIRECT,[this.urlUtils()])}}},a.prototype._setUrl=function(b,c){b=this.formatUrl(b);var d=this.urlUtils(b),e=a.config.baseUrl,f=this._history,g=this._location;return-1===d.href.indexOf(e)?void(g.href=b):(this._regex.fullUrlRegex.test(b)||"/"===b[0]||(b=e+b),void(this._compat.pushState?(c?f.replaceState(null,"",b):f.pushState(null,"",b),this.__initializing||this._urlChanged()):(this.__currentUrl=b,c?g.replace(b):g.href=b)))},a.prototype.formatUrl=function(b){var c=a.config,d=(c.baseUrl,!this._regex.fullUrlRegex.test(b)||b.indexOf(c.baseUrl)>-1);if(!n(b))return"";if(b===c.baseUrl)return b;if("/"===b[0]&&(b=b.slice(1)),d&&c.routingType===c.HASH){var e=-1!==b.indexOf(this.urlUtils().protocol),f=c.hashPrefix||"",g=new RegExp("#"+f+"|#/");"/"!==b[b.length-1]&&-1===b.indexOf("?")&&(b+="/"),e&&!g.test(b)?b=b+"#"+f+"/":g.test(b)||(b="#"+f+("/"!==b[0]?"/":"")+b)}return d&&-1===b.indexOf(c.baseUrl)&&(b=c.baseUrl+b),b},a._inject={_EventManager:Ua,_compat:Oa,_regex:Za,_window:Fb,_location:Tb,_history:Sb,_dom:rb},a.config={HASH:"hash",STATE:"state",routingType:"hash",hashPrefix:"!",baseUrl:""},a}();a.Browser=d,Fa.injectable(Ab,d),a.IBrowserConfig=c,Fa.injectable(Bb,c);var e=function(){function a(){var b=this._browserConfig;if(q(b.baseUrl)||!this._regex.fullUrlRegex.test(b.baseUrl)){var c=this._window.location.href,d=c.replace(this._regex.initialUrlRegex,"/"),e=b.baseUrl;for(n(e)?0===e.indexOf("/")&&(e=e.slice(1)):e="",e=a.__getBaseUrl(d)+e;"/"===e[e.length-1];)e=e.slice(0,-1);b.baseUrl=e+"/"}}return a.__getQuery=function(a){return R(a)},a.__getBaseUrl=function(a){var b=ma(Za),c=ma(Tb),d=c.origin,e=c.protocol;c.host;return"file:"===e||e.indexOf("wmapp")>-1||e.indexOf("ms-appx")>-1?d=c.href:v(d)&&(d=c.protocol+"//"+c.host),d=d.replace(b.initialUrlRegex,""),d.split("?")[0].split("#")[0]+"/"},a.prototype.initialize=function(b){b=b||"";var c=a.__urlUtilsElement||(a.__urlUtilsElement=this._document.createElement("a")),d=this._browserConfig;"/"===b[0]&&0!==b.indexOf("//")&&(b=b.slice(1)),this._regex.fullUrlRegex.test(b)||(b=d.baseUrl+b),c.setAttribute("href",b),b=c.href,c.setAttribute("href",b),b=c.href;c.protocol?c.protocol.replace(/:$/,""):"";this.href=b,this.protocol=c.protocol?c.protocol.replace(/:$/,""):"",this.host=c.host,this.search=c.search?c.search.replace(/^\?/,""):"",this.hash=c.hash?c.hash.replace(/^#/,""):"",this.hostname=c.hostname,this.port=c.port;var e;e=q(d.baseUrl)?"/"===c.pathname.charAt(0)?c.pathname:"/"+c.pathname:b.replace(d.baseUrl,"/"),e=e.replace(this._regex.initialUrlRegex,"/"),this.pathname=e.split("?")[0].split("#")[0],this.query=a.__getQuery(this.search)},a.prototype.toString=function(){return this.href},a._inject={_EventManager:Ua,_document:Ra,_window:Fb,_compat:Oa,_regex:Za,_browserConfig:Bb},a}();a.UrlUtils=e,Fa.injectable(Eb,e,null,ue)}(Ef=a.web||(a.web={}));var Ff;!function(a){function c(){return function(){x.nextTick(g)}}function d(){var a=new r(g),b=ma(Ra),c=ma(Fb),d=b.createElement("div");return a.observe(d,{attributes:!0}),c.addEventListener("unload",function(){a.disconnect(),a=null},!1),function(){d.setAttribute("drainQueue","drainQueue")}}function f(){var a=a,b="undefined"!=typeof a?a:this;return function(){b.setTimeout(g,1)}}function g(){for(var a,b,c,d=0;d-1?"&":"?")+k+"="+j;var l=g[j];g[j]=function(b){t(a.clearTimeout)&&a.clearTimeout(),h.head.removeChild(i),v(l)?P(g,j):g[j]=l,e({response:b,status:200})},h.head.appendChild(i);var m=c.timeout;s(m)&&m>0&&(a.clearTimeout=I(function(){a.clearTimeout=J(function(){f(new B({response:"Request timed out in "+m+"ms for "+d,status:408})),g[j]=b},m-1)}))});return e.initialize(this),e},a.prototype._xhrOnReadyStateChange=function(){var a=this.xhr;if(4===a.readyState){var b=a.status;if(0===b){var c=a.response;if(u(c))try{c=a.responseText}catch(a){}return q(c)?!1:!0}return b>=200&&300>b||304===b?!0:!1}},a.prototype._sendXhrRequest=function(){var a=this,b=this.xhr,c=this.__options,d=c.method,e=c.url,f=new C(function(f,g){b.onreadystatechange=function(){var b=a._xhrOnReadyStateChange();if(!u(b)){var d=a._formatResponse(c.responseType,b);b?f(d):g(new B(d)),a.xhr=c=null}},n(d)||(a._log.info('AjaxOptions method was not of type string. Defaulting to "GET".'),d="GET"),b.open(d.toUpperCase(),e,!0,c.user,c.password);var i=c.responseType;if(a.__fileSupported||""===i||"text"===i||(i=""),"json"===i)try{b.responseType=i}catch(a){b.responseType=""}b.withCredentials=c.withCredentials;var j=c.overrideMimeType,k=c.data;if(n(j)&&!q(j)&&b.overrideMimeType(j),u(k)||""===k)a.__setHeaders(),b.send();else{var l=c.transforms||[],m=l.length,o=c.contentType,p=n(o)&&!q(o);if(m>0){for(var r=0;m>r;++r)k=l[r](k,b);p&&b.setRequestHeader("Content-Type",o),a.__setHeaders(),b.send(k)}else if(h(k))if(p){var t=o.toLowerCase();-1!==t.indexOf("x-www-form-urlencoded")?(k=a.__serializeFormData(),b.setRequestHeader("Content-Type",o),a.__setHeaders(),b.send(k)):-1!==t.indexOf("multipart/form-data")?a.__fileSupported?(k=a.__appendFormData(),a.__setHeaders(),b.send(k)):a.__submitFramedFormData().then(function(a){f(a)},function(){a.xhr=null}):(k=JSON.stringify(k),b.setRequestHeader("Content-Type",o),a.__setHeaders(),b.send(k))}else a.__setHeaders(),b.send(k);else p&&b.setRequestHeader("Content-Type",o),a.__setHeaders(),b.send(k)}var v=c.timeout;s(v)&&v>0&&(a.clearTimeout=I(function(){a.clearTimeout=J(function(){g(new B({response:"Request timed out in "+v+"ms for "+c.url,status:b.status,getAllResponseHeaders:function(){return b.getAllResponseHeaders()},xhr:b})),b.onreadystatechange=null,b.abort(),a.xhr=null},v-1)}))});return f.initialize(this),f},a.prototype._invalidOptions=function(){var a=this;return new C(function(b,c){a._log.warn("Attempting a request without specifying a url"),c(new B({response:"Attempting a request without specifying a url",status:null,getAllResponseHeaders:null,xhr:null}))})},a.prototype._formatResponse=function(a,b){var c=this.xhr,d=c.status,e=c.response;if(u(e))try{e=c.responseText}catch(a){}if(0===d&&(d=b?200:404),c.onreadystatechange=null,t(this.clearTimeout)&&this.clearTimeout(),"json"===a&&n(e))try{e=JSON.parse(e)}catch(a){}return{response:e,status:d,getAllResponseHeaders:function(){return c.getAllResponseHeaders()},xhr:c}},a.prototype.__setHeaders=function(){var a,b,c=this.__options.headers,d=Object.keys(c||{}),e=this.xhr,f=d.length;for(b=0;f>b;++b)a=d[b],e.setRequestHeader(a,c[a])},a.prototype.__serializeFormData=function(){for(var a,b,c=this.__options.data,d=Object.keys(c),e=[];d.length>0;)a=d.pop(),b=c[a],u(b)?b="":h(b)&&(this._log.warn('Invalid form entry with key "'+a+'" and value "'+b),b=JSON.stringify(b)),e.push(encodeURIComponent(a)+"="+encodeURIComponent(b));return e.join("&").replace(/%20/g,"+")},a.prototype.__appendFormData=function(){for(var a,b,c=this.__options.data,d=new FormData,e=Object.keys(c);e.length>0;)a=e.pop(),b=c[a],u(b)?d.append(a,""):h(b)?m(b)?d.append(a,b,b.name||b.fileName||"blob"):(this._log.warn('Invalid form entry with key "'+a+'" and value "'+b),d.append(a,JSON.stringify(b))):d.append(a,b);return d},a.prototype.__submitFramedFormData=function(){var a,b=this,c=this.__options,d=c.data,e=c.url,f=this._document,g=f.body,h=ma(Na),i=f.createElement("form"),j=f.createElement("iframe"),k=M("iframe_target"),l=Object.keys(d);for(j.name=i.target=k,j.src="javascript:false;",i.enctype=i.encoding="multipart/form-data",i.action=e,i.method="POST",i.style.display="none";l.length>0;)a=l.pop(),i.insertBefore(this.__createInput(a,d[a]),null);return new h(function(a,c){b.xhr.abort=function(){j.onload=null,g.removeChild(i),g.removeChild(j),c()},j.onload=function(){var c=j.contentDocument.body.innerHTML;g.removeChild(i),g.removeChild(j),a({response:c,status:200,getAllResponseHeaders:function(){return""}}),b.xhr=j.onload=null},g.insertBefore(i,null),g.insertBefore(j,null),i.submit()})},a.prototype.__createInput=function(a,b){var c=this._document,d=c.createElement("input");if(d.type="hidden",d.name=a,u(b))d.value="";else if(h(b))if(!t(b.slice)||v(b.name)||v(b.path))this._log.info('Invalid form entry with key "'+a+'" and value "'+b),d.value=JSON.stringify(b);else{var e=c.querySelectorAll('input[type="file"][name="'+a+'"]'),f=e.length;if(0===f)this._log.info('Could not find input[type="file"] with [name="'+a+'"]. Stringifying data instead.'),d.value=JSON.stringify(b);else if(1===f){d=e[0];var g=d.cloneNode(!0);d.parentNode.insertBefore(g,d)}else{for(var i,j=b.path;f-->0;)if(i=e[f],i.value===j){d=i;var k=d.cloneNode(!0);d.parentNode.insertBefore(k,d);break}-1===f&&(this._log.info('Could not find input[type="file"] with [name="'+a+'"] and [value="'+b.path+'"]. Stringifying data instead.'),d.value=JSON.stringify(b))}}else d.value=b;return d},a._inject={_browser:Ab,_window:Fb,_document:Ra,_config:Ma,_compat:Oa,_log:Xa},a}();a.HttpRequest=A;var B=function(){function a(a){this.name="AjaxError",Error.apply(this),this.response=this.message=a.response,this.status=a.status,this.getAllResponseHeaders=a.getAllResponseHeaders,this.xhr=a.xhr}return a.prototype.toString=function(){var a=this.response,b=a;return h(a)&&!a.hasOwnProperty("toString")&&(b=JSON.stringify(a)),"Request failed with status: "+this.status+" and response: "+b},a}();a.AjaxError=B,B.prototype=Error.prototype;var C=function(a){function c(b,c){a.call(this,b),this._window=ma(Fb),u(c)||(this.__http=c.__http)}return __extends(c,a),c.prototype.initialize=function(a){h(a)&&u(this.__http)&&(this.__http=a)},c.prototype.cancel=function(){var a=this.__http,c=a.xhr,d=a.jsonpCallback;t(a.clearTimeout)&&a.clearTimeout(),u(c)?u(d)||(this._window[d]=b):(c.onreadystatechange=null,c.abort(),a.xhr=null),this.__subscribers=[]},c.prototype.then=function(b,c){return a.prototype.then.call(this,b,c)},c.prototype.catch=function(b){return a.prototype.catch.call(this,b)},c}(y);a.AjaxPromise=C;var D=function(){function a(){this.responseType={DEFAULT:"",ARRAYBUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},this.contentType={ENCODED_FORM:"application/x-www-form-urlencoded;charset=utf-8",JSON:"application/json;charset=utf-8",MULTIPART_FORM:"multipart/form-data",OCTET_STREAM:"application/octet-stream;charset=utf-8",XML:"application/xml;charset=utf-8",PLAIN_TEXT:"text/plain",HTML:"text/html"}}return a.prototype.ajax=function(a){var b=ma(La);return b.initialize(a),b.execute()},a.prototype.jsonp=function(a){var b=ma(La);return b.initialize(a),b.executeJsonp()},a.prototype.json=function(a){var b=ma(La);return b.initialize(e(!1,!1,{},a,{responseType:"json"})),b.execute()},a.config={url:null,method:"GET",responseType:"",transforms:[],headers:{},withCredentials:!1,timeout:null,jsonpIdentifier:"callback",contentType:"application/json;charset=utf-8"},a}();a.Http=D,Fa.injectable(Ka,D),Fa.injectable(La,A,null,ue),a.IHttpConfig=j,Fa.injectable(Ma,j)}(Ff=a.async||(a.async={}));var Gf;!function(a){function b(){return f}function c(){return a.managerCache}var d={},e={},f=function(){function a(a,b){this.__uid=a,this.__options=b,this.__size=0,u(b)&&(this.__options={timeout:0}),e[a]={}}return a.create=function(b,c){var e=d[b];return u(e)&&(e=d[b]=new a(b,c)),e},a.fetch=function(a){return d[a]},a.clear=function(){for(var a=Object.keys(d),b=a.length,c=0;b>c;++c)d[a[c]].clear();d={}},a.prototype.info=function(){return{uid:this.__uid,size:this.__size,options:this.__options}},a.prototype.put=function(a,b){var c=e[this.__uid][a];e[this.__uid][a]=b,v(c)&&this.__size++;var d=this.__options.timeout;return s(d)&&d>0&&J(this.remove,d,[a],this),b},a.prototype.read=function(a){return e[this.__uid][a]},a.prototype.remove=function(a){P(e[this.__uid],a),this.__size--},a.prototype.clear=function(){e[this.__uid]={},this.__size=0},a.prototype.dispose=function(){this.clear(),P(d,this.__uid)},a}();a.Cache=f,a.ICacheFactory=b,Fa.injectable(kb,b,null,ve),a.managerCache=f.create("__managerCache"),a.IManagerCache=c,Fa.injectable(lb,c);var g=function(a){function b(){a.call(this,"__templateCache")}return __extends(b,a),b.prototype.put=function(b,c){var d=this._Promise;if(a.prototype.put.call(this,b,d.resolve(c)),l(c))c=c.cloneNode(!0);else if(k(c)){var e=document.createDocumentFragment();e.appendChild(c.cloneNode(!0)),c=e}else(n(c)||u(c))&&(c=ba(c));return d.resolve(c)},b.prototype.read=function(b){var c=this,d=a.prototype.read.call(this,b);return u(d)?this._Promise.reject(null):d.then(function(a){return c.put(b,a)},function(a){return c._log.warn("Error retrieving template, "+b+", from promise."),null})},b._inject={_Promise:Na,_log:Xa},b}(f);a.TemplateCache=g,Fa.injectable(mb,g);var h=function(){function a(a){var b=this;this._storage=a,B(function(a,c){b[c]=a},a)}return Object.defineProperty(a.prototype,"length",{get:function(){return this._storage.length},enumerable:!0,configurable:!0}),a.prototype.clear=function(){this._storage.clear()},a.prototype.getItem=function(a){return this._storage.getItem(a)},a.prototype.key=function(a){return this._storage.key(a)},a.prototype.removeItem=function(a){this._storage.removeItem(a)},a.prototype.setItem=function(a,b){this._storage.setItem(a,b),this[a]=this.getItem(a)},a}();a.BaseStorage=h;var i=function(a){function b(){a.call(this,plat.acquire(Fb).localStorage)}return __extends(b,a),b}(h);a.LocalStorage=i,Fa.injectable(Gb,i);var j=function(a){function b(){a.call(this,plat.acquire(Fb).sessionStorage)}return __extends(b,a),b}(h);a.SessionStorage=j,Fa.injectable(Hb,j)}(Gf=a.storage||(a.storage={}));var Hf,If={"u+":{precedence:4,associativity:"rtl",fn:function(a,b,c){return+c(a,b)}},"+":{precedence:6,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)+d(a,b)}},"u-":{precedence:4,associativity:"rtl",fn:function(a,b,c){return-c(a,b)}},"-":{precedence:6,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)-d(a,b)}},"*":{precedence:5,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)*d(a,b)}},"/":{precedence:5,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)/d(a,b)}},"%":{precedence:5,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)%d(a,b)}},"?":{precedence:15,associativity:"rtl",fn:function(){return void 0}},":":{precedence:15,associativity:"rtl",fn:function(){return void 0}},">":{precedence:8,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>d(a,b)}},"<":{precedence:8,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>":{precedence:7,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>>d(a,b)}},"<<":{precedence:7,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)<>>":{precedence:7,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>>>d(a,b)}},"&&":{precedence:13, +associativity:"ltr",fn:function(a,b,c,d){return c(a,b)&&d(a,b)}},"||":{precedence:14,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)||d(a,b)}},"==":{precedence:9,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)==d(a,b)}},"===":{precedence:9,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)===d(a,b)}},"!=":{precedence:9,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)!=d(a,b)}},"!==":{precedence:9,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)!==d(a,b)}},">=":{precedence:8,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)>=d(a,b)}},"<=":{precedence:8,associativity:"ltr",fn:function(a,b,c,d){return c(a,b)<=d(a,b)}},"=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"++":{precedence:3,associativity:"",fn:function(a,b,c){var d=plat.acquire(Xa);d.error(new Error("Assignment operators are not supported"))}},"--":{precedence:3,associativity:"",fn:function(a,b,c){var d=plat.acquire(Xa);d.error(new Error("Assignment operators are not supported"))}},"+=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"-=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"*=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"/=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}},"%=":{precedence:17,associativity:"rtl",fn:function(a,b,c,d){var e=plat.acquire(Xa);e.error(new Error("Assignment operators are not supported"))}}},Jf={"()":{precedence:2,associativity:null,fn:null},"[]":{precedence:2,associativity:null,fn:null},".":{precedence:2,associativity:null,fn:null},"{}":{precedence:1,associativity:null,fn:null}},Kf={"{":{precedence:1,associativity:null,fn:null},"}":{precedence:1,associativity:null,fn:null},"[":{precedence:2,associativity:null,fn:null},"]":{precedence:2,associativity:null,fn:null},"(":{precedence:2,associativity:null,fn:null},")":{precedence:2,associativity:null,fn:null},".":{precedence:2,associativity:null,fn:null},",":{precedence:18,associativity:null,fn:null},"'":{precedence:0,associativity:null,fn:null},'"':{precedence:0,associativity:null,fn:null}},Lf={false:!1,true:!0,null:null,undefined:"undefined"};!function(a){function f(a){return i._log=a,i}var g=["push","pop","reverse","shift","sort","splice","unshift"],i=function(){function a(){this._compat=ma(Oa),this.__identifiers={},this.__identifierHash={},this.__lengthListeners={},this.__contextObjects={},this.__isArrayFunction=!1}return a.getManager=function(b){var c,d=a.__managers,e=b.uid,f=d[e];return u(f)?(c=d[e]=new a,c.context=b,c):c=f},a.dispose=function(b){if(!u(b)){var c=b.uid,d=a.__controls,e=d[c]||{},f=a.__managers,g=f[c];u(g)||(g.dispose(),P(f,c));for(var h,i=Object.keys(e);i.length>0;)for(h=e[i.shift()];h.length>0;)h.shift()();P(d,c),u(b.context)||(a.unObserve(b.context),a.defineProperty(b,Ha,b.context,!0,!0,!0))}},a.removeArrayListeners=function(b,c){var d=a.arrayChangeListeners[b];u(d)||P(d,c)},a.getContext=function(a,b){if(u(a))return a;for(b=b.slice(0);b.length>0;)if(a=a[b.shift()],u(a))return a;return a},a.defineProperty=function(a,b,d,e,f,g){c(a,b,d,e,f,g)},a.defineGetter=function(a,b,c,e,f){d(a,b,c,e,f)},a.pushRemoveListener=function(b,c,d){var e,f=a.__controls,g=f[c];u(g)&&(g=f[c]={}),e=g[b],u(e)&&(e=g[b]=[]),e.push(d)},a.spliceRemoveListener=function(b,c,d){var e,f=a.__controls,g=f[c];if(!u(g)&&(e=g[b],!u(e))){var h=e.indexOf(d);-1!==h&&(e.splice(h,1),0===e.length&&P(g,b))}},a.removeIdentifier=function(b,c){for(var d,e=b.length,f=a.__controls,g=0;e>g;++g)d=f[b[g]],u(d)||P(d,c)},a.createContext=function(b,c){var d=b.context;if(!h(d)){if(!u(d))return void a._log.warn("A child control is trying to create a child context that has a parent control with a primitive type context");d=b.context={}}for(var e,f,g=c.split(".");g.length>0;)e=g.shift(),f=d[e],u(f)&&(f=s(Number(g[0]))?d[e]=[]:d[e]={}),d=f;return d},a.unObserve=function(a){e(!0,!0,a)},a.prototype.getContext=function(a,b){return this._getContext(a.join("."),a,b)},a.prototype.observe=function(c,d){var e=this;if(q(c))return b;var f,g,i=c.split("."),j=i.pop(),k="length"===j,l=this._hasIdentifier(c),m=!u(d);if(i.length>0?(f=i.join("."),g=this._getContext(f,i,!0)):(f=j,g=this.context),!h(g))return m?(k&&(this.__lengthListeners[c]=d,a.pushRemoveListener(c,d.uid,function(){P(e.__lengthListeners,c)})),this._addObservableListener(c,d,k)):b;this.__observedIdentifier=null,this.__contextObjects[c]=g[j];var o=this.__observedIdentifier,p=!u(o),r=b;if(p&&(l=!0),m){var s=b,t=this._addObservableListener(c,d,k);p&&c!==o&&(s=this._addObservableListener(o,d,k)),r=function(){t(),s()}}var v=w(g),x=r,y=b,z=b,A=Number(j);if(v&&A>=g.length)y=this.observe(f+".length",{uid:d.uid,listener:function(a,b){A>=a||(y(),e._define(c,g,j))}}),r=function(){x(),y()};else if(!l)if(v&&k){var B=i.pop(),C=this.getContext(i,!1);if(this.__observedIdentifier=null,Q(C,B),n(this.__observedIdentifier)&&(f=this.__observedIdentifier),m){var D=d.uid;y=this.observeArrayMutation(D,b,f,g,null),z=this.observe(f,{uid:D,listener:function(a,c){y(),y=e.observeArrayMutation(D,b,f,a,c)}})}r=function(){x(),z(),y()}}else this._define(c,g,j);return r},a.prototype.observeArrayMutation=function(a,c,d,e,f){var h=(g.length,this._compat);h.proto,h.setProto;if(w(f)&&this._restoreArray(f),u(e))return b;var i=d.split("."),j=i.pop(),k=this.getContext(i,!1);this.__observedIdentifier=null,Q(k,j),n(this.__observedIdentifier)&&(d=this.__observedIdentifier);var l=[];return t(c)&&l.push(this._pushArrayListener(a,d,c)),this._overwriteArray(d,e),function(){for(;l.length>0;)l.pop()()}},a.prototype.dispose=function(){this.context=null,this.__identifiers={},this.__identifierHash={},this.__contextObjects={}},a.prototype._pushArrayListener=function(b,c,d){var e=a.arrayChangeListeners,f=e[c];u(f)&&(f=e[c]={});var g=f[b];u(g)&&(g=f[b]=[]);var h=!1,i=function(){if(!h){h=!0,a.spliceRemoveListener(c,b,i);var j=g.indexOf(d);-1!==j&&(g.splice(j,1),0===g.length&&(P(f,b),q(f)&&P(e,c)))}};return g.push(d),a.pushRemoveListener(c,b,i),i},a.prototype._restoreArray=function(a){var b=this._compat;if(b.setProto)Object.setPrototypeOf(a,Object.create(Array.prototype));else if(b.proto)a.__proto__=Object.create(Array.prototype);else for(var c,d=g.length,e=0;d>e;++e)c=g[e],a[c]=Array.prototype[c]},a.prototype._overwriteArray=function(b,c){var d,e,f=this._compat,h=g.length;if(f.proto){var i=Object.create(Array.prototype);for(e=0;h>e;++e)d=g[e],i[d]=this._overwriteArrayFunction(b,d);return void(f.setProto?Object.setPrototypeOf(c,i):c.__proto__=i)}for(e=0;h>e;++e)d=g[e],a.defineProperty(c,d,this._overwriteArrayFunction(b,d),!1,!0,!0)},a.prototype._getContext=function(a,b,c){var d=this.__contextObjects[a];return u(d)&&(d=c===!0?this.__contextObjects[a]=this._observeImmediateContext(b,a):this._getImmediateContext(b)),d},a.prototype._getImmediateContext=function(a){for(var b=this.context;a.length>0&&(b=b[a.shift()],!u(b)););return b},a.prototype._observeImmediateContext=function(a,b){return u(this.__identifiers[b])&&this.observe(b,null),this._getImmediateContext(a)},a.prototype._getValues=function(a,b,c){for(var d,e=!0,f=!0;a.length>1;)if(d=a.shift(),e&&(b=b[d],u(b)&&(e=!1)),f&&(c=c[d],u(c)&&(f=!1)),!e&&!f)return null;d=a[0];var g,h;return u(b)||(g=b[d]),u(c)||(h=c[d]),{newValue:g,oldValue:h}},a.prototype._notifyChildProperties=function(a,c,d,e){var f=this;e=e||Object.keys(this.__identifierHash[a]||{});for(var g,i,j,k,l,m,o,p,r,s,t,v=e.length,x={},y=".",z="length",A=a.length+1,B=0;v>B;++B){if(g=e[B],i=g.slice(A),k=i.split(y),m=k.pop(),o=m===z,j=k.join(y),q(j)){if(p=c,r=d,s=u(p)?void 0:p[m],t=u(r)?void 0:r[m],o&&!w(r)&&w(p)){var C=this.__lengthListeners[g];if(!u(C)){var D=C.uid,E=a.split(y),F=E.pop(),G=E.join(y),H=this._getContext(G,E,!1);this.__observedIdentifier=null,Q(H,F),n(this.__observedIdentifier)&&(G=this.__observedIdentifier);var I=this.observeArrayMutation(D,b,G,p,null);this.observe(G,{uid:D,listener:function(a,c){I(),I=f.observeArrayMutation(D,b,G,a,c)}}),P(this.__lengthListeners,g)}}}else{if(l=x[j],u(l)&&(l=x[j]=this._getValues(k,c,d),u(l))){this._execute(g,null,null);continue}p=l.newValue,r=l.oldValue,s=u(p)?void 0:p[m],t=u(r)?void 0:r[m]}x[i]={newValue:s,oldValue:t},h(p)&&(!w(p)||p.length>m)&&this._define(g,p,m),this._execute(g,s,t)}x=null},a.prototype._addObservableListener=function(b,c,d){var e=this;if(d===!0){var f=b.split(".");f.pop();var g=f.pop(),i=this.getContext(f,!1);h(i)&&(this.__observedIdentifier=null,Q(i,g),n(this.__observedIdentifier)&&(b=this.__observedIdentifier+(d===!0?".length":"")))}this.__add(b,c);var j=c.uid,k=function(){a.spliceRemoveListener(b,j,k),e._removeCallback(b,c)};return a.pushRemoveListener(b,j,k),k},a.prototype._define=function(a,b,c){h(b[c])?this.__defineObject(a,b,c):this.__definePrimitive(a,b,c)},a.prototype._overwriteArrayFunction=function(b,c){var d=a.arrayChangeListeners[b]||{},e=this;return function(){for(var f=[],g=0;g0?[h]:[]):p?(j=f.length,m=[]):(j=f.length-2,k=f[0],m=h)):(h=Array.prototype[c].apply(this,f),l=this.length,t?i=o:"push"===c?(j=f.length,k=n,m=[]):"pop"===c&&(j=0,k=l,m=n>0?[h]:[])),(q||r||"pop"===c)&&a.unObserve(h);var u,v,w,x,y=Object.keys(d),z=y.length;for(w=0;z>w;++w)for(u=d[y[w]],v=u.length,x=0;v>x;++x)u[x]([{object:this,type:c,index:k,removed:m,addedCount:j,oldArray:i}]);return s&&e._notifyChildProperties(b,this,o),e._execute(b+".length",l,n),h}},a.prototype._removeCallback=function(a,b){var c=this.__identifiers[a];if(!u(c)){var d=c.indexOf(b);-1!==d&&(c.splice(d,1),0===c.length&&P(this.__contextObjects,a))}},a.prototype._hasIdentifier=function(a){return!q(this.__identifiers[a])},a.prototype._execute=function(a,b,c){var d=this.__identifiers[a];if(v(b)?P(this.__contextObjects,a):this.__contextObjects[a]=b,b!==c&&!u(d))for(var e=d.slice(0),f=e.length,g=0;f>g;++g)e[g].listener(b,c)},a.prototype.__defineObject=function(b,c,d){var e=this,f=c[d];Object.defineProperty(c,d,{configurable:!0,enumerable:!0,get:function(){return e.__observedIdentifier=b,f},set:function(g){if(f!==g){var i=f;if(f=g,!e.__isArrayFunction){a.unObserve(i);var j,k=e.__identifierHash[b],l=!1;h(k)&&(j=Object.keys(k),l=j.length>0),e._execute(b,f,i),l?(e._notifyChildProperties(b,f,i,j),h(f)||e.__definePrimitive(b,c,d)):q(e.__identifiers[b])?a.defineProperty(c,d,f,!0,!0,!0):h(f)||e.__definePrimitive(b,c,d)}}}})},a.prototype.__definePrimitive=function(b,c,d){var e=this,f=c[d],g=!u(f);w(c)&&"length"===d||Object.defineProperty(c,d,{configurable:!0,enumerable:!0,get:function(){return e.__observedIdentifier=b,f},set:function(i){if(f!==i){var j=f;if(f=i,!e.__isArrayFunction||!w(c)){var k,l=e.__identifierHash[b],m=!1;h(l)&&(k=Object.keys(l),m=k.length>0),e._execute(b,i,j),!m&&q(e.__identifiers[b])?a.defineProperty(c,d,f,!0,!0,!0):h(f)?(e.__defineObject(b,c,d),m&&e._notifyChildProperties(b,i,j,k)):g||(e.__definePrimitive(b,c,d),g=!0)}}}})},a.prototype.__add=function(a,b){var c=this.__identifiers[a],d=b.priority,e=!1;if(u(c)&&(c=this.__identifiers[a]=[]),s(d)){for(var f=c.length,g=0;f>g;++g)if(d>c[g].priority){c.splice(g,0,b),e=!0;break}}else b.priority=-1;e||c.push(b),this.__addHashValues(a)},a.prototype.__addHashValues=function(a){var b=this.__identifierHash;if(!h(b[a])){b[a]={};for(var c,d,e=".",f=a;-1!==(c=f.lastIndexOf(e));)f=f.slice(0,c),d=b[f],u(d)?(d=b[f]={},f!==a&&(d[a]=!0)):f===a||d[a]||(d[a]=!0)}},a.arrayChangeListeners={},a.__managers={},a.__controls={},a}();a.ContextManager=i,a.IContextManagerStatic=f,Fa.injectable(ab,f,[Xa],se),Fa.injectable(bb,i,null,ue)}(Hf=a.observable||(a.observable={}));var Mf;!function(a){function b(){return f}function c(a,b,c,d,e){return g._log=a,g._compat=b,g._document=c,g._window=d,g._dom=e,g}function d(a){return h._EventManager=a,h}var e=function(){function a(){this.defaultPrevented=!1,this.stopped=!1}return a.prototype.initialize=function(a,b,c){this.name=a,this.direction=c||this._EventManager.UP,this.sender=b},a.prototype.preventDefault=function(){this.defaultPrevented||this._ContextManager.defineGetter(this,"defaultPrevented",!0)},a.prototype.stopPropagation=function(){this.direction===this._EventManager.UP&&(this.stopped=!0,this._EventManager.propagatingEvents[this.name]=!1)},a._inject={_EventManager:Ua,_ContextManager:ab},a}();a.DispatchEvent=e,Fa.injectable(Sa,e,null,ue);var f=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.dispatch=function(a,b){var c=ma(Wa);return c.initialize(a,b),g.sendEvent(c),c},b.prototype.initialize=function(b,c){a.prototype.initialize.call(this,b,c,this._EventManager.DIRECT)},b}(e);a.LifecycleEvent=f,a.ILifecycleEventStatic=b,Fa.injectable(Va,b,null,se),Fa.injectable(Wa,f,null,ue);var g=function(){function a(){}return a.initialize=function(){if(!a.__initialized){a.__initialized=!0;for(var b,c=a.__lifecycleEventListeners,d=c.length,e=a._compat,g=a._document,h=a._window,i=a._dom,j=f.dispatch;c.length>0;)b=c.pop(),g.removeEventListener(b.name,b.value,!1);if(e.cordova){var k,l=[sd,td,ud],m=e.winJs;d=l.length;for(var n=0;nh&&a.propagatingEvents[g];++h)d=a.__eventsListeners[e[h]],u(d)||u(d.listeners[g])||a.__callListeners(d.context,b,d.listeners[g],c)},a.__executeEvent=function(b,c,d){var e=a.__eventsListeners[b];if(!u(e)){var f=e.context,g=e.listeners[c.name];u(g)||a.__callListeners(f,c,g,d)}},a.__callListeners=function(b,c,d,e){var f=c.name,g=d.length,h=-1;for(e=[c].concat(e);++h0;)e[f]();P(c,d)}}},a.getInstance=function(){return new a},a.__addRemoveListener=function(b,c){var d=a.__eventListeners;return w(d[b])?void d[b].push(c):void(d[b]=[c])},a.__spliceRemoveListener=function(b,c){var d=a.__eventListeners,e=d[b];if(w(e)){var f=e.indexOf(c);if(-1===f)return;e.splice(f,1)}},a.__getControls=function(b,c,d){var e,f=[],g=a.getRootControl(b);u(g)||g[c]!==d||f.push(g);var h=g.controls;if(u(h))return f;for(var i=[].concat(h);i.length>0;)e=i.shift(),e[c]===d&&f.push(e),u(e.controls)||(i=i.concat(e.controls));return f},a.prototype.initialize=function(){},a.prototype.loaded=function(){},a.prototype.getControlsByName=function(b){return a.__getControls(this,"name",b)},a.prototype.getControlsByType=function(b){return n(b)?a.__getControls(this,"type",b):a.__getControls(this,"constructor",b)},a.prototype.addEventListener=function(c,d,e,f){if(!t(e))return this._log.warn('"Control.addEventListener" must take a function as the third argument.'),b;e=e.bind(this);var g=this.dom.addEventListener(c,d,e,f),h=this.uid;return a.__addRemoveListener(h,g),function(){g(),a.__spliceRemoveListener(h,g)}},a.prototype.observe=function(c,d){var e=this,f=h(this.context)?this:this.parent,g=a.getRootControl(f);if(u(f))return b;var i;if(q(d))i=f.absoluteContextPath;else if(n(d)){var j=(a._parser||ma(Ya)).parse(d),k=j.identifiers[0],l=k.split("."),m=l.shift().slice(1),o=l.length>0?"."+l.join("."):"";i=m===Ue?Ha+o:m===We?f.absoluteContextPath+o:f.absoluteContextPath+"."+k}else i=f.absoluteContextPath+"."+d;var p=a._ContextManager||ma(ab),r=p.getManager(g);return r.observe(i,{listener:function(a,b){c.call(e,a,b,d)},uid:this.uid})},a.prototype.observeArray=function(c,d){var e=h(this.context)?this:this.parent,f=e.context;if(u(e)||!h(f))return b;var g,i;if(q(d))g=f,i=e.absoluteContextPath;else if(n(d)){var j=(a._parser||ma(Ya)).parse(d);g=j.evaluate(f),i=e.absoluteContextPath+"."+j.identifiers[0]}else g=f[d],i=e.absoluteContextPath+"."+d;if(!w(g))return b;var k=t(c);if(!k)return b;c=c.bind(this);var l=a._ContextManager||ma(ab),m=l.getManager(a.getRootControl(e)),o=this.uid,p=function(a){c(a,d)},r=m.observeArrayMutation(o,p,i,g,null),s=m.observe(i,{listener:function(a,b){r(),r=m.observeArrayMutation(o,p,i,a,b)},uid:o});return function(){r(),s()}},a.prototype.observeExpression=function(c,d){var e=this;if(q(d))return b;if(n(d))d=(a._parser||ma(Ya)).parse(d);else if(!t(d.evaluate))return b;var f=u(this.resources)?this.parent:this;if(u(f)||!n(f.absoluteContextPath))return b;var g,h,i,j,k=d.aliases,l=k.length,m={},o=a._ContextManager||ma(ab),p=o.getManager,r=Pf.TemplateControl,s=r.findResource,v=r.evaluateExpression;for(j=0;l>j;++j)g=k[j],h=s(f,g),u(h)||(i=h.resource.type,(i===Oe||i===Se)&&(m[g]=p(h.control)));var w,x,y=d.identifiers,z=p(a.getRootControl(f)),A=[],B=f.absoluteContextPath,C=B+".",D={};for(l=y.length,j=0;l>j;++j)w=y[j],A=w.split("."),x=A[0],"@"!==w[0]?D[C+w]=z:(g=x.slice(1),g===We?D[B+w.replace(x,"")]=z:g===Ue?D[w.replace(x,"context")]=z:(w=w.replace(x,"resources."+g+".value"),u(m[g])||(D[w]=m[g])));y=Object.keys(D),l=y.length;var E=v(d,f),F=[],G=this.uid;for(j=0;l>j;++j)w=y[j],F.push(D[w].observe(w,{uid:G,listener:function(){var a=v(d,f);c.call(e,a,E,d.expression),E=a}}));return function(){for(var a=F.length,b=0;a>b;++b)F[b]()}},a.prototype.evaluateExpression=function(a,b){return Pf.TemplateControl.evaluateExpression(a,this.parent,b)},a.prototype.findProperty=function(b){for(var c,d=this,e=(a._parser||ma(Ya)).parse(b);!u(d);){if(c=e.evaluate(d),!u(c))return{expresssion:e,control:d,value:c};d=d.parent}},a.prototype.dispatchEvent=function(b,c){for(var d=[],e=2;e0&&(d=b.getResources(c,a.aliases,d),q(d))))return a.evaluate(c.context,d)},b.getResources=function(a,c,d){if(u(a))return{};var e,f,g,h=c.length,i=b.__resourceCache[a.uid];u(i)&&(i=b.__resourceCache[a.uid]={}),d=d||{};for(var j=0;h>j;++j)if(e=c[j],"@"===e[0]&&(e=e.slice(1)),e!==We)if(e!==Ue){if(u(d[e])){if(u(i[e]))g=b.findResource(a,e);else{var k=i[e].control,l=k.resources;g=u(l)?b.findResource(a,e):{control:k,resource:l[e]}}u(g)?b._log.warn("Resource alias: "+e+" is not defined."):(i[e]=g,f=g.resource,d[e]=u(f)?f:f.value)}}else d[e]=Nf.getRootControl(a).context;else d[e]=a.context;return d},b.findResource=function(a,b){var c;if(!u(a)&&!u(a.resources)&&n(b)&&!q(b)){"@"===b[0]&&(b=b.slice(1));var d=b===Ue;if(d||b===We||b===Ve){if(d&&(a=Nf.getRootControl(a)),c=(a.resources||{})[b],u(c))return;return{resource:c,control:a}}for(;!u(a);){if(c=(a.resources||{})[b],!u(c))return{resource:c,control:a};a=a.parent}}},b.dispose=function(a){if(!u(a)){var c=a.uid,d=a.controls,e=d&&d.slice(0),f=Nf._ContextManager,g=f.defineProperty;if(!u(e))for(var h=e.length-1,i=h;i>=0;--i)Nf.dispose(e[i]);if(t(a.dispose)&&a.dispose(),Nf.removeEventListeners(a),b.removeElement(a),b._ResourcesFactory.dispose(a),b._BindableTemplatesFactory.dispose(a),P(b.__resourceCache,a.uid),f.dispose(a),Mf.EventManager.dispose(a.uid),b._managerCache.remove(c),Nf.removeParent(a),g(a,Le,null,!0,!0,!0),a.attributes=null,a.bindableTemplates=null,a.controls=[],a.root=null,a.innerTemplate=null,a.__injectable__type===se){var j=rf[a.type];Fa.control(a.type,a.constructor,j.dependencies,!0)}}},b.loadControl=function(a){for(var c,d=a.controls,e=d.length,f=0;e>f;++f)c=d[f],u(c.controls)?c.loaded():b.loadControl(c);a.loaded()},b.contextChanged=function(a,c,d){a.context=c,b.setContextResources(a),t(a.contextChanged)&&a.contextChanged(c,d)},b.setContextResources=function(a){var c=a.context;return u(a.resources)&&(a.resources=b._ResourcesFactory.getInstance(),a.resources.initialize(a)),a.hasOwnContext&&(u(a.resources.rootContext)?a.resources.add({root:{type:Oe,value:c}}):a.resources.rootContext.value=c),u(a.resources.context)?void a.resources.add({context:{type:Oe,value:c}}):void(a.resources.context.value=c)},b.removeElement=function(a){if(!u(a)){var b,c=a.element;return null===a.replaceWith||""===a.replaceWith||l(c)?(da(a.startNode,a.endNode),void(a.elementNodes=a.startNode=a.endNode=null)):void(u(c)||(b=c.parentNode,u(b)||b.removeChild(c),a.element=null))}},b.setAbsoluteContextPath=function(a,b){Nf._ContextManager.defineGetter(a,"absoluteContextPath",b,!1,!0)},b.determineTemplate=function(a,c){var d=b._templateCache,e=a.dom,f=b._Promise;if(u(c)){if(u(a.templateUrl)){if(u(a.templateString))return f.reject(null);var g=a.type;return d.read(g).catch(function(b){return u(b)&&(b=a.templateString),d.put(g,b)})}c=a.templateUrl}else;return e.getTemplate(c)},b.detach=function(a){if(!u(a)&&!u(a.controls)){for(var c=a.controls.slice(0),d=c.length,e=0;d>e;++e)Nf.dispose(c[e]);Nf.removeEventListeners(a),b.removeElement(a),b._ResourcesFactory.dispose(a,!0),P(b.__resourceCache,a.uid),Nf._ContextManager.dispose(a),Mf.EventManager.dispose(a.uid),b._managerCache.remove(a.uid),Nf.removeParent(a),a.controls=[],a.attributes=null}},b.getInstance=function(){return new b},b.prototype.contextChanged=function(a,b){},b.prototype.setTemplate=function(){},b.prototype.getResources=function(a,c){return b.getResources(this,a,c)},b.prototype.findResource=function(a){return b.findResource(this,a)},b.prototype.evaluateExpression=function(a,c){return b.evaluateExpression(a,this,c)},b.__resourceCache={},b}(Nf);a.TemplateControl=o,a.ITemplateControlFactory=c,Fa.injectable(xb,c,[vb,qb,lb,mb,Ya,Ka,Na,Xa],ve),Fa.injectable(yb,o,null,ue);var r=function(a){function b(){a.apply(this,arguments),this.priority=120,this._listeners=[]}return __extends(b,a),b.prototype.onInput=function(a){var b=this._listeners;return b.push(a),function(){var c=b.indexOf(a);-1!==c&&b.splice(c,1)}},b.prototype.observeProperties=function(a){},b.prototype.inputChanged=function(a,b){if(a!==b)for(var c=this._listeners,d=c.length,e=0;d>e;++e)c[e](a,b)},b.prototype.dispose=function(){this._listeners=[]},b}(o);a.BindControl=r;var y=function(a){function b(){a.apply(this,arguments),this.hasOwnContext=!0}return __extends(b,a),b.dispose=function(a){o.dispose(a)},b.getInstance=function(){return new b},b.prototype.canNavigateFrom=function(){},b.prototype.canNavigateTo=function(a,b){},b.prototype.navigatingFrom=function(){},b.prototype.navigatedTo=function(a,b){},b}(o);a.ViewControl=y;var z=function(){function a(){this._domEvents=ma(sb)}return a.prototype.addEventListener=function(a,b,c,d){return this._domEvents.addEventListener(a,b,c,d)},a.prototype.appendChildren=function(a,b){return U(a,b)},a.prototype.cloneChildren=function(a,b){return U(a,b,!0)},a.prototype.clearNode=function(a){return V(a)},a.prototype.clearNodeBlock=function(a,b){return W(a,b)},a.prototype.setInnerHtml=function(a,b){return Z(a,b)},a.prototype.insertBefore=function(a,b,c){return $(a,b,c)},a.prototype.replace=function(a){return _(a)},a.prototype.replaceWith=function(a,b){return aa(a,b)},a.prototype.serializeHtml=function(a){return ba(a)},a.prototype.removeBetween=function(a,b){return ca(a,b)},a.prototype.removeAll=function(a,b){return da(a,b)},a.prototype.addClass=function(a,b){return ga(a,b)},a.prototype.removeClass=function(a,b){return ha(a,b)},a.prototype.toggleClass=function(a,b){return ia(a,b)},a.prototype.replaceClass=function(a,b,c){return ja(a,b,c)},a.prototype.hasClass=function(a,b){return ka(a,b)},a.prototype.getTemplate=function(a){return la(a)},a._inject={_domEvents:sb},a}();a.Dom=z,Fa.injectable(rb,z);var A=function(){function a(){this._ResourcesFactory=ma(vb),this._ControlFactory=ma(Pa),this._TemplateControlFactory=ma(xb),this._ContextManager=ma(ab),this._Promise=ma(Na),this._managerCache=ma(lb),this._document=ma(Ra),this._ElementManagerFactory=ma(fb),this._BindableTemplatesFactory=ma(qb),this._log=ma(Xa),this.templates={},this.cache={},this.__compiledControls=[]}return a.create=function(b,c){var d=new a;return d.control=b,u(c)||(d.templates=c.templates,d.cache=c.cache),d},a.dispose=function(a){if(!u(a)){var b=a.bindableTemplates;!u(b)&&t(b.dispose)&&b.dispose()}},a.isBoundControl=function(a){if(u(a))return!1;var b=a.parent;return u(b)?!1:0===a.type.indexOf(b.type+ze)},a.prototype.bind=function(a,b,c){return this._bind(a,b,c)},a.prototype.add=function(a,b){if(!u(b)){if(n(b))return void this._compile(a,ba(b));if(l(b))return void this._compile(a,b);var c=this._document.createDocumentFragment();if(k(b))c.appendChild(b);else{if(!x(b))return;U(b,c)}this._compile(a,c)}},a.prototype.replace=function(b,c,d,e){var f=this.control.controls[b];if(!a.isBoundControl(f))return this._log.warn("The child control at the specified index: "+b+" is not a bound control and thus cannot be replaced by BindableTemplates."),this._Promise.resolve([]);var g=f.endNode;return k(g)&&k(g.parentNode)?this._bind(c,d,e,b):(this._log.warn("The child control at the specified index: "+b+" had either no placeholding comment nodes or its comment nodes had no parent and thus cannot be replaced by BindableTemplates."),this._Promise.resolve([]))},a.prototype.dispose=function(){for(var a=this._TemplateControlFactory.dispose,b=this.__compiledControls,c=b.length,d=0;c>d;++d)a(b[d]);this.__compiledControls=[],this.control=null,this.cache={},this.templates={}},a.prototype._bind=function(a,b,c,d){var e=this,f=this.templates[a],g=u(d);return u(f)?void this._log.error(new Error("Cannot bind template, no template stored with key: "+a)):u(b)||s(b)||n(b)?(f=f.then(function(d){var f=d.cloneNode(!0),h=e._createBoundControl(a,f,b,c),i=e._createNodeMap(h,f,b);return g&&e.control.controls.push(h),e._bindTemplate(a,i)}),g?f.then(null,function(a){return I(function(){n(a)&&(a=new Error(a)),e._log.error(a)}),e._document.createDocumentFragment()}):f.then(function(a){var b=Array.prototype.slice.call(a.childNodes),c=e.control.controls[d],f=c.endNode,g=f.parentNode,h=f.nextSibling;return e._TemplateControlFactory.dispose(c),g.insertBefore(a,h),b}).then(null,function(a){return I(function(){n(a)&&(a=new Error(a)),e._log.error(a)}),e._document.createDocumentFragment()})):void this._log.warn("Cannot bind template with relativeIdentifier: "+b+". Identifier must be either a string or number")},a.prototype._bindTemplate=function(a,c){var d=this,e=c.uiControlNode.control,f=!1,g=t(e.dispose)?e.dispose.bind(e):b;return e.dispose=function(){f=!0,g(),e.dispose=g},this._bindNodeMap(a,c).then(function(){var a=d._document,b=c.element;return f?a.createDocumentFragment():(e.startNode=b.insertBefore(a.createComment(e.type+Be),b.firstChild),e.endNode=b.insertBefore(a.createComment(e.type+Ce),null),b)},function(a){return I(function(){n(a)&&(a=new Error(a)),d._log.error(a)}),null})},a.prototype._bindNodeMap=function(a,b){ +var c=this.cache[a],d=b.uiControlNode.control,e=b.element,f=this._managerCache;return c.clone(e,f.read(this.control.uid),b),f.read(d.uid).bindAndLoad()},a.prototype._compile=function(a,b){var c=this._createBoundControl(a+ye,b),d=this._createNodeMap(c,b);this.__compiledControls.push(c),this._compileNodeMap(c,d,a)},a.prototype._compileNodeMap=function(a,b,c){var d=this,e=this._ElementManagerFactory.getInstance(),f=[];e.isClone=!0,e.initialize(b,null),e.setUiControlTemplate(),this.cache[c]=e,f.push(e.fulfillTemplate()),this.templates[c]=this._Promise.all(f).then(function(){var c,e,f=b.element,g=f.cloneNode(!0),h=d._document;return c=a.startNode=h.createComment(a.type+Be),e=a.endNode=h.createComment(a.type+Ce),f.insertBefore(c,f.firstChild),f.insertBefore(e,null),g})},a.prototype._createNodeMap=function(a,b,c){return{element:b,attributes:{},nodes:[],childContext:c,uiControlNode:{control:a,nodeName:a.type,expressions:[],injector:null}}},a.prototype._createBoundControl=function(a,b,c,d){var e=this._TemplateControlFactory,f=e.getInstance(),g=this._ResourcesFactory,i=this.control,j=this.cache[a],k=h(j),l=g.getInstance();if(k){var m=j.getUiControl();l.initialize(f,m.resources),l.add(d)}else l.initialize(f,d);if(f.resources=l,g.addControlResources(f),f.bindableTemplates=this._BindableTemplatesFactory.create(f,i.bindableTemplates),f.parent=i,f.controls=[],f.element=b,f.type=i.type+ze+a,f.root=this._ControlFactory.getRootControl(f),k){var n=this._ContextManager.getManager(f.root);f.absoluteContextPath=i.absoluteContextPath||Ha,u(c)||(f.absoluteContextPath+="."+c),f.context=n.getContext(f.absoluteContextPath.split("."),!1)}return f},a}();a.BindableTemplates=A,a.IBindableTemplatesFactory=d,Fa.injectable(qb,d,null,ve);var C=function(){function a(){this.__listeners={}}return a.getInstance=function(){return new a},a.prototype.initialize=function(a,b){this.__control=a;for(var c,d=Object.keys(b),e=this.__listeners,f=d.length,g=0;f>g;++g)c=d[g],this[c]=b[c],e[c]=[]},a.prototype.observe=function(a,c){var d=this.__listeners[N(c)];return u(d)?b:(a=a.bind(this.__control),d.push(a),function(){var b=d.indexOf(a);-1!==b&&d.splice(b,1)})},a.prototype._attributeChanged=function(a,b,c){for(var d=this.__listeners[N(a)],e=d.length,f=0;e>f;++f)d[f](b,c)},a}();a.Attributes=C,a.IAttributesFactory=g,Fa.injectable(pb,C,null,ue),Fa.injectable(ob,g,null,ve);var D=function(){function a(){this.__resources={},this.__bound=!1}return a.create=function(c,d){if(u(d))return d;var e;switch(d.type.toLowerCase()){case Pe:var f=uf[d.value];u(f)||(d.value=f.inject());break;case Oe:a._observeResource(c,d);break;case Qe:e=d.value,n(e)&&(d.value=c.evaluateExpression(e));break;case Se:break;case Re:e=d.value,n(e)&&(e=c[e],t(e)?d.value=e.bind(c):(a._log.warn('Attempted to create a "function" type Resource, but the function '+e+"cannot be found on your control."),d.value=b))}return d},a.addControlResources=function(b){b.resources.add({context:{value:b.context,type:Oe},control:{value:b,type:Qe}}),b.hasOwnContext&&a.__addRoot(b)},a.bindResources=function(b){var c=b.__resources;if(!u(c)){for(var d,e=b.__controlInstance,f=Object.keys(c),g=a.__controlResources,h=f.length,i=0;h>i;++i)d=f[i],g[d]!==!0&&(b[d]=c[d]=a.create(e,b[d]));b.__bound=!0}},a.dispose=function(b,c){var d=b.resources;if(!u(d)){for(var e,g,h=Object.keys(d.__resources),i=h.length,j=a._ContextManager.defineProperty,k=0;i>k;++k)e=h[k],g=d[e],u(g)||g.type!==Oe&&g.type!==Se||j(d,e,c?f(g,!0):null,!0,!0,!0);a._removeListeners(d.__controlInstance)}},a.parseElement=function(b){for(var c,d,e,f,g,h,i=Array.prototype.slice.call(b.children),j=a._regex,k=j.whiteSpaceRegex,l=j.quotationRegex,m={},n=a.__resourceTypes;i.length>0;)c=i.pop(),g=c.nodeName.toLowerCase(),n[g]&&(e=c.attributes,d={},f=e.getNamedItem(Me),u(f)||(d.alias=f.value,h=c.textContent.replace(k,"$1"),q(h)||(d.value=g===Pe||g===Se?h.replace(l,""):h,d.type=g,m[d.alias]=d)));return m},a.getInstance=function(){return new a},a._observeResource=function(b,c){var d=c.value,e=b.uid,f=a.__observableResourceRemoveListeners[e];if(u(f)&&(f=a.__observableResourceRemoveListeners[e]=[]),n(d)){u(c.initialValue)?c.initialValue=d:d=c.initialValue;var g=b.observeExpression(function(a){c.value=a},d);c.value=b.evaluateExpression(d),f.push(g)}},a._removeListeners=function(b){if(!u(b)){var c=b.uid,d=a.__observableResourceRemoveListeners[c];if(w(d))for(var e=d.length,f=0;e>f;++f)d[f]();P(a.__observableResourceRemoveListeners,c)}},a.__addRoot=function(a){a.resources.add({root:{value:a,type:Qe,alias:Te},rootContext:{value:a.context,type:Oe,alias:Ue}})},a.prototype.initialize=function(b,c){if(this.__controlInstance=b,!u(c)){k(c)?c=a.parseElement(c):h(c.resources)&&(c=c.resources),this.__resources=c;for(var d,e=Object.keys(c),f=e.length,g=0;f>g;++g)d=e[g],this[d]=c[d]}},a.prototype.add=function(b){if(!u(b)){k(b)&&(b=a.parseElement(b));for(var c,d,e=Object.keys(b),f=e.length,g=this.__controlInstance,h=this.__bound,i=a.create,j=0;f>j;++j)d=e[j],c=b[d],c.alias=d,this[d]=this.__resources[d]=h?i(g,c):c}},a.INJECTABLE=Pe,a.OBJECT=Qe,a.OBSERVABLE=Oe,a.LITERAL=Se,a.FUNCTION=Re,a.__observableResourceRemoveListeners={},a}();a.Resources=D,a.IResourcesFactory=i,Fa.injectable(vb,i,[ab,Za,Xa],ve),Fa.injectable(wb,D,null,ue);var E=function(){function a(){this._gestures=a.gestures,this._androidVersion=v(this._compat.ANDROID)?-1:this._compat.ANDROID,this._android44orBelow=Math.floor(this._androidVersion/10)<=44,this._inMouse=!1,this._subscribers={},this._gestureCount={$tap:0,$dbltap:0,$hold:0,$release:0,$swipe:0,$track:0,$trackend:0},this.__hasMoved=!1,this.__hasRelease=!1,this.__detectingMove=!1,this.__tapCount=0,this.__touchCount=0,this.__cancelDeferredTap=b,this.__cancelDeferredHold=b,this.__cancelRegex=/cancel/i,this.__pointerEndRegex=/up|cancel/i,this.__reverseMap={},this.__mappedEventListener=this.__handleMappedEvent.bind(this),this.__mappedCount={$touchstart:0,$touchmove:0,$touchend:0,$touchcancel:0},this.__pointerHash={},this.__pointerEvents=[],this.__listeners={},this.__getTypes()}return a.prototype.addEventListener=function(a,c,d,e){var f=this,g=this._compat,h=g.mappedEvents,i=h[c],j=!u(i),k=this.__mappedCount,l=b,m=b,n=this._gestures,o=!1;if(j){var p=k[c];this.__reverseMap[i]=c,this.__registerElement(a,c),k[c]++,l=this.__addMappedEvent(p,i,e),g.hasTouchEvents&&!this.__cancelRegex.test(i)&&(i=i.replace("touch","mouse").replace("start","down").replace("end","up"),this.__reverseMap[i]=c,m=this.__addMappedEvent(p,i,e))}if(a.addEventListener(c,d,e),!v(a["on"+c])||v(n[c])||j)return function(){if(!o){if(j){var b=k[c];s(b)&&(b>0&&(b=--k[c]),0===b&&(l(),m())),f.__unregisterElement(a,c)}o=!0,a.removeEventListener(c,d,e)}};var q=n.$swipe,r=n.$track,t=c;if(-1!==c.indexOf(r)){var w=n.$trackend;t=c===w?w:r}else-1!==c.indexOf(q)&&(t=q);return this._gestureCount[t]++,this.__registerElement(a,c),function(){o||(o=!0,f.__removeEventListener(a,c,d,e))}},a.prototype.dispose=function(){this.__unregisterTypes(),this._gestureCount={$tap:0,$dbltap:0,$hold:0,$release:0,$swipe:0,$track:0,$trackend:0},this.__mappedCount={$touchstart:0,$touchmove:0,$touchend:0,$touchcancel:0},this._isActive=!1,this._subscribers={},this.__pointerEvents=[],this.__pointerHash={},this.__reverseMap={},this.__tapCount=this.__touchCount=0,this.__detectingMove=this.__hasMoved=this.__hasRelease=this.__haveSwipeSubscribers=!1,this.__lastMoveEvent=this.__lastTouchDown=this.__lastTouchUp=null,this.__swipeOrigin=this.__capturedTarget=this.__focusedElement=null,this.__cancelDeferredHold=this.__cancelDeferredTap=b},a.prototype._onTouchStart=function(c){var d=this;if(this.__touchCount++>0)return!0;var e=c.type;if("mousedown"!==e)this._inTouch=!0;else{if(this._inTouch===!0)return c.preventDefault(),!1;this._compat.hasTouchEvents&&(this._inMouse=!0)}if(c=this.__standardizeEventObject(c),u(c))return!0;this.__capturedTarget=this.__lastMoveEvent=null,this.__hasMoved=!1;var f=c.clientX,g=c.clientY,h=c.timeStamp,i=c.target,j=this._gestures;this.__lastTouchDown={_buttons:c._buttons,clientX:f,clientY:g,timeStamp:h,target:i,identifier:c.identifier},this.__swipeOrigin={clientX:f,clientY:g,xTimestamp:h,yTimestamp:h,xTarget:i,yTarget:i},this.__haveSwipeSubscribers=this.__findFirstSubscribers(i,[j.$swipe,j.$swipedown,j.$swipeleft,j.$swiperight,j.$swipeup]).length>0;var k=this._gestureCount,l=k.$hold<=0,m=k.$release<=0;if(("touchstart"===e||k.$track>0||k.$trackend>0||k.$swipe>0)&&(this.__registerType(this._moveEvents),this.__detectingMove=!0),l&&m)return!0;var n,o,p=a.config.intervals.holdInterval,q=!1;return l?(this.__hasRelease=!1,this.__cancelDeferredHold=J(function(){d.__hasRelease=!0},p),!0):(m?(n=this.__findFirstSubscriber(c.target,this._gestures.$hold),(q=!u(n))&&(o=function(){n.trigger(c),d.__cancelDeferredHold=b})):(this.__hasRelease=!1,n=this.__findFirstSubscriber(c.target,this._gestures.$hold),(q=!u(n))&&(o=function(){n.trigger(c),d.__hasRelease=!0,d.__cancelDeferredHold=b})),void(q&&(this.__cancelDeferredHold=J(o,p))))},a.prototype._onTouchMove=function(c){if(this.__cancelDeferredHold(),this.__cancelDeferredHold=b,this._inTouch===!0&&"mousemove"===c.type)return!0;var d=this.__standardizeEventObject(c);if(u(d))return!0;var e=this._gestureCount,f=e.$track<=0,g=e.$swipe<=0,h=a.config,i=this.__swipeOrigin,j=d.clientX,k=d.clientY,l=this.__hasMoved||this.__getDistance(i.clientX,j,i.clientY,k)>=h.distances.minScrollDistance;if(!l)return!0;if(this.__hasMoved=!0,f&&g)return!0;var m=this.__lastMoveEvent||i,n=d.direction=this.__getDirection(j-m.clientX,k-m.clientY),o=(this.__handleOriginChange(n),Math.abs(j-i.clientX)),p=Math.abs(k-i.clientY);d.velocity=this.__getVelocity(o,p,d.timeStamp-i.xTimestamp,d.timeStamp-i.yTimestamp);!g&&this._android44orBelow&&this.__haveSwipeSubscribers&&c.preventDefault(),f||this.__handleTrack(d,c),this.__lastMoveEvent=d},a.prototype._onTouchEnd=function(b){var c=b.type,d=this.__hasMoved,e="mouseup"!==c;if(this.__touchCount<=0?this.__touchCount=0:this.__touchCount--,e){if("touchend"===c){if(d)b.cancelable===!0&&b.preventDefault();else{if(this._inTouch!==!0)return this.__preventClickFromTouch(),b.cancelable===!0&&b.preventDefault(),!0;this.__handleInput(b.target),b.cancelable===!0&&b.preventDefault()}this.__preventClickFromTouch()}}else if(!v(this._inTouch)){if(!this._inMouse)return b.cancelable===!0&&b.preventDefault(),!1;this._inMouse=!1}if(this.__cancelRegex.test(c))return this.__handleCanceled(b),!0;if(b=this.__standardizeEventObject(b),u(b))return!0;e&&(this._inTouch=!1),this.__touchCount>0&&(this.__touchCount=b.touches.length),this.__clearTempStates(),this.__hasRelease&&this.__handleRelease(b),this.__handleSwipe();var f=a.config,g=f.intervals,h=b.timeStamp,i=this.__lastTouchDown;if(d)return this.__handleTrackEnd(b),this.__tapCount=0,!0;if(u(i)||h-i.timeStamp>g.tapInterval)return this.__tapCount=0,!0;var j=this.__lastTouchUp,k=b.clientX,l=b.clientY;this.__tapCount>0&&this.__getDistance(k,j.clientX,l,j.clientY)<=f.distances.maxDblTapDistance&&h-j.timeStamp<=g.dblTapInterval?this.__handleDbltap(b):this.__tapCount=0,this.__handleTap(b),this.__lastTouchUp=b},a.prototype.__clearTempStates=function(){this.__cancelDeferredHold(),this.__cancelDeferredHold=b,this.__detectingMove&&(this.__unregisterType(this._moveEvents),this.__detectingMove=!1)},a.prototype.__resetTouchEnd=function(){this.__tapCount=this.__touchCount=0,this._inTouch=this.__hasRelease=!1,this.__pointerHash={},this.__pointerEvents=[],this.__capturedTarget=null},a.prototype.__handleCanceled=function(a){var b=a.touches||this.__pointerEvents,c=this.__getTouchIndex(b);a=c>=0?b[c]:this.__standardizeEventObject(a),this._inTouch=!1,this.__clearTempStates(),this.__hasMoved&&(this._android44orBelow&&this.__handleSwipe(),this.__handleTrackEnd(a)),this.__resetTouchEnd()},a.prototype.__handleTap=function(c){var d=this;if(this.__tapCount++,!(this._gestureCount.$tap<=0)){var e=this._gestures,f=this.__findFirstSubscriber(c.target,e.$tap);if(!u(f))return a.config.intervals.dblTapZoomDelay<=0||"mouse"===c.pointerType||"mouseup"===c.type?(c._buttons=this.__lastTouchDown._buttons,void f.trigger(c)):void(this.__cancelDeferredTap=J(function(){c._buttons=d.__lastTouchDown._buttons,f.trigger(c),d.__tapCount=0,d.__cancelDeferredTap=b},a.config.intervals.dblTapZoomDelay))}},a.prototype.__handleDbltap=function(a){if(this.__tapCount=0,this.__cancelDeferredTap(),this.__cancelDeferredTap=b,!(this._gestureCount.$dbltap<=0)){var c=this.__findFirstSubscriber(a.target,this._gestures.$dbltap);u(c)||(a._buttons=this.__lastTouchDown._buttons,c.trigger(a),this.__tapCount=-1)}},a.prototype.__handleRelease=function(a){var b=this.__findFirstSubscriber(a.target,this._gestures.$release);u(b)||b.trigger(a),this.__hasRelease=!1},a.prototype.__handleSwipe=function(){if(!(this._gestureCount.$swipe<=0)){var a=this.__lastMoveEvent;if(!u(a)){for(var b=this.__swipeOrigin,c=Math.abs(a.clientX-b.clientX),d=Math.abs(a.clientY-b.clientY),e=this.__getRegisteredSwipes(a.direction,a.velocity,c,d);e.length>0;)e.pop().trigger(a);this.__lastMoveEvent=null}}},a.prototype.__handleTrack=function(a,b){var c=this._gestures,d=c.$track,e=a.direction,f=this.__capturedTarget||a.target,g=this.__findFirstSubscribers(f,[d,d+e.x,d+e.y]);if(this._android44orBelow){var h=this.__findFirstSubscribers(f,[d,c.$trackdown,c.$trackup,c.$trackleft,c.$trackright,c.$trackend]);h.length>0&&b.preventDefault()}if(g.length>0)for(this._androidVersion>-1&&b.preventDefault();g.length>0;)g.pop().trigger(a)},a.prototype.__handleTrackEnd=function(a){if(!(this._gestureCount.$trackend<=0)){var b=this.__capturedTarget||a.target,c=this.__findFirstSubscriber(b,this._gestures.$trackend);u(c)||c.trigger(a)}},a.prototype.__handleMappedEvent=function(a){var b=a.type,c=this.__reverseMap[b],d=this.__findFirstSubscriber(a.target,c);u(d)||(a=this.__standardizeEventObject(a),u(a)||d.trigger(a))},a.prototype.__getTypes=function(){var a,b,c,d=this._compat,e=d.mappedEvents,f=this.__listeners;if(d.hasPointerEvents)a=this._startEvents=e.$touchstart,b=this._moveEvents=e.$touchmove,c=this._endEvents=e.$touchend+" "+e.$touchcancel;else if(d.hasTouchEvents)a=this._startEvents=e.$touchstart+" mousedown",b=this._moveEvents=e.$touchmove+" mousemove",c=this._endEvents=e.$touchend+" mouseup "+e.$touchcancel;else{var g=e.$touchcancel;a=this._startEvents=e.$touchstart,b=this._moveEvents=e.$touchmove,c=this._endEvents=e.$touchend+(g?" "+g:"")}f[a]=this._onTouchStart.bind(this),f[b]=this._onTouchMove.bind(this),f[c]=this._onTouchEnd.bind(this)},a.prototype.__registerTypes=function(){this.__registerType(this._startEvents),this.__registerType(this._endEvents)},a.prototype.__unregisterTypes=function(){this.__unregisterType(this._startEvents),this.__unregisterType(this._endEvents),this.__detectingMove&&(this.__unregisterType(this._moveEvents),this.__detectingMove=!1)},a.prototype.__registerType=function(a){for(var b=this.__listeners[a],c=this._document,d=a.split(" "),e=d.length;e-->0;)c.addEventListener(d[e],b,!1)},a.prototype.__unregisterType=function(a){for(var b=this.__listeners[a],c=this._document,d=a.split(" "),e=d.length;e-->0;)c.removeEventListener(d[e],b,!1)},a.prototype.__registerElement=function(b,c){var d,e=b.__plat;u(e)?(d=M("domEvent_"),b.__plat=e={domEvent:d}):u(e.domEvent)&&(d=M("domEvent_"),e.domEvent=d),this._isActive||(this.__registerTypes(),u(this._isActive)&&this.__appendGestureStyle(),this._isActive=!0);var f;if(u(d)){var g=this._subscribers[e.domEvent];return v(g[c])?(f=new H(b,c),g[c]=f):g[c].count++,void g.gestureCount++}var h={gestureCount:1};f=new H(b,c),h[c]=f,this._subscribers[d]=h,v(b.className)||ga(b,a.config.styleConfig[0].className),this.__removeSelections(b)},a.prototype.__unregisterElement=function(a,b){var c=a.__plat;if(!u(c)&&!u(c.domEvent)){var d=c.domEvent,e=this._subscribers[d],f=e[b];u(f)||(f.count--,0===f.count&&P(e,b),e.gestureCount--,0===e.gestureCount&&(P(this._subscribers,d),this.__removeElement(a)))}},a.prototype.__setTouchPoint=function(a){var b=a.type,c=this._compat;return c.hasPointerEvents||c.hasMsPointerEvents?void this.__updatePointers(a,this.__pointerEndRegex.test(b)):void(a.pointerType=-1===b.indexOf("mouse")?"touch":"mouse")},a.prototype.__setCapture=function(a){u(this.__capturedTarget)&&!j(a)&&(this.__capturedTarget=a)},a.prototype.__updatePointers=function(a,b){var c,d=a.pointerId,e=this.__pointerHash,f=e[d];if(b)v(f)||(c=this.__pointerEvents.indexOf(f),c>-1&&this.__pointerEvents.splice(c,1),P(this.__pointerHash,d));else{if(1===d&&!q(e))return;a.identifier=a.pointerId,v(f)||(c=this.__pointerEvents.indexOf(f))<0?this.__pointerEvents.push(a):this.__pointerEvents.splice(c,1,a),e[d]=a}},a.prototype.__findFirstSubscriber=function(a,b){if(!u(a)){var c,d,e;do if(c=a.__plat,!v(c)&&!v(c.domEvent)&&(d=this._subscribers[c.domEvent],e=d[b],!v(e)))return e;while(!u(a=a.parentNode))}},a.prototype.__findFirstSubscribers=function(a,b){if(u(a))return[];var c,d,e,f,g,h=[];do if(c=a.__plat,!v(c)&&!v(c.domEvent))for(d=this._subscribers[c.domEvent],e=Object.keys(d);e.length>0;)f=e.pop(),g=b.indexOf(f),-1!==g&&(h.push(d[f]),b.splice(g,1));while(b.length>0&&!u(a=a.parentNode));return h},a.prototype.__addMappedEvent=function(a,b,c){var d=this,e=this._document;return 0===a&&e.addEventListener(b,this.__mappedEventListener,c),function(){e.removeEventListener(b,d.__mappedEventListener,c)}},a.prototype.__removeEventListener=function(a,b,c,d){var e=this._gestures;a.removeEventListener(b,c,d);var f=e.$swipe,g=e.$track,h=b;if(-1!==b.indexOf(g)){var i=e.$trackend;h=b===i?i:g}else-1!==b.indexOf(f)&&(h=f);this._gestureCount[h]--,this.__unregisterElement(a,b)},a.prototype.__removeElement=function(b){this.__returnSelections(b),v(b.className)||ha(b,a.config.styleConfig[0].className);var c=b.__plat;P(c,"domEvent"),q(c)&&P(b,"__plat"),q(this._subscribers)&&this.dispose()},a.prototype.__standardizeEventObject=function(a){this.__setTouchPoint(a);var b,c=-1!==this._startEvents.indexOf(a.type),d=a.touches||this.__pointerEvents,e=a.changedTouches,f=!v(e),g=a.timeStamp;if(f)if(c)b=a.preventDefault.bind(a),a=e[0],a.preventDefault=b;else{var h=this.__getTouchIndex(e);if(h>=0)b=a.preventDefault.bind(a),a=e[h],a.preventDefault=b;else if(this.__getTouchIndex(d)>=0)return null}return c&&this.__setCapture(a.target),this.__normalizeButtons(a),a.touches=d,a.offset=this.__getOffset(a),(v(a.timeStamp)||g>a.timeStamp)&&(a.timeStamp=g),a},a.prototype.__normalizeButtons=function(a){var b;if(s(a.buttons))b=0===a.buttons?1:a.buttons;else if(s(a.which)&&a.which>0)b=a.which;else switch(a.button){case-1:b=0;break;case 0:b=1;break;case 1:b=4;break;case 2:b=2;break;case 3:b=8;break;case 4:b=16;break;default:b=1}a._buttons=b},a.prototype.__getTouchIndex=function(a){for(var b=(this.__lastTouchDown||{}).identifier,c=a.length,d=0;c>d;++d)if(a[d].identifier===b)return d;return-1},a.prototype.__getOffset=function(a){var b=this.__capturedTarget||a.target;if(j(b))return{x:a.clientX,y:a.clientY};if(!v(a.offsetX)&&b===a.target)return{x:a.offsetX,y:a.offsetY};for(var c=b.offsetLeft,d=b.offsetTop;!u(b=b.offsetParent);)c+=b.offsetLeft,d+=b.offsetTop;return{x:a.clientX-c,y:a.clientY-d}},a.prototype.__getDistance=function(a,b,c,d){var e=b-a,f=d-c;return Math.sqrt(e*e+f*f)},a.prototype.__getVelocity=function(a,b,c,d){var e=0,f=0;return c>0&&(e=a/c||0),d>0&&(f=b/d||0),{x:e,y:f}},a.prototype.__getDirection=function(a,b){var c=Math.abs(a),d=Math.abs(b),e=(this.__lastMoveEvent||{}).direction||{},f=0===a?e.x||"none":0>a?"left":"right",g=0===b?e.y||"none":0>b?"up":"down";return{x:f,y:g,primary:c===d?e.primary||"none":c>d?f:g}},a.prototype.__handleOriginChange=function(a){var b=this.__lastMoveEvent;if(!u(b)){var c=b.direction,d=c.x===a.x,e=c.y===a.y;if(!d||!e){var f=this.__swipeOrigin,g=this._gestures,h=[g.$swipe,g.$swipedown,g.$swipeleft,g.$swiperight,g.$swipeup];d||(f.clientX=b.clientX,f.xTimestamp=b.timeStamp,f.xTarget=b.target,this._android44orBelow&&(this.__haveSwipeSubscribers=this.__findFirstSubscribers(f.xTarget,h).length>0)),e||(f.clientY=b.clientY,f.yTimestamp=b.timeStamp,f.yTarget=b.target,this._android44orBelow&&(this.__haveSwipeSubscribers=this.__findFirstSubscribers(f.yTarget,h).length>0))}}},a.prototype.__getRegisteredSwipes=function(b,c,d,e){var f,g=this._gestures.$swipe,h=a.config.velocities.minSwipeVelocity,i=[g],j=this.__swipeOrigin||{};return d>e?(f=j.xTarget,c.x>=h&&i.push(g+b.x)):e>d&&(f=j.yTarget,c.y>=h&&i.push(g+b.y)),this.__findFirstSubscribers(f,i)},a.prototype.__isHorizontal=function(a){return"left"===a||"right"===a},a.prototype.__appendGestureStyle=function(){var b,c,d=this._document;if(!this._compat.platCss)if(!u(d.styleSheets)&&d.styleSheets.length>0){var e=d.styleSheets[0];for(b=a.config.styleConfig,c=b.length;c-->0;)e.insertRule(this.__createStyle(b[c]),0)}else{var f=d.head,g=d.createElement("style"),h="";for(g.type="text/css",b=a.config.styleConfig,c=b.length;c-->0;)h=this.__createStyle(b[c])+h;g.textContent=h,f.appendChild(g)}},a.prototype.__createStyle=function(a){var b=a.styles||[],c=b.length,d="."+a.className+" { ",e="";c=b.length;for(var f=0;c>f;++f)e+=b[f]+";";return d+=e+" } "},a.prototype.__isFocused=function(a){return a===this.__focusedElement},a.prototype.__handleInput=function(a){var b=this,c=a.nodeName,d=this.__focusedElement||{};if(!n(c))return this.__focusedElement=null,void(t(d.blur)&&d.blur());var e;switch(c.toLowerCase()){case"input":switch(a.type){case"range":t(d.blur)&&d.blur();break;case"button":case"submit":case"checkbox":case"radio":case"file":t(d.blur)&&d.blur(),I(function(){b._document.body.contains(a)&&t(a.click)&&a.click()});break;default:return this.__focusedElement=a,a.focus(),void(e=this.addEventListener(a,"blur",function(){b.__isFocused(a)&&(b.__focusedElement=null),e()},!1))}break;case"a":case"button":case"label":t(d.blur)&&d.blur(),I(function(){b._document.body.contains(a)&&t(a.click)&&a.click()});break;case"textarea":return this.__focusedElement=a,a.focus(),void(e=this.addEventListener(a,"blur",function(){b.__isFocused(a)&&(b.__focusedElement=null),e()},!1));case"select":t(d.blur)&&d.blur(),I(function(){var c=b._document;if(c.body.contains(a)){var d=c.createEvent("MouseEvents");d.initMouseEvent("mousedown",!1,!1,null,null,null,null,null,null,null,null,null,null,null,null),a.dispatchEvent(d)}});break;default:t(d.blur)&&d.blur(),I(function(){b._document.body.contains(a)&&t(a.click)&&a.click()})}this.__focusedElement=null},a.prototype.__preventClickFromTouch=function(){var a,c=this,d=this._document,e=J(function(){d.removeEventListener("click",a,!0),d.removeEventListener("mousedown",a,!0),d.removeEventListener("mouseup",a,!0)},400);a=function(f){if(f.preventDefault(),f.stopPropagation(),d.removeEventListener(f.type,a,!0),e===b)return!1;e(),e=b;var g=c.__lastTouchDown;return u(g)||c.__isFocused(g.target)?!1:(c.__handleInput(g.target),!1)},I(function(){d.addEventListener("click",a,!0),d.addEventListener("mousedown",a,!0),d.addEventListener("mouseup",a,!0)})},a.prototype.__removeSelections=function(a){k(a)&&(v(a.onselectstart)||a.addEventListener("selectstart",this.__preventDefault,!1),v(a.ondragstart)||a.addEventListener("dragstart",this.__preventDefault,!1))},a.prototype.__returnSelections=function(a){k(a)&&(v(a.onselectstart)||a.removeEventListener("selectstart",this.__preventDefault,!1),v(a.ondragstart)||a.removeEventListener("dragstart",this.__preventDefault,!1))},a.prototype.__preventDefault=function(a){var b=a.target.nodeName;return n(b)&&(b=b.toLowerCase()),"input"===b||"textarea"===b?!0:(a.preventDefault(),!1)},a._inject={_document:Ra,_compat:Oa},a.config={intervals:{tapInterval:250,dblTapInterval:300,holdInterval:400,dblTapZoomDelay:0},distances:{minScrollDistance:3,maxDblTapDistance:10},velocities:{minSwipeVelocity:.645},styleConfig:[{className:"plat-gesture",styles:["-moz-user-select: none","-khtml-user-select: none","-webkit-touch-callout: none","-webkit-user-select: none","-webkit-user-drag: none","-webkit-tap-highlight-color: transparent","-webkit-overflow-scrolling: touch","-ms-user-select: none","-ms-touch-action: manipulation","touch-action: manipulation"]},{className:"plat-no-touch-action",styles:["-ms-touch-action: none","touch-action: none"]}]},a.gestures={$tap:Sd,$dbltap:Td,$hold:Yd,$release:Zd,$swipe:$d,$swipeleft:_d,$swiperight:ae,$swipeup:be,$swipedown:ce,$track:de,$trackleft:ee,$trackright:fe,$trackup:ge,$trackdown:he,$trackend:ie},a}();a.DomEvents=E,Fa.injectable(sb,E),a.IDomEventsConfig=m,Fa.injectable(tb,m);var F=function(){function a(){this._document=ma(Ra)}return a.prototype.initialize=function(a,b,c){this.element=a,this.event=b,this.eventType=n(c)?c:"CustomEvent"},a.prototype.trigger=function(a,b,c){var d=this._document.createEvent(this.eventType);return h(a)&&e(!1,!1,d,a),d.initCustomEvent(this.event,!0,!0,u(b)?0:b),(c||this.element).dispatchEvent(d)},a}();a.DomEvent=F,Fa.injectable(ub,F,null,ue);var G,H=function(a){function b(b,c){a.call(this),this.count=0,this.element=b,this.event=c,this.count++}return __extends(b,a),b.prototype.trigger=function(a){var b=this._document.createEvent("CustomEvent"),c=this.element,d=a.target;this.__extendEventObject(b,a),b.initCustomEvent(this.event,!0,!0,0);var e=c.contains(d)?d.dispatchEvent(b):c.dispatchEvent(b);return e||a.preventDefault(),e},b.prototype.__extendEventObject=function(a,b){var c=b.pointerType;a.clientX=b.clientX,a.clientY=b.clientY,a.offsetX=b.offset.x,a.offsetY=b.offset.y,a.direction=b.direction||{x:"none",y:"none",primary:"none"},a.touches=b.touches,a.velocity=b.velocity||{x:0,y:0},a.identifier=b.identifier||0,a.pointerType=s(c)?this.__convertPointerType(c,b.type):c,a.screenX=b.screenX,a.screenY=b.screenY,a.pageX=b.pageX,a.pageY=b.pageY,a.buttons=b._buttons},b.prototype.__convertPointerType=function(a,b){switch(a){case MSPointerEvent.MSPOINTER_TYPE_MOUSE:return"mouse";case MSPointerEvent.MSPOINTER_TYPE_PEN:return"pen";case MSPointerEvent.MSPOINTER_TYPE_TOUCH:return"touch"}return-1===b.indexOf("mouse")?"touch":"mouse"},b}(F);!function(a){var c=function(){function a(){this._animatedElements={}}return a.prototype.create=function(a,b,c){return this._create(a,b,c,{key:null})},a.prototype.animate=function(a,b,c){return this._animate(a,b,c,{key:null})},a.prototype.enter=function(a,b,c,d,e){return this._animate(a,b,e,{key:"enter",parent:c,refChild:d})},a.prototype.leave=function(a,b,c){return this._animate(a,b,c,{key:"leave"})},a.prototype.move=function(a,b,c,d,e){return this._animate(a,b,e,{key:"move",parent:c,refChild:d})},a.prototype.show=function(a,b,c){return this._animate(a,b,c,{key:"show"})},a.prototype.hide=function(a,b,c){return this._animate(a,b,c,{key:"hide"})},a.prototype.all=function(a){for(var c=this,e=a.length,f=[],g=new d(function(b){c._Promise.all(a).then(function(){b()})}),h=0;e>h;++h)f=f.concat(a[h].getInstances());return g.initialize(f),g.then(b)},a.prototype.resolve=function(){var a=new d(function(b){b(function(){return a})});return a},a.prototype._animate=function(a,b,c,d){var e=this._create(a,b,c,d),f=e.current;return e.previous.then(function(){L(function(){f.start()})}),f},a.prototype._create=function(a,c,e,f){var g,h=this,i=xf[c],j=[],k=[];if((!this._compat.animationSupported||v(i))&&(i=yf[c],v(i)))return a=this.__constructAnimatableElements(a,{inject:b},k,j),this._handlePreInitFunctionality(a,k,f),this._handlePostInitFunctionality(a,k,f),this._handleEndFunctionality(a,k,f),g=this.resolve(),{previous:g,current:g};a=this.__constructAnimatableElements(a,i,k,j);var l=k.length;if(0===l)return this._handlePreInitFunctionality(a,k,f),this._handlePostInitFunctionality(a,k,f),this._handleEndFunctionality(a,k,f),g=this.resolve(),{previous:g,current:g};this._handlePreInitFunctionality(a,k,f);var m,n=M("animation_"),o=this.__setAnimationId(n,k),q=new d(function(b){var c=h._Promise;m=c.all(o).then(function(){for(var d=[],g=0;l>g;++g)d.push(j[g].instantiate(k[g],e));h._handlePostInitFunctionality(a,k,f);var i=c.all(d),m=h.__isParentAnimating(k),o=h.__generateAnimatedElement(n,k,q);if(!u(m)){h._handleEndFunctionality(a,k,f),o.animationEnd(!0);var r=h._animatedElements[m],s=p(r.promise)?function(){return r.promise}:function(){return q};i.then(function(){b(s)})}h.__stopChildAnimations(k),o.promise=q,i.then(function(){h._handleEndFunctionality(a,k,f),o.animationEnd(),b(function(){return q})})})});return q.initialize(j),{previous:m,current:q}},a.prototype._handlePreInitFunctionality=function(a,b,c){switch(c.key){case"move":for(var d=0;de;++e)f.insertBefore(a[e],g);break;case"show":for(d=b.length,e=0;d>e;++e)b[e].removeAttribute(Id)}},a.prototype._handleEndFunctionality=function(a,b,c){var d,e;switch(c.key){case"leave":for(d=a.length,e=0;d>e;++e)fa(a[e]);break;case"hide":for(d=b.length,e=0;d>e;++e)b[e].setAttribute(Id,"")}},a.prototype.__setAnimationId=function(a,b){for(var c,d,e,f=this._animatedElements,g=[],h=b.length,i=0;h>i;++i)e=b[i],d=e.__plat,v(d)?(e.__plat={animation:a},ga(e,Jd)):v(d.animation)?(d.animation=a,ga(e,Jd)):(c=f[d.animation],v(c)||(g.push(c.promise),c.animationEnd(!0)),d.animation=a);return g},a.prototype.__generateAnimatedElement=function(a,b,c){var d=this._animatedElements,e=function(e){var f,g,h,i=b.length;if(e===!0)return c.cancel(),void P(d,a);for(var j=0;i>j;++j)g=b[j],f=g.__plat||{},h=f.animation,v(h)||h!==a||(ha(g,Jd),P(f,"animation"),q(f)&&P(g,"__plat"));P(d,a)};return d[a]={animationEnd:e}},a.prototype.__isParentAnimating=function(a){for(var b,c=a[0];!j(c=c.parentNode)&&!u(c)&&c.nodeType===Node.ELEMENT_NODE;)if(ka(c,Jd)&&(b=(c.__plat||{}).animation,n(b))){if(!u(this._animatedElements[b]))return b;P(c.__plat,"animation"),q(plat)&&P(c,"__plat"),ha(c,Jd)}},a.prototype.__stopChildAnimations=function(a){for(var b,c,d,e,f=this._animatedElements,g=Array.prototype.slice,h=0;h0;)d=b.pop().__plat||{},e=d.animation,u(e)||(c=f[e]||{},t(c.animationEnd)&&c.animationEnd(!0))},a.prototype.__constructAnimatableElements=function(a,b,c,d){if(!w(a))if(l(a))a=Array.prototype.slice.call(a.childNodes);else if(x(a))a=Array.prototype.slice.call(a);else{if(!k(a)||a.nodeType!==Node.ELEMENT_NODE)return[];a=[a]}for(var e,f=a.length,g=0;f>g;++g)e=a[g],k(e)&&e.nodeType===Node.ELEMENT_NODE&&(c.push(e),d.push(b.inject()));return a},a._inject={_compat:Oa,_Promise:Na,_document:Ra},a}();a.Animator=c,Fa.injectable(nb,c);var d=function(a){function c(b,c){a.call(this,b),this._Promise=ma(Na),this.__animationState=0,this.__animationInstances=[],u(c)||(this.__animationInstances=c.__animationInstances,this.__animationState=c.__animationState)}return __extends(c,a),c.prototype.initialize=function(a){q(this.__animationInstances)&&(w(a)?this.__animationInstances=a:h(a)&&(this.__animationInstances=[a]))},c.prototype.getInstances=function(){return this.__animationInstances},c.prototype.start=function(){if(!(this.__animationState>0)){for(var a,b=this.__animationInstances,c=b.length,d=0;c>d;++d)a=b[d],t(a.start)&&a.start();this.__animationState=1}},c.prototype.pause=function(){if(1!==this.__animationState)return this._Promise.resolve();for(var a,c=this.__animationInstances,d=[],e=c.length,f=0;e>f;++f)a=c[f],t(a.pause)&&d.push(a.pause());return this._Promise.all(d).then(b)},c.prototype.resume=function(){if(1!==this.__animationState)return this._Promise.resolve();for(var a,c=this.__animationInstances,d=[],e=c.length,f=0;e>f;++f)a=c[f],t(a.resume)&&d.push(a.resume());return this._Promise.all(d).then(b)},c.prototype.cancel=function(){if(2===this.__animationState)return this;for(var a,b=this.__animationInstances,c=b.length,d=0;c>d;++d)a=b[d],t(a.cancel)&&a.cancel(),t(a.end)&&a.end();return this.__animationState=2,this},c.prototype.isCanceled=function(){return 2===this.__animationState},c.prototype.then=function(b){return a.prototype.then.call(this,b)},c.prototype.catch=function(b){return a.prototype.catch.call(this,b)},c}(Ff.Promise);a.AnimationPromise=d;var e=function(){function a(){this.__eventListeners=[]; +}return a.prototype.initialize=function(){},a.prototype.start=function(){},a.prototype.end=function(){for(var a=this.__eventListeners;a.length>0;)a.pop()();t(this._resolve)&&(this._resolve(),this._resolve=null)},a.prototype.pause=function(){return this._Promise.resolve()},a.prototype.resume=function(){return this._Promise.resolve()},a.prototype.cancel=function(){this.end()},a.prototype.addEventListener=function(a,c,d){if(!t(c))return this._log.warn('An animation\'s "addEventListener" must take a function as the second argument.'),b;c=c.bind(this);var e=this.dom.addEventListener(this.element,a,function(a){a.stopPropagation(),c(a)},d),f=this.__eventListeners;return f.push(e),function(){e();var a=f.indexOf(e);-1!==a&&f.splice(a,1)}},a.prototype.instantiate=function(a,b){var c=this;this.element=a,this.options=b;var e=new d(function(a){c._resolve=a,c.initialize()});return e.initialize(this),e},a._inject={_window:Fb,_compat:Oa,_log:Xa,_Promise:Na,dom:rb,utils:zb},a}();a.BaseAnimation=e;var f=function(a){function b(){a.apply(this,arguments),this._animationEvents=this._compat.animationEvents}return __extends(b,a),b.prototype.animationStart=function(a){return this.addEventListener(this._animationEvents.$animationStart,a,!1)},b.prototype.animationEnd=function(a){return this.addEventListener(this._animationEvents.$animationEnd,a,!1)},b.prototype.animationIteration=function(a){return this.addEventListener(this._animationEvents.$animationIteration,a,!1)},b.prototype.transitionStart=function(a){return this.addEventListener(this._animationEvents.$transitionStart,a,!1)},b.prototype.transitionEnd=function(a){return this.addEventListener(this._animationEvents.$transitionEnd,a,!1)},b}(e);a.CssAnimation=f;var g=function(a){function c(){a.apply(this,arguments),this.className=Kd,this._animationCanceled=b}return __extends(c,a),c.prototype.initialize=function(){ga(this.element,this.className+Ae)},c.prototype.start=function(){var a=this;this._animationCanceled=L(function(){var b=a.element,c=a.className;if(null===b.offsetParent)return a._dispose(),void a.end();ga(b,c);var d=a._animationEvents.$animation,e=a.options||{},f=a._window.getComputedStyle(b,e.pseudo),g=f[d+"Name"];return""===g||"none"===g||"paused"===f[d+"PlayState"]?(a._dispose(),void a.end()):(e.preserveInit||ha(b,c+Ae),void(a._animationCanceled=a.animationEnd(function(){a._animationCanceled=L(function(){a._dispose()})})))})},c.prototype.pause=function(){var a=this;if(this._animationCanceled===b)return this._Promise.resolve();var c=this._compat.animationEvents;return new this._Promise(function(d){L(function(){a._animationCanceled!==b&&(a.element.style[c.$animation+"PlayState"]="paused"),d()})})},c.prototype.resume=function(){var a=this;if(this._animationCanceled===b)return this._Promise.resolve();var c=this._compat.animationEvents;return new this._Promise(function(d){L(function(){a._animationCanceled!==b&&(a.element.style[c.$animation+"PlayState"]="running"),d()})})},c.prototype.cancel=function(){this._animationCanceled(),this._dispose(),this.end()},c.prototype._dispose=function(){var a=this.className;ha(this.element,a+" "+a+Ae),this._animationCanceled=b},c}(f);a.SimpleCssAnimation=g,Fa.animation(Kd,g);var i=function(a){function b(){a.apply(this,arguments),this.className=Pd}return __extends(b,a),b}(g);a.FadeIn=i,Fa.animation(Pd,i);var m=function(a){function b(){a.apply(this,arguments),this.className=Qd}return __extends(b,a),b}(g);a.FadeOut=m,Fa.animation(Qd,m);var o=function(a){function b(){a.apply(this,arguments),this.className=Md}return __extends(b,a),b}(g);a.Enter=o,Fa.animation(Md,o);var r=function(a){function b(){a.apply(this,arguments),this.className=Nd}return __extends(b,a),b}(g);a.Leave=r,Fa.animation(Nd,r);var s=function(a){function b(){a.apply(this,arguments),this.className=Od}return __extends(b,a),b}(g);a.Move=s,Fa.animation(Od,s);var y=function(a){function c(){a.apply(this,arguments),this.className=Ld,this._animationCanceled=b,this._modifiedProperties={},this._normalizeRegex=/-/g,this._nonNumRegex=/[^\-0-9\.]/g,this._normalizedKeys={},this._transitionCount=0,this._count=0,this._started=!1,this._usingCss=!1}return __extends(c,a),c.prototype.initialize=function(){ga(this.element,this.className+Ae)},c.prototype.start=function(){var a=this;this._animationCanceled=L(function(){var b=a.element,c=a.className;null===b.offsetParent&&(a._animate(),a._dispose(),a.end()),ga(b,c),a._started=!0;var d=a.utils,e=a._animationEvents.$transition,f=a.options||{},g=f.count,h=a._window.getComputedStyle(b,f.pseudo),i=h[e+"Property"],j=h[e+"Duration"];if(d.isNumber(g)&&g>0&&(a._count=g),""===i||"none"===i||""===j||"0s"===j)return a._animate(),a._dispose(),void a.end();if(f.preserveInit===!1&&ha(b,c+Ae),a._animationCanceled=a.transitionEnd(a._done),!a._animate()){if(d.isEmpty(f.properties))return void a._cssTransition(h);a._dispose(),a.end()}})},c.prototype.cancel=function(){this._animationCanceled(),this._started||this._animate(),this._dispose(),this.end()},c.prototype._dispose=function(){var a=this.className;ha(this.element,a+" "+a+Ae),this._animationCanceled=b},c.prototype._done=function(a){var b=a.propertyName;if(n(b)){var c=++this._transitionCount;if(b=b.replace(this._normalizeRegex,"").toLowerCase(),c0;)a=f.shift(),b=d[a],c=e[a],n(c)?(d[a]=c,b===d[a]?k++:(h[a]=b,i[a.replace(j,"").toLowerCase()]=!0)):k++;return g>k},c.prototype._cssTransition=function(a){var c,d,e,f,g=this,h=this._animationEvents.$transition,i=a[h+"Duration"].split(","),j=a[h+"Delay"].split(","),k=a[h+"Property"].split(","),l=k.length,m=[],n=this._normalizedKeys,o=this._normalizeRegex,p=this._modifiedProperties,q=0,r=0,s=!1,t=this.utils.defer.bind(this,function(c,d){g._animationCanceled!==b&&("all"===c?s=!0:a[c]!==d&&(s=!0,p[c]=d),++rq;++q)c=k[q]=k[q].trim(),d=i.length>q?i[q].trim():i[i.length-1].trim(),e=j.length>q?j[q].trim():j[j.length-1].trim(),n[c.replace(o,"").toLowerCase()]=!0,f=a[c],m.push(f),t(this._toMs(d)+this._toMs(e),[c,f])},c.prototype._toMs=function(a){var b=this._nonNumRegex,c=a.match(b)[0],d=Number(a.replace(b,""));return this.utils.isNumber(d)?"s"===c?1e3*d:"ms"===c?d:0:0},c}(f);a.SimpleCssTransition=y,Fa.animation(Ld,y)}(G=a.animations||(a.animations={}));var K;!function(a){var c=function(a){function c(){a.apply(this,arguments)}return __extends(c,a),c.prototype.initialize=function(){var a,b=this._router=this._Router.currentRouter(),c=this._getParentViewport();u(c)||u(c._router)||(a=this._parentRouter=c._router,a.addChild(b)),this._navigator.initialize(b)},c.prototype.loaded=function(){var a=this;this._Promise.resolve(this._router.finishNavigating).then(function(){a._router.register(a)})},c.prototype.canNavigateTo=function(a){var b=this,c=this._Router.currentRouter,d=c(),e=!0,f=this._Injector.getDependency(a.delegate.view),g=f.inject(),i=a.parameters,j=c();if(!h(g))return this._Promise.resolve(null);if(d!==j){j.initialize(this._router);var k=ma(_a);g.navigator=k,k.initialize(j)}else g.navigator=this._navigator;return t(g.canNavigateTo)&&(e=g.canNavigateTo(i,a.query)),this._Promise.resolve(e).then(function(a){return b._nextInjector=f,b._nextView=g,a})},c.prototype.canNavigateFrom=function(){var a=this.controls[0],b=!0;return h(a)&&t(a.canNavigateFrom)&&(b=a.canNavigateFrom()),this._Promise.resolve(b)},c.prototype.navigateTo=function(a){var b=(this._Promise.resolve.bind(this._Promise),this._nextInjector||this._Injector.getDependency(a.delegate.view)),c=this._createNodeMap(b),d=(this.element,c.element),e=(a.parameters,a.query),f=c.uiControlNode.control;this._animator.enter(d,Md,this.element);var g=this._managerCache.read(this.uid),h=this._ElementManagerFactory.getInstance();return g.children=[],h.initialize(c,g),t(f.navigatedTo)&&f.navigatedTo(a.parameters,e),h.setUiControlTemplate(),f.hasOwnContext?h.observeRootContext(f,h.fulfillAndLoad):h.fulfillAndLoad()},c.prototype.navigateFrom=function(){var a,c=this.controls[0];return a=h(c)&&t(c.navigatingFrom)?this._Promise.resolve(c.navigatingFrom()):this._Promise.resolve(),a.catch(b).then(function(){Nf.dispose(c)})},c.prototype.dispose=function(){this._router.unregister(this),this._navigator.dispose()},c.prototype._createNodeMap=function(a){var b=this._nextView||a.inject(),c=this._document,d=a.name,e=b.replaceWith,f=q(e)||"any"===e?c.createElement("div"):c.createElement(e);return f.setAttribute(Rc,d),f.className=Sc,{element:f,attributes:{},nodes:[],uiControlNode:{control:b,nodeName:d,expressions:[],injector:a,childManagerLength:0}}},c.prototype._getParentViewport=function(){for(var a=this.parent,b=this.type;!u(a)&&a.type!==b;)a=a.parent;return a},c._inject={_Router:Db,_Promise:Na,_Injector:Rb,_ElementManagerFactory:fb,_document:Ra,_managerCache:lb,_animator:nb,_navigator:_a},c}(o);a.Viewport=c,Fa.control(Qc,c);var d=function(a){function b(){a.call(this),this.replaceWith=null,this.__isFirst=!1;var b=ma(kb);this.__templateControlCache=b.create(Yc)}return __extends(b,a),b.prototype.initialize=function(){var a=this.options||{},b=a.value||{},c=this._id=b.id;if(u(c))return void this._log.warn(this.type+" instantiated without an id option");this._url=b.templateUrl;var d=this.__templateControlCache.read(c);return u(d)?(this.__isFirst=!0,void this._initializeTemplate()):void(this.__templatePromise=d)},b.prototype.loaded=function(){this.__isFirst||this._waitForTemplateControl(this.__templatePromise)},b.prototype.dispose=function(){if(this.__isFirst){var a=this.__templateControlCache;a.remove(this._id),0===a.info().size&&a.dispose()}},b.prototype._initializeTemplate=function(){var a=this,b=this._id;if(!u(b)){var c,d=this.endNode.parentNode,e=this._url;u(e)?(c=this._document.createDocumentFragment(),U(this.elementNodes,c)):(c=this._templateCache.read(e),W(this.elementNodes,d));var f;p(c)?f=c.catch(function(b){return u(b)?o.determineTemplate(a,e):void 0}).then(function(c){return a.bindableTemplates.add(b,c.cloneNode(!0)),a}):(this.bindableTemplates.add(b,c.cloneNode(!0)),f=this._Promise.resolve(this)),this.__templateControlCache.put(b,f)}},b.prototype._waitForTemplateControl=function(a){var b=this;p(a)&&a.then(function(a){return u(b._url)||b._url===a._url||b._log.warn("The specified url: "+b._url+" does not match the original "+b.type+' with id: "'+b._id+'". The original url will be loaded.'),b.__mapBindableTemplates(a),b.bindableTemplates.bind(b._id)}).then(function(a){var c=b.endNode;$(c.parentNode,a,c)}).catch(function(a){I(function(){b._log.warn("Problem resolving "+b.type+" url: "+a.response)})})},b.prototype.__mapBindableTemplates=function(a){var b=this.bindableTemplates;b.cache=a.bindableTemplates.cache,b.templates=a.bindableTemplates.templates},b._inject={_Promise:Na,_templateCache:mb,_document:Ra},b}(o);a.Template=d,Fa.control(Pc,d);var e=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.prototype.setTemplate=function(){this.innerTemplate=U(this.element.childNodes)},b.prototype.loaded=function(){this.element.appendChild(this.innerTemplate.cloneNode(!0))},b}(o);a.Ignore=e,Fa.control(Nc,e);var f=function(a){function b(){var b=this;a.call(this),this.priority=120,this._aliases={index:je.index,even:je.even,odd:je.odd,first:je.first,last:je.last},this._blockLength=0,this._addQueue=[],this._itemLength=0,this.__listenerSet=!1,this.itemsLoaded=new this._Promise(function(a){b.__resolveFn=a})}return __extends(b,a),b.prototype.setTemplate=function(){this.bindableTemplates.add("item",this.element.childNodes)},b.prototype.contextChanged=function(a,b){w(a)?this._setListener():(this._log.debug(this.type+" context set to something other than an Array."),a=[]),this._executeEvent([{object:a,type:"splice"}])},b.prototype.loaded=function(){var a=this.options,b=this._animate=!v(a)&&a.value.animate===!0,c=this.context;if(this._container=this.element,b&&(this._animationQueue=[]),!w(c))return void(u(c)||this._log.debug(this.type+" context set to something other than an Array."));this._setAliases();var d=this._addQueue,e=c.length,f=this._addItems(0,e,0).then(function(){var a=d.indexOf(f);-1!==a&&d.splice(a,1)});d.push(f),this._setListener()},b.prototype.dispose=function(){this.__resolveFn=this._animationQueue=this._addQueue=null},b.prototype._setAliases=function(){var a=this.options;if(!v(a)){var b=a.value.aliases;if(h(b))for(var c,d=this._aliases,e=Object.keys(d),f=e.length,g=0;f>g;++g)c=b[e[g]],n(c)&&(d[e[g]]=c)}},b.prototype._addItems=function(a,b,c){var d=this,e=+(a+b),f=[],g=a;for(this._itemLength+=b;e>a;)f.push(this._bindItem(a++));return f.length>0&&(this.itemsLoaded=this._Promise.all(f).then(function(a){if(d._setBlockLength(a),c>0)for(var b=a.length,e=d._container,f=0;b>f;++f)c>f?d._appendAnimatedItem(a[f]):e.insertBefore(a[f],null);else d._appendItems(a);d._updateResource(g-1),t(d.__resolveFn)&&(d.__resolveFn(),d.__resolveFn=null)}).catch(function(a){I(function(){n(a)&&(a=new Error(a)),d._log.error(a)})})),this.itemsLoaded},b.prototype._appendItems=function(a){U(a,this._container)},b.prototype._appendAnimatedItem=function(a){if(k(a)){var b=this._animationQueue;b.push({animation:this._animator.enter(a,Md,this._container).then(function(){b.shift()}),op:null})}},b.prototype._removeItems=function(a,b){for(var c=o.dispose,d=this.controls,e=a+b;e-->a;)c(d[e]);this._updateResource(d.length-1)},b.prototype._bindItem=function(a){return this.bindableTemplates.bind("item",a,this._getAliases(a))},b.prototype._setBlockLength=function(a){this._blockLength>0||0===a.length||(this._blockLength=a[0].childNodes.length)},b.prototype._updateResource=function(a){var b=this.controls;0>a||a>=b.length||b[a].resources.add(this._getAliases(a))},b.prototype._setListener=function(){this.__listenerSet||(this.observeArray(this._executeEvent),this.__listenerSet=!0)},b.prototype._executeEvent=function(a){var b="_"+a[0].type;t(this[b])&&this[b](a)},b.prototype._getAliases=function(a){var b=0===(1&a),c={},d=this._aliases,e=Se;return c[d.index]={value:a,type:e},c[d.even]={value:b,type:e},c[d.odd]={value:!b,type:e},c[d.first]={value:0===a,type:e},c[d.last]={value:a===this.context.length-1,type:e},c},b.prototype._push=function(a){var b=a[0],c=this._addQueue,d=b.addedCount,e=this._addItems(b.index,d,this._animate?d:0).then(function(){var a=c.indexOf(e);-1!==a&&c.splice(a,1)});c.push(e)},b.prototype._pop=function(a){var b=this,c=a[0],d=c.object.length;if(0!==c.removed.length){var e=c.object.length;this._itemLength>0&&this._itemLength--,this._Promise.all(this._addQueue).then(function(){return b._animate?void b._animateItems(d,1,Nd,"leave",!1).then(function(){b._removeItems(e,1)}):void b._removeItems(e,1)})}},b.prototype._unshift=function(a){var b=a[0],c=b.addedCount,d=this._addQueue;if(this._animate){var e=this._animationQueue,f=e.length;this._animateItems(0,c,Md,null,f>0&&"clone"===e[f-1].op)}var g=this._addItems(b.object.length-c,c,0).then(function(){var a=d.indexOf(g);-1!==a&&d.splice(a,1)});d.push(g)},b.prototype._shift=function(a){var b=this,c=this._addQueue,d=a[0];if(0!==d.removed.length){if(this._animate&&0===c.length){this._animationQueue;c=c.concat([this._animateItems(0,1,Nd,"clone",!0)])}var e=d.object.length;this._itemLength>0&&this._itemLength--,this._Promise.all(c).then(function(){b._removeItems(e,1)})}},b.prototype._splice=function(a){var b,c=this,d=a[0],e=d.addedCount,f=this._addQueue,g=this._itemLength,h=this._animate;if(u(e)){h&&this._cancelCurrentAnimations();var i=d.object.length,j=g-i;return void(i>g?(b=this._addItems(g,-j,0).then(function(){var a=f.indexOf(b);-1!==a&&f.splice(a,1)}),f.push(b)):g>i&&(g>=j?this._itemLength-=j:this._itemLength=0,this._Promise.all(f).then(function(){c._removeItems(g-j,j)})))}var k=d.removed.length,l=this._animationQueue;if(e>k){var m,n=(this._Promise,e-k);if(h){m=e;var o=l.length,p=d.index;e-p>g&&(m=g-p),this._animateItems(p,m,Md,null,o>0&&"clone"===l[o-1].op),m=e-m}else m=0;b=this._addItems(d.object.length-n,n,m).then(function(){var a=f.indexOf(b);-1!==a&&f.splice(a,1)}),f.push(b)}else if(k>e){var q=e>0;h&&!q&&0===f.length&&(f=f.concat([this._animateItems(d.index,k,Nd,"clone",!0)]));var r=k-e;g>=r?this._itemLength-=r:this._itemLength=0,this._Promise.all(f).then(function(){if(h&&q){var a=l.length;c._animateItems(d.index,e,Md,null,a>0&&"clone"===l[a-1].op)}c._removeItems(g-r,r)})}},b.prototype._calculateBlockLength=function(a,b){return this._blockLength},b.prototype._animateItems=function(a,b,c,d,e){var f=this._calculateBlockLength();if(0===f)return this._Promise.resolve();var g=a*f;switch(d){case"clone":return this._handleClonedContainerAnimation(g,b*f+g,c,e===!0);case"leave":return this._handleLeave(g,b*f+g,c);default:return this._handleSimpleAnimation(g,b*f+g,c,e===!0)}},b.prototype._handleSimpleAnimation=function(a,b,c,d){var e=this._container,f=Array.prototype.slice,g=f.call(e.childNodes,a,b);if(0===g.length)return this._Promise.resolve();var h=this._animationQueue,i=this._animator.create(g,c),j=i.current.then(function(){h.shift()}),k=function(){return i.previous.then(function(){j.start()}),j};if(d&&h.length>0){var l=this._cancelCurrentAnimations().then(k);return h.push({animation:j,op:null}),l}return h.push({animation:j,op:null}),k()},b.prototype._handleLeave=function(a,b,c){var d=this._container,e=Array.prototype.slice,f=e.call(d.childNodes,a,b);if(0===f.length)return this._Promise.resolve();var g=this._animationQueue,h=this._animator.leave(f,c).then(function(){g.shift()});return g.push({animation:h,op:"leave"}),h},b.prototype._handleClonedContainerAnimation=function(a,b,c,d){var e=this._container,f=e.cloneNode(!0),g=Array.prototype.slice,h=g.call(f.childNodes,a,b);if(0===h.length)return this._Promise.resolve();var i,j=this._animationQueue,k=this._animator.create(h,c),l=k.current.then(function(){j.shift(),u(i)||i.replaceChild(e,f)}),m=function(){return i=e.parentNode,u(i)||l.isCanceled()?(j.shift(),l):(i.replaceChild(f,e),k.previous.then(function(){l.start()}),l)};if(d&&j.length>0){var n=this._cancelCurrentAnimations().then(m);return j.push({animation:l,op:"clone"}),n}return j.push({animation:l,op:"clone"}),m()},b.prototype._cancelCurrentAnimations=function(){for(var a=this._animationQueue,b=[],c=a.length,d=0;c>d;++d)b.push(a[d].animation.cancel());return this._Promise.all(b)},b._inject={_animator:nb,_Promise:Na},b}(o);a.ForEach=f,Fa.control(Kc,f);var g=function(a){function b(){a.apply(this,arguments),this.replaceWith=Zc}return __extends(b,a),b.prototype.initialize=function(){var a=this;this.on(Bd,function(){a._removeAllElements()})},b.prototype.setTemplate=function(){var a=$c,b=_c,c=dd,d=bd,e=jd,f=cd,g=ad,h=ld,i=nd,j=md,k=od;this._titleElement=this._createElement(b),this._ogTitleElement=this._createElement(a,i+b),this._twitterTitleElement=this._createElement(a,k+b),this._descriptionElement=this._createElement(a,g),this._ogDescriptionElement=this._createElement(a,i+g),this._twitterDescriptionElement=this._createElement(a,k+g),this._ogUrlElement=this._createElement(a,i+h),this._twitterUrlElement=this._createElement(a,k+h),this._authorElement=this._createElement(a,d),this._googleAuthorElement=this._createElement(c,d),this._fbAuthorElement=this._createElement(a,j+d),this._twitterCreatorElement=this._createElement(a,k+f),this._ogTypeElement=this._createElement(a,i+e)},b.prototype.title=function(a){return n(a)?(this._titleElement.innerText=a,this._setContent([this._ogTitleElement,this._twitterTitleElement],a),a):this._getContent(this._titleElement)},b.prototype.description=function(a){return n(a)?(this._setContent([this._descriptionElement,this._ogDescriptionElement,this._twitterDescriptionElement],a),a):this._getContent(this._descriptionElement)},b.prototype.url=function(a){return n(a)?(this._setContent([this._ogUrlElement,this._twitterUrlElement],a),a):this._getContent(this._ogUrlElement)},b.prototype.author=function(a){return n(a)?(this._setContent([this._authorElement],a),a):this._getContent(this._authorElement)},b.prototype.googleAuthor=function(a){return n(a)?(this._setContent([this._googleAuthorElement],a),a):this._getContent(this._googleAuthorElement)},b.prototype.fbAuthor=function(a){return n(a)?(this._setContent([this._fbAuthorElement],a),a):this._getContent(this._fbAuthorElement)},b.prototype.twitterCreator=function(a){return n(a)?(this._setContent([this._twitterCreatorElement],a),a):this._getContent(this._twitterCreatorElement)},b.prototype.fbType=function(a){return n(a)?(this._setContent([this._ogTypeElement],a),a):this._getContent(this._ogTypeElement)},b.prototype.images=function(a){var b=this;if(w(a)){var c,d,e=$c,f=nd,g=od;B(function(a){c=b._createElement(e,f+hd),d=b._createElement(e,g+hd),a=b._browser.urlUtils(a).href,b._setContent([c,d],a)},a)}},b.prototype.videos=function(a){var b=this;if(w(a)){var c,d=$c,e=nd;B(function(a){c=b._createElement(d,e+id),a=b._browser.urlUtils(a).href,b._setContent([c],a)},a)}},b.prototype.loaded=function(){this.url(this._browser.url())},b.prototype.navigated=function(a){this.url(a)},b.prototype._getContent=function(a){var b=a.nodeName.toLowerCase();return b===_c?a.innerText:b===$c?a.getAttribute(pd):b===dd?a.getAttribute(ed):void 0},b.prototype._setContent=function(a,b){for(var c,d,e=Array.prototype.slice.call(this.element.children),f=(a.length,pd),g=ed,h=this.element,i=this._titleElement.nextSibling,j=this.dom,k=0;kg;++g)c=a[g],-1!==e.indexOf(c)&&d.removeChild(c)},b._inject={_document:Ra,_browser:Ab},b}(plat.ui.TemplateControl);a.Head=g;var i=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.prototype.contextChanged=function(){this.loaded()},b.prototype.loaded=function(){var a=this.context;n(a)&&Z(this.element,a)},b}(o);a.InnerHtml=i,Fa.control(Lc,i);var j=function(a){function b(){var b=this;a.call(this),this.replaceWith="select",this.priority=120,this.groups={},this.itemsLoaded=new this._Promise(function(a){b.__resolveFn=a})}return __extends(b,a),b.prototype.setTemplate=function(){this.bindableTemplates.add("option",this.element.childNodes);var a=this.options||{},b=a.value||{},c=b.default;if(h(c)){var d=this._document.createElement("option"),e=c.value,f=c.textContent;d.value=v(e)?f:e,d.textContent=v(f)?e:f,this.element.insertBefore(d,null)}if(u(b.group))this._isGrouped=!1;else{var g=this._group=b.group,i=this._document.createElement("optgroup");i.label=qe+g+re,this.bindableTemplates.add("group",i),this._isGrouped=!0}},b.prototype.contextChanged=function(a,b){var c=this;if(q(a))return void(q(b)||this.itemsLoaded.then(function(){c._removeItems(c.controls.length)}));if(!w(a))return void this._log.debug(this.type+" context set to something other than an Array.");var d=w(a)?a.length:0,e=w(b)?b.length:0;this._setListener(),d>e?this._addItems(d-e,e):e>d&&this._removeItems(e-d)},b.prototype.loaded=function(){if(v(this._isGrouped)){var a=this.options||{},b=a.value||{};this._isGrouped=!u(this._group=b.group)}this._defaultOption=this.element.firstElementChild;var c=this.context;return w(c)?(this._addItems(c.length,0),void this._setListener()):void this._log.debug(this.type+" context set to something other than an Array.")},b.prototype.dispose=function(){a.prototype.dispose.call(this),this.__resolveFn=null,this._defaultOption=null},b.prototype.observeProperties=function(a){var b,c=this.element;this._binder=a,c.multiple?(b=this._setSelectedIndices.bind(this),u(a.evaluate())&&this.inputChanged([]),a.observeProperty(function(){b(a.evaluate(),null,null)},null,!0)):b=this._setSelectedIndex.bind(this),a.observeProperty(b),this.addEventListener(c,"change",this._observeChange,!1)},b.prototype._setSelectedIndex=function(a,b,c,d){var e=this,f=this.element,g=f.value;if(u(a))return d!==!0&&this._document.body.contains(f)?void(f.selectedIndex=-1):void this.itemsLoaded.then(function(){u(e._binder.evaluate())&&e.inputChanged(f.value)});if(n(a)){if(g===a)return;if(!this._document.body.contains(f))return f.value=a,void(f.value!==a&&(f.value=g,this.inputChanged(f.value)))}else{var h;s(a)?(a=a.toString(),h="Trying to bind a value of type number to a "+this.type+"'s element. The value will implicitly be converted to type string."):h="Trying to bind a value that is not a string to a "+this.type+"'s element. The element's selected index will be set to -1.",this._log.debug(h)}this.itemsLoaded.then(function(){f.value=a,(f.value!==a||-1===f.selectedIndex)&&(f.selectedIndex=-1)})},b.prototype._setSelectedIndices=function(a,b,c,d){var e,f=this,g=this.element,h=g.options,i=u(h)?0:h.length,j=u(a);this.itemsLoaded.then(function(){if(!j&&w(a))for(var b,c;i-->0;)e=h[i],b=e.value,c=Number(b),-1!==a.indexOf(b)||s(c)&&-1!==a.indexOf(c)?e.selected=!0:e.selected=!1;else for(d===!0&&u(f._binder.evaluate())&&f.inputChanged(f._getSelectedValues());i-->0;){if(e=h[i],!j&&e.value===""+a)return void(e.selected=!0);e.selected=!1}})},b.prototype._observeChange=function(){var a=this.element;this.inputChanged(a.multiple?this._getSelectedValues():a.value)},b.prototype._getSelectedValues=function(){for(var a,b=this.element.options,c=b.length,d=[],e=0;c>e;++e)a=b[e],a.selected&&d.push(a.value);return d},b.prototype._setListener=function(){this.__listenerSet||(this.observeArray(this._executeEvent),this.__listenerSet=!0)},b.prototype._executeEvent=function(a){var b="_"+a[0].type;t(this[b])&&this[b](a)},b.prototype._addItems=function(a,b){for(var c=this,d=this.bindableTemplates,e=[],f=this._insertOption;a-->0;)e.push(d.bind("option",b).then(f.bind(this,b++)));return e.length>0?this.itemsLoaded=this._Promise.all(e).then(function(){t(c.__resolveFn)&&(c.__resolveFn(),c.__resolveFn=null)}):(t(this.__resolveFn)&&(this.__resolveFn(),this.__resolveFn=null),this.itemsLoaded=new this._Promise(function(a){c.__resolveFn=a})),this.itemsLoaded},b.prototype._insertOption=function(a,b){var c=this.element;if(this._isGrouped){var d=this.groups,e=(this.context[a]||{})[this._group],f=d[e];return u(f)?d[e]=this.bindableTemplates.bind("group",a).then(function(a){return f=d[e]=a.childNodes[1],f.insertBefore(b,null),c.insertBefore(a,null),f}):p(f)?f.then(function(a){a.insertBefore(b,null)}):(f.insertBefore(b,null),this._Promise.resolve())}return c.insertBefore(b,null),this._Promise.resolve()},b.prototype._removeItems=function(a){for(var b=o.dispose,c=this.controls;a-->0;)b(c.pop())},b.prototype._removeItem=function(){return this._isGrouped?void this._resetSelect():void this._removeItems(1)},b.prototype._resetSelect=function(){this._removeItems(this.controls.length),this.groups={},u(this._defaultOption)||this.element.insertBefore(this._defaultOption.cloneNode(!0),null),this._addItems(this.context.length,0)},b.prototype._push=function(a){var b=a[0];this._addItems(b.addedCount,b.index)},b.prototype._pop=function(a){var b=this;0!==a[0].removed.length&&this.itemsLoaded.then(function(){b._removeItem()})},b.prototype._unshift=function(a){if(this._isGrouped)return void this._resetSelect();var b=a[0],c=b.addedCount;this._addItems(c,b.object.length-c-1)},b.prototype._shift=function(a){var b=this;0!==a[0].removed.length&&this.itemsLoaded.then(function(){b._removeItem()})},b.prototype._splice=function(a){var b=this;if(this._isGrouped)return void this._resetSelect();var c=a[0],d=c.addedCount,e=c.removed.length;d>e?this._addItems(d-e,c.object.length-d-1):e>d&&this.itemsLoaded.then(function(){b._removeItems(e-d)})},b.prototype._sort=function(a){this._isGrouped&&this._resetSelect()},b.prototype._reverse=function(a){this._isGrouped&&this._resetSelect()},b._inject={_Promise:Na,_document:Ra},b}(r);a.Select=j,Fa.control(Oc,j);var l=function(a){function c(){a.call(this),this.__condition=!0,this.__firstTime=!0;var b=this._document;this.commentNode=b.createComment(Mc+ze+"placeholder"),this.fragmentStore=b.createDocumentFragment()}return __extends(c,a),c.prototype.contextChanged=function(){var a=this.options.value;if(!q(a))return this._setter(a)},c.prototype.setTemplate=function(){this.bindableTemplates.add("template",Array.prototype.slice.call(this.element.childNodes))},c.prototype.loaded=function(){u(this.options)&&(this._log.warn("No condition specified in "+bc+" for "+this.type+"."),this.options={value:{condition:!0},observe:b});var a=this.contextChanged();return this.__removeListener=this.options.observe(this._setter),a},c.prototype.dispose=function(){t(this.__removeListener)&&(this.__removeListener(),this.__removeListener=null),this.commentNode=null,this.fragmentStore=null},c.prototype._setter=function(a){var b,c=this,d=!!a.condition;return d!==this.__condition||this.__firstTime?(d?b=u(this.__leaveAnimation)?this._addItem():this.__leaveAnimation.cancel().then(function(){return c.__leaveAnimation=null,c._addItem()}):u(this.__enterAnimation)?(this._removeItem(),b=this._Promise.resolve(null)):b=this.__enterAnimation.cancel().then(function(){return c.__enterAnimation=null,c._removeItem()}),this.__condition=d,b):this._Promise.resolve(null)},c.prototype._addItem=function(){var a=this;return k(this.commentNode.parentNode)||this.__firstTime?this.__firstTime?(this.__firstTime=!1,this.__initialBind=this.bindableTemplates.bind("template").then(function(b){var c=a.element;return a.__initialBind=null,c.parentNode===a.fragmentStore?(c.insertBefore(b,null),a._animateEntrance()):(a.__enterAnimation=a._animator.animate(c,Md),c.insertBefore(b,null),a.__enterAnimation)}).then(function(){a.__enterAnimation=null}),this.__initialBind):p(this.__initialBind)?this.__initialBind.then(function(){return a._animateEntrance()}):this._animateEntrance():this._Promise.resolve(null)},c.prototype._animateEntrance=function(){var a=this,c=this.commentNode,d=c.parentNode;return k(d)?this.__enterAnimation=this._animator.enter(this.element,Md,d,c).then(function(){a.__enterAnimation=null}):this._animator.resolve().then(b)},c.prototype._removeItem=function(){var a=this;return p(this.__initialBind)?this.__initialBind.then(function(){return a._animateLeave()}):this._animateLeave()},c.prototype._animateLeave=function(){var a=this,c=this.element,d=c.parentElement,e=c.nextSibling;return k(d)?this.__leaveAnimation=this._animator.leave(c,Nd).then(function(){a.__leaveAnimation=null,d.insertBefore(a.commentNode,e),a.fragmentStore.insertBefore(c,null)}):this._animator.resolve().then(b)},c._inject={_animator:nb,_Promise:Na,_document:Ra},c}(o);a.If=l,Fa.control(Mc,l);var m=function(a){function b(){a.apply(this,arguments),this.replaceWith="a",this._router=this._Router.currentRouter()}return __extends(b,a),b.prototype.initialize=function(){this._removeClickListener=this.dom.addEventListener(this.element,"click",this._handleClick,!1)},b.prototype.loaded=function(){var a=this.options,b=this.setHref.bind(this);return h(a)?(h(a.value)||(a.value={view:""}),this.addEventListener(this.element,Sd,this._handleTap,!1),b(),void a.observe(b)):(this._log.warn("No options specified for "+this.type+". Please send in options of type plat.ui.controls.ILinkOptions."),a=this.options={}, +a.value={view:""},void this.setHref())},b.prototype.setHref=function(){var a=this.getHref();if(!q(a)){var b=this.element;b.href=a}},b.prototype.getHref=function(){if(!u(this._router)){var a=this.options.value,b=a.view;if(a.isUrl!==!0){var c=a.parameters,d=a.query;if(q(b))return b;b=this._router.generate(b,c,d)}return this._browser.formatUrl(b)}},b.prototype._handleClick=function(a){var b;if(s(a.buttons))b=0===a.buttons?1:a.buttons;else if(s(a.which)&&a.which>0)b=a.which;else switch(a.button){case-1:b=0;break;case 0:b=1;break;case 1:b=4;break;case 2:b=2;break;case 3:b=8;break;case 4:b=16;break;default:b=1}1===b&&a.preventDefault()},b.prototype._handleTap=function(a){var b=this;if(1===a.buttons){var c=this.getHref();v(c)||(a.preventDefault(),L(function(){b._browser.url(c)}))}},b.prototype.dispose=function(){J(this._removeClickListener,3e3)},b._inject={_Router:Db,_Injector:Rb,_browser:Ab},b}(o);a.Link=m,Fa.control(Jc,m)}(K=a.controls||(a.controls={}))}(Pf=a.ui||(a.ui={}));var Qf;!function(a){function c(a,b,c,d,e){return i._markupRegex=a.markupRegex,i._newLineRegex=a.newLineRegex,i._ContextManager=b,i._parser=c,i._TemplateControlFactory=d,i._log=e,i}function d(a,b,c,d,e,f){return j._document=a,j._managerCache=b,j._ResourcesFactory=c,j._AttributesFactory=d,j._BindableTemplatesFactory=e,j._log=f,j}function e(){return l}function f(){return m}var g=function(){function a(){}return a.prototype.compile=function(a,b){var c,d,e,f=a.childNodes,g=!u(b),h=g?this._managerCache.read(b.uid):null,i=this._ElementManagerFactory.create;if(f=v(f)?t(a.push)?a:Array.prototype.slice.call(a):Array.prototype.slice.call(f),u(h)){c=f.length;for(var j=0;c>j;++j)e=f[j],e.nodeType===Node.ELEMENT_NODE&&(u(i(e))||this.compile(e)),d=f.length,j+=d-c,c=d}else this._compileNodes(f,h)},a.prototype._compileNodes=function(a,b){for(var c,d,e,f=a.length,g=this._ElementManagerFactory.create,h=this._CommentManagerFactory.create,i=this._TextManagerFactory.create,j=0;f>j;++j){switch(c=a[j],c.nodeType){case Node.ELEMENT_NODE:d=g(c,b),u(d)||this._compileNodes(Array.prototype.slice.call(c.childNodes),d);break;case Node.TEXT_NODE:i(c,b);break;case Node.COMMENT_NODE:h(c,b)}e=a.length,j+=e-f,f=e}},a._inject={_ElementManagerFactory:fb,_TextManagerFactory:ib,_CommentManagerFactory:db,_managerCache:lb},a}();a.Compiler=g,Fa.injectable(cb,g);var i=function(){function a(){this.isClone=!1}return a.hasMarkup=function(b){return a._markupRegex.test(b)},a.findMarkup=function(b){var c,d,e,f,g=[],h=a._wrapExpression,i=a._parser;for(b=b.replace(a._newLineRegex,"");-1!==(c=b.indexOf(qe))&&-1!==(d=b.indexOf(re));){for(0!==c&&g.push(h(b.slice(0,c)));"}"===b[++d];);e=b.slice(c+2,d-2),"="===e[0]?(f=i.parse(e.slice(1).trim()),f.oneTime=!0,g.push(f)):g.push(i.parse(e.trim())),b=b.slice(d)}return c>-1&&d>=0?g.push(h(b.slice(d))):""!==b&&g.push(h(b)),g},a.build=function(b,c){for(var d,e,f="",g=b.length,i={},j=a._TemplateControlFactory.evaluateExpression,k=0;g>k;++k)if(d=b[k],e=j(d,c,i),h(e))try{f+=JSON.stringify(e,null,4)}catch(b){u(b.description)||(b.description="Cannot stringify object: "+b.description),b.message="Cannot stringify object: "+b.message,a._log.warn(b)}else u(e)||(f+=e);return f},a.observeExpressions=function(b,c,d){for(var e,f,g,h,i,j,k=a.__findUniqueIdentifiers(b),l=k.identifiers,m=k.oneTimeIdentifiers,n={listener:d,uid:c.uid};l.length>0;)f=a.__getObservationDetails(l.pop(),c),g=f.manager,u(g)||g.observe(f.absoluteIdentifier,n);for(;m.length>0;)e=m.pop(),f=a.__getObservationDetails(e,c),g=f.manager,u(g)||f.isDefined||(h=f.absoluteIdentifier,i=g.observe(h,n),j=g.observe(h,{uid:c.uid,listener:function(){i(),j()}}))},a._wrapExpression=function(a){return{evaluate:function(){return a},identifiers:[],aliases:[],expression:a}},a.__findUniqueIdentifiers=function(a){var b,c=a.length;if(1===c)return b=a[0],b.oneTime?{identifiers:[],oneTimeIdentifiers:b.identifiers.slice(0)}:{identifiers:b.identifiers.slice(0),oneTimeIdentifiers:[]};for(var d,e,f,g,h,i={},j={},k=[],l=[],m=0;c>m;++m)for(b=a[m],h=b.oneTime,d=b.identifiers,g=d.length,f=0;g>f;++f)if(e=d[f],h){if(i[e]===!0)continue;j[e]||(j[e]=!0,l.push(e))}else i[e]||(i[e]=!0,k.push(e)),j[e]===!0&&(j[e]=!1,l.splice(l.indexOf(e),1));return{identifiers:k,oneTimeIdentifiers:l}},a.__getObservationDetails=function(b,c){var d,e=a._ContextManager,f=b.split("."),g="",h=!1;if("@"===b[0]){var i,j={},k=f.shift(),l=k.slice(1);if(f.length>0&&(g="."+f.join(".")),i=j[l],u(i)&&(i=j[l]=c.findResource(l)),!u(i)&&!u(i.resource)){var m=i.resource.type;l===We?(d=e.getManager(Nf.getRootControl(c)),g=c.absoluteContextPath+g):l===Ue?(d=e.getManager(j[l].control),g="context"+g):(m===Oe||m===Se)&&(d=e.getManager(j[l].control),g="resources."+l+".value"+g)}}else h=!v(e.getContext(c.context,f)),h||v(e.getContext(c,f))?(d=e.getManager(Nf.getRootControl(c)),g=c.absoluteContextPath+"."+b):d=null;return{absoluteIdentifier:g,manager:d,isDefined:h}},a.prototype.initialize=function(a,b){this.nodeMap=a,this.parent=b,u(b)||(this.isClone=b.isClone,b.children.push(this))},a.prototype.getParentControl=function(){for(var a,b=this.parent;u(a)&&!u(b);)a=b.getUiControl(),b=b.parent;return a},a.prototype.clone=function(a,b){return 1},a.prototype.bind=function(){},a}();a.NodeManager=i,a.INodeManagerStatic=c,Fa.injectable(hb,c,[Za,ab,Ya,xb,Xa],se);var j=function(a){function b(){a.apply(this,arguments),this.children=[],this.type="element",this.replace=!1,this.hasOwnContext=!1}return __extends(b,a),b.create=function(a,c){var d,e=a.nodeName.toLowerCase(),f=e,g=rf[e]||sf[e],h=!0,i=!1;if(u(g)&&(a.hasAttribute(Rc)?(e=a.getAttribute(Rc).toLowerCase(),g=rf[e]||sf[e],h=!1):a.hasAttribute(Xc+Rc)&&(e=a.getAttribute(Xc+Rc).toLowerCase(),g=rf[e]||sf[e],h=!1)),!u(g)){var j=g.inject(),k=b.locateResources(a);d={control:j,resourceElement:k,nodeName:e,expressions:[],injector:g},i=!0,h&&a.setAttribute(Rc,e);var l=j.replaceWith,m="any"===l&&h;if(!q(l)&&("any"!==l||m)&&l.toLowerCase()!==f){m&&(l="div");var o=b._document.createElement(l);o.nodeType===Node.ELEMENT_NODE&&(a=aa(a,o))}}var p=b._collectAttributes(a.attributes),r=b.getInstance();return p.element=a,!i&&n(p.childContext)?(g=uf[yb],i=!0,p.uiControlNode={control:g.inject(),resourceElement:null,nodeName:Vc,expressions:[],injector:g}):p.uiControlNode=d,r.initialize(p,c),p.hasControl||i?(r.setUiControlTemplate(),i?null:r):(r.bind=function(){return[]},r)},b.locateResources=function(a){for(var b,c,d=Array.prototype.slice.call(a.childNodes);d.length>0;)if(b=d.shift(),c=b.nodeName.toLowerCase(),c===Tc||c==="x-"+Tc)return a.removeChild(b);return null},b.clone=function(a,c,d,e,f){u(f)&&(f=b._cloneNodeMap(a.nodeMap,d,c.getUiControl()||c.getParentControl(),e));var g=b.getInstance(),h=!u(e);return g.nodeMap=f,g.parent=c,u(c)||c.children.push(g),g.replace=a.replace,g.replaceNodeLength=a.replaceNodeLength,g.hasOwnContext=a.hasOwnContext,g.isClone=!0,f.hasControl||h||(g.bind=function(){return[]}),h&&b._managerCache.put(e.uid,g),g},b.cloneUiControl=function(a,c){var d=a.uiControlNode;if(!u(d)&&!u(d.injector)){var e=d.control,f=d.injector.inject(),g=b._ResourcesFactory.getInstance(),h=b._AttributesFactory.getInstance();return f.parent=c,c.controls.push(f),f.controls=[],h.initialize(f,a.attributes),f.attributes=h,g.initialize(f,e.resources),f.resources=g,b._ResourcesFactory.addControlResources(f),u(e.innerTemplate)||(f.innerTemplate=e.innerTemplate.cloneNode(!0)),f.type=e.type,f.bindableTemplates=b._BindableTemplatesFactory.create(f,e.bindableTemplates),f.replaceWith=e.replaceWith,f}},b.createAttributeControls=function(a,c,d,e,f){var g,h=a.nodes,i=f===!0?e:a.element;if(k(i)){if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return f===!0?b._copyAttributeNodes(h):[];g=i.attributes}var j,l,m,o,p,q,r=a.attributes,v=[],w=h.length;for(q=0;w>q;++q)l=h[q],p=l.nodeName,m=l.injector,o=null,u(m)||(o=m.inject(),l.control=o,o.parent=c,o.element=i,j=b._AttributesFactory.getInstance(),j.initialize(o,r),o.attributes=j,o.type=p,n(o.uid)||(o.uid=M(Ub)),o.templateControl=d),f===!0&&(v.push({control:o,expressions:l.expressions,node:g?g.getNamedItem(p)||g.getNamedItem(Xc+p):null,nodeName:p,injector:m}),u(o)||(u(c)||c.controls.push(o),t(o.initialize)&&o.initialize()));if(!f)for(h.sort(function(a,b){var c=a.control,d=b.control;if(u(c))return 1;if(u(d))return-1;var e=s(c.priority)?c.priority:0,f=s(d.priority)?d.priority:0;return f-e}),q=0;w>q;++q)l=h[q],o=l.control,u(o)||(u(c)||c.controls.push(o),t(o.initialize)&&o.initialize());return v},b.getInstance=function(){var a=new b;return a._Promise=ma(Na),a._ContextManager=i._ContextManager,a._compiler=ma(cb),a._CommentManagerFactory=ma(db),a._ControlFactory=ma(Pa),a._TemplateControlFactory=i._TemplateControlFactory,a._BindableTemplatesFactory=b._BindableTemplatesFactory,a._log=b._log,a},b._collectAttributes=function(a){for(var c,d,e,f,g,h,j,k,l=[],m=i.hasMarkup,n=i.findMarkup,o=i._parser,p=(i.build,!1),q=a.length,r={},s=0;q>s;++s)c=a[s],e=c.value,d=c.name.replace(/^data-/i,"").toLowerCase(),k=rf[d]||sf[d],d===Uc?""!==e&&(f=o.parse(e),1!==f.identifiers.length&&b._log.warn("Incorrect "+Uc+": "+e+", must contain a single identifier."),g=f.identifiers[0]):d!==Rc&&(h=m(e),j=h?n(e):[],p||!h&&u(k)||(p=!0),l.push({control:null,node:c,nodeName:d,expressions:j,injector:k})),r[N(d)]=e;return{element:null,attributes:r,nodes:l,childContext:g,hasControl:p}},b._copyAttributeNodes=function(a){for(var b,c=[],d=a.length,e=0;d>e;++e)b=a[e],c.push({expressions:b.expressions,nodeName:b.nodeName});return c},b._cloneNode=function(a,b,c){return{control:c,injector:a.injector,expressions:a.expressions,node:b,nodeName:a.nodeName}},b._cloneNodeMap=function(a,c,d,e){var f=a.hasControl,g={attributes:a.attributes,childContext:a.childContext,nodes:[],element:c,uiControlNode:u(a.uiControlNode)?null:b._cloneNode(a.uiControlNode,c,e),hasControl:f};return f&&(g.nodes=b.createAttributeControls(a,d,e,c,!0)),g},b.prototype.clone=function(a,c,d){var e,f,g,h,i=this.replace,j=this.children,k=u(d)?null:d.uiControlNode.control,l=!u(k);if(l||(k=b.cloneUiControl(this.nodeMap,c.getUiControl()||c.getParentControl()),l=!u(k)),i){var m=a.parentNode.childNodes,n=Array.prototype,o=n.indexOf.call(m,a);e=n.slice.call(m,o+1,o+this.replaceNodeLength),f=b.clone(this,c,null,k,d),k.elementNodes=e,k.startNode=a,k.endNode=e.pop(),g=j.shift(),h=j.shift(),g.clone(k.startNode,f),h.clone(k.endNode,f),t(k.initialize)&&k.initialize()}else e=Array.prototype.slice.call(a.childNodes),f=b.clone(this,c,a,k,d),d=f.nodeMap,l&&(k.element=a,t(k.initialize)&&k.initialize());for(var p=j.length,q=0,r=0;p>r;++r)q+=j[r].clone(e[q],f);return i?(j.unshift(h),j.unshift(g),q+2):1},b.prototype.initialize=function(c,d,e){a.prototype.initialize.call(this,c,d);var f,g=c.uiControlNode,h=!u(g);h&&(this._populateUiControl(),f=g.control,this.hasOwnContext=f.hasOwnContext),c.hasControl&&b.createAttributeControls(c,this.getParentControl(),f),!e&&h&&t(f.initialize)&&f.initialize()},b.prototype.bind=function(){var a=this,b=this.nodeMap,c=this.getParentControl(),d=b.uiControlNode,e=[];if(!u(d)){var f,g=d.control,i=b.childContext,j=this._ContextManager.getManager,k=u(c)?Ha:c.absoluteContextPath,l=this._TemplateControlFactory,m=!g.hasOwnContext;if(e.push(g),m&&!u(i))if("@"===i[0]){var n=i.split("."),o=n.shift(),p=o.slice(1),q=l.findResource(g,p);if(h(q)){var r=q.resource;i=n.length>0?"."+n.join("."):"",p===We?k+=i:p===Ue?k=Ha+i:r.type===Oe||r.type===Se?(k="resources."+p+".value"+i,g.root=q.control):this._log.warn('Only resources of type "observable" can be set as context.')}else this._log.warn("Could not set the context of "+g.type+' with the resource specified as "'+i+'".')}else k+="."+i;h(g.root)||(g.root=this._ControlFactory.getRootControl(g)||g),f=j(g.root);var s=!1;m?(g.context=f.getContext(k.split("."),!1),s=v(g.context)&&!this._BindableTemplatesFactory.isBoundControl(g)):k=Ha,s?this.contextPromise=new this._Promise(function(b,c){var d=f.observe(k,{uid:g.uid,listener:function(c,e){v(c)||(d(),g.context=c,a._beforeLoad(g,k),b())}})}):this._beforeLoad(g,k)}return this._observeControlIdentifiers(b.nodes,c,e,b.element),e},b.prototype.setUiControlTemplate=function(a){var b=this,c=this.nodeMap.uiControlNode;if(!u(c)){var d=c.control;return void(this.templatePromise=this._TemplateControlFactory.determineTemplate(d,a).then(function(a){b.templatePromise=null,b._initializeControl(d,a.cloneNode(!0))},function(a){if(b.templatePromise=null,u(a)){var c=a;b._BindableTemplatesFactory.isBoundControl(d)&&(c=U(d.element.childNodes)),b._initializeControl(d,c)}else I(function(){n(a)&&(a=new Error(a)),b._log.error(a)})}))}u(this.parent)&&this.bindAndLoad()},b.prototype.getUiControl=function(){var a=this.nodeMap.uiControlNode;if(!u(a))return a.control},b.prototype.fulfillTemplate=function(){var a=this;return u(this.templatePromise)?this._fulfillChildTemplates():this.templatePromise.then(function(){return a._fulfillChildTemplates()})},b.prototype.fulfillAndLoad=function(){var a=this;return this.fulfillTemplate().then(function(){return a.bindAndLoad()}).catch(function(b){I(function(){n(b)&&(b=new Error(b)),a._log.error(b)})})},b.prototype.bindAndLoad=function(){var a,b=this,c=this.bind();return a=p(this.contextPromise)?this.contextPromise.then(function(){return b._bindChildren()}):this._bindChildren(),a.then(function(){return b._loadControls(c,b.getUiControl())}).catch(function(a){I(function(){n(a)&&(a=new Error(a)),b._log.error(a)})})},b.prototype.observeRootContext=function(a,b){var c=this;return b=b.bind(this),u(a.context)?new this._Promise(function(d){var e=c._ContextManager.getManager(a).observe(Ha,{listener:function(){e(),b().then(d)},uid:a.uid})}).catch(function(a){I(function(){n(a)&&(a=new Error(a)),c._log.error(a)})}):b()},b.prototype._beforeLoad=function(a,c){var d=this._ContextManager.getManager(a.root),e=this._TemplateControlFactory;a.zCC__plat=d.observe(c,{uid:a.uid,priority:pe,listener:function(b,c){a.context=b}}),e.setAbsoluteContextPath(a,c),e.setContextResources(a),b._ResourcesFactory.bindResources(a.resources)},b.prototype._bindChildren=function(){for(var a,b=this.children,c=b.length,d=[],e=0;c>e;++e)a=b[e],a.hasOwnContext?this.isClone?d.push(a.observeRootContext(a.getUiControl(),a.bindAndLoad)):d.push(a.observeRootContext(a.getUiControl(),a.fulfillAndLoad)):v(a.children)?a.bind():d.push(a.bindAndLoad());return this._Promise.all(d)},b.prototype._loadControls=function(a,b){var c,d,e,f,g=a.length,h=this._ControlFactory.load,i=u(b);if(i)f=0;else{var j=b.priority;e=s(j)?j:100,f=1}for(;g>f;++f)c=a[f],c.templateControl=b,!i&&e>c.priority&&(i=!0,d=h(b)),h(c);return i||(d=h(b)),d},b.prototype._populateUiControl=function(){var a=this.nodeMap,c=this.getParentControl(),d=a.uiControlNode,e=d.control,f=e.uid,g=e.resources,i=a.element,j=Array.prototype.slice.call(i.childNodes),k=b._AttributesFactory.getInstance(),l=this.replace=null===e.replaceWith||""===e.replaceWith;n(f)||(f=e.uid=M(Ub)),b._managerCache.put(f,this),u(c)||e.parent===c||(c.controls.push(e),e.parent=c),t(i.setAttribute)&&i.setAttribute(Id,""),e.element=i,e.controls=[],k.initialize(e,a.attributes),e.attributes=k,h(g)&&t(g.add)?g.add(d.resourceElement):(g=b._ResourcesFactory.getInstance(),g.initialize(e,d.resourceElement),e.resources=g),b._ResourcesFactory.addControlResources(e),e.type=d.nodeName,e.bindableTemplates=e.bindableTemplates||this._BindableTemplatesFactory.create(e),!(j.length>0)||q(e.templateString)&&q(e.templateUrl)||(e.innerTemplate=U(j)),l&&this._replaceElement(e,a)},b.prototype._replaceElement=function(a,c){var d=c.element,e=d.parentNode,f=b._document,g=a.type,h=a.uid,i=a.startNode=f.createComment(g+" "+h+Be),j=a.endNode=f.createComment(g+" "+h+Ce),k=this._CommentManagerFactory.create;k(i,this),k(j,this),e.insertBefore(i,d),e.insertBefore(j,d.nextSibling),a.elementNodes=_(d),a.element=c.element=null},b.prototype._initializeControl=function(a,c){var d,e=this.nodeMap.element,f=this.replace;if(!u(c)){var g=b.locateResources(c);u(g)||a.resources.add(b._ResourcesFactory.parseElement(g)),f?(d=a.endNode,a.elementNodes=Array.prototype.slice.call(c.childNodes),$(d.parentNode,c,d)):$(e,c,e.lastChild)}if(t(a.setTemplate)&&a.setTemplate(),f){this._compiler.compile(a.elementNodes,a);var h=a.startNode,i=h.parentNode,j=Array.prototype.slice.call(i.childNodes);d=a.endNode,a.elementNodes=j.slice(j.indexOf(h)+1,j.indexOf(d)),this.replaceNodeLength=a.elementNodes.length+2}else this._compiler.compile(e,a);u(a.parent)&&this.fulfillAndLoad()},b.prototype._observeControlIdentifiers=function(a,b,c,d){for(var e,f,g,h=a.length,j=!u(b),k=0,l=this.replace,m=[];h>k;++k)e=a[k],f=e.control,j&&e.expressions.length>0&&(g=o.getInstance(),m.push(g),g.initialize(d,e,b,c,l),i.observeExpressions(e.expressions,b,g.attributeChanged.bind(g))),u(f)||c.push(f);for(h=m.length,k=0;h>k;++k)m[k].attributeChanged()},b.prototype._fulfillChildTemplates=function(){for(var a,b=this,c=this.children,d=c.length,e=[],f=0;d>f;++f)a=c[f],v(a.children)||e.push(a.fulfillTemplate());return this._Promise.all(e).catch(function(a){I(function(){n(a)&&(a=new Error(a)),b._log.error(a)})})},b._inject={_Promise:Na,_ContextManager:ab,_compiler:cb,_CommentManagerFactory:db,_ControlFactory:Pa,_TemplateControlFactory:xb,_BindableTemplatesFactory:qb,_log:Xa},b}(i);a.ElementManager=j,a.IElementManagerFactory=d,Fa.injectable(fb,d,[Ra,lb,vb,ob,qb,Xa],ve),Fa.injectable(gb,j,null,ue);var l=function(a){function c(){a.apply(this,arguments),this.type="text"}return __extends(c,a),c.create=function(a,d){var e=a.nodeValue,f=new c;if(i.hasMarkup(e)){var g=i.findMarkup(e),h={nodes:[{node:a,expressions:g}]};return f.initialize(h,d),f}return f.initialize(null,d),f.bind=b,f},c._cloneNodeMap=function(a,b){var c=a.nodes[0],d={nodes:[{expressions:c.expressions,nodeName:c.nodeName,node:b}]};return d},c._clone=function(a,d,e){var f=a.nodeMap,g=new c;return u(f)?(g.initialize(null,e),g.bind=b):g.initialize(c._cloneNodeMap(f,d),e),g},c.prototype.clone=function(a,b){return c._clone(this,a,b),1},c.prototype.bind=function(){var a=this.getParentControl(),b=this.nodeMap.nodes[0],c=b.node,d=b.expressions;i.observeExpressions(b.expressions,a,this._setText.bind(this,c,a,d)),this._setText(c,a,d)},c.prototype._setText=function(a,b,c){a.nodeValue=i.build(c,b||{})},c}(i);a.TextManager=l,a.ITextManagerFactory=e,Fa.injectable(ib,e,null,ve),Fa.injectable(jb,l,null,ue);var m=function(a){function b(){a.apply(this,arguments),this.type="comment"}return __extends(b,a),b.create=function(a,c){var d=new b;return d.initialize({nodes:[{node:a}]},c),d},b.prototype.clone=function(a,c){return b.create(a,c),1},b}(i);a.CommentManager=m,a.ICommentManagerFactory=f,Fa.injectable(db,f,null,ve),Fa.injectable(eb,m,null,ue);var o=function(){function a(){this._lastValues={}}return a.getInstance=function(){var b=new a;return b._NodeManager=ma(hb),b._markupRegex=ma(Za).markupRegex,b},a.prototype.initialize=function(a,b,c,d,e){this.element=a,this.node=b,this.parent=c,this._controls=d,this.replace=e,"class"!==b.nodeName?this.attributeChanged=this._staticAttributeChanged:(this.attributeChanged=this._dynamicAttributeChanged,this._bindingExpressions=this._getBindingExpressions(b.expressions))},a.prototype._getBindingExpressions=function(a){return z(function(a){return a.identifiers.length>0||a.aliases.length>0||""===a.expression.trim()},a)},a.prototype._dynamicAttributeChanged=function(){var a,b,c,d=this.node,e=d.node,f=this._NodeManager.build(this._bindingExpressions,this.parent),g=f.split(/\s/),h=this._lastValues,i=this.element;for(this._NodeManager.hasMarkup(e.value)&&(e.value=e.value.replace(this._markupRegex,"")),b=g.length,c=0;b>c;++c)h[g[c]]=!0;for(g=Object.keys(h),b=g.length,c=0;b>c;++c)a=g[c],h[a]?(ga(i,a),h[a]=!1):(P(h,a),ha(i,a));f=e.value,this._notifyAttributes(d.nodeName,f)},a.prototype._staticAttributeChanged=function(){var a=this._controls,b=this.node,c=(a.length,N(b.nodeName)),d=this._NodeManager.build(b.expressions,this.parent);this._notifyAttributes(c,d),this.replace||(b.node.value=d)},a.prototype._notifyAttributes=function(a,b){for(var c,d,e=this._controls,f=e.length,g=0;f>g;++g)c=e[g].attributes,d=c[a],c[a]=b,c._attributeChanged(a,b,d)},a}();a.AttributeManager=o}(Qf=a.processing||(a.processing={}));var Rf;!function(a){function c(a){return a.history}function d(a){return r._regex=a,r}function e(){return C}function g(){return I}var i=function(){function a(){this.uid=M(Ub),this.isRoot=!1,this._removeUrlListener=b,this._ignoreOnce=!1,this._backNavigate=!1}return a.prototype.initialize=function(b){this._router=b,h(b)&&b.isRoot&&!h(a._root)&&(this.isRoot=!0,a._root=this,this._observeUrl())},a.prototype.navigate=function(a,b){var c=this;b=h(b)?b:{};var d;return this.finishNavigating().then(function(){if(d=b.isUrl?a:c._generate(a,b.parameters,b.query),!n(d)){var e=new Error("Cannot serialize url from input parameters, check your view reference.");c._log.error(e)}return c._navigate(d,b.replace)})},a.prototype.finishNavigating=function(){var c=a._root._router;return c.navigating?c.finishNavigating.catch(b):this._Promise.resolve()},a.prototype.goBack=function(b){var c=this;b=h(b)?b:{};var d=Number(b.length);if(s(d)||(d=1),!this.isRoot)return a._root.goBack(b);var e=this._browser;e.url();return this._backNavigate=!0,this.finishNavigating().then(function(){return c._goBack(d)})},a.prototype.dispose=function(){this._removeUrlListener(),P(this,"router")},a.prototype._navigate=function(b,c){var d=this;return this.isRoot?new this._Promise(function(a,e){d._resolveNavigate=a,d._rejectNavigate=e,d._browser.url(b,c)}):a._root._navigate(b,c)},a.prototype._goBack=function(a){var b=this;return new this._Promise(function(c,d){b._resolveNavigate=c,b._rejectNavigate=d,b._browser.back(a)})},a.prototype._observeUrl=function(){var a=this;if(h(this._router)){var b,c,d=(this._browserConfig,this._EventManager),e=ma(Zc),f=h(e)&&t(e.navigated),g=function(d){a._ignoreOnce=!0,a._previousUrl=b,a._browser.url(b,!c),a._history.go(-1),t(a._rejectNavigate)&&a._rejectNavigate(d),q(d)||a._log.warn(d)};this._previousUrl=this._browser.url(),d.dispose(this.uid),d.on(this.uid,Fd,function(){var b=d.dispatch(Hd,a,d.DIRECT);b.defaultPrevented||a.goBack()}),d.on(this.uid,Cd,function(h,i){return a._ignoreOnce?(a._ignoreOnce=!1,void(t(a._resolveNavigate)&&a._resolveNavigate())):(c=a._backNavigate,a._backNavigate=!1,b=a._previousUrl,h=d.dispatch(zd,a,d.DIRECT,[i]),h.defaultPrevented?void g(new Error("Navigation prevented during "+zd+" event")):void a.finishNavigating().then(function(){return d.dispatch(Bd,a,d.DIRECT,[i]),a._router.navigate(i.pathname,i.query)}).then(function(){a._previousUrl=i.pathname,t(a._resolveNavigate)&&a._resolveNavigate(),f&&e.navigated(i.href),d.dispatch(Ad,a,d.DIRECT,[i])},g))})}},a.prototype._generate=function(a,b,c){return u(this._router)?void 0:q(a)?a:this._router.generate(a,b,c)},a._inject={_Promise:Na,_Injector:Rb,_browserConfig:Bb,_browser:Ab,_EventManager:Ua,_window:Fb,_log:Xa,_history:Sb},a}();a.Navigator=i,Fa.injectable(_a,i,null,ue),a.History=c,Fa.injectable(Sb,c,[Fb]);var j,k=["/",".","*","+","?","|","(",")","[","]","{","}","\\"],l=new RegExp("(\\"+k.join("|\\")+")","g"),m={},o={},p={},r=function(){function a(){this.type=ke,this.name="",this.regex=""}return a.parse=function(b,c,d){if(!(n(b)&&w(c)&&h(d)))return[];"/"===b[0]&&(b=b.slice(1));for(var e,f,g,i=b.split("/"),k=i.length,l=a.__findSegment,q=[],r=a._regex,s=0;k>s;++s)e=i[s],""===e?(h(j)||(j=ma(Jb)),q.push(j)):(g=e.match(r.dynamicSegmentsRegex))?(f=g[1],q.push(l(f,Mb,m)),c.push(f),d.dynamics++):(g=e.match(r.splatSegmentRegex))?(f=g[1],q.push(l(f,Nb,o)),c.push(f),d.splats++):(q.push(l(e,Kb,p)),d.statics++);return q},a.__findSegment=function(a,b,c){var d=c[a];return h(d)||(d=c[a]=ma(b),d.initialize(a)),d},a.prototype.initialize=function(a){this.name=a},a.prototype.reduceCharacters=function(a,b){return h(this._specification)&&(b=a(b,this._specification)),b},a.prototype.generate=function(a){return this.name},a}();a.BaseSegment=r,a.IBaseSegmentFactory=d,plat.register.injectable(Ib,d,[Za],ve),plat.register.injectable(Jb,r,null,ue);var x=function(a){function b(){a.apply(this,arguments),this.type=me}return __extends(b,a),b.prototype.initialize=function(b){a.prototype.initialize.call(this,b),this.regex=this.name.replace(l,"\\$1")},b.prototype.reduceCharacters=function(a,b){for(var c=this.name,d=c.length,e=b,f=0;d>f;++f)e=a(e,{validCharacters:c[f]});return e},b}(r);a.StaticSegment=x,plat.register.injectable(Kb,x,null,ue);var y=function(a){function b(){a.apply(this,arguments),this.type=le}return __extends(b,a),b.prototype.generate=function(a){return h(a)?a[this.name]:void 0},b}(r);a.VariableSegment=y,plat.register.injectable(Lb,y,null,ue);var z=function(a){function b(){a.apply(this,arguments),this.type=ne,this.regex="(.+)",this._specification={invalidCharacters:"",repeat:!0}}return __extends(b,a),b}(y);a.SplatSegment=z,plat.register.injectable(Nb,z,null,ue);var A=function(a){function b(){a.apply(this,arguments),this.type=oe,this.regex="([^/]+)",this._specification={invalidCharacters:"/",repeat:!0}}return __extends(b,a),b}(y);a.DynamicSegment=A,plat.register.injectable(Mb,A,null,ue);var C=function(){function a(){this.initialize()}return a.compile=function(a,b){return a.reduceCharacters(function(a,b){return a.add(b)},b)},a.link=function(a,b){for(var c,d,e,f,g,h=a.delegates,i=a.regex,j=h.length,k=b.match(i),l=1,m=[],n=0;j>n;++n){for(g=h[n],c=g.names,d={},e=0,f=c.length;f>e;++e)d[c[e]]=k[l++];m.push({delegate:g.delegate,parameters:d,isDynamic:f>0})}return m},a.recognize=function(a,b){for(var c,d=[],e=b.length,f=0;e>f;++f)c=b[f],d=d.concat(c.match(a));return d},a.sort=function(a){if(!w(a))return a;var b,c,d,e,f,g,h,i;return a.sort(function(a,j){if(b=a.types,f=j.types,c=b.splats,g=f.splats,c!==g)return c-g;if(d=b.statics,e=b.dynamics,h=f.statics,i=f.dynamics,c>0){if(d!==h)return h-d;if(e!==i)return i-e}return e!==i?e-i:d!==h?h=d:0})},a.prototype.initialize=function(a){this.specification=a,this.nextStates=[]},a.prototype.add=function(b){var c=this._find(b);return h(c)?c:(c=ma(a),c.initialize(b),this.nextStates.push(c),b.repeat&&c.nextStates.push(c),c)},a.prototype.match=function(a){var b,c,d=[];return this._someChildren(function(e){return b=e.specification,c=b.validCharacters,n(c)&&c.indexOf(a)>-1?void d.push(e):(c=b.invalidCharacters,void(n(c)&&-1===c.indexOf(a)&&d.push(e)))}),d},a.prototype._find=function(a){var b,c,d=a.validCharacters,e=a.invalidCharacters;return this._someChildren(function(a){return b=a.specification,b.validCharacters===d&&b.invalidCharacters===e?(c=a,!0):void 0}),c},a.prototype._someChildren=function(a){for(var b=this.nextStates,c=b.length,d=0;c>d;++d)if(a(b[d])===!0)return!0;return!1},a}();a.State=C,a.IStateStatic=e,plat.register.injectable(Ob,e,null,se),plat.register.injectable(Pb,C,null,ue);var E=function(){function a(){this._namedRoutes={}}return a.prototype.register=function(a,b){if(w(a)){for(var c,d=this._rootState,e=a.length,f=["^"],g={statics:0,dynamics:0,splats:0},i=[],j=[],k=0;e>k;++k)c=this._parse(a[k],i,g),j=j.concat(c),d=this._compile(c,d,f);d=this._finalize(d,f),d.delegates=i,d.regex=new RegExp(f.join("")+"$"),d.types=g,h(b)&&n(b.name)&&(this._namedRoutes[this._toLowerCase(b.name)]={segments:j,delegates:i})}},a.prototype.recognize=function(a){var b=!1,c=[];return a=this._addLeadingSlash(a),b=this._hasTrailingSlash(a),b&&(a=a.substr(0,a.length-1)),c=this._filter(this._findStates(a)),this._link(c[0],a,b)},a.prototype.generate=function(a,b){a=this._toLowerCase(a);var c,d,e=this._namedRoutes[a],f="";if(h(e)){c=e.segments,d=c.length;for(var g=0;d>g;g++){var i=c[g];i.type!==ke&&(f+="/",f+=i.generate(b))}return f=this._addLeadingSlash(f)}},a.prototype.delegatesFor=function(a){a=this._toLowerCase(a);var b,c=this._namedRoutes[a];return h(c)?(b=c.delegates,w(b)?b.slice(0):[]):[]},a.prototype.exists=function(a){return h(this._namedRoutes[this._toLowerCase(a)])},a.prototype._toLowerCase=function(a){return n(a)?a.toLowerCase():a},a.prototype._finalize=function(a,b){return a===this._rootState&&(a=a.add({validCharacters:"/"}),b.push("/")),a},a.prototype._parse=function(a,b,c){var d=[];return b.push({delegate:a.delegate,names:d}),this._BaseSegmentFactory.parse(a.pattern,d,c)},a.prototype._compile=function(a,b,c){for(var d,e=a.length,f=this._State.compile,g=0;e>g;++g)d=a[g],d.type!==ke&&(b=b.add({validCharacters:"/"}),b=f(d,b),c.push("/"+d.regex));return b},a.prototype._addLeadingSlash=function(a){return a=decodeURI(a),"/"!==a[0]&&(a="/"+a),a},a.prototype._hasTrailingSlash=function(a){var b=a.length;return b>1&&"/"===a[b-1]},a.prototype._findStates=function(a){for(var b=[this._rootState],c=this._State.recognize,d=a.length,e=0;d>e&&(b=c(a[e],b),0!==b.length);++e);return b},a.prototype._filter=function(a){for(var b,c=a.length,d=[],e=0;c>e;++e)b=a[e],w(b.delegates)&&d.push(b);return this._State.sort(d)},a.prototype._link=function(a,b,c){return h(a)&&w(a.delegates)?(c&&this._isDynamic(a)&&(b+="/"),this._State.link(a,b)):void 0},a.prototype._isDynamic=function(a){return"(.+)$"===a.regex.source.slice(-5)},a._inject={_BaseSegmentFactory:Ib,_State:Ob,_rootState:Pb},a}();a.RouteRecognizer=E,plat.register.injectable(Qb,E,null,ue);var G="/*childRoute",H=G.length,I=function(){function a(){this.navigating=!1,this.children=[],this.isRoot=!1,this._paramTransforms={},this._queryTransforms={},this._interceptors={},this._ports=[],this._resolve=this._Promise.resolve.bind(this._Promise),this._reject=this._Promise.reject.bind(this._Promise),this.uid=M(Ub),this.isRoot=u(a.currentRouter()),a.currentRouter(this),this.initialize()}return a.currentRouter=function(b){return u(b)||(a.__currentRouter=b),a.__currentRouter},a.prototype.initialize=function(a){this.parent=a},a.prototype.addChild=function(a){return u(a)||this.children.indexOf(a)>-1?a:(a.initialize(this),this.children.push(a),a)},a.prototype.removeChild=function(a){var b=this.children,c=this.children.indexOf(a);0>c||b.splice(c,1)},a.prototype.register=function(a){var c=this,d=this._ports;return u(a)||d.indexOf(a)>-1?this._resolve():(d.push(a),h(this.currentRouteInfo)?(this.navigating=!0,this._resolve(this.finishNavigating).catch(b).then(function(){var a=f(c.currentRouteInfo,!0);return c.finishNavigating=c._canNavigateTo(a).then(function(b){return b?(c.currentRouteInfo=void 0,c._performNavigation(a)):void 0}).then(function(){c.navigating=!1,c.currentRouteInfo=a},function(){c.navigating=!1})})):this._resolve())},a.prototype.unregister=function(a){var b=this._ports,c=b.indexOf(a);0>c||(b.splice(c,1),0!==b.length||u(this.parent)||this.parent.removeChild(this))},a.prototype.configure=function(a){var b=this;return w(a)?B(function(a){b._configureRoute(a)},a):this._configureRoute(a),this._forceNavigate()},a.prototype.unknown=function(a){return this._unknownHandler=a,this},a.prototype.param=function(a,b,c){return this._addHandler(a,b,c,this._paramTransforms)},a.prototype.queryParam=function(a,b,c){return this._addHandler(a,b,c,this._queryTransforms)},a.prototype.intercept=function(a,b){v(b)&&(b="*");var c=b;"*"!==b&&(b=this._Injector.convertDependency(b)),b===Ie&&(b=c);var d=this._interceptors[b];return w(d)||(d=this._interceptors[b]=[]),d.push(a),this},a.prototype.navigate=function(a,b,c){var d=this;h(b)||(b={});var e=this._resolve,g=(this._reject,S(b));if("/"===a&&(a=""),c=c===!0,!n(a)||this.navigating||!c&&a===this._previousUrl&&g===this._previousQuery)return this.navigating?this.finishNavigating.then(function(){return d.navigate(a,b,c)}):e();var i,j,k,l=this._recognizer.recognize(a);if(q(l)){if(l=this._childRecognizer.recognize(a),q(l)){if(this._previousUrl=a,this._previousQuery=g,t(this._unknownHandler)){var m={segment:a,view:void 0};return e(this._unknownHandler(m)).then(function(){var b=m.view;if(!v(b))return d.configure({pattern:a,view:b})})}return e()}if(i=l[0],i.query=b,j=i.delegate.pattern,j=j.substr(0,j.length-H),this._previousPattern===j)return this.navigating=!0,this.finishNavigating=this._navigateChildren(i).then(function(){d._previousUrl=a,d._previousQuery=g,d.navigating=!1},function(a){throw d.navigating=!1,a})}else i=l[0],i.query=b,j=i.delegate.pattern;k=this._recognizer.generate(i.delegate.view,i.parameters); +var o=this._previousSegment;this._previousSegment=k,this.navigating=!0;var p=this._nextRouteInfo=f(i,!0);return this.finishNavigating=this._canNavigate(i).then(function(b){if(!b)throw d.navigating=!1,new Error("Not cleared to navigate");return d._previousUrl=a,d._previousQuery=g,d._performNavigation(i)}).then(function(){d._previousPattern=j,d._previousSegment=k,d.currentRouteInfo=p,d.navigating=!1},function(a){throw d._previousSegment=o,d.navigating=!1,a})},a.prototype.generate=function(a,b,c){var d=a;a=this._Injector.convertDependency(a),a===Ie&&(a=d);for(var e=this,f="";!u(e)&&!e._recognizer.exists(a);)e=e.parent;if(u(e))throw new Error("Route for "+a+" does not exist.");for(var g,h=e._recognizer.generate(a,b);!u(e=e.parent);)g=e._previousSegment,g=u(g)||"/"===g?"":g,f=g+f;return f+h+S(c)},a.prototype._configureRoute=function(a){var b=(this._resolve,this._Injector.convertDependency(a.view)),c=a.alias||b;if(b!==Ie){a.view=b,a.alias=c||b;var d={pattern:a.pattern,delegate:a},e=a.pattern+G,f={pattern:e,delegate:{pattern:e,view:b,alias:c}};this._recognizer.register([d],{name:c}),this._childRecognizer.register([f])}},a.prototype._addHandler=function(a,b,c,d){v(c)&&(c="*");var e=c;if("*"!==c&&(c=this._Injector.convertDependency(c)),c===Ie&&(c=e),q(c)||q(b))return this;var f=d[c];h(f)||(f=d[c]={});var g=f[b];return w(g)||(g=f[b]=[]),g.push(a),this},a.prototype._forceNavigate=function(){var a,b=this,c=this._resolve;if(this.navigating)return this.finishNavigating.then(function(){return b._forceNavigate()});if(this.isRoot&&q(this._previousUrl)){var d=this._browser.urlUtils();this._previousUrl=d.pathname,a=d.query}return q(this._previousQuery)||(a=R(this._previousQuery)),q(this._previousUrl)?c():this.navigate(this._previousUrl,a,!0)},a.prototype._navigateChildren=function(a){var c=this._getChildRoute(a);return u(c)?this._resolve():D(function(b){return b.navigate(c,a.query)},this.children).then(b)},a.prototype._getChildRoute=function(a){if(!u(a)){var b=a.parameters.childRoute;return n(b)||(b=""),"/"+b}},a.prototype._performNavigation=function(a){var b=this,c=this._isSameRoute(this._nextRouteInfo);return this._performNavigateFrom(c).then(function(){return c?void 0:D(function(b){return b.navigateTo(a)},b._ports)}).then(function(){return b._navigateChildren(a)})},a.prototype._performNavigateFrom=function(a){var c=this;return D(function(a){return a._performNavigateFrom()},this.children).then(function(){return a?void 0:D(function(a){return a.navigateFrom()},c._ports)}).then(b)},a.prototype._canNavigate=function(a){var b=this,c=(this.currentRouteInfo,this._isSameRoute(this._nextRouteInfo));return this._canNavigateFrom(c).then(function(d){return d&&b._canNavigateTo(a,c)})},a.prototype._canNavigateFrom=function(a){var b=this;return this._Promise.all(this.children.reduce(function(a,b){return a.concat(b._canNavigateFrom())},[])).then(T).then(function(c){return!c||a?[c]:D(function(a){return a.canNavigateFrom()},b._ports)}).then(T)},a.prototype._canNavigateTo=function(a,b){var c=this;return q(this._ports)?this._resolve(!0):this._callAllHandlers(a.delegate.alias,a.parameters,a.query).then(function(){return c._callInterceptors(a)}).then(function(d){return d===!1||b?[d]:D(function(b){return b.canNavigateTo(a)},c._ports)}).then(T)},a.prototype._callAllHandlers=function(a,c,d){var e=this,f=this._Promise;f.resolve.bind(f);return this._callHandlers(this._queryTransforms["*"],d).then(function(){return e._callHandlers(e._queryTransforms[a],d)}).then(function(){return e._callHandlers(e._paramTransforms["*"],c,d)}).then(function(){return e._callHandlers(e._paramTransforms[a],c,d)}).then(b)},a.prototype._callHandlers=function(a,c,d){var e=this._resolve;return h(c)||(c={}),D(function(a,b){return F(function(a){return e(a(c[b],c,d))},a)},a).then(b)},a.prototype._callInterceptors=function(a){var b=this,c=this._resolve;return F(function(b){return c(b(a))},this._interceptors["*"]).then(T).then(function(d){return d?D(function(b){return c(b(a))},b._interceptors[a.delegate.alias]):[d]}).then(T)},a.prototype._isSameRoute=function(a){var b=this.currentRouteInfo;if(!h(b)||!h(a))return!1;var c=b.delegate,d=a.delegate,e=S(b.parameters),f=S(a.parameters),g=S(b.query),i=S(a.query);return c.view===d.view&&c.alias===d.alias&&c.pattern===d.pattern&&e===f&&g===i},a.prototype._clearInfo=function(){this._previousSegment=void 0,this._previousPattern=void 0,this._previousUrl=void 0,this._previousQuery=void 0,this.currentRouteInfo=void 0,this.navigating=!1,B(function(a){a._clearInfo()},this.children)},a._inject={_Promise:Na,_Injector:Rb,_EventManager:Ua,_browser:Ab,_browserConfig:Bb,_recognizer:Qb,_childRecognizer:Qb},a}();a.Router=I,plat.register.injectable(Cb,I,null,ue),a.IRouterStatic=g,plat.register.injectable(Db,g)}(Rf=a.routing||(a.routing={}));var Sf;!function(a){var c=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.prototype.initialize=function(){var a=N(this.type),b=this.attributes[a];q(b)||this._isPrecompiled()||(this._label=b,this._define(b))},b.prototype.dispose=function(){for(var a=this._label,b=this.parent;!v(a)&&h(b);)h(b[a])&&k(b[a].element)&&b[a].element===this.element&&P(b,a),b=b.parent},b.prototype._define=function(a){var b=this.templateControl;u(b)||(b.name=a);for(var c=this.parent,d={element:this.element,control:b};h(c);){var e=c[a];h(e)||(c[a]=d),c=c.parent}},b.prototype._isPrecompiled=function(){for(var a=this.parent;!u(a);){if(-1!==a.type.indexOf(ye))return!0;a=a.parent}return!1},b}(Of);a.Name=c,Fa.control(ac,c);var d=function(a){function c(){a.apply(this,arguments),this._expression=[],this._aliases=[]}return __extends(c,a),c.prototype.loaded=function(){u(this.element)||(this.attribute=N(this.type),this._setListener())},c.prototype._setListener=function(){var a=this.attributes[this.attribute];q(this.event)||q(a)||(this._parseArgs(a),this._addEventListeners())},c.prototype._addEventListeners=function(){this.addEventListener(this.element,this.event,this._onEvent,!1)},c.prototype._buildExpression=function(){var a,c,d,e,f,g=this._expression.slice(0),h=this._parser,i=this.parent,j=(!u(i),g.shift());if(u(i)||(e=i.getResources(this._aliases),f=i.context),"@"!==j[0]){if(a=this.findProperty(j),u(a))return this._log.warn("Could not find property "+j+" on any parent control."),{fn:b,context:{},args:[]};var k=a.expresssion,l=k.identifiers;if(l.length>1)return this._log.warn("Cannot have more than one identifier in a "+this.type+"'s expression."),{fn:b,context:{},args:[]};var m=l[0],n=m.split(".");n.pop(),c=0===n.length?a.control:h.parse(n.join(".")).evaluate(a.control),d=a.value}else d=u(e)?b:e[j]||b,c=void 0;for(var o=g.length,p=[],q=0;o>q;++q)p.push(h.parse(g[q]).evaluate(f,e));return{fn:d,context:c,args:p}},c.prototype._onEvent=function(a){var b=this._buildExpression(),c=b.fn;return t(c)?void c.apply(b.context,b.args.concat(a)):void this._log.warn("Cannot find registered event method "+this._expression[0]+" for control: "+this.type)},c.prototype._findAliases=function(a){for(var b,c=a.length,d={},e=[],f=[],g=this._parser;c-->0;)b=a[c].trim(),f=f.concat(g.parse(b).aliases);for(;f.length>0;)b=f.pop(),d[b]||(e.push(b),d[b]=!0);return e},c.prototype._parseArgs=function(a){if(!q(a)){var b=this._regex.argumentRegex.exec(a);u(b)?this._expression.push(a):this._expression=[a.slice(0,b.index)].concat(""!==b[1]?b[1].split(","):[]),this._aliases=this._findAliases(this._expression)}},c._inject={_parser:Ya,_regex:Za},c}(Of);a.SimpleEventControl=d;var e=function(a){function b(){a.apply(this,arguments),this.event=Sd}return __extends(b,a),b}(d);a.Tap=e;var f=function(a){function b(){a.apply(this,arguments),this.event="blur"}return __extends(b,a),b}(d);a.Blur=f;var g=function(a){function b(){a.apply(this,arguments),this.event="change"}return __extends(b,a),b}(d);a.Change=g;var i=function(a){function b(){a.apply(this,arguments),this.event="copy"}return __extends(b,a),b}(d);a.Copy=i;var j=function(a){function b(){a.apply(this,arguments),this.event="cut"}return __extends(b,a),b}(d);a.Cut=j;var l=function(a){function b(){a.apply(this,arguments),this.event="paste"}return __extends(b,a),b}(d);a.Paste=l;var m=function(a){function b(){a.apply(this,arguments),this.event=Td}return __extends(b,a),b}(d);a.DblTap=m;var o=function(a){function b(){a.apply(this,arguments),this.event="focus"}return __extends(b,a),b}(d);a.Focus=o;var p=function(a){function b(){a.apply(this,arguments),this.event=Ud}return __extends(b,a),b}(d);a.TouchStart=p;var x=function(a){function b(){a.apply(this,arguments),this.event=Vd}return __extends(b,a),b}(d);a.TouchEnd=x;var y=function(a){function b(){a.apply(this,arguments),this.event=Wd}return __extends(b,a),b}(d);a.TouchMove=y;var z=function(a){function b(){a.apply(this,arguments),this.event=Xd}return __extends(b,a),b}(d);a.TouchCancel=z;var A=function(a){function b(){a.apply(this,arguments),this.event=Yd}return __extends(b,a),b}(d);a.Hold=A;var B=function(a){function b(){a.apply(this,arguments),this.event=Zd}return __extends(b,a),b}(d);a.Release=B;var C=function(a){function b(){a.apply(this,arguments),this.event=$d}return __extends(b,a),b}(d);a.Swipe=C;var D=function(a){function b(){a.apply(this,arguments),this.event=_d}return __extends(b,a),b}(d);a.SwipeLeft=D;var E=function(a){function b(){a.apply(this,arguments),this.event=ae}return __extends(b,a),b}(d);a.SwipeRight=E;var F=function(a){function b(){a.apply(this,arguments),this.event=be}return __extends(b,a),b}(d);a.SwipeUp=F;var G=function(a){function b(){a.apply(this,arguments),this.event=ce}return __extends(b,a),b}(d);a.SwipeDown=G;var H=function(a){function b(){a.apply(this,arguments),this.event=de}return __extends(b,a),b}(d);a.Track=H;var J=function(a){function b(){a.apply(this,arguments),this.event=ee}return __extends(b,a),b}(d);a.TrackLeft=J;var K=function(a){function b(){a.apply(this,arguments),this.event=fe}return __extends(b,a),b}(d);a.TrackRight=K;var M=function(a){function b(){a.apply(this,arguments),this.event=ge}return __extends(b,a),b}(d);a.TrackUp=M;var O=function(a){function b(){a.apply(this,arguments),this.event=he}return __extends(b,a),b}(d);a.TrackDown=O;var Q=function(a){function b(){a.apply(this,arguments),this.event=ie}return __extends(b,a),b}(d);a.TrackEnd=Q;var R=function(a){function b(){a.apply(this,arguments),this.event="submit"}return __extends(b,a),b.prototype._onEvent=function(b){this.element.hasAttribute("action")||b.preventDefault(),a.prototype._onEvent.call(this,b)},b}(d);a.Submit=R;var S=function(b){function c(){b.apply(this,arguments),this.event="input"}return __extends(c,b),c.prototype._addEventListeners=function(){var b,c=this,d=this.element,e=this._compat,f=!1,g="input",h=function(a){f||c._onEvent(a)},i=function(a){t(b)||(b=I(function(){h(a),b=null}))};v(e.ANDROID)&&(this.addEventListener(d,"compositionstart",function(){f=!0},!1),this.addEventListener(d,"compositionend",function(a){f=!1,h(a)},!1)),this.addEventListener(d,g,h,!1),this.addEventListener(d,"change",h,!1),e.hasEvent(g)||(this.addEventListener(d,"keydown",function(b){var c=b.keyCode,d=a.KeyCodes;c===d.lwk||c===d.rwk||c>=d.shift&&c<=d.escape||c>d.space&&c<=d.down||i(b)},!1),this.addEventListener(d,"cut",i,!1),this.addEventListener(d,"paste",i,!1))},c._inject={_compat:Oa},c}(d);a.React=S,Fa.control(ic,e),Fa.control(jc,f),Fa.control(kc,g),Fa.control(lc,i),Fa.control(mc,j),Fa.control(nc,l),Fa.control(oc,m),Fa.control(pc,o),Fa.control(qc,R),Fa.control(rc,p),Fa.control(sc,x),Fa.control(tc,y),Fa.control(uc,z),Fa.control(vc,A),Fa.control(wc,B),Fa.control(xc,C),Fa.control(yc,D),Fa.control(zc,E),Fa.control(Ac,F),Fa.control(Bc,G),Fa.control(Cc,H),Fa.control(Dc,J),Fa.control(Ec,K),Fa.control(Fc,M),Fa.control(Gc,O),Fa.control(Hc,Q),Fa.control(Ic,S),a.KeyCodes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pause:19,break:19,"caps lock":20,escape:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,"left arrow":37,up:38,"up arrow":38,right:39,"right arrow":39,down:40,"down arrow":40,insert:45,delete:46,0:48,zero:48,")":48,"right parenthesis":48,1:49,one:49,"!":49,exclamation:49,"exclamation point":49,2:50,two:50,"@":50,at:50,3:51,three:51,"#":51,"number sign":51,hash:51,pound:51,4:52,four:52,$:52,dollar:52,"dollar sign":52,5:53,five:53,"%":53,percent:53,"percent sign":53,6:54,six:54,"^":54,caret:54,7:55,seven:55,"&":55,ampersand:55,8:56,eight:56,"*":56,asterisk:56,9:57,nine:57,"(":57,"left parenthesis":57,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,lwk:91,"left window key":91,rwk:92,"right window key":92,select:93,"select key":93,"numpad 0":96,"numpad 1":97,"numpad 2":98,"numpad 3":99,"numpad 4":100,"numpad 5":101,"numpad 6":102,"numpad 7":103,"numpad 8":104,"numpad 9":105,multiply:106,add:107,subtract:109,"decimal point":110,divide:111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,"num lock":144,"scroll lock":145,";":186,"semi-colon":186,":":186,colon:186,"=":187,equal:187,"equal sign":187,"+":187,plus:187,",":188,comma:188,"<":188,lt:188,"less than":188,"left angle bracket":188,"-":189,dash:189,_:189,underscore:189,".":190,period:190,">":190,gt:190,"greater than":190,"right angle bracket":190,"/":191,"forward slash":191,"?":191,"question mark":191,"`":192,"grave accent":192,"~":192,tilde:192,"[":219,"open bracket":219,"{":219,"open brace":219,"\\":220,"back slash":220,"|":220,pipe:220,"]":221,"close bracket":221,"}":221,"close brace":221,"'":222,"single quote":222,'"':222,"double quote":222};var T=function(b){function c(){b.apply(this,arguments),this.keyCodes={}}return __extends(c,b),c.prototype._setListener=function(){var a=this.attribute;if(!q(this.event)&&!q(a)){var c=this.attributes[a].trim();if("{"===c[0]){var d=this.evaluateExpression(c)||{method:""},e=this._filterArgs(d);return this._setKeyCodes(e),void this.addEventListener(this.element,this.event,this._onEvent,!1)}b.prototype._setListener.call(this)}},c.prototype._filterArgs=function(a){var b=a.key,c=a.keys;return this._parseArgs(a.method),w(c)?c:n(c)?[c]:w(b)?b:n(b)?[b]:void(u(a.char)&&u(a.chars)||this._log.warn(this.type+" should be using the property key or keys to denote key codes or keys and not char codes or characters."))},c.prototype._onEvent=function(a){this._compareKeys(a)&&b.prototype._onEvent.call(this,a)},c.prototype._compareKeys=function(a){var b=this.keyCodes,c=a.keyCode||a.which;return q(b)||b[c]===!0},c.prototype._setKeyCodes=function(b){w(b)||(b=[]);for(var c,d,e=b.length,f=this.keyCodes,g=0;e>g;++g)c=b[g],d=s(c)?c:a.KeyCodes[c.toLowerCase()],f[d]=!0},c}(d);a.KeyCodeEventControl=T;var U=function(a){function b(){a.apply(this,arguments),this.event="keydown"}return __extends(b,a),b}(T);a.KeyDown=U;var V=function(a){function b(){a.apply(this,arguments),this.event="keydown"}return __extends(b,a),b.prototype._onEvent=function(b){var c=this,d=b.keyCode||b.which;if(a.prototype._compareKeys.call(this,b)&&(d>=48&&90>=d||d>=186||d>=96&&111>=d))var e=this.addEventListener(this.element,"keypress",function(b){e(),a.prototype._onEvent.call(c,b)},!1)},b.prototype._compareKeys=function(a){return!0},b}(T);a.KeyPress=V;var W=function(a){function b(){a.apply(this,arguments),this.event="keyup"}return __extends(b,a),b}(T);a.KeyUp=W;var X=function(a){function b(){a.apply(this,arguments),this.event="keypress"}return __extends(b,a),b.prototype._filterArgs=function(a){var b=a.char,c=a.chars;return this._parseArgs(a.method),w(c)?c:n(c)?[c]:w(b)?b:n(b)?[b]:void(u(a.key)&&u(a.keys)||this._log.warn(this.type+" should be using the property key or keys to denote key codes or keys and not char codes or characters."))},b.prototype._onEvent=function(b){var c,d=this.keyCodes,e=b.charCode||b.which;if(e)c=String.fromCharCode(e);else if(c=b.key,!c)return;(q(d)||d[c]===!0)&&a.prototype._onEvent.call(this,b)},b.prototype._compareKeys=function(a){return!0},b.prototype._setKeyCodes=function(a){w(a)||(a=[]);for(var b,c,d=a.length,e=this.keyCodes,f=0;d>f;++f)b=a[f],c=s(b)?String.fromCharCode(b):b,e[c]=!0},b}(T);a.CharPress=X,Fa.control(Yb,U),Fa.control(Zb,V),Fa.control($b,W),Fa.control(_b,X);var Y=function(a){function b(){a.apply(this,arguments),this.property=""}return __extends(b,a),b.prototype.loaded=function(){u(this.element)||(this.attribute=N(this.type),this.setter(),this.__removeListener=this.attributes.observe(this.setter,this.attribute))},b.prototype.contextChanged=function(){u(this.element)||this.setter()},b.prototype.dispose=function(){t(this.__removeListener)&&(this.__removeListener(),this.__removeListener=null)},b.prototype.setter=function(){var a=this;L(function(){var b=a.element,c=a.property;if(k(b))switch(a.attributes[a.attribute]){case"false":case"0":case"null":case"":b.setAttribute(c,""),b[c]=!1,b.removeAttribute(c);break;default:b.setAttribute(c,c),b[c]=!0}})},b}(Of);a.SetAttributeControl=Y;var Z=function(a){function b(){a.apply(this,arguments),this.property="checked"}return __extends(b,a),b}(Y);a.Checked=Z;var $=function(a){function b(){a.apply(this,arguments),this.property="disabled"}return __extends(b,a),b}(Y);a.Disabled=$;var _=function(a){function b(){a.apply(this,arguments),this.property="selected"}return __extends(b,a),b}(Y);a.Selected=_;var aa=function(a){function b(){a.apply(this,arguments),this.property="readonly"}return __extends(b,a),b}(Y);a.ReadOnly=aa;var ba=function(a){function c(){a.apply(this,arguments),this.property="display",this.value="none",this.importance="important",this._initialValue=""}return __extends(c,a),c.prototype.initialize=function(){var a=this.element.style||{getPropertyValue:b},c=a.getPropertyValue(this.property);this._setValue(this.value,this.importance),q(c)||"none"===c||(this._initialValue=c)},c.prototype.setter=function(){var a=this;L(function(){if(k(a.element))switch(a.attributes[a.attribute]){case"false":case"0":case"null":case"":a._setValue(a.value,a.importance);break;default:a._setValue(a._initialValue)}})},c.prototype._setValue=function(a,c){var d=this.property,e=this.element.style||{setProperty:b,removeProperty:b,getPropertyValue:b,getPropertyPriority:b},f=e.getPropertyValue(d),g=e.getPropertyPriority(d);if(a!==f||c!==g)return q(a)?void e.removeProperty(d):void e.setProperty(d,a,c)},c}(Y);a.Visible=ba;var ca=function(a){function b(){a.apply(this,arguments),this.property="style"}return __extends(b,a),b.prototype.setter=function(){var a=this,b=this.element,c=this.attributes[this.attribute];q(c)||u(b)||L(function(){b.setAttribute(a.property,c)})},b}(Y);a.Style=ca,Fa.control(cc,Z),Fa.control(dc,$),Fa.control(ec,_),Fa.control(fc,aa),Fa.control(gc,ba),Fa.control(hc,ca);var da=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b.prototype.setter=function(){var a=this.element,b=this.property,c=this.attributes[this.attribute];q(c)||u(a)||v(a[b])||(a[b]=c)},b}(Y);a.ElementPropertyControl=da;var ea=function(a){function b(){a.apply(this,arguments),this.property="href"}return __extends(b,a),b}(da);a.Href=ea;var fa=function(a){function b(){a.apply(this,arguments),this.property="src"}return __extends(b,a),b.prototype.setter=function(){var a=this.element,b=this.property,c=this.attributes[this.attribute];q(c)||u(a)||v(a[b])||(a[b]=this._browser.urlUtils(c))},b._inject={_browser:Ab},b}(da);a.Src=fa,Fa.control(Wb,ea),Fa.control(Xb,fa);var ga=function(c){function d(){c.apply(this,arguments),this.priority=100,this._supportsTwoWayBinding=!1,this.__fileSupported=ma(Oa).fileSupported,this.__fileNameRegex=ma(Za).fileNameRegex,this.__isSelf=!1}return __extends(d,c),d.prototype.initialize=function(){this._determineType()},d.prototype.loaded=function(){var a=this.parent;if(!u(a)&&!u(this.element)){var b=N(this.type),c=this._parser,d=this._expression=c.parse(this.attributes[b]),e=d.identifiers;if(1!==e.length)return this._log.warn("Only 1 identifier allowed in a "+this.type+" expression"),void(this._contextExpression=null);var f=e[0].split(".");if(this._property=f.pop(),d.aliases.length>0){var g,i=d.aliases[0],j=a.findResource(i);if(h(j)){if(g=j.resource.type,g!==Oe&&g!==Se)return}else j={resource:{}};i===We||i===Ue?this._contextExpression=c.parse(f.join(".")):(this._property="value",this._contextExpression={evaluate:function(){return j.resource},aliases:[],identifiers:[],expression:""})}else f.length>0?this._contextExpression=c.parse(f.join(".")):this._contextExpression={evaluate:function(){return a.context},aliases:[],identifiers:[],expression:""};this._supportsTwoWayBinding&&this.templateControl.observeProperties(this),this._watchExpression(),u(this._addEventType)||this._addEventType()}},d.prototype.contextChanged=function(){this._watchExpression()},d.prototype.dispose=function(){this._addEventType=null},d.prototype.evaluate=function(){var a=this._expression;if(!v(a))return this.evaluateExpression(a)},d.prototype.observeProperty=function(a,b,c){var d,e=this;if(q(b))d=this._expression.expression;else if(s(b))d=this._expression.expression+"."+b;else{var f=this._parser,g=f.parse(b),i=g.identifiers;if(1!==i.length)return void this._log.warn("Only 1 identifier path allowed when observing changes to a bound property's child with a control implementing ISupportTwoWayBinding and working with "+this.type);var j=f.parse(this._expression.expression+"."+i[0]);d=j.identifiers[0];var k=d.split("."),l=(k.pop(),k.join(".")),m=this.evaluateExpression(l);if(!h(m)){if(!u(m))return void this._log.warn("A control implementing ISupportTwoWayBinding is trying to index into a primitive type when trying to evaluate "+this.type+'="'+this._expression.expression+'"');m=this._ContextManager.createContext(this.parent,l)}}a=a.bind(this.templateControl);var n;return n=c===!0?this.observeArray(function(c){a(c,b)},d):this.observe(function(c,d){e.__isSelf||c===d||a(c,d,b)},d),a(this.evaluateExpression(d),void 0,b,!0),n},d.prototype._addTextEventListener=function(){var b,c=this,d=this.element,e=this._compat,f=!1,g="input",h=function(){f||c._propertyChanged()},i=function(){t(b)||(b=I(function(){h(),b=null}))};v(e.ANDROID)&&(this.addEventListener(d,"compositionstart",function(){f=!0},!1),this.addEventListener(d,"compositionend",function(){f=!1,h()},!1)),e.hasEvent(g)?this.addEventListener(d,g,h,!1):(this.addEventListener(d,"keydown",function(b){var c=b.keyCode||b.which,d=a.KeyCodes;c===d.lwk||c===d.rwk||c>=d.shift&&c<=d.escape||c>d.space&&c<=d.down||i()},!1),this.addEventListener(d,"cut",i,!1),this.addEventListener(d,"paste",i,!1)),this.addEventListener(d,"change",h,!1)},d.prototype._addChangeEventListener=function(){this.addEventListener(this.element,"change",this._propertyChanged,!1)},d.prototype._addButtonEventListener=function(){this.addEventListener(this.element,Sd,this._propertyChanged,!1)},d.prototype._getChecked=function(){return this.element.checked},d.prototype._getValue=function(){return this.element.value},d.prototype._getTextContent=function(){return this.element.textContent},d.prototype._getFile=function(){var a=this.element,c=a.value;return this.__fileSupported&&a.files.length>0?a.files[0]:{name:c.replace(this.__fileNameRegex,""),path:c,lastModifiedDate:void 0,type:void 0,size:void 0,msDetachStream:b,msClose:b,slice:function(){return{}}}},d.prototype._getFiles=function(){var a=this.element;if(this.__fileSupported)return Array.prototype.slice.call(a.files);for(var c,d=a.value.split(/,|;/g),e=d.length,f=[],g=0;e>g;++g)c=d[g],f.push({name:c.replace(this.__fileNameRegex,""),path:c,lastModifiedDate:void 0,type:void 0,size:void 0,msDetachStream:b,msClose:b,slice:function(){return{}}});return f},d.prototype._getSelectedValues=function(){for(var a,b=this.element.options,c=b.length,d=[],e=0;c>e;++e)a=b[e],a.selected&&d.push(a.value);return d},d.prototype._setText=function(a,b,c){return this.__isSelf?void 0:u(a)&&(a="",c===!0)?(u(this.element.value)&&this._setValue(a),void this._propertyChanged()):void this._setValue(a)},d.prototype._setRange=function(a,b,c){return this.__isSelf?void 0:q(a)&&(a=0,c===!0)?(q(this.element.value)&&this._setValue(a),void this._propertyChanged()):void this._setValue(a)},d.prototype._setHidden=function(a,b,c){return this.__isSelf?void 0:q(a)&&(a="",c===!0)?(q(this.element.value)&&this._setValue(a),void this._propertyChanged()):void this._setValue(a)},d.prototype._setValue=function(a){var b=this.element;b.value!==a&&(b.value=a)},d.prototype._setChecked=function(a,b,c){if(!this.__isSelf){if(!r(a)){if(c===!0)return void this._propertyChanged();a=!!a}this.element.checked=a}},d.prototype._setRadio=function(a){var b=this.element;if(!this.__isSelf)return u(a)&&b.checked?void this._propertyChanged():void(b.checked=b.value===a)},d.prototype._setSelectedIndex=function(a,b,c){if(!this.__isSelf){var d=this.element,e=d.value;if(u(a))return c!==!0&&this._document.body.contains(d)?void(d.selectedIndex=-1):void this._propertyChanged();if(n(a)){if(e===a)return;if(!this._document.body.contains(d))return d.value=a,void(d.value!==a&&(d.value=e,this._propertyChanged()))}else{var f;s(a)?(a=a.toString(),f="Trying to bind a value of type number to a element. The element's selected index will be set to -1.",this._log.info(f)}d.value=a,(d.value!==a||-1===d.selectedIndex)&&(d.selectedIndex=-1)}},d.prototype._setSelectedIndices=function(a,b,c){if(!this.__isSelf){var d,e=this.element.options,f=u(e)?0:e.length,g=u(a);if(!g&&w(a))for(var h,i;f-->0;)d=e[f],h=d.value,i=Number(h),-1!==a.indexOf(h)||s(i)&&-1!==a.indexOf(i)?d.selected=!0:d.selected=!1;else for(c===!0&&this._propertyChanged();f-->0;){if(d=e[f],!g&&d.value===""+a)return void(d.selected=!0);d.selected=!1}}},d.prototype._determineType=function(){if(!this._observingBindableProperty()){var a=this.element;if(!u(a))switch(a.nodeName.toLowerCase()){case"input":switch(a.type){case"button":case"submit":case"reset":case"image":this._addEventType=this._addButtonEventListener,this._getter=this._getValue;break;case"checkbox":this._addEventType=this._addChangeEventListener,this._getter=this._getChecked,this._setter=this._setChecked;break;case"radio":this._initializeRadio();break;case"range":this._addEventType=this._addChangeEventListener,this._getter=this._getValue,this._setter=this._setRange;break;case"file":var b=a.multiple;this._addEventType=this._addChangeEventListener,this._getter=b?this._getFiles:this._getFile;break;case"hidden":this._getter=this._getValue,this._setter=this._setHidden;break;default:this._addEventType=this._addTextEventListener,this._getter=this._getValue,this._setter=this._setText}break;case"textarea":this._addEventType=this._addTextEventListener,this._getter=this._getValue,this._setter=this._setText;break;case"select":this._initializeSelect();break;case"button":this._addEventType=this._addButtonEventListener,this._getter=this._getTextContent}}},d.prototype._watchExpression=function(){var a=this,b=this._contextExpression,c=this.evaluateExpression(b);if(!h(c)){if(!(u(c)&&b.identifiers.length>0))return void this._log.warn(this.type+" is trying to index into a primitive type. "+this._contextExpression.expression+" is already defined and not an object when trying to evaluate "+this.type+'="'+this._expression.expression+'"');c=this._createContext(b.identifiers[0])}var d;if(t(this._setter)){this._setter===this._setSelectedIndices&&(d=this._property,u(c[d])&&(c[d]=[]),this.observeArray(function(b){a._setter(b[0].object,null,!0)},b+"."+d));var e=this._expression;this.observeExpression(function(b,c){a._setter(b,c)},e),this._setter(this.evaluateExpression(e),void 0,!0)}},d.prototype._createContext=function(a){var b=a.split("."),c=b.shift().slice(1),d=this.parent;return c===Ue?(a=b.join("."),d=this.parent.root):c===Ha&&(a=b.join(".")),this._ContextManager.createContext(d,a)},d.prototype._propertyChanged=function(){if(!u(this._contextExpression)){var a=this.evaluateExpression(this._contextExpression),b=this._property,c=this._getter();u(a)||a[b]===c||(this.__isSelf=!0,a[b]=c,this.__isSelf=!1)}},d.prototype._initializeRadio=function(){var a=this.element;if(this._addEventType=this._addChangeEventListener,this._getter=this._getValue,this._setter=this._setRadio,!a.hasAttribute("name")){var b=N(this.type),c=this.attributes[b];a.setAttribute("name",c)}a.hasAttribute("value")||a.setAttribute("value","")},d.prototype._initializeSelect=function(){var a,b=this.element,c=b.multiple,d=b.options,e=d.length;this._addEventType=this._addChangeEventListener,c?(this._getter=this._getSelectedValues,this._setter=this._setSelectedIndices):(this._getter=this._getValue,this._setter=this._setSelectedIndex);for(var f=0;e>f;++f)a=d[f],a.hasAttribute("value")||a.setAttribute("value",a.textContent)},d.prototype._observingBindableProperty=function(){var a=this,b=this.templateControl;return!u(b)&&t(b.onInput)&&t(b.observeProperties)?(b.onInput(function(b){a._getter=function(){return b},a._propertyChanged()}),this._supportsTwoWayBinding=!0):!1},d._inject={_parser:Ya,_ContextManager:ab,_compat:Oa,_document:Ra},d}(Of);a.Bind=ga,Fa.control(Vb,ga);var ha=function(a){function b(){a.apply(this,arguments),this.property="",this.priority=200,this._listeners=[],this._boundAddListener=this._addListener.bind(this)}return __extends(b,a),b.prototype.initialize=function(){this.attribute=N(this.type),this._setProperty(this._getValue())},b.prototype.loaded=function(){this._observeProperty(),this._setProperty(this._getValue())},b.prototype.dispose=function(){t(this._removeListener)&&this._removeListener(),this._listeners=[]},b.prototype._setProperty=function(a,b){var c=this.templateControl;u(c)||(this._ContextManager.defineGetter(c,this.property,{value:a,observe:this._boundAddListener},!0,!0),this._callListeners(a,b))},b.prototype._callListeners=function(a,b){for(var c=this._listeners,d=c.length,e=0;d>e;++e)c[e](a,b)},b.prototype._addListener=function(a){var b=this._listeners;return a=a.bind(this.templateControl),b.push(a),function(){var c=b.indexOf(a);-1!==c&&b.splice(c,1)}},b.prototype._getValue=function(){return u(this.templateControl)?void 0:this.evaluateExpression(this.attributes[this.attribute])},b.prototype._observeProperty=function(){u(this.templateControl)||(this._removeListener=this.observeExpression(this._setProperty,this.attributes[this.attribute]))},b._inject={_ContextManager:ab},b}(Of);a.ObservableAttributeControl=ha;var ia=function(a){function b(){a.apply(this,arguments),this.property="options"}return __extends(b,a),b}(ha);a.Options=ia,Fa.control(bc,ia)}(Sf=a.controls||(a.controls={}));var Tf=function(){function a(){this.uid=M(Ub),this._log=a._log;var b=this.navigator=ma(_a);b.initialize(ma(Db).currentRouter())}return a.start=function(){if(!a._compat.isCompatible)return a._log.error(new Error("PlatypusTS only supports modern browsers where Object.defineProperty is defined"));a.__addPlatCss();var b=a._EventManager;b.dispose(Je),b.on(Je,qd,a.__ready),b.on(Je,wd,a.__shutdown),b.initialize()},a.registerApp=function(b){if(!u(a.app)&&n(a.app.uid)&&a._EventManager.dispose(a.app.uid),a.__injector=b,a._compat.amd){var c=a._LifecycleEvent,d=c.dispatch;I(function(){d(qd,c)})}},a.load=function(b){var c=a._LifecycleEvent,d=a._compiler,e=a._document.body,f=a._document.head;return c.dispatch(yd,a),u(b)?(e.setAttribute(Id,""),void I(function(){d.compile([f]),d.compile([e]),e.removeAttribute(Id)})):t(b.setAttribute)?(b.setAttribute(Id,""),void I(function(){d.compile([b]),b.removeAttribute(Id)})):void I(function(){d.compile([b])})},a.__ready=function(b){zf.Injector.initialize(),a.__registerAppEvents(b),b.defaultPrevented||a.load()},a.__shutdown=function(){var b,c=navigator.app,d=a._LifecycleEvent;if(!u(c)&&t(c.exitApp)){if(b=d.dispatch(xd,a),b.defaultPrevented)return;c.exitApp()}},a.__registerAppEvents=function(b){var c=a.__injector;if(!u(c)&&t(c.inject)){var d=a.app=c.inject();d.on(rd,d.suspend),d.on(sd,d.resume),d.on(td,d.online),d.on(ud,d.offline),d.on(vd,d.error),d.on(xd,d.exiting),t(d.ready)&&d.ready(b)}},a.__addPlatCss=function(){var b=a._document;if(!a._compat.platCss){if(!u(b.styleSheets)&&b.styleSheets.length>0)return void b.styleSheets[0].insertRule("[plat-hide] { display: none !important; }",0); +var c=document.createElement("style");c.textContent="[plat-hide] { display: none !important; }",document.head.appendChild(c)}},a.prototype.suspend=function(a){},a.prototype.resume=function(a){},a.prototype.error=function(a){},a.prototype.ready=function(a){},a.prototype.exiting=function(a){},a.prototype.online=function(a){},a.prototype.offline=function(a){},a.prototype.dispatchEvent=function(b){for(var c=[],d=1;d