├── .circleci └── config.yml ├── .editorconfig ├── .gitattributes ├── .gitignore ├── .npmignore ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── LICENSE ├── README.md ├── build ├── index.full.js ├── index.js ├── index.no-loader.full.js ├── index.no-loader.js ├── index.quick-start.js ├── jsconfig.json ├── rollup.config.js ├── terser.config.json └── terser.es5.config.json ├── dist ├── aurelia.esm.js ├── aurelia.esm.min.js ├── aurelia.esm.min.js.map ├── aurelia.umd.js ├── aurelia.umd.min.js ├── aurelia.umd.min.js.map ├── aurelia_no_loader.es5.umd.js ├── aurelia_no_loader.es5.umd.min.js ├── aurelia_no_loader.es5.umd.min.js.map ├── aurelia_router.esm.js ├── aurelia_router.esm.min.js ├── aurelia_router.esm.min.js.map ├── aurelia_router.umd.js ├── aurelia_router.umd.min.js ├── aurelia_router.umd.min.js.map ├── aurelia_router_no_loader.es5.umd.js ├── aurelia_router_no_loader.es5.umd.min.js └── aurelia_router_no_loader.es5.umd.min.js.map ├── example ├── app.css ├── app.html ├── app.js ├── aurelia_router.esm.js ├── aurelia_router.umd.js ├── components │ ├── foo.css │ ├── foo.html │ └── foo.js ├── index.html └── routes │ ├── contact.html │ ├── contact.js │ ├── home.html │ └── home.js ├── favicon.ico ├── index.html ├── jsconfig.json ├── package-lock.json ├── package.json ├── scripts ├── aurelia-core.js ├── aurelia-core.min.js ├── aurelia-routing.js ├── aurelia-routing.min.js ├── babel │ ├── systemjs-plugin-babel@0.0.12.json │ └── systemjs-plugin-babel@0.0.12 │ │ ├── .jspm-hash │ │ ├── babel-helpers.js │ │ ├── babel-helpers │ │ ├── asyncToGenerator.js │ │ ├── classCallCheck.js │ │ ├── createClass.js │ │ ├── defaults.js │ │ ├── defineEnumerableProperties.js │ │ ├── defineProperty.js │ │ ├── extends.js │ │ ├── get.js │ │ ├── inherits.js │ │ ├── instanceof.js │ │ ├── interopRequireDefault.js │ │ ├── interopRequireWildcard.js │ │ ├── jsx.js │ │ ├── newArrowCheck.js │ │ ├── objectDestructuringEmpty.js │ │ ├── objectWithoutProperties.js │ │ ├── possibleConstructorReturn.js │ │ ├── selfGlobal.js │ │ ├── set.js │ │ ├── slicedToArray.js │ │ ├── slicedToArrayLoose.js │ │ ├── taggedTemplateLiteral.js │ │ ├── taggedTemplateLiteralLoose.js │ │ ├── temporalRef.js │ │ ├── temporalUndefined.js │ │ ├── toArray.js │ │ ├── toConsumableArray.js │ │ └── typeof.js │ │ ├── plugin-babel.js │ │ ├── regenerator-runtime.js │ │ ├── systemjs-babel-browser.js │ │ └── systemjs-babel-node.js ├── config-esnext.js ├── config-typescript.js └── system.js └── src ├── app.html ├── app.js ├── app.ts ├── main.js └── main.ts /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | 3 | executors: 4 | docker-circleci: 5 | working_directory: "~/repo" 6 | docker: 7 | - image: "circleci/node:10.12-stretch-browsers" 8 | 9 | jobs: 10 | unit_test: 11 | executor: docker-circleci 12 | steps: 13 | - checkout 14 | - run: npm ci 15 | prepare_release: 16 | executor: docker-circleci 17 | steps: 18 | - checkout 19 | - run: npm ci 20 | # - run: ./node_modules/.bin/jspm install 21 | # - run: ./node_modules/.bin/gulp prepare-release 22 | 23 | workflows: 24 | build_test: 25 | jobs: 26 | - unit_test 27 | - prepare_release 28 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | end_of_line = lf 9 | insert_final_newline = true 10 | 11 | # 2 space indentation 12 | [**.*] 13 | indent_style = space 14 | indent_size = 2 -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | dist/*.{js,map} -diff 2 | package-lock.json -diff -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | jspm_packages 3 | bower_components 4 | .idea 5 | .DS_STORE 6 | build/reports 7 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | jspm_packages 2 | bower_components 3 | build 4 | src 5 | .idea 6 | .editorconfig 7 | CONTRIBUTING.md 8 | favicon.ico 9 | index.html 10 | ISSUE_TEMPLATE.md 11 | jsconfig.json 12 | package-lock.json 13 | tsconfig.json -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We'd love for you to contribute and to make this project even better than it is today! If this interests you, please begin by reading [our contributing guidelines](https://github.com/DurandalProject/about/blob/master/CONTRIBUTING.md). The contributing document will provide you with all the information you need to get started. Once you have read that, you will need to also [sign our CLA](http://goo.gl/forms/dI8QDDSyKR) before we can accept a Pull Request from you. More information on the process is included in the [contributor's guide](https://github.com/DurandalProject/about/blob/master/CONTRIBUTING.md). 4 | -------------------------------------------------------------------------------- /ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 19 | **I'm submitting a bug report** 20 | **I'm submitting a feature request** 21 | 22 | * **Library Version:** 23 | major.minor.patch-pre 24 | 25 | 26 | **Please tell us about your environment:** 27 | * **Operating System:** 28 | OSX 10.x|Linux (distro)|Windows [7|8|8.1|10] 29 | 30 | * **Node Version:** 31 | 6.2.0 32 | 36 | 37 | * **NPM Version:** 38 | 3.8.9 39 | 43 | 44 | * **JSPM OR Webpack AND Version** 45 | JSPM 0.16.32 | webpack 2.1.0-beta.17 46 | 52 | 53 | * **Browser:** 54 | all | Chrome XX | Firefox XX | Edge XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView 55 | 56 | * **Language:** 57 | all | TypeScript X.X | ESNext 58 | 59 | 60 | **Current behavior:** 61 | 62 | 63 | **Expected/desired behavior:** 64 | 71 | 72 | 73 | * **What is the expected behavior?** 74 | 75 | 76 | * **What is the motivation / use case for changing the behavior?** 77 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2010 - 2016 Blue Spire Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aurelia-script 2 | 3 | [![Join the chat at https://gitter.im/aurelia/discuss](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/aurelia/discuss?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) 4 | 5 | This repo is the home for Aurelia's concatenated script-tag-ready build. 6 | 7 | > To keep up to date on [Aurelia](http://www.aurelia.io/), please visit and subscribe to [the official blog](http://blog.aurelia.io/) and [our email list](http://eepurl.com/ces50j). We also invite you to [follow us on twitter](https://twitter.com/aureliaeffect). If you have questions, please [join our community on Gitter](https://gitter.im/aurelia/discuss) or use [stack overflow](http://stackoverflow.com/search?q=aurelia). Documentation can be found [in our developer hub](http://aurelia.io). 8 | 9 | ## Getting started with Aurelia Script 10 | 11 | ### Simple examples 12 | 13 | In the good old day, you chuck in a script tag into your html and start writing app. Aurelia Script is a way to help you return to that, with Aurelia. Simply add: 14 | 15 | ```html 16 | 17 | ``` 18 | 19 | into your main html and you are ready to go, like the following: 20 | 21 | ```html 22 | 33 | ``` 34 | 35 | If you want to enhance a section of your page, which is a typical requirement in CMS environment: 36 | 37 | ```html 38 | 49 | ``` 50 | 51 | If you want to reuse the same `Aurelia` instance for multiple enhancements, you can do: 52 | 53 | ```js 54 | var aurelia = new au.Aurelia(); 55 | aurelia.start().then(() => { 56 | // here you are ready to enhance or start a new app 57 | }); 58 | ``` 59 | 60 | ### Using aurelia-script with ES5: 61 | 62 | For some projects that need to run in ES5, there are 2 dists that can be used: `dist/aurelia_no_loader.es5.umd.js` and `dist/aurelia_router_no_loader.es5.umd.js` (or equivalent minified versions). This is great when you just want to use Aurelia for its templating/binding capabilities (progressive enhancement, sub section of a bigger app for example). As their name suggest, there's no loader bundled with them, but you can easily add a loader to fit your need, in case you need to dynamically load a module. Both Requirejs and SystemJS are compatible with ES5 environments to dynamically load modules at runtime. Just make sure you configure Aurelia modules aliases correctly if those modules happen to have a dependencies on one of Aurelia modules. 63 | 64 | ### What is with `au`: 65 | 66 | `au` is a global namespace for all exports from Aurelia modules, instead of importing from `aurelia-framework` module. This is because aurelia-script is bundled in UMD module format, to enable simple, old school style usage. For example: 67 | 68 | The equivalent of 69 | 70 | ```ts 71 | import { CompositionEngine, ViewCompiler } from 'aurelia-framework'; 72 | ``` 73 | 74 | In Aurelia Script would be: 75 | ```ts 76 | const { CompositionEngine, ViewCompiler } = au; 77 | ``` 78 | 79 | ### With ESM: 80 | 81 | There is another distribution bundle that is in ES module format, which you can think of it as a barrel export version of all Aurelia modules in ESM. For example: 82 | 83 | The equivalent of 84 | 85 | ```ts 86 | import { BindingEngine, CompositionEngine, ViewCompiler } from 'aurelia-framework'; 87 | ``` 88 | 89 | In Aurelia Script esm distribution would be: 90 | 91 | ```ts 92 | import { 93 | BindingEngine, 94 | CompositionEngine, 95 | ViewCompiler 96 | } from 'https://unpkg.com/aurelia-script@1.5.2/dist/aurelia.esm.min.js'; 97 | ``` 98 | 99 | ## Online Playground with Single file script 100 | * Codesandbox: https://codesandbox.io/s/wnr6zxv6vl 101 | * Codepen: https://codepen.io/bigopon/pen/MzGLZe 102 | * With Aurelia Store: https://codesandbox.io/s/n3r48qvzjl 103 | * With Aurelia UI Virtualization: https://codesandbox.io/s/m781l8oyqj 104 | * With Aurelia Dialog: https://codesandbox.io/s/62lmyy16xn 105 | * With Aurelia Validation: https://codesandbox.io/s/6y1zzon47r 106 | 107 | ## Development 108 | 109 | ### Build 110 | 111 | 1. Install the dependencies 112 | 113 | ```bash 114 | npm install 115 | ``` 116 | 117 | 2. Run either the build / bundle script 118 | 119 | ```bash 120 | # Build only core 121 | npm run build 122 | # Or full build, with router 123 | npm run bundle 124 | ``` 125 | 126 | ### Run the example project 127 | 1. Go to example folder inside this project 128 | 2. Start a http server 129 | 3. Navigate to `index.html` in browser 130 | 131 | ## How it works? 132 | 1. `dist` folder contains built result of all aurelia bundles, together with their minified versions, with different scopes: 133 | * bundles with names ending in `.esm.js` are in ESM (ECMAScript Module) format. bundles with names ending in `.umd.js` are in UMD (Universal Module Definition) format. 134 | * `aurelia.esm.js`, `aurelia.umd.js` are bundles without router feature. Typically used when you want to minimized to script included in your page. 135 | * `aurelia_router.esm.js`, `aurelia_router.umd.js` are bundles of with router feature. 136 | 2. `example` folder contains an example application to get started. Step to run it included in the section above 137 | 3. `scripts` folder contains all built result of all aurelia core modules, in AMD module format for environment like `gistrun` (https://gist.run) 138 | 4. `build` folder contains entry/ setup script, code for building / emiting code to `dist` and `example` folders. 139 | * `index.js` and `index.full.js` are custom entries to give rollup instruction how to bundle all core modules. `index.js` will result in a bundle without router related features. `index.full.js` will result in a bundle with all features. 140 | * `rollup.config.js` is rollup config for running `npm run bundle` and `npm run build` scripts 141 | 142 | ### Notes: 143 | `aurelia-script` uses new ECMAScript feature: dynamic import via `import()` API. If your target browser does not support such API, `aurelia-script` won't be able to run. Browser support matrix is at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Browser_compatibility (check for Dynamic import) 144 | -------------------------------------------------------------------------------- /build/index.full.js: -------------------------------------------------------------------------------- 1 | import 'aurelia-polyfills'; 2 | import { initialize } from 'aurelia-pal-browser'; 3 | import 'aurelia-loader-esm'; 4 | import { LogManager, FrameworkConfiguration, Aurelia } from 'aurelia-framework'; 5 | import { configure as configureBindingLanguage } from 'aurelia-templating-binding'; 6 | import { configure as configureDefaultResources } from 'aurelia-templating-resources'; 7 | import { configure as configureEventAggregator } from 'aurelia-event-aggregator'; 8 | import { configure as configureHistory } from 'aurelia-history-browser'; 9 | import { configure as configureRouter } from 'aurelia-templating-router'; 10 | import { ConsoleAppender } from 'aurelia-logging-console'; 11 | 12 | initialize(); 13 | 14 | // Using static convention to avoid having to fetch / load module dynamically 15 | (frameworkCfgProto => { 16 | frameworkCfgProto.developmentLogging = function() { 17 | LogManager.addAppender(new ConsoleAppender()); 18 | LogManager.setLevel(LogManager.logLevel.debug); 19 | return this; 20 | }; 21 | 22 | frameworkCfgProto.defaultBindingLanguage = function() { 23 | return this.plugin(configureBindingLanguage); 24 | }; 25 | 26 | frameworkCfgProto.defaultResources = function() { 27 | return this.plugin(configureDefaultResources); 28 | }; 29 | 30 | frameworkCfgProto.eventAggregator = function() { 31 | return this.plugin(configureEventAggregator); 32 | }; 33 | 34 | frameworkCfgProto.history = function() { 35 | return this.plugin(configureHistory); 36 | }; 37 | 38 | frameworkCfgProto.router = function() { 39 | return this.plugin(configureRouter); 40 | }; 41 | })(FrameworkConfiguration.prototype); 42 | 43 | export { 44 | start, 45 | enhance 46 | } from './index.quick-start'; 47 | 48 | export * from 'aurelia-framework'; 49 | export { EventAggregator, includeEventsIn } from 'aurelia-event-aggregator'; 50 | export { 51 | If, 52 | Else, 53 | Repeat, 54 | Compose, 55 | Show, 56 | Hide, 57 | Focus, 58 | With, 59 | Replaceable, 60 | AbstractRepeater, 61 | ArrayRepeatStrategy, 62 | AttrBindingBehavior, 63 | BindingSignaler, 64 | DebounceBindingBehavior, 65 | FromViewBindingBehavior, 66 | HTMLSanitizer, 67 | MapRepeatStrategy, 68 | NullRepeatStrategy, 69 | NumberRepeatStrategy, 70 | OneTimeBindingBehavior, 71 | OneWayBindingBehavior, 72 | RepeatStrategyLocator, 73 | SanitizeHTMLValueConverter, 74 | SelfBindingBehavior, 75 | SetRepeatStrategy, 76 | SignalBindingBehavior, 77 | ThrottleBindingBehavior, 78 | ToViewBindingBehavior, 79 | TwoWayBindingBehavior, 80 | UpdateTriggerBindingBehavior, 81 | createFullOverrideContext, 82 | updateOneTimeBinding, 83 | updateOverrideContext, 84 | isOneTime, 85 | viewsRequireLifecycle, 86 | unwrapExpression, 87 | getItemsSourceExpression, 88 | } from 'aurelia-templating-resources'; 89 | export { 90 | CommitChangesStep, 91 | NavigationInstruction, 92 | NavModel, 93 | isNavigationCommand, 94 | Redirect, 95 | RedirectToRoute, 96 | PipelineStatus, 97 | Pipeline, 98 | RouterConfiguration, 99 | activationStrategy, 100 | BuildNavigationPlanStep, 101 | Router, 102 | CanDeactivatePreviousStep, 103 | CanActivateNextStep, 104 | DeactivatePreviousStep, 105 | ActivateNextStep, 106 | RouteLoader, 107 | LoadRouteStep, 108 | PipelineProvider, 109 | AppRouter, 110 | } from 'aurelia-router'; 111 | -------------------------------------------------------------------------------- /build/index.js: -------------------------------------------------------------------------------- 1 | import 'aurelia-polyfills'; 2 | import { initialize } from 'aurelia-pal-browser'; 3 | import 'aurelia-loader-esm'; 4 | import { LogManager, FrameworkConfiguration, Aurelia, View } from 'aurelia-framework'; 5 | import { configure as configureBindingLanguage } from 'aurelia-templating-binding'; 6 | import { configure as configureDefaultResources } from 'aurelia-templating-resources'; 7 | import { configure as configureEventAggregator } from 'aurelia-event-aggregator'; 8 | // import { configure as configureHistory } from 'aurelia-history-browser'; 9 | // import { configure as configureRouter } from 'aurelia-templating-router'; 10 | import { ConsoleAppender } from 'aurelia-logging-console'; 11 | import { getLogger } from 'aurelia-logging'; 12 | 13 | initialize(); 14 | 15 | // Using static convention to avoid having to fetch / load module dynamically 16 | (frameworkCfgProto => { 17 | frameworkCfgProto.developmentLogging = function() { 18 | LogManager.addAppender(new ConsoleAppender()); 19 | LogManager.setLevel(LogManager.logLevel.debug); 20 | return this; 21 | }; 22 | 23 | frameworkCfgProto.defaultBindingLanguage = function() { 24 | return this.plugin(configureBindingLanguage); 25 | }; 26 | 27 | frameworkCfgProto.defaultResources = function() { 28 | return this.plugin(configureDefaultResources); 29 | }; 30 | 31 | frameworkCfgProto.eventAggregator = function() { 32 | return this.plugin(configureEventAggregator); 33 | }; 34 | 35 | const errorMsg = 'This bundle does not support router feature. Consider using full bundle'; 36 | frameworkCfgProto.history = function() { 37 | getLogger('aurelia').error(errorMsg); 38 | return this; 39 | }; 40 | 41 | frameworkCfgProto.router = function() { 42 | getLogger('aurelia').error(errorMsg); 43 | return this; 44 | }; 45 | })(FrameworkConfiguration.prototype); 46 | 47 | export { 48 | start, 49 | enhance 50 | } from './index.quick-start'; 51 | 52 | export * from 'aurelia-framework'; 53 | export { EventAggregator, includeEventsIn } from 'aurelia-event-aggregator'; 54 | export { 55 | If, 56 | Else, 57 | Repeat, 58 | Compose, 59 | Show, 60 | Hide, 61 | Focus, 62 | With, 63 | Replaceable, 64 | AbstractRepeater, 65 | ArrayRepeatStrategy, 66 | AttrBindingBehavior, 67 | BindingSignaler, 68 | DebounceBindingBehavior, 69 | FromViewBindingBehavior, 70 | HTMLSanitizer, 71 | MapRepeatStrategy, 72 | NullRepeatStrategy, 73 | NumberRepeatStrategy, 74 | OneTimeBindingBehavior, 75 | OneWayBindingBehavior, 76 | RepeatStrategyLocator, 77 | SanitizeHTMLValueConverter, 78 | SelfBindingBehavior, 79 | SetRepeatStrategy, 80 | SignalBindingBehavior, 81 | ThrottleBindingBehavior, 82 | ToViewBindingBehavior, 83 | TwoWayBindingBehavior, 84 | UpdateTriggerBindingBehavior, 85 | createFullOverrideContext, 86 | updateOneTimeBinding, 87 | updateOverrideContext, 88 | isOneTime, 89 | viewsRequireLifecycle, 90 | unwrapExpression, 91 | getItemsSourceExpression, 92 | } from 'aurelia-templating-resources'; 93 | -------------------------------------------------------------------------------- /build/index.no-loader.full.js: -------------------------------------------------------------------------------- 1 | import 'aurelia-polyfills'; 2 | import { initialize } from 'aurelia-pal-browser'; 3 | import { LogManager, FrameworkConfiguration, Aurelia } from 'aurelia-framework'; 4 | import { configure as configureBindingLanguage } from 'aurelia-templating-binding'; 5 | import { configure as configureDefaultResources } from 'aurelia-templating-resources'; 6 | import { configure as configureEventAggregator } from 'aurelia-event-aggregator'; 7 | import { configure as configureHistory } from 'aurelia-history-browser'; 8 | import { configure as configureRouter } from 'aurelia-templating-router'; 9 | import { ConsoleAppender } from 'aurelia-logging-console'; 10 | 11 | initialize(); 12 | 13 | // Using static convention to avoid having to fetch / load module dynamically 14 | (frameworkCfgProto => { 15 | frameworkCfgProto.developmentLogging = function() { 16 | LogManager.addAppender(new ConsoleAppender()); 17 | LogManager.setLevel(LogManager.logLevel.debug); 18 | return this; 19 | }; 20 | 21 | frameworkCfgProto.defaultBindingLanguage = function() { 22 | return this.plugin(configureBindingLanguage); 23 | }; 24 | 25 | frameworkCfgProto.defaultResources = function() { 26 | return this.plugin(configureDefaultResources); 27 | }; 28 | 29 | frameworkCfgProto.eventAggregator = function() { 30 | return this.plugin(configureEventAggregator); 31 | }; 32 | 33 | frameworkCfgProto.history = function() { 34 | return this.plugin(configureHistory); 35 | }; 36 | 37 | frameworkCfgProto.router = function() { 38 | return this.plugin(configureRouter); 39 | }; 40 | })(FrameworkConfiguration.prototype); 41 | 42 | export { 43 | start, 44 | enhance 45 | } from './index.quick-start'; 46 | 47 | export * from 'aurelia-framework'; 48 | export { EventAggregator, includeEventsIn } from 'aurelia-event-aggregator'; 49 | export { 50 | If, 51 | Else, 52 | Repeat, 53 | Compose, 54 | Show, 55 | Hide, 56 | Focus, 57 | With, 58 | Replaceable, 59 | AbstractRepeater, 60 | ArrayRepeatStrategy, 61 | AttrBindingBehavior, 62 | BindingSignaler, 63 | DebounceBindingBehavior, 64 | FromViewBindingBehavior, 65 | HTMLSanitizer, 66 | MapRepeatStrategy, 67 | NullRepeatStrategy, 68 | NumberRepeatStrategy, 69 | OneTimeBindingBehavior, 70 | OneWayBindingBehavior, 71 | RepeatStrategyLocator, 72 | SanitizeHTMLValueConverter, 73 | SelfBindingBehavior, 74 | SetRepeatStrategy, 75 | SignalBindingBehavior, 76 | ThrottleBindingBehavior, 77 | ToViewBindingBehavior, 78 | TwoWayBindingBehavior, 79 | UpdateTriggerBindingBehavior, 80 | createFullOverrideContext, 81 | updateOneTimeBinding, 82 | updateOverrideContext, 83 | isOneTime, 84 | viewsRequireLifecycle, 85 | unwrapExpression, 86 | getItemsSourceExpression, 87 | } from 'aurelia-templating-resources'; 88 | export { 89 | CommitChangesStep, 90 | NavigationInstruction, 91 | NavModel, 92 | isNavigationCommand, 93 | Redirect, 94 | RedirectToRoute, 95 | PipelineStatus, 96 | Pipeline, 97 | RouterConfiguration, 98 | activationStrategy, 99 | BuildNavigationPlanStep, 100 | Router, 101 | CanDeactivatePreviousStep, 102 | CanActivateNextStep, 103 | DeactivatePreviousStep, 104 | ActivateNextStep, 105 | RouteLoader, 106 | LoadRouteStep, 107 | PipelineProvider, 108 | AppRouter, 109 | } from 'aurelia-router'; 110 | -------------------------------------------------------------------------------- /build/index.no-loader.js: -------------------------------------------------------------------------------- 1 | import 'aurelia-polyfills'; 2 | import { initialize } from 'aurelia-pal-browser'; 3 | import { LogManager, FrameworkConfiguration, Aurelia, View, PLATFORM, Loader } from 'aurelia-framework'; 4 | import { configure as configureBindingLanguage } from 'aurelia-templating-binding'; 5 | import { configure as configureDefaultResources } from 'aurelia-templating-resources'; 6 | import { configure as configureEventAggregator } from 'aurelia-event-aggregator'; 7 | import { ConsoleAppender } from 'aurelia-logging-console'; 8 | import { getLogger } from 'aurelia-logging'; 9 | 10 | /** 11 | * Bare implementation for a noop loader. 12 | */ 13 | PLATFORM.Loader = class NoopLoader extends Loader { 14 | 15 | normalize(name) { 16 | return Promise.resolve(name); 17 | } 18 | 19 | /** 20 | * Alters a module id so that it includes a plugin loader. 21 | * @param url The url of the module to load. 22 | * @param pluginName The plugin to apply to the module id. 23 | * @return The plugin-based module id. 24 | */ 25 | applyPluginToUrl(url, pluginName) { 26 | return `${pluginName}!${url}`; 27 | } 28 | 29 | /** 30 | * Registers a plugin with the loader. 31 | * @param pluginName The name of the plugin. 32 | * @param implementation The plugin implementation. 33 | */ 34 | addPlugin(pluginName, implementation) {/* empty */} 35 | }; 36 | 37 | initialize(); 38 | 39 | // Using static convention to avoid having to fetch / load module dynamically 40 | (frameworkCfgProto => { 41 | frameworkCfgProto.developmentLogging = function() { 42 | LogManager.addAppender(new ConsoleAppender()); 43 | LogManager.setLevel(LogManager.logLevel.debug); 44 | return this; 45 | }; 46 | 47 | frameworkCfgProto.defaultBindingLanguage = function() { 48 | return this.plugin(configureBindingLanguage); 49 | }; 50 | 51 | frameworkCfgProto.defaultResources = function() { 52 | return this.plugin(configureDefaultResources); 53 | }; 54 | 55 | frameworkCfgProto.eventAggregator = function() { 56 | return this.plugin(configureEventAggregator); 57 | }; 58 | 59 | const errorMsg = 'This bundle does not support router feature. Consider using full bundle'; 60 | frameworkCfgProto.history = function() { 61 | getLogger('aurelia').error(errorMsg); 62 | return this; 63 | }; 64 | 65 | frameworkCfgProto.router = function() { 66 | getLogger('aurelia').error(errorMsg); 67 | return this; 68 | }; 69 | })(FrameworkConfiguration.prototype); 70 | 71 | export { 72 | start, 73 | enhance 74 | } from './index.quick-start'; 75 | 76 | export * from 'aurelia-framework'; 77 | export { EventAggregator, includeEventsIn } from 'aurelia-event-aggregator'; 78 | export { 79 | If, 80 | Else, 81 | Repeat, 82 | Compose, 83 | Show, 84 | Hide, 85 | Focus, 86 | With, 87 | Replaceable, 88 | AbstractRepeater, 89 | ArrayRepeatStrategy, 90 | AttrBindingBehavior, 91 | BindingSignaler, 92 | DebounceBindingBehavior, 93 | FromViewBindingBehavior, 94 | HTMLSanitizer, 95 | MapRepeatStrategy, 96 | NullRepeatStrategy, 97 | NumberRepeatStrategy, 98 | OneTimeBindingBehavior, 99 | OneWayBindingBehavior, 100 | RepeatStrategyLocator, 101 | SanitizeHTMLValueConverter, 102 | SelfBindingBehavior, 103 | SetRepeatStrategy, 104 | SignalBindingBehavior, 105 | ThrottleBindingBehavior, 106 | ToViewBindingBehavior, 107 | TwoWayBindingBehavior, 108 | UpdateTriggerBindingBehavior, 109 | createFullOverrideContext, 110 | updateOneTimeBinding, 111 | updateOverrideContext, 112 | isOneTime, 113 | viewsRequireLifecycle, 114 | unwrapExpression, 115 | getItemsSourceExpression, 116 | } from 'aurelia-templating-resources'; 117 | -------------------------------------------------------------------------------- /build/index.quick-start.js: -------------------------------------------------------------------------------- 1 | import { Aurelia, FrameworkConfiguration } from 'aurelia-framework'; 2 | 3 | /** 4 | * Bootstrap a new Aurelia instance and start an application 5 | * @param {QuickStartOptions} options 6 | * @returns {Aurelia} the running Aurelia instance 7 | */ 8 | const createAndStart = (options = {}) => { 9 | const aurelia = new Aurelia(); 10 | const use = aurelia.use; 11 | use.standardConfiguration(); 12 | if (options.debug) { 13 | use.developmentLogging(); 14 | } 15 | if (Array.isArray(options.plugins)) { 16 | options.plugins.forEach((plgCfg) => { 17 | if (Array.isArray(plgCfg)) { 18 | use.plugin(plgCfg[0], plgCfg[1]); 19 | } else { 20 | use.plugin(plgCfg); 21 | } 22 | }); 23 | } 24 | if (Array.isArray(options.resources)) { 25 | use.globalResources(options.resources); 26 | } 27 | return aurelia.start(); 28 | } 29 | 30 | /** 31 | * Bootstrap a new Aurelia instance and start an application 32 | * @param {QuickStartOptions} options 33 | * @returns {Aurelia} the running Aurelia instance 34 | */ 35 | export function start(options = {}) { 36 | return createAndStart(options) 37 | .then(aurelia => aurelia.setRoot(options.root || 'app.js', options.host || document.body)); 38 | } 39 | 40 | /** 41 | * Bootstrap a new Aurelia instance and start an application by enhancing a DOM tree 42 | * @param {QuickEnhanceOptions} options Configuration for enhancing a DOM tree 43 | * @returns {View} the enhanced View by selected options 44 | */ 45 | export function enhance(options = {}) { 46 | return createAndStart(options) 47 | .then(aurelia => { 48 | if (typeof options.root === 'function') { 49 | options.root = aurelia.container.get(options.root); 50 | } 51 | return aurelia.enhance(options.root || {}, options.host || document.body); 52 | }); 53 | } 54 | 55 | /** @typed ConfigureFn 56 | * @param {FrameworkConfiguration} frameWorkConfig 57 | * @param {any} plugigConfig 58 | */ 59 | 60 | /** @typedef QuickStartOptions 61 | * @property {string | Function} [root] application root. Either string or a class, which will be instantiated with DI 62 | * @property {string | Element} [host] application host, element or a string, which will be used to query the element 63 | * @property {Array} [resources] global resources for the application 64 | * @property {Array any} | [(fwCfg: FrameworkConfiguration, cfg: {}) => any, {}]>} [plugins] 65 | * @property {boolean} [debug] true to use development console logging 66 | */ 67 | 68 | /** @typedef QuickEnhanceOptions 69 | * @property {{} | Function} [root] binding context for enhancement, can be either object or a class, which will be instantiated with DI 70 | * @property {string | Element} [host] host node of to be enhanced tree 71 | * @property {Array} [resources] global resources for the application 72 | * @property {Array any} | [(fwCfg: FrameworkConfiguration, cfg: {}) => any, {}]>} [plugins] 73 | * @property {boolean} [debug] true to use development console logging 74 | */ -------------------------------------------------------------------------------- /build/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "es6", 5 | "moduleResolution": "node", 6 | "experimentalDecorators": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /build/rollup.config.js: -------------------------------------------------------------------------------- 1 | import replace from 'rollup-plugin-replace'; 2 | import commonjs from 'rollup-plugin-commonjs'; 3 | import nodeResolve from 'rollup-plugin-node-resolve'; 4 | import babel from 'rollup-plugin-babel'; 5 | 6 | export default [ 7 | { 8 | input: 'build/index.js', 9 | output: [ 10 | { 11 | file: 'dist/aurelia.esm.js', 12 | format: 'es' 13 | }, 14 | { 15 | file: 'dist/aurelia.umd.js', 16 | format: 'umd', 17 | name: 'au' 18 | } 19 | ], 20 | 21 | // external: externalLibs, 22 | plugins: [ 23 | replace({ 24 | FEATURE_NO_ES2015: true, 25 | FEATURE_NO_ES2016: true, 26 | // Need for Reflect metadata 27 | FEATURE_NO_ESNEXT: undefined, 28 | FEATURE_NO_IE: true, 29 | FEATURE_NO_UNPARSER: true, 30 | FEATURE_ROUTER: process.env.ROUTER === false ? undefined : true 31 | }), 32 | 33 | nodeResolve({ 34 | // jsnext: true, 35 | // main: true 36 | }), 37 | 38 | commonjs({ 39 | // ignoreGlobal: true 40 | }) 41 | ] 42 | }, 43 | { 44 | input: 'build/index.full.js', 45 | output: [ 46 | { 47 | file: 'dist/aurelia_router.esm.js', 48 | format: 'es' 49 | }, 50 | { 51 | file: 'example/aurelia_router.esm.js', 52 | format: 'es' 53 | }, 54 | { 55 | file: 'dist/aurelia_router.umd.js', 56 | format: 'umd', 57 | name: 'au' 58 | }, 59 | { 60 | file: 'example/aurelia_router.umd.js', 61 | format: 'umd', 62 | name: 'au' 63 | } 64 | ], 65 | 66 | // external: externalLibs, 67 | plugins: [ 68 | replace({ 69 | FEATURE_NO_ES2015: true, 70 | FEATURE_NO_ES2016: true, 71 | // Need for Reflect metadata 72 | FEATURE_NO_ESNEXT: undefined, 73 | FEATURE_NO_IE: true, 74 | FEATURE_NO_UNPARSER: true, 75 | FEATURE_ROUTER: process.env.ROUTER === false ? undefined : true 76 | }), 77 | 78 | nodeResolve({ 79 | // jsnext: true, 80 | // main: true 81 | }), 82 | 83 | commonjs({ 84 | // ignoreGlobal: true 85 | }) 86 | ] 87 | }, 88 | { 89 | input: 'build/index.no-loader.js', 90 | output: [ 91 | { 92 | file: 'dist/aurelia_no_loader.es5.umd.js', 93 | format: 'umd', 94 | name: 'au' 95 | } 96 | ], 97 | 98 | // external: externalLibs, 99 | plugins: [ 100 | 101 | nodeResolve({ 102 | // jsnext: true, 103 | // main: true 104 | }), 105 | 106 | commonjs({ 107 | // ignoreGlobal: true 108 | }), 109 | 110 | babel({ 111 | presets: [ 112 | [ 113 | '@babel/preset-env', 114 | { loose: true } 115 | ] 116 | ] 117 | }) 118 | ] 119 | }, 120 | { 121 | input: 'build/index.no-loader.full.js', 122 | output: [ 123 | { 124 | file: 'dist/aurelia_router_no_loader.es5.umd.js', 125 | format: 'umd', 126 | name: 'au' 127 | } 128 | ], 129 | 130 | // external: externalLibs, 131 | plugins: [ 132 | nodeResolve({ 133 | // jsnext: true, 134 | // main: true 135 | }), 136 | 137 | commonjs({ 138 | // ignoreGlobal: true 139 | }), 140 | 141 | babel({ 142 | presets: [ 143 | [ 144 | '@babel/preset-env', 145 | { loose: true } 146 | ] 147 | ] 148 | }) 149 | ] 150 | }, 151 | ].map(config => { 152 | const es6Mappings = { 153 | 'aurelia-templating-binding': './node_modules/aurelia-templating-binding/dist/es2015/aurelia-templating-binding.js', 154 | 'aurelia-route-recognizer': './node_modules/aurelia-route-recognizer/dist/es2015/aurelia-route-recognizer.js', 155 | 'aurelia-loader': './node_modules/aurelia-loader/dist/es2015/aurelia-loader.js' 156 | } 157 | config.plugins.unshift({ 158 | resolveId(importee) { 159 | return es6Mappings[importee] || null; 160 | } 161 | }); 162 | config.onwarn = function(warning, warn) { 163 | // skip certain warnings 164 | if (warning.code === 'UNUSED_EXTERNAL_IMPORT') return; 165 | 166 | if (warning.code === 'NON_EXISTENT_EXPORT') return; 167 | 168 | throw new Error(warning.message); 169 | }; 170 | return config; 171 | }) 172 | -------------------------------------------------------------------------------- /build/terser.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "parse": { 3 | }, 4 | "compress": { 5 | }, 6 | "mangle": { 7 | "properties": false 8 | }, 9 | "output": { 10 | }, 11 | "sourceMap": { 12 | }, 13 | "ecma": 8, 14 | "keep_classnames": false, 15 | "keep_fnames": false, 16 | "ie8": false, 17 | "module": false, 18 | "nameCache": null, 19 | "safari10": false, 20 | "toplevel": false, 21 | "warnings": false 22 | } 23 | -------------------------------------------------------------------------------- /build/terser.es5.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "parse": { 3 | }, 4 | "compress": { 5 | }, 6 | "mangle": { 7 | "properties": false 8 | }, 9 | "output": { 10 | }, 11 | "sourceMap": { 12 | }, 13 | "ecma": 5, 14 | "keep_classnames": false, 15 | "keep_fnames": false, 16 | "ie8": false, 17 | "module": false, 18 | "nameCache": null, 19 | "safari10": false, 20 | "toplevel": false, 21 | "warnings": false 22 | } 23 | -------------------------------------------------------------------------------- /example/app.css: -------------------------------------------------------------------------------- 1 | .nav { 2 | display: inline-block; 3 | margin-right: 5px; 4 | padding: 4px; 5 | color: black; 6 | } 7 | .nav:hover { 8 | color: blue; 9 | } -------------------------------------------------------------------------------- /example/app.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/app.js: -------------------------------------------------------------------------------- 1 | export class App { 2 | 3 | constructor() { 4 | this.message = 'Hello world'; 5 | } 6 | 7 | configureRouter(config, router) { 8 | config.map([ 9 | { route: ['', 'home'], name: 'home', moduleId: 'routes/home.js', title: 'Home', nav: true }, 10 | { route: 'contact', name: 'contact', moduleId: 'routes/contact.js', title: 'Contact', nav: true } 11 | ]); 12 | this.router = router; 13 | } 14 | } -------------------------------------------------------------------------------- /example/components/foo.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | display: inline-block; 3 | padding: 10px; 4 | background: green; 5 | color: #fff; 6 | } 7 | -------------------------------------------------------------------------------- /example/components/foo.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /example/components/foo.js: -------------------------------------------------------------------------------- 1 | export class Foo { 2 | static get $resource() { 3 | return { 4 | bindables: ['foo'] 5 | }; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /example/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | -------------------------------------------------------------------------------- /example/routes/contact.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/routes/contact.js: -------------------------------------------------------------------------------- 1 | export class Contact { 2 | 3 | } -------------------------------------------------------------------------------- /example/routes/home.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /example/routes/home.js: -------------------------------------------------------------------------------- 1 | export class Page { 2 | 3 | constructor() { 4 | this.message = 'Welcome to home page'; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- 1 | �PNG 2 |  3 | IHDR szz�bKGD�C� pHYs  �� vpAg ����TIDATXå�y�W��?���[�u�Pk��K�4�օ��AVqXZ6Q���Z�*��-BEaA�"��*�� mSMm�Xm�E�����03�w��?���Y=�ͽ����~��{ν�]T����f������*�p�1k��xd���}��n��x��M\��MT�x�g�����{��H�]g j: 8b���v�uޠ+�,��v�;fm��fm�#��G�;�x�ƈ�i!,i��t�ڳ\��>�1!�+��ܐ�M`{� �US7WBP�yM��w�Zu� ���x��������qk�8���5�\0��IS���žZJ7������&j��������Vwv��;b��2f[���;Pۢ�ϝQY�9j��X9�bǔO�R`v� 4 | p�=�7�^�y���O=�BsZ�M�c���Eg���|��P��k+�}�~�;V�e(@D ���̮Zq �cvՊ^��"�\F���Ӏor�vS�5I.�i����rͤ��O��r���;ܿ2��-���[� �4\���Y��������]k��AZrh�P�h�h�>��C��;�=�~������e���W�VN�.�O�aA��i��1�]s��Y�N`:pЧ�Y�džo��j��>�]֧��1�1�p.���n���*��|p�"�B�r(eu�V�e~D N�U��'=�o*��C�[�ՎX���%�����oN�}�4@b7�rvh�5|TY��})�X��@$BN�ȭ y� ��ƚ�m�ޱ�{M��e��.x_,&�׎�d{����)}>��&��/z��-U1�bL�59���������U����և\�����Y���5��؈�9�w��������Qa̠�S����祇��ݪ�R� y��=������-o�pH>;�,Ag�� r�ܵ#�9f n���r�� �Z?-��Z5���'� �3�0q��ò�RcI��Y��(|�X�'����,�o�w�[����O 2 | 3 | 4 | Aurelia 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES6", 4 | "module": "amd", 5 | "experimentalDecorators": true 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "aurelia-script", 3 | "version": "1.5.2", 4 | "description": "Aurelia's concatenated script-tag-ready build.", 5 | "keywords": [ 6 | "aurelia" 7 | ], 8 | "main": "dist/aurelia_router.umd.js", 9 | "browser": "dist/aurelia_router.umd.js", 10 | "module": "dist/aurelia_router.esm.js", 11 | "unpkg": "dist/aurelia_router.umd.min.js", 12 | "jsdelivr": "dist/aurelia_router.umd.min.js", 13 | "homepage": "http://aurelia.io", 14 | "bugs": { 15 | "url": "https://github.com/aurelia/aurelia/issues" 16 | }, 17 | "repository": { 18 | "type": "git", 19 | "url": "http://github.com/aurelia/aurelia" 20 | }, 21 | "license": "MIT", 22 | "author": "Rob Eisenberg (http://robeisenberg.com/)", 23 | "scripts": { 24 | "build": "rollup -c ./build/rollup.config.js --environment ROUTER:false", 25 | "build:full": "rollup -c ./build/rollup.config.js", 26 | "minify:umd": "terser ./dist/aurelia.umd.js -o ./dist/aurelia.umd.min.js --config-file ./build/terser.config.json", 27 | "minify:esm": "terser ./dist/aurelia.esm.js -o ./dist/aurelia.esm.min.js --config-file ./build/terser.config.json", 28 | "minify:router:umd": "terser ./dist/aurelia_router.umd.js -o ./dist/aurelia_router.umd.min.js --config-file ./build/terser.config.json", 29 | "minify:router:esm": "terser ./dist/aurelia_router.esm.js -o ./dist/aurelia_router.esm.min.js --config-file ./build/terser.config.json", 30 | "minify:no-loader:es5:umd": "terser ./dist/aurelia_no_loader.es5.umd.js -o ./dist/aurelia_no_loader.es5.umd.min.js --config-file ./build/terser.es5.config.json", 31 | "minify:router:no-loader:es5:umd": "terser ./dist/aurelia_router_no_loader.es5.umd.js -o ./dist/aurelia_router_no_loader.es5.umd.min.js --config-file ./build/terser.es5.config.json", 32 | "bundle": "npm run build:full", 33 | "postbundle": "npm run minify", 34 | "minify": "npm run minify:esm && npm run minify:umd && npm run minify:router:umd && npm run minify:router:esm && npm run minify:no-loader:es5:umd && npm run minify:router:no-loader:es5:umd" 35 | }, 36 | "devDependencies": { 37 | "@babel/core": "^7.4.5", 38 | "@babel/preset-env": "^7.4.5", 39 | "aurelia-binding": "^2.2.0", 40 | "aurelia-bootstrapper": "^2.1.1", 41 | "aurelia-dependency-injection": "^1.4.2", 42 | "aurelia-event-aggregator": "^1.0.2", 43 | "aurelia-framework": "^1.3.1", 44 | "aurelia-history": "^1.2.1", 45 | "aurelia-history-browser": "^1.4.0", 46 | "aurelia-loader": "^1.0.2", 47 | "aurelia-loader-esm": "git+https://github.com/aurelia/loader-esm.git", 48 | "aurelia-logging": "^1.5.1", 49 | "aurelia-logging-console": "^1.1.0", 50 | "aurelia-metadata": "^1.0.5", 51 | "aurelia-pal": "^1.8.1", 52 | "aurelia-pal-browser": "^1.8.1", 53 | "aurelia-path": "^1.1.3", 54 | "aurelia-polyfills": "^1.3.4", 55 | "aurelia-route-recognizer": "^1.3.2", 56 | "aurelia-router": "^1.7.1", 57 | "aurelia-task-queue": "^1.3.2", 58 | "aurelia-templating": "^1.10.1", 59 | "aurelia-templating-binding": "^1.5.3", 60 | "aurelia-templating-resources": "^1.7.2", 61 | "aurelia-templating-router": "^1.4.0", 62 | "rollup": "^1.16.2", 63 | "rollup-plugin-babel": "^4.3.3", 64 | "rollup-plugin-commonjs": "^10.0.1", 65 | "rollup-plugin-node-resolve": "^5.1.0", 66 | "rollup-plugin-replace": "^2.2.0", 67 | "terser": "^3.10.0" 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /scripts/aurelia-routing.min.js: -------------------------------------------------------------------------------- 1 | window.System&&"function"==typeof System.amdDefine&&(window.define=System.amdDefine),define("aurelia-templating-router/router-view",["exports","aurelia-dependency-injection","aurelia-binding","aurelia-templating","aurelia-router","aurelia-metadata","aurelia-pal"],function(t,e,r,i,n,o,a){"use strict";function s(t,e,r,i){r&&Object.defineProperty(t,e,{enumerable:r.enumerable,configurable:r.configurable,writable:r.writable,value:r.initializer?r.initializer.call(i):void 0})}function u(t,e,r,i,n){var o={};return Object.keys(i).forEach(function(t){o[t]=i[t]}),o.enumerable=!!o.enumerable,o.configurable=!!o.configurable,("value"in o||o.initializer)&&(o.writable=!0),o=r.slice().reverse().reduce(function(r,i){return i(t,e,r)||r},o),n&&void 0!==o.initializer&&(o.value=o.initializer?o.initializer.call(n):void 0,o.initializer=void 0),void 0===o.initializer&&(Object.defineProperty(t,e,o),o=null),o}Object.defineProperty(t,"__esModule",{value:!0}),t.RouterViewLocator=t.RouterView=void 0;var c,l,h,p,f,v,d,g=(t.RouterView=(c=(0,i.customElement)("router-view"))(l=(0,i.noView)((h=function(){function t(t,e,r,i,n,o,a){s(this,"swapOrder",p,this),s(this,"layoutView",f,this),s(this,"layoutViewModel",v,this),s(this,"layoutModel",d,this),this.element=t,this.container=e,this.viewSlot=r,this.router=i,this.viewLocator=n,this.compositionTransaction=o,this.compositionEngine=a,this.router.registerViewPort(this,this.element.getAttribute("name")),"initialComposition"in o||(o.initialComposition=!0,this.compositionTransactionNotifier=o.enlist())}return t.inject=function(){return[a.DOM.Element,e.Container,i.ViewSlot,n.Router,i.ViewLocator,i.CompositionTransaction,i.CompositionEngine]},t.prototype.created=function(t){this.owningView=t},t.prototype.bind=function(t,e){this.container.viewModel=t,this.overrideContext=e},t.prototype.process=function(t,e){var r=this,n=t.component,a=n.childContainer,s=n.viewModel,u=n.viewModelResource,c=u.metadata,l=n.router.currentInstruction.config,h=l.viewPorts?l.viewPorts[t.name]||{}:{};a.get(g)._notify(this);var p={viewModel:h.layoutViewModel||l.layoutViewModel||this.layoutViewModel,view:h.layoutView||l.layoutView||this.layoutView,model:h.layoutModel||l.layoutModel||this.layoutModel,router:t.component.router,childContainer:a,viewSlot:this.viewSlot},f=this.viewLocator.getViewStrategy(n.view||s);return f&&n.view&&f.makeRelativeTo(o.Origin.get(n.router.container.viewModel.constructor).moduleId),c.load(a,u.value,null,f,!0).then(function(n){if(r.compositionTransactionNotifier||(r.compositionTransactionOwnershipToken=r.compositionTransaction.tryCapture()),(p.viewModel||p.view)&&(t.layoutInstruction=p),t.controller=c.create(a,i.BehaviorInstruction.dynamic(r.element,s,n)),e)return null;r.swap(t)})},t.prototype.swap=function(t){var e=this,n=t.layoutInstruction,o=this.view,a=function(){var t=i.SwapStrategies[e.swapOrder]||i.SwapStrategies.after,r=e.viewSlot;t(r,o,function(){return Promise.resolve(r.add(e.view))}).then(function(){e._notify()})},s=function(r){return t.controller.automate(e.overrideContext,r),e.compositionTransactionOwnershipToken?e.compositionTransactionOwnershipToken.waitForCompositionComplete().then(function(){return e.compositionTransactionOwnershipToken=null,a()}):a()};return n?(n.viewModel||(n.viewModel={}),this.compositionEngine.createController(n).then(function(o){return i.ShadowDOM.distributeView(t.controller.view,o.slots||o.view.slots),o.automate((0,r.createOverrideContext)(n.viewModel),e.owningView),o.view.children.push(t.controller.view),o.view||o}).then(function(t){return e.view=t,s(t)})):(this.view=t.controller.view,s(this.owningView))},t.prototype._notify=function(){this.compositionTransactionNotifier&&(this.compositionTransactionNotifier.done(),this.compositionTransactionNotifier=null)},t}(),p=u(h.prototype,"swapOrder",[i.bindable],{enumerable:!0,initializer:null}),f=u(h.prototype,"layoutView",[i.bindable],{enumerable:!0,initializer:null}),v=u(h.prototype,"layoutViewModel",[i.bindable],{enumerable:!0,initializer:null}),d=u(h.prototype,"layoutModel",[i.bindable],{enumerable:!0,initializer:null}),l=h))||l)||l,t.RouterViewLocator=function(){function t(){var t=this;this.promise=new Promise(function(e){return t.resolve=e})}return t.prototype.findNearest=function(){return this.promise},t.prototype._notify=function(t){this.resolve(t)},t}())}),define("aurelia-templating-router/route-loader",["exports","aurelia-dependency-injection","aurelia-templating","aurelia-router","aurelia-path","aurelia-metadata","./router-view"],function(t,e,r,i,n,o,a){"use strict";function s(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function c(t){var e,i,n,o=/([^\/^\?]+)\.html/i.exec(t)[1];return e=(0,r.customElement)(o),i=(0,r.useView)(t),e(n=i(n=function(){function t(){}return t.prototype.bind=function(t){this.$parent=t},t}())||n)||n}Object.defineProperty(t,"__esModule",{value:!0}),t.TemplatingRouteLoader=void 0;var l,h,p,f,v=(l=(0,r.inlineView)(""))(h=function(){})||h;t.TemplatingRouteLoader=(p=(0,e.inject)(r.CompositionEngine))(f=function(t){function e(e){var r=s(this,t.call(this));return r.compositionEngine=e,r}return u(e,t),e.prototype.loadRoute=function(t,e){var r=t.container.createChild(),s=void 0;s=null===e.moduleId?v:/\.html/i.test(e.moduleId)?c(e.moduleId):(0,n.relativeToFile)(e.moduleId,o.Origin.get(t.container.viewModel.constructor).moduleId);var u={viewModel:s,childContainer:r,view:e.view||e.viewStrategy,router:t};return r.registerSingleton(a.RouterViewLocator),r.getChildRouter=function(){var e=void 0;return r.registerHandler(i.Router,function(i){return e||(e=t.createChild(r))}),r.get(i.Router)},this.compositionEngine.ensureViewModel(u)},e}(i.RouteLoader))||f}),define("aurelia-templating-router/route-href",["exports","aurelia-templating","aurelia-router","aurelia-pal","aurelia-logging"],function(t,e,r,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouteHref=void 0;var o,a,s,u,c,l=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(n),h=l.getLogger("route-href");t.RouteHref=(o=(0,e.customAttribute)("route-href"),a=(0,e.bindable)({name:"route",changeHandler:"processChange",primaryProperty:!0}),s=(0,e.bindable)({name:"params",changeHandler:"processChange"}),u=(0,e.bindable)({name:"attribute",defaultValue:"href"}),o(c=a(c=s(c=u(c=function(){function t(t,e){this.router=t,this.element=e}return t.inject=function(){return[r.Router,i.DOM.Element]},t.prototype.bind=function(){this.isActive=!0,this.processChange()},t.prototype.unbind=function(){this.isActive=!1},t.prototype.attributeChanged=function(t,e){e&&this.element.removeAttribute(e),this.processChange()},t.prototype.processChange=function(){var t=this;return this.router.ensureConfigured().then(function(){if(!t.isActive)return null;var e=t.router.generate(t.route,t.params);return t.element.au.controller?t.element.au.controller.viewModel[t.attribute]=e:t.element.setAttribute(t.attribute,e),null}).catch(function(t){h.error(t)})},t}())||c)||c)||c)||c)}),define("aurelia-templating-router/aurelia-templating-router",["exports","aurelia-router","./route-loader","./router-view","./route-href"],function(t,e,r,i,n){"use strict";function o(t){t.singleton(e.RouteLoader,r.TemplatingRouteLoader).singleton(e.Router,e.AppRouter).globalResources(i.RouterView,n.RouteHref),t.container.registerAlias(e.Router,e.AppRouter)}Object.defineProperty(t,"__esModule",{value:!0}),t.configure=t.RouteHref=t.RouterView=t.TemplatingRouteLoader=void 0,t.TemplatingRouteLoader=r.TemplatingRouteLoader,t.RouterView=i.RouterView,t.RouteHref=n.RouteHref,t.configure=o}),define("aurelia-templating-router",["aurelia-templating-router/aurelia-templating-router"],function(t){return t}),define("aurelia-router",["exports","aurelia-logging","aurelia-route-recognizer","aurelia-dependency-injection","aurelia-history","aurelia-event-aggregator"],function(t,e,r,i,n,o){"use strict";function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e||"#"===t[0]||(t="#"+t),e&&r&&(t=t.substring(1,t.length)),t}function c(t,e,r,i){if(V.test(t))return t;var n="";return e.length&&"/"!==e[0]&&(n+="/"),n+=e,n.length&&"/"===n[n.length-1]||"/"===t[0]||(n+="/"),n.length&&"/"===n[n.length-1]&&"/"===t[0]&&(n=n.substring(0,n.length-1)),u(n+t,r,i)}function l(t,e,r){return L.test(t)?u(t,r):c(t,e,r)}function h(t){var e=[];if(Array.isArray(t.route))for(var r=0,i=t.route.length;r2&&void 0!==arguments[2]?arguments[2]:[];for(var i in t){var n=t[i],o=n.prevComponent;if((n.strategy===W.invokeLifecycle||n.strategy===W.replace)&&o){var a=o.viewModel;e in a&&r.push(a)}n.strategy===W.replace&&o?R(o,e,r):n.childNavigationInstruction&&P(n.childNavigationInstruction.plan,e,r)}return r}function R(t,e,r){var i=t.childRouter;if(i&&i.currentInstruction){var n=i.currentInstruction.viewPortInstructions;for(var o in n){var a=n[o],s=a.component,u=s.viewModel;e in u&&r.push(u),R(s,e,r)}}}function S(t,e,r,i){function n(t,e){return i||I(t,e)?o():r.cancel(t)}function o(){if(++u2&&void 0!==arguments[2]?arguments[2]:[],i=arguments[3],n=t.plan;return Object.keys(n).filter(function(o){var a=n[o],s=t.viewPortInstructions[o],u=s.component.viewModel;(a.strategy===W.invokeLifecycle||a.strategy===W.replace)&&e in u&&r.push({viewModel:u,lifecycleArgs:s.lifecycleArgs,router:i}),a.childNavigationInstruction&&_(a.childNavigationInstruction,e,r,s.component.childRouter||i)}),r}function I(t,e){return!(t instanceof Error)&&(f(t)?("function"==typeof t.setRouter&&t.setRouter(e),!!t.shouldContinueProcessing):void 0===t||t)}function C(t,e,r){if(t&&"function"==typeof t.then)return Promise.resolve(t).then(e).catch(r);if(t&&"function"==typeof t.subscribe){var i=t;return new Z(function(n){return i.subscribe({next:function(){n.subscribed&&(n.unsubscribe(),e(t))},error:function(t){n.subscribed&&(n.unsubscribe(),r(t))},complete:function(){n.subscribed&&(n.unsubscribe(),e(t))}})})}try{return e(t)}catch(t){return r(t)}}function A(t,e){var r=N(e),i=r.map(function(e){return O(t,e.navigationInstruction,e.viewPortPlan)});return Promise.all(i)}function N(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=t.plan;for(var i in r){var n=r[i];if(n.strategy===W.replace)e.push({viewPortPlan:n,navigationInstruction:t}),n.childNavigationInstruction&&N(n.childNavigationInstruction,e);else{var o=t.addViewPortInstruction(i,n.strategy,n.prevModuleId,n.prevComponent);n.childNavigationInstruction&&(o.childNavigationInstruction=n.childNavigationInstruction,N(n.childNavigationInstruction,e))}}return e}function O(t,e,r){var i=r.config?r.config.moduleId:null;return M(t,e,r.config).then(function(n){var o=e.addViewPortInstruction(r.name,r.strategy,i,n),a=n.childRouter;if(a){var s=e.getWildcardPath();return a._createNavigationInstruction(s,e).then(function(e){return r.childNavigationInstruction=e,d(e).then(function(r){return r instanceof q?Promise.reject(r):(e.plan=r,o.childNavigationInstruction=e,A(t,e))})})}})}function M(t,e,r){var i=e.router,n=e.lifecycleArgs;return t.loadRoute(i,r,e).then(function(t){var e=t.viewModel,o=t.childContainer;if(t.router=i,t.config=r,"configureRouter"in e){var a=o.getChildRouter();return t.childRouter=a,a.configure(function(t){return e.configureRouter.apply(e,[t,a].concat(n))}).then(function(){return t})}return t})}function k(t,e,r,i){e&&"completed"in e&&"output"in e||(e=e||{},e.output=new Error("Expected router pipeline to return a navigation result, but got ["+JSON.stringify(e)+"] instead."));var n=null,o=null;return f(e.output)?o=e.output.navigate(i):(n=e,e.completed||(e.output instanceof Error&&nt.error(e.output),T(i))),Promise.resolve(o).then(function(t){return i._dequeueInstruction(r+1)}).then(function(t){return n||t||e})}function E(t,e,r,i){t.resolve(e);var n={instruction:t,result:e};if(r)i.events.publish("router:navigation:child:complete",n);else{i.isNavigating=!1,i.isExplicitNavigation=!1,i.isExplicitNavigationBack=!1,i.isNavigatingFirst=!1,i.isNavigatingNew=!1,i.isNavigatingRefresh=!1,i.isNavigatingForward=!1,i.isNavigatingBack=!1,i.couldDeactivate=!1;var o=void 0;if(e.output instanceof Error)o="error";else if(e.completed){var a=t.queryString?"?"+t.queryString:"";i.history.previousLocation=t.fragment+a,o="success"}else o="canceled";i.events.publish("router:navigation:"+o,n),i.events.publish("router:navigation:complete",n)}return e}function T(t){t.history.previousLocation?t.navigate(t.history.previousLocation,{trigger:!1,replace:!0}):t.fallbackRoute?t.navigate(t.fallbackRoute,{trigger:!0,replace:!0}):nt.error("Router navigation failed, and no previous location or fallbackRoute could be restored.")}Object.defineProperty(t,"__esModule",{value:!0}),t.AppRouter=t.PipelineProvider=t.LoadRouteStep=t.RouteLoader=t.ActivateNextStep=t.DeactivatePreviousStep=t.CanActivateNextStep=t.CanDeactivatePreviousStep=t.Router=t.BuildNavigationPlanStep=t.activationStrategy=t.RouterConfiguration=t.Pipeline=t.pipelineStatus=t.RedirectToRoute=t.Redirect=t.NavModel=t.NavigationInstruction=t.CommitChangesStep=void 0,t._normalizeAbsolutePath=u,t._createRootedPath=c,t._resolveUrl=l,t._ensureArrayWithSingleRoutePerConfig=h,t.isNavigationCommand=f,t._buildNavigationPlan=d;var j=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e}(e),x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:" | ",e="",r=[];this.config.navModel.title&&(e=this.router.transformTitle(this.config.navModel.title));for(var i in this.viewPortInstructions){var n=this.viewPortInstructions[i];if(n.childNavigationInstruction){var o=n.childNavigationInstruction._buildTitle(t);o&&r.push(o)}}return r.length&&(e=r.join(t)+(e?t:"")+e),this.router.title&&(e+=(e?t:"")+this.router.transformTitle(this.router.title)),e},t}(),U=t.NavModel=function(){function t(t,e){this.isActive=!1,this.title=null,this.href=null,this.relativeHref=null,this.settings={},this.config=null,this.router=t,this.relativeHref=e}return t.prototype.setTitle=function(t){this.title=t,this.isActive&&this.router.updateTitle()},t}(),q=t.Redirect=function(){function t(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.url=t,this.options=Object.assign({trigger:!0,replace:!0},e),this.shouldContinueProcessing=!1}return t.prototype.setRouter=function(t){this.router=t},t.prototype.navigate=function(t){(this.options.useAppRouter?t:this.router||t).navigate(this.url,this.options)},t}(),F=(t.RedirectToRoute=function(){function t(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.route=t,this.params=e,this.options=Object.assign({trigger:!0,replace:!0},r),this.shouldContinueProcessing=!1}return t.prototype.setRouter=function(t){this.router=t},t.prototype.navigate=function(t){(this.options.useAppRouter?t:this.router||t).navigateToRoute(this.route,this.params,this.options)},t}(),t.pipelineStatus={completed:"completed",canceled:"canceled",rejected:"rejected",running:"running"}),B=t.Pipeline=function(){function t(){this.steps=[]}return t.prototype.addStep=function(t){var e=void 0;if("function"==typeof t)e=t;else{if("function"==typeof t.getSteps){for(var r=t.getSteps(),i=0,n=r.length;i2&&void 0!==arguments[2]?arguments[2]:{},i=this._recognizer.hasRoute(t);if((!this.isConfigured||!i)&&this.parent)return this.parent.generate(t,e,r);if(!i)throw new Error("A route with name '"+t+"' could not be found. Check that `name: '"+t+"'` was specified in the route's config.");var n=this._recognizer.generate(t,e),o=c(n,this.baseUrl,this.history._hasPushState,r.absolute);return r.absolute?""+this.history.getAbsoluteRoot()+o:o},t.prototype.createNavModel=function(t){var e=new U(this,"href"in t?t.href:t.route);return e.title=t.title,e.order=t.nav,e.href=t.href,e.settings=t.settings,e.config=t,e},t.prototype.addRoute=function(t,e){if(Array.isArray(t.route)){return void h(t).forEach(this.addRoute.bind(this))}m(t,this.routes),"viewPorts"in t||t.navigationStrategy||(t.viewPorts={default:{moduleId:t.moduleId,view:t.view}}),e||(e=this.createNavModel(t)),this.routes.push(t);var r=t.route;"/"===r.charAt(0)&&(r=r.substr(1));var i=!0===t.caseSensitive,n=this._recognizer.add({path:r,handler:t,caseSensitive:i});if(r){var o=t.settings;delete t.settings;var a=JSON.parse(JSON.stringify(t));t.settings=o,a.route=r+"/*childRoute",a.hasChildRouter=!0,this._childRecognizer.add({path:a.route,handler:a,caseSensitive:i}),a.navModel=e,a.settings=t.settings,a.navigationStrategy=t.navigationStrategy}if(t.navModel=e,(e.order||0===e.order)&&-1===this.navigation.indexOf(e)){if(!e.href&&""!==e.href&&(n.types.dynamics||n.types.stars))throw new Error('Invalid route config for "'+t.route+'" : dynamic routes must specify an "href:" to be included in the navigation model.');"number"!=typeof e.order&&(e.order=++this._fallbackOrder),this.navigation.push(e),this.navigation=this.navigation.sort(function(t,e){return t.order-e.order})}},t.prototype.hasRoute=function(t){return!!(this._recognizer.hasRoute(t)||this.parent&&this.parent.hasRoute(t))},t.prototype.hasOwnRoute=function(t){return this._recognizer.hasRoute(t)},t.prototype.handleUnknownRoutes=function(t){var e=this;if(!t)throw new Error("Invalid unknown route handler");this.catchAllHandler=function(r){return e._createRouteConfig(t,r).then(function(t){return r.config=t,r})}},t.prototype.updateTitle=function(){if(this.parent)return this.parent.updateTitle();this.currentInstruction&&this.currentInstruction._updateTitle()},t.prototype.refreshNavigation=function(){for(var t=this.navigation,e=0,r=t.length;e0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=t,i="",n=t.indexOf("?");-1!==n&&(r=t.substr(0,n),i=t.substr(n+1));var o=this._recognizer.recognize(t);o&&o.length||(o=this._childRecognizer.recognize(t));var a={fragment:r,queryString:i,config:null,parentInstruction:e,previousInstruction:this.currentInstruction,router:this,options:{compareQueryParams:this.options.compareQueryParams}},s=void 0;if(o&&o.length){var u=o[0],c=new D(Object.assign({},a,{params:u.params,queryParams:u.queryParams||o.queryParams,config:u.config||u.handler}));s="function"==typeof u.handler?w(c,u.handler,u):u.handler&&"function"==typeof u.handler.navigationStrategy?w(c,u.handler.navigationStrategy,u.handler):Promise.resolve(c)}else if(this.catchAllHandler){var l=new D(Object.assign({},a,{params:{path:r},queryParams:o?o.queryParams:{},config:null}));s=w(l,this.catchAllHandler)}else if(this.parent){var h=this._parentCatchAllHandler(this.parent);if(h){var p=this._findParentInstructionFromRouter(h,e),f=new D(Object.assign({},a,{params:{path:r},queryParams:o?o.queryParams:{},router:h,parentInstruction:p,parentCatchHandler:!0,config:null}));s=w(f,h.catchAllHandler)}}return s&&e&&(this.baseUrl=y(this.parent,e)),s||Promise.reject(new Error("Route not found: "+t))},t.prototype._findParentInstructionFromRouter=function(t,e){return e.router===t?(e.fragment=t.baseUrl,e):e.parentInstruction?this._findParentInstructionFromRouter(t,e.parentInstruction):void 0},t.prototype._parentCatchAllHandler=function(t){return t.catchAllHandler?t:!!t.parent&&this._parentCatchAllHandler(t.parent)},t.prototype._createRouteConfig=function(t,e){var r=this;return Promise.resolve(t).then(function(t){return"string"==typeof t?{moduleId:t 2 | }:"function"==typeof t?t(e):t}).then(function(t){return"string"==typeof t?{moduleId:t}:t}).then(function(t){return t.route=e.params.path,m(t,r.routes),t.navModel||(t.navModel=r.createNavModel(t)),t})},H(t,[{key:"isRoot",get:function(){return!this.parent}}]),t}(),J=t.CanDeactivatePreviousStep=function(){function t(){}return t.prototype.run=function(t,e){return b(t,"canDeactivate",e)},t}(),Y=t.CanActivateNextStep=function(){function t(){}return t.prototype.run=function(t,e){return S(t,"canActivate",e)},t}(),G=t.DeactivatePreviousStep=function(){function t(){}return t.prototype.run=function(t,e){return b(t,"deactivate",e,!0)},t}(),X=t.ActivateNextStep=function(){function t(){}return t.prototype.run=function(t,e){return S(t,"activate",e,!0)},t}(),Z=function(){function t(t){this._subscribed=!0,this._subscription=t(this),this._subscribed||this.unsubscribe()}return t.prototype.unsubscribe=function(){this._subscribed&&this._subscription&&this._subscription.unsubscribe(),this._subscribed=!1},H(t,[{key:"subscribed",get:function(){return this._subscribed}}]),t}(),tt=t.RouteLoader=function(){function t(){}return t.prototype.loadRoute=function(t,e,r){throw Error('Route loaders must implement "loadRoute(router, config, navigationInstruction)".')},t}(),et=t.LoadRouteStep=function(){function t(t){this.routeLoader=t}return t.inject=function(){return[tt]},t.prototype.run=function(t,e){return A(this.routeLoader,t).then(e).catch(e.cancel)},t}(),rt=function(){function t(t,e,r){this.steps=[],this.container=t,this.slotName=e,this.slotAlias=r}return t.prototype.getSteps=function(){var t=this;return this.steps.map(function(e){return t.container.get(e)})},t}(),it=t.PipelineProvider=function(){function t(t){this.container=t,this.steps=[Q,J,et,this._createPipelineSlot("authorize"),Y,this._createPipelineSlot("preActivate","modelbind"),G,X,this._createPipelineSlot("preRender","precommit"),z,this._createPipelineSlot("postRender","postcomplete")]}return t.inject=function(){return[i.Container]},t.prototype.createPipeline=function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=new B;return this.steps.forEach(function(i){(e||i!==J)&&r.addStep(t.container.get(i))}),r},t.prototype._findStep=function(t){return this.steps.find(function(e){return e.slotName===t||e.slotAlias===t})},t.prototype.addStep=function(t,e){var r=this._findStep(t);if(!r)throw new Error("Invalid pipeline slot name: "+t+".");r.steps.includes(e)||r.steps.push(e)},t.prototype.removeStep=function(t,e){var r=this._findStep(t);r&&r.steps.splice(r.steps.indexOf(e),1)},t.prototype._clearSteps=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=this._findStep(t);e&&(e.steps=[])},t.prototype.reset=function(){this._clearSteps("authorize"),this._clearSteps("preActivate"),this._clearSteps("preRender"),this._clearSteps("postRender")},t.prototype._createPipelineSlot=function(t,e){return new rt(this.container,t,e)},t}(),nt=j.getLogger("app-router");t.AppRouter=function(t){function e(e,r,i,n){var o=a(this,t.call(this,e,r));return o.pipelineProvider=i,o.events=n,o}return s(e,t),e.inject=function(){return[i.Container,n.History,it,o.EventAggregator]},e.prototype.reset=function(){t.prototype.reset.call(this),this.maxInstructionCount=10,this._queue?this._queue.length=0:this._queue=[]},e.prototype.loadUrl=function(t){var e=this;return this._createNavigationInstruction(t).then(function(t){return e._queueInstruction(t)}).catch(function(t){nt.error(t),T(e)})},e.prototype.registerViewPort=function(e,r){var i=this;if(t.prototype.registerViewPort.call(this,e,r),this.isActive)this._dequeueInstruction();else{var n=this._findViewModel(e);if("configureRouter"in n){if(!this.isConfigured){var o=this._resolveConfiguredPromise;return this._resolveConfiguredPromise=function(){},this.configure(function(t){return n.configureRouter(t,i)}).then(function(){i.activate(),o()})}}else this.activate()}return Promise.resolve()},e.prototype.activate=function(t){this.isActive||(this.isActive=!0,this.options=Object.assign({routeHandler:this.loadUrl.bind(this)},this.options,t),this.history.activate(this.options),this._dequeueInstruction())},e.prototype.deactivate=function(){this.isActive=!1,this.history.deactivate()},e.prototype._queueInstruction=function(t){var e=this;return new Promise(function(r){t.resolve=r,e._queue.unshift(t),e._dequeueInstruction()})},e.prototype._dequeueInstruction=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return Promise.resolve().then(function(){if(!t.isNavigating||e){var r=t._queue.shift();if(t._queue.length=0,r){t.isNavigating=!0;var i=t.history.getState("NavigationTracker");if(i||t.currentNavigationTracker?i?t.currentNavigationTracker?t.currentNavigationTrackeri&&(t.isNavigatingBack=!0):t.isNavigatingRefresh=!0:t.isNavigatingNew=!0:(t.isNavigatingFirst=!0,t.isNavigatingNew=!0),i||(i=Date.now(),t.history.setState("NavigationTracker",i)),t.currentNavigationTracker=i,r.previousInstruction=t.currentInstruction,e){if(e===t.maxInstructionCount-1)return nt.error(e+1+" navigation instructions have been attempted without success. Restoring last known good location."),T(t),t._dequeueInstruction(e+1);if(e>t.maxInstructionCount)throw new Error("Maximum navigation attempts exceeded. Giving up.")}else t.events.publish("router:navigation:processing",{instruction:r});return t.pipelineProvider.createPipeline(!t.couldDeactivate).run(r).then(function(i){return k(r,i,e,t)}).catch(function(t){return{output:t instanceof Error?t:new Error(t)}}).then(function(i){return E(r,i,!!e,t)})}}})},e.prototype._findViewModel=function(t){if(this.container.viewModel)return this.container.viewModel;if(t.container)for(var e=t.container;e;){if(e.viewModel)return this.container.viewModel=e.viewModel,e.viewModel;e=e.parent}},e}(K)}),define("aurelia-route-recognizer",["exports","aurelia-path"],function(t,e){"use strict";function r(t,e,r,i){var n=t;"/"===t.charAt(0)&&(n=t.substr(1));for(var o=[],a=n.split("/"),s=0,u=a.length;s=e.length)break;n=e[i++]}else{if(i=e.next(),i.done)break;n=i.value}var o=n;if(o.charSpec.validChars===t.validChars&&o.charSpec.invalidChars===t.invalidChars)return o}},t.prototype.put=function(e){var r=this.get(e);return r||(r=new t(e),this.nextStates.push(r),e.repeat&&r.nextStates.push(r),r)},t.prototype.match=function(t){for(var e=this.nextStates,r=[],i=0,n=e.length;i1&&"/"===u.charAt(h-1)&&(u=u.substr(0,h-1),s=!0);for(var p=0,f=u.length;p1&&void 0!==arguments[1]?arguments[1]:{},i=r.trigger,n=void 0===i||i,o=r.replace,s=void 0!==o&&o;if(t&&g.test(t))return this.location.href=t,!0;if(!this._isActive)return!1;if(t=this._getFragment(t||""),this.fragment===t&&!s)return!1;this.fragment=t;var u=this.root+t;return""===t&&"/"!==u&&(u=u.slice(0,-1)),this._hasPushState?(u=u.replace("//","/"),this.history[s?"replaceState":"pushState"]({},e.DOM.title,u)):this._wantsHashChange?a(this.location,t,s):this.location.assign(u),!n||this._loadUrl(t)},r.prototype.navigateBack=function(){this.history.back()},r.prototype.setTitle=function(t){e.DOM.title=t},r.prototype.setState=function(t,e){var r=Object.assign({},this.history.state),i=this.location,n=i.pathname,o=i.search,a=i.hash;r[t]=e,this.history.replaceState(r,null,""+n+o+a)},r.prototype.getState=function(t){return Object.assign({},this.history.state)[t]},r.prototype._getHash=function(){return this.location.hash.substr(1)},r.prototype._getFragment=function(t,e){var r=void 0;return t||(this._hasPushState||!this._wantsHashChange||e?(t=this.location.pathname+this.location.search,r=this.root.replace(d,""),t.indexOf(r)||(t=t.substr(r.length))):t=this._getHash()),"/"+t.replace(f,"")},r.prototype._checkUrl=function(){this._getFragment()!==this.fragment&&this._loadUrl()},r.prototype._loadUrl=function(t){var e=this.fragment=this._getFragment(t);return!!this.options.routeHandler&&this.options.routeHandler(e)},r}(r.History),u.inject=[l],c),f=/^#?\/*|\s+$/g,v=/^\/+|\/+$/g,d=/\/$/,g=/^([a-z][a-z0-9+\-.]*:)?\/\//i}); -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "plugin-babel.js", 3 | "map": { 4 | "systemjs-babel-build": { 5 | "node": "./systemjs-babel-node.js", 6 | "browser": "./systemjs-babel-browser.js", 7 | "default": "./systemjs-babel-browser.js" 8 | } 9 | }, 10 | "meta": { 11 | "./plugin-babel.js": { 12 | "format": "cjs" 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/.jspm-hash: -------------------------------------------------------------------------------- 1 | 471f91ee101883661c4ae1e11a35d654cd2b4cc499914b932bd37a50b983c5e7c90ae93bjspm-npm@0.29jspm@0.17 2 | 7c9520488fedff0e5022f75fcc235233 -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers.js: -------------------------------------------------------------------------------- 1 | (function (global) { 2 | var babelHelpers = global.babelHelpers = {}; 3 | babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { 4 | return typeof obj; 5 | } : function (obj) { 6 | return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; 7 | }; 8 | 9 | babelHelpers.jsx = function () { 10 | var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; 11 | return function createRawReactElement(type, props, key, children) { 12 | var defaultProps = type && type.defaultProps; 13 | var childrenLength = arguments.length - 3; 14 | 15 | if (!props && childrenLength !== 0) { 16 | props = {}; 17 | } 18 | 19 | if (props && defaultProps) { 20 | for (var propName in defaultProps) { 21 | if (props[propName] === void 0) { 22 | props[propName] = defaultProps[propName]; 23 | } 24 | } 25 | } else if (!props) { 26 | props = defaultProps || {}; 27 | } 28 | 29 | if (childrenLength === 1) { 30 | props.children = children; 31 | } else if (childrenLength > 1) { 32 | var childArray = Array(childrenLength); 33 | 34 | for (var i = 0; i < childrenLength; i++) { 35 | childArray[i] = arguments[i + 3]; 36 | } 37 | 38 | props.children = childArray; 39 | } 40 | 41 | return { 42 | $$typeof: REACT_ELEMENT_TYPE, 43 | type: type, 44 | key: key === undefined ? null : '' + key, 45 | ref: null, 46 | props: props, 47 | _owner: null 48 | }; 49 | }; 50 | }(); 51 | 52 | babelHelpers.asyncToGenerator = function (fn) { 53 | return function () { 54 | var gen = fn.apply(this, arguments); 55 | return new Promise(function (resolve, reject) { 56 | function step(key, arg) { 57 | try { 58 | var info = gen[key](arg); 59 | var value = info.value; 60 | } catch (error) { 61 | reject(error); 62 | return; 63 | } 64 | 65 | if (info.done) { 66 | resolve(value); 67 | } else { 68 | return Promise.resolve(value).then(function (value) { 69 | return step("next", value); 70 | }, function (err) { 71 | return step("throw", err); 72 | }); 73 | } 74 | } 75 | 76 | return step("next"); 77 | }); 78 | }; 79 | }; 80 | 81 | babelHelpers.classCallCheck = function (instance, Constructor) { 82 | if (!(instance instanceof Constructor)) { 83 | throw new TypeError("Cannot call a class as a function"); 84 | } 85 | }; 86 | 87 | babelHelpers.createClass = function () { 88 | function defineProperties(target, props) { 89 | for (var i = 0; i < props.length; i++) { 90 | var descriptor = props[i]; 91 | descriptor.enumerable = descriptor.enumerable || false; 92 | descriptor.configurable = true; 93 | if ("value" in descriptor) descriptor.writable = true; 94 | Object.defineProperty(target, descriptor.key, descriptor); 95 | } 96 | } 97 | 98 | return function (Constructor, protoProps, staticProps) { 99 | if (protoProps) defineProperties(Constructor.prototype, protoProps); 100 | if (staticProps) defineProperties(Constructor, staticProps); 101 | return Constructor; 102 | }; 103 | }(); 104 | 105 | babelHelpers.defineEnumerableProperties = function (obj, descs) { 106 | for (var key in descs) { 107 | var desc = descs[key]; 108 | desc.configurable = desc.enumerable = true; 109 | if ("value" in desc) desc.writable = true; 110 | Object.defineProperty(obj, key, desc); 111 | } 112 | 113 | return obj; 114 | }; 115 | 116 | babelHelpers.defaults = function (obj, defaults) { 117 | var keys = Object.getOwnPropertyNames(defaults); 118 | 119 | for (var i = 0; i < keys.length; i++) { 120 | var key = keys[i]; 121 | var value = Object.getOwnPropertyDescriptor(defaults, key); 122 | 123 | if (value && value.configurable && obj[key] === undefined) { 124 | Object.defineProperty(obj, key, value); 125 | } 126 | } 127 | 128 | return obj; 129 | }; 130 | 131 | babelHelpers.defineProperty = function (obj, key, value) { 132 | if (key in obj) { 133 | Object.defineProperty(obj, key, { 134 | value: value, 135 | enumerable: true, 136 | configurable: true, 137 | writable: true 138 | }); 139 | } else { 140 | obj[key] = value; 141 | } 142 | 143 | return obj; 144 | }; 145 | 146 | babelHelpers.extends = Object.assign || function (target) { 147 | for (var i = 1; i < arguments.length; i++) { 148 | var source = arguments[i]; 149 | 150 | for (var key in source) { 151 | if (Object.prototype.hasOwnProperty.call(source, key)) { 152 | target[key] = source[key]; 153 | } 154 | } 155 | } 156 | 157 | return target; 158 | }; 159 | 160 | babelHelpers.get = function get(object, property, receiver) { 161 | if (object === null) object = Function.prototype; 162 | var desc = Object.getOwnPropertyDescriptor(object, property); 163 | 164 | if (desc === undefined) { 165 | var parent = Object.getPrototypeOf(object); 166 | 167 | if (parent === null) { 168 | return undefined; 169 | } else { 170 | return get(parent, property, receiver); 171 | } 172 | } else if ("value" in desc) { 173 | return desc.value; 174 | } else { 175 | var getter = desc.get; 176 | 177 | if (getter === undefined) { 178 | return undefined; 179 | } 180 | 181 | return getter.call(receiver); 182 | } 183 | }; 184 | 185 | babelHelpers.inherits = function (subClass, superClass) { 186 | if (typeof superClass !== "function" && superClass !== null) { 187 | throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); 188 | } 189 | 190 | subClass.prototype = Object.create(superClass && superClass.prototype, { 191 | constructor: { 192 | value: subClass, 193 | enumerable: false, 194 | writable: true, 195 | configurable: true 196 | } 197 | }); 198 | if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; 199 | }; 200 | 201 | babelHelpers.instanceof = function (left, right) { 202 | if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { 203 | return right[Symbol.hasInstance](left); 204 | } else { 205 | return left instanceof right; 206 | } 207 | }; 208 | 209 | babelHelpers.interopRequireDefault = function (obj) { 210 | return obj && obj.__esModule ? obj : { 211 | default: obj 212 | }; 213 | }; 214 | 215 | babelHelpers.interopRequireWildcard = function (obj) { 216 | if (obj && obj.__esModule) { 217 | return obj; 218 | } else { 219 | var newObj = {}; 220 | 221 | if (obj != null) { 222 | for (var key in obj) { 223 | if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; 224 | } 225 | } 226 | 227 | newObj.default = obj; 228 | return newObj; 229 | } 230 | }; 231 | 232 | babelHelpers.newArrowCheck = function (innerThis, boundThis) { 233 | if (innerThis !== boundThis) { 234 | throw new TypeError("Cannot instantiate an arrow function"); 235 | } 236 | }; 237 | 238 | babelHelpers.objectDestructuringEmpty = function (obj) { 239 | if (obj == null) throw new TypeError("Cannot destructure undefined"); 240 | }; 241 | 242 | babelHelpers.objectWithoutProperties = function (obj, keys) { 243 | var target = {}; 244 | 245 | for (var i in obj) { 246 | if (keys.indexOf(i) >= 0) continue; 247 | if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; 248 | target[i] = obj[i]; 249 | } 250 | 251 | return target; 252 | }; 253 | 254 | babelHelpers.possibleConstructorReturn = function (self, call) { 255 | if (!self) { 256 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 257 | } 258 | 259 | return call && (typeof call === "object" || typeof call === "function") ? call : self; 260 | }; 261 | 262 | babelHelpers.selfGlobal = typeof global === "undefined" ? self : global; 263 | 264 | babelHelpers.set = function set(object, property, value, receiver) { 265 | var desc = Object.getOwnPropertyDescriptor(object, property); 266 | 267 | if (desc === undefined) { 268 | var parent = Object.getPrototypeOf(object); 269 | 270 | if (parent !== null) { 271 | set(parent, property, value, receiver); 272 | } 273 | } else if ("value" in desc && desc.writable) { 274 | desc.value = value; 275 | } else { 276 | var setter = desc.set; 277 | 278 | if (setter !== undefined) { 279 | setter.call(receiver, value); 280 | } 281 | } 282 | 283 | return value; 284 | }; 285 | 286 | babelHelpers.slicedToArray = function () { 287 | function sliceIterator(arr, i) { 288 | var _arr = []; 289 | var _n = true; 290 | var _d = false; 291 | var _e = undefined; 292 | 293 | try { 294 | for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { 295 | _arr.push(_s.value); 296 | 297 | if (i && _arr.length === i) break; 298 | } 299 | } catch (err) { 300 | _d = true; 301 | _e = err; 302 | } finally { 303 | try { 304 | if (!_n && _i["return"]) _i["return"](); 305 | } finally { 306 | if (_d) throw _e; 307 | } 308 | } 309 | 310 | return _arr; 311 | } 312 | 313 | return function (arr, i) { 314 | if (Array.isArray(arr)) { 315 | return arr; 316 | } else if (Symbol.iterator in Object(arr)) { 317 | return sliceIterator(arr, i); 318 | } else { 319 | throw new TypeError("Invalid attempt to destructure non-iterable instance"); 320 | } 321 | }; 322 | }(); 323 | 324 | babelHelpers.slicedToArrayLoose = function (arr, i) { 325 | if (Array.isArray(arr)) { 326 | return arr; 327 | } else if (Symbol.iterator in Object(arr)) { 328 | var _arr = []; 329 | 330 | for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { 331 | _arr.push(_step.value); 332 | 333 | if (i && _arr.length === i) break; 334 | } 335 | 336 | return _arr; 337 | } else { 338 | throw new TypeError("Invalid attempt to destructure non-iterable instance"); 339 | } 340 | }; 341 | 342 | babelHelpers.taggedTemplateLiteral = function (strings, raw) { 343 | return Object.freeze(Object.defineProperties(strings, { 344 | raw: { 345 | value: Object.freeze(raw) 346 | } 347 | })); 348 | }; 349 | 350 | babelHelpers.taggedTemplateLiteralLoose = function (strings, raw) { 351 | strings.raw = raw; 352 | return strings; 353 | }; 354 | 355 | babelHelpers.temporalRef = function (val, name, undef) { 356 | if (val === undef) { 357 | throw new ReferenceError(name + " is not defined - temporal dead zone"); 358 | } else { 359 | return val; 360 | } 361 | }; 362 | 363 | babelHelpers.temporalUndefined = {}; 364 | 365 | babelHelpers.toArray = function (arr) { 366 | return Array.isArray(arr) ? arr : Array.from(arr); 367 | }; 368 | 369 | babelHelpers.toConsumableArray = function (arr) { 370 | if (Array.isArray(arr)) { 371 | for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; 372 | 373 | return arr2; 374 | } else { 375 | return Array.from(arr); 376 | } 377 | }; 378 | })(typeof global === "undefined" ? self : global); 379 | -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/asyncToGenerator.js: -------------------------------------------------------------------------------- 1 | export default (function (fn) { 2 | return function () { 3 | var gen = fn.apply(this, arguments); 4 | return new Promise(function (resolve, reject) { 5 | function step(key, arg) { 6 | try { 7 | var info = gen[key](arg); 8 | var value = info.value; 9 | } catch (error) { 10 | reject(error); 11 | return; 12 | } 13 | 14 | if (info.done) { 15 | resolve(value); 16 | } else { 17 | return Promise.resolve(value).then(function (value) { 18 | return step("next", value); 19 | }, function (err) { 20 | return step("throw", err); 21 | }); 22 | } 23 | } 24 | 25 | return step("next"); 26 | }); 27 | }; 28 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/classCallCheck.js: -------------------------------------------------------------------------------- 1 | export default (function (instance, Constructor) { 2 | if (!(instance instanceof Constructor)) { 3 | throw new TypeError("Cannot call a class as a function"); 4 | } 5 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/createClass.js: -------------------------------------------------------------------------------- 1 | export default (function () { 2 | function defineProperties(target, props) { 3 | for (var i = 0; i < props.length; i++) { 4 | var descriptor = props[i]; 5 | descriptor.enumerable = descriptor.enumerable || false; 6 | descriptor.configurable = true; 7 | if ("value" in descriptor) descriptor.writable = true; 8 | Object.defineProperty(target, descriptor.key, descriptor); 9 | } 10 | } 11 | 12 | return function (Constructor, protoProps, staticProps) { 13 | if (protoProps) defineProperties(Constructor.prototype, protoProps); 14 | if (staticProps) defineProperties(Constructor, staticProps); 15 | return Constructor; 16 | }; 17 | })(); -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/defaults.js: -------------------------------------------------------------------------------- 1 | export default (function (obj, defaults) { 2 | var keys = Object.getOwnPropertyNames(defaults); 3 | 4 | for (var i = 0; i < keys.length; i++) { 5 | var key = keys[i]; 6 | var value = Object.getOwnPropertyDescriptor(defaults, key); 7 | 8 | if (value && value.configurable && obj[key] === undefined) { 9 | Object.defineProperty(obj, key, value); 10 | } 11 | } 12 | 13 | return obj; 14 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/defineEnumerableProperties.js: -------------------------------------------------------------------------------- 1 | export default (function (obj, descs) { 2 | for (var key in descs) { 3 | var desc = descs[key]; 4 | desc.configurable = desc.enumerable = true; 5 | if ("value" in desc) desc.writable = true; 6 | Object.defineProperty(obj, key, desc); 7 | } 8 | 9 | return obj; 10 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/defineProperty.js: -------------------------------------------------------------------------------- 1 | export default (function (obj, key, value) { 2 | if (key in obj) { 3 | Object.defineProperty(obj, key, { 4 | value: value, 5 | enumerable: true, 6 | configurable: true, 7 | writable: true 8 | }); 9 | } else { 10 | obj[key] = value; 11 | } 12 | 13 | return obj; 14 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/extends.js: -------------------------------------------------------------------------------- 1 | export default Object.assign || function (target) { 2 | for (var i = 1; i < arguments.length; i++) { 3 | var source = arguments[i]; 4 | 5 | for (var key in source) { 6 | if (Object.prototype.hasOwnProperty.call(source, key)) { 7 | target[key] = source[key]; 8 | } 9 | } 10 | } 11 | 12 | return target; 13 | }; -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/get.js: -------------------------------------------------------------------------------- 1 | export default (function get(object, property, receiver) { 2 | if (object === null) object = Function.prototype; 3 | var desc = Object.getOwnPropertyDescriptor(object, property); 4 | 5 | if (desc === undefined) { 6 | var parent = Object.getPrototypeOf(object); 7 | 8 | if (parent === null) { 9 | return undefined; 10 | } else { 11 | return get(parent, property, receiver); 12 | } 13 | } else if ("value" in desc) { 14 | return desc.value; 15 | } else { 16 | var getter = desc.get; 17 | 18 | if (getter === undefined) { 19 | return undefined; 20 | } 21 | 22 | return getter.call(receiver); 23 | } 24 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/inherits.js: -------------------------------------------------------------------------------- 1 | export default (function (subClass, superClass) { 2 | if (typeof superClass !== "function" && superClass !== null) { 3 | throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); 4 | } 5 | 6 | subClass.prototype = Object.create(superClass && superClass.prototype, { 7 | constructor: { 8 | value: subClass, 9 | enumerable: false, 10 | writable: true, 11 | configurable: true 12 | } 13 | }); 14 | if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; 15 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/instanceof.js: -------------------------------------------------------------------------------- 1 | export default (function (left, right) { 2 | if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { 3 | return right[Symbol.hasInstance](left); 4 | } else { 5 | return left instanceof right; 6 | } 7 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/interopRequireDefault.js: -------------------------------------------------------------------------------- 1 | export default (function (obj) { 2 | return obj && obj.__esModule ? obj : { 3 | default: obj 4 | }; 5 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/interopRequireWildcard.js: -------------------------------------------------------------------------------- 1 | export default (function (obj) { 2 | if (obj && obj.__esModule) { 3 | return obj; 4 | } else { 5 | var newObj = {}; 6 | 7 | if (obj != null) { 8 | for (var key in obj) { 9 | if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; 10 | } 11 | } 12 | 13 | newObj.default = obj; 14 | return newObj; 15 | } 16 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/jsx.js: -------------------------------------------------------------------------------- 1 | export default (function () { 2 | var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7; 3 | return function createRawReactElement(type, props, key, children) { 4 | var defaultProps = type && type.defaultProps; 5 | var childrenLength = arguments.length - 3; 6 | 7 | if (!props && childrenLength !== 0) { 8 | props = {}; 9 | } 10 | 11 | if (props && defaultProps) { 12 | for (var propName in defaultProps) { 13 | if (props[propName] === void 0) { 14 | props[propName] = defaultProps[propName]; 15 | } 16 | } 17 | } else if (!props) { 18 | props = defaultProps || {}; 19 | } 20 | 21 | if (childrenLength === 1) { 22 | props.children = children; 23 | } else if (childrenLength > 1) { 24 | var childArray = Array(childrenLength); 25 | 26 | for (var i = 0; i < childrenLength; i++) { 27 | childArray[i] = arguments[i + 3]; 28 | } 29 | 30 | props.children = childArray; 31 | } 32 | 33 | return { 34 | $$typeof: REACT_ELEMENT_TYPE, 35 | type: type, 36 | key: key === undefined ? null : '' + key, 37 | ref: null, 38 | props: props, 39 | _owner: null 40 | }; 41 | }; 42 | })(); -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/newArrowCheck.js: -------------------------------------------------------------------------------- 1 | export default (function (innerThis, boundThis) { 2 | if (innerThis !== boundThis) { 3 | throw new TypeError("Cannot instantiate an arrow function"); 4 | } 5 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/objectDestructuringEmpty.js: -------------------------------------------------------------------------------- 1 | export default (function (obj) { 2 | if (obj == null) throw new TypeError("Cannot destructure undefined"); 3 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/objectWithoutProperties.js: -------------------------------------------------------------------------------- 1 | export default (function (obj, keys) { 2 | var target = {}; 3 | 4 | for (var i in obj) { 5 | if (keys.indexOf(i) >= 0) continue; 6 | if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; 7 | target[i] = obj[i]; 8 | } 9 | 10 | return target; 11 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/possibleConstructorReturn.js: -------------------------------------------------------------------------------- 1 | export default (function (self, call) { 2 | if (!self) { 3 | throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); 4 | } 5 | 6 | return call && (typeof call === "object" || typeof call === "function") ? call : self; 7 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/selfGlobal.js: -------------------------------------------------------------------------------- 1 | export default typeof global === "undefined" ? self : global; -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/set.js: -------------------------------------------------------------------------------- 1 | export default (function set(object, property, value, receiver) { 2 | var desc = Object.getOwnPropertyDescriptor(object, property); 3 | 4 | if (desc === undefined) { 5 | var parent = Object.getPrototypeOf(object); 6 | 7 | if (parent !== null) { 8 | set(parent, property, value, receiver); 9 | } 10 | } else if ("value" in desc && desc.writable) { 11 | desc.value = value; 12 | } else { 13 | var setter = desc.set; 14 | 15 | if (setter !== undefined) { 16 | setter.call(receiver, value); 17 | } 18 | } 19 | 20 | return value; 21 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/slicedToArray.js: -------------------------------------------------------------------------------- 1 | export default (function () { 2 | function sliceIterator(arr, i) { 3 | var _arr = []; 4 | var _n = true; 5 | var _d = false; 6 | var _e = undefined; 7 | 8 | try { 9 | for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { 10 | _arr.push(_s.value); 11 | 12 | if (i && _arr.length === i) break; 13 | } 14 | } catch (err) { 15 | _d = true; 16 | _e = err; 17 | } finally { 18 | try { 19 | if (!_n && _i["return"]) _i["return"](); 20 | } finally { 21 | if (_d) throw _e; 22 | } 23 | } 24 | 25 | return _arr; 26 | } 27 | 28 | return function (arr, i) { 29 | if (Array.isArray(arr)) { 30 | return arr; 31 | } else if (Symbol.iterator in Object(arr)) { 32 | return sliceIterator(arr, i); 33 | } else { 34 | throw new TypeError("Invalid attempt to destructure non-iterable instance"); 35 | } 36 | }; 37 | })(); -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/slicedToArrayLoose.js: -------------------------------------------------------------------------------- 1 | export default (function (arr, i) { 2 | if (Array.isArray(arr)) { 3 | return arr; 4 | } else if (Symbol.iterator in Object(arr)) { 5 | var _arr = []; 6 | 7 | for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) { 8 | _arr.push(_step.value); 9 | 10 | if (i && _arr.length === i) break; 11 | } 12 | 13 | return _arr; 14 | } else { 15 | throw new TypeError("Invalid attempt to destructure non-iterable instance"); 16 | } 17 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/taggedTemplateLiteral.js: -------------------------------------------------------------------------------- 1 | export default (function (strings, raw) { 2 | return Object.freeze(Object.defineProperties(strings, { 3 | raw: { 4 | value: Object.freeze(raw) 5 | } 6 | })); 7 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/taggedTemplateLiteralLoose.js: -------------------------------------------------------------------------------- 1 | export default (function (strings, raw) { 2 | strings.raw = raw; 3 | return strings; 4 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/temporalRef.js: -------------------------------------------------------------------------------- 1 | export default (function (val, name, undef) { 2 | if (val === undef) { 3 | throw new ReferenceError(name + " is not defined - temporal dead zone"); 4 | } else { 5 | return val; 6 | } 7 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/temporalUndefined.js: -------------------------------------------------------------------------------- 1 | export default {}; -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/toArray.js: -------------------------------------------------------------------------------- 1 | export default (function (arr) { 2 | return Array.isArray(arr) ? arr : Array.from(arr); 3 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/toConsumableArray.js: -------------------------------------------------------------------------------- 1 | export default (function (arr) { 2 | if (Array.isArray(arr)) { 3 | for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; 4 | 5 | return arr2; 6 | } else { 7 | return Array.from(arr); 8 | } 9 | }) -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/babel-helpers/typeof.js: -------------------------------------------------------------------------------- 1 | export default typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { 2 | return typeof obj; 3 | } : function (obj) { 4 | return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; 5 | }; -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/plugin-babel.js: -------------------------------------------------------------------------------- 1 | var babel = require('systemjs-babel-build').babel; 2 | 3 | // the SystemJS babel build includes standard presets 4 | var es2015 = require('systemjs-babel-build').presetES2015; 5 | var es2015Register = require('systemjs-babel-build').presetES2015Register; 6 | var modulesRegister = require('systemjs-babel-build').modulesRegister; 7 | var stage3 = require('systemjs-babel-build').pluginsStage3; 8 | var stage2 = require('systemjs-babel-build').pluginsStage2; 9 | var stage1 = require('systemjs-babel-build').pluginsStage1; 10 | 11 | var externalHelpers = require('systemjs-babel-build').externalHelpers; 12 | var runtimeTransform = require('systemjs-babel-build').runtimeTransform; 13 | 14 | var babelRuntimePath; 15 | var modularHelpersPath = System.decanonicalize('./babel-helpers/', module.id); 16 | var externalHelpersPath = System.decanonicalize('./babel-helpers.js', module.id); 17 | var regeneratorRuntimePath = System.decanonicalize('./regenerator-runtime.js', module.id); 18 | 19 | if (modularHelpersPath.substr(modularHelpersPath.length - 3, 3) == '.js') 20 | modularHelpersPath = modularHelpersPath.substr(0, modularHelpersPath.length - 3); 21 | 22 | // in builds we want to embed canonical names to helpers 23 | if (System.getCanonicalName) { 24 | modularHelpersPath = System.getCanonicalName(modularHelpersPath); 25 | externalHelpersPath = System.getCanonicalName(externalHelpersPath); 26 | regeneratorRuntimePath = System.getCanonicalName(regeneratorRuntimePath); 27 | } 28 | 29 | // disable SystemJS runtime detection 30 | SystemJS._loader.loadedTranspilerRuntime = true; 31 | 32 | function prepend(a, b) { 33 | for (var p in b) 34 | if (!(p in a)) 35 | a[p] = b[p]; 36 | return a; 37 | } 38 | 39 | /* 40 | * babelOptions: 41 | * modularRuntime: true / false (whether to use babel-runtime or babel/external-helpers respectively) 42 | * sourceMaps: true / false (defaults to true) 43 | * es2015: true / false (defaults to true) 44 | * stage3: true / false (defaults to true) 45 | * stage2: true / false (defaults to true) 46 | * stage1: true / false (defaults to false) 47 | * plugins: array of custom plugins (objects or module name strings) 48 | * presets: array of custom presets (objects or module name strings) 49 | * compact: as in Babel 50 | * comments: as in Babel 51 | * 52 | * babelOptions can be set at SystemJS.babelOptions OR on the metadata object for a given module 53 | */ 54 | var defaultBabelOptions = { 55 | modularRuntime: true, 56 | sourceMaps: true, 57 | es2015: true, 58 | stage3: true, 59 | stage2: true, 60 | stage1: false, 61 | compact: 'auto', 62 | comments: true 63 | }; 64 | 65 | exports.translate = function(load, traceOpts) { 66 | // we don't transpile anything other than CommonJS or ESM 67 | if (load.metadata.format == 'global' || load.metadata.format == 'amd' || load.metadata.format == 'json') 68 | throw new TypeError('plugin-babel cannot transpile ' + load.metadata.format + ' modules. Ensure "' + load.name + '" is configured not to use this loader.'); 69 | 70 | var loader = this; 71 | var pluginLoader = loader.pluginLoader || loader; 72 | 73 | // we only output ES modules when running in the builder 74 | var outputESM = traceOpts ? traceOpts.outputESM : loader.builder; 75 | 76 | var babelOptions = {}; 77 | 78 | if (load.metadata.babelOptions) 79 | prepend(babelOptions, load.metadata.babelOptions); 80 | 81 | if (loader.babelOptions) 82 | prepend(babelOptions, loader.babelOptions); 83 | 84 | prepend(babelOptions, defaultBabelOptions); 85 | 86 | // determine any plugins or preset strings which need to be imported as modules 87 | var pluginAndPresetModuleLoads = []; 88 | 89 | if (babelOptions.presets) 90 | babelOptions.presets.forEach(function(preset) { 91 | if (typeof preset == 'string') 92 | pluginAndPresetModuleLoads.push(pluginLoader['import'](preset, module.id)); 93 | }); 94 | 95 | if (babelOptions.plugins) 96 | babelOptions.plugins.forEach(function(plugin) { 97 | plugin = typeof plugin == 'string' ? plugin : Array.isArray(plugin) && typeof plugin[0] == 'string' && plugin[0]; 98 | if (!plugin) 99 | return; 100 | pluginAndPresetModuleLoads.push( 101 | pluginLoader.normalize(plugin, module.id) 102 | .then(function(normalized) { 103 | return pluginLoader.load(normalized) 104 | .then(function() { 105 | return pluginLoader.get(normalized)['default']; 106 | }); 107 | }) 108 | ); 109 | }); 110 | 111 | return Promise.all(pluginAndPresetModuleLoads) 112 | .then(function(pluginAndPresetModules) { 113 | var curPluginOrPresetModule = 0; 114 | 115 | var presets = []; 116 | var plugins = []; 117 | 118 | if (babelOptions.modularRuntime) { 119 | if (load.metadata.format == 'cjs') 120 | throw new TypeError('plugin-babel does not support modular runtime for CJS module transpilations. Set babelOptions.modularRuntime: false if needed.'); 121 | presets.push(runtimeTransform); 122 | } 123 | else { 124 | if (load.metadata.format == 'cjs') 125 | load.source = 'var babelHelpers = require("' + externalHelpersPath + '");' + load.source; 126 | else 127 | load.source = 'import babelHelpers from "' + externalHelpersPath + '";' + load.source; 128 | presets.push(externalHelpers); 129 | } 130 | 131 | if (babelOptions.es2015) 132 | presets.push((outputESM || load.metadata.format == 'cjs') ? es2015 : es2015Register); 133 | else if (!(outputESM || load.metadata.format == 'cjs')) 134 | presets.push(modulesRegister); 135 | 136 | if (babelOptions.stage3) 137 | presets.push({ 138 | plugins: stage3 139 | }); 140 | 141 | if (babelOptions.stage2) 142 | presets.push({ 143 | plugins: stage2 144 | }); 145 | 146 | if (babelOptions.stage1) 147 | presets.push({ 148 | plugins: stage1 149 | }); 150 | 151 | if (babelOptions.presets) 152 | babelOptions.presets.forEach(function(preset) { 153 | if (typeof preset == 'string') 154 | presets.push(pluginAndPresetModules[curPluginOrPresetModule++]); 155 | else 156 | presets.push(preset); 157 | }); 158 | 159 | if (babelOptions.plugins) 160 | babelOptions.plugins.forEach(function(plugin) { 161 | if (typeof plugin == 'string') 162 | plugins.push(pluginAndPresetModules[curPluginOrPresetModule++]); 163 | else if (Array.isArray(plugin) && typeof plugin[0] == 'string') 164 | plugins.push([pluginAndPresetModules[curPluginOrPresetModule++], plugin[1]]); 165 | else 166 | plugins.push(plugin); 167 | }); 168 | 169 | var output = babel.transform(load.source, { 170 | babelrc: false, 171 | plugins: plugins, 172 | presets: presets, 173 | filename: load.address, 174 | moduleIds: false, 175 | sourceMaps: babelOptions.sourceMaps, 176 | inputSourceMap: load.metadata.sourceMap, 177 | compact: babelOptions.compact, 178 | comments: babelOptions.comments, 179 | code: true, 180 | ast: true, 181 | resolveModuleSource: function(m) { 182 | if (m.substr(0, 22) == 'babel-runtime/helpers/') { 183 | m = modularHelpersPath + m.substr(22) + '.js'; 184 | } 185 | else if (m == 'babel-runtime/regenerator') { 186 | m = regeneratorRuntimePath; 187 | } 188 | else if (m.substr(0, 14) == 'babel-runtime/') { 189 | if (!babelRuntimePath) { 190 | babelRuntimePath = System.decanonicalize('babel-runtime/', module.id); 191 | if (babelRuntimePath.substr(babelRuntimePath.length - 3, 3) == '.js') 192 | babelRuntimePath = babelRuntimePath.substr(0, babelRuntimePath.length - 3); 193 | if (loader.getCanonicalName) 194 | babelRuntimePath = loader.getCanonicalName(babelRuntimePath); 195 | if (babelRuntimePath == 'babel-runtime/') 196 | throw new Error('The babel-runtime module must be mapped to support modular helpers and builtins. If using jspm run jspm install npm:babel-runtime.'); 197 | } 198 | m = babelRuntimePath + m.substr(14) + '.js'; 199 | } 200 | return m; 201 | } 202 | }); 203 | 204 | // add babelHelpers as a dependency for non-modular runtime 205 | if (!babelOptions.modularRuntime) 206 | load.metadata.deps.push(externalHelpersPath); 207 | 208 | // set output module format 209 | // (in builder we output modules as esm) 210 | if (!load.metadata.format || load.metadata.format == 'detect' || load.metadata.format == 'esm') 211 | load.metadata.format = outputESM ? 'esm' : 'register'; 212 | 213 | load.metadata.sourceMap = output.map; 214 | 215 | return output.code; 216 | }); 217 | }; 218 | 219 | -------------------------------------------------------------------------------- /scripts/babel/systemjs-plugin-babel@0.0.12/regenerator-runtime.js: -------------------------------------------------------------------------------- 1 | export default (function(module) { 2 | /** 3 | * Copyright (c) 2014, Facebook, Inc. 4 | * All rights reserved. 5 | * 6 | * This source code is licensed under the BSD-style license found in the 7 | * https://raw.github.com/facebook/regenerator/master/LICENSE file. An 8 | * additional grant of patent rights can be found in the PATENTS file in 9 | * the same directory. 10 | */ 11 | 12 | !(function(global) { 13 | "use strict"; 14 | 15 | var hasOwn = Object.prototype.hasOwnProperty; 16 | var undefined; // More compressible than void 0. 17 | var $Symbol = typeof Symbol === "function" ? Symbol : {}; 18 | var iteratorSymbol = $Symbol.iterator || "@@iterator"; 19 | var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; 20 | 21 | var inModule = typeof module === "object"; 22 | var runtime = global.regeneratorRuntime; 23 | if (runtime) { 24 | if (inModule) { 25 | // If regeneratorRuntime is defined globally and we're in a module, 26 | // make the exports object identical to regeneratorRuntime. 27 | module.exports = runtime; 28 | } 29 | // Don't bother evaluating the rest of this file if the runtime was 30 | // already defined globally. 31 | return; 32 | } 33 | 34 | // Define the runtime globally (as expected by generated code) as either 35 | // module.exports (if we're in a module) or a new, empty object. 36 | runtime = global.regeneratorRuntime = inModule ? module.exports : {}; 37 | 38 | function wrap(innerFn, outerFn, self, tryLocsList) { 39 | // If outerFn provided, then outerFn.prototype instanceof Generator. 40 | var generator = Object.create((outerFn || Generator).prototype); 41 | var context = new Context(tryLocsList || []); 42 | 43 | // The ._invoke method unifies the implementations of the .next, 44 | // .throw, and .return methods. 45 | generator._invoke = makeInvokeMethod(innerFn, self, context); 46 | 47 | return generator; 48 | } 49 | runtime.wrap = wrap; 50 | 51 | // Try/catch helper to minimize deoptimizations. Returns a completion 52 | // record like context.tryEntries[i].completion. This interface could 53 | // have been (and was previously) designed to take a closure to be 54 | // invoked without arguments, but in all the cases we care about we 55 | // already have an existing method we want to call, so there's no need 56 | // to create a new function object. We can even get away with assuming 57 | // the method takes exactly one argument, since that happens to be true 58 | // in every case, so we don't have to touch the arguments object. The 59 | // only additional allocation required is the completion record, which 60 | // has a stable shape and so hopefully should be cheap to allocate. 61 | function tryCatch(fn, obj, arg) { 62 | try { 63 | return { type: "normal", arg: fn.call(obj, arg) }; 64 | } catch (err) { 65 | return { type: "throw", arg: err }; 66 | } 67 | } 68 | 69 | var GenStateSuspendedStart = "suspendedStart"; 70 | var GenStateSuspendedYield = "suspendedYield"; 71 | var GenStateExecuting = "executing"; 72 | var GenStateCompleted = "completed"; 73 | 74 | // Returning this object from the innerFn has the same effect as 75 | // breaking out of the dispatch switch statement. 76 | var ContinueSentinel = {}; 77 | 78 | // Dummy constructor functions that we use as the .constructor and 79 | // .constructor.prototype properties for functions that return Generator 80 | // objects. For full spec compliance, you may wish to configure your 81 | // minifier not to mangle the names of these two functions. 82 | function Generator() {} 83 | function GeneratorFunction() {} 84 | function GeneratorFunctionPrototype() {} 85 | 86 | var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype; 87 | GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; 88 | GeneratorFunctionPrototype.constructor = GeneratorFunction; 89 | GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; 90 | 91 | // Helper for defining the .next, .throw, and .return methods of the 92 | // Iterator interface in terms of a single ._invoke method. 93 | function defineIteratorMethods(prototype) { 94 | ["next", "throw", "return"].forEach(function(method) { 95 | prototype[method] = function(arg) { 96 | return this._invoke(method, arg); 97 | }; 98 | }); 99 | } 100 | 101 | runtime.isGeneratorFunction = function(genFun) { 102 | var ctor = typeof genFun === "function" && genFun.constructor; 103 | return ctor 104 | ? ctor === GeneratorFunction || 105 | // For the native GeneratorFunction constructor, the best we can 106 | // do is to check its .name property. 107 | (ctor.displayName || ctor.name) === "GeneratorFunction" 108 | : false; 109 | }; 110 | 111 | runtime.mark = function(genFun) { 112 | if (Object.setPrototypeOf) { 113 | Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); 114 | } else { 115 | genFun.__proto__ = GeneratorFunctionPrototype; 116 | if (!(toStringTagSymbol in genFun)) { 117 | genFun[toStringTagSymbol] = "GeneratorFunction"; 118 | } 119 | } 120 | genFun.prototype = Object.create(Gp); 121 | return genFun; 122 | }; 123 | 124 | // Within the body of any async function, `await x` is transformed to 125 | // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test 126 | // `value instanceof AwaitArgument` to determine if the yielded value is 127 | // meant to be awaited. Some may consider the name of this method too 128 | // cutesy, but they are curmudgeons. 129 | runtime.awrap = function(arg) { 130 | return new AwaitArgument(arg); 131 | }; 132 | 133 | function AwaitArgument(arg) { 134 | this.arg = arg; 135 | } 136 | 137 | function AsyncIterator(generator) { 138 | function invoke(method, arg, resolve, reject) { 139 | var record = tryCatch(generator[method], generator, arg); 140 | if (record.type === "throw") { 141 | reject(record.arg); 142 | } else { 143 | var result = record.arg; 144 | var value = result.value; 145 | if (value instanceof AwaitArgument) { 146 | return Promise.resolve(value.arg).then(function(value) { 147 | invoke("next", value, resolve, reject); 148 | }, function(err) { 149 | invoke("throw", err, resolve, reject); 150 | }); 151 | } 152 | 153 | return Promise.resolve(value).then(function(unwrapped) { 154 | // When a yielded Promise is resolved, its final value becomes 155 | // the .value of the Promise<{value,done}> result for the 156 | // current iteration. If the Promise is rejected, however, the 157 | // result for this iteration will be rejected with the same 158 | // reason. Note that rejections of yielded Promises are not 159 | // thrown back into the generator function, as is the case 160 | // when an awaited Promise is rejected. This difference in 161 | // behavior between yield and await is important, because it 162 | // allows the consumer to decide what to do with the yielded 163 | // rejection (swallow it and continue, manually .throw it back 164 | // into the generator, abandon iteration, whatever). With 165 | // await, by contrast, there is no opportunity to examine the 166 | // rejection reason outside the generator function, so the 167 | // only option is to throw it from the await expression, and 168 | // let the generator function handle the exception. 169 | result.value = unwrapped; 170 | resolve(result); 171 | }, reject); 172 | } 173 | } 174 | 175 | if (typeof process === "object" && process.domain) { 176 | invoke = process.domain.bind(invoke); 177 | } 178 | 179 | var previousPromise; 180 | 181 | function enqueue(method, arg) { 182 | function callInvokeWithMethodAndArg() { 183 | return new Promise(function(resolve, reject) { 184 | invoke(method, arg, resolve, reject); 185 | }); 186 | } 187 | 188 | return previousPromise = 189 | // If enqueue has been called before, then we want to wait until 190 | // all previous Promises have been resolved before calling invoke, 191 | // so that results are always delivered in the correct order. If 192 | // enqueue has not been called before, then it is important to 193 | // call invoke immediately, without waiting on a callback to fire, 194 | // so that the async generator function has the opportunity to do 195 | // any necessary setup in a predictable way. This predictability 196 | // is why the Promise constructor synchronously invokes its 197 | // executor callback, and why async functions synchronously 198 | // execute code before the first await. Since we implement simple 199 | // async functions in terms of async generators, it is especially 200 | // important to get this right, even though it requires care. 201 | previousPromise ? previousPromise.then( 202 | callInvokeWithMethodAndArg, 203 | // Avoid propagating failures to Promises returned by later 204 | // invocations of the iterator. 205 | callInvokeWithMethodAndArg 206 | ) : callInvokeWithMethodAndArg(); 207 | } 208 | 209 | // Define the unified helper method that is used to implement .next, 210 | // .throw, and .return (see defineIteratorMethods). 211 | this._invoke = enqueue; 212 | } 213 | 214 | defineIteratorMethods(AsyncIterator.prototype); 215 | 216 | // Note that simple async functions are implemented on top of 217 | // AsyncIterator objects; they just return a Promise for the value of 218 | // the final result produced by the iterator. 219 | runtime.async = function(innerFn, outerFn, self, tryLocsList) { 220 | var iter = new AsyncIterator( 221 | wrap(innerFn, outerFn, self, tryLocsList) 222 | ); 223 | 224 | return runtime.isGeneratorFunction(outerFn) 225 | ? iter // If outerFn is a generator, return the full iterator. 226 | : iter.next().then(function(result) { 227 | return result.done ? result.value : iter.next(); 228 | }); 229 | }; 230 | 231 | function makeInvokeMethod(innerFn, self, context) { 232 | var state = GenStateSuspendedStart; 233 | 234 | return function invoke(method, arg) { 235 | if (state === GenStateExecuting) { 236 | throw new Error("Generator is already running"); 237 | } 238 | 239 | if (state === GenStateCompleted) { 240 | if (method === "throw") { 241 | throw arg; 242 | } 243 | 244 | // Be forgiving, per 25.3.3.3.3 of the spec: 245 | // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume 246 | return doneResult(); 247 | } 248 | 249 | while (true) { 250 | var delegate = context.delegate; 251 | if (delegate) { 252 | if (method === "return" || 253 | (method === "throw" && delegate.iterator[method] === undefined)) { 254 | // A return or throw (when the delegate iterator has no throw 255 | // method) always terminates the yield* loop. 256 | context.delegate = null; 257 | 258 | // If the delegate iterator has a return method, give it a 259 | // chance to clean up. 260 | var returnMethod = delegate.iterator["return"]; 261 | if (returnMethod) { 262 | var record = tryCatch(returnMethod, delegate.iterator, arg); 263 | if (record.type === "throw") { 264 | // If the return method threw an exception, let that 265 | // exception prevail over the original return or throw. 266 | method = "throw"; 267 | arg = record.arg; 268 | continue; 269 | } 270 | } 271 | 272 | if (method === "return") { 273 | // Continue with the outer return, now that the delegate 274 | // iterator has been terminated. 275 | continue; 276 | } 277 | } 278 | 279 | var record = tryCatch( 280 | delegate.iterator[method], 281 | delegate.iterator, 282 | arg 283 | ); 284 | 285 | if (record.type === "throw") { 286 | context.delegate = null; 287 | 288 | // Like returning generator.throw(uncaught), but without the 289 | // overhead of an extra function call. 290 | method = "throw"; 291 | arg = record.arg; 292 | continue; 293 | } 294 | 295 | // Delegate generator ran and handled its own exceptions so 296 | // regardless of what the method was, we continue as if it is 297 | // "next" with an undefined arg. 298 | method = "next"; 299 | arg = undefined; 300 | 301 | var info = record.arg; 302 | if (info.done) { 303 | context[delegate.resultName] = info.value; 304 | context.next = delegate.nextLoc; 305 | } else { 306 | state = GenStateSuspendedYield; 307 | return info; 308 | } 309 | 310 | context.delegate = null; 311 | } 312 | 313 | if (method === "next") { 314 | // Setting context._sent for legacy support of Babel's 315 | // function.sent implementation. 316 | context.sent = context._sent = arg; 317 | 318 | } else if (method === "throw") { 319 | if (state === GenStateSuspendedStart) { 320 | state = GenStateCompleted; 321 | throw arg; 322 | } 323 | 324 | if (context.dispatchException(arg)) { 325 | // If the dispatched exception was caught by a catch block, 326 | // then let that catch block handle the exception normally. 327 | method = "next"; 328 | arg = undefined; 329 | } 330 | 331 | } else if (method === "return") { 332 | context.abrupt("return", arg); 333 | } 334 | 335 | state = GenStateExecuting; 336 | 337 | var record = tryCatch(innerFn, self, context); 338 | if (record.type === "normal") { 339 | // If an exception is thrown from innerFn, we leave state === 340 | // GenStateExecuting and loop back for another invocation. 341 | state = context.done 342 | ? GenStateCompleted 343 | : GenStateSuspendedYield; 344 | 345 | var info = { 346 | value: record.arg, 347 | done: context.done 348 | }; 349 | 350 | if (record.arg === ContinueSentinel) { 351 | if (context.delegate && method === "next") { 352 | // Deliberately forget the last sent value so that we don't 353 | // accidentally pass it on to the delegate. 354 | arg = undefined; 355 | } 356 | } else { 357 | return info; 358 | } 359 | 360 | } else if (record.type === "throw") { 361 | state = GenStateCompleted; 362 | // Dispatch the exception by looping back around to the 363 | // context.dispatchException(arg) call above. 364 | method = "throw"; 365 | arg = record.arg; 366 | } 367 | } 368 | }; 369 | } 370 | 371 | // Define Generator.prototype.{next,throw,return} in terms of the 372 | // unified ._invoke helper method. 373 | defineIteratorMethods(Gp); 374 | 375 | Gp[iteratorSymbol] = function() { 376 | return this; 377 | }; 378 | 379 | Gp[toStringTagSymbol] = "Generator"; 380 | 381 | Gp.toString = function() { 382 | return "[object Generator]"; 383 | }; 384 | 385 | function pushTryEntry(locs) { 386 | var entry = { tryLoc: locs[0] }; 387 | 388 | if (1 in locs) { 389 | entry.catchLoc = locs[1]; 390 | } 391 | 392 | if (2 in locs) { 393 | entry.finallyLoc = locs[2]; 394 | entry.afterLoc = locs[3]; 395 | } 396 | 397 | this.tryEntries.push(entry); 398 | } 399 | 400 | function resetTryEntry(entry) { 401 | var record = entry.completion || {}; 402 | record.type = "normal"; 403 | delete record.arg; 404 | entry.completion = record; 405 | } 406 | 407 | function Context(tryLocsList) { 408 | // The root entry object (effectively a try statement without a catch 409 | // or a finally block) gives us a place to store values thrown from 410 | // locations where there is no enclosing try statement. 411 | this.tryEntries = [{ tryLoc: "root" }]; 412 | tryLocsList.forEach(pushTryEntry, this); 413 | this.reset(true); 414 | } 415 | 416 | runtime.keys = function(object) { 417 | var keys = []; 418 | for (var key in object) { 419 | keys.push(key); 420 | } 421 | keys.reverse(); 422 | 423 | // Rather than returning an object with a next method, we keep 424 | // things simple and return the next function itself. 425 | return function next() { 426 | while (keys.length) { 427 | var key = keys.pop(); 428 | if (key in object) { 429 | next.value = key; 430 | next.done = false; 431 | return next; 432 | } 433 | } 434 | 435 | // To avoid creating an additional object, we just hang the .value 436 | // and .done properties off the next function object itself. This 437 | // also ensures that the minifier will not anonymize the function. 438 | next.done = true; 439 | return next; 440 | }; 441 | }; 442 | 443 | function values(iterable) { 444 | if (iterable) { 445 | var iteratorMethod = iterable[iteratorSymbol]; 446 | if (iteratorMethod) { 447 | return iteratorMethod.call(iterable); 448 | } 449 | 450 | if (typeof iterable.next === "function") { 451 | return iterable; 452 | } 453 | 454 | if (!isNaN(iterable.length)) { 455 | var i = -1, next = function next() { 456 | while (++i < iterable.length) { 457 | if (hasOwn.call(iterable, i)) { 458 | next.value = iterable[i]; 459 | next.done = false; 460 | return next; 461 | } 462 | } 463 | 464 | next.value = undefined; 465 | next.done = true; 466 | 467 | return next; 468 | }; 469 | 470 | return next.next = next; 471 | } 472 | } 473 | 474 | // Return an iterator with no values. 475 | return { next: doneResult }; 476 | } 477 | runtime.values = values; 478 | 479 | function doneResult() { 480 | return { value: undefined, done: true }; 481 | } 482 | 483 | Context.prototype = { 484 | constructor: Context, 485 | 486 | reset: function(skipTempReset) { 487 | this.prev = 0; 488 | this.next = 0; 489 | // Resetting context._sent for legacy support of Babel's 490 | // function.sent implementation. 491 | this.sent = this._sent = undefined; 492 | this.done = false; 493 | this.delegate = null; 494 | 495 | this.tryEntries.forEach(resetTryEntry); 496 | 497 | if (!skipTempReset) { 498 | for (var name in this) { 499 | // Not sure about the optimal order of these conditions: 500 | if (name.charAt(0) === "t" && 501 | hasOwn.call(this, name) && 502 | !isNaN(+name.slice(1))) { 503 | this[name] = undefined; 504 | } 505 | } 506 | } 507 | }, 508 | 509 | stop: function() { 510 | this.done = true; 511 | 512 | var rootEntry = this.tryEntries[0]; 513 | var rootRecord = rootEntry.completion; 514 | if (rootRecord.type === "throw") { 515 | throw rootRecord.arg; 516 | } 517 | 518 | return this.rval; 519 | }, 520 | 521 | dispatchException: function(exception) { 522 | if (this.done) { 523 | throw exception; 524 | } 525 | 526 | var context = this; 527 | function handle(loc, caught) { 528 | record.type = "throw"; 529 | record.arg = exception; 530 | context.next = loc; 531 | return !!caught; 532 | } 533 | 534 | for (var i = this.tryEntries.length - 1; i >= 0; --i) { 535 | var entry = this.tryEntries[i]; 536 | var record = entry.completion; 537 | 538 | if (entry.tryLoc === "root") { 539 | // Exception thrown outside of any try block that could handle 540 | // it, so set the completion value of the entire function to 541 | // throw the exception. 542 | return handle("end"); 543 | } 544 | 545 | if (entry.tryLoc <= this.prev) { 546 | var hasCatch = hasOwn.call(entry, "catchLoc"); 547 | var hasFinally = hasOwn.call(entry, "finallyLoc"); 548 | 549 | if (hasCatch && hasFinally) { 550 | if (this.prev < entry.catchLoc) { 551 | return handle(entry.catchLoc, true); 552 | } else if (this.prev < entry.finallyLoc) { 553 | return handle(entry.finallyLoc); 554 | } 555 | 556 | } else if (hasCatch) { 557 | if (this.prev < entry.catchLoc) { 558 | return handle(entry.catchLoc, true); 559 | } 560 | 561 | } else if (hasFinally) { 562 | if (this.prev < entry.finallyLoc) { 563 | return handle(entry.finallyLoc); 564 | } 565 | 566 | } else { 567 | throw new Error("try statement without catch or finally"); 568 | } 569 | } 570 | } 571 | }, 572 | 573 | abrupt: function(type, arg) { 574 | for (var i = this.tryEntries.length - 1; i >= 0; --i) { 575 | var entry = this.tryEntries[i]; 576 | if (entry.tryLoc <= this.prev && 577 | hasOwn.call(entry, "finallyLoc") && 578 | this.prev < entry.finallyLoc) { 579 | var finallyEntry = entry; 580 | break; 581 | } 582 | } 583 | 584 | if (finallyEntry && 585 | (type === "break" || 586 | type === "continue") && 587 | finallyEntry.tryLoc <= arg && 588 | arg <= finallyEntry.finallyLoc) { 589 | // Ignore the finally entry if control is not jumping to a 590 | // location outside the try/catch block. 591 | finallyEntry = null; 592 | } 593 | 594 | var record = finallyEntry ? finallyEntry.completion : {}; 595 | record.type = type; 596 | record.arg = arg; 597 | 598 | if (finallyEntry) { 599 | this.next = finallyEntry.finallyLoc; 600 | } else { 601 | this.complete(record); 602 | } 603 | 604 | return ContinueSentinel; 605 | }, 606 | 607 | complete: function(record, afterLoc) { 608 | if (record.type === "throw") { 609 | throw record.arg; 610 | } 611 | 612 | if (record.type === "break" || 613 | record.type === "continue") { 614 | this.next = record.arg; 615 | } else if (record.type === "return") { 616 | this.rval = record.arg; 617 | this.next = "end"; 618 | } else if (record.type === "normal" && afterLoc) { 619 | this.next = afterLoc; 620 | } 621 | }, 622 | 623 | finish: function(finallyLoc) { 624 | for (var i = this.tryEntries.length - 1; i >= 0; --i) { 625 | var entry = this.tryEntries[i]; 626 | if (entry.finallyLoc === finallyLoc) { 627 | this.complete(entry.completion, entry.afterLoc); 628 | resetTryEntry(entry); 629 | return ContinueSentinel; 630 | } 631 | } 632 | }, 633 | 634 | "catch": function(tryLoc) { 635 | for (var i = this.tryEntries.length - 1; i >= 0; --i) { 636 | var entry = this.tryEntries[i]; 637 | if (entry.tryLoc === tryLoc) { 638 | var record = entry.completion; 639 | if (record.type === "throw") { 640 | var thrown = record.arg; 641 | resetTryEntry(entry); 642 | } 643 | return thrown; 644 | } 645 | } 646 | 647 | // The context.catch method must only be called with a location 648 | // argument that corresponds to a known catch block. 649 | throw new Error("illegal catch attempt"); 650 | }, 651 | 652 | delegateYield: function(iterable, resultName, nextLoc) { 653 | this.delegate = { 654 | iterator: values(iterable), 655 | resultName: resultName, 656 | nextLoc: nextLoc 657 | }; 658 | 659 | return ContinueSentinel; 660 | } 661 | }; 662 | })( 663 | // Among the various tricks for obtaining a reference to the global 664 | // object, this seems to be the most reliable technique that does not 665 | // use indirect eval (which violates Content Security Policy). 666 | typeof global === "object" ? global : 667 | typeof window === "object" ? window : 668 | typeof self === "object" ? self : this 669 | ); 670 | return module.exports; })({exports:{}}); 671 | -------------------------------------------------------------------------------- /scripts/config-esnext.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | transpiler: "plugin-babel", 3 | devConfig: { 4 | "map": { 5 | "plugin-babel": "babel:systemjs-plugin-babel@0.0.12" 6 | } 7 | }, 8 | paths: { 9 | "babel:": "scripts/babel/" 10 | }, 11 | packageConfigPaths: [ 12 | "babel:@*/*.json", 13 | "babel:*.json" 14 | ], 15 | packages: { 16 | "src": { 17 | defaultJSExtensions: true, 18 | defaultExtension: "js" 19 | } 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /scripts/config-typescript.js: -------------------------------------------------------------------------------- 1 | System.config({ 2 | transpiler: 'typescript', 3 | typescriptOptions: { 4 | "emitDecoratorMetadata": true, 5 | "experimentalDecorators": true 6 | }, 7 | map: { 8 | typescript: 'https://cdnjs.cloudflare.com/ajax/libs/typescript/1.9.0/typescript.min.js' 9 | }, 10 | packages: { 11 | "src": { 12 | defaultJSExtensions: true, 13 | defaultExtension: "ts" 14 | } 15 | } 16 | }); -------------------------------------------------------------------------------- /scripts/system.js: -------------------------------------------------------------------------------- 1 | /* 2 | * SystemJS v0.19.31 3 | */ 4 | !function(){function e(){!function(e){function t(e,r){if("string"!=typeof e)throw new TypeError("URL must be a string");var n=String(e).replace(/^\s+|\s+$/g,"").match(/^([^:\/?#]+:)?(?:\/\/(?:([^:@\/?#]*)(?::([^:@\/?#]*))?@)?(([^:\/?#]*)(?::(\d*))?))?([^?#]*)(\?[^#]*)?(#[\s\S]*)?/);if(!n)throw new RangeError("Invalid URL format");var a=n[1]||"",o=n[2]||"",i=n[3]||"",s=n[4]||"",l=n[5]||"",u=n[6]||"",d=n[7]||"",c=n[8]||"",f=n[9]||"";if(void 0!==r){var m=r instanceof t?r:new t(r),p=!a&&!s&&!o;!p||d||c||(c=m.search),p&&"/"!==d[0]&&(d=d?(!m.host&&!m.username||m.pathname?"":"/")+m.pathname.slice(0,m.pathname.lastIndexOf("/")+1)+d:m.pathname);var h=[];d.replace(/^(\.\.?(\/|$))+/,"").replace(/\/(\.(\/|$))+/g,"/").replace(/\/\.\.$/,"/../").replace(/\/?[^\/]*/g,function(e){"/.."===e?h.pop():h.push(e)}),d=h.join("").replace(/^\//,"/"===d[0]?"/":""),p&&(u=m.port,l=m.hostname,s=m.host,i=m.password,o=m.username),a||(a=m.protocol)}"file:"==a&&(d=d.replace(/\\/g,"/")),this.origin=s?a+(""!==a||""!==s?"//":"")+s:"",this.href=a+(a&&s||"file:"==a?"//":"")+(""!==o?o+(""!==i?":"+i:"")+"@":"")+s+d+c+f,this.protocol=a,this.username=o,this.password=i,this.host=s,this.hostname=l,this.port=u,this.pathname=d,this.search=c,this.hash=f}e.URLPolyfill=t}("undefined"!=typeof self?self:global),function(e){function t(e,t){if(!e.originalErr)for(var r=(e.stack||e.message||e).toString().split("\n"),n=[],a=0;as.length?(o[s]&&"/"||"")+t.substr(s.length):"")}else{var d=s.split("*");if(d.length>2)throw new TypeError("Only one wildcard in a path is permitted");var f=d[0].length;f>=a&&t.substr(0,d[0].length)==d[0]&&t.substr(t.length-d[1].length)==d[1]&&(a=f,n=s,r=t.substr(d[0].length,t.length-d[1].length-d[0].length))}}var m=o[n];return"string"==typeof r&&(m=m.replace("*",r)),m}function m(e){for(var t=[],r=[],n=0,a=e.length;a>n;n++){var o=U.call(t,e[n]);-1===o?(t.push(e[n]),r.push([n])):r[o].push(n)}return{names:t,indices:r}}function p(t){var r={};if(("object"==typeof t||"function"==typeof t)&&t!==e)if(ee)for(var n in t)"default"!==n&&h(r,t,n);else g(r,t);return r["default"]=t,q(r,"__useDefault",{value:!0}),r}function h(e,t,r){try{var n;(n=Object.getOwnPropertyDescriptor(t,r))&&q(e,r,n)}catch(a){return e[r]=t[r],!1}}function g(e,t,r){var n=t&&t.hasOwnProperty;for(var a in t)(!n||t.hasOwnProperty(a))&&(r&&a in e||(e[a]=t[a]));return e}function v(e,t,r){var n=t&&t.hasOwnProperty;for(var a in t)if(!n||t.hasOwnProperty(a)){var o=t[a];a in e?o instanceof Array&&e[a]instanceof Array?e[a]=[].concat(r?o:e[a]).concat(r?e[a]:o):"object"==typeof o&&null!==o&&"object"==typeof e[a]?e[a]=g(g({},e[a]),o,r):r||(e[a]=o):e[a]=o}}function b(e,t,r,n,a){for(var o in t)if(-1!=U.call(["main","format","defaultExtension","basePath"],o))e[o]=t[o];else if("map"==o)g(e.map=e.map||{},t.map);else if("meta"==o)g(e.meta=e.meta||{},t.meta);else if("depCache"==o)for(var i in t.depCache){var s;s="./"==i.substr(0,2)?r+"/"+i.substr(2):P.call(n,i),n.depCache[s]=(n.depCache[s]||[]).concat(t.depCache[i])}else!a||-1!=U.call(["browserConfig","nodeConfig","devConfig","productionConfig"],o)||t.hasOwnProperty&&!t.hasOwnProperty(o)||w.call(n,'"'+o+'" is not a valid package configuration option in package '+r)}function y(e,t,r,n){var a;if(e.packages[t]){var o=e.packages[t];a=e.packages[t]={},b(a,n?r:o,t,e,n),b(a,n?o:r,t,e,!n)}else a=e.packages[t]=r;return"object"==typeof a.main&&(a.map=a.map||{},a.map["./@main"]=a.main,a.main["default"]=a.main["default"]||"./",a.main="@main"),a}function w(e){this.warnings&&"undefined"!=typeof console&&console.warn}function x(e,t){for(var r=e.split(".");r.length;)t=t[r.shift()];return t}function S(e,t){var r,n=0;for(var a in e)if(t.substr(0,a.length)==a&&(t.length==a.length||"/"==t[a.length])){var o=a.split("/").length;if(n>=o)continue;r=a,n=o}return r}function E(e){this._loader.baseURL!==this.baseURL&&("/"!=this.baseURL[this.baseURL.length-1]&&(this.baseURL+="/"),this._loader.baseURL=this.baseURL=new X(this.baseURL,Q).href)}function _(e,t){this.set("@system-env",re=this.newModule({browser:F,node:!!this._nodeRequire,production:!t&&e,dev:t||!e,build:t,"default":!0}))}function j(e){if(!d(e))throw new Error("Node module "+e+" can't be loaded as it is not a package require.");var t,r=this._nodeRequire("path");try{t=this._nodeRequire(r.resolve(process.cwd(),"node_modules",e))}catch(n){"MODULE_NOT_FOUND"==n.code&&(t=this._nodeRequire(e))}return t}function P(e,t){if(u(e))return c(e,t);if(l(e))return e;var r=S(this.map,e);if(r){if(e=this.map[r]+e.substr(r.length),u(e))return c(e);if(l(e))return e}if(this.has(e))return e;if("@node/"==e.substr(0,6)){if(!this._nodeRequire)throw new TypeError("Error loading "+e+". Can only load node core modules in Node.");return this.set(e,this.newModule(p(j.call(this,e.substr(6))))),e}return E.call(this),f(this,e)||this.baseURL+e}function O(e,t,r){re.browser&&t.browserConfig&&r(t.browserConfig),re.node&&t.nodeConfig&&r(t.nodeConfig),re.dev&&t.devConfig&&r(t.devConfig),re.build&&t.buildConfig&&r(t.buildConfig),re.production&&t.productionConfig&&r(t.productionConfig)}function k(e){var t=e.match(oe);return t&&"System.register"==e.substr(t[0].length,15)}function R(){return{name:null,deps:null,originalIndices:null,declare:null,execute:null,executingRequire:!1,declarative:!1,normalizedDeps:null,groupIndex:null,evaluated:!1,module:null,esModule:null,esmExports:!1}}function M(t){if("string"==typeof t)return x(t,e);if(!(t instanceof Array))throw new Error("Global exports must be a string or array.");for(var r={},n=!0,a=0;at;t++)if(this[t]===e)return t;return-1};!function(){try{Object.defineProperty({},"a",{})&&(q=Object.defineProperty)}catch(e){q=function(e,t,r){try{e[t]=r.value||r.get.call(e)}catch(n){}}}}();var J,N="_"==new Error(0,"_").fileName;if("undefined"!=typeof document&&document.getElementsByTagName){if(J=document.baseURI,!J){var $=document.getElementsByTagName("base");J=$[0]&&$[0].href||window.location.href}}else"undefined"!=typeof location&&(J=e.location.href);if(J)J=J.split("#")[0].split("?")[0],J=J.substr(0,J.lastIndexOf("/")+1);else{if("undefined"==typeof process||!process.cwd)throw new TypeError("No environment baseURI");J="file://"+(D?"/":"")+process.cwd()+"/",D&&(J=J.replace(/\\/g,"/"))}try{var B="test:"==new e.URL("test:///").protocol}catch(H){}var X=B?e.URL:e.URLPolyfill;q(r.prototype,"toString",{value:function(){return"Module"}}),function(){function e(e){return{status:"loading",name:e||"",linkSets:[],dependencies:[],metadata:{}}}function a(e,t,r){return new Promise(u({step:r.address?"fetch":"locate",loader:e,moduleName:t,moduleMetadata:r&&r.metadata||{},moduleSource:r.source,moduleAddress:r.address}))}function o(t,r,n,a){return new Promise(function(e,o){e(t.loaderObj.normalize(r,n,a))}).then(function(r){var n;if(t.modules[r])return n=e(r),n.status="linked",n.module=t.modules[r],n;for(var a=0,o=t.loads.length;o>a;a++)if(n=t.loads[a],n.name==r)return n;return n=e(r),t.loads.push(n),i(t,n),n})}function i(e,t){s(e,t,Promise.resolve().then(function(){return e.loaderObj.locate({name:t.name,metadata:t.metadata})}))}function s(e,t,r){l(e,t,r.then(function(r){return"loading"==t.status?(t.address=r,e.loaderObj.fetch({name:t.name,metadata:t.metadata,address:r})):void 0}))}function l(e,t,r){r.then(function(r){return"loading"==t.status?(t.address=t.address||t.name,Promise.resolve(e.loaderObj.translate({name:t.name,metadata:t.metadata,address:t.address,source:r})).then(function(r){return t.source=r,e.loaderObj.instantiate({name:t.name,metadata:t.metadata,address:t.address,source:r})}).then(function(e){if(void 0===e)throw new TypeError("Declarative modules unsupported in the polyfill.");if("object"!=typeof e)throw new TypeError("Invalid instantiate return value");t.depsList=e.deps||[],t.execute=e.execute}).then(function(){t.dependencies=[];for(var r=t.depsList,n=[],a=0,i=r.length;i>a;a++)(function(r,a){n.push(o(e,r,t.name,t.address).then(function(e){if(t.dependencies[a]={key:r,value:e.name},"linked"!=e.status)for(var n=t.linkSets.concat([]),o=0,i=n.length;i>o;o++)c(n[o],e)}))})(r[a],a);return Promise.all(n)}).then(function(){t.status="loaded";for(var e=t.linkSets.concat([]),r=0,n=e.length;n>r;r++)m(e[r],t)})):void 0})["catch"](function(e){t.status="failed",t.exception=e;for(var r=t.linkSets.concat([]),n=0,a=r.length;a>n;n++)p(r[n],t,e)})}function u(t){return function(r,n){var a=t.loader,o=t.moduleName,u=t.step;if(a.modules[o])throw new TypeError('"'+o+'" already exists in the module table');for(var c,f=0,m=a.loads.length;m>f;f++)if(a.loads[f].name==o&&(c=a.loads[f],"translate"!=u||c.source||(c.address=t.moduleAddress,l(a,c,Promise.resolve(t.moduleSource))),c.linkSets.length&&c.linkSets[0].loads[0].name==c.name))return c.linkSets[0].done.then(function(){r(c)});var p=c||e(o);p.metadata=t.moduleMetadata;var h=d(a,p);a.loads.push(p),r(h.done),"locate"==u?i(a,p):"fetch"==u?s(a,p,Promise.resolve(t.moduleAddress)):(p.address=t.moduleAddress,l(a,p,Promise.resolve(t.moduleSource)))}}function d(e,t){var r={loader:e,loads:[],startingLoad:t,loadingCount:0};return r.done=new Promise(function(e,t){r.resolve=e,r.reject=t}),c(r,t),r}function c(e,t){if("failed"!=t.status){for(var r=0,n=e.loads.length;n>r;r++)if(e.loads[r]==t)return;e.loads.push(t),t.linkSets.push(e),"loaded"!=t.status&&e.loadingCount++;for(var a=e.loader,r=0,n=t.dependencies.length;n>r;r++)if(t.dependencies[r]){var o=t.dependencies[r].value;if(!a.modules[o])for(var i=0,s=a.loads.length;s>i;i++)if(a.loads[i].name==o){c(e,a.loads[i]);break}}}}function f(e){var t=!1;try{b(e,function(r,n){p(e,r,n),t=!0})}catch(r){p(e,null,r),t=!0}return t}function m(e,t){if(e.loadingCount--,!(e.loadingCount>0)){var r=e.startingLoad;if(e.loader.loaderObj.execute===!1){for(var n=[].concat(e.loads),a=0,o=n.length;o>a;a++){var t=n[a];t.module={name:t.name,module:w({}),evaluated:!0},t.status="linked",h(e.loader,t)}return e.resolve(r)}var i=f(e);i||e.resolve(r)}}function p(e,r,n){var a=e.loader;e:if(r)if(e.loads[0].name==r.name)n=t(n,"Error loading "+r.name);else{for(var o=0;oo;o++){var r=u[o];a.loaderObj.failed=a.loaderObj.failed||[],-1==U.call(a.loaderObj.failed,r)&&a.loaderObj.failed.push(r);var c=U.call(r.linkSets,e);if(r.linkSets.splice(c,1),0==r.linkSets.length){var f=U.call(e.loader.loads,r);-1!=f&&e.loader.loads.splice(f,1)}}e.reject(n)}function h(e,t){if(e.loaderObj.trace){e.loaderObj.loads||(e.loaderObj.loads={});var r={};t.dependencies.forEach(function(e){r[e.key]=e.value}),e.loaderObj.loads[t.name]={name:t.name,deps:t.dependencies.map(function(e){return e.key}),depMap:r,address:t.address,metadata:t.metadata,source:t.source}}t.name&&(e.modules[t.name]=t.module);var n=U.call(e.loads,t);-1!=n&&e.loads.splice(n,1);for(var a=0,o=t.linkSets.length;o>a;a++)n=U.call(t.linkSets[a].loads,t),-1!=n&&t.linkSets[a].loads.splice(n,1);t.linkSets.splice(0,t.linkSets.length)}function g(e,t,n){try{var a=t.execute()}catch(o){return void n(t,o)}return a&&a instanceof r?a:void n(t,new TypeError("Execution must define a Module instance"))}function v(e,t,r){var n=e._loader.importPromises;return n[t]=r.then(function(e){return n[t]=void 0,e},function(e){throw n[t]=void 0,e})}function b(e,t){var r=e.loader;if(e.loads.length)for(var n=e.loads.concat([]),a=0;a "'+n.paths[o]+'" uses wildcards which are being deprecated for simpler trailing "/" folder paths.')}if(e.defaultJSExtensions&&(n.defaultJSExtensions=e.defaultJSExtensions,w.call(n,"The defaultJSExtensions configuration option is deprecated, use packages configuration instead.")),e.pluginFirst&&(n.pluginFirst=e.pluginFirst),e.map){var i="";for(var o in e.map){var s=e.map[o];if("string"!=typeof s){i+=(i.length?", ":"")+'"'+o+'"';var l=n.defaultJSExtensions&&".js"!=o.substr(o.length-3,3),u=n.decanonicalize(o);l&&".js"==u.substr(u.length-3,3)&&(u=u.substr(0,u.length-3));var c="";for(var f in n.packages)u.substr(0,f.length)==f&&(!u[f.length]||"/"==u[f.length])&&c.split("/").lengtha&&(r=o,a=n));return r}function t(e,t,r,n,a){if(!n||"/"==n[n.length-1]||a||t.defaultExtension===!1)return n;var o=!1;if(t.meta&&p(t.meta,n,function(e,t,r){return 0==r||e.lastIndexOf("*")!=e.length-1?o=!0:void 0}),!o&&e.meta&&p(e.meta,r+"/"+n,function(e,t,r){return 0==r||e.lastIndexOf("*")!=e.length-1?o=!0:void 0}),o)return n;var i="."+(t.defaultExtension||"js");return n.substr(n.length-i.length)!=i?n+i:n}function r(e,r,n,a,i){if(!a){if(!r.main)return n+(e.defaultJSExtensions?".js":"");a="./"==r.main.substr(0,2)?r.main.substr(2):r.main}if(r.map){var s="./"+a,l=S(r.map,s);if(l||(s="./"+t(e,r,n,a,i),s!="./"+a&&(l=S(r.map,s))),l){var u=o(e,r,n,l,s,i);if(u)return u}}return n+"/"+t(e,r,n,a,i)}function n(e,t,r,n){if("."==e)throw new Error("Package "+r+' has a map entry for "." which is not permitted.');return t.substr(0,e.length)==e&&n.length>e.length?!1:!0}function o(e,r,a,o,i,s){"/"==i[i.length-1]&&(i=i.substr(0,i.length-1));var l=r.map[o];if("object"==typeof l)throw new Error("Synchronous conditional normalization not supported sync normalizing "+o+" in "+a);if(n(o,l,a,i)&&"string"==typeof l){if("."==l)l=a;else if("./"==l.substr(0,2))return a+"/"+t(e,r,a,l.substr(2)+i.substr(o.length),s);return e.normalizeSync(l+i.substr(o.length),a+"/")}}function l(e,r,n,a,o){if(!a){if(!r.main)return Promise.resolve(n+(e.defaultJSExtensions?".js":""));a="./"==r.main.substr(0,2)?r.main.substr(2):r.main}var i,s;return r.map&&(i="./"+a,s=S(r.map,i),s||(i="./"+t(e,r,n,a,o),i!="./"+a&&(s=S(r.map,i)))),(s?d(e,r,n,s,i,o):Promise.resolve()).then(function(i){return i?Promise.resolve(i):Promise.resolve(n+"/"+t(e,r,n,a,o))})}function u(e,r,n,a,o,i,s){if("."==o)o=n;else if("./"==o.substr(0,2))return Promise.resolve(n+"/"+t(e,r,n,o.substr(2)+i.substr(a.length),s)).then(function(t){return C.call(e,t,n+"/")});return e.normalize(o+i.substr(a.length),n+"/")}function d(e,t,r,a,o,i){"/"==o[o.length-1]&&(o=o.substr(0,o.length-1));var s=t.map[a];if("string"==typeof s)return n(a,s,r,o)?u(e,t,r,a,s,o,i):Promise.resolve();if(e.builder)return Promise.resolve(r+"/#:"+o);var l=[],d=[];for(var c in s){var f=z(c);d.push({condition:f,map:s[c]}),l.push(e["import"](f.module,r))}return Promise.all(l).then(function(e){for(var t=0;tl&&(l=r),v(s,t,r&&l>r)}),v(r.metadata,s)}o.format&&!r.metadata.loader&&(r.metadata.format=r.metadata.format||o.format)}return t})}})}(),function(){function t(){if(s&&"interactive"===s.script.readyState)return s.load;for(var e=0;ea;a++){var i=e.normalizedDeps[a],s=r.defined[i];if(s&&!s.evaluated){var l=e.groupIndex+(s.declarative!=e.declarative);if(null===s.groupIndex||s.groupIndex=0;i--){for(var s=a[i],l=0;ln;n++){var s=a.importers[n];if(!s.locked){var l=U.call(s.dependencies,a);s.setters[l](o)}}return a.locked=!1,t},{id:t.name});if(a.setters=i.setters,a.execute=i.execute,!a.setters||!a.execute)throw new TypeError("Invalid System.register form for "+t.name);for(var s=0,d=t.normalizedDeps.length;d>s;s++){var c,f=t.normalizedDeps[s],m=r.defined[f],p=n[f];p?c=p.exports:m&&!m.declarative?c=m.esModule:m?(u(m,r),p=m.module,c=p.exports):c=r.get(f),p&&p.importers?(p.importers.push(a),a.dependencies.push(p)):a.dependencies.push(null);for(var h=t.originalIndices[s],g=0,v=h.length;v>g;++g){var b=h[g];a.setters[b]&&a.setters[b](c)}}}}function d(e,t){var r,n=t.defined[e];if(n)n.declarative?f(e,n,[],t):n.evaluated||c(n,t),r=n.module.exports;else if(r=t.get(e),!r)throw new Error("Unable to load dependency "+e+".");return(!n||n.declarative)&&r&&r.__useDefault?r["default"]:r}function c(t,n){if(!t.module){var a={},o=t.module={exports:a,id:t.name};if(!t.executingRequire)for(var i=0,s=t.normalizedDeps.length;s>i;i++){var l=t.normalizedDeps[i],u=n.defined[l];u&&c(u,n)}t.evaluated=!0;var f=t.execute.call(e,function(e){for(var r=0,a=t.deps.length;a>r;r++)if(t.deps[r]==e)return d(t.normalizedDeps[r],n);var o=n.normalizeSync(e,t.name);if(-1!=U.call(t.normalizedDeps,o))return d(o,n);throw new Error("Module "+e+" not declared as a dependency of "+t.name)},a,o);f&&(o.exports=f),a=o.exports,a&&(a.__esModule||a instanceof r)?t.esModule=n.newModule(a):t.esmExports&&a!==e?t.esModule=n.newModule(p(a)):t.esModule=n.newModule({"default":a})}}function f(t,r,n,a){if(r&&!r.evaluated&&r.declarative){n.push(t);for(var o=0,i=r.normalizedDeps.length;i>o;o++){var s=r.normalizedDeps[o];-1==U.call(n,s)&&(a.defined[s]?f(s,a.defined[s],n,a):a.get(s))}r.evaluated||(r.evaluated=!0,r.module.execute.call(e))}}a.prototype.register=function(e,t,r){if("string"!=typeof e&&(r=t,t=e,e=null),"boolean"==typeof r)return this.registerDynamic.apply(this,arguments);var n=R();n.name=e&&(this.decanonicalize||this.normalize).call(this,e),n.declarative=!0,n.deps=t,n.declare=r,this.pushRegister_({amd:!1,entry:n})},a.prototype.registerDynamic=function(e,t,r,n){"string"!=typeof e&&(n=r,r=t,t=e,e=null);var a=R();a.name=e&&(this.decanonicalize||this.normalize).call(this,e),a.deps=t,a.execute=n,a.executingRequire=r,this.pushRegister_({amd:!1,entry:a})},i("reduceRegister_",function(){return function(e,t){if(t){var r=t.entry,n=e&&e.metadata;if(r.name&&(r.name in this.defined||(this.defined[r.name]=r),n&&(n.bundle=!0)),!r.name||e&&!n.entry&&r.name==e.name){if(!n)throw new TypeError("Invalid System.register call. Anonymous System.register calls can only be made by modules loaded by SystemJS.import and not via script tags.");if(n.entry)throw"register"==n.format?new Error("Multiple anonymous System.register calls in module "+e.name+". If loading a bundle, ensure all the System.register calls are named."):new Error("Module "+e.name+" interpreted as "+n.format+" module format, but called System.register.");n.format||(n.format="register"),n.entry=r}}}}),s(function(e){return function(){e.call(this),this.defined={},this._loader.moduleRecords={}}}),q(o,"toString",{value:function(){return"Module"}}),i("delete",function(e){return function(t){return delete this._loader.moduleRecords[t],delete this.defined[t],e.call(this,t)}}),i("fetch",function(e){return function(t){return this.defined[t.name]?(t.metadata.format="defined",""):(t.metadata.deps=t.metadata.deps||[],e.call(this,t))}}),i("translate",function(e){return function(t){return t.metadata.deps=t.metadata.deps||[],Promise.resolve(e.apply(this,arguments)).then(function(e){return("register"==t.metadata.format||!t.metadata.format&&k(t.source))&&(t.metadata.format="register"),e})}}),i("load",function(e){return function(t){var r=this,a=r.defined[t];return!a||a.deps.length?e.apply(this,arguments):(a.originalIndices=a.normalizedDeps=[],n(t,a,r),f(t,a,[],r),a.esModule||(a.esModule=r.newModule(a.module.exports)),r.trace||(r.defined[t]=void 0),r.set(t,a.esModule),Promise.resolve())}}),i("instantiate",function(e){return function(t){"detect"==t.metadata.format&&(t.metadata.format=void 0),e.call(this,t);var r,a=this;if(a.defined[t.name])r=a.defined[t.name],r.declarative||(r.deps=r.deps.concat(t.metadata.deps)),r.deps=r.deps.concat(t.metadata.deps);else if(t.metadata.entry)r=t.metadata.entry,r.deps=r.deps.concat(t.metadata.deps);else if(!(a.builder&&t.metadata.bundle||"register"!=t.metadata.format&&"esm"!=t.metadata.format&&"es6"!=t.metadata.format)){if("undefined"!=typeof te&&te.call(a,t),!t.metadata.entry&&!t.metadata.bundle)throw new Error(t.name+" detected as "+t.metadata.format+" but didn't execute.");r=t.metadata.entry,r&&t.metadata.deps&&(r.deps=r.deps.concat(t.metadata.deps))}r||(r=R(),r.deps=t.metadata.deps,r.execute=function(){}),a.defined[t.name]=r;var o=m(r.deps);r.deps=o.names,r.originalIndices=o.indices,r.name=t.name,r.esmExports=t.metadata.esmExports!==!1;for(var i=[],s=0,l=r.deps.length;l>s;s++)i.push(Promise.resolve(a.normalize(r.deps[s],t.name)));return Promise.all(i).then(function(e){return r.normalizedDeps=e,{deps:r.deps,execute:function(){return n(t.name,r,a),f(t.name,r,[],a),r.esModule||(r.esModule=a.newModule(r.module.exports)),a.trace||(a.defined[t.name]=void 0),r.esModule}}})}})}(),function(){var t=/(^\s*|[}\);\n]\s*)(import\s*(['"]|(\*\s+as\s+)?[^"'\(\)\n;]+\s*from\s*['"]|\{)|export\s+\*\s+from\s+["']|export\s*(\{|default|function|class|var|const|let|async\s+function))/,r=/\$traceurRuntime\s*\./,n=/babelHelpers\s*\./;i("translate",function(a){return function(o){var i=this,s=arguments;return a.apply(i,s).then(function(a){if("esm"==o.metadata.format||"es6"==o.metadata.format||!o.metadata.format&&a.match(t)){if("es6"==o.metadata.format&&w.call(i,"Module "+o.name+' has metadata setting its format to "es6", which is deprecated.\nThis should be updated to "esm".'),o.metadata.format="esm",o.metadata.deps){for(var l="",u=0;u100&&!o.metadata.format&&(o.metadata.format="global","traceur"===i.transpiler&&(o.metadata.exports="traceur"),"typescript"===i.transpiler&&(o.metadata.exports="ts")),i._loader.loadedTranspiler=!0),i._loader.loadedTranspilerRuntime===!1&&(o.name==i.normalizeSync("traceur-runtime")||o.name==i.normalizeSync("babel/external-helpers*"))&&(a.length>100&&(o.metadata.format=o.metadata.format||"global"),i._loader.loadedTranspilerRuntime=!0),("register"==o.metadata.format||o.metadata.bundle)&&i._loader.loadedTranspilerRuntime!==!0){if("traceur"==i.transpiler&&!e.$traceurRuntime&&o.source.match(r))return i._loader.loadedTranspilerRuntime=i._loader.loadedTranspilerRuntime||!1,i["import"]("traceur-runtime").then(function(){return a});if("babel"==i.transpiler&&!e.babelHelpers&&o.source.match(n))return i._loader.loadedTranspilerRuntime=i._loader.loadedTranspilerRuntime||!1,i["import"]("babel/external-helpers").then(function(){return a})}return a})}})}();var ie="undefined"!=typeof self?"self":"global";i("fetch",function(e){return function(t){return t.metadata.exports&&!t.metadata.format&&(t.metadata.format="global"),e.call(this,t)}}),i("instantiate",function(e){return function(t){var r=this;if(t.metadata.format||(t.metadata.format="global"),"global"==t.metadata.format&&!t.metadata.entry){var n=R();t.metadata.entry=n,n.deps=[];for(var a in t.metadata.globals){var o=t.metadata.globals[a];o&&n.deps.push(o)}n.execute=function(e,n,a){var o;if(t.metadata.globals){o={};for(var i in t.metadata.globals)t.metadata.globals[i]&&(o[i]=e(t.metadata.globals[i]))}var s=t.metadata.exports;s&&(t.source+="\n"+ie+'["'+s+'"] = '+s+";");var l=r.get("@@global-helpers").prepareGlobal(a.id,s,o,!!t.metadata.encapsulateGlobal);return te.call(r,t),l()}}return e.call(this,t)}}),i("reduceRegister_",function(e){return function(t,r){if(r||!t.metadata.exports)return e.call(this,t,r);t.metadata.format="global";var n=t.metadata.entry=R();n.deps=t.metadata.deps;var a=M(t.metadata.exports);n.execute=function(){return a}}}),s(function(t){return function(){function r(t){if(Object.keys)Object.keys(e).forEach(t);else for(var r in e)i.call(e,r)&&t(r)}function n(t){r(function(r){if(-1==U.call(s,r)){try{var n=e[r]}catch(a){s.push(r)}t(r,n)}})}var a=this;t.call(a);var o,i=Object.prototype.hasOwnProperty,s=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];a.set("@@global-helpers",a.newModule({prepareGlobal:function(t,r,a,i){var s=e.define;e.define=void 0;var l;if(a){l={};for(var u in a)l[u]=e[u],e[u]=a[u]}return r||(o={},n(function(e,t){o[e]=t})),function(){var t,a=r?M(r):{},u=!!r;if((!r||i)&&n(function(n,s){o[n]!==s&&"undefined"!=typeof s&&(i&&(e[n]=void 0),r||(a[n]=s,"undefined"!=typeof t?u||t===s||(u=!0):t=s))}),a=u?a:t,l)for(var d in l)e[d]=l[d];return e.define=s,a}}}))}}),function(){function t(e){function t(e,t){for(var r=0;rt.index)return!0;return!1}n.lastIndex=a.lastIndex=o.lastIndex=0;var r,i=[],s=[],l=[];if(e.length/e.split("\n").length<200){for(;r=o.exec(e);)s.push([r.index,r.index+r[0].length]);for(;r=a.exec(e);)t(s,r)||l.push([r.index+r[1].length,r.index+r[0].length-1])}for(;r=n.exec(e);)if(!t(s,r)&&!t(l,r)){var u=r[1].substr(1,r[1].length-2);if(u.match(/"|'/))continue;"/"==u[u.length-1]&&(u=u.substr(0,u.length-1)),i.push(u)}return i}var r=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF.])(exports\s*(\[['"]|\.)|module(\.exports|\['exports'\]|\["exports"\])\s*(\[['"]|[=,\.]))/,n=/(?:^\uFEFF?|[^$_a-zA-Z\xA0-\uFFFF."'])require\s*\(\s*("[^"\\]*(?:\\.[^"\\]*)*"|'[^'\\]*(?:\\.[^'\\]*)*')\s*\)/g,a=/(^|[^\\])(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,o=/("[^"\\\n\r]*(\\.[^"\\\n\r]*)*"|'[^'\\\n\r]*(\\.[^'\\\n\r]*)*')/g,s=/^\#\!.*/;i("instantiate",function(a){return function(o){var i=this;if(o.metadata.format||(r.lastIndex=0,n.lastIndex=0,(n.exec(o.source)||r.exec(o.source))&&(o.metadata.format="cjs")),"cjs"==o.metadata.format){var l=o.metadata.deps,u=o.metadata.cjsRequireDetection===!1?[]:t(o.source);for(var d in o.metadata.globals)o.metadata.globals[d]&&u.push(o.metadata.globals[d]);var c=R();o.metadata.entry=c,c.deps=u,c.executingRequire=!0,c.execute=function(t,r,n){function a(e){return"/"==e[e.length-1]&&(e=e.substr(0,e.length-1)),t.apply(this,arguments)}if(a.resolve=function(e){return i.get("@@cjs-helpers").requireResolve(e,n.id)},n.paths=[],n.require=t,!o.metadata.cjsDeferDepsExecute)for(var u=0;u1;)n=a.shift(),e=e[n]=e[n]||{};n=a.shift(),n in e||(e[n]=r)}s(function(e){return function(){this.meta={},e.call(this)}}),i("locate",function(e){return function(t){var r,n=this.meta,a=t.name,o=0;for(var i in n)if(r=i.indexOf("*"),-1!==r&&i.substr(0,r)===a.substr(0,r)&&i.substr(r+1)===a.substr(a.length-i.length+r+1)){var s=i.split("/").length;s>o&&(o=s),v(t.metadata,n[i],o!=s)}return n[a]&&v(t.metadata,n[a]),e.call(this,t)}});var t=/^(\s*\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\s*\/\/[^\n]*|\s*"[^"]+"\s*;?|\s*'[^']+'\s*;?)+/,r=/\/\*[^\*]*(\*(?!\/)[^\*]*)*\*\/|\/\/[^\n]*|"[^"]+"\s*;?|'[^']+'\s*;?/g;i("translate",function(n){return function(a){if("defined"==a.metadata.format)return a.metadata.deps=a.metadata.deps||[],Promise.resolve(a.source);var o=a.source.match(t);if(o)for(var i=o[0].match(r),s=0;s')}else e()}else if("undefined"!=typeof importScripts){var a="";try{throw new Error("_")}catch(o){o.stack.replace(/(?:at|@).*(http.+):[\d]+:[\d]+/,function(e,t){$__curScript={src:t},a=t.replace(/\/[^\/]*$/,"/")})}t&&importScripts(a+"system-polyfills.js"),e()}else $__curScript="undefined"!=typeof __filename?{src:__filename}:null,e()}(); 6 | //# sourceMappingURL=system.js.map 7 | -------------------------------------------------------------------------------- /src/app.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | export class App { 2 | message = 'Hello World'; 3 | } 4 | -------------------------------------------------------------------------------- /src/app.ts: -------------------------------------------------------------------------------- 1 | export class App { 2 | message = 'Hello World'; 3 | } 4 | -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | export function configure(aurelia) { 2 | aurelia.use.basicConfiguration(); 3 | aurelia.start().then(() => aurelia.setRoot()); 4 | } 5 | -------------------------------------------------------------------------------- /src/main.ts: -------------------------------------------------------------------------------- 1 | export function configure(aurelia) { 2 | aurelia.use.basicConfiguration(); 3 | aurelia.start().then(() => aurelia.setRoot()); 4 | } 5 | --------------------------------------------------------------------------------