{"version":3,"file":"Textfield-BUSvfy5v.js","sources":["../../../node_modules/@material/textfield/constants.js","../../../node_modules/@material/textfield/foundation.js","../../../node_modules/@smui/textfield/dist/HelperLine.js","../../../node_modules/@smui/textfield/dist/Prefix.js","../../../node_modules/@smui/textfield/dist/Suffix.js","../../../node_modules/@smui/textfield/dist/Input.svelte","../../../node_modules/@smui/textfield/dist/Textarea.svelte","../../../node_modules/@smui/textfield/dist/Textfield.svelte"],"sourcesContent":["/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nvar strings = {\n ARIA_CONTROLS: 'aria-controls',\n ARIA_DESCRIBEDBY: 'aria-describedby',\n INPUT_SELECTOR: '.mdc-text-field__input',\n LABEL_SELECTOR: '.mdc-floating-label',\n LEADING_ICON_SELECTOR: '.mdc-text-field__icon--leading',\n LINE_RIPPLE_SELECTOR: '.mdc-line-ripple',\n OUTLINE_SELECTOR: '.mdc-notched-outline',\n PREFIX_SELECTOR: '.mdc-text-field__affix--prefix',\n SUFFIX_SELECTOR: '.mdc-text-field__affix--suffix',\n TRAILING_ICON_SELECTOR: '.mdc-text-field__icon--trailing'\n};\nvar cssClasses = {\n DISABLED: 'mdc-text-field--disabled',\n FOCUSED: 'mdc-text-field--focused',\n HELPER_LINE: 'mdc-text-field-helper-line',\n INVALID: 'mdc-text-field--invalid',\n LABEL_FLOATING: 'mdc-text-field--label-floating',\n NO_LABEL: 'mdc-text-field--no-label',\n OUTLINED: 'mdc-text-field--outlined',\n ROOT: 'mdc-text-field',\n TEXTAREA: 'mdc-text-field--textarea',\n WITH_LEADING_ICON: 'mdc-text-field--with-leading-icon',\n WITH_TRAILING_ICON: 'mdc-text-field--with-trailing-icon',\n WITH_INTERNAL_COUNTER: 'mdc-text-field--with-internal-counter',\n};\nvar numbers = {\n LABEL_SCALE: 0.75,\n};\n/**\n * Whitelist based off of\n * https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Constraint_validation\n * under the \"Validation-related attributes\" section.\n */\nvar VALIDATION_ATTR_WHITELIST = [\n 'pattern',\n 'min',\n 'max',\n 'required',\n 'step',\n 'minlength',\n 'maxlength',\n];\n/**\n * Label should always float for these types as they show some UI even if value\n * is empty.\n */\nvar ALWAYS_FLOAT_TYPES = [\n 'color',\n 'date',\n 'datetime-local',\n 'month',\n 'range',\n 'time',\n 'week',\n];\nexport { cssClasses, strings, numbers, VALIDATION_ATTR_WHITELIST, ALWAYS_FLOAT_TYPES };\n//# sourceMappingURL=constants.js.map","/**\n * @license\n * Copyright 2016 Google Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\nimport { __assign, __extends, __values } from \"tslib\";\nimport { MDCFoundation } from '@material/base/foundation';\nimport { ALWAYS_FLOAT_TYPES, cssClasses, numbers, strings, VALIDATION_ATTR_WHITELIST } from './constants';\nvar POINTERDOWN_EVENTS = ['mousedown', 'touchstart'];\nvar INTERACTION_EVENTS = ['click', 'keydown'];\nvar MDCTextFieldFoundation = /** @class */ (function (_super) {\n __extends(MDCTextFieldFoundation, _super);\n /**\n * @param adapter\n * @param foundationMap Map from subcomponent names to their subfoundations.\n */\n function MDCTextFieldFoundation(adapter, foundationMap) {\n if (foundationMap === void 0) { foundationMap = {}; }\n var _this = _super.call(this, __assign(__assign({}, MDCTextFieldFoundation.defaultAdapter), adapter)) || this;\n _this.isFocused = false;\n _this.receivedUserInput = false;\n _this.valid = true;\n _this.useNativeValidation = true;\n _this.validateOnValueChange = true;\n _this.helperText = foundationMap.helperText;\n _this.characterCounter = foundationMap.characterCounter;\n _this.leadingIcon = foundationMap.leadingIcon;\n _this.trailingIcon = foundationMap.trailingIcon;\n _this.inputFocusHandler = function () {\n _this.activateFocus();\n };\n _this.inputBlurHandler = function () {\n _this.deactivateFocus();\n };\n _this.inputInputHandler = function () {\n _this.handleInput();\n };\n _this.setPointerXOffset = function (evt) {\n _this.setTransformOrigin(evt);\n };\n _this.textFieldInteractionHandler = function () {\n _this.handleTextFieldInteraction();\n };\n _this.validationAttributeChangeHandler = function (attributesList) {\n _this.handleValidationAttributeChange(attributesList);\n };\n return _this;\n }\n Object.defineProperty(MDCTextFieldFoundation, \"cssClasses\", {\n get: function () {\n return cssClasses;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation, \"strings\", {\n get: function () {\n return strings;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation, \"numbers\", {\n get: function () {\n return numbers;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation.prototype, \"shouldAlwaysFloat\", {\n get: function () {\n var type = this.getNativeInput().type;\n return ALWAYS_FLOAT_TYPES.indexOf(type) >= 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation.prototype, \"shouldFloat\", {\n get: function () {\n return this.shouldAlwaysFloat || this.isFocused || !!this.getValue() ||\n this.isBadInput();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation.prototype, \"shouldShake\", {\n get: function () {\n return !this.isFocused && !this.isValid() && !!this.getValue();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(MDCTextFieldFoundation, \"defaultAdapter\", {\n /**\n * See {@link MDCTextFieldAdapter} for typing information on parameters and\n * return types.\n */\n get: function () {\n // tslint:disable:object-literal-sort-keys Methods should be in the same order as the adapter interface.\n return {\n addClass: function () { return undefined; },\n removeClass: function () { return undefined; },\n hasClass: function () { return true; },\n setInputAttr: function () { return undefined; },\n removeInputAttr: function () { return undefined; },\n registerTextFieldInteractionHandler: function () { return undefined; },\n deregisterTextFieldInteractionHandler: function () { return undefined; },\n registerInputInteractionHandler: function () { return undefined; },\n deregisterInputInteractionHandler: function () { return undefined; },\n registerValidationAttributeChangeHandler: function () {\n return new MutationObserver(function () { return undefined; });\n },\n deregisterValidationAttributeChangeHandler: function () { return undefined; },\n getNativeInput: function () { return null; },\n isFocused: function () { return false; },\n activateLineRipple: function () { return undefined; },\n deactivateLineRipple: function () { return undefined; },\n setLineRippleTransformOrigin: function () { return undefined; },\n shakeLabel: function () { return undefined; },\n floatLabel: function () { return undefined; },\n setLabelRequired: function () { return undefined; },\n hasLabel: function () { return false; },\n getLabelWidth: function () { return 0; },\n hasOutline: function () { return false; },\n notchOutline: function () { return undefined; },\n closeOutline: function () { return undefined; },\n };\n // tslint:enable:object-literal-sort-keys\n },\n enumerable: false,\n configurable: true\n });\n MDCTextFieldFoundation.prototype.init = function () {\n var e_1, _a, e_2, _b;\n if (this.adapter.hasLabel() && this.getNativeInput().required) {\n this.adapter.setLabelRequired(true);\n }\n if (this.adapter.isFocused()) {\n this.inputFocusHandler();\n }\n else if (this.adapter.hasLabel() && this.shouldFloat) {\n this.notchOutline(true);\n this.adapter.floatLabel(true);\n this.styleFloating(true);\n }\n this.adapter.registerInputInteractionHandler('focus', this.inputFocusHandler);\n this.adapter.registerInputInteractionHandler('blur', this.inputBlurHandler);\n this.adapter.registerInputInteractionHandler('input', this.inputInputHandler);\n try {\n for (var POINTERDOWN_EVENTS_1 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next(); !POINTERDOWN_EVENTS_1_1.done; POINTERDOWN_EVENTS_1_1 = POINTERDOWN_EVENTS_1.next()) {\n var evtType = POINTERDOWN_EVENTS_1_1.value;\n this.adapter.registerInputInteractionHandler(evtType, this.setPointerXOffset);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (POINTERDOWN_EVENTS_1_1 && !POINTERDOWN_EVENTS_1_1.done && (_a = POINTERDOWN_EVENTS_1.return)) _a.call(POINTERDOWN_EVENTS_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var INTERACTION_EVENTS_1 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next(); !INTERACTION_EVENTS_1_1.done; INTERACTION_EVENTS_1_1 = INTERACTION_EVENTS_1.next()) {\n var evtType = INTERACTION_EVENTS_1_1.value;\n this.adapter.registerTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (INTERACTION_EVENTS_1_1 && !INTERACTION_EVENTS_1_1.done && (_b = INTERACTION_EVENTS_1.return)) _b.call(INTERACTION_EVENTS_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n this.validationObserver =\n this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler);\n this.setcharacterCounter(this.getValue().length);\n };\n MDCTextFieldFoundation.prototype.destroy = function () {\n var e_3, _a, e_4, _b;\n this.adapter.deregisterInputInteractionHandler('focus', this.inputFocusHandler);\n this.adapter.deregisterInputInteractionHandler('blur', this.inputBlurHandler);\n this.adapter.deregisterInputInteractionHandler('input', this.inputInputHandler);\n try {\n for (var POINTERDOWN_EVENTS_2 = __values(POINTERDOWN_EVENTS), POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next(); !POINTERDOWN_EVENTS_2_1.done; POINTERDOWN_EVENTS_2_1 = POINTERDOWN_EVENTS_2.next()) {\n var evtType = POINTERDOWN_EVENTS_2_1.value;\n this.adapter.deregisterInputInteractionHandler(evtType, this.setPointerXOffset);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (POINTERDOWN_EVENTS_2_1 && !POINTERDOWN_EVENTS_2_1.done && (_a = POINTERDOWN_EVENTS_2.return)) _a.call(POINTERDOWN_EVENTS_2);\n }\n finally { if (e_3) throw e_3.error; }\n }\n try {\n for (var INTERACTION_EVENTS_2 = __values(INTERACTION_EVENTS), INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next(); !INTERACTION_EVENTS_2_1.done; INTERACTION_EVENTS_2_1 = INTERACTION_EVENTS_2.next()) {\n var evtType = INTERACTION_EVENTS_2_1.value;\n this.adapter.deregisterTextFieldInteractionHandler(evtType, this.textFieldInteractionHandler);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (INTERACTION_EVENTS_2_1 && !INTERACTION_EVENTS_2_1.done && (_b = INTERACTION_EVENTS_2.return)) _b.call(INTERACTION_EVENTS_2);\n }\n finally { if (e_4) throw e_4.error; }\n }\n this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver);\n };\n /**\n * Handles user interactions with the Text Field.\n */\n MDCTextFieldFoundation.prototype.handleTextFieldInteraction = function () {\n var nativeInput = this.adapter.getNativeInput();\n if (nativeInput && nativeInput.disabled) {\n return;\n }\n this.receivedUserInput = true;\n };\n /**\n * Handles validation attribute changes\n */\n MDCTextFieldFoundation.prototype.handleValidationAttributeChange = function (attributesList) {\n var _this = this;\n attributesList.some(function (attributeName) {\n if (VALIDATION_ATTR_WHITELIST.indexOf(attributeName) > -1) {\n _this.styleValidity(true);\n _this.adapter.setLabelRequired(_this.getNativeInput().required);\n return true;\n }\n return false;\n });\n if (attributesList.indexOf('maxlength') > -1) {\n this.setcharacterCounter(this.getValue().length);\n }\n };\n /**\n * Opens/closes the notched outline.\n */\n MDCTextFieldFoundation.prototype.notchOutline = function (openNotch) {\n if (!this.adapter.hasOutline() || !this.adapter.hasLabel()) {\n return;\n }\n if (openNotch) {\n var labelWidth = this.adapter.getLabelWidth() * numbers.LABEL_SCALE;\n this.adapter.notchOutline(labelWidth);\n }\n else {\n this.adapter.closeOutline();\n }\n };\n /**\n * Activates the text field focus state.\n */\n MDCTextFieldFoundation.prototype.activateFocus = function () {\n this.isFocused = true;\n this.styleFocused(this.isFocused);\n this.adapter.activateLineRipple();\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n this.adapter.shakeLabel(this.shouldShake);\n }\n if (this.helperText &&\n (this.helperText.isPersistent() || !this.helperText.isValidation() ||\n !this.valid)) {\n this.helperText.showToScreenReader();\n }\n };\n /**\n * Sets the line ripple's transform origin, so that the line ripple activate\n * animation will animate out from the user's click location.\n */\n MDCTextFieldFoundation.prototype.setTransformOrigin = function (evt) {\n if (this.isDisabled() || this.adapter.hasOutline()) {\n return;\n }\n var touches = evt.touches;\n var targetEvent = touches ? touches[0] : evt;\n var targetClientRect = targetEvent.target.getBoundingClientRect();\n var normalizedX = targetEvent.clientX - targetClientRect.left;\n this.adapter.setLineRippleTransformOrigin(normalizedX);\n };\n /**\n * Handles input change of text input and text area.\n */\n MDCTextFieldFoundation.prototype.handleInput = function () {\n this.autoCompleteFocus();\n this.setcharacterCounter(this.getValue().length);\n };\n /**\n * Activates the Text Field's focus state in cases when the input value\n * changes without user input (e.g. programmatically).\n */\n MDCTextFieldFoundation.prototype.autoCompleteFocus = function () {\n if (!this.receivedUserInput) {\n this.activateFocus();\n }\n };\n /**\n * Deactivates the Text Field's focus state.\n */\n MDCTextFieldFoundation.prototype.deactivateFocus = function () {\n this.isFocused = false;\n this.adapter.deactivateLineRipple();\n var isValid = this.isValid();\n this.styleValidity(isValid);\n this.styleFocused(this.isFocused);\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n this.adapter.shakeLabel(this.shouldShake);\n }\n if (!this.shouldFloat) {\n this.receivedUserInput = false;\n }\n };\n MDCTextFieldFoundation.prototype.getValue = function () {\n return this.getNativeInput().value;\n };\n /**\n * @param value The value to set on the input Element.\n */\n MDCTextFieldFoundation.prototype.setValue = function (value) {\n // Prevent Safari from moving the caret to the end of the input when the\n // value has not changed.\n if (this.getValue() !== value) {\n this.getNativeInput().value = value;\n }\n this.setcharacterCounter(value.length);\n if (this.validateOnValueChange) {\n var isValid = this.isValid();\n this.styleValidity(isValid);\n }\n if (this.adapter.hasLabel()) {\n this.notchOutline(this.shouldFloat);\n this.adapter.floatLabel(this.shouldFloat);\n this.styleFloating(this.shouldFloat);\n if (this.validateOnValueChange) {\n this.adapter.shakeLabel(this.shouldShake);\n }\n }\n };\n /**\n * @return The custom validity state, if set; otherwise, the result of a\n * native validity check.\n */\n MDCTextFieldFoundation.prototype.isValid = function () {\n return this.useNativeValidation ? this.isNativeInputValid() : this.valid;\n };\n /**\n * @param isValid Sets the custom validity state of the Text Field.\n */\n MDCTextFieldFoundation.prototype.setValid = function (isValid) {\n this.valid = isValid;\n this.styleValidity(isValid);\n var shouldShake = !isValid && !this.isFocused && !!this.getValue();\n if (this.adapter.hasLabel()) {\n this.adapter.shakeLabel(shouldShake);\n }\n };\n /**\n * @param shouldValidate Whether or not validity should be updated on\n * value change.\n */\n MDCTextFieldFoundation.prototype.setValidateOnValueChange = function (shouldValidate) {\n this.validateOnValueChange = shouldValidate;\n };\n /**\n * @return Whether or not validity should be updated on value change. `true`\n * by default.\n */\n MDCTextFieldFoundation.prototype.getValidateOnValueChange = function () {\n return this.validateOnValueChange;\n };\n /**\n * Enables or disables the use of native validation. Use this for custom\n * validation.\n * @param useNativeValidation Set this to false to ignore native input\n * validation.\n */\n MDCTextFieldFoundation.prototype.setUseNativeValidation = function (useNativeValidation) {\n this.useNativeValidation = useNativeValidation;\n };\n MDCTextFieldFoundation.prototype.isDisabled = function () {\n return this.getNativeInput().disabled;\n };\n /**\n * @param disabled Sets the text-field disabled or enabled.\n */\n MDCTextFieldFoundation.prototype.setDisabled = function (disabled) {\n this.getNativeInput().disabled = disabled;\n this.styleDisabled(disabled);\n };\n /**\n * @param content Sets the content of the helper text.\n */\n MDCTextFieldFoundation.prototype.setHelperTextContent = function (content) {\n if (this.helperText) {\n this.helperText.setContent(content);\n }\n };\n /**\n * Sets the aria label of the leading icon.\n */\n MDCTextFieldFoundation.prototype.setLeadingIconAriaLabel = function (label) {\n if (this.leadingIcon) {\n this.leadingIcon.setAriaLabel(label);\n }\n };\n /**\n * Sets the text content of the leading icon.\n */\n MDCTextFieldFoundation.prototype.setLeadingIconContent = function (content) {\n if (this.leadingIcon) {\n this.leadingIcon.setContent(content);\n }\n };\n /**\n * Sets the aria label of the trailing icon.\n */\n MDCTextFieldFoundation.prototype.setTrailingIconAriaLabel = function (label) {\n if (this.trailingIcon) {\n this.trailingIcon.setAriaLabel(label);\n }\n };\n /**\n * Sets the text content of the trailing icon.\n */\n MDCTextFieldFoundation.prototype.setTrailingIconContent = function (content) {\n if (this.trailingIcon) {\n this.trailingIcon.setContent(content);\n }\n };\n /**\n * Sets character counter values that shows characters used and the total\n * character limit.\n */\n MDCTextFieldFoundation.prototype.setcharacterCounter = function (currentLength) {\n if (!this.characterCounter) {\n return;\n }\n var maxLength = this.getNativeInput().maxLength;\n if (maxLength === -1) {\n throw new Error('MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.');\n }\n this.characterCounter.setCounterValue(currentLength, maxLength);\n };\n /**\n * @return True if the Text Field input fails in converting the user-supplied\n * value.\n */\n MDCTextFieldFoundation.prototype.isBadInput = function () {\n // The badInput property is not supported in IE 11 💩.\n return this.getNativeInput().validity.badInput || false;\n };\n /**\n * @return The result of native validity checking (ValidityState.valid).\n */\n MDCTextFieldFoundation.prototype.isNativeInputValid = function () {\n return this.getNativeInput().validity.valid;\n };\n /**\n * Styles the component based on the validity state.\n */\n MDCTextFieldFoundation.prototype.styleValidity = function (isValid) {\n var INVALID = MDCTextFieldFoundation.cssClasses.INVALID;\n if (isValid) {\n this.adapter.removeClass(INVALID);\n }\n else {\n this.adapter.addClass(INVALID);\n }\n if (this.helperText) {\n this.helperText.setValidity(isValid);\n // We dynamically set or unset aria-describedby for validation helper text\n // only, based on whether the field is valid\n var helperTextValidation = this.helperText.isValidation();\n if (!helperTextValidation) {\n return;\n }\n var helperTextVisible = this.helperText.isVisible();\n var helperTextId = this.helperText.getId();\n if (helperTextVisible && helperTextId) {\n this.adapter.setInputAttr(strings.ARIA_DESCRIBEDBY, helperTextId);\n }\n else {\n this.adapter.removeInputAttr(strings.ARIA_DESCRIBEDBY);\n }\n }\n };\n /**\n * Styles the component based on the focused state.\n */\n MDCTextFieldFoundation.prototype.styleFocused = function (isFocused) {\n var FOCUSED = MDCTextFieldFoundation.cssClasses.FOCUSED;\n if (isFocused) {\n this.adapter.addClass(FOCUSED);\n }\n else {\n this.adapter.removeClass(FOCUSED);\n }\n };\n /**\n * Styles the component based on the disabled state.\n */\n MDCTextFieldFoundation.prototype.styleDisabled = function (isDisabled) {\n var _a = MDCTextFieldFoundation.cssClasses, DISABLED = _a.DISABLED, INVALID = _a.INVALID;\n if (isDisabled) {\n this.adapter.addClass(DISABLED);\n this.adapter.removeClass(INVALID);\n }\n else {\n this.adapter.removeClass(DISABLED);\n }\n if (this.leadingIcon) {\n this.leadingIcon.setDisabled(isDisabled);\n }\n if (this.trailingIcon) {\n this.trailingIcon.setDisabled(isDisabled);\n }\n };\n /**\n * Styles the component based on the label floating state.\n */\n MDCTextFieldFoundation.prototype.styleFloating = function (isFloating) {\n var LABEL_FLOATING = MDCTextFieldFoundation.cssClasses.LABEL_FLOATING;\n if (isFloating) {\n this.adapter.addClass(LABEL_FLOATING);\n }\n else {\n this.adapter.removeClass(LABEL_FLOATING);\n }\n };\n /**\n * @return The native text input element from the host environment, or an\n * object with the same shape for unit tests.\n */\n MDCTextFieldFoundation.prototype.getNativeInput = function () {\n // this.adapter may be undefined in foundation unit tests. This happens when\n // testdouble is creating a mock object and invokes the\n // shouldShake/shouldFloat getters (which in turn call getValue(), which\n // calls this method) before init() has been called from the MDCTextField\n // constructor. To work around that issue, we return a dummy object.\n var nativeInput = this.adapter ? this.adapter.getNativeInput() : null;\n return nativeInput || {\n disabled: false,\n maxLength: -1,\n required: false,\n type: 'input',\n validity: {\n badInput: false,\n valid: true,\n },\n value: '',\n };\n };\n return MDCTextFieldFoundation;\n}(MDCFoundation));\nexport { MDCTextFieldFoundation };\n// tslint:disable-next-line:no-default-export Needed for backward compatibility with MDC Web v0.44.0 and earlier.\nexport default MDCTextFieldFoundation;\n//# sourceMappingURL=foundation.js.map","import { classAdderBuilder } from '@smui/common/classadder';\nexport default classAdderBuilder({\n class: 'mdc-text-field-helper-line',\n tag: 'div',\n});\n//# sourceMappingURL=HelperLine.js.map","import { classAdderBuilder } from '@smui/common/classadder';\nexport default classAdderBuilder({\n class: 'mdc-text-field__affix mdc-text-field__affix--prefix',\n tag: 'span',\n});\n//# sourceMappingURL=Prefix.js.map","import { classAdderBuilder } from '@smui/common/classadder';\nexport default classAdderBuilder({\n class: 'mdc-text-field__affix mdc-text-field__affix--suffix',\n tag: 'span',\n});\n//# sourceMappingURL=Suffix.js.map"," type !== 'file' && valueUpdater(e)}\n on:change={changeHandler}\n on:blur\n on:focus\n {type}\n {placeholder}\n {...valueProp}\n {...internalAttrs}\n {...$$restProps}\n/>\n\n\n","\n\n\n","{#if valued}\n \n{:else}\n