{"version":3,"sources":["webpack:///./node_modules/aurelia-validation/dist/native-modules/validate-trigger.js","webpack:///./node_modules/aurelia-webpack-plugin/runtime/pal-loader-entry.js","webpack:///./node_modules/aurelia-loader-webpack/dist/native-modules/aurelia-loader-webpack.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/validation-controller.js","webpack:///./node_modules/aurelia-bootstrapper/dist/native-modules/aurelia-bootstrapper.js","webpack:///./node_modules/aurelia-polyfills/dist/native-modules/aurelia-polyfills.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/validator.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/dialog-controller.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/property-accessor-parser.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/implementation/rules.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/dialog-cancel-error.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/property-info.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/validate-result.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/implementation/validation-messages.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/renderer.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/dialog-settings.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/implementation/validation-message-parser.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/implementation/expression-visitor.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/lifecycle.js","webpack:///./node_modules/aurelia-typed-observable-plugin/dist/native-modules/index.js","webpack:///./node_modules/aurelia-dependency-injection/dist/native-modules/aurelia-dependency-injection.js","webpack:///./node_modules/aurelia-history/dist/native-modules/aurelia-history.js","webpack:///./node_modules/aurelia-router/dist/native-modules/aurelia-router.js","webpack:///./node_modules/aurelia-logging/dist/native-modules/aurelia-logging.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/get-target-dom-element.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/validate-event.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/implementation/standard-validator.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/defaultTranslations/relative.time.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/relativeTime.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/utils.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/util.js","webpack:///./node_modules/aurelia-pal/dist/native-modules/aurelia-pal.js","webpack:///./node_modules/aurelia-route-recognizer/dist/native-modules/aurelia-route-recognizer.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/base-i18n.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/aurelia-i18n-loader.js","webpack:///./node_modules/aurelia-binding/dist/native-modules/aurelia-binding.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/dialog-service.js","webpack:///./node_modules/aurelia-templating/dist/native-modules/aurelia-templating.js","webpack:///./node_modules/aurelia-path/dist/native-modules/aurelia-path.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/dialog-renderer.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/dialog-close-error.js","webpack:///./node_modules/aurelia-loader/dist/native-modules/aurelia-loader.js","webpack:///./node_modules/aurelia-metadata/dist/native-modules/aurelia-metadata.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/i18n.js","webpack:///./node_modules/aurelia-task-queue/dist/native-modules/aurelia-task-queue.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/dialog-configuration.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/aurelia-dialog.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/attach-focus.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/ux-dialog.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/ux-dialog-body.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/ux-dialog-footer.js","webpack:///./node_modules/aurelia-dialog/dist/native-modules/ux-dialog-header.js","webpack:///./node_modules/aurelia-event-aggregator/dist/native-modules/aurelia-event-aggregator.js","webpack:///./node_modules/aurelia-framework/dist/native-modules/aurelia-framework.js","webpack:///./node_modules/aurelia-history-browser/dist/native-modules/aurelia-history-browser.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/aurelia-i18n.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/df.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/nf.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/rt.js","webpack:///./node_modules/aurelia-i18n/dist/native-modules/t.js","webpack:///./node_modules/aurelia-logging-console/dist/native-modules/aurelia-logging-console.js","webpack:///./node_modules/aurelia-pal-browser/dist/native-modules/aurelia-pal-browser.js","webpack:///./node_modules/aurelia-swipeout/dist/index.js","webpack:///./node_modules/aurelia-swipeout/dist/swipeout.js","webpack:///./node_modules/aurelia-swipeout/dist/swipeout.html","webpack:///./node_modules/aurelia-templating-binding/dist/native-modules/aurelia-templating-binding.js","webpack:///./node_modules/aurelia-templating-resources/dist/native-modules/aurelia-templating-resources.js","webpack:///./node_modules/aurelia-templating-router/dist/native-modules/aurelia-templating-router.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/validation-controller-factory.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/implementation/validation-rules.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/aurelia-validation.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/validate-binding-behavior.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/validate-binding-behavior-base.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/validation-errors-custom-attribute.js","webpack:///./node_modules/aurelia-validation/dist/native-modules/validation-renderer-custom-attribute.js"],"names":["validateTrigger","Loader","Object","defineProperty","get","WebpackLoader","set","value","extendStatics","d","b","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","Symbol","iterator","this","n","v","op","TypeError","pop","length","push","TextTemplateLoader","loadTemplate","loader","entry","text","_a","loadText","address","template","createTemplateFromMarkup","ensureOriginOnExports","moduleExports","moduleId","key","exportedValue","target","__useDefault","default","_super","_this","moduleRegistry","create","loaderPlugins","modulesBeingLoaded","Map","useTemplateLoader","addPlugin","fetch","getOrCreateTemplateRegistryEntry","templateIsLoaded","templateLoader","eachModule","callback","registry","__webpack_require__","c","getOwnPropertyNames","some","exports","String","__","constructor","__extends","_import","defaultHMR","addressParts","loaderPlugin","plugin_1","asyncModuleId","split","splice","Error","m","module","hot","hmrContext","accept","handleModuleChange","map","id","source","normalizeSync","relativeTo","normalize","loadAllModules","ids","all","loadModule","existing","beingLoaded","delete","url","applyPluginToUrl","defaultExport","__esModule","toString","pluginName","implementation","ValidationController","validator","propertyParser","bindings","renderers","results","errors","validating","elements","objects","blur","finishValidating","eventCallbacks","subscribe","dispose","index","indexOf","addObject","object","rules","removeObject","processResultDelta","filter","addError","message","propertyName","resolvedPropertyName","parse","__manuallyAdded__","removeError","addRenderer","renderer","render","kind","unrender","removeRenderer","registerBinding","binding","propertyInfo","unregisterBinding","resetBinding","getInstructionPredicate","instruction","predicate_1","object_1","propertyName_1","rules_1","x","ruleExists","rule","validate","execute","object_2","propertyName_2","rules_2","undefined","validateObject","validateProperty","promises","_i","from","_b","_c","_d","_e","sourceExpression","has","resultSets","reduce","a","concat","returnPromise","newResults","predicate","oldResults","valid","find","invokeCallbacks","catch","exception","reset","getAssociatedElements","slice","_loop_1","oldResult","this_1","newResultIndex","findIndex","newResult","elements_1","oldResults_1","newResults_1","validateBinding","isBound","registeredBinding","changeTrigger","newTrigger","bindings_1","keys","unbind","bind","revalidateErrors","event","i","inject","bootstrapPromises","startResolve","startPromise","host","global","isNodeLike","process","browser","createLoader","preparePlatform","normalized","type","isRenderer","versions","window","self","palModule","globalize","initialize","initializePal","bootstrapperName","frameworkPromise","frameworkName","_ref","fx","Aurelia","config","appHost","configModuleId","aurelia","customConfig","configure","use","standardConfiguration","developmentLogging","start","setRoot","bootstrap","factory","starting","document","readyState","completed","removeEventListener","addEventListener","appHosts","querySelectorAll","ii","getAttribute","toConsole","console","error","bootstraps","O","descriptor","dP","ObjectProto","toStringTag","toLength","iterCall","_typeof","obj","FEATURE_NO_ES2015","GOPS","setDescriptor","G","random","Math","prefix","prefixLength","internalSymbol","DP","DPies","GOPN","GOPD","PIE","gOPN","gOPD","$defineProperties","hOP","pIE","addInternalIfNeeded","o","uid","enumerable","configurable","writable","createWithSymbols","proto","descriptors","forEach","propertyIsEnumerable","$defineProperty","onlyNonSymbols","name","onlySymbols","setAndGetSymbol","sourceConstructor","_Symbol","description","sourceMap","newDescriptor","copyAsNonEnumerable","$getOwnPropertySymbols","cachedWindowNames","originalObjectGetOwnPropertyNames","symbols","symbol","arguments","str","o_O","protoDescriptor","getOwnPropertyDescriptor","tst","Si","AP","SP","returnThis","fromCodePoint","codePointAt","Number","isNaN","isFinite","endsWith","searchString","position","subjectString","floor","lastIndex","startsWith","substr","it","min","ceil","toInteger","iter","fn","val","E","return","arrayLike","C","aLen","mapfn","mapping","iterFn","isArray","list","FEATURE_NO_ES2016","includes","searchElement","len","parseInt","k","currentElement","hasDontEnumBug","dontEnums","dontEnumsLength","needsFix","s","prop","gOPS","filterOS","getOwnPropertySymbols","where","keyOrSymbol","arg","warn","is","_createCollection","_createCollection2","WeakMap","createCollection","sharedDelete","clear","sharedClear","sharedGet","mapHas","sharedSet","values","sharedIterator","_itp","_keys","sharedValues","entries","mapEntries","sharedForEach","Set","setHas","add","sharedAdd","_values","objectOnly","Collection","init","sharedSize","itp","array","array2","context","r","WeakSet","Function","Reflect","propertyKey","construct","Target","args","ownKeys","FEATURE_NO_ESNEXT","emptyMetadata","freeze","metadataContainerKey","getOwnMetadata","metadataKey","targetKey","defineMetadata","metadataValue","metadataContainer","metadata","Validator","DialogController","settings","releaseResources","controller","viewModel","hideDialog","cancelOperation","rejectOnCancel","wasCancelled","ok","output","close","cancel","closeError","closePromise","dialogResult","reason","canDeactivate","PropertyAccessorParser","parser","property","accessorText","getAccessorExpression","accessor","match","exec","Rules","unset","createDialogCancelError","getObject","expression","objectExpression","evaluate","getPropertyInfo","originalExpression","ancestor","ValidateResult","nextId","validationMessages","required","matches","email","minLength","maxLength","minItems","maxItems","equals","ValidationMessageProvider","getMessage","getDisplayName","displayName","words","join","charAt","toUpperCase","Renderer","getDialogContainer","showDialog","dialogController","DefaultDialogSettings","lock","startingZIndex","centerHorizontalOnly","ignoreTransitions","ExpressionVisitor","visitChain","chain","visitArgs","expressions","visitBindingBehavior","behavior","visitValueConverter","converter","visitAssign","assign","visitConditional","conditional","condition","yes","no","visitAccessThis","access","visitAccessScope","visitAccessMember","visitAccessKeyed","visitCallScope","visitCallFunction","func","visitCallMember","visitPrefix","visitBinary","binary","left","right","visitLiteralPrimitive","literal","visitLiteralArray","visitLiteralObject","visitLiteralString","ValidationMessageParser","bindinqLanguage","emptyStringExpression","nullExpression","undefinedExpression","cache","parts","parseInterpolation","coalesce","part","MessageExpressionValidator","originalMessage","visitor","invokeLifecycle","instance","model","coerceFunctions","none","number","string","boolean","booleanAttr","date","Date","getTime","coerceFunctionMap","Boolean","mapCoerceFunction","strType","coerceFunction","coerce","setCoerce","setValue","newValue","oldValue","currentValue","coercedValue","publishing","notqueued","taskQueue","flushing","queueMicroTask","createObserver","initialValue","selfSubscriber","defaultValue","changeHandlerName","changeHandler","hasOptions","propertyChanged","observer","owner","_createDynamicProperty","observerLookup","behaviorHandlesBind","attribute","boundProperties","info","getValue","createBinding","_usePropertyType","bindable","nameOrTargetOrConfig","deco","key2","descriptor2","propType","actualTarget","getOrCreateOwn","resource","getOwn","propertyType","coerceType","registerWith","usePropertyType","shouldUsePropertyType","createTypedBindable","observableLogger","_usePropertyType$1","observable","isClassDecorator","innerPropertyName","innerPropertyDescriptor","initValue","callbackName","initializer","dependencies","usePropertyType$1","shouldUsePropType","createTypedObservable","__decorate","decorators","desc","decorate","__metadata","autoinject","potentialTarget","paramTypes","_emptyParameters","isInjectable","rest","_key","Strategy","resolver","isStrategy","actual","expected","state","StrategyResolver","strategy","container","singleton","invoke","transient","function","alias","Lazy","Lazy_1","of","All","All_1","getAll","Optional","checkParent","_checkParent","Optional_1","hasResolver","Parent","Parent_1","parent","Factory","Factory_1","getResolver","NewInstance","dynamicDependencies","asKey","NewInstance_1","dependency","registerInstance","as","getDecoratorDependencies","lazy","keyValue","optional","checkParentOrTarget","inject$$1","newInstance","asKeyOrTarget","validateKey","registration","invoker","resolverDecorates","decorates","InvocationHandler","invokeWithDynamicDependencies","classInvoker","Type","deps","instances","dep","staticDependencies","lookup","Container","configuration","_configuration","_onHandlerCreated","onHandlerCreated","_handlers","handlers","_resolvers","root","makeGlobal","setHandlerCreatedCallback","registerResolver","registerSingleton","registerTransient","registerHandler","handler","registerAlias","originalKey","aliasKey","resolver$$1","allResolvers","autoRegister","autoRegisterAll","fns","unregister","_get","createChild","child","_createInvocationHandler","ctor","getPrototypeOf","define","invokeAsFactory","FactoryInvoker","TransientRegistration","keyOrRegisterInChild","registerInChild","SingletonRegistration","existingResolver","_registerInChild","targetContainer","mi","History","activate","options","deactivate","getAbsoluteRoot","navigate","fragment","navigateBack","setTitle","title","setState","getState","getHistoryIndex","go","movement","NavigationInstruction","plan","params","viewPortInstructions","ancestorParams","current","currentParams","hasChildRouter","getWildCardName","unshift","parentInstruction","allParams","queryParams","lifecycleArgs","getAllInstructions","instructions","childInstruction","childNavigationInstruction","getAllPreviousInstructions","previousInstruction","addViewPortInstruction","nameOrInitOptions","component","viewPortInstruction","viewPortName","currentViewPort","childRouter","configRoute","route","wildcardIndex","lastIndexOf","getWildcardPath","wildcardName","path","queryString","getBaseUrl","$encodeURI","encodeURI","decodeURI","nonEmptyRoute","router","routes","_commitChanges","waitToSwap","currentInstruction","navModel","isActive","refreshNavigation","loads","delaySwaps","viewPort","viewPorts","childNavInstruction","parentCatchHandler","swap","prune","_updateTitle","_buildTitle","titleSeparator","history","separator","childTitles","navModelTitle","instructionRouter","transformTitle","child_nav_instruction","childTitle","NavModel","relativeHref","href","updateTitle","_normalizeAbsolutePath","hasPushState","absolute","substring","_createRootedPath","baseUrl","isAbsoluteUrl","test","_ensureArrayWithSingleRoutePerConfig","routeConfigs","isRootedPath","RouterConfiguration","pipelineSteps","addPipelineStep","addAuthorizeStep","addPreActivateStep","addPreRenderStep","addPostRenderStep","fallbackRoute","_fallbackRoute","mapRoute","useViewPortDefaults","viewPortConfig","viewPortDefaults","routeConfig","createNavModel","addRoute","mapUnknownRoutes","unknownRouteConfig","exportToRouter","handleUnknownRoutes","pipelineStepCount","isRoot","pipelineProvider","name_1","addStep","Router","isConfigured","isNavigating","isExplicitNavigation","isExplicitNavigationBack","isNavigatingFirst","isNavigatingNew","isNavigatingRefresh","isNavigatingForward","isNavigatingBack","couldDeactivate","navigation","_fallbackOrder","_recognizer","_childRecognizer","_configuredPromise","_resolveConfiguredPromise","registerViewPort","ensureConfigured","callbackOrConfig","_resolveUrl","_hasPushState","navigateToRoute","generate","nameOrRoute","recognizer","hasRoute","rootedPath","order","nav","validateRouteConfig","navigationStrategy","view","caseSensitive","withChild","JSON","stringify","types","dynamics","stars","sort","hasOwnRoute","catchAllHandler","_createRouteConfig","parentRouter","length_1","$viewPortDefaults","_refreshBaseUrl","generateBaseUrl","_createNavigationInstruction","queryIndex","urlRecognizationResults","recognize","instructionInit","compareQueryParams","first","evaluateNavigationStrategy","_parentCatchAllHandler","newParentInstruction","_findParentInstructionFromRouter","evaluator","createCompletionHandler","status","Pipeline","steps","run","getSteps","l","nextFn","complete","currentStep","createNextFn","isNavigationCommand","Redirect","trigger","replace","shouldContinueProcessing","setRouter","appRouter","useAppRouter","RedirectToRoute","_buildNavigationPlan","forceLifecycleMinimum","buildRedirectPlan","prevInstruction","defaultViewPortConfigs","buildTransitionPlans","viewPortPlans","viewPortConfigs","InternalActivationStrategy","redirect","redirectInstruction","originalInstructionParams","redirectInstructionParams","redirectLocation","newInstructionConfig","hasNewParams","hasDifferentParameterValues","pending","previousViewPortInstructions","prevViewPortInstruction","prevViewPortComponent","newInstructionViewPortConfigs","nextViewPortConfig","viewPortActivationStrategy","determineActivationStrategy","viewPortPlan","prevComponent","prevModuleId","task","childPlan","currentNavInstruction","newViewPortConfig","prevViewPortViewModel","activationStrategy","prev","prevParams","nextParams","nextWildCardName","prevQueryParams","nextQueryParams","BuildNavigationPlanStep","navigationInstruction","loadNewRoute","routeLoader","loadPromises","determineLoadingPlans","loadingPlan","loadRoute","loadingPlans","planConfig","loadComponent","childContainer","childRouter_1","getChildRouter","configureRouter","RouteLoader","LoadRouteStep","CommitChangesStep","PipelineStatus","RouterEvent","PipelineSlotName","noChange","processDeactivatable","ignoreResult","infos","findDeactivatable","inspect","shouldContinue","iterate","processPotential","addPreviousDeactivatable","prevViewModel","processActivatable","findActivatable","current_1","viewPortComponent","SafeSubscription","subscriptionFunc","_subscribed","_subscription","unsubscribe","obs_1","sub","subscribed","CanDeactivatePreviousStep","CanActivateNextStep","DeactivatePreviousStep","ActivateNextStep","PipelineSlot","slotName","slotAlias","PipelineProvider","createPipelineSlot","createPipeline","useCanDeactivateStep","pipeline","_findStep","found","slotSteps","removeStep","slot","_clearSteps","logger","AppRouter","events","maxInstructionCount","_queue","loadUrl","_queueInstruction","restorePreviousLocation","$viewPort","_dequeueInstruction","viewModel_1","_findViewModel","resolveConfiguredPromise_1","routeHandler","instructionCount","shift","navtracker","currentNavTracker","currentNavigationTracker","now","publish","processResult","resolveInstruction","finalResult","navigationCommandResult","innerResult","isInnerInstruction","eventAggregator","eventArgs","eventName","previousLocation","logLevel","debug","loggers","appenders","globalDefaultLevel","standardLevels","isStandardLevel","level","appendArgs","logFactory","threshold","_appenders$i","logFactoryCustom","appender","connectLoggers","Logger","_level","getLogger","addAppender","removeAppender","getAppenders","clearAppenders","_level2","disconnectLoggers","addCustomLevel","removeCustomLevel","setLevel","getLevel","cached","isDebugEnabled","getTargetDOMElement","Element","controllers","element","ValidateEvent","controllerValidateResult","StandardValidator","messageProvider","resources","lookupFunctions","messageKey","overrideContext","$displayName","$propertyName","$value","$object","$config","$getDisplayName","bindingContext","validateRuleSequence","ruleSequence","sequence","validateAllProperties","allValid","when","promiseOrBoolean","translations","ar","translation","en","es","de","nl","fr","th","sv","da","ja","jp","pt","zh","RelativeTime","i18n","ea","service","i18nextReady","setup","locales","trans","fallbackLng","i18next","alternateFb","getLocale","baseLocale","addTranslationResource","interpolation","suffix","subkey","addResources","defaultNS","getRelativeTime","time","diff","timeDiff","getTimeDiffDescription","tr","unit","timeDivisor","unitAmount","toFixed","count","abs","_class","isInteger","LazyOptional","_dec","isString","AggregateError","innerError","skipIfAlreadyAggregate","stack","FEATURE","PLATFORM","noop","moduleName","_moduleName","_x","DOM","isInitialized","initializePAL","getPropertyDescriptor","subject","pd","State","charSpec","nextStates","_iterator","_isArray","validChars","invalidChars","put","repeat","ch","escapeRegex","RegExp","StaticSegment","eachChar","toLowerCase","regex","DynamicSegment","consumed","StarSegment","EpsilonSegment","RouteRecognizer","rootState","names","currentState","skippableStates","statics","routeName","isEmpty","segments","normalizedRoute","splitRoute","segment","_match","_name","_addSegment","addSegment","firstState","nextState","j","jj","routeNames","_i2","_i3","getRoute","handlersFor","generationUsesHref","routeParams","segmentValue","param","states","isSlashDropped","normalizedPath","queryStart","pathLen","recognizeChar","solutions","_i4","_l","sortSolutions","captures","currentCapture","RecognizeResults","_handler","_names","_params","isDynamic","findHandler","BaseI18N","__i18nDisposer","updateTranslations","attached","detached","_temp","Backend","services","with","defaults","getDefaults","readMulti","languages","namespaces","loadPath","interpolator","interpolate","lng","ns","read","language","namespace","response","ret","err","fallbackValue","arr","each","addPath","allowMultiLoading","_class2","_class3","_class5","_class7","_class8","_class9","_class10","_class12","_class13","_class14","_temp2","_createClass","defineProperties","props","Constructor","protoProps","staticProps","_possibleConstructorReturn","ReferenceError","_inherits","subClass","superClass","targetContext","sourceContext","camelCase","createOverrideContext","parentOverrideContext","getContextFor","scope","oc","createScopeForTest","parentBindingContext","slotNames","versionSlotNames","addObserver","observerSlots","_observerSlots","_version","observeProperty","observerLocator","getObserver","observeArray","getArrayObserver","unobserve","connectable","queue","queued","isFlushRequested","immediate","flush","animationFrameStart","__connectQueueId","connect","performance","requestAnimationFrame","enqueueBindingConnect","addSubscriber","callable","hasSubscriber","_context0","_context1","_context2","_contextsRest","_callablesRest","_callable2","_callable1","_callable0","removeSubscriber","callables","contexts","arrayPool1","arrayPool2","poolUtilization","callSubscribers","context0","callable0","context1","callable1","context2","callable2","contextsRest","callablesRest","poolIndex","hasSubscribers","subscriberCollection","ExpressionObserver","_dec2","toNumber","newSplice","removed","addedCount","ArraySplice","calcEditDistances","currentStart","currentEnd","old","oldStart","oldEnd","rowCount","columnCount","distances","north","west","_j","spliceOperationsFromEditDistances","edits","northWest","reverse","calcSplices","prefixCount","suffixCount","sharedPrefix","sharedSuffix","_splice","splices","oldIndex","searchLength","index1","index2","calculateSplices","previous","previousValue","arraySplice","mergeSplice","start1","end1","start2","end2","inserted","insertionOffset","_i5","intersectCount","deleteCount","currentRemoved","prepend","append","offset","projectArraySplices","changeRecords","_i6","record","createInitialSplices","getChangeRecords","size","item","newRecord","ModifyCollectionObserver","_dec3","collection","oldCollection","lengthPropertyName","addChangeRecord","changeRecord","lengthObserver","arrayLength","flushChangeRecords","getLengthObserver","CollectionLengthObserver","records","_dec4","arrayProto","_getArrayObserver","ModifyArrayObserver","for","__au_patched__","notEmpty","methodCallResult","__array_observer__","oldArray","_ModifyCollectionObse","Expression","isChain","isAssignable","FEATURE_NO_UNPARSER","_Unparser","unparse","Chain","_Expression","_this3","last","_i7","BindingBehavior","_Expression2","_this4","bindingBehaviors","behaviorKey","evalList","ValueConverter","_Expression3","allArgs","_this5","valueConverters","toView","fromView","signals","connectBindingToSignal","Assign","_Expression4","_this6","vistor","Conditional","_Expression5","_this7","AccessThis","_Expression6","_this8","AccessScope","_Expression7","_this9","AccessMember","_Expression8","_this10","AccessKeyed","_Expression9","_this11","getKeyed","setKeyed","CallScope","_Expression10","_this12","mustEvaluate","getFunction","CallMember","_Expression11","_this13","_i8","CallFunction","_Expression12","_this14","_i9","Binary","_Expression13","operation","_this15","autoConvertAdd","PrefixNot","_Expression14","_this16","LiteralPrimitive","_Expression15","_this17","LiteralString","_Expression16","_this18","LiteralArray","_Expression17","_this19","_i10","_i11","LiteralObject","_Expression18","_this20","_i12","_i13","_i14","mustExist","Unparser","buffer","write","writeArgs","_i15","_i16","_i17","_i18","_i19","_i20","escaped","ExpressionCloner","cloneExpressionArray","clonedArray","cloneExpression","bindingMode","oneTime","oneWay","twoWay","Token","withOp","opKey","withGetterSetter","withValue","Lexer","lex","scanner","Scanner","tokens","token","scanToken","input","peek","advance","$SPACE","$EOF","charCodeAt","isIdentifierStart","scanIdentifier","isDigit","scanNumber","code","$PERIOD","$LPAREN","$RPAREN","$LBRACE","$RBRACE","$LBRACKET","$RBRACKET","$COMMA","$COLON","$SEMICOLON","scanCharacter","fromCharCode","$SQ","$DQ","scanString","$PLUS","$MINUS","$STAR","$SLASH","$PERCENT","$CARET","$QUESTION","scanOperator","$LT","$GT","$BANG","$EQ","scanComplexOperator","$AMPERSAND","$BAR","$NBSP","character","assert","OPERATORS","one","two","simple","isExponentSign","parseFloat","quote","marker","$BACKSLASH","_unescaped","$u","hex","_i21","unescape","unescaped","EOF","Parser","lexer","ParserImplementation","parseChain","expr","parseBindingBehavior","parseValueConverter","parseExpression","parseConditional","end","expect","parseLogicalOr","parseLogicalAnd","parseEquality","parseRelational","parseAdditive","parseMultiplicative","parsePrefix","parseAccessOrCallMember","parsePrimary","parseExpressionList","_args","_elements","parseObject","parseAccessOrCallScope","terminator","location","mapProto","_getMapObserver","ModifyMapObserver","_ModifyCollectionObse2","__map_observer__","hasValue","findOriginalEventTarget","deepPath","stopPropagation","standardStopPropagation","propagationStopped","handleCapturedEvent","orderedCallbacks","capturedCallbacks","parentNode","_i22","orderedCallback","handleEvent","CapturedHandlerEntry","increment","decrement","handleDelegatedEvent","delegatedCallbacks","DelegateHandlerEntry","DelegationEntryHandler","targetEvent","EventHandler","DefaultEventStrategy","delegatedHandlers","capturedHandlers","disposable","handlerEntry","delegationStrategy","bubbling","capturing","EventManager","elementHandlerLookup","eventStrategyLookup","registerElementConfig","tagName","properties","checked","files","scrollTop","scrollLeft","defaultEventStrategy","registerEventStrategy","getElementHandler","EventSubscriber","callbackOrListener","delegate","_i23","_i24","DirtyChecker","tracked","checkDelay","addProperty","scheduleDirtyCheck","removeProperty","_this22","setTimeout","check","isDirty","DirtyCheckProperty","_dec5","dirtyChecker","propertyAccessor","PrimitiveObserver","primitive","doNotCache","SetterObserver","_dec6","observing","getterValue","setterValue","convertProperty","XLinkAttributeObserver","attributeName","getAttributeNS","setAttributeNS","nodeName","dataAttributeAccessor","removeAttribute","setAttribute","DataAttributeObserver","StyleObserver","styles","version","style","cssText","_setProperty","priority","setProperty","rx","pair","ValueAttributeObserver","_dec7","notify","checkedArrayContext","checkedValueContext","CheckedObserver","_dec8","initialSync","arrayObserver","synchronizeElement","valueObserver","__observers__","elementValue","isRadio","matcher","synchronizeValue","selectArrayContext","SelectValueObserver","_dec9","multiple","synchronizeOptions","_loop","option","optionValue","selected","_this23","_i25","_option","_ret2","_loop2","_loop3","_this24","domObserver","createMutationObserver","observe","childList","subtree","disconnect","ClassObserver","nameIndex","_i26","classList","remove","hasDeclaredDependencies","declarePropertyDependencies","computedFrom","_len","ComputedExpression","_Expression19","_this25","createComputedObserver","_i27","svgElements","svgPresentationElements","svgPresentationAttributes","svgAnalyzer","FEATURE_NO_SVG","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","cursor","defs","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","font","foreignObject","glyph","glyphRef","hkern","image","line","linearGradient","mask","mpath","pattern","polygon","polyline","radialGradient","rect","script","stop","svg","switch","textPath","tref","tspan","vkern","SVGAnalyzer","html","div","createElement","innerHTML","firstChild","firstElementChild","altglyph","altglyphdef","altglyphitem","glyphref","isStandardSvgAttribute","presentationElements","presentationAttributes","_class11","ObserverLocator","eventManager","adapters","observersLookup","createPropertyObserver","getOrCreateObserversLookup","createObserversLookup","addAdapter","adapter","getAdapterObserver","_i28","xlinkResult","SVGElement","existingGetterOrSetter","adapterObserver","getMapObserver","getSetObserver","getAccessor","_getSetObserver","ObjectObservationAdapter","BindingExpression","targetProperty","mode","discrete","Binding","_dec10","updateTarget","targetObserver","updateSource","method","CallExpression","Call","callSource","$event","_this26","ValueConverterResource","convention","register","registerValueConverter","load","valueConverter","nameOrTarget","BindingBehaviorResource","registerBindingBehavior","bindingBehavior","ListenerExpression","preventDefault","Listener","getAU","au","NameExpression","apiName","NameBinder","locateAPI","LookupFunctions","BindingEngine","createBindingExpression","propertyObserver","_this27","collectionObserver","_this28","expressionObserver","registerAdapter","setProto","ModifySetObserver","_ModifyCollectionObse3","__set_observer__","oldSize","targetOrConfig","signalBindings","whenClosed","onfulfilled","onrejected","closeResult","DialogService","compositionEngine","defaultSettings","hasOpenDialog","hasActiveDialog","validateSettings","createCompositionContext","viewResources","viewSlot","ensureViewModel","compositionContext","_cancelOperation","composeAndShowDialog","compose","createSettings","keyboard","overlayDismiss","open","resolveCloseResult","rejectCloseResult","removeController","promise","openResult","canActivate","closeAll","unclosedControllers","unclosed","_class4","_class6","_temp3","_temp4","_temp5","_class15","_class16","_class17","animationEvent","enterBegin","enterActive","enterDone","enterTimeout","leaveBegin","leaveActive","leaveDone","leaveTimeout","staggerNext","removeClassBegin","removeClassActive","removeClassDone","removeClassTimeout","addClassBegin","addClassActive","addClassDone","addClassTimeout","animateBegin","animateActive","animateDone","animateTimeout","sequenceBegin","sequenceDone","Animator","enter","leave","removeClass","className","addClass","runSequence","animations","registerEffect","effectName","unregisterEffect","CompositionTransactionNotifier","_compositionCount","_tryCompleteTransaction","CompositionTransactionOwnershipToken","_ownershipToken","thenable","_createThenable","waitForCompositionComplete","_resolveCallback","CompositionTransaction","tryCapture","enlist","capitalMatcher","addHyphenAndLower","char","_hyphenate","_isAllWhitespace","node","auInterpolationTarget","textContent","ViewEngineHooksResource","registerViewEngineHooks","viewEngineHooks","ElementEvents","subscriptions","_enqueueHandler","_dequeueHandler","detail","bubbles","cancelable","createCustomEvent","dispatchEvent","captureOrOptions","defaultListenerOptions","EventHandlerImpl","subscribeOnce","subscription","disposeAll","once","capture","ResourceLoadContext","addDependency","hasDependency","ViewCompileInstruction","targetShadowDOM","compileSurrogate","associatedModuleId","normal","BehaviorInstruction","enhance","unitTest","attributes","anchorIsContainer","hasAttribute","containerless","initiatedByBehavior","attrName","dynamic","viewFactory","inheritBindingContext","biProto","partReplacements","originalAttrName","skipContentProcessing","contentFactory","TargetInstruction","shadowSlot","parentInjectorId","contentExpression","letElement","lifting","liftingInstruction","noExpressions","behaviorInstructions","providers","injectorId","elementInstruction","surrogate","tiProto","slotFallbackFactory","viewStrategy","loadViewFactory","makeRelativeTo","RelativeViewStrategy","absolutePath","viewEngine","compileInstruction","loadContext","file","ConventionalViewStrategy","viewLocator","origin","viewUrl","convertOriginToViewUrl","NoViewStrategy","dependencyBaseUrl","factoryIsReady","TemplateRegistryViewStrategy","InlineViewStrategy","markup","StaticViewStrategy","onReady","_this2","appResources","viewCompiler","ViewResources","elDeps","elementName","_key2","exported","el","compile","ViewLocator","getViewStrategy","_origin","$view","_view","viewStrategyMetadataKey","createFallbackViewStrategy","BindingLanguage","inspectAttribute","attrValue","createAttributeInstruction","existingInstruction","createLetExpressions","inspectTextContent","noNodes","SlotCustomAttribute","auSlotAttribute","valueChanged","PassThroughSlot","anchor","destinationName","fallbackFactory","destinationSlot","projections","contentView","renderFallbackContent","nodes","projectionSource","ownerView","slots","ShadowDOM","distributeView","passThroughTo","addNode","removeNodes","removeView","needsFallbackRendering","removeAll","projectFrom","created","ShadowSlot","isContentProjectionSource","children","projectFromAnchors","destinationSlots","destination","distributeNodes","auOwnerView","auProjectionSource","auAssignedSlot","_findAnchor","insertBefore","undistributeView","hasSlots","auSlotProjectFrom","_children","auProjectionChildren","ownChildren","_child","appendChild","idx","undistributeAll","_children2","_child2","_children3","viewIndex","lastView","projectTo","createComment","insertNodesBefore","fallbackSlots","getSlotName","defaultSlotKey","destinationOverride","childNodes","currentNode","nodeType","_slotName","validateBehaviorName","newName","conventionMark","bindingLanguage","hasParent","getValueConverter","getBindingBehavior","attributeMap","beforeCompile","afterCompile","beforeCreate","afterCreate","beforeBind","beforeUnbind","$resource","HtmlBehaviorResource","resourceType","liftsContent","templateController","attributeDefaultBindingMode","defaultBindingMode","_bindables","bindables","currentProps","newProp","BindableProperty","existed","_tryAddHook","counter","_invokeHook","three","four","hooks","getBindingLanguage","bindingLanguageFallback","patchInParent","newParent","originalParent","relativeToView","registerElement","getElement","mapAttribute","registerAttribute","knownAttribute","registerValue","impl","resourceTypeMeta","View","_key3","lastChild","fromCache","isAttached","viewModelScope","animatableElement","_isUserControlled","returnToCache","returnViewToCache","_systemUpdate","addBinding","refNode","appendNodesTo","nextSibling","getAnimatableElement","contains","ViewSlot","animator","contentSelectors","animateView","direction","transformChildNodesIntoView","removeChild","_children4","insert","move","sourceIndex","targetIndex","skipAnimation","removeAt","removeMany","viewsToRemove","rmPromises","animation","removeAction","_child3","projectToSlots","_projectionAdd","_projectionInsert","_projectionMove","_projectionRemove","_projectionRemoveAt","_projectionRemoveMany","_projectionRemoveAll","providerResolverInstance","ProviderResolver","__providerId__","elementContainerGet","BoundViewFactory","boundViewFactory","_partReplacements","elementEvents","compositionTransaction","superGet","_element","applyInstructions","containers","shadowSlots","elementContainer","commentAnchor","slotDestination","replaceNode","contentElement","makeElementIntoAnchor","createElementContainer","styleStringToObject","firstIndexOfColon","trim","styleObjectToString","_key4","parentContainer","factoryCreateInstruction","setCacheSize","doNotOverrideIfAlreadySet","getCachedView","isCaching","ViewFactory","cacheSize","MAX_VALUE","createInstruction","cachedView","cloneNode","instructables","instructable","surrogateInstruction","currentAttributeValue","_key5","styleObject","applySurrogateInstruction","nextInjectorId","lastAUTargetID","makeIntoInstructionTarget","auTargetID","defaultLetHandler","ViewCompiler","content","adoptNode","shadowDOM","_compileNode","targetId","ins","_compileSurrogate","targetLightDOM","_compileElement","wholeText","currentChild","attr","hasValues","command","primaryProperty","_primaryProperty","alteredAttr","_configureProperties","attrToRemove","elementProperty","compiler","auShadowSlot","createDocumentFragment","_child4","makeShadowSlot","namespaceURI","processAttributes","_primaryProperty2","ResourceModule","moduleInstance","mainResource","onLoaded","vs","main","_ii","ResourceDescription","ModuleAnalyzer","getAnalysis","analyze","mainResourceKey","fallbackKey","conventional","resourceModule","ProxyViewFactory","auSlotBehavior","ViewEngine","moduleAnalyzer","_pluginMap","addResourcePlugin","extension","urlOrRegistryEntry","ensureRegistryEntry","registryEntry","loadTemplateResources","importIds","src","viewModelRequires","viewModelRequireMetadataKey","templateImportCount","req","importId","importViewResources","importViewModelResource","moduleImport","moduleMember","viewModelModule","normalizedId","moduleIds","_applyLoaderPlugin","imports","analysis","associatedModule","allAnalysis","ext","Controller","handlesBind","_ensurePropertiesDefined","_initialize","owningView","handlesCreated","automate","skipSelfSubscriber","__parentOverrideContext","_ii2","_boundProperties","handlesUnbind","handlesAttached","handlesDetached","BehaviorPropertyObserver","_behavior","nameOrConfig","_configureDescriptor","defineOn","handlerName","_key6","lastProviderId","doProcessContent","doProcessAttributes","shadowDOMOptions","processContent","usesShadowDOM","childBindings","hasDynamicOptions","addChildBinding","htmlName","_copyInheritedProperties","aliases","transientView","_template","_partReplacements2","hasChildNodes","toReplace","removeNode","viewHost","attachShadow","boundary","_ii3","_ii4","_ii5","_ii6","_ii7","__propertiesDefined__","derived","_ii8","createChildObserverDecorator","selectorOrConfig","selector","ChildObserver","ChildObserverBinder","noMutations","trackMutation","groupedMutations","binder","mutations","onChildChange","binders","bindersLength","_ii9","added","addedNodes","removedNodes","_node","onRemove","_jj","_node2","_k","_binder","onAdd","mutationRecords","assignedSlot","anchors","_ii10","__childObserver__","items","nextElementSibling","_value","_value2","_value3","previousElementSibling","childObserver","SwapStrategies","before","after","tryActivateViewModel","skipActivation","CompositionEngine","_swap","swapStrategy","swapOrder","previousViews","currentController","compositionTransactionNotifier","_createControllerAndSwap","createController","compositionTransactionOwnershipToken","viewModelResource","isClass","transaction","ElementConfigResource","instanceOrConfig","override","customElement","customAttribute","nameOrConfigOrTarget","_target","dynamicOptions","defaultShadowDOMOptions","useShadowDOM","targetOrOptions","processor","doNotProcessContent","useViewStrategy","useView","inlineView","noView","targetOrDependencies","templateOrConfig","elementConfig","_key7","TemplatingEngine","_container","_moduleAnalyzer","_viewCompiler","_compositionEngine","configureAnimator","compilerInstructions","letExpressions","relativeToFile","fileParts","nameParts","normalizedBaseParts","ary","trimDots","path1","path2","urlPrefix","schemeMatch","scheme","trailingSlash","url1","url2","url3","encode","encodeURIComponent","encodeKey","buildParam","traditional","arrayKey","buildQueryString","pairs","processScalarParam","existedParam","parseComplexParam","keysLastIndex","preventPollution","prevValue","parseQueryString","query","decodeURIComponent","transition","transitionDurationName","unprefixedName","prefixedNames","containerTagName","transitionEvent","transitions","OTransition","MozTransition","WebkitTransition","hasTransition","prefixed","getComputedStyle","duration","DialogRenderer","DialogRenderer_1","keyboardEventHandler","keyCode","getActionKey","top","dialogControllers","trackController","keyEvent","untrackController","getOwnElements","own","parentElement","attach","spacingWrapper","dialogContainer","dialogOverlay","zIndex","lastContainer","detach","setAsActive","setAsInactive","setupClickHandling","_aureliaDialogHostClicked","closeDialogClick","clearClickHandling","centerDialog","vh","max","clientHeight","innerHeight","marginTop","offsetHeight","marginBottom","awaitTransition","setActiveInactive","ignore","onTransitionEnd","createDialogCloseError","TemplateDependency","TemplateRegistryEntry","_factory","finalSrc","requires","templateRegistry","_extends","isObject","originStorage","unknownOrigin","Origin","applicator","on","deprecated","optionsOrTarget","maybeKey","maybeDescriptor","decorator","methodSignature","SyntaxError","mixin","instanceKeys","possible","resolvedTarget","alwaysValid","noCompose","ensureProtocolOptions","createProtocolValidator","createProtocolAsserter","protocol","hidden","I18N","signaler","globalVars","i18nextDefered","Intl","skipTranslationOnMissingKey","compatibilityAPI","compatibilityJSON","setLocale","locale","oldLocale","changeLanguage","signal","nf","NumberFormat","uf","comparer","format","thousandSeparator","decimalSeparator","df","DateTimeFormat","fullOptions","registerGlobalVariable","unregisterGlobalVariable","i2","l2","pname","updateValue","re","attrs","_textContent","_innerHTML","attrCC","reservedNames","i18nLogger","newChild","createTextNode","_newChild","prependParser","ni","_prepended","pi","appendParser","_ni","_appended","makeRequestFlushFromTimer","timeoutHandle","handleFlushTimer","intervalHandle","setInterval","clearTimeout","clearInterval","TaskQueue","longStacks","microTaskQueue","microTaskQueueCapacity","mutationObserver","requestFlushMicroTaskQueue","flushMicroTaskQueue","characterData","data","requestFlushTaskQueue","flushTaskQueue","_flushQueue","capacity","scan","newLength","filterFlushStack","onError","prepareQueueStack","queueTask","filterQueueStack","captureStack","defaultRenderer","defaultCSSText","DialogConfiguration","frameworkConfiguration","applySetter","fwConfig","_apply","resourceName","globalResources","injectStyles","useDefaults","useRenderer","useCSS","useStandardResources","useResource","frameworkConfig","applyConfig","AttachFocus","focus","UxDialog","UxDialogBody","UxDialogFooter","buttons","useDefaultButtons","UxDialogFooter_1","isCancelButton","buttonValue","useDefaultButtonsChanged","UxDialogHeader","showCloseButton","Handler","messageType","handle","invokeCallback","invokeHandler","EventAggregator","eventLookup","messageHandlers","subscribers","includeEventsIn","FrameworkConfiguration","hostConfigured","_started","evt","action","applicationHost","_configureHost","engine","_onAureliaComposed","initialComposition","hostSlot","getElementById","extPattern","runTasks","tasks","loadResources","resourcesToLoad","getExt","isOtherResource","removeExt","addOriginalExt","_normalize","loadBehaviors","behaviorsToLoad","assertProcessed","plugins","processed","invalidConfigMsg","cfg","preTasks","postTasks","configuredPlugins","preTask","postTask","_instance","feature","plugin","hasIndex","_moduleId","resourcesRelativeTo","toAdd","grandParent","meta","globalName","resourcePath","_plugin","pluginConfig","_addNormalizedPlugin","defaultBindingLanguage","defaultResources","basicConfiguration","ConsoleAppender","_loadPlugin","loadPlugin","LogManager","LinkHandler","DefaultLinkHandler","getEventInfo","shouldHandleEvent","findClosestAnchor","targetIsThisWindow","altKey","ctrlKey","metaKey","shiftKey","leftButtonClicked","which","isRelative","targetWindow","win","BrowserHistory","linkHandler","_isActive","_checkUrlCallback","_checkUrl","$history","wantsPushState","pushState","normalizedOptions","rootUrl","rootStripper","wantsHashChange","_wantsHashChange","hashChange","$location","atRoot","pathname","_getFragment","search","hash","_getHash","routeStripper","replaceState","silent","_loadUrl","hostname","port","absoluteUrl","updateHash","back","historyIndex","forcePushState","location_1","fragmentOverride","registerI18N","cb","htmlBehaviorResource","htmlParamsResource","normalizeErrorMessage","i18nName","intlName","poly","DfValueConverter","dfOrOptions","DfBindingBehavior","signalBindingBehavior","rewritten","NfValueConverter","nfOrOptions","NfBindingBehavior","RtValueConverter","relativeTime","RtBindingBehavior","TValueConverter","TParamsCustomAttribute","configureAliases","TCustomAttribute","tparams","lazyParams","newParams","oldParams","paramsChanged","TBindingBehavior","_console","_console2","_len2","_console3","_len3","_console4","_len4","_PLATFORM","FEATURE_NO_IE","createElementNS","strTrim","arrIndexOf","emptyArray","DOMEx","DOMException","checkTokenAndGetIndex","ClassList","elem","trimmedClasses","classes","_updateClassName","classListProto","updated","toggle","force","testElement","createMethod","original","DOMTokenList","_toggle","_filterEntries","_entries","_clearEntries","entryType","nowOffset","timing","navigationStart","_marksIndex","mark","webkitMark","startTime","measure","webkitMeasure","startMark","endMark","getEntriesByType","webkitGetEntriesByType","getEntriesByName","webkitGetEntriesByName","clearMarks","webkitClearMarks","clearMeasures","webkitClearMeasures","con","nop","memory","log","CustomEvent","_CustomEvent","createEvent","initCustomEvent","Event","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","_FEATURE","HTMLElement","scopedCSS","htmlTemplateElement","MutationObserver","WebKitMutationObserver","ensureHTMLTemplateElement","fixSVGTemplateElement","ownerDocument","fixHTMLTemplateElement","childTemplates","shadowPoly","ShadowDOMPolyfill","_DOM","NodeList","createAttribute","createTemplateElement","eventType","querySelector","temp","appendNode","newNode","replaceChild","unwrap","oldStyle","head","platform","dom","activeElement","XMLHttpRequest","aurelia_event_aggregator_1","aurelia_framework_1","Hammer","translateX","reduceSwipe","pow","Swipeout","startLeft","isTransitioning","startListener","deltaY","distanceSwiped","deltaX","swipeListener","actionWidths","leftActionsWidth","rightActionsWidth","newX","transform","shiftLeftActions","shiftRightActions","stopListener","oldLeft","getBoundingClientRect","currentLeft","newLeft","changeLeft","transitionEndListener","createHammer","closeListener","closeSubscription","hammer","destroy","leftActions","rightActions","clientWidth","to","leftActionsWidth_1","rightActionsWidth_1","actionsWidth","actions","progress","offsetLeft","offsetWidth","contentRect","elementRect","AttributeMap","allElements","registerUniversal","InterpolationBindingExpression","ChildInterpolationBinding","InterpolationBinding","validateTarget","targetAccessor","updateOneTimeBindings","rawValue","LetExpression","toBindingContext","LetBinding","LetInterpolationBindingExpression","LetInterpolationBinding","interpolationBinding","createInterpolationBinding","SyntaxInterpreter","interpret","handleUnknownCommand","determineDefaultBindingMode","contentEditable","inString","inEscape","foundName","_getPrimaryPropertyName","isDestructuring","local","TemplatingBindingLanguage","_BindingLanguage","syntaxInterpreter","toBindingContextAttr","interpolationParts","theInfo","nodeValue","pos","interpolationStart","partIndex","ActivationStrategy","Compose","InvokeLifecycle","currentViewModel","changes","pendingTask","processChanges","modelChanged","requestUpdate","viewChanged","viewModelChanged","composer","vm","Replace","needsReInitialization","completeCompositionTask","updateRequested","IfCore","showing","_show","_hide","_unbindView","If","conditionChanged","_update","show","animating","elseVm","Else","_registerInIf","ifVm","previousSibling","if","With","updateOverrideContexts","views","startIndex","updateOverrideContext","createFullOverrideContext","even","$index","$first","$last","$middle","$odd","$even","getItemsSourceExpression","bi","unwrapExpression","unwrapped","isOneTime","updateOneTimeBinding","ArrayRepeatStrategy","getCollectionObserver","instanceChanged","$repeat","itemsLength","viewsLength","viewsRequireLifecycle","childrenSnapshot","itemNameInBindingContext","matcher_1","itemsPreviouslyInViews_1","oldItem","updateViews","removePromise","removeViews","indexOfView","insertView","moveView","_inPlaceProcessItems","removeAllViews","_standardProcessInstanceChanged","addView","viewCount","middle","updateBindings","instanceMutated","__queuedSplices","__array","maybePromise","_runSplices","queuedSplices_1","runQueuedSplices_1","nextPromise","removeDelta","viewOrPromise","spliceIndexLow","_handleAddedSplices","spliceIndex","addIndex","MapRepeatStrategy","_standardProcessItems","removeIndex","_getViewIndexByKey","NullRepeatStrategy","NumberRepeatStrategy","childrenLength","SetRepeatStrategy","_getViewIndexByValue","RepeatStrategyLocator","matchers","strategies","addStrategy","getStrategy","lifecycleOptionalBehaviors","behaviorRequiresLifecycle","targetRequiresLifecycle","behaviors","_viewsRequireLifecycle","AbstractRepeater","matcherExtractionMarker","Repeat","strategyLocator","ignoreMutation","Repeat_1","_captureAndRemoveMatcherBinding","matcherBinding","itemsChanged","_unsubscribeCollection","callContext","_observeInnerCollection","_observeCollection","_getInnerCollection","handleCollectionMutated","handleInnerCollectionMutated","newItems","useInnerMatcher","extractMatcherBindingExpression","getChildrenCount","repeatedElement","getFirstElementChild","repeatedElementTargetId","targetedElementId","instructionIds","instructionId","matcherBindingExpression","aureliaHideClassName","aureliaHideClass","injectAureliaHideStyleAtBoundary","domBoundary","hasAureliaHideStyle","Show","Hide","SCRIPT_REGEX","needsToWarn","HTMLSanitizer","sanitize","SanitizeHTMLValueConverter","sanitizer","untrustedMarkup","Replaceable","Focus","needsApply","cssUrlMatcher","CSSResource","_scoped","_global","_alreadyGloballyInjected","css","p1","fixupCSSUrls","CSSViewEngineHooks","AttrBindingBehavior","modeBindingBehavior","originalMode","OneTimeBindingBehavior","OneWayBindingBehavior","ToViewBindingBehavior","FromViewBindingBehavior","TwoWayBindingBehavior","throttle","throttleState","elapsed","delay","timeoutId","throttledMethod","ThrottleBindingBehavior","methodToThrottle","originalName","debounceCallSource","debounceState","debouncedMethod","debounceCall","callContextToDebounce","_oldValue","DebounceBindingBehavior","isCallSource","methodToDebounce","debouncer","handleSelfEvent","selfEventCallSource","SelfBindingBehavior","BindingSignaler","SignalBindingBehavior","bindingSignaler","signalName","name_2","eventNamesRequired","notApplicableMessage","UpdateTriggerBindingBehavior","originalHandler","bindableNames","useShadowDOMmode","DynamicElement","$parent","_createDynamicElement","configure$1","styleResourcePlugin","ViewCSS","_createCSSResource","EmptyLayoutViewModel","RouterView","$viewPortInstruction","RouterViewLocator","_notify","layoutInstruction","layoutViewModel","layoutView","layoutModel","viewPortComponentBehaviorInstruction","viewPortController","previousView","work","ready","owningView_or_layoutView","transactionOwnerShipToken","layoutController","newView","notifier","findNearest","routerView","EmptyClass","TemplatingRouteLoader","resolveViewModel","DynamicClass","createDynamicClass","createChildContainer","_navInstruction","RouteHref","processChange","attributeChanged","ValidationControllerFactory","createForCurrentScope","FluentRuleCustomizer","fluentEnsure","fluentRules","parsers","_addRule","withMessageKey","withMessage","tag","ensure","ensureObject","satisfies","satisfiesRule","expectedValue","FluentRules","customRules","argsToConfig","FluentEnsure","assertInitialized","mergeRules","existingRules","ValidationRules","messageParser","customRule","taggedRules","untaggedRules","off","AureliaValidationConfiguration","validatorType","customValidator","ValidateBindingBehaviorBase","rulesOrController","validationController","getValidateTrigger","change","standardUpdateSource","validateBlurHandler","manual","standardUpdateTarget","ValidateBindingBehavior","ValidateManuallyBindingBehavior","ValidateOnBlurBindingBehavior","ValidateOnChangeBindingBehavior","ValidateOnChangeOrBlurBindingBehavior","changeOrBlur","ValidationErrorsCustomAttribute","boundaryElement","controllerAccessor","errorsInternal","targets","compareDocumentPosition","interestingElements","ValidationRendererCustomAttribute"],"mappings":"0FAGO,IAAIA,EAHX,kCAIA,SAAWA,GAKPA,EAAgBA,EAAwB,OAAI,GAAK,SAIjDA,EAAgBA,EAAsB,KAAI,GAAK,OAI/CA,EAA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AAS,CAAC,MAAI43B,QAAS,OAAKrc,GAAG,MAC/D5B,EAAW,CACP,mBAAS,CAAEwlD,mBAAoB,cAAYzqB,UAC5CmzD,EAAgC71G,UAAW,kBAAc,GAC5D2nB,EAAW,CACP,mBAAS,CAAEiuD,iBAAiB,EAAMzI,mBAAoB,cAAYxqB,UACnEkzD,EAAgC71G,UAAW,cAAU,GACxD61G,EAAkCluF,EAAW,CACzC,0BAAgB,sBACjBkuF,GAnE+B,I,uFCXtC,sFACIO,EAAqC,WACrC,SAASA,KAeT,OAbAA,EAAkCp2G,UAAUwpE,QAAU,SAAUjxC,GAC5Dr2B,KAAK6mB,UAAYwP,EAAKxP,WAE1BqtF,EAAkCp2G,UAAU4N,KAAO,WAC/C1L,KAAK+Z,WAAa/Z,KAAK6mB,UAAU1pB,IAAI,KACrC6C,KAAKqH,SAAWrH,KAAK6mB,UAAU1pB,IAAI6C,KAAK1C,OACxC0C,KAAK+Z,WAAW3S,YAAYpH,KAAKqH,WAErC6sG,EAAkCp2G,UAAU2N,OAAS,WACjDzL,KAAK+Z,WAAWtS,eAAezH,KAAKqH,UACpCrH,KAAK+Z,WAAa,KAClB/Z,KAAKqH,SAAW,MAEb6sG,EAhB6B","file":"aurelia.85921d4b44273fef05fb.js","sourcesContent":["/**\n * Validation triggers.\n */\nexport var validateTrigger;\n(function (validateTrigger) {\n /**\n * Manual validation. Use the controller's `validate()` and `reset()` methods\n * to validate all bindings.\n */\n validateTrigger[validateTrigger[\"manual\"] = 0] = \"manual\";\n /**\n * Validate the binding when the binding's target element fires a DOM \"blur\" event.\n */\n validateTrigger[validateTrigger[\"blur\"] = 1] = \"blur\";\n /**\n * Validate the binding when it updates the model due to a change in the view.\n */\n validateTrigger[validateTrigger[\"change\"] = 2] = \"change\";\n /**\n * Validate the binding when the binding's target element fires a DOM \"blur\" event and\n * when it updates the model due to a change in the view.\n */\n validateTrigger[validateTrigger[\"changeOrBlur\"] = 3] = \"changeOrBlur\";\n})(validateTrigger || (validateTrigger = {}));\n","// With default aurelia-loader-webpack config, this module is added as an extra entry\n// before any other code executes so that PAL.Loader is properly configured.\n// There are several tricky points worth noticing.\n// \n// We don't add aurelia-loader-webpack itself as an entry point (used to until 2.0 RC2)\n// because it (transitively) brings too much bagage with itself, most notably polyfills.\n// This made it super-hard to add other polyfills before Aurelia's and led to various bugs.\n//\n// We don't add custom code in aurelia-pal or aurelia-loader or aurelia-bootstrapper to detect\n// the Webpack environment and configure the loader because they might live in a DLL.\n// If they do, they would bring aurelia-loader-webpack along in the DLL and this is a special \n// library that *has to be in the main chunk.*\n//\n// The over-complicated design I've settled upon in the end is to use this special module\n// as an entry point that configures aurelia-loader-webpack. It has minimal static imports:\n// just aurelia-pal, which itself has no other dependencies and doesn't run much code.\n// It hacks the loader field into a getter so that it can synchronously load aurelia-loader-webpack\n// just in time when it is demanded by aurelia-bootstrapper.\n// This enables users to load polyfills before aurelia-loader-webpack is actually loaded.\n\nimport { PLATFORM } from \"aurelia-pal\";\n\nvar Loader;\n\nObject.defineProperty(PLATFORM, \"Loader\", {\n get: function() {\n return Loader || (Loader = require(\"aurelia-loader-webpack\").WebpackLoader);\n },\n set: function(value) {\n Loader = value;\n }\n});\n","import { Loader } from 'aurelia-loader';\nimport { Origin } from 'aurelia-metadata';\nimport { PLATFORM, DOM } from 'aurelia-pal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nfunction __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\n\n/**\r\n* An implementation of the TemplateLoader interface implemented with text-based loading.\r\n*/\r\nvar TextTemplateLoader = /** @class */ (function () {\r\n function TextTemplateLoader() {\r\n }\r\n /**\r\n * Loads a template.\r\n * @param loader The loader that is requesting the template load.\r\n * @param entry The TemplateRegistryEntry to load and populate with a template.\r\n * @return A promise which resolves when the TemplateRegistryEntry is loaded with a template.\r\n */\r\n TextTemplateLoader.prototype.loadTemplate = function (loader, entry) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var text;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, loader.loadText(entry.address)];\r\n case 1:\r\n text = _a.sent();\r\n entry.template = DOM.createTemplateFromMarkup(text);\r\n return [2 /*return*/];\r\n }\r\n });\r\n });\r\n };\r\n return TextTemplateLoader;\r\n}());\r\nfunction ensureOriginOnExports(moduleExports, moduleId) {\r\n var target = moduleExports;\r\n var key;\r\n var exportedValue;\r\n if (target.__useDefault) {\r\n target = target.default;\r\n }\r\n Origin.set(target, new Origin(moduleId, 'default'));\r\n if (typeof target === 'object') {\r\n for (key in target) {\r\n exportedValue = target[key];\r\n if (typeof exportedValue === 'function') {\r\n Origin.set(exportedValue, new Origin(moduleId, key));\r\n }\r\n }\r\n }\r\n return moduleExports;\r\n}\r\n/**\r\n* A default implementation of the Loader abstraction which works with webpack (extended common-js style).\r\n*/\r\nvar WebpackLoader = /** @class */ (function (_super) {\r\n __extends(WebpackLoader, _super);\r\n function WebpackLoader() {\r\n var _this = _super.call(this) || this;\r\n _this.moduleRegistry = Object.create(null);\r\n _this.loaderPlugins = Object.create(null);\r\n _this.modulesBeingLoaded = new Map();\r\n _this.useTemplateLoader(new TextTemplateLoader());\r\n _this.addPlugin('template-registry-entry', {\r\n fetch: function (moduleId) { return __awaiter(_this, void 0, void 0, function () {\r\n var HmrContext, entry;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n // HMR:\r\n if (module.hot) {\r\n if (!this.hmrContext) {\r\n HmrContext = require('aurelia-hot-module-reload').HmrContext;\r\n this.hmrContext = new HmrContext(this);\r\n }\r\n module.hot.accept(moduleId, function () { return __awaiter(_this, void 0, void 0, function () {\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.hmrContext.handleViewChange(moduleId)];\r\n case 1:\r\n _a.sent();\r\n return [2 /*return*/];\r\n }\r\n });\r\n }); });\r\n }\r\n entry = this.getOrCreateTemplateRegistryEntry(moduleId);\r\n if (!!entry.templateIsLoaded) return [3 /*break*/, 2];\r\n return [4 /*yield*/, this.templateLoader.loadTemplate(this, entry)];\r\n case 1:\r\n _a.sent();\r\n _a.label = 2;\r\n case 2: return [2 /*return*/, entry];\r\n }\r\n });\r\n }); }\r\n });\r\n PLATFORM.eachModule = function (callback) {\r\n var registry = __webpack_require__.c;\r\n var cachedModuleIds = Object.getOwnPropertyNames(registry);\r\n cachedModuleIds\r\n // Note: we use .some here like a .forEach that can be \"break\"ed out of.\r\n // It will stop iterating only when a truthy value is returned.\r\n // Even though the docs say \"true\" explicitly, loader-default also goes by truthy\r\n // and this is to keep it consistent with that.\r\n .some(function (moduleId) {\r\n var moduleExports = registry[moduleId].exports;\r\n if (typeof moduleExports === 'object') {\r\n return callback(moduleId, moduleExports);\r\n }\r\n return false;\r\n });\r\n };\r\n return _this;\r\n }\r\n WebpackLoader.prototype._import = function (address, defaultHMR) {\r\n if (defaultHMR === void 0) { defaultHMR = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var addressParts, moduleId, loaderPlugin, plugin_1, asyncModuleId, callback;\r\n var _this = this;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n addressParts = address.split('!');\r\n moduleId = addressParts.splice(addressParts.length - 1, 1)[0];\r\n loaderPlugin = addressParts.length === 1 ? addressParts[0] : null;\r\n if (!loaderPlugin) return [3 /*break*/, 2];\r\n plugin_1 = this.loaderPlugins[loaderPlugin];\r\n if (!plugin_1) {\r\n throw new Error(\"Plugin \" + loaderPlugin + \" is not registered in the loader.\");\r\n }\r\n if (module.hot && plugin_1.hot) {\r\n module.hot.accept(moduleId, function () { return plugin_1.hot(moduleId); });\r\n }\r\n return [4 /*yield*/, plugin_1.fetch(moduleId)];\r\n case 1: return [2 /*return*/, _a.sent()];\r\n case 2:\r\n if (__webpack_require__.m[moduleId]) {\r\n if (defaultHMR && module.hot && this.hmrContext) {\r\n module.hot.accept(moduleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\r\n }\r\n return [2 /*return*/, __webpack_require__(moduleId)];\r\n }\r\n asyncModuleId = \"async!\" + moduleId;\r\n if (!__webpack_require__.m[asyncModuleId]) return [3 /*break*/, 4];\r\n if (defaultHMR && module.hot && this.hmrContext) {\r\n module.hot.accept(moduleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\r\n module.hot.accept(asyncModuleId, function () { return _this.hmrContext.handleModuleChange(moduleId, module.hot); });\r\n }\r\n callback = __webpack_require__(asyncModuleId);\r\n return [4 /*yield*/, new Promise(callback)];\r\n case 3: return [2 /*return*/, _a.sent()];\r\n case 4: throw new Error(\"Unable to find module with ID: \" + moduleId);\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Maps a module id to a source.\r\n * @param id The module id.\r\n * @param source The source to map the module to.\r\n */\r\n WebpackLoader.prototype.map = function (id, source) { };\r\n /**\r\n * Normalizes a module id.\r\n * @param moduleId The module id to normalize.\r\n * @param relativeTo What the module id should be normalized relative to.\r\n * @return The normalized module id.\r\n */\r\n WebpackLoader.prototype.normalizeSync = function (moduleId, relativeTo) {\r\n return moduleId;\r\n };\r\n /**\r\n * Normalizes a module id.\r\n * @param moduleId The module id to normalize.\r\n * @param relativeTo What the module id should be normalized relative to.\r\n * @return The normalized module id.\r\n */\r\n WebpackLoader.prototype.normalize = function (moduleId, relativeTo) {\r\n return Promise.resolve(moduleId);\r\n };\r\n /**\r\n * Instructs the loader to use a specific TemplateLoader instance for loading templates\r\n * @param templateLoader The instance of TemplateLoader to use for loading templates.\r\n */\r\n WebpackLoader.prototype.useTemplateLoader = function (templateLoader) {\r\n this.templateLoader = templateLoader;\r\n };\r\n /**\r\n * Loads a collection of modules.\r\n * @param ids The set of module ids to load.\r\n * @return A Promise for an array of loaded modules.\r\n */\r\n WebpackLoader.prototype.loadAllModules = function (ids) {\r\n var _this = this;\r\n return Promise.all(ids.map(function (id) { return _this.loadModule(id); }));\r\n };\r\n /**\r\n * Loads a module.\r\n * @param moduleId The module ID to load.\r\n * @return A Promise for the loaded module.\r\n */\r\n WebpackLoader.prototype.loadModule = function (moduleId, defaultHMR) {\r\n if (defaultHMR === void 0) { defaultHMR = true; }\r\n return __awaiter(this, void 0, void 0, function () {\r\n var existing, beingLoaded, moduleExports;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0:\r\n existing = this.moduleRegistry[moduleId];\r\n if (existing) {\r\n return [2 /*return*/, existing];\r\n }\r\n beingLoaded = this.modulesBeingLoaded.get(moduleId);\r\n if (beingLoaded) {\r\n return [2 /*return*/, beingLoaded];\r\n }\r\n beingLoaded = this._import(moduleId, defaultHMR);\r\n this.modulesBeingLoaded.set(moduleId, beingLoaded);\r\n return [4 /*yield*/, beingLoaded];\r\n case 1:\r\n moduleExports = _a.sent();\r\n this.moduleRegistry[moduleId] = ensureOriginOnExports(moduleExports, moduleId);\r\n this.modulesBeingLoaded.delete(moduleId);\r\n return [2 /*return*/, moduleExports];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Loads a template.\r\n * @param url The url of the template to load.\r\n * @return A Promise for a TemplateRegistryEntry containing the template.\r\n */\r\n WebpackLoader.prototype.loadTemplate = function (url) {\r\n return this.loadModule(this.applyPluginToUrl(url, 'template-registry-entry'), false);\r\n };\r\n /**\r\n * Loads a text-based resource.\r\n * @param url The url of the text file to load.\r\n * @return A Promise for text content.\r\n */\r\n WebpackLoader.prototype.loadText = function (url) {\r\n return __awaiter(this, void 0, void 0, function () {\r\n var result, defaultExport;\r\n return __generator(this, function (_a) {\r\n switch (_a.label) {\r\n case 0: return [4 /*yield*/, this.loadModule(url, false)];\r\n case 1:\r\n result = _a.sent();\r\n defaultExport = result && result.__esModule ? result.default : result;\r\n if (defaultExport instanceof Array && defaultExport[0] instanceof Array && defaultExport.hasOwnProperty('toString')) {\r\n // we're dealing with a file loaded using the css-loader:\r\n return [2 /*return*/, defaultExport.toString()];\r\n }\r\n return [2 /*return*/, typeof result === \"string\" ? result : defaultExport];\r\n }\r\n });\r\n });\r\n };\r\n /**\r\n * Alters a module id so that it includes a plugin loader.\r\n * @param url The url of the module to load.\r\n * @param pluginName The plugin to apply to the module id.\r\n * @return The plugin-based module id.\r\n */\r\n WebpackLoader.prototype.applyPluginToUrl = function (url, pluginName) {\r\n return pluginName + \"!\" + url;\r\n };\r\n /**\r\n * Registers a plugin with the loader.\r\n * @param pluginName The name of the plugin.\r\n * @param implementation The plugin implementation.\r\n */\r\n WebpackLoader.prototype.addPlugin = function (pluginName, implementation) {\r\n this.loaderPlugins[pluginName] = implementation;\r\n };\r\n return WebpackLoader;\r\n}(Loader));\r\nPLATFORM.Loader = WebpackLoader;\n\nexport { TextTemplateLoader, WebpackLoader, ensureOriginOnExports };\n","import { Validator } from './validator';\nimport { validateTrigger } from './validate-trigger';\nimport { getPropertyInfo } from './property-info';\nimport { ValidateResult } from './validate-result';\nimport { PropertyAccessorParser } from './property-accessor-parser';\nimport { ValidateEvent } from './validate-event';\n/**\n * Orchestrates validation.\n * Manages a set of bindings, renderers and objects.\n * Exposes the current list of validation results for binding purposes.\n */\nvar ValidationController = (function () {\n function ValidationController(validator, propertyParser) {\n this.validator = validator;\n this.propertyParser = propertyParser;\n // Registered bindings (via the validate binding behavior)\n this.bindings = new Map();\n // Renderers that have been added to the controller instance.\n this.renderers = [];\n /**\n * Validation results that have been rendered by the controller.\n */\n this.results = [];\n /**\n * Validation errors that have been rendered by the controller.\n */\n this.errors = [];\n /**\n * Whether the controller is currently validating.\n */\n this.validating = false;\n // Elements related to validation results that have been rendered.\n this.elements = new Map();\n // Objects that have been added to the controller instance (entity-style validation).\n this.objects = new Map();\n /**\n * The trigger that will invoke automatic validation of a property used in a binding.\n */\n this.validateTrigger = validateTrigger.blur;\n // Promise that resolves when validation has completed.\n this.finishValidating = Promise.resolve();\n this.eventCallbacks = [];\n }\n /**\n * Subscribe to controller validate and reset events. These events occur when the\n * controller's \"validate\"\" and \"reset\" methods are called.\n * @param callback The callback to be invoked when the controller validates or resets.\n */\n ValidationController.prototype.subscribe = function (callback) {\n var _this = this;\n this.eventCallbacks.push(callback);\n return {\n dispose: function () {\n var index = _this.eventCallbacks.indexOf(callback);\n if (index === -1) {\n return;\n }\n _this.eventCallbacks.splice(index, 1);\n }\n };\n };\n /**\n * Adds an object to the set of objects that should be validated when validate is called.\n * @param object The object.\n * @param rules Optional. The rules. If rules aren't supplied the Validator implementation will lookup the rules.\n */\n ValidationController.prototype.addObject = function (object, rules) {\n this.objects.set(object, rules);\n };\n /**\n * Removes an object from the set of objects that should be validated when validate is called.\n * @param object The object.\n */\n ValidationController.prototype.removeObject = function (object) {\n this.objects.delete(object);\n this.processResultDelta('reset', this.results.filter(function (result) { return result.object === object; }), []);\n };\n /**\n * Adds and renders an error.\n */\n ValidationController.prototype.addError = function (message, object, propertyName) {\n if (propertyName === void 0) { propertyName = null; }\n var resolvedPropertyName;\n if (propertyName === null) {\n resolvedPropertyName = propertyName;\n }\n else {\n resolvedPropertyName = this.propertyParser.parse(propertyName);\n }\n var result = new ValidateResult({ __manuallyAdded__: true }, object, resolvedPropertyName, false, message);\n this.processResultDelta('validate', [], [result]);\n return result;\n };\n /**\n * Removes and unrenders an error.\n */\n ValidationController.prototype.removeError = function (result) {\n if (this.results.indexOf(result) !== -1) {\n this.processResultDelta('reset', [result], []);\n }\n };\n /**\n * Adds a renderer.\n * @param renderer The renderer.\n */\n ValidationController.prototype.addRenderer = function (renderer) {\n var _this = this;\n this.renderers.push(renderer);\n renderer.render({\n kind: 'validate',\n render: this.results.map(function (result) { return ({ result: result, elements: _this.elements.get(result) }); }),\n unrender: []\n });\n };\n /**\n * Removes a renderer.\n * @param renderer The renderer.\n */\n ValidationController.prototype.removeRenderer = function (renderer) {\n var _this = this;\n this.renderers.splice(this.renderers.indexOf(renderer), 1);\n renderer.render({\n kind: 'reset',\n render: [],\n unrender: this.results.map(function (result) { return ({ result: result, elements: _this.elements.get(result) }); })\n });\n };\n /**\n * Registers a binding with the controller.\n * @param binding The binding instance.\n * @param target The DOM element.\n * @param rules (optional) rules associated with the binding. Validator implementation specific.\n */\n ValidationController.prototype.registerBinding = function (binding, target, rules) {\n this.bindings.set(binding, { target: target, rules: rules, propertyInfo: null });\n };\n /**\n * Unregisters a binding with the controller.\n * @param binding The binding instance.\n */\n ValidationController.prototype.unregisterBinding = function (binding) {\n this.resetBinding(binding);\n this.bindings.delete(binding);\n };\n /**\n * Interprets the instruction and returns a predicate that will identify\n * relevant results in the list of rendered validation results.\n */\n ValidationController.prototype.getInstructionPredicate = function (instruction) {\n var _this = this;\n if (instruction) {\n var object_1 = instruction.object, propertyName_1 = instruction.propertyName, rules_1 = instruction.rules;\n var predicate_1;\n if (instruction.propertyName) {\n predicate_1 = function (x) { return x.object === object_1 && x.propertyName === propertyName_1; };\n }\n else {\n predicate_1 = function (x) { return x.object === object_1; };\n }\n if (rules_1) {\n return function (x) { return predicate_1(x) && _this.validator.ruleExists(rules_1, x.rule); };\n }\n return predicate_1;\n }\n else {\n return function () { return true; };\n }\n };\n /**\n * Validates and renders results.\n * @param instruction Optional. Instructions on what to validate. If undefined, all\n * objects and bindings will be validated.\n */\n ValidationController.prototype.validate = function (instruction) {\n var _this = this;\n // Get a function that will process the validation instruction.\n var execute;\n if (instruction) {\n // tslint:disable-next-line:prefer-const\n var object_2 = instruction.object, propertyName_2 = instruction.propertyName, rules_2 = instruction.rules;\n // if rules were not specified, check the object map.\n rules_2 = rules_2 || this.objects.get(object_2);\n // property specified?\n if (instruction.propertyName === undefined) {\n // validate the specified object.\n execute = function () { return _this.validator.validateObject(object_2, rules_2); };\n }\n else {\n // validate the specified property.\n execute = function () { return _this.validator.validateProperty(object_2, propertyName_2, rules_2); };\n }\n }\n else {\n // validate all objects and bindings.\n execute = function () {\n var promises = [];\n for (var _i = 0, _a = Array.from(_this.objects); _i < _a.length; _i++) {\n var _b = _a[_i], object = _b[0], rules = _b[1];\n promises.push(_this.validator.validateObject(object, rules));\n }\n for (var _c = 0, _d = Array.from(_this.bindings); _c < _d.length; _c++) {\n var _e = _d[_c], binding = _e[0], rules = _e[1].rules;\n var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source);\n if (!propertyInfo || _this.objects.has(propertyInfo.object)) {\n continue;\n }\n promises.push(_this.validator.validateProperty(propertyInfo.object, propertyInfo.propertyName, rules));\n }\n return Promise.all(promises).then(function (resultSets) { return resultSets.reduce(function (a, b) { return a.concat(b); }, []); });\n };\n }\n // Wait for any existing validation to finish, execute the instruction, render the results.\n this.validating = true;\n var returnPromise = this.finishValidating\n .then(execute)\n .then(function (newResults) {\n var predicate = _this.getInstructionPredicate(instruction);\n var oldResults = _this.results.filter(predicate);\n _this.processResultDelta('validate', oldResults, newResults);\n if (returnPromise === _this.finishValidating) {\n _this.validating = false;\n }\n var result = {\n instruction: instruction,\n valid: newResults.find(function (x) { return !x.valid; }) === undefined,\n results: newResults\n };\n _this.invokeCallbacks(instruction, result);\n return result;\n })\n .catch(function (exception) {\n // recover, to enable subsequent calls to validate()\n _this.validating = false;\n _this.finishValidating = Promise.resolve();\n return Promise.reject(exception);\n });\n this.finishValidating = returnPromise;\n return returnPromise;\n };\n /**\n * Resets any rendered validation results (unrenders).\n * @param instruction Optional. Instructions on what to reset. If unspecified all rendered results\n * will be unrendered.\n */\n ValidationController.prototype.reset = function (instruction) {\n var predicate = this.getInstructionPredicate(instruction);\n var oldResults = this.results.filter(predicate);\n this.processResultDelta('reset', oldResults, []);\n this.invokeCallbacks(instruction, null);\n };\n /**\n * Gets the elements associated with an object and propertyName (if any).\n */\n ValidationController.prototype.getAssociatedElements = function (_a) {\n var object = _a.object, propertyName = _a.propertyName;\n var elements = [];\n for (var _i = 0, _b = Array.from(this.bindings); _i < _b.length; _i++) {\n var _c = _b[_i], binding = _c[0], target = _c[1].target;\n var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source);\n if (propertyInfo && propertyInfo.object === object && propertyInfo.propertyName === propertyName) {\n elements.push(target);\n }\n }\n return elements;\n };\n ValidationController.prototype.processResultDelta = function (kind, oldResults, newResults) {\n // prepare the instruction.\n var instruction = {\n kind: kind,\n render: [],\n unrender: []\n };\n // create a shallow copy of newResults so we can mutate it without causing side-effects.\n newResults = newResults.slice(0);\n var _loop_1 = function (oldResult) {\n // get the elements associated with the old result.\n var elements = this_1.elements.get(oldResult);\n // remove the old result from the element map.\n this_1.elements.delete(oldResult);\n // create the unrender instruction.\n instruction.unrender.push({ result: oldResult, elements: elements });\n // determine if there's a corresponding new result for the old result we are unrendering.\n var newResultIndex = newResults.findIndex(function (x) { return x.rule === oldResult.rule && x.object === oldResult.object && x.propertyName === oldResult.propertyName; });\n if (newResultIndex === -1) {\n // no corresponding new result... simple remove.\n this_1.results.splice(this_1.results.indexOf(oldResult), 1);\n if (!oldResult.valid) {\n this_1.errors.splice(this_1.errors.indexOf(oldResult), 1);\n }\n }\n else {\n // there is a corresponding new result...\n var newResult = newResults.splice(newResultIndex, 1)[0];\n // get the elements that are associated with the new result.\n var elements_1 = this_1.getAssociatedElements(newResult);\n this_1.elements.set(newResult, elements_1);\n // create a render instruction for the new result.\n instruction.render.push({ result: newResult, elements: elements_1 });\n // do an in-place replacement of the old result with the new result.\n // this ensures any repeats bound to this.results will not thrash.\n this_1.results.splice(this_1.results.indexOf(oldResult), 1, newResult);\n if (!oldResult.valid && newResult.valid) {\n this_1.errors.splice(this_1.errors.indexOf(oldResult), 1);\n }\n else if (!oldResult.valid && !newResult.valid) {\n this_1.errors.splice(this_1.errors.indexOf(oldResult), 1, newResult);\n }\n else if (!newResult.valid) {\n this_1.errors.push(newResult);\n }\n }\n };\n var this_1 = this;\n // create unrender instructions from the old results.\n for (var _i = 0, oldResults_1 = oldResults; _i < oldResults_1.length; _i++) {\n var oldResult = oldResults_1[_i];\n _loop_1(oldResult);\n }\n // create render instructions from the remaining new results.\n for (var _a = 0, newResults_1 = newResults; _a < newResults_1.length; _a++) {\n var result = newResults_1[_a];\n var elements = this.getAssociatedElements(result);\n instruction.render.push({ result: result, elements: elements });\n this.elements.set(result, elements);\n this.results.push(result);\n if (!result.valid) {\n this.errors.push(result);\n }\n }\n // render.\n for (var _b = 0, _c = this.renderers; _b < _c.length; _b++) {\n var renderer = _c[_b];\n renderer.render(instruction);\n }\n };\n /**\n * Validates the property associated with a binding.\n */\n ValidationController.prototype.validateBinding = function (binding) {\n if (!binding.isBound) {\n return;\n }\n var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source);\n var rules;\n var registeredBinding = this.bindings.get(binding);\n if (registeredBinding) {\n rules = registeredBinding.rules;\n registeredBinding.propertyInfo = propertyInfo;\n }\n if (!propertyInfo) {\n return;\n }\n var object = propertyInfo.object, propertyName = propertyInfo.propertyName;\n this.validate({ object: object, propertyName: propertyName, rules: rules });\n };\n /**\n * Resets the results for a property associated with a binding.\n */\n ValidationController.prototype.resetBinding = function (binding) {\n var registeredBinding = this.bindings.get(binding);\n var propertyInfo = getPropertyInfo(binding.sourceExpression, binding.source);\n if (!propertyInfo && registeredBinding) {\n propertyInfo = registeredBinding.propertyInfo;\n }\n if (registeredBinding) {\n registeredBinding.propertyInfo = null;\n }\n if (!propertyInfo) {\n return;\n }\n var object = propertyInfo.object, propertyName = propertyInfo.propertyName;\n this.reset({ object: object, propertyName: propertyName });\n };\n /**\n * Changes the controller's validateTrigger.\n * @param newTrigger The new validateTrigger\n */\n ValidationController.prototype.changeTrigger = function (newTrigger) {\n this.validateTrigger = newTrigger;\n var bindings = Array.from(this.bindings.keys());\n for (var _i = 0, bindings_1 = bindings; _i < bindings_1.length; _i++) {\n var binding = bindings_1[_i];\n var source = binding.source;\n binding.unbind();\n binding.bind(source);\n }\n };\n /**\n * Revalidates the controller's current set of errors.\n */\n ValidationController.prototype.revalidateErrors = function () {\n for (var _i = 0, _a = this.errors; _i < _a.length; _i++) {\n var _b = _a[_i], object = _b.object, propertyName = _b.propertyName, rule = _b.rule;\n if (rule.__manuallyAdded__) {\n continue;\n }\n var rules = [[rule]];\n this.validate({ object: object, propertyName: propertyName, rules: rules });\n }\n };\n ValidationController.prototype.invokeCallbacks = function (instruction, result) {\n if (this.eventCallbacks.length === 0) {\n return;\n }\n var event = new ValidateEvent(result ? 'validate' : 'reset', this.errors, this.results, instruction || null, result);\n for (var i = 0; i < this.eventCallbacks.length; i++) {\n this.eventCallbacks[i](event);\n }\n };\n ValidationController.inject = [Validator, PropertyAccessorParser];\n return ValidationController;\n}());\nexport { ValidationController };\n","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nimport 'aurelia-polyfills';\nimport { PLATFORM, isInitialized } from 'aurelia-pal';\n\nvar bootstrapPromises = [];\nvar startResolve = void 0;\n\nvar startPromise = new Promise(function (resolve) {\n return startResolve = resolve;\n});\nvar host = PLATFORM.global;\nvar isNodeLike = typeof process !== 'undefined' && !process.browser;\n\nfunction ready() {\n if (!host.document || host.document.readyState === 'complete') {\n return Promise.resolve();\n }\n\n return new Promise(function (resolve) {\n host.document.addEventListener('DOMContentLoaded', completed);\n host.addEventListener('load', completed);\n\n function completed() {\n host.document.removeEventListener('DOMContentLoaded', completed);\n host.removeEventListener('load', completed);\n resolve();\n }\n });\n}\n\nfunction createLoader() {\n if (PLATFORM.Loader) {\n return Promise.resolve(new PLATFORM.Loader());\n }\n\n if (typeof AURELIA_WEBPACK_2_0 === 'undefined') {\n if (typeof __webpack_require__ !== 'undefined') {\n var m = __webpack_require__(require.resolve('aurelia-loader-webpack'));\n return Promise.resolve(new m.WebpackLoader());\n }\n\n if (host.System && typeof host.System.config === 'function') {\n return host.System.normalize('aurelia-bootstrapper').then(function (bsn) {\n return host.System.normalize('aurelia-loader-default', bsn);\n }).then(function (loaderName) {\n return host.System.import(loaderName).then(function (m) {\n return new m.DefaultLoader();\n });\n });\n }\n\n if (typeof host.require === 'function' && typeof host.define === 'function' && _typeof(host.define.amd) === 'object') {\n return new Promise(function (resolve, reject) {\n return host.require(['aurelia-loader-default'], function (m) {\n return resolve(new m.DefaultLoader());\n }, reject);\n });\n }\n\n if (isNodeLike && typeof module !== 'undefined' && typeof module.require !== 'undefined') {\n var _m = module.require('aurelia-loader-nodejs');\n return Promise.resolve(new _m.NodeJsLoader());\n }\n }\n\n return Promise.reject('No PLATFORM.Loader is defined and there is neither a System API (ES6) or a Require API (AMD) globally available to load your app.');\n}\n\nfunction initializePal(loader) {\n if (isInitialized) return Promise.resolve();\n\n var type = void 0;\n\n var isRenderer = isNodeLike && (process.type === 'renderer' || process.versions['node-webkit']);\n\n if (isNodeLike && !isRenderer) {\n type = 'nodejs';\n } else if (typeof window !== 'undefined') {\n type = 'browser';\n } else if (typeof self !== 'undefined') {\n type = 'worker';\n } else {\n throw new Error('Could not determine platform implementation to load.');\n }\n\n return loader.loadModule('aurelia-pal-' + type).then(function (palModule) {\n return type === 'nodejs' && !isInitialized && palModule.globalize() || palModule.initialize();\n });\n}\n\nfunction preparePlatform(loader) {\n var map = function map(moduleId, relativeTo) {\n return loader.normalize(moduleId, relativeTo).then(function (normalized) {\n loader.map(moduleId, normalized);\n return normalized;\n });\n };\n\n return initializePal(loader).then(function () {\n return loader.normalize('aurelia-bootstrapper');\n }).then(function (bootstrapperName) {\n var frameworkPromise = map(PLATFORM.moduleName('aurelia-framework', { exports: ['Aurelia'] }), bootstrapperName);\n\n return Promise.all([frameworkPromise, frameworkPromise.then(function (frameworkName) {\n return map('aurelia-dependency-injection', frameworkName);\n }), map('aurelia-router', bootstrapperName), map('aurelia-logging-console', bootstrapperName)]);\n }).then(function (_ref) {\n var frameworkName = _ref[0];\n return loader.loadModule(frameworkName);\n }).then(function (fx) {\n return startResolve(function () {\n return new fx.Aurelia(loader);\n });\n });\n}\n\nfunction config(appHost, configModuleId, aurelia) {\n aurelia.host = appHost;\n aurelia.configModuleId = configModuleId || null;\n\n if (configModuleId) {\n return aurelia.loader.loadModule(configModuleId).then(function (customConfig) {\n if (!customConfig.configure) {\n throw new Error('Cannot initialize module \\'' + configModuleId + '\\' without a configure function.');\n }\n\n return customConfig.configure(aurelia);\n });\n }\n\n aurelia.use.standardConfiguration().developmentLogging();\n\n return aurelia.start().then(function () {\n return aurelia.setRoot();\n });\n}\n\nfunction run() {\n return ready().then(createLoader).then(preparePlatform).then(function () {\n var appHosts = host.document.querySelectorAll('[aurelia-app],[data-aurelia-app]');\n for (var i = 0, ii = appHosts.length; i < ii; ++i) {\n var appHost = appHosts[i];\n var moduleId = appHost.getAttribute('aurelia-app') || appHost.getAttribute('data-aurelia-app');\n bootstrap(config.bind(null, appHost, moduleId));\n }\n\n var toConsole = console.error.bind(console);\n var bootstraps = bootstrapPromises.map(function (p) {\n return p.catch(toConsole);\n });\n bootstrapPromises = null;\n return Promise.all(bootstraps);\n });\n}\n\nexport function bootstrap(configure) {\n var p = startPromise.then(function (factory) {\n return configure(factory());\n });\n if (bootstrapPromises) bootstrapPromises.push(p);\n return p;\n}\n\nexport var starting = run();","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nimport { PLATFORM } from 'aurelia-pal';\n\nif (typeof FEATURE_NO_ES2015 === 'undefined') {\n\n (function (Object, GOPS) {\n 'use strict';\n\n if (GOPS in Object) return;\n\n var setDescriptor,\n G = PLATFORM.global,\n id = 0,\n random = '' + Math.random(),\n prefix = '__\\x01symbol:',\n prefixLength = prefix.length,\n internalSymbol = '__\\x01symbol@@' + random,\n DP = 'defineProperty',\n DPies = 'defineProperties',\n GOPN = 'getOwnPropertyNames',\n GOPD = 'getOwnPropertyDescriptor',\n PIE = 'propertyIsEnumerable',\n gOPN = Object[GOPN],\n gOPD = Object[GOPD],\n create = Object.create,\n keys = Object.keys,\n defineProperty = Object[DP],\n $defineProperties = Object[DPies],\n descriptor = gOPD(Object, GOPN),\n ObjectProto = Object.prototype,\n hOP = ObjectProto.hasOwnProperty,\n pIE = ObjectProto[PIE],\n toString = ObjectProto.toString,\n indexOf = Array.prototype.indexOf || function (v) {\n for (var i = this.length; i-- && this[i] !== v;) {}\n return i;\n },\n addInternalIfNeeded = function addInternalIfNeeded(o, uid, enumerable) {\n if (!hOP.call(o, internalSymbol)) {\n defineProperty(o, internalSymbol, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: {}\n });\n }\n o[internalSymbol]['@@' + uid] = enumerable;\n },\n createWithSymbols = function createWithSymbols(proto, descriptors) {\n var self = create(proto);\n if (descriptors !== null && (typeof descriptors === 'undefined' ? 'undefined' : _typeof(descriptors)) === 'object') {\n gOPN(descriptors).forEach(function (key) {\n if (propertyIsEnumerable.call(descriptors, key)) {\n $defineProperty(self, key, descriptors[key]);\n }\n });\n }\n return self;\n },\n copyAsNonEnumerable = function copyAsNonEnumerable(descriptor) {\n var newDescriptor = create(descriptor);\n newDescriptor.enumerable = false;\n return newDescriptor;\n },\n get = function get() {},\n onlyNonSymbols = function onlyNonSymbols(name) {\n return name != internalSymbol && !hOP.call(source, name);\n },\n onlySymbols = function onlySymbols(name) {\n return name != internalSymbol && hOP.call(source, name);\n },\n propertyIsEnumerable = function propertyIsEnumerable(key) {\n var uid = '' + key;\n return onlySymbols(uid) ? hOP.call(this, uid) && this[internalSymbol] && this[internalSymbol]['@@' + uid] : pIE.call(this, key);\n },\n setAndGetSymbol = function setAndGetSymbol(uid) {\n var descriptor = {\n enumerable: false,\n configurable: true,\n get: get,\n set: function set(value) {\n setDescriptor(this, uid, {\n enumerable: false,\n configurable: true,\n writable: true,\n value: value\n });\n addInternalIfNeeded(this, uid, true);\n }\n };\n defineProperty(ObjectProto, uid, descriptor);\n return source[uid] = defineProperty(Object(uid), 'constructor', sourceConstructor);\n },\n _Symbol = function _Symbol2(description) {\n if (this && this !== G) {\n throw new TypeError('Symbol is not a constructor');\n }\n return setAndGetSymbol(prefix.concat(description || '', random, ++id));\n },\n source = create(null),\n sourceConstructor = { value: _Symbol },\n sourceMap = function sourceMap(uid) {\n return source[uid];\n },\n $defineProperty = function defineProp(o, key, descriptor) {\n var uid = '' + key;\n if (onlySymbols(uid)) {\n setDescriptor(o, uid, descriptor.enumerable ? copyAsNonEnumerable(descriptor) : descriptor);\n addInternalIfNeeded(o, uid, !!descriptor.enumerable);\n } else {\n defineProperty(o, key, descriptor);\n }\n return o;\n },\n $getOwnPropertySymbols = function getOwnPropertySymbols(o) {\n var cof = toString.call(o);\n o = cof === '[object String]' ? o.split('') : Object(o);\n return gOPN(o).filter(onlySymbols).map(sourceMap);\n };\n\n descriptor.value = $defineProperty;\n defineProperty(Object, DP, descriptor);\n\n descriptor.value = $getOwnPropertySymbols;\n defineProperty(Object, GOPS, descriptor);\n\n var cachedWindowNames = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' ? Object.getOwnPropertyNames(window) : [];\n var originalObjectGetOwnPropertyNames = Object.getOwnPropertyNames;\n descriptor.value = function getOwnPropertyNames(o) {\n if (toString.call(o) === '[object Window]') {\n try {\n return originalObjectGetOwnPropertyNames(o);\n } catch (e) {\n return [].concat([], cachedWindowNames);\n }\n }\n return gOPN(o).filter(onlyNonSymbols);\n };\n defineProperty(Object, GOPN, descriptor);\n\n descriptor.value = function defineProperties(o, descriptors) {\n var symbols = $getOwnPropertySymbols(descriptors);\n if (symbols.length) {\n keys(descriptors).concat(symbols).forEach(function (uid) {\n if (propertyIsEnumerable.call(descriptors, uid)) {\n $defineProperty(o, uid, descriptors[uid]);\n }\n });\n } else {\n $defineProperties(o, descriptors);\n }\n return o;\n };\n defineProperty(Object, DPies, descriptor);\n\n descriptor.value = propertyIsEnumerable;\n defineProperty(ObjectProto, PIE, descriptor);\n\n descriptor.value = _Symbol;\n defineProperty(G, 'Symbol', descriptor);\n\n descriptor.value = function (key) {\n var uid = prefix.concat(prefix, key, random);\n return uid in ObjectProto ? source[uid] : setAndGetSymbol(uid);\n };\n defineProperty(_Symbol, 'for', descriptor);\n\n descriptor.value = function (symbol) {\n return hOP.call(source, symbol) ? symbol.slice(prefixLength * 2, -random.length) : void 0;\n };\n defineProperty(_Symbol, 'keyFor', descriptor);\n\n descriptor.value = function getOwnPropertyDescriptor(o, key) {\n var descriptor = gOPD(o, key);\n if (descriptor && onlySymbols(key)) {\n descriptor.enumerable = propertyIsEnumerable.call(o, key);\n }\n return descriptor;\n };\n defineProperty(Object, GOPD, descriptor);\n\n descriptor.value = function (proto, descriptors) {\n return arguments.length === 1 ? create(proto) : createWithSymbols(proto, descriptors);\n };\n defineProperty(Object, 'create', descriptor);\n\n descriptor.value = function () {\n var str = toString.call(this);\n return str === '[object String]' && onlySymbols(this) ? '[object Symbol]' : str;\n };\n defineProperty(ObjectProto, 'toString', descriptor);\n\n try {\n setDescriptor = create(defineProperty({}, prefix, {\n get: function get() {\n return defineProperty(this, prefix, { value: false })[prefix];\n }\n }))[prefix] || defineProperty;\n } catch (o_O) {\n setDescriptor = function setDescriptor(o, key, descriptor) {\n var protoDescriptor = gOPD(ObjectProto, key);\n delete ObjectProto[key];\n defineProperty(o, key, descriptor);\n defineProperty(ObjectProto, key, protoDescriptor);\n };\n }\n })(Object, 'getOwnPropertySymbols');\n\n (function (O, S) {\n var dP = O.defineProperty,\n ObjectProto = O.prototype,\n toString = ObjectProto.toString,\n toStringTag = 'toStringTag',\n descriptor;\n ['iterator', 'match', 'replace', 'search', 'split', 'hasInstance', 'isConcatSpreadable', 'unscopables', 'species', 'toPrimitive', toStringTag].forEach(function (name) {\n if (!(name in Symbol)) {\n dP(Symbol, name, { value: Symbol(name) });\n switch (name) {\n case toStringTag:\n descriptor = O.getOwnPropertyDescriptor(ObjectProto, 'toString');\n descriptor.value = function () {\n var str = toString.call(this),\n tst = typeof this === 'undefined' || this === null ? undefined : this[Symbol.toStringTag];\n return typeof tst === 'undefined' ? str : '[object ' + tst + ']';\n };\n dP(ObjectProto, 'toString', descriptor);\n break;\n }\n }\n });\n })(Object, Symbol);\n\n (function (Si, AP, SP) {\n\n function returnThis() {\n return this;\n }\n\n if (!AP[Si]) AP[Si] = function () {\n var i = 0,\n self = this,\n iterator = {\n next: function next() {\n var done = self.length <= i;\n return done ? { done: done } : { done: done, value: self[i++] };\n }\n };\n iterator[Si] = returnThis;\n return iterator;\n };\n\n if (!SP[Si]) SP[Si] = function () {\n var fromCodePoint = String.fromCodePoint,\n self = this,\n i = 0,\n length = self.length,\n iterator = {\n next: function next() {\n var done = length <= i,\n c = done ? '' : fromCodePoint(self.codePointAt(i));\n i += c.length;\n return done ? { done: done } : { done: done, value: c };\n }\n };\n iterator[Si] = returnThis;\n return iterator;\n };\n })(Symbol.iterator, Array.prototype, String.prototype);\n}\n\nif (typeof FEATURE_NO_ES2015 === 'undefined') {\n\n Number.isNaN = Number.isNaN || function (value) {\n return value !== value;\n };\n\n Number.isFinite = Number.isFinite || function (value) {\n return typeof value === \"number\" && isFinite(value);\n };\n}\n\nif (!String.prototype.endsWith || function () {\n try {\n return !\"ab\".endsWith(\"a\", 1);\n } catch (e) {\n return true;\n }\n}()) {\n String.prototype.endsWith = function (searchString, position) {\n var subjectString = this.toString();\n if (typeof position !== 'number' || !isFinite(position) || Math.floor(position) !== position || position > subjectString.length) {\n position = subjectString.length;\n }\n position -= searchString.length;\n var lastIndex = subjectString.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n };\n}\n\nif (!String.prototype.startsWith || function () {\n try {\n return !\"ab\".startsWith(\"b\", 1);\n } catch (e) {\n return true;\n }\n}()) {\n String.prototype.startsWith = function (searchString, position) {\n position = position || 0;\n return this.substr(position, searchString.length) === searchString;\n };\n}\n\nif (typeof FEATURE_NO_ES2015 === 'undefined') {\n\n if (!Array.from) {\n Array.from = function () {\n var toInteger = function toInteger(it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? Math.floor : Math.ceil)(it);\n };\n var toLength = function toLength(it) {\n return it > 0 ? Math.min(toInteger(it), 0x1fffffffffffff) : 0;\n };\n var iterCall = function iterCall(iter, fn, val, index) {\n try {\n return fn(val, index);\n } catch (E) {\n if (typeof iter.return == 'function') iter.return();\n throw E;\n }\n };\n\n return function from(arrayLike) {\n var O = Object(arrayLike),\n C = typeof this == 'function' ? this : Array,\n aLen = arguments.length,\n mapfn = aLen > 1 ? arguments[1] : undefined,\n mapping = mapfn !== undefined,\n index = 0,\n iterFn = O[Symbol.iterator],\n length,\n result,\n step,\n iterator;\n if (mapping) mapfn = mapfn.bind(aLen > 2 ? arguments[2] : undefined);\n if (iterFn != undefined && !Array.isArray(arrayLike)) {\n for (iterator = iterFn.call(O), result = new C(); !(step = iterator.next()).done; index++) {\n result[index] = mapping ? iterCall(iterator, mapfn, step.value, index) : step.value;\n }\n } else {\n length = toLength(O.length);\n for (result = new C(length); length > index; index++) {\n result[index] = mapping ? mapfn(O[index], index) : O[index];\n }\n }\n result.length = index;\n return result;\n };\n }();\n }\n\n if (!Array.prototype.find) {\n Object.defineProperty(Array.prototype, 'find', {\n configurable: true,\n writable: true,\n enumerable: false,\n value: function value(predicate) {\n if (this === null) {\n throw new TypeError('Array.prototype.find called on null or undefined');\n }\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function');\n }\n var list = Object(this);\n var length = list.length >>> 0;\n var thisArg = arguments[1];\n var value;\n\n for (var i = 0; i < length; i++) {\n value = list[i];\n if (predicate.call(thisArg, value, i, list)) {\n return value;\n }\n }\n return undefined;\n }\n });\n }\n\n if (!Array.prototype.findIndex) {\n Object.defineProperty(Array.prototype, 'findIndex', {\n configurable: true,\n writable: true,\n enumerable: false,\n value: function value(predicate) {\n if (this === null) {\n throw new TypeError('Array.prototype.findIndex called on null or undefined');\n }\n if (typeof predicate !== 'function') {\n throw new TypeError('predicate must be a function');\n }\n var list = Object(this);\n var length = list.length >>> 0;\n var thisArg = arguments[1];\n var value;\n\n for (var i = 0; i < length; i++) {\n value = list[i];\n if (predicate.call(thisArg, value, i, list)) {\n return i;\n }\n }\n return -1;\n }\n });\n }\n}\n\nif (typeof FEATURE_NO_ES2016 === 'undefined' && !Array.prototype.includes) {\n Object.defineProperty(Array.prototype, 'includes', {\n configurable: true,\n writable: true,\n enumerable: false,\n value: function value(searchElement) {\n var O = Object(this);\n var len = parseInt(O.length) || 0;\n if (len === 0) {\n return false;\n }\n var n = parseInt(arguments[1]) || 0;\n var k;\n if (n >= 0) {\n k = n;\n } else {\n k = len + n;\n if (k < 0) {\n k = 0;\n }\n }\n var currentElement;\n while (k < len) {\n currentElement = O[k];\n if (searchElement === currentElement || searchElement !== searchElement && currentElement !== currentElement) {\n return true;\n }\n k++;\n }\n return false;\n }\n });\n}\n\nif (typeof FEATURE_NO_ES2015 === 'undefined') {\n\n (function () {\n var needsFix = false;\n\n try {\n var s = Object.keys('a');\n needsFix = s.length !== 1 || s[0] !== '0';\n } catch (e) {\n needsFix = true;\n }\n\n if (needsFix) {\n Object.keys = function () {\n var hasOwnProperty = Object.prototype.hasOwnProperty,\n hasDontEnumBug = !{ toString: null }.propertyIsEnumerable('toString'),\n dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'],\n dontEnumsLength = dontEnums.length;\n\n return function (obj) {\n if (obj === undefined || obj === null) {\n throw TypeError('Cannot convert undefined or null to object');\n }\n\n obj = Object(obj);\n\n var result = [],\n prop,\n i;\n\n for (prop in obj) {\n if (hasOwnProperty.call(obj, prop)) {\n result.push(prop);\n }\n }\n\n if (hasDontEnumBug) {\n for (i = 0; i < dontEnumsLength; i++) {\n if (hasOwnProperty.call(obj, dontEnums[i])) {\n result.push(dontEnums[i]);\n }\n }\n }\n\n return result;\n };\n }();\n }\n })();\n\n (function (O) {\n if ('assign' in O) {\n return;\n }\n\n O.defineProperty(O, 'assign', {\n configurable: true,\n writable: true,\n value: function () {\n var gOPS = O.getOwnPropertySymbols,\n pIE = O.propertyIsEnumerable,\n filterOS = gOPS ? function (self) {\n return gOPS(self).filter(pIE, self);\n } : function () {\n return Array.prototype;\n };\n\n return function assign(where) {\n if (gOPS && !(where instanceof O)) {\n console.warn('problematic Symbols', where);\n }\n\n function set(keyOrSymbol) {\n where[keyOrSymbol] = arg[keyOrSymbol];\n }\n\n for (var i = 1, ii = arguments.length; i < ii; ++i) {\n var arg = arguments[i];\n\n if (arg === null || arg === undefined) {\n continue;\n }\n\n O.keys(arg).concat(filterOS(arg)).forEach(set);\n }\n\n return where;\n };\n }()\n });\n })(Object);\n\n if (!Object.is) {\n Object.is = function (x, y) {\n if (x === y) {\n return x !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n };\n }\n}\n\nif (typeof FEATURE_NO_ES2015 === 'undefined') {\n\n (function (global) {\n var i;\n\n var defineProperty = Object.defineProperty,\n is = function is(a, b) {\n return a === b || a !== a && b !== b;\n };\n\n if (typeof WeakMap == 'undefined') {\n global.WeakMap = createCollection({\n 'delete': sharedDelete,\n\n clear: sharedClear,\n\n get: sharedGet,\n\n has: mapHas,\n\n set: sharedSet\n }, true);\n }\n\n if (typeof Map == 'undefined' || typeof new Map().values !== 'function' || !new Map().values().next) {\n var _createCollection;\n\n global.Map = createCollection((_createCollection = {\n 'delete': sharedDelete,\n\n has: mapHas,\n\n get: sharedGet,\n\n set: sharedSet,\n\n keys: sharedKeys,\n\n values: sharedValues,\n\n entries: mapEntries,\n\n forEach: sharedForEach,\n\n clear: sharedClear\n }, _createCollection[Symbol.iterator] = mapEntries, _createCollection));\n }\n\n if (typeof Set == 'undefined' || typeof new Set().values !== 'function' || !new Set().values().next) {\n var _createCollection2;\n\n global.Set = createCollection((_createCollection2 = {\n has: setHas,\n\n add: sharedAdd,\n\n 'delete': sharedDelete,\n\n clear: sharedClear,\n\n keys: sharedValues,\n values: sharedValues,\n\n entries: setEntries,\n\n forEach: sharedForEach\n }, _createCollection2[Symbol.iterator] = sharedValues, _createCollection2));\n }\n\n if (typeof WeakSet == 'undefined') {\n global.WeakSet = createCollection({\n 'delete': sharedDelete,\n\n add: sharedAdd,\n\n clear: sharedClear,\n\n has: setHas\n }, true);\n }\n\n function createCollection(proto, objectOnly) {\n function Collection(a) {\n if (!this || this.constructor !== Collection) return new Collection(a);\n this._keys = [];\n this._values = [];\n this._itp = [];\n this.objectOnly = objectOnly;\n\n if (a) init.call(this, a);\n }\n\n if (!objectOnly) {\n defineProperty(proto, 'size', {\n get: sharedSize\n });\n }\n\n proto.constructor = Collection;\n Collection.prototype = proto;\n\n return Collection;\n }\n\n function init(a) {\n var i;\n\n if (this.add) a.forEach(this.add, this);else a.forEach(function (a) {\n this.set(a[0], a[1]);\n }, this);\n }\n\n function sharedDelete(key) {\n if (this.has(key)) {\n this._keys.splice(i, 1);\n this._values.splice(i, 1);\n\n this._itp.forEach(function (p) {\n if (i < p[0]) p[0]--;\n });\n }\n\n return -1 < i;\n };\n\n function sharedGet(key) {\n return this.has(key) ? this._values[i] : undefined;\n }\n\n function has(list, key) {\n if (this.objectOnly && key !== Object(key)) throw new TypeError(\"Invalid value used as weak collection key\");\n\n if (key != key || key === 0) for (i = list.length; i-- && !is(list[i], key);) {} else i = list.indexOf(key);\n return -1 < i;\n }\n\n function setHas(value) {\n return has.call(this, this._values, value);\n }\n\n function mapHas(value) {\n return has.call(this, this._keys, value);\n }\n\n function sharedSet(key, value) {\n this.has(key) ? this._values[i] = value : this._values[this._keys.push(key) - 1] = value;\n return this;\n }\n\n function sharedAdd(value) {\n if (!this.has(value)) this._values.push(value);\n return this;\n }\n\n function sharedClear() {\n (this._keys || 0).length = this._values.length = 0;\n }\n\n function sharedKeys() {\n return sharedIterator(this._itp, this._keys);\n }\n\n function sharedValues() {\n return sharedIterator(this._itp, this._values);\n }\n\n function mapEntries() {\n return sharedIterator(this._itp, this._keys, this._values);\n }\n\n function setEntries() {\n return sharedIterator(this._itp, this._values, this._values);\n }\n\n function sharedIterator(itp, array, array2) {\n var _ref;\n\n var p = [0],\n done = false;\n itp.push(p);\n return _ref = {}, _ref[Symbol.iterator] = function () {\n return this;\n }, _ref.next = function next() {\n var v,\n k = p[0];\n if (!done && k < array.length) {\n v = array2 ? [array[k], array2[k]] : array[k];\n p[0]++;\n } else {\n done = true;\n itp.splice(itp.indexOf(p), 1);\n }\n return { done: done, value: v };\n }, _ref;\n }\n\n function sharedSize() {\n return this._values.length;\n }\n\n function sharedForEach(callback, context) {\n var it = this.entries();\n for (;;) {\n var r = it.next();\n if (r.done) break;\n callback.call(context, r.value[1], r.value[0], this);\n }\n }\n })(PLATFORM.global);\n}\n\nif (typeof FEATURE_NO_ES2015 === 'undefined') {\n\n var bind = Function.prototype.bind;\n\n if (typeof PLATFORM.global.Reflect === 'undefined') {\n PLATFORM.global.Reflect = {};\n }\n\n if (typeof Reflect.defineProperty !== 'function') {\n Reflect.defineProperty = function (target, propertyKey, descriptor) {\n if ((typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' ? target === null : typeof target !== 'function') {\n throw new TypeError('Reflect.defineProperty called on non-object');\n }\n try {\n Object.defineProperty(target, propertyKey, descriptor);\n return true;\n } catch (e) {\n return false;\n }\n };\n }\n\n if (typeof Reflect.construct !== 'function') {\n Reflect.construct = function (Target, args) {\n if (args) {\n switch (args.length) {\n case 0:\n return new Target();\n case 1:\n return new Target(args[0]);\n case 2:\n return new Target(args[0], args[1]);\n case 3:\n return new Target(args[0], args[1], args[2]);\n case 4:\n return new Target(args[0], args[1], args[2], args[3]);\n }\n }\n\n var a = [null];\n a.push.apply(a, args);\n return new (bind.apply(Target, a))();\n };\n }\n\n if (typeof Reflect.ownKeys !== 'function') {\n Reflect.ownKeys = function (o) {\n return Object.getOwnPropertyNames(o).concat(Object.getOwnPropertySymbols(o));\n };\n }\n}\n\nif (typeof FEATURE_NO_ESNEXT === 'undefined') {\n\n var emptyMetadata = Object.freeze({});\n var metadataContainerKey = '__metadata__';\n\n if (typeof Reflect.getOwnMetadata !== 'function') {\n Reflect.getOwnMetadata = function (metadataKey, target, targetKey) {\n if (target.hasOwnProperty(metadataContainerKey)) {\n return (target[metadataContainerKey][targetKey] || emptyMetadata)[metadataKey];\n }\n };\n }\n\n if (typeof Reflect.defineMetadata !== 'function') {\n Reflect.defineMetadata = function (metadataKey, metadataValue, target, targetKey) {\n var metadataContainer = target.hasOwnProperty(metadataContainerKey) ? target[metadataContainerKey] : target[metadataContainerKey] = {};\n var targetContainer = metadataContainer[targetKey] || (metadataContainer[targetKey] = {});\n targetContainer[metadataKey] = metadataValue;\n };\n }\n\n if (typeof Reflect.metadata !== 'function') {\n Reflect.metadata = function (metadataKey, metadataValue) {\n return function (target, targetKey) {\n Reflect.defineMetadata(metadataKey, metadataValue, target, targetKey);\n };\n };\n }\n}","/**\n * Validates objects and properties.\n */\nvar Validator = (function () {\n function Validator() {\n }\n return Validator;\n}());\nexport { Validator };\n","import { Renderer } from './renderer';\nimport { invokeLifecycle } from './lifecycle';\nimport { createDialogCloseError } from './dialog-close-error';\nimport { createDialogCancelError } from './dialog-cancel-error';\n/**\n * A controller object for a Dialog instance.\n */\nvar DialogController = /** @class */ (function () {\n /**\n * Creates an instance of DialogController.\n */\n function DialogController(renderer, settings, resolve, reject) {\n this.resolve = resolve;\n this.reject = reject;\n this.settings = settings;\n this.renderer = renderer;\n }\n /**\n * @internal\n */\n DialogController.prototype.releaseResources = function (result) {\n var _this = this;\n return invokeLifecycle(this.controller.viewModel || {}, 'deactivate', result)\n .then(function () { return _this.renderer.hideDialog(_this); })\n .then(function () { _this.controller.unbind(); });\n };\n /**\n * @internal\n */\n DialogController.prototype.cancelOperation = function () {\n if (!this.settings.rejectOnCancel) {\n return { wasCancelled: true };\n }\n throw createDialogCancelError();\n };\n /**\n * Closes the dialog with a successful output.\n * @param output The returned success output.\n */\n DialogController.prototype.ok = function (output) {\n return this.close(true, output);\n };\n /**\n * Closes the dialog with a cancel output.\n * @param output The returned cancel output.\n */\n DialogController.prototype.cancel = function (output) {\n return this.close(false, output);\n };\n /**\n * Closes the dialog with an error output.\n * @param output A reason for closing with an error.\n * @returns Promise An empty promise object.\n */\n DialogController.prototype.error = function (output) {\n var _this = this;\n var closeError = createDialogCloseError(output);\n return this.releaseResources(closeError).then(function () { _this.reject(closeError); });\n };\n /**\n * Closes the dialog.\n * @param ok Whether or not the user input signified success.\n * @param output The specified output.\n * @returns Promise An empty promise object.\n */\n DialogController.prototype.close = function (ok, output) {\n var _this = this;\n if (this.closePromise) {\n return this.closePromise;\n }\n var dialogResult = { wasCancelled: !ok, output: output };\n return this.closePromise = invokeLifecycle(this.controller.viewModel || {}, 'canDeactivate', dialogResult)\n .catch(function (reason) {\n _this.closePromise = undefined;\n return Promise.reject(reason);\n }).then(function (canDeactivate) {\n if (!canDeactivate) {\n _this.closePromise = undefined; // we are done, do not block consecutive calls\n return _this.cancelOperation();\n }\n return _this.releaseResources(dialogResult).then(function () {\n if (!_this.settings.rejectOnCancel || ok) {\n _this.resolve(dialogResult);\n }\n else {\n _this.reject(createDialogCancelError(output));\n }\n return { wasCancelled: false };\n }).catch(function (reason) {\n _this.closePromise = undefined;\n return Promise.reject(reason);\n });\n });\n };\n /**\n * @internal\n */\n // tslint:disable-next-line:member-ordering\n DialogController.inject = [Renderer];\n return DialogController;\n}());\nexport { DialogController };\n","import { Parser, AccessMember, AccessScope } from 'aurelia-binding';\nimport { isString } from './util';\nvar PropertyAccessorParser = (function () {\n function PropertyAccessorParser(parser) {\n this.parser = parser;\n }\n PropertyAccessorParser.prototype.parse = function (property) {\n if (isString(property)) {\n return property;\n }\n var accessorText = getAccessorExpression(property.toString());\n var accessor = this.parser.parse(accessorText);\n if (accessor instanceof AccessScope\n || accessor instanceof AccessMember && accessor.object instanceof AccessScope) {\n return accessor.name;\n }\n throw new Error(\"Invalid property expression: \\\"\" + accessor + \"\\\"\");\n };\n PropertyAccessorParser.inject = [Parser];\n return PropertyAccessorParser;\n}());\nexport { PropertyAccessorParser };\nexport function getAccessorExpression(fn) {\n /* tslint:disable:max-line-length */\n var classic = /^function\\s*\\([$_\\w\\d]+\\)\\s*\\{(?:\\s*\"use strict\";)?\\s*(?:[$_\\w\\d.['\"\\]+;]+)?\\s*return\\s+[$_\\w\\d]+\\.([$_\\w\\d]+)\\s*;?\\s*\\}$/;\n /* tslint:enable:max-line-length */\n var arrow = /^\\(?[$_\\w\\d]+\\)?\\s*=>\\s*[$_\\w\\d]+\\.([$_\\w\\d]+)$/;\n var match = classic.exec(fn) || arrow.exec(fn);\n if (match === null) {\n throw new Error(\"Unable to parse accessor function:\\n\" + fn);\n }\n return match[1];\n}\n","/**\n * Sets, unsets and retrieves rules on an object or constructor function.\n */\nvar Rules = (function () {\n function Rules() {\n }\n /**\n * Applies the rules to a target.\n */\n Rules.set = function (target, rules) {\n if (target instanceof Function) {\n target = target.prototype;\n }\n Object.defineProperty(target, Rules.key, { enumerable: false, configurable: false, writable: true, value: rules });\n };\n /**\n * Removes rules from a target.\n */\n Rules.unset = function (target) {\n if (target instanceof Function) {\n target = target.prototype;\n }\n target[Rules.key] = null;\n };\n /**\n * Retrieves the target's rules.\n */\n Rules.get = function (target) {\n return target[Rules.key] || null;\n };\n /**\n * The name of the property that stores the rules.\n */\n Rules.key = '__rules__';\n return Rules;\n}());\nexport { Rules };\n","/**\n * @internal\n */\nexport function createDialogCancelError(output) {\n var error = new Error('Operation cancelled.');\n error.wasCancelled = true;\n error.output = output;\n return error;\n}\n","import { AccessMember, AccessScope, AccessKeyed, BindingBehavior, ValueConverter, getContextFor } from 'aurelia-binding';\nfunction getObject(expression, objectExpression, source) {\n var value = objectExpression.evaluate(source, null);\n if (value === null || value === undefined || value instanceof Object) {\n return value;\n }\n // tslint:disable-next-line:max-line-length\n throw new Error(\"The '\" + objectExpression + \"' part of '\" + expression + \"' evaluates to \" + value + \" instead of an object, null or undefined.\");\n}\n/**\n * Retrieves the object and property name for the specified expression.\n * @param expression The expression\n * @param source The scope\n */\nexport function getPropertyInfo(expression, source) {\n var originalExpression = expression;\n while (expression instanceof BindingBehavior || expression instanceof ValueConverter) {\n expression = expression.expression;\n }\n var object;\n var propertyName;\n if (expression instanceof AccessScope) {\n object = getContextFor(expression.name, source, expression.ancestor);\n propertyName = expression.name;\n }\n else if (expression instanceof AccessMember) {\n object = getObject(originalExpression, expression.object, source);\n propertyName = expression.name;\n }\n else if (expression instanceof AccessKeyed) {\n object = getObject(originalExpression, expression.object, source);\n propertyName = expression.key.evaluate(source);\n }\n else {\n throw new Error(\"Expression '\" + originalExpression + \"' is not compatible with the validate binding-behavior.\");\n }\n if (object === null || object === undefined) {\n return null;\n }\n return { object: object, propertyName: propertyName };\n}\n","/**\n * The result of validating an individual validation rule.\n */\nvar ValidateResult = (function () {\n /**\n * @param rule The rule associated with the result. Validator implementation specific.\n * @param object The object that was validated.\n * @param propertyName The name of the property that was validated.\n * @param error The error, if the result is a validation error.\n */\n function ValidateResult(rule, object, propertyName, valid, message) {\n if (message === void 0) { message = null; }\n this.rule = rule;\n this.object = object;\n this.propertyName = propertyName;\n this.valid = valid;\n this.message = message;\n this.id = ValidateResult.nextId++;\n }\n ValidateResult.prototype.toString = function () {\n return this.valid ? 'Valid.' : this.message;\n };\n ValidateResult.nextId = 0;\n return ValidateResult;\n}());\nexport { ValidateResult };\n","import { ValidationMessageParser } from './validation-message-parser';\n/**\n * Dictionary of validation messages. [messageKey]: messageExpression\n */\nexport var validationMessages = {\n /**\n * The default validation message. Used with rules that have no standard message.\n */\n default: \"${$displayName} is invalid.\",\n required: \"${$displayName} is required.\",\n matches: \"${$displayName} is not correctly formatted.\",\n email: \"${$displayName} is not a valid email.\",\n minLength: \"${$displayName} must be at least ${$config.length} character${$config.length === 1 ? '' : 's'}.\",\n maxLength: \"${$displayName} cannot be longer than ${$config.length} character${$config.length === 1 ? '' : 's'}.\",\n minItems: \"${$displayName} must contain at least ${$config.count} item${$config.count === 1 ? '' : 's'}.\",\n maxItems: \"${$displayName} cannot contain more than ${$config.count} item${$config.count === 1 ? '' : 's'}.\",\n equals: \"${$displayName} must be ${$config.expectedValue}.\",\n};\n/**\n * Retrieves validation messages and property display names.\n */\nvar ValidationMessageProvider = (function () {\n function ValidationMessageProvider(parser) {\n this.parser = parser;\n }\n /**\n * Returns a message binding expression that corresponds to the key.\n * @param key The message key.\n */\n ValidationMessageProvider.prototype.getMessage = function (key) {\n var message;\n if (key in validationMessages) {\n message = validationMessages[key];\n }\n else {\n message = validationMessages['default'];\n }\n return this.parser.parse(message);\n };\n /**\n * Formulates a property display name using the property name and the configured\n * displayName (if provided).\n * Override this with your own custom logic.\n * @param propertyName The property name.\n */\n ValidationMessageProvider.prototype.getDisplayName = function (propertyName, displayName) {\n if (displayName !== null && displayName !== undefined) {\n return (displayName instanceof Function) ? displayName() : displayName;\n }\n // split on upper-case letters.\n var words = propertyName.split(/(?=[A-Z])/).join(' ');\n // capitalize first letter.\n return words.charAt(0).toUpperCase() + words.slice(1);\n };\n ValidationMessageProvider.inject = [ValidationMessageParser];\n return ValidationMessageProvider;\n}());\nexport { ValidationMessageProvider };\n","/**\n * An abstract base class for implementors of the basic Renderer API.\n */\nvar Renderer = /** @class */ (function () {\n function Renderer() {\n }\n /**\n * Gets an anchor for the ViewSlot to insert a view into.\n * @returns A DOM element.\n */\n Renderer.prototype.getDialogContainer = function () {\n throw new Error('DialogRenderer must implement getDialogContainer().');\n };\n /**\n * Displays the dialog.\n * @returns Promise A promise that resolves when the dialog has been displayed.\n */\n Renderer.prototype.showDialog = function (dialogController) {\n throw new Error('DialogRenderer must implement showDialog().');\n };\n /**\n * Hides the dialog.\n * @returns Promise A promise that resolves when the dialog has been hidden.\n */\n Renderer.prototype.hideDialog = function (dialogController) {\n throw new Error('DialogRenderer must implement hideDialog().');\n };\n return Renderer;\n}());\nexport { Renderer };\n","/**\n * @internal\n */\nvar DefaultDialogSettings = /** @class */ (function () {\n function DefaultDialogSettings() {\n this.lock = true;\n this.startingZIndex = 1000;\n this.centerHorizontalOnly = false;\n this.rejectOnCancel = false;\n this.ignoreTransitions = false;\n }\n return DefaultDialogSettings;\n}());\nexport { DefaultDialogSettings };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { LiteralString, Binary, Conditional, LiteralPrimitive, CallMember } from 'aurelia-binding';\nimport { BindingLanguage } from 'aurelia-templating';\nimport * as LogManager from 'aurelia-logging';\nimport { ExpressionVisitor } from './expression-visitor';\nvar ValidationMessageParser = (function () {\n function ValidationMessageParser(bindinqLanguage) {\n this.bindinqLanguage = bindinqLanguage;\n this.emptyStringExpression = new LiteralString('');\n this.nullExpression = new LiteralPrimitive(null);\n this.undefinedExpression = new LiteralPrimitive(undefined);\n this.cache = {};\n }\n ValidationMessageParser.prototype.parse = function (message) {\n if (this.cache[message] !== undefined) {\n return this.cache[message];\n }\n var parts = this.bindinqLanguage.parseInterpolation(null, message);\n if (parts === null) {\n return new LiteralString(message);\n }\n var expression = new LiteralString(parts[0]);\n for (var i = 1; i < parts.length; i += 2) {\n expression = new Binary('+', expression, new Binary('+', this.coalesce(parts[i]), new LiteralString(parts[i + 1])));\n }\n MessageExpressionValidator.validate(expression, message);\n this.cache[message] = expression;\n return expression;\n };\n ValidationMessageParser.prototype.coalesce = function (part) {\n // part === null || part === undefined ? '' : part\n return new Conditional(new Binary('||', new Binary('===', part, this.nullExpression), new Binary('===', part, this.undefinedExpression)), this.emptyStringExpression, new CallMember(part, 'toString', []));\n };\n ValidationMessageParser.inject = [BindingLanguage];\n return ValidationMessageParser;\n}());\nexport { ValidationMessageParser };\nvar MessageExpressionValidator = (function (_super) {\n __extends(MessageExpressionValidator, _super);\n function MessageExpressionValidator(originalMessage) {\n var _this = _super.call(this) || this;\n _this.originalMessage = originalMessage;\n return _this;\n }\n MessageExpressionValidator.validate = function (expression, originalMessage) {\n var visitor = new MessageExpressionValidator(originalMessage);\n expression.accept(visitor);\n };\n MessageExpressionValidator.prototype.visitAccessScope = function (access) {\n if (access.ancestor !== 0) {\n throw new Error('$parent is not permitted in validation message expressions.');\n }\n if (['displayName', 'propertyName', 'value', 'object', 'config', 'getDisplayName'].indexOf(access.name) !== -1) {\n LogManager.getLogger('aurelia-validation')\n .warn(\"Did you mean to use \\\"$\" + access.name + \"\\\" instead of \\\"\" + access.name + \"\\\" in this validation message template: \\\"\" + this.originalMessage + \"\\\"?\");\n }\n };\n return MessageExpressionValidator;\n}(ExpressionVisitor));\nexport { MessageExpressionValidator };\n","// tslint:disable:no-empty\nvar ExpressionVisitor = (function () {\n function ExpressionVisitor() {\n }\n ExpressionVisitor.prototype.visitChain = function (chain) {\n this.visitArgs(chain.expressions);\n };\n ExpressionVisitor.prototype.visitBindingBehavior = function (behavior) {\n behavior.expression.accept(this);\n this.visitArgs(behavior.args);\n };\n ExpressionVisitor.prototype.visitValueConverter = function (converter) {\n converter.expression.accept(this);\n this.visitArgs(converter.args);\n };\n ExpressionVisitor.prototype.visitAssign = function (assign) {\n assign.target.accept(this);\n assign.value.accept(this);\n };\n ExpressionVisitor.prototype.visitConditional = function (conditional) {\n conditional.condition.accept(this);\n conditional.yes.accept(this);\n conditional.no.accept(this);\n };\n ExpressionVisitor.prototype.visitAccessThis = function (access) {\n access.ancestor = access.ancestor;\n };\n ExpressionVisitor.prototype.visitAccessScope = function (access) {\n access.name = access.name;\n };\n ExpressionVisitor.prototype.visitAccessMember = function (access) {\n access.object.accept(this);\n };\n ExpressionVisitor.prototype.visitAccessKeyed = function (access) {\n access.object.accept(this);\n access.key.accept(this);\n };\n ExpressionVisitor.prototype.visitCallScope = function (call) {\n this.visitArgs(call.args);\n };\n ExpressionVisitor.prototype.visitCallFunction = function (call) {\n call.func.accept(this);\n this.visitArgs(call.args);\n };\n ExpressionVisitor.prototype.visitCallMember = function (call) {\n call.object.accept(this);\n this.visitArgs(call.args);\n };\n ExpressionVisitor.prototype.visitPrefix = function (prefix) {\n prefix.expression.accept(this);\n };\n ExpressionVisitor.prototype.visitBinary = function (binary) {\n binary.left.accept(this);\n binary.right.accept(this);\n };\n ExpressionVisitor.prototype.visitLiteralPrimitive = function (literal) {\n literal.value = literal.value;\n };\n ExpressionVisitor.prototype.visitLiteralArray = function (literal) {\n this.visitArgs(literal.elements);\n };\n ExpressionVisitor.prototype.visitLiteralObject = function (literal) {\n this.visitArgs(literal.values);\n };\n ExpressionVisitor.prototype.visitLiteralString = function (literal) {\n literal.value = literal.value;\n };\n ExpressionVisitor.prototype.visitArgs = function (args) {\n for (var i = 0; i < args.length; i++) {\n args[i].accept(this);\n }\n };\n return ExpressionVisitor;\n}());\nexport { ExpressionVisitor };\n","/**\n * Call a lifecycle method on a viewModel if it exists.\n * @function\n * @param instance The viewModel instance.\n * @param name The lifecycle method name.\n * @param model The model to pass to the lifecycle method.\n * @returns Promise The result of the lifecycle method.\n */\nexport function invokeLifecycle(instance, name, model) {\n if (typeof instance[name] === 'function') {\n return new Promise(function (resolve) {\n resolve(instance[name](model));\n }).then(function (result) {\n if (result !== null && result !== undefined) {\n return result;\n }\n return true;\n });\n }\n return Promise.resolve(true);\n}\n","import { getLogger } from 'aurelia-logging';\nimport { BindableProperty, BehaviorPropertyObserver, HtmlBehaviorResource } from 'aurelia-templating';\nimport { metadata } from 'aurelia-metadata';\n\nvar coerceFunctions = {\n none: function (a) {\n return a;\n },\n number: function (a) {\n return Number(a);\n },\n string: function (a) {\n return '' + a;\n },\n boolean: function (a) {\n return !!a;\n },\n booleanAttr: function (val) {\n return val || val === '' ? true : false;\n },\n date: function (val) {\n // Invalid date instances are quite problematic\n // so we need to deal with it properly by default\n if (val === null || val === undefined) {\n return null;\n }\n var d = new Date(val);\n return isNaN(d.getTime()) ? null : d;\n }\n};\nvar coerceFunctionMap = new Map([\n [Boolean, 'boolean'],\n [String, 'string'],\n [Date, 'date'],\n [Number, 'number'],\n]);\n/**\n * Map a class to a string for typescript property coerce\n * @param type the property class to register\n * @param strType the string that represents class in the lookup\n * @param coerceFunction coerce function to register with param strType\n */\nfunction mapCoerceFunction(type, strType, coerceFunction) {\n coerceFunction = coerceFunction || type.coerce;\n if (typeof strType !== 'string' || typeof coerceFunction !== 'function') {\n getLogger('map-coerce-function')\n .warn(\"Bad attempt at mapping coerce function for type: \" + type.name + \" to: \" + strType);\n return;\n }\n coerceFunctions[strType] = coerceFunction;\n coerceFunctionMap.set(type, strType);\n}\n\nBehaviorPropertyObserver.prototype.setCoerce = function (coerce) {\n this.coerce = typeof coerce === 'function' ? coerce : coerceFunctions[coerce];\n if (this.coerce === undefined) {\n getLogger('behavior-property-observer')\n .warn(\"Invalid coerce instruction. Should be either one of \" + Object.keys(coerceFunctions) + \" or a function.\");\n }\n};\n/**\n * Slightly override the builtin implementation that will handle coercion\n */\nBehaviorPropertyObserver.prototype.setValue = function (newValue) {\n var oldValue = this.currentValue;\n var coercedValue = this.coerce === undefined ? newValue : this.coerce(newValue);\n if (oldValue !== coercedValue) {\n this.oldValue = oldValue;\n this.currentValue = coercedValue;\n if (this.publishing && this.notqueued) {\n if (this.taskQueue.flushing) {\n this.call();\n }\n else {\n this.notqueued = false;\n this.taskQueue.queueMicroTask(this);\n }\n }\n }\n};\nBindableProperty.prototype.createObserver = function (viewModel) {\n var selfSubscriber = null;\n var defaultValue = this.defaultValue;\n var changeHandlerName = this.changeHandler;\n var name = this.name;\n var initialValue;\n if (this.hasOptions) {\n return undefined;\n }\n if (changeHandlerName in viewModel) {\n if ('propertyChanged' in viewModel) {\n selfSubscriber = function (newValue, oldValue) {\n viewModel[changeHandlerName](newValue, oldValue);\n viewModel.propertyChanged(name, newValue, oldValue);\n };\n }\n else {\n selfSubscriber = function (newValue, oldValue) { return viewModel[changeHandlerName](newValue, oldValue); };\n }\n }\n else if ('propertyChanged' in viewModel) {\n selfSubscriber = function (newValue, oldValue) { return viewModel.propertyChanged(name, newValue, oldValue); };\n }\n else if (changeHandlerName !== null) {\n throw new Error(\"Change handler \" + changeHandlerName + \" was specified but not declared on the class.\");\n }\n if (defaultValue !== undefined) {\n initialValue = typeof defaultValue === 'function' ? defaultValue.call(viewModel) : defaultValue;\n }\n var observer = new BehaviorPropertyObserver(this.owner.taskQueue, viewModel, this.name, selfSubscriber, initialValue);\n if (this.coerce !== undefined) {\n observer.setCoerce(this.coerce);\n observer.currentValue = observer.oldValue = observer.coerce === undefined ? observer.currentValue : observer.coerce(initialValue);\n }\n return observer;\n};\nBindableProperty.prototype._createDynamicProperty = function (viewModel, observerLookup, behaviorHandlesBind, name, attribute, boundProperties) {\n var changeHandlerName = name + 'Changed';\n var selfSubscriber = null;\n var observer;\n var info;\n if (changeHandlerName in viewModel) {\n if ('propertyChanged' in viewModel) {\n selfSubscriber = function (newValue, oldValue) {\n viewModel[changeHandlerName](newValue, oldValue);\n viewModel.propertyChanged(name, newValue, oldValue);\n };\n }\n else {\n selfSubscriber = function (newValue, oldValue) { return viewModel[changeHandlerName](newValue, oldValue); };\n }\n }\n else if ('propertyChanged' in viewModel) {\n selfSubscriber = function (newValue, oldValue) { return viewModel.propertyChanged(name, newValue, oldValue); };\n }\n observer = observerLookup[name] = new BehaviorPropertyObserver(this.owner.taskQueue, viewModel, name, selfSubscriber, undefined);\n observer.setCoerce(this.coerce);\n observer.currentValue = observer.oldValue = observer.coerce === undefined ? observer.currentValue : observer.coerce(undefined);\n Object.defineProperty(viewModel, name, {\n configurable: true,\n enumerable: true,\n get: observer.getValue.bind(observer),\n set: observer.setValue.bind(observer)\n });\n if (behaviorHandlesBind) {\n observer.selfSubscriber = null;\n }\n if (typeof attribute === 'string') {\n viewModel[name] = attribute;\n observer.call();\n }\n else if (attribute) {\n info = { observer: observer, binding: attribute.createBinding(viewModel) };\n boundProperties.push(info);\n }\n observer.publishing = true;\n observer.selfSubscriber = selfSubscriber;\n};\n\nvar _usePropertyType = false;\n/**\n * Decorator: Specifies that a property is bindable through HTML.\n * @param nameOrTargetOrConfig The name of the property, or a configuration object.\n * This has Object in its type to avoid breaking change.\n * Idealy it should be `string | BindablePropertyConfig`\n */\nvar bindable = function bindable(nameOrTargetOrConfig, key, descriptor) {\n var deco = function (target, key2, descriptor2) {\n /**\n * key2 = truthy => decorated on a class field\n * key2 = falsy => decorated on a class\n */\n var actualTarget = key2 ? target.constructor : target;\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, actualTarget);\n var prop;\n var propType;\n if (key2) { //is it on a property or a class?\n nameOrTargetOrConfig = nameOrTargetOrConfig || {};\n nameOrTargetOrConfig.name = key2;\n /**\n * Support for Typescript decorator, with metadata on property type.\n * Will check for typing only when user didn't explicitly set coerce + turn on the options\n *\n * If key 2 is truthy, it's a decorator on class field, which means target is prototype\n */\n if (nameOrTargetOrConfig.coerce === undefined && _usePropertyType) {\n propType = metadata.getOwn(metadata.propertyType, target, key2);\n if (propType) {\n var coerceType = coerceFunctionMap.get(propType);\n if (coerceType === undefined) {\n getLogger('@bindable decorator')\n .warn(\"Invalid coerce instruction. Should be either one of \" + Object.keys(coerceFunctions) + \" or a function.\");\n }\n nameOrTargetOrConfig.coerce = coerceType || 'none';\n }\n }\n }\n prop = new BindableProperty(nameOrTargetOrConfig);\n return prop.registerWith(actualTarget, r, descriptor2);\n };\n if (!nameOrTargetOrConfig) {\n /**\n * placed on property initializer with parens, without any params\n * @example:\n * class ViewModel {\n * @bindable() property\n * }\n * @bindable() class ViewModel {}\n */\n return deco;\n }\n if (key) {\n /**\n * placed on a property initializer without parens\n * @example\n * class ViewModel {\n * @bindable property\n * }\n *\n */\n var target = nameOrTargetOrConfig;\n nameOrTargetOrConfig = undefined;\n return deco(target, key, descriptor);\n }\n /**\n * placed on a class with parens and config\n * @example\n * @bindable({ ... })\n * class MyViewModel {}\n */\n return deco;\n};\n['string', 'number', 'boolean', 'booleanAttr', 'date'].forEach(createTypedBindable);\n/**\n * Used to allow user to automatically pickup property type\n * Can be used with typescript emit metadata in compiler settings, or with `Reflect.metadata('design:type', PropertyTypeClass)` decorator\n */\nfunction usePropertyType(shouldUsePropertyType) {\n _usePropertyType = shouldUsePropertyType;\n}\n/**\n * Create a new fluent syntax bindable decorator ex: builtin: `@bindable.string`, custom: `@bindable.customType`\n * Need to use together with setting the type in `coerceFunctions`:\n *\n * ```js\n * import {\n * createTypedBindable,\n * coerceFunctions\n * } from 'aurelia-framework'\n *\n * // create the typed bindable\n * createTypedBindable('point'); // => enable `@bindable.point`\n * // Set the instruction\n * coerceFunctions.point = function(value: string) {\n * // convert to point from value\n * }\n * ```\n *\n * @param type The type to added to bindable for fluent syntax.\n */\nfunction createTypedBindable(type) {\n /**\n * There no attempts to protect user from mis-using the decorators.\n * ex. @observable({}, accidentParam) class SomeClass {}\n * If we have some flag to use in if block, which can be remove at build time, it would be great.\n */\n return bindable[type] = function (nameOrTargetOrConfig, key, descriptor) {\n if (nameOrTargetOrConfig === undefined) {\n /**\n * MyClass {\n * @bindable.number() num\n * }\n */\n return bindable({ coerce: type });\n }\n if (key === undefined) {\n /**\n * @bindable.number('num')\n * class MyClass {}\n *\n * @bindable.number({...})\n * class MyClass\n *\n * class MyClass {\n * @bindable.number({...})\n * num\n * }\n */\n nameOrTargetOrConfig = typeof nameOrTargetOrConfig === 'string' ? { name: nameOrTargetOrConfig } : nameOrTargetOrConfig;\n nameOrTargetOrConfig.coerce = type;\n return bindable(nameOrTargetOrConfig);\n }\n // nameOrTargetOrConfig = typeof nameOrTargetOrConfig === 'string' ? { name: nameOrTargetOrConfig } : nameOrTargetOrConfig;\n /**\n * class MyClass {\n * @bindable.number num\n * }\n */\n return bindable({ coerce: type })(nameOrTargetOrConfig, key, descriptor);\n };\n}\n\nvar observableLogger = getLogger('aurelia-observable-decorator');\n/**\n * Internal flag to turn on / off auto pickup property type from metadata\n */\nvar _usePropertyType$1 = false;\nvar observable = function observable(nameOrTargetOrConfig, key, descriptor) {\n /**\n * @param target The class decorated\n * @param key The target class field of the decorator\n * @param descriptor class field descriptor\n * @param config user's config\n */\n function deco(target, key, descriptor, config) {\n // Used to check if we should pickup the type from metadata\n var coerce = config === undefined || typeof config === 'string' ? undefined : config.coerce;\n var propType;\n var coerceFunction;\n if (coerce) {\n switch (typeof coerce) {\n case 'string':\n coerceFunction = coerceFunctions[coerce];\n break;\n case 'function':\n coerceFunction = coerce;\n break;\n default: break;\n }\n if (coerceFunction === undefined) {\n observableLogger.warn(\"Invalid coerce instruction. Should be either one of \" + Object.keys(coerceFunctions) + \" or a function.\");\n }\n }\n else if (_usePropertyType$1) {\n propType = metadata.getOwn(metadata.propertyType, target, key);\n if (propType) {\n coerceFunction = coerceFunctions[coerceFunctionMap.get(propType)];\n if (coerceFunction === undefined) {\n observableLogger.warn(\"Unable to find coerce function for type \" + propType.name + \".\");\n }\n }\n }\n /**\n * class decorator?\n * @example\n * @observable('firstName') MyClass {}\n * @observable({ name: 'firstName' }) MyClass {}\n */\n var isClassDecorator = key === undefined;\n if (isClassDecorator) {\n target = target.prototype;\n key = typeof config === 'string' ? config : config.name;\n }\n // use a convention to compute the inner property name\n var innerPropertyName = \"_\" + key;\n var innerPropertyDescriptor = {\n configurable: true,\n enumerable: false,\n writable: true\n };\n if (config && 'defaultValue' in config) {\n var initValue = config.defaultValue;\n innerPropertyDescriptor.value = coerceFunction === undefined ? initValue : coerceFunction(initValue);\n }\n // determine callback name based on config or convention.\n var callbackName = (config && config.changeHandler) || key + \"Changed\";\n if (descriptor) {\n // babel passes in the property descriptor with a method to get the initial value.\n // set the initial value of the property if it is defined.\n // also make sure it's coerced\n if (typeof descriptor.initializer === 'function') {\n var initValue = descriptor.initializer();\n innerPropertyDescriptor.value = coerceFunction === undefined ? initValue : coerceFunction(initValue);\n }\n }\n else {\n // there is no descriptor if the target was a field in TS (although Babel provides one),\n // or if the decorator was applied to a class.\n descriptor = {};\n }\n // make the accessor enumerable by default, as fields are enumerable\n if (!('enumerable' in descriptor)) {\n descriptor.enumerable = true;\n }\n // we're adding a getter and setter which means the property descriptor\n // cannot have a \"value\" or \"writable\" attribute\n delete descriptor.value;\n delete descriptor.writable;\n delete descriptor.initializer;\n // Add the inner property on the prototype.\n Reflect.defineProperty(target, innerPropertyName, innerPropertyDescriptor);\n // add the getter and setter to the property descriptor.\n descriptor.get = function () { return this[innerPropertyName]; };\n descriptor.set = function (newValue) {\n var oldValue = this[innerPropertyName];\n var coercedValue = coerceFunction === undefined ? newValue : coerceFunction(newValue);\n if (coercedValue === oldValue) {\n return;\n }\n // Add the inner property on the instance and make it nonenumerable.\n this[innerPropertyName] = coercedValue;\n Reflect.defineProperty(this, innerPropertyName, { enumerable: false });\n if (this[callbackName]) {\n this[callbackName](coercedValue, oldValue, key);\n }\n };\n // make sure Aurelia doesn't use dirty-checking by declaring the property's\n // dependencies. This is the equivalent of \"@computedFrom(...)\".\n descriptor.get.dependencies = [innerPropertyName];\n if (isClassDecorator) {\n Reflect.defineProperty(target, key, descriptor);\n }\n else {\n return descriptor;\n }\n }\n /**\n * Decorating with parens\n * @example\n * @observable MyClass {} <----- this breaks, but will go into this condition\n * @observable('firstName') MyClass {}\n * @observable({ name: 'firstName' }) MyClass {}\n * class MyClass {\n * @observable() prop\n * }\n */\n if (key === undefined) {\n return function (t, k, d) { return deco(t, k, d, nameOrTargetOrConfig); };\n }\n /**\n * Decorating on class field\n * @example\n * class MyClass {\n * @observable prop\n * }\n */\n return deco(nameOrTargetOrConfig, key, descriptor);\n};\n['string', 'number', 'boolean', 'date'].forEach(createTypedObservable);\n/*\n | typescript | babel\n----------|------------------|-------------------------\nproperty | config | config\nw/parens | target, key | target, key, descriptor\n----------|------------------|-------------------------\nproperty | target, key | target, key, descriptor\nno parens | n/a | n/a\n----------|------------------|-------------------------\nclass | config | config\n | target | target\n*/\n/**\n * Toggle the flag for observable to auto pickup property type from metadata\n * The reason is sometimes we may want to use prop type on bindable, but not observable\n * and vice versa\n */\nfunction usePropertyType$1(shouldUsePropType) {\n _usePropertyType$1 = !!shouldUsePropType;\n}\n/**\n * Decorator: Creates a new observable decorator that can be used for fluent syntax purpose\n * @param type the type name that will be assign to observable decorator. `createTypedObservable('point') -> observable.point`\n */\nfunction createTypedObservable(type) {\n return observable[type] = function (nameOrTargetOrConfig, key, descriptor) {\n if (nameOrTargetOrConfig === undefined) {\n /**\n * MyClass {\n * @observable.number() num\n * }\n *\n * This will breaks so need to check for proper error\n * @observable.number()\n * class MyClass {}\n */\n return observable({ coerce: type });\n }\n if (key === undefined) {\n /**\n * @observable.number('num')\n * class MyClass {}\n *\n * @observable.number({...})\n * class MyClass\n *\n * class MyClass {\n * @observable.number({...})\n * num\n * }\n */\n nameOrTargetOrConfig = typeof nameOrTargetOrConfig === 'string' ? { name: nameOrTargetOrConfig } : nameOrTargetOrConfig;\n nameOrTargetOrConfig.coerce = type;\n return observable(nameOrTargetOrConfig);\n }\n /**\n * class MyClass {\n * @observable.number num\n * }\n */\n return observable({ coerce: type })(nameOrTargetOrConfig, key, descriptor);\n };\n}\n\nexport { bindable, usePropertyType as usePropertyTypeForBindable, createTypedBindable, observable, usePropertyType$1 as usePropertyTypeForObservable, createTypedObservable, coerceFunctions, coerceFunctionMap, mapCoerceFunction };\n","import { metadata, protocol } from 'aurelia-metadata';\nimport { AggregateError } from 'aurelia-pal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n\r\nfunction __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nfunction __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\n\nfunction isInjectable(potentialTarget) {\r\n return !!potentialTarget;\r\n}\r\nfunction autoinject(potentialTarget) {\r\n var deco = function (target) {\r\n if (!target.hasOwnProperty('inject')) {\r\n target.inject = (metadata.getOwn(metadata.paramTypes, target) ||\r\n _emptyParameters).slice();\r\n if (target.inject && target.inject.length > 0) {\r\n if (target.inject[target.inject.length - 1] === Object) {\r\n target.inject.splice(-1, 1);\r\n }\r\n }\r\n }\r\n };\r\n if (isInjectable(potentialTarget)) {\r\n return deco(potentialTarget);\r\n }\r\n return deco;\r\n}\r\nfunction inject() {\r\n var rest = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n rest[_i] = arguments[_i];\r\n }\r\n return function (target, _key, descriptor) {\r\n if (typeof descriptor === 'number') {\r\n autoinject(target);\r\n if (rest.length === 1) {\r\n target.inject[descriptor] = rest[0];\r\n }\r\n return;\r\n }\r\n if (descriptor) {\r\n var fn = descriptor.value;\r\n fn.inject = rest;\r\n }\r\n else {\r\n target.inject = rest;\r\n }\r\n };\r\n}\n\nvar resolver = protocol.create('aurelia:resolver', function (target) {\r\n if (!(typeof target.get === 'function')) {\r\n return 'Resolvers must implement: get(container: Container, key: any): any';\r\n }\r\n return true;\r\n});\r\nvar Strategy;\r\n(function (Strategy) {\r\n Strategy[Strategy[\"instance\"] = 0] = \"instance\";\r\n Strategy[Strategy[\"singleton\"] = 1] = \"singleton\";\r\n Strategy[Strategy[\"transient\"] = 2] = \"transient\";\r\n Strategy[Strategy[\"function\"] = 3] = \"function\";\r\n Strategy[Strategy[\"array\"] = 4] = \"array\";\r\n Strategy[Strategy[\"alias\"] = 5] = \"alias\";\r\n})(Strategy || (Strategy = {}));\r\nfunction isStrategy(actual, expected, state) {\r\n return actual === expected;\r\n}\r\nvar StrategyResolver = (function () {\r\n function StrategyResolver(strategy, state) {\r\n this.strategy = strategy;\r\n this.state = state;\r\n }\r\n StrategyResolver.prototype.get = function (container, key) {\r\n if (isStrategy(this.strategy, Strategy.instance, this.state)) {\r\n return this.state;\r\n }\r\n if (isStrategy(this.strategy, Strategy.singleton, this.state)) {\r\n var singleton = container.invoke(this.state);\r\n this.state = singleton;\r\n this.strategy = 0;\r\n return singleton;\r\n }\r\n if (isStrategy(this.strategy, Strategy.transient, this.state)) {\r\n return container.invoke(this.state);\r\n }\r\n if (isStrategy(this.strategy, Strategy.function, this.state)) {\r\n return this.state(container, key, this);\r\n }\r\n if (isStrategy(this.strategy, Strategy.array, this.state)) {\r\n return this.state[0].get(container, key);\r\n }\r\n if (isStrategy(this.strategy, Strategy.alias, this.state)) {\r\n return container.get(this.state);\r\n }\r\n throw new Error('Invalid strategy: ' + this.strategy);\r\n };\r\n StrategyResolver = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Number, Object])\r\n ], StrategyResolver);\r\n return StrategyResolver;\r\n}());\r\nvar Lazy = (function () {\r\n function Lazy(key) {\r\n this._key = key;\r\n }\r\n Lazy_1 = Lazy;\r\n Lazy.prototype.get = function (container) {\r\n var _this = this;\r\n return function () { return container.get(_this._key); };\r\n };\r\n Lazy.of = function (key) {\r\n return new Lazy_1(key);\r\n };\r\n var Lazy_1;\r\n Lazy = Lazy_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], Lazy);\r\n return Lazy;\r\n}());\r\nvar All = (function () {\r\n function All(key) {\r\n this._key = key;\r\n }\r\n All_1 = All;\r\n All.prototype.get = function (container) {\r\n return container.getAll(this._key);\r\n };\r\n All.of = function (key) {\r\n return new All_1(key);\r\n };\r\n var All_1;\r\n All = All_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], All);\r\n return All;\r\n}());\r\nvar Optional = (function () {\r\n function Optional(key, checkParent) {\r\n if (checkParent === void 0) { checkParent = true; }\r\n this._key = key;\r\n this._checkParent = checkParent;\r\n }\r\n Optional_1 = Optional;\r\n Optional.prototype.get = function (container) {\r\n if (container.hasResolver(this._key, this._checkParent)) {\r\n return container.get(this._key);\r\n }\r\n return null;\r\n };\r\n Optional.of = function (key, checkParent) {\r\n if (checkParent === void 0) { checkParent = true; }\r\n return new Optional_1(key, checkParent);\r\n };\r\n var Optional_1;\r\n Optional = Optional_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object, Boolean])\r\n ], Optional);\r\n return Optional;\r\n}());\r\nvar Parent = (function () {\r\n function Parent(key) {\r\n this._key = key;\r\n }\r\n Parent_1 = Parent;\r\n Parent.prototype.get = function (container) {\r\n return container.parent ? container.parent.get(this._key) : null;\r\n };\r\n Parent.of = function (key) {\r\n return new Parent_1(key);\r\n };\r\n var Parent_1;\r\n Parent = Parent_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], Parent);\r\n return Parent;\r\n}());\r\nvar Factory = (function () {\r\n function Factory(key) {\r\n this._key = key;\r\n }\r\n Factory_1 = Factory;\r\n Factory.prototype.get = function (container) {\r\n var fn = this._key;\r\n var resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === Strategy.function) {\r\n fn = resolver.state;\r\n }\r\n return function () {\r\n var rest = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n rest[_i] = arguments[_i];\r\n }\r\n return container.invoke(fn, rest);\r\n };\r\n };\r\n Factory.of = function (key) {\r\n return new Factory_1(key);\r\n };\r\n var Factory_1;\r\n Factory = Factory_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object])\r\n ], Factory);\r\n return Factory;\r\n}());\r\nvar NewInstance = (function () {\r\n function NewInstance(key) {\r\n var dynamicDependencies = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n dynamicDependencies[_i - 1] = arguments[_i];\r\n }\r\n this.key = key;\r\n this.asKey = key;\r\n this.dynamicDependencies = dynamicDependencies;\r\n }\r\n NewInstance_1 = NewInstance;\r\n NewInstance.prototype.get = function (container) {\r\n var dynamicDependencies = this.dynamicDependencies.length > 0\r\n ? this.dynamicDependencies.map(function (dependency) {\r\n return dependency['protocol:aurelia:resolver']\r\n ? dependency.get(container)\r\n : container.get(dependency);\r\n })\r\n : undefined;\r\n var fn = this.key;\r\n var resolver = container.getResolver(fn);\r\n if (resolver && resolver.strategy === 3) {\r\n fn = resolver.state;\r\n }\r\n var instance = container.invoke(fn, dynamicDependencies);\r\n container.registerInstance(this.asKey, instance);\r\n return instance;\r\n };\r\n NewInstance.prototype.as = function (key) {\r\n this.asKey = key;\r\n return this;\r\n };\r\n NewInstance.of = function (key) {\r\n var dynamicDependencies = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n dynamicDependencies[_i - 1] = arguments[_i];\r\n }\r\n return new (NewInstance_1.bind.apply(NewInstance_1, [void 0, key].concat(dynamicDependencies)))();\r\n };\r\n var NewInstance_1;\r\n NewInstance = NewInstance_1 = __decorate([\r\n resolver(),\r\n __metadata(\"design:paramtypes\", [Object, Object])\r\n ], NewInstance);\r\n return NewInstance;\r\n}());\r\nfunction getDecoratorDependencies(target) {\r\n autoinject(target);\r\n return target.inject;\r\n}\r\nfunction lazy(keyValue) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Lazy.of(keyValue);\r\n };\r\n}\r\nfunction all(keyValue) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = All.of(keyValue);\r\n };\r\n}\r\nfunction optional(checkParentOrTarget) {\r\n if (checkParentOrTarget === void 0) { checkParentOrTarget = true; }\r\n var deco = function (checkParent) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Optional.of(inject$$1[index], checkParent);\r\n };\r\n };\r\n if (typeof checkParentOrTarget === 'boolean') {\r\n return deco(checkParentOrTarget);\r\n }\r\n return deco(true);\r\n}\r\nfunction parent(target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Parent.of(inject$$1[index]);\r\n}\r\nfunction factory(keyValue) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = Factory.of(keyValue);\r\n };\r\n}\r\nfunction newInstance(asKeyOrTarget) {\r\n var dynamicDependencies = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n dynamicDependencies[_i - 1] = arguments[_i];\r\n }\r\n var deco = function (asKey) {\r\n return function (target, _key, index) {\r\n var inject$$1 = getDecoratorDependencies(target);\r\n inject$$1[index] = NewInstance.of.apply(NewInstance, [inject$$1[index]].concat(dynamicDependencies));\r\n if (!!asKey) {\r\n inject$$1[index].as(asKey);\r\n }\r\n };\r\n };\r\n if (arguments.length >= 1) {\r\n return deco(asKeyOrTarget);\r\n }\r\n return deco();\r\n}\n\nfunction validateKey(key) {\r\n if (key === null || key === undefined) {\r\n throw new Error('key/value cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?');\r\n }\r\n}\r\nvar _emptyParameters = Object.freeze([]);\r\nmetadata.registration = 'aurelia:registration';\r\nmetadata.invoker = 'aurelia:invoker';\r\nvar resolverDecorates = resolver.decorates;\r\nvar InvocationHandler = (function () {\r\n function InvocationHandler(fn, invoker, dependencies) {\r\n this.fn = fn;\r\n this.invoker = invoker;\r\n this.dependencies = dependencies;\r\n }\r\n InvocationHandler.prototype.invoke = function (container, dynamicDependencies) {\r\n return dynamicDependencies !== undefined\r\n ? this.invoker.invokeWithDynamicDependencies(container, this.fn, this.dependencies, dynamicDependencies)\r\n : this.invoker.invoke(container, this.fn, this.dependencies);\r\n };\r\n return InvocationHandler;\r\n}());\r\nfunction invokeWithDynamicDependencies(container, fn, staticDependencies, dynamicDependencies) {\r\n var i = staticDependencies.length;\r\n var args = new Array(i);\r\n var lookup;\r\n while (i--) {\r\n lookup = staticDependencies[i];\r\n if (lookup === null || lookup === undefined) {\r\n throw new Error('Constructor Parameter with index ' +\r\n i +\r\n ' cannot be null or undefined. Are you trying to inject/register something that doesn\\'t exist with DI?');\r\n }\r\n else {\r\n args[i] = container.get(lookup);\r\n }\r\n }\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n return Reflect.construct(fn, args);\r\n}\r\nvar classInvoker = {\r\n invoke: function (container, Type, deps) {\r\n var instances = deps.map(function (dep) { return container.get(dep); });\r\n return Reflect.construct(Type, instances);\r\n },\r\n invokeWithDynamicDependencies: invokeWithDynamicDependencies\r\n};\r\nfunction getDependencies(f) {\r\n if (!f.hasOwnProperty('inject')) {\r\n return [];\r\n }\r\n if (typeof f.inject === 'function') {\r\n return f.inject();\r\n }\r\n return f.inject;\r\n}\r\nvar Container = (function () {\r\n function Container(configuration) {\r\n if (configuration === undefined) {\r\n configuration = {};\r\n }\r\n this._configuration = configuration;\r\n this._onHandlerCreated = configuration.onHandlerCreated;\r\n this._handlers =\r\n configuration.handlers || (configuration.handlers = new Map());\r\n this._resolvers = new Map();\r\n this.root = this;\r\n this.parent = null;\r\n }\r\n Container.prototype.makeGlobal = function () {\r\n Container.instance = this;\r\n return this;\r\n };\r\n Container.prototype.setHandlerCreatedCallback = function (onHandlerCreated) {\r\n this._onHandlerCreated = onHandlerCreated;\r\n this._configuration.onHandlerCreated = onHandlerCreated;\r\n };\r\n Container.prototype.registerInstance = function (key, instance) {\r\n return this.registerResolver(key, new StrategyResolver(0, instance === undefined ? key : instance));\r\n };\r\n Container.prototype.registerSingleton = function (key, fn) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn === undefined ? key : fn));\r\n };\r\n Container.prototype.registerTransient = function (key, fn) {\r\n return this.registerResolver(key, new StrategyResolver(2, fn === undefined ? key : fn));\r\n };\r\n Container.prototype.registerHandler = function (key, handler) {\r\n return this.registerResolver(key, new StrategyResolver(3, handler));\r\n };\r\n Container.prototype.registerAlias = function (originalKey, aliasKey) {\r\n return this.registerResolver(aliasKey, new StrategyResolver(5, originalKey));\r\n };\r\n Container.prototype.registerResolver = function (key, resolver$$1) {\r\n validateKey(key);\r\n var allResolvers = this._resolvers;\r\n var result = allResolvers.get(key);\r\n if (result === undefined) {\r\n allResolvers.set(key, resolver$$1);\r\n }\r\n else if (result.strategy === 4) {\r\n result.state.push(resolver$$1);\r\n }\r\n else {\r\n allResolvers.set(key, new StrategyResolver(4, [result, resolver$$1]));\r\n }\r\n return resolver$$1;\r\n };\r\n Container.prototype.autoRegister = function (key, fn) {\r\n fn = fn === undefined ? key : fn;\r\n if (typeof fn === 'function') {\r\n var registration = metadata.get(metadata.registration, fn);\r\n if (registration === undefined) {\r\n return this.registerResolver(key, new StrategyResolver(1, fn));\r\n }\r\n return registration.registerResolver(this, key, fn);\r\n }\r\n return this.registerResolver(key, new StrategyResolver(0, fn));\r\n };\r\n Container.prototype.autoRegisterAll = function (fns) {\r\n var i = fns.length;\r\n while (i--) {\r\n this.autoRegister(fns[i]);\r\n }\r\n };\r\n Container.prototype.unregister = function (key) {\r\n this._resolvers.delete(key);\r\n };\r\n Container.prototype.hasResolver = function (key, checkParent) {\r\n if (checkParent === void 0) { checkParent = false; }\r\n validateKey(key);\r\n return (this._resolvers.has(key) ||\r\n (checkParent &&\r\n this.parent !== null &&\r\n this.parent.hasResolver(key, checkParent)));\r\n };\r\n Container.prototype.getResolver = function (key) {\r\n return this._resolvers.get(key);\r\n };\r\n Container.prototype.get = function (key) {\r\n validateKey(key);\r\n if (key === Container) {\r\n return this;\r\n }\r\n if (resolverDecorates(key)) {\r\n return key.get(this, key);\r\n }\r\n var resolver$$1 = this._resolvers.get(key);\r\n if (resolver$$1 === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n var registration = metadata.get(metadata.registration, key);\r\n if (registration === undefined) {\r\n return this.parent._get(key);\r\n }\r\n return registration.registerResolver(this, key, key).get(this, key);\r\n }\r\n return resolver$$1.get(this, key);\r\n };\r\n Container.prototype._get = function (key) {\r\n var resolver$$1 = this._resolvers.get(key);\r\n if (resolver$$1 === undefined) {\r\n if (this.parent === null) {\r\n return this.autoRegister(key).get(this, key);\r\n }\r\n return this.parent._get(key);\r\n }\r\n return resolver$$1.get(this, key);\r\n };\r\n Container.prototype.getAll = function (key) {\r\n validateKey(key);\r\n var resolver$$1 = this._resolvers.get(key);\r\n if (resolver$$1 === undefined) {\r\n if (this.parent === null) {\r\n return _emptyParameters;\r\n }\r\n return this.parent.getAll(key);\r\n }\r\n if (resolver$$1.strategy === 4) {\r\n var state = resolver$$1.state;\r\n var i = state.length;\r\n var results = new Array(i);\r\n while (i--) {\r\n results[i] = state[i].get(this, key);\r\n }\r\n return results;\r\n }\r\n return [resolver$$1.get(this, key)];\r\n };\r\n Container.prototype.createChild = function () {\r\n var child = new Container(this._configuration);\r\n child.root = this.root;\r\n child.parent = this;\r\n return child;\r\n };\r\n Container.prototype.invoke = function (fn, dynamicDependencies) {\r\n try {\r\n var handler = this._handlers.get(fn);\r\n if (handler === undefined) {\r\n handler = this._createInvocationHandler(fn);\r\n this._handlers.set(fn, handler);\r\n }\r\n return handler.invoke(this, dynamicDependencies);\r\n }\r\n catch (e) {\r\n throw new AggregateError(\"Error invoking \" + fn.name + \". Check the inner error for details.\", e, true);\r\n }\r\n };\r\n Container.prototype._createInvocationHandler = function (fn) {\r\n var dependencies;\r\n if (fn.inject === undefined) {\r\n dependencies =\r\n metadata.getOwn(metadata.paramTypes, fn) || _emptyParameters;\r\n }\r\n else {\r\n dependencies = [];\r\n var ctor = fn;\r\n while (typeof ctor === 'function') {\r\n dependencies.push.apply(dependencies, getDependencies(ctor));\r\n ctor = Object.getPrototypeOf(ctor);\r\n }\r\n }\r\n var invoker = metadata.getOwn(metadata.invoker, fn) || classInvoker;\r\n var handler = new InvocationHandler(fn, invoker, dependencies);\r\n return this._onHandlerCreated !== undefined\r\n ? this._onHandlerCreated(handler)\r\n : handler;\r\n };\r\n return Container;\r\n}());\n\nfunction invoker(value) {\r\n return function (target) {\r\n metadata.define(metadata.invoker, value, target);\r\n };\r\n}\r\nfunction invokeAsFactory(potentialTarget) {\r\n var deco = function (target) {\r\n metadata.define(metadata.invoker, FactoryInvoker.instance, target);\r\n };\r\n return potentialTarget ? deco(potentialTarget) : deco;\r\n}\r\nvar FactoryInvoker = (function () {\r\n function FactoryInvoker() {\r\n }\r\n FactoryInvoker.prototype.invoke = function (container, fn, dependencies) {\r\n var i = dependencies.length;\r\n var args = new Array(i);\r\n while (i--) {\r\n args[i] = container.get(dependencies[i]);\r\n }\r\n return fn.apply(undefined, args);\r\n };\r\n FactoryInvoker.prototype.invokeWithDynamicDependencies = function (container, fn, staticDependencies, dynamicDependencies) {\r\n var i = staticDependencies.length;\r\n var args = new Array(i);\r\n while (i--) {\r\n args[i] = container.get(staticDependencies[i]);\r\n }\r\n if (dynamicDependencies !== undefined) {\r\n args = args.concat(dynamicDependencies);\r\n }\r\n return fn.apply(undefined, args);\r\n };\r\n return FactoryInvoker;\r\n}());\r\nFactoryInvoker.instance = new FactoryInvoker();\n\nfunction registration(value) {\r\n return function (target) {\r\n metadata.define(metadata.registration, value, target);\r\n };\r\n}\r\nfunction transient(key) {\r\n return registration(new TransientRegistration(key));\r\n}\r\nfunction singleton(keyOrRegisterInChild, registerInChild) {\r\n if (registerInChild === void 0) { registerInChild = false; }\r\n return registration(new SingletonRegistration(keyOrRegisterInChild, registerInChild));\r\n}\r\nvar TransientRegistration = (function () {\r\n function TransientRegistration(key) {\r\n this._key = key;\r\n }\r\n TransientRegistration.prototype.registerResolver = function (container, key, fn) {\r\n var existingResolver = container.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? container.registerTransient((this._key || key), fn)\r\n : existingResolver;\r\n };\r\n return TransientRegistration;\r\n}());\r\nvar SingletonRegistration = (function () {\r\n function SingletonRegistration(keyOrRegisterInChild, registerInChild) {\r\n if (registerInChild === void 0) { registerInChild = false; }\r\n if (typeof keyOrRegisterInChild === 'boolean') {\r\n this._registerInChild = keyOrRegisterInChild;\r\n }\r\n else {\r\n this._key = keyOrRegisterInChild;\r\n this._registerInChild = registerInChild;\r\n }\r\n }\r\n SingletonRegistration.prototype.registerResolver = function (container, key, fn) {\r\n var targetContainer = this._registerInChild ? container : container.root;\r\n var existingResolver = targetContainer.getResolver(this._key || key);\r\n return existingResolver === undefined\r\n ? targetContainer.registerSingleton(this._key || key, fn)\r\n : existingResolver;\r\n };\r\n return SingletonRegistration;\r\n}());\n\nexport { _emptyParameters, InvocationHandler, Container, autoinject, inject, invoker, invokeAsFactory, FactoryInvoker, registration, transient, singleton, TransientRegistration, SingletonRegistration, resolver, Strategy, StrategyResolver, Lazy, All, Optional, Parent, Factory, NewInstance, getDecoratorDependencies, lazy, all, optional, parent, factory, newInstance };\n","\n\nfunction mi(name) {\n throw new Error('History must implement ' + name + '().');\n}\n\nexport var History = function () {\n function History() {\n \n }\n\n History.prototype.activate = function activate(options) {\n mi('activate');\n };\n\n History.prototype.deactivate = function deactivate() {\n mi('deactivate');\n };\n\n History.prototype.getAbsoluteRoot = function getAbsoluteRoot() {\n mi('getAbsoluteRoot');\n };\n\n History.prototype.navigate = function navigate(fragment, options) {\n mi('navigate');\n };\n\n History.prototype.navigateBack = function navigateBack() {\n mi('navigateBack');\n };\n\n History.prototype.setTitle = function setTitle(title) {\n mi('setTitle');\n };\n\n History.prototype.setState = function setState(key, value) {\n mi('setState');\n };\n\n History.prototype.getState = function getState(key) {\n mi('getState');\n };\n\n History.prototype.getHistoryIndex = function getHistoryIndex() {\n mi('getHistoryIndex');\n };\n\n History.prototype.go = function go(movement) {\n mi('go');\n };\n\n return History;\n}();","import { getLogger } from 'aurelia-logging';\nimport { Container } from 'aurelia-dependency-injection';\nimport { History } from 'aurelia-history';\nimport { RouteRecognizer } from 'aurelia-route-recognizer';\nimport { EventAggregator } from 'aurelia-event-aggregator';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\n\n/**\r\n * Class used to represent an instruction during a navigation.\r\n */\r\nvar NavigationInstruction = /** @class */ (function () {\r\n function NavigationInstruction(init) {\r\n /**\r\n * Current built viewport plan of this nav instruction\r\n */\r\n this.plan = null;\r\n this.options = {};\r\n Object.assign(this, init);\r\n this.params = this.params || {};\r\n this.viewPortInstructions = {};\r\n var ancestorParams = [];\r\n var current = this;\r\n do {\r\n var currentParams = Object.assign({}, current.params);\r\n if (current.config && current.config.hasChildRouter) {\r\n // remove the param for the injected child route segment\r\n delete currentParams[current.getWildCardName()];\r\n }\r\n ancestorParams.unshift(currentParams);\r\n current = current.parentInstruction;\r\n } while (current);\r\n var allParams = Object.assign.apply(Object, [{}, this.queryParams].concat(ancestorParams));\r\n this.lifecycleArgs = [allParams, this.config, this];\r\n }\r\n /**\r\n * Gets an array containing this instruction and all child instructions for the current navigation.\r\n */\r\n NavigationInstruction.prototype.getAllInstructions = function () {\r\n var instructions = [this];\r\n var viewPortInstructions = this.viewPortInstructions;\r\n for (var key in viewPortInstructions) {\r\n var childInstruction = viewPortInstructions[key].childNavigationInstruction;\r\n if (childInstruction) {\r\n instructions.push.apply(instructions, childInstruction.getAllInstructions());\r\n }\r\n }\r\n return instructions;\r\n };\r\n /**\r\n * Gets an array containing the instruction and all child instructions for the previous navigation.\r\n * Previous instructions are no longer available after navigation completes.\r\n */\r\n NavigationInstruction.prototype.getAllPreviousInstructions = function () {\r\n return this.getAllInstructions().map(function (c) { return c.previousInstruction; }).filter(function (c) { return c; });\r\n };\r\n NavigationInstruction.prototype.addViewPortInstruction = function (nameOrInitOptions, strategy, moduleId, component) {\r\n var viewPortInstruction;\r\n var viewPortName = typeof nameOrInitOptions === 'string' ? nameOrInitOptions : nameOrInitOptions.name;\r\n var lifecycleArgs = this.lifecycleArgs;\r\n var config = Object.assign({}, lifecycleArgs[1], { currentViewPort: viewPortName });\r\n if (typeof nameOrInitOptions === 'string') {\r\n viewPortInstruction = {\r\n name: nameOrInitOptions,\r\n strategy: strategy,\r\n moduleId: moduleId,\r\n component: component,\r\n childRouter: component.childRouter,\r\n lifecycleArgs: [lifecycleArgs[0], config, lifecycleArgs[2]]\r\n };\r\n }\r\n else {\r\n viewPortInstruction = {\r\n name: viewPortName,\r\n strategy: nameOrInitOptions.strategy,\r\n component: nameOrInitOptions.component,\r\n moduleId: nameOrInitOptions.moduleId,\r\n childRouter: nameOrInitOptions.component.childRouter,\r\n lifecycleArgs: [lifecycleArgs[0], config, lifecycleArgs[2]]\r\n };\r\n }\r\n return this.viewPortInstructions[viewPortName] = viewPortInstruction;\r\n };\r\n /**\r\n * Gets the name of the route pattern's wildcard parameter, if applicable.\r\n */\r\n NavigationInstruction.prototype.getWildCardName = function () {\r\n // todo: potential issue, or at least unsafe typings\r\n var configRoute = this.config.route;\r\n var wildcardIndex = configRoute.lastIndexOf('*');\r\n return configRoute.substr(wildcardIndex + 1);\r\n };\r\n /**\r\n * Gets the path and query string created by filling the route\r\n * pattern's wildcard parameter with the matching param.\r\n */\r\n NavigationInstruction.prototype.getWildcardPath = function () {\r\n var wildcardName = this.getWildCardName();\r\n var path = this.params[wildcardName] || '';\r\n var queryString = this.queryString;\r\n if (queryString) {\r\n path += '?' + queryString;\r\n }\r\n return path;\r\n };\r\n /**\r\n * Gets the instruction's base URL, accounting for wildcard route parameters.\r\n */\r\n NavigationInstruction.prototype.getBaseUrl = function () {\r\n var _this = this;\r\n var $encodeURI = encodeURI;\r\n var fragment = decodeURI(this.fragment);\r\n if (fragment === '') {\r\n var nonEmptyRoute = this.router.routes.find(function (route) {\r\n return route.name === _this.config.name &&\r\n route.route !== '';\r\n });\r\n if (nonEmptyRoute) {\r\n fragment = nonEmptyRoute.route;\r\n }\r\n }\r\n if (!this.params) {\r\n return $encodeURI(fragment);\r\n }\r\n var wildcardName = this.getWildCardName();\r\n var path = this.params[wildcardName] || '';\r\n if (!path) {\r\n return $encodeURI(fragment);\r\n }\r\n return $encodeURI(fragment.substr(0, fragment.lastIndexOf(path)));\r\n };\r\n /**\r\n * Finalize a viewport instruction\r\n * @internal\r\n */\r\n NavigationInstruction.prototype._commitChanges = function (waitToSwap) {\r\n var _this = this;\r\n var router = this.router;\r\n router.currentInstruction = this;\r\n var previousInstruction = this.previousInstruction;\r\n if (previousInstruction) {\r\n previousInstruction.config.navModel.isActive = false;\r\n }\r\n this.config.navModel.isActive = true;\r\n router.refreshNavigation();\r\n var loads = [];\r\n var delaySwaps = [];\r\n var viewPortInstructions = this.viewPortInstructions;\r\n var _loop_1 = function (viewPortName) {\r\n var viewPortInstruction = viewPortInstructions[viewPortName];\r\n var viewPort = router.viewPorts[viewPortName];\r\n if (!viewPort) {\r\n throw new Error(\"There was no router-view found in the view for \" + viewPortInstruction.moduleId + \".\");\r\n }\r\n var childNavInstruction = viewPortInstruction.childNavigationInstruction;\r\n if (viewPortInstruction.strategy === \"replace\" /* Replace */) {\r\n if (childNavInstruction && childNavInstruction.parentCatchHandler) {\r\n loads.push(childNavInstruction._commitChanges(waitToSwap));\r\n }\r\n else {\r\n if (waitToSwap) {\r\n delaySwaps.push({ viewPort: viewPort, viewPortInstruction: viewPortInstruction });\r\n }\r\n loads.push(viewPort\r\n .process(viewPortInstruction, waitToSwap)\r\n .then(function () { return childNavInstruction\r\n ? childNavInstruction._commitChanges(waitToSwap)\r\n : Promise.resolve(); }));\r\n }\r\n }\r\n else {\r\n if (childNavInstruction) {\r\n loads.push(childNavInstruction._commitChanges(waitToSwap));\r\n }\r\n }\r\n };\r\n for (var viewPortName in viewPortInstructions) {\r\n _loop_1(viewPortName);\r\n }\r\n return Promise\r\n .all(loads)\r\n .then(function () {\r\n delaySwaps.forEach(function (x) { return x.viewPort.swap(x.viewPortInstruction); });\r\n return null;\r\n })\r\n .then(function () { return prune(_this); });\r\n };\r\n /**@internal */\r\n NavigationInstruction.prototype._updateTitle = function () {\r\n var router = this.router;\r\n var title = this._buildTitle(router.titleSeparator);\r\n if (title) {\r\n router.history.setTitle(title);\r\n }\r\n };\r\n /**@internal */\r\n NavigationInstruction.prototype._buildTitle = function (separator) {\r\n if (separator === void 0) { separator = ' | '; }\r\n var title = '';\r\n var childTitles = [];\r\n var navModelTitle = this.config.navModel.title;\r\n var instructionRouter = this.router;\r\n var viewPortInstructions = this.viewPortInstructions;\r\n if (navModelTitle) {\r\n title = instructionRouter.transformTitle(navModelTitle);\r\n }\r\n for (var viewPortName in viewPortInstructions) {\r\n var viewPortInstruction = viewPortInstructions[viewPortName];\r\n var child_nav_instruction = viewPortInstruction.childNavigationInstruction;\r\n if (child_nav_instruction) {\r\n var childTitle = child_nav_instruction._buildTitle(separator);\r\n if (childTitle) {\r\n childTitles.push(childTitle);\r\n }\r\n }\r\n }\r\n if (childTitles.length) {\r\n title = childTitles.join(separator) + (title ? separator : '') + title;\r\n }\r\n if (instructionRouter.title) {\r\n title += (title ? separator : '') + instructionRouter.transformTitle(instructionRouter.title);\r\n }\r\n return title;\r\n };\r\n return NavigationInstruction;\r\n}());\r\nvar prune = function (instruction) {\r\n instruction.previousInstruction = null;\r\n instruction.plan = null;\r\n};\n\n/**\r\n* Class for storing and interacting with a route's navigation settings.\r\n*/\r\nvar NavModel = /** @class */ (function () {\r\n function NavModel(router, relativeHref) {\r\n /**\r\n * True if this nav item is currently active.\r\n */\r\n this.isActive = false;\r\n /**\r\n * The title.\r\n */\r\n this.title = null;\r\n /**\r\n * This nav item's absolute href.\r\n */\r\n this.href = null;\r\n /**\r\n * This nav item's relative href.\r\n */\r\n this.relativeHref = null;\r\n /**\r\n * Data attached to the route at configuration time.\r\n */\r\n this.settings = {};\r\n /**\r\n * The route config.\r\n */\r\n this.config = null;\r\n this.router = router;\r\n this.relativeHref = relativeHref;\r\n }\r\n /**\r\n * Sets the route's title and updates document.title.\r\n * If the a navigation is in progress, the change will be applied\r\n * to document.title when the navigation completes.\r\n *\r\n * @param title The new title.\r\n */\r\n NavModel.prototype.setTitle = function (title) {\r\n this.title = title;\r\n if (this.isActive) {\r\n this.router.updateTitle();\r\n }\r\n };\r\n return NavModel;\r\n}());\n\nfunction _normalizeAbsolutePath(path, hasPushState, absolute) {\r\n if (absolute === void 0) { absolute = false; }\r\n if (!hasPushState && path[0] !== '#') {\r\n path = '#' + path;\r\n }\r\n if (hasPushState && absolute) {\r\n path = path.substring(1, path.length);\r\n }\r\n return path;\r\n}\r\nfunction _createRootedPath(fragment, baseUrl, hasPushState, absolute) {\r\n if (isAbsoluteUrl.test(fragment)) {\r\n return fragment;\r\n }\r\n var path = '';\r\n if (baseUrl.length && baseUrl[0] !== '/') {\r\n path += '/';\r\n }\r\n path += baseUrl;\r\n if ((!path.length || path[path.length - 1] !== '/') && fragment[0] !== '/') {\r\n path += '/';\r\n }\r\n if (path.length && path[path.length - 1] === '/' && fragment[0] === '/') {\r\n path = path.substring(0, path.length - 1);\r\n }\r\n return _normalizeAbsolutePath(path + fragment, hasPushState, absolute);\r\n}\r\nfunction _resolveUrl(fragment, baseUrl, hasPushState) {\r\n if (isRootedPath.test(fragment)) {\r\n return _normalizeAbsolutePath(fragment, hasPushState);\r\n }\r\n return _createRootedPath(fragment, baseUrl, hasPushState);\r\n}\r\nfunction _ensureArrayWithSingleRoutePerConfig(config) {\r\n var routeConfigs = [];\r\n if (Array.isArray(config.route)) {\r\n for (var i = 0, ii = config.route.length; i < ii; ++i) {\r\n var current = Object.assign({}, config);\r\n current.route = config.route[i];\r\n routeConfigs.push(current);\r\n }\r\n }\r\n else {\r\n routeConfigs.push(Object.assign({}, config));\r\n }\r\n return routeConfigs;\r\n}\r\nvar isRootedPath = /^#?\\//;\r\nvar isAbsoluteUrl = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\n\n/**\r\n * Class used to configure a [[Router]] instance.\r\n *\r\n * @constructor\r\n */\r\nvar RouterConfiguration = /** @class */ (function () {\r\n function RouterConfiguration() {\r\n this.instructions = [];\r\n this.options = {};\r\n this.pipelineSteps = [];\r\n }\r\n /**\r\n * Adds a step to be run during the [[Router]]'s navigation pipeline.\r\n *\r\n * @param name The name of the pipeline slot to insert the step into.\r\n * @param step The pipeline step.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.addPipelineStep = function (name, step) {\r\n if (step === null || step === undefined) {\r\n throw new Error('Pipeline step cannot be null or undefined.');\r\n }\r\n this.pipelineSteps.push({ name: name, step: step });\r\n return this;\r\n };\r\n /**\r\n * Adds a step to be run during the [[Router]]'s authorize pipeline slot.\r\n *\r\n * @param step The pipeline step.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.addAuthorizeStep = function (step) {\r\n return this.addPipelineStep(\"authorize\" /* Authorize */, step);\r\n };\r\n /**\r\n * Adds a step to be run during the [[Router]]'s preActivate pipeline slot.\r\n *\r\n * @param step The pipeline step.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.addPreActivateStep = function (step) {\r\n return this.addPipelineStep(\"preActivate\" /* PreActivate */, step);\r\n };\r\n /**\r\n * Adds a step to be run during the [[Router]]'s preRender pipeline slot.\r\n *\r\n * @param step The pipeline step.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.addPreRenderStep = function (step) {\r\n return this.addPipelineStep(\"preRender\" /* PreRender */, step);\r\n };\r\n /**\r\n * Adds a step to be run during the [[Router]]'s postRender pipeline slot.\r\n *\r\n * @param step The pipeline step.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.addPostRenderStep = function (step) {\r\n return this.addPipelineStep(\"postRender\" /* PostRender */, step);\r\n };\r\n /**\r\n * Configures a route that will be used if there is no previous location available on navigation cancellation.\r\n *\r\n * @param fragment The URL fragment to use as the navigation destination.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.fallbackRoute = function (fragment) {\r\n this._fallbackRoute = fragment;\r\n return this;\r\n };\r\n /**\r\n * Maps one or more routes to be registered with the router.\r\n *\r\n * @param route The [[RouteConfig]] to map, or an array of [[RouteConfig]] to map.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.map = function (route) {\r\n var _this = this;\r\n if (Array.isArray(route)) {\r\n route.forEach(function (r) { return _this.map(r); });\r\n return this;\r\n }\r\n return this.mapRoute(route);\r\n };\r\n /**\r\n * Configures defaults to use for any view ports.\r\n *\r\n * @param viewPortConfig a view port configuration object to use as a\r\n * default, of the form { viewPortName: { moduleId } }.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.useViewPortDefaults = function (viewPortConfig) {\r\n this.viewPortDefaults = viewPortConfig;\r\n return this;\r\n };\r\n /**\r\n * Maps a single route to be registered with the router.\r\n *\r\n * @param route The [[RouteConfig]] to map.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.mapRoute = function (config) {\r\n this.instructions.push(function (router) {\r\n var routeConfigs = _ensureArrayWithSingleRoutePerConfig(config);\r\n var navModel;\r\n for (var i = 0, ii = routeConfigs.length; i < ii; ++i) {\r\n var routeConfig = routeConfigs[i];\r\n routeConfig.settings = routeConfig.settings || {};\r\n if (!navModel) {\r\n navModel = router.createNavModel(routeConfig);\r\n }\r\n router.addRoute(routeConfig, navModel);\r\n }\r\n });\r\n return this;\r\n };\r\n /**\r\n * Registers an unknown route handler to be run when the URL fragment doesn't match any registered routes.\r\n *\r\n * @param config A string containing a moduleId to load, or a [[RouteConfig]], or a function that takes the\r\n * [[NavigationInstruction]] and selects a moduleId to load.\r\n * @chainable\r\n */\r\n RouterConfiguration.prototype.mapUnknownRoutes = function (config) {\r\n this.unknownRouteConfig = config;\r\n return this;\r\n };\r\n /**\r\n * Applies the current configuration to the specified [[Router]].\r\n *\r\n * @param router The [[Router]] to apply the configuration to.\r\n */\r\n RouterConfiguration.prototype.exportToRouter = function (router) {\r\n var instructions = this.instructions;\r\n for (var i = 0, ii = instructions.length; i < ii; ++i) {\r\n instructions[i](router);\r\n }\r\n var _a = this, title = _a.title, titleSeparator = _a.titleSeparator, unknownRouteConfig = _a.unknownRouteConfig, _fallbackRoute = _a._fallbackRoute, viewPortDefaults = _a.viewPortDefaults;\r\n if (title) {\r\n router.title = title;\r\n }\r\n if (titleSeparator) {\r\n router.titleSeparator = titleSeparator;\r\n }\r\n if (unknownRouteConfig) {\r\n router.handleUnknownRoutes(unknownRouteConfig);\r\n }\r\n if (_fallbackRoute) {\r\n router.fallbackRoute = _fallbackRoute;\r\n }\r\n if (viewPortDefaults) {\r\n router.useViewPortDefaults(viewPortDefaults);\r\n }\r\n Object.assign(router.options, this.options);\r\n var pipelineSteps = this.pipelineSteps;\r\n var pipelineStepCount = pipelineSteps.length;\r\n if (pipelineStepCount) {\r\n if (!router.isRoot) {\r\n throw new Error('Pipeline steps can only be added to the root router');\r\n }\r\n var pipelineProvider = router.pipelineProvider;\r\n for (var i = 0, ii = pipelineStepCount; i < ii; ++i) {\r\n var _b = pipelineSteps[i], name_1 = _b.name, step = _b.step;\r\n pipelineProvider.addStep(name_1, step);\r\n }\r\n }\r\n };\r\n return RouterConfiguration;\r\n}());\n\n/**\r\n * The primary class responsible for handling routing and navigation.\r\n */\r\nvar Router = /** @class */ (function () {\r\n /**\r\n * @param container The [[Container]] to use when child routers.\r\n * @param history The [[History]] implementation to delegate navigation requests to.\r\n */\r\n function Router(container, history) {\r\n var _this = this;\r\n /**\r\n * The parent router, or null if this instance is not a child router.\r\n */\r\n this.parent = null;\r\n this.options = {};\r\n /**\r\n * The defaults used when a viewport lacks specified content\r\n */\r\n this.viewPortDefaults = {};\r\n /**\r\n * Extension point to transform the document title before it is built and displayed.\r\n * By default, child routers delegate to the parent router, and the app router\r\n * returns the title unchanged.\r\n */\r\n this.transformTitle = function (title) {\r\n if (_this.parent) {\r\n return _this.parent.transformTitle(title);\r\n }\r\n return title;\r\n };\r\n this.container = container;\r\n this.history = history;\r\n this.reset();\r\n }\r\n /**\r\n * Fully resets the router's internal state. Primarily used internally by the framework when multiple calls to setRoot are made.\r\n * Use with caution (actually, avoid using this). Do not use this to simply change your navigation model.\r\n */\r\n Router.prototype.reset = function () {\r\n var _this = this;\r\n this.viewPorts = {};\r\n this.routes = [];\r\n this.baseUrl = '';\r\n this.isConfigured = false;\r\n this.isNavigating = false;\r\n this.isExplicitNavigation = false;\r\n this.isExplicitNavigationBack = false;\r\n this.isNavigatingFirst = false;\r\n this.isNavigatingNew = false;\r\n this.isNavigatingRefresh = false;\r\n this.isNavigatingForward = false;\r\n this.isNavigatingBack = false;\r\n this.couldDeactivate = false;\r\n this.navigation = [];\r\n this.currentInstruction = null;\r\n this.viewPortDefaults = {};\r\n this._fallbackOrder = 100;\r\n this._recognizer = new RouteRecognizer();\r\n this._childRecognizer = new RouteRecognizer();\r\n this._configuredPromise = new Promise(function (resolve) {\r\n _this._resolveConfiguredPromise = resolve;\r\n });\r\n };\r\n Object.defineProperty(Router.prototype, \"isRoot\", {\r\n /**\r\n * Gets a value indicating whether or not this [[Router]] is the root in the router tree. I.e., it has no parent.\r\n */\r\n get: function () {\r\n return !this.parent;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * Registers a viewPort to be used as a rendering target for activated routes.\r\n *\r\n * @param viewPort The viewPort.\r\n * @param name The name of the viewPort. 'default' if unspecified.\r\n */\r\n Router.prototype.registerViewPort = function (viewPort, name) {\r\n name = name || 'default';\r\n this.viewPorts[name] = viewPort;\r\n };\r\n /**\r\n * Returns a Promise that resolves when the router is configured.\r\n */\r\n Router.prototype.ensureConfigured = function () {\r\n return this._configuredPromise;\r\n };\r\n /**\r\n * Configures the router.\r\n *\r\n * @param callbackOrConfig The [[RouterConfiguration]] or a callback that takes a [[RouterConfiguration]].\r\n */\r\n Router.prototype.configure = function (callbackOrConfig) {\r\n var _this = this;\r\n this.isConfigured = true;\r\n var result = callbackOrConfig;\r\n var config;\r\n if (typeof callbackOrConfig === 'function') {\r\n config = new RouterConfiguration();\r\n result = callbackOrConfig(config);\r\n }\r\n return Promise\r\n .resolve(result)\r\n .then(function (c) {\r\n if (c && c.exportToRouter) {\r\n config = c;\r\n }\r\n config.exportToRouter(_this);\r\n _this.isConfigured = true;\r\n _this._resolveConfiguredPromise();\r\n });\r\n };\r\n /**\r\n * Navigates to a new location.\r\n *\r\n * @param fragment The URL fragment to use as the navigation destination.\r\n * @param options The navigation options.\r\n */\r\n Router.prototype.navigate = function (fragment, options) {\r\n if (!this.isConfigured && this.parent) {\r\n return this.parent.navigate(fragment, options);\r\n }\r\n this.isExplicitNavigation = true;\r\n return this.history.navigate(_resolveUrl(fragment, this.baseUrl, this.history._hasPushState), options);\r\n };\r\n /**\r\n * Navigates to a new location corresponding to the route and params specified. Equivallent to [[Router.generate]] followed\r\n * by [[Router.navigate]].\r\n *\r\n * @param route The name of the route to use when generating the navigation location.\r\n * @param params The route parameters to be used when populating the route pattern.\r\n * @param options The navigation options.\r\n */\r\n Router.prototype.navigateToRoute = function (route, params, options) {\r\n var path = this.generate(route, params);\r\n return this.navigate(path, options);\r\n };\r\n /**\r\n * Navigates back to the most recent location in history.\r\n */\r\n Router.prototype.navigateBack = function () {\r\n this.isExplicitNavigationBack = true;\r\n this.history.navigateBack();\r\n };\r\n /**\r\n * Creates a child router of the current router.\r\n *\r\n * @param container The [[Container]] to provide to the child router. Uses the current [[Router]]'s [[Container]] if unspecified.\r\n * @returns {Router} The new child Router.\r\n */\r\n Router.prototype.createChild = function (container) {\r\n var childRouter = new Router(container || this.container.createChild(), this.history);\r\n childRouter.parent = this;\r\n return childRouter;\r\n };\r\n /**\r\n * Generates a URL fragment matching the specified route pattern.\r\n *\r\n * @param name The name of the route whose pattern should be used to generate the fragment.\r\n * @param params The route params to be used to populate the route pattern.\r\n * @param options If options.absolute = true, then absolute url will be generated; otherwise, it will be relative url.\r\n * @returns {string} A string containing the generated URL fragment.\r\n */\r\n Router.prototype.generate = function (nameOrRoute, params, options) {\r\n if (params === void 0) { params = {}; }\r\n if (options === void 0) { options = {}; }\r\n // A child recognizer generates routes for potential child routes. Any potential child route is added\r\n // to the childRoute property of params for the childRouter to recognize. When generating routes, we\r\n // use the childRecognizer when childRoute params are available to generate a child router enabled route.\r\n var recognizer = 'childRoute' in params ? this._childRecognizer : this._recognizer;\r\n var hasRoute = recognizer.hasRoute(nameOrRoute);\r\n if (!hasRoute) {\r\n if (this.parent) {\r\n return this.parent.generate(nameOrRoute, params, options);\r\n }\r\n throw new Error(\"A route with name '\" + nameOrRoute + \"' could not be found. Check that `name: '\" + nameOrRoute + \"'` was specified in the route's config.\");\r\n }\r\n var path = recognizer.generate(nameOrRoute, params);\r\n var rootedPath = _createRootedPath(path, this.baseUrl, this.history._hasPushState, options.absolute);\r\n return options.absolute ? \"\" + this.history.getAbsoluteRoot() + rootedPath : rootedPath;\r\n };\r\n /**\r\n * Creates a [[NavModel]] for the specified route config.\r\n *\r\n * @param config The route config.\r\n */\r\n Router.prototype.createNavModel = function (config) {\r\n var navModel = new NavModel(this, 'href' in config\r\n ? config.href\r\n // potential error when config.route is a string[] ?\r\n : config.route);\r\n navModel.title = config.title;\r\n navModel.order = config.nav;\r\n navModel.href = config.href;\r\n navModel.settings = config.settings;\r\n navModel.config = config;\r\n return navModel;\r\n };\r\n /**\r\n * Registers a new route with the router.\r\n *\r\n * @param config The [[RouteConfig]].\r\n * @param navModel The [[NavModel]] to use for the route. May be omitted for single-pattern routes.\r\n */\r\n Router.prototype.addRoute = function (config, navModel) {\r\n if (Array.isArray(config.route)) {\r\n var routeConfigs = _ensureArrayWithSingleRoutePerConfig(config);\r\n // the following is wrong. todo: fix this after TS refactoring release\r\n routeConfigs.forEach(this.addRoute.bind(this));\r\n return;\r\n }\r\n validateRouteConfig(config);\r\n if (!('viewPorts' in config) && !config.navigationStrategy) {\r\n config.viewPorts = {\r\n 'default': {\r\n moduleId: config.moduleId,\r\n view: config.view\r\n }\r\n };\r\n }\r\n if (!navModel) {\r\n navModel = this.createNavModel(config);\r\n }\r\n this.routes.push(config);\r\n var path = config.route;\r\n if (path.charAt(0) === '/') {\r\n path = path.substr(1);\r\n }\r\n var caseSensitive = config.caseSensitive === true;\r\n var state = this._recognizer.add({\r\n path: path,\r\n handler: config,\r\n caseSensitive: caseSensitive\r\n });\r\n if (path) {\r\n var settings = config.settings;\r\n delete config.settings;\r\n var withChild = JSON.parse(JSON.stringify(config));\r\n config.settings = settings;\r\n withChild.route = path + \"/*childRoute\";\r\n withChild.hasChildRouter = true;\r\n this._childRecognizer.add({\r\n path: withChild.route,\r\n handler: withChild,\r\n caseSensitive: caseSensitive\r\n });\r\n withChild.navModel = navModel;\r\n withChild.settings = config.settings;\r\n withChild.navigationStrategy = config.navigationStrategy;\r\n }\r\n config.navModel = navModel;\r\n var navigation = this.navigation;\r\n if ((navModel.order || navModel.order === 0) && navigation.indexOf(navModel) === -1) {\r\n if ((!navModel.href && navModel.href !== '') && (state.types.dynamics || state.types.stars)) {\r\n throw new Error('Invalid route config for \"' + config.route + '\" : dynamic routes must specify an \"href:\" to be included in the navigation model.');\r\n }\r\n if (typeof navModel.order !== 'number') {\r\n navModel.order = ++this._fallbackOrder;\r\n }\r\n navigation.push(navModel);\r\n // this is a potential error / inconsistency between browsers\r\n //\r\n // MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort\r\n // If compareFunction(a, b) returns 0, leave a and b unchanged with respect to each other,\r\n // but sorted with respect to all different elements.\r\n // Note: the ECMAscript standard does not guarantee this behaviour,\r\n // and thus not all browsers (e.g. Mozilla versions dating back to at least 2003) respect this.\r\n navigation.sort(function (a, b) { return a.order - b.order; });\r\n }\r\n };\r\n /**\r\n * Gets a value indicating whether or not this [[Router]] or one of its ancestors has a route registered with the specified name.\r\n *\r\n * @param name The name of the route to check.\r\n */\r\n Router.prototype.hasRoute = function (name) {\r\n return !!(this._recognizer.hasRoute(name) || this.parent && this.parent.hasRoute(name));\r\n };\r\n /**\r\n * Gets a value indicating whether or not this [[Router]] has a route registered with the specified name.\r\n *\r\n * @param name The name of the route to check.\r\n */\r\n Router.prototype.hasOwnRoute = function (name) {\r\n return this._recognizer.hasRoute(name);\r\n };\r\n /**\r\n * Register a handler to use when the incoming URL fragment doesn't match any registered routes.\r\n *\r\n * @param config The moduleId, or a function that selects the moduleId, or a [[RouteConfig]].\r\n */\r\n Router.prototype.handleUnknownRoutes = function (config) {\r\n var _this = this;\r\n if (!config) {\r\n throw new Error('Invalid unknown route handler');\r\n }\r\n this.catchAllHandler = function (instruction) {\r\n return _this\r\n ._createRouteConfig(config, instruction)\r\n .then(function (c) {\r\n instruction.config = c;\r\n return instruction;\r\n });\r\n };\r\n };\r\n /**\r\n * Updates the document title using the current navigation instruction.\r\n */\r\n Router.prototype.updateTitle = function () {\r\n var parentRouter = this.parent;\r\n if (parentRouter) {\r\n return parentRouter.updateTitle();\r\n }\r\n var currentInstruction = this.currentInstruction;\r\n if (currentInstruction) {\r\n currentInstruction._updateTitle();\r\n }\r\n return undefined;\r\n };\r\n /**\r\n * Updates the navigation routes with hrefs relative to the current location.\r\n * Note: This method will likely move to a plugin in a future release.\r\n */\r\n Router.prototype.refreshNavigation = function () {\r\n var nav = this.navigation;\r\n for (var i = 0, length_1 = nav.length; i < length_1; i++) {\r\n var current = nav[i];\r\n if (!current.config.href) {\r\n current.href = _createRootedPath(current.relativeHref, this.baseUrl, this.history._hasPushState);\r\n }\r\n else {\r\n current.href = _normalizeAbsolutePath(current.config.href, this.history._hasPushState);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets the default configuration for the view ports. This specifies how to\r\n * populate a view port for which no module is specified. The default is\r\n * an empty view/view-model pair.\r\n */\r\n Router.prototype.useViewPortDefaults = function ($viewPortDefaults) {\r\n // a workaround to have strong typings while not requiring to expose interface ViewPortInstruction\r\n var viewPortDefaults = $viewPortDefaults;\r\n for (var viewPortName in viewPortDefaults) {\r\n var viewPortConfig = viewPortDefaults[viewPortName];\r\n this.viewPortDefaults[viewPortName] = {\r\n moduleId: viewPortConfig.moduleId\r\n };\r\n }\r\n };\r\n /**@internal */\r\n Router.prototype._refreshBaseUrl = function () {\r\n var parentRouter = this.parent;\r\n if (parentRouter) {\r\n this.baseUrl = generateBaseUrl(parentRouter, parentRouter.currentInstruction);\r\n }\r\n };\r\n /**@internal */\r\n Router.prototype._createNavigationInstruction = function (url, parentInstruction) {\r\n if (url === void 0) { url = ''; }\r\n if (parentInstruction === void 0) { parentInstruction = null; }\r\n var fragment = url;\r\n var queryString = '';\r\n var queryIndex = url.indexOf('?');\r\n if (queryIndex !== -1) {\r\n fragment = url.substr(0, queryIndex);\r\n queryString = url.substr(queryIndex + 1);\r\n }\r\n var urlRecognizationResults = this._recognizer.recognize(url);\r\n if (!urlRecognizationResults || !urlRecognizationResults.length) {\r\n urlRecognizationResults = this._childRecognizer.recognize(url);\r\n }\r\n var instructionInit = {\r\n fragment: fragment,\r\n queryString: queryString,\r\n config: null,\r\n parentInstruction: parentInstruction,\r\n previousInstruction: this.currentInstruction,\r\n router: this,\r\n options: {\r\n compareQueryParams: this.options.compareQueryParams\r\n }\r\n };\r\n var result;\r\n if (urlRecognizationResults && urlRecognizationResults.length) {\r\n var first = urlRecognizationResults[0];\r\n var instruction = new NavigationInstruction(Object.assign({}, instructionInit, {\r\n params: first.params,\r\n queryParams: first.queryParams || urlRecognizationResults.queryParams,\r\n config: first.config || first.handler\r\n }));\r\n if (typeof first.handler === 'function') {\r\n result = evaluateNavigationStrategy(instruction, first.handler, first);\r\n }\r\n else if (first.handler && typeof first.handler.navigationStrategy === 'function') {\r\n result = evaluateNavigationStrategy(instruction, first.handler.navigationStrategy, first.handler);\r\n }\r\n else {\r\n result = Promise.resolve(instruction);\r\n }\r\n }\r\n else if (this.catchAllHandler) {\r\n var instruction = new NavigationInstruction(Object.assign({}, instructionInit, {\r\n params: { path: fragment },\r\n queryParams: urlRecognizationResults ? urlRecognizationResults.queryParams : {},\r\n config: null // config will be created by the catchAllHandler\r\n }));\r\n result = evaluateNavigationStrategy(instruction, this.catchAllHandler);\r\n }\r\n else if (this.parent) {\r\n var router = this._parentCatchAllHandler(this.parent);\r\n if (router) {\r\n var newParentInstruction = this._findParentInstructionFromRouter(router, parentInstruction);\r\n var instruction = new NavigationInstruction(Object.assign({}, instructionInit, {\r\n params: { path: fragment },\r\n queryParams: urlRecognizationResults ? urlRecognizationResults.queryParams : {},\r\n router: router,\r\n parentInstruction: newParentInstruction,\r\n parentCatchHandler: true,\r\n config: null // config will be created by the chained parent catchAllHandler\r\n }));\r\n result = evaluateNavigationStrategy(instruction, router.catchAllHandler);\r\n }\r\n }\r\n if (result && parentInstruction) {\r\n this.baseUrl = generateBaseUrl(this.parent, parentInstruction);\r\n }\r\n return result || Promise.reject(new Error(\"Route not found: \" + url));\r\n };\r\n /**@internal */\r\n Router.prototype._findParentInstructionFromRouter = function (router, instruction) {\r\n if (instruction.router === router) {\r\n instruction.fragment = router.baseUrl; // need to change the fragment in case of a redirect instead of moduleId\r\n return instruction;\r\n }\r\n else if (instruction.parentInstruction) {\r\n return this._findParentInstructionFromRouter(router, instruction.parentInstruction);\r\n }\r\n return undefined;\r\n };\r\n /**@internal */\r\n Router.prototype._parentCatchAllHandler = function (router) {\r\n if (router.catchAllHandler) {\r\n return router;\r\n }\r\n else if (router.parent) {\r\n return this._parentCatchAllHandler(router.parent);\r\n }\r\n return false;\r\n };\r\n /**\r\n * @internal\r\n */\r\n Router.prototype._createRouteConfig = function (config, instruction) {\r\n var _this = this;\r\n return Promise\r\n .resolve(config)\r\n .then(function (c) {\r\n if (typeof c === 'string') {\r\n return { moduleId: c };\r\n }\r\n else if (typeof c === 'function') {\r\n return c(instruction);\r\n }\r\n return c;\r\n })\r\n // typing here could be either RouteConfig or RedirectConfig\r\n // but temporarily treat both as RouteConfig\r\n // todo: improve typings precision\r\n .then(function (c) { return typeof c === 'string' ? { moduleId: c } : c; })\r\n .then(function (c) {\r\n c.route = instruction.params.path;\r\n validateRouteConfig(c);\r\n if (!c.navModel) {\r\n c.navModel = _this.createNavModel(c);\r\n }\r\n return c;\r\n });\r\n };\r\n return Router;\r\n}());\r\n/* @internal exported for unit testing */\r\nvar generateBaseUrl = function (router, instruction) {\r\n return \"\" + (router.baseUrl || '') + (instruction.getBaseUrl() || '');\r\n};\r\n/* @internal exported for unit testing */\r\nvar validateRouteConfig = function (config) {\r\n if (typeof config !== 'object') {\r\n throw new Error('Invalid Route Config');\r\n }\r\n if (typeof config.route !== 'string') {\r\n var name_1 = config.name || '(no name)';\r\n throw new Error('Invalid Route Config for \"' + name_1 + '\": You must specify a \"route:\" pattern.');\r\n }\r\n if (!('redirect' in config || config.moduleId || config.navigationStrategy || config.viewPorts)) {\r\n throw new Error('Invalid Route Config for \"' + config.route + '\": You must specify a \"moduleId:\", \"redirect:\", \"navigationStrategy:\", or \"viewPorts:\".');\r\n }\r\n};\r\n/* @internal exported for unit testing */\r\nvar evaluateNavigationStrategy = function (instruction, evaluator, context) {\r\n return Promise\r\n .resolve(evaluator.call(context, instruction))\r\n .then(function () {\r\n if (!('viewPorts' in instruction.config)) {\r\n instruction.config.viewPorts = {\r\n 'default': {\r\n moduleId: instruction.config.moduleId\r\n }\r\n };\r\n }\r\n return instruction;\r\n });\r\n};\n\n/**@internal exported for unit testing */\r\nvar createNextFn = function (instruction, steps) {\r\n var index = -1;\r\n var next = function () {\r\n index++;\r\n if (index < steps.length) {\r\n var currentStep = steps[index];\r\n try {\r\n return currentStep(instruction, next);\r\n }\r\n catch (e) {\r\n return next.reject(e);\r\n }\r\n }\r\n else {\r\n return next.complete();\r\n }\r\n };\r\n next.complete = createCompletionHandler(next, \"completed\" /* Completed */);\r\n next.cancel = createCompletionHandler(next, \"canceled\" /* Canceled */);\r\n next.reject = createCompletionHandler(next, \"rejected\" /* Rejected */);\r\n return next;\r\n};\r\n/**@internal exported for unit testing */\r\nvar createCompletionHandler = function (next, status) {\r\n return function (output) { return Promise\r\n .resolve({\r\n status: status,\r\n output: output,\r\n completed: status === \"completed\" /* Completed */\r\n }); };\r\n};\n\n/**\r\n * The class responsible for managing and processing the navigation pipeline.\r\n */\r\nvar Pipeline = /** @class */ (function () {\r\n function Pipeline() {\r\n /**\r\n * The pipeline steps. And steps added via addStep will be converted to a function\r\n * The actualy running functions with correct step contexts of this pipeline\r\n */\r\n this.steps = [];\r\n }\r\n /**\r\n * Adds a step to the pipeline.\r\n *\r\n * @param step The pipeline step.\r\n */\r\n Pipeline.prototype.addStep = function (step) {\r\n var run;\r\n if (typeof step === 'function') {\r\n run = step;\r\n }\r\n else if (typeof step.getSteps === 'function') {\r\n // getSteps is to enable support open slots\r\n // where devs can add multiple steps into the same slot name\r\n var steps = step.getSteps();\r\n for (var i = 0, l = steps.length; i < l; i++) {\r\n this.addStep(steps[i]);\r\n }\r\n return this;\r\n }\r\n else {\r\n run = step.run.bind(step);\r\n }\r\n this.steps.push(run);\r\n return this;\r\n };\r\n /**\r\n * Runs the pipeline.\r\n *\r\n * @param instruction The navigation instruction to process.\r\n */\r\n Pipeline.prototype.run = function (instruction) {\r\n var nextFn = createNextFn(instruction, this.steps);\r\n return nextFn();\r\n };\r\n return Pipeline;\r\n}());\n\n/**\r\n* Determines if the provided object is a navigation command.\r\n* A navigation command is anything with a navigate method.\r\n*\r\n* @param obj The object to check.\r\n*/\r\nfunction isNavigationCommand(obj) {\r\n return obj && typeof obj.navigate === 'function';\r\n}\r\n/**\r\n* Used during the activation lifecycle to cause a redirect.\r\n*/\r\nvar Redirect = /** @class */ (function () {\r\n /**\r\n * @param url The URL fragment to use as the navigation destination.\r\n * @param options The navigation options.\r\n */\r\n function Redirect(url, options) {\r\n if (options === void 0) { options = {}; }\r\n this.url = url;\r\n this.options = Object.assign({ trigger: true, replace: true }, options);\r\n this.shouldContinueProcessing = false;\r\n }\r\n /**\r\n * Called by the activation system to set the child router.\r\n *\r\n * @param router The router.\r\n */\r\n Redirect.prototype.setRouter = function (router) {\r\n this.router = router;\r\n };\r\n /**\r\n * Called by the navigation pipeline to navigate.\r\n *\r\n * @param appRouter The router to be redirected.\r\n */\r\n Redirect.prototype.navigate = function (appRouter) {\r\n var navigatingRouter = this.options.useAppRouter ? appRouter : (this.router || appRouter);\r\n navigatingRouter.navigate(this.url, this.options);\r\n };\r\n return Redirect;\r\n}());\r\n/**\r\n * Used during the activation lifecycle to cause a redirect to a named route.\r\n */\r\nvar RedirectToRoute = /** @class */ (function () {\r\n /**\r\n * @param route The name of the route.\r\n * @param params The parameters to be sent to the activation method.\r\n * @param options The options to use for navigation.\r\n */\r\n function RedirectToRoute(route, params, options) {\r\n if (params === void 0) { params = {}; }\r\n if (options === void 0) { options = {}; }\r\n this.route = route;\r\n this.params = params;\r\n this.options = Object.assign({ trigger: true, replace: true }, options);\r\n this.shouldContinueProcessing = false;\r\n }\r\n /**\r\n * Called by the activation system to set the child router.\r\n *\r\n * @param router The router.\r\n */\r\n RedirectToRoute.prototype.setRouter = function (router) {\r\n this.router = router;\r\n };\r\n /**\r\n * Called by the navigation pipeline to navigate.\r\n *\r\n * @param appRouter The router to be redirected.\r\n */\r\n RedirectToRoute.prototype.navigate = function (appRouter) {\r\n var navigatingRouter = this.options.useAppRouter ? appRouter : (this.router || appRouter);\r\n navigatingRouter.navigateToRoute(this.route, this.params, this.options);\r\n };\r\n return RedirectToRoute;\r\n}());\n\n/**\r\n * @internal exported for unit testing\r\n */\r\nfunction _buildNavigationPlan(instruction, forceLifecycleMinimum) {\r\n var config = instruction.config;\r\n if ('redirect' in config) {\r\n return buildRedirectPlan(instruction);\r\n }\r\n var prevInstruction = instruction.previousInstruction;\r\n var defaultViewPortConfigs = instruction.router.viewPortDefaults;\r\n if (prevInstruction) {\r\n return buildTransitionPlans(instruction, prevInstruction, defaultViewPortConfigs, forceLifecycleMinimum);\r\n }\r\n // first navigation, only need to prepare a few information for each viewport plan\r\n var viewPortPlans = {};\r\n var viewPortConfigs = config.viewPorts;\r\n for (var viewPortName in viewPortConfigs) {\r\n var viewPortConfig = viewPortConfigs[viewPortName];\r\n if (viewPortConfig.moduleId === null && viewPortName in defaultViewPortConfigs) {\r\n viewPortConfig = defaultViewPortConfigs[viewPortName];\r\n }\r\n viewPortPlans[viewPortName] = {\r\n name: viewPortName,\r\n strategy: \"replace\" /* Replace */,\r\n config: viewPortConfig\r\n };\r\n }\r\n return Promise.resolve(viewPortPlans);\r\n}\r\n/**\r\n * Build redirect plan based on config of a navigation instruction\r\n * @internal exported for unit testing\r\n */\r\nvar buildRedirectPlan = function (instruction) {\r\n var config = instruction.config;\r\n var router = instruction.router;\r\n return router\r\n ._createNavigationInstruction(config.redirect)\r\n .then(function (redirectInstruction) {\r\n var params = {};\r\n var originalInstructionParams = instruction.params;\r\n var redirectInstructionParams = redirectInstruction.params;\r\n for (var key in redirectInstructionParams) {\r\n // If the param on the redirect points to another param, e.g. { route: first/:this, redirect: second/:this }\r\n var val = redirectInstructionParams[key];\r\n if (typeof val === 'string' && val[0] === ':') {\r\n val = val.slice(1);\r\n // And if that param is found on the original instruction then use it\r\n if (val in originalInstructionParams) {\r\n params[key] = originalInstructionParams[val];\r\n }\r\n }\r\n else {\r\n params[key] = redirectInstructionParams[key];\r\n }\r\n }\r\n var redirectLocation = router.generate(redirectInstruction.config, params, instruction.options);\r\n // Special handling for child routes\r\n for (var key in originalInstructionParams) {\r\n redirectLocation = redirectLocation.replace(\":\" + key, originalInstructionParams[key]);\r\n }\r\n var queryString = instruction.queryString;\r\n if (queryString) {\r\n redirectLocation += '?' + queryString;\r\n }\r\n return Promise.resolve(new Redirect(redirectLocation));\r\n });\r\n};\r\n/**\r\n * @param viewPortPlans the Plan record that holds information about built plans\r\n * @internal exported for unit testing\r\n */\r\nvar buildTransitionPlans = function (currentInstruction, previousInstruction, defaultViewPortConfigs, forceLifecycleMinimum) {\r\n var viewPortPlans = {};\r\n var newInstructionConfig = currentInstruction.config;\r\n var hasNewParams = hasDifferentParameterValues(previousInstruction, currentInstruction);\r\n var pending = [];\r\n var previousViewPortInstructions = previousInstruction.viewPortInstructions;\r\n var _loop_1 = function (viewPortName) {\r\n var prevViewPortInstruction = previousViewPortInstructions[viewPortName];\r\n var prevViewPortComponent = prevViewPortInstruction.component;\r\n var newInstructionViewPortConfigs = newInstructionConfig.viewPorts;\r\n // if this is invoked on a viewport without any changes, based on new url,\r\n // newViewPortConfig will be the existing viewport instruction\r\n var nextViewPortConfig = viewPortName in newInstructionViewPortConfigs\r\n ? newInstructionViewPortConfigs[viewPortName]\r\n : prevViewPortInstruction;\r\n if (nextViewPortConfig.moduleId === null && viewPortName in defaultViewPortConfigs) {\r\n nextViewPortConfig = defaultViewPortConfigs[viewPortName];\r\n }\r\n var viewPortActivationStrategy = determineActivationStrategy(currentInstruction, prevViewPortInstruction, nextViewPortConfig, hasNewParams, forceLifecycleMinimum);\r\n var viewPortPlan = viewPortPlans[viewPortName] = {\r\n name: viewPortName,\r\n // ViewPortInstruction can quack like a RouteConfig\r\n config: nextViewPortConfig,\r\n prevComponent: prevViewPortComponent,\r\n prevModuleId: prevViewPortInstruction.moduleId,\r\n strategy: viewPortActivationStrategy\r\n };\r\n // recursively build nav plans for all existing child routers/viewports of this viewport\r\n // this is possible because existing child viewports and routers already have necessary information\r\n // to process the wildcard path from parent instruction\r\n if (viewPortActivationStrategy !== \"replace\" /* Replace */ && prevViewPortInstruction.childRouter) {\r\n var path = currentInstruction.getWildcardPath();\r\n var task = prevViewPortInstruction\r\n .childRouter\r\n ._createNavigationInstruction(path, currentInstruction)\r\n .then(function (childInstruction) {\r\n viewPortPlan.childNavigationInstruction = childInstruction;\r\n return _buildNavigationPlan(childInstruction, \r\n // is it safe to assume viewPortPlan has not been changed from previous assignment?\r\n // if so, can just use local variable viewPortPlanStrategy\r\n // there could be user code modifying viewport plan during _createNavigationInstruction?\r\n viewPortPlan.strategy === \"invoke-lifecycle\" /* InvokeLifecycle */)\r\n .then(function (childPlan) {\r\n if (childPlan instanceof Redirect) {\r\n return Promise.reject(childPlan);\r\n }\r\n childInstruction.plan = childPlan;\r\n // for bluebird ?\r\n return null;\r\n });\r\n });\r\n pending.push(task);\r\n }\r\n };\r\n for (var viewPortName in previousViewPortInstructions) {\r\n _loop_1(viewPortName);\r\n }\r\n return Promise.all(pending).then(function () { return viewPortPlans; });\r\n};\r\n/**\r\n * @param newViewPortConfig if this is invoked on a viewport without any changes, based on new url, newViewPortConfig will be the existing viewport instruction\r\n * @internal exported for unit testing\r\n */\r\nvar determineActivationStrategy = function (currentNavInstruction, prevViewPortInstruction, newViewPortConfig, \r\n// indicates whether there is difference between old and new url params\r\nhasNewParams, forceLifecycleMinimum) {\r\n var newInstructionConfig = currentNavInstruction.config;\r\n var prevViewPortViewModel = prevViewPortInstruction.component.viewModel;\r\n var viewPortPlanStrategy;\r\n if (prevViewPortInstruction.moduleId !== newViewPortConfig.moduleId) {\r\n viewPortPlanStrategy = \"replace\" /* Replace */;\r\n }\r\n else if ('determineActivationStrategy' in prevViewPortViewModel) {\r\n viewPortPlanStrategy = prevViewPortViewModel.determineActivationStrategy.apply(prevViewPortViewModel, currentNavInstruction.lifecycleArgs);\r\n }\r\n else if (newInstructionConfig.activationStrategy) {\r\n viewPortPlanStrategy = newInstructionConfig.activationStrategy;\r\n }\r\n else if (hasNewParams || forceLifecycleMinimum) {\r\n viewPortPlanStrategy = \"invoke-lifecycle\" /* InvokeLifecycle */;\r\n }\r\n else {\r\n viewPortPlanStrategy = \"no-change\" /* NoChange */;\r\n }\r\n return viewPortPlanStrategy;\r\n};\r\n/**@internal exported for unit testing */\r\nvar hasDifferentParameterValues = function (prev, next) {\r\n var prevParams = prev.params;\r\n var nextParams = next.params;\r\n var nextWildCardName = next.config.hasChildRouter ? next.getWildCardName() : null;\r\n for (var key in nextParams) {\r\n if (key === nextWildCardName) {\r\n continue;\r\n }\r\n if (prevParams[key] !== nextParams[key]) {\r\n return true;\r\n }\r\n }\r\n for (var key in prevParams) {\r\n if (key === nextWildCardName) {\r\n continue;\r\n }\r\n if (prevParams[key] !== nextParams[key]) {\r\n return true;\r\n }\r\n }\r\n if (!next.options.compareQueryParams) {\r\n return false;\r\n }\r\n var prevQueryParams = prev.queryParams;\r\n var nextQueryParams = next.queryParams;\r\n for (var key in nextQueryParams) {\r\n if (prevQueryParams[key] !== nextQueryParams[key]) {\r\n return true;\r\n }\r\n }\r\n for (var key in prevQueryParams) {\r\n if (prevQueryParams[key] !== nextQueryParams[key]) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n};\n\n/**\r\n * Transform a navigation instruction into viewport plan record object,\r\n * or a redirect request if user viewmodel demands\r\n */\r\nvar BuildNavigationPlanStep = /** @class */ (function () {\r\n function BuildNavigationPlanStep() {\r\n }\r\n BuildNavigationPlanStep.prototype.run = function (navigationInstruction, next) {\r\n return _buildNavigationPlan(navigationInstruction)\r\n .then(function (plan) {\r\n if (plan instanceof Redirect) {\r\n return next.cancel(plan);\r\n }\r\n navigationInstruction.plan = plan;\r\n return next();\r\n })\r\n .catch(next.cancel);\r\n };\r\n return BuildNavigationPlanStep;\r\n}());\n\n/**\r\n * @internal Exported for unit testing\r\n */\r\nvar loadNewRoute = function (routeLoader, navigationInstruction) {\r\n var loadingPlans = determineLoadingPlans(navigationInstruction);\r\n var loadPromises = loadingPlans.map(function (loadingPlan) { return loadRoute(routeLoader, loadingPlan.navigationInstruction, loadingPlan.viewPortPlan); });\r\n return Promise.all(loadPromises);\r\n};\r\n/**\r\n * @internal Exported for unit testing\r\n */\r\nvar determineLoadingPlans = function (navigationInstruction, loadingPlans) {\r\n if (loadingPlans === void 0) { loadingPlans = []; }\r\n var viewPortPlans = navigationInstruction.plan;\r\n for (var viewPortName in viewPortPlans) {\r\n var viewPortPlan = viewPortPlans[viewPortName];\r\n var childNavInstruction = viewPortPlan.childNavigationInstruction;\r\n if (viewPortPlan.strategy === \"replace\" /* Replace */) {\r\n loadingPlans.push({ viewPortPlan: viewPortPlan, navigationInstruction: navigationInstruction });\r\n if (childNavInstruction) {\r\n determineLoadingPlans(childNavInstruction, loadingPlans);\r\n }\r\n }\r\n else {\r\n var viewPortInstruction = navigationInstruction.addViewPortInstruction({\r\n name: viewPortName,\r\n strategy: viewPortPlan.strategy,\r\n moduleId: viewPortPlan.prevModuleId,\r\n component: viewPortPlan.prevComponent\r\n });\r\n if (childNavInstruction) {\r\n viewPortInstruction.childNavigationInstruction = childNavInstruction;\r\n determineLoadingPlans(childNavInstruction, loadingPlans);\r\n }\r\n }\r\n }\r\n return loadingPlans;\r\n};\r\n/**\r\n * @internal Exported for unit testing\r\n */\r\nvar loadRoute = function (routeLoader, navigationInstruction, viewPortPlan) {\r\n var planConfig = viewPortPlan.config;\r\n var moduleId = planConfig ? planConfig.moduleId : null;\r\n return loadComponent(routeLoader, navigationInstruction, planConfig)\r\n .then(function (component) {\r\n var viewPortInstruction = navigationInstruction.addViewPortInstruction({\r\n name: viewPortPlan.name,\r\n strategy: viewPortPlan.strategy,\r\n moduleId: moduleId,\r\n component: component\r\n });\r\n var childRouter = component.childRouter;\r\n if (childRouter) {\r\n var path = navigationInstruction.getWildcardPath();\r\n return childRouter\r\n ._createNavigationInstruction(path, navigationInstruction)\r\n .then(function (childInstruction) {\r\n viewPortPlan.childNavigationInstruction = childInstruction;\r\n return _buildNavigationPlan(childInstruction)\r\n .then(function (childPlan) {\r\n if (childPlan instanceof Redirect) {\r\n return Promise.reject(childPlan);\r\n }\r\n childInstruction.plan = childPlan;\r\n viewPortInstruction.childNavigationInstruction = childInstruction;\r\n return loadNewRoute(routeLoader, childInstruction);\r\n });\r\n });\r\n }\r\n // ts complains without this, though they are same\r\n return void 0;\r\n });\r\n};\r\n/**\r\n * Load a routed-component based on navigation instruction and route config\r\n * @internal exported for unit testing only\r\n */\r\nvar loadComponent = function (routeLoader, navigationInstruction, config) {\r\n var router = navigationInstruction.router;\r\n var lifecycleArgs = navigationInstruction.lifecycleArgs;\r\n return Promise.resolve()\r\n .then(function () { return routeLoader.loadRoute(router, config, navigationInstruction); })\r\n .then(\r\n /**\r\n * @param component an object carrying information about loaded route\r\n * typically contains information about view model, childContainer, view and router\r\n */\r\n function (component) {\r\n var viewModel = component.viewModel, childContainer = component.childContainer;\r\n component.router = router;\r\n component.config = config;\r\n if ('configureRouter' in viewModel) {\r\n var childRouter_1 = childContainer.getChildRouter();\r\n component.childRouter = childRouter_1;\r\n return childRouter_1\r\n .configure(function (c) { return viewModel.configureRouter(c, childRouter_1, lifecycleArgs[0], lifecycleArgs[1], lifecycleArgs[2]); })\r\n .then(function () { return component; });\r\n }\r\n return component;\r\n });\r\n};\n\n/**\r\n * Abstract class that is responsible for loading view / view model from a route config\r\n * The default implementation can be found in `aurelia-templating-router`\r\n */\r\nvar RouteLoader = /** @class */ (function () {\r\n function RouteLoader() {\r\n }\r\n /**\r\n * Load a route config based on its viewmodel / view configuration\r\n */\r\n // return typing: return typings used to be never\r\n // as it was a throw. Changing it to Promise should not cause any issues\r\n RouteLoader.prototype.loadRoute = function (router, config, navigationInstruction) {\r\n throw new Error('Route loaders must implement \"loadRoute(router, config, navigationInstruction)\".');\r\n };\r\n return RouteLoader;\r\n}());\n\n/**\r\n * A pipeline step responsible for loading a route config of a navigation instruction\r\n */\r\nvar LoadRouteStep = /** @class */ (function () {\r\n function LoadRouteStep(routeLoader) {\r\n this.routeLoader = routeLoader;\r\n }\r\n /**@internal */\r\n LoadRouteStep.inject = function () { return [RouteLoader]; };\r\n /**\r\n * Run the internal to load route config of a navigation instruction to prepare for next steps in the pipeline\r\n */\r\n LoadRouteStep.prototype.run = function (navigationInstruction, next) {\r\n return loadNewRoute(this.routeLoader, navigationInstruction)\r\n .then(next, next.cancel);\r\n };\r\n return LoadRouteStep;\r\n}());\n\n/**\r\n * A pipeline step for instructing a piepline to commit changes on a navigation instruction\r\n */\r\nvar CommitChangesStep = /** @class */ (function () {\r\n function CommitChangesStep() {\r\n }\r\n CommitChangesStep.prototype.run = function (navigationInstruction, next) {\r\n return navigationInstruction\r\n ._commitChanges(/*wait to swap?*/ true)\r\n .then(function () {\r\n navigationInstruction._updateTitle();\r\n return next();\r\n });\r\n };\r\n return CommitChangesStep;\r\n}());\n\n/**\r\n * An optional interface describing the available activation strategies.\r\n * @internal Used internally.\r\n */\r\nvar InternalActivationStrategy;\r\n(function (InternalActivationStrategy) {\r\n /**\r\n * Reuse the existing view model, without invoking Router lifecycle hooks.\r\n */\r\n InternalActivationStrategy[\"NoChange\"] = \"no-change\";\r\n /**\r\n * Reuse the existing view model, invoking Router lifecycle hooks.\r\n */\r\n InternalActivationStrategy[\"InvokeLifecycle\"] = \"invoke-lifecycle\";\r\n /**\r\n * Replace the existing view model, invoking Router lifecycle hooks.\r\n */\r\n InternalActivationStrategy[\"Replace\"] = \"replace\";\r\n})(InternalActivationStrategy || (InternalActivationStrategy = {}));\r\n/**\r\n * The strategy to use when activating modules during navigation.\r\n */\r\n// kept for compat reason\r\nvar activationStrategy = {\r\n noChange: \"no-change\" /* NoChange */,\r\n invokeLifecycle: \"invoke-lifecycle\" /* InvokeLifecycle */,\r\n replace: \"replace\" /* Replace */\r\n};\n\n/**\r\n * Recursively find list of deactivate-able view models\r\n * and invoke the either 'canDeactivate' or 'deactivate' on each\r\n * @internal exported for unit testing\r\n */\r\nvar processDeactivatable = function (navigationInstruction, callbackName, next, ignoreResult) {\r\n var plan = navigationInstruction.plan;\r\n var infos = findDeactivatable(plan, callbackName);\r\n var i = infos.length; // query from inside out\r\n function inspect(val) {\r\n if (ignoreResult || shouldContinue(val)) {\r\n return iterate();\r\n }\r\n return next.cancel(val);\r\n }\r\n function iterate() {\r\n if (i--) {\r\n try {\r\n var viewModel = infos[i];\r\n var result = viewModel[callbackName](navigationInstruction);\r\n return processPotential(result, inspect, next.cancel);\r\n }\r\n catch (error) {\r\n return next.cancel(error);\r\n }\r\n }\r\n navigationInstruction.router.couldDeactivate = true;\r\n return next();\r\n }\r\n return iterate();\r\n};\r\n/**\r\n * Recursively find and returns a list of deactivate-able view models\r\n * @internal exported for unit testing\r\n */\r\nvar findDeactivatable = function (plan, callbackName, list) {\r\n if (list === void 0) { list = []; }\r\n for (var viewPortName in plan) {\r\n var viewPortPlan = plan[viewPortName];\r\n var prevComponent = viewPortPlan.prevComponent;\r\n if ((viewPortPlan.strategy === activationStrategy.invokeLifecycle || viewPortPlan.strategy === activationStrategy.replace)\r\n && prevComponent) {\r\n var viewModel = prevComponent.viewModel;\r\n if (callbackName in viewModel) {\r\n list.push(viewModel);\r\n }\r\n }\r\n if (viewPortPlan.strategy === activationStrategy.replace && prevComponent) {\r\n addPreviousDeactivatable(prevComponent, callbackName, list);\r\n }\r\n else if (viewPortPlan.childNavigationInstruction) {\r\n findDeactivatable(viewPortPlan.childNavigationInstruction.plan, callbackName, list);\r\n }\r\n }\r\n return list;\r\n};\r\n/**\r\n * @internal exported for unit testing\r\n */\r\nvar addPreviousDeactivatable = function (component, callbackName, list) {\r\n var childRouter = component.childRouter;\r\n if (childRouter && childRouter.currentInstruction) {\r\n var viewPortInstructions = childRouter.currentInstruction.viewPortInstructions;\r\n for (var viewPortName in viewPortInstructions) {\r\n var viewPortInstruction = viewPortInstructions[viewPortName];\r\n var prevComponent = viewPortInstruction.component;\r\n var prevViewModel = prevComponent.viewModel;\r\n if (callbackName in prevViewModel) {\r\n list.push(prevViewModel);\r\n }\r\n addPreviousDeactivatable(prevComponent, callbackName, list);\r\n }\r\n }\r\n};\r\n/**\r\n * @internal exported for unit testing\r\n */\r\nvar processActivatable = function (navigationInstruction, callbackName, next, ignoreResult) {\r\n var infos = findActivatable(navigationInstruction, callbackName);\r\n var length = infos.length;\r\n var i = -1; // query from top down\r\n function inspect(val, router) {\r\n if (ignoreResult || shouldContinue(val, router)) {\r\n return iterate();\r\n }\r\n return next.cancel(val);\r\n }\r\n function iterate() {\r\n var _a;\r\n i++;\r\n if (i < length) {\r\n try {\r\n var current_1 = infos[i];\r\n var result = (_a = current_1.viewModel)[callbackName].apply(_a, current_1.lifecycleArgs);\r\n return processPotential(result, function (val) { return inspect(val, current_1.router); }, next.cancel);\r\n }\r\n catch (error) {\r\n return next.cancel(error);\r\n }\r\n }\r\n return next();\r\n }\r\n return iterate();\r\n};\r\n/**\r\n * Find list of activatable view model and add to list (3rd parameter)\r\n * @internal exported for unit testing\r\n */\r\nvar findActivatable = function (navigationInstruction, callbackName, list, router) {\r\n if (list === void 0) { list = []; }\r\n var plan = navigationInstruction.plan;\r\n Object\r\n .keys(plan)\r\n .forEach(function (viewPortName) {\r\n var viewPortPlan = plan[viewPortName];\r\n var viewPortInstruction = navigationInstruction.viewPortInstructions[viewPortName];\r\n var viewPortComponent = viewPortInstruction.component;\r\n var viewModel = viewPortComponent.viewModel;\r\n if ((viewPortPlan.strategy === activationStrategy.invokeLifecycle\r\n || viewPortPlan.strategy === activationStrategy.replace)\r\n && callbackName in viewModel) {\r\n list.push({\r\n viewModel: viewModel,\r\n lifecycleArgs: viewPortInstruction.lifecycleArgs,\r\n router: router\r\n });\r\n }\r\n var childNavInstruction = viewPortPlan.childNavigationInstruction;\r\n if (childNavInstruction) {\r\n findActivatable(childNavInstruction, callbackName, list, viewPortComponent.childRouter || router);\r\n }\r\n });\r\n return list;\r\n};\r\nvar shouldContinue = function (output, router) {\r\n if (output instanceof Error) {\r\n return false;\r\n }\r\n if (isNavigationCommand(output)) {\r\n if (typeof output.setRouter === 'function') {\r\n output.setRouter(router);\r\n }\r\n return !!output.shouldContinueProcessing;\r\n }\r\n if (output === undefined) {\r\n return true;\r\n }\r\n return output;\r\n};\r\n/**\r\n * wraps a subscription, allowing unsubscribe calls even if\r\n * the first value comes synchronously\r\n */\r\nvar SafeSubscription = /** @class */ (function () {\r\n function SafeSubscription(subscriptionFunc) {\r\n this._subscribed = true;\r\n this._subscription = subscriptionFunc(this);\r\n if (!this._subscribed) {\r\n this.unsubscribe();\r\n }\r\n }\r\n Object.defineProperty(SafeSubscription.prototype, \"subscribed\", {\r\n get: function () {\r\n return this._subscribed;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n SafeSubscription.prototype.unsubscribe = function () {\r\n if (this._subscribed && this._subscription) {\r\n this._subscription.unsubscribe();\r\n }\r\n this._subscribed = false;\r\n };\r\n return SafeSubscription;\r\n}());\r\n/**\r\n * A function to process return value from `activate`/`canActivate` steps\r\n * Supports observable/promise\r\n *\r\n * For observable, resolve at first next() or on complete()\r\n */\r\nvar processPotential = function (obj, resolve, reject) {\r\n // if promise like\r\n if (obj && typeof obj.then === 'function') {\r\n return Promise.resolve(obj).then(resolve).catch(reject);\r\n }\r\n // if observable\r\n if (obj && typeof obj.subscribe === 'function') {\r\n var obs_1 = obj;\r\n return new SafeSubscription(function (sub) { return obs_1.subscribe({\r\n next: function () {\r\n if (sub.subscribed) {\r\n sub.unsubscribe();\r\n resolve(obj);\r\n }\r\n },\r\n error: function (error) {\r\n if (sub.subscribed) {\r\n sub.unsubscribe();\r\n reject(error);\r\n }\r\n },\r\n complete: function () {\r\n if (sub.subscribed) {\r\n sub.unsubscribe();\r\n resolve(obj);\r\n }\r\n }\r\n }); });\r\n }\r\n // else just resolve\r\n try {\r\n return resolve(obj);\r\n }\r\n catch (error) {\r\n return reject(error);\r\n }\r\n};\n\n/**\r\n * A pipeline step responsible for finding and activating method `canDeactivate` on a view model of a route\r\n */\r\nvar CanDeactivatePreviousStep = /** @class */ (function () {\r\n function CanDeactivatePreviousStep() {\r\n }\r\n CanDeactivatePreviousStep.prototype.run = function (navigationInstruction, next) {\r\n return processDeactivatable(navigationInstruction, 'canDeactivate', next);\r\n };\r\n return CanDeactivatePreviousStep;\r\n}());\r\n/**\r\n * A pipeline step responsible for finding and activating method `canActivate` on a view model of a route\r\n */\r\nvar CanActivateNextStep = /** @class */ (function () {\r\n function CanActivateNextStep() {\r\n }\r\n CanActivateNextStep.prototype.run = function (navigationInstruction, next) {\r\n return processActivatable(navigationInstruction, 'canActivate', next);\r\n };\r\n return CanActivateNextStep;\r\n}());\r\n/**\r\n * A pipeline step responsible for finding and activating method `deactivate` on a view model of a route\r\n */\r\nvar DeactivatePreviousStep = /** @class */ (function () {\r\n function DeactivatePreviousStep() {\r\n }\r\n DeactivatePreviousStep.prototype.run = function (navigationInstruction, next) {\r\n return processDeactivatable(navigationInstruction, 'deactivate', next, true);\r\n };\r\n return DeactivatePreviousStep;\r\n}());\r\n/**\r\n * A pipeline step responsible for finding and activating method `activate` on a view model of a route\r\n */\r\nvar ActivateNextStep = /** @class */ (function () {\r\n function ActivateNextStep() {\r\n }\r\n ActivateNextStep.prototype.run = function (navigationInstruction, next) {\r\n return processActivatable(navigationInstruction, 'activate', next, true);\r\n };\r\n return ActivateNextStep;\r\n}());\n\n/**\r\n * A multi-slots Pipeline Placeholder Step for hooking into a pipeline execution\r\n */\r\nvar PipelineSlot = /** @class */ (function () {\r\n function PipelineSlot(container, name, alias) {\r\n this.steps = [];\r\n this.container = container;\r\n this.slotName = name;\r\n this.slotAlias = alias;\r\n }\r\n PipelineSlot.prototype.getSteps = function () {\r\n var _this = this;\r\n return this.steps.map(function (x) { return _this.container.get(x); });\r\n };\r\n return PipelineSlot;\r\n}());\r\n/**\r\n * Class responsible for creating the navigation pipeline.\r\n */\r\nvar PipelineProvider = /** @class */ (function () {\r\n function PipelineProvider(container) {\r\n this.container = container;\r\n this.steps = [\r\n BuildNavigationPlanStep,\r\n CanDeactivatePreviousStep,\r\n LoadRouteStep,\r\n createPipelineSlot(container, \"authorize\" /* Authorize */),\r\n CanActivateNextStep,\r\n createPipelineSlot(container, \"preActivate\" /* PreActivate */, 'modelbind'),\r\n // NOTE: app state changes start below - point of no return\r\n DeactivatePreviousStep,\r\n ActivateNextStep,\r\n createPipelineSlot(container, \"preRender\" /* PreRender */, 'precommit'),\r\n CommitChangesStep,\r\n createPipelineSlot(container, \"postRender\" /* PostRender */, 'postcomplete')\r\n ];\r\n }\r\n /**@internal */\r\n PipelineProvider.inject = function () { return [Container]; };\r\n /**\r\n * Create the navigation pipeline.\r\n */\r\n PipelineProvider.prototype.createPipeline = function (useCanDeactivateStep) {\r\n var _this = this;\r\n if (useCanDeactivateStep === void 0) { useCanDeactivateStep = true; }\r\n var pipeline = new Pipeline();\r\n this.steps.forEach(function (step) {\r\n if (useCanDeactivateStep || step !== CanDeactivatePreviousStep) {\r\n pipeline.addStep(_this.container.get(step));\r\n }\r\n });\r\n return pipeline;\r\n };\r\n /**@internal */\r\n PipelineProvider.prototype._findStep = function (name) {\r\n // Steps that are not PipelineSlots are constructor functions, and they will automatically fail. Probably.\r\n return this.steps.find(function (x) { return x.slotName === name || x.slotAlias === name; });\r\n };\r\n /**\r\n * Adds a step into the pipeline at a known slot location.\r\n */\r\n PipelineProvider.prototype.addStep = function (name, step) {\r\n var found = this._findStep(name);\r\n if (found) {\r\n var slotSteps = found.steps;\r\n // prevent duplicates\r\n if (!slotSteps.includes(step)) {\r\n slotSteps.push(step);\r\n }\r\n }\r\n else {\r\n throw new Error(\"Invalid pipeline slot name: \" + name + \".\");\r\n }\r\n };\r\n /**\r\n * Removes a step from a slot in the pipeline\r\n */\r\n PipelineProvider.prototype.removeStep = function (name, step) {\r\n var slot = this._findStep(name);\r\n if (slot) {\r\n var slotSteps = slot.steps;\r\n slotSteps.splice(slotSteps.indexOf(step), 1);\r\n }\r\n };\r\n /**\r\n * Clears all steps from a slot in the pipeline\r\n * @internal\r\n */\r\n PipelineProvider.prototype._clearSteps = function (name) {\r\n if (name === void 0) { name = ''; }\r\n var slot = this._findStep(name);\r\n if (slot) {\r\n slot.steps = [];\r\n }\r\n };\r\n /**\r\n * Resets all pipeline slots\r\n */\r\n PipelineProvider.prototype.reset = function () {\r\n this._clearSteps(\"authorize\" /* Authorize */);\r\n this._clearSteps(\"preActivate\" /* PreActivate */);\r\n this._clearSteps(\"preRender\" /* PreRender */);\r\n this._clearSteps(\"postRender\" /* PostRender */);\r\n };\r\n return PipelineProvider;\r\n}());\r\n/**@internal */\r\nvar createPipelineSlot = function (container, name, alias) {\r\n return new PipelineSlot(container, name, alias);\r\n};\n\nvar logger = getLogger('app-router');\r\n/**\r\n * The main application router.\r\n */\r\nvar AppRouter = /** @class */ (function (_super) {\r\n __extends(AppRouter, _super);\r\n function AppRouter(container, history, pipelineProvider, events) {\r\n var _this = _super.call(this, container, history) || this;\r\n _this.pipelineProvider = pipelineProvider;\r\n _this.events = events;\r\n return _this;\r\n }\r\n /**@internal */\r\n AppRouter.inject = function () { return [Container, History, PipelineProvider, EventAggregator]; };\r\n /**\r\n * Fully resets the router's internal state. Primarily used internally by the framework when multiple calls to setRoot are made.\r\n * Use with caution (actually, avoid using this). Do not use this to simply change your navigation model.\r\n */\r\n AppRouter.prototype.reset = function () {\r\n _super.prototype.reset.call(this);\r\n this.maxInstructionCount = 10;\r\n if (!this._queue) {\r\n this._queue = [];\r\n }\r\n else {\r\n this._queue.length = 0;\r\n }\r\n };\r\n /**\r\n * Loads the specified URL.\r\n *\r\n * @param url The URL fragment to load.\r\n */\r\n AppRouter.prototype.loadUrl = function (url) {\r\n var _this = this;\r\n return this\r\n ._createNavigationInstruction(url)\r\n .then(function (instruction) { return _this._queueInstruction(instruction); })\r\n .catch(function (error) {\r\n logger.error(error);\r\n restorePreviousLocation(_this);\r\n });\r\n };\r\n /**\r\n * Registers a viewPort to be used as a rendering target for activated routes.\r\n *\r\n * @param viewPort The viewPort. This is typically a element in Aurelia default impl\r\n * @param name The name of the viewPort. 'default' if unspecified.\r\n */\r\n AppRouter.prototype.registerViewPort = function (viewPort, name) {\r\n var _this = this;\r\n // having strong typing without changing public API\r\n var $viewPort = viewPort;\r\n _super.prototype.registerViewPort.call(this, $viewPort, name);\r\n // beside adding viewport to the registry of this instance\r\n // AppRouter also configure routing/history to start routing functionality\r\n // There are situation where there are more than 1 element at root view\r\n // in that case, still only activate once via the following guard\r\n if (!this.isActive) {\r\n var viewModel_1 = this._findViewModel($viewPort);\r\n if ('configureRouter' in viewModel_1) {\r\n // If there are more than one element at root view\r\n // use this flag to guard against configure method being invoked multiple times\r\n // this flag is set inside method configure\r\n if (!this.isConfigured) {\r\n // replace the real resolve with a noop to guarantee that any action in base class Router\r\n // won't resolve the configurePromise prematurely\r\n var resolveConfiguredPromise_1 = this._resolveConfiguredPromise;\r\n this._resolveConfiguredPromise = function () { };\r\n return this\r\n .configure(function (config) {\r\n return Promise\r\n .resolve(viewModel_1.configureRouter(config, _this))\r\n // an issue with configure interface. Should be fixed there\r\n // todo: fix this via configure interface in router\r\n .then(function () { return config; });\r\n })\r\n .then(function () {\r\n _this.activate();\r\n resolveConfiguredPromise_1();\r\n });\r\n }\r\n }\r\n else {\r\n this.activate();\r\n }\r\n }\r\n // when a viewport is added dynamically to a root view that is already activated\r\n // just process the navigation instruction\r\n else {\r\n this._dequeueInstruction();\r\n }\r\n return Promise.resolve();\r\n };\r\n /**\r\n * Activates the router. This instructs the router to begin listening for history changes and processing instructions.\r\n *\r\n * @params options The set of options to activate the router with.\r\n */\r\n AppRouter.prototype.activate = function (options) {\r\n if (this.isActive) {\r\n return;\r\n }\r\n this.isActive = true;\r\n // route handler property is responsible for handling url change\r\n // the interface of aurelia-history isn't clear on this perspective\r\n this.options = Object.assign({ routeHandler: this.loadUrl.bind(this) }, this.options, options);\r\n this.history.activate(this.options);\r\n this._dequeueInstruction();\r\n };\r\n /**\r\n * Deactivates the router.\r\n */\r\n AppRouter.prototype.deactivate = function () {\r\n this.isActive = false;\r\n this.history.deactivate();\r\n };\r\n /**@internal */\r\n AppRouter.prototype._queueInstruction = function (instruction) {\r\n var _this = this;\r\n return new Promise(function (resolve) {\r\n instruction.resolve = resolve;\r\n _this._queue.unshift(instruction);\r\n _this._dequeueInstruction();\r\n });\r\n };\r\n /**@internal */\r\n AppRouter.prototype._dequeueInstruction = function (instructionCount) {\r\n var _this = this;\r\n if (instructionCount === void 0) { instructionCount = 0; }\r\n return Promise.resolve().then(function () {\r\n if (_this.isNavigating && !instructionCount) {\r\n // ts complains about inconsistent returns without void 0\r\n return void 0;\r\n }\r\n var instruction = _this._queue.shift();\r\n _this._queue.length = 0;\r\n if (!instruction) {\r\n // ts complains about inconsistent returns without void 0\r\n return void 0;\r\n }\r\n _this.isNavigating = true;\r\n var navtracker = _this.history.getState('NavigationTracker');\r\n var currentNavTracker = _this.currentNavigationTracker;\r\n if (!navtracker && !currentNavTracker) {\r\n _this.isNavigatingFirst = true;\r\n _this.isNavigatingNew = true;\r\n }\r\n else if (!navtracker) {\r\n _this.isNavigatingNew = true;\r\n }\r\n else if (!currentNavTracker) {\r\n _this.isNavigatingRefresh = true;\r\n }\r\n else if (currentNavTracker < navtracker) {\r\n _this.isNavigatingForward = true;\r\n }\r\n else if (currentNavTracker > navtracker) {\r\n _this.isNavigatingBack = true;\r\n }\r\n if (!navtracker) {\r\n navtracker = Date.now();\r\n _this.history.setState('NavigationTracker', navtracker);\r\n }\r\n _this.currentNavigationTracker = navtracker;\r\n instruction.previousInstruction = _this.currentInstruction;\r\n var maxInstructionCount = _this.maxInstructionCount;\r\n if (!instructionCount) {\r\n _this.events.publish(\"router:navigation:processing\" /* Processing */, { instruction: instruction });\r\n }\r\n else if (instructionCount === maxInstructionCount - 1) {\r\n logger.error(instructionCount + 1 + \" navigation instructions have been attempted without success. Restoring last known good location.\");\r\n restorePreviousLocation(_this);\r\n return _this._dequeueInstruction(instructionCount + 1);\r\n }\r\n else if (instructionCount > maxInstructionCount) {\r\n throw new Error('Maximum navigation attempts exceeded. Giving up.');\r\n }\r\n var pipeline = _this.pipelineProvider.createPipeline(!_this.couldDeactivate);\r\n return pipeline\r\n .run(instruction)\r\n .then(function (result) { return processResult(instruction, result, instructionCount, _this); })\r\n .catch(function (error) {\r\n return { output: error instanceof Error ? error : new Error(error) };\r\n })\r\n .then(function (result) { return resolveInstruction(instruction, result, !!instructionCount, _this); });\r\n });\r\n };\r\n /**@internal */\r\n AppRouter.prototype._findViewModel = function (viewPort) {\r\n if (this.container.viewModel) {\r\n return this.container.viewModel;\r\n }\r\n if (viewPort.container) {\r\n var container = viewPort.container;\r\n while (container) {\r\n if (container.viewModel) {\r\n this.container.viewModel = container.viewModel;\r\n return container.viewModel;\r\n }\r\n container = container.parent;\r\n }\r\n }\r\n return undefined;\r\n };\r\n return AppRouter;\r\n}(Router));\r\nvar processResult = function (instruction, result, instructionCount, router) {\r\n if (!(result && 'completed' in result && 'output' in result)) {\r\n result = result || {};\r\n result.output = new Error(\"Expected router pipeline to return a navigation result, but got [\" + JSON.stringify(result) + \"] instead.\");\r\n }\r\n var finalResult = null;\r\n var navigationCommandResult = null;\r\n if (isNavigationCommand(result.output)) {\r\n navigationCommandResult = result.output.navigate(router);\r\n }\r\n else {\r\n finalResult = result;\r\n if (!result.completed) {\r\n if (result.output instanceof Error) {\r\n logger.error(result.output.toString());\r\n }\r\n restorePreviousLocation(router);\r\n }\r\n }\r\n return Promise.resolve(navigationCommandResult)\r\n .then(function (_) { return router._dequeueInstruction(instructionCount + 1); })\r\n .then(function (innerResult) { return finalResult || innerResult || result; });\r\n};\r\nvar resolveInstruction = function (instruction, result, isInnerInstruction, router) {\r\n instruction.resolve(result);\r\n var eventAggregator = router.events;\r\n var eventArgs = { instruction: instruction, result: result };\r\n if (!isInnerInstruction) {\r\n router.isNavigating = false;\r\n router.isExplicitNavigation = false;\r\n router.isExplicitNavigationBack = false;\r\n router.isNavigatingFirst = false;\r\n router.isNavigatingNew = false;\r\n router.isNavigatingRefresh = false;\r\n router.isNavigatingForward = false;\r\n router.isNavigatingBack = false;\r\n router.couldDeactivate = false;\r\n var eventName = void 0;\r\n if (result.output instanceof Error) {\r\n eventName = \"router:navigation:error\" /* Error */;\r\n }\r\n else if (!result.completed) {\r\n eventName = \"router:navigation:canceled\" /* Canceled */;\r\n }\r\n else {\r\n var queryString = instruction.queryString ? ('?' + instruction.queryString) : '';\r\n router.history.previousLocation = instruction.fragment + queryString;\r\n eventName = \"router:navigation:success\" /* Success */;\r\n }\r\n eventAggregator.publish(eventName, eventArgs);\r\n eventAggregator.publish(\"router:navigation:complete\" /* Complete */, eventArgs);\r\n }\r\n else {\r\n eventAggregator.publish(\"router:navigation:child:complete\" /* ChildComplete */, eventArgs);\r\n }\r\n return result;\r\n};\r\nvar restorePreviousLocation = function (router) {\r\n var previousLocation = router.history.previousLocation;\r\n if (previousLocation) {\r\n router.navigate(previousLocation, { trigger: false, replace: true });\r\n }\r\n else if (router.fallbackRoute) {\r\n router.navigate(router.fallbackRoute, { trigger: true, replace: true });\r\n }\r\n else {\r\n logger.error('Router navigation failed, and no previous location or fallbackRoute could be restored.');\r\n }\r\n};\n\n/**\r\n* The status of a Pipeline.\r\n*/\r\nvar PipelineStatus;\r\n(function (PipelineStatus) {\r\n PipelineStatus[\"Completed\"] = \"completed\";\r\n PipelineStatus[\"Canceled\"] = \"canceled\";\r\n PipelineStatus[\"Rejected\"] = \"rejected\";\r\n PipelineStatus[\"Running\"] = \"running\";\r\n})(PipelineStatus || (PipelineStatus = {}));\n\n/**\r\n * A list of known router events used by the Aurelia router\r\n * to signal the pipeline has come to a certain state\r\n */\r\n// const enum is preserved in tsconfig\r\nvar RouterEvent;\r\n(function (RouterEvent) {\r\n RouterEvent[\"Processing\"] = \"router:navigation:processing\";\r\n RouterEvent[\"Error\"] = \"router:navigation:error\";\r\n RouterEvent[\"Canceled\"] = \"router:navigation:canceled\";\r\n RouterEvent[\"Complete\"] = \"router:navigation:complete\";\r\n RouterEvent[\"Success\"] = \"router:navigation:success\";\r\n RouterEvent[\"ChildComplete\"] = \"router:navigation:child:complete\";\r\n})(RouterEvent || (RouterEvent = {}));\n\n/**\r\n * Available pipeline slot names to insert interceptor into router pipeline\r\n */\r\n// const enum is preserved in tsconfig\r\nvar PipelineSlotName;\r\n(function (PipelineSlotName) {\r\n /**\r\n * Authorization slot. Invoked early in the pipeline,\r\n * before `canActivate` hook of incoming route\r\n */\r\n PipelineSlotName[\"Authorize\"] = \"authorize\";\r\n /**\r\n * Pre-activation slot. Invoked early in the pipeline,\r\n * Invoked timing:\r\n * - after Authorization slot\r\n * - after canActivate hook on new view model\r\n * - before deactivate hook on old view model\r\n * - before activate hook on new view model\r\n */\r\n PipelineSlotName[\"PreActivate\"] = \"preActivate\";\r\n /**\r\n * Pre-render slot. Invoked later in the pipeline\r\n * Invokcation timing:\r\n * - after activate hook on new view model\r\n * - before commit step on new navigation instruction\r\n */\r\n PipelineSlotName[\"PreRender\"] = \"preRender\";\r\n /**\r\n * Post-render slot. Invoked last in the pipeline\r\n */\r\n PipelineSlotName[\"PostRender\"] = \"postRender\";\r\n})(PipelineSlotName || (PipelineSlotName = {}));\n\nexport { ActivateNextStep, AppRouter, BuildNavigationPlanStep, CanActivateNextStep, CanDeactivatePreviousStep, CommitChangesStep, DeactivatePreviousStep, LoadRouteStep, NavModel, NavigationInstruction, Pipeline, PipelineProvider, PipelineSlotName, PipelineStatus, Redirect, RedirectToRoute, RouteLoader, Router, RouterConfiguration, RouterEvent, activationStrategy, isNavigationCommand };\n//# sourceMappingURL=aurelia-router.js.map\n","\n\nexport var logLevel = {\n none: 0,\n error: 10,\n warn: 20,\n info: 30,\n debug: 40\n};\n\nvar loggers = {};\nvar appenders = [];\nvar globalDefaultLevel = logLevel.none;\n\nvar standardLevels = ['none', 'error', 'warn', 'info', 'debug'];\nfunction isStandardLevel(level) {\n return standardLevels.filter(function (l) {\n return l === level;\n }).length > 0;\n}\n\nfunction appendArgs() {\n return [this].concat(Array.prototype.slice.call(arguments));\n}\n\nfunction logFactory(level) {\n var threshold = logLevel[level];\n return function () {\n if (this.level < threshold) {\n return;\n }\n\n var args = appendArgs.apply(this, arguments);\n var i = appenders.length;\n while (i--) {\n var _appenders$i;\n\n (_appenders$i = appenders[i])[level].apply(_appenders$i, args);\n }\n };\n}\n\nfunction logFactoryCustom(level) {\n var threshold = logLevel[level];\n return function () {\n if (this.level < threshold) {\n return;\n }\n\n var args = appendArgs.apply(this, arguments);\n var i = appenders.length;\n while (i--) {\n var appender = appenders[i];\n if (appender[level] !== undefined) {\n appender[level].apply(appender, args);\n }\n }\n };\n}\n\nfunction connectLoggers() {\n var proto = Logger.prototype;\n for (var _level in logLevel) {\n if (isStandardLevel(_level)) {\n if (_level !== 'none') {\n proto[_level] = logFactory(_level);\n }\n } else {\n proto[_level] = logFactoryCustom(_level);\n }\n }\n}\n\nfunction disconnectLoggers() {\n var proto = Logger.prototype;\n for (var _level2 in logLevel) {\n if (_level2 !== 'none') {\n proto[_level2] = function () {};\n }\n }\n}\n\nexport function getLogger(id) {\n return loggers[id] || new Logger(id);\n}\n\nexport function addAppender(appender) {\n if (appenders.push(appender) === 1) {\n connectLoggers();\n }\n}\n\nexport function removeAppender(appender) {\n appenders = appenders.filter(function (a) {\n return a !== appender;\n });\n}\n\nexport function getAppenders() {\n return [].concat(appenders);\n}\n\nexport function clearAppenders() {\n appenders = [];\n disconnectLoggers();\n}\n\nexport function addCustomLevel(name, value) {\n if (logLevel[name] !== undefined) {\n throw Error('Log level \"' + name + '\" already exists.');\n }\n\n if (isNaN(value)) {\n throw Error('Value must be a number.');\n }\n\n logLevel[name] = value;\n\n if (appenders.length > 0) {\n connectLoggers();\n } else {\n Logger.prototype[name] = function () {};\n }\n}\n\nexport function removeCustomLevel(name) {\n if (logLevel[name] === undefined) {\n return;\n }\n\n if (isStandardLevel(name)) {\n throw Error('Built-in log level \"' + name + '\" cannot be removed.');\n }\n\n delete logLevel[name];\n delete Logger.prototype[name];\n}\n\nexport function setLevel(level) {\n globalDefaultLevel = level;\n for (var key in loggers) {\n loggers[key].setLevel(level);\n }\n}\n\nexport function getLevel() {\n return globalDefaultLevel;\n}\n\nexport var Logger = function () {\n function Logger(id) {\n \n\n var cached = loggers[id];\n if (cached) {\n return cached;\n }\n\n loggers[id] = this;\n this.id = id;\n this.level = globalDefaultLevel;\n }\n\n Logger.prototype.debug = function debug(message) {};\n\n Logger.prototype.info = function info(message) {};\n\n Logger.prototype.warn = function warn(message) {};\n\n Logger.prototype.error = function error(message) {};\n\n Logger.prototype.setLevel = function setLevel(level) {\n this.level = level;\n };\n\n Logger.prototype.isDebugEnabled = function isDebugEnabled() {\n return this.level === logLevel.debug;\n };\n\n return Logger;\n}();","import { DOM } from 'aurelia-pal';\n/**\n * Gets the DOM element associated with the data-binding. Most of the time it's\n * the binding.target but sometimes binding.target is an aurelia custom element,\n * or custom attribute which is a javascript \"class\" instance, so we need to use\n * the controller's container to retrieve the actual DOM element.\n */\nexport function getTargetDOMElement(binding, view) {\n var target = binding.target;\n // DOM element\n if (target instanceof Element) {\n return target;\n }\n // custom element or custom attribute\n // tslint:disable-next-line:prefer-const\n for (var i = 0, ii = view.controllers.length; i < ii; i++) {\n var controller = view.controllers[i];\n if (controller.viewModel === target) {\n var element = controller.container.get(DOM.Element);\n if (element) {\n return element;\n }\n throw new Error(\"Unable to locate target element for \\\"\" + binding.sourceExpression + \"\\\".\");\n }\n }\n throw new Error(\"Unable to locate target element for \\\"\" + binding.sourceExpression + \"\\\".\");\n}\n","var ValidateEvent = (function () {\n function ValidateEvent(\n /**\n * The type of validate event. Either \"validate\" or \"reset\".\n */\n type, \n /**\n * The controller's current array of errors. For an array containing both\n * failed rules and passed rules, use the \"results\" property.\n */\n errors, \n /**\n * The controller's current array of validate results. This\n * includes both passed rules and failed rules. For an array of only failed rules,\n * use the \"errors\" property.\n */\n results, \n /**\n * The instruction passed to the \"validate\" or \"reset\" event. Will be null when\n * the controller's validate/reset method was called with no instruction argument.\n */\n instruction, \n /**\n * In events with type === \"validate\", this property will contain the result\n * of validating the instruction (see \"instruction\" property). Use the controllerValidateResult\n * to access the validate results specific to the call to \"validate\"\n * (as opposed to using the \"results\" and \"errors\" properties to access the controller's entire\n * set of results/errors).\n */\n controllerValidateResult) {\n this.type = type;\n this.errors = errors;\n this.results = results;\n this.instruction = instruction;\n this.controllerValidateResult = controllerValidateResult;\n }\n return ValidateEvent;\n}());\nexport { ValidateEvent };\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport { ViewResources } from 'aurelia-templating';\nimport { Validator } from '../validator';\nimport { ValidateResult } from '../validate-result';\nimport { Rules } from './rules';\nimport { ValidationMessageProvider } from './validation-messages';\n/**\n * Validates.\n * Responsible for validating objects and properties.\n */\nvar StandardValidator = (function (_super) {\n __extends(StandardValidator, _super);\n function StandardValidator(messageProvider, resources) {\n var _this = _super.call(this) || this;\n _this.messageProvider = messageProvider;\n _this.lookupFunctions = resources.lookupFunctions;\n _this.getDisplayName = messageProvider.getDisplayName.bind(messageProvider);\n return _this;\n }\n /**\n * Validates the specified property.\n * @param object The object to validate.\n * @param propertyName The name of the property to validate.\n * @param rules Optional. If unspecified, the rules will be looked up using the metadata\n * for the object created by ValidationRules....on(class/object)\n */\n StandardValidator.prototype.validateProperty = function (object, propertyName, rules) {\n return this.validate(object, propertyName, rules || null);\n };\n /**\n * Validates all rules for specified object and it's properties.\n * @param object The object to validate.\n * @param rules Optional. If unspecified, the rules will be looked up using the metadata\n * for the object created by ValidationRules....on(class/object)\n */\n StandardValidator.prototype.validateObject = function (object, rules) {\n return this.validate(object, null, rules || null);\n };\n /**\n * Determines whether a rule exists in a set of rules.\n * @param rules The rules to search.\n * @parem rule The rule to find.\n */\n StandardValidator.prototype.ruleExists = function (rules, rule) {\n var i = rules.length;\n while (i--) {\n if (rules[i].indexOf(rule) !== -1) {\n return true;\n }\n }\n return false;\n };\n StandardValidator.prototype.getMessage = function (rule, object, value) {\n var expression = rule.message || this.messageProvider.getMessage(rule.messageKey);\n // tslint:disable-next-line:prefer-const\n var _a = rule.property, propertyName = _a.name, displayName = _a.displayName;\n if (propertyName !== null) {\n displayName = this.messageProvider.getDisplayName(propertyName, displayName);\n }\n var overrideContext = {\n $displayName: displayName,\n $propertyName: propertyName,\n $value: value,\n $object: object,\n $config: rule.config,\n // returns the name of a given property, given just the property name (irrespective of the property's displayName)\n // split on capital letters, first letter ensured to be capitalized\n $getDisplayName: this.getDisplayName\n };\n return expression.evaluate({ bindingContext: object, overrideContext: overrideContext }, this.lookupFunctions);\n };\n StandardValidator.prototype.validateRuleSequence = function (object, propertyName, ruleSequence, sequence, results) {\n var _this = this;\n // are we validating all properties or a single property?\n var validateAllProperties = propertyName === null || propertyName === undefined;\n var rules = ruleSequence[sequence];\n var allValid = true;\n // validate each rule.\n var promises = [];\n var _loop_1 = function (i) {\n var rule = rules[i];\n // is the rule related to the property we're validating.\n if (!validateAllProperties && rule.property.name !== propertyName) {\n return \"continue\";\n }\n // is this a conditional rule? is the condition met?\n if (rule.when && !rule.when(object)) {\n return \"continue\";\n }\n // validate.\n var value = rule.property.name === null ? object : object[rule.property.name];\n var promiseOrBoolean = rule.condition(value, object);\n if (!(promiseOrBoolean instanceof Promise)) {\n promiseOrBoolean = Promise.resolve(promiseOrBoolean);\n }\n promises.push(promiseOrBoolean.then(function (valid) {\n var message = valid ? null : _this.getMessage(rule, object, value);\n results.push(new ValidateResult(rule, object, rule.property.name, valid, message));\n allValid = allValid && valid;\n return valid;\n }));\n };\n for (var i = 0; i < rules.length; i++) {\n _loop_1(i);\n }\n return Promise.all(promises)\n .then(function () {\n sequence++;\n if (allValid && sequence < ruleSequence.length) {\n return _this.validateRuleSequence(object, propertyName, ruleSequence, sequence, results);\n }\n return results;\n });\n };\n StandardValidator.prototype.validate = function (object, propertyName, rules) {\n // rules specified?\n if (!rules) {\n // no. attempt to locate the rules.\n rules = Rules.get(object);\n }\n // any rules?\n if (!rules) {\n return Promise.resolve([]);\n }\n return this.validateRuleSequence(object, propertyName, rules, 0, []);\n };\n StandardValidator.inject = [ValidationMessageProvider, ViewResources];\n return StandardValidator;\n}(Validator));\nexport { StandardValidator };\n","\nexport var translations = {\n ar: {\n translation: {\n 'now': 'الآن',\n 'second_ago': 'منذ __count__ ثانية',\n 'second_ago_plural': 'منذ __count__ ثواني',\n 'second_in': 'في __count__ ثانية',\n 'second_in_plural': 'في __count__ ثواني',\n 'minute_ago': 'منذ __count__ دقيقة',\n 'minute_ago_plural': 'منذ __count__ دقائق',\n 'minute_in': 'في __count__ دقيقة',\n 'minute_in_plural': 'في __count__ دقائق',\n 'hour_ago': 'منذ __count__ ساعة',\n 'hour_ago_plural': 'منذ __count__ ساعات',\n 'hour_in': 'في __count__ ساعة',\n 'hour_in_plural': 'في __count__ ساعات',\n 'day_ago': 'منذ __count__ يوم',\n 'day_ago_plural': 'منذ __count__ أيام',\n 'day_in': 'في __count__ يوم',\n 'day_in_plural': 'في __count__ أيام',\n 'month_ago': 'منذ __count__ شهر',\n 'month_ago_plural': 'منذ __count__ أشهر',\n 'month_in': 'في __count__ شهر',\n 'month_in_plural': 'في __count__ أشهر',\n 'year_ago': 'منذ __count__ سنة',\n 'year_ago_plural': 'منذ __count__ سنوات',\n 'year_in': 'في __count__ سنة',\n 'year_in_plural': 'في __count__ سنوات'\n }\n },\n en: {\n translation: {\n 'now': 'just now',\n 'second_ago': '__count__ second ago',\n 'second_ago_plural': '__count__ seconds ago',\n 'second_in': 'in __count__ second',\n 'second_in_plural': 'in __count__ seconds',\n 'minute_ago': '__count__ minute ago',\n 'minute_ago_plural': '__count__ minutes ago',\n 'minute_in': 'in __count__ minute',\n 'minute_in_plural': 'in __count__ minutes',\n 'hour_ago': '__count__ hour ago',\n 'hour_ago_plural': '__count__ hours ago',\n 'hour_in': 'in __count__ hour',\n 'hour_in_plural': 'in __count__ hours',\n 'day_ago': '__count__ day ago',\n 'day_ago_plural': '__count__ days ago',\n 'day_in': 'in __count__ day',\n 'day_in_plural': 'in __count__ days',\n 'month_ago': '__count__ month ago',\n 'month_ago_plural': '__count__ months ago',\n 'month_in': 'in __count__ month',\n 'month_in_plural': 'in __count__ months',\n 'year_ago': '__count__ year ago',\n 'year_ago_plural': '__count__ years ago',\n 'year_in': 'in __count__ year',\n 'year_in_plural': 'in __count__ years'\n }\n },\n es: {\n translation: {\n 'now': 'ahora mismo',\n 'second_ago': 'hace __count__ segundo',\n 'second_ago_plural': 'hace __count__ segundos',\n 'second_in': 'en __count__ segundo',\n 'second_in_plural': 'en __count__ segundos',\n 'minute_ago': 'hace __count__ minuto',\n 'minute_ago_plural': 'hace __count__ minutos',\n 'minute_in': 'en __count__ minuto',\n 'minute_in_plural': 'en __count__ minutos',\n 'hour_ago': 'hace __count__ hora',\n 'hour_ago_plural': 'hace __count__ horas',\n 'hour_in': 'en __count__ hora',\n 'hour_in_plural': 'en __count__ horas',\n 'day_ago': 'hace __count__ día',\n 'day_ago_plural': 'hace __count__ días',\n 'day_in': 'en __count__ día',\n 'day_in_plural': 'en __count__ días',\n 'month_ago': 'hace __count__ mes',\n 'month_ago_plural': 'hace __count__ meses',\n 'month_in': 'en __count__ mes',\n 'month_in_plural': 'en __count__ meses',\n 'year_ago': 'hace __count__ año',\n 'year_ago_plural': 'hace __count__ años',\n 'year_in': 'en __count__ año',\n 'year_in_plural': 'en __count__ años'\n }\n },\n it: {\n translation: {\n 'now': 'adesso',\n 'second_ago': '__count__ secondo fa',\n 'second_ago_plural': '__count__ secondi fa',\n 'second_in': 'in __count__ secondo',\n 'second_in_plural': 'in __count__ secondi',\n 'minute_ago': '__count__ minuto fa',\n 'minute_ago_plural': '__count__ minuti fa',\n 'minute_in': 'in __count__ minuto',\n 'minute_in_plural': 'in __count__ minuti',\n 'hour_ago': '__count__ ora fa',\n 'hour_ago_plural': '__count__ ore fa',\n 'hour_in': 'in __count__ ora',\n 'hour_in_plural': 'in __count__ ore',\n 'day_ago': '__count__ giorno fa',\n 'day_ago_plural': '__count__ giorni fa',\n 'day_in': 'in __count__ giorno',\n 'day_in_plural': 'in __count__ giorni',\n 'month_ago': '__count__ mese fa',\n 'month_ago_plural': '__count__ mesi fa',\n 'month_in': 'in __count__ mese',\n 'month_in_plural': 'in __count__ mesi',\n 'year_ago': '__count__ anno fa',\n 'year_ago_plural': '__count__ anni fa',\n 'year_in': 'in __count__ anno',\n 'year_in_plural': 'in __count__ anni'\n }\n },\n de: {\n translation: {\n 'now': 'jetzt gerade',\n 'second_ago': 'vor __count__ Sekunde',\n 'second_ago_plural': 'vor __count__ Sekunden',\n 'second_in': 'in __count__ Sekunde',\n 'second_in_plural': 'in __count__ Sekunden',\n 'minute_ago': 'vor __count__ Minute',\n 'minute_ago_plural': 'vor __count__ Minuten',\n 'minute_in': 'in __count__ Minute',\n 'minute_in_plural': 'in __count__ Minuten',\n 'hour_ago': 'vor __count__ Stunde',\n 'hour_ago_plural': 'vor __count__ Stunden',\n 'hour_in': 'in __count__ Stunde',\n 'hour_in_plural': 'in __count__ Stunden',\n 'day_ago': 'vor __count__ Tag',\n 'day_ago_plural': 'vor __count__ Tagen',\n 'day_in': 'in __count__ Tag',\n 'day_in_plural': 'in __count__ Tagen',\n 'month_ago': 'vor __count__ Monat',\n 'month_ago_plural': 'vor __count__ Monaten',\n 'month_in': 'in __count__ Monat',\n 'month_in_plural': 'in __count__ Monaten',\n 'year_ago': 'vor __count__ Jahr',\n 'year_ago_plural': 'vor __count__ Jahren',\n 'year_in': 'in __count__ Jahr',\n 'year_in_plural': 'in __count__ Jahren'\n }\n },\n nl: {\n translation: {\n 'now': 'zonet',\n 'second_ago': '__count__ seconde geleden',\n 'second_ago_plural': '__count__ seconden geleden',\n 'second_in': 'in __count__ seconde',\n 'second_in_plural': 'in __count__ seconden',\n 'minute_ago': '__count__ minuut geleden',\n 'minute_ago_plural': '__count__ minuten geleden',\n 'minute_in': 'in __count__ minuut',\n 'minute_in_plural': 'in __count__ minuten',\n 'hour_ago': '__count__ uur geleden',\n 'hour_ago_plural': '__count__ uren geleden',\n 'hour_in': 'in __count__ uur',\n 'hour_in_plural': 'in __count__ uren',\n 'day_ago': '__count__ dag geleden',\n 'day_ago_plural': '__count__ dagen geleden',\n 'day_in': 'in __count__ dag',\n 'day_in_plural': 'in __count__ dagen',\n 'month_ago': '__count__ maand geleden',\n 'month_ago_plural': '__count__ maanden geleden',\n 'month_in': 'in __count__ maand',\n 'month_in_plural': 'in __count__ maanden',\n 'year_ago': '__count__ jaar geleden',\n 'year_ago_plural': '__count__ jaren geleden',\n 'year_in': 'in __count__ jaar',\n 'year_in_plural': 'in __count__ jaren'\n }\n },\n fr: {\n translation: {\n 'now': 'maintenant',\n 'second_ago': 'il y a __count__ seconde',\n 'second_ago_plural': 'il y a __count__ secondes',\n 'second_in': 'dans __count__ seconde',\n 'second_in_plural': 'dans __count__ secondes',\n 'minute_ago': 'il y a __count__ minute',\n 'minute_ago_plural': 'il y a __count__ minutes',\n 'minute_in': 'dans __count__ minute',\n 'minute_in_plural': 'dans __count__ minutes',\n 'hour_ago': 'il y a __count__ heure',\n 'hour_ago_plural': 'il y a __count__ heures',\n 'hour_in': 'dans __count__ heure',\n 'hour_in_plural': 'dans __count__ heures',\n 'day_ago': 'il y a __count__ jour',\n 'day_ago_plural': 'il y a __count__ jours',\n 'day_in': 'dans __count__ jour',\n 'day_in_plural': 'dans __count__ jours',\n 'month_ago': 'il y a __count__ mois',\n 'month_ago_plural': 'il y a __count__ mois',\n 'month_in': 'dans __count__ mois',\n 'month_in_plural': 'dans __count__ mois',\n 'year_ago': 'il y a __count__ an',\n 'year_ago_plural': 'il y a __count__ ans',\n 'year_in': 'dans __count__ an',\n 'year_in_plural': 'dans __count__ ans'\n }\n },\n th: {\n translation: {\n 'now': 'เมื่อกี้',\n 'second_ago': '__count__ วินาที ที่ผ่านมา',\n 'second_ago_plural': '__count__ วินาที ที่ผ่านมา',\n 'second_in': 'อีก __count__ วินาที',\n 'second_in_plural': 'อีก __count__ วินาที',\n 'minute_ago': '__count__ นาที ที่ผ่านมา',\n 'minute_ago_plural': '__count__ นาที ที่ผ่านมา',\n 'minute_in': 'อีก __count__ นาที',\n 'minute_in_plural': 'อีก __count__ นาที',\n 'hour_ago': '__count__ ชั่วโมง ที่ผ่านมา',\n 'hour_ago_plural': '__count__ ชั่วโมง ที่ผ่านมา',\n 'hour_in': 'อีก __count__ ชั่วโมง',\n 'hour_in_plural': 'อีก __count__ ชั่วโมง',\n 'day_ago': '__count__ วัน ที่ผ่านมา',\n 'day_ago_plural': '__count__ วัน ที่ผ่านมา',\n 'day_in': 'อีก __count__ วัน',\n 'day_in_plural': 'อีก __count__ วัน'\n }\n },\n sv: {\n translation: {\n 'now': 'just nu',\n 'second_ago': '__count__ sekund sedan',\n 'second_ago_plural': '__count__ sekunder sedan',\n 'second_in': 'om __count__ sekund',\n 'second_in_plural': 'om __count__ sekunder',\n 'minute_ago': '__count__ minut sedan',\n 'minute_ago_plural': '__count__ minuter sedan',\n 'minute_in': 'om __count__ minut',\n 'minute_in_plural': 'om __count__ minuter',\n 'hour_ago': '__count__ timme sedan',\n 'hour_ago_plural': '__count__ timmar sedan',\n 'hour_in': 'om __count__ timme',\n 'hour_in_plural': 'om __count__ timmar',\n 'day_ago': '__count__ dag sedan',\n 'day_ago_plural': '__count__ dagar sedan',\n 'day_in': 'om __count__ dag',\n 'day_in_plural': 'om __count__ dagar'\n }\n },\n da: {\n translation: {\n 'now': 'lige nu',\n 'second_ago': '__count__ sekunder siden',\n 'second_ago_plural': '__count__ sekunder siden',\n 'second_in': 'om __count__ sekund',\n 'second_in_plural': 'om __count__ sekunder',\n 'minute_ago': '__count__ minut siden',\n 'minute_ago_plural': '__count__ minutter siden',\n 'minute_in': 'om __count__ minut',\n 'minute_in_plural': 'om __count__ minutter',\n 'hour_ago': '__count__ time siden',\n 'hour_ago_plural': '__count__ timer siden',\n 'hour_in': 'om __count__ time',\n 'hour_in_plural': 'om __count__ timer',\n 'day_ago': '__count__ dag siden',\n 'day_ago_plural': '__count__ dage siden',\n 'day_in': 'om __count__ dag',\n 'day_in_plural': 'om __count__ dage'\n }\n },\n no: {\n translation: {\n 'now': 'akkurat nå',\n 'second_ago': '__count__ sekund siden',\n 'second_ago_plural': '__count__ sekunder siden',\n 'second_in': 'om __count__ sekund',\n 'second_in_plural': 'om __count__ sekunder',\n 'minute_ago': '__count__ minutt siden',\n 'minute_ago_plural': '__count__ minutter siden',\n 'minute_in': 'om __count__ minutt',\n 'minute_in_plural': 'om __count__ minutter',\n 'hour_ago': '__count__ time siden',\n 'hour_ago_plural': '__count__ timer siden',\n 'hour_in': 'om __count__ time',\n 'hour_in_plural': 'om __count__ timer',\n 'day_ago': '__count__ dag siden',\n 'day_ago_plural': '__count__ dager siden',\n 'day_in': 'om __count__ dag',\n 'day_in_plural': 'om __count__ dager'\n }\n },\n ja: {\n translation: {\n 'now': 'たった今',\n 'second_ago': '__count__ 秒前',\n 'second_ago_plural': '__count__ 秒前',\n 'second_in': 'あと __count__ 秒',\n 'second_in_plural': 'あと __count__ 秒',\n 'minute_ago': '__count__ 分前',\n 'minute_ago_plural': '__count__ 分前',\n 'minute_in': 'あと __count__ 分',\n 'minute_in_plural': 'あと __count__ 分',\n 'hour_ago': '__count__ 時間前',\n 'hour_ago_plural': '__count__ 時間前',\n 'hour_in': 'あと __count__ 時間',\n 'hour_in_plural': 'あと __count__ 時間',\n 'day_ago': '__count__ 日間前',\n 'day_ago_plural': '__count__ 日間前',\n 'day_in': 'あと __count__ 日間',\n 'day_in_plural': 'あと __count__ 日間',\n 'month_ago': '__count__ ヶ月前',\n 'month_ago_plural': '__count__ ヶ月前',\n 'month_in': 'あと __count__ ヶ月前',\n 'month_in_plural': 'あと __count__ ヶ月前',\n 'year_ago': '__count__ 年前',\n 'year_ago_plural': '__count__ 年前',\n 'year_in': 'あと __count__ 年',\n 'year_in_plural': 'あと __count__ 年'\n }\n },\n jp: {\n translation: {\n 'now': 'たった今',\n 'second_ago': '__count__ 秒前',\n 'second_ago_plural': '__count__ 秒前',\n 'second_in': 'あと __count__ 秒',\n 'second_in_plural': 'あと __count__ 秒',\n 'minute_ago': '__count__ 分前',\n 'minute_ago_plural': '__count__ 分前',\n 'minute_in': 'あと __count__ 分',\n 'minute_in_plural': 'あと __count__ 分',\n 'hour_ago': '__count__ 時間前',\n 'hour_ago_plural': '__count__ 時間前',\n 'hour_in': 'あと __count__ 時間',\n 'hour_in_plural': 'あと __count__ 時間',\n 'day_ago': '__count__ 日間前',\n 'day_ago_plural': '__count__ 日間前',\n 'day_in': 'あと __count__ 日間',\n 'day_in_plural': 'あと __count__ 日間',\n 'month_ago': '__count__ ヶ月前',\n 'month_ago_plural': '__count__ ヶ月前',\n 'month_in': 'あと __count__ ヶ月前',\n 'month_in_plural': 'あと __count__ ヶ月前',\n 'year_ago': '__count__ 年前',\n 'year_ago_plural': '__count__ 年前',\n 'year_in': 'あと __count__ 年',\n 'year_in_plural': 'あと __count__ 年'\n }\n },\n pt: {\n translation: {\n 'now': 'neste exato momento',\n 'second_ago': '__count__ segundo atrás',\n 'second_ago_plural': '__count__ segundos atrás',\n 'second_in': 'em __count__ segundo',\n 'second_in_plural': 'em __count__ segundos',\n 'minute_ago': '__count__ minuto atrás',\n 'minute_ago_plural': '__count__ minutos atrás',\n 'minute_in': 'em __count__ minuto',\n 'minute_in_plural': 'em __count__ minutos',\n 'hour_ago': '__count__ hora atrás',\n 'hour_ago_plural': '__count__ horas atrás',\n 'hour_in': 'em __count__ hora',\n 'hour_in_plural': 'em __count__ horas',\n 'day_ago': '__count__ dia atrás',\n 'day_ago_plural': '__count__ dias atrás',\n 'day_in': 'em __count__ dia',\n 'day_in_plural': 'em __count__ dias',\n 'month_ago': '__count__ mês atrás',\n 'month_ago_plural': '__count__ meses atrás',\n 'month_in': 'em __count__ mês',\n 'month_in_plural': 'em __count__ meses',\n 'year_ago': '__count__ ano atrás',\n 'year_ago_plural': '__count__ anos atrás',\n 'year_in': 'em __count__ ano',\n 'year_in_plural': 'em __count__ anos'\n }\n },\n zh: {\n translation: {\n 'now': '刚才',\n 'second_ago': '__count__ 秒钟前',\n 'second_ago_plural': '__count__ 秒钟前',\n 'second_in': '__count__ 秒内',\n 'second_in_plural': '__count__ 秒内',\n 'minute_ago': '__count__ 分钟前',\n 'minute_ago_plural': '__count__ 分钟前',\n 'minute_in': '__count__ 分钟内',\n 'minute_in_plural': '__count__ 分钟内',\n 'hour_ago': '__count__ 小时前',\n 'hour_ago_plural': '__count__ 小时前',\n 'hour_in': '__count__ 小时内',\n 'hour_in_plural': '__count__ 小时内',\n 'day_ago': '__count__ 天前',\n 'day_ago_plural': '__count__ 天前',\n 'day_in': '__count__ 天内',\n 'day_in_plural': '__count__ 天内',\n 'month_ago': '__count__ 月前',\n 'month_ago_plural': '__count__ 月前',\n 'month_in': '__count__ 月内',\n 'month_in_plural': '__count__ 月内',\n 'year_ago': '__count__ 年前',\n 'year_ago_plural': '__count__ 年前',\n 'year_in': '__count__ 年内',\n 'year_in_plural': '__count__ 年内'\n }\n },\n 'zh-CN': {\n translation: {\n 'now': '刚才',\n 'second_ago': '__count__ 秒钟前',\n 'second_ago_plural': '__count__ 秒钟前',\n 'second_in': '__count__ 秒内',\n 'second_in_plural': '__count__ 秒内',\n 'minute_ago': '__count__ 分钟前',\n 'minute_ago_plural': '__count__ 分钟前',\n 'minute_in': '__count__ 分钟内',\n 'minute_in_plural': '__count__ 分钟内',\n 'hour_ago': '__count__ 小时前',\n 'hour_ago_plural': '__count__ 小时前',\n 'hour_in': '__count__ 小时内',\n 'hour_in_plural': '__count__ 小时内',\n 'day_ago': '__count__ 天前',\n 'day_ago_plural': '__count__ 天前',\n 'day_in': '__count__ 天内',\n 'day_in_plural': '__count__ 天内',\n 'month_ago': '__count__ 月前',\n 'month_ago_plural': '__count__ 月前',\n 'month_in': '__count__ 月内',\n 'month_in_plural': '__count__ 月内',\n 'year_ago': '__count__ 年前',\n 'year_ago_plural': '__count__ 年前',\n 'year_in': '__count__ 年内',\n 'year_in_plural': '__count__ 年内'\n }\n },\n 'zh-HK': {\n translation: {\n 'now': '剛才',\n 'second_ago': '__count__ 秒鐘前',\n 'second_ago_plural': '__count__ 秒鐘前',\n 'second_in': '__count__ 秒內',\n 'second_in_plural': '__count__ 秒內',\n 'minute_ago': '__count__ 分鐘前',\n 'minute_ago_plural': '__count__ 分鐘前',\n 'minute_in': '__count__ 分鐘內',\n 'minute_in_plural': '__count__ 分鐘內',\n 'hour_ago': '__count__ 小時前',\n 'hour_ago_plural': '__count__ 小時前',\n 'hour_in': '__count__ 小時內',\n 'hour_in_plural': '__count__ 小時內',\n 'day_ago': '__count__ 天前',\n 'day_ago_plural': '__count__ 天前',\n 'day_in': '__count__ 天內',\n 'day_in_plural': '__count__ 天內',\n 'month_ago': '__count__ 月前',\n 'month_ago_plural': '__count__ 月前',\n 'month_in': '__count__ 月內',\n 'month_in_plural': '__count__ 月內',\n 'year_ago': '__count__ 年前',\n 'year_ago_plural': '__count__ 年前',\n 'year_in': '__count__ 年內',\n 'year_in_plural': '__count__ 年內'\n }\n },\n 'zh-TW': {\n translation: {\n 'now': '剛才',\n 'second_ago': '__count__ 秒鐘前',\n 'second_ago_plural': '__count__ 秒鐘前',\n 'second_in': '__count__ 秒內',\n 'second_in_plural': '__count__ 秒內',\n 'minute_ago': '__count__ 分鐘前',\n 'minute_ago_plural': '__count__ 分鐘前',\n 'minute_in': '__count__ 分鐘內',\n 'minute_in_plural': '__count__ 分鐘內',\n 'hour_ago': '__count__ 小時前',\n 'hour_ago_plural': '__count__ 小時前',\n 'hour_in': '__count__ 小時內',\n 'hour_in_plural': '__count__ 小時內',\n 'day_ago': '__count__ 天前',\n 'day_ago_plural': '__count__ 天前',\n 'day_in': '__count__ 天內',\n 'day_in_plural': '__count__ 天內',\n 'month_ago': '__count__ 月前',\n 'month_ago_plural': '__count__ 月前',\n 'month_in': '__count__ 月內',\n 'month_in_plural': '__count__ 月內',\n 'year_ago': '__count__ 年前',\n 'year_ago_plural': '__count__ 年前',\n 'year_in': '__count__ 年內',\n 'year_in_plural': '__count__ 年內'\n }\n }\n};","\n\nimport { I18N } from './i18n';\nimport { translations } from './defaultTranslations/relative.time';\nimport { EventAggregator } from 'aurelia-event-aggregator';\n\nexport var RelativeTime = function () {\n RelativeTime.inject = function inject() {\n return [I18N, EventAggregator];\n };\n\n function RelativeTime(i18n, ea) {\n var _this = this;\n\n \n\n this.service = i18n;\n this.ea = ea;\n\n this.service.i18nextReady().then(function () {\n _this.setup();\n });\n this.ea.subscribe('i18n:locale:changed', function (locales) {\n _this.setup(locales);\n });\n }\n\n RelativeTime.prototype.setup = function setup(locales) {\n var trans = translations.default || translations;\n var fallbackLng = this.service.i18next.fallbackLng;\n\n var alternateFb = fallbackLng || this.service.i18next.options.fallbackLng;\n if (Array.isArray(alternateFb) && alternateFb.length > 0) {\n alternateFb = alternateFb[0];\n }\n\n var key = (locales && locales.newValue ? locales.newValue : this.service.getLocale()) || alternateFb;\n\n var index = 0;\n\n if ((index = key.indexOf('-')) >= 0) {\n var baseLocale = key.substring(0, index);\n\n if (trans[baseLocale]) {\n this.addTranslationResource(baseLocale, trans[baseLocale].translation);\n }\n }\n\n if (trans[key]) {\n this.addTranslationResource(key, trans[key].translation);\n }\n if (trans[fallbackLng]) {\n this.addTranslationResource(key, trans[fallbackLng].translation);\n }\n };\n\n RelativeTime.prototype.addTranslationResource = function addTranslationResource(key, translation) {\n var options = this.service.i18next.options;\n\n if (options.interpolation && options.interpolation.prefix !== '__' || options.interpolation.suffix !== '__') {\n for (var subkey in translation) {\n translation[subkey] = translation[subkey].replace('__count__', (options.interpolation.prefix || '{{') + 'count' + (options.interpolation.suffix || '}}'));\n }\n }\n\n this.service.i18next.addResources(key, options.defaultNS, translation);\n };\n\n RelativeTime.prototype.getRelativeTime = function getRelativeTime(time) {\n var now = new Date();\n var diff = now.getTime() - time.getTime();\n\n var timeDiff = this.getTimeDiffDescription(diff, 'year', 31104000000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, 'month', 2592000000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, 'day', 86400000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, 'hour', 3600000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, 'minute', 60000);\n if (!timeDiff) {\n timeDiff = this.getTimeDiffDescription(diff, 'second', 1000);\n if (!timeDiff) {\n timeDiff = this.service.tr('now');\n }\n }\n }\n }\n }\n }\n\n return timeDiff;\n };\n\n RelativeTime.prototype.getTimeDiffDescription = function getTimeDiffDescription(diff, unit, timeDivisor) {\n var unitAmount = (diff / timeDivisor).toFixed(0);\n if (unitAmount > 0) {\n return this.service.tr(unit, { count: parseInt(unitAmount, 10), context: 'ago' });\n } else if (unitAmount < 0) {\n var abs = Math.abs(unitAmount);\n return this.service.tr(unit, { count: abs, context: 'in' });\n }\n\n return null;\n };\n\n return RelativeTime;\n}();","var _dec, _class;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\n\nimport { resolver } from 'aurelia-dependency-injection';\n\nexport var extend = function extend(destination, source) {\n for (var property in source) {\n destination[property] = source[property];\n }\n\n return destination;\n};\n\nexport var isInteger = Number.isInteger || function (value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n};\n\nexport var assignObjectToKeys = function assignObjectToKeys(root, obj) {\n if (obj === undefined || obj === null) {\n return obj;\n }\n\n var opts = {};\n\n Object.keys(obj).map(function (key) {\n if (_typeof(obj[key]) === 'object') {\n extend(opts, assignObjectToKeys(key, obj[key]));\n } else {\n opts[root !== '' ? root + '.' + key : key] = obj[key];\n }\n });\n\n return opts;\n};\n\nexport var LazyOptional = (_dec = resolver(), _dec(_class = function () {\n function LazyOptional(key) {\n \n\n this.key = key;\n }\n\n LazyOptional.prototype.get = function get(container) {\n var _this = this;\n\n return function () {\n if (container.hasResolver(_this.key, false)) {\n return container.get(_this.key);\n }\n return null;\n };\n };\n\n LazyOptional.of = function of(key) {\n return new LazyOptional(key);\n };\n\n return LazyOptional;\n}()) || _class);","export function isString(value) {\n return Object.prototype.toString.call(value) === '[object String]';\n}\n","\nexport function AggregateError(message, innerError, skipIfAlreadyAggregate) {\n if (innerError) {\n if (innerError.innerError && skipIfAlreadyAggregate) {\n return innerError;\n }\n\n var separator = '\\n------------------------------------------------\\n';\n\n message += separator + 'Inner Error:\\n';\n\n if (typeof innerError === 'string') {\n message += 'Message: ' + innerError;\n } else {\n if (innerError.message) {\n message += 'Message: ' + innerError.message;\n } else {\n message += 'Unknown Inner Error Type. Displaying Inner Error as JSON:\\n ' + JSON.stringify(innerError, null, ' ');\n }\n\n if (innerError.stack) {\n message += '\\nInner Error Stack:\\n' + innerError.stack;\n message += '\\nEnd Inner Error Stack';\n }\n }\n\n message += separator;\n }\n\n var e = new Error(message);\n if (innerError) {\n e.innerError = innerError;\n }\n\n return e;\n}\n\nexport var FEATURE = {};\n\nexport var PLATFORM = {\n noop: function noop() {},\n eachModule: function eachModule() {},\n moduleName: function (_moduleName) {\n function moduleName(_x) {\n return _moduleName.apply(this, arguments);\n }\n\n moduleName.toString = function () {\n return _moduleName.toString();\n };\n\n return moduleName;\n }(function (moduleName) {\n return moduleName;\n })\n};\n\nPLATFORM.global = function () {\n if (typeof self !== 'undefined') {\n return self;\n }\n\n if (typeof global !== 'undefined') {\n return global;\n }\n\n return new Function('return this')();\n}();\n\nexport var DOM = {};\nexport var isInitialized = false;\n\nexport function initializePAL(callback) {\n if (isInitialized) {\n return;\n }\n isInitialized = true;\n if (typeof Object.getPropertyDescriptor !== 'function') {\n Object.getPropertyDescriptor = function (subject, name) {\n var pd = Object.getOwnPropertyDescriptor(subject, name);\n var proto = Object.getPrototypeOf(subject);\n while (typeof pd === 'undefined' && proto !== null) {\n pd = Object.getOwnPropertyDescriptor(proto, name);\n proto = Object.getPrototypeOf(proto);\n }\n return pd;\n };\n }\n\n callback(PLATFORM, FEATURE, DOM);\n}\nexport function reset() {\n isInitialized = false;\n}","\n\nimport { buildQueryString, parseQueryString } from 'aurelia-path';\n\nexport var State = function () {\n function State(charSpec) {\n \n\n this.charSpec = charSpec;\n this.nextStates = [];\n }\n\n State.prototype.get = function get(charSpec) {\n for (var _iterator = this.nextStates, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var child = _ref;\n\n var isEqual = child.charSpec.validChars === charSpec.validChars && child.charSpec.invalidChars === charSpec.invalidChars;\n\n if (isEqual) {\n return child;\n }\n }\n\n return undefined;\n };\n\n State.prototype.put = function put(charSpec) {\n var state = this.get(charSpec);\n\n if (state) {\n return state;\n }\n\n state = new State(charSpec);\n\n this.nextStates.push(state);\n\n if (charSpec.repeat) {\n state.nextStates.push(state);\n }\n\n return state;\n };\n\n State.prototype.match = function match(ch) {\n var nextStates = this.nextStates;\n var results = [];\n\n for (var i = 0, l = nextStates.length; i < l; i++) {\n var child = nextStates[i];\n var charSpec = child.charSpec;\n\n if (charSpec.validChars !== undefined) {\n if (charSpec.validChars.indexOf(ch) !== -1) {\n results.push(child);\n }\n } else if (charSpec.invalidChars !== undefined) {\n if (charSpec.invalidChars.indexOf(ch) === -1) {\n results.push(child);\n }\n }\n }\n\n return results;\n };\n\n return State;\n}();\n\nvar specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\\\'];\n\nvar escapeRegex = new RegExp('(\\\\' + specials.join('|\\\\') + ')', 'g');\n\nexport var StaticSegment = function () {\n function StaticSegment(string, caseSensitive) {\n \n\n this.string = string;\n this.caseSensitive = caseSensitive;\n }\n\n StaticSegment.prototype.eachChar = function eachChar(callback) {\n var s = this.string;\n for (var i = 0, ii = s.length; i < ii; ++i) {\n var ch = s[i];\n callback({ validChars: this.caseSensitive ? ch : ch.toUpperCase() + ch.toLowerCase() });\n }\n };\n\n StaticSegment.prototype.regex = function regex() {\n return this.string.replace(escapeRegex, '\\\\$1');\n };\n\n StaticSegment.prototype.generate = function generate() {\n return this.string;\n };\n\n return StaticSegment;\n}();\n\nexport var DynamicSegment = function () {\n function DynamicSegment(name, optional) {\n \n\n this.name = name;\n this.optional = optional;\n }\n\n DynamicSegment.prototype.eachChar = function eachChar(callback) {\n callback({ invalidChars: '/', repeat: true });\n };\n\n DynamicSegment.prototype.regex = function regex() {\n return '([^/]+)';\n };\n\n DynamicSegment.prototype.generate = function generate(params, consumed) {\n consumed[this.name] = true;\n return params[this.name];\n };\n\n return DynamicSegment;\n}();\n\nexport var StarSegment = function () {\n function StarSegment(name) {\n \n\n this.name = name;\n }\n\n StarSegment.prototype.eachChar = function eachChar(callback) {\n callback({ invalidChars: '', repeat: true });\n };\n\n StarSegment.prototype.regex = function regex() {\n return '(.+)';\n };\n\n StarSegment.prototype.generate = function generate(params, consumed) {\n consumed[this.name] = true;\n return params[this.name];\n };\n\n return StarSegment;\n}();\n\nexport var EpsilonSegment = function () {\n function EpsilonSegment() {\n \n }\n\n EpsilonSegment.prototype.eachChar = function eachChar() {};\n\n EpsilonSegment.prototype.regex = function regex() {\n return '';\n };\n\n EpsilonSegment.prototype.generate = function generate() {\n return '';\n };\n\n return EpsilonSegment;\n}();\n\nexport var RouteRecognizer = function () {\n function RouteRecognizer() {\n \n\n this.rootState = new State();\n this.names = {};\n this.routes = new Map();\n }\n\n RouteRecognizer.prototype.add = function add(route) {\n var _this = this;\n\n if (Array.isArray(route)) {\n route.forEach(function (r) {\n return _this.add(r);\n });\n return undefined;\n }\n\n var currentState = this.rootState;\n var skippableStates = [];\n var regex = '^';\n var types = { statics: 0, dynamics: 0, stars: 0 };\n var names = [];\n var routeName = route.handler.name;\n var isEmpty = true;\n var segments = parse(route.path, names, types, route.caseSensitive);\n\n for (var i = 0, ii = segments.length; i < ii; i++) {\n var segment = segments[i];\n if (segment instanceof EpsilonSegment) {\n continue;\n }\n\n var _addSegment = addSegment(currentState, segment),\n firstState = _addSegment[0],\n nextState = _addSegment[1];\n\n for (var j = 0, jj = skippableStates.length; j < jj; j++) {\n skippableStates[j].nextStates.push(firstState);\n }\n\n if (segment.optional) {\n skippableStates.push(nextState);\n regex += '(?:/' + segment.regex() + ')?';\n } else {\n currentState = nextState;\n regex += '/' + segment.regex();\n skippableStates.length = 0;\n isEmpty = false;\n }\n }\n\n if (isEmpty) {\n currentState = currentState.put({ validChars: '/' });\n regex += '/?';\n }\n\n var handlers = [{ handler: route.handler, names: names }];\n\n this.routes.set(route.handler, { segments: segments, handlers: handlers });\n if (routeName) {\n var routeNames = Array.isArray(routeName) ? routeName : [routeName];\n for (var _i2 = 0; _i2 < routeNames.length; _i2++) {\n if (!(routeNames[_i2] in this.names)) {\n this.names[routeNames[_i2]] = { segments: segments, handlers: handlers };\n }\n }\n }\n\n for (var _i3 = 0; _i3 < skippableStates.length; _i3++) {\n var state = skippableStates[_i3];\n state.handlers = handlers;\n state.regex = new RegExp(regex + '$', route.caseSensitive ? '' : 'i');\n state.types = types;\n }\n\n currentState.handlers = handlers;\n currentState.regex = new RegExp(regex + '$', route.caseSensitive ? '' : 'i');\n currentState.types = types;\n\n return currentState;\n };\n\n RouteRecognizer.prototype.getRoute = function getRoute(nameOrRoute) {\n return typeof nameOrRoute === 'string' ? this.names[nameOrRoute] : this.routes.get(nameOrRoute);\n };\n\n RouteRecognizer.prototype.handlersFor = function handlersFor(nameOrRoute) {\n var route = this.getRoute(nameOrRoute);\n if (!route) {\n throw new Error('There is no route named ' + nameOrRoute);\n }\n\n return [].concat(route.handlers);\n };\n\n RouteRecognizer.prototype.hasRoute = function hasRoute(nameOrRoute) {\n return !!this.getRoute(nameOrRoute);\n };\n\n RouteRecognizer.prototype.generate = function generate(nameOrRoute, params) {\n var route = this.getRoute(nameOrRoute);\n if (!route) {\n throw new Error('There is no route named ' + nameOrRoute);\n }\n\n var handler = route.handlers[0].handler;\n if (handler.generationUsesHref) {\n return handler.href;\n }\n\n var routeParams = Object.assign({}, params);\n var segments = route.segments;\n var consumed = {};\n var output = '';\n\n for (var i = 0, l = segments.length; i < l; i++) {\n var segment = segments[i];\n\n if (segment instanceof EpsilonSegment) {\n continue;\n }\n\n var segmentValue = segment.generate(routeParams, consumed);\n if (segmentValue === null || segmentValue === undefined) {\n if (!segment.optional) {\n throw new Error('A value is required for route parameter \\'' + segment.name + '\\' in route \\'' + nameOrRoute + '\\'.');\n }\n } else {\n output += '/';\n output += segmentValue;\n }\n }\n\n if (output.charAt(0) !== '/') {\n output = '/' + output;\n }\n\n for (var param in consumed) {\n delete routeParams[param];\n }\n\n var queryString = buildQueryString(routeParams);\n output += queryString ? '?' + queryString : '';\n\n return output;\n };\n\n RouteRecognizer.prototype.recognize = function recognize(path) {\n var states = [this.rootState];\n var queryParams = {};\n var isSlashDropped = false;\n var normalizedPath = path;\n\n var queryStart = normalizedPath.indexOf('?');\n if (queryStart !== -1) {\n var queryString = normalizedPath.substr(queryStart + 1, normalizedPath.length);\n normalizedPath = normalizedPath.substr(0, queryStart);\n queryParams = parseQueryString(queryString);\n }\n\n normalizedPath = decodeURI(normalizedPath);\n\n if (normalizedPath.charAt(0) !== '/') {\n normalizedPath = '/' + normalizedPath;\n }\n\n var pathLen = normalizedPath.length;\n if (pathLen > 1 && normalizedPath.charAt(pathLen - 1) === '/') {\n normalizedPath = normalizedPath.substr(0, pathLen - 1);\n isSlashDropped = true;\n }\n\n for (var i = 0, l = normalizedPath.length; i < l; i++) {\n states = recognizeChar(states, normalizedPath.charAt(i));\n if (!states.length) {\n break;\n }\n }\n\n var solutions = [];\n for (var _i4 = 0, _l = states.length; _i4 < _l; _i4++) {\n if (states[_i4].handlers) {\n solutions.push(states[_i4]);\n }\n }\n\n states = sortSolutions(solutions);\n\n var state = solutions[0];\n if (state && state.handlers) {\n if (isSlashDropped && state.regex.source.slice(-5) === '(.+)$') {\n normalizedPath = normalizedPath + '/';\n }\n\n return findHandler(state, normalizedPath, queryParams);\n }\n };\n\n return RouteRecognizer;\n}();\n\nvar RecognizeResults = function RecognizeResults(queryParams) {\n \n\n this.splice = Array.prototype.splice;\n this.slice = Array.prototype.slice;\n this.push = Array.prototype.push;\n this.length = 0;\n this.queryParams = queryParams || {};\n};\n\nfunction parse(route, names, types, caseSensitive) {\n var normalizedRoute = route;\n if (route.charAt(0) === '/') {\n normalizedRoute = route.substr(1);\n }\n\n var results = [];\n\n var splitRoute = normalizedRoute.split('/');\n for (var i = 0, ii = splitRoute.length; i < ii; ++i) {\n var segment = splitRoute[i];\n\n var match = segment.match(/^:([^?]+)(\\?)?$/);\n if (match) {\n var _match = match,\n _name = _match[1],\n optional = _match[2];\n\n if (_name.indexOf('=') !== -1) {\n throw new Error('Parameter ' + _name + ' in route ' + route + ' has a default value, which is not supported.');\n }\n results.push(new DynamicSegment(_name, !!optional));\n names.push(_name);\n types.dynamics++;\n continue;\n }\n\n match = segment.match(/^\\*(.+)$/);\n if (match) {\n results.push(new StarSegment(match[1]));\n names.push(match[1]);\n types.stars++;\n } else if (segment === '') {\n results.push(new EpsilonSegment());\n } else {\n results.push(new StaticSegment(segment, caseSensitive));\n types.statics++;\n }\n }\n\n return results;\n}\n\nfunction sortSolutions(states) {\n return states.sort(function (a, b) {\n if (a.types.stars !== b.types.stars) {\n return a.types.stars - b.types.stars;\n }\n\n if (a.types.stars) {\n if (a.types.statics !== b.types.statics) {\n return b.types.statics - a.types.statics;\n }\n if (a.types.dynamics !== b.types.dynamics) {\n return b.types.dynamics - a.types.dynamics;\n }\n }\n\n if (a.types.dynamics !== b.types.dynamics) {\n return a.types.dynamics - b.types.dynamics;\n }\n\n if (a.types.statics !== b.types.statics) {\n return b.types.statics - a.types.statics;\n }\n\n return 0;\n });\n}\n\nfunction recognizeChar(states, ch) {\n var nextStates = [];\n\n for (var i = 0, l = states.length; i < l; i++) {\n var state = states[i];\n nextStates.push.apply(nextStates, state.match(ch));\n }\n\n return nextStates;\n}\n\nfunction findHandler(state, path, queryParams) {\n var handlers = state.handlers;\n var regex = state.regex;\n var captures = path.match(regex);\n var currentCapture = 1;\n var result = new RecognizeResults(queryParams);\n\n for (var i = 0, l = handlers.length; i < l; i++) {\n var _handler = handlers[i];\n var _names = _handler.names;\n var _params = {};\n\n for (var j = 0, m = _names.length; j < m; j++) {\n _params[_names[j]] = captures[currentCapture++];\n }\n\n result.push({ handler: _handler.handler, params: _params, isDynamic: !!_names.length });\n }\n\n return result;\n}\n\nfunction addSegment(currentState, segment) {\n var firstState = currentState.put({ validChars: '/' });\n var nextState = firstState;\n segment.eachChar(function (ch) {\n nextState = nextState.put(ch);\n });\n\n return [firstState, nextState];\n}","\n\nimport { I18N } from './i18n';\nimport { DOM } from 'aurelia-pal';\nimport { EventAggregator } from 'aurelia-event-aggregator';\n\nexport var BaseI18N = function () {\n BaseI18N.inject = function inject() {\n return [I18N, DOM.Element, EventAggregator];\n };\n\n function BaseI18N(i18n, element, ea) {\n var _this = this;\n\n \n\n this.i18n = i18n;\n this.element = element;\n\n this.__i18nDisposer = ea.subscribe('i18n:locale:changed', function () {\n _this.i18n.updateTranslations(_this.element);\n });\n }\n\n BaseI18N.prototype.attached = function attached() {\n this.i18n.updateTranslations(this.element);\n };\n\n BaseI18N.prototype.detached = function detached() {\n this.__i18nDisposer.dispose();\n };\n\n return BaseI18N;\n}();","var _class, _temp;\n\n\n\nexport var Backend = (_temp = _class = function () {\n Backend.with = function _with(loader) {\n this.loader = loader;\n return this;\n };\n\n function Backend(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n \n\n this.init(services, options);\n this.type = 'backend';\n }\n\n Backend.prototype.init = function init(services) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n this.services = services;\n this.options = defaults(options, this.options || {}, getDefaults());\n };\n\n Backend.prototype.readMulti = function readMulti(languages, namespaces, callback) {\n var loadPath = this.options.loadPath;\n\n if (typeof this.options.loadPath === 'function') {\n loadPath = this.options.loadPath(languages, namespaces);\n }\n\n var url = this.services.interpolator.interpolate(loadPath, { lng: languages.join('+'), ns: namespaces.join('+') });\n\n this.loadUrl(url, callback);\n };\n\n Backend.prototype.read = function read(language, namespace, callback) {\n var loadPath = this.options.loadPath;\n\n if (typeof this.options.loadPath === 'function') {\n loadPath = this.options.loadPath([language], [namespace]);\n }\n\n var url = this.services.interpolator.interpolate(loadPath, { lng: language, ns: namespace });\n\n this.loadUrl(url, callback);\n };\n\n Backend.prototype.loadUrl = function loadUrl(url, callback) {\n var _this = this;\n\n this.constructor.loader.loadText(url).then(function (response) {\n var ret = void 0;\n var err = void 0;\n try {\n ret = response instanceof Object ? response : _this.options.parse(response, url);\n } catch (e) {\n err = 'failed parsing ' + url + ' to json';\n }\n if (err) return callback(err, false);\n callback(null, ret);\n }, function (response) {\n return callback('failed loading ' + url, false);\n });\n };\n\n Backend.prototype.create = function create(languages, namespace, key, fallbackValue) {};\n\n return Backend;\n}(), _class.loader = null, _temp);\n\nBackend.type = 'backend';\nexport default Backend;\n\nvar arr = [];\nvar each = arr.forEach;\nvar slice = arr.slice;\n\nfunction getDefaults() {\n return {\n loadPath: '/locales/{{lng}}/{{ns}}.json',\n addPath: 'locales/add/{{lng}}/{{ns}}',\n allowMultiLoading: false,\n parse: JSON.parse\n };\n}\n\nfunction defaults(obj) {\n each.call(slice.call(arguments, 1), function (source) {\n if (source) {\n for (var prop in source) {\n if (obj[prop] === undefined) obj[prop] = source[prop];\n }\n }\n });\n return obj;\n}","export { _getArrayObserver as getArrayObserver };\nexport { _getMapObserver as getMapObserver };\nexport { _getSetObserver as getSetObserver };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _dec, _dec2, _class, _dec3, _class2, _dec4, _class3, _dec5, _class5, _dec6, _class7, _dec7, _class8, _dec8, _class9, _dec9, _class10, _class12, _temp, _dec10, _class13, _class14, _temp2;\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\nimport * as LogManager from 'aurelia-logging';\nimport { PLATFORM, DOM } from 'aurelia-pal';\nimport { TaskQueue } from 'aurelia-task-queue';\nimport { metadata } from 'aurelia-metadata';\n\nexport var targetContext = 'Binding:target';\nexport var sourceContext = 'Binding:source';\n\nvar map = Object.create(null);\n\nexport function camelCase(name) {\n if (name in map) {\n return map[name];\n }\n var result = name.charAt(0).toLowerCase() + name.slice(1).replace(/[_.-](\\w|$)/g, function (_, x) {\n return x.toUpperCase();\n });\n map[name] = result;\n return result;\n}\n\nexport function createOverrideContext(bindingContext, parentOverrideContext) {\n return {\n bindingContext: bindingContext,\n parentOverrideContext: parentOverrideContext || null\n };\n}\n\nexport function getContextFor(name, scope, ancestor) {\n var oc = scope.overrideContext;\n\n if (ancestor) {\n while (ancestor && oc) {\n ancestor--;\n oc = oc.parentOverrideContext;\n }\n if (ancestor || !oc) {\n return undefined;\n }\n return name in oc ? oc : oc.bindingContext;\n }\n\n while (oc && !(name in oc) && !(oc.bindingContext && name in oc.bindingContext)) {\n oc = oc.parentOverrideContext;\n }\n if (oc) {\n return name in oc ? oc : oc.bindingContext;\n }\n\n return scope.bindingContext || scope.overrideContext;\n}\n\nexport function createScopeForTest(bindingContext, parentBindingContext) {\n if (parentBindingContext) {\n return {\n bindingContext: bindingContext,\n overrideContext: createOverrideContext(bindingContext, createOverrideContext(parentBindingContext))\n };\n }\n return {\n bindingContext: bindingContext,\n overrideContext: createOverrideContext(bindingContext)\n };\n}\n\nvar slotNames = [];\nvar versionSlotNames = [];\n\nfor (var i = 0; i < 100; i++) {\n slotNames.push('_observer' + i);\n versionSlotNames.push('_observerVersion' + i);\n}\n\nfunction addObserver(observer) {\n var observerSlots = this._observerSlots === undefined ? 0 : this._observerSlots;\n var i = observerSlots;\n while (i-- && this[slotNames[i]] !== observer) {}\n\n if (i === -1) {\n i = 0;\n while (this[slotNames[i]]) {\n i++;\n }\n this[slotNames[i]] = observer;\n observer.subscribe(sourceContext, this);\n\n if (i === observerSlots) {\n this._observerSlots = i + 1;\n }\n }\n\n if (this._version === undefined) {\n this._version = 0;\n }\n this[versionSlotNames[i]] = this._version;\n}\n\nfunction observeProperty(obj, propertyName) {\n var observer = this.observerLocator.getObserver(obj, propertyName);\n addObserver.call(this, observer);\n}\n\nfunction observeArray(array) {\n var observer = this.observerLocator.getArrayObserver(array);\n addObserver.call(this, observer);\n}\n\nfunction unobserve(all) {\n var i = this._observerSlots;\n while (i--) {\n if (all || this[versionSlotNames[i]] !== this._version) {\n var observer = this[slotNames[i]];\n this[slotNames[i]] = null;\n if (observer) {\n observer.unsubscribe(sourceContext, this);\n }\n }\n }\n}\n\nexport function connectable() {\n return function (target) {\n target.prototype.observeProperty = observeProperty;\n target.prototype.observeArray = observeArray;\n target.prototype.unobserve = unobserve;\n target.prototype.addObserver = addObserver;\n };\n}\n\nvar queue = [];\nvar queued = {};\nvar nextId = 0;\nvar minimumImmediate = 100;\nvar frameBudget = 15;\n\nvar isFlushRequested = false;\nvar immediate = 0;\n\nfunction flush(animationFrameStart) {\n var length = queue.length;\n var i = 0;\n while (i < length) {\n var binding = queue[i];\n queued[binding.__connectQueueId] = false;\n binding.connect(true);\n i++;\n\n if (i % 100 === 0 && PLATFORM.performance.now() - animationFrameStart > frameBudget) {\n break;\n }\n }\n queue.splice(0, i);\n\n if (queue.length) {\n PLATFORM.requestAnimationFrame(flush);\n } else {\n isFlushRequested = false;\n immediate = 0;\n }\n}\n\nexport function enqueueBindingConnect(binding) {\n if (immediate < minimumImmediate) {\n immediate++;\n binding.connect(false);\n } else {\n var id = binding.__connectQueueId;\n if (id === undefined) {\n id = nextId;\n nextId++;\n binding.__connectQueueId = id;\n }\n\n if (!queued[id]) {\n queue.push(binding);\n queued[id] = true;\n }\n }\n if (!isFlushRequested) {\n isFlushRequested = true;\n PLATFORM.requestAnimationFrame(flush);\n }\n}\n\nfunction addSubscriber(context, callable) {\n if (this.hasSubscriber(context, callable)) {\n return false;\n }\n if (!this._context0) {\n this._context0 = context;\n this._callable0 = callable;\n return true;\n }\n if (!this._context1) {\n this._context1 = context;\n this._callable1 = callable;\n return true;\n }\n if (!this._context2) {\n this._context2 = context;\n this._callable2 = callable;\n return true;\n }\n if (!this._contextsRest) {\n this._contextsRest = [context];\n this._callablesRest = [callable];\n return true;\n }\n this._contextsRest.push(context);\n this._callablesRest.push(callable);\n return true;\n}\n\nfunction removeSubscriber(context, callable) {\n if (this._context0 === context && this._callable0 === callable) {\n this._context0 = null;\n this._callable0 = null;\n return true;\n }\n if (this._context1 === context && this._callable1 === callable) {\n this._context1 = null;\n this._callable1 = null;\n return true;\n }\n if (this._context2 === context && this._callable2 === callable) {\n this._context2 = null;\n this._callable2 = null;\n return true;\n }\n var callables = this._callablesRest;\n if (callables === undefined || callables.length === 0) {\n return false;\n }\n var contexts = this._contextsRest;\n var i = 0;\n while (!(callables[i] === callable && contexts[i] === context) && callables.length > i) {\n i++;\n }\n if (i >= callables.length) {\n return false;\n }\n contexts.splice(i, 1);\n callables.splice(i, 1);\n return true;\n}\n\nvar arrayPool1 = [];\nvar arrayPool2 = [];\nvar poolUtilization = [];\n\nfunction callSubscribers(newValue, oldValue) {\n var context0 = this._context0;\n var callable0 = this._callable0;\n var context1 = this._context1;\n var callable1 = this._callable1;\n var context2 = this._context2;\n var callable2 = this._callable2;\n var length = this._contextsRest ? this._contextsRest.length : 0;\n var contextsRest = void 0;\n var callablesRest = void 0;\n var poolIndex = void 0;\n var i = void 0;\n if (length) {\n poolIndex = poolUtilization.length;\n while (poolIndex-- && poolUtilization[poolIndex]) {}\n if (poolIndex < 0) {\n poolIndex = poolUtilization.length;\n contextsRest = [];\n callablesRest = [];\n poolUtilization.push(true);\n arrayPool1.push(contextsRest);\n arrayPool2.push(callablesRest);\n } else {\n poolUtilization[poolIndex] = true;\n contextsRest = arrayPool1[poolIndex];\n callablesRest = arrayPool2[poolIndex];\n }\n\n i = length;\n while (i--) {\n contextsRest[i] = this._contextsRest[i];\n callablesRest[i] = this._callablesRest[i];\n }\n }\n\n if (context0) {\n if (callable0) {\n callable0.call(context0, newValue, oldValue);\n } else {\n context0(newValue, oldValue);\n }\n }\n if (context1) {\n if (callable1) {\n callable1.call(context1, newValue, oldValue);\n } else {\n context1(newValue, oldValue);\n }\n }\n if (context2) {\n if (callable2) {\n callable2.call(context2, newValue, oldValue);\n } else {\n context2(newValue, oldValue);\n }\n }\n if (length) {\n for (i = 0; i < length; i++) {\n var callable = callablesRest[i];\n var context = contextsRest[i];\n if (callable) {\n callable.call(context, newValue, oldValue);\n } else {\n context(newValue, oldValue);\n }\n contextsRest[i] = null;\n callablesRest[i] = null;\n }\n poolUtilization[poolIndex] = false;\n }\n}\n\nfunction hasSubscribers() {\n return !!(this._context0 || this._context1 || this._context2 || this._contextsRest && this._contextsRest.length);\n}\n\nfunction hasSubscriber(context, callable) {\n var has = this._context0 === context && this._callable0 === callable || this._context1 === context && this._callable1 === callable || this._context2 === context && this._callable2 === callable;\n if (has) {\n return true;\n }\n var index = void 0;\n var contexts = this._contextsRest;\n if (!contexts || (index = contexts.length) === 0) {\n return false;\n }\n var callables = this._callablesRest;\n while (index--) {\n if (contexts[index] === context && callables[index] === callable) {\n return true;\n }\n }\n return false;\n}\n\nexport function subscriberCollection() {\n return function (target) {\n target.prototype.addSubscriber = addSubscriber;\n target.prototype.removeSubscriber = removeSubscriber;\n target.prototype.callSubscribers = callSubscribers;\n target.prototype.hasSubscribers = hasSubscribers;\n target.prototype.hasSubscriber = hasSubscriber;\n };\n}\n\nexport var ExpressionObserver = (_dec = connectable(), _dec2 = subscriberCollection(), _dec(_class = _dec2(_class = function () {\n function ExpressionObserver(scope, expression, observerLocator, lookupFunctions) {\n \n\n this.scope = scope;\n this.expression = expression;\n this.observerLocator = observerLocator;\n this.lookupFunctions = lookupFunctions;\n }\n\n ExpressionObserver.prototype.getValue = function getValue() {\n return this.expression.evaluate(this.scope, this.lookupFunctions);\n };\n\n ExpressionObserver.prototype.setValue = function setValue(newValue) {\n this.expression.assign(this.scope, newValue);\n };\n\n ExpressionObserver.prototype.subscribe = function subscribe(context, callable) {\n var _this = this;\n\n if (!this.hasSubscribers()) {\n this.oldValue = this.expression.evaluate(this.scope, this.lookupFunctions);\n this.expression.connect(this, this.scope);\n }\n this.addSubscriber(context, callable);\n if (arguments.length === 1 && context instanceof Function) {\n return {\n dispose: function dispose() {\n _this.unsubscribe(context, callable);\n }\n };\n }\n };\n\n ExpressionObserver.prototype.unsubscribe = function unsubscribe(context, callable) {\n if (this.removeSubscriber(context, callable) && !this.hasSubscribers()) {\n this.unobserve(true);\n this.oldValue = undefined;\n }\n };\n\n ExpressionObserver.prototype.call = function call() {\n var newValue = this.expression.evaluate(this.scope, this.lookupFunctions);\n var oldValue = this.oldValue;\n if (newValue !== oldValue) {\n this.oldValue = newValue;\n this.callSubscribers(newValue, oldValue);\n }\n this._version++;\n this.expression.connect(this, this.scope);\n this.unobserve(false);\n };\n\n return ExpressionObserver;\n}()) || _class) || _class);\n\nfunction isIndex(s) {\n return +s === s >>> 0;\n}\n\nfunction toNumber(s) {\n return +s;\n}\n\nfunction newSplice(index, removed, addedCount) {\n return {\n index: index,\n removed: removed,\n addedCount: addedCount\n };\n}\n\nvar EDIT_LEAVE = 0;\nvar EDIT_UPDATE = 1;\nvar EDIT_ADD = 2;\nvar EDIT_DELETE = 3;\n\nfunction ArraySplice() {}\n\nArraySplice.prototype = {\n calcEditDistances: function calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd) {\n var rowCount = oldEnd - oldStart + 1;\n var columnCount = currentEnd - currentStart + 1;\n var distances = new Array(rowCount);\n var north = void 0;\n var west = void 0;\n\n for (var _i = 0; _i < rowCount; ++_i) {\n distances[_i] = new Array(columnCount);\n distances[_i][0] = _i;\n }\n\n for (var j = 0; j < columnCount; ++j) {\n distances[0][j] = j;\n }\n\n for (var _i2 = 1; _i2 < rowCount; ++_i2) {\n for (var _j = 1; _j < columnCount; ++_j) {\n if (this.equals(current[currentStart + _j - 1], old[oldStart + _i2 - 1])) {\n distances[_i2][_j] = distances[_i2 - 1][_j - 1];\n } else {\n north = distances[_i2 - 1][_j] + 1;\n west = distances[_i2][_j - 1] + 1;\n distances[_i2][_j] = north < west ? north : west;\n }\n }\n }\n\n return distances;\n },\n\n spliceOperationsFromEditDistances: function spliceOperationsFromEditDistances(distances) {\n var i = distances.length - 1;\n var j = distances[0].length - 1;\n var current = distances[i][j];\n var edits = [];\n while (i > 0 || j > 0) {\n if (i === 0) {\n edits.push(EDIT_ADD);\n j--;\n continue;\n }\n if (j === 0) {\n edits.push(EDIT_DELETE);\n i--;\n continue;\n }\n var northWest = distances[i - 1][j - 1];\n var west = distances[i - 1][j];\n var north = distances[i][j - 1];\n\n var min = void 0;\n if (west < north) {\n min = west < northWest ? west : northWest;\n } else {\n min = north < northWest ? north : northWest;\n }\n\n if (min === northWest) {\n if (northWest === current) {\n edits.push(EDIT_LEAVE);\n } else {\n edits.push(EDIT_UPDATE);\n current = northWest;\n }\n i--;\n j--;\n } else if (min === west) {\n edits.push(EDIT_DELETE);\n i--;\n current = west;\n } else {\n edits.push(EDIT_ADD);\n j--;\n current = north;\n }\n }\n\n edits.reverse();\n return edits;\n },\n\n calcSplices: function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {\n var prefixCount = 0;\n var suffixCount = 0;\n\n var minLength = Math.min(currentEnd - currentStart, oldEnd - oldStart);\n if (currentStart === 0 && oldStart === 0) {\n prefixCount = this.sharedPrefix(current, old, minLength);\n }\n\n if (currentEnd === current.length && oldEnd === old.length) {\n suffixCount = this.sharedSuffix(current, old, minLength - prefixCount);\n }\n\n currentStart += prefixCount;\n oldStart += prefixCount;\n currentEnd -= suffixCount;\n oldEnd -= suffixCount;\n\n if (currentEnd - currentStart === 0 && oldEnd - oldStart === 0) {\n return [];\n }\n\n if (currentStart === currentEnd) {\n var _splice = newSplice(currentStart, [], 0);\n while (oldStart < oldEnd) {\n _splice.removed.push(old[oldStart++]);\n }\n\n return [_splice];\n } else if (oldStart === oldEnd) {\n return [newSplice(currentStart, [], currentEnd - currentStart)];\n }\n\n var ops = this.spliceOperationsFromEditDistances(this.calcEditDistances(current, currentStart, currentEnd, old, oldStart, oldEnd));\n\n var splice = undefined;\n var splices = [];\n var index = currentStart;\n var oldIndex = oldStart;\n for (var _i3 = 0; _i3 < ops.length; ++_i3) {\n switch (ops[_i3]) {\n case EDIT_LEAVE:\n if (splice) {\n splices.push(splice);\n splice = undefined;\n }\n\n index++;\n oldIndex++;\n break;\n case EDIT_UPDATE:\n if (!splice) {\n splice = newSplice(index, [], 0);\n }\n\n splice.addedCount++;\n index++;\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n case EDIT_ADD:\n if (!splice) {\n splice = newSplice(index, [], 0);\n }\n\n splice.addedCount++;\n index++;\n break;\n case EDIT_DELETE:\n if (!splice) {\n splice = newSplice(index, [], 0);\n }\n\n splice.removed.push(old[oldIndex]);\n oldIndex++;\n break;\n }\n }\n\n if (splice) {\n splices.push(splice);\n }\n return splices;\n },\n\n sharedPrefix: function sharedPrefix(current, old, searchLength) {\n for (var _i4 = 0; _i4 < searchLength; ++_i4) {\n if (!this.equals(current[_i4], old[_i4])) {\n return _i4;\n }\n }\n\n return searchLength;\n },\n\n sharedSuffix: function sharedSuffix(current, old, searchLength) {\n var index1 = current.length;\n var index2 = old.length;\n var count = 0;\n while (count < searchLength && this.equals(current[--index1], old[--index2])) {\n count++;\n }\n\n return count;\n },\n\n calculateSplices: function calculateSplices(current, previous) {\n return this.calcSplices(current, 0, current.length, previous, 0, previous.length);\n },\n\n equals: function equals(currentValue, previousValue) {\n return currentValue === previousValue;\n }\n};\n\nvar arraySplice = new ArraySplice();\n\nexport function calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd) {\n return arraySplice.calcSplices(current, currentStart, currentEnd, old, oldStart, oldEnd);\n}\n\nfunction intersect(start1, end1, start2, end2) {\n if (end1 < start2 || end2 < start1) {\n return -1;\n }\n\n if (end1 === start2 || end2 === start1) {\n return 0;\n }\n\n if (start1 < start2) {\n if (end1 < end2) {\n return end1 - start2;\n }\n\n return end2 - start2;\n }\n\n if (end2 < end1) {\n return end2 - start1;\n }\n\n return end1 - start1;\n}\n\nexport function mergeSplice(splices, index, removed, addedCount) {\n var splice = newSplice(index, removed, addedCount);\n\n var inserted = false;\n var insertionOffset = 0;\n\n for (var _i5 = 0; _i5 < splices.length; _i5++) {\n var current = splices[_i5];\n current.index += insertionOffset;\n\n if (inserted) {\n continue;\n }\n\n var intersectCount = intersect(splice.index, splice.index + splice.removed.length, current.index, current.index + current.addedCount);\n\n if (intersectCount >= 0) {\n\n splices.splice(_i5, 1);\n _i5--;\n\n insertionOffset -= current.addedCount - current.removed.length;\n\n splice.addedCount += current.addedCount - intersectCount;\n var deleteCount = splice.removed.length + current.removed.length - intersectCount;\n\n if (!splice.addedCount && !deleteCount) {\n inserted = true;\n } else {\n var currentRemoved = current.removed;\n\n if (splice.index < current.index) {\n var prepend = splice.removed.slice(0, current.index - splice.index);\n Array.prototype.push.apply(prepend, currentRemoved);\n currentRemoved = prepend;\n }\n\n if (splice.index + splice.removed.length > current.index + current.addedCount) {\n var append = splice.removed.slice(current.index + current.addedCount - splice.index);\n Array.prototype.push.apply(currentRemoved, append);\n }\n\n splice.removed = currentRemoved;\n if (current.index < splice.index) {\n splice.index = current.index;\n }\n }\n } else if (splice.index < current.index) {\n\n inserted = true;\n\n splices.splice(_i5, 0, splice);\n _i5++;\n\n var offset = splice.addedCount - splice.removed.length;\n current.index += offset;\n insertionOffset += offset;\n }\n }\n\n if (!inserted) {\n splices.push(splice);\n }\n}\n\nfunction createInitialSplices(array, changeRecords) {\n var splices = [];\n\n for (var _i6 = 0; _i6 < changeRecords.length; _i6++) {\n var record = changeRecords[_i6];\n switch (record.type) {\n case 'splice':\n mergeSplice(splices, record.index, record.removed.slice(), record.addedCount);\n break;\n case 'add':\n case 'update':\n case 'delete':\n if (!isIndex(record.name)) {\n continue;\n }\n\n var index = toNumber(record.name);\n if (index < 0) {\n continue;\n }\n\n mergeSplice(splices, index, [record.oldValue], record.type === 'delete' ? 0 : 1);\n break;\n default:\n console.error('Unexpected record type: ' + JSON.stringify(record));\n break;\n }\n }\n\n return splices;\n}\n\nexport function projectArraySplices(array, changeRecords) {\n var splices = [];\n\n createInitialSplices(array, changeRecords).forEach(function (splice) {\n if (splice.addedCount === 1 && splice.removed.length === 1) {\n if (splice.removed[0] !== array[splice.index]) {\n splices.push(splice);\n }\n\n return;\n }\n\n splices = splices.concat(calcSplices(array, splice.index, splice.index + splice.addedCount, splice.removed, 0, splice.removed.length));\n });\n\n return splices;\n}\n\nfunction newRecord(type, object, key, oldValue) {\n return {\n type: type,\n object: object,\n key: key,\n oldValue: oldValue\n };\n}\n\nexport function getChangeRecords(map) {\n var entries = new Array(map.size);\n var keys = map.keys();\n var i = 0;\n var item = void 0;\n\n while (item = keys.next()) {\n if (item.done) {\n break;\n }\n\n entries[i] = newRecord('added', map, item.value);\n i++;\n }\n\n return entries;\n}\n\nexport var ModifyCollectionObserver = (_dec3 = subscriberCollection(), _dec3(_class2 = function () {\n function ModifyCollectionObserver(taskQueue, collection) {\n \n\n this.taskQueue = taskQueue;\n this.queued = false;\n this.changeRecords = null;\n this.oldCollection = null;\n this.collection = collection;\n this.lengthPropertyName = collection instanceof Map || collection instanceof Set ? 'size' : 'length';\n }\n\n ModifyCollectionObserver.prototype.subscribe = function subscribe(context, callable) {\n this.addSubscriber(context, callable);\n };\n\n ModifyCollectionObserver.prototype.unsubscribe = function unsubscribe(context, callable) {\n this.removeSubscriber(context, callable);\n };\n\n ModifyCollectionObserver.prototype.addChangeRecord = function addChangeRecord(changeRecord) {\n if (!this.hasSubscribers() && !this.lengthObserver) {\n return;\n }\n\n if (changeRecord.type === 'splice') {\n var index = changeRecord.index;\n var arrayLength = changeRecord.object.length;\n if (index > arrayLength) {\n index = arrayLength - changeRecord.addedCount;\n } else if (index < 0) {\n index = arrayLength + changeRecord.removed.length + index - changeRecord.addedCount;\n }\n if (index < 0) {\n index = 0;\n }\n changeRecord.index = index;\n }\n\n if (this.changeRecords === null) {\n this.changeRecords = [changeRecord];\n } else {\n this.changeRecords.push(changeRecord);\n }\n\n if (!this.queued) {\n this.queued = true;\n this.taskQueue.queueMicroTask(this);\n }\n };\n\n ModifyCollectionObserver.prototype.flushChangeRecords = function flushChangeRecords() {\n if (this.changeRecords && this.changeRecords.length || this.oldCollection) {\n this.call();\n }\n };\n\n ModifyCollectionObserver.prototype.reset = function reset(oldCollection) {\n this.oldCollection = oldCollection;\n\n if (this.hasSubscribers() && !this.queued) {\n this.queued = true;\n this.taskQueue.queueMicroTask(this);\n }\n };\n\n ModifyCollectionObserver.prototype.getLengthObserver = function getLengthObserver() {\n return this.lengthObserver || (this.lengthObserver = new CollectionLengthObserver(this.collection));\n };\n\n ModifyCollectionObserver.prototype.call = function call() {\n var changeRecords = this.changeRecords;\n var oldCollection = this.oldCollection;\n var records = void 0;\n\n this.queued = false;\n this.changeRecords = [];\n this.oldCollection = null;\n\n if (this.hasSubscribers()) {\n if (oldCollection) {\n if (this.collection instanceof Map || this.collection instanceof Set) {\n records = getChangeRecords(oldCollection);\n } else {\n records = calcSplices(this.collection, 0, this.collection.length, oldCollection, 0, oldCollection.length);\n }\n } else {\n if (this.collection instanceof Map || this.collection instanceof Set) {\n records = changeRecords;\n } else {\n records = projectArraySplices(this.collection, changeRecords);\n }\n }\n\n this.callSubscribers(records);\n }\n\n if (this.lengthObserver) {\n this.lengthObserver.call(this.collection[this.lengthPropertyName]);\n }\n };\n\n return ModifyCollectionObserver;\n}()) || _class2);\n\nexport var CollectionLengthObserver = (_dec4 = subscriberCollection(), _dec4(_class3 = function () {\n function CollectionLengthObserver(collection) {\n \n\n this.collection = collection;\n this.lengthPropertyName = collection instanceof Map || collection instanceof Set ? 'size' : 'length';\n this.currentValue = collection[this.lengthPropertyName];\n }\n\n CollectionLengthObserver.prototype.getValue = function getValue() {\n return this.collection[this.lengthPropertyName];\n };\n\n CollectionLengthObserver.prototype.setValue = function setValue(newValue) {\n this.collection[this.lengthPropertyName] = newValue;\n };\n\n CollectionLengthObserver.prototype.subscribe = function subscribe(context, callable) {\n this.addSubscriber(context, callable);\n };\n\n CollectionLengthObserver.prototype.unsubscribe = function unsubscribe(context, callable) {\n this.removeSubscriber(context, callable);\n };\n\n CollectionLengthObserver.prototype.call = function call(newValue) {\n var oldValue = this.currentValue;\n this.callSubscribers(newValue, oldValue);\n this.currentValue = newValue;\n };\n\n return CollectionLengthObserver;\n}()) || _class3);\n\nvar arrayProto = Array.prototype;\nvar pop = arrayProto.pop;\nvar push = arrayProto.push;\nvar reverse = arrayProto.reverse;\nvar shift = arrayProto.shift;\nvar sort = arrayProto.sort;\nvar splice = arrayProto.splice;\nvar unshift = arrayProto.unshift;\n\nif (arrayProto.__au_patched__) {\n LogManager.getLogger('array-observation').warn('Detected 2nd attempt of patching array from Aurelia binding.' + ' This is probably caused by dependency mismatch between core modules and a 3rd party plugin.' + ' Please see https://github.com/aurelia/cli/pull/906 if you are using webpack.');\n} else {\n Reflect.defineProperty(arrayProto, '__au_patched__', { value: 1 });\n arrayProto.pop = function () {\n var notEmpty = this.length > 0;\n var methodCallResult = pop.apply(this, arguments);\n if (notEmpty && this.__array_observer__ !== undefined) {\n this.__array_observer__.addChangeRecord({\n type: 'delete',\n object: this,\n name: this.length,\n oldValue: methodCallResult\n });\n }\n return methodCallResult;\n };\n\n arrayProto.push = function () {\n var methodCallResult = push.apply(this, arguments);\n if (this.__array_observer__ !== undefined) {\n this.__array_observer__.addChangeRecord({\n type: 'splice',\n object: this,\n index: this.length - arguments.length,\n removed: [],\n addedCount: arguments.length\n });\n }\n return methodCallResult;\n };\n\n arrayProto.reverse = function () {\n var oldArray = void 0;\n if (this.__array_observer__ !== undefined) {\n this.__array_observer__.flushChangeRecords();\n oldArray = this.slice();\n }\n var methodCallResult = reverse.apply(this, arguments);\n if (this.__array_observer__ !== undefined) {\n this.__array_observer__.reset(oldArray);\n }\n return methodCallResult;\n };\n\n arrayProto.shift = function () {\n var notEmpty = this.length > 0;\n var methodCallResult = shift.apply(this, arguments);\n if (notEmpty && this.__array_observer__ !== undefined) {\n this.__array_observer__.addChangeRecord({\n type: 'delete',\n object: this,\n name: 0,\n oldValue: methodCallResult\n });\n }\n return methodCallResult;\n };\n\n arrayProto.sort = function () {\n var oldArray = void 0;\n if (this.__array_observer__ !== undefined) {\n this.__array_observer__.flushChangeRecords();\n oldArray = this.slice();\n }\n var methodCallResult = sort.apply(this, arguments);\n if (this.__array_observer__ !== undefined) {\n this.__array_observer__.reset(oldArray);\n }\n return methodCallResult;\n };\n\n arrayProto.splice = function () {\n var methodCallResult = splice.apply(this, arguments);\n if (this.__array_observer__ !== undefined) {\n this.__array_observer__.addChangeRecord({\n type: 'splice',\n object: this,\n index: +arguments[0],\n removed: methodCallResult,\n addedCount: arguments.length > 2 ? arguments.length - 2 : 0\n });\n }\n return methodCallResult;\n };\n\n arrayProto.unshift = function () {\n var methodCallResult = unshift.apply(this, arguments);\n if (this.__array_observer__ !== undefined) {\n this.__array_observer__.addChangeRecord({\n type: 'splice',\n object: this,\n index: 0,\n removed: [],\n addedCount: arguments.length\n });\n }\n return methodCallResult;\n };\n}\n\nfunction _getArrayObserver(taskQueue, array) {\n return ModifyArrayObserver.for(taskQueue, array);\n}\n\nvar ModifyArrayObserver = function (_ModifyCollectionObse) {\n _inherits(ModifyArrayObserver, _ModifyCollectionObse);\n\n function ModifyArrayObserver(taskQueue, array) {\n \n\n return _possibleConstructorReturn(this, _ModifyCollectionObse.call(this, taskQueue, array));\n }\n\n ModifyArrayObserver.for = function _for(taskQueue, array) {\n if (!('__array_observer__' in array)) {\n Reflect.defineProperty(array, '__array_observer__', {\n value: ModifyArrayObserver.create(taskQueue, array),\n enumerable: false, configurable: false\n });\n }\n return array.__array_observer__;\n };\n\n ModifyArrayObserver.create = function create(taskQueue, array) {\n return new ModifyArrayObserver(taskQueue, array);\n };\n\n return ModifyArrayObserver;\n}(ModifyCollectionObserver);\n\nexport var Expression = function () {\n function Expression() {\n \n\n this.isChain = false;\n this.isAssignable = false;\n }\n\n Expression.prototype.evaluate = function evaluate(scope, lookupFunctions, args) {\n throw new Error('Binding expression \"' + this + '\" cannot be evaluated.');\n };\n\n Expression.prototype.assign = function assign(scope, value, lookupFunctions) {\n throw new Error('Binding expression \"' + this + '\" cannot be assigned to.');\n };\n\n Expression.prototype.toString = function toString() {\n return typeof FEATURE_NO_UNPARSER === 'undefined' ? _Unparser.unparse(this) : Function.prototype.toString.call(this);\n };\n\n return Expression;\n}();\n\nexport var Chain = function (_Expression) {\n _inherits(Chain, _Expression);\n\n function Chain(expressions) {\n \n\n var _this3 = _possibleConstructorReturn(this, _Expression.call(this));\n\n _this3.expressions = expressions;\n _this3.isChain = true;\n return _this3;\n }\n\n Chain.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n var result = void 0;\n var expressions = this.expressions;\n var last = void 0;\n\n for (var _i7 = 0, length = expressions.length; _i7 < length; ++_i7) {\n last = expressions[_i7].evaluate(scope, lookupFunctions);\n\n if (last !== null) {\n result = last;\n }\n }\n\n return result;\n };\n\n Chain.prototype.accept = function accept(visitor) {\n return visitor.visitChain(this);\n };\n\n return Chain;\n}(Expression);\n\nexport var BindingBehavior = function (_Expression2) {\n _inherits(BindingBehavior, _Expression2);\n\n function BindingBehavior(expression, name, args) {\n \n\n var _this4 = _possibleConstructorReturn(this, _Expression2.call(this));\n\n _this4.expression = expression;\n _this4.name = name;\n _this4.args = args;\n return _this4;\n }\n\n BindingBehavior.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n return this.expression.evaluate(scope, lookupFunctions);\n };\n\n BindingBehavior.prototype.assign = function assign(scope, value, lookupFunctions) {\n return this.expression.assign(scope, value, lookupFunctions);\n };\n\n BindingBehavior.prototype.accept = function accept(visitor) {\n return visitor.visitBindingBehavior(this);\n };\n\n BindingBehavior.prototype.connect = function connect(binding, scope) {\n this.expression.connect(binding, scope);\n };\n\n BindingBehavior.prototype.bind = function bind(binding, scope, lookupFunctions) {\n if (this.expression.expression && this.expression.bind) {\n this.expression.bind(binding, scope, lookupFunctions);\n }\n var behavior = lookupFunctions.bindingBehaviors(this.name);\n if (!behavior) {\n throw new Error('No BindingBehavior named \"' + this.name + '\" was found!');\n }\n var behaviorKey = 'behavior-' + this.name;\n if (binding[behaviorKey]) {\n throw new Error('A binding behavior named \"' + this.name + '\" has already been applied to \"' + this.expression + '\"');\n }\n binding[behaviorKey] = behavior;\n behavior.bind.apply(behavior, [binding, scope].concat(evalList(scope, this.args, binding.lookupFunctions)));\n };\n\n BindingBehavior.prototype.unbind = function unbind(binding, scope) {\n var behaviorKey = 'behavior-' + this.name;\n binding[behaviorKey].unbind(binding, scope);\n binding[behaviorKey] = null;\n if (this.expression.expression && this.expression.unbind) {\n this.expression.unbind(binding, scope);\n }\n };\n\n return BindingBehavior;\n}(Expression);\n\nexport var ValueConverter = function (_Expression3) {\n _inherits(ValueConverter, _Expression3);\n\n function ValueConverter(expression, name, args, allArgs) {\n \n\n var _this5 = _possibleConstructorReturn(this, _Expression3.call(this));\n\n _this5.expression = expression;\n _this5.name = name;\n _this5.args = args;\n _this5.allArgs = allArgs;\n return _this5;\n }\n\n ValueConverter.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n var converter = lookupFunctions.valueConverters(this.name);\n if (!converter) {\n throw new Error('No ValueConverter named \"' + this.name + '\" was found!');\n }\n\n if ('toView' in converter) {\n return converter.toView.apply(converter, evalList(scope, this.allArgs, lookupFunctions));\n }\n\n return this.allArgs[0].evaluate(scope, lookupFunctions);\n };\n\n ValueConverter.prototype.assign = function assign(scope, value, lookupFunctions) {\n var converter = lookupFunctions.valueConverters(this.name);\n if (!converter) {\n throw new Error('No ValueConverter named \"' + this.name + '\" was found!');\n }\n\n if ('fromView' in converter) {\n value = converter.fromView.apply(converter, [value].concat(evalList(scope, this.args, lookupFunctions)));\n }\n\n return this.allArgs[0].assign(scope, value, lookupFunctions);\n };\n\n ValueConverter.prototype.accept = function accept(visitor) {\n return visitor.visitValueConverter(this);\n };\n\n ValueConverter.prototype.connect = function connect(binding, scope) {\n var expressions = this.allArgs;\n var i = expressions.length;\n while (i--) {\n expressions[i].connect(binding, scope);\n }\n var converter = binding.lookupFunctions.valueConverters(this.name);\n if (!converter) {\n throw new Error('No ValueConverter named \"' + this.name + '\" was found!');\n }\n var signals = converter.signals;\n if (signals === undefined) {\n return;\n }\n i = signals.length;\n while (i--) {\n connectBindingToSignal(binding, signals[i]);\n }\n };\n\n return ValueConverter;\n}(Expression);\n\nexport var Assign = function (_Expression4) {\n _inherits(Assign, _Expression4);\n\n function Assign(target, value) {\n \n\n var _this6 = _possibleConstructorReturn(this, _Expression4.call(this));\n\n _this6.target = target;\n _this6.value = value;\n _this6.isAssignable = true;\n return _this6;\n }\n\n Assign.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n return this.target.assign(scope, this.value.evaluate(scope, lookupFunctions));\n };\n\n Assign.prototype.accept = function accept(vistor) {\n vistor.visitAssign(this);\n };\n\n Assign.prototype.connect = function connect(binding, scope) {};\n\n Assign.prototype.assign = function assign(scope, value) {\n this.value.assign(scope, value);\n this.target.assign(scope, value);\n };\n\n return Assign;\n}(Expression);\n\nexport var Conditional = function (_Expression5) {\n _inherits(Conditional, _Expression5);\n\n function Conditional(condition, yes, no) {\n \n\n var _this7 = _possibleConstructorReturn(this, _Expression5.call(this));\n\n _this7.condition = condition;\n _this7.yes = yes;\n _this7.no = no;\n return _this7;\n }\n\n Conditional.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n return !!this.condition.evaluate(scope, lookupFunctions) ? this.yes.evaluate(scope, lookupFunctions) : this.no.evaluate(scope, lookupFunctions);\n };\n\n Conditional.prototype.accept = function accept(visitor) {\n return visitor.visitConditional(this);\n };\n\n Conditional.prototype.connect = function connect(binding, scope) {\n this.condition.connect(binding, scope);\n if (this.condition.evaluate(scope)) {\n this.yes.connect(binding, scope);\n } else {\n this.no.connect(binding, scope);\n }\n };\n\n return Conditional;\n}(Expression);\n\nexport var AccessThis = function (_Expression6) {\n _inherits(AccessThis, _Expression6);\n\n function AccessThis(ancestor) {\n \n\n var _this8 = _possibleConstructorReturn(this, _Expression6.call(this));\n\n _this8.ancestor = ancestor;\n return _this8;\n }\n\n AccessThis.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n var oc = scope.overrideContext;\n var i = this.ancestor;\n while (i-- && oc) {\n oc = oc.parentOverrideContext;\n }\n return i < 1 && oc ? oc.bindingContext : undefined;\n };\n\n AccessThis.prototype.accept = function accept(visitor) {\n return visitor.visitAccessThis(this);\n };\n\n AccessThis.prototype.connect = function connect(binding, scope) {};\n\n return AccessThis;\n}(Expression);\n\nexport var AccessScope = function (_Expression7) {\n _inherits(AccessScope, _Expression7);\n\n function AccessScope(name, ancestor) {\n \n\n var _this9 = _possibleConstructorReturn(this, _Expression7.call(this));\n\n _this9.name = name;\n _this9.ancestor = ancestor;\n _this9.isAssignable = true;\n return _this9;\n }\n\n AccessScope.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n var context = getContextFor(this.name, scope, this.ancestor);\n return context[this.name];\n };\n\n AccessScope.prototype.assign = function assign(scope, value) {\n var context = getContextFor(this.name, scope, this.ancestor);\n return context ? context[this.name] = value : undefined;\n };\n\n AccessScope.prototype.accept = function accept(visitor) {\n return visitor.visitAccessScope(this);\n };\n\n AccessScope.prototype.connect = function connect(binding, scope) {\n var context = getContextFor(this.name, scope, this.ancestor);\n binding.observeProperty(context, this.name);\n };\n\n return AccessScope;\n}(Expression);\n\nexport var AccessMember = function (_Expression8) {\n _inherits(AccessMember, _Expression8);\n\n function AccessMember(object, name) {\n \n\n var _this10 = _possibleConstructorReturn(this, _Expression8.call(this));\n\n _this10.object = object;\n _this10.name = name;\n _this10.isAssignable = true;\n return _this10;\n }\n\n AccessMember.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n var instance = this.object.evaluate(scope, lookupFunctions);\n return instance === null || instance === undefined ? instance : instance[this.name];\n };\n\n AccessMember.prototype.assign = function assign(scope, value) {\n var instance = this.object.evaluate(scope);\n\n if (instance === null || instance === undefined) {\n instance = {};\n this.object.assign(scope, instance);\n }\n\n instance[this.name] = value;\n return value;\n };\n\n AccessMember.prototype.accept = function accept(visitor) {\n return visitor.visitAccessMember(this);\n };\n\n AccessMember.prototype.connect = function connect(binding, scope) {\n this.object.connect(binding, scope);\n var obj = this.object.evaluate(scope);\n if (obj) {\n binding.observeProperty(obj, this.name);\n }\n };\n\n return AccessMember;\n}(Expression);\n\nexport var AccessKeyed = function (_Expression9) {\n _inherits(AccessKeyed, _Expression9);\n\n function AccessKeyed(object, key) {\n \n\n var _this11 = _possibleConstructorReturn(this, _Expression9.call(this));\n\n _this11.object = object;\n _this11.key = key;\n _this11.isAssignable = true;\n return _this11;\n }\n\n AccessKeyed.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n var instance = this.object.evaluate(scope, lookupFunctions);\n var lookup = this.key.evaluate(scope, lookupFunctions);\n return getKeyed(instance, lookup);\n };\n\n AccessKeyed.prototype.assign = function assign(scope, value) {\n var instance = this.object.evaluate(scope);\n var lookup = this.key.evaluate(scope);\n return setKeyed(instance, lookup, value);\n };\n\n AccessKeyed.prototype.accept = function accept(visitor) {\n return visitor.visitAccessKeyed(this);\n };\n\n AccessKeyed.prototype.connect = function connect(binding, scope) {\n this.object.connect(binding, scope);\n var obj = this.object.evaluate(scope);\n if (obj instanceof Object) {\n this.key.connect(binding, scope);\n var key = this.key.evaluate(scope);\n\n if (key !== null && key !== undefined && !(Array.isArray(obj) && typeof key === 'number')) {\n binding.observeProperty(obj, key);\n }\n }\n };\n\n return AccessKeyed;\n}(Expression);\n\nexport var CallScope = function (_Expression10) {\n _inherits(CallScope, _Expression10);\n\n function CallScope(name, args, ancestor) {\n \n\n var _this12 = _possibleConstructorReturn(this, _Expression10.call(this));\n\n _this12.name = name;\n _this12.args = args;\n _this12.ancestor = ancestor;\n return _this12;\n }\n\n CallScope.prototype.evaluate = function evaluate(scope, lookupFunctions, mustEvaluate) {\n var args = evalList(scope, this.args, lookupFunctions);\n var context = getContextFor(this.name, scope, this.ancestor);\n var func = getFunction(context, this.name, mustEvaluate);\n if (func) {\n return func.apply(context, args);\n }\n return undefined;\n };\n\n CallScope.prototype.accept = function accept(visitor) {\n return visitor.visitCallScope(this);\n };\n\n CallScope.prototype.connect = function connect(binding, scope) {\n var args = this.args;\n var i = args.length;\n while (i--) {\n args[i].connect(binding, scope);\n }\n };\n\n return CallScope;\n}(Expression);\n\nexport var CallMember = function (_Expression11) {\n _inherits(CallMember, _Expression11);\n\n function CallMember(object, name, args) {\n \n\n var _this13 = _possibleConstructorReturn(this, _Expression11.call(this));\n\n _this13.object = object;\n _this13.name = name;\n _this13.args = args;\n return _this13;\n }\n\n CallMember.prototype.evaluate = function evaluate(scope, lookupFunctions, mustEvaluate) {\n var instance = this.object.evaluate(scope, lookupFunctions);\n var args = evalList(scope, this.args, lookupFunctions);\n var func = getFunction(instance, this.name, mustEvaluate);\n if (func) {\n return func.apply(instance, args);\n }\n return undefined;\n };\n\n CallMember.prototype.accept = function accept(visitor) {\n return visitor.visitCallMember(this);\n };\n\n CallMember.prototype.connect = function connect(binding, scope) {\n this.object.connect(binding, scope);\n var obj = this.object.evaluate(scope);\n if (getFunction(obj, this.name, false)) {\n var args = this.args;\n var _i8 = args.length;\n while (_i8--) {\n args[_i8].connect(binding, scope);\n }\n }\n };\n\n return CallMember;\n}(Expression);\n\nexport var CallFunction = function (_Expression12) {\n _inherits(CallFunction, _Expression12);\n\n function CallFunction(func, args) {\n \n\n var _this14 = _possibleConstructorReturn(this, _Expression12.call(this));\n\n _this14.func = func;\n _this14.args = args;\n return _this14;\n }\n\n CallFunction.prototype.evaluate = function evaluate(scope, lookupFunctions, mustEvaluate) {\n var func = this.func.evaluate(scope, lookupFunctions);\n if (typeof func === 'function') {\n return func.apply(null, evalList(scope, this.args, lookupFunctions));\n }\n if (!mustEvaluate && (func === null || func === undefined)) {\n return undefined;\n }\n throw new Error(this.func + ' is not a function');\n };\n\n CallFunction.prototype.accept = function accept(visitor) {\n return visitor.visitCallFunction(this);\n };\n\n CallFunction.prototype.connect = function connect(binding, scope) {\n this.func.connect(binding, scope);\n var func = this.func.evaluate(scope);\n if (typeof func === 'function') {\n var args = this.args;\n var _i9 = args.length;\n while (_i9--) {\n args[_i9].connect(binding, scope);\n }\n }\n };\n\n return CallFunction;\n}(Expression);\n\nexport var Binary = function (_Expression13) {\n _inherits(Binary, _Expression13);\n\n function Binary(operation, left, right) {\n \n\n var _this15 = _possibleConstructorReturn(this, _Expression13.call(this));\n\n _this15.operation = operation;\n _this15.left = left;\n _this15.right = right;\n return _this15;\n }\n\n Binary.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n var left = this.left.evaluate(scope, lookupFunctions);\n\n switch (this.operation) {\n case '&&':\n return left && this.right.evaluate(scope, lookupFunctions);\n case '||':\n return left || this.right.evaluate(scope, lookupFunctions);\n }\n\n var right = this.right.evaluate(scope, lookupFunctions);\n\n switch (this.operation) {\n case '==':\n return left == right;\n case '===':\n return left === right;\n case '!=':\n return left != right;\n case '!==':\n return left !== right;\n }\n\n if (left === null || right === null || left === undefined || right === undefined) {\n switch (this.operation) {\n case '+':\n if (left !== null && left !== undefined) return left;\n if (right !== null && right !== undefined) return right;\n return 0;\n case '-':\n if (left !== null && left !== undefined) return left;\n if (right !== null && right !== undefined) return 0 - right;\n return 0;\n }\n\n return null;\n }\n\n switch (this.operation) {\n case '+':\n return autoConvertAdd(left, right);\n case '-':\n return left - right;\n case '*':\n return left * right;\n case '/':\n return left / right;\n case '%':\n return left % right;\n case '<':\n return left < right;\n case '>':\n return left > right;\n case '<=':\n return left <= right;\n case '>=':\n return left >= right;\n case '^':\n return left ^ right;\n }\n\n throw new Error('Internal error [' + this.operation + '] not handled');\n };\n\n Binary.prototype.accept = function accept(visitor) {\n return visitor.visitBinary(this);\n };\n\n Binary.prototype.connect = function connect(binding, scope) {\n this.left.connect(binding, scope);\n var left = this.left.evaluate(scope);\n if (this.operation === '&&' && !left || this.operation === '||' && left) {\n return;\n }\n this.right.connect(binding, scope);\n };\n\n return Binary;\n}(Expression);\n\nexport var PrefixNot = function (_Expression14) {\n _inherits(PrefixNot, _Expression14);\n\n function PrefixNot(operation, expression) {\n \n\n var _this16 = _possibleConstructorReturn(this, _Expression14.call(this));\n\n _this16.operation = operation;\n _this16.expression = expression;\n return _this16;\n }\n\n PrefixNot.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n return !this.expression.evaluate(scope, lookupFunctions);\n };\n\n PrefixNot.prototype.accept = function accept(visitor) {\n return visitor.visitPrefix(this);\n };\n\n PrefixNot.prototype.connect = function connect(binding, scope) {\n this.expression.connect(binding, scope);\n };\n\n return PrefixNot;\n}(Expression);\n\nexport var LiteralPrimitive = function (_Expression15) {\n _inherits(LiteralPrimitive, _Expression15);\n\n function LiteralPrimitive(value) {\n \n\n var _this17 = _possibleConstructorReturn(this, _Expression15.call(this));\n\n _this17.value = value;\n return _this17;\n }\n\n LiteralPrimitive.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n return this.value;\n };\n\n LiteralPrimitive.prototype.accept = function accept(visitor) {\n return visitor.visitLiteralPrimitive(this);\n };\n\n LiteralPrimitive.prototype.connect = function connect(binding, scope) {};\n\n return LiteralPrimitive;\n}(Expression);\n\nexport var LiteralString = function (_Expression16) {\n _inherits(LiteralString, _Expression16);\n\n function LiteralString(value) {\n \n\n var _this18 = _possibleConstructorReturn(this, _Expression16.call(this));\n\n _this18.value = value;\n return _this18;\n }\n\n LiteralString.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n return this.value;\n };\n\n LiteralString.prototype.accept = function accept(visitor) {\n return visitor.visitLiteralString(this);\n };\n\n LiteralString.prototype.connect = function connect(binding, scope) {};\n\n return LiteralString;\n}(Expression);\n\nexport var LiteralArray = function (_Expression17) {\n _inherits(LiteralArray, _Expression17);\n\n function LiteralArray(elements) {\n \n\n var _this19 = _possibleConstructorReturn(this, _Expression17.call(this));\n\n _this19.elements = elements;\n return _this19;\n }\n\n LiteralArray.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n var elements = this.elements;\n var result = [];\n\n for (var _i10 = 0, length = elements.length; _i10 < length; ++_i10) {\n result[_i10] = elements[_i10].evaluate(scope, lookupFunctions);\n }\n\n return result;\n };\n\n LiteralArray.prototype.accept = function accept(visitor) {\n return visitor.visitLiteralArray(this);\n };\n\n LiteralArray.prototype.connect = function connect(binding, scope) {\n var length = this.elements.length;\n for (var _i11 = 0; _i11 < length; _i11++) {\n this.elements[_i11].connect(binding, scope);\n }\n };\n\n return LiteralArray;\n}(Expression);\n\nexport var LiteralObject = function (_Expression18) {\n _inherits(LiteralObject, _Expression18);\n\n function LiteralObject(keys, values) {\n \n\n var _this20 = _possibleConstructorReturn(this, _Expression18.call(this));\n\n _this20.keys = keys;\n _this20.values = values;\n return _this20;\n }\n\n LiteralObject.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n var instance = {};\n var keys = this.keys;\n var values = this.values;\n\n for (var _i12 = 0, length = keys.length; _i12 < length; ++_i12) {\n instance[keys[_i12]] = values[_i12].evaluate(scope, lookupFunctions);\n }\n\n return instance;\n };\n\n LiteralObject.prototype.accept = function accept(visitor) {\n return visitor.visitLiteralObject(this);\n };\n\n LiteralObject.prototype.connect = function connect(binding, scope) {\n var length = this.keys.length;\n for (var _i13 = 0; _i13 < length; _i13++) {\n this.values[_i13].connect(binding, scope);\n }\n };\n\n return LiteralObject;\n}(Expression);\n\nfunction evalList(scope, list, lookupFunctions) {\n var length = list.length;\n var result = [];\n for (var _i14 = 0; _i14 < length; _i14++) {\n result[_i14] = list[_i14].evaluate(scope, lookupFunctions);\n }\n return result;\n}\n\nfunction autoConvertAdd(a, b) {\n if (a !== null && b !== null) {\n if (typeof a === 'string' && typeof b !== 'string') {\n return a + b.toString();\n }\n\n if (typeof a !== 'string' && typeof b === 'string') {\n return a.toString() + b;\n }\n\n return a + b;\n }\n\n if (a !== null) {\n return a;\n }\n\n if (b !== null) {\n return b;\n }\n\n return 0;\n}\n\nfunction getFunction(obj, name, mustExist) {\n var func = obj === null || obj === undefined ? null : obj[name];\n if (typeof func === 'function') {\n return func;\n }\n if (!mustExist && (func === null || func === undefined)) {\n return null;\n }\n throw new Error(name + ' is not a function');\n}\n\nfunction getKeyed(obj, key) {\n if (Array.isArray(obj)) {\n return obj[parseInt(key, 10)];\n } else if (obj) {\n return obj[key];\n } else if (obj === null || obj === undefined) {\n return undefined;\n }\n\n return obj[key];\n}\n\nfunction setKeyed(obj, key, value) {\n if (Array.isArray(obj)) {\n var index = parseInt(key, 10);\n\n if (obj.length <= index) {\n obj.length = index + 1;\n }\n\n obj[index] = value;\n } else {\n obj[key] = value;\n }\n\n return value;\n}\n\nvar _Unparser = null;\n\nexport { _Unparser as Unparser };\nif (typeof FEATURE_NO_UNPARSER === 'undefined') {\n _Unparser = function () {\n function Unparser(buffer) {\n \n\n this.buffer = buffer;\n }\n\n Unparser.unparse = function unparse(expression) {\n var buffer = [];\n var visitor = new _Unparser(buffer);\n\n expression.accept(visitor);\n\n return buffer.join('');\n };\n\n Unparser.prototype.write = function write(text) {\n this.buffer.push(text);\n };\n\n Unparser.prototype.writeArgs = function writeArgs(args) {\n this.write('(');\n\n for (var _i15 = 0, length = args.length; _i15 < length; ++_i15) {\n if (_i15 !== 0) {\n this.write(',');\n }\n\n args[_i15].accept(this);\n }\n\n this.write(')');\n };\n\n Unparser.prototype.visitChain = function visitChain(chain) {\n var expressions = chain.expressions;\n\n for (var _i16 = 0, length = expressions.length; _i16 < length; ++_i16) {\n if (_i16 !== 0) {\n this.write(';');\n }\n\n expressions[_i16].accept(this);\n }\n };\n\n Unparser.prototype.visitBindingBehavior = function visitBindingBehavior(behavior) {\n var args = behavior.args;\n\n behavior.expression.accept(this);\n this.write('&' + behavior.name);\n\n for (var _i17 = 0, length = args.length; _i17 < length; ++_i17) {\n this.write(':');\n args[_i17].accept(this);\n }\n };\n\n Unparser.prototype.visitValueConverter = function visitValueConverter(converter) {\n var args = converter.args;\n\n converter.expression.accept(this);\n this.write('|' + converter.name);\n\n for (var _i18 = 0, length = args.length; _i18 < length; ++_i18) {\n this.write(':');\n args[_i18].accept(this);\n }\n };\n\n Unparser.prototype.visitAssign = function visitAssign(assign) {\n assign.target.accept(this);\n this.write('=');\n assign.value.accept(this);\n };\n\n Unparser.prototype.visitConditional = function visitConditional(conditional) {\n conditional.condition.accept(this);\n this.write('?');\n conditional.yes.accept(this);\n this.write(':');\n conditional.no.accept(this);\n };\n\n Unparser.prototype.visitAccessThis = function visitAccessThis(access) {\n if (access.ancestor === 0) {\n this.write('$this');\n return;\n }\n this.write('$parent');\n var i = access.ancestor - 1;\n while (i--) {\n this.write('.$parent');\n }\n };\n\n Unparser.prototype.visitAccessScope = function visitAccessScope(access) {\n var i = access.ancestor;\n while (i--) {\n this.write('$parent.');\n }\n this.write(access.name);\n };\n\n Unparser.prototype.visitAccessMember = function visitAccessMember(access) {\n access.object.accept(this);\n this.write('.' + access.name);\n };\n\n Unparser.prototype.visitAccessKeyed = function visitAccessKeyed(access) {\n access.object.accept(this);\n this.write('[');\n access.key.accept(this);\n this.write(']');\n };\n\n Unparser.prototype.visitCallScope = function visitCallScope(call) {\n var i = call.ancestor;\n while (i--) {\n this.write('$parent.');\n }\n this.write(call.name);\n this.writeArgs(call.args);\n };\n\n Unparser.prototype.visitCallFunction = function visitCallFunction(call) {\n call.func.accept(this);\n this.writeArgs(call.args);\n };\n\n Unparser.prototype.visitCallMember = function visitCallMember(call) {\n call.object.accept(this);\n this.write('.' + call.name);\n this.writeArgs(call.args);\n };\n\n Unparser.prototype.visitPrefix = function visitPrefix(prefix) {\n this.write('(' + prefix.operation);\n prefix.expression.accept(this);\n this.write(')');\n };\n\n Unparser.prototype.visitBinary = function visitBinary(binary) {\n binary.left.accept(this);\n this.write(binary.operation);\n binary.right.accept(this);\n };\n\n Unparser.prototype.visitLiteralPrimitive = function visitLiteralPrimitive(literal) {\n this.write('' + literal.value);\n };\n\n Unparser.prototype.visitLiteralArray = function visitLiteralArray(literal) {\n var elements = literal.elements;\n\n this.write('[');\n\n for (var _i19 = 0, length = elements.length; _i19 < length; ++_i19) {\n if (_i19 !== 0) {\n this.write(',');\n }\n\n elements[_i19].accept(this);\n }\n\n this.write(']');\n };\n\n Unparser.prototype.visitLiteralObject = function visitLiteralObject(literal) {\n var keys = literal.keys;\n var values = literal.values;\n\n this.write('{');\n\n for (var _i20 = 0, length = keys.length; _i20 < length; ++_i20) {\n if (_i20 !== 0) {\n this.write(',');\n }\n\n this.write('\\'' + keys[_i20] + '\\':');\n values[_i20].accept(this);\n }\n\n this.write('}');\n };\n\n Unparser.prototype.visitLiteralString = function visitLiteralString(literal) {\n var escaped = literal.value.replace(/'/g, \"\\'\");\n this.write('\\'' + escaped + '\\'');\n };\n\n return Unparser;\n }();\n}\n\nexport var ExpressionCloner = function () {\n function ExpressionCloner() {\n \n }\n\n ExpressionCloner.prototype.cloneExpressionArray = function cloneExpressionArray(array) {\n var clonedArray = [];\n var i = array.length;\n while (i--) {\n clonedArray[i] = array[i].accept(this);\n }\n return clonedArray;\n };\n\n ExpressionCloner.prototype.visitChain = function visitChain(chain) {\n return new Chain(this.cloneExpressionArray(chain.expressions));\n };\n\n ExpressionCloner.prototype.visitBindingBehavior = function visitBindingBehavior(behavior) {\n return new BindingBehavior(behavior.expression.accept(this), behavior.name, this.cloneExpressionArray(behavior.args));\n };\n\n ExpressionCloner.prototype.visitValueConverter = function visitValueConverter(converter) {\n return new ValueConverter(converter.expression.accept(this), converter.name, this.cloneExpressionArray(converter.args));\n };\n\n ExpressionCloner.prototype.visitAssign = function visitAssign(assign) {\n return new Assign(assign.target.accept(this), assign.value.accept(this));\n };\n\n ExpressionCloner.prototype.visitConditional = function visitConditional(conditional) {\n return new Conditional(conditional.condition.accept(this), conditional.yes.accept(this), conditional.no.accept(this));\n };\n\n ExpressionCloner.prototype.visitAccessThis = function visitAccessThis(access) {\n return new AccessThis(access.ancestor);\n };\n\n ExpressionCloner.prototype.visitAccessScope = function visitAccessScope(access) {\n return new AccessScope(access.name, access.ancestor);\n };\n\n ExpressionCloner.prototype.visitAccessMember = function visitAccessMember(access) {\n return new AccessMember(access.object.accept(this), access.name);\n };\n\n ExpressionCloner.prototype.visitAccessKeyed = function visitAccessKeyed(access) {\n return new AccessKeyed(access.object.accept(this), access.key.accept(this));\n };\n\n ExpressionCloner.prototype.visitCallScope = function visitCallScope(call) {\n return new CallScope(call.name, this.cloneExpressionArray(call.args), call.ancestor);\n };\n\n ExpressionCloner.prototype.visitCallFunction = function visitCallFunction(call) {\n return new CallFunction(call.func.accept(this), this.cloneExpressionArray(call.args));\n };\n\n ExpressionCloner.prototype.visitCallMember = function visitCallMember(call) {\n return new CallMember(call.object.accept(this), call.name, this.cloneExpressionArray(call.args));\n };\n\n ExpressionCloner.prototype.visitPrefix = function visitPrefix(prefix) {\n return new PrefixNot(prefix.operation, prefix.expression.accept(this));\n };\n\n ExpressionCloner.prototype.visitBinary = function visitBinary(binary) {\n return new Binary(binary.operation, binary.left.accept(this), binary.right.accept(this));\n };\n\n ExpressionCloner.prototype.visitLiteralPrimitive = function visitLiteralPrimitive(literal) {\n return new LiteralPrimitive(literal);\n };\n\n ExpressionCloner.prototype.visitLiteralArray = function visitLiteralArray(literal) {\n return new LiteralArray(this.cloneExpressionArray(literal.elements));\n };\n\n ExpressionCloner.prototype.visitLiteralObject = function visitLiteralObject(literal) {\n return new LiteralObject(literal.keys, this.cloneExpressionArray(literal.values));\n };\n\n ExpressionCloner.prototype.visitLiteralString = function visitLiteralString(literal) {\n return new LiteralString(literal.value);\n };\n\n return ExpressionCloner;\n}();\n\nexport function cloneExpression(expression) {\n var visitor = new ExpressionCloner();\n return expression.accept(visitor);\n}\n\nexport var bindingMode = {\n oneTime: 0,\n toView: 1,\n oneWay: 1,\n twoWay: 2,\n fromView: 3\n};\n\nexport var Token = function () {\n function Token(index, text) {\n \n\n this.index = index;\n this.text = text;\n }\n\n Token.prototype.withOp = function withOp(op) {\n this.opKey = op;\n return this;\n };\n\n Token.prototype.withGetterSetter = function withGetterSetter(key) {\n this.key = key;\n return this;\n };\n\n Token.prototype.withValue = function withValue(value) {\n this.value = value;\n return this;\n };\n\n Token.prototype.toString = function toString() {\n return 'Token(' + this.text + ')';\n };\n\n return Token;\n}();\n\nexport var Lexer = function () {\n function Lexer() {\n \n }\n\n Lexer.prototype.lex = function lex(text) {\n var scanner = new Scanner(text);\n var tokens = [];\n var token = scanner.scanToken();\n\n while (token) {\n tokens.push(token);\n token = scanner.scanToken();\n }\n\n return tokens;\n };\n\n return Lexer;\n}();\n\nexport var Scanner = function () {\n function Scanner(input) {\n \n\n this.input = input;\n this.length = input.length;\n this.peek = 0;\n this.index = -1;\n\n this.advance();\n }\n\n Scanner.prototype.scanToken = function scanToken() {\n while (this.peek <= $SPACE) {\n if (++this.index >= this.length) {\n this.peek = $EOF;\n return null;\n }\n\n this.peek = this.input.charCodeAt(this.index);\n }\n\n if (isIdentifierStart(this.peek)) {\n return this.scanIdentifier();\n }\n\n if (isDigit(this.peek)) {\n return this.scanNumber(this.index);\n }\n\n var start = this.index;\n\n switch (this.peek) {\n case $PERIOD:\n this.advance();\n return isDigit(this.peek) ? this.scanNumber(start) : new Token(start, '.');\n case $LPAREN:\n case $RPAREN:\n case $LBRACE:\n case $RBRACE:\n case $LBRACKET:\n case $RBRACKET:\n case $COMMA:\n case $COLON:\n case $SEMICOLON:\n return this.scanCharacter(start, String.fromCharCode(this.peek));\n case $SQ:\n case $DQ:\n return this.scanString();\n case $PLUS:\n case $MINUS:\n case $STAR:\n case $SLASH:\n case $PERCENT:\n case $CARET:\n case $QUESTION:\n return this.scanOperator(start, String.fromCharCode(this.peek));\n case $LT:\n case $GT:\n case $BANG:\n case $EQ:\n return this.scanComplexOperator(start, $EQ, String.fromCharCode(this.peek), '=');\n case $AMPERSAND:\n return this.scanComplexOperator(start, $AMPERSAND, '&', '&');\n case $BAR:\n return this.scanComplexOperator(start, $BAR, '|', '|');\n case $NBSP:\n while (isWhitespace(this.peek)) {\n this.advance();\n }\n\n return this.scanToken();\n }\n\n var character = String.fromCharCode(this.peek);\n this.error('Unexpected character [' + character + ']');\n return null;\n };\n\n Scanner.prototype.scanCharacter = function scanCharacter(start, text) {\n assert(this.peek === text.charCodeAt(0));\n this.advance();\n return new Token(start, text);\n };\n\n Scanner.prototype.scanOperator = function scanOperator(start, text) {\n assert(this.peek === text.charCodeAt(0));\n assert(OPERATORS[text] === 1);\n this.advance();\n return new Token(start, text).withOp(text);\n };\n\n Scanner.prototype.scanComplexOperator = function scanComplexOperator(start, code, one, two) {\n assert(this.peek === one.charCodeAt(0));\n this.advance();\n\n var text = one;\n\n if (this.peek === code) {\n this.advance();\n text += two;\n }\n\n if (this.peek === code) {\n this.advance();\n text += two;\n }\n\n assert(OPERATORS[text] === 1);\n\n return new Token(start, text).withOp(text);\n };\n\n Scanner.prototype.scanIdentifier = function scanIdentifier() {\n assert(isIdentifierStart(this.peek));\n var start = this.index;\n\n this.advance();\n\n while (isIdentifierPart(this.peek)) {\n this.advance();\n }\n\n var text = this.input.substring(start, this.index);\n var result = new Token(start, text);\n\n if (OPERATORS[text] === 1) {\n result.withOp(text);\n } else {\n result.withGetterSetter(text);\n }\n\n return result;\n };\n\n Scanner.prototype.scanNumber = function scanNumber(start) {\n assert(isDigit(this.peek));\n var simple = this.index === start;\n this.advance();\n\n while (true) {\n if (!isDigit(this.peek)) {\n if (this.peek === $PERIOD) {\n simple = false;\n } else if (isExponentStart(this.peek)) {\n this.advance();\n\n if (isExponentSign(this.peek)) {\n this.advance();\n }\n\n if (!isDigit(this.peek)) {\n this.error('Invalid exponent', -1);\n }\n\n simple = false;\n } else {\n break;\n }\n }\n\n this.advance();\n }\n\n var text = this.input.substring(start, this.index);\n var value = simple ? parseInt(text, 10) : parseFloat(text);\n return new Token(start, text).withValue(value);\n };\n\n Scanner.prototype.scanString = function scanString() {\n assert(this.peek === $SQ || this.peek === $DQ);\n\n var start = this.index;\n var quote = this.peek;\n\n this.advance();\n\n var buffer = void 0;\n var marker = this.index;\n\n while (this.peek !== quote) {\n if (this.peek === $BACKSLASH) {\n if (!buffer) {\n buffer = [];\n }\n\n buffer.push(this.input.substring(marker, this.index));\n this.advance();\n\n var _unescaped = void 0;\n\n if (this.peek === $u) {\n var hex = this.input.substring(this.index + 1, this.index + 5);\n\n if (!/[A-Z0-9]{4}/.test(hex)) {\n this.error('Invalid unicode escape [\\\\u' + hex + ']');\n }\n\n _unescaped = parseInt(hex, 16);\n\n for (var _i21 = 0; _i21 < 5; ++_i21) {\n this.advance();\n }\n } else {\n _unescaped = unescape(this.peek);\n this.advance();\n }\n\n buffer.push(String.fromCharCode(_unescaped));\n marker = this.index;\n } else if (this.peek === $EOF) {\n this.error('Unterminated quote');\n } else {\n this.advance();\n }\n }\n\n var last = this.input.substring(marker, this.index);\n this.advance();\n var text = this.input.substring(start, this.index);\n\n var unescaped = last;\n\n if (buffer !== null && buffer !== undefined) {\n buffer.push(last);\n unescaped = buffer.join('');\n }\n\n return new Token(start, text).withValue(unescaped);\n };\n\n Scanner.prototype.advance = function advance() {\n if (++this.index >= this.length) {\n this.peek = $EOF;\n } else {\n this.peek = this.input.charCodeAt(this.index);\n }\n };\n\n Scanner.prototype.error = function error(message) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n var position = this.index + offset;\n throw new Error('Lexer Error: ' + message + ' at column ' + position + ' in expression [' + this.input + ']');\n };\n\n return Scanner;\n}();\n\nvar OPERATORS = {\n 'undefined': 1,\n 'null': 1,\n 'true': 1,\n 'false': 1,\n '+': 1,\n '-': 1,\n '*': 1,\n '/': 1,\n '%': 1,\n '^': 1,\n '=': 1,\n '==': 1,\n '===': 1,\n '!=': 1,\n '!==': 1,\n '<': 1,\n '>': 1,\n '<=': 1,\n '>=': 1,\n '&&': 1,\n '||': 1,\n '&': 1,\n '|': 1,\n '!': 1,\n '?': 1\n};\n\nvar $EOF = 0;\nvar $TAB = 9;\nvar $LF = 10;\nvar $VTAB = 11;\nvar $FF = 12;\nvar $CR = 13;\nvar $SPACE = 32;\nvar $BANG = 33;\nvar $DQ = 34;\nvar $$ = 36;\nvar $PERCENT = 37;\nvar $AMPERSAND = 38;\nvar $SQ = 39;\nvar $LPAREN = 40;\nvar $RPAREN = 41;\nvar $STAR = 42;\nvar $PLUS = 43;\nvar $COMMA = 44;\nvar $MINUS = 45;\nvar $PERIOD = 46;\nvar $SLASH = 47;\nvar $COLON = 58;\nvar $SEMICOLON = 59;\nvar $LT = 60;\nvar $EQ = 61;\nvar $GT = 62;\nvar $QUESTION = 63;\n\nvar $0 = 48;\nvar $9 = 57;\n\nvar $A = 65;\nvar $E = 69;\nvar $Z = 90;\n\nvar $LBRACKET = 91;\nvar $BACKSLASH = 92;\nvar $RBRACKET = 93;\nvar $CARET = 94;\nvar $_ = 95;\n\nvar $a = 97;\nvar $e = 101;\nvar $f = 102;\nvar $n = 110;\nvar $r = 114;\nvar $t = 116;\nvar $u = 117;\nvar $v = 118;\nvar $z = 122;\n\nvar $LBRACE = 123;\nvar $BAR = 124;\nvar $RBRACE = 125;\nvar $NBSP = 160;\n\nfunction isWhitespace(code) {\n return code >= $TAB && code <= $SPACE || code === $NBSP;\n}\n\nfunction isIdentifierStart(code) {\n return $a <= code && code <= $z || $A <= code && code <= $Z || code === $_ || code === $$;\n}\n\nfunction isIdentifierPart(code) {\n return $a <= code && code <= $z || $A <= code && code <= $Z || $0 <= code && code <= $9 || code === $_ || code === $$;\n}\n\nfunction isDigit(code) {\n return $0 <= code && code <= $9;\n}\n\nfunction isExponentStart(code) {\n return code === $e || code === $E;\n}\n\nfunction isExponentSign(code) {\n return code === $MINUS || code === $PLUS;\n}\n\nfunction unescape(code) {\n switch (code) {\n case $n:\n return $LF;\n case $f:\n return $FF;\n case $r:\n return $CR;\n case $t:\n return $TAB;\n case $v:\n return $VTAB;\n default:\n return code;\n }\n}\n\nfunction assert(condition, message) {\n if (!condition) {\n throw message || 'Assertion failed';\n }\n}\n\nvar EOF = new Token(-1, null);\n\nexport var Parser = function () {\n function Parser() {\n \n\n this.cache = {};\n this.lexer = new Lexer();\n }\n\n Parser.prototype.parse = function parse(input) {\n input = input || '';\n\n return this.cache[input] || (this.cache[input] = new ParserImplementation(this.lexer, input).parseChain());\n };\n\n return Parser;\n}();\n\nexport var ParserImplementation = function () {\n function ParserImplementation(lexer, input) {\n \n\n this.index = 0;\n this.input = input;\n this.tokens = lexer.lex(input);\n }\n\n ParserImplementation.prototype.parseChain = function parseChain() {\n var isChain = false;\n var expressions = [];\n\n while (this.optional(';')) {\n isChain = true;\n }\n\n while (this.index < this.tokens.length) {\n if (this.peek.text === ')' || this.peek.text === '}' || this.peek.text === ']') {\n this.error('Unconsumed token ' + this.peek.text);\n }\n\n var expr = this.parseBindingBehavior();\n expressions.push(expr);\n\n while (this.optional(';')) {\n isChain = true;\n }\n\n if (isChain) {\n this.error('Multiple expressions are not allowed.');\n }\n }\n\n return expressions.length === 1 ? expressions[0] : new Chain(expressions);\n };\n\n ParserImplementation.prototype.parseBindingBehavior = function parseBindingBehavior() {\n var result = this.parseValueConverter();\n\n while (this.optional('&')) {\n var name = this.peek.text;\n var args = [];\n\n this.advance();\n\n while (this.optional(':')) {\n args.push(this.parseExpression());\n }\n\n result = new BindingBehavior(result, name, args);\n }\n\n return result;\n };\n\n ParserImplementation.prototype.parseValueConverter = function parseValueConverter() {\n var result = this.parseExpression();\n\n while (this.optional('|')) {\n var name = this.peek.text;\n var args = [];\n\n this.advance();\n\n while (this.optional(':')) {\n args.push(this.parseExpression());\n }\n\n result = new ValueConverter(result, name, args, [result].concat(args));\n }\n\n return result;\n };\n\n ParserImplementation.prototype.parseExpression = function parseExpression() {\n var start = this.peek.index;\n var result = this.parseConditional();\n\n while (this.peek.text === '=') {\n if (!result.isAssignable) {\n var end = this.index < this.tokens.length ? this.peek.index : this.input.length;\n var expression = this.input.substring(start, end);\n\n this.error('Expression ' + expression + ' is not assignable');\n }\n\n this.expect('=');\n result = new Assign(result, this.parseConditional());\n }\n\n return result;\n };\n\n ParserImplementation.prototype.parseConditional = function parseConditional() {\n var start = this.peek.index;\n var result = this.parseLogicalOr();\n\n if (this.optional('?')) {\n var yes = this.parseExpression();\n\n if (!this.optional(':')) {\n var end = this.index < this.tokens.length ? this.peek.index : this.input.length;\n var expression = this.input.substring(start, end);\n\n this.error('Conditional expression ' + expression + ' requires all 3 expressions');\n }\n\n var no = this.parseExpression();\n result = new Conditional(result, yes, no);\n }\n\n return result;\n };\n\n ParserImplementation.prototype.parseLogicalOr = function parseLogicalOr() {\n var result = this.parseLogicalAnd();\n\n while (this.optional('||')) {\n result = new Binary('||', result, this.parseLogicalAnd());\n }\n\n return result;\n };\n\n ParserImplementation.prototype.parseLogicalAnd = function parseLogicalAnd() {\n var result = this.parseEquality();\n\n while (this.optional('&&')) {\n result = new Binary('&&', result, this.parseEquality());\n }\n\n return result;\n };\n\n ParserImplementation.prototype.parseEquality = function parseEquality() {\n var result = this.parseRelational();\n\n while (true) {\n if (this.optional('==')) {\n result = new Binary('==', result, this.parseRelational());\n } else if (this.optional('!=')) {\n result = new Binary('!=', result, this.parseRelational());\n } else if (this.optional('===')) {\n result = new Binary('===', result, this.parseRelational());\n } else if (this.optional('!==')) {\n result = new Binary('!==', result, this.parseRelational());\n } else {\n return result;\n }\n }\n };\n\n ParserImplementation.prototype.parseRelational = function parseRelational() {\n var result = this.parseAdditive();\n\n while (true) {\n if (this.optional('<')) {\n result = new Binary('<', result, this.parseAdditive());\n } else if (this.optional('>')) {\n result = new Binary('>', result, this.parseAdditive());\n } else if (this.optional('<=')) {\n result = new Binary('<=', result, this.parseAdditive());\n } else if (this.optional('>=')) {\n result = new Binary('>=', result, this.parseAdditive());\n } else {\n return result;\n }\n }\n };\n\n ParserImplementation.prototype.parseAdditive = function parseAdditive() {\n var result = this.parseMultiplicative();\n\n while (true) {\n if (this.optional('+')) {\n result = new Binary('+', result, this.parseMultiplicative());\n } else if (this.optional('-')) {\n result = new Binary('-', result, this.parseMultiplicative());\n } else {\n return result;\n }\n }\n };\n\n ParserImplementation.prototype.parseMultiplicative = function parseMultiplicative() {\n var result = this.parsePrefix();\n\n while (true) {\n if (this.optional('*')) {\n result = new Binary('*', result, this.parsePrefix());\n } else if (this.optional('%')) {\n result = new Binary('%', result, this.parsePrefix());\n } else if (this.optional('/')) {\n result = new Binary('/', result, this.parsePrefix());\n } else {\n return result;\n }\n }\n };\n\n ParserImplementation.prototype.parsePrefix = function parsePrefix() {\n if (this.optional('+')) {\n return this.parsePrefix();\n } else if (this.optional('-')) {\n return new Binary('-', new LiteralPrimitive(0), this.parsePrefix());\n } else if (this.optional('!')) {\n return new PrefixNot('!', this.parsePrefix());\n }\n\n return this.parseAccessOrCallMember();\n };\n\n ParserImplementation.prototype.parseAccessOrCallMember = function parseAccessOrCallMember() {\n var result = this.parsePrimary();\n\n while (true) {\n if (this.optional('.')) {\n var name = this.peek.text;\n\n this.advance();\n\n if (this.optional('(')) {\n var args = this.parseExpressionList(')');\n this.expect(')');\n if (result instanceof AccessThis) {\n result = new CallScope(name, args, result.ancestor);\n } else {\n result = new CallMember(result, name, args);\n }\n } else {\n if (result instanceof AccessThis) {\n result = new AccessScope(name, result.ancestor);\n } else {\n result = new AccessMember(result, name);\n }\n }\n } else if (this.optional('[')) {\n var key = this.parseExpression();\n this.expect(']');\n result = new AccessKeyed(result, key);\n } else if (this.optional('(')) {\n var _args = this.parseExpressionList(')');\n this.expect(')');\n result = new CallFunction(result, _args);\n } else {\n return result;\n }\n }\n };\n\n ParserImplementation.prototype.parsePrimary = function parsePrimary() {\n if (this.optional('(')) {\n var result = this.parseExpression();\n this.expect(')');\n return result;\n } else if (this.optional('null')) {\n return new LiteralPrimitive(null);\n } else if (this.optional('undefined')) {\n return new LiteralPrimitive(undefined);\n } else if (this.optional('true')) {\n return new LiteralPrimitive(true);\n } else if (this.optional('false')) {\n return new LiteralPrimitive(false);\n } else if (this.optional('[')) {\n var _elements = this.parseExpressionList(']');\n this.expect(']');\n return new LiteralArray(_elements);\n } else if (this.peek.text === '{') {\n return this.parseObject();\n } else if (this.peek.key !== null && this.peek.key !== undefined) {\n return this.parseAccessOrCallScope();\n } else if (this.peek.value !== null && this.peek.value !== undefined) {\n var value = this.peek.value;\n this.advance();\n return value instanceof String || typeof value === 'string' ? new LiteralString(value) : new LiteralPrimitive(value);\n } else if (this.index >= this.tokens.length) {\n throw new Error('Unexpected end of expression: ' + this.input);\n } else {\n this.error('Unexpected token ' + this.peek.text);\n }\n };\n\n ParserImplementation.prototype.parseAccessOrCallScope = function parseAccessOrCallScope() {\n var name = this.peek.key;\n\n this.advance();\n\n if (name === '$this') {\n return new AccessThis(0);\n }\n\n var ancestor = 0;\n while (name === '$parent') {\n ancestor++;\n if (this.optional('.')) {\n name = this.peek.key;\n this.advance();\n } else if (this.peek === EOF || this.peek.text === '(' || this.peek.text === ')' || this.peek.text === '[' || this.peek.text === '}' || this.peek.text === ',' || this.peek.text === '|' || this.peek.text === '&') {\n return new AccessThis(ancestor);\n } else {\n this.error('Unexpected token ' + this.peek.text);\n }\n }\n\n if (this.optional('(')) {\n var args = this.parseExpressionList(')');\n this.expect(')');\n return new CallScope(name, args, ancestor);\n }\n\n return new AccessScope(name, ancestor);\n };\n\n ParserImplementation.prototype.parseObject = function parseObject() {\n var keys = [];\n var values = [];\n\n this.expect('{');\n\n if (this.peek.text !== '}') {\n do {\n var peek = this.peek;\n var value = peek.value;\n keys.push(typeof value === 'string' ? value : peek.text);\n\n this.advance();\n if (peek.key && (this.peek.text === ',' || this.peek.text === '}')) {\n --this.index;\n values.push(this.parseAccessOrCallScope());\n } else {\n this.expect(':');\n values.push(this.parseExpression());\n }\n } while (this.optional(','));\n }\n\n this.expect('}');\n\n return new LiteralObject(keys, values);\n };\n\n ParserImplementation.prototype.parseExpressionList = function parseExpressionList(terminator) {\n var result = [];\n\n if (this.peek.text !== terminator) {\n do {\n result.push(this.parseExpression());\n } while (this.optional(','));\n }\n\n return result;\n };\n\n ParserImplementation.prototype.optional = function optional(text) {\n if (this.peek.text === text) {\n this.advance();\n return true;\n }\n\n return false;\n };\n\n ParserImplementation.prototype.expect = function expect(text) {\n if (this.peek.text === text) {\n this.advance();\n } else {\n this.error('Missing expected ' + text);\n }\n };\n\n ParserImplementation.prototype.advance = function advance() {\n this.index++;\n };\n\n ParserImplementation.prototype.error = function error(message) {\n var location = this.index < this.tokens.length ? 'at column ' + (this.tokens[this.index].index + 1) + ' in' : 'at the end of the expression';\n\n throw new Error('Parser Error: ' + message + ' ' + location + ' [' + this.input + ']');\n };\n\n _createClass(ParserImplementation, [{\n key: 'peek',\n get: function get() {\n return this.index < this.tokens.length ? this.tokens[this.index] : EOF;\n }\n }]);\n\n return ParserImplementation;\n}();\n\nvar mapProto = Map.prototype;\n\nfunction _getMapObserver(taskQueue, map) {\n return ModifyMapObserver.for(taskQueue, map);\n}\n\nvar ModifyMapObserver = function (_ModifyCollectionObse2) {\n _inherits(ModifyMapObserver, _ModifyCollectionObse2);\n\n function ModifyMapObserver(taskQueue, map) {\n \n\n return _possibleConstructorReturn(this, _ModifyCollectionObse2.call(this, taskQueue, map));\n }\n\n ModifyMapObserver.for = function _for(taskQueue, map) {\n if (!('__map_observer__' in map)) {\n Reflect.defineProperty(map, '__map_observer__', {\n value: ModifyMapObserver.create(taskQueue, map),\n enumerable: false, configurable: false\n });\n }\n return map.__map_observer__;\n };\n\n ModifyMapObserver.create = function create(taskQueue, map) {\n var observer = new ModifyMapObserver(taskQueue, map);\n\n var proto = mapProto;\n if (proto.set !== map.set || proto.delete !== map.delete || proto.clear !== map.clear) {\n proto = {\n set: map.set,\n delete: map.delete,\n clear: map.clear\n };\n }\n\n map.set = function () {\n var hasValue = map.has(arguments[0]);\n var type = hasValue ? 'update' : 'add';\n var oldValue = map.get(arguments[0]);\n var methodCallResult = proto.set.apply(map, arguments);\n if (!hasValue || oldValue !== map.get(arguments[0])) {\n observer.addChangeRecord({\n type: type,\n object: map,\n key: arguments[0],\n oldValue: oldValue\n });\n }\n return methodCallResult;\n };\n\n map.delete = function () {\n var hasValue = map.has(arguments[0]);\n var oldValue = map.get(arguments[0]);\n var methodCallResult = proto.delete.apply(map, arguments);\n if (hasValue) {\n observer.addChangeRecord({\n type: 'delete',\n object: map,\n key: arguments[0],\n oldValue: oldValue\n });\n }\n return methodCallResult;\n };\n\n map.clear = function () {\n var methodCallResult = proto.clear.apply(map, arguments);\n observer.addChangeRecord({\n type: 'clear',\n object: map\n });\n return methodCallResult;\n };\n\n return observer;\n };\n\n return ModifyMapObserver;\n}(ModifyCollectionObserver);\n\nfunction findOriginalEventTarget(event) {\n return event.path && event.path[0] || event.deepPath && event.deepPath[0] || event.target;\n}\n\nfunction stopPropagation() {\n this.standardStopPropagation();\n this.propagationStopped = true;\n}\n\nfunction handleCapturedEvent(event) {\n event.propagationStopped = false;\n var target = findOriginalEventTarget(event);\n\n var orderedCallbacks = [];\n\n while (target) {\n if (target.capturedCallbacks) {\n var callback = target.capturedCallbacks[event.type];\n if (callback) {\n if (event.stopPropagation !== stopPropagation) {\n event.standardStopPropagation = event.stopPropagation;\n event.stopPropagation = stopPropagation;\n }\n orderedCallbacks.push(callback);\n }\n }\n target = target.parentNode;\n }\n for (var _i22 = orderedCallbacks.length - 1; _i22 >= 0 && !event.propagationStopped; _i22--) {\n var orderedCallback = orderedCallbacks[_i22];\n if ('handleEvent' in orderedCallback) {\n orderedCallback.handleEvent(event);\n } else {\n orderedCallback(event);\n }\n }\n}\n\nvar CapturedHandlerEntry = function () {\n function CapturedHandlerEntry(eventName) {\n \n\n this.eventName = eventName;\n this.count = 0;\n }\n\n CapturedHandlerEntry.prototype.increment = function increment() {\n this.count++;\n\n if (this.count === 1) {\n DOM.addEventListener(this.eventName, handleCapturedEvent, true);\n }\n };\n\n CapturedHandlerEntry.prototype.decrement = function decrement() {\n this.count--;\n\n if (this.count === 0) {\n DOM.removeEventListener(this.eventName, handleCapturedEvent, true);\n }\n };\n\n return CapturedHandlerEntry;\n}();\n\nfunction handleDelegatedEvent(event) {\n event.propagationStopped = false;\n var target = findOriginalEventTarget(event);\n\n while (target && !event.propagationStopped) {\n if (target.delegatedCallbacks) {\n var callback = target.delegatedCallbacks[event.type];\n if (callback) {\n if (event.stopPropagation !== stopPropagation) {\n event.standardStopPropagation = event.stopPropagation;\n event.stopPropagation = stopPropagation;\n }\n if ('handleEvent' in callback) {\n callback.handleEvent(event);\n } else {\n callback(event);\n }\n }\n }\n\n target = target.parentNode;\n }\n}\n\nvar DelegateHandlerEntry = function () {\n function DelegateHandlerEntry(eventName) {\n \n\n this.eventName = eventName;\n this.count = 0;\n }\n\n DelegateHandlerEntry.prototype.increment = function increment() {\n this.count++;\n\n if (this.count === 1) {\n DOM.addEventListener(this.eventName, handleDelegatedEvent, false);\n }\n };\n\n DelegateHandlerEntry.prototype.decrement = function decrement() {\n this.count--;\n\n if (this.count === 0) {\n DOM.removeEventListener(this.eventName, handleDelegatedEvent, false);\n }\n };\n\n return DelegateHandlerEntry;\n}();\n\nvar DelegationEntryHandler = function () {\n function DelegationEntryHandler(entry, lookup, targetEvent) {\n \n\n this.entry = entry;\n this.lookup = lookup;\n this.targetEvent = targetEvent;\n }\n\n DelegationEntryHandler.prototype.dispose = function dispose() {\n this.entry.decrement();\n this.lookup[this.targetEvent] = null;\n this.entry = this.lookup = this.targetEvent = null;\n };\n\n return DelegationEntryHandler;\n}();\n\nvar EventHandler = function () {\n function EventHandler(target, targetEvent, callback) {\n \n\n this.target = target;\n this.targetEvent = targetEvent;\n this.callback = callback;\n }\n\n EventHandler.prototype.dispose = function dispose() {\n this.target.removeEventListener(this.targetEvent, this.callback);\n this.target = this.targetEvent = this.callback = null;\n };\n\n return EventHandler;\n}();\n\nvar DefaultEventStrategy = function () {\n function DefaultEventStrategy() {\n \n\n this.delegatedHandlers = {};\n this.capturedHandlers = {};\n }\n\n DefaultEventStrategy.prototype.subscribe = function subscribe(target, targetEvent, callback, strategy, disposable) {\n var delegatedHandlers = void 0;\n var capturedHandlers = void 0;\n var handlerEntry = void 0;\n\n if (strategy === delegationStrategy.bubbling) {\n delegatedHandlers = this.delegatedHandlers;\n handlerEntry = delegatedHandlers[targetEvent] || (delegatedHandlers[targetEvent] = new DelegateHandlerEntry(targetEvent));\n var delegatedCallbacks = target.delegatedCallbacks || (target.delegatedCallbacks = {});\n\n handlerEntry.increment();\n delegatedCallbacks[targetEvent] = callback;\n\n if (disposable === true) {\n return new DelegationEntryHandler(handlerEntry, delegatedCallbacks, targetEvent);\n }\n\n return function () {\n handlerEntry.decrement();\n delegatedCallbacks[targetEvent] = null;\n };\n }\n if (strategy === delegationStrategy.capturing) {\n capturedHandlers = this.capturedHandlers;\n handlerEntry = capturedHandlers[targetEvent] || (capturedHandlers[targetEvent] = new CapturedHandlerEntry(targetEvent));\n var capturedCallbacks = target.capturedCallbacks || (target.capturedCallbacks = {});\n\n handlerEntry.increment();\n capturedCallbacks[targetEvent] = callback;\n\n if (disposable === true) {\n return new DelegationEntryHandler(handlerEntry, capturedCallbacks, targetEvent);\n }\n\n return function () {\n handlerEntry.decrement();\n capturedCallbacks[targetEvent] = null;\n };\n }\n\n target.addEventListener(targetEvent, callback);\n\n if (disposable === true) {\n return new EventHandler(target, targetEvent, callback);\n }\n\n return function () {\n target.removeEventListener(targetEvent, callback);\n };\n };\n\n return DefaultEventStrategy;\n}();\n\nexport var delegationStrategy = {\n none: 0,\n capturing: 1,\n bubbling: 2\n};\n\nexport var EventManager = function () {\n function EventManager() {\n \n\n this.elementHandlerLookup = {};\n this.eventStrategyLookup = {};\n\n this.registerElementConfig({\n tagName: 'input',\n properties: {\n value: ['change', 'input'],\n checked: ['change', 'input'],\n files: ['change', 'input']\n }\n });\n\n this.registerElementConfig({\n tagName: 'textarea',\n properties: {\n value: ['change', 'input']\n }\n });\n\n this.registerElementConfig({\n tagName: 'select',\n properties: {\n value: ['change']\n }\n });\n\n this.registerElementConfig({\n tagName: 'content editable',\n properties: {\n value: ['change', 'input', 'blur', 'keyup', 'paste']\n }\n });\n\n this.registerElementConfig({\n tagName: 'scrollable element',\n properties: {\n scrollTop: ['scroll'],\n scrollLeft: ['scroll']\n }\n });\n\n this.defaultEventStrategy = new DefaultEventStrategy();\n }\n\n EventManager.prototype.registerElementConfig = function registerElementConfig(config) {\n var tagName = config.tagName.toLowerCase();\n var properties = config.properties;\n var propertyName = void 0;\n\n var lookup = this.elementHandlerLookup[tagName] = {};\n\n for (propertyName in properties) {\n if (properties.hasOwnProperty(propertyName)) {\n lookup[propertyName] = properties[propertyName];\n }\n }\n };\n\n EventManager.prototype.registerEventStrategy = function registerEventStrategy(eventName, strategy) {\n this.eventStrategyLookup[eventName] = strategy;\n };\n\n EventManager.prototype.getElementHandler = function getElementHandler(target, propertyName) {\n var tagName = void 0;\n var lookup = this.elementHandlerLookup;\n\n if (target.tagName) {\n tagName = target.tagName.toLowerCase();\n\n if (lookup[tagName] && lookup[tagName][propertyName]) {\n return new EventSubscriber(lookup[tagName][propertyName]);\n }\n\n if (propertyName === 'textContent' || propertyName === 'innerHTML') {\n return new EventSubscriber(lookup['content editable'].value);\n }\n\n if (propertyName === 'scrollTop' || propertyName === 'scrollLeft') {\n return new EventSubscriber(lookup['scrollable element'][propertyName]);\n }\n }\n\n return null;\n };\n\n EventManager.prototype.addEventListener = function addEventListener(target, targetEvent, callbackOrListener, delegate, disposable) {\n return (this.eventStrategyLookup[targetEvent] || this.defaultEventStrategy).subscribe(target, targetEvent, callbackOrListener, delegate, disposable);\n };\n\n return EventManager;\n}();\n\nexport var EventSubscriber = function () {\n function EventSubscriber(events) {\n \n\n this.events = events;\n this.element = null;\n this.handler = null;\n }\n\n EventSubscriber.prototype.subscribe = function subscribe(element, callbackOrListener) {\n this.element = element;\n this.handler = callbackOrListener;\n\n var events = this.events;\n for (var _i23 = 0, ii = events.length; ii > _i23; ++_i23) {\n element.addEventListener(events[_i23], callbackOrListener);\n }\n };\n\n EventSubscriber.prototype.dispose = function dispose() {\n if (this.element === null) {\n return;\n }\n var element = this.element;\n var callbackOrListener = this.handler;\n var events = this.events;\n for (var _i24 = 0, ii = events.length; ii > _i24; ++_i24) {\n element.removeEventListener(events[_i24], callbackOrListener);\n }\n this.element = this.handler = null;\n };\n\n return EventSubscriber;\n}();\n\nexport var DirtyChecker = function () {\n function DirtyChecker() {\n \n\n this.tracked = [];\n this.checkDelay = 120;\n }\n\n DirtyChecker.prototype.addProperty = function addProperty(property) {\n var tracked = this.tracked;\n\n tracked.push(property);\n\n if (tracked.length === 1) {\n this.scheduleDirtyCheck();\n }\n };\n\n DirtyChecker.prototype.removeProperty = function removeProperty(property) {\n var tracked = this.tracked;\n tracked.splice(tracked.indexOf(property), 1);\n };\n\n DirtyChecker.prototype.scheduleDirtyCheck = function scheduleDirtyCheck() {\n var _this22 = this;\n\n setTimeout(function () {\n return _this22.check();\n }, this.checkDelay);\n };\n\n DirtyChecker.prototype.check = function check() {\n var tracked = this.tracked;\n var i = tracked.length;\n\n while (i--) {\n var current = tracked[i];\n\n if (current.isDirty()) {\n current.call();\n }\n }\n\n if (tracked.length) {\n this.scheduleDirtyCheck();\n }\n };\n\n return DirtyChecker;\n}();\n\nexport var DirtyCheckProperty = (_dec5 = subscriberCollection(), _dec5(_class5 = function () {\n function DirtyCheckProperty(dirtyChecker, obj, propertyName) {\n \n\n this.dirtyChecker = dirtyChecker;\n this.obj = obj;\n this.propertyName = propertyName;\n }\n\n DirtyCheckProperty.prototype.getValue = function getValue() {\n return this.obj[this.propertyName];\n };\n\n DirtyCheckProperty.prototype.setValue = function setValue(newValue) {\n this.obj[this.propertyName] = newValue;\n };\n\n DirtyCheckProperty.prototype.call = function call() {\n var oldValue = this.oldValue;\n var newValue = this.getValue();\n\n this.callSubscribers(newValue, oldValue);\n\n this.oldValue = newValue;\n };\n\n DirtyCheckProperty.prototype.isDirty = function isDirty() {\n return this.oldValue !== this.obj[this.propertyName];\n };\n\n DirtyCheckProperty.prototype.subscribe = function subscribe(context, callable) {\n if (!this.hasSubscribers()) {\n this.oldValue = this.getValue();\n this.dirtyChecker.addProperty(this);\n }\n this.addSubscriber(context, callable);\n };\n\n DirtyCheckProperty.prototype.unsubscribe = function unsubscribe(context, callable) {\n if (this.removeSubscriber(context, callable) && !this.hasSubscribers()) {\n this.dirtyChecker.removeProperty(this);\n }\n };\n\n return DirtyCheckProperty;\n}()) || _class5);\n\nvar logger = LogManager.getLogger('property-observation');\n\nexport var propertyAccessor = {\n getValue: function getValue(obj, propertyName) {\n return obj[propertyName];\n },\n setValue: function setValue(value, obj, propertyName) {\n obj[propertyName] = value;\n }\n};\n\nexport var PrimitiveObserver = function () {\n function PrimitiveObserver(primitive, propertyName) {\n \n\n this.doNotCache = true;\n\n this.primitive = primitive;\n this.propertyName = propertyName;\n }\n\n PrimitiveObserver.prototype.getValue = function getValue() {\n return this.primitive[this.propertyName];\n };\n\n PrimitiveObserver.prototype.setValue = function setValue() {\n var type = _typeof(this.primitive);\n throw new Error('The ' + this.propertyName + ' property of a ' + type + ' (' + this.primitive + ') cannot be assigned.');\n };\n\n PrimitiveObserver.prototype.subscribe = function subscribe() {};\n\n PrimitiveObserver.prototype.unsubscribe = function unsubscribe() {};\n\n return PrimitiveObserver;\n}();\n\nexport var SetterObserver = (_dec6 = subscriberCollection(), _dec6(_class7 = function () {\n function SetterObserver(taskQueue, obj, propertyName) {\n \n\n this.taskQueue = taskQueue;\n this.obj = obj;\n this.propertyName = propertyName;\n this.queued = false;\n this.observing = false;\n }\n\n SetterObserver.prototype.getValue = function getValue() {\n return this.obj[this.propertyName];\n };\n\n SetterObserver.prototype.setValue = function setValue(newValue) {\n this.obj[this.propertyName] = newValue;\n };\n\n SetterObserver.prototype.getterValue = function getterValue() {\n return this.currentValue;\n };\n\n SetterObserver.prototype.setterValue = function setterValue(newValue) {\n var oldValue = this.currentValue;\n\n if (oldValue !== newValue) {\n if (!this.queued) {\n this.oldValue = oldValue;\n this.queued = true;\n this.taskQueue.queueMicroTask(this);\n }\n\n this.currentValue = newValue;\n }\n };\n\n SetterObserver.prototype.call = function call() {\n var oldValue = this.oldValue;\n var newValue = this.currentValue;\n\n this.queued = false;\n\n this.callSubscribers(newValue, oldValue);\n };\n\n SetterObserver.prototype.subscribe = function subscribe(context, callable) {\n if (!this.observing) {\n this.convertProperty();\n }\n this.addSubscriber(context, callable);\n };\n\n SetterObserver.prototype.unsubscribe = function unsubscribe(context, callable) {\n this.removeSubscriber(context, callable);\n };\n\n SetterObserver.prototype.convertProperty = function convertProperty() {\n this.observing = true;\n this.currentValue = this.obj[this.propertyName];\n this.setValue = this.setterValue;\n this.getValue = this.getterValue;\n\n if (!Reflect.defineProperty(this.obj, this.propertyName, {\n configurable: true,\n enumerable: this.propertyName in this.obj ? this.obj.propertyIsEnumerable(this.propertyName) : true,\n get: this.getValue.bind(this),\n set: this.setValue.bind(this)\n })) {\n logger.warn('Cannot observe property \\'' + this.propertyName + '\\' of object', this.obj);\n }\n };\n\n return SetterObserver;\n}()) || _class7);\n\nexport var XLinkAttributeObserver = function () {\n function XLinkAttributeObserver(element, propertyName, attributeName) {\n \n\n this.element = element;\n this.propertyName = propertyName;\n this.attributeName = attributeName;\n }\n\n XLinkAttributeObserver.prototype.getValue = function getValue() {\n return this.element.getAttributeNS('http://www.w3.org/1999/xlink', this.attributeName);\n };\n\n XLinkAttributeObserver.prototype.setValue = function setValue(newValue) {\n return this.element.setAttributeNS('http://www.w3.org/1999/xlink', this.attributeName, newValue);\n };\n\n XLinkAttributeObserver.prototype.subscribe = function subscribe() {\n throw new Error('Observation of a \"' + this.element.nodeName + '\" element\\'s \"' + this.propertyName + '\" property is not supported.');\n };\n\n return XLinkAttributeObserver;\n}();\n\nexport var dataAttributeAccessor = {\n getValue: function getValue(obj, propertyName) {\n return obj.getAttribute(propertyName);\n },\n setValue: function setValue(value, obj, propertyName) {\n if (value === null || value === undefined) {\n obj.removeAttribute(propertyName);\n } else {\n obj.setAttribute(propertyName, value);\n }\n }\n};\n\nexport var DataAttributeObserver = function () {\n function DataAttributeObserver(element, propertyName) {\n \n\n this.element = element;\n this.propertyName = propertyName;\n }\n\n DataAttributeObserver.prototype.getValue = function getValue() {\n return this.element.getAttribute(this.propertyName);\n };\n\n DataAttributeObserver.prototype.setValue = function setValue(newValue) {\n if (newValue === null || newValue === undefined) {\n return this.element.removeAttribute(this.propertyName);\n }\n return this.element.setAttribute(this.propertyName, newValue);\n };\n\n DataAttributeObserver.prototype.subscribe = function subscribe() {\n throw new Error('Observation of a \"' + this.element.nodeName + '\" element\\'s \"' + this.propertyName + '\" property is not supported.');\n };\n\n return DataAttributeObserver;\n}();\n\nexport var StyleObserver = function () {\n function StyleObserver(element, propertyName) {\n \n\n this.element = element;\n this.propertyName = propertyName;\n\n this.styles = null;\n this.version = 0;\n }\n\n StyleObserver.prototype.getValue = function getValue() {\n return this.element.style.cssText;\n };\n\n StyleObserver.prototype._setProperty = function _setProperty(style, value) {\n var priority = '';\n\n if (value !== null && value !== undefined && typeof value.indexOf === 'function' && value.indexOf('!important') !== -1) {\n priority = 'important';\n value = value.replace('!important', '');\n }\n this.element.style.setProperty(style, value, priority);\n };\n\n StyleObserver.prototype.setValue = function setValue(newValue) {\n var styles = this.styles || {};\n var style = void 0;\n var version = this.version;\n\n if (newValue !== null && newValue !== undefined) {\n if (newValue instanceof Object) {\n var value = void 0;\n for (style in newValue) {\n if (newValue.hasOwnProperty(style)) {\n value = newValue[style];\n style = style.replace(/([A-Z])/g, function (m) {\n return '-' + m.toLowerCase();\n });\n styles[style] = version;\n this._setProperty(style, value);\n }\n }\n } else if (newValue.length) {\n var rx = /\\s*([\\w\\-]+)\\s*:\\s*((?:(?:[\\w\\-]+\\(\\s*(?:\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'|[\\w\\-]+\\(\\s*(?:^\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'|[^\\)]*)\\),?|[^\\)]*)\\),?|\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'|[^;]*),?\\s*)+);?/g;\n var pair = void 0;\n while ((pair = rx.exec(newValue)) !== null) {\n style = pair[1];\n if (!style) {\n continue;\n }\n\n styles[style] = version;\n this._setProperty(style, pair[2]);\n }\n }\n }\n\n this.styles = styles;\n this.version += 1;\n\n if (version === 0) {\n return;\n }\n\n version -= 1;\n for (style in styles) {\n if (!styles.hasOwnProperty(style) || styles[style] !== version) {\n continue;\n }\n\n this.element.style.removeProperty(style);\n }\n };\n\n StyleObserver.prototype.subscribe = function subscribe() {\n throw new Error('Observation of a \"' + this.element.nodeName + '\" element\\'s \"' + this.propertyName + '\" property is not supported.');\n };\n\n return StyleObserver;\n}();\n\nexport var ValueAttributeObserver = (_dec7 = subscriberCollection(), _dec7(_class8 = function () {\n function ValueAttributeObserver(element, propertyName, handler) {\n \n\n this.element = element;\n this.propertyName = propertyName;\n this.handler = handler;\n if (propertyName === 'files') {\n this.setValue = function () {};\n }\n }\n\n ValueAttributeObserver.prototype.getValue = function getValue() {\n return this.element[this.propertyName];\n };\n\n ValueAttributeObserver.prototype.setValue = function setValue(newValue) {\n newValue = newValue === undefined || newValue === null ? '' : newValue;\n if (this.element[this.propertyName] !== newValue) {\n this.element[this.propertyName] = newValue;\n this.notify();\n }\n };\n\n ValueAttributeObserver.prototype.notify = function notify() {\n var oldValue = this.oldValue;\n var newValue = this.getValue();\n\n this.callSubscribers(newValue, oldValue);\n\n this.oldValue = newValue;\n };\n\n ValueAttributeObserver.prototype.handleEvent = function handleEvent() {\n this.notify();\n };\n\n ValueAttributeObserver.prototype.subscribe = function subscribe(context, callable) {\n if (!this.hasSubscribers()) {\n this.oldValue = this.getValue();\n this.handler.subscribe(this.element, this);\n }\n\n this.addSubscriber(context, callable);\n };\n\n ValueAttributeObserver.prototype.unsubscribe = function unsubscribe(context, callable) {\n if (this.removeSubscriber(context, callable) && !this.hasSubscribers()) {\n this.handler.dispose();\n }\n };\n\n return ValueAttributeObserver;\n}()) || _class8);\n\nvar checkedArrayContext = 'CheckedObserver:array';\nvar checkedValueContext = 'CheckedObserver:value';\n\nexport var CheckedObserver = (_dec8 = subscriberCollection(), _dec8(_class9 = function () {\n function CheckedObserver(element, handler, observerLocator) {\n \n\n this.element = element;\n this.handler = handler;\n this.observerLocator = observerLocator;\n }\n\n CheckedObserver.prototype.getValue = function getValue() {\n return this.value;\n };\n\n CheckedObserver.prototype.setValue = function setValue(newValue) {\n if (this.initialSync && this.value === newValue) {\n return;\n }\n\n if (this.arrayObserver) {\n this.arrayObserver.unsubscribe(checkedArrayContext, this);\n this.arrayObserver = null;\n }\n\n if (this.element.type === 'checkbox' && Array.isArray(newValue)) {\n this.arrayObserver = this.observerLocator.getArrayObserver(newValue);\n this.arrayObserver.subscribe(checkedArrayContext, this);\n }\n\n this.oldValue = this.value;\n this.value = newValue;\n this.synchronizeElement();\n this.notify();\n\n if (!this.initialSync) {\n this.initialSync = true;\n this.observerLocator.taskQueue.queueMicroTask(this);\n }\n };\n\n CheckedObserver.prototype.call = function call(context, splices) {\n this.synchronizeElement();\n\n if (!this.valueObserver) {\n this.valueObserver = this.element.__observers__.model || this.element.__observers__.value;\n if (this.valueObserver) {\n this.valueObserver.subscribe(checkedValueContext, this);\n }\n }\n };\n\n CheckedObserver.prototype.synchronizeElement = function synchronizeElement() {\n var value = this.value;\n var element = this.element;\n var elementValue = element.hasOwnProperty('model') ? element.model : element.value;\n var isRadio = element.type === 'radio';\n var matcher = element.matcher || function (a, b) {\n return a === b;\n };\n\n element.checked = isRadio && !!matcher(value, elementValue) || !isRadio && value === true || !isRadio && Array.isArray(value) && value.findIndex(function (item) {\n return !!matcher(item, elementValue);\n }) !== -1;\n };\n\n CheckedObserver.prototype.synchronizeValue = function synchronizeValue() {\n var value = this.value;\n var element = this.element;\n var elementValue = element.hasOwnProperty('model') ? element.model : element.value;\n var index = void 0;\n var matcher = element.matcher || function (a, b) {\n return a === b;\n };\n\n if (element.type === 'checkbox') {\n if (Array.isArray(value)) {\n index = value.findIndex(function (item) {\n return !!matcher(item, elementValue);\n });\n if (element.checked && index === -1) {\n value.push(elementValue);\n } else if (!element.checked && index !== -1) {\n value.splice(index, 1);\n }\n\n return;\n }\n\n value = element.checked;\n } else if (element.checked) {\n value = elementValue;\n } else {\n return;\n }\n\n this.oldValue = this.value;\n this.value = value;\n this.notify();\n };\n\n CheckedObserver.prototype.notify = function notify() {\n var oldValue = this.oldValue;\n var newValue = this.value;\n\n if (newValue === oldValue) {\n return;\n }\n\n this.callSubscribers(newValue, oldValue);\n };\n\n CheckedObserver.prototype.handleEvent = function handleEvent() {\n this.synchronizeValue();\n };\n\n CheckedObserver.prototype.subscribe = function subscribe(context, callable) {\n if (!this.hasSubscribers()) {\n this.handler.subscribe(this.element, this);\n }\n this.addSubscriber(context, callable);\n };\n\n CheckedObserver.prototype.unsubscribe = function unsubscribe(context, callable) {\n if (this.removeSubscriber(context, callable) && !this.hasSubscribers()) {\n this.handler.dispose();\n }\n };\n\n CheckedObserver.prototype.unbind = function unbind() {\n if (this.arrayObserver) {\n this.arrayObserver.unsubscribe(checkedArrayContext, this);\n this.arrayObserver = null;\n }\n if (this.valueObserver) {\n this.valueObserver.unsubscribe(checkedValueContext, this);\n }\n };\n\n return CheckedObserver;\n}()) || _class9);\n\nvar selectArrayContext = 'SelectValueObserver:array';\n\nexport var SelectValueObserver = (_dec9 = subscriberCollection(), _dec9(_class10 = function () {\n function SelectValueObserver(element, handler, observerLocator) {\n \n\n this.element = element;\n this.handler = handler;\n this.observerLocator = observerLocator;\n }\n\n SelectValueObserver.prototype.getValue = function getValue() {\n return this.value;\n };\n\n SelectValueObserver.prototype.setValue = function setValue(newValue) {\n if (newValue !== null && newValue !== undefined && this.element.multiple && !Array.isArray(newValue)) {\n throw new Error('Only null or Array instances can be bound to a multi-select.');\n }\n if (this.value === newValue) {\n return;\n }\n\n if (this.arrayObserver) {\n this.arrayObserver.unsubscribe(selectArrayContext, this);\n this.arrayObserver = null;\n }\n\n if (Array.isArray(newValue)) {\n this.arrayObserver = this.observerLocator.getArrayObserver(newValue);\n this.arrayObserver.subscribe(selectArrayContext, this);\n }\n\n this.oldValue = this.value;\n this.value = newValue;\n this.synchronizeOptions();\n this.notify();\n\n if (!this.initialSync) {\n this.initialSync = true;\n this.observerLocator.taskQueue.queueMicroTask(this);\n }\n };\n\n SelectValueObserver.prototype.call = function call(context, splices) {\n this.synchronizeOptions();\n };\n\n SelectValueObserver.prototype.synchronizeOptions = function synchronizeOptions() {\n var value = this.value;\n var isArray = void 0;\n\n if (Array.isArray(value)) {\n isArray = true;\n }\n\n var options = this.element.options;\n var i = options.length;\n var matcher = this.element.matcher || function (a, b) {\n return a === b;\n };\n\n var _loop = function _loop() {\n var option = options.item(i);\n var optionValue = option.hasOwnProperty('model') ? option.model : option.value;\n if (isArray) {\n option.selected = value.findIndex(function (item) {\n return !!matcher(optionValue, item);\n }) !== -1;\n return 'continue';\n }\n option.selected = !!matcher(optionValue, value);\n };\n\n while (i--) {\n var _ret = _loop();\n\n if (_ret === 'continue') continue;\n }\n };\n\n SelectValueObserver.prototype.synchronizeValue = function synchronizeValue() {\n var _this23 = this;\n\n var options = this.element.options;\n var count = 0;\n var value = [];\n\n for (var _i25 = 0, ii = options.length; _i25 < ii; _i25++) {\n var _option = options.item(_i25);\n if (!_option.selected) {\n continue;\n }\n value.push(_option.hasOwnProperty('model') ? _option.model : _option.value);\n count++;\n }\n\n if (this.element.multiple) {\n if (Array.isArray(this.value)) {\n var _ret2 = function () {\n var matcher = _this23.element.matcher || function (a, b) {\n return a === b;\n };\n\n var i = 0;\n\n var _loop2 = function _loop2() {\n var a = _this23.value[i];\n if (value.findIndex(function (b) {\n return matcher(a, b);\n }) === -1) {\n _this23.value.splice(i, 1);\n } else {\n i++;\n }\n };\n\n while (i < _this23.value.length) {\n _loop2();\n }\n\n i = 0;\n\n var _loop3 = function _loop3() {\n var a = value[i];\n if (_this23.value.findIndex(function (b) {\n return matcher(a, b);\n }) === -1) {\n _this23.value.push(a);\n }\n i++;\n };\n\n while (i < value.length) {\n _loop3();\n }\n return {\n v: void 0\n };\n }();\n\n if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === \"object\") return _ret2.v;\n }\n } else {\n if (count === 0) {\n value = null;\n } else {\n value = value[0];\n }\n }\n\n if (value !== this.value) {\n this.oldValue = this.value;\n this.value = value;\n this.notify();\n }\n };\n\n SelectValueObserver.prototype.notify = function notify() {\n var oldValue = this.oldValue;\n var newValue = this.value;\n\n this.callSubscribers(newValue, oldValue);\n };\n\n SelectValueObserver.prototype.handleEvent = function handleEvent() {\n this.synchronizeValue();\n };\n\n SelectValueObserver.prototype.subscribe = function subscribe(context, callable) {\n if (!this.hasSubscribers()) {\n this.handler.subscribe(this.element, this);\n }\n this.addSubscriber(context, callable);\n };\n\n SelectValueObserver.prototype.unsubscribe = function unsubscribe(context, callable) {\n if (this.removeSubscriber(context, callable) && !this.hasSubscribers()) {\n this.handler.dispose();\n }\n };\n\n SelectValueObserver.prototype.bind = function bind() {\n var _this24 = this;\n\n this.domObserver = DOM.createMutationObserver(function () {\n _this24.synchronizeOptions();\n _this24.synchronizeValue();\n });\n this.domObserver.observe(this.element, { childList: true, subtree: true });\n };\n\n SelectValueObserver.prototype.unbind = function unbind() {\n this.domObserver.disconnect();\n this.domObserver = null;\n\n if (this.arrayObserver) {\n this.arrayObserver.unsubscribe(selectArrayContext, this);\n this.arrayObserver = null;\n }\n };\n\n return SelectValueObserver;\n}()) || _class10);\n\nexport var ClassObserver = function () {\n function ClassObserver(element) {\n \n\n this.element = element;\n this.doNotCache = true;\n this.value = '';\n this.version = 0;\n }\n\n ClassObserver.prototype.getValue = function getValue() {\n return this.value;\n };\n\n ClassObserver.prototype.setValue = function setValue(newValue) {\n var nameIndex = this.nameIndex || {};\n var version = this.version;\n var names = void 0;\n var name = void 0;\n\n if (newValue !== null && newValue !== undefined && newValue.length) {\n names = newValue.split(/\\s+/);\n for (var _i26 = 0, length = names.length; _i26 < length; _i26++) {\n name = names[_i26];\n if (name === '') {\n continue;\n }\n nameIndex[name] = version;\n this.element.classList.add(name);\n }\n }\n\n this.value = newValue;\n this.nameIndex = nameIndex;\n this.version += 1;\n\n if (version === 0) {\n return;\n }\n\n version -= 1;\n for (name in nameIndex) {\n if (!nameIndex.hasOwnProperty(name) || nameIndex[name] !== version) {\n continue;\n }\n this.element.classList.remove(name);\n }\n };\n\n ClassObserver.prototype.subscribe = function subscribe() {\n throw new Error('Observation of a \"' + this.element.nodeName + '\" element\\'s \"class\" property is not supported.');\n };\n\n return ClassObserver;\n}();\n\nexport function hasDeclaredDependencies(descriptor) {\n return !!(descriptor && descriptor.get && descriptor.get.dependencies);\n}\n\nexport function declarePropertyDependencies(ctor, propertyName, dependencies) {\n var descriptor = Object.getOwnPropertyDescriptor(ctor.prototype, propertyName);\n descriptor.get.dependencies = dependencies;\n}\n\nexport function computedFrom() {\n for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {\n rest[_key] = arguments[_key];\n }\n\n return function (target, key, descriptor) {\n descriptor.get.dependencies = rest;\n return descriptor;\n };\n}\n\nexport var ComputedExpression = function (_Expression19) {\n _inherits(ComputedExpression, _Expression19);\n\n function ComputedExpression(name, dependencies) {\n \n\n var _this25 = _possibleConstructorReturn(this, _Expression19.call(this));\n\n _this25.name = name;\n _this25.dependencies = dependencies;\n _this25.isAssignable = true;\n return _this25;\n }\n\n ComputedExpression.prototype.evaluate = function evaluate(scope, lookupFunctions) {\n return scope.bindingContext[this.name];\n };\n\n ComputedExpression.prototype.assign = function assign(scope, value) {\n scope.bindingContext[this.name] = value;\n };\n\n ComputedExpression.prototype.accept = function accept(visitor) {\n throw new Error('not implemented');\n };\n\n ComputedExpression.prototype.connect = function connect(binding, scope) {\n var dependencies = this.dependencies;\n var i = dependencies.length;\n while (i--) {\n dependencies[i].connect(binding, scope);\n }\n };\n\n return ComputedExpression;\n}(Expression);\n\nexport function createComputedObserver(obj, propertyName, descriptor, observerLocator) {\n var dependencies = descriptor.get.dependencies;\n if (!(dependencies instanceof ComputedExpression)) {\n var _i27 = dependencies.length;\n while (_i27--) {\n dependencies[_i27] = observerLocator.parser.parse(dependencies[_i27]);\n }\n dependencies = descriptor.get.dependencies = new ComputedExpression(propertyName, dependencies);\n }\n\n var scope = { bindingContext: obj, overrideContext: createOverrideContext(obj) };\n return new ExpressionObserver(scope, dependencies, observerLocator);\n}\n\nvar svgElements = void 0;\nvar svgPresentationElements = void 0;\nvar svgPresentationAttributes = void 0;\nvar svgAnalyzer = void 0;\n\nif (typeof FEATURE_NO_SVG === 'undefined') {\n svgElements = {\n a: ['class', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'target', 'transform', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n altGlyph: ['class', 'dx', 'dy', 'externalResourcesRequired', 'format', 'glyphRef', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'rotate', 'style', 'systemLanguage', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n altGlyphDef: ['id', 'xml:base', 'xml:lang', 'xml:space'],\n altGlyphItem: ['id', 'xml:base', 'xml:lang', 'xml:space'],\n animate: ['accumulate', 'additive', 'attributeName', 'attributeType', 'begin', 'by', 'calcMode', 'dur', 'end', 'externalResourcesRequired', 'fill', 'from', 'id', 'keySplines', 'keyTimes', 'max', 'min', 'onbegin', 'onend', 'onload', 'onrepeat', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'restart', 'systemLanguage', 'to', 'values', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n animateColor: ['accumulate', 'additive', 'attributeName', 'attributeType', 'begin', 'by', 'calcMode', 'dur', 'end', 'externalResourcesRequired', 'fill', 'from', 'id', 'keySplines', 'keyTimes', 'max', 'min', 'onbegin', 'onend', 'onload', 'onrepeat', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'restart', 'systemLanguage', 'to', 'values', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n animateMotion: ['accumulate', 'additive', 'begin', 'by', 'calcMode', 'dur', 'end', 'externalResourcesRequired', 'fill', 'from', 'id', 'keyPoints', 'keySplines', 'keyTimes', 'max', 'min', 'onbegin', 'onend', 'onload', 'onrepeat', 'origin', 'path', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'restart', 'rotate', 'systemLanguage', 'to', 'values', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n animateTransform: ['accumulate', 'additive', 'attributeName', 'attributeType', 'begin', 'by', 'calcMode', 'dur', 'end', 'externalResourcesRequired', 'fill', 'from', 'id', 'keySplines', 'keyTimes', 'max', 'min', 'onbegin', 'onend', 'onload', 'onrepeat', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'restart', 'systemLanguage', 'to', 'type', 'values', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n circle: ['class', 'cx', 'cy', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'r', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'xml:base', 'xml:lang', 'xml:space'],\n clipPath: ['class', 'clipPathUnits', 'externalResourcesRequired', 'id', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'xml:base', 'xml:lang', 'xml:space'],\n 'color-profile': ['id', 'local', 'name', 'rendering-intent', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n cursor: ['externalResourcesRequired', 'id', 'requiredExtensions', 'requiredFeatures', 'systemLanguage', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n defs: ['class', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'xml:base', 'xml:lang', 'xml:space'],\n desc: ['class', 'id', 'style', 'xml:base', 'xml:lang', 'xml:space'],\n ellipse: ['class', 'cx', 'cy', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'rx', 'ry', 'style', 'systemLanguage', 'transform', 'xml:base', 'xml:lang', 'xml:space'],\n feBlend: ['class', 'height', 'id', 'in', 'in2', 'mode', 'result', 'style', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feColorMatrix: ['class', 'height', 'id', 'in', 'result', 'style', 'type', 'values', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feComponentTransfer: ['class', 'height', 'id', 'in', 'result', 'style', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feComposite: ['class', 'height', 'id', 'in', 'in2', 'k1', 'k2', 'k3', 'k4', 'operator', 'result', 'style', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feConvolveMatrix: ['bias', 'class', 'divisor', 'edgeMode', 'height', 'id', 'in', 'kernelMatrix', 'kernelUnitLength', 'order', 'preserveAlpha', 'result', 'style', 'targetX', 'targetY', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feDiffuseLighting: ['class', 'diffuseConstant', 'height', 'id', 'in', 'kernelUnitLength', 'result', 'style', 'surfaceScale', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feDisplacementMap: ['class', 'height', 'id', 'in', 'in2', 'result', 'scale', 'style', 'width', 'x', 'xChannelSelector', 'xml:base', 'xml:lang', 'xml:space', 'y', 'yChannelSelector'],\n feDistantLight: ['azimuth', 'elevation', 'id', 'xml:base', 'xml:lang', 'xml:space'],\n feFlood: ['class', 'height', 'id', 'result', 'style', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feFuncA: ['amplitude', 'exponent', 'id', 'intercept', 'offset', 'slope', 'tableValues', 'type', 'xml:base', 'xml:lang', 'xml:space'],\n feFuncB: ['amplitude', 'exponent', 'id', 'intercept', 'offset', 'slope', 'tableValues', 'type', 'xml:base', 'xml:lang', 'xml:space'],\n feFuncG: ['amplitude', 'exponent', 'id', 'intercept', 'offset', 'slope', 'tableValues', 'type', 'xml:base', 'xml:lang', 'xml:space'],\n feFuncR: ['amplitude', 'exponent', 'id', 'intercept', 'offset', 'slope', 'tableValues', 'type', 'xml:base', 'xml:lang', 'xml:space'],\n feGaussianBlur: ['class', 'height', 'id', 'in', 'result', 'stdDeviation', 'style', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feImage: ['class', 'externalResourcesRequired', 'height', 'id', 'preserveAspectRatio', 'result', 'style', 'width', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feMerge: ['class', 'height', 'id', 'result', 'style', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feMergeNode: ['id', 'xml:base', 'xml:lang', 'xml:space'],\n feMorphology: ['class', 'height', 'id', 'in', 'operator', 'radius', 'result', 'style', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feOffset: ['class', 'dx', 'dy', 'height', 'id', 'in', 'result', 'style', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n fePointLight: ['id', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y', 'z'],\n feSpecularLighting: ['class', 'height', 'id', 'in', 'kernelUnitLength', 'result', 'specularConstant', 'specularExponent', 'style', 'surfaceScale', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feSpotLight: ['id', 'limitingConeAngle', 'pointsAtX', 'pointsAtY', 'pointsAtZ', 'specularExponent', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y', 'z'],\n feTile: ['class', 'height', 'id', 'in', 'result', 'style', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n feTurbulence: ['baseFrequency', 'class', 'height', 'id', 'numOctaves', 'result', 'seed', 'stitchTiles', 'style', 'type', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n filter: ['class', 'externalResourcesRequired', 'filterRes', 'filterUnits', 'height', 'id', 'primitiveUnits', 'style', 'width', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n font: ['class', 'externalResourcesRequired', 'horiz-adv-x', 'horiz-origin-x', 'horiz-origin-y', 'id', 'style', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'xml:base', 'xml:lang', 'xml:space'],\n 'font-face': ['accent-height', 'alphabetic', 'ascent', 'bbox', 'cap-height', 'descent', 'font-family', 'font-size', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'hanging', 'id', 'ideographic', 'mathematical', 'overline-position', 'overline-thickness', 'panose-1', 'slope', 'stemh', 'stemv', 'strikethrough-position', 'strikethrough-thickness', 'underline-position', 'underline-thickness', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'widths', 'x-height', 'xml:base', 'xml:lang', 'xml:space'],\n 'font-face-format': ['id', 'string', 'xml:base', 'xml:lang', 'xml:space'],\n 'font-face-name': ['id', 'name', 'xml:base', 'xml:lang', 'xml:space'],\n 'font-face-src': ['id', 'xml:base', 'xml:lang', 'xml:space'],\n 'font-face-uri': ['id', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n foreignObject: ['class', 'externalResourcesRequired', 'height', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n g: ['class', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'xml:base', 'xml:lang', 'xml:space'],\n glyph: ['arabic-form', 'class', 'd', 'glyph-name', 'horiz-adv-x', 'id', 'lang', 'orientation', 'style', 'unicode', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'xml:base', 'xml:lang', 'xml:space'],\n glyphRef: ['class', 'dx', 'dy', 'format', 'glyphRef', 'id', 'style', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n hkern: ['g1', 'g2', 'id', 'k', 'u1', 'u2', 'xml:base', 'xml:lang', 'xml:space'],\n image: ['class', 'externalResourcesRequired', 'height', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'preserveAspectRatio', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'width', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n line: ['class', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'x1', 'x2', 'xml:base', 'xml:lang', 'xml:space', 'y1', 'y2'],\n linearGradient: ['class', 'externalResourcesRequired', 'gradientTransform', 'gradientUnits', 'id', 'spreadMethod', 'style', 'x1', 'x2', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y1', 'y2'],\n marker: ['class', 'externalResourcesRequired', 'id', 'markerHeight', 'markerUnits', 'markerWidth', 'orient', 'preserveAspectRatio', 'refX', 'refY', 'style', 'viewBox', 'xml:base', 'xml:lang', 'xml:space'],\n mask: ['class', 'externalResourcesRequired', 'height', 'id', 'maskContentUnits', 'maskUnits', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n metadata: ['id', 'xml:base', 'xml:lang', 'xml:space'],\n 'missing-glyph': ['class', 'd', 'horiz-adv-x', 'id', 'style', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'xml:base', 'xml:lang', 'xml:space'],\n mpath: ['externalResourcesRequired', 'id', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n path: ['class', 'd', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'pathLength', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'xml:base', 'xml:lang', 'xml:space'],\n pattern: ['class', 'externalResourcesRequired', 'height', 'id', 'patternContentUnits', 'patternTransform', 'patternUnits', 'preserveAspectRatio', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'viewBox', 'width', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n polygon: ['class', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'points', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'xml:base', 'xml:lang', 'xml:space'],\n polyline: ['class', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'points', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'xml:base', 'xml:lang', 'xml:space'],\n radialGradient: ['class', 'cx', 'cy', 'externalResourcesRequired', 'fx', 'fy', 'gradientTransform', 'gradientUnits', 'id', 'r', 'spreadMethod', 'style', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n rect: ['class', 'externalResourcesRequired', 'height', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'rx', 'ry', 'style', 'systemLanguage', 'transform', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n script: ['externalResourcesRequired', 'id', 'type', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n set: ['attributeName', 'attributeType', 'begin', 'dur', 'end', 'externalResourcesRequired', 'fill', 'id', 'max', 'min', 'onbegin', 'onend', 'onload', 'onrepeat', 'repeatCount', 'repeatDur', 'requiredExtensions', 'requiredFeatures', 'restart', 'systemLanguage', 'to', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n stop: ['class', 'id', 'offset', 'style', 'xml:base', 'xml:lang', 'xml:space'],\n style: ['id', 'media', 'title', 'type', 'xml:base', 'xml:lang', 'xml:space'],\n svg: ['baseProfile', 'class', 'contentScriptType', 'contentStyleType', 'externalResourcesRequired', 'height', 'id', 'onabort', 'onactivate', 'onclick', 'onerror', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onresize', 'onscroll', 'onunload', 'onzoom', 'preserveAspectRatio', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'version', 'viewBox', 'width', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y', 'zoomAndPan'],\n switch: ['class', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'xml:base', 'xml:lang', 'xml:space'],\n symbol: ['class', 'externalResourcesRequired', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'preserveAspectRatio', 'style', 'viewBox', 'xml:base', 'xml:lang', 'xml:space'],\n text: ['class', 'dx', 'dy', 'externalResourcesRequired', 'id', 'lengthAdjust', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'rotate', 'style', 'systemLanguage', 'textLength', 'transform', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n textPath: ['class', 'externalResourcesRequired', 'id', 'lengthAdjust', 'method', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'spacing', 'startOffset', 'style', 'systemLanguage', 'textLength', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space'],\n title: ['class', 'id', 'style', 'xml:base', 'xml:lang', 'xml:space'],\n tref: ['class', 'dx', 'dy', 'externalResourcesRequired', 'id', 'lengthAdjust', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'rotate', 'style', 'systemLanguage', 'textLength', 'x', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n tspan: ['class', 'dx', 'dy', 'externalResourcesRequired', 'id', 'lengthAdjust', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'rotate', 'style', 'systemLanguage', 'textLength', 'x', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n use: ['class', 'externalResourcesRequired', 'height', 'id', 'onactivate', 'onclick', 'onfocusin', 'onfocusout', 'onload', 'onmousedown', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'requiredExtensions', 'requiredFeatures', 'style', 'systemLanguage', 'transform', 'width', 'x', 'xlink:actuate', 'xlink:arcrole', 'xlink:href', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type', 'xml:base', 'xml:lang', 'xml:space', 'y'],\n view: ['externalResourcesRequired', 'id', 'preserveAspectRatio', 'viewBox', 'viewTarget', 'xml:base', 'xml:lang', 'xml:space', 'zoomAndPan'],\n vkern: ['g1', 'g2', 'id', 'k', 'u1', 'u2', 'xml:base', 'xml:lang', 'xml:space']\n };\n\n\n svgPresentationElements = {\n 'a': true,\n 'altGlyph': true,\n 'animate': true,\n 'animateColor': true,\n 'circle': true,\n 'clipPath': true,\n 'defs': true,\n 'ellipse': true,\n 'feBlend': true,\n 'feColorMatrix': true,\n 'feComponentTransfer': true,\n 'feComposite': true,\n 'feConvolveMatrix': true,\n 'feDiffuseLighting': true,\n 'feDisplacementMap': true,\n 'feFlood': true,\n 'feGaussianBlur': true,\n 'feImage': true,\n 'feMerge': true,\n 'feMorphology': true,\n 'feOffset': true,\n 'feSpecularLighting': true,\n 'feTile': true,\n 'feTurbulence': true,\n 'filter': true,\n 'font': true,\n 'foreignObject': true,\n 'g': true,\n 'glyph': true,\n 'glyphRef': true,\n 'image': true,\n 'line': true,\n 'linearGradient': true,\n 'marker': true,\n 'mask': true,\n 'missing-glyph': true,\n 'path': true,\n 'pattern': true,\n 'polygon': true,\n 'polyline': true,\n 'radialGradient': true,\n 'rect': true,\n 'stop': true,\n 'svg': true,\n 'switch': true,\n 'symbol': true,\n 'text': true,\n 'textPath': true,\n 'tref': true,\n 'tspan': true,\n 'use': true\n };\n\n svgPresentationAttributes = {\n 'alignment-baseline': true,\n 'baseline-shift': true,\n 'clip-path': true,\n 'clip-rule': true,\n 'clip': true,\n 'color-interpolation-filters': true,\n 'color-interpolation': true,\n 'color-profile': true,\n 'color-rendering': true,\n 'color': true,\n 'cursor': true,\n 'direction': true,\n 'display': true,\n 'dominant-baseline': true,\n 'enable-background': true,\n 'fill-opacity': true,\n 'fill-rule': true,\n 'fill': true,\n 'filter': true,\n 'flood-color': true,\n 'flood-opacity': true,\n 'font-family': true,\n 'font-size-adjust': true,\n 'font-size': true,\n 'font-stretch': true,\n 'font-style': true,\n 'font-variant': true,\n 'font-weight': true,\n 'glyph-orientation-horizontal': true,\n 'glyph-orientation-vertical': true,\n 'image-rendering': true,\n 'kerning': true,\n 'letter-spacing': true,\n 'lighting-color': true,\n 'marker-end': true,\n 'marker-mid': true,\n 'marker-start': true,\n 'mask': true,\n 'opacity': true,\n 'overflow': true,\n 'pointer-events': true,\n 'shape-rendering': true,\n 'stop-color': true,\n 'stop-opacity': true,\n 'stroke-dasharray': true,\n 'stroke-dashoffset': true,\n 'stroke-linecap': true,\n 'stroke-linejoin': true,\n 'stroke-miterlimit': true,\n 'stroke-opacity': true,\n 'stroke-width': true,\n 'stroke': true,\n 'text-anchor': true,\n 'text-decoration': true,\n 'text-rendering': true,\n 'unicode-bidi': true,\n 'visibility': true,\n 'word-spacing': true,\n 'writing-mode': true\n };\n\n var createElement = function createElement(html) {\n var div = DOM.createElement('div');\n div.innerHTML = html;\n return div.firstChild;\n };\n\n svgAnalyzer = function () {\n function SVGAnalyzer() {\n \n\n if (createElement('').firstElementChild.nodeName === 'altglyph' && elements.altGlyph) {\n elements.altglyph = elements.altGlyph;\n delete elements.altGlyph;\n elements.altglyphdef = elements.altGlyphDef;\n delete elements.altGlyphDef;\n elements.altglyphitem = elements.altGlyphItem;\n delete elements.altGlyphItem;\n elements.glyphref = elements.glyphRef;\n delete elements.glyphRef;\n }\n }\n\n SVGAnalyzer.prototype.isStandardSvgAttribute = function isStandardSvgAttribute(nodeName, attributeName) {\n return presentationElements[nodeName] && presentationAttributes[attributeName] || elements[nodeName] && elements[nodeName].indexOf(attributeName) !== -1;\n };\n\n return SVGAnalyzer;\n }();\n}\n\nexport var elements = svgElements;\nexport var presentationElements = svgPresentationElements;\nexport var presentationAttributes = svgPresentationAttributes;\nexport var SVGAnalyzer = svgAnalyzer || function () {\n function _class11() {\n \n }\n\n _class11.prototype.isStandardSvgAttribute = function isStandardSvgAttribute() {\n return false;\n };\n\n return _class11;\n}();\n\nexport var ObserverLocator = (_temp = _class12 = function () {\n function ObserverLocator(taskQueue, eventManager, dirtyChecker, svgAnalyzer, parser) {\n \n\n this.taskQueue = taskQueue;\n this.eventManager = eventManager;\n this.dirtyChecker = dirtyChecker;\n this.svgAnalyzer = svgAnalyzer;\n this.parser = parser;\n\n this.adapters = [];\n this.logger = LogManager.getLogger('observer-locator');\n }\n\n ObserverLocator.prototype.getObserver = function getObserver(obj, propertyName) {\n var observersLookup = obj.__observers__;\n var observer = void 0;\n\n if (observersLookup && propertyName in observersLookup) {\n return observersLookup[propertyName];\n }\n\n observer = this.createPropertyObserver(obj, propertyName);\n\n if (!observer.doNotCache) {\n if (observersLookup === undefined) {\n observersLookup = this.getOrCreateObserversLookup(obj);\n }\n\n observersLookup[propertyName] = observer;\n }\n\n return observer;\n };\n\n ObserverLocator.prototype.getOrCreateObserversLookup = function getOrCreateObserversLookup(obj) {\n return obj.__observers__ || this.createObserversLookup(obj);\n };\n\n ObserverLocator.prototype.createObserversLookup = function createObserversLookup(obj) {\n var value = {};\n\n if (!Reflect.defineProperty(obj, '__observers__', {\n enumerable: false,\n configurable: false,\n writable: false,\n value: value\n })) {\n this.logger.warn('Cannot add observers to object', obj);\n }\n\n return value;\n };\n\n ObserverLocator.prototype.addAdapter = function addAdapter(adapter) {\n this.adapters.push(adapter);\n };\n\n ObserverLocator.prototype.getAdapterObserver = function getAdapterObserver(obj, propertyName, descriptor) {\n for (var _i28 = 0, ii = this.adapters.length; _i28 < ii; _i28++) {\n var adapter = this.adapters[_i28];\n var observer = adapter.getObserver(obj, propertyName, descriptor);\n if (observer) {\n return observer;\n }\n }\n return null;\n };\n\n ObserverLocator.prototype.createPropertyObserver = function createPropertyObserver(obj, propertyName) {\n var descriptor = void 0;\n var handler = void 0;\n var xlinkResult = void 0;\n\n if (!(obj instanceof Object)) {\n return new PrimitiveObserver(obj, propertyName);\n }\n\n if (obj instanceof DOM.Element) {\n if (propertyName === 'class') {\n return new ClassObserver(obj);\n }\n if (propertyName === 'style' || propertyName === 'css') {\n return new StyleObserver(obj, propertyName);\n }\n handler = this.eventManager.getElementHandler(obj, propertyName);\n if (propertyName === 'value' && obj.tagName.toLowerCase() === 'select') {\n return new SelectValueObserver(obj, handler, this);\n }\n if (propertyName === 'checked' && obj.tagName.toLowerCase() === 'input') {\n return new CheckedObserver(obj, handler, this);\n }\n if (handler) {\n return new ValueAttributeObserver(obj, propertyName, handler);\n }\n xlinkResult = /^xlink:(.+)$/.exec(propertyName);\n if (xlinkResult) {\n return new XLinkAttributeObserver(obj, propertyName, xlinkResult[1]);\n }\n if (propertyName === 'role' && (obj instanceof DOM.Element || obj instanceof DOM.SVGElement) || /^\\w+:|^data-|^aria-/.test(propertyName) || obj instanceof DOM.SVGElement && this.svgAnalyzer.isStandardSvgAttribute(obj.nodeName, propertyName)) {\n return new DataAttributeObserver(obj, propertyName);\n }\n }\n\n descriptor = Object.getPropertyDescriptor(obj, propertyName);\n\n if (hasDeclaredDependencies(descriptor)) {\n return createComputedObserver(obj, propertyName, descriptor, this);\n }\n\n if (descriptor) {\n var existingGetterOrSetter = descriptor.get || descriptor.set;\n if (existingGetterOrSetter) {\n if (existingGetterOrSetter.getObserver) {\n return existingGetterOrSetter.getObserver(obj);\n }\n\n var adapterObserver = this.getAdapterObserver(obj, propertyName, descriptor);\n if (adapterObserver) {\n return adapterObserver;\n }\n return new DirtyCheckProperty(this.dirtyChecker, obj, propertyName);\n }\n }\n\n if (obj instanceof Array) {\n if (propertyName === 'length') {\n return this.getArrayObserver(obj).getLengthObserver();\n }\n\n return new DirtyCheckProperty(this.dirtyChecker, obj, propertyName);\n } else if (obj instanceof Map) {\n if (propertyName === 'size') {\n return this.getMapObserver(obj).getLengthObserver();\n }\n\n return new DirtyCheckProperty(this.dirtyChecker, obj, propertyName);\n } else if (obj instanceof Set) {\n if (propertyName === 'size') {\n return this.getSetObserver(obj).getLengthObserver();\n }\n\n return new DirtyCheckProperty(this.dirtyChecker, obj, propertyName);\n }\n\n return new SetterObserver(this.taskQueue, obj, propertyName);\n };\n\n ObserverLocator.prototype.getAccessor = function getAccessor(obj, propertyName) {\n if (obj instanceof DOM.Element) {\n if (propertyName === 'class' || propertyName === 'style' || propertyName === 'css' || propertyName === 'value' && (obj.tagName.toLowerCase() === 'input' || obj.tagName.toLowerCase() === 'select') || propertyName === 'checked' && obj.tagName.toLowerCase() === 'input' || propertyName === 'model' && obj.tagName.toLowerCase() === 'input' || /^xlink:.+$/.exec(propertyName)) {\n return this.getObserver(obj, propertyName);\n }\n if (/^\\w+:|^data-|^aria-/.test(propertyName) || obj instanceof DOM.SVGElement && this.svgAnalyzer.isStandardSvgAttribute(obj.nodeName, propertyName) || obj.tagName.toLowerCase() === 'img' && propertyName === 'src' || obj.tagName.toLowerCase() === 'a' && propertyName === 'href') {\n return dataAttributeAccessor;\n }\n }\n return propertyAccessor;\n };\n\n ObserverLocator.prototype.getArrayObserver = function getArrayObserver(array) {\n return _getArrayObserver(this.taskQueue, array);\n };\n\n ObserverLocator.prototype.getMapObserver = function getMapObserver(map) {\n return _getMapObserver(this.taskQueue, map);\n };\n\n ObserverLocator.prototype.getSetObserver = function getSetObserver(set) {\n return _getSetObserver(this.taskQueue, set);\n };\n\n return ObserverLocator;\n}(), _class12.inject = [TaskQueue, EventManager, DirtyChecker, SVGAnalyzer, Parser], _temp);\n\nexport var ObjectObservationAdapter = function () {\n function ObjectObservationAdapter() {\n \n }\n\n ObjectObservationAdapter.prototype.getObserver = function getObserver(object, propertyName, descriptor) {\n throw new Error('BindingAdapters must implement getObserver(object, propertyName).');\n };\n\n return ObjectObservationAdapter;\n}();\n\nexport var BindingExpression = function () {\n function BindingExpression(observerLocator, targetProperty, sourceExpression, mode, lookupFunctions, attribute) {\n \n\n this.observerLocator = observerLocator;\n this.targetProperty = targetProperty;\n this.sourceExpression = sourceExpression;\n this.mode = mode;\n this.lookupFunctions = lookupFunctions;\n this.attribute = attribute;\n this.discrete = false;\n }\n\n BindingExpression.prototype.createBinding = function createBinding(target) {\n return new Binding(this.observerLocator, this.sourceExpression, target, this.targetProperty, this.mode, this.lookupFunctions);\n };\n\n return BindingExpression;\n}();\n\nexport var Binding = (_dec10 = connectable(), _dec10(_class13 = function () {\n function Binding(observerLocator, sourceExpression, target, targetProperty, mode, lookupFunctions) {\n \n\n this.observerLocator = observerLocator;\n this.sourceExpression = sourceExpression;\n this.target = target;\n this.targetProperty = targetProperty;\n this.mode = mode;\n this.lookupFunctions = lookupFunctions;\n }\n\n Binding.prototype.updateTarget = function updateTarget(value) {\n this.targetObserver.setValue(value, this.target, this.targetProperty);\n };\n\n Binding.prototype.updateSource = function updateSource(value) {\n this.sourceExpression.assign(this.source, value, this.lookupFunctions);\n };\n\n Binding.prototype.call = function call(context, newValue, oldValue) {\n if (!this.isBound) {\n return;\n }\n if (context === sourceContext) {\n oldValue = this.targetObserver.getValue(this.target, this.targetProperty);\n newValue = this.sourceExpression.evaluate(this.source, this.lookupFunctions);\n if (newValue !== oldValue) {\n this.updateTarget(newValue);\n }\n if (this.mode !== bindingMode.oneTime) {\n this._version++;\n this.sourceExpression.connect(this, this.source);\n this.unobserve(false);\n }\n return;\n }\n if (context === targetContext) {\n if (newValue !== this.sourceExpression.evaluate(this.source, this.lookupFunctions)) {\n this.updateSource(newValue);\n }\n return;\n }\n throw new Error('Unexpected call context ' + context);\n };\n\n Binding.prototype.bind = function bind(source) {\n if (this.isBound) {\n if (this.source === source) {\n return;\n }\n this.unbind();\n }\n this.isBound = true;\n this.source = source;\n\n if (this.sourceExpression.bind) {\n this.sourceExpression.bind(this, source, this.lookupFunctions);\n }\n\n var mode = this.mode;\n if (!this.targetObserver) {\n var method = mode === bindingMode.twoWay || mode === bindingMode.fromView ? 'getObserver' : 'getAccessor';\n this.targetObserver = this.observerLocator[method](this.target, this.targetProperty);\n }\n\n if ('bind' in this.targetObserver) {\n this.targetObserver.bind();\n }\n if (this.mode !== bindingMode.fromView) {\n var value = this.sourceExpression.evaluate(source, this.lookupFunctions);\n this.updateTarget(value);\n }\n\n if (mode === bindingMode.oneTime) {\n return;\n } else if (mode === bindingMode.toView) {\n enqueueBindingConnect(this);\n } else if (mode === bindingMode.twoWay) {\n this.sourceExpression.connect(this, source);\n this.targetObserver.subscribe(targetContext, this);\n } else if (mode === bindingMode.fromView) {\n this.targetObserver.subscribe(targetContext, this);\n }\n };\n\n Binding.prototype.unbind = function unbind() {\n if (!this.isBound) {\n return;\n }\n this.isBound = false;\n if (this.sourceExpression.unbind) {\n this.sourceExpression.unbind(this, this.source);\n }\n this.source = null;\n if ('unbind' in this.targetObserver) {\n this.targetObserver.unbind();\n }\n if (this.targetObserver.unsubscribe) {\n this.targetObserver.unsubscribe(targetContext, this);\n }\n this.unobserve(true);\n };\n\n Binding.prototype.connect = function connect(evaluate) {\n if (!this.isBound) {\n return;\n }\n if (evaluate) {\n var value = this.sourceExpression.evaluate(this.source, this.lookupFunctions);\n this.updateTarget(value);\n }\n this.sourceExpression.connect(this, this.source);\n };\n\n return Binding;\n}()) || _class13);\n\nexport var CallExpression = function () {\n function CallExpression(observerLocator, targetProperty, sourceExpression, lookupFunctions) {\n \n\n this.observerLocator = observerLocator;\n this.targetProperty = targetProperty;\n this.sourceExpression = sourceExpression;\n this.lookupFunctions = lookupFunctions;\n }\n\n CallExpression.prototype.createBinding = function createBinding(target) {\n return new Call(this.observerLocator, this.sourceExpression, target, this.targetProperty, this.lookupFunctions);\n };\n\n return CallExpression;\n}();\n\nexport var Call = function () {\n function Call(observerLocator, sourceExpression, target, targetProperty, lookupFunctions) {\n \n\n this.sourceExpression = sourceExpression;\n this.target = target;\n this.targetProperty = observerLocator.getObserver(target, targetProperty);\n this.lookupFunctions = lookupFunctions;\n }\n\n Call.prototype.callSource = function callSource($event) {\n var overrideContext = this.source.overrideContext;\n Object.assign(overrideContext, $event);\n overrideContext.$event = $event;\n var mustEvaluate = true;\n var result = this.sourceExpression.evaluate(this.source, this.lookupFunctions, mustEvaluate);\n delete overrideContext.$event;\n for (var prop in $event) {\n delete overrideContext[prop];\n }\n return result;\n };\n\n Call.prototype.bind = function bind(source) {\n var _this26 = this;\n\n if (this.isBound) {\n if (this.source === source) {\n return;\n }\n this.unbind();\n }\n this.isBound = true;\n this.source = source;\n\n if (this.sourceExpression.bind) {\n this.sourceExpression.bind(this, source, this.lookupFunctions);\n }\n this.targetProperty.setValue(function ($event) {\n return _this26.callSource($event);\n });\n };\n\n Call.prototype.unbind = function unbind() {\n if (!this.isBound) {\n return;\n }\n this.isBound = false;\n if (this.sourceExpression.unbind) {\n this.sourceExpression.unbind(this, this.source);\n }\n this.source = null;\n this.targetProperty.setValue(null);\n };\n\n return Call;\n}();\n\nexport var ValueConverterResource = function () {\n function ValueConverterResource(name) {\n \n\n this.name = name;\n }\n\n ValueConverterResource.convention = function convention(name) {\n if (name.endsWith('ValueConverter')) {\n return new ValueConverterResource(camelCase(name.substring(0, name.length - 14)));\n }\n };\n\n ValueConverterResource.prototype.initialize = function initialize(container, target) {\n this.instance = container.get(target);\n };\n\n ValueConverterResource.prototype.register = function register(registry, name) {\n registry.registerValueConverter(name || this.name, this.instance);\n };\n\n ValueConverterResource.prototype.load = function load(container, target) {};\n\n return ValueConverterResource;\n}();\n\nexport function valueConverter(nameOrTarget) {\n if (nameOrTarget === undefined || typeof nameOrTarget === 'string') {\n return function (target) {\n metadata.define(metadata.resource, new ValueConverterResource(nameOrTarget), target);\n };\n }\n\n metadata.define(metadata.resource, new ValueConverterResource(), nameOrTarget);\n}\n\nexport var BindingBehaviorResource = function () {\n function BindingBehaviorResource(name) {\n \n\n this.name = name;\n }\n\n BindingBehaviorResource.convention = function convention(name) {\n if (name.endsWith('BindingBehavior')) {\n return new BindingBehaviorResource(camelCase(name.substring(0, name.length - 15)));\n }\n };\n\n BindingBehaviorResource.prototype.initialize = function initialize(container, target) {\n this.instance = container.get(target);\n };\n\n BindingBehaviorResource.prototype.register = function register(registry, name) {\n registry.registerBindingBehavior(name || this.name, this.instance);\n };\n\n BindingBehaviorResource.prototype.load = function load(container, target) {};\n\n return BindingBehaviorResource;\n}();\n\nexport function bindingBehavior(nameOrTarget) {\n if (nameOrTarget === undefined || typeof nameOrTarget === 'string') {\n return function (target) {\n metadata.define(metadata.resource, new BindingBehaviorResource(nameOrTarget), target);\n };\n }\n\n metadata.define(metadata.resource, new BindingBehaviorResource(), nameOrTarget);\n}\n\nexport var ListenerExpression = function () {\n function ListenerExpression(eventManager, targetEvent, sourceExpression, delegationStrategy, preventDefault, lookupFunctions) {\n \n\n this.eventManager = eventManager;\n this.targetEvent = targetEvent;\n this.sourceExpression = sourceExpression;\n this.delegationStrategy = delegationStrategy;\n this.discrete = true;\n this.preventDefault = preventDefault;\n this.lookupFunctions = lookupFunctions;\n }\n\n ListenerExpression.prototype.createBinding = function createBinding(target) {\n return new Listener(this.eventManager, this.targetEvent, this.delegationStrategy, this.sourceExpression, target, this.preventDefault, this.lookupFunctions);\n };\n\n return ListenerExpression;\n}();\n\nexport var Listener = function () {\n function Listener(eventManager, targetEvent, delegationStrategy, sourceExpression, target, preventDefault, lookupFunctions) {\n \n\n this.eventManager = eventManager;\n this.targetEvent = targetEvent;\n this.delegationStrategy = delegationStrategy;\n this.sourceExpression = sourceExpression;\n this.target = target;\n this.preventDefault = preventDefault;\n this.lookupFunctions = lookupFunctions;\n }\n\n Listener.prototype.callSource = function callSource(event) {\n var overrideContext = this.source.overrideContext;\n overrideContext.$event = event;\n var mustEvaluate = true;\n var result = this.sourceExpression.evaluate(this.source, this.lookupFunctions, mustEvaluate);\n delete overrideContext.$event;\n if (result !== true && this.preventDefault) {\n event.preventDefault();\n }\n return result;\n };\n\n Listener.prototype.handleEvent = function handleEvent(event) {\n this.callSource(event);\n };\n\n Listener.prototype.bind = function bind(source) {\n if (this.isBound) {\n if (this.source === source) {\n return;\n }\n this.unbind();\n }\n this.isBound = true;\n this.source = source;\n\n if (this.sourceExpression.bind) {\n this.sourceExpression.bind(this, source, this.lookupFunctions);\n }\n this._handler = this.eventManager.addEventListener(this.target, this.targetEvent, this, this.delegationStrategy, true);\n };\n\n Listener.prototype.unbind = function unbind() {\n if (!this.isBound) {\n return;\n }\n this.isBound = false;\n if (this.sourceExpression.unbind) {\n this.sourceExpression.unbind(this, this.source);\n }\n this.source = null;\n this._handler.dispose();\n this._handler = null;\n };\n\n return Listener;\n}();\n\nfunction getAU(element) {\n var au = element.au;\n\n if (au === undefined) {\n throw new Error('No Aurelia APIs are defined for the element: \"' + element.tagName + '\".');\n }\n\n return au;\n}\n\nexport var NameExpression = function () {\n function NameExpression(sourceExpression, apiName, lookupFunctions) {\n \n\n this.sourceExpression = sourceExpression;\n this.apiName = apiName;\n this.lookupFunctions = lookupFunctions;\n this.discrete = true;\n }\n\n NameExpression.prototype.createBinding = function createBinding(target) {\n return new NameBinder(this.sourceExpression, NameExpression.locateAPI(target, this.apiName), this.lookupFunctions);\n };\n\n NameExpression.locateAPI = function locateAPI(element, apiName) {\n switch (apiName) {\n case 'element':\n return element;\n case 'controller':\n return getAU(element).controller;\n case 'view-model':\n return getAU(element).controller.viewModel;\n case 'view':\n return getAU(element).controller.view;\n default:\n var target = getAU(element)[apiName];\n\n if (target === undefined) {\n throw new Error('Attempted to reference \"' + apiName + '\", but it was not found amongst the target\\'s API.');\n }\n\n return target.viewModel;\n }\n };\n\n return NameExpression;\n}();\n\nvar NameBinder = function () {\n function NameBinder(sourceExpression, target, lookupFunctions) {\n \n\n this.sourceExpression = sourceExpression;\n this.target = target;\n this.lookupFunctions = lookupFunctions;\n }\n\n NameBinder.prototype.bind = function bind(source) {\n if (this.isBound) {\n if (this.source === source) {\n return;\n }\n this.unbind();\n }\n this.isBound = true;\n this.source = source;\n if (this.sourceExpression.bind) {\n this.sourceExpression.bind(this, source, this.lookupFunctions);\n }\n this.sourceExpression.assign(this.source, this.target, this.lookupFunctions);\n };\n\n NameBinder.prototype.unbind = function unbind() {\n if (!this.isBound) {\n return;\n }\n this.isBound = false;\n if (this.sourceExpression.evaluate(this.source, this.lookupFunctions) === this.target) {\n this.sourceExpression.assign(this.source, null, this.lookupFunctions);\n }\n if (this.sourceExpression.unbind) {\n this.sourceExpression.unbind(this, this.source);\n }\n this.source = null;\n };\n\n return NameBinder;\n}();\n\nvar LookupFunctions = {\n bindingBehaviors: function bindingBehaviors(name) {\n return null;\n },\n valueConverters: function valueConverters(name) {\n return null;\n }\n};\n\nexport var BindingEngine = (_temp2 = _class14 = function () {\n function BindingEngine(observerLocator, parser) {\n \n\n this.observerLocator = observerLocator;\n this.parser = parser;\n }\n\n BindingEngine.prototype.createBindingExpression = function createBindingExpression(targetProperty, sourceExpression) {\n var mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : bindingMode.toView;\n var lookupFunctions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : LookupFunctions;\n\n return new BindingExpression(this.observerLocator, targetProperty, this.parser.parse(sourceExpression), mode, lookupFunctions);\n };\n\n BindingEngine.prototype.propertyObserver = function propertyObserver(obj, propertyName) {\n var _this27 = this;\n\n return {\n subscribe: function subscribe(callback) {\n var observer = _this27.observerLocator.getObserver(obj, propertyName);\n observer.subscribe(callback);\n return {\n dispose: function dispose() {\n return observer.unsubscribe(callback);\n }\n };\n }\n };\n };\n\n BindingEngine.prototype.collectionObserver = function collectionObserver(collection) {\n var _this28 = this;\n\n return {\n subscribe: function subscribe(callback) {\n var observer = void 0;\n if (collection instanceof Array) {\n observer = _this28.observerLocator.getArrayObserver(collection);\n } else if (collection instanceof Map) {\n observer = _this28.observerLocator.getMapObserver(collection);\n } else if (collection instanceof Set) {\n observer = _this28.observerLocator.getSetObserver(collection);\n } else {\n throw new Error('collection must be an instance of Array, Map or Set.');\n }\n observer.subscribe(callback);\n return {\n dispose: function dispose() {\n return observer.unsubscribe(callback);\n }\n };\n }\n };\n };\n\n BindingEngine.prototype.expressionObserver = function expressionObserver(bindingContext, expression) {\n var scope = { bindingContext: bindingContext, overrideContext: createOverrideContext(bindingContext) };\n return new ExpressionObserver(scope, this.parser.parse(expression), this.observerLocator, LookupFunctions);\n };\n\n BindingEngine.prototype.parseExpression = function parseExpression(expression) {\n return this.parser.parse(expression);\n };\n\n BindingEngine.prototype.registerAdapter = function registerAdapter(adapter) {\n this.observerLocator.addAdapter(adapter);\n };\n\n return BindingEngine;\n}(), _class14.inject = [ObserverLocator, Parser], _temp2);\n\nvar setProto = Set.prototype;\n\nfunction _getSetObserver(taskQueue, set) {\n return ModifySetObserver.for(taskQueue, set);\n}\n\nvar ModifySetObserver = function (_ModifyCollectionObse3) {\n _inherits(ModifySetObserver, _ModifyCollectionObse3);\n\n function ModifySetObserver(taskQueue, set) {\n \n\n return _possibleConstructorReturn(this, _ModifyCollectionObse3.call(this, taskQueue, set));\n }\n\n ModifySetObserver.for = function _for(taskQueue, set) {\n if (!('__set_observer__' in set)) {\n Reflect.defineProperty(set, '__set_observer__', {\n value: ModifySetObserver.create(taskQueue, set),\n enumerable: false, configurable: false\n });\n }\n return set.__set_observer__;\n };\n\n ModifySetObserver.create = function create(taskQueue, set) {\n var observer = new ModifySetObserver(taskQueue, set);\n\n var proto = setProto;\n if (proto.add !== set.add || proto.delete !== set.delete || proto.clear !== set.clear) {\n proto = {\n add: set.add,\n delete: set.delete,\n clear: set.clear\n };\n }\n\n set.add = function () {\n var type = 'add';\n var oldSize = set.size;\n var methodCallResult = proto.add.apply(set, arguments);\n var hasValue = set.size === oldSize;\n if (!hasValue) {\n observer.addChangeRecord({\n type: type,\n object: set,\n value: Array.from(set).pop()\n });\n }\n return methodCallResult;\n };\n\n set.delete = function () {\n var hasValue = set.has(arguments[0]);\n var methodCallResult = proto.delete.apply(set, arguments);\n if (hasValue) {\n observer.addChangeRecord({\n type: 'delete',\n object: set,\n value: arguments[0]\n });\n }\n return methodCallResult;\n };\n\n set.clear = function () {\n var methodCallResult = proto.clear.apply(set, arguments);\n observer.addChangeRecord({\n type: 'clear',\n object: set\n });\n return methodCallResult;\n };\n\n return observer;\n };\n\n return ModifySetObserver;\n}(ModifyCollectionObserver);\n\nexport function observable(targetOrConfig, key, descriptor) {\n function deco(target, key, descriptor, config) {\n var isClassDecorator = key === undefined;\n if (isClassDecorator) {\n target = target.prototype;\n key = typeof config === 'string' ? config : config.name;\n }\n\n var innerPropertyName = '_' + key;\n var innerPropertyDescriptor = {\n configurable: true,\n enumerable: false,\n writable: true\n };\n\n var callbackName = config && config.changeHandler || key + 'Changed';\n\n if (descriptor) {\n if (typeof descriptor.initializer === 'function') {\n innerPropertyDescriptor.value = descriptor.initializer();\n }\n } else {\n descriptor = {};\n }\n\n if (!('enumerable' in descriptor)) {\n descriptor.enumerable = true;\n }\n\n delete descriptor.value;\n delete descriptor.writable;\n delete descriptor.initializer;\n\n Reflect.defineProperty(target, innerPropertyName, innerPropertyDescriptor);\n\n descriptor.get = function () {\n return this[innerPropertyName];\n };\n descriptor.set = function (newValue) {\n var oldValue = this[innerPropertyName];\n if (newValue === oldValue) {\n return;\n }\n\n this[innerPropertyName] = newValue;\n Reflect.defineProperty(this, innerPropertyName, { enumerable: false });\n\n if (this[callbackName]) {\n this[callbackName](newValue, oldValue, key);\n }\n };\n\n descriptor.get.dependencies = [innerPropertyName];\n\n if (isClassDecorator) {\n Reflect.defineProperty(target, key, descriptor);\n } else {\n return descriptor;\n }\n }\n\n if (key === undefined) {\n return function (t, k, d) {\n return deco(t, k, d, targetOrConfig);\n };\n }\n return deco(targetOrConfig, key, descriptor);\n}\n\nvar signals = {};\n\nexport function connectBindingToSignal(binding, name) {\n if (!signals.hasOwnProperty(name)) {\n signals[name] = 0;\n }\n binding.observeProperty(signals, name);\n}\n\nexport function signalBindings(name) {\n if (signals.hasOwnProperty(name)) {\n signals[name]++;\n }\n}","import { Container } from 'aurelia-dependency-injection';\nimport { Origin } from 'aurelia-metadata';\nimport { CompositionEngine, ViewSlot } from 'aurelia-templating';\nimport { DefaultDialogSettings } from './dialog-settings';\nimport { createDialogCancelError } from './dialog-cancel-error';\nimport { invokeLifecycle } from './lifecycle';\nimport { DialogController } from './dialog-controller';\n/* tslint:enable:max-line-length */\nfunction whenClosed(onfulfilled, onrejected) {\n return this.then(function (r) { return r.wasCancelled ? r : r.closeResult; }).then(onfulfilled, onrejected);\n}\nfunction asDialogOpenPromise(promise) {\n promise.whenClosed = whenClosed;\n return promise;\n}\n/**\n * A service allowing for the creation of dialogs.\n */\nvar DialogService = /** @class */ (function () {\n function DialogService(container, compositionEngine, defaultSettings) {\n /**\n * The current dialog controllers\n */\n this.controllers = [];\n /**\n * Is there an open dialog\n */\n this.hasOpenDialog = false;\n this.hasActiveDialog = false;\n this.container = container;\n this.compositionEngine = compositionEngine;\n this.defaultSettings = defaultSettings;\n }\n DialogService.prototype.validateSettings = function (settings) {\n if (!settings.viewModel && !settings.view) {\n throw new Error('Invalid Dialog Settings. You must provide \"viewModel\", \"view\" or both.');\n }\n };\n // tslint:disable-next-line:max-line-length\n DialogService.prototype.createCompositionContext = function (childContainer, host, settings) {\n return {\n container: childContainer.parent,\n childContainer: childContainer,\n bindingContext: null,\n viewResources: null,\n model: settings.model,\n view: settings.view,\n viewModel: settings.viewModel,\n viewSlot: new ViewSlot(host, true),\n host: host\n };\n };\n DialogService.prototype.ensureViewModel = function (compositionContext) {\n if (typeof compositionContext.viewModel === 'function') {\n var moduleId = Origin.get(compositionContext.viewModel).moduleId;\n if (!moduleId) {\n return Promise.reject(new Error(\"Can not resolve \\\"moduleId\\\" of \\\"\" + compositionContext.viewModel.name + \"\\\".\"));\n }\n compositionContext.viewModel = moduleId;\n }\n if (typeof compositionContext.viewModel === 'string') {\n return this.compositionEngine.ensureViewModel(compositionContext);\n }\n return Promise.resolve(compositionContext);\n };\n DialogService.prototype._cancelOperation = function (rejectOnCancel) {\n if (!rejectOnCancel) {\n return { wasCancelled: true };\n }\n throw createDialogCancelError();\n };\n // tslint:disable-next-line:max-line-length\n DialogService.prototype.composeAndShowDialog = function (compositionContext, dialogController) {\n var _this = this;\n if (!compositionContext.viewModel) {\n // provide access to the dialog controller for view only dialogs\n compositionContext.bindingContext = { controller: dialogController };\n }\n return this.compositionEngine.compose(compositionContext).then(function (controller) {\n dialogController.controller = controller;\n return dialogController.renderer.showDialog(dialogController).then(function () {\n _this.controllers.push(dialogController);\n _this.hasActiveDialog = _this.hasOpenDialog = !!_this.controllers.length;\n }, function (reason) {\n if (controller.viewModel) {\n invokeLifecycle(controller.viewModel, 'deactivate');\n }\n return Promise.reject(reason);\n });\n });\n };\n /**\n * @internal\n */\n DialogService.prototype.createSettings = function (settings) {\n settings = Object.assign({}, this.defaultSettings, settings);\n if (typeof settings.keyboard !== 'boolean' && !settings.keyboard) {\n settings.keyboard = !settings.lock;\n }\n if (typeof settings.overlayDismiss !== 'boolean') {\n settings.overlayDismiss = !settings.lock;\n }\n Object.defineProperty(settings, 'rejectOnCancel', {\n writable: false,\n configurable: true,\n enumerable: true\n });\n this.validateSettings(settings);\n return settings;\n };\n DialogService.prototype.open = function (settings) {\n var _this = this;\n if (settings === void 0) { settings = {}; }\n // tslint:enable:max-line-length\n settings = this.createSettings(settings);\n var childContainer = settings.childContainer || this.container.createChild();\n var resolveCloseResult;\n var rejectCloseResult;\n var closeResult = new Promise(function (resolve, reject) {\n resolveCloseResult = resolve;\n rejectCloseResult = reject;\n });\n var dialogController = childContainer.invoke(DialogController, [settings, resolveCloseResult, rejectCloseResult]);\n childContainer.registerInstance(DialogController, dialogController);\n closeResult.then(function () {\n removeController(_this, dialogController);\n }, function () {\n removeController(_this, dialogController);\n });\n var compositionContext = this.createCompositionContext(childContainer, dialogController.renderer.getDialogContainer(), dialogController.settings);\n var openResult = this.ensureViewModel(compositionContext).then(function (compositionContext) {\n if (!compositionContext.viewModel) {\n return true;\n }\n return invokeLifecycle(compositionContext.viewModel, 'canActivate', dialogController.settings.model);\n }).then(function (canActivate) {\n if (!canActivate) {\n return _this._cancelOperation(dialogController.settings.rejectOnCancel);\n }\n // if activation granted, compose and show\n return _this.composeAndShowDialog(compositionContext, dialogController)\n .then(function () { return ({ controller: dialogController, closeResult: closeResult, wasCancelled: false }); });\n });\n return asDialogOpenPromise(openResult);\n };\n /**\n * Closes all open dialogs at the time of invocation.\n * @return Promise All controllers whose close operation was cancelled.\n */\n DialogService.prototype.closeAll = function () {\n return Promise.all(this.controllers.slice(0).map(function (controller) {\n if (!controller.settings.rejectOnCancel) {\n return controller.cancel().then(function (result) {\n if (result.wasCancelled) {\n return controller;\n }\n return null;\n });\n }\n return controller.cancel().then(function () { return null; }).catch(function (reason) {\n if (reason.wasCancelled) {\n return controller;\n }\n throw reason;\n });\n })).then(function (unclosedControllers) { return unclosedControllers.filter(function (unclosed) { return !!unclosed; }); });\n };\n /**\n * @internal\n */\n // tslint:disable-next-line:member-ordering\n DialogService.inject = [Container, CompositionEngine, DefaultDialogSettings];\n return DialogService;\n}());\nexport { DialogService };\nfunction removeController(service, dialogController) {\n var i = service.controllers.indexOf(dialogController);\n if (i !== -1) {\n service.controllers.splice(i, 1);\n service.hasActiveDialog = service.hasOpenDialog = !!service.controllers.length;\n }\n}\n","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _class, _temp, _class2, _temp2, _dec, _class3, _dec2, _class4, _dec3, _class5, _dec4, _class6, _dec5, _class7, _dec6, _class8, _class9, _temp3, _class10, _temp4, _class12, _class14, _temp5, _dec7, _class15, _dec8, _class16, _dec9, _class17;\n\n\n\nimport * as LogManager from 'aurelia-logging';\nimport { metadata, Origin, protocol } from 'aurelia-metadata';\nimport { DOM, PLATFORM, FEATURE } from 'aurelia-pal';\nimport { TemplateRegistryEntry, Loader } from 'aurelia-loader';\nimport { relativeToFile } from 'aurelia-path';\nimport { Scope, Expression, ValueConverterResource, BindingBehaviorResource, camelCase, Binding, createOverrideContext, subscriberCollection, bindingMode, ObserverLocator, EventManager } from 'aurelia-binding';\nimport { Container, resolver, inject } from 'aurelia-dependency-injection';\nimport { TaskQueue } from 'aurelia-task-queue';\n\nexport var animationEvent = {\n enterBegin: 'animation:enter:begin',\n enterActive: 'animation:enter:active',\n enterDone: 'animation:enter:done',\n enterTimeout: 'animation:enter:timeout',\n\n leaveBegin: 'animation:leave:begin',\n leaveActive: 'animation:leave:active',\n leaveDone: 'animation:leave:done',\n leaveTimeout: 'animation:leave:timeout',\n\n staggerNext: 'animation:stagger:next',\n\n removeClassBegin: 'animation:remove-class:begin',\n removeClassActive: 'animation:remove-class:active',\n removeClassDone: 'animation:remove-class:done',\n removeClassTimeout: 'animation:remove-class:timeout',\n\n addClassBegin: 'animation:add-class:begin',\n addClassActive: 'animation:add-class:active',\n addClassDone: 'animation:add-class:done',\n addClassTimeout: 'animation:add-class:timeout',\n\n animateBegin: 'animation:animate:begin',\n animateActive: 'animation:animate:active',\n animateDone: 'animation:animate:done',\n animateTimeout: 'animation:animate:timeout',\n\n sequenceBegin: 'animation:sequence:begin',\n sequenceDone: 'animation:sequence:done'\n};\n\nexport var Animator = function () {\n function Animator() {\n \n }\n\n Animator.prototype.enter = function enter(element) {\n return Promise.resolve(false);\n };\n\n Animator.prototype.leave = function leave(element) {\n return Promise.resolve(false);\n };\n\n Animator.prototype.removeClass = function removeClass(element, className) {\n element.classList.remove(className);\n return Promise.resolve(false);\n };\n\n Animator.prototype.addClass = function addClass(element, className) {\n element.classList.add(className);\n return Promise.resolve(false);\n };\n\n Animator.prototype.animate = function animate(element, className) {\n return Promise.resolve(false);\n };\n\n Animator.prototype.runSequence = function runSequence(animations) {};\n\n Animator.prototype.registerEffect = function registerEffect(effectName, properties) {};\n\n Animator.prototype.unregisterEffect = function unregisterEffect(effectName) {};\n\n return Animator;\n}();\n\nexport var CompositionTransactionNotifier = function () {\n function CompositionTransactionNotifier(owner) {\n \n\n this.owner = owner;\n this.owner._compositionCount++;\n }\n\n CompositionTransactionNotifier.prototype.done = function done() {\n this.owner._compositionCount--;\n this.owner._tryCompleteTransaction();\n };\n\n return CompositionTransactionNotifier;\n}();\n\nexport var CompositionTransactionOwnershipToken = function () {\n function CompositionTransactionOwnershipToken(owner) {\n \n\n this.owner = owner;\n this.owner._ownershipToken = this;\n this.thenable = this._createThenable();\n }\n\n CompositionTransactionOwnershipToken.prototype.waitForCompositionComplete = function waitForCompositionComplete() {\n this.owner._tryCompleteTransaction();\n return this.thenable;\n };\n\n CompositionTransactionOwnershipToken.prototype.resolve = function resolve() {\n this._resolveCallback();\n };\n\n CompositionTransactionOwnershipToken.prototype._createThenable = function _createThenable() {\n var _this = this;\n\n return new Promise(function (resolve, reject) {\n _this._resolveCallback = resolve;\n });\n };\n\n return CompositionTransactionOwnershipToken;\n}();\n\nexport var CompositionTransaction = function () {\n function CompositionTransaction() {\n \n\n this._ownershipToken = null;\n this._compositionCount = 0;\n }\n\n CompositionTransaction.prototype.tryCapture = function tryCapture() {\n return this._ownershipToken === null ? new CompositionTransactionOwnershipToken(this) : null;\n };\n\n CompositionTransaction.prototype.enlist = function enlist() {\n return new CompositionTransactionNotifier(this);\n };\n\n CompositionTransaction.prototype._tryCompleteTransaction = function _tryCompleteTransaction() {\n if (this._compositionCount <= 0) {\n this._compositionCount = 0;\n\n if (this._ownershipToken !== null) {\n var token = this._ownershipToken;\n this._ownershipToken = null;\n token.resolve();\n }\n }\n };\n\n return CompositionTransaction;\n}();\n\nvar capitalMatcher = /([A-Z])/g;\n\nfunction addHyphenAndLower(char) {\n return '-' + char.toLowerCase();\n}\n\nexport function _hyphenate(name) {\n return (name.charAt(0).toLowerCase() + name.slice(1)).replace(capitalMatcher, addHyphenAndLower);\n}\n\nexport function _isAllWhitespace(node) {\n return !(node.auInterpolationTarget || /[^\\t\\n\\r ]/.test(node.textContent));\n}\n\nexport var ViewEngineHooksResource = function () {\n function ViewEngineHooksResource() {\n \n }\n\n ViewEngineHooksResource.prototype.initialize = function initialize(container, target) {\n this.instance = container.get(target);\n };\n\n ViewEngineHooksResource.prototype.register = function register(registry, name) {\n registry.registerViewEngineHooks(this.instance);\n };\n\n ViewEngineHooksResource.prototype.load = function load(container, target) {};\n\n ViewEngineHooksResource.convention = function convention(name) {\n if (name.endsWith('ViewEngineHooks')) {\n return new ViewEngineHooksResource();\n }\n };\n\n return ViewEngineHooksResource;\n}();\n\nexport function viewEngineHooks(target) {\n var deco = function deco(t) {\n metadata.define(metadata.resource, new ViewEngineHooksResource(), t);\n };\n\n return target ? deco(target) : deco;\n}\n\nexport var ElementEvents = (_temp = _class = function () {\n function ElementEvents(element) {\n \n\n this.element = element;\n this.subscriptions = {};\n }\n\n ElementEvents.prototype._enqueueHandler = function _enqueueHandler(handler) {\n this.subscriptions[handler.eventName] = this.subscriptions[handler.eventName] || [];\n this.subscriptions[handler.eventName].push(handler);\n };\n\n ElementEvents.prototype._dequeueHandler = function _dequeueHandler(handler) {\n var index = void 0;\n var subscriptions = this.subscriptions[handler.eventName];\n if (subscriptions) {\n index = subscriptions.indexOf(handler);\n if (index > -1) {\n subscriptions.splice(index, 1);\n }\n }\n return handler;\n };\n\n ElementEvents.prototype.publish = function publish(eventName) {\n var detail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var bubbles = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var cancelable = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n\n var event = DOM.createCustomEvent(eventName, { cancelable: cancelable, bubbles: bubbles, detail: detail });\n this.element.dispatchEvent(event);\n };\n\n ElementEvents.prototype.subscribe = function subscribe(eventName, handler, captureOrOptions) {\n if (typeof handler === 'function') {\n if (captureOrOptions === undefined) {\n captureOrOptions = ElementEvents.defaultListenerOptions;\n }\n var eventHandler = new EventHandlerImpl(this, eventName, handler, captureOrOptions, false);\n return eventHandler;\n }\n\n return undefined;\n };\n\n ElementEvents.prototype.subscribeOnce = function subscribeOnce(eventName, handler, captureOrOptions) {\n if (typeof handler === 'function') {\n if (captureOrOptions === undefined) {\n captureOrOptions = ElementEvents.defaultListenerOptions;\n }\n var eventHandler = new EventHandlerImpl(this, eventName, handler, captureOrOptions, true);\n return eventHandler;\n }\n\n return undefined;\n };\n\n ElementEvents.prototype.dispose = function dispose(eventName) {\n if (eventName && typeof eventName === 'string') {\n var subscriptions = this.subscriptions[eventName];\n if (subscriptions) {\n while (subscriptions.length) {\n var subscription = subscriptions.pop();\n if (subscription) {\n subscription.dispose();\n }\n }\n }\n } else {\n this.disposeAll();\n }\n };\n\n ElementEvents.prototype.disposeAll = function disposeAll() {\n for (var _key in this.subscriptions) {\n this.dispose(_key);\n }\n };\n\n return ElementEvents;\n}(), _class.defaultListenerOptions = true, _temp);\n\nvar EventHandlerImpl = function () {\n function EventHandlerImpl(owner, eventName, handler, captureOrOptions, once) {\n \n\n this.owner = owner;\n this.eventName = eventName;\n this.handler = handler;\n\n this.capture = typeof captureOrOptions === 'boolean' ? captureOrOptions : captureOrOptions.capture;\n this.bubbles = !this.capture;\n this.captureOrOptions = captureOrOptions;\n this.once = once;\n owner.element.addEventListener(eventName, this, captureOrOptions);\n owner._enqueueHandler(this);\n }\n\n EventHandlerImpl.prototype.handleEvent = function handleEvent(e) {\n var fn = this.handler;\n fn(e);\n if (this.once) {\n this.dispose();\n }\n };\n\n EventHandlerImpl.prototype.dispose = function dispose() {\n this.owner.element.removeEventListener(this.eventName, this, this.captureOrOptions);\n this.owner._dequeueHandler(this);\n this.owner = this.handler = null;\n };\n\n return EventHandlerImpl;\n}();\n\nexport var ResourceLoadContext = function () {\n function ResourceLoadContext() {\n \n\n this.dependencies = {};\n }\n\n ResourceLoadContext.prototype.addDependency = function addDependency(url) {\n this.dependencies[url] = true;\n };\n\n ResourceLoadContext.prototype.hasDependency = function hasDependency(url) {\n return url in this.dependencies;\n };\n\n return ResourceLoadContext;\n}();\n\nexport var ViewCompileInstruction = function ViewCompileInstruction() {\n var targetShadowDOM = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var compileSurrogate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n \n\n this.targetShadowDOM = targetShadowDOM;\n this.compileSurrogate = compileSurrogate;\n this.associatedModuleId = null;\n};\n\nViewCompileInstruction.normal = new ViewCompileInstruction();\n\nexport var BehaviorInstruction = function () {\n function BehaviorInstruction() {\n \n }\n\n BehaviorInstruction.enhance = function enhance() {\n var instruction = new BehaviorInstruction();\n instruction.enhance = true;\n return instruction;\n };\n\n BehaviorInstruction.unitTest = function unitTest(type, attributes) {\n var instruction = new BehaviorInstruction();\n instruction.type = type;\n instruction.attributes = attributes || {};\n return instruction;\n };\n\n BehaviorInstruction.element = function element(node, type) {\n var instruction = new BehaviorInstruction();\n instruction.type = type;\n instruction.attributes = {};\n instruction.anchorIsContainer = !(node.hasAttribute('containerless') || type.containerless);\n instruction.initiatedByBehavior = true;\n return instruction;\n };\n\n BehaviorInstruction.attribute = function attribute(attrName, type) {\n var instruction = new BehaviorInstruction();\n instruction.attrName = attrName;\n instruction.type = type || null;\n instruction.attributes = {};\n return instruction;\n };\n\n BehaviorInstruction.dynamic = function dynamic(host, viewModel, viewFactory) {\n var instruction = new BehaviorInstruction();\n instruction.host = host;\n instruction.viewModel = viewModel;\n instruction.viewFactory = viewFactory;\n instruction.inheritBindingContext = true;\n return instruction;\n };\n\n return BehaviorInstruction;\n}();\n\nvar biProto = BehaviorInstruction.prototype;\nbiProto.initiatedByBehavior = false;\nbiProto.enhance = false;\nbiProto.partReplacements = null;\nbiProto.viewFactory = null;\nbiProto.originalAttrName = null;\nbiProto.skipContentProcessing = false;\nbiProto.contentFactory = null;\nbiProto.viewModel = null;\nbiProto.anchorIsContainer = false;\nbiProto.host = null;\nbiProto.attributes = null;\nbiProto.type = null;\nbiProto.attrName = null;\nbiProto.inheritBindingContext = false;\n\nBehaviorInstruction.normal = new BehaviorInstruction();\n\nexport var TargetInstruction = (_temp2 = _class2 = function () {\n function TargetInstruction() {\n \n }\n\n TargetInstruction.shadowSlot = function shadowSlot(parentInjectorId) {\n var instruction = new TargetInstruction();\n instruction.parentInjectorId = parentInjectorId;\n instruction.shadowSlot = true;\n return instruction;\n };\n\n TargetInstruction.contentExpression = function contentExpression(expression) {\n var instruction = new TargetInstruction();\n instruction.contentExpression = expression;\n return instruction;\n };\n\n TargetInstruction.letElement = function letElement(expressions) {\n var instruction = new TargetInstruction();\n instruction.expressions = expressions;\n instruction.letElement = true;\n return instruction;\n };\n\n TargetInstruction.lifting = function lifting(parentInjectorId, liftingInstruction) {\n var instruction = new TargetInstruction();\n instruction.parentInjectorId = parentInjectorId;\n instruction.expressions = TargetInstruction.noExpressions;\n instruction.behaviorInstructions = [liftingInstruction];\n instruction.viewFactory = liftingInstruction.viewFactory;\n instruction.providers = [liftingInstruction.type.target];\n instruction.lifting = true;\n return instruction;\n };\n\n TargetInstruction.normal = function normal(injectorId, parentInjectorId, providers, behaviorInstructions, expressions, elementInstruction) {\n var instruction = new TargetInstruction();\n instruction.injectorId = injectorId;\n instruction.parentInjectorId = parentInjectorId;\n instruction.providers = providers;\n instruction.behaviorInstructions = behaviorInstructions;\n instruction.expressions = expressions;\n instruction.anchorIsContainer = elementInstruction ? elementInstruction.anchorIsContainer : true;\n instruction.elementInstruction = elementInstruction;\n return instruction;\n };\n\n TargetInstruction.surrogate = function surrogate(providers, behaviorInstructions, expressions, values) {\n var instruction = new TargetInstruction();\n instruction.expressions = expressions;\n instruction.behaviorInstructions = behaviorInstructions;\n instruction.providers = providers;\n instruction.values = values;\n return instruction;\n };\n\n return TargetInstruction;\n}(), _class2.noExpressions = Object.freeze([]), _temp2);\n\nvar tiProto = TargetInstruction.prototype;\n\ntiProto.injectorId = null;\ntiProto.parentInjectorId = null;\n\ntiProto.shadowSlot = false;\ntiProto.slotName = null;\ntiProto.slotFallbackFactory = null;\n\ntiProto.contentExpression = null;\ntiProto.letElement = false;\n\ntiProto.expressions = null;\ntiProto.expressions = null;\ntiProto.providers = null;\n\ntiProto.viewFactory = null;\n\ntiProto.anchorIsContainer = false;\ntiProto.elementInstruction = null;\ntiProto.lifting = false;\n\ntiProto.values = null;\n\nexport var viewStrategy = protocol.create('aurelia:view-strategy', {\n validate: function validate(target) {\n if (!(typeof target.loadViewFactory === 'function')) {\n return 'View strategies must implement: loadViewFactory(viewEngine: ViewEngine, compileInstruction: ViewCompileInstruction, loadContext?: ResourceLoadContext): Promise';\n }\n\n return true;\n },\n compose: function compose(target) {\n if (!(typeof target.makeRelativeTo === 'function')) {\n target.makeRelativeTo = PLATFORM.noop;\n }\n }\n});\n\nexport var RelativeViewStrategy = (_dec = viewStrategy(), _dec(_class3 = function () {\n function RelativeViewStrategy(path) {\n \n\n this.path = path;\n this.absolutePath = null;\n }\n\n RelativeViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n if (this.absolutePath === null && this.moduleId) {\n this.absolutePath = relativeToFile(this.path, this.moduleId);\n }\n\n compileInstruction.associatedModuleId = this.moduleId;\n return viewEngine.loadViewFactory(this.absolutePath || this.path, compileInstruction, loadContext, target);\n };\n\n RelativeViewStrategy.prototype.makeRelativeTo = function makeRelativeTo(file) {\n if (this.absolutePath === null) {\n this.absolutePath = relativeToFile(this.path, file);\n }\n };\n\n return RelativeViewStrategy;\n}()) || _class3);\n\nexport var ConventionalViewStrategy = (_dec2 = viewStrategy(), _dec2(_class4 = function () {\n function ConventionalViewStrategy(viewLocator, origin) {\n \n\n this.moduleId = origin.moduleId;\n this.viewUrl = viewLocator.convertOriginToViewUrl(origin);\n }\n\n ConventionalViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n compileInstruction.associatedModuleId = this.moduleId;\n return viewEngine.loadViewFactory(this.viewUrl, compileInstruction, loadContext, target);\n };\n\n return ConventionalViewStrategy;\n}()) || _class4);\n\nexport var NoViewStrategy = (_dec3 = viewStrategy(), _dec3(_class5 = function () {\n function NoViewStrategy(dependencies, dependencyBaseUrl) {\n \n\n this.dependencies = dependencies || null;\n this.dependencyBaseUrl = dependencyBaseUrl || '';\n }\n\n NoViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n var entry = this.entry;\n var dependencies = this.dependencies;\n\n if (entry && entry.factoryIsReady) {\n return Promise.resolve(null);\n }\n\n this.entry = entry = new TemplateRegistryEntry(this.moduleId || this.dependencyBaseUrl);\n\n entry.dependencies = [];\n entry.templateIsLoaded = true;\n\n if (dependencies !== null) {\n for (var i = 0, ii = dependencies.length; i < ii; ++i) {\n var current = dependencies[i];\n\n if (typeof current === 'string' || typeof current === 'function') {\n entry.addDependency(current);\n } else {\n entry.addDependency(current.from, current.as);\n }\n }\n }\n\n compileInstruction.associatedModuleId = this.moduleId;\n\n return viewEngine.loadViewFactory(entry, compileInstruction, loadContext, target);\n };\n\n return NoViewStrategy;\n}()) || _class5);\n\nexport var TemplateRegistryViewStrategy = (_dec4 = viewStrategy(), _dec4(_class6 = function () {\n function TemplateRegistryViewStrategy(moduleId, entry) {\n \n\n this.moduleId = moduleId;\n this.entry = entry;\n }\n\n TemplateRegistryViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n var entry = this.entry;\n\n if (entry.factoryIsReady) {\n return Promise.resolve(entry.factory);\n }\n\n compileInstruction.associatedModuleId = this.moduleId;\n return viewEngine.loadViewFactory(entry, compileInstruction, loadContext, target);\n };\n\n return TemplateRegistryViewStrategy;\n}()) || _class6);\n\nexport var InlineViewStrategy = (_dec5 = viewStrategy(), _dec5(_class7 = function () {\n function InlineViewStrategy(markup, dependencies, dependencyBaseUrl) {\n \n\n this.markup = markup;\n this.dependencies = dependencies || null;\n this.dependencyBaseUrl = dependencyBaseUrl || '';\n }\n\n InlineViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n var entry = this.entry;\n var dependencies = this.dependencies;\n\n if (entry && entry.factoryIsReady) {\n return Promise.resolve(entry.factory);\n }\n\n this.entry = entry = new TemplateRegistryEntry(this.moduleId || this.dependencyBaseUrl);\n entry.template = DOM.createTemplateFromMarkup(this.markup);\n\n if (dependencies !== null) {\n for (var i = 0, ii = dependencies.length; i < ii; ++i) {\n var current = dependencies[i];\n\n if (typeof current === 'string' || typeof current === 'function') {\n entry.addDependency(current);\n } else {\n entry.addDependency(current.from, current.as);\n }\n }\n }\n\n compileInstruction.associatedModuleId = this.moduleId;\n return viewEngine.loadViewFactory(entry, compileInstruction, loadContext, target);\n };\n\n return InlineViewStrategy;\n}()) || _class7);\n\nexport var StaticViewStrategy = (_dec6 = viewStrategy(), _dec6(_class8 = function () {\n function StaticViewStrategy(config) {\n \n\n if (typeof config === 'string' || config instanceof DOM.Element && config.tagName === 'TEMPLATE') {\n config = {\n template: config\n };\n }\n this.template = config.template;\n this.dependencies = config.dependencies || [];\n this.factoryIsReady = false;\n this.onReady = null;\n this.moduleId = 'undefined';\n }\n\n StaticViewStrategy.prototype.loadViewFactory = function loadViewFactory(viewEngine, compileInstruction, loadContext, target) {\n var _this2 = this;\n\n if (this.factoryIsReady) {\n return Promise.resolve(this.factory);\n }\n var deps = this.dependencies;\n deps = typeof deps === 'function' ? deps() : deps;\n deps = deps ? deps : [];\n deps = Array.isArray(deps) ? deps : [deps];\n\n return Promise.all(deps).then(function (dependencies) {\n var container = viewEngine.container;\n var appResources = viewEngine.appResources;\n var viewCompiler = viewEngine.viewCompiler;\n var viewResources = new ViewResources(appResources);\n\n var resource = void 0;\n var elDeps = [];\n\n if (target) {\n viewResources.autoRegister(container, target);\n }\n\n for (var _iterator = dependencies, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {\n var _ref;\n\n if (_isArray) {\n if (_i >= _iterator.length) break;\n _ref = _iterator[_i++];\n } else {\n _i = _iterator.next();\n if (_i.done) break;\n _ref = _i.value;\n }\n\n var dep = _ref;\n\n if (typeof dep === 'function') {\n resource = viewResources.autoRegister(container, dep);\n if (resource.elementName !== null) {\n elDeps.push(resource);\n }\n } else if (dep && (typeof dep === 'undefined' ? 'undefined' : _typeof(dep)) === 'object') {\n for (var _key2 in dep) {\n var exported = dep[_key2];\n if (typeof exported === 'function') {\n resource = viewResources.autoRegister(container, exported);\n if (resource.elementName !== null) {\n elDeps.push(resource);\n }\n }\n }\n } else {\n throw new Error('dependency neither function nor object. Received: \"' + (typeof dep === 'undefined' ? 'undefined' : _typeof(dep)) + '\"');\n }\n }\n\n return Promise.all(elDeps.map(function (el) {\n return el.load(container, el.target);\n })).then(function () {\n var factory = _this2.template !== null ? viewCompiler.compile(_this2.template, viewResources, compileInstruction) : null;\n _this2.factoryIsReady = true;\n _this2.factory = factory;\n return factory;\n });\n });\n };\n\n return StaticViewStrategy;\n}()) || _class8);\n\nexport var ViewLocator = (_temp3 = _class9 = function () {\n function ViewLocator() {\n \n }\n\n ViewLocator.prototype.getViewStrategy = function getViewStrategy(value) {\n if (!value) {\n return null;\n }\n\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && 'getViewStrategy' in value) {\n var _origin = Origin.get(value.constructor);\n\n value = value.getViewStrategy();\n\n if (typeof value === 'string') {\n value = new RelativeViewStrategy(value);\n }\n\n viewStrategy.assert(value);\n\n if (_origin.moduleId) {\n value.makeRelativeTo(_origin.moduleId);\n }\n\n return value;\n }\n\n if (typeof value === 'string') {\n value = new RelativeViewStrategy(value);\n }\n\n if (viewStrategy.validate(value)) {\n return value;\n }\n\n if (typeof value !== 'function') {\n value = value.constructor;\n }\n\n if ('$view' in value) {\n var c = value.$view;\n var _view = void 0;\n c = typeof c === 'function' ? c.call(value) : c;\n if (c === null) {\n _view = new NoViewStrategy();\n } else {\n _view = c instanceof StaticViewStrategy ? c : new StaticViewStrategy(c);\n }\n metadata.define(ViewLocator.viewStrategyMetadataKey, _view, value);\n return _view;\n }\n\n var origin = Origin.get(value);\n var strategy = metadata.get(ViewLocator.viewStrategyMetadataKey, value);\n\n if (!strategy) {\n if (!origin.moduleId) {\n throw new Error('Cannot determine default view strategy for object.', value);\n }\n\n strategy = this.createFallbackViewStrategy(origin);\n } else if (origin.moduleId) {\n strategy.moduleId = origin.moduleId;\n }\n\n return strategy;\n };\n\n ViewLocator.prototype.createFallbackViewStrategy = function createFallbackViewStrategy(origin) {\n return new ConventionalViewStrategy(this, origin);\n };\n\n ViewLocator.prototype.convertOriginToViewUrl = function convertOriginToViewUrl(origin) {\n var moduleId = origin.moduleId;\n var id = moduleId.endsWith('.js') || moduleId.endsWith('.ts') ? moduleId.substring(0, moduleId.length - 3) : moduleId;\n return id + '.html';\n };\n\n return ViewLocator;\n}(), _class9.viewStrategyMetadataKey = 'aurelia:view-strategy', _temp3);\n\nfunction mi(name) {\n throw new Error('BindingLanguage must implement ' + name + '().');\n}\n\nexport var BindingLanguage = function () {\n function BindingLanguage() {\n \n }\n\n BindingLanguage.prototype.inspectAttribute = function inspectAttribute(resources, elementName, attrName, attrValue) {\n mi('inspectAttribute');\n };\n\n BindingLanguage.prototype.createAttributeInstruction = function createAttributeInstruction(resources, element, info, existingInstruction) {\n mi('createAttributeInstruction');\n };\n\n BindingLanguage.prototype.createLetExpressions = function createLetExpressions(resources, element) {\n mi('createLetExpressions');\n };\n\n BindingLanguage.prototype.inspectTextContent = function inspectTextContent(resources, value) {\n mi('inspectTextContent');\n };\n\n return BindingLanguage;\n}();\n\nvar noNodes = Object.freeze([]);\n\nexport var SlotCustomAttribute = function () {\n SlotCustomAttribute.inject = function inject() {\n return [DOM.Element];\n };\n\n function SlotCustomAttribute(element) {\n \n\n this.element = element;\n this.element.auSlotAttribute = this;\n }\n\n SlotCustomAttribute.prototype.valueChanged = function valueChanged(newValue, oldValue) {};\n\n return SlotCustomAttribute;\n}();\n\nexport var PassThroughSlot = function () {\n function PassThroughSlot(anchor, name, destinationName, fallbackFactory) {\n \n\n this.anchor = anchor;\n this.anchor.viewSlot = this;\n this.name = name;\n this.destinationName = destinationName;\n this.fallbackFactory = fallbackFactory;\n this.destinationSlot = null;\n\n this.projections = 0;\n\n this.contentView = null;\n\n var attr = new SlotCustomAttribute(this.anchor);\n attr.value = this.destinationName;\n }\n\n PassThroughSlot.prototype.renderFallbackContent = function renderFallbackContent(view, nodes, projectionSource, index) {\n if (this.contentView === null) {\n this.contentView = this.fallbackFactory.create(this.ownerView.container);\n this.contentView.bind(this.ownerView.bindingContext, this.ownerView.overrideContext);\n\n var slots = Object.create(null);\n slots[this.destinationSlot.name] = this.destinationSlot;\n\n ShadowDOM.distributeView(this.contentView, slots, projectionSource, index, this.destinationSlot.name);\n }\n };\n\n PassThroughSlot.prototype.passThroughTo = function passThroughTo(destinationSlot) {\n this.destinationSlot = destinationSlot;\n };\n\n PassThroughSlot.prototype.addNode = function addNode(view, node, projectionSource, index) {\n if (this.contentView !== null) {\n this.contentView.removeNodes();\n this.contentView.detached();\n this.contentView.unbind();\n this.contentView = null;\n }\n\n if (node.viewSlot instanceof PassThroughSlot) {\n node.viewSlot.passThroughTo(this);\n return;\n }\n\n this.projections++;\n this.destinationSlot.addNode(view, node, projectionSource, index);\n };\n\n PassThroughSlot.prototype.removeView = function removeView(view, projectionSource) {\n this.projections--;\n this.destinationSlot.removeView(view, projectionSource);\n\n if (this.needsFallbackRendering) {\n this.renderFallbackContent(null, noNodes, projectionSource);\n }\n };\n\n PassThroughSlot.prototype.removeAll = function removeAll(projectionSource) {\n this.projections = 0;\n this.destinationSlot.removeAll(projectionSource);\n\n if (this.needsFallbackRendering) {\n this.renderFallbackContent(null, noNodes, projectionSource);\n }\n };\n\n PassThroughSlot.prototype.projectFrom = function projectFrom(view, projectionSource) {\n this.destinationSlot.projectFrom(view, projectionSource);\n };\n\n PassThroughSlot.prototype.created = function created(ownerView) {\n this.ownerView = ownerView;\n };\n\n PassThroughSlot.prototype.bind = function bind(view) {\n if (this.contentView) {\n this.contentView.bind(view.bindingContext, view.overrideContext);\n }\n };\n\n PassThroughSlot.prototype.attached = function attached() {\n if (this.contentView) {\n this.contentView.attached();\n }\n };\n\n PassThroughSlot.prototype.detached = function detached() {\n if (this.contentView) {\n this.contentView.detached();\n }\n };\n\n PassThroughSlot.prototype.unbind = function unbind() {\n if (this.contentView) {\n this.contentView.unbind();\n }\n };\n\n _createClass(PassThroughSlot, [{\n key: 'needsFallbackRendering',\n get: function get() {\n return this.fallbackFactory && this.projections === 0;\n }\n }]);\n\n return PassThroughSlot;\n}();\n\nexport var ShadowSlot = function () {\n function ShadowSlot(anchor, name, fallbackFactory) {\n \n\n this.anchor = anchor;\n this.anchor.isContentProjectionSource = true;\n this.anchor.viewSlot = this;\n this.name = name;\n this.fallbackFactory = fallbackFactory;\n this.contentView = null;\n this.projections = 0;\n\n this.children = [];\n this.projectFromAnchors = null;\n this.destinationSlots = null;\n }\n\n ShadowSlot.prototype.addNode = function addNode(view, node, projectionSource, index, destination) {\n if (this.contentView !== null) {\n this.contentView.removeNodes();\n this.contentView.detached();\n this.contentView.unbind();\n this.contentView = null;\n }\n\n if (node.viewSlot instanceof PassThroughSlot) {\n node.viewSlot.passThroughTo(this);\n return;\n }\n\n if (this.destinationSlots !== null) {\n ShadowDOM.distributeNodes(view, [node], this.destinationSlots, this, index);\n } else {\n node.auOwnerView = view;\n node.auProjectionSource = projectionSource;\n node.auAssignedSlot = this;\n\n var anchor = this._findAnchor(view, node, projectionSource, index);\n var parent = anchor.parentNode;\n\n parent.insertBefore(node, anchor);\n this.children.push(node);\n this.projections++;\n }\n };\n\n ShadowSlot.prototype.removeView = function removeView(view, projectionSource) {\n if (this.destinationSlots !== null) {\n ShadowDOM.undistributeView(view, this.destinationSlots, this);\n } else if (this.contentView && this.contentView.hasSlots) {\n ShadowDOM.undistributeView(view, this.contentView.slots, projectionSource);\n } else {\n var found = this.children.find(function (x) {\n return x.auSlotProjectFrom === projectionSource;\n });\n if (found) {\n var _children = found.auProjectionChildren;\n var ownChildren = this.children;\n\n for (var i = 0, ii = _children.length; i < ii; ++i) {\n var _child = _children[i];\n\n if (_child.auOwnerView === view) {\n _children.splice(i, 1);\n view.fragment.appendChild(_child);\n i--;ii--;\n\n this.projections--;\n var idx = ownChildren.indexOf(_child);\n if (idx > -1) {\n ownChildren.splice(idx, 1);\n }\n }\n }\n\n if (this.needsFallbackRendering) {\n this.renderFallbackContent(view, noNodes, projectionSource);\n }\n }\n }\n };\n\n ShadowSlot.prototype.removeAll = function removeAll(projectionSource) {\n if (this.destinationSlots !== null) {\n ShadowDOM.undistributeAll(this.destinationSlots, this);\n } else if (this.contentView && this.contentView.hasSlots) {\n ShadowDOM.undistributeAll(this.contentView.slots, projectionSource);\n } else {\n var found = this.children.find(function (x) {\n return x.auSlotProjectFrom === projectionSource;\n });\n\n if (found) {\n var _children2 = found.auProjectionChildren;\n var ownChildren = this.children;\n\n for (var i = 0, ii = _children2.length; i < ii; ++i) {\n var _child2 = _children2[i];\n _child2.auOwnerView.fragment.appendChild(_child2);\n\n this.projections--;\n var idx = ownChildren.indexOf(_child2);\n if (idx > -1) {\n ownChildren.splice(idx, 1);\n }\n }\n\n found.auProjectionChildren = [];\n\n if (this.needsFallbackRendering) {\n this.renderFallbackContent(null, noNodes, projectionSource);\n }\n }\n }\n };\n\n ShadowSlot.prototype._findAnchor = function _findAnchor(view, node, projectionSource, index) {\n if (projectionSource) {\n var found = this.children.find(function (x) {\n return x.auSlotProjectFrom === projectionSource;\n });\n if (found) {\n if (index !== undefined) {\n var _children3 = found.auProjectionChildren;\n var viewIndex = -1;\n var lastView = void 0;\n\n for (var i = 0, ii = _children3.length; i < ii; ++i) {\n var current = _children3[i];\n\n if (current.auOwnerView !== lastView) {\n viewIndex++;\n lastView = current.auOwnerView;\n\n if (viewIndex >= index && lastView !== view) {\n _children3.splice(i, 0, node);\n return current;\n }\n }\n }\n }\n\n found.auProjectionChildren.push(node);\n return found;\n }\n }\n\n return this.anchor;\n };\n\n ShadowSlot.prototype.projectTo = function projectTo(slots) {\n this.destinationSlots = slots;\n };\n\n ShadowSlot.prototype.projectFrom = function projectFrom(view, projectionSource) {\n var anchor = DOM.createComment('anchor');\n var parent = this.anchor.parentNode;\n anchor.auSlotProjectFrom = projectionSource;\n anchor.auOwnerView = view;\n anchor.auProjectionChildren = [];\n parent.insertBefore(anchor, this.anchor);\n this.children.push(anchor);\n\n if (this.projectFromAnchors === null) {\n this.projectFromAnchors = [];\n }\n\n this.projectFromAnchors.push(anchor);\n };\n\n ShadowSlot.prototype.renderFallbackContent = function renderFallbackContent(view, nodes, projectionSource, index) {\n if (this.contentView === null) {\n this.contentView = this.fallbackFactory.create(this.ownerView.container);\n this.contentView.bind(this.ownerView.bindingContext, this.ownerView.overrideContext);\n this.contentView.insertNodesBefore(this.anchor);\n }\n\n if (this.contentView.hasSlots) {\n var slots = this.contentView.slots;\n var projectFromAnchors = this.projectFromAnchors;\n\n if (projectFromAnchors !== null) {\n for (var slotName in slots) {\n var slot = slots[slotName];\n\n for (var i = 0, ii = projectFromAnchors.length; i < ii; ++i) {\n var anchor = projectFromAnchors[i];\n slot.projectFrom(anchor.auOwnerView, anchor.auSlotProjectFrom);\n }\n }\n }\n\n this.fallbackSlots = slots;\n ShadowDOM.distributeNodes(view, nodes, slots, projectionSource, index);\n }\n };\n\n ShadowSlot.prototype.created = function created(ownerView) {\n this.ownerView = ownerView;\n };\n\n ShadowSlot.prototype.bind = function bind(view) {\n if (this.contentView) {\n this.contentView.bind(view.bindingContext, view.overrideContext);\n }\n };\n\n ShadowSlot.prototype.attached = function attached() {\n if (this.contentView) {\n this.contentView.attached();\n }\n };\n\n ShadowSlot.prototype.detached = function detached() {\n if (this.contentView) {\n this.contentView.detached();\n }\n };\n\n ShadowSlot.prototype.unbind = function unbind() {\n if (this.contentView) {\n this.contentView.unbind();\n }\n };\n\n _createClass(ShadowSlot, [{\n key: 'needsFallbackRendering',\n get: function get() {\n return this.fallbackFactory && this.projections === 0;\n }\n }]);\n\n return ShadowSlot;\n}();\n\nexport var ShadowDOM = (_temp4 = _class10 = function () {\n function ShadowDOM() {\n \n }\n\n ShadowDOM.getSlotName = function getSlotName(node) {\n if (node.auSlotAttribute === undefined) {\n return ShadowDOM.defaultSlotKey;\n }\n\n return node.auSlotAttribute.value;\n };\n\n ShadowDOM.distributeView = function distributeView(view, slots, projectionSource, index, destinationOverride) {\n var nodes = void 0;\n\n if (view === null) {\n nodes = noNodes;\n } else {\n var childNodes = view.fragment.childNodes;\n var ii = childNodes.length;\n nodes = new Array(ii);\n\n for (var i = 0; i < ii; ++i) {\n nodes[i] = childNodes[i];\n }\n }\n\n ShadowDOM.distributeNodes(view, nodes, slots, projectionSource, index, destinationOverride);\n };\n\n ShadowDOM.undistributeView = function undistributeView(view, slots, projectionSource) {\n for (var slotName in slots) {\n slots[slotName].removeView(view, projectionSource);\n }\n };\n\n ShadowDOM.undistributeAll = function undistributeAll(slots, projectionSource) {\n for (var slotName in slots) {\n slots[slotName].removeAll(projectionSource);\n }\n };\n\n ShadowDOM.distributeNodes = function distributeNodes(view, nodes, slots, projectionSource, index, destinationOverride) {\n for (var i = 0, ii = nodes.length; i < ii; ++i) {\n var currentNode = nodes[i];\n var nodeType = currentNode.nodeType;\n\n if (currentNode.isContentProjectionSource) {\n currentNode.viewSlot.projectTo(slots);\n\n for (var slotName in slots) {\n slots[slotName].projectFrom(view, currentNode.viewSlot);\n }\n\n nodes.splice(i, 1);\n ii--;i--;\n } else if (nodeType === 1 || nodeType === 3 || currentNode.viewSlot instanceof PassThroughSlot) {\n if (nodeType === 3 && _isAllWhitespace(currentNode)) {\n nodes.splice(i, 1);\n ii--;i--;\n } else {\n var found = slots[destinationOverride || ShadowDOM.getSlotName(currentNode)];\n\n if (found) {\n found.addNode(view, currentNode, projectionSource, index);\n nodes.splice(i, 1);\n ii--;i--;\n }\n }\n } else {\n nodes.splice(i, 1);\n ii--;i--;\n }\n }\n\n for (var _slotName in slots) {\n var slot = slots[_slotName];\n\n if (slot.needsFallbackRendering) {\n slot.renderFallbackContent(view, nodes, projectionSource, index);\n }\n }\n };\n\n return ShadowDOM;\n}(), _class10.defaultSlotKey = '__au-default-slot-key__', _temp4);\n\nfunction register(lookup, name, resource, type) {\n if (!name) {\n return;\n }\n\n var existing = lookup[name];\n if (existing) {\n if (existing !== resource) {\n throw new Error('Attempted to register ' + type + ' when one with the same name already exists. Name: ' + name + '.');\n }\n\n return;\n }\n\n lookup[name] = resource;\n}\n\nexport function validateBehaviorName(name, type) {\n if (/[A-Z]/.test(name)) {\n var newName = _hyphenate(name);\n LogManager.getLogger('templating').warn('\\'' + name + '\\' is not a valid ' + type + ' name and has been converted to \\'' + newName + '\\'. Upper-case letters are not allowed because the DOM is not case-sensitive.');\n return newName;\n }\n return name;\n}\n\nvar conventionMark = '__au_resource__';\n\nexport var ViewResources = function () {\n ViewResources.convention = function convention(target, existing) {\n var resource = void 0;\n\n if (existing && conventionMark in existing) {\n return existing;\n }\n if ('$resource' in target) {\n var config = target.$resource;\n\n if (typeof config === 'string') {\n resource = existing || new HtmlBehaviorResource();\n resource[conventionMark] = true;\n if (!resource.elementName) {\n resource.elementName = validateBehaviorName(config, 'custom element');\n }\n } else {\n if (typeof config === 'function') {\n config = config.call(target);\n }\n if (typeof config === 'string') {\n config = { name: config };\n }\n\n config = Object.assign({}, config);\n\n var resourceType = config.type || 'element';\n\n var _name = config.name;\n switch (resourceType) {\n case 'element':case 'attribute':\n resource = existing || new HtmlBehaviorResource();\n resource[conventionMark] = true;\n if (resourceType === 'element') {\n if (!resource.elementName) {\n resource.elementName = _name ? validateBehaviorName(_name, 'custom element') : _hyphenate(target.name);\n }\n } else {\n if (!resource.attributeName) {\n resource.attributeName = _name ? validateBehaviorName(_name, 'custom attribute') : _hyphenate(target.name);\n }\n }\n if ('templateController' in config) {\n config.liftsContent = config.templateController;\n delete config.templateController;\n }\n if ('defaultBindingMode' in config && resource.attributeDefaultBindingMode !== undefined) {\n config.attributeDefaultBindingMode = config.defaultBindingMode;\n delete config.defaultBindingMode;\n }\n\n delete config.name;\n\n Object.assign(resource, config);\n break;\n case 'valueConverter':\n resource = new ValueConverterResource(camelCase(_name || target.name));\n break;\n case 'bindingBehavior':\n resource = new BindingBehaviorResource(camelCase(_name || target.name));\n break;\n case 'viewEngineHooks':\n resource = new ViewEngineHooksResource();\n break;\n }\n }\n\n if (resource instanceof HtmlBehaviorResource) {\n var _bindables = typeof config === 'string' ? undefined : config.bindables;\n var currentProps = resource.properties;\n if (Array.isArray(_bindables)) {\n for (var i = 0, ii = _bindables.length; ii > i; ++i) {\n var prop = _bindables[i];\n if (!prop || typeof prop !== 'string' && !prop.name) {\n throw new Error('Invalid bindable property at \"' + i + '\" for class \"' + target.name + '\". Expected either a string or an object with \"name\" property.');\n }\n var newProp = new BindableProperty(prop);\n\n var existed = false;\n for (var j = 0, jj = currentProps.length; jj > j; ++j) {\n if (currentProps[j].name === newProp.name) {\n existed = true;\n break;\n }\n }\n if (existed) {\n continue;\n }\n newProp.registerWith(target, resource);\n }\n }\n }\n }\n return resource;\n };\n\n function ViewResources(parent, viewUrl) {\n \n\n this.bindingLanguage = null;\n\n this.parent = parent || null;\n this.hasParent = this.parent !== null;\n this.viewUrl = viewUrl || '';\n this.lookupFunctions = {\n valueConverters: this.getValueConverter.bind(this),\n bindingBehaviors: this.getBindingBehavior.bind(this)\n };\n this.attributes = Object.create(null);\n this.elements = Object.create(null);\n this.valueConverters = Object.create(null);\n this.bindingBehaviors = Object.create(null);\n this.attributeMap = Object.create(null);\n this.values = Object.create(null);\n this.beforeCompile = this.afterCompile = this.beforeCreate = this.afterCreate = this.beforeBind = this.beforeUnbind = false;\n }\n\n ViewResources.prototype._tryAddHook = function _tryAddHook(obj, name) {\n if (typeof obj[name] === 'function') {\n var func = obj[name].bind(obj);\n var counter = 1;\n var callbackName = void 0;\n\n while (this[callbackName = name + counter.toString()] !== undefined) {\n counter++;\n }\n\n this[name] = true;\n this[callbackName] = func;\n }\n };\n\n ViewResources.prototype._invokeHook = function _invokeHook(name, one, two, three, four) {\n if (this.hasParent) {\n this.parent._invokeHook(name, one, two, three, four);\n }\n\n if (this[name]) {\n this[name + '1'](one, two, three, four);\n\n var callbackName = name + '2';\n if (this[callbackName]) {\n this[callbackName](one, two, three, four);\n\n callbackName = name + '3';\n if (this[callbackName]) {\n this[callbackName](one, two, three, four);\n\n var counter = 4;\n\n while (this[callbackName = name + counter.toString()] !== undefined) {\n this[callbackName](one, two, three, four);\n counter++;\n }\n }\n }\n }\n };\n\n ViewResources.prototype.registerViewEngineHooks = function registerViewEngineHooks(hooks) {\n this._tryAddHook(hooks, 'beforeCompile');\n this._tryAddHook(hooks, 'afterCompile');\n this._tryAddHook(hooks, 'beforeCreate');\n this._tryAddHook(hooks, 'afterCreate');\n this._tryAddHook(hooks, 'beforeBind');\n this._tryAddHook(hooks, 'beforeUnbind');\n };\n\n ViewResources.prototype.getBindingLanguage = function getBindingLanguage(bindingLanguageFallback) {\n return this.bindingLanguage || (this.bindingLanguage = bindingLanguageFallback);\n };\n\n ViewResources.prototype.patchInParent = function patchInParent(newParent) {\n var originalParent = this.parent;\n\n this.parent = newParent || null;\n this.hasParent = this.parent !== null;\n\n if (newParent.parent === null) {\n newParent.parent = originalParent;\n newParent.hasParent = originalParent !== null;\n }\n };\n\n ViewResources.prototype.relativeToView = function relativeToView(path) {\n return relativeToFile(path, this.viewUrl);\n };\n\n ViewResources.prototype.registerElement = function registerElement(tagName, behavior) {\n register(this.elements, tagName, behavior, 'an Element');\n };\n\n ViewResources.prototype.getElement = function getElement(tagName) {\n return this.elements[tagName] || (this.hasParent ? this.parent.getElement(tagName) : null);\n };\n\n ViewResources.prototype.mapAttribute = function mapAttribute(attribute) {\n return this.attributeMap[attribute] || (this.hasParent ? this.parent.mapAttribute(attribute) : null);\n };\n\n ViewResources.prototype.registerAttribute = function registerAttribute(attribute, behavior, knownAttribute) {\n this.attributeMap[attribute] = knownAttribute;\n register(this.attributes, attribute, behavior, 'an Attribute');\n };\n\n ViewResources.prototype.getAttribute = function getAttribute(attribute) {\n return this.attributes[attribute] || (this.hasParent ? this.parent.getAttribute(attribute) : null);\n };\n\n ViewResources.prototype.registerValueConverter = function registerValueConverter(name, valueConverter) {\n register(this.valueConverters, name, valueConverter, 'a ValueConverter');\n };\n\n ViewResources.prototype.getValueConverter = function getValueConverter(name) {\n return this.valueConverters[name] || (this.hasParent ? this.parent.getValueConverter(name) : null);\n };\n\n ViewResources.prototype.registerBindingBehavior = function registerBindingBehavior(name, bindingBehavior) {\n register(this.bindingBehaviors, name, bindingBehavior, 'a BindingBehavior');\n };\n\n ViewResources.prototype.getBindingBehavior = function getBindingBehavior(name) {\n return this.bindingBehaviors[name] || (this.hasParent ? this.parent.getBindingBehavior(name) : null);\n };\n\n ViewResources.prototype.registerValue = function registerValue(name, value) {\n register(this.values, name, value, 'a value');\n };\n\n ViewResources.prototype.getValue = function getValue(name) {\n return this.values[name] || (this.hasParent ? this.parent.getValue(name) : null);\n };\n\n ViewResources.prototype.autoRegister = function autoRegister(container, impl) {\n var resourceTypeMeta = metadata.getOwn(metadata.resource, impl);\n if (resourceTypeMeta) {\n if (resourceTypeMeta instanceof HtmlBehaviorResource) {\n ViewResources.convention(impl, resourceTypeMeta);\n\n if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n HtmlBehaviorResource.convention(impl.name, resourceTypeMeta);\n }\n if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n resourceTypeMeta.elementName = _hyphenate(impl.name);\n }\n }\n } else {\n resourceTypeMeta = ViewResources.convention(impl) || HtmlBehaviorResource.convention(impl.name) || ValueConverterResource.convention(impl.name) || BindingBehaviorResource.convention(impl.name) || ViewEngineHooksResource.convention(impl.name);\n if (!resourceTypeMeta) {\n resourceTypeMeta = new HtmlBehaviorResource();\n resourceTypeMeta.elementName = _hyphenate(impl.name);\n }\n metadata.define(metadata.resource, resourceTypeMeta, impl);\n }\n resourceTypeMeta.initialize(container, impl);\n resourceTypeMeta.register(this);\n return resourceTypeMeta;\n };\n\n return ViewResources;\n}();\n\nexport var View = function () {\n function View(container, viewFactory, fragment, controllers, bindings, children, slots) {\n \n\n this.container = container;\n this.viewFactory = viewFactory;\n this.resources = viewFactory.resources;\n this.fragment = fragment;\n this.firstChild = fragment.firstChild;\n this.lastChild = fragment.lastChild;\n this.controllers = controllers;\n this.bindings = bindings;\n this.children = children;\n this.slots = slots;\n this.hasSlots = false;\n this.fromCache = false;\n this.isBound = false;\n this.isAttached = false;\n this.bindingContext = null;\n this.overrideContext = null;\n this.controller = null;\n this.viewModelScope = null;\n this.animatableElement = undefined;\n this._isUserControlled = false;\n this.contentView = null;\n\n for (var _key3 in slots) {\n this.hasSlots = true;\n break;\n }\n }\n\n View.prototype.returnToCache = function returnToCache() {\n this.viewFactory.returnViewToCache(this);\n };\n\n View.prototype.created = function created() {\n var i = void 0;\n var ii = void 0;\n var controllers = this.controllers;\n\n for (i = 0, ii = controllers.length; i < ii; ++i) {\n controllers[i].created(this);\n }\n };\n\n View.prototype.bind = function bind(bindingContext, overrideContext, _systemUpdate) {\n var controllers = void 0;\n var bindings = void 0;\n var children = void 0;\n var i = void 0;\n var ii = void 0;\n\n if (_systemUpdate && this._isUserControlled) {\n return;\n }\n\n if (this.isBound) {\n if (this.bindingContext === bindingContext) {\n return;\n }\n\n this.unbind();\n }\n\n this.isBound = true;\n this.bindingContext = bindingContext;\n this.overrideContext = overrideContext || createOverrideContext(bindingContext);\n\n this.resources._invokeHook('beforeBind', this);\n\n bindings = this.bindings;\n for (i = 0, ii = bindings.length; i < ii; ++i) {\n bindings[i].bind(this);\n }\n\n if (this.viewModelScope !== null) {\n bindingContext.bind(this.viewModelScope.bindingContext, this.viewModelScope.overrideContext);\n this.viewModelScope = null;\n }\n\n controllers = this.controllers;\n for (i = 0, ii = controllers.length; i < ii; ++i) {\n controllers[i].bind(this);\n }\n\n children = this.children;\n for (i = 0, ii = children.length; i < ii; ++i) {\n children[i].bind(bindingContext, overrideContext, true);\n }\n\n if (this.hasSlots) {\n ShadowDOM.distributeView(this.contentView, this.slots);\n }\n };\n\n View.prototype.addBinding = function addBinding(binding) {\n this.bindings.push(binding);\n\n if (this.isBound) {\n binding.bind(this);\n }\n };\n\n View.prototype.unbind = function unbind() {\n var controllers = void 0;\n var bindings = void 0;\n var children = void 0;\n var i = void 0;\n var ii = void 0;\n\n if (this.isBound) {\n this.isBound = false;\n this.resources._invokeHook('beforeUnbind', this);\n\n if (this.controller !== null) {\n this.controller.unbind();\n }\n\n bindings = this.bindings;\n for (i = 0, ii = bindings.length; i < ii; ++i) {\n bindings[i].unbind();\n }\n\n controllers = this.controllers;\n for (i = 0, ii = controllers.length; i < ii; ++i) {\n controllers[i].unbind();\n }\n\n children = this.children;\n for (i = 0, ii = children.length; i < ii; ++i) {\n children[i].unbind();\n }\n\n this.bindingContext = null;\n this.overrideContext = null;\n }\n };\n\n View.prototype.insertNodesBefore = function insertNodesBefore(refNode) {\n refNode.parentNode.insertBefore(this.fragment, refNode);\n };\n\n View.prototype.appendNodesTo = function appendNodesTo(parent) {\n parent.appendChild(this.fragment);\n };\n\n View.prototype.removeNodes = function removeNodes() {\n var fragment = this.fragment;\n var current = this.firstChild;\n var end = this.lastChild;\n var next = void 0;\n\n while (current) {\n next = current.nextSibling;\n fragment.appendChild(current);\n\n if (current === end) {\n break;\n }\n\n current = next;\n }\n };\n\n View.prototype.attached = function attached() {\n var controllers = void 0;\n var children = void 0;\n var i = void 0;\n var ii = void 0;\n\n if (this.isAttached) {\n return;\n }\n\n this.isAttached = true;\n\n if (this.controller !== null) {\n this.controller.attached();\n }\n\n controllers = this.controllers;\n for (i = 0, ii = controllers.length; i < ii; ++i) {\n controllers[i].attached();\n }\n\n children = this.children;\n for (i = 0, ii = children.length; i < ii; ++i) {\n children[i].attached();\n }\n };\n\n View.prototype.detached = function detached() {\n var controllers = void 0;\n var children = void 0;\n var i = void 0;\n var ii = void 0;\n\n if (this.isAttached) {\n this.isAttached = false;\n\n if (this.controller !== null) {\n this.controller.detached();\n }\n\n controllers = this.controllers;\n for (i = 0, ii = controllers.length; i < ii; ++i) {\n controllers[i].detached();\n }\n\n children = this.children;\n for (i = 0, ii = children.length; i < ii; ++i) {\n children[i].detached();\n }\n }\n };\n\n return View;\n}();\n\nfunction getAnimatableElement(view) {\n if (view.animatableElement !== undefined) {\n return view.animatableElement;\n }\n\n var current = view.firstChild;\n\n while (current && current.nodeType !== 1) {\n current = current.nextSibling;\n }\n\n if (current && current.nodeType === 1) {\n return view.animatableElement = current.classList.contains('au-animate') ? current : null;\n }\n\n return view.animatableElement = null;\n}\n\nexport var ViewSlot = function () {\n function ViewSlot(anchor, anchorIsContainer) {\n var animator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : Animator.instance;\n\n \n\n this.anchor = anchor;\n this.anchorIsContainer = anchorIsContainer;\n this.bindingContext = null;\n this.overrideContext = null;\n this.animator = animator;\n this.children = [];\n this.isBound = false;\n this.isAttached = false;\n this.contentSelectors = null;\n anchor.viewSlot = this;\n anchor.isContentProjectionSource = false;\n }\n\n ViewSlot.prototype.animateView = function animateView(view) {\n var direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'enter';\n\n var animatableElement = getAnimatableElement(view);\n\n if (animatableElement !== null) {\n switch (direction) {\n case 'enter':\n return this.animator.enter(animatableElement);\n case 'leave':\n return this.animator.leave(animatableElement);\n default:\n throw new Error('Invalid animation direction: ' + direction);\n }\n }\n };\n\n ViewSlot.prototype.transformChildNodesIntoView = function transformChildNodesIntoView() {\n var parent = this.anchor;\n\n this.children.push({\n fragment: parent,\n firstChild: parent.firstChild,\n lastChild: parent.lastChild,\n returnToCache: function returnToCache() {},\n removeNodes: function removeNodes() {\n var last = void 0;\n\n while (last = parent.lastChild) {\n parent.removeChild(last);\n }\n },\n created: function created() {},\n bind: function bind() {},\n unbind: function unbind() {},\n attached: function attached() {},\n detached: function detached() {}\n });\n };\n\n ViewSlot.prototype.bind = function bind(bindingContext, overrideContext) {\n var i = void 0;\n var ii = void 0;\n var children = void 0;\n\n if (this.isBound) {\n if (this.bindingContext === bindingContext) {\n return;\n }\n\n this.unbind();\n }\n\n this.isBound = true;\n this.bindingContext = bindingContext = bindingContext || this.bindingContext;\n this.overrideContext = overrideContext = overrideContext || this.overrideContext;\n\n children = this.children;\n for (i = 0, ii = children.length; i < ii; ++i) {\n children[i].bind(bindingContext, overrideContext, true);\n }\n };\n\n ViewSlot.prototype.unbind = function unbind() {\n if (this.isBound) {\n var i = void 0;\n var ii = void 0;\n var _children4 = this.children;\n\n this.isBound = false;\n this.bindingContext = null;\n this.overrideContext = null;\n\n for (i = 0, ii = _children4.length; i < ii; ++i) {\n _children4[i].unbind();\n }\n }\n };\n\n ViewSlot.prototype.add = function add(view) {\n if (this.anchorIsContainer) {\n view.appendNodesTo(this.anchor);\n } else {\n view.insertNodesBefore(this.anchor);\n }\n\n this.children.push(view);\n\n if (this.isAttached) {\n view.attached();\n return this.animateView(view, 'enter');\n }\n };\n\n ViewSlot.prototype.insert = function insert(index, view) {\n var children = this.children;\n var length = children.length;\n\n if (index === 0 && length === 0 || index >= length) {\n return this.add(view);\n }\n\n view.insertNodesBefore(children[index].firstChild);\n children.splice(index, 0, view);\n\n if (this.isAttached) {\n view.attached();\n return this.animateView(view, 'enter');\n }\n };\n\n ViewSlot.prototype.move = function move(sourceIndex, targetIndex) {\n if (sourceIndex === targetIndex) {\n return;\n }\n\n var children = this.children;\n var view = children[sourceIndex];\n\n view.removeNodes();\n view.insertNodesBefore(children[targetIndex].firstChild);\n children.splice(sourceIndex, 1);\n children.splice(targetIndex, 0, view);\n };\n\n ViewSlot.prototype.remove = function remove(view, returnToCache, skipAnimation) {\n return this.removeAt(this.children.indexOf(view), returnToCache, skipAnimation);\n };\n\n ViewSlot.prototype.removeMany = function removeMany(viewsToRemove, returnToCache, skipAnimation) {\n var _this3 = this;\n\n var children = this.children;\n var ii = viewsToRemove.length;\n var i = void 0;\n var rmPromises = [];\n\n viewsToRemove.forEach(function (child) {\n if (skipAnimation) {\n child.removeNodes();\n return;\n }\n\n var animation = _this3.animateView(child, 'leave');\n if (animation) {\n rmPromises.push(animation.then(function () {\n return child.removeNodes();\n }));\n } else {\n child.removeNodes();\n }\n });\n\n var removeAction = function removeAction() {\n if (_this3.isAttached) {\n for (i = 0; i < ii; ++i) {\n viewsToRemove[i].detached();\n }\n }\n\n if (returnToCache) {\n for (i = 0; i < ii; ++i) {\n viewsToRemove[i].returnToCache();\n }\n }\n\n for (i = 0; i < ii; ++i) {\n var index = children.indexOf(viewsToRemove[i]);\n if (index >= 0) {\n children.splice(index, 1);\n }\n }\n };\n\n if (rmPromises.length > 0) {\n return Promise.all(rmPromises).then(function () {\n return removeAction();\n });\n }\n\n return removeAction();\n };\n\n ViewSlot.prototype.removeAt = function removeAt(index, returnToCache, skipAnimation) {\n var _this4 = this;\n\n var view = this.children[index];\n\n var removeAction = function removeAction() {\n index = _this4.children.indexOf(view);\n view.removeNodes();\n _this4.children.splice(index, 1);\n\n if (_this4.isAttached) {\n view.detached();\n }\n\n if (returnToCache) {\n view.returnToCache();\n }\n\n return view;\n };\n\n if (!skipAnimation) {\n var animation = this.animateView(view, 'leave');\n if (animation) {\n return animation.then(function () {\n return removeAction();\n });\n }\n }\n\n return removeAction();\n };\n\n ViewSlot.prototype.removeAll = function removeAll(returnToCache, skipAnimation) {\n var _this5 = this;\n\n var children = this.children;\n var ii = children.length;\n var i = void 0;\n var rmPromises = [];\n\n children.forEach(function (child) {\n if (skipAnimation) {\n child.removeNodes();\n return;\n }\n\n var animation = _this5.animateView(child, 'leave');\n if (animation) {\n rmPromises.push(animation.then(function () {\n return child.removeNodes();\n }));\n } else {\n child.removeNodes();\n }\n });\n\n var removeAction = function removeAction() {\n if (_this5.isAttached) {\n for (i = 0; i < ii; ++i) {\n children[i].detached();\n }\n }\n\n if (returnToCache) {\n for (i = 0; i < ii; ++i) {\n var _child3 = children[i];\n\n if (_child3) {\n _child3.returnToCache();\n }\n }\n }\n\n _this5.children = [];\n };\n\n if (rmPromises.length > 0) {\n return Promise.all(rmPromises).then(function () {\n return removeAction();\n });\n }\n\n return removeAction();\n };\n\n ViewSlot.prototype.attached = function attached() {\n var i = void 0;\n var ii = void 0;\n var children = void 0;\n var child = void 0;\n\n if (this.isAttached) {\n return;\n }\n\n this.isAttached = true;\n\n children = this.children;\n for (i = 0, ii = children.length; i < ii; ++i) {\n child = children[i];\n child.attached();\n this.animateView(child, 'enter');\n }\n };\n\n ViewSlot.prototype.detached = function detached() {\n var i = void 0;\n var ii = void 0;\n var children = void 0;\n\n if (this.isAttached) {\n this.isAttached = false;\n children = this.children;\n for (i = 0, ii = children.length; i < ii; ++i) {\n children[i].detached();\n }\n }\n };\n\n ViewSlot.prototype.projectTo = function projectTo(slots) {\n var _this6 = this;\n\n this.projectToSlots = slots;\n this.add = this._projectionAdd;\n this.insert = this._projectionInsert;\n this.move = this._projectionMove;\n this.remove = this._projectionRemove;\n this.removeAt = this._projectionRemoveAt;\n this.removeMany = this._projectionRemoveMany;\n this.removeAll = this._projectionRemoveAll;\n this.children.forEach(function (view) {\n return ShadowDOM.distributeView(view, slots, _this6);\n });\n };\n\n ViewSlot.prototype._projectionAdd = function _projectionAdd(view) {\n ShadowDOM.distributeView(view, this.projectToSlots, this);\n\n this.children.push(view);\n\n if (this.isAttached) {\n view.attached();\n }\n };\n\n ViewSlot.prototype._projectionInsert = function _projectionInsert(index, view) {\n if (index === 0 && !this.children.length || index >= this.children.length) {\n this.add(view);\n } else {\n ShadowDOM.distributeView(view, this.projectToSlots, this, index);\n\n this.children.splice(index, 0, view);\n\n if (this.isAttached) {\n view.attached();\n }\n }\n };\n\n ViewSlot.prototype._projectionMove = function _projectionMove(sourceIndex, targetIndex) {\n if (sourceIndex === targetIndex) {\n return;\n }\n\n var children = this.children;\n var view = children[sourceIndex];\n\n ShadowDOM.undistributeView(view, this.projectToSlots, this);\n ShadowDOM.distributeView(view, this.projectToSlots, this, targetIndex);\n\n children.splice(sourceIndex, 1);\n children.splice(targetIndex, 0, view);\n };\n\n ViewSlot.prototype._projectionRemove = function _projectionRemove(view, returnToCache) {\n ShadowDOM.undistributeView(view, this.projectToSlots, this);\n this.children.splice(this.children.indexOf(view), 1);\n\n if (this.isAttached) {\n view.detached();\n }\n if (returnToCache) {\n view.returnToCache();\n }\n };\n\n ViewSlot.prototype._projectionRemoveAt = function _projectionRemoveAt(index, returnToCache) {\n var view = this.children[index];\n\n ShadowDOM.undistributeView(view, this.projectToSlots, this);\n this.children.splice(index, 1);\n\n if (this.isAttached) {\n view.detached();\n }\n if (returnToCache) {\n view.returnToCache();\n }\n };\n\n ViewSlot.prototype._projectionRemoveMany = function _projectionRemoveMany(viewsToRemove, returnToCache) {\n var _this7 = this;\n\n viewsToRemove.forEach(function (view) {\n return _this7.remove(view, returnToCache);\n });\n };\n\n ViewSlot.prototype._projectionRemoveAll = function _projectionRemoveAll(returnToCache) {\n ShadowDOM.undistributeAll(this.projectToSlots, this);\n\n var children = this.children;\n var ii = children.length;\n\n for (var i = 0; i < ii; ++i) {\n if (returnToCache) {\n children[i].returnToCache();\n } else if (this.isAttached) {\n children[i].detached();\n }\n }\n\n this.children = [];\n };\n\n return ViewSlot;\n}();\n\nvar ProviderResolver = resolver(_class12 = function () {\n function ProviderResolver() {\n \n }\n\n ProviderResolver.prototype.get = function get(container, key) {\n var id = key.__providerId__;\n return id in container ? container[id] : container[id] = container.invoke(key);\n };\n\n return ProviderResolver;\n}()) || _class12;\n\nvar providerResolverInstance = new ProviderResolver();\n\nfunction elementContainerGet(key) {\n if (key === DOM.Element) {\n return this.element;\n }\n\n if (key === BoundViewFactory) {\n if (this.boundViewFactory) {\n return this.boundViewFactory;\n }\n\n var factory = this.instruction.viewFactory;\n var _partReplacements = this.partReplacements;\n\n if (_partReplacements) {\n factory = _partReplacements[factory.part] || factory;\n }\n\n this.boundViewFactory = new BoundViewFactory(this, factory, _partReplacements);\n return this.boundViewFactory;\n }\n\n if (key === ViewSlot) {\n if (this.viewSlot === undefined) {\n this.viewSlot = new ViewSlot(this.element, this.instruction.anchorIsContainer);\n this.element.isContentProjectionSource = this.instruction.lifting;\n this.children.push(this.viewSlot);\n }\n\n return this.viewSlot;\n }\n\n if (key === ElementEvents) {\n return this.elementEvents || (this.elementEvents = new ElementEvents(this.element));\n }\n\n if (key === CompositionTransaction) {\n return this.compositionTransaction || (this.compositionTransaction = this.parent.get(key));\n }\n\n if (key === ViewResources) {\n return this.viewResources;\n }\n\n if (key === TargetInstruction) {\n return this.instruction;\n }\n\n return this.superGet(key);\n}\n\nfunction createElementContainer(parent, element, instruction, children, partReplacements, resources) {\n var container = parent.createChild();\n var providers = void 0;\n var i = void 0;\n\n container.element = element;\n container.instruction = instruction;\n container.children = children;\n container.viewResources = resources;\n container.partReplacements = partReplacements;\n\n providers = instruction.providers;\n i = providers.length;\n\n while (i--) {\n container._resolvers.set(providers[i], providerResolverInstance);\n }\n\n container.superGet = container.get;\n container.get = elementContainerGet;\n\n return container;\n}\n\nfunction hasAttribute(name) {\n return this._element.hasAttribute(name);\n}\n\nfunction getAttribute(name) {\n return this._element.getAttribute(name);\n}\n\nfunction setAttribute(name, value) {\n this._element.setAttribute(name, value);\n}\n\nfunction makeElementIntoAnchor(element, elementInstruction) {\n var anchor = DOM.createComment('anchor');\n\n if (elementInstruction) {\n var firstChild = element.firstChild;\n\n if (firstChild && firstChild.tagName === 'AU-CONTENT') {\n anchor.contentElement = firstChild;\n }\n\n anchor._element = element;\n\n anchor.hasAttribute = hasAttribute;\n anchor.getAttribute = getAttribute;\n anchor.setAttribute = setAttribute;\n }\n\n DOM.replaceNode(anchor, element);\n\n return anchor;\n}\n\nfunction applyInstructions(containers, element, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources) {\n var behaviorInstructions = instruction.behaviorInstructions;\n var expressions = instruction.expressions;\n var elementContainer = void 0;\n var i = void 0;\n var ii = void 0;\n var current = void 0;\n var instance = void 0;\n\n if (instruction.contentExpression) {\n bindings.push(instruction.contentExpression.createBinding(element.nextSibling));\n element.nextSibling.auInterpolationTarget = true;\n element.parentNode.removeChild(element);\n return;\n }\n\n if (instruction.shadowSlot) {\n var commentAnchor = DOM.createComment('slot');\n var slot = void 0;\n\n if (instruction.slotDestination) {\n slot = new PassThroughSlot(commentAnchor, instruction.slotName, instruction.slotDestination, instruction.slotFallbackFactory);\n } else {\n slot = new ShadowSlot(commentAnchor, instruction.slotName, instruction.slotFallbackFactory);\n }\n\n DOM.replaceNode(commentAnchor, element);\n shadowSlots[instruction.slotName] = slot;\n controllers.push(slot);\n return;\n }\n\n if (instruction.letElement) {\n for (i = 0, ii = expressions.length; i < ii; ++i) {\n bindings.push(expressions[i].createBinding());\n }\n element.parentNode.removeChild(element);\n return;\n }\n\n if (behaviorInstructions.length) {\n if (!instruction.anchorIsContainer) {\n element = makeElementIntoAnchor(element, instruction.elementInstruction);\n }\n\n containers[instruction.injectorId] = elementContainer = createElementContainer(containers[instruction.parentInjectorId], element, instruction, children, partReplacements, resources);\n\n for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {\n current = behaviorInstructions[i];\n instance = current.type.create(elementContainer, current, element, bindings);\n controllers.push(instance);\n }\n }\n\n for (i = 0, ii = expressions.length; i < ii; ++i) {\n bindings.push(expressions[i].createBinding(element));\n }\n}\n\nfunction styleStringToObject(style, target) {\n var attributes = style.split(';');\n var firstIndexOfColon = void 0;\n var i = void 0;\n var current = void 0;\n var key = void 0;\n var value = void 0;\n\n target = target || {};\n\n for (i = 0; i < attributes.length; i++) {\n current = attributes[i];\n firstIndexOfColon = current.indexOf(':');\n key = current.substring(0, firstIndexOfColon).trim();\n value = current.substring(firstIndexOfColon + 1).trim();\n target[key] = value;\n }\n\n return target;\n}\n\nfunction styleObjectToString(obj) {\n var result = '';\n\n for (var _key4 in obj) {\n result += _key4 + ':' + obj[_key4] + ';';\n }\n\n return result;\n}\n\nfunction applySurrogateInstruction(container, element, instruction, controllers, bindings, children) {\n var behaviorInstructions = instruction.behaviorInstructions;\n var expressions = instruction.expressions;\n var providers = instruction.providers;\n var values = instruction.values;\n var i = void 0;\n var ii = void 0;\n var current = void 0;\n var instance = void 0;\n var currentAttributeValue = void 0;\n\n i = providers.length;\n while (i--) {\n container._resolvers.set(providers[i], providerResolverInstance);\n }\n\n for (var _key5 in values) {\n currentAttributeValue = element.getAttribute(_key5);\n\n if (currentAttributeValue) {\n if (_key5 === 'class') {\n element.setAttribute('class', currentAttributeValue + ' ' + values[_key5]);\n } else if (_key5 === 'style') {\n var styleObject = styleStringToObject(values[_key5]);\n styleStringToObject(currentAttributeValue, styleObject);\n element.setAttribute('style', styleObjectToString(styleObject));\n }\n } else {\n element.setAttribute(_key5, values[_key5]);\n }\n }\n\n if (behaviorInstructions.length) {\n for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {\n current = behaviorInstructions[i];\n instance = current.type.create(container, current, element, bindings);\n\n if (instance.contentView) {\n children.push(instance.contentView);\n }\n\n controllers.push(instance);\n }\n }\n\n for (i = 0, ii = expressions.length; i < ii; ++i) {\n bindings.push(expressions[i].createBinding(element));\n }\n}\n\nexport var BoundViewFactory = function () {\n function BoundViewFactory(parentContainer, viewFactory, partReplacements) {\n \n\n this.parentContainer = parentContainer;\n this.viewFactory = viewFactory;\n this.factoryCreateInstruction = { partReplacements: partReplacements };\n }\n\n BoundViewFactory.prototype.create = function create() {\n var view = this.viewFactory.create(this.parentContainer.createChild(), this.factoryCreateInstruction);\n view._isUserControlled = true;\n return view;\n };\n\n BoundViewFactory.prototype.setCacheSize = function setCacheSize(size, doNotOverrideIfAlreadySet) {\n this.viewFactory.setCacheSize(size, doNotOverrideIfAlreadySet);\n };\n\n BoundViewFactory.prototype.getCachedView = function getCachedView() {\n return this.viewFactory.getCachedView();\n };\n\n BoundViewFactory.prototype.returnViewToCache = function returnViewToCache(view) {\n this.viewFactory.returnViewToCache(view);\n };\n\n _createClass(BoundViewFactory, [{\n key: 'isCaching',\n get: function get() {\n return this.viewFactory.isCaching;\n }\n }]);\n\n return BoundViewFactory;\n}();\n\nexport var ViewFactory = function () {\n function ViewFactory(template, instructions, resources) {\n \n\n this.isCaching = false;\n\n this.template = template;\n this.instructions = instructions;\n this.resources = resources;\n this.cacheSize = -1;\n this.cache = null;\n }\n\n ViewFactory.prototype.setCacheSize = function setCacheSize(size, doNotOverrideIfAlreadySet) {\n if (size) {\n if (size === '*') {\n size = Number.MAX_VALUE;\n } else if (typeof size === 'string') {\n size = parseInt(size, 10);\n }\n }\n\n if (this.cacheSize === -1 || !doNotOverrideIfAlreadySet) {\n this.cacheSize = size;\n }\n\n if (this.cacheSize > 0) {\n this.cache = [];\n } else {\n this.cache = null;\n }\n\n this.isCaching = this.cacheSize > 0;\n };\n\n ViewFactory.prototype.getCachedView = function getCachedView() {\n return this.cache !== null ? this.cache.pop() || null : null;\n };\n\n ViewFactory.prototype.returnViewToCache = function returnViewToCache(view) {\n if (view.isAttached) {\n view.detached();\n }\n\n if (view.isBound) {\n view.unbind();\n }\n\n if (this.cache !== null && this.cache.length < this.cacheSize) {\n view.fromCache = true;\n this.cache.push(view);\n }\n };\n\n ViewFactory.prototype.create = function create(container, createInstruction, element) {\n createInstruction = createInstruction || BehaviorInstruction.normal;\n\n var cachedView = this.getCachedView();\n if (cachedView !== null) {\n return cachedView;\n }\n\n var fragment = createInstruction.enhance ? this.template : this.template.cloneNode(true);\n var instructables = fragment.querySelectorAll('.au-target');\n var instructions = this.instructions;\n var resources = this.resources;\n var controllers = [];\n var bindings = [];\n var children = [];\n var shadowSlots = Object.create(null);\n var containers = { root: container };\n var partReplacements = createInstruction.partReplacements;\n var i = void 0;\n var ii = void 0;\n var view = void 0;\n var instructable = void 0;\n var instruction = void 0;\n\n this.resources._invokeHook('beforeCreate', this, container, fragment, createInstruction);\n\n if (element && this.surrogateInstruction !== null) {\n applySurrogateInstruction(container, element, this.surrogateInstruction, controllers, bindings, children);\n }\n\n if (createInstruction.enhance && fragment.hasAttribute('au-target-id')) {\n instructable = fragment;\n instruction = instructions[instructable.getAttribute('au-target-id')];\n applyInstructions(containers, instructable, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources);\n }\n\n for (i = 0, ii = instructables.length; i < ii; ++i) {\n instructable = instructables[i];\n instruction = instructions[instructable.getAttribute('au-target-id')];\n applyInstructions(containers, instructable, instruction, controllers, bindings, children, shadowSlots, partReplacements, resources);\n }\n\n view = new View(container, this, fragment, controllers, bindings, children, shadowSlots);\n\n if (!createInstruction.initiatedByBehavior) {\n view.created();\n }\n\n this.resources._invokeHook('afterCreate', view);\n\n return view;\n };\n\n return ViewFactory;\n}();\n\nvar nextInjectorId = 0;\nfunction getNextInjectorId() {\n return ++nextInjectorId;\n}\n\nvar lastAUTargetID = 0;\nfunction getNextAUTargetID() {\n return (++lastAUTargetID).toString();\n}\n\nfunction makeIntoInstructionTarget(element) {\n var value = element.getAttribute('class');\n var auTargetID = getNextAUTargetID();\n\n element.setAttribute('class', value ? value + ' au-target' : 'au-target');\n element.setAttribute('au-target-id', auTargetID);\n\n return auTargetID;\n}\n\nfunction makeShadowSlot(compiler, resources, node, instructions, parentInjectorId) {\n var auShadowSlot = DOM.createElement('au-shadow-slot');\n DOM.replaceNode(auShadowSlot, node);\n\n var auTargetID = makeIntoInstructionTarget(auShadowSlot);\n var instruction = TargetInstruction.shadowSlot(parentInjectorId);\n\n instruction.slotName = node.getAttribute('name') || ShadowDOM.defaultSlotKey;\n instruction.slotDestination = node.getAttribute('slot');\n\n if (node.innerHTML.trim()) {\n var fragment = DOM.createDocumentFragment();\n var _child4 = void 0;\n\n while (_child4 = node.firstChild) {\n fragment.appendChild(_child4);\n }\n\n instruction.slotFallbackFactory = compiler.compile(fragment, resources);\n }\n\n instructions[auTargetID] = instruction;\n\n return auShadowSlot;\n}\n\nvar defaultLetHandler = BindingLanguage.prototype.createLetExpressions;\n\nexport var ViewCompiler = function () {\n ViewCompiler.inject = function inject() {\n return [BindingLanguage, ViewResources];\n };\n\n function ViewCompiler(bindingLanguage, resources) {\n \n\n this.bindingLanguage = bindingLanguage;\n this.resources = resources;\n }\n\n ViewCompiler.prototype.compile = function compile(source, resources, compileInstruction) {\n resources = resources || this.resources;\n compileInstruction = compileInstruction || ViewCompileInstruction.normal;\n source = typeof source === 'string' ? DOM.createTemplateFromMarkup(source) : source;\n\n var content = void 0;\n var part = void 0;\n var cacheSize = void 0;\n\n if (source.content) {\n part = source.getAttribute('part');\n cacheSize = source.getAttribute('view-cache');\n content = DOM.adoptNode(source.content);\n } else {\n content = source;\n }\n\n compileInstruction.targetShadowDOM = compileInstruction.targetShadowDOM && FEATURE.shadowDOM;\n resources._invokeHook('beforeCompile', content, resources, compileInstruction);\n\n var instructions = {};\n this._compileNode(content, resources, instructions, source, 'root', !compileInstruction.targetShadowDOM);\n\n var firstChild = content.firstChild;\n if (firstChild && firstChild.nodeType === 1) {\n var targetId = firstChild.getAttribute('au-target-id');\n if (targetId) {\n var ins = instructions[targetId];\n\n if (ins.shadowSlot || ins.lifting || ins.elementInstruction && !ins.elementInstruction.anchorIsContainer) {\n content.insertBefore(DOM.createComment('view'), firstChild);\n }\n }\n }\n\n var factory = new ViewFactory(content, instructions, resources);\n\n factory.surrogateInstruction = compileInstruction.compileSurrogate ? this._compileSurrogate(source, resources) : null;\n factory.part = part;\n\n if (cacheSize) {\n factory.setCacheSize(cacheSize);\n }\n\n resources._invokeHook('afterCompile', factory);\n\n return factory;\n };\n\n ViewCompiler.prototype._compileNode = function _compileNode(node, resources, instructions, parentNode, parentInjectorId, targetLightDOM) {\n switch (node.nodeType) {\n case 1:\n return this._compileElement(node, resources, instructions, parentNode, parentInjectorId, targetLightDOM);\n case 3:\n var expression = resources.getBindingLanguage(this.bindingLanguage).inspectTextContent(resources, node.wholeText);\n if (expression) {\n var marker = DOM.createElement('au-marker');\n var auTargetID = makeIntoInstructionTarget(marker);\n (node.parentNode || parentNode).insertBefore(marker, node);\n node.textContent = ' ';\n instructions[auTargetID] = TargetInstruction.contentExpression(expression);\n\n while (node.nextSibling && node.nextSibling.nodeType === 3) {\n (node.parentNode || parentNode).removeChild(node.nextSibling);\n }\n } else {\n while (node.nextSibling && node.nextSibling.nodeType === 3) {\n node = node.nextSibling;\n }\n }\n return node.nextSibling;\n case 11:\n var currentChild = node.firstChild;\n while (currentChild) {\n currentChild = this._compileNode(currentChild, resources, instructions, node, parentInjectorId, targetLightDOM);\n }\n break;\n default:\n break;\n }\n\n return node.nextSibling;\n };\n\n ViewCompiler.prototype._compileSurrogate = function _compileSurrogate(node, resources) {\n var tagName = node.tagName.toLowerCase();\n var attributes = node.attributes;\n var bindingLanguage = resources.getBindingLanguage(this.bindingLanguage);\n var knownAttribute = void 0;\n var property = void 0;\n var instruction = void 0;\n var i = void 0;\n var ii = void 0;\n var attr = void 0;\n var attrName = void 0;\n var attrValue = void 0;\n var info = void 0;\n var type = void 0;\n var expressions = [];\n var expression = void 0;\n var behaviorInstructions = [];\n var values = {};\n var hasValues = false;\n var providers = [];\n\n for (i = 0, ii = attributes.length; i < ii; ++i) {\n attr = attributes[i];\n attrName = attr.name;\n attrValue = attr.value;\n\n info = bindingLanguage.inspectAttribute(resources, tagName, attrName, attrValue);\n type = resources.getAttribute(info.attrName);\n\n if (type) {\n knownAttribute = resources.mapAttribute(info.attrName);\n if (knownAttribute) {\n property = type.attributes[knownAttribute];\n\n if (property) {\n info.defaultBindingMode = property.defaultBindingMode;\n\n if (!info.command && !info.expression) {\n info.command = property.hasOptions ? 'options' : null;\n }\n\n if (info.command && info.command !== 'options' && type.primaryProperty) {\n var _primaryProperty = type.primaryProperty;\n attrName = info.attrName = _primaryProperty.attribute;\n\n info.defaultBindingMode = _primaryProperty.defaultBindingMode;\n }\n }\n }\n }\n\n instruction = bindingLanguage.createAttributeInstruction(resources, node, info, undefined, type);\n\n if (instruction) {\n if (instruction.alteredAttr) {\n type = resources.getAttribute(instruction.attrName);\n }\n\n if (instruction.discrete) {\n expressions.push(instruction);\n } else {\n if (type) {\n instruction.type = type;\n this._configureProperties(instruction, resources);\n\n if (type.liftsContent) {\n throw new Error('You cannot place a template controller on a surrogate element.');\n } else {\n behaviorInstructions.push(instruction);\n }\n } else {\n expressions.push(instruction.attributes[instruction.attrName]);\n }\n }\n } else {\n if (type) {\n instruction = BehaviorInstruction.attribute(attrName, type);\n instruction.attributes[resources.mapAttribute(attrName)] = attrValue;\n\n if (type.liftsContent) {\n throw new Error('You cannot place a template controller on a surrogate element.');\n } else {\n behaviorInstructions.push(instruction);\n }\n } else if (attrName !== 'id' && attrName !== 'part' && attrName !== 'replace-part') {\n hasValues = true;\n values[attrName] = attrValue;\n }\n }\n }\n\n if (expressions.length || behaviorInstructions.length || hasValues) {\n for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {\n instruction = behaviorInstructions[i];\n instruction.type.compile(this, resources, node, instruction);\n providers.push(instruction.type.target);\n }\n\n for (i = 0, ii = expressions.length; i < ii; ++i) {\n expression = expressions[i];\n if (expression.attrToRemove !== undefined) {\n node.removeAttribute(expression.attrToRemove);\n }\n }\n\n return TargetInstruction.surrogate(providers, behaviorInstructions, expressions, values);\n }\n\n return null;\n };\n\n ViewCompiler.prototype._compileElement = function _compileElement(node, resources, instructions, parentNode, parentInjectorId, targetLightDOM) {\n var tagName = node.tagName.toLowerCase();\n var attributes = node.attributes;\n var expressions = [];\n var expression = void 0;\n var behaviorInstructions = [];\n var providers = [];\n var bindingLanguage = resources.getBindingLanguage(this.bindingLanguage);\n var liftingInstruction = void 0;\n var viewFactory = void 0;\n var type = void 0;\n var elementInstruction = void 0;\n var elementProperty = void 0;\n var i = void 0;\n var ii = void 0;\n var attr = void 0;\n var attrName = void 0;\n var attrValue = void 0;\n var originalAttrName = void 0;\n var instruction = void 0;\n var info = void 0;\n var property = void 0;\n var knownAttribute = void 0;\n var auTargetID = void 0;\n var injectorId = void 0;\n\n if (tagName === 'slot') {\n if (targetLightDOM) {\n node = makeShadowSlot(this, resources, node, instructions, parentInjectorId);\n }\n return node.nextSibling;\n } else if (tagName === 'template') {\n if (!('content' in node)) {\n throw new Error('You cannot place a template element within ' + node.namespaceURI + ' namespace');\n }\n viewFactory = this.compile(node, resources);\n viewFactory.part = node.getAttribute('part');\n } else {\n type = resources.getElement(node.getAttribute('as-element') || tagName);\n\n if (tagName === 'let' && !type && bindingLanguage.createLetExpressions !== defaultLetHandler) {\n expressions = bindingLanguage.createLetExpressions(resources, node);\n auTargetID = makeIntoInstructionTarget(node);\n instructions[auTargetID] = TargetInstruction.letElement(expressions);\n return node.nextSibling;\n }\n if (type) {\n elementInstruction = BehaviorInstruction.element(node, type);\n type.processAttributes(this, resources, node, attributes, elementInstruction);\n behaviorInstructions.push(elementInstruction);\n }\n }\n\n for (i = 0, ii = attributes.length; i < ii; ++i) {\n attr = attributes[i];\n originalAttrName = attrName = attr.name;\n attrValue = attr.value;\n info = bindingLanguage.inspectAttribute(resources, tagName, attrName, attrValue);\n\n if (targetLightDOM && info.attrName === 'slot') {\n info.attrName = attrName = 'au-slot';\n }\n\n type = resources.getAttribute(info.attrName);\n elementProperty = null;\n\n if (type) {\n knownAttribute = resources.mapAttribute(info.attrName);\n if (knownAttribute) {\n property = type.attributes[knownAttribute];\n\n if (property) {\n info.defaultBindingMode = property.defaultBindingMode;\n\n if (!info.command && !info.expression) {\n info.command = property.hasOptions ? 'options' : null;\n }\n\n if (info.command && info.command !== 'options' && type.primaryProperty) {\n var _primaryProperty2 = type.primaryProperty;\n attrName = info.attrName = _primaryProperty2.attribute;\n\n info.defaultBindingMode = _primaryProperty2.defaultBindingMode;\n }\n }\n }\n } else if (elementInstruction) {\n elementProperty = elementInstruction.type.attributes[info.attrName];\n if (elementProperty) {\n info.defaultBindingMode = elementProperty.defaultBindingMode;\n }\n }\n\n if (elementProperty) {\n instruction = bindingLanguage.createAttributeInstruction(resources, node, info, elementInstruction);\n } else {\n instruction = bindingLanguage.createAttributeInstruction(resources, node, info, undefined, type);\n }\n\n if (instruction) {\n if (instruction.alteredAttr) {\n type = resources.getAttribute(instruction.attrName);\n }\n\n if (instruction.discrete) {\n expressions.push(instruction);\n } else {\n if (type) {\n instruction.type = type;\n this._configureProperties(instruction, resources);\n\n if (type.liftsContent) {\n instruction.originalAttrName = originalAttrName;\n liftingInstruction = instruction;\n break;\n } else {\n behaviorInstructions.push(instruction);\n }\n } else if (elementProperty) {\n elementInstruction.attributes[info.attrName].targetProperty = elementProperty.name;\n } else {\n expressions.push(instruction.attributes[instruction.attrName]);\n }\n }\n } else {\n if (type) {\n instruction = BehaviorInstruction.attribute(attrName, type);\n instruction.attributes[resources.mapAttribute(attrName)] = attrValue;\n\n if (type.liftsContent) {\n instruction.originalAttrName = originalAttrName;\n liftingInstruction = instruction;\n break;\n } else {\n behaviorInstructions.push(instruction);\n }\n } else if (elementProperty) {\n elementInstruction.attributes[attrName] = attrValue;\n }\n }\n }\n\n if (liftingInstruction) {\n liftingInstruction.viewFactory = viewFactory;\n node = liftingInstruction.type.compile(this, resources, node, liftingInstruction, parentNode);\n auTargetID = makeIntoInstructionTarget(node);\n instructions[auTargetID] = TargetInstruction.lifting(parentInjectorId, liftingInstruction);\n } else {\n var skipContentProcessing = false;\n\n if (expressions.length || behaviorInstructions.length) {\n injectorId = behaviorInstructions.length ? getNextInjectorId() : false;\n\n for (i = 0, ii = behaviorInstructions.length; i < ii; ++i) {\n instruction = behaviorInstructions[i];\n instruction.type.compile(this, resources, node, instruction, parentNode);\n providers.push(instruction.type.target);\n skipContentProcessing = skipContentProcessing || instruction.skipContentProcessing;\n }\n\n for (i = 0, ii = expressions.length; i < ii; ++i) {\n expression = expressions[i];\n if (expression.attrToRemove !== undefined) {\n node.removeAttribute(expression.attrToRemove);\n }\n }\n\n auTargetID = makeIntoInstructionTarget(node);\n instructions[auTargetID] = TargetInstruction.normal(injectorId, parentInjectorId, providers, behaviorInstructions, expressions, elementInstruction);\n }\n\n if (skipContentProcessing) {\n return node.nextSibling;\n }\n\n var currentChild = node.firstChild;\n while (currentChild) {\n currentChild = this._compileNode(currentChild, resources, instructions, node, injectorId || parentInjectorId, targetLightDOM);\n }\n }\n\n return node.nextSibling;\n };\n\n ViewCompiler.prototype._configureProperties = function _configureProperties(instruction, resources) {\n var type = instruction.type;\n var attrName = instruction.attrName;\n var attributes = instruction.attributes;\n var property = void 0;\n var key = void 0;\n var value = void 0;\n\n var knownAttribute = resources.mapAttribute(attrName);\n if (knownAttribute && attrName in attributes && knownAttribute !== attrName) {\n attributes[knownAttribute] = attributes[attrName];\n delete attributes[attrName];\n }\n\n for (key in attributes) {\n value = attributes[key];\n\n if (value !== null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {\n property = type.attributes[key];\n\n if (property !== undefined) {\n value.targetProperty = property.name;\n } else {\n value.targetProperty = key;\n }\n }\n }\n };\n\n return ViewCompiler;\n}();\n\nexport var ResourceModule = function () {\n function ResourceModule(moduleId) {\n \n\n this.id = moduleId;\n this.moduleInstance = null;\n this.mainResource = null;\n this.resources = null;\n this.viewStrategy = null;\n this.isInitialized = false;\n this.onLoaded = null;\n this.loadContext = null;\n }\n\n ResourceModule.prototype.initialize = function initialize(container) {\n var current = this.mainResource;\n var resources = this.resources;\n var vs = this.viewStrategy;\n\n if (this.isInitialized) {\n return;\n }\n\n this.isInitialized = true;\n\n if (current !== undefined) {\n current.metadata.viewStrategy = vs;\n current.initialize(container);\n }\n\n for (var i = 0, ii = resources.length; i < ii; ++i) {\n current = resources[i];\n current.metadata.viewStrategy = vs;\n current.initialize(container);\n }\n };\n\n ResourceModule.prototype.register = function register(registry, name) {\n var main = this.mainResource;\n var resources = this.resources;\n\n if (main !== undefined) {\n main.register(registry, name);\n name = null;\n }\n\n for (var i = 0, ii = resources.length; i < ii; ++i) {\n resources[i].register(registry, name);\n name = null;\n }\n };\n\n ResourceModule.prototype.load = function load(container, loadContext) {\n if (this.onLoaded !== null) {\n return this.loadContext === loadContext ? Promise.resolve() : this.onLoaded;\n }\n\n var main = this.mainResource;\n var resources = this.resources;\n var loads = void 0;\n\n if (main !== undefined) {\n loads = new Array(resources.length + 1);\n loads[0] = main.load(container, loadContext);\n for (var i = 0, ii = resources.length; i < ii; ++i) {\n loads[i + 1] = resources[i].load(container, loadContext);\n }\n } else {\n loads = new Array(resources.length);\n for (var _i2 = 0, _ii = resources.length; _i2 < _ii; ++_i2) {\n loads[_i2] = resources[_i2].load(container, loadContext);\n }\n }\n\n this.loadContext = loadContext;\n this.onLoaded = Promise.all(loads);\n return this.onLoaded;\n };\n\n return ResourceModule;\n}();\n\nexport var ResourceDescription = function () {\n function ResourceDescription(key, exportedValue, resourceTypeMeta) {\n \n\n if (!resourceTypeMeta) {\n resourceTypeMeta = metadata.get(metadata.resource, exportedValue);\n\n if (!resourceTypeMeta) {\n resourceTypeMeta = new HtmlBehaviorResource();\n resourceTypeMeta.elementName = _hyphenate(key);\n metadata.define(metadata.resource, resourceTypeMeta, exportedValue);\n }\n }\n\n if (resourceTypeMeta instanceof HtmlBehaviorResource) {\n if (resourceTypeMeta.elementName === undefined) {\n resourceTypeMeta.elementName = _hyphenate(key);\n } else if (resourceTypeMeta.attributeName === undefined) {\n resourceTypeMeta.attributeName = _hyphenate(key);\n } else if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n HtmlBehaviorResource.convention(key, resourceTypeMeta);\n }\n } else if (!resourceTypeMeta.name) {\n resourceTypeMeta.name = _hyphenate(key);\n }\n\n this.metadata = resourceTypeMeta;\n this.value = exportedValue;\n }\n\n ResourceDescription.prototype.initialize = function initialize(container) {\n this.metadata.initialize(container, this.value);\n };\n\n ResourceDescription.prototype.register = function register(registry, name) {\n this.metadata.register(registry, name);\n };\n\n ResourceDescription.prototype.load = function load(container, loadContext) {\n return this.metadata.load(container, this.value, loadContext);\n };\n\n return ResourceDescription;\n}();\n\nexport var ModuleAnalyzer = function () {\n function ModuleAnalyzer() {\n \n\n this.cache = Object.create(null);\n }\n\n ModuleAnalyzer.prototype.getAnalysis = function getAnalysis(moduleId) {\n return this.cache[moduleId];\n };\n\n ModuleAnalyzer.prototype.analyze = function analyze(moduleId, moduleInstance, mainResourceKey) {\n var mainResource = void 0;\n var fallbackValue = void 0;\n var fallbackKey = void 0;\n var resourceTypeMeta = void 0;\n var key = void 0;\n var exportedValue = void 0;\n var resources = [];\n var conventional = void 0;\n var vs = void 0;\n var resourceModule = void 0;\n\n resourceModule = this.cache[moduleId];\n if (resourceModule) {\n return resourceModule;\n }\n\n resourceModule = new ResourceModule(moduleId);\n this.cache[moduleId] = resourceModule;\n\n if (typeof moduleInstance === 'function') {\n moduleInstance = { 'default': moduleInstance };\n }\n\n if (mainResourceKey) {\n mainResource = new ResourceDescription(mainResourceKey, moduleInstance[mainResourceKey]);\n }\n\n for (key in moduleInstance) {\n exportedValue = moduleInstance[key];\n\n if (key === mainResourceKey || typeof exportedValue !== 'function') {\n continue;\n }\n\n resourceTypeMeta = metadata.get(metadata.resource, exportedValue);\n\n if (resourceTypeMeta) {\n if (resourceTypeMeta instanceof HtmlBehaviorResource) {\n ViewResources.convention(exportedValue, resourceTypeMeta);\n\n if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n HtmlBehaviorResource.convention(key, resourceTypeMeta);\n }\n\n if (resourceTypeMeta.attributeName === null && resourceTypeMeta.elementName === null) {\n resourceTypeMeta.elementName = _hyphenate(key);\n }\n }\n\n if (!mainResource && resourceTypeMeta instanceof HtmlBehaviorResource && resourceTypeMeta.elementName !== null) {\n mainResource = new ResourceDescription(key, exportedValue, resourceTypeMeta);\n } else {\n resources.push(new ResourceDescription(key, exportedValue, resourceTypeMeta));\n }\n } else if (viewStrategy.decorates(exportedValue)) {\n vs = exportedValue;\n } else if (exportedValue instanceof TemplateRegistryEntry) {\n vs = new TemplateRegistryViewStrategy(moduleId, exportedValue);\n } else {\n if (conventional = ViewResources.convention(exportedValue)) {\n if (conventional.elementName !== null && !mainResource) {\n mainResource = new ResourceDescription(key, exportedValue, conventional);\n } else {\n resources.push(new ResourceDescription(key, exportedValue, conventional));\n }\n metadata.define(metadata.resource, conventional, exportedValue);\n } else if (conventional = HtmlBehaviorResource.convention(key)) {\n if (conventional.elementName !== null && !mainResource) {\n mainResource = new ResourceDescription(key, exportedValue, conventional);\n } else {\n resources.push(new ResourceDescription(key, exportedValue, conventional));\n }\n\n metadata.define(metadata.resource, conventional, exportedValue);\n } else if (conventional = ValueConverterResource.convention(key) || BindingBehaviorResource.convention(key) || ViewEngineHooksResource.convention(key)) {\n resources.push(new ResourceDescription(key, exportedValue, conventional));\n metadata.define(metadata.resource, conventional, exportedValue);\n } else if (!fallbackValue) {\n fallbackValue = exportedValue;\n fallbackKey = key;\n }\n }\n }\n\n if (!mainResource && fallbackValue) {\n mainResource = new ResourceDescription(fallbackKey, fallbackValue);\n }\n\n resourceModule.moduleInstance = moduleInstance;\n resourceModule.mainResource = mainResource;\n resourceModule.resources = resources;\n resourceModule.viewStrategy = vs;\n\n return resourceModule;\n };\n\n return ModuleAnalyzer;\n}();\n\nvar logger = LogManager.getLogger('templating');\n\nfunction ensureRegistryEntry(loader, urlOrRegistryEntry) {\n if (urlOrRegistryEntry instanceof TemplateRegistryEntry) {\n return Promise.resolve(urlOrRegistryEntry);\n }\n\n return loader.loadTemplate(urlOrRegistryEntry);\n}\n\nvar ProxyViewFactory = function () {\n function ProxyViewFactory(promise) {\n var _this8 = this;\n\n \n\n promise.then(function (x) {\n return _this8.viewFactory = x;\n });\n }\n\n ProxyViewFactory.prototype.create = function create(container, bindingContext, createInstruction, element) {\n return this.viewFactory.create(container, bindingContext, createInstruction, element);\n };\n\n ProxyViewFactory.prototype.setCacheSize = function setCacheSize(size, doNotOverrideIfAlreadySet) {\n this.viewFactory.setCacheSize(size, doNotOverrideIfAlreadySet);\n };\n\n ProxyViewFactory.prototype.getCachedView = function getCachedView() {\n return this.viewFactory.getCachedView();\n };\n\n ProxyViewFactory.prototype.returnViewToCache = function returnViewToCache(view) {\n this.viewFactory.returnViewToCache(view);\n };\n\n _createClass(ProxyViewFactory, [{\n key: 'isCaching',\n get: function get() {\n return this.viewFactory.isCaching;\n }\n }]);\n\n return ProxyViewFactory;\n}();\n\nvar auSlotBehavior = null;\n\nexport var ViewEngine = (_temp5 = _class14 = function () {\n ViewEngine.inject = function inject() {\n return [Loader, Container, ViewCompiler, ModuleAnalyzer, ViewResources];\n };\n\n function ViewEngine(loader, container, viewCompiler, moduleAnalyzer, appResources) {\n \n\n this.loader = loader;\n this.container = container;\n this.viewCompiler = viewCompiler;\n this.moduleAnalyzer = moduleAnalyzer;\n this.appResources = appResources;\n this._pluginMap = {};\n\n if (auSlotBehavior === null) {\n auSlotBehavior = new HtmlBehaviorResource();\n auSlotBehavior.attributeName = 'au-slot';\n metadata.define(metadata.resource, auSlotBehavior, SlotCustomAttribute);\n }\n\n auSlotBehavior.initialize(container, SlotCustomAttribute);\n auSlotBehavior.register(appResources);\n }\n\n ViewEngine.prototype.addResourcePlugin = function addResourcePlugin(extension, implementation) {\n var name = extension.replace('.', '') + '-resource-plugin';\n this._pluginMap[extension] = name;\n this.loader.addPlugin(name, implementation);\n };\n\n ViewEngine.prototype.loadViewFactory = function loadViewFactory(urlOrRegistryEntry, compileInstruction, loadContext, target) {\n var _this9 = this;\n\n loadContext = loadContext || new ResourceLoadContext();\n\n return ensureRegistryEntry(this.loader, urlOrRegistryEntry).then(function (registryEntry) {\n var url = registryEntry.address;\n\n if (registryEntry.onReady) {\n if (!loadContext.hasDependency(url)) {\n loadContext.addDependency(url);\n return registryEntry.onReady;\n }\n\n if (registryEntry.template === null) {\n return registryEntry.onReady;\n }\n\n return Promise.resolve(new ProxyViewFactory(registryEntry.onReady));\n }\n\n loadContext.addDependency(url);\n\n registryEntry.onReady = _this9.loadTemplateResources(registryEntry, compileInstruction, loadContext, target).then(function (resources) {\n registryEntry.resources = resources;\n\n if (registryEntry.template === null) {\n return registryEntry.factory = null;\n }\n\n var viewFactory = _this9.viewCompiler.compile(registryEntry.template, resources, compileInstruction);\n return registryEntry.factory = viewFactory;\n });\n\n return registryEntry.onReady;\n });\n };\n\n ViewEngine.prototype.loadTemplateResources = function loadTemplateResources(registryEntry, compileInstruction, loadContext, target) {\n var resources = new ViewResources(this.appResources, registryEntry.address);\n var dependencies = registryEntry.dependencies;\n var importIds = void 0;\n var names = void 0;\n\n compileInstruction = compileInstruction || ViewCompileInstruction.normal;\n\n if (dependencies.length === 0 && !compileInstruction.associatedModuleId) {\n return Promise.resolve(resources);\n }\n\n importIds = dependencies.map(function (x) {\n return x.src;\n });\n names = dependencies.map(function (x) {\n return x.name;\n });\n logger.debug('importing resources for ' + registryEntry.address, importIds);\n\n if (target) {\n var viewModelRequires = metadata.get(ViewEngine.viewModelRequireMetadataKey, target);\n if (viewModelRequires) {\n var templateImportCount = importIds.length;\n for (var i = 0, ii = viewModelRequires.length; i < ii; ++i) {\n var req = viewModelRequires[i];\n var importId = typeof req === 'function' ? Origin.get(req).moduleId : relativeToFile(req.src || req, registryEntry.address);\n\n if (importIds.indexOf(importId) === -1) {\n importIds.push(importId);\n names.push(req.as);\n }\n }\n logger.debug('importing ViewModel resources for ' + compileInstruction.associatedModuleId, importIds.slice(templateImportCount));\n }\n }\n\n return this.importViewResources(importIds, names, resources, compileInstruction, loadContext);\n };\n\n ViewEngine.prototype.importViewModelResource = function importViewModelResource(moduleImport, moduleMember) {\n var _this10 = this;\n\n return this.loader.loadModule(moduleImport).then(function (viewModelModule) {\n var normalizedId = Origin.get(viewModelModule).moduleId;\n var resourceModule = _this10.moduleAnalyzer.analyze(normalizedId, viewModelModule, moduleMember);\n\n if (!resourceModule.mainResource) {\n throw new Error('No view model found in module \"' + moduleImport + '\".');\n }\n\n resourceModule.initialize(_this10.container);\n\n return resourceModule.mainResource;\n });\n };\n\n ViewEngine.prototype.importViewResources = function importViewResources(moduleIds, names, resources, compileInstruction, loadContext) {\n var _this11 = this;\n\n loadContext = loadContext || new ResourceLoadContext();\n compileInstruction = compileInstruction || ViewCompileInstruction.normal;\n\n moduleIds = moduleIds.map(function (x) {\n return _this11._applyLoaderPlugin(x);\n });\n\n return this.loader.loadAllModules(moduleIds).then(function (imports) {\n var i = void 0;\n var ii = void 0;\n var analysis = void 0;\n var normalizedId = void 0;\n var current = void 0;\n var associatedModule = void 0;\n var container = _this11.container;\n var moduleAnalyzer = _this11.moduleAnalyzer;\n var allAnalysis = new Array(imports.length);\n\n for (i = 0, ii = imports.length; i < ii; ++i) {\n current = imports[i];\n normalizedId = Origin.get(current).moduleId;\n\n analysis = moduleAnalyzer.analyze(normalizedId, current);\n analysis.initialize(container);\n analysis.register(resources, names[i]);\n\n allAnalysis[i] = analysis;\n }\n\n if (compileInstruction.associatedModuleId) {\n associatedModule = moduleAnalyzer.getAnalysis(compileInstruction.associatedModuleId);\n\n if (associatedModule) {\n associatedModule.register(resources);\n }\n }\n\n for (i = 0, ii = allAnalysis.length; i < ii; ++i) {\n allAnalysis[i] = allAnalysis[i].load(container, loadContext);\n }\n\n return Promise.all(allAnalysis).then(function () {\n return resources;\n });\n });\n };\n\n ViewEngine.prototype._applyLoaderPlugin = function _applyLoaderPlugin(id) {\n var index = id.lastIndexOf('.');\n if (index !== -1) {\n var ext = id.substring(index);\n var pluginName = this._pluginMap[ext];\n\n if (pluginName === undefined) {\n return id;\n }\n\n return this.loader.applyPluginToUrl(id, pluginName);\n }\n\n return id;\n };\n\n return ViewEngine;\n}(), _class14.viewModelRequireMetadataKey = 'aurelia:view-model-require', _temp5);\n\nexport var Controller = function () {\n function Controller(behavior, instruction, viewModel, container) {\n \n\n this.behavior = behavior;\n this.instruction = instruction;\n this.viewModel = viewModel;\n this.isAttached = false;\n this.view = null;\n this.isBound = false;\n this.scope = null;\n this.container = container;\n this.elementEvents = container.elementEvents || null;\n\n var observerLookup = behavior.observerLocator.getOrCreateObserversLookup(viewModel);\n var handlesBind = behavior.handlesBind;\n var attributes = instruction.attributes;\n var boundProperties = this.boundProperties = [];\n var properties = behavior.properties;\n var i = void 0;\n var ii = void 0;\n\n behavior._ensurePropertiesDefined(viewModel, observerLookup);\n\n for (i = 0, ii = properties.length; i < ii; ++i) {\n properties[i]._initialize(viewModel, observerLookup, attributes, handlesBind, boundProperties);\n }\n }\n\n Controller.prototype.created = function created(owningView) {\n if (this.behavior.handlesCreated) {\n this.viewModel.created(owningView, this.view);\n }\n };\n\n Controller.prototype.automate = function automate(overrideContext, owningView) {\n this.view.bindingContext = this.viewModel;\n this.view.overrideContext = overrideContext || createOverrideContext(this.viewModel);\n this.view._isUserControlled = true;\n\n if (this.behavior.handlesCreated) {\n this.viewModel.created(owningView || null, this.view);\n }\n\n this.bind(this.view);\n };\n\n Controller.prototype.bind = function bind(scope) {\n var skipSelfSubscriber = this.behavior.handlesBind;\n var boundProperties = this.boundProperties;\n var i = void 0;\n var ii = void 0;\n var x = void 0;\n var observer = void 0;\n var selfSubscriber = void 0;\n\n if (this.isBound) {\n if (this.scope === scope) {\n return;\n }\n\n this.unbind();\n }\n\n this.isBound = true;\n this.scope = scope;\n\n for (i = 0, ii = boundProperties.length; i < ii; ++i) {\n x = boundProperties[i];\n observer = x.observer;\n selfSubscriber = observer.selfSubscriber;\n observer.publishing = false;\n\n if (skipSelfSubscriber) {\n observer.selfSubscriber = null;\n }\n\n x.binding.bind(scope);\n observer.call();\n\n observer.publishing = true;\n observer.selfSubscriber = selfSubscriber;\n }\n\n var overrideContext = void 0;\n if (this.view !== null) {\n if (skipSelfSubscriber) {\n this.view.viewModelScope = scope;\n }\n\n if (this.viewModel === scope.overrideContext.bindingContext) {\n overrideContext = scope.overrideContext;\n } else if (this.instruction.inheritBindingContext) {\n overrideContext = createOverrideContext(this.viewModel, scope.overrideContext);\n } else {\n overrideContext = createOverrideContext(this.viewModel);\n overrideContext.__parentOverrideContext = scope.overrideContext;\n }\n\n this.view.bind(this.viewModel, overrideContext);\n } else if (skipSelfSubscriber) {\n overrideContext = scope.overrideContext;\n\n if (scope.overrideContext.__parentOverrideContext !== undefined && this.viewModel.viewFactory && this.viewModel.viewFactory.factoryCreateInstruction.partReplacements) {\n overrideContext = Object.assign({}, scope.overrideContext);\n overrideContext.parentOverrideContext = scope.overrideContext.__parentOverrideContext;\n }\n this.viewModel.bind(scope.bindingContext, overrideContext);\n }\n };\n\n Controller.prototype.unbind = function unbind() {\n if (this.isBound) {\n var _boundProperties = this.boundProperties;\n var _i3 = void 0;\n var _ii2 = void 0;\n\n this.isBound = false;\n this.scope = null;\n\n if (this.view !== null) {\n this.view.unbind();\n }\n\n if (this.behavior.handlesUnbind) {\n this.viewModel.unbind();\n }\n\n if (this.elementEvents !== null) {\n this.elementEvents.disposeAll();\n }\n\n for (_i3 = 0, _ii2 = _boundProperties.length; _i3 < _ii2; ++_i3) {\n _boundProperties[_i3].binding.unbind();\n }\n }\n };\n\n Controller.prototype.attached = function attached() {\n if (this.isAttached) {\n return;\n }\n\n this.isAttached = true;\n\n if (this.behavior.handlesAttached) {\n this.viewModel.attached();\n }\n\n if (this.view !== null) {\n this.view.attached();\n }\n };\n\n Controller.prototype.detached = function detached() {\n if (this.isAttached) {\n this.isAttached = false;\n\n if (this.view !== null) {\n this.view.detached();\n }\n\n if (this.behavior.handlesDetached) {\n this.viewModel.detached();\n }\n }\n };\n\n return Controller;\n}();\n\nexport var BehaviorPropertyObserver = (_dec7 = subscriberCollection(), _dec7(_class15 = function () {\n function BehaviorPropertyObserver(taskQueue, obj, propertyName, selfSubscriber, initialValue) {\n \n\n this.taskQueue = taskQueue;\n this.obj = obj;\n this.propertyName = propertyName;\n this.notqueued = true;\n this.publishing = false;\n this.selfSubscriber = selfSubscriber;\n this.currentValue = this.oldValue = initialValue;\n }\n\n BehaviorPropertyObserver.prototype.getValue = function getValue() {\n return this.currentValue;\n };\n\n BehaviorPropertyObserver.prototype.setValue = function setValue(newValue) {\n var oldValue = this.currentValue;\n\n if (!Object.is(newValue, oldValue)) {\n this.oldValue = oldValue;\n this.currentValue = newValue;\n\n if (this.publishing && this.notqueued) {\n if (this.taskQueue.flushing) {\n this.call();\n } else {\n this.notqueued = false;\n this.taskQueue.queueMicroTask(this);\n }\n }\n }\n };\n\n BehaviorPropertyObserver.prototype.call = function call() {\n var oldValue = this.oldValue;\n var newValue = this.currentValue;\n\n this.notqueued = true;\n\n if (Object.is(newValue, oldValue)) {\n return;\n }\n\n if (this.selfSubscriber) {\n this.selfSubscriber(newValue, oldValue);\n }\n\n this.callSubscribers(newValue, oldValue);\n this.oldValue = newValue;\n };\n\n BehaviorPropertyObserver.prototype.subscribe = function subscribe(context, callable) {\n this.addSubscriber(context, callable);\n };\n\n BehaviorPropertyObserver.prototype.unsubscribe = function unsubscribe(context, callable) {\n this.removeSubscriber(context, callable);\n };\n\n return BehaviorPropertyObserver;\n}()) || _class15);\n\nfunction getObserver(instance, name) {\n var lookup = instance.__observers__;\n\n if (lookup === undefined) {\n var ctor = Object.getPrototypeOf(instance).constructor;\n var _behavior = metadata.get(metadata.resource, ctor);\n if (!_behavior.isInitialized) {\n _behavior.initialize(Container.instance || new Container(), instance.constructor);\n }\n\n lookup = _behavior.observerLocator.getOrCreateObserversLookup(instance);\n _behavior._ensurePropertiesDefined(instance, lookup);\n }\n\n return lookup[name];\n}\n\nexport var BindableProperty = function () {\n function BindableProperty(nameOrConfig) {\n \n\n if (typeof nameOrConfig === 'string') {\n this.name = nameOrConfig;\n } else {\n Object.assign(this, nameOrConfig);\n }\n\n this.attribute = this.attribute || _hyphenate(this.name);\n var defaultBindingMode = this.defaultBindingMode;\n if (defaultBindingMode === null || defaultBindingMode === undefined) {\n this.defaultBindingMode = bindingMode.oneWay;\n } else if (typeof defaultBindingMode === 'string') {\n this.defaultBindingMode = bindingMode[defaultBindingMode] || bindingMode.oneWay;\n }\n this.changeHandler = this.changeHandler || null;\n this.owner = null;\n this.descriptor = null;\n }\n\n BindableProperty.prototype.registerWith = function registerWith(target, behavior, descriptor) {\n behavior.properties.push(this);\n behavior.attributes[this.attribute] = this;\n this.owner = behavior;\n\n if (descriptor) {\n this.descriptor = descriptor;\n return this._configureDescriptor(descriptor);\n }\n\n return undefined;\n };\n\n BindableProperty.prototype._configureDescriptor = function _configureDescriptor(descriptor) {\n var name = this.name;\n\n descriptor.configurable = true;\n descriptor.enumerable = true;\n\n if ('initializer' in descriptor) {\n this.defaultValue = descriptor.initializer;\n delete descriptor.initializer;\n delete descriptor.writable;\n }\n\n if ('value' in descriptor) {\n this.defaultValue = descriptor.value;\n delete descriptor.value;\n delete descriptor.writable;\n }\n\n descriptor.get = function () {\n return getObserver(this, name).getValue();\n };\n\n descriptor.set = function (value) {\n getObserver(this, name).setValue(value);\n };\n\n descriptor.get.getObserver = function (obj) {\n return getObserver(obj, name);\n };\n\n return descriptor;\n };\n\n BindableProperty.prototype.defineOn = function defineOn(target, behavior) {\n var name = this.name;\n var handlerName = void 0;\n\n if (this.changeHandler === null) {\n handlerName = name + 'Changed';\n if (handlerName in target.prototype) {\n this.changeHandler = handlerName;\n }\n }\n\n if (this.descriptor === null) {\n Object.defineProperty(target.prototype, name, this._configureDescriptor(behavior, {}));\n }\n };\n\n BindableProperty.prototype.createObserver = function createObserver(viewModel) {\n var selfSubscriber = null;\n var defaultValue = this.defaultValue;\n var changeHandlerName = this.changeHandler;\n var name = this.name;\n var initialValue = void 0;\n\n if (this.hasOptions) {\n return undefined;\n }\n\n if (changeHandlerName in viewModel) {\n if ('propertyChanged' in viewModel) {\n selfSubscriber = function selfSubscriber(newValue, oldValue) {\n viewModel[changeHandlerName](newValue, oldValue);\n viewModel.propertyChanged(name, newValue, oldValue);\n };\n } else {\n selfSubscriber = function selfSubscriber(newValue, oldValue) {\n return viewModel[changeHandlerName](newValue, oldValue);\n };\n }\n } else if ('propertyChanged' in viewModel) {\n selfSubscriber = function selfSubscriber(newValue, oldValue) {\n return viewModel.propertyChanged(name, newValue, oldValue);\n };\n } else if (changeHandlerName !== null) {\n throw new Error('Change handler ' + changeHandlerName + ' was specified but not declared on the class.');\n }\n\n if (defaultValue !== undefined) {\n initialValue = typeof defaultValue === 'function' ? defaultValue.call(viewModel) : defaultValue;\n }\n\n return new BehaviorPropertyObserver(this.owner.taskQueue, viewModel, this.name, selfSubscriber, initialValue);\n };\n\n BindableProperty.prototype._initialize = function _initialize(viewModel, observerLookup, attributes, behaviorHandlesBind, boundProperties) {\n var selfSubscriber = void 0;\n var observer = void 0;\n var attribute = void 0;\n var defaultValue = this.defaultValue;\n\n if (this.isDynamic) {\n for (var _key6 in attributes) {\n this._createDynamicProperty(viewModel, observerLookup, behaviorHandlesBind, _key6, attributes[_key6], boundProperties);\n }\n } else if (!this.hasOptions) {\n observer = observerLookup[this.name];\n\n if (attributes !== null) {\n selfSubscriber = observer.selfSubscriber;\n attribute = attributes[this.attribute];\n\n if (behaviorHandlesBind) {\n observer.selfSubscriber = null;\n }\n\n if (typeof attribute === 'string') {\n viewModel[this.name] = attribute;\n observer.call();\n } else if (attribute) {\n boundProperties.push({ observer: observer, binding: attribute.createBinding(viewModel) });\n } else if (defaultValue !== undefined) {\n observer.call();\n }\n\n observer.selfSubscriber = selfSubscriber;\n }\n\n observer.publishing = true;\n }\n };\n\n BindableProperty.prototype._createDynamicProperty = function _createDynamicProperty(viewModel, observerLookup, behaviorHandlesBind, name, attribute, boundProperties) {\n var changeHandlerName = name + 'Changed';\n var selfSubscriber = null;\n var observer = void 0;\n var info = void 0;\n\n if (changeHandlerName in viewModel) {\n if ('propertyChanged' in viewModel) {\n selfSubscriber = function selfSubscriber(newValue, oldValue) {\n viewModel[changeHandlerName](newValue, oldValue);\n viewModel.propertyChanged(name, newValue, oldValue);\n };\n } else {\n selfSubscriber = function selfSubscriber(newValue, oldValue) {\n return viewModel[changeHandlerName](newValue, oldValue);\n };\n }\n } else if ('propertyChanged' in viewModel) {\n selfSubscriber = function selfSubscriber(newValue, oldValue) {\n return viewModel.propertyChanged(name, newValue, oldValue);\n };\n }\n\n observer = observerLookup[name] = new BehaviorPropertyObserver(this.owner.taskQueue, viewModel, name, selfSubscriber);\n\n Object.defineProperty(viewModel, name, {\n configurable: true,\n enumerable: true,\n get: observer.getValue.bind(observer),\n set: observer.setValue.bind(observer)\n });\n\n if (behaviorHandlesBind) {\n observer.selfSubscriber = null;\n }\n\n if (typeof attribute === 'string') {\n viewModel[name] = attribute;\n observer.call();\n } else if (attribute) {\n info = { observer: observer, binding: attribute.createBinding(viewModel) };\n boundProperties.push(info);\n }\n\n observer.publishing = true;\n observer.selfSubscriber = selfSubscriber;\n };\n\n return BindableProperty;\n}();\n\nvar lastProviderId = 0;\n\nfunction nextProviderId() {\n return ++lastProviderId;\n}\n\nfunction doProcessContent() {\n return true;\n}\nfunction doProcessAttributes() {}\n\nexport var HtmlBehaviorResource = function () {\n function HtmlBehaviorResource() {\n \n\n this.elementName = null;\n this.attributeName = null;\n this.attributeDefaultBindingMode = undefined;\n this.liftsContent = false;\n this.targetShadowDOM = false;\n this.shadowDOMOptions = null;\n this.processAttributes = doProcessAttributes;\n this.processContent = doProcessContent;\n this.usesShadowDOM = false;\n this.childBindings = null;\n this.hasDynamicOptions = false;\n this.containerless = false;\n this.properties = [];\n this.attributes = {};\n this.isInitialized = false;\n this.primaryProperty = null;\n }\n\n HtmlBehaviorResource.convention = function convention(name, existing) {\n var behavior = void 0;\n\n if (name.endsWith('CustomAttribute')) {\n behavior = existing || new HtmlBehaviorResource();\n behavior.attributeName = _hyphenate(name.substring(0, name.length - 15));\n }\n\n if (name.endsWith('CustomElement')) {\n behavior = existing || new HtmlBehaviorResource();\n behavior.elementName = _hyphenate(name.substring(0, name.length - 13));\n }\n\n return behavior;\n };\n\n HtmlBehaviorResource.prototype.addChildBinding = function addChildBinding(behavior) {\n if (this.childBindings === null) {\n this.childBindings = [];\n }\n\n this.childBindings.push(behavior);\n };\n\n HtmlBehaviorResource.prototype.initialize = function initialize(container, target) {\n var proto = target.prototype;\n var properties = this.properties;\n var attributeName = this.attributeName;\n var attributeDefaultBindingMode = this.attributeDefaultBindingMode;\n var i = void 0;\n var ii = void 0;\n var current = void 0;\n\n if (this.isInitialized) {\n return;\n }\n\n this.isInitialized = true;\n target.__providerId__ = nextProviderId();\n\n this.observerLocator = container.get(ObserverLocator);\n this.taskQueue = container.get(TaskQueue);\n\n this.target = target;\n this.usesShadowDOM = this.targetShadowDOM && FEATURE.shadowDOM;\n this.handlesCreated = 'created' in proto;\n this.handlesBind = 'bind' in proto;\n this.handlesUnbind = 'unbind' in proto;\n this.handlesAttached = 'attached' in proto;\n this.handlesDetached = 'detached' in proto;\n this.htmlName = this.elementName || this.attributeName;\n\n if (attributeName !== null) {\n if (properties.length === 0) {\n new BindableProperty({\n name: 'value',\n changeHandler: 'valueChanged' in proto ? 'valueChanged' : null,\n attribute: attributeName,\n defaultBindingMode: attributeDefaultBindingMode\n }).registerWith(target, this);\n }\n\n current = properties[0];\n\n if (properties.length === 1 && current.name === 'value') {\n current.isDynamic = current.hasOptions = this.hasDynamicOptions;\n current.defineOn(target, this);\n } else {\n for (i = 0, ii = properties.length; i < ii; ++i) {\n properties[i].defineOn(target, this);\n if (properties[i].primaryProperty) {\n if (this.primaryProperty) {\n throw new Error('Only one bindable property on a custom element can be defined as the default');\n }\n this.primaryProperty = properties[i];\n }\n }\n\n current = new BindableProperty({\n name: 'value',\n changeHandler: 'valueChanged' in proto ? 'valueChanged' : null,\n attribute: attributeName,\n defaultBindingMode: attributeDefaultBindingMode\n });\n\n current.hasOptions = true;\n current.registerWith(target, this);\n }\n } else {\n for (i = 0, ii = properties.length; i < ii; ++i) {\n properties[i].defineOn(target, this);\n }\n\n this._copyInheritedProperties(container, target);\n }\n };\n\n HtmlBehaviorResource.prototype.register = function register(registry, name) {\n var _this12 = this;\n\n if (this.attributeName !== null) {\n registry.registerAttribute(name || this.attributeName, this, this.attributeName);\n\n if (Array.isArray(this.aliases)) {\n this.aliases.forEach(function (alias) {\n registry.registerAttribute(alias, _this12, _this12.attributeName);\n });\n }\n }\n\n if (this.elementName !== null) {\n registry.registerElement(name || this.elementName, this);\n }\n };\n\n HtmlBehaviorResource.prototype.load = function load(container, target, loadContext, viewStrategy, transientView) {\n var _this13 = this;\n\n var options = void 0;\n\n if (this.elementName !== null) {\n viewStrategy = container.get(ViewLocator).getViewStrategy(viewStrategy || this.viewStrategy || target);\n options = new ViewCompileInstruction(this.targetShadowDOM, true);\n\n if (!viewStrategy.moduleId) {\n viewStrategy.moduleId = Origin.get(target).moduleId;\n }\n\n return viewStrategy.loadViewFactory(container.get(ViewEngine), options, loadContext, target).then(function (viewFactory) {\n if (!transientView || !_this13.viewFactory) {\n _this13.viewFactory = viewFactory;\n }\n\n return viewFactory;\n });\n }\n\n return Promise.resolve(this);\n };\n\n HtmlBehaviorResource.prototype.compile = function compile(compiler, resources, node, instruction, parentNode) {\n if (this.liftsContent) {\n if (!instruction.viewFactory) {\n var _template = DOM.createElement('template');\n var fragment = DOM.createDocumentFragment();\n var cacheSize = node.getAttribute('view-cache');\n var part = node.getAttribute('part');\n\n node.removeAttribute(instruction.originalAttrName);\n DOM.replaceNode(_template, node, parentNode);\n fragment.appendChild(node);\n instruction.viewFactory = compiler.compile(fragment, resources);\n\n if (part) {\n instruction.viewFactory.part = part;\n node.removeAttribute('part');\n }\n\n if (cacheSize) {\n instruction.viewFactory.setCacheSize(cacheSize);\n node.removeAttribute('view-cache');\n }\n\n node = _template;\n }\n } else if (this.elementName !== null) {\n var _partReplacements2 = {};\n\n if (this.processContent(compiler, resources, node, instruction) && node.hasChildNodes()) {\n var currentChild = node.firstChild;\n var contentElement = this.usesShadowDOM ? null : DOM.createElement('au-content');\n var nextSibling = void 0;\n var toReplace = void 0;\n\n while (currentChild) {\n nextSibling = currentChild.nextSibling;\n\n if (currentChild.tagName === 'TEMPLATE' && (toReplace = currentChild.getAttribute('replace-part'))) {\n _partReplacements2[toReplace] = compiler.compile(currentChild, resources);\n DOM.removeNode(currentChild, parentNode);\n instruction.partReplacements = _partReplacements2;\n } else if (contentElement !== null) {\n if (currentChild.nodeType === 3 && _isAllWhitespace(currentChild)) {\n DOM.removeNode(currentChild, parentNode);\n } else {\n contentElement.appendChild(currentChild);\n }\n }\n\n currentChild = nextSibling;\n }\n\n if (contentElement !== null && contentElement.hasChildNodes()) {\n node.appendChild(contentElement);\n }\n\n instruction.skipContentProcessing = false;\n } else {\n instruction.skipContentProcessing = true;\n }\n } else if (!this.processContent(compiler, resources, node, instruction)) {\n instruction.skipContentProcessing = true;\n }\n\n return node;\n };\n\n HtmlBehaviorResource.prototype.create = function create(container, instruction, element, bindings) {\n var viewHost = void 0;\n var au = null;\n\n instruction = instruction || BehaviorInstruction.normal;\n element = element || null;\n bindings = bindings || null;\n\n if (this.elementName !== null && element) {\n if (this.usesShadowDOM) {\n viewHost = element.attachShadow(this.shadowDOMOptions);\n container.registerInstance(DOM.boundary, viewHost);\n } else {\n viewHost = element;\n if (this.targetShadowDOM) {\n container.registerInstance(DOM.boundary, viewHost);\n }\n }\n }\n\n if (element !== null) {\n element.au = au = element.au || {};\n }\n\n var viewModel = instruction.viewModel || container.get(this.target);\n var controller = new Controller(this, instruction, viewModel, container);\n var childBindings = this.childBindings;\n var viewFactory = void 0;\n\n if (this.liftsContent) {\n au.controller = controller;\n } else if (this.elementName !== null) {\n viewFactory = instruction.viewFactory || this.viewFactory;\n container.viewModel = viewModel;\n\n if (viewFactory) {\n controller.view = viewFactory.create(container, instruction, element);\n }\n\n if (element !== null) {\n au.controller = controller;\n\n if (controller.view) {\n if (!this.usesShadowDOM && (element.childNodes.length === 1 || element.contentElement)) {\n var contentElement = element.childNodes[0] || element.contentElement;\n controller.view.contentView = { fragment: contentElement };\n contentElement.parentNode && DOM.removeNode(contentElement);\n }\n\n if (instruction.anchorIsContainer) {\n if (childBindings !== null) {\n for (var _i4 = 0, _ii3 = childBindings.length; _i4 < _ii3; ++_i4) {\n controller.view.addBinding(childBindings[_i4].create(element, viewModel, controller));\n }\n }\n\n controller.view.appendNodesTo(viewHost);\n } else {\n controller.view.insertNodesBefore(viewHost);\n }\n } else if (childBindings !== null) {\n for (var _i5 = 0, _ii4 = childBindings.length; _i5 < _ii4; ++_i5) {\n bindings.push(childBindings[_i5].create(element, viewModel, controller));\n }\n }\n } else if (controller.view) {\n controller.view.controller = controller;\n\n if (childBindings !== null) {\n for (var _i6 = 0, _ii5 = childBindings.length; _i6 < _ii5; ++_i6) {\n controller.view.addBinding(childBindings[_i6].create(instruction.host, viewModel, controller));\n }\n }\n } else if (childBindings !== null) {\n for (var _i7 = 0, _ii6 = childBindings.length; _i7 < _ii6; ++_i7) {\n bindings.push(childBindings[_i7].create(instruction.host, viewModel, controller));\n }\n }\n } else if (childBindings !== null) {\n for (var _i8 = 0, _ii7 = childBindings.length; _i8 < _ii7; ++_i8) {\n bindings.push(childBindings[_i8].create(element, viewModel, controller));\n }\n }\n\n if (au !== null) {\n au[this.htmlName] = controller;\n }\n\n if (instruction.initiatedByBehavior && viewFactory) {\n controller.view.created();\n }\n\n return controller;\n };\n\n HtmlBehaviorResource.prototype._ensurePropertiesDefined = function _ensurePropertiesDefined(instance, lookup) {\n var properties = void 0;\n var i = void 0;\n var ii = void 0;\n var observer = void 0;\n\n if ('__propertiesDefined__' in lookup) {\n return;\n }\n\n lookup.__propertiesDefined__ = true;\n properties = this.properties;\n\n for (i = 0, ii = properties.length; i < ii; ++i) {\n observer = properties[i].createObserver(instance);\n\n if (observer !== undefined) {\n lookup[observer.propertyName] = observer;\n }\n }\n };\n\n HtmlBehaviorResource.prototype._copyInheritedProperties = function _copyInheritedProperties(container, target) {\n var _this14 = this;\n\n var behavior = void 0;\n var derived = target;\n\n while (true) {\n var proto = Object.getPrototypeOf(target.prototype);\n target = proto && proto.constructor;\n if (!target) {\n return;\n }\n behavior = metadata.getOwn(metadata.resource, target);\n if (behavior) {\n break;\n }\n }\n behavior.initialize(container, target);\n\n var _loop = function _loop(_i9, _ii8) {\n var prop = behavior.properties[_i9];\n\n if (_this14.properties.some(function (p) {\n return p.name === prop.name;\n })) {\n return 'continue';\n }\n\n new BindableProperty(prop).registerWith(derived, _this14);\n };\n\n for (var _i9 = 0, _ii8 = behavior.properties.length; _i9 < _ii8; ++_i9) {\n var _ret = _loop(_i9, _ii8);\n\n if (_ret === 'continue') continue;\n }\n };\n\n return HtmlBehaviorResource;\n}();\n\nfunction createChildObserverDecorator(selectorOrConfig, all) {\n return function (target, key, descriptor) {\n var actualTarget = typeof key === 'string' ? target.constructor : target;\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, actualTarget);\n\n if (typeof selectorOrConfig === 'string') {\n selectorOrConfig = {\n selector: selectorOrConfig,\n name: key\n };\n }\n\n if (descriptor) {\n descriptor.writable = true;\n descriptor.configurable = true;\n }\n\n selectorOrConfig.all = all;\n r.addChildBinding(new ChildObserver(selectorOrConfig));\n };\n}\n\nexport function children(selectorOrConfig) {\n return createChildObserverDecorator(selectorOrConfig, true);\n}\n\nexport function child(selectorOrConfig) {\n return createChildObserverDecorator(selectorOrConfig, false);\n}\n\nvar ChildObserver = function () {\n function ChildObserver(config) {\n \n\n this.name = config.name;\n this.changeHandler = config.changeHandler || this.name + 'Changed';\n this.selector = config.selector;\n this.all = config.all;\n }\n\n ChildObserver.prototype.create = function create(viewHost, viewModel, controller) {\n return new ChildObserverBinder(this.selector, viewHost, this.name, viewModel, controller, this.changeHandler, this.all);\n };\n\n return ChildObserver;\n}();\n\nvar noMutations = [];\n\nfunction trackMutation(groupedMutations, binder, record) {\n var mutations = groupedMutations.get(binder);\n\n if (!mutations) {\n mutations = [];\n groupedMutations.set(binder, mutations);\n }\n\n mutations.push(record);\n}\n\nfunction onChildChange(mutations, observer) {\n var binders = observer.binders;\n var bindersLength = binders.length;\n\n var groupedMutations = new Map();\n\n for (var _i10 = 0, _ii9 = mutations.length; _i10 < _ii9; ++_i10) {\n var record = mutations[_i10];\n var added = record.addedNodes;\n var removed = record.removedNodes;\n\n for (var j = 0, jj = removed.length; j < jj; ++j) {\n var _node = removed[j];\n if (_node.nodeType === 1) {\n for (var k = 0; k < bindersLength; ++k) {\n var binder = binders[k];\n\n if (binder.onRemove(_node)) {\n trackMutation(groupedMutations, binder, record);\n }\n }\n }\n }\n\n for (var _j = 0, _jj = added.length; _j < _jj; ++_j) {\n var _node2 = added[_j];\n if (_node2.nodeType === 1) {\n for (var _k = 0; _k < bindersLength; ++_k) {\n var _binder = binders[_k];\n\n if (_binder.onAdd(_node2)) {\n trackMutation(groupedMutations, _binder, record);\n }\n }\n }\n }\n }\n\n groupedMutations.forEach(function (mutationRecords, binder) {\n if (binder.isBound && binder.changeHandler !== null) {\n binder.viewModel[binder.changeHandler](mutationRecords);\n }\n });\n}\n\nvar ChildObserverBinder = function () {\n function ChildObserverBinder(selector, viewHost, property, viewModel, controller, changeHandler, all) {\n \n\n this.selector = selector;\n\n this.viewHost = viewHost;\n this.property = property;\n this.viewModel = viewModel;\n this.controller = controller;\n this.changeHandler = changeHandler in viewModel ? changeHandler : null;\n this.usesShadowDOM = controller.behavior.usesShadowDOM;\n this.all = all;\n\n if (!this.usesShadowDOM && controller.view && controller.view.contentView) {\n this.contentView = controller.view.contentView;\n } else {\n this.contentView = null;\n }\n this.source = null;\n this.isBound = false;\n }\n\n ChildObserverBinder.prototype.matches = function matches(element) {\n if (element.matches(this.selector)) {\n if (this.contentView === null) {\n return true;\n }\n\n var contentView = this.contentView;\n var assignedSlot = element.auAssignedSlot;\n\n if (assignedSlot && assignedSlot.projectFromAnchors) {\n var anchors = assignedSlot.projectFromAnchors;\n\n for (var _i11 = 0, _ii10 = anchors.length; _i11 < _ii10; ++_i11) {\n if (anchors[_i11].auOwnerView === contentView) {\n return true;\n }\n }\n\n return false;\n }\n\n return element.auOwnerView === contentView;\n }\n\n return false;\n };\n\n ChildObserverBinder.prototype.bind = function bind(source) {\n if (this.isBound) {\n if (this.source === source) {\n return;\n }\n this.source = source;\n }\n this.isBound = true;\n\n var viewHost = this.viewHost;\n var viewModel = this.viewModel;\n var observer = viewHost.__childObserver__;\n\n if (!observer) {\n observer = viewHost.__childObserver__ = DOM.createMutationObserver(onChildChange);\n\n var options = {\n childList: true,\n subtree: !this.usesShadowDOM\n };\n\n observer.observe(viewHost, options);\n observer.binders = [];\n }\n\n observer.binders.push(this);\n\n if (this.usesShadowDOM) {\n var current = viewHost.firstElementChild;\n\n if (this.all) {\n var items = viewModel[this.property];\n if (!items) {\n items = viewModel[this.property] = [];\n } else {\n items.splice(0);\n }\n\n while (current) {\n if (this.matches(current)) {\n items.push(current.au && current.au.controller ? current.au.controller.viewModel : current);\n }\n\n current = current.nextElementSibling;\n }\n\n if (this.changeHandler !== null) {\n this.viewModel[this.changeHandler](noMutations);\n }\n } else {\n while (current) {\n if (this.matches(current)) {\n var _value = current.au && current.au.controller ? current.au.controller.viewModel : current;\n this.viewModel[this.property] = _value;\n\n if (this.changeHandler !== null) {\n this.viewModel[this.changeHandler](_value);\n }\n\n break;\n }\n\n current = current.nextElementSibling;\n }\n }\n }\n };\n\n ChildObserverBinder.prototype.onRemove = function onRemove(element) {\n if (this.matches(element)) {\n var _value2 = element.au && element.au.controller ? element.au.controller.viewModel : element;\n\n if (this.all) {\n var items = this.viewModel[this.property] || (this.viewModel[this.property] = []);\n var index = items.indexOf(_value2);\n\n if (index !== -1) {\n items.splice(index, 1);\n }\n\n return true;\n }\n\n var currentValue = this.viewModel[this.property];\n if (currentValue === _value2) {\n this.viewModel[this.property] = null;\n\n if (this.isBound && this.changeHandler !== null) {\n this.viewModel[this.changeHandler](_value2);\n }\n }\n }\n\n return false;\n };\n\n ChildObserverBinder.prototype.onAdd = function onAdd(element) {\n if (this.matches(element)) {\n var _value3 = element.au && element.au.controller ? element.au.controller.viewModel : element;\n\n if (this.all) {\n var items = this.viewModel[this.property] || (this.viewModel[this.property] = []);\n\n if (this.selector === '*') {\n items.push(_value3);\n return true;\n }\n\n var index = 0;\n var prev = element.previousElementSibling;\n\n while (prev) {\n if (this.matches(prev)) {\n index++;\n }\n\n prev = prev.previousElementSibling;\n }\n\n items.splice(index, 0, _value3);\n return true;\n }\n\n this.viewModel[this.property] = _value3;\n\n if (this.isBound && this.changeHandler !== null) {\n this.viewModel[this.changeHandler](_value3);\n }\n }\n\n return false;\n };\n\n ChildObserverBinder.prototype.unbind = function unbind() {\n if (!this.isBound) {\n return;\n }\n this.isBound = false;\n this.source = null;\n var childObserver = this.viewHost.__childObserver__;\n if (childObserver) {\n var binders = childObserver.binders;\n if (binders && binders.length) {\n var idx = binders.indexOf(this);\n if (idx !== -1) {\n binders.splice(idx, 1);\n }\n if (binders.length === 0) {\n childObserver.disconnect();\n this.viewHost.__childObserver__ = null;\n }\n }\n\n if (this.usesShadowDOM) {\n this.viewModel[this.property] = null;\n }\n }\n };\n\n return ChildObserverBinder;\n}();\n\nfunction remove(viewSlot, previous) {\n return Array.isArray(previous) ? viewSlot.removeMany(previous, true) : viewSlot.remove(previous, true);\n}\n\nexport var SwapStrategies = {\n before: function before(viewSlot, previous, callback) {\n return previous === undefined ? callback() : callback().then(function () {\n return remove(viewSlot, previous);\n });\n },\n with: function _with(viewSlot, previous, callback) {\n return previous === undefined ? callback() : Promise.all([remove(viewSlot, previous), callback()]);\n },\n after: function after(viewSlot, previous, callback) {\n return Promise.resolve(viewSlot.removeAll(true)).then(callback);\n }\n};\n\nfunction tryActivateViewModel(context) {\n if (context.skipActivation || typeof context.viewModel.activate !== 'function') {\n return Promise.resolve();\n }\n\n return context.viewModel.activate(context.model) || Promise.resolve();\n}\n\nexport var CompositionEngine = (_dec8 = inject(ViewEngine, ViewLocator), _dec8(_class16 = function () {\n function CompositionEngine(viewEngine, viewLocator) {\n \n\n this.viewEngine = viewEngine;\n this.viewLocator = viewLocator;\n }\n\n CompositionEngine.prototype._swap = function _swap(context, view) {\n var swapStrategy = SwapStrategies[context.swapOrder] || SwapStrategies.after;\n var previousViews = context.viewSlot.children.slice();\n\n return swapStrategy(context.viewSlot, previousViews, function () {\n return Promise.resolve(context.viewSlot.add(view)).then(function () {\n if (context.currentController) {\n context.currentController.unbind();\n }\n });\n }).then(function () {\n if (context.compositionTransactionNotifier) {\n context.compositionTransactionNotifier.done();\n }\n });\n };\n\n CompositionEngine.prototype._createControllerAndSwap = function _createControllerAndSwap(context) {\n var _this15 = this;\n\n return this.createController(context).then(function (controller) {\n if (context.compositionTransactionOwnershipToken) {\n return context.compositionTransactionOwnershipToken.waitForCompositionComplete().then(function () {\n controller.automate(context.overrideContext, context.owningView);\n\n return _this15._swap(context, controller.view);\n }).then(function () {\n return controller;\n });\n }\n\n controller.automate(context.overrideContext, context.owningView);\n\n return _this15._swap(context, controller.view).then(function () {\n return controller;\n });\n });\n };\n\n CompositionEngine.prototype.createController = function createController(context) {\n var _this16 = this;\n\n var childContainer = void 0;\n var viewModel = void 0;\n var viewModelResource = void 0;\n\n var m = void 0;\n\n return this.ensureViewModel(context).then(tryActivateViewModel).then(function () {\n childContainer = context.childContainer;\n viewModel = context.viewModel;\n viewModelResource = context.viewModelResource;\n m = viewModelResource.metadata;\n\n var viewStrategy = _this16.viewLocator.getViewStrategy(context.view || viewModel);\n\n if (context.viewResources) {\n viewStrategy.makeRelativeTo(context.viewResources.viewUrl);\n }\n\n return m.load(childContainer, viewModelResource.value, null, viewStrategy, true);\n }).then(function (viewFactory) {\n return m.create(childContainer, BehaviorInstruction.dynamic(context.host, viewModel, viewFactory));\n });\n };\n\n CompositionEngine.prototype.ensureViewModel = function ensureViewModel(context) {\n var childContainer = context.childContainer = context.childContainer || context.container.createChild();\n\n if (typeof context.viewModel === 'string') {\n context.viewModel = context.viewResources ? context.viewResources.relativeToView(context.viewModel) : context.viewModel;\n\n return this.viewEngine.importViewModelResource(context.viewModel).then(function (viewModelResource) {\n childContainer.autoRegister(viewModelResource.value);\n\n if (context.host) {\n childContainer.registerInstance(DOM.Element, context.host);\n }\n\n context.viewModel = childContainer.viewModel = childContainer.get(viewModelResource.value);\n context.viewModelResource = viewModelResource;\n return context;\n });\n }\n\n var ctor = context.viewModel.constructor;\n var isClass = typeof context.viewModel === 'function';\n if (isClass) {\n ctor = context.viewModel;\n childContainer.autoRegister(ctor);\n }\n var m = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, ctor);\n\n m.elementName = m.elementName || 'dynamic-element';\n\n m.initialize(isClass ? childContainer : context.container || childContainer, ctor);\n\n context.viewModelResource = { metadata: m, value: ctor };\n\n if (context.host) {\n childContainer.registerInstance(DOM.Element, context.host);\n }\n childContainer.viewModel = context.viewModel = isClass ? childContainer.get(ctor) : context.viewModel;\n return Promise.resolve(context);\n };\n\n CompositionEngine.prototype.compose = function compose(context) {\n var _this17 = this;\n\n context.childContainer = context.childContainer || context.container.createChild();\n context.view = this.viewLocator.getViewStrategy(context.view);\n\n var transaction = context.childContainer.get(CompositionTransaction);\n var compositionTransactionOwnershipToken = transaction.tryCapture();\n\n if (compositionTransactionOwnershipToken) {\n context.compositionTransactionOwnershipToken = compositionTransactionOwnershipToken;\n } else {\n context.compositionTransactionNotifier = transaction.enlist();\n }\n\n if (context.viewModel) {\n return this._createControllerAndSwap(context);\n } else if (context.view) {\n if (context.viewResources) {\n context.view.makeRelativeTo(context.viewResources.viewUrl);\n }\n\n return context.view.loadViewFactory(this.viewEngine, new ViewCompileInstruction()).then(function (viewFactory) {\n var result = viewFactory.create(context.childContainer);\n result.bind(context.bindingContext, context.overrideContext);\n\n if (context.compositionTransactionOwnershipToken) {\n return context.compositionTransactionOwnershipToken.waitForCompositionComplete().then(function () {\n return _this17._swap(context, result);\n }).then(function () {\n return result;\n });\n }\n\n return _this17._swap(context, result).then(function () {\n return result;\n });\n });\n } else if (context.viewSlot) {\n context.viewSlot.removeAll();\n\n if (context.compositionTransactionNotifier) {\n context.compositionTransactionNotifier.done();\n }\n\n return Promise.resolve(null);\n }\n\n return Promise.resolve(null);\n };\n\n return CompositionEngine;\n}()) || _class16);\n\nexport var ElementConfigResource = function () {\n function ElementConfigResource() {\n \n }\n\n ElementConfigResource.prototype.initialize = function initialize(container, target) {};\n\n ElementConfigResource.prototype.register = function register(registry, name) {};\n\n ElementConfigResource.prototype.load = function load(container, target) {\n var config = new target();\n var eventManager = container.get(EventManager);\n eventManager.registerElementConfig(config);\n };\n\n return ElementConfigResource;\n}();\n\nexport function resource(instanceOrConfig) {\n return function (target) {\n var isConfig = typeof instanceOrConfig === 'string' || Object.getPrototypeOf(instanceOrConfig) === Object.prototype;\n if (isConfig) {\n target.$resource = instanceOrConfig;\n } else {\n metadata.define(metadata.resource, instanceOrConfig, target);\n }\n };\n}\n\nexport function behavior(override) {\n return function (target) {\n if (override instanceof HtmlBehaviorResource) {\n metadata.define(metadata.resource, override, target);\n } else {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, target);\n Object.assign(r, override);\n }\n };\n}\n\nexport function customElement(name) {\n return function (target) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, target);\n r.elementName = validateBehaviorName(name, 'custom element');\n };\n}\n\nexport function customAttribute(name, defaultBindingMode, aliases) {\n return function (target) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, target);\n r.attributeName = validateBehaviorName(name, 'custom attribute');\n r.attributeDefaultBindingMode = defaultBindingMode;\n r.aliases = aliases;\n };\n}\n\nexport function templateController(target) {\n var deco = function deco(t) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n r.liftsContent = true;\n };\n\n return target ? deco(target) : deco;\n}\n\nexport function bindable(nameOrConfigOrTarget, key, descriptor) {\n var deco = function deco(target, key2, descriptor2) {\n var actualTarget = key2 ? target.constructor : target;\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, actualTarget);\n var prop = void 0;\n\n if (key2) {\n nameOrConfigOrTarget = nameOrConfigOrTarget || {};\n nameOrConfigOrTarget.name = key2;\n }\n\n prop = new BindableProperty(nameOrConfigOrTarget);\n return prop.registerWith(actualTarget, r, descriptor2);\n };\n\n if (!nameOrConfigOrTarget) {\n return deco;\n }\n\n if (key) {\n var _target = nameOrConfigOrTarget;\n nameOrConfigOrTarget = null;\n return deco(_target, key, descriptor);\n }\n\n return deco;\n}\n\nexport function dynamicOptions(target) {\n var deco = function deco(t) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n r.hasDynamicOptions = true;\n };\n\n return target ? deco(target) : deco;\n}\n\nvar defaultShadowDOMOptions = { mode: 'open' };\n\nexport function useShadowDOM(targetOrOptions) {\n var options = typeof targetOrOptions === 'function' || !targetOrOptions ? defaultShadowDOMOptions : targetOrOptions;\n\n var deco = function deco(t) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n r.targetShadowDOM = true;\n r.shadowDOMOptions = options;\n };\n\n return typeof targetOrOptions === 'function' ? deco(targetOrOptions) : deco;\n}\n\nexport function processAttributes(processor) {\n return function (t) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n r.processAttributes = function (compiler, resources, node, attributes, elementInstruction) {\n try {\n processor(compiler, resources, node, attributes, elementInstruction);\n } catch (error) {\n LogManager.getLogger('templating').error(error);\n }\n };\n };\n}\n\nfunction doNotProcessContent() {\n return false;\n}\n\nexport function processContent(processor) {\n return function (t) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n r.processContent = processor ? function (compiler, resources, node, instruction) {\n try {\n return processor(compiler, resources, node, instruction);\n } catch (error) {\n LogManager.getLogger('templating').error(error);\n return false;\n }\n } : doNotProcessContent;\n };\n}\n\nexport function containerless(target) {\n var deco = function deco(t) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, t);\n r.containerless = true;\n };\n\n return target ? deco(target) : deco;\n}\n\nexport function useViewStrategy(strategy) {\n return function (target) {\n metadata.define(ViewLocator.viewStrategyMetadataKey, strategy, target);\n };\n}\n\nexport function useView(path) {\n return useViewStrategy(new RelativeViewStrategy(path));\n}\n\nexport function inlineView(markup, dependencies, dependencyBaseUrl) {\n return useViewStrategy(new InlineViewStrategy(markup, dependencies, dependencyBaseUrl));\n}\n\nexport function noView(targetOrDependencies, dependencyBaseUrl) {\n var target = void 0;\n var dependencies = void 0;\n if (typeof targetOrDependencies === 'function') {\n target = targetOrDependencies;\n } else {\n dependencies = targetOrDependencies;\n target = undefined;\n }\n\n var deco = function deco(t) {\n metadata.define(ViewLocator.viewStrategyMetadataKey, new NoViewStrategy(dependencies, dependencyBaseUrl), t);\n };\n\n return target ? deco(target) : deco;\n}\n\nexport function view(templateOrConfig) {\n return function (target) {\n target.$view = templateOrConfig;\n };\n}\n\nexport function elementConfig(target) {\n var deco = function deco(t) {\n metadata.define(metadata.resource, new ElementConfigResource(), t);\n };\n\n return target ? deco(target) : deco;\n}\n\nexport function viewResources() {\n for (var _len = arguments.length, resources = Array(_len), _key7 = 0; _key7 < _len; _key7++) {\n resources[_key7] = arguments[_key7];\n }\n\n return function (target) {\n metadata.define(ViewEngine.viewModelRequireMetadataKey, resources, target);\n };\n}\n\nexport var TemplatingEngine = (_dec9 = inject(Container, ModuleAnalyzer, ViewCompiler, CompositionEngine), _dec9(_class17 = function () {\n function TemplatingEngine(container, moduleAnalyzer, viewCompiler, compositionEngine) {\n \n\n this._container = container;\n this._moduleAnalyzer = moduleAnalyzer;\n this._viewCompiler = viewCompiler;\n this._compositionEngine = compositionEngine;\n container.registerInstance(Animator, Animator.instance = new Animator());\n }\n\n TemplatingEngine.prototype.configureAnimator = function configureAnimator(animator) {\n this._container.unregister(Animator);\n this._container.registerInstance(Animator, Animator.instance = animator);\n };\n\n TemplatingEngine.prototype.compose = function compose(context) {\n return this._compositionEngine.compose(context);\n };\n\n TemplatingEngine.prototype.enhance = function enhance(instruction) {\n if (instruction instanceof DOM.Element) {\n instruction = { element: instruction };\n }\n\n var compilerInstructions = { letExpressions: [] };\n var resources = instruction.resources || this._container.get(ViewResources);\n\n this._viewCompiler._compileNode(instruction.element, resources, compilerInstructions, instruction.element.parentNode, 'root', true);\n\n var factory = new ViewFactory(instruction.element, compilerInstructions, resources);\n var container = instruction.container || this._container.createChild();\n var view = factory.create(container, BehaviorInstruction.enhance());\n\n view.bind(instruction.bindingContext || {}, instruction.overrideContext);\n\n view.firstChild = view.lastChild = view.fragment;\n view.fragment = DOM.createDocumentFragment();\n view.attached();\n\n return view;\n };\n\n return TemplatingEngine;\n}()) || _class17);","function trimDots(ary) {\r\n for (var i = 0; i < ary.length; ++i) {\r\n var part = ary[i];\r\n if (part === '.') {\r\n ary.splice(i, 1);\r\n i -= 1;\r\n }\r\n else if (part === '..') {\r\n if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') {\r\n continue;\r\n }\r\n else if (i > 0) {\r\n ary.splice(i - 1, 2);\r\n i -= 2;\r\n }\r\n }\r\n }\r\n}\r\nfunction relativeToFile(name, file) {\r\n var fileParts = file && file.split('/');\r\n var nameParts = name.trim().split('/');\r\n if (nameParts[0].charAt(0) === '.' && fileParts) {\r\n var normalizedBaseParts = fileParts.slice(0, fileParts.length - 1);\r\n nameParts.unshift.apply(nameParts, normalizedBaseParts);\r\n }\r\n trimDots(nameParts);\r\n return nameParts.join('/');\r\n}\r\nfunction join(path1, path2) {\r\n if (!path1) {\r\n return path2;\r\n }\r\n if (!path2) {\r\n return path1;\r\n }\r\n var schemeMatch = path1.match(/^([^/]*?:)\\//);\r\n var scheme = (schemeMatch && schemeMatch.length > 0) ? schemeMatch[1] : '';\r\n path1 = path1.substr(scheme.length);\r\n var urlPrefix;\r\n if (path1.indexOf('///') === 0 && scheme === 'file:') {\r\n urlPrefix = '///';\r\n }\r\n else if (path1.indexOf('//') === 0) {\r\n urlPrefix = '//';\r\n }\r\n else if (path1.indexOf('/') === 0) {\r\n urlPrefix = '/';\r\n }\r\n else {\r\n urlPrefix = '';\r\n }\r\n var trailingSlash = path2.slice(-1) === '/' ? '/' : '';\r\n var url1 = path1.split('/');\r\n var url2 = path2.split('/');\r\n var url3 = [];\r\n for (var i = 0, ii = url1.length; i < ii; ++i) {\r\n if (url1[i] === '..') {\r\n if (url3.length && url3[url3.length - 1] !== '..') {\r\n url3.pop();\r\n }\r\n else {\r\n url3.push(url1[i]);\r\n }\r\n }\r\n else if (url1[i] === '.' || url1[i] === '') {\r\n continue;\r\n }\r\n else {\r\n url3.push(url1[i]);\r\n }\r\n }\r\n for (var i = 0, ii = url2.length; i < ii; ++i) {\r\n if (url2[i] === '..') {\r\n if (url3.length && url3[url3.length - 1] !== '..') {\r\n url3.pop();\r\n }\r\n else {\r\n url3.push(url2[i]);\r\n }\r\n }\r\n else if (url2[i] === '.' || url2[i] === '') {\r\n continue;\r\n }\r\n else {\r\n url3.push(url2[i]);\r\n }\r\n }\r\n return scheme + urlPrefix + url3.join('/') + trailingSlash;\r\n}\r\nvar encode = encodeURIComponent;\r\nvar encodeKey = function (k) { return encode(k).replace('%24', '$'); };\r\nfunction buildParam(key, value, traditional) {\r\n var result = [];\r\n if (value === null || value === undefined) {\r\n return result;\r\n }\r\n if (Array.isArray(value)) {\r\n for (var i = 0, l = value.length; i < l; i++) {\r\n if (traditional) {\r\n result.push(encodeKey(key) + \"=\" + encode(value[i]));\r\n }\r\n else {\r\n var arrayKey = key + '[' + (typeof value[i] === 'object' && value[i] !== null ? i : '') + ']';\r\n result = result.concat(buildParam(arrayKey, value[i]));\r\n }\r\n }\r\n }\r\n else if (typeof (value) === 'object' && !traditional) {\r\n for (var propertyName in value) {\r\n result = result.concat(buildParam(key + '[' + propertyName + ']', value[propertyName]));\r\n }\r\n }\r\n else {\r\n result.push(encodeKey(key) + \"=\" + encode(value));\r\n }\r\n return result;\r\n}\r\nfunction buildQueryString(params, traditional) {\r\n var pairs = [];\r\n var keys = Object.keys(params || {}).sort();\r\n for (var i = 0, len = keys.length; i < len; i++) {\r\n var key = keys[i];\r\n pairs = pairs.concat(buildParam(key, params[key], traditional));\r\n }\r\n if (pairs.length === 0) {\r\n return '';\r\n }\r\n return pairs.join('&');\r\n}\r\nfunction processScalarParam(existedParam, value) {\r\n if (Array.isArray(existedParam)) {\r\n existedParam.push(value);\r\n return existedParam;\r\n }\r\n if (existedParam !== undefined) {\r\n return [existedParam, value];\r\n }\r\n return value;\r\n}\r\nfunction parseComplexParam(queryParams, keys, value) {\r\n var currentParams = queryParams;\r\n var keysLastIndex = keys.length - 1;\r\n for (var j = 0; j <= keysLastIndex; j++) {\r\n var key = keys[j] === '' ? currentParams.length : keys[j];\r\n preventPollution(key);\r\n if (j < keysLastIndex) {\r\n var prevValue = !currentParams[key] || typeof currentParams[key] === 'object' ? currentParams[key] : [currentParams[key]];\r\n currentParams = currentParams[key] = prevValue || (isNaN(keys[j + 1]) ? {} : []);\r\n }\r\n else {\r\n currentParams = currentParams[key] = value;\r\n }\r\n }\r\n}\r\nfunction parseQueryString(queryString) {\r\n var queryParams = {};\r\n if (!queryString || typeof queryString !== 'string') {\r\n return queryParams;\r\n }\r\n var query = queryString;\r\n if (query.charAt(0) === '?') {\r\n query = query.substr(1);\r\n }\r\n var pairs = query.replace(/\\+/g, ' ').split('&');\r\n for (var i = 0; i < pairs.length; i++) {\r\n var pair = pairs[i].split('=');\r\n var key = decodeURIComponent(pair[0]);\r\n if (!key) {\r\n continue;\r\n }\r\n var keys = key.split('][');\r\n var keysLastIndex = keys.length - 1;\r\n if (/\\[/.test(keys[0]) && /\\]$/.test(keys[keysLastIndex])) {\r\n keys[keysLastIndex] = keys[keysLastIndex].replace(/\\]$/, '');\r\n keys = keys.shift().split('[').concat(keys);\r\n keysLastIndex = keys.length - 1;\r\n }\r\n else {\r\n keysLastIndex = 0;\r\n }\r\n if (pair.length >= 2) {\r\n var value = pair[1] ? decodeURIComponent(pair[1]) : '';\r\n if (keysLastIndex) {\r\n parseComplexParam(queryParams, keys, value);\r\n }\r\n else {\r\n preventPollution(key);\r\n queryParams[key] = processScalarParam(queryParams[key], value);\r\n }\r\n }\r\n else {\r\n queryParams[key] = true;\r\n }\r\n }\r\n return queryParams;\r\n}\r\nfunction preventPollution(key) {\r\n if (key === '__proto__') {\r\n throw new Error('Prototype pollution detected.');\r\n }\r\n}\n\nexport { buildQueryString, join, parseQueryString, relativeToFile };\n//# sourceMappingURL=aurelia-path.js.map\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { DOM } from 'aurelia-pal';\nimport { transient } from 'aurelia-dependency-injection';\nvar containerTagName = 'ux-dialog-container';\nvar overlayTagName = 'ux-dialog-overlay';\nexport var transitionEvent = (function () {\n var transition;\n return function () {\n if (transition) {\n return transition;\n }\n var el = DOM.createElement('fakeelement');\n var transitions = {\n transition: 'transitionend',\n OTransition: 'oTransitionEnd',\n MozTransition: 'transitionend',\n WebkitTransition: 'webkitTransitionEnd'\n };\n for (var t in transitions) { // tslint:disable-line:prefer-const\n if (el.style[t] !== undefined) {\n transition = transitions[t];\n return transition;\n }\n }\n return '';\n };\n})();\nexport var hasTransition = (function () {\n var unprefixedName = 'transitionDuration';\n var prefixedNames = ['webkitTransitionDuration', 'oTransitionDuration'];\n var el;\n var transitionDurationName;\n return function (element) {\n if (!el) {\n el = DOM.createElement('fakeelement');\n if (unprefixedName in el.style) {\n transitionDurationName = unprefixedName;\n }\n else {\n transitionDurationName = prefixedNames.find(function (prefixed) { return (prefixed in el.style); });\n }\n }\n return !!transitionDurationName && !!(DOM.getComputedStyle(element)[transitionDurationName]\n .split(',')\n .find(function (duration) { return !!parseFloat(duration); }));\n };\n})();\nvar body;\nfunction getActionKey(e) {\n if ((e.code || e.key) === 'Escape' || e.keyCode === 27) {\n return 'Escape';\n }\n if ((e.code || e.key) === 'Enter' || e.keyCode === 13) {\n return 'Enter';\n }\n return undefined;\n}\nvar DialogRenderer = /** @class */ (function () {\n function DialogRenderer() {\n }\n DialogRenderer_1 = DialogRenderer;\n DialogRenderer.keyboardEventHandler = function (e) {\n var key = getActionKey(e);\n if (!key) {\n return;\n }\n var top = DialogRenderer_1.dialogControllers[DialogRenderer_1.dialogControllers.length - 1];\n if (!top || !top.settings.keyboard) {\n return;\n }\n var keyboard = top.settings.keyboard;\n if (key === 'Escape'\n && (keyboard === true || keyboard === key || (Array.isArray(keyboard) && keyboard.indexOf(key) > -1))) {\n top.cancel();\n }\n else if (key === 'Enter' && (keyboard === key || (Array.isArray(keyboard) && keyboard.indexOf(key) > -1))) {\n top.ok();\n }\n };\n DialogRenderer.trackController = function (dialogController) {\n if (!DialogRenderer_1.dialogControllers.length) {\n DOM.addEventListener(dialogController.settings.keyEvent || 'keyup', DialogRenderer_1.keyboardEventHandler, false);\n }\n DialogRenderer_1.dialogControllers.push(dialogController);\n };\n DialogRenderer.untrackController = function (dialogController) {\n var i = DialogRenderer_1.dialogControllers.indexOf(dialogController);\n if (i !== -1) {\n DialogRenderer_1.dialogControllers.splice(i, 1);\n }\n if (!DialogRenderer_1.dialogControllers.length) {\n DOM.removeEventListener(dialogController.settings.keyEvent || 'keyup', DialogRenderer_1.keyboardEventHandler, false);\n }\n };\n DialogRenderer.prototype.getOwnElements = function (parent, selector) {\n var elements = parent.querySelectorAll(selector);\n var own = [];\n for (var i = 0; i < elements.length; i++) {\n if (elements[i].parentElement === parent) {\n own.push(elements[i]);\n }\n }\n return own;\n };\n DialogRenderer.prototype.attach = function (dialogController) {\n var spacingWrapper = DOM.createElement('div'); // TODO: check if redundant\n spacingWrapper.appendChild(this.anchor);\n this.dialogContainer = DOM.createElement(containerTagName);\n this.dialogContainer.appendChild(spacingWrapper);\n this.dialogOverlay = DOM.createElement(overlayTagName);\n var zIndex = typeof dialogController.settings.startingZIndex === 'number'\n ? dialogController.settings.startingZIndex + ''\n : null;\n this.dialogOverlay.style.zIndex = zIndex;\n this.dialogContainer.style.zIndex = zIndex;\n var lastContainer = this.getOwnElements(this.host, containerTagName).pop();\n if (lastContainer && lastContainer.parentElement) {\n this.host.insertBefore(this.dialogContainer, lastContainer.nextSibling);\n this.host.insertBefore(this.dialogOverlay, lastContainer.nextSibling);\n }\n else {\n this.host.insertBefore(this.dialogContainer, this.host.firstChild);\n this.host.insertBefore(this.dialogOverlay, this.host.firstChild);\n }\n dialogController.controller.attached();\n this.host.classList.add('ux-dialog-open');\n };\n DialogRenderer.prototype.detach = function (dialogController) {\n this.host.removeChild(this.dialogOverlay);\n this.host.removeChild(this.dialogContainer);\n dialogController.controller.detached();\n if (!DialogRenderer_1.dialogControllers.length) {\n this.host.classList.remove('ux-dialog-open');\n }\n };\n DialogRenderer.prototype.setAsActive = function () {\n this.dialogOverlay.classList.add('active');\n this.dialogContainer.classList.add('active');\n };\n DialogRenderer.prototype.setAsInactive = function () {\n this.dialogOverlay.classList.remove('active');\n this.dialogContainer.classList.remove('active');\n };\n DialogRenderer.prototype.setupClickHandling = function (dialogController) {\n this.stopPropagation = function (e) { e._aureliaDialogHostClicked = true; };\n this.closeDialogClick = function (e) {\n if (dialogController.settings.overlayDismiss && !e._aureliaDialogHostClicked) {\n dialogController.cancel();\n }\n };\n this.dialogContainer.addEventListener('click', this.closeDialogClick);\n this.anchor.addEventListener('click', this.stopPropagation);\n };\n DialogRenderer.prototype.clearClickHandling = function () {\n this.dialogContainer.removeEventListener('click', this.closeDialogClick);\n this.anchor.removeEventListener('click', this.stopPropagation);\n };\n DialogRenderer.prototype.centerDialog = function () {\n var child = this.dialogContainer.children[0];\n var vh = Math.max(DOM.querySelectorAll('html')[0].clientHeight, window.innerHeight || 0);\n child.style.marginTop = Math.max((vh - child.offsetHeight) / 2, 30) + 'px';\n child.style.marginBottom = Math.max((vh - child.offsetHeight) / 2, 30) + 'px';\n };\n DialogRenderer.prototype.awaitTransition = function (setActiveInactive, ignore) {\n var _this = this;\n return new Promise(function (resolve) {\n // tslint:disable-next-line:no-this-assignment\n var renderer = _this;\n var eventName = transitionEvent();\n function onTransitionEnd(e) {\n if (e.target !== renderer.dialogContainer) {\n return;\n }\n renderer.dialogContainer.removeEventListener(eventName, onTransitionEnd);\n resolve();\n }\n if (ignore || !hasTransition(_this.dialogContainer)) {\n resolve();\n }\n else {\n _this.dialogContainer.addEventListener(eventName, onTransitionEnd);\n }\n setActiveInactive();\n });\n };\n DialogRenderer.prototype.getDialogContainer = function () {\n return this.anchor || (this.anchor = DOM.createElement('div'));\n };\n DialogRenderer.prototype.showDialog = function (dialogController) {\n var _this = this;\n if (!body) {\n body = DOM.querySelectorAll('body')[0];\n }\n if (dialogController.settings.host) {\n this.host = dialogController.settings.host;\n }\n else {\n this.host = body;\n }\n var settings = dialogController.settings;\n this.attach(dialogController);\n if (typeof settings.position === 'function') {\n settings.position(this.dialogContainer, this.dialogOverlay);\n }\n else if (!settings.centerHorizontalOnly) {\n this.centerDialog();\n }\n DialogRenderer_1.trackController(dialogController);\n this.setupClickHandling(dialogController);\n return this.awaitTransition(function () { return _this.setAsActive(); }, dialogController.settings.ignoreTransitions);\n };\n DialogRenderer.prototype.hideDialog = function (dialogController) {\n var _this = this;\n this.clearClickHandling();\n DialogRenderer_1.untrackController(dialogController);\n return this.awaitTransition(function () { return _this.setAsInactive(); }, dialogController.settings.ignoreTransitions)\n .then(function () { _this.detach(dialogController); });\n };\n var DialogRenderer_1;\n DialogRenderer.dialogControllers = [];\n DialogRenderer = DialogRenderer_1 = __decorate([\n transient()\n ], DialogRenderer);\n return DialogRenderer;\n}());\nexport { DialogRenderer };\n","/**\n * @internal\n */\nexport function createDialogCloseError(output) {\n var error = new Error();\n error.wasCancelled = false;\n error.output = output;\n return error;\n}\n","var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\n\n\nimport { relativeToFile } from 'aurelia-path';\nimport { Origin } from 'aurelia-metadata';\n\nexport var TemplateDependency = function TemplateDependency(src, name) {\n \n\n this.src = src;\n this.name = name;\n};\n\nexport var TemplateRegistryEntry = function () {\n function TemplateRegistryEntry(address) {\n \n\n this.templateIsLoaded = false;\n this.factoryIsReady = false;\n this.resources = null;\n this.dependencies = null;\n\n this.address = address;\n this.onReady = null;\n this._template = null;\n this._factory = null;\n }\n\n TemplateRegistryEntry.prototype.addDependency = function addDependency(src, name) {\n var finalSrc = typeof src === 'string' ? relativeToFile(src, this.address) : Origin.get(src).moduleId;\n\n this.dependencies.push(new TemplateDependency(finalSrc, name));\n };\n\n _createClass(TemplateRegistryEntry, [{\n key: 'template',\n get: function get() {\n return this._template;\n },\n set: function set(value) {\n var address = this.address;\n var requires = void 0;\n var current = void 0;\n var src = void 0;\n var dependencies = void 0;\n\n this._template = value;\n this.templateIsLoaded = true;\n\n requires = value.content.querySelectorAll('require');\n dependencies = this.dependencies = new Array(requires.length);\n\n for (var i = 0, ii = requires.length; i < ii; ++i) {\n current = requires[i];\n src = current.getAttribute('from');\n\n if (!src) {\n throw new Error(' element in ' + address + ' has no \"from\" attribute.');\n }\n\n dependencies[i] = new TemplateDependency(relativeToFile(src, address), current.getAttribute('as'));\n\n if (current.parentNode) {\n current.parentNode.removeChild(current);\n }\n }\n }\n }, {\n key: 'factory',\n get: function get() {\n return this._factory;\n },\n set: function set(value) {\n this._factory = value;\n this.factoryIsReady = true;\n }\n }]);\n\n return TemplateRegistryEntry;\n}();\n\nexport var Loader = function () {\n function Loader() {\n \n\n this.templateRegistry = {};\n }\n\n Loader.prototype.map = function map(id, source) {\n throw new Error('Loaders must implement map(id, source).');\n };\n\n Loader.prototype.normalizeSync = function normalizeSync(moduleId, relativeTo) {\n throw new Error('Loaders must implement normalizeSync(moduleId, relativeTo).');\n };\n\n Loader.prototype.normalize = function normalize(moduleId, relativeTo) {\n throw new Error('Loaders must implement normalize(moduleId: string, relativeTo: string): Promise.');\n };\n\n Loader.prototype.loadModule = function loadModule(id) {\n throw new Error('Loaders must implement loadModule(id).');\n };\n\n Loader.prototype.loadAllModules = function loadAllModules(ids) {\n throw new Error('Loader must implement loadAllModules(ids).');\n };\n\n Loader.prototype.loadTemplate = function loadTemplate(url) {\n throw new Error('Loader must implement loadTemplate(url).');\n };\n\n Loader.prototype.loadText = function loadText(url) {\n throw new Error('Loader must implement loadText(url).');\n };\n\n Loader.prototype.applyPluginToUrl = function applyPluginToUrl(url, pluginName) {\n throw new Error('Loader must implement applyPluginToUrl(url, pluginName).');\n };\n\n Loader.prototype.addPlugin = function addPlugin(pluginName, implementation) {\n throw new Error('Loader must implement addPlugin(pluginName, implementation).');\n };\n\n Loader.prototype.getOrCreateTemplateRegistryEntry = function getOrCreateTemplateRegistryEntry(address) {\n return this.templateRegistry[address] || (this.templateRegistry[address] = new TemplateRegistryEntry(address));\n };\n\n return Loader;\n}();","var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\n\nimport { PLATFORM } from 'aurelia-pal';\n\nfunction isObject(val) {\n return val && (typeof val === 'function' || (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object');\n}\n\nexport var metadata = {\n resource: 'aurelia:resource',\n paramTypes: 'design:paramtypes',\n propertyType: 'design:type',\n properties: 'design:properties',\n get: function get(metadataKey, target, targetKey) {\n if (!isObject(target)) {\n return undefined;\n }\n var result = metadata.getOwn(metadataKey, target, targetKey);\n return result === undefined ? metadata.get(metadataKey, Object.getPrototypeOf(target), targetKey) : result;\n },\n getOwn: function getOwn(metadataKey, target, targetKey) {\n if (!isObject(target)) {\n return undefined;\n }\n return Reflect.getOwnMetadata(metadataKey, target, targetKey);\n },\n define: function define(metadataKey, metadataValue, target, targetKey) {\n Reflect.defineMetadata(metadataKey, metadataValue, target, targetKey);\n },\n getOrCreateOwn: function getOrCreateOwn(metadataKey, Type, target, targetKey) {\n var result = metadata.getOwn(metadataKey, target, targetKey);\n\n if (result === undefined) {\n result = new Type();\n Reflect.defineMetadata(metadataKey, result, target, targetKey);\n }\n\n return result;\n }\n};\n\nvar originStorage = new Map();\nvar unknownOrigin = Object.freeze({ moduleId: undefined, moduleMember: undefined });\n\nexport var Origin = function () {\n function Origin(moduleId, moduleMember) {\n \n\n this.moduleId = moduleId;\n this.moduleMember = moduleMember;\n }\n\n Origin.get = function get(fn) {\n var origin = originStorage.get(fn);\n\n if (origin === undefined) {\n PLATFORM.eachModule(function (key, value) {\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object') {\n for (var name in value) {\n try {\n var exp = value[name];\n if (exp === fn) {\n originStorage.set(fn, origin = new Origin(key, name));\n return true;\n }\n } catch (e) {}\n }\n }\n\n if (value === fn) {\n originStorage.set(fn, origin = new Origin(key, 'default'));\n return true;\n }\n\n return false;\n });\n }\n\n return origin || unknownOrigin;\n };\n\n Origin.set = function set(fn, origin) {\n originStorage.set(fn, origin);\n };\n\n return Origin;\n}();\n\nexport function decorators() {\n for (var _len = arguments.length, rest = Array(_len), _key = 0; _key < _len; _key++) {\n rest[_key] = arguments[_key];\n }\n\n var applicator = function applicator(target, key, descriptor) {\n var i = rest.length;\n\n if (key) {\n descriptor = descriptor || {\n value: target[key],\n writable: true,\n configurable: true,\n enumerable: true\n };\n\n while (i--) {\n descriptor = rest[i](target, key, descriptor) || descriptor;\n }\n\n Object.defineProperty(target, key, descriptor);\n } else {\n while (i--) {\n target = rest[i](target) || target;\n }\n }\n\n return target;\n };\n\n applicator.on = applicator;\n return applicator;\n}\n\nexport function deprecated(optionsOrTarget, maybeKey, maybeDescriptor) {\n function decorator(target, key, descriptor) {\n var methodSignature = target.constructor.name + '#' + key;\n var options = maybeKey ? {} : optionsOrTarget || {};\n var message = 'DEPRECATION - ' + methodSignature;\n\n if (typeof descriptor.value !== 'function') {\n throw new SyntaxError('Only methods can be marked as deprecated.');\n }\n\n if (options.message) {\n message += ' - ' + options.message;\n }\n\n return _extends({}, descriptor, {\n value: function deprecationWrapper() {\n if (options.error) {\n throw new Error(message);\n } else {\n console.warn(message);\n }\n\n return descriptor.value.apply(this, arguments);\n }\n });\n }\n\n return maybeKey ? decorator(optionsOrTarget, maybeKey, maybeDescriptor) : decorator;\n}\n\nexport function mixin(behavior) {\n var instanceKeys = Object.keys(behavior);\n\n function _mixin(possible) {\n var decorator = function decorator(target) {\n var resolvedTarget = typeof target === 'function' ? target.prototype : target;\n\n var i = instanceKeys.length;\n while (i--) {\n var property = instanceKeys[i];\n Object.defineProperty(resolvedTarget, property, {\n value: behavior[property],\n writable: true\n });\n }\n };\n\n return possible ? decorator(possible) : decorator;\n }\n\n return _mixin;\n}\n\nfunction alwaysValid() {\n return true;\n}\nfunction noCompose() {}\n\nfunction ensureProtocolOptions(options) {\n if (options === undefined) {\n options = {};\n } else if (typeof options === 'function') {\n options = {\n validate: options\n };\n }\n\n if (!options.validate) {\n options.validate = alwaysValid;\n }\n\n if (!options.compose) {\n options.compose = noCompose;\n }\n\n return options;\n}\n\nfunction createProtocolValidator(validate) {\n return function (target) {\n var result = validate(target);\n return result === true;\n };\n}\n\nfunction createProtocolAsserter(name, validate) {\n return function (target) {\n var result = validate(target);\n if (result !== true) {\n throw new Error(result || name + ' was not correctly implemented.');\n }\n };\n}\n\nexport function protocol(name, options) {\n options = ensureProtocolOptions(options);\n\n var result = function result(target) {\n var resolvedTarget = typeof target === 'function' ? target.prototype : target;\n\n options.compose(resolvedTarget);\n result.assert(resolvedTarget);\n\n Object.defineProperty(resolvedTarget, 'protocol:' + name, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: true\n });\n };\n\n result.validate = createProtocolValidator(options.validate);\n result.assert = createProtocolAsserter(name, options.validate);\n\n return result;\n}\n\nprotocol.create = function (name, options) {\n options = ensureProtocolOptions(options);\n var hidden = 'protocol:' + name;\n var result = function result(target) {\n var decorator = protocol(name, options);\n return target ? decorator(target) : decorator;\n };\n\n result.decorates = function (obj) {\n return obj[hidden] === true;\n };\n result.validate = createProtocolValidator(options.validate);\n result.assert = createProtocolAsserter(name, options.validate);\n\n return result;\n};","var _class, _temp;\n\n\n\nimport * as LogManager from 'aurelia-logging';\nimport i18next from 'i18next';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nimport { EventAggregator } from 'aurelia-event-aggregator';\nimport { BindingSignaler } from 'aurelia-templating-resources';\n\nexport var I18N = (_temp = _class = function () {\n function I18N(ea, signaler) {\n var _this = this;\n\n \n\n this.globalVars = {};\n this.params = {};\n this.i18nextDefered = {\n resolve: null,\n promise: null\n };\n\n this.i18next = i18next;\n this.ea = ea;\n this.Intl = PLATFORM.global.Intl;\n this.signaler = signaler;\n this.i18nextDefered.promise = new Promise(function (resolve) {\n return _this.i18nextDefered.resolve = resolve;\n });\n }\n\n I18N.prototype.setup = function setup(options) {\n var _this2 = this;\n\n var defaultOptions = {\n skipTranslationOnMissingKey: false,\n compatibilityAPI: 'v1',\n compatibilityJSON: 'v1',\n lng: 'en',\n attributes: ['t', 'i18n'],\n fallbackLng: 'en',\n debug: false\n };\n\n i18next.init(options || defaultOptions, function (err, t) {\n if (i18next.options.attributes instanceof String) {\n i18next.options.attributes = [i18next.options.attributes];\n }\n\n _this2.i18nextDefered.resolve(_this2.i18next);\n });\n\n return this.i18nextDefered.promise;\n };\n\n I18N.prototype.i18nextReady = function i18nextReady() {\n return this.i18nextDefered.promise;\n };\n\n I18N.prototype.setLocale = function setLocale(locale) {\n var _this3 = this;\n\n return new Promise(function (resolve) {\n var oldLocale = _this3.getLocale();\n _this3.i18next.changeLanguage(locale, function (err, tr) {\n _this3.ea.publish('i18n:locale:changed', { oldValue: oldLocale, newValue: locale });\n _this3.signaler.signal('aurelia-translation-signal');\n resolve(tr);\n });\n });\n };\n\n I18N.prototype.getLocale = function getLocale() {\n return this.i18next.language;\n };\n\n I18N.prototype.nf = function nf(options, locales) {\n return new this.Intl.NumberFormat(locales || this.getLocale(), options || {});\n };\n\n I18N.prototype.uf = function uf(number, locale) {\n var nf = this.nf({}, locale || this.getLocale());\n var comparer = nf.format(10000 / 3);\n\n var thousandSeparator = comparer[1];\n var decimalSeparator = comparer[5];\n\n if (thousandSeparator === '.') {\n thousandSeparator = '\\\\.';\n }\n\n var result = number.replace(new RegExp(thousandSeparator, 'g'), '').replace(/[^\\d.,-]/g, '').replace(decimalSeparator, '.');\n\n return Number(result);\n };\n\n I18N.prototype.df = function df(options, locales) {\n return new this.Intl.DateTimeFormat(locales || this.getLocale(), options);\n };\n\n I18N.prototype.tr = function tr(key, options) {\n var fullOptions = this.globalVars;\n\n if (options !== undefined) {\n fullOptions = Object.assign(Object.assign({}, this.globalVars), options);\n }\n\n return this.i18next.t(key, fullOptions);\n };\n\n I18N.prototype.registerGlobalVariable = function registerGlobalVariable(key, value) {\n this.globalVars[key] = value;\n };\n\n I18N.prototype.unregisterGlobalVariable = function unregisterGlobalVariable(key) {\n delete this.globalVars[key];\n };\n\n I18N.prototype.updateTranslations = function updateTranslations(el) {\n if (!el || !el.querySelectorAll) {\n return;\n }\n\n var i = void 0;\n var l = void 0;\n\n var selector = [].concat(this.i18next.options.attributes);\n for (i = 0, l = selector.length; i < l; i++) {\n selector[i] = '[' + selector[i] + ']';\n }selector = selector.join(',');\n\n var nodes = el.querySelectorAll(selector);\n for (i = 0, l = nodes.length; i < l; i++) {\n var node = nodes[i];\n var keys = void 0;\n var params = void 0;\n\n for (var i2 = 0, l2 = this.i18next.options.attributes.length; i2 < l2; i2++) {\n keys = node.getAttribute(this.i18next.options.attributes[i2]);\n var pname = this.i18next.options.attributes[i2] + '-params';\n\n if (pname && node.au && node.au[pname]) {\n params = node.au[pname].viewModel.value;\n }\n\n if (keys) break;\n }\n\n if (!keys) continue;\n\n this.updateValue(node, keys, params);\n }\n };\n\n I18N.prototype.updateValue = function updateValue(node, value, params) {\n if (value === null || value === undefined) {\n return;\n }\n\n var keys = value.toString().split(';');\n var i = keys.length;\n\n while (i--) {\n var key = keys[i];\n\n var re = /\\[([a-z\\-, ]*)\\]/ig;\n\n var m = void 0;\n var attr = 'text';\n\n if (node.nodeName === 'IMG') attr = 'src';\n\n while ((m = re.exec(key)) !== null) {\n if (m.index === re.lastIndex) {\n re.lastIndex++;\n }\n if (m) {\n key = key.replace(m[0], '');\n attr = m[1];\n }\n }\n\n var attrs = attr.split(',');\n var j = attrs.length;\n\n while (j--) {\n attr = attrs[j].trim();\n\n if (!node._textContent) node._textContent = node.textContent;\n if (!node._innerHTML) node._innerHTML = node.innerHTML;\n\n var attrCC = attr.replace(/-([a-z])/g, function (g) {\n return g[1].toUpperCase();\n });\n var reservedNames = ['prepend', 'append', 'text', 'html'];\n var i18nLogger = LogManager.getLogger('i18n');\n\n if (reservedNames.indexOf(attr) > -1 && node.au && node.au.controller && node.au.controller.viewModel && attrCC in node.au.controller.viewModel) {\n i18nLogger.warn('Aurelia I18N reserved attribute name\\n\\n [' + reservedNames.join(', ') + ']\\n\\n Your custom element has a bindable named ' + attr + ' which is a reserved word.\\n\\n If you\\'d like Aurelia I18N to translate your bindable instead, please consider giving it another name.');\n }\n\n if (this.i18next.options.skipTranslationOnMissingKey && this.tr(key, params) === key) {\n i18nLogger.warn('Couldn\\'t find translation for key: ' + key);\n return;\n }\n\n switch (attr) {\n case 'text':\n var newChild = DOM.createTextNode(this.tr(key, params));\n if (node._newChild && node._newChild.parentNode === node) {\n node.removeChild(node._newChild);\n }\n\n node._newChild = newChild;\n while (node.firstChild) {\n node.removeChild(node.firstChild);\n }\n node.appendChild(node._newChild);\n break;\n case 'prepend':\n var prependParser = DOM.createElement('div');\n prependParser.innerHTML = this.tr(key, params);\n for (var ni = node.childNodes.length - 1; ni >= 0; ni--) {\n if (node.childNodes[ni]._prepended) {\n node.removeChild(node.childNodes[ni]);\n }\n }\n\n for (var pi = prependParser.childNodes.length - 1; pi >= 0; pi--) {\n prependParser.childNodes[pi]._prepended = true;\n if (node.firstChild) {\n node.insertBefore(prependParser.childNodes[pi], node.firstChild);\n } else {\n node.appendChild(prependParser.childNodes[pi]);\n }\n }\n break;\n case 'append':\n var appendParser = DOM.createElement('div');\n appendParser.innerHTML = this.tr(key, params);\n for (var _ni = node.childNodes.length - 1; _ni >= 0; _ni--) {\n if (node.childNodes[_ni]._appended) {\n node.removeChild(node.childNodes[_ni]);\n }\n }\n\n while (appendParser.firstChild) {\n appendParser.firstChild._appended = true;\n node.appendChild(appendParser.firstChild);\n }\n break;\n case 'html':\n node.innerHTML = this.tr(key, params);\n break;\n default:\n if (node.au && node.au.controller && node.au.controller.viewModel && attrCC in node.au.controller.viewModel) {\n node.au.controller.viewModel[attrCC] = this.tr(key, params);\n } else {\n node.setAttribute(attr, this.tr(key, params));\n }\n\n break;\n }\n }\n }\n };\n\n return I18N;\n}(), _class.inject = [EventAggregator, BindingSignaler], _temp);","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\n\nimport { DOM, FEATURE } from 'aurelia-pal';\n\nvar stackSeparator = '\\nEnqueued in TaskQueue by:\\n';\nvar microStackSeparator = '\\nEnqueued in MicroTaskQueue by:\\n';\n\nfunction makeRequestFlushFromMutationObserver(flush) {\n var observer = DOM.createMutationObserver(flush);\n var val = 'a';\n var node = DOM.createTextNode('a');\n var values = Object.create(null);\n values.a = 'b';\n values.b = 'a';\n observer.observe(node, { characterData: true });\n return function requestFlush() {\n node.data = val = values[val];\n };\n}\n\nfunction makeRequestFlushFromTimer(flush) {\n return function requestFlush() {\n var timeoutHandle = setTimeout(handleFlushTimer, 0);\n\n var intervalHandle = setInterval(handleFlushTimer, 50);\n function handleFlushTimer() {\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n flush();\n }\n };\n}\n\nfunction onError(error, task, longStacks) {\n if (longStacks && task.stack && (typeof error === 'undefined' ? 'undefined' : _typeof(error)) === 'object' && error !== null) {\n error.stack = filterFlushStack(error.stack) + task.stack;\n }\n\n if ('onError' in task) {\n task.onError(error);\n } else {\n setTimeout(function () {\n throw error;\n }, 0);\n }\n}\n\nexport var TaskQueue = function () {\n function TaskQueue() {\n var _this = this;\n\n \n\n this.flushing = false;\n this.longStacks = false;\n\n this.microTaskQueue = [];\n this.microTaskQueueCapacity = 1024;\n this.taskQueue = [];\n\n if (FEATURE.mutationObserver) {\n this.requestFlushMicroTaskQueue = makeRequestFlushFromMutationObserver(function () {\n return _this.flushMicroTaskQueue();\n });\n } else {\n this.requestFlushMicroTaskQueue = makeRequestFlushFromTimer(function () {\n return _this.flushMicroTaskQueue();\n });\n }\n\n this.requestFlushTaskQueue = makeRequestFlushFromTimer(function () {\n return _this.flushTaskQueue();\n });\n }\n\n TaskQueue.prototype._flushQueue = function _flushQueue(queue, capacity) {\n var index = 0;\n var task = void 0;\n\n try {\n this.flushing = true;\n while (index < queue.length) {\n task = queue[index];\n if (this.longStacks) {\n this.stack = typeof task.stack === 'string' ? task.stack : undefined;\n }\n task.call();\n index++;\n\n if (index > capacity) {\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n\n queue.length -= index;\n index = 0;\n }\n }\n } catch (error) {\n onError(error, task, this.longStacks);\n } finally {\n this.flushing = false;\n }\n };\n\n TaskQueue.prototype.queueMicroTask = function queueMicroTask(task) {\n if (this.microTaskQueue.length < 1) {\n this.requestFlushMicroTaskQueue();\n }\n\n if (this.longStacks) {\n task.stack = this.prepareQueueStack(microStackSeparator);\n }\n\n this.microTaskQueue.push(task);\n };\n\n TaskQueue.prototype.queueTask = function queueTask(task) {\n if (this.taskQueue.length < 1) {\n this.requestFlushTaskQueue();\n }\n\n if (this.longStacks) {\n task.stack = this.prepareQueueStack(stackSeparator);\n }\n\n this.taskQueue.push(task);\n };\n\n TaskQueue.prototype.flushTaskQueue = function flushTaskQueue() {\n var queue = this.taskQueue;\n this.taskQueue = [];\n this._flushQueue(queue, Number.MAX_VALUE);\n };\n\n TaskQueue.prototype.flushMicroTaskQueue = function flushMicroTaskQueue() {\n var queue = this.microTaskQueue;\n this._flushQueue(queue, this.microTaskQueueCapacity);\n queue.length = 0;\n };\n\n TaskQueue.prototype.prepareQueueStack = function prepareQueueStack(separator) {\n var stack = separator + filterQueueStack(captureStack());\n\n if (typeof this.stack === 'string') {\n stack = filterFlushStack(stack) + this.stack;\n }\n\n return stack;\n };\n\n return TaskQueue;\n}();\n\nfunction captureStack() {\n var error = new Error();\n\n if (error.stack) {\n return error.stack;\n }\n\n try {\n throw error;\n } catch (e) {\n return e.stack;\n }\n}\n\nfunction filterQueueStack(stack) {\n return stack.replace(/^[\\s\\S]*?\\bqueue(Micro)?Task\\b[^\\n]*\\n/, '');\n}\n\nfunction filterFlushStack(stack) {\n var index = stack.lastIndexOf('flushMicroTaskQueue');\n\n if (index < 0) {\n index = stack.lastIndexOf('flushTaskQueue');\n if (index < 0) {\n return stack;\n }\n }\n\n index = stack.lastIndexOf('\\n', index);\n\n return index < 0 ? stack : stack.substr(0, index);\n}","import { Renderer } from './renderer';\nimport { DefaultDialogSettings } from './dialog-settings';\nimport { DialogRenderer } from './dialog-renderer';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nvar defaultRenderer = DialogRenderer;\nvar resources = {\n 'ux-dialog': PLATFORM.moduleName('./ux-dialog'),\n 'ux-dialog-header': PLATFORM.moduleName('./ux-dialog-header'),\n 'ux-dialog-body': PLATFORM.moduleName('./ux-dialog-body'),\n 'ux-dialog-footer': PLATFORM.moduleName('./ux-dialog-footer'),\n 'attach-focus': PLATFORM.moduleName('./attach-focus')\n};\n// tslint:disable-next-line:max-line-length\nvar defaultCSSText = \"ux-dialog-container,ux-dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0}ux-dialog-overlay{opacity:0}ux-dialog-overlay.active{opacity:1}ux-dialog-container{display:block;transition:opacity .2s linear;opacity:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch}ux-dialog-container.active{opacity:1}ux-dialog-container>div{padding:30px}ux-dialog-container>div>div{display:block;min-width:300px;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto}ux-dialog-container,ux-dialog-container>div,ux-dialog-container>div>div{outline:0}ux-dialog{display:table;box-shadow:0 5px 15px rgba(0,0,0,.5);border:1px solid rgba(0,0,0,.2);border-radius:5px;padding:3px;min-width:300px;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border-image-source:initial;border-image-slice:initial;border-image-width:initial;border-image-outset:initial;border-image-repeat:initial;background:#fff}ux-dialog>ux-dialog-header{display:block;padding:16px;border-bottom:1px solid #e5e5e5}ux-dialog>ux-dialog-header>button{float:right;border:none;display:block;width:32px;height:32px;background:0 0;font-size:22px;line-height:16px;margin:-14px -16px 0 0;padding:0;cursor:pointer}ux-dialog>ux-dialog-body{display:block;padding:16px}ux-dialog>ux-dialog-footer{display:block;padding:6px;border-top:1px solid #e5e5e5;text-align:right}ux-dialog>ux-dialog-footer button{color:#333;background-color:#fff;padding:6px 12px;font-size:14px;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid #ccc;border-radius:4px;margin:5px 0 5px 5px}ux-dialog>ux-dialog-footer button:disabled{cursor:default;opacity:.45}ux-dialog>ux-dialog-footer button:hover:enabled{color:#333;background-color:#e6e6e6;border-color:#adadad}.ux-dialog-open{overflow:hidden}\";\n/**\n * A configuration builder for the dialog plugin.\n */\nvar DialogConfiguration = /** @class */ (function () {\n function DialogConfiguration(frameworkConfiguration, applySetter) {\n var _this = this;\n this.renderer = defaultRenderer;\n this.cssText = defaultCSSText;\n this.resources = [];\n this.fwConfig = frameworkConfiguration;\n this.settings = this.fwConfig.container.get(DefaultDialogSettings);\n applySetter(function () { return _this._apply(); });\n }\n DialogConfiguration.prototype._apply = function () {\n var _this = this;\n this.fwConfig.transient(Renderer, this.renderer);\n this.resources.forEach(function (resourceName) { return _this.fwConfig.globalResources(resources[resourceName]); });\n if (this.cssText) {\n DOM.injectStyles(this.cssText);\n }\n };\n /**\n * Selects the Aurelia conventional defaults for the dialog plugin.\n * @return This instance.\n */\n DialogConfiguration.prototype.useDefaults = function () {\n return this.useRenderer(defaultRenderer)\n .useCSS(defaultCSSText)\n .useStandardResources();\n };\n /**\n * Exports the standard set of dialog behaviors to Aurelia's global resources.\n * @return This instance.\n */\n DialogConfiguration.prototype.useStandardResources = function () {\n return this.useResource('ux-dialog')\n .useResource('ux-dialog-header')\n .useResource('ux-dialog-body')\n .useResource('ux-dialog-footer')\n .useResource('attach-focus');\n };\n /**\n * Exports the chosen dialog element or view to Aurelia's global resources.\n * @param resourceName The name of the dialog resource to export.\n * @return This instance.\n */\n DialogConfiguration.prototype.useResource = function (resourceName) {\n this.resources.push(resourceName);\n return this;\n };\n /**\n * Configures the plugin to use a specific dialog renderer.\n * @param renderer A type that implements the Renderer interface.\n * @param settings Global settings for the renderer.\n * @return This instance.\n */\n DialogConfiguration.prototype.useRenderer = function (renderer, settings) {\n this.renderer = renderer;\n if (settings) {\n Object.assign(this.settings, settings);\n }\n return this;\n };\n /**\n * Configures the plugin to use specific css. You can pass an empty string to clear any set css.\n * @param cssText The css to use in place of the default styles.\n * @return This instance.\n */\n DialogConfiguration.prototype.useCSS = function (cssText) {\n this.cssText = cssText;\n return this;\n };\n return DialogConfiguration;\n}());\nexport { DialogConfiguration };\n","import { DialogConfiguration } from './dialog-configuration';\nexport function configure(frameworkConfig, callback) {\n var applyConfig = null;\n var config = new DialogConfiguration(frameworkConfig, function (apply) { applyConfig = apply; });\n if (typeof callback === 'function') {\n callback(config);\n }\n else {\n config.useDefaults();\n }\n applyConfig();\n}\nexport * from './ux-dialog';\nexport * from './ux-dialog-header';\nexport * from './ux-dialog-body';\nexport * from './ux-dialog-footer';\nexport * from './attach-focus';\nexport * from './dialog-settings';\nexport * from './dialog-configuration';\nexport * from './renderer';\nexport * from './dialog-cancel-error';\nexport * from './dialog-service';\nexport * from './dialog-controller';\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customAttribute } from 'aurelia-templating';\nimport { DOM } from 'aurelia-pal';\nvar AttachFocus = /** @class */ (function () {\n function AttachFocus(element) {\n this.element = element;\n this.value = true;\n }\n /**\n * @internal\n */\n // tslint:disable-next-line:member-ordering\n AttachFocus.inject = function () { return [DOM.Element]; };\n AttachFocus.prototype.attached = function () {\n if (this.value && this.value !== 'false') {\n this.element.focus();\n }\n };\n AttachFocus.prototype.valueChanged = function (newValue) {\n this.value = newValue;\n };\n AttachFocus = __decorate([\n customAttribute('attach-focus')\n ], AttachFocus);\n return AttachFocus;\n}());\nexport { AttachFocus };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement, inlineView } from 'aurelia-templating';\nvar UxDialog = /** @class */ (function () {\n function UxDialog() {\n }\n UxDialog = __decorate([\n customElement('ux-dialog'),\n inlineView(\"\\n \\n\")\n ], UxDialog);\n return UxDialog;\n}());\nexport { UxDialog };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement, inlineView } from 'aurelia-templating';\nvar UxDialogBody = /** @class */ (function () {\n function UxDialogBody() {\n }\n UxDialogBody = __decorate([\n customElement('ux-dialog-body'),\n inlineView(\"\\n \\n\")\n ], UxDialogBody);\n return UxDialogBody;\n}());\nexport { UxDialogBody };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement, bindable, inlineView } from 'aurelia-templating';\nimport { DialogController } from './dialog-controller';\n/**\n * View-model for footer of Dialog.\n */\nvar UxDialogFooter = /** @class */ (function () {\n function UxDialogFooter(controller) {\n this.controller = controller;\n this.buttons = [];\n this.useDefaultButtons = false;\n }\n UxDialogFooter_1 = UxDialogFooter;\n UxDialogFooter.isCancelButton = function (value) {\n return value === 'Cancel';\n };\n UxDialogFooter.prototype.close = function (buttonValue) {\n if (UxDialogFooter_1.isCancelButton(buttonValue)) {\n this.controller.cancel(buttonValue);\n }\n else {\n this.controller.ok(buttonValue);\n }\n };\n UxDialogFooter.prototype.useDefaultButtonsChanged = function (newValue) {\n if (newValue) {\n this.buttons = ['Cancel', 'Ok'];\n }\n };\n var UxDialogFooter_1;\n /**\n * @internal\n */\n // tslint:disable-next-line:member-ordering\n UxDialogFooter.inject = [DialogController];\n __decorate([\n bindable\n ], UxDialogFooter.prototype, \"buttons\", void 0);\n __decorate([\n bindable\n ], UxDialogFooter.prototype, \"useDefaultButtons\", void 0);\n UxDialogFooter = UxDialogFooter_1 = __decorate([\n customElement('ux-dialog-footer'),\n inlineView(\"\\n \\n\")\n ], UxDialogFooter);\n return UxDialogFooter;\n}());\nexport { UxDialogFooter };\n","var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nimport { customElement, bindable, inlineView } from 'aurelia-templating';\nimport { DialogController } from './dialog-controller';\nvar UxDialogHeader = /** @class */ (function () {\n function UxDialogHeader(controller) {\n this.controller = controller;\n }\n UxDialogHeader.prototype.bind = function () {\n if (typeof this.showCloseButton !== 'boolean') {\n this.showCloseButton = !this.controller.settings.lock;\n }\n };\n /**\n * @internal\n */\n // tslint:disable-next-line:member-ordering\n UxDialogHeader.inject = [DialogController];\n __decorate([\n bindable()\n ], UxDialogHeader.prototype, \"showCloseButton\", void 0);\n UxDialogHeader = __decorate([\n customElement('ux-dialog-header'),\n inlineView(\"\\n \\n\")\n ], UxDialogHeader);\n return UxDialogHeader;\n}());\nexport { UxDialogHeader };\n","\n\nimport * as LogManager from 'aurelia-logging';\n\nvar logger = LogManager.getLogger('event-aggregator');\n\nvar Handler = function () {\n function Handler(messageType, callback) {\n \n\n this.messageType = messageType;\n this.callback = callback;\n }\n\n Handler.prototype.handle = function handle(message) {\n if (message instanceof this.messageType) {\n this.callback.call(null, message);\n }\n };\n\n return Handler;\n}();\n\nfunction invokeCallback(callback, data, event) {\n try {\n callback(data, event);\n } catch (e) {\n logger.error(e);\n }\n}\n\nfunction invokeHandler(handler, data) {\n try {\n handler.handle(data);\n } catch (e) {\n logger.error(e);\n }\n}\n\nexport var EventAggregator = function () {\n function EventAggregator() {\n \n\n this.eventLookup = {};\n this.messageHandlers = [];\n }\n\n EventAggregator.prototype.publish = function publish(event, data) {\n var subscribers = void 0;\n var i = void 0;\n\n if (!event) {\n throw new Error('Event was invalid.');\n }\n\n if (typeof event === 'string') {\n subscribers = this.eventLookup[event];\n if (subscribers) {\n subscribers = subscribers.slice();\n i = subscribers.length;\n\n while (i--) {\n invokeCallback(subscribers[i], data, event);\n }\n }\n } else {\n subscribers = this.messageHandlers.slice();\n i = subscribers.length;\n\n while (i--) {\n invokeHandler(subscribers[i], event);\n }\n }\n };\n\n EventAggregator.prototype.subscribe = function subscribe(event, callback) {\n var handler = void 0;\n var subscribers = void 0;\n\n if (!event) {\n throw new Error('Event channel/type was invalid.');\n }\n\n if (typeof event === 'string') {\n handler = callback;\n subscribers = this.eventLookup[event] || (this.eventLookup[event] = []);\n } else {\n handler = new Handler(event, callback);\n subscribers = this.messageHandlers;\n }\n\n subscribers.push(handler);\n\n return {\n dispose: function dispose() {\n var idx = subscribers.indexOf(handler);\n if (idx !== -1) {\n subscribers.splice(idx, 1);\n }\n }\n };\n };\n\n EventAggregator.prototype.subscribeOnce = function subscribeOnce(event, callback) {\n var sub = this.subscribe(event, function (a, b) {\n sub.dispose();\n return callback(a, b);\n });\n\n return sub;\n };\n\n return EventAggregator;\n}();\n\nexport function includeEventsIn(obj) {\n var ea = new EventAggregator();\n\n obj.subscribeOnce = function (event, callback) {\n return ea.subscribeOnce(event, callback);\n };\n\n obj.subscribe = function (event, callback) {\n return ea.subscribe(event, callback);\n };\n\n obj.publish = function (event, data) {\n ea.publish(event, data);\n };\n\n return ea;\n}\n\nexport function configure(config) {\n config.instance(EventAggregator, includeEventsIn(config.aurelia));\n}","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n\n\nimport * as TheLogManager from 'aurelia-logging';\nimport { Container } from 'aurelia-dependency-injection';\nimport { Loader } from 'aurelia-loader';\nimport { BindingLanguage, ViewSlot, ViewResources, TemplatingEngine, CompositionTransaction, ViewEngine, HtmlBehaviorResource } from 'aurelia-templating';\nimport { DOM, PLATFORM } from 'aurelia-pal';\nimport { relativeToFile, join } from 'aurelia-path';\n\nfunction preventActionlessFormSubmit() {\n DOM.addEventListener('submit', function (evt) {\n var target = evt.target;\n var action = target.action;\n\n if (target.tagName.toLowerCase() === 'form' && !action) {\n evt.preventDefault();\n }\n });\n}\n\nexport var Aurelia = function () {\n function Aurelia(loader, container, resources) {\n \n\n this.loader = loader || new PLATFORM.Loader();\n this.container = container || new Container().makeGlobal();\n this.resources = resources || new ViewResources();\n this.use = new FrameworkConfiguration(this);\n this.logger = TheLogManager.getLogger('aurelia');\n this.hostConfigured = false;\n this.host = null;\n\n this.use.instance(Aurelia, this);\n this.use.instance(Loader, this.loader);\n this.use.instance(ViewResources, this.resources);\n }\n\n Aurelia.prototype.start = function start() {\n var _this = this;\n\n if (this._started) {\n return this._started;\n }\n\n this.logger.info('Aurelia Starting');\n return this._started = this.use.apply().then(function () {\n preventActionlessFormSubmit();\n\n if (!_this.container.hasResolver(BindingLanguage)) {\n var message = 'You must configure Aurelia with a BindingLanguage implementation.';\n _this.logger.error(message);\n throw new Error(message);\n }\n\n _this.logger.info('Aurelia Started');\n var evt = DOM.createCustomEvent('aurelia-started', { bubbles: true, cancelable: true });\n DOM.dispatchEvent(evt);\n return _this;\n });\n };\n\n Aurelia.prototype.enhance = function enhance() {\n var _this2 = this;\n\n var bindingContext = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var applicationHost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n this._configureHost(applicationHost || DOM.querySelectorAll('body')[0]);\n\n return new Promise(function (resolve) {\n var engine = _this2.container.get(TemplatingEngine);\n _this2.root = engine.enhance({ container: _this2.container, element: _this2.host, resources: _this2.resources, bindingContext: bindingContext });\n _this2.root.attached();\n _this2._onAureliaComposed();\n resolve(_this2);\n });\n };\n\n Aurelia.prototype.setRoot = function setRoot() {\n var _this3 = this;\n\n var root = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var applicationHost = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n\n var instruction = {};\n\n if (this.root && this.root.viewModel && this.root.viewModel.router) {\n this.root.viewModel.router.deactivate();\n this.root.viewModel.router.reset();\n }\n\n this._configureHost(applicationHost);\n\n var engine = this.container.get(TemplatingEngine);\n var transaction = this.container.get(CompositionTransaction);\n delete transaction.initialComposition;\n\n if (!root) {\n if (this.configModuleId) {\n root = relativeToFile('./app', this.configModuleId);\n } else {\n root = 'app';\n }\n }\n\n instruction.viewModel = root;\n instruction.container = instruction.childContainer = this.container;\n instruction.viewSlot = this.hostSlot;\n instruction.host = this.host;\n\n return engine.compose(instruction).then(function (r) {\n _this3.root = r;\n instruction.viewSlot.attached();\n _this3._onAureliaComposed();\n return _this3;\n });\n };\n\n Aurelia.prototype._configureHost = function _configureHost(applicationHost) {\n if (this.hostConfigured) {\n return;\n }\n applicationHost = applicationHost || this.host;\n\n if (!applicationHost || typeof applicationHost === 'string') {\n this.host = DOM.getElementById(applicationHost || 'applicationHost');\n } else {\n this.host = applicationHost;\n }\n\n if (!this.host) {\n throw new Error('No applicationHost was specified.');\n }\n\n this.hostConfigured = true;\n this.host.aurelia = this;\n this.hostSlot = new ViewSlot(this.host, true);\n this.hostSlot.transformChildNodesIntoView();\n this.container.registerInstance(DOM.boundary, this.host);\n };\n\n Aurelia.prototype._onAureliaComposed = function _onAureliaComposed() {\n var evt = DOM.createCustomEvent('aurelia-composed', { bubbles: true, cancelable: true });\n setTimeout(function () {\n return DOM.dispatchEvent(evt);\n }, 1);\n };\n\n return Aurelia;\n}();\n\nvar logger = TheLogManager.getLogger('aurelia');\nvar extPattern = /\\.[^/.]+$/;\n\nfunction runTasks(config, tasks) {\n var current = void 0;\n var next = function next() {\n current = tasks.shift();\n if (current) {\n return Promise.resolve(current(config)).then(next);\n }\n\n return Promise.resolve();\n };\n\n return next();\n}\n\nfunction loadPlugin(fwConfig, loader, info) {\n logger.debug('Loading plugin ' + info.moduleId + '.');\n if (typeof info.moduleId === 'string') {\n fwConfig.resourcesRelativeTo = info.resourcesRelativeTo;\n\n var id = info.moduleId;\n\n if (info.resourcesRelativeTo.length > 1) {\n return loader.normalize(info.moduleId, info.resourcesRelativeTo[1]).then(function (normalizedId) {\n return _loadPlugin(normalizedId);\n });\n }\n\n return _loadPlugin(id);\n } else if (typeof info.configure === 'function') {\n if (fwConfig.configuredPlugins.indexOf(info.configure) !== -1) {\n return Promise.resolve();\n }\n fwConfig.configuredPlugins.push(info.configure);\n\n return Promise.resolve(info.configure.call(null, fwConfig, info.config || {}));\n }\n throw new Error(invalidConfigMsg(info.moduleId || info.configure, 'plugin'));\n\n function _loadPlugin(moduleId) {\n return loader.loadModule(moduleId).then(function (m) {\n if ('configure' in m) {\n if (fwConfig.configuredPlugins.indexOf(m.configure) !== -1) {\n return Promise.resolve();\n }\n return Promise.resolve(m.configure(fwConfig, info.config || {})).then(function () {\n fwConfig.configuredPlugins.push(m.configure);\n fwConfig.resourcesRelativeTo = null;\n logger.debug('Configured plugin ' + info.moduleId + '.');\n });\n }\n\n fwConfig.resourcesRelativeTo = null;\n logger.debug('Loaded plugin ' + info.moduleId + '.');\n });\n }\n}\n\nfunction loadResources(aurelia, resourcesToLoad, appResources) {\n if (Object.keys(resourcesToLoad).length === 0) {\n return Promise.resolve();\n }\n var viewEngine = aurelia.container.get(ViewEngine);\n\n return Promise.all(Object.keys(resourcesToLoad).map(function (n) {\n return _normalize(resourcesToLoad[n]);\n })).then(function (loads) {\n var names = [];\n var importIds = [];\n\n loads.forEach(function (l) {\n names.push(undefined);\n importIds.push(l.importId);\n });\n\n return viewEngine.importViewResources(importIds, names, appResources);\n });\n\n function _normalize(load) {\n var moduleId = load.moduleId;\n var ext = getExt(moduleId);\n\n if (isOtherResource(moduleId)) {\n moduleId = removeExt(moduleId);\n }\n\n return aurelia.loader.normalize(moduleId, load.relativeTo).then(function (normalized) {\n return {\n name: load.moduleId,\n importId: isOtherResource(load.moduleId) ? addOriginalExt(normalized, ext) : normalized\n };\n });\n }\n\n function isOtherResource(name) {\n var ext = getExt(name);\n if (!ext) return false;\n if (ext === '') return false;\n if (ext === '.js' || ext === '.ts') return false;\n return true;\n }\n\n function removeExt(name) {\n return name.replace(extPattern, '');\n }\n\n function addOriginalExt(normalized, ext) {\n return removeExt(normalized) + '.' + ext;\n }\n}\n\nfunction getExt(name) {\n var match = name.match(extPattern);\n if (match && match.length > 0) {\n return match[0].split('.')[1];\n }\n}\n\nfunction loadBehaviors(config) {\n return Promise.all(config.behaviorsToLoad.map(function (m) {\n return m.load(config.container, m.target);\n })).then(function () {\n config.behaviorsToLoad = null;\n });\n}\n\nfunction assertProcessed(plugins) {\n if (plugins.processed) {\n throw new Error('This config instance has already been applied. To load more plugins or global resources, create a new FrameworkConfiguration instance.');\n }\n}\n\nfunction invalidConfigMsg(cfg, type) {\n return 'Invalid ' + type + ' [' + cfg + '], ' + type + ' must be specified as functions or relative module IDs.';\n}\n\nvar FrameworkConfiguration = function () {\n function FrameworkConfiguration(aurelia) {\n var _this4 = this;\n\n \n\n this.aurelia = aurelia;\n this.container = aurelia.container;\n\n this.info = [];\n this.processed = false;\n this.preTasks = [];\n this.postTasks = [];\n\n this.behaviorsToLoad = [];\n\n this.configuredPlugins = [];\n this.resourcesToLoad = {};\n this.preTask(function () {\n return aurelia.loader.normalize('aurelia-bootstrapper').then(function (name) {\n return _this4.bootstrapperName = name;\n });\n });\n this.postTask(function () {\n return loadResources(aurelia, _this4.resourcesToLoad, aurelia.resources);\n });\n }\n\n FrameworkConfiguration.prototype.instance = function instance(type, _instance) {\n this.container.registerInstance(type, _instance);\n return this;\n };\n\n FrameworkConfiguration.prototype.singleton = function singleton(type, implementation) {\n this.container.registerSingleton(type, implementation);\n return this;\n };\n\n FrameworkConfiguration.prototype.transient = function transient(type, implementation) {\n this.container.registerTransient(type, implementation);\n return this;\n };\n\n FrameworkConfiguration.prototype.preTask = function preTask(task) {\n assertProcessed(this);\n this.preTasks.push(task);\n return this;\n };\n\n FrameworkConfiguration.prototype.postTask = function postTask(task) {\n assertProcessed(this);\n this.postTasks.push(task);\n return this;\n };\n\n FrameworkConfiguration.prototype.feature = function feature(plugin) {\n var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n switch (typeof plugin === 'undefined' ? 'undefined' : _typeof(plugin)) {\n case 'string':\n var hasIndex = /\\/index$/i.test(plugin);\n var _moduleId = hasIndex || getExt(plugin) ? plugin : plugin + '/index';\n var root = hasIndex ? plugin.substr(0, plugin.length - 6) : plugin;\n this.info.push({ moduleId: _moduleId, resourcesRelativeTo: [root, ''], config: config });\n break;\n\n case 'function':\n this.info.push({ configure: plugin, config: config || {} });\n break;\n default:\n throw new Error(invalidConfigMsg(plugin, 'feature'));\n }\n return this;\n };\n\n FrameworkConfiguration.prototype.globalResources = function globalResources(resources) {\n var _this5 = this;\n\n assertProcessed(this);\n\n var toAdd = Array.isArray(resources) ? resources : arguments;\n var resource = void 0;\n var resourcesRelativeTo = this.resourcesRelativeTo || ['', ''];\n\n for (var i = 0, ii = toAdd.length; i < ii; ++i) {\n resource = toAdd[i];\n switch (typeof resource === 'undefined' ? 'undefined' : _typeof(resource)) {\n case 'string':\n var parent = resourcesRelativeTo[0];\n var grandParent = resourcesRelativeTo[1];\n var name = resource;\n\n if ((resource.startsWith('./') || resource.startsWith('../')) && parent !== '') {\n name = join(parent, resource);\n }\n\n this.resourcesToLoad[name] = { moduleId: name, relativeTo: grandParent };\n break;\n case 'function':\n var meta = this.aurelia.resources.autoRegister(this.container, resource);\n if (meta instanceof HtmlBehaviorResource && meta.elementName !== null) {\n if (this.behaviorsToLoad.push(meta) === 1) {\n this.postTask(function () {\n return loadBehaviors(_this5);\n });\n }\n }\n break;\n default:\n throw new Error(invalidConfigMsg(resource, 'resource'));\n }\n }\n\n return this;\n };\n\n FrameworkConfiguration.prototype.globalName = function globalName(resourcePath, newName) {\n assertProcessed(this);\n this.resourcesToLoad[resourcePath] = { moduleId: newName, relativeTo: '' };\n return this;\n };\n\n FrameworkConfiguration.prototype.plugin = function plugin(_plugin, pluginConfig) {\n assertProcessed(this);\n\n var info = void 0;\n switch (typeof _plugin === 'undefined' ? 'undefined' : _typeof(_plugin)) {\n case 'string':\n info = { moduleId: _plugin, resourcesRelativeTo: [_plugin, ''], config: pluginConfig || {} };\n break;\n case 'function':\n info = { configure: _plugin, config: pluginConfig || {} };\n break;\n default:\n throw new Error(invalidConfigMsg(_plugin, 'plugin'));\n }\n this.info.push(info);\n return this;\n };\n\n FrameworkConfiguration.prototype._addNormalizedPlugin = function _addNormalizedPlugin(name, config) {\n var _this6 = this;\n\n var plugin = { moduleId: name, resourcesRelativeTo: [name, ''], config: config || {} };\n this.info.push(plugin);\n\n this.preTask(function () {\n var relativeTo = [name, _this6.bootstrapperName];\n plugin.moduleId = name;\n plugin.resourcesRelativeTo = relativeTo;\n return Promise.resolve();\n });\n\n return this;\n };\n\n FrameworkConfiguration.prototype.defaultBindingLanguage = function defaultBindingLanguage() {\n return this._addNormalizedPlugin('aurelia-templating-binding');\n };\n\n FrameworkConfiguration.prototype.router = function router() {\n return this._addNormalizedPlugin('aurelia-templating-router');\n };\n\n FrameworkConfiguration.prototype.history = function history() {\n return this._addNormalizedPlugin('aurelia-history-browser');\n };\n\n FrameworkConfiguration.prototype.defaultResources = function defaultResources() {\n return this._addNormalizedPlugin('aurelia-templating-resources');\n };\n\n FrameworkConfiguration.prototype.eventAggregator = function eventAggregator() {\n return this._addNormalizedPlugin('aurelia-event-aggregator');\n };\n\n FrameworkConfiguration.prototype.basicConfiguration = function basicConfiguration() {\n return this.defaultBindingLanguage().defaultResources().eventAggregator();\n };\n\n FrameworkConfiguration.prototype.standardConfiguration = function standardConfiguration() {\n return this.basicConfiguration().history().router();\n };\n\n FrameworkConfiguration.prototype.developmentLogging = function developmentLogging(level) {\n var _this7 = this;\n\n var logLevel = level ? TheLogManager.logLevel[level] : undefined;\n\n if (logLevel === undefined) {\n logLevel = TheLogManager.logLevel.debug;\n }\n\n this.preTask(function () {\n return _this7.aurelia.loader.normalize('aurelia-logging-console', _this7.bootstrapperName).then(function (name) {\n return _this7.aurelia.loader.loadModule(name).then(function (m) {\n TheLogManager.addAppender(new m.ConsoleAppender());\n TheLogManager.setLevel(logLevel);\n });\n });\n });\n\n return this;\n };\n\n FrameworkConfiguration.prototype.apply = function apply() {\n var _this8 = this;\n\n if (this.processed) {\n return Promise.resolve();\n }\n\n return runTasks(this, this.preTasks).then(function () {\n var loader = _this8.aurelia.loader;\n var info = _this8.info;\n var current = void 0;\n\n var next = function next() {\n current = info.shift();\n if (current) {\n return loadPlugin(_this8, loader, current).then(next);\n }\n\n _this8.processed = true;\n _this8.configuredPlugins = null;\n return Promise.resolve();\n };\n\n return next().then(function () {\n return runTasks(_this8, _this8.postTasks);\n });\n });\n };\n\n return FrameworkConfiguration;\n}();\n\nexport { FrameworkConfiguration };\n\n\nexport * from 'aurelia-dependency-injection';\nexport * from 'aurelia-binding';\nexport * from 'aurelia-metadata';\nexport * from 'aurelia-templating';\nexport * from 'aurelia-loader';\nexport * from 'aurelia-task-queue';\nexport * from 'aurelia-path';\nexport * from 'aurelia-pal';\n\nexport var LogManager = TheLogManager;","import { History } from 'aurelia-history';\nimport { DOM, PLATFORM } from 'aurelia-pal';\n\n/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nfunction __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\n\nvar LinkHandler = (function () {\r\n function LinkHandler() {\r\n }\r\n LinkHandler.prototype.activate = function (history) { };\r\n LinkHandler.prototype.deactivate = function () { };\r\n return LinkHandler;\r\n}());\r\nvar DefaultLinkHandler = (function (_super) {\r\n __extends(DefaultLinkHandler, _super);\r\n function DefaultLinkHandler() {\r\n var _this = _super.call(this) || this;\r\n _this.handler = function (e) {\r\n var _a = DefaultLinkHandler.getEventInfo(e), shouldHandleEvent = _a.shouldHandleEvent, href = _a.href;\r\n if (shouldHandleEvent) {\r\n e.preventDefault();\r\n _this.history.navigate(href);\r\n }\r\n };\r\n return _this;\r\n }\r\n DefaultLinkHandler.prototype.activate = function (history) {\r\n if (history._hasPushState) {\r\n this.history = history;\r\n DOM.addEventListener('click', this.handler, true);\r\n }\r\n };\r\n DefaultLinkHandler.prototype.deactivate = function () {\r\n DOM.removeEventListener('click', this.handler, true);\r\n };\r\n DefaultLinkHandler.getEventInfo = function (event) {\r\n var $event = event;\r\n var info = {\r\n shouldHandleEvent: false,\r\n href: null,\r\n anchor: null\r\n };\r\n var target = DefaultLinkHandler.findClosestAnchor($event.target);\r\n if (!target || !DefaultLinkHandler.targetIsThisWindow(target)) {\r\n return info;\r\n }\r\n if (hasAttribute(target, 'download')\r\n || hasAttribute(target, 'router-ignore')\r\n || hasAttribute(target, 'data-router-ignore')) {\r\n return info;\r\n }\r\n if ($event.altKey || $event.ctrlKey || $event.metaKey || $event.shiftKey) {\r\n return info;\r\n }\r\n var href = target.getAttribute('href');\r\n info.anchor = target;\r\n info.href = href;\r\n var leftButtonClicked = $event.which === 1;\r\n var isRelative = href && !(href.charAt(0) === '#' || (/^[a-z]+:/i).test(href));\r\n info.shouldHandleEvent = leftButtonClicked && isRelative;\r\n return info;\r\n };\r\n DefaultLinkHandler.findClosestAnchor = function (el) {\r\n while (el) {\r\n if (el.tagName === 'A') {\r\n return el;\r\n }\r\n el = el.parentNode;\r\n }\r\n };\r\n DefaultLinkHandler.targetIsThisWindow = function (target) {\r\n var targetWindow = target.getAttribute('target');\r\n var win = PLATFORM.global;\r\n return !targetWindow ||\r\n targetWindow === win.name ||\r\n targetWindow === '_self';\r\n };\r\n return DefaultLinkHandler;\r\n}(LinkHandler));\r\nvar hasAttribute = function (el, attr) { return el.hasAttribute(attr); };\n\nvar BrowserHistory = (function (_super) {\r\n __extends(BrowserHistory, _super);\r\n function BrowserHistory(linkHandler) {\r\n var _this = _super.call(this) || this;\r\n _this._isActive = false;\r\n _this._checkUrlCallback = _this._checkUrl.bind(_this);\r\n _this.location = PLATFORM.location;\r\n _this.history = PLATFORM.history;\r\n _this.linkHandler = linkHandler;\r\n return _this;\r\n }\r\n BrowserHistory.prototype.activate = function (options) {\r\n if (this._isActive) {\r\n throw new Error('History has already been activated.');\r\n }\r\n var $history = this.history;\r\n var wantsPushState = !!options.pushState;\r\n this._isActive = true;\r\n var normalizedOptions = this.options = Object.assign({}, { root: '/' }, this.options, options);\r\n var rootUrl = this.root = ('/' + normalizedOptions.root + '/').replace(rootStripper, '/');\r\n var wantsHashChange = this._wantsHashChange = normalizedOptions.hashChange !== false;\r\n var hasPushState = this._hasPushState = !!(normalizedOptions.pushState && $history && $history.pushState);\r\n var eventName;\r\n if (hasPushState) {\r\n eventName = 'popstate';\r\n }\r\n else if (wantsHashChange) {\r\n eventName = 'hashchange';\r\n }\r\n PLATFORM.addEventListener(eventName, this._checkUrlCallback);\r\n if (wantsHashChange && wantsPushState) {\r\n var $location = this.location;\r\n var atRoot = $location.pathname.replace(/[^\\/]$/, '$&/') === rootUrl;\r\n if (!hasPushState && !atRoot) {\r\n var fragment = this.fragment = this._getFragment(null, true);\r\n $location.replace(rootUrl + $location.search + '#' + fragment);\r\n return true;\r\n }\r\n else if (hasPushState && atRoot && $location.hash) {\r\n var fragment = this.fragment = this._getHash().replace(routeStripper, '');\r\n $history.replaceState({}, DOM.title, rootUrl + fragment + $location.search);\r\n }\r\n }\r\n if (!this.fragment) {\r\n this.fragment = this._getFragment('');\r\n }\r\n this.linkHandler.activate(this);\r\n if (!normalizedOptions.silent) {\r\n return this._loadUrl('');\r\n }\r\n };\r\n BrowserHistory.prototype.deactivate = function () {\r\n var handler = this._checkUrlCallback;\r\n PLATFORM.removeEventListener('popstate', handler);\r\n PLATFORM.removeEventListener('hashchange', handler);\r\n this._isActive = false;\r\n this.linkHandler.deactivate();\r\n };\r\n BrowserHistory.prototype.getAbsoluteRoot = function () {\r\n var $location = this.location;\r\n var origin = createOrigin($location.protocol, $location.hostname, $location.port);\r\n return \"\" + origin + this.root;\r\n };\r\n BrowserHistory.prototype.navigate = function (fragment, _a) {\r\n var _b = _a === void 0 ? {} : _a, _c = _b.trigger, trigger = _c === void 0 ? true : _c, _d = _b.replace, replace = _d === void 0 ? false : _d;\r\n var location = this.location;\r\n if (fragment && absoluteUrl.test(fragment)) {\r\n location.href = fragment;\r\n return true;\r\n }\r\n if (!this._isActive) {\r\n return false;\r\n }\r\n fragment = this._getFragment(fragment || '');\r\n if (this.fragment === fragment && !replace) {\r\n return false;\r\n }\r\n this.fragment = fragment;\r\n var url = this.root + fragment;\r\n if (fragment === '' && url !== '/') {\r\n url = url.slice(0, -1);\r\n }\r\n if (this._hasPushState) {\r\n url = url.replace('//', '/');\r\n this.history[replace ? 'replaceState' : 'pushState']({}, DOM.title, url);\r\n }\r\n else if (this._wantsHashChange) {\r\n updateHash(location, fragment, replace);\r\n }\r\n else {\r\n location.assign(url);\r\n }\r\n if (trigger) {\r\n return this._loadUrl(fragment);\r\n }\r\n return true;\r\n };\r\n BrowserHistory.prototype.navigateBack = function () {\r\n this.history.back();\r\n };\r\n BrowserHistory.prototype.setTitle = function (title) {\r\n DOM.title = title;\r\n };\r\n BrowserHistory.prototype.setState = function (key, value) {\r\n var $history = this.history;\r\n var state = Object.assign({}, $history.state);\r\n var _a = this.location, pathname = _a.pathname, search = _a.search, hash = _a.hash;\r\n state[key] = value;\r\n $history.replaceState(state, null, \"\" + pathname + search + hash);\r\n };\r\n BrowserHistory.prototype.getState = function (key) {\r\n var state = Object.assign({}, this.history.state);\r\n return state[key];\r\n };\r\n BrowserHistory.prototype.getHistoryIndex = function () {\r\n var historyIndex = this.getState('HistoryIndex');\r\n if (historyIndex === undefined) {\r\n historyIndex = this.history.length - 1;\r\n this.setState('HistoryIndex', historyIndex);\r\n }\r\n return historyIndex;\r\n };\r\n BrowserHistory.prototype.go = function (movement) {\r\n this.history.go(movement);\r\n };\r\n BrowserHistory.prototype._getHash = function () {\r\n return this.location.hash.substr(1);\r\n };\r\n BrowserHistory.prototype._getFragment = function (fragment, forcePushState) {\r\n var rootUrl;\r\n if (!fragment) {\r\n if (this._hasPushState || !this._wantsHashChange || forcePushState) {\r\n var location_1 = this.location;\r\n fragment = location_1.pathname + location_1.search;\r\n rootUrl = this.root.replace(trailingSlash, '');\r\n if (!fragment.indexOf(rootUrl)) {\r\n fragment = fragment.substr(rootUrl.length);\r\n }\r\n }\r\n else {\r\n fragment = this._getHash();\r\n }\r\n }\r\n return '/' + fragment.replace(routeStripper, '');\r\n };\r\n BrowserHistory.prototype._checkUrl = function () {\r\n var current = this._getFragment('');\r\n if (current !== this.fragment) {\r\n this._loadUrl('');\r\n }\r\n };\r\n BrowserHistory.prototype._loadUrl = function (fragmentOverride) {\r\n var fragment = this.fragment = this._getFragment(fragmentOverride);\r\n return this.options.routeHandler ?\r\n this.options.routeHandler(fragment) :\r\n false;\r\n };\r\n BrowserHistory.inject = [LinkHandler];\r\n return BrowserHistory;\r\n}(History));\r\nvar routeStripper = /^#?\\/*|\\s+$/g;\r\nvar rootStripper = /^\\/+|\\/+$/g;\r\nvar trailingSlash = /\\/$/;\r\nvar absoluteUrl = /^([a-z][a-z0-9+\\-.]*:)?\\/\\//i;\r\nfunction updateHash($location, fragment, replace) {\r\n if (replace) {\r\n var href = $location.href.replace(/(javascript:|#).*$/, '');\r\n $location.replace(href + '#' + fragment);\r\n }\r\n else {\r\n $location.hash = '#' + fragment;\r\n }\r\n}\r\nfunction createOrigin(protocol, hostname, port) {\r\n return protocol + \"//\" + hostname + (port ? ':' + port : '');\r\n}\n\nfunction configure(config) {\r\n var $config = config;\r\n $config.singleton(History, BrowserHistory);\r\n $config.transient(LinkHandler, DefaultLinkHandler);\r\n}\n\nexport { BrowserHistory, DefaultLinkHandler, LinkHandler, configure };\n//# sourceMappingURL=aurelia-history-browser.js.map\n","import * as LogManager from 'aurelia-logging';\nimport { EventAggregator } from 'aurelia-event-aggregator';\nimport { ViewResources } from 'aurelia-templating';\nimport { Loader } from 'aurelia-loader';\nimport { BindingSignaler } from 'aurelia-templating-resources';\nimport { PLATFORM } from 'aurelia-pal';\n\nimport { I18N } from './i18n';\nimport { RelativeTime } from './relativeTime';\nimport { DfValueConverter, DfBindingBehavior } from './df';\nimport { NfValueConverter, NfBindingBehavior } from './nf';\nimport { RtValueConverter, RtBindingBehavior } from './rt';\nimport { TValueConverter, TBindingBehavior, TCustomAttribute, TParamsCustomAttribute } from './t';\nimport { BaseI18N } from './base-i18n';\nimport { Backend } from './aurelia-i18n-loader';\n\nfunction registerI18N(frameworkConfig, cb) {\n var instance = new I18N(frameworkConfig.container.get(EventAggregator), frameworkConfig.container.get(BindingSignaler));\n frameworkConfig.container.registerInstance(I18N, instance);\n\n var ret = cb(instance);\n\n frameworkConfig.postTask(function () {\n var resources = frameworkConfig.container.get(ViewResources);\n var htmlBehaviorResource = resources.getAttribute('t');\n var htmlParamsResource = resources.getAttribute('t-params');\n var attributes = instance.i18next.options.attributes;\n\n if (!attributes) {\n attributes = ['t', 'i18n'];\n }\n\n attributes.forEach(function (alias) {\n return resources.registerAttribute(alias, htmlBehaviorResource, 't');\n });\n attributes.forEach(function (alias) {\n return resources.registerAttribute(alias + '-params', htmlParamsResource, 't-params');\n });\n });\n\n return ret;\n}\n\nfunction configure(frameworkConfig, cb) {\n if (cb === undefined || typeof cb !== 'function') {\n var errorMsg = 'You need to provide a callback method to properly configure the library';\n throw errorMsg;\n }\n\n frameworkConfig.globalResources(PLATFORM.moduleName('./t'));\n frameworkConfig.globalResources(PLATFORM.moduleName('./nf'));\n frameworkConfig.globalResources(PLATFORM.moduleName('./df'));\n frameworkConfig.globalResources(PLATFORM.moduleName('./rt'));\n\n if (PLATFORM.global.Intl === undefined) {\n var i18nLogger = LogManager.getLogger('i18n');\n i18nLogger.warn('Intl API is not available. Trying to load the polyfill.');\n var loader = frameworkConfig.container.get(Loader);\n var normalizeErrorMessage = 'Failed to normalize {module} while loading the Intl polyfill.';\n\n return loader.normalize('aurelia-i18n').then(function (i18nName) {\n return loader.normalize('intl', i18nName).then(function (intlName) {\n return loader.loadModule(intlName).then(function (poly) {\n PLATFORM.global.Intl = poly;\n return registerI18N(frameworkConfig, cb);\n }, function () {\n return i18nLogger.warn('Failed to load the Intl polyfill.');\n });\n }, function () {\n return i18nLogger.warn(normalizeErrorMessage.replace('{module}', 'intl'));\n });\n }, function () {\n return i18nLogger.warn(normalizeErrorMessage.replace('{module}', 'aurelia-i18n'));\n });\n }\n\n return Promise.resolve(registerI18N(frameworkConfig, cb));\n}\n\nexport { configure, I18N, RelativeTime, DfValueConverter, DfBindingBehavior, NfValueConverter, NfBindingBehavior, RtValueConverter, RtBindingBehavior, TValueConverter, TBindingBehavior, TCustomAttribute, TParamsCustomAttribute, BaseI18N, EventAggregator, Backend };","\n\nimport * as LogManager from 'aurelia-logging';\nimport { I18N } from './i18n';\nimport { SignalBindingBehavior } from 'aurelia-templating-resources';\nimport { ValueConverter } from 'aurelia-binding';\nimport { isInteger } from './utils';\n\nexport var DfValueConverter = function () {\n DfValueConverter.inject = function inject() {\n return [I18N];\n };\n\n function DfValueConverter(i18n) {\n \n\n this.service = i18n;\n }\n\n DfValueConverter.prototype.toView = function toView(value, dfOrOptions, locale, df) {\n if (value === null || typeof value === 'undefined' || typeof value === 'string' && value.trim() === '') {\n return value;\n }\n\n if (dfOrOptions && typeof dfOrOptions.format === 'function') {\n return dfOrOptions.format(value);\n } else if (df) {\n var i18nLogger = LogManager.getLogger('i18n');\n i18nLogger.warn('This ValueConverter signature is depcrecated and will be removed in future releases. Please use the signature [dfOrOptions, locale]');\n } else {\n df = this.service.df(dfOrOptions, locale || this.service.getLocale());\n }\n\n if (typeof value === 'string' && isNaN(value) && !isInteger(value)) {\n value = new Date(value);\n }\n\n return df.format(value);\n };\n\n return DfValueConverter;\n}();\n\nexport var DfBindingBehavior = function () {\n DfBindingBehavior.inject = function inject() {\n return [SignalBindingBehavior];\n };\n\n function DfBindingBehavior(signalBindingBehavior) {\n \n\n this.signalBindingBehavior = signalBindingBehavior;\n }\n\n DfBindingBehavior.prototype.bind = function bind(binding, source) {\n this.signalBindingBehavior.bind(binding, source, 'aurelia-translation-signal');\n\n var sourceExpression = binding.sourceExpression;\n\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, 'df', sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n\n DfBindingBehavior.prototype.unbind = function unbind(binding, source) {\n this.signalBindingBehavior.unbind(binding, source);\n };\n\n return DfBindingBehavior;\n}();","\n\nimport * as LogManager from 'aurelia-logging';\nimport { I18N } from './i18n';\nimport { SignalBindingBehavior } from 'aurelia-templating-resources';\nimport { ValueConverter } from 'aurelia-binding';\n\nexport var NfValueConverter = function () {\n NfValueConverter.inject = function inject() {\n return [I18N];\n };\n\n function NfValueConverter(i18n) {\n \n\n this.service = i18n;\n }\n\n NfValueConverter.prototype.toView = function toView(value, nfOrOptions, locale, nf) {\n if (value === null || typeof value === 'undefined' || typeof value === 'string' && value.trim() === '') {\n return value;\n }\n\n if (nfOrOptions && typeof nfOrOptions.format === 'function') {\n return nfOrOptions.format(value);\n } else if (nf) {\n var i18nLogger = LogManager.getLogger('i18n');\n i18nLogger.warn('This ValueConverter signature is depcrecated and will be removed in future releases. Please use the signature [nfOrOptions, locale]');\n } else {\n nf = this.service.nf(nfOrOptions, locale || this.service.getLocale());\n }\n\n return nf.format(value);\n };\n\n return NfValueConverter;\n}();\n\nexport var NfBindingBehavior = function () {\n NfBindingBehavior.inject = function inject() {\n return [SignalBindingBehavior];\n };\n\n function NfBindingBehavior(signalBindingBehavior) {\n \n\n this.signalBindingBehavior = signalBindingBehavior;\n }\n\n NfBindingBehavior.prototype.bind = function bind(binding, source) {\n this.signalBindingBehavior.bind(binding, source, 'aurelia-translation-signal');\n\n var sourceExpression = binding.sourceExpression;\n\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, 'nf', sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n\n NfBindingBehavior.prototype.unbind = function unbind(binding, source) {\n this.signalBindingBehavior.unbind(binding, source);\n };\n\n return NfBindingBehavior;\n}();","\n\nimport { RelativeTime } from './relativeTime';\nimport { SignalBindingBehavior } from 'aurelia-templating-resources';\nimport { ValueConverter } from 'aurelia-binding';\n\nexport var RtValueConverter = function () {\n RtValueConverter.inject = function inject() {\n return [RelativeTime];\n };\n\n function RtValueConverter(relativeTime) {\n \n\n this.service = relativeTime;\n }\n\n RtValueConverter.prototype.toView = function toView(value) {\n if (value === null || typeof value === 'undefined' || typeof value === 'string' && value.trim() === '') {\n return value;\n }\n\n if (typeof value === 'string' && isNaN(value) && !Number.isInteger(value)) {\n value = new Date(value);\n }\n\n return this.service.getRelativeTime(value);\n };\n\n return RtValueConverter;\n}();\n\nexport var RtBindingBehavior = function () {\n RtBindingBehavior.inject = function inject() {\n return [SignalBindingBehavior];\n };\n\n function RtBindingBehavior(signalBindingBehavior) {\n \n\n this.signalBindingBehavior = signalBindingBehavior;\n }\n\n RtBindingBehavior.prototype.bind = function bind(binding, source) {\n this.signalBindingBehavior.bind(binding, source, 'aurelia-translation-signal', 'aurelia-relativetime-signal');\n\n var sourceExpression = binding.sourceExpression;\n\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, 'rt', sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n\n RtBindingBehavior.prototype.unbind = function unbind(binding, source) {\n this.signalBindingBehavior.unbind(binding, source);\n };\n\n return RtBindingBehavior;\n}();","var _dec, _class, _dec2, _class2, _class3, _temp;\n\n\n\nimport { I18N } from './i18n';\nimport { EventAggregator } from 'aurelia-event-aggregator';\nimport { metadata } from 'aurelia-metadata';\nimport { customAttribute, HtmlBehaviorResource } from 'aurelia-templating';\nimport { SignalBindingBehavior } from 'aurelia-templating-resources';\nimport { ValueConverter } from 'aurelia-binding';\nimport { DOM } from 'aurelia-pal';\nimport { LazyOptional } from './utils';\n\nexport var TValueConverter = function () {\n TValueConverter.inject = function inject() {\n return [I18N];\n };\n\n function TValueConverter(i18n) {\n \n\n this.service = i18n;\n }\n\n TValueConverter.prototype.toView = function toView(value, options) {\n return this.service.tr(value, options);\n };\n\n return TValueConverter;\n}();\n\nexport var TParamsCustomAttribute = (_dec = customAttribute('t-params'), _dec(_class = function () {\n TParamsCustomAttribute.inject = function inject() {\n return [DOM.Element];\n };\n\n TParamsCustomAttribute.configureAliases = function configureAliases(aliases) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TParamsCustomAttribute);\n r.aliases = aliases;\n };\n\n function TParamsCustomAttribute(element) {\n \n\n this.element = element;\n }\n\n TParamsCustomAttribute.prototype.valueChanged = function valueChanged() {};\n\n return TParamsCustomAttribute;\n}()) || _class);\n\nexport var TCustomAttribute = (_dec2 = customAttribute('t'), _dec2(_class2 = function () {\n TCustomAttribute.inject = function inject() {\n return [DOM.Element, I18N, EventAggregator, LazyOptional.of(TParamsCustomAttribute)];\n };\n\n TCustomAttribute.configureAliases = function configureAliases(aliases) {\n var r = metadata.getOrCreateOwn(metadata.resource, HtmlBehaviorResource, TCustomAttribute);\n r.aliases = aliases;\n };\n\n function TCustomAttribute(element, i18n, ea, tparams) {\n \n\n this.element = element;\n this.service = i18n;\n this.ea = ea;\n this.lazyParams = tparams;\n }\n\n TCustomAttribute.prototype.bind = function bind() {\n var _this = this;\n\n this.params = this.lazyParams();\n\n if (this.params) {\n this.params.valueChanged = function (newParams, oldParams) {\n _this.paramsChanged(_this.value, newParams, oldParams);\n };\n }\n\n var p = this.params !== null ? this.params.value : undefined;\n this.subscription = this.ea.subscribe('i18n:locale:changed', function () {\n _this.service.updateValue(_this.element, _this.value, _this.params !== null ? _this.params.value : undefined);\n });\n\n this.service.updateValue(this.element, this.value, p);\n };\n\n TCustomAttribute.prototype.paramsChanged = function paramsChanged(newValue, newParams) {\n this.service.updateValue(this.element, newValue, newParams);\n };\n\n TCustomAttribute.prototype.valueChanged = function valueChanged(newValue) {\n var p = this.params !== null ? this.params.value : undefined;\n this.service.updateValue(this.element, newValue, p);\n };\n\n TCustomAttribute.prototype.unbind = function unbind() {\n if (this.subscription) {\n this.subscription.dispose();\n }\n };\n\n return TCustomAttribute;\n}()) || _class2);\n\nexport var TBindingBehavior = (_temp = _class3 = function () {\n function TBindingBehavior(signalBindingBehavior) {\n \n\n this.signalBindingBehavior = signalBindingBehavior;\n }\n\n TBindingBehavior.prototype.bind = function bind(binding, source) {\n this.signalBindingBehavior.bind(binding, source, 'aurelia-translation-signal');\n\n var sourceExpression = binding.sourceExpression;\n\n if (sourceExpression.rewritten) {\n return;\n }\n sourceExpression.rewritten = true;\n\n var expression = sourceExpression.expression;\n sourceExpression.expression = new ValueConverter(expression, 't', sourceExpression.args, [expression].concat(sourceExpression.args));\n };\n\n TBindingBehavior.prototype.unbind = function unbind(binding, source) {\n this.signalBindingBehavior.unbind(binding, source);\n };\n\n return TBindingBehavior;\n}(), _class3.inject = [SignalBindingBehavior], _temp);","\n\nexport var ConsoleAppender = function () {\n function ConsoleAppender() {\n \n }\n\n ConsoleAppender.prototype.debug = function debug(logger) {\n var _console;\n\n for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n rest[_key - 1] = arguments[_key];\n }\n\n (_console = console).debug.apply(_console, [\"DEBUG [\" + logger.id + \"]\"].concat(rest));\n };\n\n ConsoleAppender.prototype.info = function info(logger) {\n var _console2;\n\n for (var _len2 = arguments.length, rest = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n rest[_key2 - 1] = arguments[_key2];\n }\n\n (_console2 = console).info.apply(_console2, [\"INFO [\" + logger.id + \"]\"].concat(rest));\n };\n\n ConsoleAppender.prototype.warn = function warn(logger) {\n var _console3;\n\n for (var _len3 = arguments.length, rest = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n rest[_key3 - 1] = arguments[_key3];\n }\n\n (_console3 = console).warn.apply(_console3, [\"WARN [\" + logger.id + \"]\"].concat(rest));\n };\n\n ConsoleAppender.prototype.error = function error(logger) {\n var _console4;\n\n for (var _len4 = arguments.length, rest = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n rest[_key4 - 1] = arguments[_key4];\n }\n\n (_console4 = console).error.apply(_console4, [\"ERROR [\" + logger.id + \"]\"].concat(rest));\n };\n\n return ConsoleAppender;\n}();","var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nimport { initializePAL, isInitialized } from 'aurelia-pal';\n\nexport var _PLATFORM = {\n location: window.location,\n history: window.history,\n addEventListener: function addEventListener(eventName, callback, capture) {\n this.global.addEventListener(eventName, callback, capture);\n },\n removeEventListener: function removeEventListener(eventName, callback, capture) {\n this.global.removeEventListener(eventName, callback, capture);\n },\n\n performance: window.performance,\n requestAnimationFrame: function requestAnimationFrame(callback) {\n return this.global.requestAnimationFrame(callback);\n }\n};\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var test = function test() {};\n\n if (test.name === undefined) {\n Object.defineProperty(Function.prototype, 'name', {\n get: function get() {\n var name = this.toString().match(/^\\s*function\\s*(\\S*)\\s*\\(/)[1];\n\n Object.defineProperty(this, 'name', { value: name });\n return name;\n }\n });\n }\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n if (!('classList' in document.createElement('_')) || document.createElementNS && !('classList' in document.createElementNS('http://www.w3.org/2000/svg', 'g'))) {\n var protoProp = 'prototype';\n var strTrim = String.prototype.trim;\n var arrIndexOf = Array.prototype.indexOf;\n var emptyArray = [];\n\n var DOMEx = function DOMEx(type, message) {\n this.name = type;\n this.code = DOMException[type];\n this.message = message;\n };\n\n var checkTokenAndGetIndex = function checkTokenAndGetIndex(classList, token) {\n if (token === '') {\n throw new DOMEx('SYNTAX_ERR', 'An invalid or illegal string was specified');\n }\n\n if (/\\s/.test(token)) {\n throw new DOMEx('INVALID_CHARACTER_ERR', 'String contains an invalid character');\n }\n\n return arrIndexOf.call(classList, token);\n };\n\n var ClassList = function ClassList(elem) {\n var trimmedClasses = strTrim.call(elem.getAttribute('class') || '');\n var classes = trimmedClasses ? trimmedClasses.split(/\\s+/) : emptyArray;\n\n for (var i = 0, ii = classes.length; i < ii; ++i) {\n this.push(classes[i]);\n }\n\n this._updateClassName = function () {\n elem.setAttribute('class', this.toString());\n };\n };\n\n var classListProto = ClassList[protoProp] = [];\n\n DOMEx[protoProp] = Error[protoProp];\n\n classListProto.item = function (i) {\n return this[i] || null;\n };\n\n classListProto.contains = function (token) {\n token += '';\n return checkTokenAndGetIndex(this, token) !== -1;\n };\n\n classListProto.add = function () {\n var tokens = arguments;\n var i = 0;\n var ii = tokens.length;\n var token = void 0;\n var updated = false;\n\n do {\n token = tokens[i] + '';\n if (checkTokenAndGetIndex(this, token) === -1) {\n this.push(token);\n updated = true;\n }\n } while (++i < ii);\n\n if (updated) {\n this._updateClassName();\n }\n };\n\n classListProto.remove = function () {\n var tokens = arguments;\n var i = 0;\n var ii = tokens.length;\n var token = void 0;\n var updated = false;\n var index = void 0;\n\n do {\n token = tokens[i] + '';\n index = checkTokenAndGetIndex(this, token);\n while (index !== -1) {\n this.splice(index, 1);\n updated = true;\n index = checkTokenAndGetIndex(this, token);\n }\n } while (++i < ii);\n\n if (updated) {\n this._updateClassName();\n }\n };\n\n classListProto.toggle = function (token, force) {\n token += '';\n\n var result = this.contains(token);\n var method = result ? force !== true && 'remove' : force !== false && 'add';\n\n if (method) {\n this[method](token);\n }\n\n if (force === true || force === false) {\n return force;\n }\n\n return !result;\n };\n\n classListProto.toString = function () {\n return this.join(' ');\n };\n\n Object.defineProperty(Element.prototype, 'classList', {\n get: function get() {\n return new ClassList(this);\n },\n enumerable: true,\n configurable: true\n });\n } else {\n var testElement = document.createElement('_');\n testElement.classList.add('c1', 'c2');\n\n if (!testElement.classList.contains('c2')) {\n var createMethod = function createMethod(method) {\n var original = DOMTokenList.prototype[method];\n\n DOMTokenList.prototype[method] = function (token) {\n for (var i = 0, ii = arguments.length; i < ii; ++i) {\n token = arguments[i];\n original.call(this, token);\n }\n };\n };\n\n createMethod('add');\n createMethod('remove');\n }\n\n testElement.classList.toggle('c3', false);\n\n if (testElement.classList.contains('c3')) {\n var _toggle = DOMTokenList.prototype.toggle;\n\n DOMTokenList.prototype.toggle = function (token, force) {\n if (1 in arguments && !this.contains(token) === !force) {\n return force;\n }\n\n return _toggle.call(this, token);\n };\n }\n\n testElement = null;\n }\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var _filterEntries = function _filterEntries(key, value) {\n var i = 0,\n n = _entries.length,\n result = [];\n for (; i < n; i++) {\n if (_entries[i][key] == value) {\n result.push(_entries[i]);\n }\n }\n return result;\n };\n\n var _clearEntries = function _clearEntries(type, name) {\n var i = _entries.length,\n entry;\n while (i--) {\n entry = _entries[i];\n if (entry.entryType == type && (name === void 0 || entry.name == name)) {\n _entries.splice(i, 1);\n }\n }\n };\n\n // @license http://opensource.org/licenses/MIT\n if ('performance' in window === false) {\n window.performance = {};\n }\n\n if ('now' in window.performance === false) {\n var nowOffset = Date.now();\n\n if (performance.timing && performance.timing.navigationStart) {\n nowOffset = performance.timing.navigationStart;\n }\n\n window.performance.now = function now() {\n return Date.now() - nowOffset;\n };\n }\n\n var startOffset = Date.now ? Date.now() : +new Date();\n var _entries = [];\n var _marksIndex = {};\n\n ;\n\n if (!window.performance.mark) {\n window.performance.mark = window.performance.webkitMark || function (name) {\n var mark = {\n name: name,\n entryType: \"mark\",\n startTime: window.performance.now(),\n duration: 0\n };\n\n _entries.push(mark);\n _marksIndex[name] = mark;\n };\n }\n\n if (!window.performance.measure) {\n window.performance.measure = window.performance.webkitMeasure || function (name, startMark, endMark) {\n startMark = _marksIndex[startMark].startTime;\n endMark = _marksIndex[endMark].startTime;\n\n _entries.push({\n name: name,\n entryType: \"measure\",\n startTime: startMark,\n duration: endMark - startMark\n });\n };\n }\n\n if (!window.performance.getEntriesByType) {\n window.performance.getEntriesByType = window.performance.webkitGetEntriesByType || function (type) {\n return _filterEntries(\"entryType\", type);\n };\n }\n\n if (!window.performance.getEntriesByName) {\n window.performance.getEntriesByName = window.performance.webkitGetEntriesByName || function (name) {\n return _filterEntries(\"name\", name);\n };\n }\n\n if (!window.performance.clearMarks) {\n window.performance.clearMarks = window.performance.webkitClearMarks || function (name) {\n _clearEntries(\"mark\", name);\n };\n }\n\n if (!window.performance.clearMeasures) {\n window.performance.clearMeasures = window.performance.webkitClearMeasures || function (name) {\n _clearEntries(\"measure\", name);\n };\n }\n\n _PLATFORM.performance = window.performance;\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var con = window.console = window.console || {};\n var nop = function nop() {};\n\n if (!con.memory) con.memory = {};\n ('assert,clear,count,debug,dir,dirxml,error,exception,group,' + 'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' + 'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',').forEach(function (m) {\n if (!con[m]) con[m] = nop;\n });\n\n if (_typeof(con.log) === 'object') {\n 'log,info,warn,error,assert,dir,clear,profile,profileEnd'.split(',').forEach(function (method) {\n console[method] = this.bind(console[method], console);\n }, Function.prototype.call);\n }\n}\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n if (!window.CustomEvent || typeof window.CustomEvent !== 'function') {\n var _CustomEvent = function _CustomEvent(event, params) {\n params = params || {\n bubbles: false,\n cancelable: false,\n detail: undefined\n };\n\n var evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n\n _CustomEvent.prototype = window.Event.prototype;\n window.CustomEvent = _CustomEvent;\n }\n}\n\nif (Element && !Element.prototype.matches) {\n var proto = Element.prototype;\n proto.matches = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector || proto.oMatchesSelector || proto.webkitMatchesSelector;\n}\n\nexport var _FEATURE = {\n shadowDOM: !!HTMLElement.prototype.attachShadow,\n scopedCSS: 'scoped' in document.createElement('style'),\n htmlTemplateElement: function () {\n var d = document.createElement('div');\n d.innerHTML = '';\n return 'content' in d.children[0];\n }(),\n mutationObserver: !!(window.MutationObserver || window.WebKitMutationObserver),\n ensureHTMLTemplateElement: function ensureHTMLTemplateElement(t) {\n return t;\n }\n};\n\nif (typeof FEATURE_NO_IE === 'undefined') {\n var isSVGTemplate = function isSVGTemplate(el) {\n return el.tagName === 'template' && el.namespaceURI === 'http://www.w3.org/2000/svg';\n };\n\n var fixSVGTemplateElement = function fixSVGTemplateElement(el) {\n var template = el.ownerDocument.createElement('template');\n var attrs = el.attributes;\n var length = attrs.length;\n var attr = void 0;\n\n el.parentNode.insertBefore(template, el);\n\n while (length-- > 0) {\n attr = attrs[length];\n template.setAttribute(attr.name, attr.value);\n el.removeAttribute(attr.name);\n }\n\n el.parentNode.removeChild(el);\n\n return fixHTMLTemplateElement(template);\n };\n\n var fixHTMLTemplateElement = function fixHTMLTemplateElement(template) {\n var content = template.content = document.createDocumentFragment();\n var child = void 0;\n\n while (child = template.firstChild) {\n content.appendChild(child);\n }\n\n return template;\n };\n\n var fixHTMLTemplateElementRoot = function fixHTMLTemplateElementRoot(template) {\n var content = fixHTMLTemplateElement(template).content;\n var childTemplates = content.querySelectorAll('template');\n\n for (var i = 0, ii = childTemplates.length; i < ii; ++i) {\n var child = childTemplates[i];\n\n if (isSVGTemplate(child)) {\n fixSVGTemplateElement(child);\n } else {\n fixHTMLTemplateElement(child);\n }\n }\n\n return template;\n };\n\n if (!_FEATURE.htmlTemplateElement) {\n _FEATURE.ensureHTMLTemplateElement = fixHTMLTemplateElementRoot;\n }\n}\n\nvar shadowPoly = window.ShadowDOMPolyfill || null;\n\nexport var _DOM = {\n Element: Element,\n NodeList: NodeList,\n SVGElement: SVGElement,\n boundary: 'aurelia-dom-boundary',\n addEventListener: function addEventListener(eventName, callback, capture) {\n document.addEventListener(eventName, callback, capture);\n },\n removeEventListener: function removeEventListener(eventName, callback, capture) {\n document.removeEventListener(eventName, callback, capture);\n },\n adoptNode: function adoptNode(node) {\n return document.adoptNode(node);\n },\n createAttribute: function createAttribute(name) {\n return document.createAttribute(name);\n },\n createElement: function createElement(tagName) {\n return document.createElement(tagName);\n },\n createTextNode: function createTextNode(text) {\n return document.createTextNode(text);\n },\n createComment: function createComment(text) {\n return document.createComment(text);\n },\n createDocumentFragment: function createDocumentFragment() {\n return document.createDocumentFragment();\n },\n createTemplateElement: function createTemplateElement() {\n var template = document.createElement('template');\n return _FEATURE.ensureHTMLTemplateElement(template);\n },\n createMutationObserver: function createMutationObserver(callback) {\n return new (window.MutationObserver || window.WebKitMutationObserver)(callback);\n },\n createCustomEvent: function createCustomEvent(eventType, options) {\n return new window.CustomEvent(eventType, options);\n },\n dispatchEvent: function dispatchEvent(evt) {\n document.dispatchEvent(evt);\n },\n getComputedStyle: function getComputedStyle(element) {\n return window.getComputedStyle(element);\n },\n getElementById: function getElementById(id) {\n return document.getElementById(id);\n },\n querySelector: function querySelector(query) {\n return document.querySelector(query);\n },\n querySelectorAll: function querySelectorAll(query) {\n return document.querySelectorAll(query);\n },\n nextElementSibling: function nextElementSibling(element) {\n if (element.nextElementSibling) {\n return element.nextElementSibling;\n }\n do {\n element = element.nextSibling;\n } while (element && element.nodeType !== 1);\n return element;\n },\n createTemplateFromMarkup: function createTemplateFromMarkup(markup) {\n var parser = document.createElement('div');\n parser.innerHTML = markup;\n\n var temp = parser.firstElementChild;\n if (!temp || temp.nodeName !== 'TEMPLATE') {\n throw new Error('Template markup must be wrapped in a