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AR;AACA;AACD,iBAJD,MAIO,IAAI,2BAA2B,CAA/B,EAAkC;AACvC,yBAAK,KAAK,MAAL,GAAc,CAAnB,IAAwB,CAAC,IAAD,EAAO,wBAAP,CAAxB;AACA,+CAA2B,CAA3B;AACD;AACF;AACD,iBAAK,IAAL,CAAU,EAAV;AACA,iBAAK,GAAG,OAAR;AACD;AACD,eAAO,qBAAqB,KACzB,GADyB,CACrB,UAAC,EAAD,EAAK,CAAL;AAAA,yBACH,MAAM,CAAN,GAAU,OAAV,GAAoB,IAAI,MAAJ,CAAW,IAAI,IAAI,CAAnB,CADjB,KAGH,MAAM,OAAN,CAAc,EAAd,IACO,oBAAoB,GAAG,CAAH,CAApB,CADP,aACyC,GAAG,CAAH,CADzC,yBAEI,oBAAoB,EAApB,CALD;AAAA,SADqB,EAQzB,IARyB,CAQpB,IARoB,CAA5B;AASD,KA3BD,MA2BO;AACL,kCAAwB,oBAAoB,EAApB,CAAxB;AACD;AACF","sourcesContent":["function createMessage (message: string, vm?: any, parent?: any): string | void {\n if (parent) {\n vm = {\n _isVue: true,\n $parent: parent,\n $options: vm\n }\n }\n\n if (vm) {\n // Only show each message once per instance\n vm.$_alreadyWarned = vm.$_alreadyWarned || []\n if (vm.$_alreadyWarned.includes(message)) return\n vm.$_alreadyWarned.push(message)\n }\n\n return `[Vuetify] ${message}` + (\n vm ? generateComponentTrace(vm) : ''\n )\n}\n\nexport function consoleInfo (message: string, vm?: any, parent?: any): void {\n const newMessage = createMessage(message, vm, parent)\n newMessage != null && console.info(newMessage)\n}\n\nexport function consoleWarn (message: string, vm?: any, parent?: any): void {\n const newMessage = createMessage(message, vm, parent)\n newMessage != null && console.warn(newMessage)\n}\n\nexport function consoleError (message: string, vm?: any, parent?: any): void {\n const newMessage = createMessage(message, vm, parent)\n newMessage != null && console.error(newMessage)\n}\n\nexport function deprecate (original: string, replacement: string, vm?: any, parent?: any) {\n consoleWarn(`'${original}' is deprecated, use '${replacement}' instead`, vm, parent)\n}\n\n/**\n * Shamelessly stolen from vuejs/vue/blob/dev/src/core/util/debug.js\n */\n\nconst classifyRE = /(?:^|[-_])(\\w)/g\nconst classify = (str: string) => str\n .replace(classifyRE, c => c.toUpperCase())\n .replace(/[-_]/g, '')\n\nfunction formatComponentName (vm: any, includeFile?: boolean): string {\n if (vm.$root === vm) {\n return '<Root>'\n }\n const options = typeof vm === 'function' && vm.cid != null\n ? vm.options\n : vm._isVue\n ? vm.$options || vm.constructor.options\n : vm || {}\n let name = options.name || options._componentTag\n const file = options.__file\n if (!name && file) {\n const match = file.match(/([^/\\\\]+)\\.vue$/)\n name = match && match[1]\n }\n\n return (\n (name ? `<${classify(name)}>` : `<Anonymous>`) +\n (file && includeFile !== false ? ` at ${file}` : '')\n )\n}\n\nfunction generateComponentTrace (vm: any): string {\n if (vm._isVue && vm.$parent) {\n const tree = []\n let currentRecursiveSequence = 0\n while (vm) {\n if (tree.length > 0) {\n const last: any = tree[tree.length - 1]\n if (last.constructor === vm.constructor) {\n currentRecursiveSequence++\n vm = vm.$parent\n continue\n } else if (currentRecursiveSequence > 0) {\n tree[tree.length - 1] = [last, currentRecursiveSequence]\n currentRecursiveSequence = 0\n }\n }\n tree.push(vm)\n vm = vm.$parent\n }\n return '\\n\\nfound in\\n\\n' + tree\n .map((vm, i) => `${\n i === 0 ? '---> ' : ' '.repeat(5 + i * 2)\n }${\n Array.isArray(vm)\n ? `${formatComponentName(vm[0])}... (${vm[1]} recursive calls)`\n : formatComponentName(vm)\n }`)\n .join('\\n')\n } else {\n return `\\n\\n(found in ${formatComponentName(vm)})`\n }\n}\n"],"sourceRoot":""}
|