{"version":3,"sources":["webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/vendor/bootstrap-vue/src/mixins/form-state.js","webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/components/base/form/form_input/form_input.js","webpack:///./lib/utils/vue3compat/get_instance_from_directive.js","webpack:///./vue_shared/directives/validation.js","webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/vendor/bootstrap-vue/src/utils/css-escape.js","webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/vendor/bootstrap-vue/src/components/layout/col.js","webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/vendor/bootstrap-vue/src/components/layout/form-row.js","webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/vendor/bootstrap-vue/src/components/form/form-text.js","webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/vendor/bootstrap-vue/src/components/form/form-invalid-feedback.js","webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/vendor/bootstrap-vue/src/components/form/form-valid-feedback.js","webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/vendor/bootstrap-vue/src/components/form-group/form-group.js","webpack:////build/gitlab/src/gitlab-foss/node_modules/@gitlab/ui/dist/components/base/form/form_group/form_group.js"],"names":["props","state","formStateMixin","computed","this","computedState","ariaInvalid","TYPES","__vue_script__","name","model","prop","event","value","type","Number","String","required","default","validator","includes","width","Object","values","every","id","undefined","autofocus","Boolean","disabled","form","placeholder","autocomplete","debounce","formatter","Function","lazy","lazyFormatter","number","plaintext","readonly","trim","list","max","min","step","localValue","vModelValue","modifyValue","localId","localType","computedId","computedAriaInvalid","defaultWidth","nonDefaultWidths","entries","map","_ref","breakpoint","isRange","isColor","widthClasses","stateClass","$listeners","input","onInput","change","onChange","blur","onBlur","Math","selectionStart","cache","$refs","val","selectionEnd","selectionDirection","validity","validationMessage","willValidate","watch","newValue","stringifyValue","modifiedValue","clearDebounce","setWheelStopper","$_inputDebounceTimer","noWheel","handleAutofocus","$nextTick","methods","_this$$refs$input","focus","_this$$refs$input2","clearTimeout","force","arguments","length","hasFormatter","doUpdate","$emit","$input","computedDebounce","setTimeout","target","composing","formattedValue","formatValue","defaultPrevented","propagation","updateValue","on","addEventListener","onWheelFocus","onWheelBlur","removeEventListener","document","stopWheel","window","requestAnimationFrame","_len","args","Array","_key","select","_len2","_key2","setSelectionRange","_len3","_key3","setRangeText","_len4","_key4","setCustomValidity","_len5","_key5","checkValidity","_len6","_key6","reportValidity","__vue_component__","render","_h","$createElement","_self","_c","_g","_b","ref","staticClass","class","computedClass","domProps","computedAttrs","computedListeners","staticRenderFns","getInstanceFromDirective","binding","vnode","instance","context","defaultFeedbackMap","valueMissing","isInvalid","el","_el$validity","message","__","urlTypeMismatch","_el$validity2","typeMismatch","focusFirstInvalidInput","e","formEl","invalidInput","querySelector","getInputElement","createValidator","feedbackMap","reportInvalidInput","formField","fields","isValid","feedback","field","find","f","elMessage","getAttribute","getFeedbackForElement","isEveryFieldValid","initValidation","customFeedbackMap","elDataMap","WeakMap","inserted","element","arg","showGlobalValidation","validate","elData","isTouched","isBlurred","set","markAsTouched","markAsBlurred","update","get","showValidationFeedback","initFormField","skipValidation","initForm","rest","showValidation","fromEntries","fieldName","fieldValues","escapeChar","ALIGN_SELF_VALUES","computeBreakpointClass","memoize","className","breakpointPropMap","BCol","functional","breakpoints","filter","identity","breakpointCol","reduce","breakpointOffset","breakpointOrder","col","offset","order","alignSelf","array","cols","tag","generateProps","h","data","children","classList","keys","i","c","replace","push","hasColClasses","some","test","BFormRow","inline","textVariant","BFormText","attrs","ariaLive","forceShow","role","tooltip","BFormInvalidFeedback","show","BFormValidFeedback","INPUTS","INPUT_SELECTOR","v","join","LEGEND_INTERACTIVE_ELEMENTS","BFormGroup","mixins","description","feedbackAriaLive","invalidFeedback","label","labelClass","labelFor","labelSize","labelSrOnly","validFeedback","validated","ariaDescribedby","getColProps","$props","getAlignClasses","contentColProps","labelColProps","oldValue","updateAriaDescribedby","prefix","result","propValue","firstCharCode","charCodeAt","split","char","index","charCode","toString","cssEscape","content","attr","newIds","oldIds","ids","concat","indexOf","tagName","inputs","isHorizontal","normalizeSlot","safeId","isFieldset","$label","labelContent","labelId","labelTag","for","click","onLegendClick","tabindex","labelAlignClasses","$invalidFeedback","invalidFeedbackContent","invalidFeedbackId","$validFeedback","validFeedbackContent","validFeedbackId","$description","descriptionContent","descriptionId","$content","components","inheritAttrs","labelDescription","optional","optionalText","isArray","$slots","_vm","actualLabelClass","scopedSlots","_u","key","fn","_t","_v","_s","$attrs","_e","proxy","_l","slot"],"mappings":"wFAAA,oIAiBA,MAAMA,EAAQ,YAAsB,CAElCC,MAAO,YAAS,IAAmB,OAClC,aAKGC,EAAiB,YAAO,CAC5BF,QACAG,SAAU,CACR,gBAEE,OAAO,YAAUC,KAAKH,OAASG,KAAKH,MAAQ,MAE9C,aACE,MAAMA,EAAQG,KAAKC,cACnB,OAAiB,IAAVJ,EAAiB,YAAuB,IAAVA,EAAkB,aAAe,MAExE,sBACE,MAAMK,EAAc,YAAgBF,MAAME,YAC1C,OAAoB,IAAhBA,GAAwC,SAAhBA,GAA0C,KAAhBA,IAGxB,IAAvBF,KAAKC,cAFH,OAEsCC,O,kCCzCrD,yKAWA,MAAMC,EAAQ,CAAC,OAAQ,WAAY,QAAS,SAAU,MAAO,MAAO,SAAU,QAAS,QAAS,OAAQ,OAAQ,WAAY,iBAAkB,QAAS,QA4oBvJ,MAAMC,EAzoBO,CACXC,KAAM,cACNC,MAAO,CACLC,KALe,QAMfC,MALgB,SAOlBZ,MAAO,CAILa,MAAO,CACLC,KAAM,CAACC,OAAQC,QACfC,UAAU,EACVC,QAAS,IAKXJ,KAAM,CACJA,KAAME,OACNC,UAAU,EACVC,QAAS,OACTC,UAAWN,GAASN,EAAMa,SAASP,IAKrCQ,MAAO,CACLP,KAAM,CAACE,OAAQM,QACfL,UAAU,EACVC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MtM,E,MAAoB,GACxB,CAAEC,OApBe,WAAa,IAAIsM,EAAI/U,KAAS0I,EAAGqM,EAAIpM,eAAmBE,EAAGkM,EAAInM,MAAMC,IAAIH,EAAG,OAAOG,EAAG,eAAekM,EAAIhM,GAAG,CAACE,YAAY,gBAAgB2G,MAAM,CAAC,cAAcmF,EAAIC,kBAAkBC,YAAYF,EAAIG,GAAG,CAAC,CAACC,IAAI,QAAQC,GAAG,WAAW,MAAO,CAACL,EAAIM,GAAG,SAAQ,WAAW,MAAO,CAACN,EAAIO,GAAG,WAAWP,EAAIQ,GAAGR,EAAIS,OAAO1E,OAAO,YAAaiE,EAAY,SAAElM,EAAG,OAAO,CAACI,YAAY,iBAAiB2G,MAAM,CAAC,cAAc,mBAAmB,CAACmF,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIH,iBAAiBG,EAAIU,SAAQV,EAAIO,GAAG,KAAMP,EAAuB,oBAAElM,EAAG,MAAM,CAACI,YAAY,oBAAoB2G,MAAM,CAAC,cAAc,sBAAsB,CAACmF,EAAIM,GAAG,qBAAoB,WAAW,MAAO,CAACN,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIL,wBAAuB,GAAGK,EAAIU,OAAOC,OAAM,GAAMX,EAAIY,GAAIzU,OAAO8N,KAAK+F,EAAID,SAAS,SAASc,GAAM,MAAO,CAACT,IAAIS,EAAKR,GAAG,WAAW,MAAO,CAACL,EAAIM,GAAGO,KAAQF,OAAM,OAAS,MAAK,IAAO,eAAeX,EAAIS,QAAO,KAoBl1BjM,gBAnBA,SAGEjI,EAkB5BlB,OAhBuBkB,GAIc,OAFLA,GAkBhC,OACAA,OACAA,OACAA,GAGW","file":"commons-pages.import.bitbucket_server.new-pages.import.gitea.new-pages.import.gitlab_projects.new-pa-2584d496.5b38c1e7.chunk.js","sourcesContent":["import { extend } from '../vue';\nimport { PROP_TYPE_BOOLEAN } from '../constants/props';\nimport { isBoolean } from '../utils/inspect';\nimport { makePropsConfigurable, makeProp } from '../utils/props';\nimport { safeVueInstance } from '../utils/safe-vue-instance';\n\n/* Form control contextual state class computation\n *\n * Returned class is either 'is-valid' or 'is-invalid' based on the 'state' prop\n * state can be one of five values:\n * - true for is-valid\n * - false for is-invalid\n * - null for no contextual state\n */\n\n// --- Props ---\n\nconst props = makePropsConfigurable({\n // Tri-state prop: true, false, null (or undefined)\n state: makeProp(PROP_TYPE_BOOLEAN, null)\n}, 'formState');\n\n// --- Mixin ---\n\n// @vue/component\nconst formStateMixin = extend({\n props,\n computed: {\n computedState() {\n // If not a boolean, ensure that value is null\n return isBoolean(this.state) ? this.state : null;\n },\n stateClass() {\n const state = this.computedState;\n return state === true ? 'is-valid' : state === false ? 'is-invalid' : null;\n },\n computedAriaInvalid() {\n const ariaInvalid = safeVueInstance(this).ariaInvalid;\n if (ariaInvalid === true || ariaInvalid === 'true' || ariaInvalid === '') {\n return 'true';\n }\n return this.computedState === false ? 'true' : ariaInvalid;\n }\n }\n});\n\nexport { formStateMixin, props };\n","import isObject from 'lodash/isObject';\nimport uniqueId from 'lodash/uniqueId';\nimport isBoolean from 'lodash/isBoolean';\nimport toInteger from 'lodash/toInteger';\nimport toString from 'lodash/toString';\nimport { toFloat } from '../../../../utils/number_utils';\nimport { stopEvent, isVisible } from '../../../../utils/utils';\nimport { formInputWidths } from '../../../../utils/constants';\nimport __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';\n\n// Valid supported input types\nconst TYPES = ['text', 'password', 'email', 'number', 'url', 'tel', 'search', 'range', 'color', 'date', 'time', 'datetime', 'datetime-local', 'month', 'week'];\nconst MODEL_PROP = 'value';\nconst MODEL_EVENT = 'input';\nvar script = {\n name: 'GlFormInput',\n model: {\n prop: MODEL_PROP,\n event: MODEL_EVENT\n },\n props: {\n /**\n * The current value of the input. Result will always be a string, except when the `number` prop is used\n */\n value: {\n type: [Number, String],\n required: false,\n default: ''\n },\n /**\n * The type of input to render.\n */\n type: {\n type: String,\n required: false,\n default: 'text',\n validator: value => TYPES.includes(value)\n },\n /**\n * Maximum width of the input\n */\n width: {\n type: [String, Object],\n required: false,\n default: null,\n validator: value => {\n const widths = isObject(value) ? Object.values(value) : [value];\n return widths.every(width => Object.values(formInputWidths).includes(width));\n }\n },\n /**\n * Used to set the `id` attribute on the rendered content, and used as the base to generate any additional element IDs as needed\n */\n id: {\n type: String,\n required: false,\n default: undefined\n },\n /**\n * When set to `true`, attempts to auto-focus the control when it is mounted, or re-activated when in a keep-alive. Does not set the `autofocus` attribute on the control\n */\n autofocus: {\n type: Boolean,\n required: false,\n default: false\n },\n /**\n * When set to `true`, disables the component's functionality and places it in a disabled state\n */\n disabled: {\n type: Boolean,\n required: false,\n default: false\n },\n /**\n * ID of the form that the form control belongs to. Sets the `form` attribute on the control\n */\n form: {\n type: String,\n required: false,\n default: undefined\n },\n /**\n * Sets the value of the `name` attribute on the form control\n */\n name: {\n type: String,\n required: false,\n default: undefined\n },\n /**\n * Adds the `required` attribute to the form control\n */\n required: {\n type: Boolean,\n required: false,\n default: false\n },\n /**\n * Controls the validation state appearance of the component. `true` for valid, `false` for invalid, or `null` for no validation state\n */\n state: {\n type: Boolean,\n required: false,\n default: null\n },\n /**\n * Sets the `placeholder` attribute value on the form control\n */\n placeholder: {\n type: String,\n required: false,\n default: undefined\n },\n /**\n * Optional value to set for the 'aria-invalid' attribute. Supported values are 'true' and 'false'. If not set, the 'state' prop will dictate the value\n */\n ariaInvalid: {\n type: [Boolean, String],\n required: false,\n default: false\n },\n /**\n * Sets the 'autocomplete' attribute value on the form control\n */\n autocomplete: {\n type: String,\n required: false,\n default: undefined\n },\n /**\n * When set to a number of milliseconds greater than zero, will debounce the user input. Has no effect if prop 'lazy' is set\n */\n debounce: {\n type: [Number, String],\n required: false,\n default: undefined\n },\n /**\n * Reference to a function for formatting the input\n */\n formatter: {\n type: Function,\n required: false,\n default: undefined\n },\n /**\n * When set, updates the v-model on 'change'/'blur' events instead of 'input'. Emulates the Vue '.lazy' v-model modifier\n */\n lazy: {\n type: Boolean,\n required: false,\n default: false\n },\n /**\n * When set, the input is formatted on blur instead of each keystroke (if there is a formatter specified)\n */\n lazyFormatter: {\n type: Boolean,\n required: false,\n default: false\n },\n /**\n * When set attempts to convert the input value to a native number. Emulates the Vue '.number' v-model modifier\n */\n number: {\n type: Boolean,\n required: false,\n default: false\n },\n /**\n * Set the form control as readonly and renders the control to look like plain text (no borders)\n */\n plaintext: {\n type: Boolean,\n required: false,\n default: false\n },\n /**\n * Sets the `readonly` attribute on the form control\n */\n readonly: {\n type: Boolean,\n required: false,\n default: false\n },\n /**\n * When set, trims any leading and trailing white space from the input value. Emulates the Vue '.trim' v-model modifier\n */\n trim: {\n type: Boolean,\n required: false,\n default: false\n },\n /**\n * The ID of the associated datalist element or component\n */\n list: {\n type: String,\n required: false,\n default: undefined\n },\n /**\n * Value to set in the 'max' attribute on the input. Used by number-like inputs\n */\n max: {\n type: [Number, String],\n required: false,\n default: undefined\n },\n /**\n * Value to set in the 'min' attribute on the input. Used by number-like inputs\n */\n min: {\n type: [Number, String],\n required: false,\n default: undefined\n },\n /**\n * Value to set in the 'step' attribute on the input. Used by number-like inputs\n */\n step: {\n type: [Number, String],\n required: false,\n default: undefined\n }\n },\n data() {\n return {\n localValue: toString(this.value),\n vModelValue: this.modifyValue(this.value),\n localId: null\n };\n },\n computed: {\n computedId() {\n return this.id || this.localId;\n },\n localType() {\n // We only allow certain types\n const {\n type\n } = this;\n return TYPES.includes(type) ? type : 'text';\n },\n computedAriaInvalid() {\n const {\n ariaInvalid\n } = this;\n if (ariaInvalid === true || ariaInvalid === 'true' || ariaInvalid === '') {\n return 'true';\n }\n return this.computedState === false ? 'true' : ariaInvalid;\n },\n computedAttrs() {\n const {\n localType: type,\n name,\n form,\n disabled,\n placeholder,\n required,\n min,\n max,\n step\n } = this;\n return {\n id: this.computedId,\n name,\n form,\n type,\n disabled,\n placeholder,\n required,\n autocomplete: this.autocomplete || null,\n readonly: this.readonly || this.plaintext,\n min,\n max,\n step,\n list: type !== 'password' ? this.list : null,\n 'aria-required': required ? 'true' : null,\n 'aria-invalid': this.computedAriaInvalid\n };\n },\n computedState() {\n // If not a boolean, ensure that value is null\n return isBoolean(this.state) ? this.state : null;\n },\n stateClass() {\n if (this.computedState === true) return 'is-valid';\n if (this.computedState === false) return 'is-invalid';\n return null;\n },\n widthClasses() {\n if (this.width === null) {\n return [];\n }\n if (isObject(this.width)) {\n const {\n default: defaultWidth,\n ...nonDefaultWidths\n } = this.width;\n return [\n // eslint-disable-next-line @gitlab/tailwind-no-interpolation -- Not a CSS utility\n ...(defaultWidth ? [`gl-form-input-${defaultWidth}`] : []), ...Object.entries(nonDefaultWidths).map(\n // eslint-disable-next-line @gitlab/tailwind-no-interpolation -- Not a CSS utility\n _ref => {\n let [breakpoint, width] = _ref;\n return `gl-${breakpoint}-form-input-${width}`;\n })];\n }\n\n // eslint-disable-next-line @gitlab/tailwind-no-interpolation -- Not a CSS utility\n return [`gl-form-input-${this.width}`];\n },\n computedClass() {\n const {\n plaintext,\n type\n } = this;\n const isRange = type === 'range';\n const isColor = type === 'color';\n return [...this.widthClasses, {\n // Range input needs class `custom-range`\n 'custom-range': isRange,\n // `plaintext` not supported by `type=\"range\"` or `type=\"color\"`\n 'form-control-plaintext': plaintext && !isRange && !isColor,\n // `form-control` not used by `type=\"range\"` or `plaintext`\n // Always used by `type=\"color\"`\n 'form-control': isColor || !plaintext && !isRange\n }, this.stateClass];\n },\n computedListeners() {\n return {\n ...this.$listeners,\n input: this.onInput,\n change: this.onChange,\n blur: this.onBlur\n };\n },\n computedDebounce() {\n // Ensure we have a positive number equal to or greater than 0\n return Math.max(toInteger(this.debounce), 0);\n },\n hasFormatter() {\n return typeof this.formatter === 'function';\n },\n noWheel() {\n return this.type === 'number';\n },\n selectionStart: {\n // Expose selectionStart for formatters, etc\n cache: false,\n get() {\n return this.$refs.input.selectionStart;\n },\n set(val) {\n this.$refs.input.selectionStart = val;\n }\n },\n selectionEnd: {\n // Expose selectionEnd for formatters, etc\n cache: false,\n get() {\n return this.$refs.input.selectionEnd;\n },\n set(val) {\n this.$refs.input.selectionEnd = val;\n }\n },\n selectionDirection: {\n // Expose selectionDirection for formatters, etc\n cache: false,\n get() {\n return this.$refs.input.selectionDirection;\n },\n set(val) {\n this.$refs.input.selectionDirection = val;\n }\n },\n validity: {\n // Expose validity property\n cache: false,\n get() {\n return this.$refs.input.validity;\n }\n },\n validationMessage: {\n // Expose validationMessage property\n cache: false,\n get() {\n return this.$refs.input.validationMessage;\n }\n },\n willValidate: {\n // Expose willValidate property\n cache: false,\n get() {\n return this.$refs.input.willValidate;\n }\n }\n },\n watch: {\n value(newValue) {\n const stringifyValue = toString(newValue);\n const modifiedValue = this.modifyValue(newValue);\n if (stringifyValue !== this.localValue || modifiedValue !== this.vModelValue) {\n // Clear any pending debounce timeout, as we are overwriting the user input\n this.clearDebounce();\n // Update the local values\n this.localValue = stringifyValue;\n this.vModelValue = modifiedValue;\n }\n },\n noWheel(newValue) {\n this.setWheelStopper(newValue);\n }\n },\n created() {\n // Create private non-reactive props\n this.$_inputDebounceTimer = null;\n },\n mounted() {\n this.setWheelStopper(this.noWheel);\n this.handleAutofocus();\n this.$nextTick(() => {\n // Update DOM with auto-generated ID after mount\n // to prevent SSR hydration errors\n this.localId = uniqueId('gl-form-input-');\n });\n },\n deactivated() {\n // Turn off listeners when keep-alive component deactivated\n this.setWheelStopper(false);\n },\n activated() {\n // Turn on listeners (if no-wheel) when keep-alive component activated\n this.setWheelStopper(this.noWheel);\n this.handleAutofocus();\n },\n beforeDestroy() {\n this.setWheelStopper(false);\n this.clearDebounce();\n },\n methods: {\n focus() {\n if (!this.disabled) {\n var _this$$refs$input;\n (_this$$refs$input = this.$refs.input) === null || _this$$refs$input === void 0 ? void 0 : _this$$refs$input.focus();\n }\n },\n blur() {\n if (!this.disabled) {\n var _this$$refs$input2;\n (_this$$refs$input2 = this.$refs.input) === null || _this$$refs$input2 === void 0 ? void 0 : _this$$refs$input2.blur();\n }\n },\n clearDebounce() {\n clearTimeout(this.$_inputDebounceTimer);\n this.$_inputDebounceTimer = null;\n },\n formatValue(value, event) {\n let force = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n let newValue = toString(value);\n if (this.hasFormatter && (!this.lazyFormatter || force)) {\n newValue = this.formatter(value, event);\n }\n return newValue;\n },\n modifyValue(value) {\n let newValue = toString(value);\n // Emulate `.trim` modifier behaviour\n if (this.trim) {\n newValue = newValue.trim();\n }\n // Emulate `.number` modifier behaviour\n if (this.number) {\n newValue = toFloat(newValue, newValue);\n }\n return newValue;\n },\n updateValue(value) {\n let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n const {\n lazy\n } = this;\n if (lazy && !force) {\n return;\n }\n // Make sure to always clear the debounce when `updateValue()`\n // is called, even when the v-model hasn't changed\n this.clearDebounce();\n // Define the shared update logic in a method to be able to use\n // it for immediate and debounced value changes\n const doUpdate = () => {\n const newValue = this.modifyValue(value);\n if (newValue !== this.vModelValue) {\n this.vModelValue = newValue;\n this.$emit(MODEL_EVENT, newValue);\n } else if (this.hasFormatter) {\n // When the `vModelValue` hasn't changed but the actual input value\n // is out of sync, make sure to change it to the given one\n // Usually caused by browser autocomplete and how it triggers the\n // change or input event, or depending on the formatter function\n // https://github.com/bootstrap-vue/bootstrap-vue/issues/2657\n // https://github.com/bootstrap-vue/bootstrap-vue/issues/3498\n const $input = this.$refs.input;\n if ($input && newValue !== $input.value) {\n $input.value = newValue;\n }\n }\n };\n // Only debounce the value update when a value greater than `0`\n // is set and we are not in lazy mode or this is a forced update\n const debounce = this.computedDebounce;\n if (debounce > 0 && !lazy && !force) {\n this.$_inputDebounceTimer = setTimeout(doUpdate, debounce);\n } else {\n // Immediately update the v-model\n doUpdate();\n }\n },\n onInput(event) {\n // `event.target.composing` is set by Vue\n // https://github.com/vuejs/vue/blob/dev/src/platforms/web/runtime/directives/model.js\n // TODO: Is this needed now with the latest Vue?\n if (event.target.composing) {\n return;\n }\n const {\n value\n } = event.target;\n const formattedValue = this.formatValue(value, event);\n // Exit when the `formatter` function strictly returned `false`\n // or prevented the input event\n if (formattedValue === false || event.defaultPrevented) {\n stopEvent(event, {\n propagation: false\n });\n return;\n }\n this.localValue = formattedValue;\n this.updateValue(formattedValue);\n /**\n * The `input` and `update` events are swapped\n * see https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/1628\n */\n this.$emit('update', formattedValue);\n },\n onChange(event) {\n const {\n value\n } = event.target;\n const formattedValue = this.formatValue(value, event);\n // Exit when the `formatter` function strictly returned `false`\n // or prevented the input event\n if (formattedValue === false || event.defaultPrevented) {\n stopEvent(event, {\n propagation: false\n });\n return;\n }\n this.localValue = formattedValue;\n this.updateValue(formattedValue, true);\n this.$emit('change', formattedValue);\n },\n onBlur(event) {\n // Apply the `localValue` on blur to prevent cursor jumps\n // on mobile browsers (e.g. caused by autocomplete)\n const {\n value\n } = event.target;\n const formattedValue = this.formatValue(value, event, true);\n if (formattedValue !== false) {\n // We need to use the modified value here to apply the\n // `.trim` and `.number` modifiers properly\n this.localValue = toString(this.modifyValue(formattedValue));\n // We pass the formatted value here since the `updateValue` method\n // handles the modifiers itself\n this.updateValue(formattedValue, true);\n }\n // Emit native blur event\n this.$emit('blur', event);\n },\n setWheelStopper(on) {\n const {\n input\n } = this.$refs;\n // We use native events, so that we don't interfere with propagation\n if (on) {\n input.addEventListener('focus', this.onWheelFocus);\n input.addEventListener('blur', this.onWheelBlur);\n } else {\n input.removeEventListener('focus', this.onWheelFocus);\n input.removeEventListener('blur', this.onWheelBlur);\n document.removeEventListener('wheel', this.stopWheel);\n }\n },\n onWheelFocus() {\n document.addEventListener('wheel', this.stopWheel);\n },\n onWheelBlur() {\n document.removeEventListener('wheel', this.stopWheel);\n },\n stopWheel(event) {\n stopEvent(event, {\n propagation: false\n });\n this.blur();\n },\n handleAutofocus() {\n this.$nextTick(() => {\n window.requestAnimationFrame(() => {\n if (this.autofocus && isVisible(this.$refs.input)) this.focus();\n });\n });\n },\n select() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n // For external handler that may want a select() method\n this.$refs.input.select(args);\n },\n setSelectionRange() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n // For external handler that may want a setSelectionRange(a,b,c) method\n this.$refs.input.setSelectionRange(args);\n },\n setRangeText() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n // For external handler that may want a setRangeText(a,b,c) method\n this.$refs.input.setRangeText(args);\n },\n setCustomValidity() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n // For external handler that may want a setCustomValidity(...) method\n return this.$refs.input.setCustomValidity(args);\n },\n checkValidity() {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n // For external handler that may want a checkValidity(...) method\n return this.$refs.input.checkValidity(args);\n },\n reportValidity() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n // For external handler that may want a reportValidity(...) method\n return this.$refs.input.reportValidity(args);\n }\n }\n};\n\n/* script */\nconst __vue_script__ = script;\n\n/* template */\nvar __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('input',_vm._g(_vm._b({ref:\"input\",staticClass:\"gl-form-input\",class:_vm.computedClass,domProps:{\"value\":_vm.localValue}},'input',_vm.computedAttrs,false),_vm.computedListeners))};\nvar __vue_staticRenderFns__ = [];\n\n /* style */\n const __vue_inject_styles__ = undefined;\n /* scoped */\n const __vue_scope_id__ = undefined;\n /* module identifier */\n const __vue_module_identifier__ = undefined;\n /* functional template */\n const __vue_is_functional_template__ = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n const __vue_component__ = __vue_normalize__(\n { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n undefined,\n undefined,\n undefined\n );\n\nexport default __vue_component__;\n","// See https://v3-migration.vuejs.org/breaking-changes/custom-directives.html#edge-case-accessing-the-component-instance\nexport function getInstanceFromDirective({ binding, vnode }) {\n if (binding.instance) {\n // this is Vue.js 3, even in compat mode\n return binding.instance;\n }\n\n return vnode.context;\n}\n","import { __ } from '~/locale';\nimport { getInstanceFromDirective } from '~/lib/utils/vue3compat/get_instance_from_directive';\n\n/**\n * Validation messages will take priority based on the property order.\n *\n * For example:\n * { valueMissing: {...}, urlTypeMismatch: {...} }\n *\n * `valueMissing` will be displayed the user has entered a value\n * after that, if the input is not a valid URL then `urlTypeMismatch` will show\n */\nconst defaultFeedbackMap = {\n valueMissing: {\n isInvalid: (el) => el.validity?.valueMissing,\n message: __('Please fill out this field.'),\n },\n urlTypeMismatch: {\n isInvalid: (el) => el.type === 'url' && el.validity?.typeMismatch,\n message: __('Please enter a valid URL format, ex: http://www.example.com/home'),\n },\n};\n\nconst getFeedbackForElement = (feedbackMap, el) => {\n const field = Object.values(feedbackMap).find((f) => f.isInvalid(el));\n let elMessage = null;\n if (field) {\n elMessage = el.getAttribute('validation-message');\n }\n\n return elMessage || field?.message || el.validationMessage;\n};\n\nconst focusFirstInvalidInput = (e) => {\n const { target: formEl } = e;\n const invalidInput = formEl.querySelector('input:invalid');\n\n if (invalidInput) {\n invalidInput.focus();\n }\n};\n\nconst getInputElement = (el) => {\n return el.querySelector('input') || el;\n};\n\nconst isEveryFieldValid = (form) => Object.values(form.fields).every(({ state }) => state === true);\n\nconst createValidator =\n (feedbackMap) =>\n ({ el, form, reportInvalidInput = false }) => {\n const { name } = el;\n\n if (!name) {\n if (process.env.NODE_ENV === 'development') {\n // eslint-disable-next-line no-console\n console.warn(\n '[gitlab] the validation directive requires the given input to have \"name\" attribute',\n );\n }\n return;\n }\n\n const formField = form.fields[name];\n const isValid = el.checkValidity();\n\n // This makes sure we always report valid fields - this can be useful for cases where the consuming\n // component's logic depends on certain fields being in a valid state.\n // Invalid input, on the other hand, should only be reported once we want to display feedback to the user.\n // (eg.: After a field has been touched and moved away from, a submit-button has been clicked, ...)\n formField.state = reportInvalidInput ? isValid : isValid || null;\n formField.feedback = reportInvalidInput ? getFeedbackForElement(feedbackMap, el) : '';\n\n // eslint-disable-next-line no-param-reassign\n form.state = isEveryFieldValid(form);\n };\n\n/**\n * Takes an object that allows to add or change custom feedback messages.\n * See possibilities here: https://developer.mozilla.org/en-US/docs/Web/API/ValidityState\n *\n * The passed in object will be merged with the built-in feedback\n * so it is possible to override a built-in message.\n *\n * @example\n * validate({\n * tooLong: {\n * isInvalid: el => el.validity.tooLong === true,\n * message: 'Your custom feedback'\n * }\n * })\n *\n * @example\n * validate({\n * valueMissing: {\n * message: 'Your custom feedback'\n * }\n * })\n *\n * @param {Object} customFeedbackMap\n * @returns {{ inserted: function, update: function }} validateDirective\n */\nexport default function initValidation(customFeedbackMap = {}) {\n const feedbackMap = { ...defaultFeedbackMap, ...customFeedbackMap };\n const elDataMap = new WeakMap();\n\n return {\n inserted(element, binding, vnode) {\n const { arg: showGlobalValidation } = binding;\n const el = getInputElement(element);\n const { form: formEl } = el;\n const instance = getInstanceFromDirective({ binding, vnode });\n\n const validate = createValidator(feedbackMap);\n const elData = { validate, isTouched: false, isBlurred: false };\n\n elDataMap.set(el, elData);\n\n el.addEventListener('input', function markAsTouched() {\n elData.isTouched = true;\n // once the element has been marked as touched we can stop listening on the 'input' event\n el.removeEventListener('input', markAsTouched);\n });\n\n el.addEventListener('blur', function markAsBlurred({ target }) {\n if (elData.isTouched) {\n elData.isBlurred = true;\n validate({ el: target, form: instance.form, reportInvalidInput: true });\n // this event handler can be removed, since the live-feedback in `update` takes over\n el.removeEventListener('blur', markAsBlurred);\n }\n });\n\n if (formEl) {\n formEl.addEventListener('submit', focusFirstInvalidInput);\n }\n\n validate({ el, form: instance.form, reportInvalidInput: showGlobalValidation });\n },\n update(element, binding, vnode) {\n const el = getInputElement(element);\n const { arg: showGlobalValidation } = binding;\n const { validate, isTouched, isBlurred } = elDataMap.get(el);\n const showValidationFeedback = showGlobalValidation || (isTouched && isBlurred);\n\n const instance = getInstanceFromDirective({ binding, vnode });\n validate({ el, form: instance.form, reportInvalidInput: showValidationFeedback });\n },\n };\n}\n\n/**\n * This is a helper that initialize the form fields structure to be used in initForm\n * @param {*} fieldValues\n * @returns formObject\n */\nexport const initFormField = ({ value, required = true, skipValidation = false }) => ({\n value,\n required,\n state: skipValidation ? true : null,\n feedback: null,\n});\n\n/**\n * This is a helper that initialize the form structure that is compliant to be used with the validation directive\n *\n * @example\n * const form initForm = initForm({\n * fields: {\n * name: {\n * value: 'lorem'\n * },\n * description: {\n * value: 'ipsum',\n * required: false,\n * skipValidation: true\n * }\n * }\n * })\n *\n * @example\n * const form initForm = initForm({\n * state: true, // to override\n * foo: { // something custom\n * bar: 'lorem'\n * },\n * fields: {...}\n * })\n *\n * @param {*} formObject\n * @returns form\n */\nexport const initForm = ({ fields = {}, ...rest } = {}) => {\n const initFields = Object.fromEntries(\n Object.entries(fields).map(([fieldName, fieldValues]) => {\n return [fieldName, initFormField(fieldValues)];\n }),\n );\n\n return {\n state: false,\n showValidation: false,\n ...rest,\n fields: initFields,\n };\n};\n","import { toString } from './string';\n\nconst escapeChar = value => '\\\\' + value;\n\n// The `cssEscape()` util is based on this `CSS.escape()` polyfill:\n// https://github.com/mathiasbynens/CSS.escape\nconst cssEscape = value => {\n value = toString(value);\n const length = value.length;\n const firstCharCode = value.charCodeAt(0);\n return value.split('').reduce((result, char, index) => {\n const charCode = value.charCodeAt(index);\n\n // If the character is NULL (U+0000), use (U+FFFD) as replacement\n if (charCode === 0x0000) {\n return result + '\\uFFFD';\n }\n\n // If the character ...\n if (\n // ... is U+007F OR\n charCode === 0x007f ||\n // ... is in the range [\\1-\\1F] (U+0001 to U+001F) OR ...\n charCode >= 0x0001 && charCode <= 0x001f ||\n // ... is the first character and is in the range [0-9] (U+0030 to U+0039) OR ...\n index === 0 && charCode >= 0x0030 && charCode <= 0x0039 ||\n // ... is the second character and is in the range [0-9] (U+0030 to U+0039)\n // and the first character is a `-` (U+002D) ...\n index === 1 && charCode >= 0x0030 && charCode <= 0x0039 && firstCharCode === 0x002d) {\n // ... https://drafts.csswg.org/cssom/#escape-a-character-as-code-point\n return result + escapeChar(`${charCode.toString(16)} `);\n }\n\n // If the character ...\n if (\n // ... is the first character AND ...\n index === 0 &&\n // ... is a `-` (U+002D) AND ...\n charCode === 0x002d &&\n // ... there is no second character ...\n length === 1) {\n // ... use the escaped character\n return result + escapeChar(char);\n }\n\n // If the character ...\n if (\n // ... is greater than or equal to U+0080 OR ...\n charCode >= 0x0080 ||\n // ... is `-` (U+002D) OR ...\n charCode === 0x002d ||\n // ... is `_` (U+005F) OR ...\n charCode === 0x005f ||\n // ... is in the range [0-9] (U+0030 to U+0039) OR ...\n charCode >= 0x0030 && charCode <= 0x0039 ||\n // ... is in the range [A-Z] (U+0041 to U+005A) OR ...\n charCode >= 0x0041 && charCode <= 0x005a ||\n // ... is in the range [a-z] (U+0061 to U+007A) ...\n charCode >= 0x0061 && charCode <= 0x007a) {\n // ... use the character itself\n return result + char;\n }\n\n // Otherwise use the escaped character\n // See: https://drafts.csswg.org/cssom/#escape-a-character\n return result + escapeChar(char);\n }, '');\n};\n\nexport { cssEscape };\n","import { mergeData } from '../../vue';\nimport { NAME_COL } from '../../constants/components';\nimport { PROP_TYPE_BOOLEAN_NUMBER_STRING, PROP_TYPE_NUMBER_STRING, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';\nimport { RX_COL_CLASS } from '../../constants/regex';\nimport { arrayIncludes } from '../../utils/array';\nimport { getBreakpointsUpCached } from '../../utils/config';\nimport { identity } from '../../utils/identity';\nimport { isUndefinedOrNull } from '../../utils/inspect';\nimport { memoize } from '../../utils/memoize';\nimport { create, assign, keys, sortKeys } from '../../utils/object';\nimport { makeProp, suffixPropName, makePropsConfigurable } from '../../utils/props';\nimport { lowerCase } from '../../utils/string';\n\n// --- Constants ---\n\nconst ALIGN_SELF_VALUES = ['auto', 'start', 'end', 'center', 'baseline', 'stretch'];\n\n// --- Helper methods ---\n\n// Compute a breakpoint class name\nconst computeBreakpoint = (type, breakpoint, value) => {\n let className = type;\n if (isUndefinedOrNull(value) || value === false) {\n return undefined;\n }\n if (breakpoint) {\n className += `-${breakpoint}`;\n }\n // Handling the boolean style prop when accepting `[Boolean, String, Number]`\n // means Vue will not convert `` to `sm: true` for us\n // Since the default is `false`, '' indicates the prop's presence\n if (type === 'col' && (value === '' || value === true)) {\n // .col-md\n return lowerCase(className);\n }\n // .order-md-6\n className += `-${value}`;\n return lowerCase(className);\n};\n\n// Memoized function for better performance on generating class names\nconst computeBreakpointClass = memoize(computeBreakpoint);\n\n// Cached copy of the breakpoint prop names\nlet breakpointPropMap = create(null);\n\n// --- Props ---\n\n// Prop generator for lazy generation of props\nconst generateProps = () => {\n // Grab the breakpoints from the cached config (exclude the '' (xs) breakpoint)\n const breakpoints = getBreakpointsUpCached().filter(identity);\n\n // i.e. 'col-sm', 'col-md-6', 'col-lg-auto', ...\n const breakpointCol = breakpoints.reduce((props, breakpoint) => {\n props[breakpoint] = makeProp(PROP_TYPE_BOOLEAN_NUMBER_STRING);\n return props;\n }, create(null));\n\n // i.e. 'offset-md-1', 'offset-lg-12', ...\n const breakpointOffset = breakpoints.reduce((props, breakpoint) => {\n props[suffixPropName(breakpoint, 'offset')] = makeProp(PROP_TYPE_NUMBER_STRING);\n return props;\n }, create(null));\n\n // i.e. 'order-md-1', 'order-lg-12', ...\n const breakpointOrder = breakpoints.reduce((props, breakpoint) => {\n props[suffixPropName(breakpoint, 'order')] = makeProp(PROP_TYPE_NUMBER_STRING);\n return props;\n }, create(null));\n\n // For loop doesn't need to check `.hasOwnProperty()`\n // when using an object created from `null`\n breakpointPropMap = assign(create(null), {\n col: keys(breakpointCol),\n offset: keys(breakpointOffset),\n order: keys(breakpointOrder)\n });\n\n // Return the generated props\n return makePropsConfigurable(sortKeys({\n ...breakpointCol,\n ...breakpointOffset,\n ...breakpointOrder,\n // Flex alignment\n alignSelf: makeProp(PROP_TYPE_STRING, null, value => {\n return arrayIncludes(ALIGN_SELF_VALUES, value);\n }),\n // Generic flexbox 'col' (xs)\n col: makeProp(PROP_TYPE_BOOLEAN, false),\n // i.e. 'col-1', 'col-2', 'col-auto', ...\n cols: makeProp(PROP_TYPE_NUMBER_STRING),\n offset: makeProp(PROP_TYPE_NUMBER_STRING),\n order: makeProp(PROP_TYPE_NUMBER_STRING),\n tag: makeProp(PROP_TYPE_STRING, 'div')\n }), NAME_COL);\n};\n\n// --- Main component ---\n\n// We do not use extend here as that would evaluate the props\n// immediately, which we do not want to happen\n// @vue/component\nconst BCol = {\n name: NAME_COL,\n functional: true,\n get props() {\n // Allow props to be lazy evaled on first access and\n // then they become a non-getter afterwards.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#Smart_self-overwriting_lazy_getters\n delete this.props;\n // eslint-disable-next-line no-return-assign\n return this.props = generateProps();\n },\n render(h, _ref) {\n let {\n props,\n data,\n children\n } = _ref;\n const {\n cols,\n offset,\n order,\n alignSelf\n } = props;\n const classList = [];\n // Loop through `col`, `offset`, `order` breakpoint props\n for (const type in breakpointPropMap) {\n // Returns colSm, offset, offsetSm, orderMd, etc.\n const keys = breakpointPropMap[type];\n for (let i = 0; i < keys.length; i++) {\n // computeBreakpoint(col, colSm => Sm, value=[String, Number, Boolean])\n const c = computeBreakpointClass(type, keys[i].replace(type, ''), props[keys[i]]);\n // If a class is returned, push it onto the array.\n if (c) {\n classList.push(c);\n }\n }\n }\n const hasColClasses = classList.some(className => RX_COL_CLASS.test(className));\n classList.push({\n // Default to .col if no other col-{bp}-* classes generated nor `cols` specified.\n col: props.col || !hasColClasses && !cols,\n [`col-${cols}`]: cols,\n [`offset-${offset}`]: offset,\n [`order-${order}`]: order,\n [`align-self-${alignSelf}`]: alignSelf\n });\n return h(props.tag, mergeData(data, {\n class: classList\n }), children);\n }\n};\n\nexport { BCol, generateProps };\n","import { extend, mergeData } from '../../vue';\nimport { NAME_FORM_ROW } from '../../constants/components';\nimport { PROP_TYPE_STRING } from '../../constants/props';\nimport { makePropsConfigurable, makeProp } from '../../utils/props';\n\n// --- Props ---\n\nconst props = makePropsConfigurable({\n tag: makeProp(PROP_TYPE_STRING, 'div')\n}, NAME_FORM_ROW);\n\n// --- Main component ---\n\n// @vue/component\nconst BFormRow = /*#__PURE__*/extend({\n name: NAME_FORM_ROW,\n functional: true,\n props,\n render(h, _ref) {\n let {\n props,\n data,\n children\n } = _ref;\n return h(props.tag, mergeData(data, {\n staticClass: 'form-row'\n }), children);\n }\n});\n\nexport { BFormRow, props };\n","import { extend, mergeData } from '../../vue';\nimport { NAME_FORM_TEXT } from '../../constants/components';\nimport { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';\nimport { makePropsConfigurable, makeProp } from '../../utils/props';\n\n// --- Props ---\n\nconst props = makePropsConfigurable({\n id: makeProp(PROP_TYPE_STRING),\n inline: makeProp(PROP_TYPE_BOOLEAN, false),\n tag: makeProp(PROP_TYPE_STRING, 'small'),\n textVariant: makeProp(PROP_TYPE_STRING, 'muted')\n}, NAME_FORM_TEXT);\n\n// --- Main component ---\n\n// @vue/component\nconst BFormText = /*#__PURE__*/extend({\n name: NAME_FORM_TEXT,\n functional: true,\n props,\n render(h, _ref) {\n let {\n props,\n data,\n children\n } = _ref;\n return h(props.tag, mergeData(data, {\n class: {\n 'form-text': !props.inline,\n [`text-${props.textVariant}`]: props.textVariant\n },\n attrs: {\n id: props.id\n }\n }), children);\n }\n});\n\nexport { BFormText, props };\n","import { extend, mergeData } from '../../vue';\nimport { NAME_FORM_INVALID_FEEDBACK } from '../../constants/components';\nimport { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';\nimport { makePropsConfigurable, makeProp } from '../../utils/props';\n\n// --- Props ---\n\nconst props = makePropsConfigurable({\n ariaLive: makeProp(PROP_TYPE_STRING),\n forceShow: makeProp(PROP_TYPE_BOOLEAN, false),\n id: makeProp(PROP_TYPE_STRING),\n role: makeProp(PROP_TYPE_STRING),\n // Tri-state prop: `true`, `false`, or `null`\n state: makeProp(PROP_TYPE_BOOLEAN, null),\n tag: makeProp(PROP_TYPE_STRING, 'div'),\n tooltip: makeProp(PROP_TYPE_BOOLEAN, false)\n}, NAME_FORM_INVALID_FEEDBACK);\n\n// --- Main component ---\n\n// @vue/component\nconst BFormInvalidFeedback = /*#__PURE__*/extend({\n name: NAME_FORM_INVALID_FEEDBACK,\n functional: true,\n props,\n render(h, _ref) {\n let {\n props,\n data,\n children\n } = _ref;\n const {\n tooltip,\n ariaLive\n } = props;\n const show = props.forceShow === true || props.state === false;\n return h(props.tag, mergeData(data, {\n class: {\n '!gl-block': show,\n 'invalid-feedback': !tooltip,\n 'invalid-tooltip': tooltip\n },\n attrs: {\n id: props.id || null,\n role: props.role || null,\n 'aria-live': ariaLive || null,\n 'aria-atomic': ariaLive ? 'true' : null\n }\n }), children);\n }\n});\n\nexport { BFormInvalidFeedback, props };\n","import { extend, mergeData } from '../../vue';\nimport { NAME_FORM_VALID_FEEDBACK } from '../../constants/components';\nimport { PROP_TYPE_STRING, PROP_TYPE_BOOLEAN } from '../../constants/props';\nimport { makePropsConfigurable, makeProp } from '../../utils/props';\n\n// --- Props ---\n\nconst props = makePropsConfigurable({\n ariaLive: makeProp(PROP_TYPE_STRING),\n forceShow: makeProp(PROP_TYPE_BOOLEAN, false),\n id: makeProp(PROP_TYPE_STRING),\n role: makeProp(PROP_TYPE_STRING),\n // Tri-state prop: `true`, `false`, or `null`\n state: makeProp(PROP_TYPE_BOOLEAN, null),\n tag: makeProp(PROP_TYPE_STRING, 'div'),\n tooltip: makeProp(PROP_TYPE_BOOLEAN, false)\n}, NAME_FORM_VALID_FEEDBACK);\n\n// --- Main component ---\n\n// @vue/component\nconst BFormValidFeedback = /*#__PURE__*/extend({\n name: NAME_FORM_VALID_FEEDBACK,\n functional: true,\n props,\n render(h, _ref) {\n let {\n props,\n data,\n children\n } = _ref;\n const {\n tooltip,\n ariaLive\n } = props;\n const show = props.forceShow === true || props.state === true;\n return h(props.tag, mergeData(data, {\n class: {\n '!gl-block': show,\n 'valid-feedback': !tooltip,\n 'valid-tooltip': tooltip\n },\n attrs: {\n id: props.id || null,\n role: props.role || null,\n 'aria-live': ariaLive || null,\n 'aria-atomic': ariaLive ? 'true' : null\n }\n }), children);\n }\n});\n\nexport { BFormValidFeedback, props };\n","import { NAME_FORM_GROUP } from '../../constants/components';\nimport { IS_BROWSER } from '../../constants/env';\nimport { PROP_TYPE_BOOLEAN_NUMBER_STRING, PROP_TYPE_STRING, PROP_TYPE_BOOLEAN, PROP_TYPE_ARRAY_OBJECT_STRING } from '../../constants/props';\nimport { RX_SPACE_SPLIT } from '../../constants/regex';\nimport { SLOT_NAME_LABEL, SLOT_NAME_INVALID_FEEDBACK, SLOT_NAME_VALID_FEEDBACK, SLOT_NAME_DESCRIPTION, SLOT_NAME_DEFAULT } from '../../constants/slots';\nimport { arrayIncludes } from '../../utils/array';\nimport { getBreakpointsUpCached } from '../../utils/config';\nimport { cssEscape } from '../../utils/css-escape';\nimport { select, getAttr, setAttr, removeAttr, selectAll, isVisible, attemptFocus } from '../../utils/dom';\nimport { identity } from '../../utils/identity';\nimport { isBoolean } from '../../utils/inspect';\nimport { toInteger } from '../../utils/number';\nimport { sortKeys, create, keys } from '../../utils/object';\nimport { makePropsConfigurable, suffixPropName, makeProp } from '../../utils/props';\nimport { props as props$1, formStateMixin } from '../../mixins/form-state';\nimport { props, idMixin } from '../../mixins/id';\nimport { normalizeSlotMixin } from '../../mixins/normalize-slot';\nimport { BCol } from '../layout/col';\nimport { BFormRow } from '../layout/form-row';\nimport { BFormText } from '../form/form-text';\nimport { BFormInvalidFeedback } from '../form/form-invalid-feedback';\nimport { BFormValidFeedback } from '../form/form-valid-feedback';\n\n// --- Constants ---\n\nconst INPUTS = ['input', 'select', 'textarea'];\n\n// Selector for finding first input in the form group\nconst INPUT_SELECTOR = INPUTS.map(v => `${v}:not([disabled])`).join();\n\n// A list of interactive elements (tag names) inside ``'s legend\nconst LEGEND_INTERACTIVE_ELEMENTS = [...INPUTS, 'a', 'button', 'label'];\n\n// --- Props ---\n\n// Prop generator for lazy generation of props\nconst generateProps = () => makePropsConfigurable(sortKeys({\n ...props,\n ...props$1,\n ...getBreakpointsUpCached().reduce((props, breakpoint) => {\n // i.e. 'content-cols', 'content-cols-sm', 'content-cols-md', ...\n props[suffixPropName(breakpoint, 'contentCols')] = makeProp(PROP_TYPE_BOOLEAN_NUMBER_STRING);\n // i.e. 'label-align', 'label-align-sm', 'label-align-md', ...\n props[suffixPropName(breakpoint, 'labelAlign')] = makeProp(PROP_TYPE_STRING);\n // i.e. 'label-cols', 'label-cols-sm', 'label-cols-md', ...\n props[suffixPropName(breakpoint, 'labelCols')] = makeProp(PROP_TYPE_BOOLEAN_NUMBER_STRING);\n return props;\n }, create(null)),\n description: makeProp(PROP_TYPE_STRING),\n disabled: makeProp(PROP_TYPE_BOOLEAN, false),\n feedbackAriaLive: makeProp(PROP_TYPE_STRING, 'assertive'),\n invalidFeedback: makeProp(PROP_TYPE_STRING),\n label: makeProp(PROP_TYPE_STRING),\n labelClass: makeProp(PROP_TYPE_ARRAY_OBJECT_STRING),\n labelFor: makeProp(PROP_TYPE_STRING),\n labelSize: makeProp(PROP_TYPE_STRING),\n labelSrOnly: makeProp(PROP_TYPE_BOOLEAN, false),\n tooltip: makeProp(PROP_TYPE_BOOLEAN, false),\n validFeedback: makeProp(PROP_TYPE_STRING),\n validated: makeProp(PROP_TYPE_BOOLEAN, false)\n}), NAME_FORM_GROUP);\n\n// --- Main component ---\n\n// We do not use `extend()` here as that would evaluate the props\n// immediately, which we do not want to happen\n// @vue/component\nconst BFormGroup = {\n name: NAME_FORM_GROUP,\n mixins: [idMixin, formStateMixin, normalizeSlotMixin],\n get props() {\n // Allow props to be lazy evaled on first access and\n // then they become a non-getter afterwards\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get#Smart_self-overwriting_lazy_getters\n delete this.props;\n // eslint-disable-next-line no-return-assign\n return this.props = generateProps();\n },\n data() {\n return {\n ariaDescribedby: null\n };\n },\n computed: {\n contentColProps() {\n return this.getColProps(this.$props, 'content');\n },\n labelAlignClasses() {\n return this.getAlignClasses(this.$props, 'label');\n },\n labelColProps() {\n return this.getColProps(this.$props, 'label');\n },\n isHorizontal() {\n // Determine if the form group will be rendered horizontal\n // based on the existence of 'content-col' or 'label-col' props\n return keys(this.contentColProps).length > 0 || keys(this.labelColProps).length > 0;\n }\n },\n watch: {\n ariaDescribedby(newValue, oldValue) {\n if (newValue !== oldValue) {\n this.updateAriaDescribedby(newValue, oldValue);\n }\n }\n },\n mounted() {\n this.$nextTick(() => {\n // Set `aria-describedby` on the input specified by `labelFor`\n // We do this in a `$nextTick()` to ensure the children have finished rendering\n this.updateAriaDescribedby(this.ariaDescribedby);\n });\n },\n methods: {\n getAlignClasses(props, prefix) {\n return getBreakpointsUpCached().reduce((result, breakpoint) => {\n const propValue = props[suffixPropName(breakpoint, `${prefix}Align`)] || null;\n if (propValue) {\n result.push(['text', breakpoint, propValue].filter(identity).join('-'));\n }\n return result;\n }, []);\n },\n getColProps(props, prefix) {\n return getBreakpointsUpCached().reduce((result, breakpoint) => {\n let propValue = props[suffixPropName(breakpoint, `${prefix}Cols`)];\n\n // Handle case where the prop's value is an empty string,\n // which represents `true`\n propValue = propValue === '' ? true : propValue || false;\n if (!isBoolean(propValue) && propValue !== 'auto') {\n // Convert to column size to number\n propValue = toInteger(propValue, 0);\n // Ensure column size is greater than `0`\n propValue = propValue > 0 ? propValue : false;\n }\n\n // Add the prop to the list of props to give to ``\n // If breakpoint is '' (`${prefix}Cols` is `true`), then we use\n // the 'col' prop to make equal width at 'xs'\n if (propValue) {\n result[breakpoint || (isBoolean(propValue) ? 'col' : 'cols')] = propValue;\n }\n return result;\n }, {});\n },\n // Sets the `aria-describedby` attribute on the input if `labelFor` is set\n // Optionally accepts a string of IDs to remove as the second parameter\n // Preserves any `aria-describedby` value(s) user may have on input\n updateAriaDescribedby(newValue, oldValue) {\n const {\n labelFor\n } = this;\n if (IS_BROWSER && labelFor) {\n // We need to escape `labelFor` since it can be user-provided\n const $input = select(`#${cssEscape(labelFor)}`, this.$refs.content);\n if ($input) {\n const attr = 'aria-describedby';\n const newIds = (newValue || '').split(RX_SPACE_SPLIT);\n const oldIds = (oldValue || '').split(RX_SPACE_SPLIT);\n\n // Update ID list, preserving any original IDs\n // and ensuring the ID's are unique\n const ids = (getAttr($input, attr) || '').split(RX_SPACE_SPLIT).filter(id => !arrayIncludes(oldIds, id)).concat(newIds).filter((id, index, ids) => ids.indexOf(id) === index).filter(identity).join(' ').trim();\n if (ids) {\n setAttr($input, attr, ids);\n } else {\n removeAttr($input, attr);\n }\n }\n }\n },\n onLegendClick(event) {\n // Don't do anything if `labelFor` is set\n /* istanbul ignore next: clicking a label will focus the input, so no need to test */\n if (this.labelFor) {\n return;\n }\n const {\n target\n } = event;\n const tagName = target ? target.tagName : '';\n\n // If clicked an interactive element inside legend,\n // we just let the default happen\n /* istanbul ignore next */\n if (LEGEND_INTERACTIVE_ELEMENTS.indexOf(tagName) !== -1) {\n return;\n }\n\n // If only a single input, focus it, emulating label behaviour\n const inputs = selectAll(INPUT_SELECTOR, this.$refs.content).filter(isVisible);\n if (inputs.length === 1) {\n attemptFocus(inputs[0]);\n }\n }\n },\n render(h) {\n const {\n computedState: state,\n feedbackAriaLive,\n isHorizontal,\n labelFor,\n normalizeSlot,\n safeId,\n tooltip\n } = this;\n const id = safeId();\n const isFieldset = !labelFor;\n let $label = h();\n const labelContent = normalizeSlot(SLOT_NAME_LABEL) || this.label;\n const labelId = labelContent ? safeId('_BV_label_') : null;\n if (labelContent || isHorizontal) {\n const {\n labelSize,\n labelColProps\n } = this;\n const labelTag = isFieldset ? 'legend' : 'label';\n if (this.labelSrOnly) {\n if (labelContent) {\n $label = h(labelTag, {\n class: 'gl-sr-only',\n attrs: {\n id: labelId,\n for: labelFor || null\n }\n }, [labelContent]);\n }\n $label = h(isHorizontal ? BCol : 'div', {\n props: isHorizontal ? labelColProps : {}\n }, [$label]);\n } else {\n $label = h(isHorizontal ? BCol : labelTag, {\n on: isFieldset ? {\n click: this.onLegendClick\n } : {},\n props: isHorizontal ? {\n ...labelColProps,\n tag: labelTag\n } : {},\n attrs: {\n id: labelId,\n for: labelFor || null,\n // We add a `tabindex` to legend so that screen readers\n // will properly read the `aria-labelledby` in IE\n tabindex: isFieldset ? '-1' : null\n },\n class: [\n // Hide the focus ring on the legend\n isFieldset ? 'bv-no-focus-ring' : '',\n // When horizontal or if a legend is rendered, add 'col-form-label' class\n // for correct sizing as Bootstrap has inconsistent font styling for\n // legend in non-horizontal form groups\n // See: https://github.com/twbs/bootstrap/issues/27805\n isHorizontal || isFieldset ? 'col-form-label' : '',\n // Emulate label padding top of `0` on legend when not horizontal\n !isHorizontal && isFieldset ? '!gl-pt-0' : '',\n // If not horizontal and not a legend, we add '!gl-block' class to label\n // so that label-align works\n !isHorizontal && !isFieldset ? '!gl-block' : '', labelSize ? `col-form-label-${labelSize}` : '', this.labelAlignClasses, this.labelClass]\n }, [labelContent]);\n }\n }\n let $invalidFeedback = h();\n const invalidFeedbackContent = normalizeSlot(SLOT_NAME_INVALID_FEEDBACK) || this.invalidFeedback;\n const invalidFeedbackId = invalidFeedbackContent ? safeId('_BV_feedback_invalid_') : null;\n if (invalidFeedbackContent) {\n $invalidFeedback = h(BFormInvalidFeedback, {\n props: {\n ariaLive: feedbackAriaLive,\n id: invalidFeedbackId,\n // If state is explicitly `false`, always show the feedback\n state,\n tooltip\n },\n attrs: {\n tabindex: invalidFeedbackContent ? '-1' : null\n }\n }, [invalidFeedbackContent]);\n }\n let $validFeedback = h();\n const validFeedbackContent = normalizeSlot(SLOT_NAME_VALID_FEEDBACK) || this.validFeedback;\n const validFeedbackId = validFeedbackContent ? safeId('_BV_feedback_valid_') : null;\n if (validFeedbackContent) {\n $validFeedback = h(BFormValidFeedback, {\n props: {\n ariaLive: feedbackAriaLive,\n id: validFeedbackId,\n // If state is explicitly `true`, always show the feedback\n state,\n tooltip\n },\n attrs: {\n tabindex: validFeedbackContent ? '-1' : null\n }\n }, [validFeedbackContent]);\n }\n let $description = h();\n const descriptionContent = normalizeSlot(SLOT_NAME_DESCRIPTION) || this.description;\n const descriptionId = descriptionContent ? safeId('_BV_description_') : null;\n if (descriptionContent) {\n $description = h(BFormText, {\n attrs: {\n id: descriptionId,\n tabindex: '-1'\n }\n }, [descriptionContent]);\n }\n\n // Update `ariaDescribedby`\n // Screen readers will read out any content linked to by `aria-describedby`\n // even if the content is hidden with `display: none;`, hence we only include\n // feedback IDs if the form group's state is explicitly valid or invalid\n const ariaDescribedby = this.ariaDescribedby = [descriptionId, state === false ? invalidFeedbackId : null, state === true ? validFeedbackId : null].filter(identity).join(' ') || null;\n const $content = h(isHorizontal ? BCol : 'div', {\n props: isHorizontal ? this.contentColProps : {},\n ref: 'content'\n }, [normalizeSlot(SLOT_NAME_DEFAULT, {\n ariaDescribedby,\n descriptionId,\n id,\n labelId\n }) || h(), $invalidFeedback, $validFeedback, $description]);\n\n // Return it wrapped in a form group\n // Note: Fieldsets do not support adding `row` or `form-row` directly\n // to them due to browser specific render issues, so we move the `form-row`\n // to an inner wrapper div when horizontal and using a fieldset\n return h(isFieldset ? 'fieldset' : isHorizontal ? BFormRow : 'div', {\n staticClass: 'form-group',\n class: [{\n 'was-validated': this.validated\n }, this.stateClass],\n attrs: {\n id,\n disabled: isFieldset ? this.disabled : null,\n role: isFieldset ? null : 'group',\n 'aria-invalid': this.computedAriaInvalid,\n // Only apply `aria-labelledby` if we are a horizontal fieldset\n // as the legend is no longer a direct child of fieldset\n 'aria-labelledby': isFieldset && isHorizontal ? labelId : null\n }\n }, isHorizontal && isFieldset ? [h(BFormRow, [$label, $content])] : [$label, $content]);\n }\n};\n\nexport { BFormGroup, generateProps };\n","import isString from 'lodash/isString';\nimport isPlainObject from 'lodash/isPlainObject';\nimport { BFormGroup } from '../../../../vendor/bootstrap-vue/src/components/form-group/form-group';\nimport __vue_normalize__ from 'vue-runtime-helpers/dist/normalize-component.js';\n\nvar script = {\n name: 'GlFormGroup',\n components: {\n BFormGroup\n },\n inheritAttrs: false,\n props: {\n labelClass: {\n type: [String, Array, Object],\n required: false,\n default: null\n },\n labelDescription: {\n type: String,\n required: false,\n default: ''\n },\n optional: {\n type: Boolean,\n required: false,\n default: false\n },\n optionalText: {\n type: String,\n required: false,\n default: '(optional)'\n }\n },\n computed: {\n actualLabelClass() {\n const {\n labelClass\n } = this;\n const defaultClass = 'col-form-label';\n if (isString(labelClass)) {\n return `${labelClass} ${defaultClass}`;\n }\n if (Array.isArray(labelClass)) {\n return [...labelClass, defaultClass];\n }\n if (isPlainObject(labelClass)) {\n return {\n ...labelClass,\n [defaultClass]: true\n };\n }\n return defaultClass;\n },\n hasLabelDescription() {\n // eslint-disable-next-line @gitlab/vue-prefer-dollar-scopedslots\n return Boolean(this.labelDescription || this.$slots['label-description']);\n }\n }\n};\n\n/* script */\nconst __vue_script__ = script;\n\n/* template */\nvar __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('b-form-group',_vm._b({staticClass:\"gl-form-group\",attrs:{\"label-class\":_vm.actualLabelClass},scopedSlots:_vm._u([{key:\"label\",fn:function(){return [_vm._t(\"label\",function(){return [_vm._v(\"\\n \"+_vm._s(_vm.$attrs.label)+\"\\n \"),(_vm.optional)?_c('span',{staticClass:\"optional-label\",attrs:{\"data-testid\":\"optional-label\"}},[_vm._v(_vm._s(_vm.optionalText))]):_vm._e()]}),_vm._v(\" \"),(_vm.hasLabelDescription)?_c('div',{staticClass:\"label-description\",attrs:{\"data-testid\":\"label-description\"}},[_vm._t(\"label-description\",function(){return [_vm._v(_vm._s(_vm.labelDescription))]})],2):_vm._e()]},proxy:true},_vm._l((Object.keys(_vm.$slots)),function(slot){return {key:slot,fn:function(){return [_vm._t(slot)]},proxy:true}})],null,true)},'b-form-group',_vm.$attrs,false))};\nvar __vue_staticRenderFns__ = [];\n\n /* style */\n const __vue_inject_styles__ = undefined;\n /* scoped */\n const __vue_scope_id__ = undefined;\n /* module identifier */\n const __vue_module_identifier__ = undefined;\n /* functional template */\n const __vue_is_functional_template__ = false;\n /* style inject */\n \n /* style inject SSR */\n \n /* style inject shadow dom */\n \n\n \n const __vue_component__ = __vue_normalize__(\n { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n __vue_inject_styles__,\n __vue_script__,\n __vue_scope_id__,\n __vue_is_functional_template__,\n __vue_module_identifier__,\n false,\n undefined,\n undefined,\n undefined\n );\n\nexport default __vue_component__;\n"],"sourceRoot":""}