@coolon/angular-ui-powerups 0.0.96 → 0.0.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/bundles/coolon-angular-ui-powerups.umd.js +2960 -2288
  2. package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
  3. package/bundles/coolon-angular-ui-powerups.umd.min.js +1 -1
  4. package/bundles/coolon-angular-ui-powerups.umd.min.js.map +1 -1
  5. package/coolon-angular-ui-powerups.d.ts +17 -20
  6. package/coolon-angular-ui-powerups.metadata.json +1 -1
  7. package/esm2015/coolon-angular-ui-powerups.js +17 -20
  8. package/esm2015/index.js +2 -2
  9. package/esm2015/lib/interaction/components/activity-container/activity-container.component.js +16 -52
  10. package/esm2015/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +16 -47
  11. package/esm2015/lib/interaction/index.js +4 -2
  12. package/esm2015/lib/interaction/interaction-context-base.js +158 -0
  13. package/esm2015/lib/interaction/interaction-context.js +58 -78
  14. package/esm2015/lib/interaction/interaction.module.js +1 -1
  15. package/esm2015/lib/interaction/services/dialog-interaction-context.js +163 -0
  16. package/esm2015/lib/interaction/services/dialog-interaction.service.js +68 -181
  17. package/esm2015/lib/interaction/services/modal-interaction.service.js +109 -0
  18. package/esm2015/lib/place/components/place-outlet/place-outlet.component.js +9 -43
  19. package/esm2015/lib/place/guards/abstract-place.guard.js +165 -0
  20. package/esm2015/lib/place/guards/consolidated-param-map.js +133 -0
  21. package/esm2015/lib/place/guards/interaction.guard.js +113 -0
  22. package/esm2015/lib/place/guards/navigation-state.js +613 -0
  23. package/esm2015/lib/place/guards/place-component-deactivation-handler.js +87 -0
  24. package/esm2015/lib/place/index.js +7 -5
  25. package/esm2015/lib/place/place-component.js +1 -1
  26. package/esm2015/lib/place/place-router.js +162 -236
  27. package/esm2015/lib/place/place.module.js +2 -4
  28. package/esm2015/lib/place/route/visit-sanitiser.js +2 -2
  29. package/esm2015/lib/place/url-snapshot.js +96 -0
  30. package/esm2015/public_api.js +3 -3
  31. package/esm5/coolon-angular-ui-powerups.js +17 -20
  32. package/esm5/index.js +2 -2
  33. package/esm5/lib/interaction/components/activity-container/activity-container.component.js +23 -74
  34. package/esm5/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.js +26 -76
  35. package/esm5/lib/interaction/index.js +4 -2
  36. package/esm5/lib/interaction/interaction-context-base.js +211 -0
  37. package/esm5/lib/interaction/interaction-context.js +72 -94
  38. package/esm5/lib/interaction/interaction.module.js +1 -1
  39. package/esm5/lib/interaction/services/dialog-interaction-context.js +188 -0
  40. package/esm5/lib/interaction/services/dialog-interaction.service.js +83 -232
  41. package/esm5/lib/interaction/services/modal-interaction.service.js +153 -0
  42. package/esm5/lib/place/components/place-outlet/place-outlet.component.js +9 -43
  43. package/esm5/lib/place/guards/abstract-place.guard.js +212 -0
  44. package/esm5/lib/place/guards/consolidated-param-map.js +161 -0
  45. package/esm5/lib/place/guards/interaction.guard.js +125 -0
  46. package/esm5/lib/place/guards/navigation-state.js +764 -0
  47. package/esm5/lib/place/guards/place-component-deactivation-handler.js +104 -0
  48. package/esm5/lib/place/index.js +7 -5
  49. package/esm5/lib/place/place-component.js +1 -1
  50. package/esm5/lib/place/place-router.js +191 -294
  51. package/esm5/lib/place/place.module.js +2 -4
  52. package/esm5/lib/place/route/visit-sanitiser.js +2 -2
  53. package/esm5/lib/place/url-snapshot.js +120 -0
  54. package/esm5/public_api.js +3 -3
  55. package/fesm2015/coolon-angular-ui-powerups.js +2135 -1587
  56. package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
  57. package/fesm5/coolon-angular-ui-powerups.js +3083 -2412
  58. package/fesm5/coolon-angular-ui-powerups.js.map +1 -1
  59. package/lib/interaction/components/activity-container/activity-container.component.d.ts +6 -11
  60. package/lib/interaction/components/inplace-interaction-context/inplace-interaction-context.component.d.ts +4 -9
  61. package/lib/interaction/index.d.ts +3 -1
  62. package/lib/interaction/interaction-context-base.d.ts +27 -0
  63. package/lib/interaction/interaction-context.d.ts +18 -15
  64. package/lib/interaction/services/dialog-interaction-context.d.ts +18 -0
  65. package/lib/interaction/services/dialog-interaction.service.d.ts +14 -23
  66. package/lib/interaction/services/modal-interaction.service.d.ts +15 -0
  67. package/lib/place/components/place-outlet/place-outlet.component.d.ts +1 -4
  68. package/lib/place/guards/abstract-place.guard.d.ts +19 -0
  69. package/lib/place/guards/consolidated-param-map.d.ts +14 -0
  70. package/lib/{interaction/guards/interaction-guard.service.d.ts → place/guards/interaction.guard.d.ts} +8 -4
  71. package/lib/place/guards/navigation-state.d.ts +96 -0
  72. package/lib/place/guards/place-component-deactivation-handler.d.ts +12 -0
  73. package/lib/place/index.d.ts +6 -4
  74. package/lib/place/place-component.d.ts +1 -1
  75. package/lib/place/place-router.d.ts +25 -33
  76. package/lib/place/url-snapshot.d.ts +16 -0
  77. package/package.json +1 -1
  78. package/schematics/place-routes/place-def.js +2 -2
  79. package/schematics/place-routes/templates/place-routes.ts.template +9 -16
  80. package/esm2015/lib/interaction/guards/interaction-guard.service.js +0 -85
  81. package/esm2015/lib/place/guards/abstract-enter-place.guard.js +0 -315
  82. package/esm2015/lib/place/guards/leave-place.guard.js +0 -47
  83. package/esm2015/lib/place/navigation-session.js +0 -279
  84. package/esm2015/lib/place/places/noop-gateway-place.component.js +0 -58
  85. package/esm5/lib/interaction/guards/interaction-guard.service.js +0 -94
  86. package/esm5/lib/place/guards/abstract-enter-place.guard.js +0 -387
  87. package/esm5/lib/place/guards/leave-place.guard.js +0 -55
  88. package/esm5/lib/place/navigation-session.js +0 -353
  89. package/esm5/lib/place/places/noop-gateway-place.component.js +0 -61
  90. package/lib/place/guards/abstract-enter-place.guard.d.ts +0 -33
  91. package/lib/place/guards/leave-place.guard.d.ts +0 -8
  92. package/lib/place/navigation-session.d.ts +0 -43
  93. package/lib/place/places/noop-gateway-place.component.d.ts +0 -10
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@angular/router"),require("lodash"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("@angular/animations"),require("resize-observer-polyfill"),require("rxjs")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/material/tabs","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@angular/router","lodash","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","@angular/animations","resize-observer-polyfill","rxjs"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.material.tabs,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.ng.router,t.___default,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.src,t.fastMemoizeDecorator,null,t.ng.animations,t.ResizeObserver,t.rxjs)}(this,(function(t,e,n,i,o,r,a,s,c,u,l,p,d,f,m,h,y,v,g,b,P,C){"use strict";var I="default"in l?l.default:l;P=P&&P.hasOwnProperty("default")?P.default:P;var D=function(t,e){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function M(t,e){function n(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var A=function(){return(A=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function O(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function R(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function w(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function x(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function _(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function F(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(_(arguments[e]));return t}var S=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandEnabled=(new s.DelegatingValueModel).withDefault(!1),n._commandParameterProvided=!1,n}return M(e,t),Object.defineProperty(e.prototype,"pectinCommand",{get:function(){return this._command},set:function(t){this._command=t,this._commandEnabled.setDelegate(t?t.enabled:null)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){s.assert.notNil(this.pectinCommand),this.pectinCommand instanceof s.UnaryCommand?this._commandParameterProvided||s.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&s.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,s.Dsl.disposeWith(this).chain)(this._commandEnabled).subscribe((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}))},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof s.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(s.GarbageCollector);var j=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(s.GarbageCollector),E=function(t){function i(e,n,i){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=i,o}return M(i,t),i.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,s.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):s.Logger.get(this).warn("pectinFocusBinding was nil")},i.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},i.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},i.prototype.isFocused=function(t){return this.document.activeElement===t},i.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(s.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):s.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(i.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],i.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},i.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},i}(j);var T=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[S,E],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule],exports:[S,E]}]}],t}(),N=function(t){function e(){var e=t.call(this)||this;e.valueModel=new s.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.hasErrors()}},e}return M(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},O([s.UseDelegate(),R("design:type",s.ValueModel),R("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(j);var V=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(N),L=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(N),k=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},O([s.UseDelegate(),R("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),O([s.StoreInListModel("optionsModel"),R("design:type",Array)],e.prototype,"options",void 0),e}(N);var U=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(N),B=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),H=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[V,U,L,k,B],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,T],exports:[V,U,L,k,B]}]}],t}(),q=function(t){function e(){var e=t.call(this)||this;e._activityListDelegate=new s.DelegatingListModel;var n=s.Dsl.disposeWith(e),i=(n.chain,n.valueOf,n.before,n.when);n.after,n.observe,n.switchOn;return i.listOf(e.activityList).becomesPopulated((function(t){e.deferredGetCurrentActivity&&(e.deferredGetCurrentActivity.resolve(l.last(t)),e.deferredGetCurrentActivity=null)})),e}return M(e,t),e.prototype.setActivityList=function(t){this._activityListDelegate.setDelegate(t)},Object.defineProperty(e.prototype,"activityList",{get:function(){return this._activityListDelegate.readonly},enumerable:!0,configurable:!0}),e.prototype.getCurrentActivity=function(){return w(this,void 0,void 0,(function(){return x(this,(function(t){return this.isActive()?this.deferredGetCurrentActivity?[2,this.deferredGetCurrentActivity.promise]:this.activityList.length<1?(this.deferredGetCurrentActivity=s.Deferred.defer(),[2,this.deferredGetCurrentActivity.promise]):[2,l.last(this.activityList.value)]:[2,Promise.reject("no activity in progress")]}))}))},e.prototype.confirm=function(t){return this.confirmOrReject(t).then((function(){return!0})).catch((function(){return!1}))},e}(s.GarbageCollector);var G=new n.InjectionToken("InteractionActivityData");t.ɵbk=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new s.DelegatingValueModel).withDefault(!1),e}return M(e,t),e.prototype.initialise=function(t){p.assert.isNil(this._activityContext),this._activityContext=t},e.prototype.done=function(t){return this._activityContext.onDone(t)},e.prototype.cancel=function(t){this._activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(s.GarbageCollector),function(t){function e(){}t.Callbacks=e}(t.ɵbk||(t.ɵbk={}));var z=function(){function t(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(t.prototype,"activityContext",{get:function(){return this._activityContext},set:function(t){s.assert.isNil(this._activityContext),this._activityContext=t,this.loadActivity(t)},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){},t.prototype.loadActivity=function(t){var e=n.Injector.create({providers:[{provide:q,useValue:this.interactionContext},{provide:G,useValue:t.activityData}],parent:this.injector}),i=this.componentFactoryResolver.resolveComponentFactory(t.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(i,0,e),this.activityComponentRef.instance.initialise(t),this.activityContext.componentReady&&this.activityContext.componentReady(this.component)},Object.defineProperty(t.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!0,configurable:!0}),t.decorators=[{type:n.Component,args:[{selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},t.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},t}();var K=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e}(t.ɵbk),W=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</div>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[G]}]}]},e}(K);t.ɵbm=function(t){function e(e,n){var i=t.call(this)||this;return i.config=e,i.interactionContext=n,s.assert.notNil(e),i}return M(e,t),e.prototype.ngOnInit=function(){},Object.defineProperty(e.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},e.decorators=[{type:n.Component,args:[{selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[G]}]},{type:q}]},e}(K),function(t){function e(){}t.Data=e}(t.ɵbm||(t.ɵbm={}));var X=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,s.assert.notNil(e),n}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[G]}]}]},e}(K);var Z=function(){function t(t,e,n,i){this.activityData=t,this.activityClass=e,this.interactionContext=n,this.activityCallbacks=i,this._complete=!1}return t.prototype.isComponentRealised=function(){return!!this._component},t.prototype.isComplete=function(){return this._complete},t.prototype.componentReady=function(t){s.assert.isNil(this._component),this._component=t},Object.defineProperty(t.prototype,"component",{get:function(){return this._component},enumerable:!0,configurable:!0}),t.prototype.onDone=function(t){this._complete=!0,this.activityCallbacks.onDone(t)},t.prototype.onCancel=function(t){this._complete=!0,this.activityCallbacks.onCancel(t)},t}();var Y=function(e){function i(){var t=e.call(this)||this;t.throttledNestedActivityFinishEvents=new s.MutableStream,t.initialActivityOutletContextEvent=new n.EventEmitter,t.dynamicHeight=!1,t.activityTabs=new s.MutableListModel,t._activityList=new s.MutableListModel;var i=s.Dsl.disposeWith(t),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o(t.throttledNestedActivityFinishEvents).throttle(50).subscribe((function(){return t.onNestedActivityFinished()})),t.setActivityList(t._activityList.readonly),t}return M(i,e),Object.defineProperty(i.prototype,"initialActivityOutletContext",{get:function(){return this._initialActivityOutletContext},set:function(t){s.assert.isNil(this._initialActivityOutletContext),this.activityTabs.value=[],this._activityList.value=[];var e=this;t&&(this._initialActivityOutletContext=t,this.activityTabs.push(new Z(t.activityData,t.activityClass,this,{onDone:function(n){e.finishInitialActivity(),t.onDone(n)},onCancel:function(n){e.finishInitialActivity(),t.onCancel(n)}})))},enumerable:!0,configurable:!0}),i.prototype.isActive=function(){return!!this._initialActivityOutletContext},Object.defineProperty(i.prototype,"isFinished",{get:function(){return!this._initialActivityOutletContext},enumerable:!0,configurable:!0}),i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this,e=s.Dsl.disposeWith(this),n=(e.chain,e.observe);n.valuesFrom(this.outlets.changes).subscribe((function(){return setTimeout((function(){return t.updateActivityList()}))})),n.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()})),this.updateActivityList()},i.prototype.startActivity=function(t,e){var n=this;this.cleanupStaleNestedActivities();var i=this;return new Promise((function(o,r){var a=new Z(e,t,i,{onDone:function(t){o(t),i.throttledNestedActivityFinishEvents.publish({})},onCancel:function(t){r(t),i.throttledNestedActivityFinishEvents.publish({})}});i.activityTabs.push(a),i.tabs.selectedIndex=n.activityTabs.length}))},i.prototype.alert=function(t){return this.startActivity(W,t)},i.prototype.confirmOrReject=function(t){return this.startActivity(X,t)},i.prototype.confirmThen=function(e,n,i){return this.startActivity(t.ɵbm,{confirm:e,activityType:n,data:i})},i.prototype.finishInitialActivity=function(){this._initialActivityOutletContext=null,this.initialActivityOutletContextEvent.emit(null)},i.prototype.onNestedActivityFinished=function(){this.synchroniseSelectedTabIndex(),this.updateActivityList()},i.prototype.cleanupStaleNestedActivities=function(){var t=this;this.tabs.selectedIndex<this.activityTabs.length-1&&this.activityTabs.runInTransaction((function(e){e.value=e.value.slice(0,1+t.tabs.selectedIndex)}))},i.prototype.synchroniseSelectedTabIndex=function(){var t=this.tabs.selectedIndex,e=this.activityTabs.query().findIndex((function(t){return t.isComplete()}))-1;return this.tabs.selectedIndex=e,t===e},i.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.cleanupStaleNestedActivities(),this.updateActivityList()},i.prototype.updateActivityList=function(){this._activityList.value=this.activityTabs.value.filter((function(t){return!t.isComplete()&&t.isComponentRealised()})).map((function(t){return t.component}))},i.prototype.getSelectedOutlet=function(){return this.outlets.toArray()[this.tabs.selectedIndex]},i.decorators=[{type:n.Component,args:[{selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="dynamicHeight" [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let tab of activityTabs.value">\n <aup-activity-outlet [interactionContext]="this" [activityContext]="tab"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={initialActivityOutletContext:[{type:n.Input}],initialActivityOutletContextEvent:[{type:n.Output,args:["initialActivityOutletContext"]}],dynamicHeight:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[z]}]},i}(q);var $=function(e){function i(){return e.call(this)||this}return M(i,e),i.prototype.ngAfterViewInit=function(){this.setActivityList(this.interactionContext.activityList)},i.prototype.isActive=function(){return this.interactionContext.isActive()},i.prototype.alert=function(t){return this._startActivity(W,t)},i.prototype.confirmOrReject=function(t){return this._startActivity(X,t)},i.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbm,{confirm:e,activityType:n,data:i})},i.prototype.startActivity=function(t,e){return this._startActivity(t,e)},i.prototype._startActivity=function(t,e){var n=this;return new Promise((function(i,o){n.interactionContext.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){i(t)},onCancel:function(t){o(t)}}}))},i.decorators=[{type:n.Component,args:[{selector:"aup-inplace-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer\n [(initialActivityOutletContext)]="initialActivityContext"\n [dynamicHeight]="false"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],i.ctorParameters=function(){return[]},i.propDecorators={interactionContext:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}]},i}(q);var J=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-interaction-outlet",template:'<router-outlet name="interaction-context"></router-outlet>\n',styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),Q=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),tt=function(t){function e(){return t.call(this,{initialValue:!1})||this}return M(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.store.read()},enumerable:!0,configurable:!0}),e.prototype.whileTrue=function(t){this.startTransaction().commit(!0);try{return t()}finally{this.startTransaction().commit(!1)}},e.prototype.runIfFalse=function(t,e){return void 0===e&&(e=null),this.value?e:t()},e}(s.ValueModel),et=function(i){function r(t,e,n,o,r){var a=i.call(this)||this;return a.dialogService=t,a.location=e,a.router=n,a.dialogServiceDefaults=o,a.matDialogDefaultConfig=r,a.startingGuard=new tt,a._inActivityPromise=new s.MutableValueModel(!1),p.assert.notNil(t),a}return M(r,i),r.prototype.isActive=function(){return this._inActivityPromise.value},Object.defineProperty(r.prototype,"active",{get:function(){return this._inActivityPromise.readonly},enumerable:!0,configurable:!0}),r.prototype.startActivity=function(t,e){return this._startActivity(t,e)},r.prototype._startActivity=function(t,e,n){var i=this;return void 0===n&&(n=!0),this.isActive()&&s.lang.illegalState("Activity already in progress: "+this.activityList.value.map((function(t){return t.constructor.name})).join(", ")),this.startingGuard.whileTrue((function(){i._inActivityPromise.value=!0;var o=i,r=A({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},i.matDialogDefaultConfig,i.dialogServiceDefaults,{data:e,disableClose:n,panelClass:"dialog-interaction-service"}),a=i.dialogService.open(Y,r);return new Promise((function(n,i){var r=a.componentInstance;o.safelyUpdateActivityListDelegate(r.activityList),r.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){n(t),a.close(!0)},onCancel:function(t){i(t),a.close(!0)}},a.afterClosed().subscribe((function(t){t||i("auto-closed")})),a.updateSize()})).finally((function(){i._inActivityPromise.value=!1,o.safelyUpdateActivityListDelegate(null)}))}))},r.prototype.safelyUpdateActivityListDelegate=function(t){var e=this;setTimeout((function(){return e.setActivityList(t)}))},r.prototype.alert=function(t){return this._startActivity(W,t,!1)},r.prototype.confirmOrReject=function(t){return this._startActivity(X,t,!0)},r.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbm,{confirm:e,activityType:n,data:i},!0)},r.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],r.ctorParameters=function(){return[{type:o.MatDialog},{type:e.Location},{type:u.Router},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[Q]}]},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[d.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},r.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new r(n.ɵɵinject(d.MatDialog),n.ɵɵinject(e.Location),n.ɵɵinject(u.Router),n.ɵɵinject(Q,8),n.ɵɵinject(d.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:r,providedIn:"root"}),r}(q);var nt=function(){function i(){}return i.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,c.PortalModule,u.RouterModule],declarations:[Y,X,t.ɵbm,W,z,J,$],exports:[Y,z,J,$],entryComponents:[Y,X,t.ɵbm,W],providers:[et]}]}],i}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=p.Opts.get(e),this.remember=this.options.getOptional("remember",!1),this.defaultValue=this.options.getOptional("defaultValue",null)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.options.getOptional("as",this.propertyName)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!0,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,i){return w(this,void 0,void 0,(function(){var i;return x(this,(function(o){return this.isMissingFrom(e)?(i=I.first(n.getHistory(e.placeDefinition)),this.remember&&i&&(t=i.getParameter(this.name)),[2,this.isEmptyValue(t)?this.defaultValue:t]):[2,t]}))}))},t.prototype.isMissingFrom=function(t){return!t.hasParameter(this.name)},t}(),function(t){function e(){}t.Options=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return M(e,t),e.prototype.isEmptyValue=function(t){return I.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=n;var i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return M(e,t),e.prototype.isEmptyValue=function(t){return I.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=i;var o=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.isRouteId=!1,o.isArray=!0,o}return M(e,t),e.prototype.isEmptyValue=function(t){return I.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!I.isEqual(t,e)},e}(t);t.ArrayParameter=o}(t.ParameterDefinition||(t.ParameterDefinition={})),t.PlaceDefinition=function(){function e(t,e,n,i,o,r){this.component=t,this.path=e,this.authenticate=n,this.data=i,this.routeParameters=o,this.children=r}return e.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},e.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},e.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},e.prototype.getVisitParameterDefs=function(t){var e=p.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),i=!t||e.getOptional("includeRouteParameters",!1),o=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||i&&t.isRouteParameter&&!t.isRouteId||o&&!t.isRouteParameter}))},e.prototype.getPlaceData=function(t,e){return this.data?I.isNil(this.data[t])?e:this.data[t]:e},e.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var i=t.find((function(t){return!I.isNil(n.data[t])}));return i?this.data[i]:e}return e},e.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},e.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):""},e.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var i=t.getParameter(e.name);e.isEmptyValue(i)||(e.isArray?(s.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(s.assert.isFalsey(Array.isArray(i)),n[e.name]=e.urlFormat.format(i)))})),n},e.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var i=t.getParameter(n.name);n.isEmptyValue(i)||(e[n.name]=i)})),e},e.prototype.parseRouteParams=function(t){var e={};return this.getVisitParameterDefs({includeRouteId:!0,includeRouteParameters:!0,includeNonRouteParameters:!1}).forEach((function(n){if(t.has(n.name))if(n.isArray){var i=t.getAll(n.name);e[n.name]=i.map((function(t){return n.urlFormat.parse(t)}))}else{var o=t.get(n.name);n.isRouteId&&I.isEmpty(o)||(e[n.name]=n.urlFormat.parse(o))}})),e},O([y.Memoize(),R("design:type",Function),R("design:paramtypes",[]),R("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),O([y.Memoize(),R("design:type",Function),R("design:paramtypes",[Object]),R("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),O([y.Memoize(),R("design:type",Function),R("design:paramtypes",[Object]),R("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),function(t){function e(){}t.ParameterOptions=e}(t.PlaceDefinition||(t.PlaceDefinition={}));var it,ot="PLACE_DEFINITION_OPTIONS",rt=Symbol("place:route:parameters");t.ɵba=function(e){function n(){return e.call(this)||this}return M(n,e),n.prototype.initialiseBindings=function(t){var e=this;s.assert.isNil(this.visit),this.visit=t,this.placeDefinition.getVisitParameterDefs().forEach((function(t){e.installBinding(t)}))},n.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new s.Binding(this.visit,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return console.log("push to route",{name:t.name,value:e,currentVisit:n}),n.replace(t,e)}}))},Object.defineProperty(n.prototype,"placeDefinition",{get:function(){return n.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),n.prototype.onPlaceReady=function(){},O([v.Memoize(),R("design:type",t.PlaceDefinition),R("design:paramtypes",[])],n.prototype,"placeDefinition",null),n}(j),(it=t.ɵba||(t.ɵba={})).isPlaceComponentConstructor=function(t){return s.lang.constructorChain(t).includes(it)},it.getRouteParameters=function(t){return p.Klass.get(t).getMetadataList(rt)},it.getDefinition=function(t){return Reflect.getMetadata(ot,t)},it.injectDefinition=function(t,e){Reflect.defineMetadata(ot,e,t)};var at=function(){function t(t,e){void 0===e&&(e={}),this.placeDefinition=t,this.visitParameters=e}return t.prototype.getRouteId=function(){return this.placeDefinition.getRouteIdFrom(this)},t.prototype.hasRouteId=function(){return!l.isNil(this.getRouteId())},t.prototype.getParameter=function(t){return this.visitParameters[t]},t.prototype.hasParameter=function(t){return Object.keys(this.visitParameters).includes(t)},t.prototype.replace=function(e,n){var i;return new t(this.placeDefinition,A({},this.visitParameters,((i={})[e.name]=n,i)))},t.prototype.mergeRouteParameters=function(e){var n=this,i=Object.keys(e),o={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){if(t.isRouteId||t.isRouteParameter)i.includes(t.name)&&(o[t.name]=e[t.name]);else{var r=n.getParameter(t.name);n.hasParameter(t.name)&&(o[t.name]=r)}})),new t(this.placeDefinition,o)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=l.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!l.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t}();var st=new n.InjectionToken("AUP_PLACE_CONFIG");t.NavigationSession=function(){function t(t,e){this.firstNavigation=t,this.appModalInteractionContext=e,this._alreadyAccepted=[],this._visits=new Map,this.componentDeactivationHandlers=new Map,this.dialogOpenOnStart=this.appModalInteractionContext.isActive()}return t.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},t.prototype.getVisitFor=function(t){return this._visits.get(t)},t.prototype.canDeactivate=function(e,n){return w(this,void 0,void 0,(function(){var i,o;return x(this,(function(r){return(i=this.componentDeactivationHandlers.get(e))||(o=0===this.componentDeactivationHandlers.size,i=new t.ComponentDeactivationHandler(e,this.appModalInteractionContext,o),this.componentDeactivationHandlers.set(e,i)),[2,i.canDeactivate(n)]}))}))},t.prototype.setPopstateReturnUrl=function(t){this._popStateReturnUrl=t},Object.defineProperty(t.prototype,"isPopState",{get:function(){return!!this._popStateReturnUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"popStateReturnUrl",{get:function(){return this._popStateReturnUrl},enumerable:!0,configurable:!0}),t.prototype.getVisits=function(){return Array.from(this._visits.values())},t}(),function(t){var e=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.isExternal=!0,i}return M(e,t),e}(t);var n=function(t){function e(e,n){var i=t.call(this,!1,n)||this;return i.isExternal=!1,i.storeVisit(e),i}return M(e,t),e}(t);var i=function(){function t(t){this.interactionContext=t}return t.prototype.createInternal=function(t){return new n(t,this.interactionContext)},t.prototype.createExternal=function(t){return new e(t,this.interactionContext)},t}();t.Factory=i;var o=function(){function t(t,e,n){this.component=t,this.appModelInteractionContext=e,this.primary=n,this.alreadyAccepted=!1}return t.prototype.canDeactivate=function(t){return w(this,void 0,void 0,(function(){var e;return x(this,(function(n){switch(n.label){case 0:return console.log(this.constructor.name+".canDeactivate",{component:this.component}),this.alreadyAccepted?[2,!0]:[3,1];case 1:return this.primary&&this.appModelInteractionContext.isActive()?[4,this.cancelCurrentActivityOf(this.appModelInteractionContext)]:[3,3];case 2:return n.sent(),[2,!1];case 3:return e=this,[4,this.canDeactivateComponent(t)];case 4:return e.alreadyAccepted=n.sent(),[2,this.alreadyAccepted]}}))}))},t.prototype.canDeactivateComponent=function(t){return w(this,void 0,void 0,(function(){return x(this,(function(e){return this.component.interactionContext&&!this.isAppModalInteractionContext(this.component.interactionContext)&&this.component.interactionContext.isActive()?(this.cancelCurrentActivityOf(this.component.interactionContext),[2,!1]):this.isLeavingCurrentPlace(t)&&this.component.canDeactivate?[2,this.component.canDeactivate()]:[2,!0]}))}))},t.prototype.isAppModalInteractionContext=function(t){return this.appModelInteractionContext===t},t.prototype.cancelCurrentActivityOf=function(t){return w(this,void 0,void 0,(function(){var e;return x(this,(function(n){switch(n.label){case 0:return[4,t.getCurrentActivity()];case 1:return e=n.sent(),console.log("cancelling",{activity:e}),e.cancel(null),[2]}}))}))},t.prototype.isLeavingCurrentPlace=function(t){return!t.includesPathOf(this.component.placeDefinition)},t}();t.ComponentDeactivationHandler=o}(t.NavigationSession||(t.NavigationSession={}));var ct,ut,lt,pt,dt=function(){function t(){this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=I.first(e);n&&!t.hasChangedFrom(n)||(e.unshift(t),this.setHistory(t.placeDefinition,e.slice(0,3)))},t.prototype.getHistory=function(t){var e=this._history.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._history.set(t,e)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();function ft(e){return function(n){t.ɵba.isPlaceComponentConstructor(n)?t.ɵba.injectDefinition(n,new t.PlaceDefinition(n,e.path,!l.isNil(e.authenticate)&&e.authenticate,e.data,t.ɵba.getRouteParameters(n),(e.children||[]).map((function(e){return t.ɵba.getDefinition(e)})))):s.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}function mt(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(rt,r),s.UseDelegate()(i,o)}}(function(t){function e(){}t.Options=e})(ft||(ft={})),ct=t.ɵbd||(t.ɵbd={}),ut=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),lt=function(){function t(){}return t.prototype.format=function(t){return I.isNumber(t)&&!I.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return I.isNaN(e)?null:e},t}(),pt=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),ct.STRING=new ut,ct.NUMBER=new lt,ct.BOOLEAN=new pt;var ht=function(e){function i(t){var n=e.call(this)||this;return n.router=t,n}return M(i,e),i.prototype.ngOnInit=function(){this.router.navigateByUrl(this.returnUrl.value)},i.ctorParameters=function(){return[{type:u.Router}]},i.decorators=[{type:n.Component,args:[{template:""}]}],i.ctorParameters=function(){return[{type:u.Router}]},O([mt({storeInUrl:t.ɵbd.STRING}),R("design:type",s.MutableValueModel)],i.prototype,"returnUrl",void 0),i=O([ft({path:"aup-gateway-route",authenticate:!1}),R("design:paramtypes",[u.Router])],i)}(t.ɵba);var yt,vt,gt=t.ɵba.getDefinition(ht);t.ɵt=function(i){function o(e,n,o,r,a){var c=i.call(this)||this;c.router=e,c.urlSerializer=n,c.interactionContext=o,c.angularLocation=r,c.placeHistory=a,c.firstRoute=!0,c._navigationSessionModel=new s.MutableValueModel,c._activeVisits=new s.MutableListModel,c.initialRedirectStarted=!1,c.initialRedirectFinished=!1;var l=s.Dsl.disposeWith(c),p=l.chain;l.valueOf,l.before,l.when,l.after,l.observe,l.switchOn;return c.activeVisitIndex=p(c._activeVisits).indexBy("placeDefinition"),c.navigationSessionFactory=new t.NavigationSession.Factory(o),r.onUrlChange((function(t){console.log("location.onUrlChange -> "+t)})),c.router.events.subscribe((function(t){t instanceof u.NavigationStart&&c.onAngularRouterStarted(t),t instanceof u.NavigationEnd&&c.onAngularRouterFinished(!1),t instanceof u.NavigationError&&c.onAngularRouterFinished(!0)})),c.navigationSessionActive=p(c.navigationSessionModel).isNotNil(),c.navigationSessionActive.subscribe((function(t){console.log("navigationSessionActive",t)})),c}return M(o,i),Object.defineProperty(o.prototype,"navigationSession",{get:function(){return this._navigationSessionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"navigationSessionModel",{get:function(){return this._navigationSessionModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!0,configurable:!0}),o.prototype.navigate=function(t,e){return w(this,void 0,void 0,(function(){var n=this;return x(this,(function(i){return this.doNavigation(t,(function(i){return w(n,void 0,void 0,(function(){var n;return x(this,(function(i){switch(i.label){case 0:return n=F([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.router.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return i.sent(),[2]}}))}))})),[2]}))}))},o.prototype.createRedirectFor=function(t,e){return this.router.createUrlTree(this.createRouteParameters(t),e)},o.prototype.pushVisitChangesToRoute=function(t,e,n){return w(this,void 0,void 0,(function(){var t=this;return x(this,(function(i){return this.placeHistory.add(n),n.hasRoutingChangedFrom(e)?[2,this.doNavigation(n,(function(e){var i=t.parseUrl(t.router.routerState.snapshot).createRedirectCommandsFor(n);return console.log("### Push Changes to route Redirect",{commands:i}),e.navigate(i)}))]:[2]}))}))},o.prototype.doNavigation=function(t,e){return w(this,void 0,void 0,(function(){return x(this,(function(n){switch(n.label){case 0:this._navigationSessionModel.value=this.navigationSessionFactory.createInternal(t),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,e(this.router)];case 2:return n.sent(),[3,4];case 3:return this.navigationSession&&!this.router.getCurrentNavigation()&&this.onAngularRouterFinished(!1),[7];case 4:return[2]}}))}))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.prototype.onAngularRouterStarted=function(t){if(!this.navigationSession){console.log("navigation started",{firstTime:this.firstRoute});var e=this.navigationSessionFactory.createExternal(this.firstRoute);"popstate"===t.navigationTrigger&&e.setPopstateReturnUrl(this.router.routerState.snapshot.url),this._navigationSessionModel.value=e}this.firstRoute=!1},o.prototype.onAngularRouterFinished=function(t){var e=this,n=this._navigationSessionModel.value;if(t)n.isPopState&&(console.log("cancelled during popstate"),this.angularLocation.go(n.popStateReturnUrl));else{var i=n.getVisits();i.forEach((function(t){return e.placeHistory.add(t)})),this._activeVisits.value=i}this._navigationSessionModel.value=null},o.prototype.extractChildPath=function(t){return I.flatten(t.children.map((function(t){return t.url})))},o.prototype.parseUrl=function(t){return new o.UrlHelper(this.urlSerializer.parse(t.url))},o.prototype.performInitialNavigationIntercept=function(t,e){if(s.assert.isTruthy(this.isInitialNavigation()),s.Logger.get(this).info("Redirecting to: "+gt.path,{returnUrl:e.url}),!this.initialRedirectFinished)return this.initialRedirectFinished=!0,this.router.createUrlTree([gt.path,{returnUrl:e.url}],{replaceUrl:!0,skipLocationChange:!1})},o.prototype.isInitialNavigation=function(){return this.navigationSession.firstNavigation&&!this.initialRedirectFinished},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:q},{type:e.Location},{type:dt}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(q),n.ɵɵinject(e.Location),n.ɵɵinject(dt))},token:o,providedIn:"root"}),O([s.Trace(),R("design:type",Function),R("design:paramtypes",[at,Object]),R("design:returntype",Promise)],o.prototype,"navigate",null),o}(s.GarbageCollector),yt=t.ɵt||(t.ɵt={}),vt=function(){function t(t){this.urlTree=t,console.log({segments:this.urlTree.root.children.primary.segments})}return t.prototype.cloneUrlSegmentList=function(){return F(this.urlTree.root.children.primary.segments)},t.prototype.updateVisitSegments=function(t){var e=this.cloneUrlSegmentList(),n=this.convertToUrlSegments(t),i=e.findIndex((function(t){return t.path===n[0].path}));return e.splice.apply(e,F([i,n.length],n)),e},t.prototype.convertToUrlSegments=function(t){return t.placeDefinition.hasRouteId()?[new u.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new u.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new u.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t))]},t.prototype.createRedirectCommandsFor=function(t){var e=this.updateVisitSegments(t),n=[];return e.forEach((function(t){n.push(t.path),t.parameterMap.keys.length>0&&n.push(t.parameters)})),n},t.prototype.includesPathOf=function(t){return this.cloneUrlSegmentList().find((function(e){return e.path===t.path}))},O([s.Trace(),R("design:type",Function),R("design:paramtypes",[at]),R("design:returntype",Array)],t.prototype,"createRedirectCommandsFor",null),t}(),yt.UrlHelper=vt;var bt=b.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),Pt=[b.query(":enter, :leave",bt,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(-100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(100%)"}))],{optional:!0})])],Ct=[b.query(":enter, :leave",bt,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(100%)",minHeight:"1px"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function It(t){return b.trigger("routeAnimations",[b.transition(":increment",Ct,{params:{duration:t}}),b.transition(":decrement",Pt,{params:{duration:t}})])}var Dt=It("0.3s");var Mt=function(e){function i(t,i,o,r){var a=e.call(this)||this;a.router=t,a.placeRouter=i,a.placeConfig=o,a.placeChanged=new n.EventEmitter,a._activePlace=new s.MutableValueModel,a._previousPlace=new s.MutableValueModel,a._activePlaceVisitModel=new s.DelegatingValueModel,a._inOutletActivation=new s.Guard,a._inOutletDeactivation=new s.Guard,a._inRouteVisitUpdate=new s.Guard,a._activatedRouteModel=new s.MutableValueModel,a._placeDefinition=new s.MutableValueModel,a.initialPlaceIndex=null;var c=s.Dsl.disposeWith(a),u=c.chain,p=c.valueOf,d=(c.before,c.when);c.after,c.observe,c.switchOn;a.parentOutletModel=new s.MutableValueModel(r),a._activePlaceVisitModel.setDelegate(new s.MutableValueModel),a._inOutletUpdate=p.any(a._inOutletDeactivation,a._inOutletActivation).areTruthy();var f=u(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),m=u(a._activePlace).map((function(t){return t.constructor}),{postponeWhile:u(a.activePlaceModel).isNil()}),h=u(a._previousPlace).map((function(t){return t.constructor}));return a.ready=u.reduce(m,h,(function(t,e){return!!t&&t!==ht&&e!==ht})),a.enableAnimation=p.all(a.ready,a.animateModel).areTruthy(),a.placeAnimationOrder=u(a.customPlaceAnimationOrderModel).otherwise(f).reduce((function(t){var e=0;return m.value&&(e=t.indexOf(m.value),l.isNil(a.initialPlaceIndex&&e>=0)&&(a.initialPlaceIndex=e)),l.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:m}),a.routerVisit=u(a._activePlace).pluck("placeDefinition").findIn(i.activeVisitIndex),d.valueOf(a.routerVisit).changes((function(){return a.pushRouteChangesToVisit()}),{unless:a._inOutletUpdate}),d.valueOf(a._activePlaceVisitModel).changes((function(t,e){a.pushVisitChangesToRoute(t,e)}),{unless:a.placeRouter.navigationSessionActive}),u(a._activePlace).postponeWhile(i.navigationSessionActive).subscribe((function(t){return a.placeChanged.emit(t)})),a}return M(i,e),i.prototype.ngOnInit=function(){},i.prototype.getAnimationOrder=function(){return this.placeAnimationOrder.value},Object.defineProperty(i.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!0,configurable:!0}),i.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(i.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),i.prototype.pushRouteChangesToVisit=function(){var t=this,e=this.routerVisit.value;e&&this._inRouteVisitUpdate.whileTrue((function(){t._activePlaceVisitModel.value=e}))},i.prototype.pushVisitChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.placeRouter.pushVisitChangesToRoute(n,e,t)},Object.defineProperty(i.prototype,"activePlaceModel",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),i.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletActivation.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition;var i=new s.MutableValueModel;n._activePlaceVisitModel.setDelegate(i),e.initialiseBindings(i)}catch(t){console.error(t)}})),this.enableAnimation.value||this.animationDone()},i.prototype.onOutletDeactivated=function(){var t=this;this._inOutletDeactivation.whileTrue((function(){t._previousPlace.value=t._activePlace.value,t._activePlace.value=null,t._activatedRouteModel.value=null,t._placeDefinition.value=null,t._activePlaceVisitModel.setDelegate(null)}))},i.prototype.animationStarted=function(){},i.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},i.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n [@.disabled]="!enableAnimation.value"\n (@routeAnimations.start)="animationStarted()"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n</div>\n\n',animations:[Dt],styles:[":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],i.ctorParameters=function(){return[{type:u.Router},{type:t.ɵt},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[st]}]},{type:i,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},i.propDecorators={animate:[{type:n.Input}],animateModel:[{type:n.Input,args:["animateModel"]}],customPlaceAnimationOrderModel:[{type:n.Input,args:["placeAnimationOrderModel"]}],customPlaceAnimationOrder:[{type:n.Input,args:["placeAnimationOrder"]}],placeChanged:[{type:n.Output}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},O([s.StoreInValueModel("animateModel"),R("design:type",Boolean)],i.prototype,"animate",void 0),O([s.UseDelegate({defaultValue:!0}),R("design:type",s.ValueModel)],i.prototype,"animateModel",void 0),O([s.UseDelegate(),R("design:type",s.ListModel)],i.prototype,"customPlaceAnimationOrderModel",void 0),O([s.StoreInListModel("customPlaceAnimationOrderModel"),R("design:type",Array)],i.prototype,"customPlaceAnimationOrder",void 0),i}(j);var At=function(e){function i(){var n=e.call(this)||this,i=s.Dsl.disposeWith(n),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return n.placeDefinitions=o(n.placesModel).map((function(e){return t.ɵba.getDefinition(e)})),n.commandFactory=s.Command.createFactory((function(t){n.placeOutlet.navigate(new at(t))})),n.activePlaceDefinition=o(n.placeOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition"),n}return M(i,e),i.prototype.getNav=function(t){var e=t.getPlaceData("nav");return{title:function(){return e?e.title():t.searchPlaceData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getPlaceData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getPlaceData("navIcon",null)}}},i.prototype.isActive=function(t){return this.activePlaceDefinition.query().equals(t)},i.prototype.ngOnInit=function(){},i.decorators=[{type:n.Component,args:[{template:""}]}],i.ctorParameters=function(){return[]},i.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}],placeOutlet:[{type:n.Input}],placeOutletModel:[{type:n.Input}]},O([s.StoreInListModel("placesModel"),R("design:type",Array)],i.prototype,"places",void 0),O([s.UseDelegate(),R("design:type",s.ListModel)],i.prototype,"placesModel",void 0),O([s.StoreInValueModel("placeOutletModel"),R("design:type",Mt)],i.prototype,"placeOutlet",void 0),O([s.UseDelegate(),R("design:type",s.ValueModel)],i.prototype,"placeOutletModel",void 0),O([y.Memoize(),R("design:type",Function),R("design:paramtypes",[t.PlaceDefinition]),R("design:returntype",Object)],i.prototype,"getNav",null),i}(j);var Ot=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},O([s.UseDelegate(),R("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),O([s.StoreInValueModel("busyModel"),R("design:type",Boolean)],t.prototype,"busy",void 0),t}();var Rt=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),wt=function(t){function e(){var e=t.call(this)||this;return e.expanded=!0,e}return M(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.decorators=[{type:n.Component,args:[{selector:"aup-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}]},e}(At);var xt=function(t){function e(){return t.call(this)||this}return M(e,t),e.decorators=[{type:n.Component,args:[{selector:"aup-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(At),_t=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,u.RouterModule,r.MatTabsModule,m.MatListModule,h.MatTooltipModule,f.MatIconModule,T],declarations:[Rt,Ot,Mt,xt,wt,At,ht],entryComponents:[Ot],exports:[Ot,Mt,Rt,xt,wt,At],providers:[]}]}],t}(),Ft=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,T,H,_t,nt],exports:[nt,_t,T,H,B]}]}],t}(),St=b.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var jt=function(t,e){this.width=t,this.height=e};var Et,Tt=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,i,o){var r=t.call(this,i,o)||this;return r.top=e,r.left=n,r.width=i,r.height=o,r}return M(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new Tt(t.clientX-this.left,t.clientY-this.top):new Tt(t.x-this.left,t.y-this.top)},e}(jt),(Et=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new Et(e.top,e.left,e.width,e.height)};var Nt=function(e){function n(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new s.ValueHolder(new t.Bounds(0,0,0,0)),o}return M(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new P((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(j);function Vt(){}(function(t){function e(){}t.Callback=e})(Vt||(Vt={}));var Lt=function(){function t(t,e,n){this.router=t,this.injector=e,this.interactionContext=n}return t.prototype.canActivate=function(t,e){return!0},t.prototype.canDeactivate=function(t,e,n,i){return!this.interactionContext.isActive()},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[{type:u.Router},{type:n.Injector},{type:q}]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t(n.ɵɵinject(u.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(q))},token:t,providedIn:"root"}),O([s.Trace(),R("design:type",Function),R("design:paramtypes",[u.ActivatedRouteSnapshot,u.RouterStateSnapshot]),R("design:returntype",Object)],t.prototype,"canActivate",null),O([s.Trace(),R("design:type",Function),R("design:paramtypes",[B,u.ActivatedRouteSnapshot,u.RouterStateSnapshot,u.RouterStateSnapshot]),R("design:returntype",Object)],t.prototype,"canDeactivate",null),t}();var kt=function(){function t(t,e,n,i){this.activatedRoute=t,this.router=e,this.placeHistory=n,this.injector=i}return t.prototype.sanitise=function(t){return w(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,u;return x(this,(function(l){switch(l.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),i=t.getRouteId(),[4,n.sanitise(i,t,this.placeHistory,this.injector)]):[3,2];case 1:if(u=l.sent(),console.log({routeId:i,sanitisedValue:u}),n.hasChanged(i,u))return[2,t.replace(n,u)];l.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,l.label=3;case 3:return a<o.length?(s=o[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector)]):[3,6];case 4:u=l.sent(),s.hasChanged(c,u)&&(r=r.replace(s,u)),l.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}();t.AbstractEnterPlaceGuard=function(){function e(t,e,n,i,o){this.router=t,this.urlSerializer=e,this.placeRouter=n,this.placeHistory=i,this.injector=o}return e.prototype.canActivate=function(t,n){return w(this,void 0,void 0,(function(){var i=this;return x(this,(function(o){return[2,this.interceptInitialRouteOtherwise(t,n,(function(){return i.authorisePlaceThen(t,n,(function(o){return w(i,void 0,void 0,(function(){var i,r,a,s,c;return x(this,(function(u){switch(u.label){case 0:return i=new e.ConsolidatedParameterMap(t.paramMap,t.url),r=o.parseRouteParams(i),a=this.placeRouter.navigationSession.getVisitFor(o)||new at(o,r),[4,new kt(t,this.router,this.placeHistory,this.injector).sanitise(a.mergeRouteParameters(r))];case 1:return s=u.sent(),this.placeRouter.navigationSession.storeVisit(s),a.hasRoutingChangedFrom(s)?(c=this.placeRouter.parseUrl(n).createRedirectCommandsFor(s),console.log("##### Place Guard Redirect",c),[2,this.router.createUrlTree(c,{replaceUrl:!0,skipLocationChange:!1})]):[2,!0]}}))}))}))}))]}))}))},e.prototype.authorisePlaceThen=function(e,n,i){return w(this,void 0,void 0,(function(){var o,r,a;return x(this,(function(c){switch(c.label){case 0:return t.ɵba.isPlaceComponentConstructor(e.component)?(o=t.ɵba.getDefinition(e.component)).authenticate?[4,this.isAuthorised(e,n)]:[3,2]:[3,4];case 1:return a=c.sent(),[3,3];case 2:a=!0,c.label=3;case 3:return!0===(r=a)?[2,i(o)]:(console.log("not authorised result",r),[2,r]);case 4:return[2,s.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)];case 5:return[2]}}))}))},e.prototype.interceptInitialRouteOtherwise=function(t,e,n){return w(this,void 0,void 0,(function(){return x(this,(function(i){return this.placeRouter.isInitialNavigation()?[2,this.placeRouter.performInitialNavigationIntercept(t,e)]:[2,n()]}))}))},e.prototype.isAuthorised=function(t,e){return w(this,void 0,void 0,(function(){var n;return x(this,(function(i){return[2,(n=this.getAuthGuard(this.injector).canActivate(t,e))instanceof C.Observable?n.toPromise():n]}))}))},O([s.Trace(),R("design:type",Function),R("design:paramtypes",[u.ActivatedRouteSnapshot,u.RouterStateSnapshot,Function]),R("design:returntype",Promise)],e.prototype,"authorisePlaceThen",null),O([s.Trace(),R("design:type",Function),R("design:paramtypes",[u.ActivatedRouteSnapshot,u.RouterStateSnapshot]),R("design:returntype",Promise)],e.prototype,"isAuthorised",null),e}(),function(t){var e=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new n(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),O([y.Memoize(),R("design:type",Array),R("design:paramtypes",[])],t.prototype,"keys",null),t}();t.ConsolidatedParameterMap=e;var n=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}()}(t.AbstractEnterPlaceGuard||(t.AbstractEnterPlaceGuard={}));var Ut=function(){function e(t){this.placeRouter=t}return e.prototype.canDeactivate=function(t,e,n,i){return w(this,void 0,void 0,(function(){return x(this,(function(e){return[2,this.placeRouter.navigationSession.canDeactivate(t,this.placeRouter.parseUrl(i))]}))}))},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:t.ɵt}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(t.ɵt))},token:e,providedIn:"root"}),e}();var Bt=function(){function t(){}return t.prototype.canActivate=function(t,e){return w(this,void 0,void 0,(function(){return x(this,(function(t){return[2,!0]}))}))},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();t.ACTIVITY_DATA=G,t.AUP_PLACE_CONFIG=st,t.AbstractActivity=K,t.AbstractInputComponent=N,t.AbstractPlaceNavigationComponent=At,t.Activity=t.ɵbk,t.ActivityContainerComponent=Y,t.ActivityOutletComponent=z,t.AlertDialogComponent=W,t.AngularUiPowerupsModule=Ft,t.BusyOverlayComponent=Ot,t.CommandDirective=S,t.ComponentsModule=H,t.ConfirmThenDialogComponent=t.ɵbm,t.ConfirmationDialogComponent=X,t.DEFINITION_META_DATA_KEY=ot,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=Q,t.DialogInteractionService=et,t.Dimension=jt,t.DirectivesModule=T,t.DisposableComponent=j,t.EmptyStateComponent=Rt,t.FocusBindingDirective=E,t.Formatter=t.ɵbd,t.InplaceInteractionContextComponent=$,t.InteractionContext=q,t.InteractionGuard=Lt,t.InteractionModule=nt,t.InteractionOutletComponent=J,t.LEFT_RIGHT_PLACE_ANIMATION=Dt,t.LeavePlaceGuard=Ut,t.ListPlaceNavComponent=wt,t.NoopAuthGuard=Bt,t.NoopComponent=B,t.NoopGatewayPlace=ht,t.NumberInputComponent=V,t.PasswordInputComponent=L,t.Place=ft,t.PlaceComponent=t.ɵba,t.PlaceHistory=dt,t.PlaceModule=_t,t.PlaceOutletComponent=Mt,t.PlaceRouter=t.ɵt,t.Point=Tt,t.ROUTE_PARAMETER_LIST_KEY=rt,t.ResizeAwareComponent=Nt,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);p.Klass.get(i).addToOwnMetadataList(rt,r),s.UseDelegate()(i,o)}},t.SelectInputComponent=k,t.StringInputComponent=U,t.TabbedPlaceNavigationComponent=xt,t.Visit=at,t.VisitParameter=mt,t.VisitParameterList=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(rt,r),s.UseDelegate()(i,o)}},t.VisitSanitiser=kt,t.leftRightPlaceAnimation=It,t.slideDownAndUpAnimation=function(t,e){s.OptionsHelper.get(e).getOptional("duration","100ms");var n=s.OptionsHelper.get(e).getOptional("hiddenStyleDef",St);return b.trigger(t,[b.transition(":enter",[n,b.animate("100ms")]),b.transition(":leave",[b.animate("100ms",n)])])},t.ɵa=T,t.ɵb=S,t.ɵbb=ft,t.ɵbc=mt,t.ɵbe=nt,t.ɵbf=Y,t.ɵbg=z,t.ɵbh=X,t.ɵbi=K,t.ɵbj=G,t.ɵbn=W,t.ɵbp=J,t.ɵbq=$,t.ɵbr=Q,t.ɵbs=et,t.ɵc=E,t.ɵd=j,t.ɵe=H,t.ɵf=V,t.ɵg=N,t.ɵh=U,t.ɵi=L,t.ɵj=k,t.ɵk=B,t.ɵl=_t,t.ɵm=Rt,t.ɵn=Ot,t.ɵo=Mt,t.ɵp=It,t.ɵq=Dt,t.ɵr=st,t.ɵu=q,t.ɵv=dt,t.ɵw=xt,t.ɵx=At,t.ɵy=wt,t.ɵz=ht,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/common"),require("@angular/core"),require("@angular/forms"),require("@angular/material"),require("@angular/material/tabs"),require("@angular/platform-browser/animations"),require("@coolon/pectin"),require("@angular/cdk/portal"),require("@angular/router"),require("lodash"),require("@coolon/typescript-utilities"),require("@angular/material/dialog"),require("@angular/material/icon"),require("@angular/material/list"),require("@angular/material/tooltip"),require("@typescript-plus/fast-memoize-decorator/dist/src"),require("@typescript-plus/fast-memoize-decorator"),require("reflect-metadata"),require("@angular/animations"),require("resize-observer-polyfill"),require("rxjs")):"function"==typeof define&&define.amd?define("@coolon/angular-ui-powerups",["exports","@angular/common","@angular/core","@angular/forms","@angular/material","@angular/material/tabs","@angular/platform-browser/animations","@coolon/pectin","@angular/cdk/portal","@angular/router","lodash","@coolon/typescript-utilities","@angular/material/dialog","@angular/material/icon","@angular/material/list","@angular/material/tooltip","@typescript-plus/fast-memoize-decorator/dist/src","@typescript-plus/fast-memoize-decorator","reflect-metadata","@angular/animations","resize-observer-polyfill","rxjs"],e):e(((t=t||self).coolon=t.coolon||{},t.coolon["angular-ui-powerups"]={}),t.ng.common,t.ng.core,t.ng.forms,t.ng.material,t.ng.material.tabs,t.ng.platformBrowser.animations,t.pectin,t.ng.cdk.portal,t.ng.router,t.___default,t.typescriptUtilities,t.ng.material.dialog,t.ng.material.icon,t.ng.material.list,t.ng.material.tooltip,t.src,t.fastMemoizeDecorator,null,t.ng.animations,t.ResizeObserver,t.rxjs)}(this,(function(t,e,n,i,o,r,a,s,c,u,l,p,d,f,h,y,m,v,g,b,C,I){"use strict";var P="default"in l?l.default:l;C=C&&C.hasOwnProperty("default")?C.default:C;var D=function(t,e){return(D=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function M(t,e){function n(){this.constructor=t}D(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var A=function(){return(A=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function O(t,e,n,i){var o,r=arguments.length,a=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(o=t[s])&&(a=(r<3?o(a):r>3?o(e,n,a):o(e,n))||a);return r>3&&a&&Object.defineProperty(e,n,a),a}function x(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function w(t,e,n,i){return new(n||(n=Promise))((function(o,r){function a(t){try{c(i.next(t))}catch(t){r(t)}}function s(t){try{c(i.throw(t))}catch(t){r(t)}}function c(t){t.done?o(t.value):new n((function(e){e(t.value)})).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function R(t,e){var n,i,o,r,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(o=2&r[0]?i.return:r[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,r[1])).done)return o;switch(i=0,o&&(r=[2&r[0],o.value]),r[0]){case 0:case 1:o=r;break;case 4:return a.label++,{value:r[1],done:!1};case 5:a.label++,i=r[1],r=[0];continue;case 7:r=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===r[0]||2===r[0])){a=0;continue}if(3===r[0]&&(!o||r[1]>o[0]&&r[1]<o[3])){a.label=r[1];break}if(6===r[0]&&a.label<o[1]){a.label=o[1],o=r;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(r);break}o[2]&&a.ops.pop(),a.trys.pop();continue}r=e.call(t,a)}catch(t){r=[6,t],i=0}finally{n=o=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}}function S(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var i,o,r=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(t){o={error:t}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function _(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(S(arguments[e]));return t}var T=function(t){function e(e){var n=t.call(this)||this;return n.elementRef=e,n._commandEnabled=(new s.DelegatingValueModel).withDefault(!1),n._commandParameterProvided=!1,n}return M(e,t),Object.defineProperty(e.prototype,"pectinCommand",{get:function(){return this._command},set:function(t){this._command=t,this._commandEnabled.setDelegate(t?t.enabled:null)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"commandParameter",{get:function(){return this._commandParameter},set:function(t){this._commandParameterProvided=!0,this._commandParameter=t},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){s.assert.notNil(this.pectinCommand),this.pectinCommand instanceof s.UnaryCommand?this._commandParameterProvided||s.lang.illegalState("UnaryCommands required the command parameter to be specified."):this._commandParameterProvided&&s.lang.illegalState("command parameters are only supported by UnaryCommands")},e.prototype.ngAfterViewInit=function(){var t=this;(0,s.Dsl.disposeWith(this).chain)(this._commandEnabled).subscribe((function(e){e?(t.elementRef.nativeElement.removeAttribute("disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.setAttribute("href","javascript:void")):(t.elementRef.nativeElement.setAttribute("disabled","disabled"),"A"===t.elementRef.nativeElement.tagName&&t.elementRef.nativeElement.removeAttribute("href"))}))},e.prototype.ngOnDestroy=function(){this.dispose()},e.prototype.notifyClick=function(t){t.preventDefault(),t.stopPropagation(),this.pectinCommand.enabled.value?this.pectinCommand instanceof s.UnaryCommand?this.pectinCommand.withContext({event:t}).execute(this.commandParameter):this.pectinCommand.withContext({event:t}).execute():console.warn("disabled command clicked, ignoring.")},e.decorators=[{type:n.Directive,args:[{selector:"[pectinCommand]"}]}],e.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]}]},e.propDecorators={pectinCommand:[{type:n.Input}],commandParameter:[{type:n.Input}],notifyClick:[{type:n.HostListener,args:["click",["$event"]]}]},e}(s.GarbageCollector);var F=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e.prototype.ngOnDestroy=function(){this.dispose()},e}(s.GarbageCollector),E=function(t){function i(e,n,i){var o=t.call(this)||this;return o.el=e,o.ngZone=n,o.document=i,o}return M(i,t),i.prototype.onFocusIn=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusIn()},i.prototype.onFocusOut=function(){this.hasBinding()&&this.pectinFocusBinding.focusContext.notifyFocusOut()},i.prototype.ngOnInit=function(){},i.prototype.ngAfterViewInit=function(){var t=this;this.hasBinding()?(0,s.Dsl.disposeWith(this).chain)(this.pectinFocusBinding.focusContext.focused).subscribe((function(e){e&&!t.alreadyHasFocus()&&t.tryAndFocus()})):s.Logger.get(this).warn("pectinFocusBinding was nil")},i.prototype.hasBinding=function(){return!!this.pectinFocusBinding&&!!this.pectinFocusBinding.focusContext},i.prototype.alreadyHasFocus=function(){return this.isFocused(this.focusTarget)},i.prototype.isFocused=function(t){return this.document.activeElement===t},i.prototype.tryAndFocus=function(t){var e=this;void 0===t&&(t=5),this.modelShouldStillHaveFocus()&&this.canFocus()&&(this.alreadyHasFocus()||this.focusTarget.focus(),this.alreadyHasFocus()||(s.Logger.get(this).log("focus failed, trying "+t+" more times"),t>0?requestAnimationFrame((function(){e.tryAndFocus(t-1)})):s.Logger.get(this).warn("Tried to focus but gave up as the component wasn't enabled or visible.")))},Object.defineProperty(i.prototype,"focusTarget",{get:function(){return this.focusBindingTarget||this.el.nativeElement},enumerable:!0,configurable:!0}),i.prototype.modelShouldStillHaveFocus=function(){return this.hasBinding()&&this.pectinFocusBinding.focusContext.focused.value},i.prototype.canFocus=function(){var t=this.focusTarget.getBoundingClientRect();return t.height>=0&&t.height>=0&&!this.focusTarget.disabled},i.decorators=[{type:n.Directive,args:[{selector:"[pectinFocusBinding]"}]}],i.ctorParameters=function(){return[{type:n.ElementRef,decorators:[{type:n.Inject,args:[n.ElementRef]}]},{type:n.NgZone,decorators:[{type:n.Inject,args:[n.NgZone]}]},{type:void 0,decorators:[{type:n.Inject,args:[e.DOCUMENT]}]}]},i.propDecorators={pectinFocusBinding:[{type:n.Input}],focusBindingTarget:[{type:n.Input}],onFocusIn:[{type:n.HostListener,args:["focusin"]}],onFocusOut:[{type:n.HostListener,args:["focusout"]}]},i}(F);var N=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[T,E],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule],exports:[T,E]}]}],t}(),L=function(t){function e(){var e=t.call(this)||this;e.valueModel=new s.DelegatingFormValueModel,e.focus=new n.EventEmitter,e.blur=new n.EventEmitter,e.enterKey=new n.EventEmitter,e.escapeKey=new n.EventEmitter;var i=e;return e.errorStateMatcher={isErrorState:function(t,e){return i.hasErrors()}},e}return M(e,t),Object.defineProperty(e.prototype,"userValueModel",{set:function(t){this.valueModel.setDelegate(t)},enumerable:!0,configurable:!0}),e.prototype.notifyClick=function(){this.safelyInvoke(this.clickCommand)},e.prototype.notifyFocusIn=function(){this.safelyInvoke(this.focusCommand),this.focus.emit()},e.prototype.notifyFocusOut=function(){this.safelyInvoke(this.blurCommand),this.blur.emit()},e.prototype.notifyEnterKey=function(){this.safelyInvoke(this.enterCommand),this.enterKey.emit()},e.prototype.notifyEscapeKey=function(){this.safelyInvoke(this.escapeCommand),this.escapeKey.emit()},e.prototype.safelyInvoke=function(t){t&&t.enabled.value&&t.execute()},e.prototype.ngOnInit=function(){},e.prototype.isEnabled=function(){return this.enabled.value},Object.defineProperty(e.prototype,"enabled",{get:function(){return this.valueModel.enabled},enumerable:!0,configurable:!0}),e.prototype.hasErrors=function(){return!this.errorList.query().isEmpty()},Object.defineProperty(e.prototype,"errorList",{get:function(){return this.valueModel.errorList},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"firstError",{get:function(){return this.hasErrors()?this.errorList.value[0]:null},enumerable:!0,configurable:!0}),e.propDecorators={userValueModel:[{type:n.Input,args:["valueModel"]}],label:[{type:n.Input}],floatLabel:[{type:n.Input}],hint:[{type:n.Input}],placeholder:[{type:n.Input}],focusCommand:[{type:n.Input,args:["command.focus"]}],blurCommand:[{type:n.Input,args:["command.blur"]}],enterCommand:[{type:n.Input,args:["command.enter"]}],escapeCommand:[{type:n.Input,args:["command.escape"]}],clickCommand:[{type:n.Input,args:["command.click"]}],focus:[{type:n.Output}],blur:[{type:n.Output}],enterKey:[{type:n.Output}],escapeKey:[{type:n.Output}],notifyClick:[{type:n.HostListener,args:["click"]}],notifyFocusIn:[{type:n.HostListener,args:["focusin"]}],notifyFocusOut:[{type:n.HostListener,args:["focusout"]}]},O([s.UseDelegate(),x("design:type",s.ValueModel),x("design:paramtypes",[s.ValueModel])],e.prototype,"userValueModel",null),e}(F);var j=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-number-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="number"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(L),V=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-password-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input type="password"\n matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(L),k=function(t){function e(){var e=t.call(this)||this;return e.optionLabelFormat=function(t){return t&&e.optionLabel?t[e.optionLabel]:t},e}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-select-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <mat-select placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-option *ngFor="let option of optionsModel.value" [value]="option">{{optionLabelFormat(option)}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n',styles:[":host{display:inline-block}mat-form-field{width:100%}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={optionsModel:[{type:n.Input}],options:[{type:n.Input}],optionLabel:[{type:n.Input}],optionLabelFormat:[{type:n.Input}]},O([s.UseDelegate(),x("design:type",s.ListModel)],e.prototype,"optionsModel",void 0),O([s.StoreInListModel("optionsModel"),x("design:type",Array)],e.prototype,"options",void 0),e}(L);var U=function(t){function e(){return t.call(this)||this}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-string-input",template:'<mat-form-field appearance="standard" [floatLabel]="floatLabel">\n <mat-label *ngIf="label">{{label}}</mat-label>\n <input matInput\n placeholder="{{placeholder}}"\n [(ngModel)]="valueModel.value"\n [disabled]="!enabled.value"\n (keydown.enter)="notifyEnterKey()"\n (keydown.escape)="notifyEscapeKey()"\n [pectinFocusBinding]="valueModel"\n [errorStateMatcher]="errorStateMatcher"\n >\n <mat-hint *ngIf="hint">{{hint}}</mat-hint>\n <mat-error *ngIf="hasErrors">{{firstError}}</mat-error>\n</mat-form-field>\n\n',styles:[":host{display:block}input,mat-form-field{width:100%}input mat-hint.faux-error,mat-form-field mat-hint.faux-error{color:#f44336}"]}]}],e.ctorParameters=function(){return[]},e}(L),B=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-noop",template:"",styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),H=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[j,U,V,k,B],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,N],exports:[j,U,V,k,B]}]}],t}(),q=new n.InjectionToken("InteractionActivityData");t.ɵbh=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._busyModel=(new s.DelegatingValueModel).withDefault(!1),e}return M(e,t),e.prototype.initialise=function(t){p.assert.isNil(this._activityContext),this._activityContext=t},e.prototype.done=function(t){return this._activityContext.onDone(t)},e.prototype.cancel=function(t){this._activityContext.onCancel(t)},e.prototype.onActivityReady=function(){},Object.defineProperty(e.prototype,"busy",{get:function(){return this._busyModel.readonly},enumerable:!0,configurable:!0}),e.prototype.busyWhile=function(t){this._busyModel.setDelegate(t)},e.prototype.isBusy=function(){return this._busyModel.value},e}(s.GarbageCollector),function(t){function e(){}t.Callbacks=e}(t.ɵbh||(t.ɵbh={}));var G=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return M(e,t),e}(t.ɵbh),z=function(t){function e(e){var n=t.call(this)||this;return n.alert=e,n}return M(e,t),e.prototype.ngOnInit=function(){},e.decorators=[{type:n.Component,args:[{selector:"aup-alert-dialog",template:'<h3 matDialogTitle *ngIf="alert.title">{{alert.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of alert.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-raised-button color="primary" (click)="done()" data-cy="close-button">{{alert.ok()}}</button>\n</div>\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(G);t.ɵbc=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.activityListeners=new s.EventListenerList,e}return M(e,t),e.prototype.isActive=function(){return this.active.value},e.prototype.addActivityListener=function(t){return this.activityListeners.add(t)},e.prototype.notifyActivityStarted=function(){this.activityListeners.fire((function(t){return t.onActivityStarted()}))},e.prototype.notifyActivityFinished=function(){this.activityListeners.fire((function(t){return t.onActivityFinished()}))},e}(s.GarbageCollector),function(t){function e(){}t.Listener=e}(t.ɵbc||(t.ɵbc={})),t.ɵbj=function(e){function i(t,n){var i=e.call(this)||this;return i.config=t,i.interactionContext=n,s.assert.notNil(t),i}return M(i,e),i.prototype.ngOnInit=function(){},Object.defineProperty(i.prototype,"confirm",{get:function(){return this.config.confirm},enumerable:!0,configurable:!0}),i.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},i.prototype.onConfirm=function(){var t=this;this.interactionContext.startActivity(this.config.activityType,this.config.data).then((function(e){return t.done(e)})).catch((function(e){return t.cancel(e)}))},i.decorators=[{type:n.Component,args:[{selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="onConfirm()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],i.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]},{type:t.ɵbc}]},i}(G),function(t){function e(){}t.Data=e}(t.ɵbj||(t.ɵbj={}));var K=function(t){function e(e){var n=t.call(this)||this;return n.confirm=e,s.assert.notNil(e),n}return M(e,t),e.prototype.ngOnInit=function(){},e.prototype.isDestructive=function(){return this.confirm.destructive&&this.confirm.destructive()},e.decorators=[{type:n.Component,args:[{selector:"aup-confirmation-dialog",template:'<h3 matDialogTitle *ngIf="confirm.title">{{confirm.title()}}</h3>\n<div matDialogContent>\n <p *ngFor="let line of confirm.content()">{{line}}</p>\n</div>\n<div matDialogActions>\n <button mat-button (click)="cancel()" data-cy="cancel-button">{{confirm.cancel()}}</button>\n <button mat-raised-button [color]="isDestructive() ? \'warn\' : \'primary\'"\n (click)="done()" data-cy="confirm-button">{{confirm.ok()}}</button>\n</div>\n\n',styles:[":host{display:block;padding:var(--aup-default-padding)}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{justify-content:flex-end}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:n.Inject,args:[q]}]}]},e}(G);var W=function(e){function n(){var t=e.call(this)||this;t._activityListDelegate=new s.DelegatingListModel;var n=s.Dsl.disposeWith(t),i=(n.chain,n.valueOf,n.before,n.when);n.after,n.observe,n.switchOn;return i.listOf(t.activityList).becomesPopulated((function(e){t.deferredGetCurrentActivity&&(t.deferredGetCurrentActivity.resolve(l.last(e)),t.deferredGetCurrentActivity=null)})),t}return M(n,e),n.prototype.setActivityList=function(t){this._activityListDelegate.setDelegate(t)},Object.defineProperty(n.prototype,"activityList",{get:function(){return this._activityListDelegate.readonly},enumerable:!0,configurable:!0}),n.prototype.getCurrentActivity=function(){return w(this,void 0,void 0,(function(){return R(this,(function(t){return this.isActive()?this.deferredGetCurrentActivity?[2,this.deferredGetCurrentActivity.promise]:this.activityList.length<1?(this.deferredGetCurrentActivity=s.Deferred.defer(),[2,this.deferredGetCurrentActivity.promise]):[2,l.last(this.activityList.value)]:[2,Promise.reject("no activity in progress")]}))}))},n.prototype.startActivity=function(t,e){return this._startActivity(t,e)},n.prototype.confirm=function(t){return this.confirmOrReject(t).then((function(){return!0})).catch((function(){return!1}))},n.prototype.alert=function(t){return this._startActivity(z,t,!1)},n.prototype.confirmOrReject=function(t){return this._startActivity(K,t,!0)},n.prototype.confirmThen=function(e,n,i){return this._startActivity(t.ɵbj,{confirm:e,activityType:n,data:i},!0)},n}(t.ɵbc);var X=function(){function e(t,e,n){this.componentFactoryResolver=t,this.viewContainerRef=e,this.injector=n}return Object.defineProperty(e.prototype,"activityContext",{get:function(){return this._activityContext},set:function(t){s.assert.isNil(this._activityContext),this._activityContext=t,this.loadActivity(t)},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.loadActivity=function(e){var i=n.Injector.create({providers:[{provide:t.ɵbc,useValue:this.interactionContext},{provide:q,useValue:e.activityData}],parent:this.injector}),o=this.componentFactoryResolver.resolveComponentFactory(e.activityClass);this.viewContainerRef.clear(),this.activityComponentRef=this.viewContainerRef.createComponent(o,0,i),this.activityComponentRef.instance.initialise(e),this.activityContext.componentReady&&this.activityContext.componentReady(this.component)},Object.defineProperty(e.prototype,"component",{get:function(){return this.activityComponentRef.instance},enumerable:!0,configurable:!0}),e.decorators=[{type:n.Component,args:[{selector:"aup-activity-outlet",template:"",styles:[":host{display:block}"]}]}],e.ctorParameters=function(){return[{type:n.ComponentFactoryResolver},{type:n.ViewContainerRef},{type:n.Injector}]},e.propDecorators={interactionContext:[{type:n.Input}],activityContext:[{type:n.Input}]},e}();var Z=function(){function t(t,e,n,i){this.activityData=t,this.activityClass=e,this.interactionContext=n,this.activityCallbacks=i,this._complete=!1}return t.prototype.isComponentRealised=function(){return!!this._component},t.prototype.isComplete=function(){return this._complete},t.prototype.componentReady=function(t){s.assert.isNil(this._component),this._component=t},Object.defineProperty(t.prototype,"component",{get:function(){return this._component},enumerable:!0,configurable:!0}),t.prototype.onDone=function(t){this._complete=!0,this.activityCallbacks.onDone(t)},t.prototype.onCancel=function(t){this._complete=!0,this.activityCallbacks.onCancel(t)},t}();var Y=function(t){function e(){var e=t.call(this)||this;e.throttledNestedActivityFinishEvents=new s.MutableStream,e._initialActivityOutletContext=new s.MutableValueModel,e.initialActivityOutletContextEvent=new n.EventEmitter,e.dynamicHeight=!1,e.activityTabs=new s.MutableListModel,e._activityList=new s.MutableListModel;var i=s.Dsl.disposeWith(e),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return o(e.throttledNestedActivityFinishEvents).throttle(50).subscribe((function(){return e.onNestedActivityFinished()})),e.setActivityList(e._activityList.readonly),e.active=o(e._initialActivityOutletContext).isNotNil(),e}return M(e,t),Object.defineProperty(e.prototype,"initialActivityOutletContext",{get:function(){return this._initialActivityOutletContext.value},set:function(t){s.assert.isNil(this._initialActivityOutletContext.value),this.activityTabs.value=[],this._activityList.value=[];var e=this;t&&(this._initialActivityOutletContext.value=t,this.activityTabs.push(new Z(t.activityData,t.activityClass,this,{onDone:function(n){e.finishInitialActivity(),t.onDone(n)},onCancel:function(n){e.finishInitialActivity(),t.onCancel(n)}})))},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var t=this,e=s.Dsl.disposeWith(this),n=(e.chain,e.observe);n.valuesFrom(this.outlets.changes).subscribe((function(){return setTimeout((function(){return t.updateActivityList()}))})),n.valuesFrom(this.tabs.animationDone).subscribe((function(){return t.onAnimationFinished()})),this.updateActivityList()},e.prototype._startActivity=function(t,e){var n=this;this.cleanupStaleNestedActivities();var i=this;return new Promise((function(o,r){var a=new Z(e,t,i,{onDone:function(t){o(t),i.throttledNestedActivityFinishEvents.publish({})},onCancel:function(t){r(t),i.throttledNestedActivityFinishEvents.publish({})}});i.activityTabs.push(a),i.tabs.selectedIndex=n.activityTabs.length}))},e.prototype.finishInitialActivity=function(){this._initialActivityOutletContext.value=null,this.initialActivityOutletContextEvent.emit(null)},e.prototype.onNestedActivityFinished=function(){this.synchroniseSelectedTabIndex(),this.updateActivityList()},e.prototype.cleanupStaleNestedActivities=function(){var t=this;this.tabs.selectedIndex<this.activityTabs.length-1&&this.activityTabs.runInTransaction((function(e){e.value=e.value.slice(0,1+t.tabs.selectedIndex)}))},e.prototype.synchroniseSelectedTabIndex=function(){var t=this.tabs.selectedIndex,e=this.activityTabs.query().findIndex((function(t){return t.isComplete()}))-1;return this.tabs.selectedIndex=e,t===e},e.prototype.onAnimationFinished=function(){this.getSelectedOutlet().component.onActivityReady(),this.cleanupStaleNestedActivities(),this.updateActivityList()},e.prototype.updateActivityList=function(){this._activityList.value=this.activityTabs.value.filter((function(t){return!t.isComplete()&&t.isComponentRealised()})).map((function(t){return t.component}))},e.prototype.getSelectedOutlet=function(){return this.outlets.toArray()[this.tabs.selectedIndex]},e.decorators=[{type:n.Component,args:[{selector:"aup-activity-container",template:'<mat-tab-group #tabs no-tab-header [dynamicHeight]="dynamicHeight" [class.full-height-tabs]="!dynamicHeight">\n <mat-tab *ngFor="let tab of activityTabs.value">\n <aup-activity-outlet [interactionContext]="this" [activityContext]="tab"></aup-activity-outlet>\n </mat-tab>\n</mat-tab-group>\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={initialActivityOutletContext:[{type:n.Input}],initialActivityOutletContextEvent:[{type:n.Output,args:["initialActivityOutletContext"]}],dynamicHeight:[{type:n.Input}],tabs:[{type:n.ViewChild,args:["tabs",{static:!0}]}],outlets:[{type:n.ViewChildren,args:[X]}]},e}(W);var J=function(t){function e(){var e=t.call(this)||this;return e._active=new s.MutableValueModel(!1),e}return M(e,t),e.prototype.ngAfterViewInit=function(){this.setActivityList(this.interactionContext.activityList)},Object.defineProperty(e.prototype,"active",{get:function(){return this._active.readonly},enumerable:!0,configurable:!0}),e.prototype._startActivity=function(t,e){var n=this;this._active.value=!0;var i=this;return new Promise((function(o,r){n.interactionContext.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){i._active.value=!1,o(t)},onCancel:function(t){i._active.value=!1,r(t)}}}))},e.decorators=[{type:n.Component,args:[{selector:"aup-inplace-interaction-context",template:'<mat-tab-group no-tab-header [selectedIndex]="isActive() ? 1 : 0" full-height-tabs [dynamicHeight]="false">\n <mat-tab>\n <ng-content></ng-content>\n </mat-tab>\n <mat-tab>\n <aup-activity-container #activityContainer\n [(initialActivityOutletContext)]="initialActivityContext"\n [dynamicHeight]="false"></aup-activity-container>\n </mat-tab>\n</mat-tab-group>\n\n',styles:[":host{display:flex;flex-direction:column}mat-tab-group{flex:1}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={interactionContext:[{type:n.ViewChild,args:["activityContainer",{static:!0}]}]},e}(W);var $=function(){function t(){}return t.decorators=[{type:n.Component,args:[{selector:"aup-interaction-outlet",template:'<router-outlet name="interaction-context"></router-outlet>\n',styles:[":host{display:block}"]}]}],t.ctorParameters=function(){return[]},t}(),Q=function(t){function e(e,n){var i=t.call(this)||this;return i.dialogService=e,i.config=n,i._activeModel=new s.MutableValueModel(!1),p.assert.notNil(e),i.onDispose((function(){i.isActive()&&s.lang.illegalState("Dispose called while active.")})),i}return M(e,t),Object.defineProperty(e.prototype,"active",{get:function(){return this._activeModel.readonly},enumerable:!0,configurable:!0}),e.prototype._startActivity=function(t,e,n){var i=this;void 0===n&&(n=!0),this.isActive()&&s.lang.illegalState("Activity already in progress: "+this.activityList.value.map((function(t){return t.constructor.name})).join(", ")),this._activeModel.value=!0,this.notifyActivityStarted();var o=A({},this.config,{data:e,disableClose:n,panelClass:"dialog-interaction-service"}),r=this,a=this.dialogService.open(Y,o);return new Promise((function(n,i){var o=a.componentInstance;r.safelyUpdateActivityListDelegate(o.activityList),o.initialActivityOutletContext={activityClass:t,activityData:e,onDone:function(t){n(t),a.close(!0)},onCancel:function(t){i(t),a.close(!0)}},a.afterClosed().subscribe((function(t){t||i("auto-closed")})),a.updateSize(),a.afterOpened().subscribe((function(t){a.updateSize()}))})).finally((function(){i._activeModel.value=!1,i.notifyActivityFinished(),r.safelyUpdateActivityListDelegate(null)}))},e.prototype.safelyUpdateActivityListDelegate=function(t){var e=this;setTimeout((function(){return e.setActivityList(t)}))},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:o.MatDialog},{type:d.MatDialogConfig}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(d.MatDialog),n.ɵɵinject(d.MatDialogConfig))},token:e,providedIn:"root"}),e}(W);!function(t){function e(){return t.call(this,{initialValue:!1})||this}M(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.store.read()},enumerable:!0,configurable:!0}),e.prototype.whileTrue=function(t){this.startTransaction().commit(!0);try{return t()}finally{this.startTransaction().commit(!1)}},e.prototype.runIfFalse=function(t,e){return void 0===e&&(e=null),this.value?e:t()}}(s.ValueModel);var tt=function(t){function e(){var e=t.call(this)||this;return e._activityListeners=new s.EventListenerList,e}return M(e,t),e.prototype.isActive=function(){return this.active.value},e.prototype.addActivityListener=function(t){return this._activityListeners.add(t)},e.prototype.notifyActivityStarted=function(){this._activityListeners.fire((function(t){return t.onActivityStarted()}))},e.prototype.notifyActivityFinished=function(){this._activityListeners.fire((function(t){return t.onActivityFinished()}))},e}(s.GarbageCollector);var et=new n.InjectionToken("DIALOG_INTERACTION_SERVICE_DEFAULTS"),nt=function(t){function e(e,n,i){var o=t.call(this)||this;o.dialogService=e,o.dialogServiceDefaults=n,o.matDialogDefaultConfig=i,o._activeInteractionContextModel=new s.MutableValueModel,p.assert.notNil(e);var r=s.Dsl.disposeWith(o),a=r.chain;r.valueOf,r.before,r.when,r.after,r.observe,r.switchOn;return o.active=a(o._activeInteractionContextModel).isNotNil(),o}return M(e,t),e.prototype.createInteractionContextFor=function(t){return t.registerDisposable(this._createInteractionContext())},e.prototype._createInteractionContext=function(){var t=A({autoFocus:!1,hasBackdrop:!0,closeOnNavigation:!1},this.matDialogDefaultConfig,this.dialogServiceDefaults),e=this,n=new Q(this.dialogService,t);return n.registerDisposable(n.addActivityListener({onActivityStarted:function(){e.onActivityStarted(n)},onActivityFinished:function(){e.onActivityFinished(n)}})),n},e.prototype.createExclusiveInteractionContext=function(){this.exclusiveContext=this._createInteractionContext();var t=this;return this.exclusiveContext.registerDisposable({dispose:function(){t.exclusiveContext=null}}),this.exclusiveContext},e.prototype.onActivityStarted=function(t){p.assert.isFalsey(this.isActive()),this.exclusiveContext&&t!==this.exclusiveContext&&s.lang.illegalState("Interaction started while exclusive lock active. This is usually because you using a different context during place.canDeactivate(interactionContext)"),this._activeInteractionContextModel.value=t,this.notifyActivityStarted()},e.prototype.onActivityFinished=function(t){p.assert.isTruthy(this._activeInteractionContextModel.value===t),this._activeInteractionContextModel.value=null,this.notifyActivityFinished()},e.prototype.getCurrentActivity=function(){return w(this,void 0,void 0,(function(){return R(this,(function(t){return p.assert.isTruthy(this.isActive()),[2,this._activeInteractionContextModel.value.getCurrentActivity()]}))}))},e.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:o.MatDialog},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[et]}]},{type:d.MatDialogConfig,decorators:[{type:n.Optional},{type:n.Inject,args:[d.MAT_DIALOG_DEFAULT_OPTIONS]}]}]},e.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new e(n.ɵɵinject(d.MatDialog),n.ɵɵinject(et,8),n.ɵɵinject(d.MAT_DIALOG_DEFAULT_OPTIONS,8))},token:e,providedIn:"root"}),e}(tt);var it=function(){function i(){}return i.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,o.MatButtonModule,o.MatDialogModule,o.MatTabsModule,c.PortalModule,u.RouterModule],declarations:[Y,K,t.ɵbj,z,X,$,J],exports:[Y,X,$,J],entryComponents:[Y,K,t.ɵbj,z],providers:[nt]}]}],i}();t.ParameterDefinition=function(){function t(t,e,n){this.propertyName=t,this.urlFormat=n,this.options=p.Opts.get(e),this.remember=this.options.getOptional("remember",!1),this.defaultValue=this.options.getOptional("defaultValue",null)}return Object.defineProperty(t.prototype,"name",{get:function(){return this.options.getOptional("as",this.propertyName)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isRouteParameter",{get:function(){return!!this.urlFormat},enumerable:!0,configurable:!0}),t.prototype.getOptionValue=function(t){return this.options.getOptional(t,null)},t.prototype.sanitise=function(t,e,n,i){return w(this,void 0,void 0,(function(){var i;return R(this,(function(o){return this.isMissingFrom(e)?(i=P.first(n.getHistory(e.placeDefinition)),this.remember&&i&&(t=i.getParameter(this.name)),[2,this.isEmptyValue(t)?this.defaultValue:t]):[2,t]}))}))},t.prototype.isMissingFrom=function(t){return!t.hasParameter(this.name)},t}(),function(t){function e(){}t.Options=e;var n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!0,e.isArray=!1,e}return M(e,t),e.prototype.isEmptyValue=function(t){return P.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.RouteId=n;var i=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isRouteId=!1,e.isArray=!1,e}return M(e,t),e.prototype.isEmptyValue=function(t){return P.isNil(t)},e.prototype.hasChanged=function(t,e){return t!==e},e}(t);t.ValueParameter=i;var o=function(t){function e(e,n,i){var o=t.call(this,e,n,i)||this;return o.isRouteId=!1,o.isArray=!0,o}return M(e,t),e.prototype.isEmptyValue=function(t){return P.isNil(t)||t.length<1},e.prototype.hasChanged=function(t,e){return!P.isEqual(t,e)},e}(t);t.ArrayParameter=o}(t.ParameterDefinition||(t.ParameterDefinition={})),t.PlaceDefinition=function(){function e(t,e,n,i,o,r){this.component=t,this.path=e,this.authenticate=n,this.data=i,this.routeParameters=o,this.children=r}return e.prototype.hasRouteId=function(){return!!this.getRouteIdParameterDef()},e.prototype.getRouteIdParameterDef=function(){return this.routeParameters.find((function(t){return t.isRouteId}))},e.prototype.getRouteParameterDefs=function(t){return void 0===t&&(t=!1),this.getVisitParameterDefs({includeRouteId:t,includeRouteParameters:!0})},e.prototype.getVisitParameterDefs=function(t){var e=p.Opts.get(t),n=!t||e.getOptional("includeRouteId",!1),i=!t||e.getOptional("includeRouteParameters",!1),o=!t||e.getOptional("includeNonRouteParameters",!1);return this.routeParameters.filter((function(t){return n&&t.isRouteId||i&&t.isRouteParameter&&!t.isRouteId||o&&!t.isRouteParameter}))},e.prototype.getPlaceData=function(t,e){return this.data?P.isNil(this.data[t])?e:this.data[t]:e},e.prototype.searchPlaceData=function(t,e){var n=this;if(this.data){var i=t.find((function(t){return!P.isNil(n.data[t])}));return i?this.data[i]:e}return e},e.prototype.getRouteIdFrom=function(t){var e=this.getRouteIdParameterDef();return e?t.getParameter(e.name):null},e.prototype.getFormattedRouteId=function(t){return t.hasRouteId()?this.getRouteIdParameterDef().urlFormat.format(t.getRouteId()):""},e.prototype.getFormattedRouteParameters=function(t,e){void 0===e&&(e=!1);var n={};return this.getVisitParameterDefs({includeRouteId:e,includeRouteParameters:!0}).forEach((function(e){var i=t.getParameter(e.name);e.isEmptyValue(i)||(e.isArray?(s.assert.isArray(i),n[e.name]=i.map((function(t){return e.urlFormat.format(t)}))):(s.assert.isFalsey(Array.isArray(i)),n[e.name]=e.urlFormat.format(i)))})),n},e.prototype.getNonRouteParameters=function(t){var e={};return this.getVisitParameterDefs({includeNonRouteParameters:!0}).forEach((function(n){var i=t.getParameter(n.name);n.isEmptyValue(i)||(e[n.name]=i)})),e},e.prototype.parseRouteParams=function(t){var e={};return this.getVisitParameterDefs({includeRouteId:!0,includeRouteParameters:!0,includeNonRouteParameters:!1}).forEach((function(n){if(t.has(n.name))if(n.isArray){var i=t.getAll(n.name);e[n.name]=i.map((function(t){return n.urlFormat.parse(t)}))}else{var o=t.get(n.name);n.isRouteId&&P.isEmpty(o)||(e[n.name]=n.urlFormat.parse(o))}})),e},O([m.Memoize(),x("design:type",Function),x("design:paramtypes",[]),x("design:returntype",t.ParameterDefinition)],e.prototype,"getRouteIdParameterDef",null),O([m.Memoize(),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",Array)],e.prototype,"getRouteParameterDefs",null),O([m.Memoize(),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",Array)],e.prototype,"getVisitParameterDefs",null),e}(),function(t){function e(){}t.ParameterOptions=e}(t.PlaceDefinition||(t.PlaceDefinition={}));var ot,rt="PLACE_DEFINITION_OPTIONS",at=Symbol("place:route:parameters");t.PlaceComponent=function(e){function n(){return e.call(this)||this}return M(n,e),n.prototype.initialiseBindings=function(t){var e=this;s.assert.isNil(this.visit),this.visit=t,this.placeDefinition.getVisitParameterDefs().forEach((function(t){e.installBinding(t)}))},n.prototype.installBinding=function(t){var e=this[t.propertyName];this.registerDisposable(new s.Binding(this.visit,e,{toRight:function(e){return e.getParameter(t.name)},toLeft:function(e,n){return console.log("push to route",{name:t.name,value:e,currentVisit:n}),n.replace(t,e)}}))},Object.defineProperty(n.prototype,"placeDefinition",{get:function(){return n.getDefinition(this.constructor)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"childPlaces",{get:function(){return this.placeDefinition.children.map((function(t){return t.component}))},enumerable:!0,configurable:!0}),n.prototype.onPlaceReady=function(){},O([v.Memoize(),x("design:type",t.PlaceDefinition),x("design:paramtypes",[])],n.prototype,"placeDefinition",null),n}(F),(ot=t.PlaceComponent||(t.PlaceComponent={})).isPlaceComponentConstructor=function(t){return s.lang.constructorChain(t).includes(ot)},ot.getRouteParameters=function(t){return p.Klass.get(t).getMetadataList(at)},ot.getDefinition=function(t){return Reflect.getMetadata(rt,t)},ot.injectDefinition=function(t,e){Reflect.defineMetadata(rt,e,t)};var st=function(){function t(t,e){void 0===e&&(e={}),this.placeDefinition=t,this.visitParameters=e}return t.prototype.getRouteId=function(){return this.placeDefinition.getRouteIdFrom(this)},t.prototype.hasRouteId=function(){return!l.isNil(this.getRouteId())},t.prototype.getParameter=function(t){return this.visitParameters[t]},t.prototype.hasParameter=function(t){return Object.keys(this.visitParameters).includes(t)},t.prototype.replace=function(e,n){var i;return new t(this.placeDefinition,A({},this.visitParameters,((i={})[e.name]=n,i)))},t.prototype.mergeRouteParameters=function(e){var n=this,i=Object.keys(e),o={};return this.placeDefinition.getVisitParameterDefs().forEach((function(t){if(t.isRouteId||t.isRouteParameter)i.includes(t.name)&&(o[t.name]=e[t.name]);else{var r=n.getParameter(t.name);n.hasParameter(t.name)&&(o[t.name]=r)}})),new t(this.placeDefinition,o)},t.prototype.hasRoutingChangedFrom=function(t){var e=t.placeDefinition===this.placeDefinition,n=l.isEqual(this.placeDefinition.getFormattedRouteParameters(this,!0),this.placeDefinition.getFormattedRouteParameters(t,!0));return!e||!n},t.prototype.hasChangedFrom=function(t){return!l.isEqual(this.placeDefinition.getNonRouteParameters(this),this.placeDefinition.getNonRouteParameters(t))||this.hasRoutingChangedFrom(t)},t}();var ct=new n.InjectionToken("AUP_PLACE_CONFIG");var ut=function(){function t(t,e){this.component=t,this.navigationSession=e}return t.prototype.canDeactivate=function(t){return w(this,void 0,void 0,(function(){return R(this,(function(e){return this.canDeactivatePromise||(this.canDeactivatePromise=this.canDeactivateComponent(t)),[2,this.canDeactivatePromise]}))}))},t.prototype.canDeactivateComponent=function(t){return w(this,void 0,void 0,(function(){return R(this,(function(e){switch(e.label){case 0:return this.navigationSession.isPopState&&this.component.interactionContext&&this.component.interactionContext.isActive()?[4,this.component.interactionContext.getCurrentActivity()]:[3,2];case 1:return e.sent().cancel(null),[2,!1];case 2:return this.isNotJustAChangeInRouteId(t)&&this.component.canDeactivate?[2,this.component.canDeactivate(this.navigationSession.interactionContext)]:[2,!0]}}))}))},t.prototype.isNotJustAChangeInRouteId=function(t){return!t.includesPathOf(this.component.placeDefinition)},t}();t.NavigationState=function(t){function e(e){var n=t.call(this)||this;return n.context=e,n._visits=new Map,n}return M(e,t),Object.defineProperty(e.prototype,"interactionContext",{get:function(){return null},enumerable:!0,configurable:!0}),e.prototype.storeVisit=function(t){this._visits.set(t.placeDefinition,t)},e.prototype.getVisitFor=function(t){return this._visits.get(t)},e.prototype.onBackClickedDuringNavigationInteraction=function(t){return this.illegalTransition("onBackClickedDuringNavigationInteraction")},e.prototype.getVisits=function(){return Array.from(this._visits.values())},e.prototype.illegalTransition=function(t){return s.lang.illegalState(t.toString()+" not supported by "+this.toString())},e.prototype.currentRouterUrl=function(){return this.context.router.routerState?this.context.router.routerState.snapshot.url:null},e.prototype.createActiveSession=function(t){return new e.Active(this.context,"popstate"===t.navigationTrigger,this.currentRouterUrl())},e.prototype.updateLocation=function(t){this.context.angularLocation.go(t)},e.prototype.toString=function(){return this.constructor.name},O([s.Trace(),x("design:type",Function),x("design:paramtypes",[Object]),x("design:returntype",void 0)],e.prototype,"updateLocation",null),e}(s.GarbageCollector),function(t){var e=function(t,e,n,i){this.router=t,this.modalInteractionService=e,this.angularLocation=n,this.notifySuccess=i};t.Context=e;var n=function(t){function e(e){var n=t.call(this,e)||this;return n.active=!1,n.startingUrl=null,n}return M(e,t),e.prototype.canDeactivatePlace=function(t,e){return w(this,void 0,void 0,(function(){return R(this,(function(t){return[2,this.illegalTransition("canDeactivatePlace")]}))}))},e.prototype.onStart=function(t){return t.url===this.currentRouterUrl()?(s.Logger.get(this).info("navigation started to same url -> "+t.url),this):t.url===this.currentRouterUrl()+"(aup-interaction:modal)"?(s.Logger.get(this).info("navigation started with interaction outlet -> "+t.url),new o(this.context,t.url)):this.createActiveSession(t)},e.prototype.onCancel=function(t){return this.illegalTransition(t)},e.prototype.onEnd=function(t){return this.illegalTransition(t)},e.prototype.onError=function(t){return this.illegalTransition(t)},e}(t);t.Idle=n;var i=function(e){function i(t,n,i){var o=e.call(this,t)||this;return o.isPopState=n,o.startingUrl=i,o.active=!0,o.componentDeactivationHandlers=new Map,o._interactionContext=o.context.modalInteractionService.createExclusiveInteractionContext(),o.onDispose((function(){o._interactionContext&&o._interactionContext.dispose()})),o}return M(i,e),Object.defineProperty(i.prototype,"interactionContext",{get:function(){return this._interactionContext},enumerable:!0,configurable:!0}),i.prototype.onStart=function(t){return this},i.prototype.onEnd=function(t){return this.context.notifySuccess(this),new n(this.context)},i.prototype.onCancel=function(t){return this.isPopState&&(s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.updateLocation(this.startingUrl)),this.isPopState?new n(this.context):this},i.prototype.onError=function(t){return this.isPopState&&this.currentRouterUrl()!==this.startingUrl&&(s.Logger.get(this).info("WORK-AROUND: Updating browser location after pop state - see angular issue #13586"),this.updateLocation(this.startingUrl)),new n(this.context)},i.prototype.onBackClickedDuringNavigationInteraction=function(t){var e=this.detachInteractionContext();return e.getCurrentActivity().then((function(t){e.addActivityListener({onActivityFinished:function(){e.dispose()},onActivityStarted:function(){}}),t.cancel(null)})),new r(this.context,this.startingUrl,t)},i.prototype.canDeactivatePlace=function(t,e){return w(this,void 0,void 0,(function(){var n;return R(this,(function(i){return(n=this.componentDeactivationHandlers.get(t))||(0===this.componentDeactivationHandlers.size,n=new ut(t,this),this.componentDeactivationHandlers.set(t,n)),[2,n.canDeactivate(e)]}))}))},i.prototype.detachInteractionContext=function(){var t=this._interactionContext;return this._interactionContext=null,t},i.prototype.toString=function(){return this.constructor.name+"(startingUrl: "+this.startingUrl+", isPopState:"+this.isPopState+")"},O([s.Trace(),x("design:type",Function),x("design:paramtypes",[u.NavigationStart]),x("design:returntype",t)],i.prototype,"onStart",null),O([s.Trace(),x("design:type",Function),x("design:paramtypes",[u.NavigationCancel]),x("design:returntype",t)],i.prototype,"onCancel",null),O([s.Trace(),x("design:type",Function),x("design:paramtypes",[u.NavigationError]),x("design:returntype",t)],i.prototype,"onError",null),i}(t);t.Active=i;var o=function(e){function i(t,n){var i=e.call(this,t)||this;return i.startingUrl=n,i.active=!1,i.isPopState=!1,i}return M(i,e),i.hasInteraction=function(t){return t.endsWith("(aup-interaction:modal)")},i.prototype.onStart=function(t){return this.context.modalInteractionService.isActive()&&(i.hasInteraction(t.url)||this.updateLocation(this.startingUrl)),this},i.prototype.onCancel=function(t){return this},i.prototype.onEnd=function(t){return this.context.modalInteractionService.isActive()?this:new n(this.context)},i.prototype.onError=function(t){return this.illegalTransition(t)},i.prototype.canDeactivatePlace=function(t,e){return w(this,void 0,void 0,(function(){return R(this,(function(t){return[2,!0]}))}))},O([s.Trace(),x("design:type",Function),x("design:paramtypes",[u.NavigationStart]),x("design:returntype",t)],i.prototype,"onStart",null),O([s.Trace(),x("design:type",Function),x("design:paramtypes",[u.NavigationCancel]),x("design:returntype",t)],i.prototype,"onCancel",null),O([s.Trace(),x("design:type",Function),x("design:paramtypes",[u.NavigationEnd]),x("design:returntype",t)],i.prototype,"onEnd",null),i}(t);t.ModalInteractionSession=o;var r=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.startingUrl=n,o.locationChangeTriggerUrl=i,o.active=!1,o.capturedFauxRouterStart=!1,o}return M(e,t),e.prototype.canDeactivatePlace=function(t,e){return w(this,void 0,void 0,(function(){return R(this,(function(t){return[2,!1]}))}))},e.prototype.onCancel=function(t){return this.ignore(t)},e.prototype.onEnd=function(t){return this.ignore(t)},e.prototype.onError=function(t){return this.ignore(t)},e.prototype.onStart=function(t){return t.url!==this.locationChangeTriggerUrl||this.capturedFauxRouterStart?this.createActiveSession(t):(this.capturedFauxRouterStart=!0,this.ignore(t,"url matched back button location change"))},e.prototype.ignore=function(t,e){return e=e?" ("+e+")":"",s.Logger.get(this).info("ignoring router event"+e+": "+t.constructor.name+" -> "+t.url),this},e.prototype.toString=function(){return this.constructor.name+"(startingUrl: "+this.startingUrl+", locationChangeTriggerUrl:"+this.locationChangeTriggerUrl+")"},e}(t);t.CancelledDuringNavigationInteraction=r}(t.NavigationState||(t.NavigationState={}));var lt=function(){function t(){this._history=new Map}return t.prototype.add=function(t){var e=this.getHistory(t.placeDefinition),n=P.first(e);n&&!t.hasChangedFrom(n)||(e.unshift(t),this.setHistory(t.placeDefinition,e.slice(0,3)))},t.prototype.getHistory=function(t){var e=this._history.get(t);return e||(e=[],this.setHistory(t,e)),e},t.prototype.setHistory=function(t,e){this._history.set(t,e)},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();var pt=function(){function t(t){this.urlTree=t}return t.prototype.cloneUrlSegmentList=function(){return _(this.urlTree.root.children.primary.segments)},t.prototype.updateVisitSegments=function(t){var e=this.cloneUrlSegmentList(),n=this.convertToUrlSegments(t),i=e.findIndex((function(t){return t.path===n[0].path}));return e.splice.apply(e,_([i,n.length],n)),e},t.prototype.convertToUrlSegments=function(t){return t.placeDefinition.hasRouteId()?[new u.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t)),new u.UrlSegment(t.placeDefinition.getFormattedRouteId(t),{})]:[new u.UrlSegment(t.placeDefinition.path,t.placeDefinition.getFormattedRouteParameters(t))]},t.prototype.createRedirectCommandsFor=function(t){var e=this.updateVisitSegments(t),n=[];return e.forEach((function(t){n.push(t.path),t.parameterMap.keys.length>0&&n.push(t.parameters)})),n},t.prototype.includesPathOf=function(t){return this.cloneUrlSegmentList().find((function(e){return e.path===t.path}))},t}();t.ɵt=function(i){function o(e,n,r,a,c){var l=i.call(this)||this;l.router=e,l.urlSerializer=n,l.angularLocation=r,l.placeHistory=a,l.modalInteractionService=c,l.firstRoute=!0,l._navigationSessionModel=new s.MutableValueModel,l._activeVisits=new s.MutableListModel;var p=s.Dsl.disposeWith(l),d=p.chain;p.valueOf,p.before,p.when,p.after,p.observe,p.switchOn;return l.activeVisitIndex=d(l._activeVisits).indexBy("placeDefinition"),l.navigationSessionActive=d(l.navigationSessionModel).pluck("active"),l._navigationSessionContext=new t.NavigationState.Context(l.router,l.modalInteractionService,l.angularLocation,(function(t){l.processNavigationSuccess(t)})),l._navigationSessionModel.value=new t.NavigationState.Idle(l._navigationSessionContext),l.router.events.subscribe((function(t){t instanceof u.NavigationStart&&l.runStateTransition((function(e){return e.onStart(t)})),t instanceof u.NavigationEnd&&l.runStateTransition((function(e){return e.onEnd(t)})),t instanceof u.NavigationError&&l.runStateTransition((function(e){return e.onError(t)})),t instanceof u.NavigationCancel&&l.runStateTransition((function(e){return e.onCancel(t)}))})),l.modalInteractionService.addActivityListener(new o.InteractionRouteMediator(l.navigationSessionActive,l.router)),r.onUrlChange((function(t){console.log("#### url changed ->",{url:t,navIsActive:l.navigationSessionActive.value});var e=l.navigationSessionActive.value&&l.navigationSession.interactionContext;e&&e.isActive()&&(s.Logger.get(l).info("back button pressed during navigation session interaction"),l.runStateTransition((function(e){return e.onBackClickedDuringNavigationInteraction(t)})))})),l}return M(o,i),o.prototype.processNavigationSuccess=function(t){var e=this;s.assert.isTruthy(this.navigationSessionActive.value);var n=t.getVisits();n.forEach((function(t){return e.placeHistory.add(t)})),this._activeVisits.value=n},Object.defineProperty(o.prototype,"navigationSession",{get:function(){return this._navigationSessionModel.value},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"navigationSessionModel",{get:function(){return this._navigationSessionModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"activeVisits",{get:function(){return this._activeVisits.readonly},enumerable:!0,configurable:!0}),o.prototype.navigate=function(t,e){return w(this,void 0,void 0,(function(){var n=this;return R(this,(function(i){return this.doNavigation(t,(function(i){return w(n,void 0,void 0,(function(){var n;return R(this,(function(i){switch(i.label){case 0:return n=_([t.placeDefinition.path],this.createRouteParameters(t)),[4,this.router.navigate(n,{relativeTo:e?e.relativeTo:null})];case 1:return i.sent(),[2]}}))}))})),[2]}))}))},o.prototype.pushVisitChangesToRoute=function(t,e,n){return w(this,void 0,void 0,(function(){var t=this;return R(this,(function(i){return this.placeHistory.add(n),n.hasRoutingChangedFrom(e)?[2,this.doNavigation(n,(function(e){var i=t.parseUrl(t.router.routerState.snapshot).createRedirectCommandsFor(n);return console.log("### Push Changes to route Redirect",{commands:i}),e.navigate(i)}))]:[2]}))}))},o.prototype.doNavigation=function(e,n){return w(this,void 0,void 0,(function(){var i=this;return R(this,(function(o){switch(o.label){case 0:this.navigationSessionActive.value&&s.lang.illegalState("Navigation already in progress"),this.runStateTransition((function(n){var o=new t.NavigationState.Active(i._navigationSessionContext,!1,i.router.routerState.snapshot.url);return o.storeVisit(e),o})),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,n(this.router)];case 2:return o.sent(),[3,4];case 3:return this.navigationSession.active&&!this.router.getCurrentNavigation()&&this.runStateTransition((function(t){return t.onEnd(new u.NavigationEnd(-1,"",""))})),[7];case 4:return[2]}}))}))},o.prototype.runStateTransition=function(t){var e=this._navigationSessionModel.value,n=t(this.navigationSession);this._navigationSessionModel.value=n,n!==e&&(e.dispose(),s.Logger.get(this).info("Router State Transition: "+e.toString()+" -> "+n.toString()))},o.prototype.createRouteParameters=function(t){var e=t.placeDefinition;return t.hasRouteId()?[e.getFormattedRouteId(t),e.getFormattedRouteParameters(t)]:[e.getFormattedRouteParameters(t)]},o.prototype.extractChildPath=function(t){return P.flatten(t.children.map((function(t){return t.url})))},o.prototype.parseUrl=function(t){return new pt(this.urlSerializer.parse(t.url))},o.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],o.ctorParameters=function(){return[{type:u.Router},{type:u.UrlSerializer},{type:e.Location},{type:lt},{type:tt}]},o.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new o(n.ɵɵinject(u.Router),n.ɵɵinject(u.UrlSerializer),n.ɵɵinject(e.Location),n.ɵɵinject(lt),n.ɵɵinject(tt))},token:o,providedIn:"root"}),o}(s.GarbageCollector),function(t){t.INTERACTION_ROUTER_OUTLET="aup-interaction";var e=function(){function e(t,e){this.navigationSessionModelActive=t,this.router=e}return Object.defineProperty(e.prototype,"isNavigating",{get:function(){return this.navigationSessionModelActive.value},enumerable:!0,configurable:!0}),e.prototype.onActivityStarted=function(){var e;this.isNavigating||this.router.navigate([".",{outlets:(e={},e[t.INTERACTION_ROUTER_OUTLET]=["modal"],e)}],{replaceUrl:!1})},e.prototype.onActivityFinished=function(){var e;this.isNavigating||this.router.navigate([".",{outlets:(e={},e[t.INTERACTION_ROUTER_OUTLET]=null,e)}],{replaceUrl:!0})},e}();t.InteractionRouteMediator=e}(t.ɵt||(t.ɵt={}));var dt=b.style({position:"absolute",top:"0",left:"0",bottom:"0",right:"0"}),ft=[b.query(":enter, :leave",dt,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(-100%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(100%)"}))],{optional:!0})])],ht=[b.query(":enter, :leave",dt,{optional:!0}),b.group([b.query(":enter",[b.style({transform:"translateX(100%)",minHeight:"1px"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(0%)"}))],{optional:!0}),b.query(":leave",[b.style({transform:"translateX(0%)"}),b.animate("{{duration}} ease-out",b.style({transform:"translateX(-100%)",minHeight:"1px"}))],{optional:!0})])];function yt(t){return b.trigger("routeAnimations",[b.transition(":increment",ht,{params:{duration:t}}),b.transition(":decrement",ft,{params:{duration:t}})])}var mt=yt("0.3s");var vt=function(e){function i(t,i,o,r){var a=e.call(this)||this;a.router=t,a.placeRouter=i,a.placeConfig=o,a.placeChanged=new n.EventEmitter,a._activePlace=new s.MutableValueModel,a._activePlaceVisitModel=new s.DelegatingValueModel,a._inOutletActivation=new s.Guard,a._inOutletDeactivation=new s.Guard,a._inRouteVisitUpdate=new s.Guard,a._activatedRouteModel=new s.MutableValueModel,a._placeDefinition=new s.MutableValueModel,a.initialPlaceIndex=null;var c=s.Dsl.disposeWith(a),u=c.chain,p=c.valueOf,d=(c.before,c.when);c.after,c.observe,c.switchOn;a.parentOutletModel=new s.MutableValueModel(r),a._activePlaceVisitModel.setDelegate(new s.MutableValueModel),a._inOutletUpdate=p.any(a._inOutletDeactivation,a._inOutletActivation).areTruthy();var f=u(a.parentOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition").pluckList("children").pluck("component"),h=u(a.activePlaceModel).map((function(t){return t.constructor}));return a.placeAnimationOrder=u(a.customPlaceAnimationOrderModel).otherwise(f).reduce((function(t){var e=0;return h.value&&(e=t.indexOf(h.value),l.isNil(a.initialPlaceIndex)&&(a.initialPlaceIndex=e)),l.isNil(a.initialPlaceIndex)?0:e-a.initialPlaceIndex}),{dependsOn:h}),a.routerVisit=u(a._activePlace).pluck("placeDefinition").findIn(i.activeVisitIndex),d.valueOf(a.routerVisit).changes((function(){return a.pushRouteChangesToVisit()}),{unless:a._inOutletUpdate}),d.valueOf(a._activePlaceVisitModel).changes((function(t,e){a.pushVisitChangesToRoute(t,e)}),{unless:a.placeRouter.navigationSessionActive}),u(a._activePlace).postponeWhile(i.navigationSessionActive).subscribe((function(t){return a.placeChanged.emit(t)})),a}return M(i,e),i.prototype.ngOnInit=function(){},i.prototype.getAnimationOrder=function(){return this.placeAnimationOrder.value},Object.defineProperty(i.prototype,"animationDuration",{get:function(){return this.placeConfig&&this.placeConfig.animationDuration?this.placeConfig.animationDuration:"500ms"},enumerable:!0,configurable:!0}),i.prototype.navigate=function(t){this.placeRouter.navigate(t,{relativeTo:this.parentOutlet?this.parentOutlet.activatedRouteModel.value:null})},Object.defineProperty(i.prototype,"parentOutlet",{get:function(){return this.parentOutletModel.value},enumerable:!0,configurable:!0}),i.prototype.pushRouteChangesToVisit=function(){var t=this,e=this.routerVisit.value;e&&this._inRouteVisitUpdate.whileTrue((function(){t._activePlaceVisitModel.value=e}))},i.prototype.pushVisitChangesToRoute=function(t,e){var n=this._activatedRouteModel.value;this.placeRouter.pushVisitChangesToRoute(n,e,t)},Object.defineProperty(i.prototype,"activePlaceModel",{get:function(){return this._activePlace.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"activatedRouteModel",{get:function(){return this._activatedRouteModel.readonly},enumerable:!0,configurable:!0}),i.prototype.onOutletActivated=function(t,e){var n=this;this._inOutletActivation.whileTrue((function(){try{n._activePlace.value=e,n._activatedRouteModel.value=t.activatedRoute,n._placeDefinition.value=e.placeDefinition;var i=new s.MutableValueModel;n._activePlaceVisitModel.setDelegate(i),e.initialiseBindings(i)}catch(t){console.error(t)}})),this.animateModel.value||this.animationDone()},i.prototype.onOutletDeactivated=function(){var t=this;this._inOutletDeactivation.whileTrue((function(){t._activePlace.value=null,t._activatedRouteModel.value=null,t._placeDefinition.value=null,t._activePlaceVisitModel.setDelegate(null)}))},i.prototype.animationStarted=function(){},i.prototype.animationDone=function(){this._activePlace.value&&this._activePlace.value.onPlaceReady()},i.decorators=[{type:n.Component,args:[{selector:"aup-place-outlet",template:'<div class="router-outlet-container"\n [@routeAnimations]="{value: getAnimationOrder(), params:{duration: animationDuration}}"\n [@.disabled]="!animateModel.value"\n (@routeAnimations.start)="animationStarted()"\n (@routeAnimations.done)="animationDone()"\n>\n <router-outlet #routerOutlet="outlet"\n (activate)="onOutletActivated(routerOutlet, $event)"\n (deactivate)="onOutletDeactivated()">\n </router-outlet>\n</div>\n\n',animations:[mt],styles:[":host{display:flex;flex-direction:column;min-height:0;overflow-x:hidden}.router-outlet-container{flex:1;display:block;position:relative;min-height:0}router-outlet{display:none}"]}]}],i.ctorParameters=function(){return[{type:u.Router},{type:t.ɵt},{type:void 0,decorators:[{type:n.Optional},{type:n.Inject,args:[ct]}]},{type:i,decorators:[{type:n.SkipSelf},{type:n.Optional}]}]},i.propDecorators={animate:[{type:n.Input}],animateModel:[{type:n.Input}],customPlaceAnimationOrderModel:[{type:n.Input,args:["placeAnimationOrderModel"]}],customPlaceAnimationOrder:[{type:n.Input,args:["placeAnimationOrder"]}],placeChanged:[{type:n.Output}],routerOut:[{type:n.ViewChild,args:["routeOutlet",{static:!0}]}]},O([s.StoreInValueModel("animateModel"),x("design:type",Boolean)],i.prototype,"animate",void 0),O([s.UseDelegate({defaultValue:!0}),x("design:type",s.ValueModel)],i.prototype,"animateModel",void 0),O([s.UseDelegate(),x("design:type",s.ListModel)],i.prototype,"customPlaceAnimationOrderModel",void 0),O([s.StoreInListModel("customPlaceAnimationOrderModel"),x("design:type",Array)],i.prototype,"customPlaceAnimationOrder",void 0),i}(F);var gt=function(e){function i(){var n=e.call(this)||this,i=s.Dsl.disposeWith(n),o=i.chain;i.valueOf,i.before,i.when,i.after,i.observe,i.switchOn;return n.placeDefinitions=o(n.placesModel).map((function(e){return t.PlaceComponent.getDefinition(e)})),n.commandFactory=s.Command.createFactory((function(t){n.placeOutlet.navigate(new st(t))})),n.activePlaceDefinition=o(n.placeOutletModel).pullValueModel((function(t){return t.activePlaceModel})).pluck("placeDefinition"),n}return M(i,e),i.prototype.getNav=function(t){var e=t.getPlaceData("nav");return{title:function(){return e?e.title():t.searchPlaceData(["navTitle","title"])},tooltip:function(){return e&&e.tooltip?e.tooltip():t.getPlaceData("navTooltip",null)},icon:function(){return e&&e.icon?e.icon():t.getPlaceData("navIcon",null)}}},i.prototype.isActive=function(t){return this.activePlaceDefinition.query().equals(t)},i.prototype.ngOnInit=function(){},i.decorators=[{type:n.Component,args:[{template:""}]}],i.ctorParameters=function(){return[]},i.propDecorators={places:[{type:n.Input}],placesModel:[{type:n.Input}],placeOutlet:[{type:n.Input}],placeOutletModel:[{type:n.Input}]},O([s.StoreInListModel("placesModel"),x("design:type",Array)],i.prototype,"places",void 0),O([s.UseDelegate(),x("design:type",s.ListModel)],i.prototype,"placesModel",void 0),O([s.StoreInValueModel("placeOutletModel"),x("design:type",vt)],i.prototype,"placeOutlet",void 0),O([s.UseDelegate(),x("design:type",s.ValueModel)],i.prototype,"placeOutletModel",void 0),O([m.Memoize(),x("design:type",Function),x("design:paramtypes",[t.PlaceDefinition]),x("design:returntype",Object)],i.prototype,"getNav",null),i}(F);var bt=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-busy-overlay",template:'<ng-content></ng-content>\n<div class="busy-overlay-backdrop" *ngIf="busyModel.value">\n <mat-progress-spinner mode="indeterminate" [diameter]="52"></mat-progress-spinner>\n</div>\n',styles:[":host{position:relative}div.busy-overlay-backdrop{position:absolute;background-color:rgba(0,0,0,.2);top:0;left:0;bottom:0;right:0;display:-ms-grid;display:grid;-ms-grid-columns:auto;grid-template-columns:auto;-ms-grid-rows:auto;grid-template-rows:auto;place-content:center}"]}]}],t.ctorParameters=function(){return[]},t.propDecorators={busyModel:[{type:n.Input}],busy:[{type:n.Input}]},O([s.UseDelegate(),x("design:type",s.ValueModel)],t.prototype,"busyModel",void 0),O([s.StoreInValueModel("busyModel"),x("design:type",Boolean)],t.prototype,"busy",void 0),t}();var Ct=function(){function t(){}return t.prototype.ngOnInit=function(){},t.decorators=[{type:n.Component,args:[{selector:"aup-empty-state",template:'\n <div class="container">\n <ng-content></ng-content>\n </div>\n ',styles:[":host{display:flex;flex-direction:column;justify-content:center;align-items:center}.container{padding:var(--aup-default-padding);border:2px dashed rgba(0,0,0,.2);border-radius:5px;font-size:14px;font-weight:300}"]}]}],t.ctorParameters=function(){return[]},t}(),It=function(t){function e(){var e=t.call(this)||this;return e.expanded=!0,e}return M(e,t),e.prototype.expandMenu=function(){this.expanded=!0},e.prototype.collapseMenu=function(){this.expanded=!1},e.prototype.toggleMenu=function(){this.expanded=!this.expanded},e.decorators=[{type:n.Component,args:[{selector:"aup-list-place-nav",template:'<mat-nav-list class="app-menu">\n <a mat-list-item *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [class.active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span class="expanded-only">{{getNav(placeDefinition).title()}}</span>\n </a>\n</mat-nav-list>\n',styles:[":host{display:flex;flex-direction:column;--expanded-width:235px;--nav-item-width:var(--nav-bar-height);width:var(--nav-item-width);transition:width 125ms linear}:host.expanded{width:var(--expanded-width);max-width:var(--expanded-width)}.expanded-only{max-width:0;overflow:hidden}.collapsed-only{max-width:100%;overflow:hidden}.header{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;height:var(--nav-bar-height);border-bottom:var(--pinstripe-border);cursor:pointer}.header .menu{flex:1}.header button{color:inherit;width:var(--nav-item-width);height:var(--nav-bar-height)}mat-nav-list{flex:1;display:flex;flex-direction:column}.mat-list-item{width:var(--nav-item-width);height:var(--nav-bar-height);color:rgba(0,0,0,.6)}.mat-list-item.active{background-color:rgba(0,0,0,.1);color:rgba(0,0,0,.9)}mat-icon{color:inherit}mat-icon.flip-horizontal{transform:scaleX(-1)}:host-context(.expanded) .expanded-only{max-width:100%}:host-context(.expanded) .collapsed-only{max-width:0}:host-context(.expanded) .mat-list-item mat-icon{margin-right:12px}:host-context(.expanded) .mat-list-item span{text-wrap:none;white-space:nowrap}a[ng-reflect-router-link=manage-instruments] mat-icon{transform:rotate(90deg)}.app-menu{padding-top:0}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={expanded:[{type:n.HostBinding,args:["class.expanded"]}]},e}(gt);var Pt=function(t){function e(){return t.call(this)||this}return M(e,t),e.decorators=[{type:n.Component,args:[{selector:"aup-tabbed-place-navigation",template:'<nav mat-tab-nav-bar>\n <a mat-tab-link *ngFor="let placeDefinition of placeDefinitions.value"\n [pectinCommand]="commandFactory.create(placeDefinition)"\n [active]="isActive(placeDefinition)"\n [matTooltip]="getNav(placeDefinition).tooltip()">\n <mat-icon *ngIf="getNav(placeDefinition).icon()">{{getNav(placeDefinition).icon()}}</mat-icon>\n <span>{{getNav(placeDefinition).title()}}</span>\n </a>\n</nav>\n',styles:[""]}]}],e.ctorParameters=function(){return[]},e}(gt),Dt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{imports:[e.CommonModule,a.BrowserAnimationsModule,o.MatProgressSpinnerModule,u.RouterModule,r.MatTabsModule,h.MatListModule,y.MatTooltipModule,f.MatIconModule,N],declarations:[Ct,bt,vt,Pt,It,gt],entryComponents:[bt],exports:[bt,vt,Ct,Pt,It,gt],providers:[]}]}],t}(),Mt=function(){function t(){}return t.decorators=[{type:n.NgModule,args:[{declarations:[],imports:[e.CommonModule,a.BrowserAnimationsModule,i.FormsModule,o.MatInputModule,o.MatFormFieldModule,o.MatSelectModule,r.MatTabsModule,N,H,Dt,it],exports:[it,Dt,N,H,B]}]}],t}(),At=b.style({opacity:0,height:"0",paddingTop:"0",paddingBottom:"0"});var Ot=function(t,e){this.width=t,this.height=e};var xt,wt=function(){function t(t,e){this.x=t,this.y=e}return t.from=function(e){return new t(e.x,e.y)},t.prototype.translate=function(e,n){return new t(this.x+e,this.y+n)},t}();t.Bounds=function(t){function e(e,n,i,o){var r=t.call(this,i,o)||this;return r.top=e,r.left=n,r.width=i,r.height=o,r}return M(e,t),e.prototype.relativePositionOf=function(t){return t instanceof MouseEvent?new wt(t.clientX-this.left,t.clientY-this.top):new wt(t.x-this.left,t.y-this.top)},e}(Ot),(xt=t.Bounds||(t.Bounds={})).ofElement=function(t){var e=t.getBoundingClientRect();return new xt(e.top,e.left,e.width,e.height)};var Rt=function(e){function n(n,i){var o=e.call(this)||this;return o.elementRef=n,o.ngZone=i,o._boundsModel=new s.ValueHolder(new t.Bounds(0,0,0,0)),o}return M(n,e),n.prototype.ngAfterViewInit=function(){var t=this;this.updateBounds();var e=this.elementRef.nativeElement,n=new C((function(e,n){t.ngZone.run((function(){return t.updateBounds()}))}));n.observe(e),this.onDispose((function(){return n.disconnect()}))},Object.defineProperty(n.prototype,"boundsModel",{get:function(){return this._boundsModel.readonly},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),n.prototype.relativePositionOf=function(t){return this.bounds.relativePositionOf(t)},Object.defineProperty(n.prototype,"bounds",{get:function(){return this._boundsModel.value},enumerable:!0,configurable:!0}),n.prototype.updateBounds=function(){this._boundsModel.value=t.Bounds.ofElement(this.nativeElement)},n}(F);function St(){}function _t(e){return function(n){t.PlaceComponent.isPlaceComponentConstructor(n)?t.PlaceComponent.injectDefinition(n,new t.PlaceDefinition(n,e.path,!l.isNil(e.authenticate)&&e.authenticate,e.data,t.PlaceComponent.getRouteParameters(n),(e.children||[]).map((function(e){return t.PlaceComponent.getDefinition(e)})))):s.lang.illegalState(n+" must extend PlaceComponent to use the @Place decorator")}}(function(t){function e(){}t.Callback=e})(St||(St={})),function(t){function e(){}t.Options=e}(_t||(_t={}));var Tt=function(){function t(t,e,n,i){this.activatedRoute=t,this.router=e,this.placeHistory=n,this.injector=i}return t.prototype.sanitise=function(t){return w(this,void 0,void 0,(function(){var e,n,i,o,r,a,s,c,u;return R(this,(function(l){switch(l.label){case 0:return(e=t.placeDefinition).hasRouteId()?(n=e.getRouteIdParameterDef(),i=t.getRouteId(),[4,n.sanitise(i,t,this.placeHistory,this.injector)]):[3,2];case 1:if(u=l.sent(),n.hasChanged(i,u))return[2,t.replace(n,u)];l.label=2;case 2:o=e.getVisitParameterDefs({includeRouteParameters:!0,includeNonRouteParameters:!0}),r=t,a=0,l.label=3;case 3:return a<o.length?(s=o[a],c=t.getParameter(s.name),[4,s.sanitise(c,r,this.placeHistory,this.injector)]):[3,6];case 4:u=l.sent(),s.hasChanged(c,u)&&(r=r.replace(s,u)),l.label=5;case 5:return a++,[3,3];case 6:return[2,r.hasChangedFrom(t)?r:t]}}))}))},t}();var Ft=function(){function t(t,e){this.paramMaps=[t].concat((e||[]).map((function(t){return new Et(t.parameters)}))).filter((function(t){return!!t}))}return t.prototype.get=function(t){return this.paramMaps.find((function(e){return e.has(t)})).get(t)},t.prototype.getAll=function(t){return this.paramMaps.find((function(e){return e.has(t)})).getAll(t)},t.prototype.has=function(t){return!!this.paramMaps.find((function(e){return e.has(t)}))},Object.defineProperty(t.prototype,"keys",{get:function(){return this.paramMaps.reduce((function(t,e){return t.concat(e.keys)}),[])},enumerable:!0,configurable:!0}),O([m.Memoize(),x("design:type",Array),x("design:paramtypes",[])],t.prototype,"keys",null),t}();var Et=function(){function t(t){this.params=t}return t.prototype.get=function(t){return this.params[t]},t.prototype.getAll=function(t){var e=this.get(t);return Array.isArray(e)?e:[e]},t.prototype.has=function(t){return this.keys.includes(t)},Object.defineProperty(t.prototype,"keys",{get:function(){return Object.keys(this.params)},enumerable:!0,configurable:!0}),t}();var Nt=function(){function e(t,e,n,i,o){this.router=t,this.urlSerializer=e,this.placeRouter=n,this.placeHistory=i,this.injector=o}return e.prototype.canActivate=function(t,e){return w(this,void 0,void 0,(function(){var n=this;return R(this,(function(i){return[2,this.authorisePlaceThen(t,e,(function(i){return w(n,void 0,void 0,(function(){var n,o,r,a,s;return R(this,(function(c){switch(c.label){case 0:return n=new Ft(t.paramMap,t.url),o=i.parseRouteParams(n),r=this.placeRouter.navigationSession.getVisitFor(i)||new st(i,o),[4,new Tt(t,this.router,this.placeHistory,this.injector).sanitise(r.mergeRouteParameters(o))];case 1:return a=c.sent(),this.placeRouter.navigationSession.storeVisit(a),r.hasRoutingChangedFrom(a)?(s=this.placeRouter.parseUrl(e).createRedirectCommandsFor(a),console.log("##### Place Guard Redirect",s),[2,this.router.createUrlTree(s,{replaceUrl:!0,skipLocationChange:!1})]):[2,!0]}}))}))}))]}))}))},e.prototype.canDeactivate=function(t,e,n,i){return w(this,void 0,void 0,(function(){return R(this,(function(e){return[2,this.placeRouter.navigationSession.canDeactivatePlace(t,this.placeRouter.parseUrl(i))]}))}))},e.prototype.authorisePlaceThen=function(e,n,i){return w(this,void 0,void 0,(function(){var o,r,a;return R(this,(function(c){switch(c.label){case 0:return t.PlaceComponent.isPlaceComponentConstructor(e.component)?(o=t.PlaceComponent.getDefinition(e.component)).authenticate?[4,this.isAuthorised(e,n)]:[3,2]:[3,4];case 1:return a=c.sent(),[3,3];case 2:a=!0,c.label=3;case 3:return!0===(r=a)?[2,i(o)]:(console.log("not authorised result",r),[2,r]);case 4:return[2,s.lang.illegalState("expected component to be an instance of PlaceComponent, got "+e.component)];case 5:return[2]}}))}))},e.prototype.isAuthorised=function(t,e){return w(this,void 0,void 0,(function(){var n;return R(this,(function(i){return[2,(n=this.getAuthGuard(this.injector).canActivate(t,e))instanceof I.Observable?n.toPromise():n]}))}))},O([s.Trace(),x("design:type",Function),x("design:paramtypes",[u.ActivatedRouteSnapshot,u.RouterStateSnapshot]),x("design:returntype",Promise)],e.prototype,"isAuthorised",null),e}();var Lt=function(){function i(t,e,n,i,o){this.router=t,this.injector=e,this.placeRouter=n,this.angularLocation=i,this.modalInteractionService=o}return i.prototype.canActivate=function(e,n){var i=this.router.parseUrl(n.url);return!(!this.modalInteractionService.isActive()&&i.root.children[t.ɵt.INTERACTION_ROUTER_OUTLET])||(delete i.root.children[t.ɵt.INTERACTION_ROUTER_OUTLET],i)},i.prototype.canDeactivate=function(t,e,n,i){return w(this,void 0,void 0,(function(){return R(this,(function(t){switch(t.label){case 0:return this.placeRouter.navigationSession.startingUrl,this.modalInteractionService.isActive()?[4,this.modalInteractionService.getCurrentActivity()]:[3,2];case 1:return t.sent().cancel(),[2,!1];case 2:return[2,!0]}}))}))},i.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],i.ctorParameters=function(){return[{type:u.Router},{type:n.Injector},{type:t.ɵt},{type:e.Location},{type:tt}]},i.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new i(n.ɵɵinject(u.Router),n.ɵɵinject(n.INJECTOR),n.ɵɵinject(t.ɵt),n.ɵɵinject(e.Location),n.ɵɵinject(tt))},token:i,providedIn:"root"}),i}();var jt,Vt,kt,Ut,Bt=function(){function t(){}return t.prototype.canActivate=function(t,e){return w(this,void 0,void 0,(function(){return R(this,(function(t){return[2,!0]}))}))},t.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],t.ctorParameters=function(){return[]},t.ngInjectableDef=n.ɵɵdefineInjectable({factory:function(){return new t},token:t,providedIn:"root"}),t}();jt=t.Formatter||(t.Formatter={}),Vt=function(){function t(){}return t.prototype.format=function(t){return t},t.prototype.parse=function(t){return t},t}(),kt=function(){function t(){}return t.prototype.format=function(t){return P.isNumber(t)&&!P.isNaN(t)?""+t:null},t.prototype.parse=function(t){var e=Number.parseFloat(t);return P.isNaN(e)?null:e},t}(),Ut=function(){function t(){}return t.prototype.format=function(t){return t?"true":"false"},t.prototype.parse=function(t){return"true"===t},t}(),jt.STRING=new Vt,jt.NUMBER=new kt,jt.BOOLEAN=new Ut,t.ACTIVITY_DATA=q,t.AUP_PLACE_CONFIG=ct,t.AbstractActivity=G,t.AbstractInputComponent=L,t.AbstractPlaceGuard=Nt,t.AbstractPlaceNavigationComponent=gt,t.Activity=t.ɵbh,t.ActivityContainerComponent=Y,t.ActivityOutletComponent=X,t.AlertDialogComponent=z,t.AngularUiPowerupsModule=Mt,t.BusyOverlayComponent=bt,t.CommandDirective=T,t.ComponentsModule=H,t.ConfirmThenDialogComponent=t.ɵbj,t.ConfirmationDialogComponent=K,t.ConsolidatedParameterMap=Ft,t.DEFINITION_META_DATA_KEY=rt,t.DIALOG_INTERACTION_SERVICE_DEFAULTS=et,t.DialogInteractionContext=Q,t.DialogInteractionService=nt,t.Dimension=Ot,t.DirectivesModule=N,t.DisposableComponent=F,t.EmptyStateComponent=Ct,t.FocusBindingDirective=E,t.InplaceInteractionContextComponent=J,t.InteractionContext=t.ɵbc,t.InteractionContextBase=W,t.InteractionGuard=Lt,t.InteractionModule=it,t.InteractionOutletComponent=$,t.LEFT_RIGHT_PLACE_ANIMATION=mt,t.ListPlaceNavComponent=It,t.ModalInteractionService=tt,t.NoopAuthGuard=Bt,t.NoopComponent=B,t.NumberInputComponent=j,t.PasswordInputComponent=V,t.Place=_t,t.PlaceComponentDeactivationHandler=ut,t.PlaceHistory=lt,t.PlaceModule=Dt,t.PlaceOutletComponent=vt,t.PlaceRouter=t.ɵt,t.Point=wt,t.ROUTE_PARAMETER_LIST_KEY=at,t.ResizeAwareComponent=Rt,t.RouteId=function(e,n){return function(i,o){var r=new t.ParameterDefinition.RouteId(o.toString(),n,e);p.Klass.get(i).addToOwnMetadataList(at,r),s.UseDelegate()(i,o)}},t.SelectInputComponent=k,t.StringInputComponent=U,t.TabbedPlaceNavigationComponent=Pt,t.UrlSnapshot=pt,t.Visit=st,t.VisitParameter=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ValueParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(at,r),s.UseDelegate()(i,o)}},t.VisitParameterList=function(e){var n=p.Opts.get(e);return function(i,o){var r=new t.ParameterDefinition.ArrayParameter(o.toString(),e,n.getOptional("storeInUrl",null));p.Klass.get(i).addToOwnMetadataList(at,r),s.UseDelegate()(i,o)}},t.VisitSanitiser=Tt,t.leftRightPlaceAnimation=yt,t.slideDownAndUpAnimation=function(t,e){s.OptionsHelper.get(e).getOptional("duration","100ms");var n=s.OptionsHelper.get(e).getOptional("hiddenStyleDef",At);return b.trigger(t,[b.transition(":enter",[n,b.animate("100ms")]),b.transition(":leave",[b.animate("100ms",n)])])},t.ɵa=N,t.ɵb=T,t.ɵba=Y,t.ɵbb=W,t.ɵbd=X,t.ɵbe=K,t.ɵbf=G,t.ɵbg=q,t.ɵbk=z,t.ɵbm=$,t.ɵbn=J,t.ɵbo=et,t.ɵbp=nt,t.ɵc=E,t.ɵd=F,t.ɵe=H,t.ɵf=j,t.ɵg=L,t.ɵh=U,t.ɵi=V,t.ɵj=k,t.ɵk=B,t.ɵl=Dt,t.ɵm=Ct,t.ɵn=bt,t.ɵo=vt,t.ɵp=yt,t.ɵq=mt,t.ɵr=ct,t.ɵu=lt,t.ɵv=tt,t.ɵw=Pt,t.ɵx=gt,t.ɵy=It,t.ɵz=it,Object.defineProperty(t,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=coolon-angular-ui-powerups.umd.min.js.map