text: (window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"Tx//":function(e,t,n){"use strict";n.r(t),n.d(t,"LayoutModule",function(){return _i});var a=n("ofXK");function i(e,t,n,a){var i,r=arguments.length,o=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,a);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r<3?i(o):r>3?i(t,n,o):i(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function r(e,t){return function(n,a){t(n,a,e)}}var o=n("fXoL"),s=n("3Pt+"),l=n("XNiG"),c=n("2Vo4");n("itXk"),n("PqYM"),n("HDdC"),n("KqfI");var d=n("xgIS"),m=n("VRyK"),u=n("DH7j"),p=n("yCtX"),h=n("l7GE"),f=n("ZUHj");class g{call(e,t){return t.subscribe(new b(e))}}class b extends h.a{constructor(e){super(e),this.hasFirst=!1,this.observables=[],this.subscriptions=[]}_next(e){this.observables.push(e)}_complete(){const e=this.observables,t=e.length;if(0===t)this.destination.complete();else{for(let n=0;n<t&&!this.hasFirst;n++){const t=e[n],a=Object(f.a)(this,t,void 0,n);this.subscriptions&&this.subscriptions.push(a),this.add(a)}this.observables=null}}notifyNext(e,t,n){if(!this.hasFirst){this.hasFirst=!0;for(let e=0;e<this.subscriptions.length;e++)if(e!==n){let t=this.subscriptions[e];t.unsubscribe(),this.remove(t)}this.subscriptions=null}this.destination.next(t)}}var v=n("lJxs"),y=(n("JX91"),n("/uUt"),n("eIep")),w=n("1G5W"),x=n("pLZG"),_=n("IzEk"),C=n("vkgz");function S(...e){return t=>{let n;return"function"==typeof e[e.length-1]&&(n=e.pop()),t.lift(new E(e,n))}}class E{constructor(e,t){this.observables=e,this.project=t}call(e,t){return t.subscribe(new D(e,this.observables,this.project))}}class D extends h.a{constructor(e,t,n){super(e),this.observables=t,this.project=n,this.toRespond=[];const a=t.length;this.values=new Array(a);for(let i=0;i<a;i++)this.toRespond.push(i);for(let i=0;i<a;i++){let e=t[i];this.add(Object(f.a)(this,e,void 0,i))}}notifyNext(e,t,n){this.values[n]=t;const a=this.toRespond;if(a.length>0){const e=a.indexOf(n);-1!==e&&a.splice(e,1)}}notifyComplete(){}_next(e){if(0===this.toRespond.length){const t=[e,...this.values];this.project?this._tryProject(t):this.destination.next(t)}}_tryProject(e){let t;try{t=this.project.apply(this,e)}catch(n){return void this.destination.error(n)}this.destination.next(t)}}var k=n("3E0/");n("w1tV");const O=["defaultDayTemplate"],I=["content"];function M(e,t){if(1&e&&o["\u0275\u0275element"](0,"div",7),2&e){const e=t.currentMonth,n=t.selected,a=t.disabled,i=t.focused;o["\u0275\u0275property"]("date",t.date)("currentMonth",e)("selected",n)("disabled",a)("focused",i)}}function P(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"div",12),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=o["\u0275\u0275nextContext"]().$implicit,t=o["\u0275\u0275nextContext"](2);o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate2"](" ",t.i18n.getMonthFullName(e.number,e.year)," ",t.i18n.getYearNumerals(e.year)," ")}}function R(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"div",9),o["\u0275\u0275template"](1,P,2,2,"div",10),o["\u0275\u0275element"](2,"ngb-datepicker-month",11),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit,n=o["\u0275\u0275nextContext"](2);o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf","none"===n.navigation||n.displayMonths>1&&"select"===n.navigation),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("month",e.firstDate)}}function j(e,t){if(1&e&&o["\u0275\u0275template"](0,R,3,2,"div",8),2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275property"]("ngForOf",e.model.months)}}function T(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"ngb-datepicker-navigation",13),o["\u0275\u0275listener"]("navigate",function(t){return o["\u0275\u0275restoreView"](e),o["\u0275\u0275nextContext"]().onNavigateEvent(t)})("select",function(t){return o["\u0275\u0275restoreView"](e),o["\u0275\u0275nextContext"]().onNavigateDateSelect(t)}),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275property"]("date",e.model.firstDate)("months",e.model.months)("disabled",e.model.disabled)("showSelect","select"===e.model.navigation)("prevDisabled",e.model.prevDisabled)("nextDisabled",e.model.nextDisabled)("selectBoxes",e.model.selectBoxes)}}function F(e,t){}function A(e,t){}function V(e,t){1&e&&o["\u0275\u0275element"](0,"div",5)}function $(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"div",6),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit,n=o["\u0275\u0275nextContext"](2);o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",n.i18n.getWeekdayShortName(e)," ")}}function N(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"div",2),o["\u0275\u0275template"](1,V,1,0,"div",3),o["\u0275\u0275template"](2,$,2,1,"div",4),o["\u0275\u0275elementEnd"]()),2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",e.datepicker.showWeekNumbers),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngForOf",e.viewModel.weekdays)}}function z(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"div",11),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=o["\u0275\u0275nextContext"](2).$implicit,t=o["\u0275\u0275nextContext"]();o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate"](t.i18n.getWeekNumerals(e.number))}}function L(e,t){}function B(e,t){if(1&e&&o["\u0275\u0275template"](0,L,0,0,"ng-template",14),2&e){const e=o["\u0275\u0275nextContext"]().$implicit,t=o["\u0275\u0275nextContext"](3);o["\u0275\u0275property"]("ngTemplateOutlet",t.datepicker.dayTemplate)("ngTemplateOutletContext",e.context)}}function H(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"div",12),o["\u0275\u0275listener"]("click",function(n){o["\u0275\u0275restoreView"](e);const a=t.$implicit;return o["\u0275\u0275nextContext"](3).doSelect(a),n.preventDefault()}),o["\u0275\u0275template"](1,B,1,2,"ng-template",13),o["\u0275\u0275elementEnd"]()}if(2&e){const e=t.$implicit;o["\u0275\u0275classProp"]("disabled",e.context.disabled)("hidden",e.hidden)("ngb-dp-today",e.context.today),o["\u0275\u0275property"]("tabindex",e.tabindex),o["\u0275\u0275attribute"]("aria-label",e.ariaLabel),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",!e.hidden)}}function q(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"div",8),o["\u0275\u0275template"](1,z,2,1,"div",9),o["\u0275\u0275template"](2,H,2,9,"div",10),o["\u0275\u0275elementEnd"]()),2&e){const e=o["\u0275\u0275nextContext"]().$implicit,t=o["\u0275\u0275nextContext"]();o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",t.datepicker.showWeekNumbers),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngForOf",e.days)}}function W(e,t){1&e&&o["\u0275\u0275template"](0,q,3,2,"div",7),2&e&&o["\u0275\u0275property"]("ngIf",!t.$implicit.collapsed)}function Q(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"ngb-datepicker-navigation-select",8),o["\u0275\u0275listener"]("select",function(t){return o["\u0275\u0275restoreView"](e),o["\u0275\u0275nextContext"]().select.emit(t)}),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275property"]("date",e.date)("disabled",e.disabled)("months",e.selectBoxes.months)("years",e.selectBoxes.years)}}function K(e,t){1&e&&o["\u0275\u0275element"](0,"div",0)}function U(e,t){1&e&&o["\u0275\u0275element"](0,"div",0)}function Z(e,t){if(1&e&&(o["\u0275\u0275template"](0,K,1,0,"div",10),o["\u0275\u0275elementStart"](1,"div",11),o["\u0275\u0275text"](2),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](3,U,1,0,"div",10)),2&e){const e=t.$implicit,n=t.index,a=o["\u0275\u0275nextContext"](2);o["\u0275\u0275property"]("ngIf",n>0),o["\u0275\u0275advance"](2),o["\u0275\u0275textInterpolate2"](" ",a.i18n.getMonthFullName(e.number,e.year)," ",a.i18n.getYearNumerals(e.year)," "),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",n!==a.months.length-1)}}function Y(e,t){if(1&e&&o["\u0275\u0275template"](0,Z,4,4,"ng-template",9),2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275property"]("ngForOf",e.months)}}const G=["ngbDatepickerDayView",""],X=["month"],J=["year"];function ee(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"option",6),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit,n=o["\u0275\u0275nextContext"]();o["\u0275\u0275property"]("value",e),o["\u0275\u0275attribute"]("aria-label",n.i18n.getMonthFullName(e,null==n.date?null:n.date.year)),o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate"](n.i18n.getMonthShortName(e,null==n.date?null:n.date.year))}}function te(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"option",6),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit,n=o["\u0275\u0275nextContext"]();o["\u0275\u0275property"]("value",e),o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate"](n.i18n.getYearNumerals(e))}}function ne(e,t){1&e&&o["\u0275\u0275text"](0),2&e&&o["\u0275\u0275textInterpolate"](100===t.fill?"\u2605":"\u2606")}function ae(e,t){}function ie(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"span",2),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](2,"span",3),o["\u0275\u0275listener"]("mouseenter",function(){o["\u0275\u0275restoreView"](e);const n=t.index;return o["\u0275\u0275nextContext"]().enter(n+1)})("click",function(){o["\u0275\u0275restoreView"](e);const n=t.index;return o["\u0275\u0275nextContext"]().handleClick(n+1)}),o["\u0275\u0275template"](3,ae,0,0,"ng-template",4),o["\u0275\u0275elementEnd"]()}if(2&e){const e=t.index,n=o["\u0275\u0275nextContext"](),a=o["\u0275\u0275reference"](1);o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"]("(",e<n.nextRate?"*":" ",")"),o["\u0275\u0275advance"](1),o["\u0275\u0275styleProp"]("cursor",n.readonly||n.disabled?"default":"pointer"),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngTemplateOutlet",n.starTemplate||n.starTemplateFromContent||a)("ngTemplateOutletContext",n.contexts[e])}}function re(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"button",12),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const t=o["\u0275\u0275nextContext"]();return t.changeHour(t.hourStep)}),o["\u0275\u0275element"](1,"span",13),o["\u0275\u0275elementStart"](2,"span",14),o["\u0275\u0275i18n"](3,15),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275classProp"]("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),o["\u0275\u0275property"]("disabled",e.disabled)}}function oe(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"button",12),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const t=o["\u0275\u0275nextContext"]();return t.changeHour(-t.hourStep)}),o["\u0275\u0275element"](1,"span",16),o["\u0275\u0275elementStart"](2,"span",14),o["\u0275\u0275i18n"](3,17),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275classProp"]("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),o["\u0275\u0275property"]("disabled",e.disabled)}}function se(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"button",12),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const t=o["\u0275\u0275nextContext"]();return t.changeMinute(t.minuteStep)}),o["\u0275\u0275element"](1,"span",13),o["\u0275\u0275elementStart"](2,"span",14),o["\u0275\u0275i18n"](3,18),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275classProp"]("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),o["\u0275\u0275property"]("disabled",e.disabled)}}function le(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"button",12),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const t=o["\u0275\u0275nextContext"]();return t.changeMinute(-t.minuteStep)}),o["\u0275\u0275element"](1,"span",16),o["\u0275\u0275elementStart"](2,"span",14),o["\u0275\u0275i18n"](3,19),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275classProp"]("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),o["\u0275\u0275property"]("disabled",e.disabled)}}function ce(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"div",6),o["\u0275\u0275text"](1,":"),o["\u0275\u0275elementEnd"]())}function de(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"button",12),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const t=o["\u0275\u0275nextContext"](2);return t.changeSecond(t.secondStep)}),o["\u0275\u0275element"](1,"span",13),o["\u0275\u0275elementStart"](2,"span",14),o["\u0275\u0275i18n"](3,22),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"](2);o["\u0275\u0275classProp"]("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),o["\u0275\u0275property"]("disabled",e.disabled)}}function me(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"button",12),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const t=o["\u0275\u0275nextContext"](2);return t.changeSecond(-t.secondStep)}),o["\u0275\u0275element"](1,"span",16),o["\u0275\u0275elementStart"](2,"span",14),o["\u0275\u0275i18n"](3,23),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"](2);o["\u0275\u0275classProp"]("btn-sm",e.isSmallSize)("btn-lg",e.isLargeSize)("disabled",e.disabled),o["\u0275\u0275property"]("disabled",e.disabled)}}function ue(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"div",20),o["\u0275\u0275template"](1,de,4,7,"button",3),o["\u0275\u0275elementStart"](2,"input",4),o["\u0275\u0275i18nAttributes"](3,21),o["\u0275\u0275listener"]("change",function(t){return o["\u0275\u0275restoreView"](e),o["\u0275\u0275nextContext"]().updateSecond(t.target.value)})("input",function(t){return o["\u0275\u0275restoreView"](e),o["\u0275\u0275nextContext"]().formatInput(t.target)})("keydown.ArrowUp",function(t){o["\u0275\u0275restoreView"](e);const n=o["\u0275\u0275nextContext"]();return n.changeSecond(n.secondStep),t.preventDefault()})("keydown.ArrowDown",function(t){o["\u0275\u0275restoreView"](e);const n=o["\u0275\u0275nextContext"]();return n.changeSecond(-n.secondStep),t.preventDefault()}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](4,me,4,7,"button",3),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",e.spinners),o["\u0275\u0275advance"](1),o["\u0275\u0275classProp"]("form-control-sm",e.isSmallSize)("form-control-lg",e.isLargeSize),o["\u0275\u0275property"]("value",e.formatMinSec(null==e.model?null:e.model.second))("readOnly",e.readonlyInputs)("disabled",e.disabled),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngIf",e.spinners)}}function pe(e,t){1&e&&o["\u0275\u0275element"](0,"div",6)}function he(e,t){if(1&e&&(o["\u0275\u0275elementContainerStart"](0),o["\u0275\u0275i18n"](1,28),o["\u0275\u0275elementContainerEnd"]()),2&e){const e=o["\u0275\u0275nextContext"](2);o["\u0275\u0275advance"](1),o["\u0275\u0275i18nExp"](e.i18n.getAfternoonPeriod()),o["\u0275\u0275i18nApply"](1)}}function fe(e,t){if(1&e&&o["\u0275\u0275i18n"](0,29),2&e){const e=o["\u0275\u0275nextContext"](2);o["\u0275\u0275i18nExp"](e.i18n.getMorningPeriod()),o["\u0275\u0275i18nApply"](0)}}function ge(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"div",24),o["\u0275\u0275elementStart"](1,"button",25),o["\u0275\u0275listener"]("click",function(){return o["\u0275\u0275restoreView"](e),o["\u0275\u0275nextContext"]().toggleMeridian()}),o["\u0275\u0275template"](2,he,2,1,"ng-container",26),o["\u0275\u0275template"](3,fe,1,1,"ng-template",null,27,o["\u0275\u0275templateRefExtractor"]),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275reference"](4),t=o["\u0275\u0275nextContext"]();o["\u0275\u0275advance"](1),o["\u0275\u0275classProp"]("btn-sm",t.isSmallSize)("btn-lg",t.isLargeSize)("disabled",t.disabled),o["\u0275\u0275property"]("disabled",t.disabled),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",t.model&&t.model.hour>=12)("ngIfElse",e)}}function be(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"span"),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=o["\u0275\u0275nextContext"]().$implicit,t=o["\u0275\u0275nextContext"]();o["\u0275\u0275classMap"](t.highlightClass),o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate"](e)}}function ve(e,t){if(1&e&&o["\u0275\u0275text"](0),2&e){const e=o["\u0275\u0275nextContext"]().$implicit;o["\u0275\u0275textInterpolate"](e)}}function ye(e,t){if(1&e&&(o["\u0275\u0275template"](0,be,2,3,"span",1),o["\u0275\u0275template"](1,ve,1,1,"ng-template",null,2,o["\u0275\u0275templateRefExtractor"])),2&e){const e=t.odd,n=o["\u0275\u0275reference"](2);o["\u0275\u0275property"]("ngIf",e)("ngIfElse",n)}}function we(e,t){if(1&e&&o["\u0275\u0275element"](0,"ngb-highlight",2),2&e){const e=t.term;o["\u0275\u0275property"]("result",(0,t.formatter)(t.result))("term",e)}}function xe(e,t){}const _e=function(e,t,n){return{result:e,term:t,formatter:n}};function Ce(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"button",3),o["\u0275\u0275listener"]("mouseenter",function(){o["\u0275\u0275restoreView"](e);const n=t.index;return o["\u0275\u0275nextContext"]().markActive(n)})("click",function(){o["\u0275\u0275restoreView"](e);const n=t.$implicit;return o["\u0275\u0275nextContext"]().select(n)}),o["\u0275\u0275template"](1,xe,0,0,"ng-template",4),o["\u0275\u0275elementEnd"]()}if(2&e){const e=t.$implicit,n=t.index,a=o["\u0275\u0275nextContext"](),i=o["\u0275\u0275reference"](1);o["\u0275\u0275classProp"]("active",n===a.activeIdx),o["\u0275\u0275property"]("id",a.id+"-"+n),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngTemplateOutlet",a.resultTemplate||i)("ngTemplateOutletContext",o["\u0275\u0275pureFunction3"](5,_e,e,a.term,a.formatter))}}function Se(e){return parseInt(""+e,10)}function Ee(e){return null!=e?""+e:""}function De(e){return"string"==typeof e}function ke(e){return!isNaN(Se(e))}function Oe(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function Ie(e){return ke(e)?("0"+e).slice(-2):""}function Me(e,t){return e&&e.className&&e.className.split&&e.className.split(/\s+/).indexOf(t)>=0}"undefined"==typeof Element||Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(e){let t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});let Pe=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngbButtonLabel",""]],hostVars:8,hostBindings:function(e,t){2&e&&o["\u0275\u0275classProp"]("btn",!0)("active",t.active)("disabled",t.disabled)("focus",t.focused)}}),e})();const Re={provide:s.k,useExisting:Object(o.forwardRef)(()=>je),multi:!0};let je=(()=>{let e=class{constructor(e,t){this._label=e,this._cd=t,this.disabled=!1,this.valueChecked=!0,this.valueUnChecked=!1,this.onChange=e=>{},this.onTouched=()=>{}}set focused(e){this._label.focused=e,e||this.onTouched()}onInputChange(e){const t=e.target.checked?this.valueChecked:this.valueUnChecked;this.onChange(t),this.onTouched(),this.writeValue(t)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e,this._label.disabled=e}writeValue(e){this.checked=e===this.valueChecked,this._label.active=this.checked,this._cd.markForCheck()}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Pe),o["\u0275\u0275directiveInject"](o.ChangeDetectorRef))},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngbButton","","type","checkbox"]],hostVars:2,hostBindings:function(e,t){1&e&&o["\u0275\u0275listener"]("change",function(e){return t.onInputChange(e)})("focus",function(){return t.focused=!0})("blur",function(){return t.focused=!1}),2&e&&o["\u0275\u0275hostProperty"]("checked",t.checked)("disabled",t.disabled)},inputs:{disabled:"disabled",valueChecked:"valueChecked",valueUnChecked:"valueUnChecked"},features:[o["\u0275\u0275ProvidersFeature"]([Re])]}),e})();const Te={provide:s.k,useExisting:Object(o.forwardRef)(()=>Ae),multi:!0};let Fe=0,Ae=(()=>{let e=class{constructor(){this._radios=new Set,this._value=null,this.name="ngb-radio-"+Fe++,this.onChange=e=>{},this.onTouched=()=>{}}get disabled(){return this._disabled}set disabled(e){this.setDisabledState(e)}onRadioChange(e){this.writeValue(e.value),this.onChange(e.value)}onRadioValueUpdate(){this._updateRadiosValue()}register(e){this._radios.add(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._disabled=e,this._updateRadiosDisabled()}unregister(e){this._radios.delete(e)}writeValue(e){this._value=e,this._updateRadiosValue()}_updateRadiosValue(){this._radios.forEach(e=>e.updateValue(this._value))}_updateRadiosDisabled(){this._radios.forEach(e=>e.updateDisabled())}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngbRadioGroup",""]],hostAttrs:["role","radiogroup"],inputs:{name:"name"},features:[o["\u0275\u0275ProvidersFeature"]([Te])]}),e})();class Ve{constructor(e,t,n){this.year=Oe(e)?e:null,this.month=Oe(t)?t:null,this.day=Oe(n)?n:null}static from(e){return e instanceof Ve?e:e?new Ve(e.year,e.month,e.day):null}equals(e){return null!=e&&this.year===e.year&&this.month===e.month&&this.day===e.day}before(e){return!!e&&(this.year===e.year?this.month===e.month?this.day!==e.day&&this.day<e.day:this.month<e.month:this.year<e.year)}after(e){return!!e&&(this.year===e.year?this.month===e.month?this.day!==e.day&&this.day>e.day:this.month>e.month:this.year>e.year)}}function $e(e){return new Ve(e.getFullYear(),e.getMonth()+1,e.getDate())}function Ne(e){const t=new Date(e.year,e.month-1,e.day,12);return isNaN(t.getTime())||t.setFullYear(e.year),t}function ze(){return new Be}let Le=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:ze,token:e,providedIn:"root"}),e})(),Be=(()=>{let e=class extends Le{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(e,t="d",n=1){let a=Ne(e),i=!0,r=a.getMonth();switch(t){case"y":a.setFullYear(a.getFullYear()+n);break;case"m":r+=n,a.setMonth(r),r%=12,r<0&&(r+=12);break;case"d":a.setDate(a.getDate()+n),i=!1;break;default:return e}return i&&a.getMonth()!==r&&a.setDate(0),$e(a)}getPrev(e,t="d",n=1){return this.getNext(e,t,-n)}getWeekday(e){let t=Ne(e).getDay();return 0===t?7:t}getWeekNumber(e,t){7===t&&(t=0);const n=Ne(e[(11-t)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const a=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((a-n.getTime())/864e5)/7)+1}getToday(){return $e(new Date)}isValid(e){if(!(e&&Oe(e.year)&&Oe(e.month)&&Oe(e.day)))return!1;if(0===e.year)return!1;const t=Ne(e);return!isNaN(t.getTime())&&t.getFullYear()===e.year&&t.getMonth()+1===e.month&&t.getDate()===e.day}};return e.\u0275fac=function(t){return rn(t||e)},e.\u0275prov=o["\u0275\u0275defineInjectable"]({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();function He(e,t){return!function(e,t){return!e&&!t||!!e&&!!t&&e.equals(t)}(e,t)}function qe(e,t){return!(!e&&!t||e&&t&&e.year===t.year&&e.month===t.month)}function We(e,t,n){return e&&t&&e.before(t)?t:e&&n&&e.after(n)?n:e||null}function Qe(e,t){const{minDate:n,maxDate:a,disabled:i,markDisabled:r}=t;return!(null==e||i||r&&r(e,{year:e.year,month:e.month})||n&&e.before(n)||a&&e.after(a))}let Ke=(()=>{let e=class{getDayNumerals(e){return""+e.day}getWeekNumerals(e){return""+e}getYearNumerals(e){return""+e}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return e=Object(o["\u0275\u0275inject"])(o.LOCALE_ID),new Ue(e);var e},token:e,providedIn:"root"}),e})(),Ue=(()=>{let e=class extends Ke{constructor(e){super(),this._locale=e;const t=Object(a.A)(e,a.g.Standalone,a.x.Short);this._weekdaysShort=t.map((e,n)=>t[(n+1)%7]),this._monthsShort=Object(a.C)(e,a.g.Standalone,a.x.Abbreviated),this._monthsFull=Object(a.C)(e,a.g.Standalone,a.x.Wide)}getWeekdayShortName(e){return this._weekdaysShort[e-1]||""}getMonthShortName(e){return this._monthsShort[e-1]||""}getMonthFullName(e){return this._monthsFull[e-1]||""}getDayAriaLabel(e){const t=new Date(e.year,e.month-1,e.day);return Object(a.z)(t,"fullDate",this._locale)}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275inject"](o.LOCALE_ID))},e.\u0275prov=o["\u0275\u0275defineInjectable"]({token:e,factory:function(t){return e.\u0275fac(t)}}),e=i([r(0,Object(o.Inject)(o.LOCALE_ID))],e),e})(),Ze=(()=>{let e=class{constructor(e,t){this._calendar=e,this._i18n=t,this._VALIDATORS={dayTemplateData:e=>{if(this._state.dayTemplateData!==e)return{dayTemplateData:e}},displayMonths:e=>{if(Oe(e=Se(e))&&e>0&&this._state.displayMonths!==e)return{displayMonths:e}},disabled:e=>{if(this._state.disabled!==e)return{disabled:e}},firstDayOfWeek:e=>{if(Oe(e=Se(e))&&e>=0&&this._state.firstDayOfWeek!==e)return{firstDayOfWeek:e}},focusVisible:e=>{if(this._state.focusVisible!==e&&!this._state.disabled)return{focusVisible:e}},markDisabled:e=>{if(this._state.markDisabled!==e)return{markDisabled:e}},maxDate:e=>{const t=this.toValidDate(e,null);if(He(this._state.maxDate,t))return{maxDate:t}},minDate:e=>{const t=this.toValidDate(e,null);if(He(this._state.minDate,t))return{minDate:t}},navigation:e=>{if(this._state.navigation!==e)return{navigation:e}},outsideDays:e=>{if(this._state.outsideDays!==e)return{outsideDays:e}}},this._model$=new l.a,this._dateSelect$=new l.a,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]}}}get model$(){return this._model$.pipe(Object(x.a)(e=>e.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(Object(x.a)(e=>null!==e))}set(e){let t=Object.keys(e).map(t=>this._VALIDATORS[t](e[t])).reduce((e,t)=>Object.assign(Object.assign({},e),t),{});Object.keys(t).length>0&&this._nextState(t)}focus(e){const t=this.toValidDate(e,null);null!=t&&!this._state.disabled&&He(this._state.focusDate,t)&&this._nextState({focusDate:e})}focusSelect(){Qe(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(e){const t=this.toValidDate(e,this._calendar.getToday());null==t||this._state.disabled||this._state.firstDate&&!qe(this._state.firstDate,t)||this._nextState({firstDate:t})}select(e,t={}){const n=this.toValidDate(e,null);null==n||this._state.disabled||(He(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),t.emitEvent&&Qe(n,this._state)&&this._dateSelect$.next(n))}toValidDate(e,t){const n=Ve.from(e);return void 0===t&&(t=this._calendar.getToday()),this._calendar.isValid(n)?n:t}getMonth(e){for(let t of this._state.months)if(e.month===t.number&&e.year===t.year)return t;throw new Error(`month ${e.month} of year ${e.year} not found`)}_nextState(e){const t=this._updateState(e);this._patchContexts(t),this._state=t,this._model$.next(this._state)}_patchContexts(e){const{months:t,displayMonths:n,selectedDate:a,focusDate:i,focusVisible:r,disabled:o,outsideDays:s}=e;e.months.forEach(e=>{e.weeks.forEach(l=>{l.days.forEach(l=>{i&&(l.context.focused=i.equals(l.date)&&r),l.tabindex=!o&&i&&l.date.equals(i)&&i.month===e.number?0:-1,!0===o&&(l.context.disabled=!0),void 0!==a&&(l.context.selected=null!==a&&a.equals(l.date)),e.number!==l.date.month&&(l.hidden="hidden"===s||"collapsed"===s||n>1&&l.date.after(t[0].firstDate)&&l.date.before(t[n-1].lastDate))})})})}_updateState(e){const t=Object.assign({},this._state,e);let n=t.firstDate;if(("minDate"in e||"maxDate"in e)&&(function(e,t){if(t&&e&&t.before(e))throw new Error(`'maxDate' ${t} should be greater than 'minDate' ${e}`)}(t.minDate,t.maxDate),t.focusDate=We(t.focusDate,t.minDate,t.maxDate),t.firstDate=We(t.firstDate,t.minDate,t.maxDate),n=t.focusDate),"disabled"in e&&(t.focusVisible=!1),"selectedDate"in e&&0===this._state.months.length&&(n=t.selectedDate),"focusVisible"in e)return t;if("focusDate"in e&&(t.focusDate=We(t.focusDate,t.minDate,t.maxDate),n=t.focusDate,0!==t.months.length&&t.focusDate&&!t.focusDate.before(t.firstDate)&&!t.focusDate.after(t.lastDate)))return t;if("firstDate"in e&&(t.firstDate=We(t.firstDate,t.minDate,t.maxDate),n=t.firstDate),n){const a=function(e,t,n,a,i){const{displayMonths:r,months:o}=n,s=o.splice(0,o.length);return Array.from({length:r},(n,a)=>{const r=Object.assign(e.getNext(t,"m",a),{day:1});if(o[a]=null,!i){const e=s.findIndex(e=>e.firstDate.equals(r));-1!==e&&(o[a]=s.splice(e,1)[0])}return r}).forEach((t,i)=>{null===o[i]&&(o[i]=function(e,t,n,a,i={}){const{dayTemplateData:r,minDate:o,maxDate:s,firstDayOfWeek:l,markDisabled:c,outsideDays:d}=n,m=e.getToday();i.firstDate=null,i.lastDate=null,i.number=t.month,i.year=t.year,i.weeks=i.weeks||[],i.weekdays=i.weekdays||[],t=function(e,t,n){const a=e.getDaysPerWeek(),i=new Ve(t.year,t.month,1),r=e.getWeekday(i)%a;return e.getPrev(i,"d",(a+r-n)%a)}(e,t,l);for(let u=0;u<e.getWeeksPerMonth();u++){let n=i.weeks[u];n||(n=i.weeks[u]={number:0,days:[],collapsed:!0});const p=n.days;for(let l=0;l<e.getDaysPerWeek();l++){0===u&&(i.weekdays[l]=e.getWeekday(t));const n=new Ve(t.year,t.month,t.day),d=e.getNext(n),h=a.getDayAriaLabel(n);let f=!!(o&&n.before(o)||s&&n.after(s));!f&&c&&(f=c(n,{month:i.number,year:i.year}));let g=n.equals(m),b=r?r(n,{month:i.number,year:i.year}):void 0;null===i.firstDate&&n.month===i.number&&(i.firstDate=n),n.month===i.number&&d.month!==i.number&&(i.lastDate=n);let v=p[l];v||(v=p[l]={}),v.date=n,v.context=Object.assign(v.context||{},{$implicit:n,date:n,data:b,currentMonth:i.number,currentYear:i.year,disabled:f,focused:!1,selected:!1,today:g}),v.tabindex=-1,v.ariaLabel=h,v.hidden=!1,t=d}n.number=e.getWeekNumber(p.map(e=>e.date),l),n.collapsed="collapsed"===d&&p[0].date.month!==i.number&&p[p.length-1].date.month!==i.number}return i}(e,t,n,a,s.shift()||{}))}),o}(this._calendar,n,t,this._i18n,"dayTemplateData"in e||"firstDayOfWeek"in e||"markDisabled"in e||"minDate"in e||"maxDate"in e||"disabled"in e||"outsideDays"in e);t.months=a,t.firstDate=a[0].firstDate,t.lastDate=a[a.length-1].lastDate,"selectedDate"in e&&!Qe(t.selectedDate,t)&&(t.selectedDate=null),"firstDate"in e&&(!t.focusDate||t.focusDate.before(t.firstDate)||t.focusDate.after(t.lastDate))&&(t.focusDate=n);const i=!this._state.firstDate||this._state.firstDate.year!==t.firstDate.year,r=!this._state.firstDate||this._state.firstDate.month!==t.firstDate.month;"select"===t.navigation?(("minDate"in e||"maxDate"in e||0===t.selectBoxes.years.length||i)&&(t.selectBoxes.years=function(e,t,n){if(!e)return[];const a=t?Math.max(t.year,e.year-500):e.year-10,i=(n?Math.min(n.year,e.year+500):e.year+10)-a+1,r=Array(i);for(let o=0;o<i;o++)r[o]=a+o;return r}(t.firstDate,t.minDate,t.maxDate)),("minDate"in e||"maxDate"in e||0===t.selectBoxes.months.length||i)&&(t.selectBoxes.months=function(e,t,n,a){if(!t)return[];let i=e.getMonths(t.year);if(n&&t.year===n.year){const e=i.findIndex(e=>e===n.month);i=i.slice(e)}if(a&&t.year===a.year){const e=i.findIndex(e=>e===a.month);i=i.slice(0,e+1)}return i}(this._calendar,t.firstDate,t.minDate,t.maxDate))):t.selectBoxes={years:[],months:[]},"arrows"!==t.navigation&&"select"!==t.navigation||!(r||i||"minDate"in e||"maxDate"in e||"disabled"in e)||(t.prevDisabled=t.disabled||function(e,t,n){const a=Object.assign(e.getPrev(t,"m"),{day:1});return null!=n&&(a.year===n.year&&a.month<n.month||a.year<n.year&&1===n.month)}(this._calendar,t.firstDate,t.minDate),t.nextDisabled=t.disabled||function(e,t,n){const a=Object.assign(e.getNext(t,"m"),{day:1});return null!=n&&a.after(n)}(this._calendar,t.lastDate,t.maxDate))}return t}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275inject"](Le),o["\u0275\u0275inject"](Ke))},e.\u0275prov=o["\u0275\u0275defineInjectable"]({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();var Ye=function(e){return e[e.PREV=0]="PREV",e[e.NEXT=1]="NEXT",e}({});let Ge=(()=>{let e=class{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekdays=!0,this.showWeekNumbers=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return new e},token:e,providedIn:"root"}),e})();function Xe(){return new et}let Je=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:Xe,token:e,providedIn:"root"}),e})(),et=(()=>{let e=class extends Je{fromModel(e){return e&&Oe(e.year)&&Oe(e.month)&&Oe(e.day)?{year:e.year,month:e.month,day:e.day}:null}toModel(e){return e&&Oe(e.year)&&Oe(e.month)&&Oe(e.day)?{year:e.year,month:e.month,day:e.day}:null}};return e.\u0275fac=function(t){return on(t||e)},e.\u0275prov=o["\u0275\u0275defineInjectable"]({token:e,factory:function(t){return e.\u0275fac(t)}}),e})();const tt={provide:s.k,useExisting:Object(o.forwardRef)(()=>at),multi:!0};let nt=(()=>{let e=class{constructor(e){this.templateRef=e}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](o.TemplateRef))},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["ng-template","ngbDatepickerContent",""]]}),e})(),at=(()=>{let e=class{constructor(e,t,n,a,i,r,s,c){this._service=e,this._calendar=t,this.i18n=n,this._elementRef=r,this._ngbDateAdapter=s,this._ngZone=c,this._controlValue=null,this._destroyed$=new l.a,this._publicState={},this.navigate=new o.EventEmitter,this.dateSelect=new o.EventEmitter,this.select=this.dateSelect,this.onChange=e=>{},this.onTouched=()=>{},["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekdays","showWeekNumbers","startDate"].forEach(e=>this[e]=a[e]),e.dateSelect$.pipe(Object(w.a)(this._destroyed$)).subscribe(e=>{this.dateSelect.emit(e)}),e.model$.pipe(Object(w.a)(this._destroyed$)).subscribe(e=>{const t=e.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:e.maxDate,minDate:e.minDate,firstDate:e.firstDate,lastDate:e.lastDate,focusedDate:e.focusDate,months:e.months.map(e=>e.firstDate)};let a=!1;if(!t.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:t.year,month:t.month},preventDefault:()=>a=!0}),a&&null!==n))return void this._service.open(n);const r=e.selectedDate,o=e.focusDate,s=this.model?this.model.focusDate:null;this.model=e,He(r,this._controlValue)&&(this._controlValue=r,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(r))),He(o,s)&&s&&e.focusVisible&&this.focus(),i.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}focusDate(e){this._service.focus(Ve.from(e))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe(Object(_.a)(1)).subscribe(()=>{const e=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');e&&e.focus()})}navigateTo(e){this._service.open(Ve.from(e?e.day?e:Object.assign(Object.assign({},e),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const e=Object(d.a)(this._contentEl.nativeElement,"focusin"),t=Object(d.a)(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;Object(m.a)(e,t).pipe(Object(x.a)(({target:e,relatedTarget:t})=>!(Me(e,"ngb-dp-day")&&Me(t,"ngb-dp-day")&&n.contains(e)&&n.contains(t))),Object(w.a)(this._destroyed$)).subscribe(({type:e})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===e})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const e={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].forEach(t=>e[t]=this[t]),this._service.set(e),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(e){const t={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].filter(t=>t in e).forEach(e=>t[e]=this[e]),this._service.set(t),"startDate"in e){const{currentValue:t,previousValue:n}=e.startDate;qe(n,t)&&this.navigateTo(this.startDate)}}onDateSelect(e){this._service.focus(e),this._service.select(e,{emitEvent:!0})}onNavigateDateSelect(e){this._service.open(e)}onNavigateEvent(e){switch(e){case Ye.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case Ye.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this._service.set({disabled:e})}writeValue(e){this._controlValue=Ve.from(this._ngbDateAdapter.fromModel(e)),this._service.select(this._controlValue)}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Ze),o["\u0275\u0275directiveInject"](Le),o["\u0275\u0275directiveInject"](Ke),o["\u0275\u0275directiveInject"](Ge),o["\u0275\u0275directiveInject"](o.ChangeDetectorRef),o["\u0275\u0275directiveInject"](o.ElementRef),o["\u0275\u0275directiveInject"](Je),o["\u0275\u0275directiveInject"](o.NgZone))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["ngb-datepicker"]],contentQueries:function(e,t,n){var a;1&e&&o["\u0275\u0275staticContentQuery"](n,nt,!0),2&e&&o["\u0275\u0275queryRefresh"](a=o["\u0275\u0275loadQuery"]())&&(t.contentTemplate=a.first)},viewQuery:function(e,t){var n;1&e&&(o["\u0275\u0275staticViewQuery"](O,!0),o["\u0275\u0275staticViewQuery"](I,!0)),2&e&&(o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t._defaultDayTemplate=n.first),o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t._contentEl=n.first))},inputs:{dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate"},outputs:{navigate:"navigate",dateSelect:"dateSelect",select:"select"},exportAs:["ngbDatepicker"],features:[o["\u0275\u0275ProvidersFeature"]([tt,Ze]),o["\u0275\u0275NgOnChangesFeature"]],decls:10,vars:5,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(e,t){if(1&e&&(o["\u0275\u0275template"](0,M,1,5,"ng-template",null,0,o["\u0275\u0275templateRefExtractor"]),o["\u0275\u0275template"](2,j,1,1,"ng-template",null,1,o["\u0275\u0275templateRefExtractor"]),o["\u0275\u0275elementStart"](4,"div",2),o["\u0275\u0275template"](5,T,1,7,"ngb-datepicker-navigation",3),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](6,"div",4,5),o["\u0275\u0275template"](8,F,0,0,"ng-template",6),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](9,A,0,0,"ng-template",6)),2&e){const e=o["\u0275\u0275reference"](3);o["\u0275\u0275advance"](5),o["\u0275\u0275property"]("ngIf","none"!==t.navigation),o["\u0275\u0275advance"](1),o["\u0275\u0275classProp"]("ngb-dp-months",!t.contentTemplate),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngTemplateOutlet",(null==t.contentTemplate?null:t.contentTemplate.templateRef)||e),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngTemplateOutlet",t.footerTemplate)}},directives:function(){return[a.o,a.t,Ct,a.n,ot,st]},styles:["ngb-datepicker{border:1px solid #dfdfdf;border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}.ngb-dp-body{z-index:1050}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-months{display:-ms-flexbox;display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}"],encapsulation:2,changeDetection:0}),e})();var it=function(e){return e[e.Tab=9]="Tab",e[e.Enter=13]="Enter",e[e.Escape=27]="Escape",e[e.Space=32]="Space",e[e.PageUp=33]="PageUp",e[e.PageDown=34]="PageDown",e[e.End=35]="End",e[e.Home=36]="Home",e[e.ArrowLeft=37]="ArrowLeft",e[e.ArrowUp=38]="ArrowUp",e[e.ArrowRight=39]="ArrowRight",e[e.ArrowDown=40]="ArrowDown",e}({});let rt=(()=>{let e=class{processKey(e,t){const{state:n,calendar:a}=t;switch(e.which){case it.PageUp:t.focusDate(a.getPrev(n.focusedDate,e.shiftKey?"y":"m",1));break;case it.PageDown:t.focusDate(a.getNext(n.focusedDate,e.shiftKey?"y":"m",1));break;case it.End:t.focusDate(e.shiftKey?n.maxDate:n.lastDate);break;case it.Home:t.focusDate(e.shiftKey?n.minDate:n.firstDate);break;case it.ArrowLeft:t.focusDate(a.getPrev(n.focusedDate,"d",1));break;case it.ArrowUp:t.focusDate(a.getPrev(n.focusedDate,"d",a.getDaysPerWeek()));break;case it.ArrowRight:t.focusDate(a.getNext(n.focusedDate,"d",1));break;case it.ArrowDown:t.focusDate(a.getNext(n.focusedDate,"d",a.getDaysPerWeek()));break;case it.Enter:case it.Space:t.focusSelect();break;default:return}e.preventDefault(),e.stopPropagation()}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return new e},token:e,providedIn:"root"}),e})(),ot=(()=>{let e=class{constructor(e,t,n,a){this.i18n=e,this.datepicker=t,this._keyboardService=n,this._service=a}set month(e){this.viewModel=this._service.getMonth(e)}onKeyDown(e){this._keyboardService.processKey(e,this.datepicker)}doSelect(e){e.context.disabled||e.hidden||this.datepicker.onDateSelect(e.date)}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Ke),o["\u0275\u0275directiveInject"](at),o["\u0275\u0275directiveInject"](rt),o["\u0275\u0275directiveInject"](Ze))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(e,t){1&e&&o["\u0275\u0275listener"]("keydown",function(e){return t.onKeyDown(e)})},inputs:{month:"month"},decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(o["\u0275\u0275template"](0,N,3,2,"div",0),o["\u0275\u0275template"](1,W,1,1,"ng-template",1)),2&e&&(o["\u0275\u0275property"]("ngIf",t.datepicker.showWeekdays),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngForOf",t.viewModel.weeks))},directives:[a.o,a.n,a.t],styles:['ngb-datepicker-month{display:block}.ngb-dp-week-number,.ngb-dp-weekday{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:#5bc0de;color:var(--info)}.ngb-dp-week{border-radius:.25rem;display:-ms-flexbox;display:flex}.ngb-dp-weekdays{border-bottom:1px solid rgba(0,0,0,.125);border-radius:0;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-day,.ngb-dp-week-number,.ngb-dp-weekday{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}'],encapsulation:2}),e})(),st=(()=>{let e=class{constructor(e){this.i18n=e,this.navigation=Ye,this.months=[],this.navigate=new o.EventEmitter,this.select=new o.EventEmitter}onClickPrev(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(e){e.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Ke))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["ngb-datepicker-navigation"]],inputs:{months:"months",date:"date",disabled:"disabled",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},decls:10,vars:4,consts:function(){return[[1,"ngb-dp-arrow"],["type","button",1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click",6,"aria-label","title"],["aria-label",$localize`:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`,"title",$localize`:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["aria-label",$localize`:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`,"title",$localize`:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"div",0),o["\u0275\u0275elementStart"](1,"button",1),o["\u0275\u0275i18nAttributes"](2,2),o["\u0275\u0275listener"]("click",function(e){return t.onClickPrev(e)}),o["\u0275\u0275element"](3,"span",3),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](4,Q,1,4,"ngb-datepicker-navigation-select",4),o["\u0275\u0275template"](5,Y,1,1,void 0,5),o["\u0275\u0275elementStart"](6,"div",6),o["\u0275\u0275elementStart"](7,"button",1),o["\u0275\u0275i18nAttributes"](8,7),o["\u0275\u0275listener"]("click",function(e){return t.onClickNext(e)}),o["\u0275\u0275element"](9,"span",3),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("disabled",t.prevDisabled),o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("ngIf",t.showSelect),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",!t.showSelect),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("disabled",t.nextDisabled))},directives:function(){return[a.o,St,a.n]},styles:["ngb-datepicker-navigation{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;-webkit-transform:rotate(-135deg);transform:rotate(-135deg)}.right .ngb-dp-navigation-chevron{-webkit-transform:rotate(45deg);transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{-ms-flex-pack:end;justify-content:flex-end}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:-ms-flexbox;display:flex;-ms-flex:1 1 9rem;flex:1 1 9rem}"],encapsulation:2,changeDetection:0}),e})();const lt=(e,t)=>!!t&&t.some(t=>t.contains(e)),ct=(e,t)=>!t||null!=function(e,t){return t?void 0===e.closest?null:e.closest(t):null}(e,t),dt="undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));function mt(e,t,n,a,i,r,o,s){var l;n&&e.runOutsideAngular((l=()=>{const l=Object(d.a)(t,"keydown").pipe(Object(w.a)(i),Object(x.a)(e=>e.which===it.Escape),Object(C.a)(e=>e.preventDefault())),c=Object(d.a)(t,"mousedown").pipe(Object(v.a)(e=>{const t=e.target;return 2!==e.button&&!lt(t,o)&&("inside"===n?lt(t,r)&&ct(t,s):"outside"===n?!lt(t,r):ct(t,s)||!lt(t,r))}),Object(w.a)(i)),m=Object(d.a)(t,"mouseup").pipe(S(c),Object(x.a)(([e,t])=>t),Object(k.a)(0),Object(w.a)(i));(function(...e){if(1===e.length){if(!Object(u.a)(e[0]))return e[0];e=e[0]}return Object(p.a)(e,void 0).lift(new g)})([l.pipe(Object(v.a)(e=>0)),m.pipe(Object(v.a)(e=>1))]).subscribe(t=>e.run(()=>a(t)))},dt?()=>setTimeout(()=>l(),100):l))}const ut=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", "),pt=/\s+/,ht=new class{getAllStyles(e){return window.getComputedStyle(e)}getStyle(e,t){return this.getAllStyles(e)[t]}isStaticPositioned(e){return"static"===(this.getStyle(e,"position")||"static")}offsetParent(e){let t=e.offsetParent||document.documentElement;for(;t&&t!==document.documentElement&&this.isStaticPositioned(t);)t=t.offsetParent;return t||document.documentElement}position(e,t=!0){let n,a={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(e,"position"))n=e.getBoundingClientRect(),n={top:n.top,bottom:n.bottom,left:n.left,right:n.right,height:n.height,width:n.width};else{const t=this.offsetParent(e);n=this.offset(e,!1),t!==document.documentElement&&(a=this.offset(t,!1)),a.top+=t.clientTop,a.left+=t.clientLeft}return n.top-=a.top,n.bottom-=a.top,n.left-=a.left,n.right-=a.left,t&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n}offset(e,t=!0){const n=e.getBoundingClientRect(),a=window.pageYOffset-document.documentElement.clientTop,i=window.pageXOffset-document.documentElement.clientLeft;let r={height:n.height||e.offsetHeight,width:n.width||e.offsetWidth,top:n.top+a,bottom:n.bottom+a,left:n.left+i,right:n.right+i};return t&&(r.height=Math.round(r.height),r.width=Math.round(r.width),r.top=Math.round(r.top),r.bottom=Math.round(r.bottom),r.left=Math.round(r.left),r.right=Math.round(r.right)),r}positionElements(e,t,n,a){const[i="top",r="center"]=n.split("-"),o=a?this.offset(e,!1):this.position(e,!1),s=this.getAllStyles(t),l=parseFloat(s.marginTop),c=parseFloat(s.marginBottom),d=parseFloat(s.marginLeft),m=parseFloat(s.marginRight);let u=0,p=0;switch(i){case"top":u=o.top-(t.offsetHeight+l+c);break;case"bottom":u=o.top+o.height;break;case"left":p=o.left-(t.offsetWidth+d+m);break;case"right":p=o.left+o.width}switch(r){case"top":u=o.top;break;case"bottom":u=o.top+o.height-t.offsetHeight;break;case"left":p=o.left;break;case"right":p=o.left+o.width-t.offsetWidth;break;case"center":"top"===i||"bottom"===i?p=o.left+o.width/2-t.offsetWidth/2:u=o.top+o.height/2-t.offsetHeight/2}t.style.transform=`translate(${Math.round(p)}px, ${Math.round(u)}px)`;const h=t.getBoundingClientRect(),f=document.documentElement,g=window.innerHeight||f.clientHeight,b=window.innerWidth||f.clientWidth;return h.left>=0&&h.top>=0&&h.right<=b&&h.bottom<=g}};function ft(e,t,n,a,i){let r=Array.isArray(n)?n:n.split(pt);const o=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],s=t.classList,l=e=>{const[t,n]=e.split("-"),a=[];return i&&(a.push(`${i}-${t}`),n&&a.push(`${i}-${t}-${n}`),a.forEach(e=>{s.add(e)})),a};i&&o.forEach(e=>{s.remove(`${i}-${e}`)});let c=r.findIndex(e=>"auto"===e);c>=0&&o.forEach(function(e){null==r.find(t=>-1!==t.search("^"+e))&&r.splice(c++,1,e)});const d=t.style;d.position="absolute",d.top="0",d.left="0",d["will-change"]="transform";let m=null,u=!1;for(m of r){let n=l(m);if(ht.positionElements(e,t,m,a)){u=!0;break}i&&n.forEach(e=>{s.remove(e)})}return u||(m=r[0],l(m),ht.positionElements(e,t,m,a)),m}function gt(){return new vt}let bt=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:gt,token:e,providedIn:"root"}),e})(),vt=(()=>{let e=class extends bt{parse(e){if(null!=e){const t=e.trim().split("-");if(1===t.length&&ke(t[0]))return{year:Se(t[0]),month:null,day:null};if(2===t.length&&ke(t[0])&&ke(t[1]))return{year:Se(t[0]),month:Se(t[1]),day:null};if(3===t.length&&ke(t[0])&&ke(t[1])&&ke(t[2]))return{year:Se(t[0]),month:Se(t[1]),day:Se(t[2])}}return null}format(e){return e?`${e.year}-${ke(e.month)?Ie(e.month):""}-${ke(e.day)?Ie(e.day):""}`:""}};return e.\u0275fac=function(t){return sn(t||e)},e.\u0275prov=o["\u0275\u0275defineInjectable"]({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),yt=(()=>{let e=class extends Ge{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"],this.restoreFocus=!0}};return e.\u0275fac=function(t){return ln(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return new e},token:e,providedIn:"root"}),e})();const wt={provide:s.k,useExisting:Object(o.forwardRef)(()=>_t),multi:!0},xt={provide:s.j,useExisting:Object(o.forwardRef)(()=>_t),multi:!0};let _t=(()=>{let e=class{constructor(e,t,n,a,i,r,s,l,c,d,m){this._parserFormatter=e,this._elRef=t,this._vcRef=n,this._renderer=a,this._cfr=i,this._ngZone=r,this._calendar=s,this._dateAdapter=l,this._document=c,this._changeDetector=d,this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this.dateSelect=new o.EventEmitter,this.navigate=new o.EventEmitter,this.closed=new o.EventEmitter,this._onChange=e=>{},this._onTouched=()=>{},this._validatorChange=()=>{},["autoClose","container","positionTarget","placement"].forEach(e=>this[e]=m[e]),this._zoneSubscription=r.onStable.subscribe(()=>this._updatePopupPosition())}get disabled(){return this._disabled}set disabled(e){this._disabled=""===e||e&&"false"!==e,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}registerOnValidatorChange(e){this._validatorChange=e}setDisabledState(e){this.disabled=e}validate(e){const{value:t}=e;if(null!=t){const e=this._fromDateStruct(this._dateAdapter.fromModel(t));if(!e)return{ngbDate:{invalid:t}};if(this.minDate&&e.before(Ve.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:t}}};if(this.maxDate&&e.after(Ve.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:t}}}}return null}writeValue(e){this._model=this._fromDateStruct(this._dateAdapter.fromModel(e)),this._writeModelValue(this._model)}manualDateChange(e,t=!1){const n=e!==this._inputValue;n&&(this._inputValue=e,this._model=this._fromDateStruct(this._parserFormatter.parse(e))),!n&&t||this._onChange(this._model?this._dateAdapter.toModel(this._model):""===e?null:e),t&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){const e=this._cfr.resolveComponentFactory(at);this._cRef=this._vcRef.createComponent(e),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef.instance),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(e=>{this.writeValue(e),this._onChange(e),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,((e,t,n,a=!1)=>{e.runOutsideAngular(()=>{const e=Object(d.a)(t,"focusin").pipe(Object(w.a)(n),Object(v.a)(e=>e.target));Object(d.a)(t,"keydown").pipe(Object(w.a)(n),Object(x.a)(e=>e.which===it.Tab),S(e)).subscribe(([e,n])=>{const[a,i]=function(e){const t=Array.from(e.querySelectorAll(ut)).filter(e=>-1!==e.tabIndex);return[t[0],t[t.length-1]]}(t);n!==a&&n!==t||!e.shiftKey||(i.focus(),e.preventDefault()),n!==i||e.shiftKey||(a.focus(),e.preventDefault())}),a&&Object(d.a)(t,"click").pipe(Object(w.a)(n),S(e),Object(v.a)(e=>e[1])).subscribe(e=>e.focus())})})(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),this._cRef.instance.focus(),mt(this._ngZone,this._document,this.autoClose,()=>this.close(),this.closed,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}}close(){if(this.isOpen()){this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null,this.closed.emit(),this._changeDetector.markForCheck();let e=this._elWithFocus;De(this.restoreFocus)?e=this._document.querySelector(this.restoreFocus):void 0!==this.restoreFocus&&(e=this.restoreFocus),e&&e.focus?e.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(e){this.isOpen()&&this._cRef.instance.navigateTo(e)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(e){(e.minDate||e.maxDate)&&(this._validatorChange(),this.isOpen()&&(e.minDate&&(this._cRef.instance.minDate=this.minDate),e.maxDate&&(this._cRef.instance.maxDate=this.maxDate),this._cRef.instance.ngOnChanges(e)))}ngOnDestroy(){this.close(),this._zoneSubscription.unsubscribe()}_applyDatepickerInputs(e){["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekdays","showWeekNumbers"].forEach(t=>{void 0!==this[t]&&(e[t]=this[t])}),e.startDate=this.startDate||this._model}_applyPopupStyling(e){this._renderer.addClass(e,"dropdown-menu"),this._renderer.addClass(e,"show"),"body"===this.container&&this._renderer.addClass(e,"ngb-dp-body")}_subscribeForDatepickerOutputs(e){e.navigate.subscribe(e=>this.navigate.emit(e)),e.dateSelect.subscribe(e=>{this.dateSelect.emit(e),!0!==this.autoClose&&"inside"!==this.autoClose||this.close()})}_writeModelValue(e){const t=this._parserFormatter.format(e);this._inputValue=t,this._renderer.setProperty(this._elRef.nativeElement,"value",t),this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(e)),this._onTouched())}_fromDateStruct(e){const t=e?new Ve(e.year,e.month,e.day):null;return this._calendar.isValid(t)?t:null}_updatePopupPosition(){if(!this._cRef)return;let e;if(e=De(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?this.positionTarget:this._elRef.nativeElement,this.positionTarget&&!e)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");ft(e,this._cRef.location.nativeElement,this.placement,"body"===this.container)}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](bt),o["\u0275\u0275directiveInject"](o.ElementRef),o["\u0275\u0275directiveInject"](o.ViewContainerRef),o["\u0275\u0275directiveInject"](o.Renderer2),o["\u0275\u0275directiveInject"](o.ComponentFactoryResolver),o["\u0275\u0275directiveInject"](o.NgZone),o["\u0275\u0275directiveInject"](Le),o["\u0275\u0275directiveInject"](Je),o["\u0275\u0275directiveInject"](a.d),o["\u0275\u0275directiveInject"](o.ChangeDetectorRef),o["\u0275\u0275directiveInject"](yt))},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["input","ngbDatepicker",""]],hostVars:1,hostBindings:function(e,t){1&e&&o["\u0275\u0275listener"]("input",function(e){return t.manualDateChange(e.target.value)})("change",function(e){return t.manualDateChange(e.target.value,!0)})("focus",function(){return t.onFocus()})("blur",function(){return t.onBlur()}),2&e&&o["\u0275\u0275hostProperty"]("disabled",t.disabled)},inputs:{disabled:"disabled",autoClose:"autoClose",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",restoreFocus:"restoreFocus",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},exportAs:["ngbDatepicker"],features:[o["\u0275\u0275ProvidersFeature"]([wt,xt,{provide:Ge,useExisting:yt}]),o["\u0275\u0275NgOnChangesFeature"]]}),e=i([r(8,Object(o.Inject)(a.d))],e),e})(),Ct=(()=>{let e=class{constructor(e){this.i18n=e}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Ke))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(e,t){2&e&&o["\u0275\u0275classProp"]("bg-primary",t.selected)("text-white",t.selected)("text-muted",t.isMuted())("outside",t.isMuted())("active",t.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:G,decls:1,vars:1,template:function(e,t){1&e&&o["\u0275\u0275text"](0),2&e&&o["\u0275\u0275textInterpolate"](t.i18n.getDayNumerals(t.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:0 0}[ngbDatepickerDayView].outside{opacity:.5}"],encapsulation:2,changeDetection:0}),e})(),St=(()=>{let e=class{constructor(e,t){this.i18n=e,this._renderer=t,this.select=new o.EventEmitter,this._month=-1,this._year=-1}changeMonth(e){this.select.emit(new Ve(this.date.year,Se(e),1))}changeYear(e){this.select.emit(new Ve(Se(e),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Ke),o["\u0275\u0275directiveInject"](o.Renderer2))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(e,t){var n;1&e&&(o["\u0275\u0275staticViewQuery"](X,!0,o.ElementRef),o["\u0275\u0275staticViewQuery"](J,!0,o.ElementRef)),2&e&&(o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.monthSelect=n.first),o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.yearSelect=n.first))},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},decls:8,vars:4,consts:function(){return[[1,"custom-select",3,"disabled","change",6,"aria-label","title"],["month",""],["aria-label",$localize`:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`,"title",$localize`:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`],[3,"value",4,"ngFor","ngForOf"],["year",""],["aria-label",$localize`:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`,"title",$localize`:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`],[3,"value"]]},template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"select",0,1),o["\u0275\u0275i18nAttributes"](2,2),o["\u0275\u0275listener"]("change",function(e){return t.changeMonth(e.target.value)}),o["\u0275\u0275template"](3,ee,2,3,"option",3),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](4,"select",0,4),o["\u0275\u0275i18nAttributes"](6,5),o["\u0275\u0275listener"]("change",function(e){return t.changeYear(e.target.value)}),o["\u0275\u0275template"](7,te,2,2,"option",3),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275property"]("disabled",t.disabled),o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("ngForOf",t.months),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("disabled",t.disabled),o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("ngForOf",t.years))},directives:[a.n,s.q,s.v],styles:["ngb-datepicker-navigation-select>.custom-select{-ms-flex:1 1 auto;flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.custom-select:focus{z-index:1}ngb-datepicker-navigation-select>.custom-select::-ms-value{background-color:transparent!important}"],encapsulation:2,changeDetection:0}),e})();new Date(1882,10,12),new Date(2174,10,25);let Et=(()=>{let e=class{constructor(){this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return new e},token:e,providedIn:"root"}),e})();var Dt;let kt=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["",8,"navbar"]]}),e})(),Ot=(()=>{let e=class{constructor(e){this.elementRef=e,this._disabled=!1}set disabled(e){this._disabled=""===e||!0===e}get disabled(){return this._disabled}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](o.ElementRef))},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:2,hostBindings:function(e,t){2&e&&o["\u0275\u0275classProp"]("disabled",t.disabled)},inputs:{disabled:"disabled"}}),e})(),It=(()=>{let e=class{constructor(e,t){this.dropdown=e,this.placement="bottom",this.isOpen=!1,this.nativeElement=t.nativeElement}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Object(o.forwardRef)(()=>Rt)),o["\u0275\u0275directiveInject"](o.ElementRef))},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(e,t,n){var a;1&e&&o["\u0275\u0275contentQuery"](n,Ot,!1),2&e&&o["\u0275\u0275queryRefresh"](a=o["\u0275\u0275loadQuery"]())&&(t.menuItems=a)},hostVars:5,hostBindings:function(e,t){1&e&&o["\u0275\u0275listener"]("keydown.ArrowUp",function(e){return t.dropdown.onKeyDown(e)})("keydown.ArrowDown",function(e){return t.dropdown.onKeyDown(e)})("keydown.Home",function(e){return t.dropdown.onKeyDown(e)})("keydown.End",function(e){return t.dropdown.onKeyDown(e)})("keydown.Enter",function(e){return t.dropdown.onKeyDown(e)})("keydown.Space",function(e){return t.dropdown.onKeyDown(e)})("keydown.Tab",function(e){return t.dropdown.onKeyDown(e)})("keydown.Shift.Tab",function(e){return t.dropdown.onKeyDown(e)}),2&e&&(o["\u0275\u0275attribute"]("x-placement",t.placement),o["\u0275\u0275classProp"]("dropdown-menu",!0)("show",t.dropdown.isOpen()))}}),e=i([r(0,Object(o.Inject)(Object(o.forwardRef)(()=>Rt)))],e),e})(),Mt=(()=>{let e=class{constructor(e,t){this.dropdown=e,this.nativeElement=t.nativeElement}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Object(o.forwardRef)(()=>Rt)),o["\u0275\u0275directiveInject"](o.ElementRef))},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,t){2&e&&o["\u0275\u0275attribute"]("aria-expanded",t.dropdown.isOpen())}}),e=i([r(0,Object(o.Inject)(Object(o.forwardRef)(()=>Rt)))],e),e})(),Pt=(()=>{let e=Dt=class extends Mt{constructor(e,t){super(e,t)}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Object(o.forwardRef)(()=>Rt)),o["\u0275\u0275directiveInject"](o.ElementRef))},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(e,t){1&e&&o["\u0275\u0275listener"]("click",function(){return t.dropdown.toggle()})("keydown.ArrowUp",function(e){return t.dropdown.onKeyDown(e)})("keydown.ArrowDown",function(e){return t.dropdown.onKeyDown(e)})("keydown.Home",function(e){return t.dropdown.onKeyDown(e)})("keydown.End",function(e){return t.dropdown.onKeyDown(e)})("keydown.Tab",function(e){return t.dropdown.onKeyDown(e)})("keydown.Shift.Tab",function(e){return t.dropdown.onKeyDown(e)}),2&e&&o["\u0275\u0275attribute"]("aria-expanded",t.dropdown.isOpen())},features:[o["\u0275\u0275ProvidersFeature"]([{provide:Mt,useExisting:Object(o.forwardRef)(()=>Dt)}]),o["\u0275\u0275InheritDefinitionFeature"]]}),e=Dt=i([r(0,Object(o.Inject)(Object(o.forwardRef)(()=>Rt)))],e),e})(),Rt=(()=>{let e=class{constructor(e,t,n,a,i,r,s){this._changeDetector=e,this._document=n,this._ngZone=a,this._elementRef=i,this._renderer=r,this._closed$=new l.a,this._bodyContainer=null,this._open=!1,this.openChange=new o.EventEmitter,this.placement=t.placement,this.container=t.container,this.autoClose=t.autoClose,this.display=s?"static":"dynamic",this._zoneSubscription=a.onStable.subscribe(()=>{this._positionMenu()})}ngAfterContentInit(){this._ngZone.onStable.pipe(Object(_.a)(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(e){e.container&&this._open&&this._applyContainer(this.container),e.placement&&!e.placement.isFirstChange&&this._applyPlacementClasses()}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&this._anchor.nativeElement.focus())}_setCloseHandlers(){mt(this._ngZone,this._document,this.autoClose,e=>{this.close(),0===e&&this._anchor.nativeElement.focus()},this._closed$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._closed$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this._resetContainer(),this._closed$.next(),this._zoneSubscription.unsubscribe()}onKeyDown(e){const t=e.which,n=this._getMenuElements();let a=-1,i=null;const r=this._isEventFromToggle(e);if(!r&&n.length&&n.forEach((t,n)=>{t.contains(e.target)&&(i=t),t===this._document.activeElement&&(a=n)}),t!==it.Space&&t!==it.Enter){if(t!==it.Tab){if(r||i){if(this.open(),n.length){switch(t){case it.ArrowDown:a=Math.min(a+1,n.length-1);break;case it.ArrowUp:if(this._isDropup()&&-1===a){a=n.length-1;break}a=Math.max(a-1,0);break;case it.Home:a=0;break;case it.End:a=n.length-1}n[a].focus()}e.preventDefault()}}else if(e.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===e.target)return void("body"!==this.container||e.shiftKey?e.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const t=this._menu.nativeElement.querySelectorAll(ut);e.shiftKey&&e.target===t[0]?(this._anchor.nativeElement.focus(),e.preventDefault()):e.shiftKey||e.target!==t[t.length-1]||(this._anchor.nativeElement.focus(),this.close())}else Object(d.a)(e.target,"focusout").pipe(Object(_.a)(1)).subscribe(({relatedTarget:e})=>{this._elementRef.nativeElement.contains(e)||this.close()})}}else!i||!0!==this.autoClose&&"inside"!==this.autoClose||Object(d.a)(i,"click").pipe(Object(_.a)(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(e){return this._anchor.nativeElement.contains(e.target)}_getMenuElements(){const e=this._menu;return null==e?[]:e.menuItems.filter(e=>!e.disabled).map(e=>e.elementRef.nativeElement)}_positionMenu(){const e=this._menu;this.isOpen()&&e&&this._applyPlacementClasses("dynamic"===this.display?ft(this._anchor.nativeElement,this._bodyContainer||this._menu.nativeElement,this.placement,"body"===this.container):this._getFirstPlacement(this.placement))}_getFirstPlacement(e){return Array.isArray(e)?e[0]:e.split(" ")[0]}_resetContainer(){const e=this._renderer;if(this._menu){const t=this._menu.nativeElement;e.appendChild(this._elementRef.nativeElement,t),e.removeStyle(t,"position"),e.removeStyle(t,"transform")}this._bodyContainer&&(e.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(e=null){if(this._resetContainer(),"body"===e){const e=this._renderer,t=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||e.createElement("div");e.setStyle(n,"position","absolute"),e.setStyle(t,"position","static"),e.setStyle(n,"z-index","1050"),e.appendChild(n,t),e.appendChild(this._document.body,n)}}_applyPlacementClasses(e){const t=this._menu;if(t){e||(e=this._getFirstPlacement(this.placement));const n=this._renderer,a=this._elementRef.nativeElement;n.removeClass(a,"dropup"),n.removeClass(a,"dropdown"),t.placement="static"===this.display?null:e;const i=-1!==e.search("^top")?"dropup":"dropdown";n.addClass(a,i);const r=this._bodyContainer;r&&(n.removeClass(r,"dropup"),n.removeClass(r,"dropdown"),n.addClass(r,i))}}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](o.ChangeDetectorRef),o["\u0275\u0275directiveInject"](Et),o["\u0275\u0275directiveInject"](a.d),o["\u0275\u0275directiveInject"](o.NgZone),o["\u0275\u0275directiveInject"](o.ElementRef),o["\u0275\u0275directiveInject"](o.Renderer2),o["\u0275\u0275directiveInject"](kt,8))},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["","ngbDropdown",""]],contentQueries:function(e,t,n){var a;1&e&&(o["\u0275\u0275contentQuery"](n,It,!0),o["\u0275\u0275contentQuery"](n,Mt,!0)),2&e&&(o["\u0275\u0275queryRefresh"](a=o["\u0275\u0275loadQuery"]())&&(t._menu=a.first),o["\u0275\u0275queryRefresh"](a=o["\u0275\u0275loadQuery"]())&&(t._anchor=a.first))},hostVars:2,hostBindings:function(e,t){2&e&&o["\u0275\u0275classProp"]("show",t.isOpen())},inputs:{_open:["open","_open"],placement:"placement",container:"container",autoClose:"autoClose",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[o["\u0275\u0275NgOnChangesFeature"]]}),e=i([r(2,Object(o.Inject)(a.d)),r(6,Object(o.Optional)())],e),e})(),jt=(()=>{let e=class{};return e.\u0275mod=o["\u0275\u0275defineNgModule"]({type:e}),e.\u0275inj=o["\u0275\u0275defineInjector"]({factory:function(t){return new(t||e)}}),e})();class Tt{constructor(e,t,n){this.nodes=e,this.viewRef=t,this.componentRef=n}}class Ft{constructor(e,t,n,a,i,r){this._type=e,this._injector=t,this._viewContainerRef=n,this._renderer=a,this._componentFactoryResolver=i,this._applicationRef=r,this._windowRef=null,this._contentRef=null}open(e,t){return this._windowRef||(this._contentRef=this._getContentRef(e,t),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes)),this._windowRef}close(){var e;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null,(null===(e=this._contentRef)||void 0===e?void 0:e.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null))}_getContentRef(e,t){if(e){if(e instanceof o.TemplateRef){const n=e.createEmbeddedView(t);return this._applicationRef.attachView(n),new Tt([n.rootNodes],n)}return new Tt([[this._renderer.createText(""+e)]])}return new Tt([])}}let At=(()=>{let e=class{constructor(){this.max=10,this.readonly=!1,this.resettable=!1}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return new e},token:e,providedIn:"root"}),e})();const Vt={provide:s.k,useExisting:Object(o.forwardRef)(()=>$t),multi:!0};let $t=(()=>{let e=class{constructor(e,t){this._changeDetectorRef=t,this.contexts=[],this.disabled=!1,this.hover=new o.EventEmitter,this.leave=new o.EventEmitter,this.rateChange=new o.EventEmitter(!0),this.onChange=e=>{},this.onTouched=()=>{},this.max=e.max,this.readonly=e.readonly}ariaValueText(){return`${this.nextRate} out of ${this.max}`}enter(e){this.readonly||this.disabled||this._updateState(e),this.hover.emit(e)}handleBlur(){this.onTouched()}handleClick(e){this.readonly||this.disabled||this.update(this.resettable&&this.rate===e?0:e)}handleKeyDown(e){switch(e.which){case it.ArrowDown:case it.ArrowLeft:this.update(this.rate-1);break;case it.ArrowUp:case it.ArrowRight:this.update(this.rate+1);break;case it.Home:this.update(0);break;case it.End:this.update(this.max);break;default:return}e.preventDefault()}ngOnChanges(e){e.rate&&this.update(this.rate)}ngOnInit(){this.contexts=Array.from({length:this.max},(e,t)=>({fill:0,index:t})),this._updateState(this.rate)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(e){this.disabled=e}update(e,t=!0){const n=function(e,t,n=0){return Math.max(Math.min(e,t),n)}(e,this.max,0);this.readonly||this.disabled||this.rate===n||(this.rate=n,this.rateChange.emit(this.rate)),t&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(e){this.update(e,!1),this._changeDetectorRef.markForCheck()}_getFillValue(e){const t=this.nextRate-e;return t>=1?100:t<1&&t>0?parseInt((100*t).toFixed(2),10):0}_updateState(e){this.nextRate=e,this.contexts.forEach((e,t)=>e.fill=this._getFillValue(t))}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](At),o["\u0275\u0275directiveInject"](o.ChangeDetectorRef))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["ngb-rating"]],contentQueries:function(e,t,n){var a;1&e&&o["\u0275\u0275contentQuery"](n,o.TemplateRef,!0),2&e&&o["\u0275\u0275queryRefresh"](a=o["\u0275\u0275loadQuery"]())&&(t.starTemplateFromContent=a.first)},hostAttrs:["role","slider","aria-valuemin","0",1,"d-inline-flex"],hostVars:5,hostBindings:function(e,t){1&e&&o["\u0275\u0275listener"]("blur",function(){return t.handleBlur()})("keydown",function(e){return t.handleKeyDown(e)})("mouseleave",function(){return t.reset()}),2&e&&(o["\u0275\u0275hostProperty"]("tabindex",t.disabled?-1:0),o["\u0275\u0275attribute"]("aria-valuemax",t.max)("aria-valuenow",t.nextRate)("aria-valuetext",t.ariaValueText())("aria-disabled",!!t.readonly||null))},inputs:{max:"max",readonly:"readonly",rate:"rate",resettable:"resettable",starTemplate:"starTemplate"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},features:[o["\u0275\u0275ProvidersFeature"]([Vt]),o["\u0275\u0275NgOnChangesFeature"]],decls:3,vars:1,consts:[["t",""],["ngFor","",3,"ngForOf"],[1,"sr-only"],[3,"mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(o["\u0275\u0275template"](0,ne,1,1,"ng-template",null,0,o["\u0275\u0275templateRefExtractor"]),o["\u0275\u0275template"](2,ie,4,5,"ng-template",1)),2&e&&(o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngForOf",t.contexts))},directives:[a.n,a.t],encapsulation:2,changeDetection:0}),e})();class Nt{constructor(e,t,n){this.hour=Se(e),this.minute=Se(t),this.second=Se(n)}changeHour(e=1){this.updateHour((isNaN(this.hour)?0:this.hour)+e)}updateHour(e){this.hour=ke(e)?(e<0?24+e:e)%24:NaN}changeMinute(e=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+e)}updateMinute(e){ke(e)?(this.minute=e%60<0?60+e%60:e%60,this.changeHour(Math.floor(e/60))):this.minute=NaN}changeSecond(e=1){this.updateSecond((isNaN(this.second)?0:this.second)+e)}updateSecond(e){ke(e)?(this.second=e<0?60+e%60:e%60,this.changeMinute(Math.floor(e/60))):this.second=NaN}isValid(e=!0){return ke(this.hour)&&ke(this.minute)&&(!e||ke(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}let zt=(()=>{let e=class{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return new e},token:e,providedIn:"root"}),e})();function Lt(){return new Ht}let Bt=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:Lt,token:e,providedIn:"root"}),e})(),Ht=(()=>{let e=class extends Bt{fromModel(e){return e&&Oe(e.hour)&&Oe(e.minute)?{hour:e.hour,minute:e.minute,second:Oe(e.second)?e.second:null}:null}toModel(e){return e&&Oe(e.hour)&&Oe(e.minute)?{hour:e.hour,minute:e.minute,second:Oe(e.second)?e.second:null}:null}};return e.\u0275fac=function(t){return cn(t||e)},e.\u0275prov=o["\u0275\u0275defineInjectable"]({token:e,factory:function(t){return e.\u0275fac(t)}}),e})(),qt=(()=>{let e=class{};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return e=Object(o["\u0275\u0275inject"])(o.LOCALE_ID),new Wt(e);var e},token:e,providedIn:"root"}),e})(),Wt=(()=>{let e=class extends qt{constructor(e){super(),this._periods=Object(a.B)(e,a.g.Standalone,a.x.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275inject"](o.LOCALE_ID))},e.\u0275prov=o["\u0275\u0275defineInjectable"]({token:e,factory:function(t){return e.\u0275fac(t)}}),e=i([r(0,Object(o.Inject)(o.LOCALE_ID))],e),e})();const Qt=/[^0-9]/g,Kt={provide:s.k,useExisting:Object(o.forwardRef)(()=>Ut),multi:!0};let Ut=(()=>{let e=class{constructor(e,t,n,a){this._config=e,this._ngbTimeAdapter=t,this._cd=n,this.i18n=a,this.onChange=e=>{},this.onTouched=()=>{},this.meridian=e.meridian,this.spinners=e.spinners,this.seconds=e.seconds,this.hourStep=e.hourStep,this.minuteStep=e.minuteStep,this.secondStep=e.secondStep,this.disabled=e.disabled,this.readonlyInputs=e.readonlyInputs,this.size=e.size}set hourStep(e){this._hourStep=Oe(e)?e:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(e){this._minuteStep=Oe(e)?e:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(e){this._secondStep=Oe(e)?e:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(e){const t=this._ngbTimeAdapter.fromModel(e);this.model=t?new Nt(t.hour,t.minute,t.second):new Nt,this.seconds||t&&ke(t.second)||(this.model.second=0),this._cd.markForCheck()}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}changeHour(e){this.model.changeHour(e),this.propagateModelChange()}changeMinute(e){this.model.changeMinute(e),this.propagateModelChange()}changeSecond(e){this.model.changeSecond(e),this.propagateModelChange()}updateHour(e){const t=this.model.hour>=12,n=Se(e);this.model.updateHour(this.meridian&&(t&&n<12||!t&&12===n)?n+12:n),this.propagateModelChange()}updateMinute(e){this.model.updateMinute(Se(e)),this.propagateModelChange()}updateSecond(e){this.model.updateSecond(Se(e)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(e){e.value=e.value.replace(Qt,"")}formatHour(e){return ke(e)?Ie(this.meridian?e%12==0?12:e%12:e%24):Ie(NaN)}formatMinSec(e){return Ie(ke(e)?e:NaN)}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(e){e.seconds&&!this.seconds&&this.model&&!ke(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(e=!0){e&&this.onTouched(),this.model.isValid(this.seconds)?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](zt),o["\u0275\u0275directiveInject"](Bt),o["\u0275\u0275directiveInject"](o.ChangeDetectorRef),o["\u0275\u0275directiveInject"](qt))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["ngb-timepicker"]],inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},features:[o["\u0275\u0275ProvidersFeature"]([Kt]),o["\u0275\u0275NgOnChangesFeature"]],decls:18,vars:25,consts:function(){return[[3,"disabled"],[1,"ngb-tp"],[1,"ngb-tp-input-container","ngb-tp-hour"],["tabindex","-1","type","button","class","btn btn-link",3,"btn-sm","btn-lg","disabled","click",4,"ngIf"],["type","text","maxlength","2","inputmode","numeric",1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","input","keydown.ArrowUp","keydown.ArrowDown",6,"placeholder","aria-label"],["placeholder",$localize`:@@ngb.timepicker.HH␟ce676ab1d6d98f85c836381cf100a4a91ef95a1f␟4043638465245303811:HH`,"aria-label",$localize`:@@ngb.timepicker.hours␟3bbce5fef7e1151da052a4e529453edb340e3912␟8070396816726827304:Hours`],[1,"ngb-tp-spacer"],[1,"ngb-tp-input-container","ngb-tp-minute"],["placeholder",$localize`:@@ngb.timepicker.MM␟72c8edf6a50068a05bde70991e36b1e881f4ca54␟1647282246509919852:MM`,"aria-label",$localize`:@@ngb.timepicker.minutes␟41e62daa962947c0d23ded0981975d1bddf0bf38␟5531237363767747080:Minutes`],["class","ngb-tp-spacer",4,"ngIf"],["class","ngb-tp-input-container ngb-tp-second",4,"ngIf"],["class","ngb-tp-meridian",4,"ngIf"],["tabindex","-1","type","button",1,"btn","btn-link",3,"disabled","click"],[1,"chevron","ngb-tp-chevron"],[1,"sr-only"],$localize`:@@ngb.timepicker.increment-hours␟cb74bc1d625a6c1742f0d7d47306cf495780c218␟5939278348542933629:Increment hours`,[1,"chevron","ngb-tp-chevron","bottom"],$localize`:@@ngb.timepicker.decrement-hours␟147c7a19429da7d999e247d22e33fee370b1691b␟3651829882940481818:Decrement hours`,$localize`:@@ngb.timepicker.increment-minutes␟f5a4a3bc05e053f6732475d0e74875ec01c3a348␟180147720391025024:Increment minutes`,$localize`:@@ngb.timepicker.decrement-minutes␟c1a6899e529c096da5b660385d4e77fe1f7ad271␟7447789825403243588:Decrement minutes`,[1,"ngb-tp-input-container","ngb-tp-second"],["placeholder",$localize`:@@ngb.timepicker.SS␟ebe38d36a40a2383c5fefa9b4608ffbda08bd4a3␟3628127143071124194:SS`,"aria-label",$localize`:@@ngb.timepicker.seconds␟4f2ed9e71a7c981db3e50ae2fedb28aff2ec4e6c␟8874012390997067175:Seconds`],$localize`:@@ngb.timepicker.increment-seconds␟912322ecee7d659d04dcf494a70e22e49d334b26␟5364772110539092174:Increment seconds`,$localize`:@@ngb.timepicker.decrement-seconds␟5db47ac104294243a70eb9124fbea9d0004ddf69␟753633511487974857:Decrement seconds`,[1,"ngb-tp-meridian"],["type","button",1,"btn","btn-outline-primary",3,"disabled","click"],[4,"ngIf","ngIfElse"],["am",""],$localize`:@@ngb.timepicker.PM␟8d6e691e10306c1b34c6b26805151aaea320ef7f␟3564199131264287502:${"\ufffd0\ufffd"}:INTERPOLATION:`,$localize`:@@ngb.timepicker.AM␟69a1f176a93998876952adac57c3bc3863b6105e␟4592818992509942761:${"\ufffd0\ufffd"}:INTERPOLATION:`]},template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"fieldset",0),o["\u0275\u0275elementStart"](1,"div",1),o["\u0275\u0275elementStart"](2,"div",2),o["\u0275\u0275template"](3,re,4,7,"button",3),o["\u0275\u0275elementStart"](4,"input",4),o["\u0275\u0275i18nAttributes"](5,5),o["\u0275\u0275listener"]("change",function(e){return t.updateHour(e.target.value)})("input",function(e){return t.formatInput(e.target)})("keydown.ArrowUp",function(e){return t.changeHour(t.hourStep),e.preventDefault()})("keydown.ArrowDown",function(e){return t.changeHour(-t.hourStep),e.preventDefault()}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](6,oe,4,7,"button",3),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](7,"div",6),o["\u0275\u0275text"](8,":"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](9,"div",7),o["\u0275\u0275template"](10,se,4,7,"button",3),o["\u0275\u0275elementStart"](11,"input",4),o["\u0275\u0275i18nAttributes"](12,8),o["\u0275\u0275listener"]("change",function(e){return t.updateMinute(e.target.value)})("input",function(e){return t.formatInput(e.target)})("keydown.ArrowUp",function(e){return t.changeMinute(t.minuteStep),e.preventDefault()})("keydown.ArrowDown",function(e){return t.changeMinute(-t.minuteStep),e.preventDefault()}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](13,le,4,7,"button",3),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](14,ce,2,0,"div",9),o["\u0275\u0275template"](15,ue,5,9,"div",10),o["\u0275\u0275template"](16,pe,1,0,"div",9),o["\u0275\u0275template"](17,ge,5,9,"div",11),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275classProp"]("disabled",t.disabled),o["\u0275\u0275property"]("disabled",t.disabled),o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("ngIf",t.spinners),o["\u0275\u0275advance"](1),o["\u0275\u0275classProp"]("form-control-sm",t.isSmallSize)("form-control-lg",t.isLargeSize),o["\u0275\u0275property"]("value",t.formatHour(null==t.model?null:t.model.hour))("readOnly",t.readonlyInputs)("disabled",t.disabled),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngIf",t.spinners),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngIf",t.spinners),o["\u0275\u0275advance"](1),o["\u0275\u0275classProp"]("form-control-sm",t.isSmallSize)("form-control-lg",t.isLargeSize),o["\u0275\u0275property"]("value",t.formatMinSec(null==t.model?null:t.model.minute))("readOnly",t.readonlyInputs)("disabled",t.disabled),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngIf",t.spinners),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",t.seconds),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",t.seconds),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",t.meridian),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",t.meridian))},directives:[a.o],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron::before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;-webkit-transform:rotate(135deg);transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-meridian,.ngb-tp-minute,.ngb-tp-second{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:distribute;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}'],encapsulation:2}),e})(),Zt=(()=>{let e=class{constructor(){this.highlightClass="ngb-highlight"}ngOnChanges(e){const t=Ee(this.result),n=(Array.isArray(this.term)?this.term:[this.term]).map(e=>Ee(e).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).filter(e=>e);this.parts=n.length?t.split(new RegExp(`(${n.join("|")})`,"gmi")):[t]}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term"},features:[o["\u0275\u0275NgOnChangesFeature"]],decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],[3,"class",4,"ngIf","ngIfElse"],["even",""]],template:function(e,t){1&e&&o["\u0275\u0275template"](0,ye,3,2,"ng-template",0),2&e&&o["\u0275\u0275property"]("ngForOf",t.parts)},directives:[a.n,a.o],styles:[".ngb-highlight{font-weight:700}"],encapsulation:2,changeDetection:0}),e})(),Yt=(()=>{let e=class{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=Ee,this.selectEvent=new o.EventEmitter,this.activeChangeEvent=new o.EventEmitter}hasActive(){return this.activeIdx>-1&&this.activeIdx<this.results.length}getActive(){return this.results[this.activeIdx]}markActive(e){this.activeIdx=e,this._activeChanged()}next(){this.activeIdx===this.results.length-1?this.activeIdx=this.focusFirst?(this.activeIdx+1)%this.results.length:-1:this.activeIdx++,this._activeChanged()}prev(){this.activeIdx<0?this.activeIdx=this.results.length-1:0===this.activeIdx?this.activeIdx=this.focusFirst?this.results.length-1:-1:this.activeIdx--,this._activeChanged()}resetActive(){this.activeIdx=this.focusFirst?0:-1,this._activeChanged()}select(e){this.selectEvent.emit(e)}ngOnInit(){this.resetActive()}_activeChanged(){this.activeChangeEvent.emit(this.activeIdx>=0?this.id+"-"+this.activeIdx:void 0)}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["ngb-typeahead-window"]],hostAttrs:["role","listbox",1,"dropdown-menu","show"],hostVars:1,hostBindings:function(e,t){1&e&&o["\u0275\u0275listener"]("mousedown",function(e){return e.preventDefault()}),2&e&&o["\u0275\u0275hostProperty"]("id",t.id)},inputs:{focusFirst:"focusFirst",formatter:"formatter",id:"id",results:"results",term:"term",resultTemplate:"resultTemplate"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},exportAs:["ngbTypeaheadWindow"],decls:3,vars:1,consts:[["rt",""],["ngFor","",3,"ngForOf"],[3,"result","term"],["type","button","role","option",1,"dropdown-item",3,"id","mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(e,t){1&e&&(o["\u0275\u0275template"](0,we,1,2,"ng-template",null,0,o["\u0275\u0275templateRefExtractor"]),o["\u0275\u0275template"](2,Ce,2,9,"ng-template",1)),2&e&&(o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngForOf",t.results))},directives:[a.n,Zt,a.t],encapsulation:2}),e})();const Gt=new o.InjectionToken("live announcer delay",{providedIn:"root",factory:function(){return 100}});function Xt(e,t=!1){let n=e.body.querySelector("#ngb-live");return null==n&&t&&(n=e.createElement("div"),n.setAttribute("id","ngb-live"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.classList.add("sr-only"),e.body.appendChild(n)),n}let Jt=(()=>{let e=class{constructor(e,t){this._document=e,this._delay=t}ngOnDestroy(){const e=Xt(this._document);e&&e.parentElement.removeChild(e)}say(e){const t=Xt(this._document,!0),n=this._delay;if(null!=t){t.textContent="";const a=()=>t.textContent=e;null===n?a():setTimeout(a,n)}}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275inject"](a.d),o["\u0275\u0275inject"](Gt))},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return new e(Object(o["\u0275\u0275inject"])(a.d),Object(o["\u0275\u0275inject"])(Gt))},token:e,providedIn:"root"}),e=i([r(0,Object(o.Inject)(a.d)),r(1,Object(o.Inject)(Gt))],e),e})(),en=(()=>{let e=class{constructor(){this.editable=!0,this.focusFirst=!0,this.showHint=!1,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return e.\u0275fac=function(t){return new(t||e)},e.\u0275prov=Object(o["\u0275\u0275defineInjectable"])({factory:function(){return new e},token:e,providedIn:"root"}),e})();const tn={provide:s.k,useExisting:Object(o.forwardRef)(()=>an),multi:!0};let nn=0,an=(()=>{let e=class{constructor(e,t,n,a,i,r,s,m,u,p,h,f){this._elementRef=e,this._renderer=n,this._live=m,this._document=u,this._ngZone=p,this._changeDetector=h,this._subscription=null,this._closed$=new l.a,this._inputValueBackup=null,this._windowRef=null,this.autocomplete="off",this.placement="bottom-left",this.selectItem=new o.EventEmitter,this.activeDescendant=null,this.popupId="ngb-typeahead-"+nn++,this._onTouched=()=>{},this._onChange=e=>{},this.container=r.container,this.editable=r.editable,this.focusFirst=r.focusFirst,this.showHint=r.showHint,this.placement=r.placement,this._valueChanges=Object(d.a)(e.nativeElement,"input").pipe(Object(v.a)(e=>e.target.value)),this._resubscribeTypeahead=new c.a(null),this._popupService=new Ft(Yt,a,t,n,i,f),this._zoneSubscription=s.onStable.subscribe(()=>{this.isPopupOpen()&&ft(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container)})}ngOnInit(){const e=this._valueChanges.pipe(Object(C.a)(e=>{this._inputValueBackup=this.showHint?e:null,this._onChange(this.editable?e:void 0)})).pipe(this.ngbTypeahead),t=this._resubscribeTypeahead.pipe(Object(y.a)(()=>e));this._subscription=this._subscribeToUserInput(t)}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput(),this._zoneSubscription.unsubscribe()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}writeValue(e){this._writeInputValue(this._formatItemForInput(e)),this.showHint&&(this._inputValueBackup=e)}setDisabledState(e){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",e)}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead.next(null),this._closePopup(),this.showHint&&null!==this._inputValueBackup&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return null!=this._windowRef}handleBlur(){this._resubscribeTypeahead.next(null),this._onTouched()}handleKeyDown(e){if(this.isPopupOpen())switch(e.which){case it.ArrowDown:e.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case it.ArrowUp:e.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case it.Enter:case it.Tab:const t=this._windowRef.instance.getActive();null!=t&&(e.preventDefault(),e.stopPropagation(),this._selectResult(t)),this._closePopup()}}_openPopup(){this.isPopupOpen()||(this._inputValueBackup=this._elementRef.nativeElement.value,this._windowRef=this._popupService.open(),this._windowRef.instance.id=this.popupId,this._windowRef.instance.selectEvent.subscribe(e=>this._selectResultClosePopup(e)),this._windowRef.instance.activeChangeEvent.subscribe(e=>this.activeDescendant=e),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._changeDetector.markForCheck(),mt(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._elementRef.nativeElement,this._windowRef.location.nativeElement]))}_closePopup(){this._closed$.next(),this._popupService.close(),this._windowRef=null,this.activeDescendant=null}_selectResult(e){let t=!1;this.selectItem.emit({item:e,preventDefault:()=>{t=!0}}),this._resubscribeTypeahead.next(null),t||(this.writeValue(e),this._onChange(e))}_selectResultClosePopup(e){this._selectResult(e),this._closePopup()}_showHint(){var e;if(this.showHint&&(null===(e=this._windowRef)||void 0===e?void 0:e.instance.hasActive())&&null!=this._inputValueBackup){const e=this._inputValueBackup.toLowerCase(),t=this._formatItemForInput(this._windowRef.instance.getActive());e===t.substr(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+t.substr(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,t.length])):this._writeInputValue(t)}}_formatItemForInput(e){return null!=e&&this.inputFormatter?this.inputFormatter(e):Ee(e)}_writeInputValue(e){this._renderer.setProperty(this._elementRef.nativeElement,"value",Ee(e))}_subscribeToUserInput(e){return e.subscribe(e=>{e&&0!==e.length?(this._openPopup(),this._windowRef.instance.focusFirst=this.focusFirst,this._windowRef.instance.results=e,this._windowRef.instance.term=this._elementRef.nativeElement.value,this.resultFormatter&&(this._windowRef.instance.formatter=this.resultFormatter),this.resultTemplate&&(this._windowRef.instance.resultTemplate=this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint()):this._closePopup();const t=e?e.length:0;this._live.say(0===t?"No results available":`${t} result${1===t?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}};return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](o.ElementRef),o["\u0275\u0275directiveInject"](o.ViewContainerRef),o["\u0275\u0275directiveInject"](o.Renderer2),o["\u0275\u0275directiveInject"](o.Injector),o["\u0275\u0275directiveInject"](o.ComponentFactoryResolver),o["\u0275\u0275directiveInject"](en),o["\u0275\u0275directiveInject"](o.NgZone),o["\u0275\u0275directiveInject"](Jt),o["\u0275\u0275directiveInject"](a.d),o["\u0275\u0275directiveInject"](o.NgZone),o["\u0275\u0275directiveInject"](o.ChangeDetectorRef),o["\u0275\u0275directiveInject"](o.ApplicationRef))},e.\u0275dir=o["\u0275\u0275defineDirective"]({type:e,selectors:[["input","ngbTypeahead",""]],hostAttrs:["autocapitalize","off","autocorrect","off","role","combobox","aria-multiline","false"],hostVars:7,hostBindings:function(e,t){1&e&&o["\u0275\u0275listener"]("blur",function(){return t.handleBlur()})("keydown",function(e){return t.handleKeyDown(e)}),2&e&&(o["\u0275\u0275hostProperty"]("autocomplete",t.autocomplete),o["\u0275\u0275attribute"]("aria-autocomplete",t.showHint?"both":"list")("aria-activedescendant",t.activeDescendant)("aria-owns",t.isPopupOpen()?t.popupId:null)("aria-expanded",t.isPopupOpen()),o["\u0275\u0275classProp"]("open",t.isPopupOpen()))},inputs:{autocomplete:"autocomplete",placement:"placement",container:"container",editable:"editable",focusFirst:"focusFirst",showHint:"showHint",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate"},outputs:{selectItem:"selectItem"},exportAs:["ngbTypeahead"],features:[o["\u0275\u0275ProvidersFeature"]([tn])]}),e=i([r(8,Object(o.Inject)(a.d))],e),e})();const rn=o["\u0275\u0275getInheritedFactory"](Be),on=o["\u0275\u0275getInheritedFactory"](et),sn=o["\u0275\u0275getInheritedFactory"](vt),ln=o["\u0275\u0275getInheritedFactory"](yt),cn=o["\u0275\u0275getInheritedFactory"](Ht);var dn=n("sYmb"),mn=n("M0ag"),un=n("tyNb");const pn=function(){return["/login"]};let hn=(()=>{class e{constructor(e,t){this.translate=e,this.router=t,this.router.events.subscribe(e=>{e instanceof un.c&&window.innerWidth<=992&&this.isToggled()&&this.toggleSidebar()})}ngOnInit(){this.pushRightClass="push-right"}isToggled(){return document.querySelector("body").classList.contains(this.pushRightClass)}toggleSidebar(){document.querySelector("body").classList.toggle(this.pushRightClass)}rltAndLtr(){document.querySelector("body").classList.toggle("rtl")}onLoggedout(){localStorage.removeItem("isLoggedin")}changeLang(e){this.translate.use(e)}}return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](dn.d),o["\u0275\u0275directiveInject"](un.d))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-header"]],decls:17,vars:5,consts:[[1,"navbar","navbar-expand-lg","fixed-top"],["href","#",1,"navbar-brand"],["type","button",1,"navbar-toggler",3,"click"],["aria-hidden","true",1,"fa","fa-bars","text-muted"],[1,"collapse","navbar-collapse"],[1,"navbar-nav","ml-auto"],["ngbDropdown","",1,"nav-item","dropdown"],["href","javascript:void(0)","ngbDropdownToggle","",1,"nav-link"],[1,"fa","fa-user"],[1,"caret"],["ngbDropdownMenu","",1,"dropdown-menu-right"],[1,"dropdown-item",3,"routerLink","click"],[1,"fa","fa-fw","fa-power-off"]],template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"nav",0),o["\u0275\u0275elementStart"](1,"a",1),o["\u0275\u0275text"](2,"MTurk "),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](3,"button",2),o["\u0275\u0275listener"]("click",function(){return t.toggleSidebar()}),o["\u0275\u0275element"](4,"i",3),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](5,"div",4),o["\u0275\u0275elementStart"](6,"ul",5),o["\u0275\u0275elementStart"](7,"li",6),o["\u0275\u0275elementStart"](8,"a",7),o["\u0275\u0275element"](9,"i",8),o["\u0275\u0275text"](10," Admin "),o["\u0275\u0275element"](11,"b",9),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](12,"div",10),o["\u0275\u0275elementStart"](13,"a",11),o["\u0275\u0275listener"]("click",function(){return t.onLoggedout()}),o["\u0275\u0275element"](14,"i",12),o["\u0275\u0275text"](15),o["\u0275\u0275pipe"](16,"translate"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275advance"](13),o["\u0275\u0275property"]("routerLink",o["\u0275\u0275pureFunction0"](4,pn)),o["\u0275\u0275advance"](2),o["\u0275\u0275textInterpolate1"](" ",o["\u0275\u0275pipeBind1"](16,2,"Log Out")," "))},directives:[kt,Rt,Pt,It,un.f],pipes:[dn.c],styles:["[_nghost-%COMP%]   .navbar[_ngcontent-%COMP%]{background-color:#5d86ae;box-shadow:0 4px 4px -2px #84afda}[_nghost-%COMP%]   .navbar[_ngcontent-%COMP%]   .nav-item[_ngcontent-%COMP%] > a[_ngcontent-%COMP%], [_nghost-%COMP%]   .navbar[_ngcontent-%COMP%]   .nav-item[_ngcontent-%COMP%] > a[_ngcontent-%COMP%]:hover, [_nghost-%COMP%]   .navbar[_ngcontent-%COMP%]   .navbar-brand[_ngcontent-%COMP%]{color:#fff}[_nghost-%COMP%]   .messages[_ngcontent-%COMP%]{width:300px}[_nghost-%COMP%]   .messages[_ngcontent-%COMP%]   .media[_ngcontent-%COMP%]{border-bottom:1px solid #ddd;padding:5px 10px}[_nghost-%COMP%]   .messages[_ngcontent-%COMP%]   .media[_ngcontent-%COMP%]:last-child{border-bottom:none}[_nghost-%COMP%]   .messages[_ngcontent-%COMP%]   .media-body[_ngcontent-%COMP%]   h5[_ngcontent-%COMP%]{font-size:13px;font-weight:600}[_nghost-%COMP%]   .messages[_ngcontent-%COMP%]   .media-body[_ngcontent-%COMP%]   .small[_ngcontent-%COMP%]{margin:0}[_nghost-%COMP%]   .messages[_ngcontent-%COMP%]   .media-body[_ngcontent-%COMP%]   .last[_ngcontent-%COMP%]{font-size:12px;margin:0}"]}),e})();const fn=function(e,t){return{sidebarPushRight:e,collapsed:t}},gn=function(){return["router-link-active"]},bn=function(){return["/newtask"]},vn=function(){return["/existingtask"]},yn=function(){return["/completedtask"]},wn=function(){return["/assignments"]},xn=function(){return["/blockworker"]},_n=function(e){return{collapsed:e}};let Cn=(()=>{class e{constructor(e,t){this.translate=e,this.router=t,this.collapsedEvent=new o.EventEmitter,this.router.events.subscribe(e=>{e instanceof un.c&&window.innerWidth<=992&&this.isToggled()&&this.toggleSidebar()})}ngOnInit(){this.isActive=!1,this.collapsed=!1,this.showMenu="",this.pushRightClass="push-right"}eventCalled(){this.isActive=!this.isActive}addExpandClass(e){this.showMenu=e===this.showMenu?"0":e}toggleCollapsed(){this.collapsed=!this.collapsed,this.collapsedEvent.emit(this.collapsed)}isToggled(){return document.querySelector("body").classList.contains(this.pushRightClass)}toggleSidebar(){document.querySelector("body").classList.toggle(this.pushRightClass)}rltAndLtr(){document.querySelector("body").classList.toggle("rtl")}changeLang(e){this.translate.use(e)}onLoggedout(){localStorage.removeItem("isLoggedin")}}return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](dn.d),o["\u0275\u0275directiveInject"](un.d))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-sidebar"]],outputs:{collapsedEvent:"collapsedEvent"},decls:38,vars:48,consts:[[1,"sidebar",3,"ngClass"],[1,"list-group"],[1,"list-group-item",3,"routerLinkActive","routerLink"],[1,"fa","fa-fw","fa-edit"],[1,"fa","fa-fw","fa-tasks"],[1,"fa","fa-fw","fa-check"],[1,"fa","fa-fw","fa-wrench"],[1,"fa","fa-fw","fa-unlock"],[1,"toggle-button",3,"ngClass","click"]],template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"nav",0),o["\u0275\u0275elementStart"](1,"div",1),o["\u0275\u0275elementStart"](2,"a",2),o["\u0275\u0275element"](3,"i",3),o["\u0275\u0275text"](4,"\xa0 "),o["\u0275\u0275elementStart"](5,"span"),o["\u0275\u0275text"](6),o["\u0275\u0275pipe"](7,"translate"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](8,"a",2),o["\u0275\u0275element"](9,"i",4),o["\u0275\u0275text"](10,"\xa0 "),o["\u0275\u0275elementStart"](11,"span"),o["\u0275\u0275text"](12),o["\u0275\u0275pipe"](13,"translate"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](14,"a",2),o["\u0275\u0275element"](15,"i",5),o["\u0275\u0275text"](16,"\xa0 "),o["\u0275\u0275elementStart"](17,"span"),o["\u0275\u0275text"](18),o["\u0275\u0275pipe"](19,"translate"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](20,"a",2),o["\u0275\u0275element"](21,"i",6),o["\u0275\u0275text"](22,"\xa0 "),o["\u0275\u0275elementStart"](23,"span"),o["\u0275\u0275text"](24),o["\u0275\u0275pipe"](25,"translate"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](26,"a",2),o["\u0275\u0275element"](27,"i",7),o["\u0275\u0275text"](28,"\xa0 "),o["\u0275\u0275elementStart"](29,"span"),o["\u0275\u0275text"](30),o["\u0275\u0275pipe"](31,"translate"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](32,"div",8),o["\u0275\u0275listener"]("click",function(){return t.toggleCollapsed()}),o["\u0275\u0275element"](33,"i"),o["\u0275\u0275text"](34,"\xa0 "),o["\u0275\u0275elementStart"](35,"span"),o["\u0275\u0275text"](36),o["\u0275\u0275pipe"](37,"translate"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275property"]("ngClass",o["\u0275\u0275pureFunction2"](33,fn,t.isActive,t.collapsed)),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("routerLinkActive",o["\u0275\u0275pureFunction0"](36,gn))("routerLink",o["\u0275\u0275pureFunction0"](37,bn)),o["\u0275\u0275advance"](4),o["\u0275\u0275textInterpolate"](o["\u0275\u0275pipeBind1"](7,21,"New Task")),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("routerLinkActive",o["\u0275\u0275pureFunction0"](38,gn))("routerLink",o["\u0275\u0275pureFunction0"](39,vn)),o["\u0275\u0275advance"](4),o["\u0275\u0275textInterpolate"](o["\u0275\u0275pipeBind1"](13,23,"Existing Tasks")),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("routerLinkActive",o["\u0275\u0275pureFunction0"](40,gn))("routerLink",o["\u0275\u0275pureFunction0"](41,yn)),o["\u0275\u0275advance"](4),o["\u0275\u0275textInterpolate"](o["\u0275\u0275pipeBind1"](19,25,"Completed Tasks")),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("routerLinkActive",o["\u0275\u0275pureFunction0"](42,gn))("routerLink",o["\u0275\u0275pureFunction0"](43,wn)),o["\u0275\u0275advance"](4),o["\u0275\u0275textInterpolate"](o["\u0275\u0275pipeBind1"](25,27,"Assignments")),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("routerLinkActive",o["\u0275\u0275pureFunction0"](44,gn))("routerLink",o["\u0275\u0275pureFunction0"](45,xn)),o["\u0275\u0275advance"](4),o["\u0275\u0275textInterpolate"](o["\u0275\u0275pipeBind1"](31,29,"Block Workers")),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngClass",o["\u0275\u0275pureFunction1"](46,_n,t.collapsed)),o["\u0275\u0275advance"](1),o["\u0275\u0275classMapInterpolate1"]("fa fa-fw fa-angle-double-",t.collapsed?"right":"left",""),o["\u0275\u0275advance"](3),o["\u0275\u0275textInterpolate"](o["\u0275\u0275pipeBind1"](37,31,"Collapse Sidebar")))},directives:[a.m,un.f,un.e],pipes:[dn.c],styles:[".sidebar[_ngcontent-%COMP%]{position:fixed;z-index:1000;top:56px;left:235px;width:235px;margin-left:-235px;margin-bottom:48px;border:none;border-radius:0;overflow-y:auto;background-color:#fff;bottom:0;overflow-x:hidden;padding-bottom:40px;white-space:nowrap;transition:all .2s ease-in-out}.sidebar[_ngcontent-%COMP%]   .list-group[_ngcontent-%COMP%]   a.list-group-item[_ngcontent-%COMP%]{border:0;border-radius:0;color:#5d86ae;text-decoration:none;background-color:transparent}.sidebar[_ngcontent-%COMP%]   .list-group[_ngcontent-%COMP%]   a.list-group-item[_ngcontent-%COMP%]   .fa[_ngcontent-%COMP%]{margin-right:10px}.sidebar[_ngcontent-%COMP%]   .list-group[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{color:#3f51b5}.sidebar[_ngcontent-%COMP%]   .list-group[_ngcontent-%COMP%]   a.router-link-active[_ngcontent-%COMP%]{color:#000}.sidebar[_ngcontent-%COMP%]   .list-group[_ngcontent-%COMP%]   .header-fields[_ngcontent-%COMP%]{padding-top:10px}.sidebar[_ngcontent-%COMP%]   .list-group[_ngcontent-%COMP%]   .header-fields[_ngcontent-%COMP%] > .list-group-item[_ngcontent-%COMP%]:first-child{border-top:1px solid hsla(0,0%,100%,.2)}.sidebar[_ngcontent-%COMP%]   .sidebar-dropdown[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:focus{border-radius:none;border:none}.sidebar[_ngcontent-%COMP%]   .sidebar-dropdown[_ngcontent-%COMP%]   .panel-title[_ngcontent-%COMP%]{font-size:1rem;height:50px;margin-bottom:0}.sidebar[_ngcontent-%COMP%]   .sidebar-dropdown[_ngcontent-%COMP%]   .panel-title[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#999;text-decoration:none;font-weight:400}.sidebar[_ngcontent-%COMP%]   .sidebar-dropdown[_ngcontent-%COMP%]   .panel-title[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{position:relative;display:block;padding:1rem 1.5rem .75rem}.sidebar[_ngcontent-%COMP%]   .sidebar-dropdown[_ngcontent-%COMP%]   .panel-title[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:focus, .sidebar[_ngcontent-%COMP%]   .sidebar-dropdown[_ngcontent-%COMP%]   .panel-title[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]:hover{outline:none;outline-offset:-2px}.sidebar[_ngcontent-%COMP%]   .sidebar-dropdown[_ngcontent-%COMP%]   .panel-collapse[_ngcontent-%COMP%]{border-radious:0;border:none}.sidebar[_ngcontent-%COMP%]   .sidebar-dropdown[_ngcontent-%COMP%]   .panel-collapse[_ngcontent-%COMP%]   .panel-body[_ngcontent-%COMP%]   .list-group-item[_ngcontent-%COMP%]{border-radius:0;border:0 solid transparent}.sidebar[_ngcontent-%COMP%]   .sidebar-dropdown[_ngcontent-%COMP%]   .panel-collapse[_ngcontent-%COMP%]   .panel-body[_ngcontent-%COMP%]   .list-group-item[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:#999}.nested-menu[_ngcontent-%COMP%]   .list-group-item[_ngcontent-%COMP%]{cursor:pointer}.nested-menu[_ngcontent-%COMP%]   .nested[_ngcontent-%COMP%]{list-style-type:none}.nested-menu[_ngcontent-%COMP%]   ul.submenu[_ngcontent-%COMP%]{display:none;height:0}.nested-menu[_ngcontent-%COMP%]   .expand[_ngcontent-%COMP%]   ul.submenu[_ngcontent-%COMP%]{display:block;list-style-type:none;height:auto}.nested-menu[_ngcontent-%COMP%]   .expand[_ngcontent-%COMP%]   ul.submenu[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{padding:10px;display:block}@media screen and (max-width:992px){.sidebar[_ngcontent-%COMP%]{top:54px;left:0}}@media print{.sidebar[_ngcontent-%COMP%]{display:none!important}}@media (min-width:992px){.header-fields[_ngcontent-%COMP%]{display:none}}[_ngcontent-%COMP%]::-webkit-scrollbar{width:8px}[_ngcontent-%COMP%]::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 0 #fff;border-radius:3px}[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{border-radius:3px;-webkit-box-shadow:inset 0 0 3px #fff}.toggle-button[_ngcontent-%COMP%]{position:fixed;width:236px;cursor:pointer;padding:12px;bottom:0;color:#000;background:#fff;border-top:1px solid #999;transition:all .2s ease-in-out}.toggle-button[_ngcontent-%COMP%]   i[_ngcontent-%COMP%]{font-size:23px}.toggle-button[_ngcontent-%COMP%]:hover{background:#b9cde0;color:#fff}.collapsed[_ngcontent-%COMP%]{width:60px}.collapsed[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{display:none}"]}),e})();const Sn=function(e){return{collapsed:e}};let En=(()=>{class e{constructor(){}ngOnInit(){}receiveCollapsed(e){this.collapedSideBar=e}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-layout"]],decls:4,vars:3,consts:[[3,"collapsedEvent"],[1,"main-container",3,"ngClass"]],template:function(e,t){1&e&&(o["\u0275\u0275element"](0,"app-header"),o["\u0275\u0275elementStart"](1,"app-sidebar",0),o["\u0275\u0275listener"]("collapsedEvent",function(e){return t.receiveCollapsed(e)}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](2,"section",1),o["\u0275\u0275element"](3,"router-outlet"),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngClass",o["\u0275\u0275pureFunction1"](1,Sn,t.collapedSideBar)))},directives:[hn,Cn,a.m,un.h],styles:["*[_ngcontent-%COMP%]{transition:margin-left .2s ease-in-out}.main-container[_ngcontent-%COMP%]{margin-top:56px;margin-left:235px;padding:15px;-ms-overflow-x:hidden;overflow-x:hidden;overflow-y:scroll;position:relative;overflow:hidden}.collapsed[_ngcontent-%COMP%]{margin-left:60px}@media screen and (max-width:992px){.main-container[_ngcontent-%COMP%]{margin-left:0!important}}@media print{.main-container[_ngcontent-%COMP%]{margin-top:0!important;margin-left:0!important}}"]}),e})();var Dn=n("ZZ88"),kn=n("iiaH"),On=n("M9IT"),In=n("Dh3D"),Mn=n("+0xr"),Pn=n("0IaG"),Rn=n("kmnG"),jn=n("qFsG"),Tn=n("f0Cb"),Fn=n("bTqV");function An(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"mat-form-field",9),o["\u0275\u0275elementStart"](1,"mat-label",10),o["\u0275\u0275text"](2,"How long should days parting work?"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](3,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(t){return o["\u0275\u0275restoreView"](e),o["\u0275\u0275nextContext"]().data.days=t}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("ngModel",e.data.days)}}function Vn(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"div"),o["\u0275\u0275elementStart"](1,"mat-form-field",16),o["\u0275\u0275elementStart"](2,"mat-label",10),o["\u0275\u0275text"](3," Question "),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](4,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(n){return o["\u0275\u0275restoreView"](e),t.$implicit.question=n}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](5,"mat-form-field",17),o["\u0275\u0275elementStart"](6,"mat-label",10),o["\u0275\u0275text"](7,"Choices"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](8,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(n){return o["\u0275\u0275restoreView"](e),t.$implicit.choices=n}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](9,"mat-form-field",16),o["\u0275\u0275elementStart"](10,"mat-label",10),o["\u0275\u0275text"](11,"Answer"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](12,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(n){return o["\u0275\u0275restoreView"](e),t.$implicit.answer=n}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=t.$implicit;o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",e.question),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",e.choices),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",e.answer)}}let $n=(()=>{class e{constructor(e,t,n){this.data=e,this.dialog=t,this.router=n}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Pn.a),o["\u0275\u0275directiveInject"](Pn.b),o["\u0275\u0275directiveInject"](un.d))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-existingtask-details"]],decls:54,vars:12,consts:[["mat-dialog-title",""],[1,"mat-typography"],["appearance","outline",1,"col-md-7"],["readonly","","matInput","",3,"ngModel","ngModelChange"],["appearance","outline",1,"col-md-5"],["appearance","outline",1,"col-md-4","top"],[1,"sub"],["readonly","","matInput","","type","str",3,"ngModel","ngModelChange"],["matPrefix","",1,"top"],["appearance","outline",1,"col-md-4"],["id","basic-addon1"],["class","col-md-4","appearance","outline",4,"ngIf"],[4,"ngFor","ngForOf"],["align","center"],["mat-raised-button","","mat-dialog-close",""],["mat-raised-button","","color","primary","mat-dialog-close","openNewRoute"],["appearance","outline",1,"col-md-10"],["appearance","outline",1,"col-md-8"]],template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"h5",0),o["\u0275\u0275text"](1,"Task Details"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](2,"mat-dialog-content",1),o["\u0275\u0275elementStart"](3,"mat-form-field",2),o["\u0275\u0275elementStart"](4,"mat-label"),o["\u0275\u0275text"](5,"Title"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](6,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.title=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](7,"mat-form-field",2),o["\u0275\u0275elementStart"](8,"mat-label"),o["\u0275\u0275text"](9,"Description"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](10,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.description=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](11,"mat-form-field",4),o["\u0275\u0275elementStart"](12,"mat-label"),o["\u0275\u0275text"](13,"Url"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](14,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.url=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](15,"mat-form-field",5),o["\u0275\u0275elementStart"](16,"mat-label",6),o["\u0275\u0275text"](17,"Reward Per Response"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](18,"input",7),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.reward=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](19,"span",8),o["\u0275\u0275text"](20,"$\xa0"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](21,"mat-form-field",9),o["\u0275\u0275elementStart"](22,"mat-label"),o["\u0275\u0275text"](23,"Max Assignments"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](24,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.max_assignments=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](25,"mat-form-field",9),o["\u0275\u0275elementStart"](26,"mat-label"),o["\u0275\u0275text"](27,"Approved"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](28,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.approved=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](29,"mat-form-field",9),o["\u0275\u0275elementStart"](30,"mat-label"),o["\u0275\u0275text"](31,"Location"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](32,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.localevalue=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](33,"mat-form-field",9),o["\u0275\u0275elementStart"](34,"mat-label"),o["\u0275\u0275text"](35,"Approval Rate"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](36,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.approval_rate=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](37,"mat-form-field",9),o["\u0275\u0275elementStart"](38,"mat-label",10),o["\u0275\u0275text"](39,"Days of Block"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](40,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.blockworkers=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](41,"mat-form-field",9),o["\u0275\u0275elementStart"](42,"mat-label",10),o["\u0275\u0275text"](43,"Multiple Days"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](44,"input",3),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.data.parting=e}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](45,An,4,1,"mat-form-field",11),o["\u0275\u0275element"](46,"mat-divider"),o["\u0275\u0275element"](47,"br"),o["\u0275\u0275template"](48,Vn,13,3,"div",12),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](49,"mat-dialog-actions",13),o["\u0275\u0275elementStart"](50,"button",14),o["\u0275\u0275text"](51,"Cancel"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](52,"button",15),o["\u0275\u0275text"](53,"Create"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275advance"](6),o["\u0275\u0275property"]("ngModel",t.data.title),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",t.data.description),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",t.data.url),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",t.data.reward),o["\u0275\u0275advance"](6),o["\u0275\u0275property"]("ngModel",t.data.max_assignments),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",t.data.approved),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",t.data.localevalue),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",t.data.approval_rate),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",t.data.blockworkers),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",t.data.parting),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf","yes"==t.data.parting),o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("ngForOf",t.data.collections))},directives:[Pn.g,Pn.e,Rn.c,Rn.f,jn.b,s.c,s.m,s.p,Rn.g,a.o,Tn.a,a.n,Pn.c,Fn.a,Pn.d],styles:[".btn.btn-sm.btn-outline-dark[_ngcontent-%COMP%]{font-size:12px;border:1px solid #828282;height:37px}.left[_ngcontent-%COMP%]{text-align:left}.ext[_ngcontent-%COMP%]{width:50px}.font-inc[_ngcontent-%COMP%]{font-size:25px}h1#mat-dialog-title-1[_ngcontent-%COMP%]{text-transform:capitalize} .mat-form-field-prefix{top:0!important}"]}),e})(),Nn=(()=>{class e{constructor(){}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-page-header"]],inputs:{heading:"heading",icon:"icon",subheading:"subheading"},decls:8,vars:5,consts:[[1,"row"],[1,"col-xl-12"],[1,"page-header"],[1,"breadcrumb"],[1,"breadcrumb-item","active"]],template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"div",0),o["\u0275\u0275elementStart"](1,"div",1),o["\u0275\u0275elementStart"](2,"h2",2),o["\u0275\u0275text"](3),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](4,"ol",3),o["\u0275\u0275elementStart"](5,"li",4),o["\u0275\u0275element"](6,"i"),o["\u0275\u0275text"](7),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275advance"](3),o["\u0275\u0275textInterpolate1"](" ",t.heading," "),o["\u0275\u0275advance"](3),o["\u0275\u0275classMapInterpolate1"]("fa ",t.icon,""),o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",t.subheading,""))},styles:[""]}),e})();var zn=n("iadO"),Ln=n("NFeN");function Bn(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"mat-error"),o["\u0275\u0275text"](1,"Invalid start date"),o["\u0275\u0275elementEnd"]())}function Hn(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"mat-error"),o["\u0275\u0275text"](1,"Invalid end date"),o["\u0275\u0275elementEnd"]())}function qn(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",32),o["\u0275\u0275text"](1," Title "),o["\u0275\u0275elementEnd"]())}function Wn(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",33),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.title," ")}}function Qn(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",32),o["\u0275\u0275text"](1," Reward "),o["\u0275\u0275elementEnd"]())}function Kn(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",33),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" $",e.reward," ")}}function Un(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",32),o["\u0275\u0275text"](1," Creation Time "),o["\u0275\u0275elementEnd"]())}function Zn(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",33),o["\u0275\u0275text"](1),o["\u0275\u0275pipe"](2,"date"),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",o["\u0275\u0275pipeBind2"](2,1,e.creation_date,"medium")," ")}}function Yn(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",32),o["\u0275\u0275text"](1," Max Assignments "),o["\u0275\u0275elementEnd"]())}function Gn(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",33),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.max_assignments," ")}}function Xn(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",32),o["\u0275\u0275text"](1," Assignments Remaining "),o["\u0275\u0275elementEnd"]())}function Jn(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",33),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.assignments_remaining," ")}}function ea(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",32),o["\u0275\u0275text"](1," Approved "),o["\u0275\u0275elementEnd"]())}function ta(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",33),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.approved," ")}}function na(e,t){1&e&&o["\u0275\u0275element"](0,"mat-header-cell")}function aa(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"mat-cell"),o["\u0275\u0275elementStart"](1,"td"),o["\u0275\u0275elementStart"](2,"a",34),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const n=t.$implicit;return o["\u0275\u0275nextContext"]().openEdit(n)}),o["\u0275\u0275elementStart"](3,"mat-icon"),o["\u0275\u0275text"](4,"edit"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}}function ia(e,t){1&e&&o["\u0275\u0275element"](0,"tr",35)}function ra(e,t){1&e&&o["\u0275\u0275element"](0,"tr",36)}function oa(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"tr",37),o["\u0275\u0275elementStart"](1,"td",38),o["\u0275\u0275text"](2),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e){o["\u0275\u0275nextContext"]();const e=o["\u0275\u0275reference"](8);o["\u0275\u0275advance"](2),o["\u0275\u0275textInterpolate1"]('No data matching the filter "',e.value,'"')}}const sa=function(){return[5,10,25,100]};let la=(()=>{class e{constructor(e,t,n){this.dataservice=e,this.router=t,this.dialog=n,this.selectedRow={},this.range=new s.g({start:new s.e,end:new s.e}),this.displayedColumns=["Title","Reward","CreationTime","Max Assignments","Remaining","Approved","actions"]}getallCompletedHITS(){this.dataservice.fetchCompletedHits().subscribe(e=>{e.data.forEach(e=>{e.approved=parseInt(e.max_assignments)-parseInt(e.assignments_remaining)}),this.completedhits=e.data,this.dataSource=new Mn.l(this.completedhits),this.applyThis()})}applyFilter(e){this.dataSource.filter=e.target.value.trim().toLowerCase(),this.dataSource.paginator&&this.dataSource.paginator.firstPage()}ngOnInit(){this.getallCompletedHITS(),this.router.events.subscribe(e=>{e instanceof un.b&&"administration"==e.snapshot.outlet&&this.outlet.deactivate()})}applyThis(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}openEdit(e){this.selectedRow=e,this.dialog.open($n,{data:e}).afterClosed().subscribe(e=>{e&&(this.dataservice.selectedTask=this.selectedRow,this.router.navigate(["/newtask"],{queryParams:{isPreDefined:!0}}))})}refresh(){this.getallCompletedHITS()}}return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](kn.a),o["\u0275\u0275directiveInject"](un.d),o["\u0275\u0275directiveInject"](Pn.b))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-completed-task"]],viewQuery:function(e,t){var n;1&e&&(o["\u0275\u0275viewQuery"](On.a,!0),o["\u0275\u0275viewQuery"](In.a,!0),o["\u0275\u0275viewQuery"](un.h,!0)),2&e&&(o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.paginator=n.first),o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.sort=n.first),o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.outlet=n.first))},decls:50,vars:14,consts:[[3,"heading","subheading","icon"],[1,"row"],[1,"col-md-12"],[1,"col-md-6"],["matInput","","placeholder","Ex. XYZ",3,"keyup"],["input",""],[1,"col-md-5"],[3,"formGroup","rangePicker"],["matStartDate","","formControlName","start","placeholder","Start date"],["matEndDate","","formControlName","end","placeholder","End date"],["matSuffix","",3,"for"],["picker",""],[4,"ngIf"],["mat-button","",3,"click"],["aria-hidden","false","aria-label","Example refresh icon",3,"click"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","Title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Reward"],["matColumnDef","CreationTime"],["matColumnDef","Max Assignments"],["matColumnDef","Remaining"],["matColumnDef","Approved"],["matColumnDef","actions"],[4,"matHeaderCellDef"],[4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],[3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[3,"click"],["mat-header-row",""],["mat-row",""],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"div"),o["\u0275\u0275element"](1,"app-page-header",0),o["\u0275\u0275elementStart"](2,"div",1),o["\u0275\u0275elementStart"](3,"div",2),o["\u0275\u0275elementStart"](4,"mat-form-field",3),o["\u0275\u0275elementStart"](5,"mat-label"),o["\u0275\u0275text"](6,"Search"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](7,"input",4,5),o["\u0275\u0275listener"]("keyup",function(e){return t.applyFilter(e)}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](9,"mat-form-field",6),o["\u0275\u0275elementStart"](10,"mat-label"),o["\u0275\u0275text"](11,"Enter a date range"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](12,"mat-date-range-input",7),o["\u0275\u0275element"](13,"input",8),o["\u0275\u0275element"](14,"input",9),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](15,"mat-datepicker-toggle",10),o["\u0275\u0275element"](16,"mat-date-range-picker",null,11),o["\u0275\u0275template"](18,Bn,2,0,"mat-error",12),o["\u0275\u0275template"](19,Hn,2,0,"mat-error",12),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](20,"button",13),o["\u0275\u0275listener"]("click",function(){return t.refresh()}),o["\u0275\u0275elementStart"](21,"mat-icon",14),o["\u0275\u0275listener"]("click",function(){return t.refresh()}),o["\u0275\u0275text"](22,"refresh"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](23,"div",15),o["\u0275\u0275elementStart"](24,"table",16),o["\u0275\u0275elementContainerStart"](25,17),o["\u0275\u0275template"](26,qn,2,0,"th",18),o["\u0275\u0275template"](27,Wn,2,1,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](28,20),o["\u0275\u0275template"](29,Qn,2,0,"th",18),o["\u0275\u0275template"](30,Kn,2,1,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](31,21),o["\u0275\u0275template"](32,Un,2,0,"th",18),o["\u0275\u0275template"](33,Zn,3,4,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](34,22),o["\u0275\u0275template"](35,Yn,2,0,"th",18),o["\u0275\u0275template"](36,Gn,2,1,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](37,23),o["\u0275\u0275template"](38,Xn,2,0,"th",18),o["\u0275\u0275template"](39,Jn,2,1,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](40,24),o["\u0275\u0275template"](41,ea,2,0,"th",18),o["\u0275\u0275template"](42,ta,2,1,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](43,25),o["\u0275\u0275template"](44,na,1,0,"mat-header-cell",26),o["\u0275\u0275template"](45,aa,5,0,"mat-cell",27),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275template"](46,ia,1,0,"tr",28),o["\u0275\u0275template"](47,ra,1,0,"tr",29),o["\u0275\u0275template"](48,oa,3,1,"tr",30),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](49,"mat-paginator",31),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e){const e=o["\u0275\u0275reference"](17);o["\u0275\u0275property"]("@routerTransition",void 0),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("heading","MTURK")("subheading","Completed Tasks")("icon","fa-check"),o["\u0275\u0275advance"](11),o["\u0275\u0275property"]("formGroup",t.range)("rangePicker",e),o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("for",e),o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("ngIf",t.range.controls.start.hasError("matStartDateInvalid")),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",t.range.controls.end.hasError("matEndDateInvalid")),o["\u0275\u0275advance"](5),o["\u0275\u0275property"]("dataSource",t.dataSource),o["\u0275\u0275advance"](22),o["\u0275\u0275property"]("matHeaderRowDef",t.displayedColumns),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("matRowDefColumns",t.displayedColumns),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("pageSizeOptions",o["\u0275\u0275pureFunction0"](13,sa))}},directives:[Nn,Rn.c,Rn.f,jn.b,zn.a,s.n,s.h,zn.f,s.c,s.m,s.f,zn.e,zn.d,Rn.h,zn.b,a.o,Fn.a,Ln.a,Mn.k,In.a,Mn.c,Mn.e,Mn.b,Mn.g,Mn.j,Mn.h,On.a,Rn.b,Mn.d,In.b,Mn.a,Mn.f,Mn.i],pipes:[a.e],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;width:100%}td[_ngcontent-%COMP%], th[_ngcontent-%COMP%]{width:25%}"],data:{animation:[Object(Dn.a)()]}}),e})();function ca(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"mat-error"),o["\u0275\u0275text"](1,"Invalid start date"),o["\u0275\u0275elementEnd"]())}function da(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"mat-error"),o["\u0275\u0275text"](1,"Invalid end date"),o["\u0275\u0275elementEnd"]())}function ma(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",34),o["\u0275\u0275text"](1," Title "),o["\u0275\u0275elementEnd"]())}function ua(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",35),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.title," ")}}function pa(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",34),o["\u0275\u0275text"](1," Reward "),o["\u0275\u0275elementEnd"]())}function ha(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",35),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" $",e.reward," ")}}function fa(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",34),o["\u0275\u0275text"](1," Creation Time "),o["\u0275\u0275elementEnd"]())}function ga(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",35),o["\u0275\u0275text"](1),o["\u0275\u0275pipe"](2,"date"),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",o["\u0275\u0275pipeBind2"](2,1,e.creation_date,"medium")," ")}}function ba(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",34),o["\u0275\u0275text"](1," Max Assignments "),o["\u0275\u0275elementEnd"]())}function va(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",36),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.max_assignments," ")}}function ya(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",34),o["\u0275\u0275text"](1," Assignments Remaining "),o["\u0275\u0275elementEnd"]())}function wa(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",36),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.assignments_remaining," ")}}function xa(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",34),o["\u0275\u0275text"](1," Approved "),o["\u0275\u0275elementEnd"]())}function _a(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"span"),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=o["\u0275\u0275nextContext"]().$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.approved,"")}}function Ca(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",36),o["\u0275\u0275template"](1,_a,2,1,"span",12),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",e.approved)}}function Sa(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",34),o["\u0275\u0275text"](1," Hours Remaining "),o["\u0275\u0275elementEnd"]())}function Ea(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",36),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.current_hours-1," ")}}function Da(e,t){1&e&&o["\u0275\u0275element"](0,"th",37)}function ka(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"td",35),o["\u0275\u0275elementStart"](1,"a",38),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const n=t.$implicit;return o["\u0275\u0275nextContext"]().openEdit(n)}),o["\u0275\u0275elementStart"](2,"mat-icon"),o["\u0275\u0275text"](3,"edit"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}}function Oa(e,t){1&e&&o["\u0275\u0275element"](0,"th",37)}function Ia(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"td",35),o["\u0275\u0275elementStart"](1,"a",38),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const n=t.$implicit;return o["\u0275\u0275nextContext"]().cancel(n)}),o["\u0275\u0275elementStart"](2,"mat-icon"),o["\u0275\u0275text"](3,"delete"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}}function Ma(e,t){1&e&&o["\u0275\u0275element"](0,"tr",39)}function Pa(e,t){1&e&&o["\u0275\u0275element"](0,"tr",40)}function Ra(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"tr",41),o["\u0275\u0275elementStart"](1,"td",42),o["\u0275\u0275text"](2),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e){o["\u0275\u0275nextContext"]();const e=o["\u0275\u0275reference"](8);o["\u0275\u0275advance"](2),o["\u0275\u0275textInterpolate1"]('No data matching the filter "',e.value,'"')}}const ja=function(){return[5,10,25,100]};let Ta=(()=>{class e{constructor(e,t,n){this.dataservice=e,this.router=t,this.dialog=n,this.selectedRow={},this.range=new s.g({start:new s.e,end:new s.e}),this.displayedColumns=["Title","Reward","CreationTime","Max Assignments","Remaining","Approved","Hours","actions","cancel"]}getallExists(){this.dataservice.fetchExistingHits().subscribe(e=>{e.data.forEach(e=>{e.approved=parseInt(e.max_assignments)-parseInt(e.assignments_remaining)}),this.existslist=e.data,this.dataSource=new Mn.l(this.existslist),this.applyThis()})}applyFilter(e){this.dataSource.filter=e.target.value.trim().toLowerCase(),this.dataSource.paginator&&this.dataSource.paginator.firstPage()}openEdit(e){this.selectedRow=e,this.dialog.open($n,{data:e}).afterClosed().subscribe(e=>{e&&(this.dataservice.selectedTask=this.selectedRow,this.router.navigate(["/newtask"],{queryParams:{isPreDefined:!0}}))})}applyThis(){this.dataSource.paginator=this.paginator,this.dataSource.sort=this.sort}cancel(e){this.dataservice.delete(e.active_child).subscribe(e=>{this.getallExists()})}ngOnInit(){this.getallExists(),this.router.events.subscribe(e=>{e instanceof un.b&&"administration"===e.snapshot.outlet&&this.outlet.deactivate()})}refresh(){this.getallExists()}}return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](kn.a),o["\u0275\u0275directiveInject"](un.d),o["\u0275\u0275directiveInject"](Pn.b))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-existing-task"]],viewQuery:function(e,t){var n;1&e&&(o["\u0275\u0275viewQuery"](On.a,!0),o["\u0275\u0275viewQuery"](In.a,!0),o["\u0275\u0275viewQuery"](un.h,!0)),2&e&&(o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.paginator=n.first),o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.sort=n.first),o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.outlet=n.first))},decls:56,vars:14,consts:[[3,"heading","subheading","icon"],[1,"row"],[1,"col-md-12"],[1,"col-md-6"],["matInput","","placeholder","Ex. XYZ",3,"keyup"],["input",""],[1,"col-md-5"],[3,"formGroup","rangePicker"],["matStartDate","","formControlName","start","placeholder","Start date"],["matEndDate","","formControlName","end","placeholder","End date"],["matSuffix","",3,"for"],["picker",""],[4,"ngIf"],["mat-button","",3,"click"],["aria-hidden","false","aria-label","Example refresh icon",3,"click"],[1,"mat-elevation-z8"],["mat-table","","matSort","",3,"dataSource"],["matColumnDef","Title"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Reward"],["matColumnDef","CreationTime"],["matColumnDef","Max Assignments"],["mat-cell","","style","text-align: center;",4,"matCellDef"],["matColumnDef","Remaining"],["matColumnDef","Approved"],["matColumnDef","Hours"],["matColumnDef","actions"],["mat-header-cell","",4,"matHeaderCellDef"],["matColumnDef","cancel"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],[3,"pageSizeOptions"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",2,"text-align","center"],["mat-header-cell",""],[3,"click"],["mat-header-row",""],["mat-row",""],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"div"),o["\u0275\u0275element"](1,"app-page-header",0),o["\u0275\u0275elementStart"](2,"div",1),o["\u0275\u0275elementStart"](3,"div",2),o["\u0275\u0275elementStart"](4,"mat-form-field",3),o["\u0275\u0275elementStart"](5,"mat-label"),o["\u0275\u0275text"](6,"Search"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](7,"input",4,5),o["\u0275\u0275listener"]("keyup",function(e){return t.applyFilter(e)}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](9,"mat-form-field",6),o["\u0275\u0275elementStart"](10,"mat-label"),o["\u0275\u0275text"](11,"Enter a date range"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](12,"mat-date-range-input",7),o["\u0275\u0275element"](13,"input",8),o["\u0275\u0275element"](14,"input",9),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](15,"mat-datepicker-toggle",10),o["\u0275\u0275element"](16,"mat-date-range-picker",null,11),o["\u0275\u0275template"](18,ca,2,0,"mat-error",12),o["\u0275\u0275template"](19,da,2,0,"mat-error",12),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](20,"button",13),o["\u0275\u0275listener"]("click",function(){return t.refresh()}),o["\u0275\u0275elementStart"](21,"mat-icon",14),o["\u0275\u0275listener"]("click",function(){return t.refresh()}),o["\u0275\u0275text"](22,"refresh"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](23,"div",15),o["\u0275\u0275elementStart"](24,"table",16),o["\u0275\u0275elementContainerStart"](25,17),o["\u0275\u0275template"](26,ma,2,0,"th",18),o["\u0275\u0275template"](27,ua,2,1,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](28,20),o["\u0275\u0275template"](29,pa,2,0,"th",18),o["\u0275\u0275template"](30,ha,2,1,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](31,21),o["\u0275\u0275template"](32,fa,2,0,"th",18),o["\u0275\u0275template"](33,ga,3,4,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](34,22),o["\u0275\u0275template"](35,ba,2,0,"th",18),o["\u0275\u0275template"](36,va,2,1,"td",23),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](37,24),o["\u0275\u0275template"](38,ya,2,0,"th",18),o["\u0275\u0275template"](39,wa,2,1,"td",23),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](40,25),o["\u0275\u0275template"](41,xa,2,0,"th",18),o["\u0275\u0275template"](42,Ca,2,1,"td",23),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](43,26),o["\u0275\u0275template"](44,Sa,2,0,"th",18),o["\u0275\u0275template"](45,Ea,2,1,"td",23),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](46,27),o["\u0275\u0275template"](47,Da,1,0,"th",28),o["\u0275\u0275template"](48,ka,4,0,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](49,29),o["\u0275\u0275template"](50,Oa,1,0,"th",28),o["\u0275\u0275template"](51,Ia,4,0,"td",19),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275template"](52,Ma,1,0,"tr",30),o["\u0275\u0275template"](53,Pa,1,0,"tr",31),o["\u0275\u0275template"](54,Ra,3,1,"tr",32),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](55,"mat-paginator",33),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e){const e=o["\u0275\u0275reference"](17);o["\u0275\u0275property"]("@routerTransition",void 0),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("heading","MTURK")("subheading","Existing Tasks")("icon","fa-tasks"),o["\u0275\u0275advance"](11),o["\u0275\u0275property"]("formGroup",t.range)("rangePicker",e),o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("for",e),o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("ngIf",t.range.controls.start.hasError("matStartDateInvalid")),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngIf",t.range.controls.end.hasError("matEndDateInvalid")),o["\u0275\u0275advance"](5),o["\u0275\u0275property"]("dataSource",t.dataSource),o["\u0275\u0275advance"](28),o["\u0275\u0275property"]("matHeaderRowDef",t.displayedColumns),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("matRowDefColumns",t.displayedColumns),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("pageSizeOptions",o["\u0275\u0275pureFunction0"](13,ja))}},directives:[Nn,Rn.c,Rn.f,jn.b,zn.a,s.n,s.h,zn.f,s.c,s.m,s.f,zn.e,zn.d,Rn.h,zn.b,a.o,Fn.a,Ln.a,Mn.k,In.a,Mn.c,Mn.e,Mn.b,Mn.g,Mn.j,Mn.h,On.a,Rn.b,Mn.d,In.b,Mn.a,Mn.f,Mn.i],pipes:[a.e],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;width:100%}"],data:{animation:[Object(Dn.a)()]}}),e})();var Fa=n("dNgK"),Aa=n("xHqg"),Va=n("d3UM"),$a=n("FKr1");const Na=function(){return{standalone:!0}};function za(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementContainerStart"](0),o["\u0275\u0275elementStart"](1,"mat-form-field",32),o["\u0275\u0275elementStart"](2,"mat-label",20),o["\u0275\u0275text"](3," Question "),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](4,"input",33),o["\u0275\u0275listener"]("ngModelChange",function(n){return o["\u0275\u0275restoreView"](e),t.$implicit.question=n}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](5,"mat-form-field",34),o["\u0275\u0275elementStart"](6,"mat-label",20),o["\u0275\u0275text"](7,"Choices"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](8,"input",35),o["\u0275\u0275listener"]("ngModelChange",function(n){return o["\u0275\u0275restoreView"](e),t.$implicit.choices=n}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](9,"mat-form-field",32),o["\u0275\u0275elementStart"](10,"mat-label",20),o["\u0275\u0275text"](11,"Answer"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](12,"input",36),o["\u0275\u0275listener"]("ngModelChange",function(n){return o["\u0275\u0275restoreView"](e),t.$implicit.answer=n}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementContainerEnd"]()}if(2&e){const e=t.$implicit;o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",e.question)("ngModelOptions",o["\u0275\u0275pureFunction0"](6,Na)),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",e.choices)("ngModelOptions",o["\u0275\u0275pureFunction0"](7,Na)),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngModel",e.answer)("ngModelOptions",o["\u0275\u0275pureFunction0"](8,Na))}}function La(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"mat-form-field",7),o["\u0275\u0275elementStart"](1,"mat-label",20),o["\u0275\u0275text"](2,"How long should days Reschedule Hits work?"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](3,"input",37),o["\u0275\u0275listener"]("ngModelChange",function(t){return o["\u0275\u0275restoreView"](e),o["\u0275\u0275nextContext"]().days=t}),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}if(2&e){const e=o["\u0275\u0275nextContext"]();o["\u0275\u0275advance"](3),o["\u0275\u0275property"]("ngModel",e.days)("ngModelOptions",o["\u0275\u0275pureFunction0"](2,Na))}}function Ba(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"mat-option",38),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275property"]("value",e.code),o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"]("",e.name," ")}}let Ha=(()=>{class e{constructor(e,t,n,a,i){this.router=e,this.route=t,this.dataservice=n,this._formBuilder=a,this._snackBar=i,this.countryList=[],this.alert=!1,this.isLinear=!1,this.collections=[{question:"",answer:"",choices:""}],this.parting="",this.days=0,this.isDisabled=!1,this.countryList=this.dataservice.countries,this.initializeForm()}initializeForm(){this.createtask=this._formBuilder.group({title:["",s.u.required],description:["",s.u.required],url:["",s.u.required]}),this.addpayment=this._formBuilder.group({reward:["",s.u.required],numberofdays:["",s.u.required],hits:["",s.u.required],location:[""],rate:[""],workers:["",s.u.required]})}createhit(){this.isDisabled=!0;let e={};e.title=this.createtask.get("title").value,e.description=this.createtask.get("description").value,e.url=this.createtask.get("url").value,e.localevalue=this.addpayment.get("location").value,e.approval_rate=this.addpayment.get("rate").value,e.reward=this.addpayment.get("reward").value,e.max_assignments=this.addpayment.get("hits").value,e.parting=this.parting,e.days=this.days,e.collections=this.collections,e.blockworkers=this.addpayment.get("workers").value,"yes"==this.parting?e.days=this.days:delete e.days,("localevalue"in e||null==e.localevalue||0==e.localevalue.length||""==e.localevalue)&&delete e.localevalue,this.dataservice.createTask(e).subscribe(e=>{this.isDisabled=!1;let t="";t=e.error?"error":" Create Successfully !",this._snackBar.open(t,"Close",{duration:2e3,horizontalPosition:"left",verticalPosition:"bottom"}),this.alert=!0,e.error||this.router.navigate(["/existingtask"])})}addQuestion(){this.collections.push({question:"",answer:"",choices:""})}removeQuestion(){this.collections.pop()}getFontSize(){return 13}fillForm(){let e=this.dataservice.selectedTask;this.createtask=this._formBuilder.group({title:[e.title,s.u.required],description:[e.description,s.u.required],url:[e.url,s.u.required]}),this.addpayment=this._formBuilder.group({reward:[e.reward,s.u.required],dateofexpire:[e.dateofexpire,s.u.required],numberofdays:[e.numberofdays,s.u.required],hits:[e.max_assignments,s.u.required],location:[e.localevalue],rate:[e.approval_rate],workers:[e.blockworkers]}),this.collections=e.collections,this.parting=e.parting,this.days=e.days}ngOnInit(){this.route.snapshot.queryParamMap.get("isPreDefined")&&this.dataservice.selectedTask&&this.fillForm()}}return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](un.d),o["\u0275\u0275directiveInject"](un.a),o["\u0275\u0275directiveInject"](kn.a),o["\u0275\u0275directiveInject"](s.d),o["\u0275\u0275directiveInject"](Fa.a))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-new-task"]],decls:68,vars:17,consts:[[3,"linear"],["stepper",""],["label","Add HIT",3,"stepControl"],[3,"formGroup"],["appearance","outline",1,"col-md-7"],["matInput","","placeholder","Title","formControlName","title","required",""],["matInput","","placeholder","Description","formControlName","description","required",""],["appearance","outline",1,"col-md-4"],["matInput","","placeholder","URL","formControlName","url","required",""],[2,"text-align","center"],[4,"ngFor","ngForOf"],["mat-icon-button","",1,"center",3,"click"],[1,"material-icons"],["align","end"],["mat-stroked-button","","matStepperNext","",3,"disabled"],["label","Setting Up Survey",3,"stepControl"],["appearance","outline",1,"col-md-4","top"],[1,"sub"],["matInput","","type","str","required","","formControlName","reward"],["matPrefix","",1,"top"],["id","basic-addon1"],["required","",3,"ngModel","ngModelOptions","ngModelChange"],["value","yes"],["value","no"],["class","col-md-4","appearance","outline",4,"ngIf"],["matInput","","type","number","formControlName","workers","required",""],["matInput","","type","number","formControlName","hits","required",""],["multiple","","formControlName","location"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","number","formControlName","rate"],["mat-button","","matStepperPrevious",""],["mat-stroked-button","","type","submit",1,"btn","task",2,"text-align","center",3,"disabled","click"],["appearance","outline",1,"col-md-10"],["matInput","","placeholder","Question","required","","type","text",3,"ngModel","ngModelOptions","ngModelChange"],["appearance","outline",1,"col-md-8"],["matInput","","required","","placeholder","Write Comma Seperated Choices","type","text",3,"ngModel","ngModelOptions","ngModelChange"],["matInput","","placeholder","Answer","required","","type","text",3,"ngModel","ngModelOptions","ngModelChange"],["matInput","","required","","type","number",3,"ngModel","ngModelOptions","ngModelChange"],[3,"value"]],template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"div"),o["\u0275\u0275elementStart"](1,"mat-horizontal-stepper",0,1),o["\u0275\u0275elementStart"](3,"mat-step",2),o["\u0275\u0275elementStart"](4,"form",3),o["\u0275\u0275elementStart"](5,"mat-form-field",4),o["\u0275\u0275elementStart"](6,"mat-label"),o["\u0275\u0275text"](7,"Title"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](8,"input",5),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](9,"mat-form-field",4),o["\u0275\u0275elementStart"](10,"mat-label"),o["\u0275\u0275text"](11,"Description"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](12,"input",6),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](13,"mat-form-field",7),o["\u0275\u0275elementStart"](14,"mat-label"),o["\u0275\u0275text"](15,"URL"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](16,"input",8),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](17,"h4",9),o["\u0275\u0275text"](18,"Questions / Answers "),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](19,za,13,9,"ng-container",10),o["\u0275\u0275elementStart"](20,"button",11),o["\u0275\u0275listener"]("click",function(){return t.removeQuestion()}),o["\u0275\u0275elementStart"](21,"span",12),o["\u0275\u0275text"](22," remove "),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](23,"button",11),o["\u0275\u0275listener"]("click",function(){return t.addQuestion()}),o["\u0275\u0275elementStart"](24,"span",12),o["\u0275\u0275text"](25," add "),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](26,"div",13),o["\u0275\u0275elementStart"](27,"button",14),o["\u0275\u0275text"](28,"Next"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](29,"mat-step",15),o["\u0275\u0275elementStart"](30,"form",3),o["\u0275\u0275elementStart"](31,"mat-form-field",16),o["\u0275\u0275elementStart"](32,"mat-label",17),o["\u0275\u0275text"](33,"Reward Per Response "),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](34,"input",18),o["\u0275\u0275elementStart"](35,"span",19),o["\u0275\u0275text"](36,"$\xa0"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](37,"mat-form-field",7),o["\u0275\u0275elementStart"](38,"mat-label",20),o["\u0275\u0275text"](39,"Multiple Days?"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](40,"mat-select",21),o["\u0275\u0275listener"]("ngModelChange",function(e){return t.parting=e}),o["\u0275\u0275elementStart"](41,"mat-option",22),o["\u0275\u0275text"](42,"Yes"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](43,"mat-option",23),o["\u0275\u0275text"](44,"No"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](45,La,4,3,"mat-form-field",24),o["\u0275\u0275elementStart"](46,"mat-form-field",7),o["\u0275\u0275elementStart"](47,"mat-label"),o["\u0275\u0275text"](48,"Block Workers for days"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](49,"input",25),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](50,"mat-form-field",7),o["\u0275\u0275elementStart"](51,"mat-label"),o["\u0275\u0275text"](52,"Max Assignments"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](53,"input",26),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](54,"mat-form-field",7),o["\u0275\u0275elementStart"](55,"mat-label"),o["\u0275\u0275text"](56,"Location"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](57,"mat-select",27),o["\u0275\u0275template"](58,Ba,2,2,"mat-option",28),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](59,"mat-form-field",7),o["\u0275\u0275elementStart"](60,"mat-label"),o["\u0275\u0275text"](61,"APPROVAL RATE IS GREATER THAN"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275element"](62,"input",29),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](63,"div",13),o["\u0275\u0275elementStart"](64,"button",30),o["\u0275\u0275text"](65,"Back"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](66,"button",31),o["\u0275\u0275listener"]("click",function(){return t.createhit()}),o["\u0275\u0275text"](67," Create Task "),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("linear",t.isLinear),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("stepControl",t.createtask),o["\u0275\u0275advance"](1),o["\u0275\u0275styleProp"]("font-size",t.getFontSize(),"px"),o["\u0275\u0275property"]("formGroup",t.createtask),o["\u0275\u0275advance"](15),o["\u0275\u0275property"]("ngForOf",t.collections),o["\u0275\u0275advance"](8),o["\u0275\u0275property"]("disabled",t.createtask.invalid),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("stepControl",t.addpayment),o["\u0275\u0275advance"](1),o["\u0275\u0275styleProp"]("font-size",t.getFontSize(),"px"),o["\u0275\u0275property"]("formGroup",t.addpayment),o["\u0275\u0275advance"](10),o["\u0275\u0275property"]("ngModel",t.parting)("ngModelOptions",o["\u0275\u0275pureFunction0"](16,Na)),o["\u0275\u0275advance"](5),o["\u0275\u0275property"]("ngIf","yes"==t.parting),o["\u0275\u0275advance"](13),o["\u0275\u0275property"]("ngForOf",t.countryList),o["\u0275\u0275advance"](8),o["\u0275\u0275property"]("disabled",t.isDisabled))},directives:[Aa.a,Aa.b,s.w,s.n,s.h,Rn.c,Rn.f,jn.b,s.c,s.m,s.f,s.t,a.n,Fn.a,Aa.d,Rn.g,Va.a,s.p,$a.n,a.o,s.r,Aa.e],styles:[".center[_ngcontent-%COMP%]{text-align:center;align-self:center}.mat-stepper-horizontal[_ngcontent-%COMP%]{margin-top:8px} .mat-form-field-prefix{top:0!important}"]}),e})();function qa(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",14),o["\u0275\u0275text"](1," Id "),o["\u0275\u0275elementEnd"]())}function Wa(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",15),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.id," ")}}function Qa(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",14),o["\u0275\u0275text"](1," Number of Days "),o["\u0275\u0275elementEnd"]())}function Ka(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",16),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.numofdays_block," ")}}function Ua(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",14),o["\u0275\u0275text"](1," Creation Time "),o["\u0275\u0275elementEnd"]())}function Za(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",15),o["\u0275\u0275text"](1),o["\u0275\u0275pipe"](2,"date"),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",o["\u0275\u0275pipeBind2"](2,1,e.creation_date,"medium")," ")}}function Ya(e,t){1&e&&o["\u0275\u0275element"](0,"th",14)}function Ga(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"td",15),o["\u0275\u0275elementStart"](1,"button",17),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const n=t.$implicit;return o["\u0275\u0275nextContext"]().unblock(n.id)}),o["\u0275\u0275text"](2," Un block "),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}}function Xa(e,t){1&e&&o["\u0275\u0275element"](0,"tr",18)}function Ja(e,t){1&e&&o["\u0275\u0275element"](0,"tr",19)}let ei=(()=>{class e{constructor(e,t){this.dataservice=e,this.router=t,this.displayedColumns=["Id","Num_blocker","CreationTime","actions"],this.blockWorkers=[]}getBlockedWorkers(){this.dataservice.getBlockedWorkers().subscribe(e=>{this.blockWorkers=e.data,this.dataSource=new Mn.l(this.blockWorkers)})}unblock(e){this.dataservice.unblockWorker(e).subscribe(e=>{this.getBlockedWorkers()})}ngOnInit(){this.getBlockedWorkers(),this.router.events.subscribe(e=>{e instanceof un.b&&"administration"===e.snapshot.outlet&&this.outlet.deactivate()})}}return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](kn.a),o["\u0275\u0275directiveInject"](un.d))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-blockworkers"]],viewQuery:function(e,t){var n;1&e&&o["\u0275\u0275viewQuery"](un.h,!0),2&e&&o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.outlet=n.first)},decls:20,vars:7,consts:[[3,"heading","subheading","icon"],[1,"row"],[1,"col-md-12"],[1,"mat-elevation-z8"],["mat-table","",3,"dataSource"],["matColumnDef","Id"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","Num_blocker"],["mat-cell","","style","text-align: center;",4,"matCellDef"],["matColumnDef","CreationTime"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",2,"text-align","center"],["mat-button","","mat-stroked-button","","type","submit",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"div"),o["\u0275\u0275element"](1,"app-page-header",0),o["\u0275\u0275elementStart"](2,"div",1),o["\u0275\u0275elementStart"](3,"div",2),o["\u0275\u0275elementStart"](4,"div",3),o["\u0275\u0275elementStart"](5,"table",4),o["\u0275\u0275elementContainerStart"](6,5),o["\u0275\u0275template"](7,qa,2,0,"th",6),o["\u0275\u0275template"](8,Wa,2,1,"td",7),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](9,8),o["\u0275\u0275template"](10,Qa,2,0,"th",6),o["\u0275\u0275template"](11,Ka,2,1,"td",9),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](12,10),o["\u0275\u0275template"](13,Ua,2,0,"th",6),o["\u0275\u0275template"](14,Za,3,4,"td",7),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](15,11),o["\u0275\u0275template"](16,Ya,1,0,"th",6),o["\u0275\u0275template"](17,Ga,3,0,"td",7),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275template"](18,Xa,1,0,"tr",12),o["\u0275\u0275template"](19,Ja,1,0,"tr",13),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275property"]("@routerTransition",void 0),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("heading","MTURK")("subheading","Block Worker")("icon","fa-tasks"),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("dataSource",t.dataSource),o["\u0275\u0275advance"](13),o["\u0275\u0275property"]("matHeaderRowDef",t.displayedColumns),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("matRowDefColumns",t.displayedColumns))},directives:[Nn,Mn.k,Mn.c,Mn.e,Mn.b,Mn.g,Mn.j,Mn.d,Mn.a,Fn.a,Mn.f,Mn.i],pipes:[a.e],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-form-field[_ngcontent-%COMP%]{font-size:14px;width:100%}"],data:{animation:[Object(Dn.a)()]}}),e})();var ti=n("MutI");function ni(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"span"),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.value," ")}}function ai(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"span"),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.value," ")}}function ii(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"span"),o["\u0275\u0275elementStart"](1,"button",8),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const t=o["\u0275\u0275nextContext"]().$implicit;return o["\u0275\u0275nextContext"]().approveAssignment(t)}),o["\u0275\u0275text"](2,"Approve"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}}function ri(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"mat-list-item",5),o["\u0275\u0275elementStart"](1,"span",6),o["\u0275\u0275text"](2),o["\u0275\u0275elementEnd"](),o["\u0275\u0275template"](3,ai,2,1,"span",1),o["\u0275\u0275pipe"](4,"keyvalue"),o["\u0275\u0275template"](5,ii,3,0,"span",7),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](2),o["\u0275\u0275textInterpolate1"](" ",e.worker_id," "),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("ngForOf",o["\u0275\u0275pipeBind1"](4,3,e.submitted_answer)),o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngIf",0==e.assignment_status)}}let oi=(()=>{class e{constructor(e,t,n){this.data=e,this._snackBar=t,this.dataService=n}approveAssignment(e){this.dataService.approveAssigment(e.id,e.parent_id).subscribe(t=>{e.assignment_status=!0,this._snackBar.open("Assignment Approved","Close",{duration:3e3})})}ngOnInit(){}}return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](Pn.a),o["\u0275\u0275directiveInject"](Fa.a),o["\u0275\u0275directiveInject"](kn.a))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-assignments-dialog"]],decls:7,vars:4,consts:[["mat-dialog-title",""],[4,"ngFor","ngForOf"],["mat-dialog-content",""],["role","list"],["role","listitem",4,"ngFor","ngForOf"],["role","listitem"],[1,"wth"],[4,"ngIf"],["mat-stroked-button","",1,"ml",3,"click"]],template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"h1",0),o["\u0275\u0275text"](1,"Answer: "),o["\u0275\u0275template"](2,ni,2,1,"span",1),o["\u0275\u0275pipe"](3,"keyvalue"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementStart"](4,"div",2),o["\u0275\u0275elementStart"](5,"mat-list",3),o["\u0275\u0275template"](6,ri,6,5,"mat-list-item",4),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275advance"](2),o["\u0275\u0275property"]("ngForOf",o["\u0275\u0275pipeBind1"](3,2,t.data[0].actual_answer)),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("ngForOf",t.data))},directives:[Pn.g,a.n,Pn.e,ti.a,ti.b,a.o,Fn.a],pipes:[a.i],styles:[".ml[_ngcontent-%COMP%]{margin-left:80px}.wth[_ngcontent-%COMP%]{width:190px}"]}),e})();function si(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",14),o["\u0275\u0275text"](1," Title "),o["\u0275\u0275elementEnd"]())}function li(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",15),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.title," ")}}function ci(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",14),o["\u0275\u0275text"](1," Creation Date "),o["\u0275\u0275elementEnd"]())}function di(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",15),o["\u0275\u0275text"](1),o["\u0275\u0275pipe"](2,"date"),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",o["\u0275\u0275pipeBind2"](2,1,e.creation_date,"medium")," ")}}function mi(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",14),o["\u0275\u0275text"](1," Total "),o["\u0275\u0275elementEnd"]())}function ui(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",15),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.max_assignments," ")}}function pi(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"th",14),o["\u0275\u0275text"](1," Remaining "),o["\u0275\u0275elementEnd"]())}function hi(e,t){if(1&e&&(o["\u0275\u0275elementStart"](0,"td",15),o["\u0275\u0275text"](1),o["\u0275\u0275elementEnd"]()),2&e){const e=t.$implicit;o["\u0275\u0275advance"](1),o["\u0275\u0275textInterpolate1"](" ",e.assignments_remaining," ")}}function fi(e,t){1&e&&o["\u0275\u0275element"](0,"th",14)}function gi(e,t){if(1&e){const e=o["\u0275\u0275getCurrentView"]();o["\u0275\u0275elementStart"](0,"td",15),o["\u0275\u0275elementStart"](1,"button",16),o["\u0275\u0275listener"]("click",function(){o["\u0275\u0275restoreView"](e);const n=t.$implicit;return o["\u0275\u0275nextContext"]().openAssignmentsModal(n.id)}),o["\u0275\u0275text"](2,"Assignments"),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()}}function bi(e,t){1&e&&o["\u0275\u0275element"](0,"tr",17)}function vi(e,t){1&e&&o["\u0275\u0275element"](0,"tr",18)}const yi=[{path:"",component:En,children:[{path:"",redirectTo:"newtask",pathMatch:"prefix"},{path:"blank-page",loadChildren:()=>n.e(7).then(n.bind(null,"yUho")).then(e=>e.BlankPageModule)},{path:"completedtask",component:la},{path:"existingtask",component:Ta},{path:"newtask",component:Ha},{path:"details/:id",component:$n},{path:"blockworker",component:ei},{path:"assignments",component:(()=>{class e{constructor(e,t,n){this.dataService=e,this.router=t,this.dialog=n,this.displayedColumns=["title","creation_date","max_assignments","assignments_remaining","actions"]}getAllTasks(){this.dataService.fetchAllHits().subscribe(e=>{this.dataSource=new Mn.l(e.data)})}openAssignmentsModal(e){this.dataService.fetchAssignmentsForParent(e).subscribe(e=>{this.dialog.open(oi,{minWidth:"400px",data:e.data}).afterClosed().subscribe(()=>{this.getAllTasks()})})}ngOnInit(){this.getAllTasks(),this.router.events.subscribe(e=>{e instanceof un.b&&"administration"===e.snapshot.outlet&&this.outlet.deactivate()})}}return e.\u0275fac=function(t){return new(t||e)(o["\u0275\u0275directiveInject"](kn.a),o["\u0275\u0275directiveInject"](un.d),o["\u0275\u0275directiveInject"](Pn.b))},e.\u0275cmp=o["\u0275\u0275defineComponent"]({type:e,selectors:[["app-assignments"]],viewQuery:function(e,t){var n;1&e&&o["\u0275\u0275viewQuery"](un.h,!0),2&e&&o["\u0275\u0275queryRefresh"](n=o["\u0275\u0275loadQuery"]())&&(t.outlet=n.first)},decls:23,vars:7,consts:[[3,"heading","subheading","icon"],[1,"row"],[1,"col-md-12"],[1,"mat-elevation-z8"],["mat-table","",3,"dataSource"],["matColumnDef","title"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","creation_date"],["matColumnDef","max_assignments"],["matColumnDef","assignments_remaining"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-button","","mat-stroked-button","",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(e,t){1&e&&(o["\u0275\u0275elementStart"](0,"div"),o["\u0275\u0275element"](1,"app-page-header",0),o["\u0275\u0275elementStart"](2,"div",1),o["\u0275\u0275elementStart"](3,"div",2),o["\u0275\u0275elementStart"](4,"div",3),o["\u0275\u0275elementStart"](5,"table",4),o["\u0275\u0275elementContainerStart"](6,5),o["\u0275\u0275template"](7,si,2,0,"th",6),o["\u0275\u0275template"](8,li,2,1,"td",7),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](9,8),o["\u0275\u0275template"](10,ci,2,0,"th",6),o["\u0275\u0275template"](11,di,3,4,"td",7),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](12,9),o["\u0275\u0275template"](13,mi,2,0,"th",6),o["\u0275\u0275template"](14,ui,2,1,"td",7),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](15,10),o["\u0275\u0275template"](16,pi,2,0,"th",6),o["\u0275\u0275template"](17,hi,2,1,"td",7),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275elementContainerStart"](18,11),o["\u0275\u0275template"](19,fi,1,0,"th",6),o["\u0275\u0275template"](20,gi,3,0,"td",7),o["\u0275\u0275elementContainerEnd"](),o["\u0275\u0275template"](21,bi,1,0,"tr",12),o["\u0275\u0275template"](22,vi,1,0,"tr",13),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"](),o["\u0275\u0275elementEnd"]()),2&e&&(o["\u0275\u0275property"]("@routerTransition",void 0),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("heading","MTURK")("subheading","Assignments")("icon","fa-tasks"),o["\u0275\u0275advance"](4),o["\u0275\u0275property"]("dataSource",t.dataSource),o["\u0275\u0275advance"](16),o["\u0275\u0275property"]("matHeaderRowDef",t.displayedColumns),o["\u0275\u0275advance"](1),o["\u0275\u0275property"]("matRowDefColumns",t.displayedColumns))},directives:[Nn,Mn.k,Mn.c,Mn.e,Mn.b,Mn.g,Mn.j,Mn.d,Mn.a,Fn.a,Mn.f,Mn.i],pipes:[a.e],styles:["table[_ngcontent-%COMP%]{width:100%}.mat-form-field[_ngcontent-%COMP%]{font-size:14px}"],data:{animation:[Object(Dn.a)()]}}),e})()}]}];let wi=(()=>{class e{}return e.\u0275mod=o["\u0275\u0275defineNgModule"]({type:e}),e.\u0275inj=o["\u0275\u0275defineInjector"]({factory:function(t){return new(t||e)},imports:[[un.g.forChild(yi)],un.g]}),e})();var xi=n("kMuZ");let _i=(()=>{class e{}return e.\u0275mod=o["\u0275\u0275defineNgModule"]({type:e}),e.\u0275inj=o["\u0275\u0275defineInjector"]({factory:function(t){return new(t||e)},imports:[[a.c,wi,s.i,s.s,dn.b,mn.b,jt,xi.a]]}),e})()}}]);