var __awaiter=this&&this.__awaiter||function(i,t,n,o){function e(i){return i instanceof n?i:new n((function(t){t(i)}))}return new(n||(n=Promise))((function(n,r){function a(i){try{s(o.next(i))}catch(i){r(i)}}function l(i){try{s(o["throw"](i))}catch(i){r(i)}}function s(i){i.done?n(i.value):e(i.value).then(a,l)}s((o=o.apply(i,t||[])).next())}))};var __generator=this&&this.__generator||function(i,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,e,r,a;return a={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function l(i){return function(t){return s([i,t])}}function s(l){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,l[0]&&(n=0)),n)try{if(o=1,e&&(r=l[0]&2?e["return"]:l[0]?e["throw"]||((r=e["return"])&&r.call(e),0):e.next)&&!(r=r.call(e,l[1])).done)return r;if(e=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:n.label++;return{value:l[1],done:false};case 5:n.label++;e=l[1];l=[0];continue;case 7:l=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]0};i.prototype.renderHintText=function(){var i=this,t=i.helperText,n=i.errorText,o=i.helperTextId,r=i.errorTextId;return[e("div",{id:o,class:"helper-text"},t),e("div",{id:r,class:"error-text"},n)]};i.prototype.getHintTextID=function(){var i=this,t=i.el,n=i.helperText,o=i.errorText,e=i.helperTextId,r=i.errorTextId;if(t.classList.contains("ion-touched")&&t.classList.contains("ion-invalid")&&o){return r}if(n){return e}return undefined};i.prototype.renderCounter=function(){var i=this,t=i.counter,n=i.maxlength,o=i.counterFormatter,r=i.value;if(t!==true||n===undefined){return}return e("div",{class:"counter"},h(r,n,o))};i.prototype.renderBottomContent=function(){var i=this,t=i.counter,n=i.helperText,o=i.errorText,r=i.maxlength;var a=!!n||!!o;var l=t===true&&r!==undefined;if(!a&&!l){return}return e("div",{class:"input-bottom"},this.renderHintText(),this.renderCounter())};i.prototype.renderLabel=function(){var i=this.label;return e("div",{class:{"label-text-wrapper":true,"label-text-wrapper-hidden":!this.hasLabel}},i===undefined?e("slot",{name:"label"}):e("div",{class:"label-text"},i))};Object.defineProperty(i.prototype,"labelSlot",{get:function(){return this.el.querySelector('[slot="label"]')},enumerable:false,configurable:true});Object.defineProperty(i.prototype,"hasLabel",{get:function(){return this.label!==undefined||this.labelSlot!==null},enumerable:false,configurable:true});i.prototype.renderLabelContainer=function(){var i=this;var t=v(this);var n=t==="md"&&this.fill==="outline";if(n){return[e("div",{class:"input-outline-container"},e("div",{class:"input-outline-start"}),e("div",{class:{"input-outline-notch":true,"input-outline-notch-hidden":!this.hasLabel}},e("div",{class:"notch-spacer","aria-hidden":"true",ref:function(t){return i.notchSpacerEl=t}},this.label)),e("div",{class:"input-outline-end"})),this.renderLabel()]}return this.renderLabel()};i.prototype.render=function(){var i;var t=this;var n=this,o=n.disabled,a=n.fill,l=n.readonly,s=n.shape,p=n.inputId,c=n.labelPlacement,d=n.el,u=n.hasFocus,h=n.clearInputIcon;var x=v(this);var w=this.getValue();var y=m("ion-item",this.el);var k=x==="md"&&a!=="outline"&&!y;var z=x==="ios"?f:g;var j=h!==null&&h!==void 0?h:z;var C=this.hasValue();var _=d.querySelector('[slot="start"], [slot="end"]')!==null;var O=c==="stacked"||c==="floating"&&(C||u||_);return e(r,{key:"41b2526627e7d2773a80f011b123284203a71ca0",class:b(this.color,(i={},i[x]=true,i["has-value"]=C,i["has-focus"]=u,i["label-floating"]=O,i["input-fill-".concat(a)]=a!==undefined,i["input-shape-".concat(s)]=s!==undefined,i["input-label-placement-".concat(c)]=true,i["in-item"]=y,i["in-item-color"]=m("ion-item.ion-color",this.el),i["input-disabled"]=o,i))},e("label",{key:"9ab078363e32528102b441ad1791d83f86fdcbdc",class:"input-wrapper",htmlFor:p,onClick:this.onLabelClick},this.renderLabelContainer(),e("div",{key:"e34b594980ec62e4c618e827fadf7669a39ad0d8",class:"native-wrapper",onClick:this.onLabelClick},e("slot",{key:"12dc04ead5502e9e5736240e918bf9331bf7b5d9",name:"start"}),e("input",Object.assign({key:"df356eb4ced23109b2c0242f36dc043aba8782d6",class:"native-input",ref:function(i){return t.nativeInput=i},id:p,disabled:o,autoCapitalize:this.autocapitalize,autoComplete:this.autocomplete,autoCorrect:this.autocorrect,autoFocus:this.autofocus,enterKeyHint:this.enterkeyhint,inputMode:this.inputmode,min:this.min,max:this.max,minLength:this.minlength,maxLength:this.maxlength,multiple:this.multiple,name:this.name,pattern:this.pattern,placeholder:this.placeholder||"",readOnly:l,required:this.required,spellcheck:this.spellcheck,step:this.step,type:this.type,value:w,onInput:this.onInput,onChange:this.onChange,onBlur:this.onBlur,onFocus:this.onFocus,onKeyDown:this.onKeydown,onCompositionstart:this.onCompositionStart,onCompositionend:this.onCompositionEnd,"aria-describedby":this.getHintTextID(),"aria-invalid":this.getHintTextID()===this.errorTextId},this.inheritedAttributes)),this.clearInput&&!l&&!o&&e("button",{key:"aa7cb47ac287140a68c5cb0ee9359abaa611e21b","aria-label":"reset",type:"button",class:"input-clear-icon",onPointerDown:function(i){i.preventDefault()},onFocusin:function(i){i.stopPropagation()},onClick:this.clearTextInput},e("ion-icon",{key:"cd03e46b97299d9db5cedf81944ae9bbe72bacdc","aria-hidden":"true",icon:j})),e("slot",{key:"de36b79a89c4b413beba22e8a74c53dbf57a84ab",name:"end"})),k&&e("div",{key:"f088509073845bf767ea7ccfde1e917e1cf93cc1",class:"input-highlight"})),this.renderBottomContent())};Object.defineProperty(i.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(i,"watchers",{get:function(){return{debounce:["debounceChanged"],type:["onTypeChange"],value:["valueChanged"],dir:["onDirChanged"]}},enumerable:false,configurable:true});return i}());var j=0;z.style={ios:w,md:k}}}}));