var __awaiter=this&&this.__awaiter||function(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,u){function a(e){try{l(r.next(e))}catch(t){u(t)}}function o(e){try{l(r["throw"](e))}catch(t){u(t)}}function l(e){e.done?n(e.value):i(e.value).then(a,o)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,i,u,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(e){return function(t){return l([e,t])}}function l(a){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,i&&(u=a[0]&2?i["return"]:a[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,a[1])).done)return u;if(i=0,u)a=[a[0]&2,u.value];switch(a[0]){case 0:case 1:u=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;i=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(u=n.trys,u=u.length>0&&u[u.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!u||a[1]>u[0]&&a[1]<u[3])){n.label=a[1];break}if(a[0]===6&&n.label<u[1]){n.label=u[1];u=a;break}if(u&&n.label<u[2]){n.label=u[2];n.ops.push(a);break}if(u[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(o){a=[6,o];i=0}finally{r=u=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-e07174c9.system.js"],(function(e){"use strict";var t,n,r;return{setters:[function(e){t=e.r;n=e.h;r=e.g}],execute:function(){var i=e("bce_element_input",function(){function e(e){var n=this;t(this,e);this.handleInput=function(e){e.cancelBubble=true;var t=e.target;n.value=t.value||"";n.el.dispatchEvent(new Event("input",{bubbles:true}))}}e.prototype.validate=function(e){if(e===void 0){e=false}return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(n){t=this.el.shadowRoot.querySelector("bce-input");return[2,t.validate(e)]}))}))};e.prototype.render=function(){var e=this.template.multiline?"textarea":"text";var t=[this.template.min&&"min:"+this.template.min,this.template.max&&"max:"+this.template.max,this.template.required?"required":null].filter((function(e){return!!e})).join("|");return[n("p",null,this.handler.t("question")),n("bce-input",{value:this.value,onInput:this.handleInput,validation:t,type:e})]};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:true,configurable:true});Object.defineProperty(e,"style",{get:function(){return":host p{font-weight:500;text-align:center}\@media screen and (min-width: 1024px){:host p{text-align:left}}"},enumerable:true,configurable:true});return e}())}}}));