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A,MAAR,IAAQ,uEAAD,CAAC;AAC1C,MAAM,OAAO,GAAa,EAA1B;AACA,MAAI,KAAK,GAAG,CAAZ;;AACA,SAAO,KAAK,GAAG,GAAG,CAAC,MAAnB,EAA2B;AACzB,IAAA,OAAO,CAAC,IAAR,CAAa,GAAG,CAAC,MAAJ,CAAW,KAAX,EAAkB,IAAlB,CAAb;AACA,IAAA,KAAK,IAAI,IAAT;AACD;;AACD,SAAO,OAAP;AACD;;AAEK,SAAU,qBAAV,CAAiC,KAAjC,EAA8D;AAAA,MAAd,MAAc,uEAAL,KAAK;AAClE,MAAM,IAAI,GAAG,MAAM,GAAG,IAAH,GAAU,IAA7B;;AACA,MAAI,KAAK,GAAG,IAAZ,EAAkB;AAChB,qBAAU,KAAV;AACD;;AAED,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,CAAH,GAAwB,CAAC,GAAD,EAAM,GAAN,EAAW,GAAX,CAA7C;AACA,MAAI,IAAI,GAAG,CAAC,CAAZ;;AACA,SAAO,IAAI,CAAC,GAAL,CAAS,KAAT,KAAmB,IAAnB,IAA2B,IAAI,GAAG,MAAM,CAAC,MAAP,GAAgB,CAAzD,EAA4D;AAC1D,IAAA,KAAK,IAAI,IAAT;AACA,MAAE,IAAF;AACD;;AACD,mBAAU,KAAK,CAAC,OAAN,CAAc,CAAd,CAAV,cAA8B,MAAM,CAAC,IAAD,CAApC;AACD","sourcesContent":["import Vue from 'vue'\nimport { VNode, VNodeDirective, FunctionalComponentOptions } from 'vue/types'\nimport { VuetifyIcon } from 'vuetify/types/services/icons'\n\nexport function createSimpleFunctional (\n c: string,\n el = 'div',\n name?: string\n) {\n return Vue.extend({\n name: name || c.replace(/__/g, '-'),\n\n functional: true,\n\n render (h, { data, children }): VNode {\n data.staticClass = (`${c} ${data.staticClass || ''}`).trim()\n\n return h(el, data, children)\n },\n })\n}\n\nfunction mergeTransitions (\n transitions: undefined | Function | Function[],\n array: Function[]\n) {\n if (Array.isArray(transitions)) return transitions.concat(array)\n if (transitions) array.push(transitions)\n return array\n}\n\nexport function createSimpleTransition (\n name: string,\n origin = 'top center 0',\n mode?: string\n): FunctionalComponentOptions {\n return {\n name,\n\n functional: true,\n\n props: {\n group: {\n type: Boolean,\n default: false,\n },\n hideOnLeave: {\n type: Boolean,\n default: false,\n },\n leaveAbsolute: {\n type: Boolean,\n default: false,\n },\n mode: {\n type: String,\n default: mode,\n },\n origin: {\n type: String,\n default: origin,\n },\n },\n\n render (h, context): VNode {\n const tag = `transition${context.props.group ? '-group' : ''}`\n context.data = context.data || {}\n context.data.props = {\n name,\n mode: context.props.mode,\n }\n context.data.on = context.data.on || {}\n if (!Object.isExtensible(context.data.on)) {\n context.data.on = { ...context.data.on }\n }\n\n const ourBeforeEnter: Function[] = []\n const ourLeave: Function[] = []\n const absolute = (el: HTMLElement) => (el.style.position = 'absolute')\n\n ourBeforeEnter.push((el: HTMLElement) => {\n el.style.transformOrigin = context.props.origin\n el.style.webkitTransformOrigin = context.props.origin\n })\n\n if (context.props.leaveAbsolute) ourLeave.push(absolute)\n if (context.props.hideOnLeave) {\n ourLeave.push((el: HTMLElement) => (el.style.display = 'none'))\n }\n\n const { beforeEnter, leave } = context.data.on\n\n // Type says Function | Function[] but\n // will only work if provided a function\n context.data.on.beforeEnter = () => mergeTransitions(beforeEnter, ourBeforeEnter)\n context.data.on.leave = mergeTransitions(leave, ourLeave)\n\n return h(tag, context.data, context.children)\n },\n }\n}\n\nexport function createJavaScriptTransition (\n name: string,\n functions: Record<string, any>,\n mode = 'in-out'\n): FunctionalComponentOptions {\n return {\n name,\n\n functional: true,\n\n props: {\n mode: {\n type: String,\n default: mode,\n },\n },\n\n render (h, context): VNode {\n const data = {\n props: {\n ...context.props,\n name,\n },\n on: functions,\n }\n\n return h('transition', data, context.children)\n },\n }\n}\n\nexport type BindingConfig = Pick<VNodeDirective, 'arg' | 'modifiers' | 'value'>\nexport function directiveConfig (binding: BindingConfig, defaults = {}): VNodeDirective {\n return {\n ...defaults,\n ...binding.modifiers,\n value: binding.arg,\n ...(binding.value || {}),\n }\n}\n\nexport function addOnceEventListener (\n el: EventTarget,\n eventName: string,\n cb: (event: Event) => void,\n options: boolean | AddEventListenerOptions = false\n): void {\n var once = (event: Event) => {\n cb(event)\n el.removeEventListener(eventName, once, options)\n }\n\n el.addEventListener(eventName, once, options)\n}\n\nlet passiveSupported = false\ntry {\n if (typeof window !== 'undefined') {\n const testListenerOpts = Object.defineProperty({}, 'passive', {\n get: () => {\n passiveSupported = true\n },\n })\n\n window.addEventListener('testListener', testListenerOpts, testListenerOpts)\n window.removeEventListener('testListener', testListenerOpts, testListenerOpts)\n }\n} catch (e) { console.warn(e) }\nexport { passiveSupported }\n\nexport function addPassiveEventListener (\n el: EventTarget,\n event: string,\n cb: EventHandlerNonNull | (() => void),\n options: {}\n): void {\n el.addEventListener(event, cb, passiveSupported ? options : false)\n}\n\nexport function getNestedValue (obj: any, path: (string | number)[], fallback?: any): any {\n const last = path.length - 1\n\n if (last < 0) return obj === undefined ? fallback : obj\n\n for (let i = 0; i < last; i++) {\n if (obj == null) {\n return fallback\n }\n obj = obj[path[i]]\n }\n\n if (obj == null) return fallback\n\n return obj[path[last]] === undefined ? fallback : obj[path[last]]\n}\n\nexport function deepEqual (a: any, b: any): boolean {\n if (a === b) return true\n\n if (a instanceof Date && b instanceof Date) {\n // If the values are Date, they were convert to timestamp with getTime and compare it\n if (a.getTime() !== b.getTime()) return false\n }\n\n if (a !== Object(a) || b !== Object(b)) {\n // If the values aren't objects, they were already checked for equality\n return false\n }\n\n const props = Object.keys(a)\n\n if (props.length !== Object.keys(b).length) {\n // Different number of props, don't bother to check\n return false\n }\n\n return props.every(p => deepEqual(a[p], b[p]))\n}\n\nexport function getObjectValueByPath (obj: any, path: string, fallback?: any): any {\n // credit: http://stackoverflow.com/questions/6491463/accessing-nested-javascript-objects-with-string-key#comment55278413_6491621\n if (obj == null || !path || typeof path !== 'string') return fallback\n if (obj[path] !== undefined) return obj[path]\n path = path.replace(/\\[(\\w+)\\]/g, '.$1') // convert indexes to properties\n path = path.replace(/^\\./, '') // strip a leading dot\n return getNestedValue(obj, path.split('.'), fallback)\n}\n\nexport function getPropertyFromItem (\n item: object,\n property: string | (string | number)[] | ((item: object, fallback?: any) => any),\n fallback?: any\n): any {\n if (property == null) return item === undefined ? fallback : item\n\n if (item !== Object(item)) return fallback === undefined ? item : fallback\n\n if (typeof property === 'string') return getObjectValueByPath(item, property, fallback)\n\n if (Array.isArray(property)) return getNestedValue(item, property, fallback)\n\n if (typeof property !== 'function') return fallback\n\n const value = property(item, fallback)\n\n return typeof value === 'undefined' ? fallback : value\n}\n\nexport function createRange (length: number): number[] {\n return Array.from({ length }, (v, k) => k)\n}\n\nexport function getZIndex (el?: Element | null): number {\n if (!el || el.nodeType !== Node.ELEMENT_NODE) return 0\n\n const index = +window.getComputedStyle(el).getPropertyValue('z-index')\n\n if (!index) return getZIndex(el.parentNode as Element)\n return index\n}\n\nconst tagsToReplace = {\n '&': '&',\n '<': '<',\n '>': '>',\n} as any\n\nexport function escapeHTML (str: string): string {\n return str.replace(/[&<>]/g, tag => tagsToReplace[tag] || tag)\n}\n\nexport function filterObjectOnKeys<T, K extends keyof T> (obj: T, keys: K[]): { [N in K]: T[N] } {\n const filtered = {} as { [N in K]: T[N] }\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i]\n if (typeof obj[key] !== 'undefined') {\n filtered[key] = obj[key]\n }\n }\n\n return filtered\n}\n\nexport function convertToUnit (str: string | number | null | undefined, unit = 'px'): string | undefined {\n if (str == null || str === '') {\n return undefined\n } else if (isNaN(+str!)) {\n return String(str)\n } else {\n return `${Number(str)}${unit}`\n }\n}\n\nexport function kebabCase (str: string): string {\n return (str || '').replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()\n}\n\nexport function isObject (obj: any): obj is object {\n return obj !== null && typeof obj === 'object'\n}\n\n// KeyboardEvent.keyCode aliases\nexport const keyCodes = Object.freeze({\n enter: 13,\n tab: 9,\n delete: 46,\n esc: 27,\n space: 32,\n up: 38,\n down: 40,\n left: 37,\n right: 39,\n end: 35,\n home: 36,\n del: 46,\n backspace: 8,\n insert: 45,\n pageup: 33,\n pagedown: 34,\n})\n\nconst ICONS_PREFIX = '$vuetify.'\n\n// This remaps internal names like '$vuetify.icons.cancel'\n// to the current name or component for that icon.\nexport function remapInternalIcon (vm: Vue, iconName: string): VuetifyIcon {\n if (!iconName.startsWith(ICONS_PREFIX)) {\n return iconName\n }\n\n // Get the target icon name\n const iconPath = `$vuetify.icons.values.${iconName.split('.').pop()}`\n\n // Now look up icon indirection name,\n // e.g. '$vuetify.icons.values.cancel'\n return getObjectValueByPath(vm, iconPath, iconName)\n}\n\nexport function keys<O> (o: O) {\n return Object.keys(o) as (keyof O)[]\n}\n\n/**\n * Camelize a hyphen-delimited string.\n */\nconst camelizeRE = /-(\\w)/g\nexport const camelize = (str: string): string => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : '')\n}\n\n/**\n * Returns the set difference of B and A, i.e. the set of elements in B but not in A\n */\nexport function arrayDiff (a: any[], b: any[]): any[] {\n const diff: any[] = []\n for (let i = 0; i < b.length; i++) {\n if (a.indexOf(b[i]) < 0) diff.push(b[i])\n }\n return diff\n}\n\n/**\n * Makes the first character of a string uppercase\n */\nexport function upperFirst (str: string): string {\n return str.charAt(0).toUpperCase() + str.slice(1)\n}\n\nexport function groupByProperty (xs: any[], key: string): Record<string, any[]> {\n return xs.reduce((rv, x) => {\n (rv[x[key]] = rv[x[key]] || []).push(x)\n return rv\n }, {})\n}\n\nexport function wrapInArray<T> (v: T | T[] | null | undefined): T[] { return v != null ? Array.isArray(v) ? v : [v] : [] }\n\nexport type compareFn<T = any> = (a: T, b: T) => number\n\nexport function sortItems (\n items: any[],\n sortBy: string[],\n sortDesc: boolean[],\n locale: string,\n customSorters?: Record<string, compareFn>\n) {\n if (sortBy === null || !sortBy.length) return items\n\n return items.sort((a, b) => {\n for (let i = 0; i < sortBy.length; i++) {\n const sortKey = sortBy[i]\n\n let sortA = getObjectValueByPath(a, sortKey)\n let sortB = getObjectValueByPath(b, sortKey)\n\n if (sortDesc[i]) {\n [sortA, sortB] = [sortB, sortA]\n }\n\n if (customSorters && customSorters[sortKey]) return customSorters[sortKey](sortA, sortB)\n\n // Check if both cannot be evaluated\n if (sortA === null && sortB === null) {\n return 0\n }\n\n [sortA, sortB] = [sortA, sortB].map(s => (s || '').toString().toLocaleLowerCase())\n\n if (sortA !== sortB) {\n if (!isNaN(sortA) && !isNaN(sortB)) return Number(sortA) - Number(sortB)\n return sortA.localeCompare(sortB, locale)\n }\n }\n\n return 0\n })\n}\n\nexport type FilterFn = (value: any, search: string | null, item: any) => boolean\n\nexport function defaultFilter (value: any, search: string | null, item: any) {\n return value != null &&\n search != null &&\n typeof value !== 'boolean' &&\n value.toString().toLocaleLowerCase().indexOf(search.toLocaleLowerCase()) !== -1\n}\n\nexport function searchItems (items: any[], search: string) {\n if (!search) return items\n search = search.toString().toLowerCase()\n if (search.trim() === '') return items\n\n return items.filter(item => Object.keys(item).some(key => defaultFilter(getObjectValueByPath(item, key), search, item)))\n}\n\n/**\n * Returns:\n * - 'normal' for old style slots - `<template slot=\"default\">`\n * - 'scoped' for old style scoped slots (`<template slot=\"default\" slot-scope=\"data\">`) or bound v-slot (`#default=\"data\"`)\n * - 'v-slot' for unbound v-slot (`#default`) - only if the third param is true, otherwise counts as scoped\n */\nexport function getSlotType<T extends boolean = false> (vm: Vue, name: string, split?: T): (T extends true ? 'v-slot' : never) | 'normal' | 'scoped' | void {\n if (vm.$slots[name] && vm.$scopedSlots[name] && (vm.$scopedSlots[name] as any).name) {\n return split ? 'v-slot' as any : 'scoped'\n }\n if (vm.$slots[name]) return 'normal'\n if (vm.$scopedSlots[name]) return 'scoped'\n}\n\nexport function debounce (fn: Function, delay: number) {\n let timeoutId = 0 as any\n return (...args: any[]) => {\n clearTimeout(timeoutId)\n timeoutId = setTimeout(() => fn(...args), delay)\n }\n}\n\nexport function getPrefixedScopedSlots (prefix: string, scopedSlots: any) {\n return Object.keys(scopedSlots).filter(k => k.startsWith(prefix)).reduce((obj: any, k: string) => {\n obj[k.replace(prefix, '')] = scopedSlots[k]\n return obj\n }, {})\n}\n\nexport function getSlot (vm: Vue, name = 'default', data?: object, optional = false) {\n if (vm.$scopedSlots[name]) {\n return vm.$scopedSlots[name]!(data)\n } else if (vm.$slots[name] && (!data || optional)) {\n return vm.$slots[name]\n }\n return undefined\n}\n\nexport function clamp (value: number, min = 0, max = 1) {\n return Math.max(min, Math.min(max, value))\n}\n\nexport function padEnd (str: string, length: number, char = '0') {\n return str + char.repeat(Math.max(0, length - str.length))\n}\n\nexport function chunk (str: string, size = 1) {\n const chunked: string[] = []\n let index = 0\n while (index < str.length) {\n chunked.push(str.substr(index, size))\n index += size\n }\n return chunked\n}\n\nexport function humanReadableFileSize (bytes: number, binary = false): string {\n const base = binary ? 1024 : 1000\n if (bytes < base) {\n return `${bytes} B`\n }\n\n const prefix = binary ? ['Ki', 'Mi', 'Gi'] : ['k', 'M', 'G']\n let unit = -1\n while (Math.abs(bytes) >= base && unit < prefix.length - 1) {\n bytes /= base\n ++unit\n }\n return `${bytes.toFixed(1)} ${prefix[unit]}B`\n}\n"],"sourceRoot":"","file":"helpers.js"} |