-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsrc_app_custom-elements_contact-form_contact-form_module_ts.e4576fd9f4fd6a45.js.map
1 lines (1 loc) · 58.6 KB
/
src_app_custom-elements_contact-form_contact-form_module_ts.e4576fd9f4fd6a45.js.map
1
{"version":3,"file":"src_app_custom-elements_contact-form_contact-form_module_ts.e4576fd9f4fd6a45.js","mappings":"kSAUA,MAAMA,GAAkBC,QAAgC,CAAEC,SAAS,IACnE,IAKMC,EAAe,UAAAC,EAArB,MAAMD,EACFE,YAAYC,EAAWC,GACnBC,KAAKF,UAAYA,EACjBE,KAAKD,QAAUA,EACfC,KAAKC,mBAAqB,IAAIC,GAClC,CACAC,QAAQC,GACJ,IAAKJ,KAAKF,UAAUO,UAChB,OAAOC,IAEX,MAAMC,KAAUC,MAAcJ,GACxBK,EAAOT,KAAKC,mBAAmBS,IAAIH,GACzC,GAAIE,EACA,OAAOA,EAAKE,QAEhB,MAAMC,EAAS,IAAIC,IACbC,EAAW,4BACXC,EAAaC,IAIa,kCAAxBA,EAAMC,eACLV,EAAQW,UAAUC,SAASL,GAIC,gCAAxBE,EAAMC,eACXV,EAAQW,UAAUC,SAASL,KAC3BP,EAAQW,UAAUE,OAAON,GACzBd,KAAKD,QAAQsB,IAAI,IAAMT,EAAOU,KAAK,CAAEC,OAAQP,EAAMO,OAAQC,cAAc,OANzEjB,EAAQW,UAAUO,IAAIX,GACtBd,KAAKD,QAAQsB,IAAI,IAAMT,EAAOU,KAAK,CAAEC,OAAQP,EAAMO,OAAQC,cAAc,KAKQ,EAGzF,OAAAxB,KAAKD,QAAQ2B,kBAAkB,KAC3BnB,EAAQoB,iBAAiB,iBAAkBZ,EAAUvB,GACrDe,EAAQW,UAAUO,IAAI,oCAAmC,GAE7DzB,KAAKC,mBAAmB2B,IAAIrB,EAAS,CACjCI,QAASC,EACTiB,SAAUA,KACNtB,EAAQuB,oBAAoB,iBAAkBf,EAAUvB,EAAe,IAGxEoB,CACX,CACAmB,eAAe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A,QAEAA,MAAA,eAAwFA,MAAA,WAAIA,QAC5FA,MAAA,GAAA2I,EAAA,aAIF3I,2CAL0DA,MAAA,IAAAA,MAAA,YAAAwI,EAAAI,OAClD5I,MAAA,GAAAA,MAAA,OAAA6I,EAAAP,8BAMNtI,MAAA,WAAAA,CAA8B,OACzBA,MAAA,iCAA2BA,QAC9BA,MAAA,OAAGA,MAAA,sCAAgCA,WAMtC,IAAM8I,EAAoB,UAAAC,EAA3B,MAAOD,EAITxL,YAA6B0L,GAAAvL,KAAAuL,YAHnBvL,KAAAwL,WAAY,CAGgC,CAEtDP,OAAOQ,GAKH,MAAMC,EAAW,CAAC,cAAe,kBAAmB,gBAAiB,iBACrEC,WAAOC,MAAW5L,KAAKuL,UAAW,QAAS,CACvCM,GAAIH,EACJI,KAAML,EAAQM,MACdC,QAAS,CAACP,EAAQM,SAAUL,GAC5BO,QAAS,CACLtL,QAAS,yBACTuL,KAAM,GAAGT,EAAQU,SAASV,EAAQW,cAEvCC,KACC,IAAMrM,KAAKwL,WAAY,EACtBc,GAAMtM,KAAK6K,MAAQyB,EAE5B,WAxBSjB,0CAAoB9I,MAAAC,MAAA,0BAApB6I,EAAoB9B,UAAA,wBAAAgD,MAAA,EAAAC,KAAA,EAAAC,OAAA,mnBAAAC,SAAA,SAAA/C,EAAAC,MAAA,EAAAD,GA7B3BpH,MAAA,EAAAoK,EAAA,cAAApK,CAmBO,EAAAqK,EAAA,yBAAArK,6BAnBAA,MAAA,QAAAqH,EAAA4B,UAAAjJ,CAAiB,WAAAsK,iVA6BjBxB,CAAoB,KCtCpByB,EAAiB,UAAAC,EAAxB,MAAOD,EAJbjN,cAKIG,KAAAgN,uBAAoC3B,YAD3ByB,yCAAiB,0BAAjBA,gCAHCG,KAAcC,KAAiBC,IAAaxC,KAAoBJ,KAGjEuC,CAAiB","names":["listenerOptions","normalizePassiveListenerOptions","passive","AutofillMonitor","_AutofillMonitor","constructor","_platform","_ngZone","this","_monitoredElements","Map","monitor","elementOrRef","isBrowser","EMPTY","element","coerceElement","info","get","subject","result","Subject","cssClass","listener","event","animationName","classList","contains","remove","run","next","target","isAutofilled","add","runOutsideAngular","addEventListener","set","unlisten","removeEventListener","stopMonitoring","complete","delete","ngOnDestroy","forEach","_info","ɵfac","t","i0","i1","ɵprov","token","factory","providedIn","TextFieldModule","_TextFieldModule","ɵmod","type","ɵinj","MAT_INPUT_VALUE_ACCESSOR","InjectionToken","MAT_INPUT_INVALID_TYPES","nextUniqueId","MatInput","_MatInput","disabled","_disabled","value","coerceBooleanProperty","focused","stateChanges","id","_id","_uid","required","_required","ngControl","control","hasValidator","Validators","_type","_validateType","_isTextarea","getSupportedInputTypes","has","_elementRef","nativeElement","errorStateMatcher","_errorStateTracker","matcher","_inputValueAccessor","readonly","_readonly","errorState","parentForm","parentFormGroup","defaultErrorStateMatcher","inputValueAccessor","_autofillMonitor","ngZone","_formField","controlType","autofilled","_neverEmptyInputTypes","filter","_iOSKeyupListener","el","selectionStart","selectionEnd","setSelectionRange","nodeName","toLowerCase","_previousNativeValue","IOS","_ErrorStateTracker","_isServer","_isNativeSelect","_isInFormField","multiple","ngAfterViewInit","subscribe","ngOnChanges","ngDoCheck","updateErrorState","_dirtyCheckNativeValue","_dirtyCheckPlaceholder","focus","options","_focusChanged","isFocused","_onInput","newValue","placeholder","_getPlaceholder","_previousPlaceholder","setAttribute","removeAttribute","indexOf","_isNeverEmpty","_isBadInput","validity","badInput","empty","shouldLabelFloat","selectElement","firstOption","selectedIndex","label","setDescribedByIds","ids","length","join","onContainerClick","_isInlineSelect","size","i2","i3","i4","MAT_FORM_FIELD","ɵdir","selectors","hostAttrs","hostVars","hostBindings","rf","ctx","name","inputs","userAriaDescribedBy","None","exportAs","standalone","features","provide","MatFormFieldControl","useExisting","MatInputModule","_MatInputModule","imports","MatCommonModule","MatFormFieldModule","ctx_r4","error","_r6","_r3","ctx_r5","submit","ContactFormComponent_form_0_div_16_Template","valid","ctx_r0","ContactFormComponent","_ContactFormComponent","firestore","emailSent","contact","toEmails","addDoc","collection","to","from","email","replyTo","message","text","body","fromName","then","e","decls","vars","consts","template","ContactFormComponent_form_0_Template","ContactFormComponent_ng_template_1_Template","_r2","ContactFormModule","_ContactFormModule","customElementComponent","CommonModule","MatButtonModule","FormsModule"],"sourceRoot":"webpack:///","sources":["./node_modules/@angular/cdk/fesm2022/text-field.mjs","./node_modules/@angular/material/fesm2022/input.mjs","./src/app/custom-elements/contact-form/contact-form.component.ts","./src/app/custom-elements/contact-form/contact-form.module.ts"],"sourcesContent":["import * as i1 from '@angular/cdk/platform';\nimport { normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport * as i0 from '@angular/core';\nimport { Injectable, EventEmitter, Directive, Output, booleanAttribute, Optional, Inject, Input, NgModule } from '@angular/core';\nimport { coerceElement, coerceNumberProperty } from '@angular/cdk/coercion';\nimport { EMPTY, Subject, fromEvent } from 'rxjs';\nimport { auditTime, takeUntil } from 'rxjs/operators';\nimport { DOCUMENT } from '@angular/common';\n\n/** Options to pass to the animationstart listener. */\nconst listenerOptions = normalizePassiveListenerOptions({ passive: true });\n/**\n * An injectable service that can be used to monitor the autofill state of an input.\n * Based on the following blog post:\n * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7\n */\nclass AutofillMonitor {\n constructor(_platform, _ngZone) {\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._monitoredElements = new Map();\n }\n monitor(elementOrRef) {\n if (!this._platform.isBrowser) {\n return EMPTY;\n }\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n if (info) {\n return info.subject;\n }\n const result = new Subject();\n const cssClass = 'cdk-text-field-autofilled';\n const listener = ((event) => {\n // Animation events fire on initial element render, we check for the presence of the autofill\n // CSS class to make sure this is a real change in state, not just the initial render before\n // we fire off events.\n if (event.animationName === 'cdk-text-field-autofill-start' &&\n !element.classList.contains(cssClass)) {\n element.classList.add(cssClass);\n this._ngZone.run(() => result.next({ target: event.target, isAutofilled: true }));\n }\n else if (event.animationName === 'cdk-text-field-autofill-end' &&\n element.classList.contains(cssClass)) {\n element.classList.remove(cssClass);\n this._ngZone.run(() => result.next({ target: event.target, isAutofilled: false }));\n }\n });\n this._ngZone.runOutsideAngular(() => {\n element.addEventListener('animationstart', listener, listenerOptions);\n element.classList.add('cdk-text-field-autofill-monitored');\n });\n this._monitoredElements.set(element, {\n subject: result,\n unlisten: () => {\n element.removeEventListener('animationstart', listener, listenerOptions);\n },\n });\n return result;\n }\n stopMonitoring(elementOrRef) {\n const element = coerceElement(elementOrRef);\n const info = this._monitoredElements.get(element);\n if (info) {\n info.unlisten();\n info.subject.complete();\n element.classList.remove('cdk-text-field-autofill-monitored');\n element.classList.remove('cdk-text-field-autofilled');\n this._monitoredElements.delete(element);\n }\n }\n ngOnDestroy() {\n this._monitoredElements.forEach((_info, element) => this.stopMonitoring(element));\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: AutofillMonitor, deps: [{ token: i1.Platform }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: AutofillMonitor, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: AutofillMonitor, decorators: [{\n type: Injectable,\n args: [{ providedIn: 'root' }]\n }], ctorParameters: () => [{ type: i1.Platform }, { type: i0.NgZone }] });\n/** A directive that can be used to monitor the autofill state of an input. */\nclass CdkAutofill {\n constructor(_elementRef, _autofillMonitor) {\n this._elementRef = _elementRef;\n this._autofillMonitor = _autofillMonitor;\n /** Emits when the autofill state of the element changes. */\n this.cdkAutofill = new EventEmitter();\n }\n ngOnInit() {\n this._autofillMonitor\n .monitor(this._elementRef)\n .subscribe(event => this.cdkAutofill.emit(event));\n }\n ngOnDestroy() {\n this._autofillMonitor.stopMonitoring(this._elementRef);\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: CdkAutofill, deps: [{ token: i0.ElementRef }, { token: AutofillMonitor }], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"17.2.0\", type: CdkAutofill, isStandalone: true, selector: \"[cdkAutofill]\", outputs: { cdkAutofill: \"cdkAutofill\" }, ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: CdkAutofill, decorators: [{\n type: Directive,\n args: [{\n selector: '[cdkAutofill]',\n standalone: true,\n }]\n }], ctorParameters: () => [{ type: i0.ElementRef }, { type: AutofillMonitor }], propDecorators: { cdkAutofill: [{\n type: Output\n }] } });\n\n/** Directive to automatically resize a textarea to fit its content. */\nclass CdkTextareaAutosize {\n /** Minimum amount of rows in the textarea. */\n get minRows() {\n return this._minRows;\n }\n set minRows(value) {\n this._minRows = coerceNumberProperty(value);\n this._setMinHeight();\n }\n /** Maximum amount of rows in the textarea. */\n get maxRows() {\n return this._maxRows;\n }\n set maxRows(value) {\n this._maxRows = coerceNumberProperty(value);\n this._setMaxHeight();\n }\n /** Whether autosizing is enabled or not */\n get enabled() {\n return this._enabled;\n }\n set enabled(value) {\n // Only act if the actual value changed. This specifically helps to not run\n // resizeToFitContent too early (i.e. before ngAfterViewInit)\n if (this._enabled !== value) {\n (this._enabled = value) ? this.resizeToFitContent(true) : this.reset();\n }\n }\n get placeholder() {\n return this._textareaElement.placeholder;\n }\n set placeholder(value) {\n this._cachedPlaceholderHeight = undefined;\n if (value) {\n this._textareaElement.setAttribute('placeholder', value);\n }\n else {\n this._textareaElement.removeAttribute('placeholder');\n }\n this._cacheTextareaPlaceholderHeight();\n }\n constructor(_elementRef, _platform, _ngZone, \n /** @breaking-change 11.0.0 make document required */\n document) {\n this._elementRef = _elementRef;\n this._platform = _platform;\n this._ngZone = _ngZone;\n this._destroyed = new Subject();\n this._enabled = true;\n /**\n * Value of minRows as of last resize. If the minRows has decreased, the\n * height of the textarea needs to be recomputed to reflect the new minimum. The maxHeight\n * does not have the same problem because it does not affect the textarea's scrollHeight.\n */\n this._previousMinRows = -1;\n this._isViewInited = false;\n /** Handles `focus` and `blur` events. */\n this._handleFocusEvent = (event) => {\n this._hasFocus = event.type === 'focus';\n };\n this._document = document;\n this._textareaElement = this._elementRef.nativeElement;\n }\n /** Sets the minimum height of the textarea as determined by minRows. */\n _setMinHeight() {\n const minHeight = this.minRows && this._cachedLineHeight ? `${this.minRows * this._cachedLineHeight}px` : null;\n if (minHeight) {\n this._textareaElement.style.minHeight = minHeight;\n }\n }\n /** Sets the maximum height of the textarea as determined by maxRows. */\n _setMaxHeight() {\n const maxHeight = this.maxRows && this._cachedLineHeight ? `${this.maxRows * this._cachedLineHeight}px` : null;\n if (maxHeight) {\n this._textareaElement.style.maxHeight = maxHeight;\n }\n }\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n // Remember the height which we started with in case autosizing is disabled\n this._initialHeight = this._textareaElement.style.height;\n this.resizeToFitContent();\n this._ngZone.runOutsideAngular(() => {\n const window = this._getWindow();\n fromEvent(window, 'resize')\n .pipe(auditTime(16), takeUntil(this._destroyed))\n .subscribe(() => this.resizeToFitContent(true));\n this._textareaElement.addEventListener('focus', this._handleFocusEvent);\n this._textareaElement.addEventListener('blur', this._handleFocusEvent);\n });\n this._isViewInited = true;\n this.resizeToFitContent(true);\n }\n }\n ngOnDestroy() {\n this._textareaElement.removeEventListener('focus', this._handleFocusEvent);\n this._textareaElement.removeEventListener('blur', this._handleFocusEvent);\n this._destroyed.next();\n this._destroyed.complete();\n }\n /**\n * Cache the height of a single-row textarea if it has not already been cached.\n *\n * We need to know how large a single \"row\" of a textarea is in order to apply minRows and\n * maxRows. For the initial version, we will assume that the height of a single line in the\n * textarea does not ever change.\n */\n _cacheTextareaLineHeight() {\n if (this._cachedLineHeight) {\n return;\n }\n // Use a clone element because we have to override some styles.\n let textareaClone = this._textareaElement.cloneNode(false);\n textareaClone.rows = 1;\n // Use `position: absolute` so that this doesn't cause a browser layout and use\n // `visibility: hidden` so that nothing is rendered. Clear any other styles that\n // would affect the height.\n textareaClone.style.position = 'absolute';\n textareaClone.style.visibility = 'hidden';\n textareaClone.style.border = 'none';\n textareaClone.style.padding = '0';\n textareaClone.style.height = '';\n textareaClone.style.minHeight = '';\n textareaClone.style.maxHeight = '';\n // In Firefox it happens that textarea elements are always bigger than the specified amount\n // of rows. This is because Firefox tries to add extra space for the horizontal scrollbar.\n // As a workaround that removes the extra space for the scrollbar, we can just set overflow\n // to hidden. This ensures that there is no invalid calculation of the line height.\n // See Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=33654\n textareaClone.style.overflow = 'hidden';\n this._textareaElement.parentNode.appendChild(textareaClone);\n this._cachedLineHeight = textareaClone.clientHeight;\n textareaClone.remove();\n // Min and max heights have to be re-calculated if the cached line height changes\n this._setMinHeight();\n this._setMaxHeight();\n }\n _measureScrollHeight() {\n const element = this._textareaElement;\n const previousMargin = element.style.marginBottom || '';\n const isFirefox = this._platform.FIREFOX;\n const needsMarginFiller = isFirefox && this._hasFocus;\n const measuringClass = isFirefox\n ? 'cdk-textarea-autosize-measuring-firefox'\n : 'cdk-textarea-autosize-measuring';\n // In some cases the page might move around while we're measuring the `textarea` on Firefox. We\n // work around it by assigning a temporary margin with the same height as the `textarea` so that\n // it occupies the same amount of space. See #23233.\n if (needsMarginFiller) {\n element.style.marginBottom = `${element.clientHeight}px`;\n }\n // Reset the textarea height to auto in order to shrink back to its default size.\n // Also temporarily force overflow:hidden, so scroll bars do not interfere with calculations.\n element.classList.add(measuringClass);\n // The measuring class includes a 2px padding to workaround an issue with Chrome,\n // so we account for that extra space here by subtracting 4 (2px top + 2px bottom).\n const scrollHeight = element.scrollHeight - 4;\n element.classList.remove(measuringClass);\n if (needsMarginFiller) {\n element.style.marginBottom = previousMargin;\n }\n return scrollHeight;\n }\n _cacheTextareaPlaceholderHeight() {\n if (!this._isViewInited || this._cachedPlaceholderHeight != undefined) {\n return;\n }\n if (!this.placeholder) {\n this._cachedPlaceholderHeight = 0;\n return;\n }\n const value = this._textareaElement.value;\n this._textareaElement.value = this._textareaElement.placeholder;\n this._cachedPlaceholderHeight = this._measureScrollHeight();\n this._textareaElement.value = value;\n }\n ngDoCheck() {\n if (this._platform.isBrowser) {\n this.resizeToFitContent();\n }\n }\n /**\n * Resize the textarea to fit its content.\n * @param force Whether to force a height recalculation. By default the height will be\n * recalculated only if the value changed since the last call.\n */\n resizeToFitContent(force = false) {\n // If autosizing is disabled, just skip everything else\n if (!this._enabled) {\n return;\n }\n this._cacheTextareaLineHeight();\n this._cacheTextareaPlaceholderHeight();\n // If we haven't determined the line-height yet, we know we're still hidden and there's no point\n // in checking the height of the textarea.\n if (!this._cachedLineHeight) {\n return;\n }\n const textarea = this._elementRef.nativeElement;\n const value = textarea.value;\n // Only resize if the value or minRows have changed since these calculations can be expensive.\n if (!force && this._minRows === this._previousMinRows && value === this._previousValue) {\n return;\n }\n const scrollHeight = this._measureScrollHeight();\n const height = Math.max(scrollHeight, this._cachedPlaceholderHeight || 0);\n // Use the scrollHeight to know how large the textarea *would* be if fit its entire value.\n textarea.style.height = `${height}px`;\n this._ngZone.runOutsideAngular(() => {\n if (typeof requestAnimationFrame !== 'undefined') {\n requestAnimationFrame(() => this._scrollToCaretPosition(textarea));\n }\n else {\n setTimeout(() => this._scrollToCaretPosition(textarea));\n }\n });\n this._previousValue = value;\n this._previousMinRows = this._minRows;\n }\n /**\n * Resets the textarea to its original size\n */\n reset() {\n // Do not try to change the textarea, if the initialHeight has not been determined yet\n // This might potentially remove styles when reset() is called before ngAfterViewInit\n if (this._initialHeight !== undefined) {\n this._textareaElement.style.height = this._initialHeight;\n }\n }\n _noopInputHandler() {\n // no-op handler that ensures we're running change detection on input events.\n }\n /** Access injected document if available or fallback to global document reference */\n _getDocument() {\n return this._document || document;\n }\n /** Use defaultView of injected document if available or fallback to global window reference */\n _getWindow() {\n const doc = this._getDocument();\n return doc.defaultView || window;\n }\n /**\n * Scrolls a textarea to the caret position. On Firefox resizing the textarea will\n * prevent it from scrolling to the caret position. We need to re-set the selection\n * in order for it to scroll to the proper position.\n */\n _scrollToCaretPosition(textarea) {\n const { selectionStart, selectionEnd } = textarea;\n // IE will throw an \"Unspecified error\" if we try to set the selection range after the\n // element has been removed from the DOM. Assert that the directive hasn't been destroyed\n // between the time we requested the animation frame and when it was executed.\n // Also note that we have to assert that the textarea is focused before we set the\n // selection range. Setting the selection range on a non-focused textarea will cause\n // it to receive focus on IE and Edge.\n if (!this._destroyed.isStopped && this._hasFocus) {\n textarea.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: CdkTextareaAutosize, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: i0.NgZone }, { token: DOCUMENT, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"16.1.0\", version: \"17.2.0\", type: CdkTextareaAutosize, isStandalone: true, selector: \"textarea[cdkTextareaAutosize]\", inputs: { minRows: [\"cdkAutosizeMinRows\", \"minRows\"], maxRows: [\"cdkAutosizeMaxRows\", \"maxRows\"], enabled: [\"cdkTextareaAutosize\", \"enabled\", booleanAttribute], placeholder: \"placeholder\" }, host: { attributes: { \"rows\": \"1\" }, listeners: { \"input\": \"_noopInputHandler()\" }, classAttribute: \"cdk-textarea-autosize\" }, exportAs: [\"cdkTextareaAutosize\"], ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: CdkTextareaAutosize, decorators: [{\n type: Directive,\n args: [{\n selector: 'textarea[cdkTextareaAutosize]',\n exportAs: 'cdkTextareaAutosize',\n host: {\n 'class': 'cdk-textarea-autosize',\n // Textarea elements that have the directive applied should have a single row by default.\n // Browsers normally show two rows by default and therefore this limits the minRows binding.\n 'rows': '1',\n '(input)': '_noopInputHandler()',\n },\n standalone: true,\n }]\n }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.Platform }, { type: i0.NgZone }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [DOCUMENT]\n }] }], propDecorators: { minRows: [{\n type: Input,\n args: ['cdkAutosizeMinRows']\n }], maxRows: [{\n type: Input,\n args: ['cdkAutosizeMaxRows']\n }], enabled: [{\n type: Input,\n args: [{ alias: 'cdkTextareaAutosize', transform: booleanAttribute }]\n }], placeholder: [{\n type: Input\n }] } });\n\nclass TextFieldModule {\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: TextFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }\n static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"17.2.0\", ngImport: i0, type: TextFieldModule, imports: [CdkAutofill, CdkTextareaAutosize], exports: [CdkAutofill, CdkTextareaAutosize] }); }\n static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: TextFieldModule }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: TextFieldModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [CdkAutofill, CdkTextareaAutosize],\n exports: [CdkAutofill, CdkTextareaAutosize],\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { AutofillMonitor, CdkAutofill, CdkTextareaAutosize, TextFieldModule };\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport * as i1 from '@angular/cdk/platform';\nimport { getSupportedInputTypes } from '@angular/cdk/platform';\nimport * as i4 from '@angular/cdk/text-field';\nimport { TextFieldModule } from '@angular/cdk/text-field';\nimport * as i0 from '@angular/core';\nimport { InjectionToken, Directive, Optional, Self, Inject, Input, NgModule } from '@angular/core';\nimport * as i2 from '@angular/forms';\nimport { Validators } from '@angular/forms';\nimport * as i3 from '@angular/material/core';\nimport { _ErrorStateTracker, MatCommonModule } from '@angular/material/core';\nimport * as i5 from '@angular/material/form-field';\nimport { MAT_FORM_FIELD, MatFormFieldControl, MatFormFieldModule } from '@angular/material/form-field';\nexport { MatError, MatFormField, MatHint, MatLabel, MatPrefix, MatSuffix } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n/** @docs-private */\nfunction getMatInputUnsupportedTypeError(type) {\n return Error(`Input type \"${type}\" isn't supported by matInput.`);\n}\n\n/**\n * This token is used to inject the object whose value should be set into `MatInput`. If none is\n * provided, the native `HTMLInputElement` is used. Directives like `MatDatepickerInput` can provide\n * themselves for this token, in order to make `MatInput` delegate the getting and setting of the\n * value to them.\n */\nconst MAT_INPUT_VALUE_ACCESSOR = new InjectionToken('MAT_INPUT_VALUE_ACCESSOR');\n\n// Invalid input type. Using one of these will throw an MatInputUnsupportedTypeError.\nconst MAT_INPUT_INVALID_TYPES = [\n 'button',\n 'checkbox',\n 'file',\n 'hidden',\n 'image',\n 'radio',\n 'range',\n 'reset',\n 'submit',\n];\nlet nextUniqueId = 0;\nclass MatInput {\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get disabled() {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n // Browsers may not fire the blur event if the input is disabled too quickly.\n // Reset from here to ensure that the element doesn't become stuck.\n if (this.focused) {\n this.focused = false;\n this.stateChanges.next();\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get id() {\n return this._id;\n }\n set id(value) {\n this._id = value || this._uid;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get required() {\n return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n }\n set required(value) {\n this._required = coerceBooleanProperty(value);\n }\n /** Input type of the element. */\n get type() {\n return this._type;\n }\n set type(value) {\n this._type = value || 'text';\n this._validateType();\n // When using Angular inputs, developers are no longer able to set the properties on the native\n // input element. To ensure that bindings for `type` work, we need to sync the setter\n // with the native property. Textarea elements don't support the type property or attribute.\n if (!this._isTextarea && getSupportedInputTypes().has(this._type)) {\n this._elementRef.nativeElement.type = this._type;\n }\n }\n /** An object used to control when error messages are shown. */\n get errorStateMatcher() {\n return this._errorStateTracker.matcher;\n }\n set errorStateMatcher(value) {\n this._errorStateTracker.matcher = value;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get value() {\n return this._inputValueAccessor.value;\n }\n set value(value) {\n if (value !== this.value) {\n this._inputValueAccessor.value = value;\n this.stateChanges.next();\n }\n }\n /** Whether the element is readonly. */\n get readonly() {\n return this._readonly;\n }\n set readonly(value) {\n this._readonly = coerceBooleanProperty(value);\n }\n /** Whether the input is in an error state. */\n get errorState() {\n return this._errorStateTracker.errorState;\n }\n set errorState(value) {\n this._errorStateTracker.errorState = value;\n }\n constructor(_elementRef, _platform, ngControl, parentForm, parentFormGroup, defaultErrorStateMatcher, inputValueAccessor, _autofillMonitor, ngZone, \n // TODO: Remove this once the legacy appearance has been removed. We only need\n // to inject the form field for determining whether the placeholder has been promoted.\n _formField) {\n this._elementRef = _elementRef;\n this._platform = _platform;\n this.ngControl = ngControl;\n this._autofillMonitor = _autofillMonitor;\n this._formField = _formField;\n this._uid = `mat-input-${nextUniqueId++}`;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.focused = false;\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.stateChanges = new Subject();\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.controlType = 'mat-input';\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n this.autofilled = false;\n this._disabled = false;\n this._type = 'text';\n this._readonly = false;\n this._neverEmptyInputTypes = [\n 'date',\n 'datetime',\n 'datetime-local',\n 'month',\n 'time',\n 'week',\n ].filter(t => getSupportedInputTypes().has(t));\n this._iOSKeyupListener = (event) => {\n const el = event.target;\n // Note: We specifically check for 0, rather than `!el.selectionStart`, because the two\n // indicate different things. If the value is 0, it means that the caret is at the start\n // of the input, whereas a value of `null` means that the input doesn't support\n // manipulating the selection range. Inputs that don't support setting the selection range\n // will throw an error so we want to avoid calling `setSelectionRange` on them. See:\n // https://html.spec.whatwg.org/multipage/input.html#do-not-apply\n if (!el.value && el.selectionStart === 0 && el.selectionEnd === 0) {\n // Note: Just setting `0, 0` doesn't fix the issue. Setting\n // `1, 1` fixes it for the first time that you type text and\n // then hold delete. Toggling to `1, 1` and then back to\n // `0, 0` seems to completely fix it.\n el.setSelectionRange(1, 1);\n el.setSelectionRange(0, 0);\n }\n };\n const element = this._elementRef.nativeElement;\n const nodeName = element.nodeName.toLowerCase();\n // If no input value accessor was explicitly specified, use the element as the input value\n // accessor.\n this._inputValueAccessor = inputValueAccessor || element;\n this._previousNativeValue = this.value;\n // Force setter to be called in case id was not specified.\n this.id = this.id;\n // On some versions of iOS the caret gets stuck in the wrong place when holding down the delete\n // key. In order to get around this we need to \"jiggle\" the caret loose. Since this bug only\n // exists on iOS, we only bother to install the listener on iOS.\n if (_platform.IOS) {\n ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keyup', this._iOSKeyupListener);\n });\n }\n this._errorStateTracker = new _ErrorStateTracker(defaultErrorStateMatcher, ngControl, parentFormGroup, parentForm, this.stateChanges);\n this._isServer = !this._platform.isBrowser;\n this._isNativeSelect = nodeName === 'select';\n this._isTextarea = nodeName === 'textarea';\n this._isInFormField = !!_formField;\n if (this._isNativeSelect) {\n this.controlType = element.multiple\n ? 'mat-native-select-multiple'\n : 'mat-native-select';\n }\n }\n ngAfterViewInit() {\n if (this._platform.isBrowser) {\n this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(event => {\n this.autofilled = event.isAutofilled;\n this.stateChanges.next();\n });\n }\n }\n ngOnChanges() {\n this.stateChanges.next();\n }\n ngOnDestroy() {\n this.stateChanges.complete();\n if (this._platform.isBrowser) {\n this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement);\n }\n if (this._platform.IOS) {\n this._elementRef.nativeElement.removeEventListener('keyup', this._iOSKeyupListener);\n }\n }\n ngDoCheck() {\n if (this.ngControl) {\n // We need to re-evaluate this on every change detection cycle, because there are some\n // error triggers that we can't subscribe to (e.g. parent form submissions). This means\n // that whatever logic is in here has to be super lean or we risk destroying the performance.\n this.updateErrorState();\n // Since the input isn't a `ControlValueAccessor`, we don't have a good way of knowing when\n // the disabled state has changed. We can't use the `ngControl.statusChanges`, because it\n // won't fire if the input is disabled with `emitEvents = false`, despite the input becoming\n // disabled.\n if (this.ngControl.disabled !== null && this.ngControl.disabled !== this.disabled) {\n this.disabled = this.ngControl.disabled;\n this.stateChanges.next();\n }\n }\n // We need to dirty-check the native element's value, because there are some cases where\n // we won't be notified when it changes (e.g. the consumer isn't using forms or they're\n // updating the value using `emitEvent: false`).\n this._dirtyCheckNativeValue();\n // We need to dirty-check and set the placeholder attribute ourselves, because whether it's\n // present or not depends on a query which is prone to \"changed after checked\" errors.\n this._dirtyCheckPlaceholder();\n }\n /** Focuses the input. */\n focus(options) {\n this._elementRef.nativeElement.focus(options);\n }\n /** Refreshes the error state of the input. */\n updateErrorState() {\n this._errorStateTracker.updateErrorState();\n }\n /** Callback for the cases where the focused state of the input changes. */\n _focusChanged(isFocused) {\n if (isFocused !== this.focused) {\n this.focused = isFocused;\n this.stateChanges.next();\n }\n }\n _onInput() {\n // This is a noop function and is used to let Angular know whenever the value changes.\n // Angular will run a new change detection each time the `input` event has been dispatched.\n // It's necessary that Angular recognizes the value change, because when floatingLabel\n // is set to false and Angular forms aren't used, the placeholder won't recognize the\n // value changes and will not disappear.\n // Listening to the input event wouldn't be necessary when the input is using the\n // FormsModule or ReactiveFormsModule, because Angular forms also listens to input events.\n }\n /** Does some manual dirty checking on the native input `value` property. */\n _dirtyCheckNativeValue() {\n const newValue = this._elementRef.nativeElement.value;\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.stateChanges.next();\n }\n }\n /** Does some manual dirty checking on the native input `placeholder` attribute. */\n _dirtyCheckPlaceholder() {\n const placeholder = this._getPlaceholder();\n if (placeholder !== this._previousPlaceholder) {\n const element = this._elementRef.nativeElement;\n this._previousPlaceholder = placeholder;\n placeholder\n ? element.setAttribute('placeholder', placeholder)\n : element.removeAttribute('placeholder');\n }\n }\n /** Gets the current placeholder of the form field. */\n _getPlaceholder() {\n return this.placeholder || null;\n }\n /** Make sure the input is a supported type. */\n _validateType() {\n if (MAT_INPUT_INVALID_TYPES.indexOf(this._type) > -1 &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatInputUnsupportedTypeError(this._type);\n }\n }\n /** Checks whether the input type is one of the types that are never empty. */\n _isNeverEmpty() {\n return this._neverEmptyInputTypes.indexOf(this._type) > -1;\n }\n /** Checks whether the input is invalid based on the native validation. */\n _isBadInput() {\n // The `validity` property won't be present on platform-server.\n let validity = this._elementRef.nativeElement.validity;\n return validity && validity.badInput;\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get empty() {\n return (!this._isNeverEmpty() &&\n !this._elementRef.nativeElement.value &&\n !this._isBadInput() &&\n !this.autofilled);\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n get shouldLabelFloat() {\n if (this._isNativeSelect) {\n // For a single-selection `<select>`, the label should float when the selected option has\n // a non-empty display value. For a `<select multiple>`, the label *always* floats to avoid\n // overlapping the label with the options.\n const selectElement = this._elementRef.nativeElement;\n const firstOption = selectElement.options[0];\n // On most browsers the `selectedIndex` will always be 0, however on IE and Edge it'll be\n // -1 if the `value` is set to something, that isn't in the list of options, at a later point.\n return (this.focused ||\n selectElement.multiple ||\n !this.empty ||\n !!(selectElement.selectedIndex > -1 && firstOption && firstOption.label));\n }\n else {\n return this.focused || !this.empty;\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n setDescribedByIds(ids) {\n if (ids.length) {\n this._elementRef.nativeElement.setAttribute('aria-describedby', ids.join(' '));\n }\n else {\n this._elementRef.nativeElement.removeAttribute('aria-describedby');\n }\n }\n /**\n * Implemented as part of MatFormFieldControl.\n * @docs-private\n */\n onContainerClick() {\n // Do not re-focus the input element if the element is already focused. Otherwise it can happen\n // that someone clicks on a time input and the cursor resets to the \"hours\" field while the\n // \"minutes\" field was actually clicked. See: https://github.com/angular/components/issues/12849\n if (!this.focused) {\n this.focus();\n }\n }\n /** Whether the form control is a native select that is displayed inline. */\n _isInlineSelect() {\n const element = this._elementRef.nativeElement;\n return this._isNativeSelect && (element.multiple || element.size > 1);\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: MatInput, deps: [{ token: i0.ElementRef }, { token: i1.Platform }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }, { token: MAT_INPUT_VALUE_ACCESSOR, optional: true, self: true }, { token: i4.AutofillMonitor }, { token: i0.NgZone }, { token: MAT_FORM_FIELD, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }\n static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: \"14.0.0\", version: \"17.2.0\", type: MatInput, isStandalone: true, selector: \"input[matInput], textarea[matInput], select[matNativeControl],\\n input[matNativeControl], textarea[matNativeControl]\", inputs: { disabled: \"disabled\", id: \"id\", placeholder: \"placeholder\", name: \"name\", required: \"required\", type: \"type\", errorStateMatcher: \"errorStateMatcher\", userAriaDescribedBy: [\"aria-describedby\", \"userAriaDescribedBy\"], value: \"value\", readonly: \"readonly\" }, host: { listeners: { \"focus\": \"_focusChanged(true)\", \"blur\": \"_focusChanged(false)\", \"input\": \"_onInput()\" }, properties: { \"class.mat-input-server\": \"_isServer\", \"class.mat-mdc-form-field-textarea-control\": \"_isInFormField && _isTextarea\", \"class.mat-mdc-form-field-input-control\": \"_isInFormField\", \"class.mdc-text-field__input\": \"_isInFormField\", \"class.mat-mdc-native-select-inline\": \"_isInlineSelect()\", \"id\": \"id\", \"disabled\": \"disabled\", \"required\": \"required\", \"attr.name\": \"name || null\", \"attr.readonly\": \"readonly && !_isNativeSelect || null\", \"attr.aria-invalid\": \"(empty && required) ? null : errorState\", \"attr.aria-required\": \"required\", \"attr.id\": \"id\" }, classAttribute: \"mat-mdc-input-element\" }, providers: [{ provide: MatFormFieldControl, useExisting: MatInput }], exportAs: [\"matInput\"], usesOnChanges: true, ngImport: i0 }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: MatInput, decorators: [{\n type: Directive,\n args: [{\n selector: `input[matInput], textarea[matInput], select[matNativeControl],\n input[matNativeControl], textarea[matNativeControl]`,\n exportAs: 'matInput',\n host: {\n 'class': 'mat-mdc-input-element',\n // The BaseMatInput parent class adds `mat-input-element`, `mat-form-field-control` and\n // `mat-form-field-autofill-control` to the CSS class list, but this should not be added for\n // this MDC equivalent input.\n '[class.mat-input-server]': '_isServer',\n '[class.mat-mdc-form-field-textarea-control]': '_isInFormField && _isTextarea',\n '[class.mat-mdc-form-field-input-control]': '_isInFormField',\n '[class.mdc-text-field__input]': '_isInFormField',\n '[class.mat-mdc-native-select-inline]': '_isInlineSelect()',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[id]': 'id',\n '[disabled]': 'disabled',\n '[required]': 'required',\n '[attr.name]': 'name || null',\n '[attr.readonly]': 'readonly && !_isNativeSelect || null',\n // Only mark the input as invalid for assistive technology if it has a value since the\n // state usually overlaps with `aria-required` when the input is empty and can be redundant.\n '[attr.aria-invalid]': '(empty && required) ? null : errorState',\n '[attr.aria-required]': 'required',\n // Native input properties that are overwritten by Angular inputs need to be synced with\n // the native input element. Otherwise property bindings for those don't work.\n '[attr.id]': 'id',\n '(focus)': '_focusChanged(true)',\n '(blur)': '_focusChanged(false)',\n '(input)': '_onInput()',\n },\n providers: [{ provide: MatFormFieldControl, useExisting: MatInput }],\n standalone: true,\n }]\n }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.Platform }, { type: i2.NgControl, decorators: [{\n type: Optional\n }, {\n type: Self\n }] }, { type: i2.NgForm, decorators: [{\n type: Optional\n }] }, { type: i2.FormGroupDirective, decorators: [{\n type: Optional\n }] }, { type: i3.ErrorStateMatcher }, { type: undefined, decorators: [{\n type: Optional\n }, {\n type: Self\n }, {\n type: Inject,\n args: [MAT_INPUT_VALUE_ACCESSOR]\n }] }, { type: i4.AutofillMonitor }, { type: i0.NgZone }, { type: i5.MatFormField, decorators: [{\n type: Optional\n }, {\n type: Inject,\n args: [MAT_FORM_FIELD]\n }] }], propDecorators: { disabled: [{\n type: Input\n }], id: [{\n type: Input\n }], placeholder: [{\n type: Input\n }], name: [{\n type: Input\n }], required: [{\n type: Input\n }], type: [{\n type: Input\n }], errorStateMatcher: [{\n type: Input\n }], userAriaDescribedBy: [{\n type: Input,\n args: ['aria-describedby']\n }], value: [{\n type: Input\n }], readonly: [{\n type: Input\n }] } });\n\nclass MatInputModule {\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: MatInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }\n static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: \"14.0.0\", version: \"17.2.0\", ngImport: i0, type: MatInputModule, imports: [MatCommonModule, MatFormFieldModule, MatInput], exports: [MatInput, MatFormFieldModule, TextFieldModule, MatCommonModule] }); }\n static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: MatInputModule, imports: [MatCommonModule, MatFormFieldModule, MatFormFieldModule, TextFieldModule, MatCommonModule] }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.2.0\", ngImport: i0, type: MatInputModule, decorators: [{\n type: NgModule,\n args: [{\n imports: [MatCommonModule, MatFormFieldModule, MatInput],\n exports: [MatInput, MatFormFieldModule, TextFieldModule, MatCommonModule],\n }]\n }] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { MAT_INPUT_VALUE_ACCESSOR, MatInput, MatInputModule, getMatInputUnsupportedTypeError };\n","import { Component } from '@angular/core';\nimport {addDoc, collection, Firestore} from '@angular/fire/firestore/lite';\n\n@Component({\n selector: 'ngrx-contact-form',\n styles: [\n `\n :host {\n display: block;\n margin: 20px auto;\n max-width: 500px;\n }\n form {\n display: flex;\n flex-direction: column;\n }\n button {\n align-self: end;\n }\n `\n ],\n template: `\n <form *ngIf=\"!emailSent else thankYou\" #contactForm=\"ngForm\" (ngSubmit)=\"submit(contactForm.value)\">\n <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n <mat-label>Name</mat-label>\n <input matInput required ngModel name=\"fromName\" placeholder=\"Enter your name\">\n </mat-form-field>\n <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n <mat-label>Email</mat-label>\n <input type=\"email\" matInput ngModel email name=\"email\" required placeholder=\"Enter your email\">\n </mat-form-field>\n <mat-form-field class=\"example-full-width\" appearance=\"fill\">\n <mat-label>Message</mat-label>\n <textarea type=\"text\" matInput ngModel name=\"body\" required placeholder=\"Type your message\" rows=\"10\"></textarea>\n </mat-form-field>\n\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"!contactForm.valid\">Send</button>\n <div *ngIf=\"error\" class=\"alert is-critical\">\n <p>Error sending email</p>\n <p>{{error}}</p>\n </div>\n </form>\n <ng-template #thankYou>\n <div class=\"alert is-helpful\">\n <p>Thank you for reaching out.</p>\n <p>Our team would respond promptly.</p>\n </div>\n </ng-template>\n `\n})\n\nexport class ContactFormComponent {\n protected emailSent = false;\n protected error: unknown;\n\n constructor(private readonly firestore: Firestore ) { }\n\n submit(contact: {\n fromName: string;\n email: string;\n body: string;\n }) {\n const toEmails = ['info@ts.dev', 'brandon@ngrx.io', 'marko@ngrx.io', 'alex@ngrx.io'];\n addDoc(collection(this.firestore, 'mail'), {\n to: toEmails,\n from: contact.email,\n replyTo: [contact.email, ...toEmails],\n message: {\n subject: 'NgRx Workshops contact',\n text: `${contact.body}\\n${contact.fromName}`\n }\n }).then(\n () => this.emailSent = true,\n (e) => this.error = e,\n )\n }\n\n}\n","import { NgModule, Type } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { WithCustomElementComponent } from '../element-registry';\nimport { ContactFormComponent } from './contact-form.component';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\n\n@NgModule({\n imports: [CommonModule, MatButtonModule, FormsModule, MatFormFieldModule, MatInputModule],\n declarations: [ContactFormComponent],\n})\nexport class ContactFormModule implements WithCustomElementComponent {\n customElementComponent: Type<any> = ContactFormComponent;\n}\n"],"x_google_ignoreList":[0,1]}