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EA,WAAK,IAAI,IAAI,GAAG,OAAhB,EAAyB,IAAI,IAAI,OAAjC,EAA0C,IAAI,EAA9C,EAAkD;AAChD,QAAA,QAAQ,CAAC,IAAT,CAAc,KAAK,WAAL,CAAiB,IAAjB,CAAd;AACD;;AAED,aAAO,QAAP;AACD;;AA1BM,GAlCF;;AA+DP,EAAA,MAAM,GAAA;AACJ,WAAO,KAAK,cAAL,CAAoB,IAApB,EAA0B;AAC/B,MAAA,WAAW,EAAE,qBADkB;AAE/B,MAAA,GAAG,EAAE;AAF0B,KAA1B,EAGJ,KAAK,YAAL,EAHI,CAAP;AAID;;AApEM,CAXM,CAAf","sourcesContent":["import './VDatePickerYears.sass'\n\n// Mixins\nimport Colorable from '../../mixins/colorable'\nimport Localable from '../../mixins/localable'\n\n// Utils\nimport { createNativeLocaleFormatter } from './util'\nimport mixins, { ExtractVue } from '../../util/mixins'\n\n// Types\nimport Vue, { VNode } from 'vue'\nimport { DatePickerFormatter } from './util/createNativeLocaleFormatter'\nimport { PropValidator } from 'vue/types/options'\n\ninterface options extends Vue {\n $el: HTMLElement\n}\n\nexport default mixins<options &\n/* eslint-disable indent */\n ExtractVue<[\n typeof Colorable,\n typeof Localable\n ]>\n/* eslint-enable indent */\n>(\n Colorable,\n Localable\n/* @vue/component */\n).extend({\n name: 'v-date-picker-years',\n\n props: {\n format: Function as PropValidator<DatePickerFormatter | undefined>,\n min: [Number, String],\n max: [Number, String],\n readonly: Boolean,\n value: [Number, String],\n },\n\n data () {\n return {\n defaultColor: 'primary',\n }\n },\n\n computed: {\n formatter (): DatePickerFormatter {\n return this.format || createNativeLocaleFormatter(this.currentLocale, { year: 'numeric', timeZone: 'UTC' }, { length: 4 })\n },\n },\n\n mounted () {\n setTimeout(() => {\n const activeItem = this.$el.getElementsByClassName('active')[0]\n if (activeItem) {\n this.$el.scrollTop = activeItem.offsetTop - this.$el.offsetHeight / 2 + activeItem.offsetHeight / 2\n } else {\n this.$el.scrollTop = this.$el.scrollHeight / 2 - this.$el.offsetHeight / 2\n }\n })\n },\n\n methods: {\n genYearI
|