acr-assist-simulator-module
Version:
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.4.
2 lines • 139 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/BehaviorSubject"),require("util"),require("@angular/common"),require("rxjs/internal/Subject"),require("@angular/platform-browser"),require("@angular/forms"),require("ngx-bootstrap/carousel/slide.component"),require("ngx-bootstrap/carousel/carousel.component"),require("ngx-bootstrap/carousel/carousel.config"),require("ngx-drag-scroll"),require("angular2-datetimepicker"),require("ngx-duration-picker"),require("@angular/http"),require("rxjs/add/operator/map")):"function"==typeof define&&define.amd?define("acr-assist-simulator-module",["exports","@angular/core","rxjs/BehaviorSubject","util","@angular/common","rxjs/internal/Subject","@angular/platform-browser","@angular/forms","ngx-bootstrap/carousel/slide.component","ngx-bootstrap/carousel/carousel.component","ngx-bootstrap/carousel/carousel.config","ngx-drag-scroll","angular2-datetimepicker","ngx-duration-picker","@angular/http","rxjs/add/operator/map"],t):t(e["acr-assist-simulator-module"]={},e.ng.core,e.rxjs.BehaviorSubject,null,e.ng.common,e.rxjs["internal/Subject"],e.ng.platformBrowser,e.ng.forms,null,null,null,null,null,null,e.ng.http)}(this,function(e,a,t,s,n,i,r,o,l,d,c,u,m,p,h){"use strict";var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};function y(e,t){function n(){this.constructor=e}f(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function F(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}var x=function(){this.nonRelevantDataElementIds=[],this.endPointId="",this.selectedDecisionPointId="",this.selectedDecisionPointLabel="",this.selectedBranchLabel=""},b=function(){function e(e){this.values=e}return e.prototype.addOrUpdate=function(e,t){this.values[e]=t},e.prototype.get=function(e){return this.values[e]},e.prototype["delete"]=function(e){return this.values["delete"](e)},e.prototype.getAll=function(){return this.values},e}(),E=function(){},g=require("expr-eval").Parser,v=function(){function e(){this.endOfRoadReached=!1,this.lastConditionMetBranchLevel=1,this.nonRelevantDataElementIds=new Array,this.simulatorStateChanged=new t.BehaviorSubject(new x),this.dataElementValues=new Map,this.dataElementTexts=new Map,this.nonRelevantDataElementIds=new Array}return e.prototype.getTemplate=function(){return this.template},e.prototype.getAllDataElementValues=function(){return this.dataElementValues},e.prototype.getAllDataElementTexts=function(){return this.dataElementTexts},e.prototype.getDataElementValue=function(e){return this.dataElementValues[e]},e.prototype.getDataElementText=function(e){return this.dataElementTexts[e]},e.prototype.addOrUpdateDataElement=function(e,t,n){this.dataElementValues[e]=t,this.dataElementTexts[e]=n,this.evaluateDecisionPoints()},e.prototype.evaluateDecisionPoint=function(e,t){var n,i,a,r,o=0,l=e.branches.length;try{for(var s=F(e.branches),d=s.next();!d.done;d=s.next()){var c=d.value;o++;var u=!1;if(this.endOfRoadReached)break;if(c.compositeCondition!==undefined?u=c.compositeCondition.evaluate(new b(this.dataElementValues)):c.condition!==undefined&&(u=c.condition.evaluate(new b(this.dataElementValues))),u){if(this.lastConditionMetBranchLevel=t,c.decisionPoints!==undefined)try{for(var m=F(c.decisionPoints),p=m.next();!p.done;p=m.next()){var h=p.value,f=t+1;this.evaluateDecisionPoint(h,f)}}catch(g){a={error:g}}finally{try{p&&!p.done&&(r=m["return"])&&r.call(m)}finally{if(a)throw a.error}}else if(c.endPointRef!==undefined){(y=new x).endPointId=c.endPointRef.endPointId,y.selectedBranchLabel=c.label,y.selectedDecisionPointId=e.id,y.selectedDecisionPointLabel=e.label,this.simulatorStateChanged.next(y),this.endOfRoadReached=!0;break}}else if(l<=o){this.endOfRoadReached=!0;var y=new x;return void this.simulatorStateChanged.next(y)}}}catch(v){n={error:v}}finally{try{d&&!d.done&&(i=s["return"])&&i.call(s)}finally{if(n)throw n.error}}},e.prototype.resetValuesOfNonRelevantDataElements=function(e){if(e!==undefined)try{for(var t=F(e),n=t.next();!n.done;n=t.next()){var i=n.value,a=void 0;try{for(var r=F(this.template.dataElements),o=r.next();!o.done;o=r.next()){var l=o.value;if(l.id===i){a=l.defaultValue;break}}}catch(m){c={error:m}}finally{try{o&&!o.done&&(u=r["return"])&&u.call(r)}finally{if(c)throw c.error}}this.dataElementValues[i]=a}}catch(p){s={error:p}}finally{try{n&&!n.done&&(d=t["return"])&&d.call(t)}finally{if(s)throw s.error}}var s,d,c,u},e.prototype.evaluateComputedElementDecisionPoint=function(e,t,n){var i,a,r,o,l=0,s=t.branches.length;try{for(var d=F(t.branches),c=d.next();!c.done;c=d.next()){var u=c.value;l++;var m=!1;if(this.endOfRoadReached)break;if(u.compositeCondition!==undefined?m=u.compositeCondition.evaluate(new b(this.dataElementValues)):u.condition!==undefined&&(m=u.condition.evaluate(new b(this.dataElementValues))),m){if(this.lastConditionMetBranchLevel=n,u.decisionPoints!==undefined)try{for(var p=F(u.decisionPoints),h=p.next();!h.done;h=p.next()){var f=h.value,y=n+1;this.evaluateComputedElementDecisionPoint(e,f,y)}}catch(g){r={error:g}}finally{try{h&&!h.done&&(o=p["return"])&&o.call(p)}finally{if(r)throw r.error}}else if(u.computedValue!==undefined){this.dataElementValues[e]=u.computedValue.expressionText,this.endOfRoadReached=!0,u.computedValue instanceof E?this.dataElementValues[e]=this.evaluateArithmeticExpression(u.computedValue.expressionText):this.dataElementValues[e]=u.computedValue.expressionText,this.endOfRoadReached=!0;break}}else if(s<=l)return this.endOfRoadReached=!0,void(this.dataElementValues[e]=undefined)}}catch(v){i={error:v}}finally{try{c&&!c.done&&(a=d["return"])&&a.call(d)}finally{if(i)throw i.error}}},e.prototype.evaluateArithmeticExpression=function(a){for(var r=0,o=0,e=function(){if(r=a.indexOf("{"),o=a.indexOf("}"),-1!==r&&-1!==o){var e=a.substring(r+1,o),t=a.substring(r,o+1),n=l.dataElementValues[e];if(s.isArray(n)){var i=0;n.forEach(function(e){i+=+e}),n=i}a=a.replace(t,n)}},l=this;-1!==r&&-1!==o;)e();return g.evaluate(a).toString()},e.prototype.evaluateComputedExpressions=function(){this.endOfRoadReached=!1;try{for(var e=F(this.template.dataElements),t=e.next();!t.done;t=e.next()){var n=t.value;if("ComputedDataElement"===n.dataElementType){var i=n;try{for(var a=F(i.decisionPoints),r=a.next();!r.done;r=a.next()){var o=r.value;this.evaluateComputedElementDecisionPoint(n.id,o,1),this.dataElementValues[n.id]===undefined&&o.defaultBranch&&o.defaultBranch.computedValue&&(this.dataElementValues[n.id]=o.defaultBranch.computedValue.expressionText),this.endOfRoadReached=!1}}catch(u){d={error:u}}finally{try{r&&!r.done&&(c=a["return"])&&c.call(a)}finally{if(d)throw d.error}}}}}catch(m){l={error:m}}finally{try{t&&!t.done&&(s=e["return"])&&s.call(e)}finally{if(l)throw l.error}}var l,s,d,c},e.prototype.evaluateConditionalProperty=function(e,t){if(void 0===t&&(t=[]),e.conditionalProperties!==undefined){var n=!1;try{for(var i=F(e.conditionalProperties),a=i.next();!a.done;a=i.next()){var r=a.value;if(r.condition!==undefined?n=r.condition.evaluate(new b(this.dataElementValues)):r.compositeCondition!==undefined&&(n=r.compositeCondition.evaluate(new b(this.dataElementValues))),n)return t===undefined&&(this.nonRelevantDataElementIds=new Array),"false"===r.isRelevant?this.nonRelevantDataElementIds.push(e.id):(e.displaySequence=r.DisplaySequence,e.isRequired=r.isRequired===undefined||"true"===r.isRequired.toLowerCase(),r.Minimum!==undefined&&null!=r.Minimum&&(e.minimum=+r.Minimum),r.Maximum!==undefined&&null!=r.Maximum&&(e.maximum=+r.Maximum),"ChoiceDataElement"===e.dataElementType&&(e.ChoiceNotRelevant=r.ChoiceNotRelevant),"MultiChoiceDataElement"===e.dataElementType&&(e.ChoiceNotRelevant=r.ChoiceNotRelevant),"DurationDataElement"===e.dataElementType&&(e.MinimumDay=+r.MinimumDay,e.MaximumDay=+r.MaximumDay,e.MinimumHours=+r.MinimumHours,e.MaximumHours=+r.MaximumHours,e.MinimumMinutes=+r.MinimumMinutes,e.MaxmimumMinutes=+r.MaxmimumMinutes)),this.nonRelevantDataElementIds;"ChoiceDataElement"===e.dataElementType&&(e.ChoiceNotRelevant=new Array),"MultiChoiceDataElement"===e.dataElementType&&(e.ChoiceNotRelevant=new Array)}}catch(s){o={error:s}}finally{try{a&&!a.done&&(l=i["return"])&&l.call(i)}finally{if(o)throw o.error}}}var o,l},e.prototype.isCondtionMet=function(){try{for(var e=F(this.template.dataElements),t=e.next();!t.done;t=e.next()){var n=t.value;if(n.conditionalProperties!==undefined){var i=!1;try{for(var a=F(n.conditionalProperties),r=a.next();!r.done;r=a.next()){var o=r.value;return o.condition!==undefined?i=o.condition.evaluate(new b(this.dataElementValues)):o.compositeCondition!==undefined&&(i=o.compositeCondition.evaluate(new b(this.dataElementValues))),!!i}}catch(u){d={error:u}}finally{try{r&&!r.done&&(c=a["return"])&&c.call(a)}finally{if(d)throw d.error}}}}}catch(m){l={error:m}}finally{try{t&&!t.done&&(s=e["return"])&&s.call(e)}finally{if(l)throw l.error}}var l,s,d,c},e.prototype.evaluateDecisionAndConditionalProperty=function(){this.nonRelevantDataElementIds=new Array,this.RevertConditionValues();try{for(var e=F(this.template.dataElements),t=e.next();!t.done;t=e.next()){var n=t.value;this.evaluateConditionalProperty(n,new Array)}}catch(r){i={error:r}}finally{try{t&&!t.done&&(a=e["return"])&&a.call(e)}finally{if(i)throw i.error}}return this.resetValuesOfNonRelevantDataElements(this.nonRelevantDataElementIds),this.nonRelevantDataElementIds;var i,a},e.prototype.RevertConditionValues=function(){try{for(var e=F(this.template.dataElements),t=e.next();!t.done;t=e.next()){var n=t.value;n.isRequired=n.isRequiredOverrider,n.displaySequence=n.displaySequenceOverrider,"NumericDataElement"===n.dataElementType&&(n.minimum=+n.minimumOverrider,n.maximum=+n.maximumOverrider),"IntegerDataElement"===n.dataElementType&&(n.minimum=+n.minimumOverrider,n.maximum=+n.maximumOverrider),"DurationDataElement"===n.dataElementType&&(n.MinimumDay=+n.MinimumDayOverrider,n.MaximumDay=+n.MaximumDayOverrider,n.MinimumHours=+n.MinimumHoursOverrider,n.MaximumHours=+n.MaximumHoursOverrider,n.MinimumMinutes=+n.MinimumMinutesOverrider,n.MaxmimumMinutes=+n.MaxmimumMinutesOverrider)}}catch(r){i={error:r}}finally{try{t&&!t.done&&(a=e["return"])&&a.call(e)}finally{if(i)throw i.error}}var i,a},e.prototype.evaluateDecisionPoints=function(){this.evaluateComputedExpressions(),this.endOfRoadReached=!1;try{for(var e=F(this.template.rules.decisionPoints),t=e.next();!t.done;t=e.next()){var n=t.value;this.evaluateDecisionPoint(n,1)}}catch(r){i={error:r}}finally{try{t&&!t.done&&(a=e["return"])&&a.call(e)}finally{if(i)throw i.error}}var i,a},e.prototype.initialize=function(e){this.template=e;try{for(var t=F(this.template.dataElements),n=t.next();!n.done;n=t.next()){var i=n.value;this.dataElementValues[i.id]=i.currentValue}}catch(o){a={error:o}}finally{try{n&&!n.done&&(r=t["return"])&&r.call(t)}finally{if(a)throw a.error}}var a,r},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[]},e}(),C=function(){function e(){}return e.forRoot=function(){return{ngModule:e,providers:[v]}},e.decorators=[{type:a.NgModule,args:[{imports:[n.CommonModule],declarations:[]}]}],e}(),D=function(){},w=function(){},I=function(){},V=function(){function e(){}return e.prototype.isArray=function(e){return e instanceof Array},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[]},e}(),T=function(){function e(e){this.arrayCheckerSeviceService=e}return e.prototype.returnDiagram=function(e){var t=new I;return e.Attr?(t.displaySequence=e.Attr.DisplaySequence,t.keyDiagram=!!e.Attr.IsKeyDiagram&&e.Attr.IsKeyDiagram):(t.displaySequence=undefined,t.keyDiagram=!1),t.label=e.Label,t.location=e.Location,t},e.prototype.returnDiagrams=function(e){var t,n,i=new Array;if(e!==undefined)if(this.arrayCheckerSeviceService.isArray(e))try{for(var a=F(e),r=a.next();!r.done;r=a.next()){var o=r.value;i.push(this.returnDiagram(o))}}catch(l){t={error:l}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(t)throw t.error}}else i.push(this.returnDiagram(e));return i},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:V}]},e}(),P=new a.InjectionToken("one"),S=function(){},k=function(){},M=function(){},R=function(){},O=function(){},A=function(){function e(e){this.conditionType=e}return e.prototype.evaluate=function(e){var t=e.get(this.conditionType.dataElementId);return t!==undefined&&t.toUpperCase()===this.conditionType.comparisonValue.toUpperCase()},e}(),q=function(){},N=function(){function e(e){this.conditionType=e}return e.prototype.evaluate=function(e){var t=+e.get(this.conditionType.dataElementId);return(isNaN(this.conditionType.comparisonValue)?+e.get(this.conditionType.comparisonValue):+this.conditionType.comparisonValue)<t},e}(),z=function(){function e(e){this.conditionType=e}return e.prototype.evaluate=function(e){return+e.get(this.conditionType.dataElementId)<(isNaN(this.conditionType.comparisonValue)?+e.get(this.conditionType.comparisonValue):+this.conditionType.comparisonValue)},e}(),U=function(){function e(e){this.conditionType=e}return e.prototype.evaluate=function(e){var t=+e.get(this.conditionType.dataElementId);return(isNaN(this.conditionType.comparisonValue)?+e.get(this.conditionType.comparisonValue):+this.conditionType.comparisonValue)<=t},e}(),_=function(){function e(e){this.conditionType=e}return e.prototype.evaluate=function(e){return+e.get(this.conditionType.dataElementId)<=(isNaN(this.conditionType.comparisonValue)?+e.get(this.conditionType.comparisonValue):+this.conditionType.comparisonValue)},e}(),L=function(){function e(e){this.conditionType=e}return e.prototype.evaluate=function(e){var t=!1,n=e.get(this.conditionType.dataElementId);if(n!==undefined)for(var i=0;i<n.length;i++){n[i].toUpperCase()===this.conditionType.comparisonValue.toUpperCase()&&(t=!0)}return t},e}(),H=function(){function e(){this.conditions=[],this.conditionType="AndCondition"}return e.prototype.evaluate=function(e){for(var t=!0,n=0;n<this.conditions.length;n++){var i=this.conditions[n].evaluate(e);if(!(t=!!i&&(t&&i)))break}return t},e}(),j=function(){function e(){this.conditions=[],this.conditionType="OrCondition"}return e.prototype.evaluate=function(e){for(var t=!1,n=0;n<this.conditions.length;n++){var i=this.conditions[n].evaluate(e);if(t=t||i)break}return t},e}(),B=function(){function e(){this.conditions=[],this.conditionType="NotCondition"}return e.prototype.evaluate=function(e){var t,n,i=new Array;try{for(var a=F(this.conditions),r=a.next();!r.done;r=a.next()){var o=r.value;i.push(o.evaluate(e))}}catch(l){t={error:l}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(t)throw t.error}}return!i[0]},e}(),$=function(){function e(e){this.arrayCheckerService=e}return e.prototype.returnConditionType=function(e){var t=new q;return t.comparisonValue=e.Attr.ComparisonValue,t.dataElementId=e.Attr.DataElementId,t},e.prototype.returnCondition=function(e){var t;return e.hasOwnProperty("EqualCondition")&&(t=new A(this.returnConditionType(e.EqualCondition))),e.hasOwnProperty("GreaterThanCondition")&&(t=new N(this.returnConditionType(e.GreaterThanCondition))),e.hasOwnProperty("LessThanCondition")&&(t=new z(this.returnConditionType(e.LessThanCondition))),e.hasOwnProperty("GreaterThanOrEqualsCondition")&&(t=new U(this.returnConditionType(e.GreaterThanOrEqualsCondition))),e.hasOwnProperty("LessThanOrEqualsCondition")&&(t=new _(this.returnConditionType(e.LessThanOrEqualsCondition))),e.hasOwnProperty("ContainsCondition")&&(t=new L(this.returnConditionType(e.ContainsCondition))),t},e.prototype.isComposite=function(e){return e.hasOwnProperty("AndCondition")||e.hasOwnProperty("OrCondition")||e.hasOwnProperty("NotCondition")},e.prototype.returnConditionFromJSON=function(e,t){var n;return"EqualCondition"===e&&(n=new A(this.returnConditionType(t))),"GreaterThanCondition"===e&&(n=new N(this.returnConditionType(t))),"LessThanCondition"===e&&(n=new z(this.returnConditionType(t))),"GreaterThanOrEqualsCondition"===e&&(n=new U(this.returnConditionType(t))),"LessThanOrEqualsCondition"===e&&(n=new _(this.returnConditionType(t))),"ContainsCondition"===e&&(n=new L(this.returnConditionType(t))),n},e.prototype.returnConditions=function(e){var t,n,i,a,r;try{for(var o=F(["EqualCondition","GreaterThanCondition","LessThanCondition","GreaterThanOrEqualsCondition","LessThanOrEqualsCondition","ContainsCondition"]),l=o.next();!l.done;l=o.next()){var s=l.value,d=e[s];if(d!==undefined)if(t=new Array,this.arrayCheckerService.isArray(d))try{for(var c=F(d),u=c.next();!u.done;u=c.next()){var m=u.value;t.push(this.returnConditionFromJSON(s,m))}}catch(p){a={error:p}}finally{try{u&&!u.done&&(r=c["return"])&&r.call(c)}finally{if(a)throw a.error}}else t.push(this.returnConditionFromJSON(s,d))}}catch(h){n={error:h}}finally{try{l&&!l.done&&(i=o["return"])&&i.call(o)}finally{if(n)throw n.error}}return t},e.prototype.isHybrid=function(e){var t=e.hasOwnProperty("AndCondition")||e.hasOwnProperty("OrCondition")||e.hasOwnProperty("NotCondition"),n=e.hasOwnProperty("EqualCondition")||e.hasOwnProperty("GreaterThanCondition")||e.hasOwnProperty("LessThanCondition")||e.hasOwnProperty("GreaterThanOrEqualsCondition")||e.hasOwnProperty("LessThanOrEqualsCondition")||e.hasOwnProperty("ContainsCondition");return t&&n},e.prototype.returnCompositeCondition=function(e){if(this.isComposite(e)){var t,n,i,a,r,o;if(e.hasOwnProperty("AndCondition")?(t=e.AndCondition,n=new H):e.hasOwnProperty("OrCondition")?(t=e.OrCondition,n=new j):e.hasOwnProperty("NotCondition")&&(t=e.NotCondition,n=new B),this.isComposite(t))if(this.isHybrid(t)){var l=Object.keys(t);try{for(var s=F(l),d=s.next();!d.done;d=s.next()){var c=d.value,u=t[c],m='{"'+c+'":'+JSON.stringify(u)+"}",p=JSON.parse(m);if(this.isComposite(p))this.returnInnerConditions(p,n);else if(this.arrayCheckerService.isArray(u))try{for(var h=F(u),f=h.next();!f.done;f=h.next()){var y=f.value;n.conditions.push(this.returnConditionFromJSON(c,y))}}catch(g){r={error:g}}finally{try{f&&!f.done&&(o=h["return"])&&o.call(h)}finally{if(r)throw r.error}}else n.conditions.push(this.returnConditionFromJSON(c,u))}}catch(v){i={error:v}}finally{try{d&&!d.done&&(a=s["return"])&&a.call(s)}finally{if(i)throw i.error}}}else this.returnInnerConditions(t,n);else n.conditions=this.returnConditions(t);return n}},e.prototype.returnCompositeConditionFromName=function(e){var t;switch(e){case"AndCondition":t=new H;break;case"OrCondition":t=new j;break;case"NotCondition":t=new B}return t},e.prototype.addConditionsToInnerConditions=function(e,t,n){var i,a,r,o,l=this.returnCompositeConditionFromName(e);if(n.conditions.push(l),this.isHybrid(t)){var s=Object.keys(t);try{for(var d=F(s),c=d.next();!c.done;c=d.next()){var u=c.value,m=t[u],p='{"'+u+'":'+JSON.stringify(m)+"}",h=JSON.parse(p);if(this.isComposite(h))this.returnInnerConditions(h,l);else if(this.arrayCheckerService.isArray(m))try{for(var f=F(m),y=f.next();!y.done;y=f.next()){var g=y.value;l.conditions.push(this.returnConditionFromJSON(u,g))}}catch(v){r={error:v}}finally{try{y&&!y.done&&(o=f["return"])&&o.call(f)}finally{if(r)throw r.error}}else l.conditions.push(this.returnConditionFromJSON(u,m))}}catch(x){i={error:x}}finally{try{c&&!c.done&&(a=d["return"])&&a.call(d)}finally{if(i)throw i.error}}}else this.isComposite(t)||(l.conditions=this.returnConditions(t))},e.prototype.returnInnerConditions=function(e,t){var n,i,a,r,o=Object.keys(e);try{for(var l=F(o),s=l.next();!s.done;s=l.next()){var d=s.value,c=e[d];if(this.arrayCheckerService.isArray(c))try{for(var u=F(c),m=u.next();!m.done;m=u.next()){var p=m.value;this.addConditionsToInnerConditions(d,p,t)}}catch(h){a={error:h}}finally{try{m&&!m.done&&(r=u["return"])&&r.call(u)}finally{if(a)throw a.error}}else this.addConditionsToInnerConditions(d,e[d],t)}}catch(f){n={error:f}}finally{try{s&&!s.done&&(i=l["return"])&&i.call(l)}finally{if(n)throw n.error}}},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:V}]},e}(),G=function(){},X=function(){function e(){}return e.prototype.createComputedValue=function(e){var t;return e.TextExpression!==undefined?((t=new G).expressionText=e.TextExpression,t):e.ArithmeticExpression!==undefined?((t=new E).expressionText=e.ArithmeticExpression,t):void 0},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[]},e}(),K=function(){function e(e,t,n){this.arrayCheckerService=e,this.conditionsCreationService=t,this.computedValueCreationService=n}return e.prototype.createRelevantDataElementReferences=function(e){var t=new R;return t.dataElementId=e.Attr.DataElementId,t},e.prototype.returnBranch=function(e){var t,n,i=new k;if(i.label=e.Label,e.EndPointRef&&(i.endPointRef=new M,i.endPointRef.endPointId=e.EndPointRef.Attr.EndPointId),i.condition=this.conditionsCreationService.returnCondition(e),i.computedValue=this.computedValueCreationService.createComputedValue(e),this.conditionsCreationService.isComposite(e)&&(i.compositeCondition=this.conditionsCreationService.returnCompositeCondition(e)),e.NotRelevantDataElements){var a=new O;a.dataElementReferences=new Array;var r=e.NotRelevantDataElements.DataElementRef;if(this.arrayCheckerService.isArray(r))try{for(var o=F(r),l=o.next();!l.done;l=o.next()){var s=l.value;a.dataElementReferences.push(this.createRelevantDataElementReferences(s))}}catch(d){t={error:d}}finally{try{l&&!l.done&&(n=o["return"])&&n.call(o)}finally{if(t)throw t.error}}else a.dataElementReferences.push(this.createRelevantDataElementReferences(r));i.notRelevantDataElements=a}return e.DecisionPoint&&(i.decisionPoints=new Array,this.addDecisionPoints(e.DecisionPoint,i.decisionPoints)),i},e.prototype.addDecisionPoint=function(e,t){var n=new S;e.Attr&&e.Attr.Id&&(n.id=e.Attr.Id),n.label=e.Label;var i,a,r=e.Branch;if(r!==undefined){if(n.branches=new Array,this.arrayCheckerService.isArray(r))try{for(var o=F(r),l=o.next();!l.done;l=o.next()){var s=l.value;n.branches.push(this.returnBranch(s))}}catch(c){i={error:c}}finally{try{l&&!l.done&&(a=o["return"])&&a.call(o)}finally{if(i)throw i.error}}else n.branches.push(this.returnBranch(r));var d=e.DefaultBranch;d!==undefined&&(n.defaultBranch=this.createDefaultBranch(d))}t.push(n)},e.prototype.addDecisionPoints=function(e,t){if(this.arrayCheckerService.isArray(e))try{for(var n=F(e),i=n.next();!i.done;i=n.next()){var a=i.value;this.addDecisionPoint(a,t)}}catch(l){r={error:l}}finally{try{i&&!i.done&&(o=n["return"])&&o.call(n)}finally{if(r)throw r.error}}else this.addDecisionPoint(e,t);var r,o},e.prototype.createDecisionPoints=function(e){var t=new Array;return this.addDecisionPoints(e,t),t},e.prototype.createDefaultBranch=function(e){var t=new k;return t.label="Default Branch",t.computedValue=this.computedValueCreationService.createComputedValue(e),t},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:V},{type:$},{type:X}]},e}(),J=function(){},W=function(){},Y=function(){function e(e,t,n,i){this.diagramService=e,this.elememtcreationService=t,this.arrayCheckerService=n,this.decisionPointsCreationService=i,this.endPointXMLString=[],this.stringParser=require("string")}return e.prototype.getTemplate=function(e){var t,n=new D;if(t=this.parseToJson(e),n===undefined)throw new Error("Unable to parse the template");return n.metadata=this.getMetaData(t.Metadata),n.dataElements=this.getDataElements(t.DataElements),t.Rules&&(n.rules=new J,n.rules.decisionPoints=this.decisionPointsCreationService.createDecisionPoints(t.Rules.DecisionPoint)),n.templatePartial=this.returnEndpoints(e),n.endPointsString=this.endPointXMLString,n.xmlContent=e,n},e.prototype.getTemplatePartial=function(e){var t=new W;return t.id=e.Attr.Id,t.sectionIfNotValue=e.SectionIfValueNot,t.sectionIfValues=e.SectionIfValue,t},e.prototype.returnEndPointContents=function(e,t,n){for(var i=new Array,a=0;;){var r=e.indexOf(t,a),o=e.indexOf(n,a);if(!(0<=r&&0<=o))break;var l=o+n.length,s=e.substring(r,l);i.push(s),a=l+1}return i},e.prototype.returnTemplatePartials=function(e){var t,n,i=new Array;try{for(var a=F(e),r=a.next();!r.done;r=a.next()){var o=r.value,l=new W,s=this.parseToJson(o);l.id=s.Attr.Id}}catch(d){t={error:d}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(t)throw t.error}}return i},e.prototype.returnEndpoints=function(e){var t="<EndPoints>",n=e.indexOf(t),i=e.indexOf("</EndPoints>");if(0<=n&&0<=i){var a=n+t.length,r=e.substring(a,i);if(0<r.length){var o=this.returnEndPointContents(r,"<TemplatePartial","</TemplatePartial>");return this.endPointXMLString=this.returnEndPointContents(r,"<EndPoint","</EndPoint>"),o}}},e.prototype.parseToJson=function(e){var n;return(0,require("xml2js").parseString)(e,{explicitRoot:!1,explicitArray:!1,attrkey:"Attr"},function(e,t){n=t}),n},e.prototype.getMetaData=function(e){var t=new w;t.label=e.Label,t.id=e.ID,t.schemaVersion=e.SchemaVersion,t.ruleVersion=e.RuleVersion;var n=e.Info.Diagrams.Diagram;return t.diagrams=this.diagramService.returnDiagrams(n),t.approvedBy=e.ApprovedBy,t.createdDate=e.CreatedDate,t.lastModifiedDate=e.LastModifiedDate,t.reviewedBy=e.ReviewedBy,t.developedBy=e.DevelopedBy,t.radElementSetID=e.RadElementSetID,t},e.prototype.returnDataElement=function(e,t){var n,i,a,r,o,l=new Array;try{for(var s=F(this.elememtcreationService),d=s.next();!d.done;d=s.next()){var c=d.value;if(c.elementType===e){n=c;break}}}catch(f){i={error:f}}finally{try{d&&!d.done&&(a=s["return"])&&a.call(s)}finally{if(i)throw i.error}}if(n!==undefined&&t!==undefined)if(this.arrayCheckerService.isArray(t))try{for(var u=F(t),m=u.next();!m.done;m=u.next()){var p=m.value,h=n.createElement(p);l.push(h)}}catch(y){r={error:y}}finally{try{m&&!m.done&&(o=u["return"])&&o.call(u)}finally{if(r)throw r.error}}else{h=n.createElement(t);l.push(h)}return l},e.prototype.getDataElements=function(e){var t=new Array;return t=(t=(t=(t=(t=(t=(t=(t=t.concat(this.returnDataElement("ChoiceDataElement",e.ChoiceDataElement))).concat(this.returnDataElement("MultiChoiceDataElement",e.MultiChoiceDataElement))).concat(this.returnDataElement("NumericDataElement",e.NumericDataElement))).concat(this.returnDataElement("GlobalValue",e.GlobalValue))).concat(this.returnDataElement("ComputedDataElement",e.ComputedDataElement))).concat(this.returnDataElement("IntegerDataElement",e.IntegerDataElement))).concat(this.returnDataElement("DateTimeDataElement",e.DateTimeDataElement))).concat(this.returnDataElement("DurationDataElement",e.TimeSpanDataElement))},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T},{type:Array,decorators:[{type:a.Inject,args:[P]}]},{type:V},{type:K}]},e}(),Z=function(){},Q={Top:0,Right:1};Q[Q.Top]="Top",Q[Q.Right]="Right";var ee=require("jquery"),te=function(){function e(e,t){this.templateManagerService=e,this.simulatorEngineService=t,this.inputValues=[],this.resetButton=!0,this.returnExecutionHistory=new a.EventEmitter,this.returnDataElementChanged=new a.EventEmitter,this.returnDefaultElements=new a.EventEmitter,this.position=Q,this.acceptedFileTypes=["image/png","image/gif","image/jpg","image/jpeg"]}return e.prototype.ngOnChanges=function(e){if(this.isReset=!0,this.isEmptyContent=this.templateContent===undefined||0===this.templateContent.length&&0===this.inputValues.length&&this.inputData===undefined,!this.isEmptyContent){this.inputData!==undefined&&0<this.inputData.length&&(this.inputValues=JSON.parse(this.inputData)),this.imageUpload!==undefined&&(this.imageUpload.nativeElement.value=""),this.template=this.templateManagerService.getTemplate(this.templateContent),0!==this.inputValues.length&&this.populateTestCaseData(),this.simulatorEngineService.initialize(this.template),this.dataElements=this.template.dataElements,this.keyDiagrams=new Array;for(var t=0;t<this.template.metadata.diagrams.length;t++){var n=new I;n.label=this.template.metadata.diagrams[t].label,n.location=this.imagePath+"/"+this.template.metadata.diagrams[t].location,n.keyDiagram=this.template.metadata.diagrams[t].keyDiagram,this.keyDiagrams.push(n)}this.resultText=undefined}},e.prototype.resetElements=function(){this.template=this.templateManagerService.getTemplate(this.templateContent),this.simulatorEngineService.initialize(this.template),this.dataElements=Object.assign({},this.template.dataElements),this.resultText=undefined,this.returnDefaultElements.emit()},e.prototype.recieveReportText=function(e){this.resultText=e},e.prototype.recievedExecutionHistory=function(e){this.returnExecutionHistory.emit(e)},e.prototype.recivedOnDataElementChanged=function(e){this.returnDataElementChanged.emit(e)},e.prototype.changeListener=function(i){var a=this;this.isInvalidFile=!1,this.keyDiagrams=new Array;for(var e=function(e){var t=new FileReader,n=new I;n.label=i.target.files[e].name,n.keyDiagram=0===e,-1<r.acceptedFileTypes.indexOf(i.target.files[e].type)||(r.isInvalidFile=!0),t.onload=function(e){n.location=t.result.toString()},t.readAsDataURL(i.target.files[e]),t.onloadend=function(e){a.keyDiagrams.push(n)}},r=this,t=0;t<i.target.files.length;t++)e(t)},e.prototype.collapseKeyDiagram=function(){ee("#icon_keydiagram").hasClass("fa fa-minus")?(ee("#icon_keydiagram").removeClass("fa fa-minus"),ee("#icon_keydiagram").addClass("fa fa-plus"),ee("#body_keydiagram").css({display:"none"})):(ee("#icon_keydiagram").removeClass("fa fa-plus"),ee("#icon_keydiagram").addClass("fa fa-minus"),ee("#body_keydiagram").removeAttr("style"))},e.prototype.collapseReportText=function(){ee("#icon_reporttext").hasClass("fa fa-minus")?(ee("#icon_reporttext").removeClass("fa fa-minus"),ee("#icon_reporttext").addClass("fa fa-plus"),ee("#body_reporttext").css({display:"none"})):(ee("#icon_reporttext").removeClass("fa fa-plus"),ee("#icon_reporttext").addClass("fa fa-minus"),ee("#body_reporttext").removeAttr("style"))},e.prototype.populateTestCaseData=function(){var a=this;this.template.dataElements.forEach(function(t){var n=a.inputValues.filter(function(e){return e.dataElementId.toUpperCase()===t.id.toUpperCase()});if(n!==undefined&&0<n.length){if("ChoiceDataElement"===t.dataElementType||"MultiChoiceDataElement"===t.dataElementType){var e=t;if(Array.isArray(n[0].dataElementValue)){var i=[];e.choiceInfo.forEach(function(t){n[0].dataElementValue.forEach(function(e){t.value.toUpperCase()===e.toUpperCase()&&i.push(t.value)})}),n[0].dataElementValue=i}else e.choiceInfo.forEach(function(e){n[0].dataElementValue===undefined||e.value.toUpperCase()!==n[0].dataElementValue.toUpperCase()||(n[0].dataElementValue=e.value)})}t.currentValue=n[0].dataElementValue}})},e.decorators=[{type:a.Component,args:[{selector:"acr-assist-simulator",template:'<ng-container *ngIf="!isEmptyContent">\n <div id="topReportTextPosition" *ngIf="reportTextPosition === position.Top">\n <div class="col-sm-12 col-md-12 col-lg-12">\n <div id="div-simulator-block">\n <div class="box box-primary box-solid margin-b-0">\n <div *ngIf="resetButton == true" class="with-border text-right padding-5 padding-r-10">\n <button (click)="resetElements()" class="btn btn-xs btn-primary">Reset Values</button>\n </div>\n <div class="box-body">\n <div #simulatorResultsBlock>\n <ng-container *ngIf="resultText !== undefined">\n <div class="box box-primary">\n <div class="box-header with-border">\n <h3 class="box-title">Report Text</h3>\n <div class="box-tools pull-right">\n <button type="button" class="btn btn-box-tool btn-report-text" (click)="collapseReportText()">\n <i id="icon_reporttext" class="fa fa-minus"></i>\n </button>\n </div>\n </div>\n <div id="body_reporttext" class="box-body report-text div-report-text-scroll">\n <dl>\n <acr-assist-report-text [reportText]="resultText"></acr-assist-report-text>\n </dl>\n </div>\n </div>\n </ng-container>\n </div>\n <div class="padding-r-10 scroll" acrDynamicHeightDirective [simulatorElement]="simulatorResultsBlock">\n <form class="form-horizontal">\n <acr-assist-data-element [dataElements]="dataElements" [templatePartial]="template.templatePartial"\n [endPointXMLString]="template.endPointsString" [imagePath]="imagePath" [xmlContent]="template.xmlContent"\n (returnReportText)=\'recieveReportText($event)\' [inputValues]="inputValues" [isReset]="isReset"\n (returnDataElementChanged)=\'recivedOnDataElementChanged($event)\' (returnExecutionHistory)=\'recievedExecutionHistory($event)\'></acr-assist-data-element>\n </form>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div id="rightReportTextPosition" *ngIf="reportTextPosition === position.Right">\n <div class="col-sm-6 col-md-6 col-lg-6">\n <div id="div-simulator-block">\n <div class="box box-primary box-solid margin-b-0">\n <div *ngIf="resetButton == true" class="with-border text-right padding-5 padding-r-10">\n <button (click)="resetElements()" class="btn btn-xs btn-primary">Reset Values</button>\n </div>\n <div class="box-body">\n <div id="div-simulator-form" class="padding-r-10 div-simulator-form-height">\n <form class="form-horizontal">\n <acr-assist-data-element [dataElements]="dataElements" [templatePartial]="template.templatePartial"\n [endPointXMLString]="template.endPointsString" [imagePath]="imagePath" [xmlContent]="template.xmlContent"\n (returnReportText)=\'recieveReportText($event)\' [inputValues]="inputValues" [isReset]="isReset"\n (returnDataElementChanged)=\'recivedOnDataElementChanged($event)\' (returnExecutionHistory)=\'recievedExecutionHistory($event)\'></acr-assist-data-element>\n </form>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div class="col-sm-6 col-md-6 col-lg-6">\n <div #simulatorResultsBlock>\n <ng-container *ngIf="resultText !== undefined">\n <div class="box box-primary">\n <div class="box-header with-border">\n <h3 class="box-title">Report Text</h3>\n <div class="box-tools pull-right">\n <button type="button" class="btn btn-box-tool btn-report-text" (click)="collapseReportText()">\n <i id="icon_reporttext" class="fa fa-minus"></i>\n </button>\n </div>\n </div>\n <div id="body_reporttext" class="box-body report-text">\n <dl>\n <acr-assist-report-text [reportText]="resultText"></acr-assist-report-text>\n </dl>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n <div class="col-sm-6 col-md-6 col-lg-6">\n <ng-container *ngIf="showKeyDiagram === true">\n <div class="box box-primary margin-b-0">\n <div class="box-header with-border">\n <h3 class="box-title">Key Images</h3>\n <input #imageUpload id="diagramUpload" class="hidden" type="file" accept="image/*" multiple (change)="changeListener($event)">\n <label for="diagramUpload" class="btn btn-success bg-olive margin-10" title="Choose Diagrams">Choose a\n Diagram</label>\n <div class="pull-right padding-l-5">\n <button type="button" class="btn btn-box-tool" data-widget="collapse" (click)="collapseKeyDiagram()">\n <i id="icon_keydiagram" class="fa fa-minus"></i>\n </button>\n </div>\n <div class="pull-right padding-l-5">\n <button type="button" class="btn btn-zoom btn-sm" onclick="zoomIn()">\n <i class="fa fa-search-plus fa-lg"></i>\n </button>\n </div>\n <div class="pull-right padding-l-5">\n <button type="button" class="btn btn-zoom btn-sm" onclick="zoomOut()">\n <i class="fa fa-search-minus fa-lg"></i>\n </button>\n </div>\n <div [hidden]="!isInvalidFile" class="error-msg">Only image files are supported !!!</div>\n </div>\n <div id="body_keydiagram" class="box-body">\n <div id="carousel-example-generic" class="carousel slide scroll" data-interval="false" data-ride="carousel"\n acrDynamicHeightDirective [carouselElement]="simulatorResultsBlock">\n <div class="carousel-inner">\n <ng-container *ngFor="let diagram of keyDiagrams; let i = index">\n <div class="item zoom" [ngClass]="{\'active\': diagram.keyDiagram}">\n <drag-scroll>\n <img drag-scroll-item id="map_id_{{ i }}" class="img-responsive img-decissionTree" src="{{ diagram.location }}">\n </drag-scroll>\n </div>\n </ng-container>\n </div>\n <ng-container *ngIf="keyDiagrams && keyDiagrams.length > 1">\n <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">\n <span class="fa fa-angle-left slide-left"></span>\n </a>\n <a class="right carousel-control" href="#carousel-example-generic" data-slide="next">\n <span class="fa fa-angle-right slide-right"></span>\n </a>\n </ng-container>\n </div>\n </div>\n </div>\n </ng-container>\n </div>\n </div>\n</ng-container>',styles:["",".required-field{color:red}.padding-l-5{padding-left:5px}.whitespace{margin-left:5px}.max-w-h-100{max-width:100%;max-height:100%}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.carousel-control.left{background-repeat:repeat-x}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control.right{background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.scroll{overflow-y:scroll;overflow-x:hidden}.div-simulator-form-height{height:calc(100vh - 100px);overflow-y:scroll;overflow-x:hidden}.div-report-text-scroll{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 300px)}.padding-r-10{padding-right:10px}.slide-left{left:30px}.slide-right{right:30px}hr{margin-top:10px;margin-bottom:10px}.white-space-line{white-space:pre-line;word-wrap:break-word}p{margin:0 0 10px}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}h4.modal-title.float-left{float:left}.margin-b-0{margin-bottom:0}.font-weight-400{font-weight:400}.custom-radio-style{float:left;margin-right:15px}.zoom{width:100%;overflow:auto}.zoom img{height:auto;width:100%;min-width:100%;max-width:inherit!important}.btn-zoom{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-zoom.hover,.btn-zoom:active,.btn-zoom:hover{background-color:#e7e7e7}@media (min-width:768px){label.control-label{padding-left:20px}}.padding-5{padding:5px}"]}]}],e.ctorParameters=function(){return[{type:Y},{type:v}]},e.propDecorators={templateContent:[{type:a.Input}],imagePath:[{type:a.Input}],showKeyDiagram:[{type:a.Input}],reportTextPosition:[{type:a.Input}],inputValues:[{type:a.Input}],inputData:[{type:a.Input}],resetButton:[{type:a.Input}],returnExecutionHistory:[{type:a.Output}],returnDataElementChanged:[{type:a.Output}],returnDefaultElements:[{type:a.Output}],imageUpload:[{type:a.ViewChild,args:["imageUpload"]}]},e}(),ne=function(){this.coding=new Array},ie=function(){},ae=function(){},re=function(){},oe=function(){},le=function(){},se=function(){this.codingSystem=new ie,this.codingVersion=new ae,this.codingCode=new re,this.codingDisplay=new oe,this.codingUserSelected=new le},de=function(){function e(e){this.diagramService=e}return e.prototype.returnDiagram=function(e){var t=new I;return t.displaySequence=e.Attr.DisplaySequence,t.keyDiagram=!!e.Attr.IsKeyDiagram&&e.Attr.IsKeyDiagram,t.label=e.Label,t.location=e.Location,t},e.prototype.populateBasicData=function(e,t){if(t.dataElementType=this.elementType,t.displaySequence=e.Attr.DisplaySequence,t.id=e.Attr.Id,t.isRequired="true"===e.Attr.IsRequired,t.label=e.Label,t.hint=e.Hint,t.cdeId=e.Attr.CdeId,e.Diagrams&&(t.diagrams=this.diagramService.returnDiagrams(e.Diagrams.Diagram)),t.currentValue=undefined,t.defaultValue=undefined,t.isEditable="false"!==e.Attr.Editable,t.hasprefilled="true"===e.Attr.Hasprefilled,t.output="true"===e.Attr.Output,t.unit=e.Attr.Unit!==undefined?e.Attr.Unit:"",t.sourceFilled=e.Attr.SourceFilled,t.displaySequenceOverrider=e.Attr.DisplaySequence,t.isRequiredOverrider="true"===e.Attr.IsRequired,e.CodableConcept!==undefined&&(t.codableConcept=new ne,t.codableConcept.name=e.CodableConcept.Attr.Name,e.CodableConcept.Coding!==undefined&&0<e.CodableConcept.Coding.length))try{for(var n=F(e.CodableConcept.Coding),i=n.next();!i.done;i=n.next()){var a=i.value,r=new se;r.codingSystem.value=a.System.Attr.Value,r.codingVersion.value=a.Version.Attr.Value,r.codingCode.value=a.Code.Attr.Value,r.codingDisplay.value=a.Display.Attr.Value,r.codingUserSelected.value=a.UserSelected!==undefined?a.UserSelected.Attr.Value:null,t.codableConcept.coding.push(r)}}catch(s){o={error:s}}finally{try{i&&!i.done&&(l=n["return"])&&l.call(n)}finally{if(o)throw o.error}}var o,l},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T}]},e}(),ce=function(){this.isRequired=!0,this.isVisible=!0,this.isEditable=!0,this.hasprefilled=!1,this.output=!1,this.isRequiredOverrider=!0},ue=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.allowFreetext=!1,e}return y(e,t),e}(ce),me=function(){},pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t}(function(){}),he=function(){},fe=function(){},ye=function(){},ge=function(I){function e(e,t,n,i){var a=I.call(this,e)||this;return a.arrayCheckerService=t,a.conditionsCreationService=n,a.computedValueCreationService=i,a.elementType="ChoiceDataElement",a}return y(e,I),e.prototype.returnChoice=function(e){var t=new me;return t.label=e.Label,t.value=e.Value,t.hint=e.Hint,t.reportText=e.ReportText,t["default"]=!1,e.Attr&&e.Attr.IsDefault&&(t["default"]=e.Attr.IsDefault),t},e.prototype.returnArea=function(e){var t=new he;return t.choiceValue=e.Attr.ChoiceValue,t.coords=e.Attr.Coords,t.shape=e.Attr.Shape,t},e.prototype.createElement=function(e){var t=new ue;I.prototype.populateBasicData.call(this,e,t),t.allowFreetext=!!e.Attr.AllowFreetext&&e.Attr.AllowFreetext;var n,i=e.ChoiceInfo.Choice;if(i!==undefined)if(t.choiceInfo=new Array,this.arrayCheckerService.isArray(i))try{for(var a=F(i),r=a.next();!r.done;r=a.next()){var o,l=r.value;(o=this.returnChoice(l))["default"]&&(n=o.value),t.choiceInfo.push(o)}}catch(C){s={error:C}}finally{try{r&&!r.done&&(d=a["return"])&&d.call(a)}finally{if(s)throw s.error}}else(o=this.returnChoice(i))["default"]&&(n=o.value),t.choiceInfo.push(o);t.defaultValue=n,t.currentValue=n;var s,d,c,u,m,p,h=e.ImageMap;if(h!==undefined){t.imageMap=new pe,t.imageMap.location=h.Location;var f=h.Map.Area;if(f!==undefined)if(t.imageMap.map=new fe,t.imageMap.map.areas=new Array,this.arrayCheckerService.isArray(f))try{for(var y=F(f),g=y.next();!g.done;g=y.next()){var v=g.value;t.imageMap.map.areas.push(this.returnArea(v))}}catch(D){c={error:D}}finally{try{g&&!g.done&&(u=y["return"])&&u.call(y)}finally{if(c)throw c.error}}else t.imageMap.map.areas.push(this.returnArea(f))}if(e.ConditionalProperties!==undefined){e.ConditionalProperties;if(e.ConditionalProperties!==undefined)if(t.conditionalProperties=new Array,e.ConditionalProperties.ConditionalProperty instanceof Array)try{for(var x=F(e.ConditionalProperties.ConditionalProperty),b=x.next();!b.done;b=x.next()){var E=b.value;t.conditionalProperties.push(this.GetConditionalProperties(E))}}catch(w){m={error:w}}finally{try{b&&!b.done&&(p=x["return"])&&p.call(x)}finally{if(m)throw m.error}}else t.conditionalProperties.push(this.GetConditionalProperties(e.ConditionalProperties.ConditionalProperty))}return t},e.prototype.GetConditionalProperties=function(e){var t,n,i=new ye;if(i.condition=this.conditionsCreationService.returnCondition(e),this.conditionsCreationService.isComposite(e)&&(i.compositeCondition=this.conditionsCreationService.returnCompositeCondition(e)),i.isRelevant=e.IsRelevant,i.isRequired=e.IsRequired,i.DisplaySequence=e.DisplaySequence,e.ChoiceNotRelevant!==undefined){i.ChoiceNotRelevant=new Array;try{for(var a=F(e.ChoiceNotRelevant),r=a.next();!r.done;r=a.next()){var o=r.value;i.ChoiceNotRelevant.push(o.Attr.ChoiceValue)}}catch(l){t={error:l}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(t)throw t.error}}}return i},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T},{type:V},{type:$},{type:X}]},e}(de),ve=function(r){function e(e,t,n,i){var a=r.call(this,e,t,n,i)||this;return a.elementType="MultiChoiceDataElement",a}return y(e,r),e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T},{type:V},{type:$},{type:X}]},e}(ge),xe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t}(ce),be=function(s){function e(e,t,n){var i=s.call(this,e)||this;return i.conditionsCreationService=t,i.computedValueCreationService=n,i.elementType="NumericDataElement",i}return y(e,s),e.prototype.createElement=function(e){var t,n,i=new xe;if(s.prototype.populateBasicData.call(this,e,i),i.minimum=e.Minimum,i.maximum=e.Maximum,i.maximumOverrider=e.Maximum,i.minimumOverrider=e.Minimum,e.ConditionalProperties!==undefined){e.ConditionalProperties;if(e.ConditionalProperties!==undefined)if(i.conditionalProperties=new Array,e.ConditionalProperties.ConditionalProperty instanceof Array)try{for(var a=F(e.ConditionalProperties.ConditionalProperty),r=a.next();!r.done;r=a.next()){var o=r.value;i.conditionalProperties.push(this.GetConditionalProperties(o))}}catch(l){t={error:l}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(t)throw t.error}}else i.conditionalProperties.push(this.GetConditionalProperties(e.ConditionalProperties.ConditionalProperty))}return i},e.prototype.GetConditionalProperties=function(e){var t=new ye;return t.condition=this.conditionsCreationService.returnCondition(e),this.conditionsCreationService.isComposite(e)&&(t.compositeCondition=this.conditionsCreationService.returnCompositeCondition(e)),t.isRelevant=e.IsRelevant,t.isRequired=e.IsRequired,t.DisplaySequence=e.DisplaySequence,t.Minimum=e.Minimum,t.Maximum=e.Maximum,t},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T},{type:$},{type:X}]},e}(de),Ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t}(ce),Ce=function(s){function e(e,t,n){var i=s.call(this,e)||this;return i.conditionsCreationService=t,i.computedValueCreationService=n,i.elementType="IntegerDataElement",i}return y(e,s),e.prototype.createElement=function(e){var t,n,i=new Ee;if(s.prototype.populateBasicData.call(this,e,i),i.minimum=e.Minimum,i.maximum=e.Maximum,i.maximumOverrider=e.Maximum,i.minimumOverrider=e.Minimum,e.ConditionalProperties!==undefined){e.ConditionalProperties;if(e.ConditionalProperties!==undefined)if(i.conditionalProperties=new Array,e.ConditionalProperties.ConditionalProperty instanceof Array)try{for(var a=F(e.ConditionalProperties.ConditionalProperty),r=a.next();!r.done;r=a.next()){var o=r.value;i.conditionalProperties.push(this.GetConditionalProperties(o))}}catch(l){t={error:l}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(t)throw t.error}}else i.conditionalProperties.push(this.GetConditionalProperties(e.ConditionalProperties.ConditionalProperty))}return i},e.prototype.GetConditionalProperties=function(e){var t=new ye;return t.condition=this.conditionsCreationService.returnCondition(e),this.conditionsCreationService.isComposite(e)&&(t.compositeCondition=this.conditionsCreationService.returnCompositeCondition(e)),t.isRelevant=e.IsRelevant,t.isRequired=e.IsRequired,t.DisplaySequence=e.DisplaySequence,t.Minimum=e.Minimum,t.Maximum=e.Maximum,t},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T},{type:$},{type:X}]},e}(de),De=function(){this.dataElementLabel="",this.dataElementDisplayValue=""},we=function(){function e(){this.simulatorSource=new i.Subject,this.simulatorSource$=this.simulatorSource.asObservable()}return e.prototype.messageEmitter=function(e){this.simulatorSource.next(e)},e.decorators=[{type:a.Injectable}],e}(),Ie=(require("jquery"),function(){function e(e,t){this.simulatorEngineService=e,this.simulatorCommunicationService=t,this.Endpoints=[],this.returnReportText=new a.EventEmitter,this.returnExecutionHistory=new a.EventEmitter,this.returnDataElementChanged=new a.EventEmitter,this.inputValues=[],this.comparisonValues=[],this.selectedChoiceValues=[],this.executedResultIds=[],this.executedResultHistories=[]}return e.prototype.ngOnInit=function(){var s=this;this.simulatorEngineService.simulatorStateChanged.subscribe(function(e){s.simulatorState=e,s.dataElementValues=s.simulatorEngineService.getAllDataElementValues();var t,n,i=s.simulatorEngineService.evaluateDecisionAndConditionalProperty();try{for(var a=F(s.dataElements),r=a.next();!r.done;r=a.next()){var o=r.value;i&&0<i.length&&0<=i.indexOf(o.id)?o.isVisible=!1:o.isVisible=!0,s.dataElementValues[o.id]!==undefined&&o.currentValue!==s.dataElementValues[o.id]&&(o.currentValue=s.dataElementValues[o.id]),o.currentValue=o.currentValue!==undefined?o.currentValue:s.dataElementValues[o.id]}}catch(l){t={error:l}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(t)throw t.error}}s.dataElements=s.dataElements.filter(function(e){return null!=e.displaySequence}).sort(function(e,t){return e.displaySequence-t.displaySequence}),s.simulatorState.endPointId&&0<s.simulatorState.endPointId.length?s.generateReportText(s.simulatorState.endPointId):s.returnReportText.emit(undefined),s.simulatorCommunicationService.messageEmitter("")})},e.prototype.ngOnChanges=function(e){this.dataElements=this.dataElements.filter(function(e){return null!=e.displaySequence}).sort(function(e,t){return e.displaySequence-t.displaySequence}),this.executedResultIds=[]},e.prototype.choiceSelected=function(e){if(e!==undefined){if(e.receivedElement!==undefined&&e.selectedCondition!==undefined){this.selectedChoiceValues[e.receivedElement.elementId+"SelectedValue"]=e.receivedElement.selectedText,this.simulatorEngineService.addOrUpdateDataElement(e.receivedElement.elementId,e.receivedElement.selectedValue,e.receivedElement.selectedText);var t=[];t[e.selectedCondition.selectedCondition]=e.selectedCondition.selectedValue,this.executedResultIds[e.selectedCondition.selectedConditionId]=t,this.simulatorState.endPointId&&0<this.simulatorState.endPointId.length&&this.generateExecutionHistory(),this.afterDataElementChanged()}}else this.afterDataElementChanged()},e.prototype.numericSelected=function(e){if(e!==undefined){if(e.receivedElement!==undefined&&e.selectedCondition!==undefined){this.simulatorEngineService.addOrUpdateDataElement(e.receivedElement.elementId,e.receivedElement.selectedValue,e.receivedElement.selectedValue);var t=[];t[e.selectedCondition.selectedCondition]=e.selectedCondition.selectedValue,this.executedResultIds[e.selectedCondition.selectedConditionId]=t,this.simulatorState.endPointId&&0<this.simulatorState.endPointId.length&&this.generateExecutionHistory(),this.afterDataElementChanged()}}else this.afterDataElementChanged()},e.prototype.multiSelected=function(e){if(e!==undefined){if(e.receivedElement!==undefined&&e.selectedCondition!==undefined){this.comparisonValues[e.receivedElement.elementId+"ComparisonValue"]=e.receivedElement.selectedComparisonValues,this.simulatorEngineService.addOrUpdateDataElement(e.receivedElement.elementId,e.receivedElement.selectedComparisonValues,e.receivedElement.selectedValues);var t=[];t[e.selectedCondition.selectedCondition]=e.selectedCondition.selectedValue,this.executedResultIds[e.selectedCondition.selectedConditionId]=t,this.simulatorState.endPointId&&0<this.simulatorState.endPointId.length&&this.generateExecutionHistory(),this.afterDataElementChanged()}}else this.afterDataElementChanged()},e.prototype.generateReportText=function(e){var t=this.returnEndPointContents(this.xmlContent,'<EndPoint Id="'+e+'">',"</EndPoint>");this.parseXml(e,t)},e.prototype.afterDataElementChanged=function(){var e,t,a=[],n=function(n){if(n.isVisible&&"ComputedDataElement"!==n.dataElementType&&"GlobalValue"!==n.dataElementType){var i=new De;if(i.dataElementId=n.id,i.dataElementLabel=n.label,i.dataElementValue=n.currentValue,n.currentValue===undefined||""===n.currentValue)i.dataElementDisplayValue=undefined;else if("ChoiceDataElement"===n.dataElementType){var e=n.choiceInfo;i.dataElementDisplayValue=e.filter(function(e){return e.value===n.currentValue})[0].label}else if("MultiChoiceDataElement"===n.dataElementType){e=n.choiceInfo;i.dataElementDisplayValue=[],e.forEach(function(t){Array.isArray(n.currentValue)?n.currentValue.forEach(function(e){t.value===e&&i.dataElementDisplayValue.push(t.label)}):t.value===n.currentValue&&i.dataElementDisplayValue.push(t.label)})}else i.dataElementDisplayValue=n.currentValue;a.push(i)}};try{for(var i=F(this.dataElements),r=i.next();!r.done;r=i.next()){n(r.value)}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=i["return"])&&t.call(i)}finally{if(e)throw e.error}}this.returnDataElementChanged.emit(a)},e.prototype.generateExecutionHistory=function(){var e;for(var t in e=!(this.executedResultHistories=[]),this.executedResultIds){try{for(var n=F(this.simulatorState.nonRelevantDataElementIds),i=n.next();!i.done;i=n.next()){if(i.value===t){e=!0;break}e=!1}}catch(f){o={error:f}}finally{try{i&&!i.done&&(l=n["return"])&&l.call(n)}finally{if(o)throw o.error}}if(!e)for(var a in this.executedResultIds[t]){var r=new Me;r.resultCondition=a,r.resultValue=this.executedResultIds[t][a],this.executedResultHistories.push(r)}}var o,l,s,d,c=new Re;if(0<this.executedResultHistories.length){c.executionHistories=this.executedResultHistories,c.resultText=this.mainReportTextObj,c.inputData=[];try{for(var u=F(this.dataElements),m=u.next();!m.done;m=u.next()){var p=m.value;if(p.isVisible&&"ComputedDataElement"!==p.dataElementType&&"GlobalValue"!==p.dataElementType){var h=new De;h.dataElementId=p.id,h.dataElementValue=p.currentValue,c.inputData.push(h)}}}catch(y){s={error:y}}finally{try{m&&!m.done&&(d=u["return"])&&d.call(u)}finally{if(s)throw s.error}}}this.returnExecutionHistory.emit(c)},e.prototype.returnEndPointContents=function(e,t,n){for(var i,a=0;;){var r=e.indexOf(t,a),o=e.indexOf(n,a);if(!(0<=r&&0<=o))break;var l=o+n.length;i=e.substring(r,l),a=l+1}return i},e.prototype.parseToJson=function(e){var n;return(0,require("xml2js").parseString)(e,{explicitRoot:!1,explicitArray:!1,attrkey:"Attr"},function(e,t){n=t}),n},e.prototype.parseXml=function(e,t){var y,g,v,x,b,E,C,D,w,I,V,T,P,S,k,M,R,O,A=[];this.Endpoints;for(var n in v=this.simulatorEngineService.getAllDataElementValues(),V=this.templatePartial,T=this.comparisonValues,M=this.simulatorEngineService.getAllDataElementTexts(),w=x=!1,t=(t=t.replace(/\n/g," ")).replace(/\t/g," "),V)V[n]=V[n].replace(/\n/g," "),V[n]=V[n].replace(/\t/g," ");var i=S=P="",a=require("sax"),r=a.parser(!0,!0);function q(e){if(0===e.indexOf("{")&&1<e.indexOf("}")){var t=e.substr(e.indexOf("{")+1,e.indexOf("}")-1);q(v[t])}else R=e}r.onerror=function(e){r.resume()},r.ontext=function(e){E&&(C?y&&b&&b!==undefined&&x?S+=e:y&&!b&&C?S+=e:y&&D&&(S+=e):y&&b&&b!==undefined&&x?P+=e:y&&D&&w&&!g?P+=e:y&&!C&&(P+=e),O&&I&&y&&(i+=e))},r.onopentag=function(e){switch(e.name){case"Label":I=O=y=!1;break;case"ReportText":E&&(y=O=!0,k=e.attributes.SectionId,S="","findings"===e.attributes.SectionId&&E?C=!1:"impression"===e.attributes.SectionId&&E&&(C=!0)),g=!1;break;case"InsertPartial":E?(p=e.attributes.PartialId,l=C,(s=require("sax").parser(!0,!0)).onerror=function(e){},s.ontext=function(e){E&&(l?y&&b&&b!==undefined&&x?S+=e:y&&!b&&C?S+=e:y&&D&&(S+=e):y&&b&&b!==undefined&&x?P+=e:y&&!b&&C?P+=e:y&&D&&(P+=e))},s.onopentag=function(e){switch(e.name){case"Label":y=!1;break;case"EndPoint":C=y=""!==e.attributes.Id;break;case"InsertPartial":y=!1;break;case"ReportText":y=!0;break;case"TemplatePartial":if(x=b=!1,e.attributes.Id===p){D=y=E=!0;break}E=D=!1;break;case"SectionIfValueNot":if(E)if(Array.isArray(v[e.attributes.DataElementId]))try{for(var t=F(T[e.attributes.DataElementId+"ComparisonValue"]),n=t.next();!n.done;n=t.next()){var i=n.value;if(i!==e.attributes.ComparisonValue&&i!==undefined&&!g){x=y=!0;break}x=y=!1}}catch(u){l={error:u}}finally{try{n&&!n.done&&(s=t["return"])&&s.call(t)}finally{if(l)throw l.error}}else x=y=v[e.attributes.DataElementId]!==e.attributes.ComparisonValue&&"--Select--"!==v[e.attributes.DataElementId]&&v[e.attributes.DataElementId]!==undefined&&null!==v[e.attributes.DataElementId];b=!0;break;case"SectionIf":y=g=!!(v[e.attributes.DataElementId]!==undefined&&0<v[e.attributes.DataElementId].length&&(!b||b&&x)&&"Other, please specify…"!==M[e.attributes.DataElementId]);break;case"SectionIfValue":if(E)if(Array.isArray(v[e.attributes.DataElementId]))try{for(var a=F(T[e.attributes.DataElementId+"ComparisonValue"]),r=a.next();!r.done;r=a.next()){var i=r.value;if(i===e.attributes.ComparisonValue&&i!==undefined){g=!0,v[e.attributes.DataElementId]===undefined||g||"Other, please specify…"===M[e.attributes.DataElementId]||(P+=M[e.attributes.DataElementId]),y=!0;break}y=g=!1}}catch(m){d={error:m}}finally{try{r&&!r.done&&(c=a["return"])&&c.call(a)}finally{if(d)throw d.error}}else v[e.attributes.DataElementId]===e.attributes.ComparisonValue&&v[e.attributes.DataElementId]!==undefined?(g=!0,v[e.attributes.DataElementId]===undefined||g||"Other, please specify…"===M[e.attributes.DataElementId]||(P+=M[e.attributes.DataElementId]),y=!0):y=!1;break;case"InsertValue":if(E){var o=M[e.attributes.DataElementId];("findings"===e.attributes.Id||y)&&(C?(y=!0,v[e.attributes.DataElementId]!==undefined&&b&&x&&"Other, please specify…"!==M[e.attributes.DataElementId]?(M[e.attributes.DataElementId],undefined,S+=Array.isArray(o)?o.join(", "):o):v[e.attributes.DataElementId]===undefined||b||"Other, please specify…"===M[e.attributes.DataElementId]||(M[e.attributes.DataElementId]!==undefined?S+=Array.isArray(o)?o.join(", "):o:M[e.attributes.DataElementId]!==undefined&&"Other, please specify…"!==M[e.attributes.DataElementId]&&(S+=Array.isArray(o)?o.join(", "):o))):v[e.attributes.DataElementId]!==undefined&&b&&x&&"Other, please specify…"!==M[e.attributes.DataElementId]?M[e.attributes.DataElementId]!==undefined&&(P+=Array.isArray(o)?o.join(", "):o):v[e.attributes.DataElementId]===undefined||b||"Other, please specify…"===M[e.attributes.DataElementId]||M[e.attributes.DataElementId]!==undefined&&(P+=Array.isArray(o)?o.join(", "):o));break}}var l,s,d,c},s.onclosetag=function(e){switch(e){case"SectionIfValueNot":b=x=!1,g&&(y=!0);break;case"TemplatePartial":E=!(y=!(D=!0));break;case"InsertPartial":y=!0;break;case"SectionIf":g=!1}},s.onend=function(){var e=new ke;e.sectionId="findings",e.reportText=P,A[e.sectionId]=e},s.write(V).onend(),y=E=!0,w=!!O):y=!1,I=O=!1;break;case"SectionIfValueNot":if(E)if(Array.isArray(v[e.attributes.DataElementId]))try{for(var t=F(v[e.attributes.DataElementId]),n=t.next();!n.done;n=t.next()){if((r=n.value)!==e.attributes.ComparisonValue&&r!==undefined&&!g){x=y=!0;break}x=y=!1}}catch(h){d={error:h}}finally{try{n&&!n.done&&(c=t["return"])&&c.call(t)}finally{if(d)throw d.error}}else x=y=v[e.attributes.DataElementId]!==e.attributes.ComparisonValue&&"--Select--"!==v[e.attributes.DataElementId]&&v[e.attributes.DataElementId]!==undefined&&null!==v[e.attributes.DataElementId];I=!(b=!0);break;case"SectionIf":y=g=v[e.attributes.DataElementId]!==undefined&&0<v[e.attributes.DataElementId].length&&"Other, please specify…"!==M[e.attributes.DataElementId];break;case"SectionIfValue":if(E){if(E)if(Array.isArray(v[e.attributes.DataElementId]))try{for(var i=F(v[e.attributes.DataElementId]),a=i.next();!a.done;a=i.next()){var r;if((r=a.value)===e.attributes.ComparisonValue&&r!==undefined){g=!0,v[e.attributes.DataElementId]===undefined||g||"Other, please specify…"===M[e.attributes.DataElementId]||(P+=M[e.attributes.DataElementId]),y=!0;break}y=g=!1}}catch(f){u={error:f}}finally{try{a&&!a.done&&(m=i["return"])&&m.call(i)}finally{if(u)throw u.error}}else v[e.attributes.DataElementId]===e.attributes.ComparisonValue&&v[e.attributes.DataElementId]!==undefined?(g=!0,v[e.attributes.DataElementId]===undefined||g||"Other, please specify…"===M[e.attributes.DataElementId]||(P+=M[e.attributes.DataElementId]),y=!0):y=!1;break}I=!1;break;case"InsertValue":if(E){O=!1;var o=M[e.attributes.DataElementId];("findings"===e.attributes.Id||y)&&(v[e.attributes.DataElementId]!==undefined&&b&&x?C?M[e.attributes.DataElementId]!==undefined&&"Other, please specify…"!==M[e.attributes.DataElementId]?S+=Array.isArray(o)?o.join(", "):o:(q(v[e.attributes.DataElementId]),S+=Array.isArray(v[e.attributes.DataElementId])?v[e.attributes.DataElementId].join(", "):R):M[e.attributes.DataElementId]!==undefined&&"Other, please specify…"!==M[e.attributes.DataElementId]?P+=Array.isArray(o)?o.join(", "):o:(q(v[e.attributes.DataElementId]),P+=Array.isArray(v[e.attributes.DataElementId])?v[e.attributes.DataElementId].join(", "):R):v[e.attributes.DataElementId]===undefined||b||(C?M[e.attributes.DataElementId]!==undefined&&"Other, please specify…"!==M[e.attributes.DataElementId]?S+=Array.isArray(o)?o.join(", "):o:(q(v[e.attributes.DataElementId]),S+=Array.isArray(v[e.attributes.DataElementId])?v[e.attributes.DataElementId].join(", "):R):M[e.attributes.DataElementId]!==undefined&&"Other, please specify…"!==M[e.attributes.DataElementId]?P+=Array.isArray(o)?o.join(", "):o:(q(v[e.attributes.DataElementId]),P+=Array.isArray(v[e.attributes.DataElementId])?v[e.attributes.DataElementId].join(", "):R)),C&&(y=!0)),I=!1;break}}var p,l,s,d,c,u,m;D=E=!0},r.onclosetag=function(e){switch(e){case"SectionIfValueNot":b=x=!1,g&&(y=!0);break;case"TemplatePartial":E=y=D=!1;break;case"ReportText":var t;if(!w&&!C)(t=new ke).sectionId="findings",t.reportText=P,A[t.sectionId]=t;if(""!==S&&S!==undefined)(t=new ke).sectionId=k,t.reportText=S,A[t.sectionId]=t;w=!1;break;case"SectionIf":y=!(g=!1);break;case"InsertPartial":y=!0;break;case"InsertValue":(b&&x||!b)&&(y=!0);break;case"SectionIfValue":y=!0}},r.onend=function(){},r.write(t).onend(),this.mainReportTextObj=new Se,this.mainReportTextObj.reportTextMainContent=i,this.mainReportTextObj.allReportText=A,this.returnReportText.emit(this.mainReportTextObj)},e.decorators=[{type:a.Component,args:[{selector:"acr-assist-data-element",template:"<ng-container *ngFor=\"let DataElement of dataElements\"> \n <ng-container *ngIf=\"(DataElement.dataElementType == 'ChoiceDataElement'\n || DataElement.dataElementType == 'NumericDataElement'\n || DataElement.dataElementType == 'IntegerDataElement' \n || DataElement.dataElementType == 'MultiChoiceDataElement'\n || DataElement.dataElementType == 'DateTimeDataElement'\n || DataElement.dataElementType == 'DurationDataElement') \">\n <ng-container *ngIf=\"DataElement.isVisible\">\n <div id=\"div_{{DataElement.id}}\">\n <ng-container *ngIf=\"DataElement.dataElementType == 'ChoiceDataElement'\">\n <acr-assist-choice-element [choiceDataElement]='DataElement' [imagePath]='imagePath' (returnChoiceElement)='choiceSelected($event)'></acr-assist-choice-element>\n </ng-container>\n <ng-container *ngIf=\"DataElement.dataElementType == 'MultiChoiceDataElement'\">\n <acr-assist-multi-choice-element [multiChoiceElement]='DataElement' [imagePath]='imagePath' (returnMultiChoice)='multiSelected($event)'></acr-assist-multi-choice-element>\n </ng-container>\n <ng-container *ngIf=\"DataElement.dataElementType == 'NumericDataElement' || DataElement.dataElementType == 'IntegerDataElement'\">\n <acr-assist-numeric-element [numericDataElement]='DataElement' [imagePath]='imagePath' (returnNumericElement)='numericSelected($event)'></acr-assist-numeric-element>\n </ng-container>\n <ng-container *ngIf=\"DataElement.dataElementType == 'DateTimeDataElement'\">\n <acr-assist-date-time-element [dateTimeDataElement]='DataElement'></acr-assist-date-time-element>\n </ng-container>\n <ng-container *ngIf=\"DataElement.dataElementType == 'DurationDataElement'\">\n <acr-assist-duration-element [durationDataElement]='DataElement'></acr-assist-duration-element>\n </ng-container>\n </div>\n </ng-container>\n </ng-container>\n</ng-container>\n",styles:["",".required-field{color:red}.padding-l-5{padding-left:5px}.whitespace{margin-left:5px}.max-w-h-100{max-width:100%;max-height:100%}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.carousel-control.left{background-repeat:repeat-x}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control.right{background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.scroll{overflow-y:scroll;overflow-x:hidden}.div-simulator-form-height{height:calc(100vh - 100px);overflow-y:scroll;overflow-x:hidden}.div-report-text-scroll{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 300px)}.padding-r-10{padding-right:10px}.slide-left{left:30px}.slide-right{right:30px}hr{margin-top:10px;margin-bottom:10px}.white-space-line{white-space:pre-line;word-wrap:break-word}p{margin:0 0 10px}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}h4.modal-title.float-left{float:left}.margin-b-0{margin-bottom:0}.font-weight-400{font-weight:400}.custom-radio-style{float:left;margin-right:15px}.zoom{width:100%;overflow:auto}.zoom img{height:auto;width:100%;min-width:100%;max-width:inherit!important}.btn-zoom{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-zoom.hover,.btn-zoom:active,.btn-zoom:hover{background-color:#e7e7e7}@media (min-width:768px){label.control-label{padding-left:20px}}.padding-5{padding:5px}"]}]}],e.ctorParameters=function(){return[{type:v},{type:we}]},e.propDecorators={dataElements:[{type:a.Input}],imagePath:[{type:a.Input}],Endpoints:[{type:a.Input}],templatePartial:[{type:a.Input}],endPointXMLString:[{type:a.Input}],xmlContent:[{type:a.Input}],returnReportText:[{type:a.Output}],returnExecutionHistory:[{type:a.Output}],returnDataElementChanged:[{type:a.Output}],isReset:[{type:a.Input}],inputValues:[{type:a.Input}]},e}()),Ve=function(){},Te=function(){},Pe=function(){},Se=function(){},ke=function(){},Me=function(){},Re=function(){},Oe=function(){function e(e){this.isDataURL=/^\s*data:([a-z]+\/[a-z]+(;[a-z\-]+\=[a-z\-]+)?)?(;base64)?,[a-z0-9\!\$\&\'\,\(\)\*\+\,\;\=\-\.\_\~\:\@\/\?\%\s]*\s*$/i,this.activeSlideIndex=0,this.domSanitizer=e}return e.prototype.resetCarouselIndex=function(){this.activeSlideIndex=0},e.prototype.getImageDataUrl=function(e){return!!e.match(this.isDataURL)?e=e.replace("unsafe:",""):this.imagePath+"/"+e},e.decorators=[{type:a.Component,args:[{selector:"acr-hint-diagram",template:'<ng-container *ngIf="dataElement !== undefined">\n <button type="button" class="btn btn-default btn-xs" data-toggle="modal" attr.data-target="#{{\'diag_\'+dataElement.id}}"\n (click)="resetCarouselIndex()">\n <span class="glyphicon glyphicon-picture" aria-hidden="true" data-toggle="tooltip" data-placement="right" title="Hint Diagrams"></span>\n </button>\n <div class="modal inmodal fade" id="{{\'diag_\'+dataElement.id}}" tabindex="-1" role="dialog" aria-hidden="true">\n <div class="modal-dialog modal-lg">\n <div class="modal-content">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal">\n <span aria-hidden="true">×</span>\n <span class="sr-only">Close</span>\n </button>\n <h4 class="modal-title float-left">{{dataElement.label}}</h4>\n </div>\n <div class="modal-body">\n <ng-container>\n <carousel [(activeSlide)]="activeSlideIndex" interval="false">\n <ng-container *ngFor="let diag of dataElement.diagrams ">\n <slide>\n <img class="img-responsive max-w-h-100" [src]="domSanitizer.bypassSecurityTrustUrl(getImageDataUrl(diag.location))" alt="{{ diag.label }}">\n </slide>\n </ng-container>\n </carousel>\n </ng-container>\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n',styles:["",".required-field{color:red}.padding-l-5{padding-left:5px}.whitespace{margin-left:5px}.max-w-h-100{max-width:100%;max-height:100%}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.carousel-control.left{background-repeat:repeat-x}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control.right{background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.scroll{overflow-y:scroll;overflow-x:hidden}.div-simulator-form-height{height:calc(100vh - 100px);overflow-y:scroll;overflow-x:hidden}.div-report-text-scroll{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 300px)}.padding-r-10{padding-right:10px}.slide-left{left:30px}.slide-right{right:30px}hr{margin-top:10px;margin-bottom:10px}.white-space-line{white-space:pre-line;word-wrap:break-word}p{margin:0 0 10px}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}h4.modal-title.float-left{float:left}.margin-b-0{margin-bottom:0}.font-weight-400{font-weight:400}.custom-radio-style{float:left;margin-right:15px}.zoom{width:100%;overflow:auto}.zoom img{height:auto;width:100%;min-width:100%;max-width:inherit!important}.btn-zoom{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-zoom.hover,.btn-zoom:active,.btn-zoom:hover{background-color:#e7e7e7}@media (min-width:768px){label.control-label{padding-left:20px}}.padding-5{padding:5px}"]}]}],e.ctorParameters=function(){return[{type:r.DomSanitizer}]},e.propDecorators={dataElement:[{type:a.Input}],imagePath:[{type:a.Input}]},e}(),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t}(ce),qe=function(n){function e(e){var t=n.call(this,e)||this;return t.elementType="GlobalValue",t}return y(e,n),e.prototype.createElement=function(e){var t=new Ae;return t.id=e.Attr.Id,t.currentValue=e._,t.dataElementType="GlobalValue",t},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T}]},e}(de),Fe=function(){},Ne=function(){function e(e,t,n){var i=this;this.formBuilder=e,this.simulatorEngineService=t,this.returnNumericElement=new a.EventEmitter,this.subscription=n.simulatorSource$.subscribe(function(e){i.UpdateFormValidator()})}return e.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},e.prototype.ngOnInit=function(){this.createNumericElementForm()},e.prototype.ngOnChanges=function(e){},e.prototype.ngAfterViewInit=function(){this.numericDataElement.currentValue!==undefined&&0!==this.numericDataElement.currentValue?(this.simulatorEngineService.addOrUpdateDataElement(this.numericDataElement.id,this.numericDataElement.currentValue,this.numericDataElement.currentValue),this.numberValue=this.numericDataElement.currentValue,this.loadedNumericValue(this.numericDataElement.id,this.numericDataElement.currentValue,this.numericDataElement.label)):this.returnNumericElement.emit(undefined)},e.prototype.loadedNumericValue=function(e,t,n){var i=new Te;i.elementId=e,i.selectedValue=t,this.selectedCondition=new Fe,this.selectedCondition.selectedConditionId=e,this.selectedCondition.selectedCondition=n,this.selectedCondition.selectedValue=t,this.returnNumericElement.emit({receivedElement:i,selectedCondition:this.selectedCondition})},e.prototype.choiceSelected=function(e,t){var n=new Te;n.elementId=e.id,n.selectedValue=e.value,this.selectedCondition=new Fe,this.selectedCondition.selectedConditionId=e.id,this.selectedCondition.selectedCondition=t,this.selectedCondition.selectedValue=e.value,this.returnNumericElement.emit({receivedElement:n,selectedCondition:this.selectedCondition})},e.prototype.onlyIntegerKey=function(e){return 8===e.charCode||0===e.charCode?null:48<=e.charCode&&e.charCode<=57},e.prototype.createNumericElementForm=function(){this.numericElementForm=this.formBuilder.group({numericElement:["",o.Validators.compose([o.Validators.required,o.Validators.min(+this.numericDataElement.minimum),o.Validators.max(+this.numericDataElement.maximum)])]})},e.prototype.UpdateFormValidator=function(){this.numericElementForm.controls.numericElement.setValidators([o.Validators.compose([o.Validators.required,o.Validators.min(+this.numericDataElement.minimum),o.Validators.max(+this.numericDataElement.maximum)])]),this.numericElementForm.controls.numericElement.updateValueAndValidity()},e.decorators=[{type:a.Component,args:[{selector:"acr-assist-numeric-element",template:'<form [formGroup]="numericElementForm" novalidate>\n <div class="form-group">\n <div class="col-sm-5 text-right">\n <label class="control-label break-word">\n {{numericDataElement.label}}\n <span *ngIf="numericDataElement.unit != undefined && numericDataElement.unit != \'\'"> ({{numericDataElement.unit}})</span>\n </label>\n <ng-container *ngIf="numericDataElement.hint !== \'\' && numericDataElement.hint !== undefined">\n <i class="fa fa-info-circle text-primary whitespace" title="{{numericDataElement.hint}}"></i>\n </ng-container>\n <ng-container *ngIf="numericDataElement.diagrams != undefined ">\n <acr-hint-diagram [dataElement]="numericDataElement" [imagePath]="imagePath"></acr-hint-diagram>\n </ng-container>\n <ng-container *ngIf="this.numericDataElement.isRequired">\n <span *ngIf="numericElementForm.controls[\'numericElement\'].invalid">\n <span *ngIf="numericElementForm.controls[\'numericElement\'].errors.required" class="required-field" title="Required Field">\n *\n </span>\n </span>\n </ng-container>\n <span *ngIf="numericElementForm.controls[\'numericElement\'].invalid && numericElementForm.controls[\'numericElement\'].errors.min"\n class="required-field" title=" Minimum value is {{numericDataElement.minimum}}">\n *\n </span> \n <span *ngIf="numericElementForm.controls[\'numericElement\'].invalid && numericElementForm.controls[\'numericElement\'].errors.max"\n class="required-field" title=" Maximum value is {{numericDataElement.maximum}}">\n *\n </span>\n </div>\n <ng-container *ngIf="numericDataElement.dataElementType === \'NumericDataElement\'">\n <div class="col-sm-7">\n <input [attr.disabled]="numericDataElement.isEditable == false ? \'disabled\' : null" acrNumericOnly [(ngModel)]="numberValue" id="{{numericDataElement.id}}" type="text" class="form-control" formControlName="numericElement"\n onpaste="return false;" (input)="choiceSelected($event.target, numericDataElement.label)"\n min="{{numericDataElement.minimum}}" max="{{numericDataElement.maximum}}" required> \n </div>\n </ng-container>\n <ng-container *ngIf="numericDataElement.dataElementType === \'IntegerDataElement\'">\n <div class="col-sm-7">\n <input [attr.disabled]="numericDataElement.isEditable == false ? \'disabled\' : null" [(ngModel)]="numberValue" id="{{numericDataElement.id}}" type="text" class="form-control" formControlName="numericElement"\n (keypress)="onlyIntegerKey($event)" onpaste="return false;" (input)="choiceSelected($event.target, numericDataElement.label)"\n min="{{numericDataElement.minimum}}" max="{{numericDataElement.maximum}}" required>\n </div>\n </ng-container>\n </div>\n</form>\n',styles:["",".required-field{color:red}.padding-l-5{padding-left:5px}.whitespace{margin-left:5px}.max-w-h-100{max-width:100%;max-height:100%}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.carousel-control.left{background-repeat:repeat-x}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control.right{background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.scroll{overflow-y:scroll;overflow-x:hidden}.div-simulator-form-height{height:calc(100vh - 100px);overflow-y:scroll;overflow-x:hidden}.div-report-text-scroll{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 300px)}.padding-r-10{padding-right:10px}.slide-left{left:30px}.slide-right{right:30px}hr{margin-top:10px;margin-bottom:10px}.white-space-line{white-space:pre-line;word-wrap:break-word}p{margin:0 0 10px}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}h4.modal-title.float-left{float:left}.margin-b-0{margin-bottom:0}.font-weight-400{font-weight:400}.custom-radio-style{float:left;margin-right:15px}.zoom{width:100%;overflow:auto}.zoom img{height:auto;width:100%;min-width:100%;max-width:inherit!important}.btn-zoom{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-zoom.hover,.btn-zoom:active,.btn-zoom:hover{background-color:#e7e7e7}@media (min-width:768px){label.control-label{padding-left:20px}}.padding-5{padding:5px}"]}]}],e.ctorParameters=function(){return[{type:o.FormBuilder},{type:v},{type:we}]},e.propDecorators={numericDataElement:[{type:a.Input}],imagePath:[{type:a.Input}],returnNumericElement:[{type:a.Output}]},e}(),ze=require("jquery"),Ue=function(){function e(e,t){this.formBuilder=e,this.simulatorEngineService=t,this.returnChoiceElement=new a.EventEmitter,this.choiceChange=new a.EventEmitter}return e.prototype.ngOnInit=function(){this.createChoiceElementForm()},e.prototype.ngAfterViewInit=function(){if(ze("#div_"+this.choiceDataElement.id+"_other").hide(),this.choiceDataElement.currentValue!==undefined){for(var e in ze("#"+this.choiceDataElement.currentValue+"_"+this.choiceDataElement.id).prop("checked",!0),this.choiceValue=this.choiceDataElement.currentValue,this.choiceDataElement.choiceInfo)this.choiceDataElement.choiceInfo[e].value===this.choiceDataElement.currentValue&&(this.choiceDataElement.choiceInfo[e].reportText!==undefined?this.selectedChoiceReportText=this.choiceDataElement.choiceInfo[e].reportText:this.selectedChoiceReportLabel=this.choiceDataElement.choiceInfo[e].label);this.choiceDataElement.choiceInfo.length<=5?this.updateChoiceValue(this.choiceDataElement.id,this.choiceDataElement.label,this.selectedChoiceReportText!==undefined?this.selectedChoiceReportText:this.selectedChoiceReportLabel,this.choiceDataElement.currentValue):this.updateDropdownChoiceSelected(this.choiceDataElement.id,this.selectedChoiceReportLabel,this.choiceDataElement.currentValue,this.choiceDataElement.label)}else this.returnChoiceElement.emit(undefined)},e.prototype.updateChoiceValue=function(e,t,n,i){if(i!==undefined){var a=new Ve;a.elementId=e,a.selectedValue=i,a.selectedText=n,this.showOrHideFreeText(e,a.selectedValue),this.selectedCondition=new Fe,this.selectedCondition.selectedConditionId=e,this.selectedCondition.selectedCondition=t,this.selectedCondition.selectedValue=n,this.returnChoiceElement.emit({receivedElement:a,selectedCondition:this.selectedCondition})}},e.prototype.updateDropdownChoiceSelected=function(e,t,n,i){var a=new Ve;a.elementId=e,a.selectedValue=n,a.selectedText=t,"undefined"!==this.choiceValue&&"--Select--"!==this.choiceValue&&this.choiceValue!==undefined&&""!==this.choiceValue||(a.selectedText="",a.selectedValue=""),this.selectedCondition=new Fe,this.selectedCondition.selectedConditionId=e,this.selectedCondition.selectedCondition=i,this.selectedCondition.selectedValue=t,this.returnChoiceElement.emit({receivedElement:a,selectedCondition:this.selectedCondition})},e.prototype.choiceSelected=function(e,t,n,i){var a=new Ve;a.elementId=e,a.selectedValue=i,a.selectedText=n,this.showOrHideFreeText(e,a.selectedValue),this.selectedCondition=new Fe,this.selectedCondition.selectedConditionId=e,this.selectedCondition.selectedCondition=t,this.selectedCondition.selectedValue=n,this.returnChoiceElement.emit({receivedElement:a,selectedCondition:this.selectedCondition})},e.prototype.dropdownChoiceSelected=function(e,t){var n=new Ve;n.elementId=e.id,n.selectedValue="Other, please specify…"===e.options[e.selectedIndex].text?"freetext":e.value,n.selectedText=e.options[e.selectedIndex].text,this.showOrHideFreeText(e.id,n.selectedValue),"undefined"!==this.choiceValue&&"--Select--"!==this.choiceValue&&this.choiceValue!==undefined&&""!==this.choiceValue||(n.selectedText="",n.selectedValue=""),this.selectedCondition=new Fe,this.selectedCondition.selectedConditionId=e.id,this.selectedCondition.selectedCondition=t,this.selectedCondition.selectedValue=e.options[e.selectedIndex].text,this.returnChoiceElement.emit({receivedElement:n,selectedCondition:this.selectedCondition})},e.prototype.createChoiceElementForm=function(){this.choiceElementForm=this.formBuilder.group({checkBox:["",o.Validators.required]},{validator:this.specificValueInsideRange("checkBox")})},e.prototype.showOrHideFreeText=function(e,t){"freetext"===t?ze("#div_"+e+"_other").show():(ze("#div_"+e+"_other").hide(),ze("#txt_other_"+e).val(""))},e.prototype.updateFreeText=function(e,t,n){var i=new Ve;i.elementId=t,i.selectedValue="Other"===e.value?"freetext":e.value,i.selectedText=e.value,this.selectedCondition=new Fe,this.selectedCondition.selectedConditionId=t,this.selectedCondition.selectedCondition=n,this.selectedCondition.selectedValue=e.value,this.returnChoiceElement.emit({receivedElement:i,selectedCondition:this.selectedCondition})},e.prototype.specificValueInsideRange=function(n){var i=this;return function(e){var t=e.controls[n];return t.value===undefined||""===t.value||"--Select--"===t.value||""===i.choiceValue?t.setErrors({notEquivalent:!0}):t.setErrors(null)}},e.decorators=[{type:a.Component,args:[{selector:"acr-assist-choice-element",template:'<form [formGroup]="choiceElementForm" novalidate>\n <div class="form-group">\n <div class="col-sm-5 text-right">\n <label class="control-label break-word">\n {{choiceDataElement.label}} <span *ngIf="choiceDataElement.unit != undefined && choiceDataElement.unit != \'\'"> ({{choiceDataElement.unit}})</span>\n </label>\n <ng-container *ngIf="choiceDataElement.hint !== \'\' && choiceDataElement.hint !== undefined">\n <i class="whitespace">\n <span class="fa fa-info-circle text-primary" data-toggle="tooltip" data-placement="right" title="{{choiceDataElement.hint}}"></span>\n </i>\n </ng-container>\n <ng-container *ngIf="choiceDataElement.diagrams != undefined ">\n <acr-hint-diagram [dataElement]="choiceDataElement" [imagePath]="imagePath"></acr-hint-diagram>\n </ng-container>\n <span *ngIf="choiceElementForm.controls[\'checkBox\'].invalid && this.choiceDataElement.isRequired" class="required-field whitespace"\n title="Required Field">*</span>\n </div>\n \n <div class="col-sm-7 text-left content-padding">\n <ng-container *ngIf="choiceDataElement.choiceInfo.length <= 2">\n <ng-container *ngIf="imagePath != undefined">\n <ng-container *ngIf="choiceDataElement.imageMap == undefined">\n <ng-container *ngFor="let choice of choiceDataElement.choiceInfo">\n <div class="radio custom-radio-style">\n <label> \n <input [attr.disabled]="choiceDataElement.isEditable == false ? \'disabled\' : null" [(ngModel)]="choiceValue" id="{{choice.value}}_{{choiceDataElement.id}}" type="radio" formControlName="checkBox" value="{{choice.value}}"\n (change)="choiceSelected(choiceDataElement.id, choiceDataElement.label, (choice.reportText !== undefined) ? choice.reportText : choice.label, choice.value)"> {{choice.label}}\n </label>\n </div>\n </ng-container>\n <ng-container *ngIf="choiceDataElement.allowFreetext">\n <div class="radio custom-radio-style">\n <label>\n <input [attr.disabled]="choiceDataElement.isEditable == false ? \'disabled\' : null" id="other_{{choiceDataElement.id}}" type="radio" formControlName="checkBox" value="freetext" (change)="choiceSelected(choiceDataElement.id, choiceDataElement.label, \'Other\', \'freetext\')"> Other, please specify…</label>\n </div>\n <div id=\'div_{{choiceDataElement.id}}_other\'>\n <input [attr.disabled]="choiceDataElement.isEditable == false ? \'disabled\' : null" id="txt_other_{{choiceDataElement.id}}" class="form-control" type="text" formControlName="checkBox" value="other"\n class="form-control" (keyup)=\'updateFreeText($event.target, choiceDataElement.id, choiceDataElement.label)\'\n placeholder="Please specify \'{{choiceDataElement.label}}\'">\n </div>\n </ng-container>\n </ng-container>\n <ng-container *ngIf="choiceDataElement.imageMap != undefined">\n <div class="row">\n <div class="col-xs-6 col-sm-2">\n <ng-container *ngFor="let choice of choiceDataElement.choiceInfo">\n <div class="radio custom-radio-style">\n <label>\n <input [attr.disabled]="choiceDataElement.isEditable == false ? \'disabled\' : null" [(ngModel)]="choiceValue" id="{{choice.value}}_{{choiceDataElement.id}}" type="radio" formControlName="checkBox" value="{{choice.value}}"\n (change)="choiceSelected(choiceDataElement.id, choiceDataElement.label, (choice.reportText !== undefined) ? choice.reportText : choice.label, choice.value)"> {{choice.label}}\n </label>\n </div>\n </ng-container>\n <ng-container *ngIf="choiceDataElement.allowFreetext">\n <div class="radio custom-radio-style">\n <label>\n <input [attr.disabled]="choiceDataElement.isEditable == false ? \'disabled\' : null" id="other_{{choiceDataElement.id}}" type="radio" formControlName="checkBox" value="other" (change)="choiceSelected(choiceDataElement.id, choiceDataElement.label, \'Other\', \'freetext\')"> Other, please specify…</label>\n </div>\n <div id=\'div_{{choiceDataElement.id}}_other\'>\n <input [attr.disabled]="choiceDataElement.isEditable == false ? \'disabled\' : null" id="txt_other_{{choiceDataElement.id}}" class="form-control" type="text" formControlName="checkBox" value="other"\n class="form-control" (keyup)=\'updateFreeText($event.target, choiceDataElement.id, choiceDataElement.label)\'\n placeholder="Please specify \'{{choiceDataElement.label}}\'">\n </div>\n </ng-container>\n </div>\n <div class="col-xs-6 col-sm-2">\n <label class="control-label">OR</label>\n </div>\n <acr-image-map [DataElement]="choiceDataElement" [imagePath]="imagePath"></acr-image-map>\n </div>\n </ng-container>\n </ng-container>\n </ng-container>\n \n <ng-container *ngIf="choiceDataElement.choiceInfo.length > 2"> \n <select [attr.disabled]="choiceDataElement.isEditable == false ? \'disabled\' : null"\n [(ngModel)]="choiceValue" id="{{choiceDataElement.id}}" (change)="dropdownChoiceSelected($event.target, choiceDataElement.label)"\n formControlName="checkBox" class="form-control">\n \x3c!-- <option \n [selected]="choiceDataElement.currentValue == choiceDataElement.ChoiceNotRelevant ? true : false">--Select--</option>\n --\x3e\n <option [selected]="\n choiceDataElement.ChoiceNotRelevant != undefined ?\n (choiceDataElement.ChoiceNotRelevant.indexOf(choiceDataElement.currentValue) > -1 ? \n true :\n true)\n : true">--Select--</option>\n\n \x3c!-- [selected]="choice.value === choiceDataElement.currentValue" --\x3e\n\n \n <option *ngFor="let choice of choiceDataElement.choiceInfo"\n [hidden]="choiceDataElement.ChoiceNotRelevant != undefined ? \n choiceDataElement.ChoiceNotRelevant.indexOf(choice.value) > -1 ? true: null\n : null"\n [value]="choice.value" \n [selected]="choiceDataElement.ChoiceNotRelevant != undefined ?\n choiceDataElement.ChoiceNotRelevant.indexOf(choiceDataElement.currentValue) > -1\n || choiceDataElement.ChoiceNotRelevant.indexOf(choice.value) > -1? false : \n choice.value === choiceDataElement.currentValue ? true : false\n : choice.value === choiceDataElement.currentValue ? true : false" \n >{{choice.label}}</option>\n <option *ngIf="choiceDataElement.allowFreetext" [value]="\'freetext\'" [selected]="\'freetext\'">Other, please specify…</option>\n </select>\n <div id=\'div_{{choiceDataElement.id}}_other\'>\n\n <input id="txt_other_{{choiceDataElement.id}}" class="form-control" type="text" formControlName="checkBox" value="other"\n placeholder="Please specify \'{{choiceDataElement.label}}\'" (keyup)=\'updateFreeText($event.target, choiceDataElement.id, choiceDataElement.label)\'>\n </div>\n <ng-container *ngIf="choiceDataElement.imageMap != undefined && imagePath != undefined">\n <div class="row padding-top-10">\n <div class="col-xs-6 col-sm-2">\n <label class="control-label">OR</label>\n </div>\n <acr-image-map [DataElement]="choiceDataElement" [imagePath]="imagePath"></acr-image-map>\n </div>\n </ng-container>\n </ng-container>\n </div>\n </div>\n</form>\n\n',styles:["",".required-field{color:red}.padding-l-5{padding-left:5px}.whitespace{margin-left:5px}.max-w-h-100{max-width:100%;max-height:100%}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.carousel-control.left{background-repeat:repeat-x}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control.right{background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.scroll{overflow-y:scroll;overflow-x:hidden}.div-simulator-form-height{height:calc(100vh - 100px);overflow-y:scroll;overflow-x:hidden}.div-report-text-scroll{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 300px)}.padding-r-10{padding-right:10px}.slide-left{left:30px}.slide-right{right:30px}hr{margin-top:10px;margin-bottom:10px}.white-space-line{white-space:pre-line;word-wrap:break-word}p{margin:0 0 10px}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}h4.modal-title.float-left{float:left}.margin-b-0{margin-bottom:0}.font-weight-400{font-weight:400}.custom-radio-style{float:left;margin-right:15px}.zoom{width:100%;overflow:auto}.zoom img{height:auto;width:100%;min-width:100%;max-width:inherit!important}.btn-zoom{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-zoom.hover,.btn-zoom:active,.btn-zoom:hover{background-color:#e7e7e7}@media (min-width:768px){label.control-label{padding-left:20px}}.padding-5{padding:5px}"]}]}],e.ctorParameters=function(){return[{type:o.FormBuilder},{type:v}]},e.propDecorators={choiceDataElement:[{type:a.Input}],imagePath:[{type:a.Input}],returnChoiceElement:[{type:a.Output}],choiceChange:[{type:a.Output}],disabled:[{type:a.Input}]},e}(),_e=require("jquery"),Le=function(){function e(e,t){this.formBuilder=e,this.simulatorEngineService=t,this.returnMultiChoice=new a.EventEmitter,this.multiElements=[],this.multiChoiceValues=[],this.multiChoiceComaprisonValues=[],this.choiceValue=[]}return e.prototype.ngOnInit=function(){this.createMultiChoiceElementForm()},e.prototype.ngAfterViewInit=function(){if(this.multiChoiceElement.currentValue!==undefined){var e=[],t=[];for(var n in this.multiChoiceElement.choiceInfo)if(Array.isArray(this.multiChoiceElement.currentValue))try{for(var i=F(this.multiChoiceElement.currentValue),a=i.next();!a.done;a=i.next()){var r=a.value;if(r===this.multiChoiceElement.choiceInfo[n].value&&this.multiChoiceElement.choiceInfo[n].value!==undefined){this.choiceValue=this.multiChoiceElement.currentValue,_e("#"+this.multiChoiceElement.id+"_"+this.multiChoiceElement.choiceInfo[n].value).prop("checked",!0),e.push(r),t.push(this.multiChoiceElement.choiceInfo[n].label);break}}}catch(s){o={error:s}}finally{try{a&&!a.done&&(l=i["return"])&&l.call(i)}finally{if(o)throw o.error}}else this.multiChoiceElement.currentValue===this.multiChoiceElement.choiceInfo[n].value&&this.multiChoiceElement.choiceInfo[n].value!==undefined&&(this.choiceValue=this.multiChoiceElement.currentValue,_e("#"+this.multiChoiceElement.id+"_"+this.multiChoiceElement.currentValue).prop("checked",!0),e.push(this.multiChoiceElement.currentValue),t.push(this.multiChoiceElement.choiceInfo[n].label));this.selectedMultiChoice(this.multiChoiceElement.id,this.multiChoiceElement.label,e,t)}else this.returnMultiChoice.emit(undefined);var o,l},e.prototype.selectedMultiChoice=function(e,t,n,i){var a=new Pe;if(_e("#"+e+"_"+n).is(":checked"))this.multiChoiceValues=i,this.multiChoiceComaprisonValues=n;else{var r=this.multiChoiceValues.indexOf(i),o=this.multiChoiceComaprisonValues.indexOf(n);-1<r&&this.multiChoiceValues.splice(r,1),-1<o&&this.multiChoiceComaprisonValues.splice(o,1)}a.elementId=e,a.selectedValues=this.multiChoiceValues,a.selectedComparisonValues=this.multiChoiceComaprisonValues,this.selectedCondition=new Fe,this.selectedCondition.selectedConditionId=e,this.selectedCondition.selectedCondition=t,this.selectedCondition.selectedValue=this.multiChoiceValues,this.returnMultiChoice.emit({receivedElement:a,selectedCondition:this.selectedCondition})},e.prototype.updateMultiChoice=function(e,t,n,i){var a=new Pe;if(i.currentTarget.checked)this.multiChoiceValues.push(n),this.multiChoiceComaprisonValues.push(i.currentTarget.value);else{var r=this.multiChoiceValues.indexOf(n),o=this.multiChoiceComaprisonValues.indexOf(i.currentTarget.value);-1<r&&this.multiChoiceValues.splice(r,1),-1<o&&this.multiChoiceComaprisonValues.splice(o,1)}a.elementId=e,a.selectedValues=this.multiChoiceValues,a.selectedComparisonValues=this.multiChoiceComaprisonValues,this.selectedCondition=new Fe,this.selectedCondition.selectedConditionId=e,this.selectedCondition.selectedCondition=t,this.selectedCondition.selectedValue=this.multiChoiceValues,this.returnMultiChoice.emit({receivedElement:a,selectedCondition:this.selectedCondition})},e.prototype.createMultiChoiceElementForm=function(){this.multiChoiceElementForm=this.formBuilder.group({multiCheckBox:["",o.Validators.required]},{validator:this.specificValueInsideRange("multiCheckBox")})},e.prototype.specificValueInsideRange=function(n){var i=this;return function(e){var t=e.controls[n];return i.multiChoiceElement.isRequired?t.setErrors({notEquivalent:!0}):t.setErrors(null)}},e.decorators=[{type:a.Component,args:[{selector:"acr-assist-multi-choice-element",template:'<form [formGroup]="multiChoiceElementForm" novalidate>\n <div class="form-group">\n <div class="col-sm-5 text-right">\n <label class="control-label break-word">{{multiChoiceElement.label}} <span *ngIf="multiChoiceElement.unit != undefined && multiChoiceElement.unit != \'\'"> ({{multiChoiceElement.unit}})</span>\n </label>\n <ng-container *ngIf="multiChoiceElement.hint !== \'\' && multiChoiceElement.hint !== undefined">\n <i class="fa fa-info-circle text-primary whitespace" title="{{multiChoiceElement.hint}}"></i>\n </ng-container>\n <ng-container *ngIf="multiChoiceElement.diagrams != undefined ">\n <acr-hint-diagram [dataElement]="multiChoiceElement" [imagePath]="imagePath"></acr-hint-diagram>\n </ng-container>\n <ng-container *ngIf="multiChoiceElement.isRequired">\n <span *ngIf="multiChoiceElementForm.controls[\'multiCheckBox\'].invalid && !multiChoiceValues.length" class="required-field"\n title="Required Field">\n *\n </span>\n </ng-container>\n </div>\n <div class="col-sm-7" [ngClass]="multiChoiceElement.isEditable == false ? \'disabled-element\' : \'\'">\n <div *ngFor="let choice of multiChoiceElement.choiceInfo" class="checkbox checkboxCustomized" title="{{choice.hint}}">\n <label [hidden]="multiChoiceElement.ChoiceNotRelevant != undefined ? \n multiChoiceElement.ChoiceNotRelevant.indexOf(choice.value) > -1 ? true: null\n : null">\n <input type="checkbox" id="{{multiChoiceElement.id}}_{{choice.value}}" [checked]="false" formControlName="multiCheckBox"\n value="{{choice.value}}" (change)="updateMultiChoice(multiChoiceElement.id, multiChoiceElement.label, (choice.reportText !== undefined) ? choice.reportText : choice.label, $event)">\n {{choice.label}}\n </label>\n </div>\n </div>\n </div>\n</form>',styles:['.checkboxCustomized{min-height:0!important;padding-top:0!important}.disabled-element{cursor:not-allowed}.disabled-element:before{content:"";z-index:1;position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(255,255,255,.8)}',".required-field{color:red}.padding-l-5{padding-left:5px}.whitespace{margin-left:5px}.max-w-h-100{max-width:100%;max-height:100%}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.carousel-control.left{background-repeat:repeat-x}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control.right{background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.scroll{overflow-y:scroll;overflow-x:hidden}.div-simulator-form-height{height:calc(100vh - 100px);overflow-y:scroll;overflow-x:hidden}.div-report-text-scroll{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 300px)}.padding-r-10{padding-right:10px}.slide-left{left:30px}.slide-right{right:30px}hr{margin-top:10px;margin-bottom:10px}.white-space-line{white-space:pre-line;word-wrap:break-word}p{margin:0 0 10px}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}h4.modal-title.float-left{float:left}.margin-b-0{margin-bottom:0}.font-weight-400{font-weight:400}.custom-radio-style{float:left;margin-right:15px}.zoom{width:100%;overflow:auto}.zoom img{height:auto;width:100%;min-width:100%;max-width:inherit!important}.btn-zoom{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-zoom.hover,.btn-zoom:active,.btn-zoom:hover{background-color:#e7e7e7}@media (min-width:768px){label.control-label{padding-left:20px}}.padding-5{padding:5px}"]}]}],e.ctorParameters=function(){return[{type:o.FormBuilder},{type:v}]},e.propDecorators={multiChoiceElement:[{type:a.Input}],imagePath:[{type:a.Input}],returnMultiChoice:[{type:a.Output}]},e}(),He=function(){function e(e){this.$=require("jquery"),this.DataElements={},this.FormValues={},this.isDataURL=/^\s*data:([a-z]+\/[a-z]+(;[a-z\-]+\=[a-z\-]+)?)?(;base64)?,[a-z0-9\!\$\&\'\,\(\)\*\+\,\;\=\-\.\_\~\:\@\/\?\%\s]*\s*$/i,this.imageExist=!0,this.SelectionValue="",this.domSanitizer=e}return e.prototype.ngOnInit=function(){this.DataElement!==undefined&&this.displayValue("")},e.prototype.isInRectangle=function(e,t,n){var i=n.split(",");return i[0]<e&&i[0]+i[2]>e&&i[1]<t&&i[1]+i[3]>t},e.prototype.isInCircle=function(e,t,n){var i=n.split(",");return Math.sqrt(Math.pow(e-i[0],2)+Math.pow(t-i[1],2))<i[2]},e.prototype.isInPolygon=function(e,t,n){for(var i=n.split(","),a=[],r=0;r<i.length;r++){var o=[];o.push(i[r]),o.push(i[r+1]),r+=1,a.push(o)}for(var l=!1,s=(r=0,a.length-1);r<a.length;s=r++){var d=a[r][0],c=a[r][1],u=a[s][0],m=a[s][1];t<c!=t<m&&e<(u-d)*(t-c)/(m-c)+d&&(l=!l)}return l},e.prototype.imageClick=function(e,t){t.ImageProp.height,t.ImageProp.width;var n,i,a=this.$(e.target),r=(a.height(),a.width(),a.offset()),o=r.top-this.$(window).scrollTop(),l=r.left-this.$(window).scrollLeft(),s=e.clientX-l,d=e.clientY-o;try{for(var c=F(t.ImageOptions),u=c.next();!u.done;u=c.next()){var m=u.value;if("rect"===m.Shape){if(this.isInRectangle(s,d,m.Coordinates)){this.FormValues[t.ID]=m.Value;break}}else if("circle"===m.Shape){if(this.isInCircle(s,d,m.Coordinates)){this.FormValues[t.ID]=m.Value;break}}else if("poly"===m.Shape&&this.isInPolygon(s,d,m.Coordinates)){this.FormValues[t.ID]=m.Value;break}}}catch(p){n={error:p}}finally{try{u&&!u.done&&(i=c["return"])&&i.call(c)}finally{if(n)throw n.error}}},e.prototype.setValue=function(e){try{for(var t=F(this.DataElement.choiceInfo),n=t.next();!n.done;n=t.next()){var i=n.value;if(this.DataElement.choiceInfo.length<=5&&0<this.DataElement.choiceInfo.length)if(i.value===e)this.$("#"+e+"_"+this.DataElement.id).prop("checked",!0),(a=document.createEvent("Event")).initEvent("change",!0,!0),this.$("#"+e+"_"+this.DataElement.id)[0].dispatchEvent(a);else this.$("#"+i.value+"_"+this.DataElement.id).prop("checked",!1);else if(i.value===e){var a;this.$("#"+this.DataElement.id).val(i.value),(a=document.createEvent("Event")).initEvent("change",!0,!0),this.$("#"+this.DataElement.id)[0].dispatchEvent(a);break}}}catch(l){r={error:l}}finally{try{n&&!n.done&&(o=t["return"])&&o.call(t)}finally{if(r)throw r.error}}var r,o;this.DataElement.currentValue=e},e.prototype.displayValue=function(e){this.SelectionValue=""===e?"Image Map Diagram":"Selected Value : "+e},e.prototype.getImageDataUrl=function(e){return!!e.match(this.isDataURL)?e=e.replace("unsafe:",""):this.imagePath+"/"+e},e.decorators=[{type:a.Component,args:[{selector:"acr-image-map",template:'<div class="col-sm-8">\n <label class="control-label font-weight-400">Not sure? try out this image </label>\n <button type="button" class="btn btn-default" data-toggle="modal" attr.data-target="#{{\'imgMap_Modal_\'+DataElement.id}}">\n <span class="glyphicon glyphicon-picture" aria-hidden="true" data-toggle="tooltip" data-placement="top" title="Image Map"></span>\n </button>\n</div>\n<ng-container *ngIf="imagePath != undefined">\n <div class="modal inmodal fade" id="{{\'imgMap_Modal_\'+DataElement.id}}" tabindex="-1" role="dialog" aria-hidden="true">\n <div class="modal-dialog modal-lg">\n <div class="modal-content">\n <div class="modal-header">\n <button type="button" class="close" data-dismiss="modal">\n <span aria-hidden="true">×</span>\n <span class="sr-only">Close</span>\n </button>\n <h4 class="modal-title"> {{SelectionValue}}</h4>\n </div>\n <div class="modal-body">\n <div class="row">\n <div class="col-md-12">\n <ng-container *ngIf="imageExist == true">\n <img class="ImgOption danger img-responsive max-w-h-100" alt="{{ DataElement.imageMap.label }}" data-dismiss="modal" attr.id="{{\'imgMap_Img_\'+DataElement.id}}"\n (click)="imageClick($event,DataElement);" attr.data-elementID="{{DataElement.id}}" attr.usemap="#{{\'imgMap_\'+DataElement.id}}"\n [src]="domSanitizer.bypassSecurityTrustUrl(getImageDataUrl(DataElement.imageMap.location))">\n <map name="{{\'imgMap_\'+DataElement.id}}">\n <ng-container *ngFor="let imgOpt of DataElement.imageMap.map.areas">\n <area attr.shape="{{imgOpt.shape}}" attr.imgID="{{\'imgMap_Img_\'+DataElement.id}}" attr.coords="{{imgOpt.coords}}"\n attr.alt="{{imgOpt.choiceValue}}" (mouseover)=\'displayValue(imgOpt.choiceValue);\' (mouseout)=\'displayValue("");\'\n (click)="setValue(imgOpt.choiceValue);" data-dismiss="modal">\n </ng-container>\n </map>\n </ng-container>\n <ng-container *ngIf="imageExist == false">\n <div class="">\n No Image Map Available...\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n <div class="modal-footer">\n <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>\n </div>\n </div>\n </div>\n </div>\n</ng-container>\n',styles:["",".required-field{color:red}.padding-l-5{padding-left:5px}.whitespace{margin-left:5px}.max-w-h-100{max-width:100%;max-height:100%}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.carousel-control.left{background-repeat:repeat-x}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control.right{background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.scroll{overflow-y:scroll;overflow-x:hidden}.div-simulator-form-height{height:calc(100vh - 100px);overflow-y:scroll;overflow-x:hidden}.div-report-text-scroll{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 300px)}.padding-r-10{padding-right:10px}.slide-left{left:30px}.slide-right{right:30px}hr{margin-top:10px;margin-bottom:10px}.white-space-line{white-space:pre-line;word-wrap:break-word}p{margin:0 0 10px}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}h4.modal-title.float-left{float:left}.margin-b-0{margin-bottom:0}.font-weight-400{font-weight:400}.custom-radio-style{float:left;margin-right:15px}.zoom{width:100%;overflow:auto}.zoom img{height:auto;width:100%;min-width:100%;max-width:inherit!important}.btn-zoom{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-zoom.hover,.btn-zoom:active,.btn-zoom:hover{background-color:#e7e7e7}@media (min-width:768px){label.control-label{padding-left:20px}}.padding-5{padding:5px}"]}]}],e.ctorParameters=function(){return[{type:r.DomSanitizer}]},e.propDecorators={DataElement:[{type:a.Input}],DataElements:[{type:a.Input}],FormValues:[{type:a.Input}],imagePath:[{type:a.Input}]},e}(),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t}(ce),Be=function(r){function e(e,t,n,i){var a=r.call(this,e)||this;return a.arrayCheckerService=t,a.computedValueCreationService=n,a.decisionPointsCreationService=i,a.elementType="ComputedDataElement",a}return y(e,r),e.prototype.createElement=function(e){var t=new je;return r.prototype.populateBasicData.call(this,e,t),t.computeValue=this.computedValueCreationService.createComputedValue(e),e.DecisionPoint&&(t.decisionPoints=this.decisionPointsCreationService.createDecisionPoints(e.DecisionPoint)),t},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T},{type:V},{type:X},{type:K}]},e}(de),$e=(require("jquery"),function(){function e(){this.allReportTexts=[],this.sections=[],setInterval(function(){},1e3)}return e.prototype.ngOnChanges=function(e){this.mainReportTexts=new Se,this.onSelect(this.selectedSectionId)},e.prototype.onSelect=function(e){for(var t in this.selectedSectionId=e,this.sections=[],this.selectedSection=null,this.reportText.allReportText)""!==this.reportText.allReportText[t].reportText&&this.sections.push(t);if("undefined"===e||e===undefined||"All"===e){for(var t in this.allTextReport=[],this.reportText.allReportText)if(""!==this.reportText.allReportText[t].reportText){var n=new Z;n.heading=t,n.content=this.removeEmptyLine(this.reportText.allReportText[t].reportText),this.allTextReport.push(n)}this.selectedSectionId="All"}for(var t in this.reportText.allReportText)if(this.reportText.allReportText[t].sectionId===e){this.selectedSection=this.reportText.allReportText[t].reportText,this.selectedSection=this.reportText.reportTextMainContent+(this.selectedSection!==undefined&&""!==this.selectedSection?this.removeEmptyLine(this.selectedSection):"");break}for(var t in this.mainReportTexts=new Se,this.allReportTexts=[],this.reportText.allReportText){var i=new ke;i.reportText=this.removeEmptyLine(this.reportText.allReportText[t].reportText),i.sectionId=this.reportText.allReportText[t].sectionId,this.allReportTexts.push(i)}this.mainReportTexts.allReportText=this.allReportTexts,this.mainReportTexts.reportTextMainContent=this.reportText.reportTextMainContent},e.prototype.removeEmptyLine=function(e){if(0!==e.trim().length){var t=e.split("\n"),n=[];return t.forEach(function(e,t){0!==e.trim().length&&n.push(e)}),n.join("\n")}},e.decorators=[{type:a.Component,args:[{selector:"acr-assist-report-text",template:'<ng-container *ngFor="let textReport of allTextReport; let lastitem = last">\n <dt class="text-capitalize">{{textReport.heading}}</dt>\n <dd>\n <p class="white-space-line" [innerHTML]="textReport.content"></p>\n </dd>\n <hr *ngIf="!lastitem">\n</ng-container>\n',styles:["",".required-field{color:red}.padding-l-5{padding-left:5px}.whitespace{margin-left:5px}.max-w-h-100{max-width:100%;max-height:100%}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.carousel-control.left{background-repeat:repeat-x}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control.right{background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-repeat:repeat-x}.scroll{overflow-y:scroll;overflow-x:hidden}.div-simulator-form-height{height:calc(100vh - 100px);overflow-y:scroll;overflow-x:hidden}.div-report-text-scroll{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 300px)}.padding-r-10{padding-right:10px}.slide-left{left:30px}.slide-right{right:30px}hr{margin-top:10px;margin-bottom:10px}.white-space-line{white-space:pre-line;word-wrap:break-word}p{margin:0 0 10px}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}h4.modal-title.float-left{float:left}.margin-b-0{margin-bottom:0}.font-weight-400{font-weight:400}.custom-radio-style{float:left;margin-right:15px}.zoom{width:100%;overflow:auto}.zoom img{height:auto;width:100%;min-width:100%;max-width:inherit!important}.btn-zoom{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-zoom.hover,.btn-zoom:active,.btn-zoom:hover{background-color:#e7e7e7}@media (min-width:768px){label.control-label{padding-left:20px}}.padding-5{padding:5px}"]}]}],e.ctorParameters=function(){return[]},e.propDecorators={reportText:[{type:a.Input}]},e}()),Ge=function(){function e(e){this.dynamicElement=e}return e.prototype.ngAfterViewChecked=function(){this.dynamicElement!==undefined&&(this.simulatorElement!==undefined?this.setDynamicHeightForSimualtorDiv(this.simulatorElement):this.carouselElement!==undefined&&this.setDynamicHeightForCarouselDiv(this.carouselElement))},e.prototype.setDynamicHeightForSimualtorDiv=function(e){var t=e.offsetHeight;this.dynamicElement.nativeElement.style.height=window.innerHeight-100-t+"px"},e.prototype.setDynamicHeightForCarouselDiv=function(e){var t=e.offsetHeight;this.dynamicElement.nativeElement.style.height=window.innerHeight-200-t+"px"},e.decorators=[{type:a.Directive,args:[{selector:"[acrDynamicHeightDirective]"}]}],e.ctorParameters=function(){return[{type:a.ElementRef}]},e.propDecorators={simulatorElement:[{type:a.Input}],carouselElement:[{type:a.Input}]},e}(),Xe=function(){function e(e){this.el=e,this.regex=new RegExp(/^(?:[0-9]{0,3}(?:\.[0-9]{0,2})?)?$/),this.specialKeys=["Backspace","Tab","End","Home","ArrowLeft","ArrowRight"]}return e.prototype.onKeyDown=function(e){if(-1===this.specialKeys.indexOf(e.key)){var t=this.el.nativeElement.value.concat(e.key);t&&("."===t||100<+t||!String(t).match(this.regex))&&e.preventDefault()}},e.decorators=[{type:a.Directive,args:[{selector:"[acrNumericOnly]"}]}],e.ctorParameters=function(){return[{type:a.ElementRef}]},e.propDecorators={onKeyDown:[{type:a.HostListener,args:["keydown",["$event"]]}]},e}(),Ke=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t}(ce),Je=function(s){function e(e,t,n){var i=s.call(this,e)||this;return i.conditionsCreationService=t,i.computedValueCreationService=n,i.elementType="DateTimeDataElement",i}return y(e,s),e.prototype.createElement=function(e){var t,n,i=new Ke;if(s.prototype.populateBasicData.call(this,e,i),e.ConditionalProperties!==undefined){e.ConditionalProperties;if(e.ConditionalProperties!==undefined)if(i.conditionalProperties=new Array,e.ConditionalProperties.ConditionalProperty instanceof Array)try{for(var a=F(e.ConditionalProperties.ConditionalProperty),r=a.next();!r.done;r=a.next()){var o=r.value;i.conditionalProperties.push(this.GetConditionalProperties(o))}}catch(l){t={error:l}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(t)throw t.error}}else i.conditionalProperties.push(this.GetConditionalProperties(e.ConditionalProperties.ConditionalProperty))}return i},e.prototype.GetConditionalProperties=function(e){var t=new ye;return t.condition=this.conditionsCreationService.returnCondition(e),this.conditionsCreationService.isComposite(e)&&(t.compositeCondition=this.conditionsCreationService.returnCompositeCondition(e)),t.isRelevant=e.IsRelevant,t.isRequired=e.IsRequired,t.DisplaySequence=e.DisplaySequence,t},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T},{type:$},{type:X}]},e}(de),We=function(){function e(e,t){this.formBuilder=e,this.simulatorEngineService=t,this.date=new Date,this.settings={bigBanner:!0,format:"dd-MMM-yyyy hh:mm a",defaultOpen:!1,timePicker:!0,closeOnSelect:!0}}return e.prototype.ngOnInit=function(){this.createDateTimeElementForm()},e.prototype.onDateSelect=function(){},e.prototype.createDateTimeElementForm=function(){this.dateTimeElementForm=this.formBuilder.group({dateTimeElement:["",o.Validators.compose([o.Validators.required,o.Validators.min(0),o.Validators.max(1)])]})},e.decorators=[{type:a.Component,args:[{selector:"acr-assist-date-time-element",template:'<form [formGroup]="dateTimeElementForm" novalidate *ngIf="dateTimeDataElement.isVisible">\n <div class="form-group">\n <div class="col-sm-5 text-right">\n <label class="control-label break-word">\n \x3c!-- {{dateTimeDataElement | json}} --\x3e\n {{dateTimeDataElement.label}}\n <span *ngIf="dateTimeDataElement.unit != undefined && dateTimeDataElement.unit != \'\'"> ({{dateTimeDataElement.unit}})</span>\n </label>\n <ng-container *ngIf="dateTimeDataElement.hint !== \'\' && dateTimeDataElement.hint !== undefined">\n <i class="fa fa-info-circle text-primary whitespace" title="{{dateTimeDataElement.hint}}"></i>\n </ng-container>\n \x3c!-- <ng-container *ngIf="dateTimeDataElement.diagrams != undefined ">\n <acr-hint-diagram [dataElement]="dateTimeDataElement" [imagePath]="imagePath"></acr-hint-diagram>\n </ng-container> --\x3e\n <ng-container *ngIf="this.dateTimeDataElement.isRequired">\n <span *ngIf="dateTimeElementForm.controls[\'dateTimeElement\'].invalid">\n <span *ngIf="dateTimeElementForm.controls[\'dateTimeElement\'].errors.required" class="required-field" title="Required Field">\n *\n </span>\n </span>\n </ng-container>\n </div>\n <div class="col-sm-7"> \n <div [ngClass]="dateTimeDataElement.isEditable == false ? \'disabled-picker\' : \'\'">\n <angular2-date-picker formControlName="dateTimeElement" [(ngModel)]="date" [settings]="settings"></angular2-date-picker>\n </div> \n </div>\n </div>\n</form>\n',styles:['.dec-btn[_ngcontent-c13],.inc-btn[_ngcontent-c13],.ng-scope.wc-time-sec.wc-time-sec[_ngcontent-c13]{cursor:pointer}.wc-date-container[_ngcontent-c13],.wc-date-container[_ngcontent-c13]>span[_ngcontent-c13]{color:#000!important}.disabled-picker{cursor:not-allowed}.disabled-picker:before{content:"";z-index:1;position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(255,255,255,.8)}.required-field{color:red}']}]}],e.ctorParameters=function(){return[{type:o.FormBuilder},{type:v}]},e.propDecorators={dateTimeDataElement:[{type:a.Input}]},e}(),Ye=function(){function e(e,t,n){var i=this;this.formBuilder=e,this.simulatorEngineService=t,this.supportedUnits={millisecond:{label:"Millisecond",max:999,min:0,value:0,step:1},second:{label:"Second",max:59,min:0,value:0,step:1},minute:{label:"Minutes",max:59,min:0,value:0,step:1},hour:{label:"Hours",max:23,min:0,value:0,step:1},day:{label:"Days",max:7,min:0,value:0,step:1},week:{label:"Week",max:51,min:0,value:0,step:1}},this.daysvalue=0,this.hoursvalue=0,this.minutesvalue=0,this.DurationVal="PT0S",this.durationOptions={showNegative:!1,showPreview:!1,showYears:!1,showMonths:!1,showWeeks:!1,min:0},this.showdayminValidation=!1,this.showdaymaxValidation=!1,this.showminutemaxValidation=!1,this.showminuteminValidation=!1,this.showhourminValidation=!1,this.showhourmaxValidation=!1,this.subscription=n.simulatorSource$.subscribe(function(e){i.SetRangeValuesForDurationPicker(),i.UpdateFormValidator()})}return e.prototype.ngOnInit=function(){this.SetRangeValuesForDurationPicker(),this.createDurationElementForm(),this.onChanges()},e.prototype.ResetValidationVisibility=function(){this.showdayminValidation=!1,this.showdaymaxValidation=!1,this.showminutemaxValidation=!1,this.showminuteminValidation=!1,this.showhourminValidation=!1,this.showhourmaxValidation=!1},e.prototype.onChanges=function(){var t=this;this.durationElementForm.statusChanges.subscribe(function(e){t.ResetValidationVisibility(),t.durationElementForm.controls.durationdayselement.invalid&&t.durationElementForm.controls.durationdayselement.errors.max?t.showdaymaxValidation=!0:t.durationElementForm.controls.durationdayselement.invalid&&t.durationElementForm.controls.durationdayselement.errors.min?t.showdayminValidation=!0:t.durationElementForm.controls.durationminuteselement.invalid&&t.durationElementForm.controls.durationminuteselement.errors.min?t.showminuteminValidation=!0:t.durationElementForm.controls.durationminuteselement.invalid&&t.durationElementForm.controls.durationminuteselement.errors.max?t.showminutemaxValidation=!0:t.durationElementForm.controls.durationhourselement.invalid&&t.durationElementForm.controls.durationhourselement.errors.min?t.showhourminValidation=!0:t.durationElementForm.controls.durationhourselement.invalid&&t.durationElementForm.controls.durationhourselement.errors.max&&(t.showhourmaxValidation=!0)})},e.prototype.SetRangeValuesForDurationPicker=function(){var e=this.durationDataElement;this.supportedUnits.day.min=e.MinimumDay!==undefined&&null!=e.MinimumDay?e.MinimumDay:0,this.supportedUnits.hour.min=e.MinimumHours!==undefined&&null!=e.MinimumHours?e.MinimumHours:0,this.supportedUnits.minute.min=e.MinimumMinutes!==undefined&&null!=e.MinimumMinutes?e.MinimumMinutes:0,this.supportedUnits.day.max=e.MaximumDay!==undefined&&null!=e.MaximumDay?e.MaximumDay:9007199254740991,this.supportedUnits.hour.max=e.MaximumHours!==undefined&&null!=e.MaximumHours?e.MaximumHours:9007199254740991,this.supportedUnits.minute.max=e.MaxmimumMinutes!==undefined&&null!=e.MaxmimumMinutes?e.MaxmimumMinutes:9007199254740991},e.prototype.createDurationElementForm=function(){this.durationElementForm=this.formBuilder.group({durationdayselement:["",o.Validators.compose([o.Validators.required,o.Validators.min(+this.supportedUnits.day.min),o.Validators.max(+this.supportedUnits.day.max)])],durationminuteselement:["",o.Validators.compose([o.Validators.required,o.Validators.min(+this.supportedUnits.minute.min),o.Validators.max(+this.supportedUnits.minute.max)])],durationhourselement:["",o.Validators.compose([o.Validators.required,o.Validators.min(+this.supportedUnits.hour.min),o.Validators.max(+this.supportedUnits.hour.max)])]})},e.prototype.onlyInteger=function(e){return 8===e.charCode||0===e.charCode?null:48<=e.charCode&&e.charCode<=57},e.prototype.UpdateFormValidator=function(){this.durationElementForm.controls.durationdayselement.setValidators([o.Validators.compose([o.Validators.required,o.Validators.min(+this.supportedUnits.day.min),o.Validators.max(+this.supportedUnits.day.max)])]),this.durationElementForm.controls.durationdayselement.updateValueAndValidity(),this.durationElementForm.controls.durationminuteselement.setValidators([o.Validators.compose([o.Validators.required,o.Validators.min(+this.supportedUnits.minute.min),o.Validators.max(+this.supportedUnits.minute.max)])]),this.durationElementForm.controls.durationminuteselement.updateValueAndValidity(),this.durationElementForm.controls.durationhourselement.setValidators([o.Validators.compose([o.Validators.required,o.Validators.min(+this.supportedUnits.hour.min),o.Validators.max(+this.supportedUnits.hour.max)])]),this.durationElementForm.controls.durationhourselement.updateValueAndValidity()},e.prototype.increaseValue=function(e){var t=0;switch(e){case"days":(t=this.daysvalue===undefined||null==this.daysvalue?0:this.daysvalue)<this.supportedUnits.day.max&&(t+=this.supportedUnits.day.step),this.daysvalue=t;break;case"hour":(t=this.hoursvalue===undefined||null==this.hoursvalue?0:this.hoursvalue)<this.supportedUnits.hour.max&&(t+=this.supportedUnits.hour.step),this.hoursvalue=t;break;case"minute":(t=this.minutesvalue===undefined||null==this.minutesvalue?0:this.minutesvalue)<this.supportedUnits.minute.max&&(t+=this.supportedUnits.minute.step),this.minutesvalue=t}},e.prototype.decreaseValue=function(e){var t=0;switch(e){case"days":(t=this.daysvalue)>this.supportedUnits.day.min&&(t-=this.supportedUnits.day.step),this.daysvalue=t;break;case"hour":(t=this.hoursvalue)>this.supportedUnits.hour.min&&(t-=this.supportedUnits.hour.step),this.hoursvalue=t;break;case"minute":(t=this.minutesvalue)>this.supportedUnits.minute.min&&(t-=this.supportedUnits.minute.step),this.minutesvalue=t}},e.prototype.checkValue=function(e,t){var n=0;switch(t){case"days":(n=this.daysvalue)!==undefined&&null!=n||(n=0),this.daysvalue=n;break;case"hour":(n=this.hoursvalue)!==undefined&&null!=n||(n=0),this.hoursvalue=n;break;case"minute":(n=this.minutesvalue)!==undefined&&null!=n||(n=0),this.minutesvalue=n}},e.prototype.ngOnDestroy=function(){this.subscription.unsubscribe()},e.decorators=[{type:a.Component,args:[{selector:"acr-assist-duration-element",template:'<form [formGroup]="durationElementForm" novalidate>\n <div class="form-group">\n <div class="col-sm-5 text-right">\n <label class="control-label break-word">\n \x3c!-- {{dateTimeDataElement | json}} --\x3e\n {{durationDataElement.label}}\n <span *ngIf="durationDataElement.unit != undefined && durationDataElement.unit != \'\'">\n ({{durationDataElement.unit}})</span>\n </label>\n <ng-container *ngIf="durationDataElement.hint !== \'\' && durationDataElement.hint !== undefined">\n <i class="fa fa-info-circle text-primary whitespace" title="{{durationDataElement.hint}}"></i>\n </ng-container>\n \x3c!-- <ng-container *ngIf="durationDataElement.diagrams != undefined ">\n <acr-hint-diagram [dataElement]="durationDataElement" [imagePath]="imagePath"></acr-hint-diagram>\n </ng-container> --\x3e\n\n \x3c!-- <ng-container *ngIf="this.durationDataElement.isRequired"> \n <span *ngIf="DurationVal == \'PT0S\' || DurationVal == null" class="required-field" title="Duration field should be non zero">\n *\n </span>\n </ng-container> --\x3e\n <ng-container *ngIf="this.durationDataElement.isRequired\n && (!showdayminValidation && !showdaymaxValidation && !showminuteminValidation\n && !showminutemaxValidation && !showhourminValidation && !showhourmaxValidation)">\n <span *ngIf="durationElementForm.controls[\'durationdayselement\'].invalid\n || durationElementForm.controls[\'durationminuteselement\'].invalid\n || durationElementForm.controls[\'durationhourselement\'].invalid">\n <span *ngIf="durationElementForm.controls[\'durationdayselement\'].errors != null && durationElementForm.controls[\'durationdayselement\'].errors.required \n || durationElementForm.controls[\'durationminuteselement\'].errors != null && durationElementForm.controls[\'durationminuteselement\'].errors.required \n || durationElementForm.controls[\'durationhourselement\'].errors != null && durationElementForm.controls[\'durationhourselement\'].errors.required "\n class="required-field" title="Required Field">\n *\n </span>\n </span>\n </ng-container> \n\n <span *ngIf="showdayminValidation"\n class="required-field" title=" Minimum value for day is {{supportedUnits[\'day\'].min}}">\n *\n </span>\n \n <span *ngIf="showdaymaxValidation"\n class="required-field" title=" Maximum value for day is {{supportedUnits[\'day\'].max}}">\n *\n </span>\n\n <span *ngIf="showminuteminValidation"\n class="required-field" title=" Minimum value for minute is {{supportedUnits[\'minute\'].min}}">\n *\n </span>\n <span *ngIf="showminutemaxValidation"\n class="required-field" title=" Maximum value for minute is {{supportedUnits[\'minute\'].max}}">\n *\n </span>\n\n <span *ngIf="showhourminValidation"\n class="required-field" title=" Minimum value for hour is {{supportedUnits[\'hour\'].min}}">\n *\n </span>\n <span *ngIf="showhourmaxValidation"\n class="required-field" title=" Maximum value for hour is {{supportedUnits[\'hour\'].max}}">\n *\n </span>\n </div>\n\n <div class="col-sm-7" style="display:inline-flex">\n \x3c!-- <div [ngClass]="durationDataElement.isEditable == false ? \'disabled-picker\' : \'\'">\n <ngx-duration-picker min="0" formControlName="durationElement" [options]="durationOptions" [(value)]="DurationVal"></ngx-duration-picker>\n </div> --\x3e\n\n\n \x3c!-- <div class="form-group"> --\x3e\n <div [ngClass]="durationDataElement.isEditable == false ? \'disabled-picker\' : \'\'">\n <table>\n <tbody>\n \x3c!-- <tr class="text-center">\n <td>\n <button type="button" (click)="increaseValue(\'days\')" class="btn btn-link btn-decrementer">\n +\n </button>\n </td>\n </tr> --\x3e\n <tr class="text-center">\n <td class="input-group input-group-sm">\n <input tabindex="1" [attr.disabled]="durationDataElement.isEditable == false ? \'disabled\' : null"\n formControlName="durationdayselement" [(ngModel)]="daysvalue" class="form-control text-center txt-duration"\n (blur)="checkValue($event, \'days\')" type="number" min="{{supportedUnits[\'day\'].min}}" max="{{supportedUnits[\'day\'].max}}"\n (keypress)="onlyInteger($event)" onpaste="return false;" required />\n <span class="input-group-addon" style="padding: 5px;">{{supportedUnits[\'day\'].label}}</span>\n </td>\n </tr>\n \x3c!-- <tr class="text-center">\n <td>\n <button type="button" (click)="decreaseValue(\'days\')" class="btn btn-link btn-decrementer">\n -\n </button>\n </td>\n </tr> --\x3e\n </tbody>\n </table>\n </div>\n\n <table style="margin-left:10px;">\n <tbody>\n \x3c!-- <tr class="text-center">\n <td>\n <button type="button" (click)="increaseValue(\'hour\')" class="btn btn-link btn-incrementer">\n +\n </button>\n </td>\n </tr> --\x3e\n <tr class="text-center">\n <td class="input-group input-group-sm">\n <input tabindex="2" [attr.disabled]="durationDataElement.isEditable == false ? \'disabled\' : null"\n formControlName="durationhourselement" [(ngModel)]="hoursvalue" class="form-control text-center txt-duration"\n (blur)="checkValue($event,\'hour\')" type="number" min="{{supportedUnits[\'hour\'].min}}" max="{{supportedUnits[\'hour\'].max}}"\n (keypress)="onlyInteger($event)" onpaste="return false;" required />\n <span class="input-group-addon" style="padding: 5px;">{{supportedUnits[\'hour\'].label}}</span>\n </td>\n </tr>\n \x3c!-- <tr class="text-center">\n <td>\n <button type="button" (click)="decreaseValue(\'hour\')" class="btn btn-link btn-decrementer">\n -\n </button>\n </td>\n </tr> --\x3e\n </tbody>\n </table>\n\n <table style="margin-left:10px;">\n <tbody>\n \x3c!-- <tr class="text-center">\n <td>\n <button type="button" (click)="increaseValue(\'minute\')" class="btn btn-link btn-decrementer">\n +\n </button>\n </td>\n </tr> --\x3e\n <tr class="text-center">\n <td class="input-group input-group-sm">\n <input tabindex="3" [(ngModel)]="minutesvalue" formControlName="durationminuteselement" [attr.disabled]="durationDataElement.isEditable == false ? \'disabled\' : null"\n class="form-control text-center txt-duration" (blur)="checkValue($event, \'minute\')" type="number" min="{{supportedUnits[\'minute\'].min}}"\n max="{{supportedUnits[\'minute\'].max}}" (keypress)="onlyInteger($event)" onpaste="return false;" required />\n <span class="input-group-addon" style="padding: 5px;">{{supportedUnits[\'minute\'].label}}</span>\n </td>\n </tr>\n \x3c!-- <tr class="text-center">\n <td>\n <button type="button" (click)="decreaseValue(\'minute\')" class="btn btn-link btn-decrementer">\n -\n </button>\n </td>\n </tr> --\x3e\n </tbody>\n </table>\n\n \x3c!-- </div> --\x3e\n\n\n </div>\n </div>\n</form>',styles:['.required-field{color:red}.disabled-picker{cursor:not-allowed}.disabled-picker:before{content:"";z-index:1;position:absolute;top:0;right:0;bottom:0;left:0;background-color:rgba(255,255,255,.8)}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{text-align:center}.btn-decrementer,.btn-incrementer{text-decoration:none;outline:0}.txt-duration{width:42px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:0!important;outline-offset:-2px}']}]}],e.ctorParameters=function(){return[{type:o.FormBuilder},{type:v},{type:we}]},e.propDecorators={durationDataElement:[{type:a.Input}]},e}(),Ze=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return y(t,e),t}(ce),Qe=function(s){function e(e,t,n){var i=s.call(this,e)||this;return i.conditionsCreationService=t,i.computedValueCreationService=n,i.elementType="DurationDataElement",i}return y(e,s),e.prototype.createElement=function(e){var t,n,i=new Ze;if(s.prototype.populateBasicData.call(this,e,i),i.MinimumDay=e.MinimumDay,i.MaximumDay=e.MaximumDay,i.MinimumHours=e.MinimumHours,i.MaximumHours=e.MaximumHours,i.MinimumMinutes=e.MinimumMinutes,i.MaxmimumMinutes=e.MaxmimumMinutes,i.MinimumDayOverrider=e.MinimumDay,i.MaximumDayOverrider=e.MaximumDay,i.MinimumHoursOverrider=e.MinimumHours,i.MaximumHoursOverrider=e.MaximumHours,i.MinimumMinutesOverrider=e.MinimumMinutes,i.MaxmimumMinutesOverrider=e.MaxmimumMinutes,e.ConditionalProperties!==undefined){e.ConditionalProperties;if(e.ConditionalProperties!==undefined)if(i.conditionalProperties=new Array,e.ConditionalProperties.ConditionalProperty instanceof Array)try{for(var a=F(e.ConditionalProperties.ConditionalProperty),r=a.next();!r.done;r=a.next()){var o=r.value;i.conditionalProperties.push(this.GetConditionalProperties(o))}}catch(l){t={error:l}}finally{try{r&&!r.done&&(n=a["return"])&&n.call(a)}finally{if(t)throw t.error}}else i.conditionalProperties.push(this.GetConditionalProperties(e.ConditionalProperties.ConditionalProperty))}return i},e.prototype.GetConditionalProperties=function(e){var t=new ye;return t.condition=this.conditionsCreationService.returnCondition(e),this.conditionsCreationService.isComposite(e)&&(t.compositeCondition=this.conditionsCreationService.returnCompositeCondition(e)),t.isRelevant=e.IsRelevant,t.isRequired=e.IsRequired,t.DisplaySequence=e.DisplaySequence,t.MinimumDay=e.MinimumDay,t.MaximumDay=e.MaximumDay,t.MinimumHours=e.MinimumHours,t.MaximumHours=e.MaximumHours,t.MaxmimumMinutes=e.MaximumHours,t.MinimumMinutes=e.MinimumHours,t},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:T},{type:$},{type:X}]},e}(de),et=[te,Ie,Oe,l.SlideComponent,d.CarouselComponent,Ne,Ue,Le,He,$e,Ge,Xe,We,Ye],tt=function(){function e(){}return e.decorators=[{type:a.NgModule,args:[{imports:[n.CommonModule,C,o.FormsModule,o.ReactiveFormsModule,u.DragScrollModule,m.AngularDateTimePickerModule,p.DurationPickerModule],declarations:et,providers:[Y,T,c.CarouselConfig,V,$,K,X,v,we,{provide:P,useClass:ge,multi:!0},{provide:P,useClass:ve,multi:!0},{provide:P,useClass:be,multi:!0},{provide:P,useClass:Ce,multi:!0},{provide:P,useClass:qe,multi:!0},{provide:P,useClass:Be,multi:!0},{provide:P,useClass:Je,multi:!0},{provide:P,useClass:Qe,multi:!0}],exports:et}]}],e}(),nt=function(){function e(){this.items={},this.count=0}return e.prototype.ContainsKey=function(e){return this.items.hasOwnProperty(e)},e.prototype.Count=function(){return this.count},e.prototype.Add=function(e,t){this.items.hasOwnProperty(e)||this.count++,this.items[e]=t},e.prototype.Remove=function(e){var t=this.items[e];return delete this.items[e],this.count--,t},e.prototype.Item=function(e){return this.items[e]},e.prototype.Keys=function(){var e=[];for(var t in this.items)this.items.hasOwnProperty(t)&&e.push(t);return e},e.prototype.Values=function(){var e=[];for(var t in this.items)this.items.hasOwnProperty(t)&&e.push(this.items[t]);return e},e}(),it=function(){function e(e){this.http=e,this.defaultModule="assets/XMLFIles/hello_assist/Hello_Assist.xml",this.defaultTestModule="assets/XMLFIles/test_module/Test_Module.xml",this.XMLList=new nt}return e.prototype.getDefaultModulePath=function(){return this.http.get(this.defaultModule).map(function(e){return e.text()})},e.prototype.getDefaultTestModulePath=function(){return this.http.get(this.defaultTestModule).map(function(e){return e.text()})},e.decorators=[{type:a.Injectable}],e.ctorParameters=function(){return[{type:h.Http}]},e}(),at=require("jquery"),rt=function(){function e(e){this.onFileSelected=new a.EventEmitter,this.globalsService=e}return e.prototype.onFileContentRead=function(e){this.selectedXML=e,this.globalsService.XMLList.ContainsKey(e.fileLabel)&&this.globalsService.XMLList.Remove(e.fileLabel),this.globalsService.XMLList.Add(e.fileLabel,e),this.onFileSelected.emit(e)},e.prototype.onFileClick=function(e){this.selectedXML=e,this.onFileSelected.emit(e),at("#xmlOnlyMsg").hide()},e.decorators=[{type:a.Component,args:[{selector:"acr-view-upload-loader",template:'<ul class="sidebar-menu" data-widget="tree">\n <li class="header">Want to try your assist module?</li>\n <li class="text-center">\n <acr-file-upload-loader (onFileContentRead)="onFileContentRead($event)"></acr-file-upload-loader>\n </li>\n <li [ngClass]="{\'active\':(selectedXML.fileLabel === file.fileLabel)}" *ngFor="let file of globalsService.XMLList.Values().reverse()"\n class="treeview">\n <a href="#" (click)="onFileClick(file)">\n <i class="fa fa-book"></i>\n <span class="whitespace">{{file.fileLabel}}</span>\n </a>\n </li>\n</ul>\n',styles:[""]}]}],e.ctorParameters=function(){return[{type:it}]},e.propDecorators={onFileSelected:[{type:a.Output}]},e}(),ot=function(e,t,n){this.fileLabel=e,this.fileName=t,this.fileContents=n},lt=require("jquery"),st=function(){function e(e){this.configService=e,this.onFileContentRead=new a.EventEmitter,this.fileReader=new FileReader}return e.prototype.ngOnInit=function(){var e=this;this.hideMessage(),this.showTestModule(),setTimeout(function(){e.showDefaultModule()},100)},e.prototype.changeListener=function(e){var t;(t=e.target.value).includes(".xml")||t.includes(".Xml")||t.includes(".XML")||t.includes(".zip")||t.includes(".Zip")||t.includes(".ZIP")?(this.hideMessage(),this.readThis(e.target)):""!==t&&t!==undefined&<("#xmlOnlyMsg").show()},e.prototype.hideMessage=function(){lt("#xmlOnlyMsg").hide()},e.prototype.readThis=function(e){var t=this;this.readFile=e.files[0];var n=this,i=n.readFile.name.lastIndexOf(".");this.fileReader.onloadend=function(e){n.onFileContentRead.emit(new ot(n.readFile.name.substring(0,i),n.readFile.name,t.fileReader.result))},this.fileReader.readAsText(this.readFile)},e.prototype.showDefaultModule=function(){var t=this;this.configService.getDefaultModulePath().subscribe(function(e){t.onFileContentRead.emit(new ot("Hello Assist 2.0","Hello_Assist.xml",e))})},e.prototype.showTestModule=function(){var t=this;this.configService.getDefaultTestModulePath().subscribe(function(e){t.onFileContentRead.emit(new ot("Test Module","Test_Module.xml",e))})},e.decorators=[{type:a.Component,args:[{selector:"acr-file-upload-loader",template:'<input id="xmlFileUpload" class="hidden" type="file" accept=".xml" (change)="changeListener($event)" (click)="hideMessage()">\n<label for="xmlFileUpload" class="btn btn-success bg-olive margin-10" title="Choose a Module">Choose a Module</label>\n<br>\n<div id="xmlOnlyMsg" class="error-msg"> Only XML files are supported !!!</div>\n',styles:[""]}]}],e.ctorParameters=function(){return[{type:it}]},e.propDecorators={onFileContentRead:[{type:a.Output}]},e}(),dt=[st,rt],ct=function(){function e(){}return e.decorators=[{type:a.NgModule,args:[{imports:[n.CommonModule],declarations:[dt],providers:[it],exports:[dt]}]}],e}();e.AcrAssistSimulatorModule=tt,e.SimulatorLoaderModule=ct,e.ɵc=te,e.ɵp=Ue,e.ɵl=Ie,e.ɵv=We,e.ɵw=Ye,e.ɵq=Le,e.ɵo=Ne,e.ɵn=Oe,e.ɵr=He,e.ɵs=$e,e.ɵe=P,e.ɵt=Ge,e.ɵu=Xe,e.ɵg=V,e.ɵx=ge,e.ɵbc=Be,e.ɵk=X,e.ɵj=$,e.ɵh=de,e.ɵbd=Je,e.ɵi=K,e.ɵf=T,e.ɵbe=Qe,e.ɵbb=qe,e.ɵba=Ce,e.ɵy=ve,e.ɵz=be,e.ɵm=we,e.ɵd=Y,e.ɵa=C,e.ɵb=v,e.ɵbf=st,e.ɵbg=it,e.ɵbh=rt,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=acr-assist-simulator-module.umd.min.js.map