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OAAO,CAAC,OAAR,CAAgB,IAAhB,CAAqB,IAArB,EAA2B,OAAO,CAAC,UAAnC;AACA,aAAK,QAAL,GAAgB,GAAG,CAAC,UAAJ,CAAe,OAAO,CAAC,OAAR,CAAgB,SAA/B,CAAhB;AACD,OAHD,MAGO;AACL,aAAK,QAAL,GAAiB,OAAO,CAAC,MAAR,IAAkB,OAAO,CAAC,MAAR,CAAe,QAAlC,IAA+C,IAA/D;AACD;AACF;AAVO,GAAV;AAYD","sourcesContent":["import OurVue, { VueConstructor } from 'vue'\nimport { VuetifyUseOptions } from 'types'\nimport { consoleError } from './util/console'\n\nexport function install (Vue: VueConstructor, args: VuetifyUseOptions = {}) {\n if ((install as any).installed) return\n (install as any).installed = true\n\n if (OurVue !== Vue) {\n consoleError('Multiple instances of Vue detected\\nSee https://github.com/vuetifyjs/vuetify/issues/4068\\n\\nIf you\\'re seeing \"$attrs is readonly\", it\\'s caused by this')\n }\n\n const components = args.components || {}\n const directives = args.directives || {}\n\n for (const name in directives) {\n const directive = directives[name]\n\n Vue.directive(name, directive)\n }\n\n (function registerComponents (components: any) {\n if (components) {\n for (const key in components) {\n const component = components[key]\n if (component && !registerComponents(component.$_vuetify_subcomponents)) {\n Vue.component(key, component as typeof Vue)\n }\n }\n return true\n }\n return false\n })(components)\n\n // Used to avoid multiple mixins being setup\n // when in dev mode and hot module reload\n // https://github.com/vuejs/vue/issues/5089#issuecomment-284260111\n if (Vue.$_vuetify_installed) return\n Vue.$_vuetify_installed = true\n\n Vue.mixin({\n beforeCreate () {\n const options = this.$options as any\n\n if (options.vuetify) {\n options.vuetify.init(this, options.ssrContext)\n this.$vuetify = Vue.observable(options.vuetify.framework)\n } else {\n this.$vuetify = (options.parent && options.parent.$vuetify) || this\n }\n },\n })\n}\n"],"sourceRoot":"","file":"install.js"}
|