UNPKG

quasar

Version:

Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time

1,757 lines (1,727 loc) 1.03 MB
/*! * Quasar Framework v2.18.1 * (c) 2015-present Razvan Stoenescu * Released under the MIT License. */ // src/flags.dev.js var attachPoint = null; function getAttachPoint() { if (attachPoint !== null) return attachPoint; return attachPoint = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}; } if (typeof __QUASAR_SSR__ !== "boolean") { getAttachPoint().__QUASAR_SSR__ = false; } if (typeof __QUASAR_SSR_CLIENT__ !== "boolean") { getAttachPoint().__QUASAR_SSR_CLIENT__ = false; } if (typeof __QUASAR_SSR_PWA__ !== "boolean") { getAttachPoint().__QUASAR_SSR_PWA__ = false; } // src/install-quasar.js import { createApp } from "vue"; // src/plugins/platform/Platform.js import { ref, reactive } from "vue"; // src/utils/private.inject-obj-prop/inject-obj-prop.js function injectProp(target2, propName, get2, set2) { Object.defineProperty(target2, propName, { get: get2, set: set2, enumerable: true }); return target2; } function injectMultipleProps(target2, props4) { for (const key in props4) { injectProp(target2, key, props4[key]); } return target2; } // src/plugins/platform/Platform.js var isRuntimeSsrPreHydration = false ? { value: true } : ref( __QUASAR_SSR_CLIENT__ && (__QUASAR_SSR_PWA__ ? document.body.getAttribute("data-server-rendered") !== null : true) ); var preHydrationBrowser; function getMatch(userAgent2, platformMatch) { const match = /(edg|edge|edga|edgios)\/([\w.]+)/.exec(userAgent2) || /(opr)[\/]([\w.]+)/.exec(userAgent2) || /(vivaldi)[\/]([\w.]+)/.exec(userAgent2) || /(chrome|crios)[\/]([\w.]+)/.exec(userAgent2) || /(version)(applewebkit)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent2) || /(webkit)[\/]([\w.]+).*(version)[\/]([\w.]+).*(safari)[\/]([\w.]+)/.exec(userAgent2) || /(firefox|fxios)[\/]([\w.]+)/.exec(userAgent2) || /(webkit)[\/]([\w.]+)/.exec(userAgent2) || /(opera)(?:.*version|)[\/]([\w.]+)/.exec(userAgent2) || []; return { browser: match[5] || match[3] || match[1] || "", version: match[4] || match[2] || "0", platform: platformMatch[0] || "" }; } function getPlatformMatch(userAgent2) { return /(ipad)/.exec(userAgent2) || /(ipod)/.exec(userAgent2) || /(windows phone)/.exec(userAgent2) || /(iphone)/.exec(userAgent2) || /(kindle)/.exec(userAgent2) || /(silk)/.exec(userAgent2) || /(android)/.exec(userAgent2) || /(win)/.exec(userAgent2) || /(mac)/.exec(userAgent2) || /(linux)/.exec(userAgent2) || /(cros)/.exec(userAgent2) || /(playbook)/.exec(userAgent2) || /(bb)/.exec(userAgent2) || /(blackberry)/.exec(userAgent2) || []; } var hasTouch = false ? false : "ontouchstart" in window || window.navigator.maxTouchPoints > 0; function getPlatform(UA) { const userAgent2 = UA.toLowerCase(); const platformMatch = getPlatformMatch(userAgent2); const matched = getMatch(userAgent2, platformMatch); const browser = { mobile: false, desktop: false, cordova: false, capacitor: false, nativeMobile: false, // nativeMobileWrapper: void 0, electron: false, bex: false, linux: false, mac: false, win: false, cros: false, chrome: false, firefox: false, opera: false, safari: false, vivaldi: false, edge: false, edgeChromium: false, ie: false, webkit: false, android: false, ios: false, ipad: false, iphone: false, ipod: false, kindle: false, winphone: false, blackberry: false, playbook: false, silk: false }; if (matched.browser) { browser[matched.browser] = true; browser.version = matched.version; browser.versionNumber = parseInt(matched.version, 10); } if (matched.platform) { browser[matched.platform] = true; } const knownMobiles = browser.android || browser.ios || browser.bb || browser.blackberry || browser.ipad || browser.iphone || browser.ipod || browser.kindle || browser.playbook || browser.silk || browser["windows phone"]; if (knownMobiles === true || userAgent2.indexOf("mobile") !== -1) { browser.mobile = true; } else { browser.desktop = true; } if (browser["windows phone"]) { browser.winphone = true; delete browser["windows phone"]; } if (browser.edga || browser.edgios || browser.edg) { browser.edge = true; matched.browser = "edge"; } else if (browser.crios) { browser.chrome = true; matched.browser = "chrome"; } else if (browser.fxios) { browser.firefox = true; matched.browser = "firefox"; } if (browser.ipod || browser.ipad || browser.iphone) { browser.ios = true; } if (browser.vivaldi) { matched.browser = "vivaldi"; browser.vivaldi = true; } if ( // Chrome, Opera 15+, Vivaldi and Safari are webkit based browsers browser.chrome || browser.opr || browser.safari || browser.vivaldi || browser.mobile === true && browser.ios !== true && knownMobiles !== true ) { browser.webkit = true; } if (browser.opr) { matched.browser = "opera"; browser.opera = true; } if (browser.safari) { if (browser.blackberry || browser.bb) { matched.browser = "blackberry"; browser.blackberry = true; } else if (browser.playbook) { matched.browser = "playbook"; browser.playbook = true; } else if (browser.android) { matched.browser = "android"; browser.android = true; } else if (browser.kindle) { matched.browser = "kindle"; browser.kindle = true; } else if (browser.silk) { matched.browser = "silk"; browser.silk = true; } } browser.name = matched.browser; browser.platform = matched.platform; if (true) { if (userAgent2.indexOf("electron") !== -1) { browser.electron = true; } else if (document.location.href.indexOf("-extension://") !== -1) { browser.bex = true; } else { if (window.Capacitor !== void 0) { browser.capacitor = true; browser.nativeMobile = true; browser.nativeMobileWrapper = "capacitor"; } else if (window._cordovaNative !== void 0 || window.cordova !== void 0) { browser.cordova = true; browser.nativeMobile = true; browser.nativeMobileWrapper = "cordova"; } if (isRuntimeSsrPreHydration.value === true) { preHydrationBrowser = { is: { ...browser } }; } if (hasTouch === true && browser.mac === true && (browser.desktop === true && browser.safari === true || browser.nativeMobile === true && browser.android !== true && browser.ios !== true && browser.ipad !== true)) { delete browser.mac; delete browser.desktop; const platform = Math.min(window.innerHeight, window.innerWidth) > 414 ? "ipad" : "iphone"; Object.assign(browser, { mobile: true, ios: true, platform, [platform]: true }); } if (browser.mobile !== true && window.navigator.userAgentData && window.navigator.userAgentData.mobile) { delete browser.desktop; browser.mobile = true; } } } return browser; } var userAgent = false ? "" : navigator.userAgent || navigator.vendor || window.opera; var ssrClient = { has: { touch: false, webStorage: false }, within: { iframe: false } }; var client = false ? ssrClient : { userAgent, is: getPlatform(userAgent), has: { touch: hasTouch }, within: { iframe: window.self !== window.top } }; var Platform = { install(opts) { const { $q } = opts; if (false) { $q.platform = this.parseSSR(opts.ssrContext); } else if (isRuntimeSsrPreHydration.value === true) { opts.onSSRHydrated.push(() => { Object.assign($q.platform, client); isRuntimeSsrPreHydration.value = false; }); $q.platform = reactive(this); } else { $q.platform = this; } } }; if (false) { Platform.parseSSR = (ssrContext) => { const userAgent2 = ssrContext.req.headers["user-agent"] || ssrContext.req.headers["User-Agent"] || ""; return { ...client, userAgent: userAgent2, is: getPlatform(userAgent2) }; }; } else { let hasWebStorage; injectProp(client.has, "webStorage", () => { if (hasWebStorage !== void 0) { return hasWebStorage; } try { if (window.localStorage) { hasWebStorage = true; return true; } } catch (_) { } hasWebStorage = false; return false; }); Object.assign(Platform, client); if (isRuntimeSsrPreHydration.value === true) { Object.assign(Platform, preHydrationBrowser, ssrClient); preHydrationBrowser = null; } } var Platform_default = Platform; // src/utils/private.create/create.js import { defineComponent, markRaw, reactive as reactive2 } from "vue"; function createComponent(raw) { return markRaw(defineComponent(raw)); } function createDirective(raw) { return markRaw(raw); } var createReactivePlugin = false ? (state, plugin) => { Object.assign(plugin, state); return plugin; } : (state, plugin) => { const reactiveState = reactive2(state); for (const name2 in state) { injectProp( plugin, name2, () => reactiveState[name2], (val) => { reactiveState[name2] = val; } ); } return plugin; }; // src/utils/event/event.js var listenOpts = { hasPassive: false, passiveCapture: true, notPassiveCapture: true }; try { const opts = Object.defineProperty({}, "passive", { get() { Object.assign(listenOpts, { hasPassive: true, passive: { passive: true }, notPassive: { passive: false }, passiveCapture: { passive: true, capture: true }, notPassiveCapture: { passive: false, capture: true } }); } }); window.addEventListener("qtest", null, opts); window.removeEventListener("qtest", null, opts); } catch (_) { } function noop() { } function leftClick(e) { return e.button === 0; } function middleClick(e) { return e.button === 1; } function rightClick(e) { return e.button === 2; } function position(e) { if (e.touches && e.touches[0]) { e = e.touches[0]; } else if (e.changedTouches && e.changedTouches[0]) { e = e.changedTouches[0]; } else if (e.targetTouches && e.targetTouches[0]) { e = e.targetTouches[0]; } return { top: e.clientY, left: e.clientX }; } function getEventPath(e) { if (e.path) { return e.path; } if (e.composedPath) { return e.composedPath(); } const path = []; let el = e.target; while (el) { path.push(el); if (el.tagName === "HTML") { path.push(document); path.push(window); return path; } el = el.parentElement; } } var LINE_HEIGHT = 40; var PAGE_HEIGHT = 800; function getMouseWheelDistance(e) { let x = e.deltaX, y = e.deltaY; if ((x || y) && e.deltaMode) { const multiplier = e.deltaMode === 1 ? LINE_HEIGHT : PAGE_HEIGHT; x *= multiplier; y *= multiplier; } if (e.shiftKey && !x) { [y, x] = [x, y]; } return { x, y }; } function stop(e) { e.stopPropagation(); } function prevent(e) { e.cancelable !== false && e.preventDefault(); } function stopAndPrevent(e) { e.cancelable !== false && e.preventDefault(); e.stopPropagation(); } function preventDraggable(el, status) { if (el === void 0 || status === true && el.__dragPrevented === true) { return; } const fn = status === true ? (el2) => { el2.__dragPrevented = true; el2.addEventListener("dragstart", prevent, listenOpts.notPassiveCapture); } : (el2) => { delete el2.__dragPrevented; el2.removeEventListener("dragstart", prevent, listenOpts.notPassiveCapture); }; el.querySelectorAll("a, img").forEach(fn); } function addEvt(ctx, targetName, events) { const name2 = `__q_${targetName}_evt`; ctx[name2] = ctx[name2] !== void 0 ? ctx[name2].concat(events) : events; events.forEach((evt) => { evt[0].addEventListener(evt[1], ctx[evt[2]], listenOpts[evt[3]]); }); } function cleanEvt(ctx, targetName) { const name2 = `__q_${targetName}_evt`; if (ctx[name2] !== void 0) { ctx[name2].forEach((evt) => { evt[0].removeEventListener(evt[1], ctx[evt[2]], listenOpts[evt[3]]); }); ctx[name2] = void 0; } } var event_default = { listenOpts, leftClick, middleClick, rightClick, position, getEventPath, getMouseWheelDistance, stop, prevent, stopAndPrevent, preventDraggable }; // src/utils/debounce/debounce.js function debounce_default(fn, wait = 250, immediate) { let timer2 = null; function debounced() { const args = arguments; const later = () => { timer2 = null; if (immediate !== true) { fn.apply(this, args); } }; if (timer2 !== null) { clearTimeout(timer2); } else if (immediate === true) { fn.apply(this, args); } timer2 = setTimeout(later, wait); } debounced.cancel = () => { timer2 !== null && clearTimeout(timer2); }; return debounced; } // src/plugins/screen/Screen.js var SIZE_LIST = ["sm", "md", "lg", "xl"]; var { passive } = listenOpts; var Screen_default = createReactivePlugin({ width: 0, height: 0, name: "xs", sizes: { sm: 600, md: 1024, lg: 1440, xl: 1920 }, lt: { sm: true, md: true, lg: true, xl: true }, gt: { xs: false, sm: false, md: false, lg: false }, xs: true, sm: false, md: false, lg: false, xl: false }, { setSizes: noop, setDebounce: noop, install({ $q, onSSRHydrated }) { $q.screen = this; if (false) return; if (this.__installed === true) { if ($q.config.screen !== void 0) { if ($q.config.screen.bodyClasses === false) { document.body.classList.remove(`screen--${this.name}`); } else { this.__update(true); } } return; } const { visualViewport } = window; const target2 = visualViewport || window; const scrollingElement = document.scrollingElement || document.documentElement; const getSize = visualViewport === void 0 || client.is.mobile === true ? () => [ Math.max(window.innerWidth, scrollingElement.clientWidth), Math.max(window.innerHeight, scrollingElement.clientHeight) ] : () => [ visualViewport.width * visualViewport.scale + window.innerWidth - scrollingElement.clientWidth, visualViewport.height * visualViewport.scale + window.innerHeight - scrollingElement.clientHeight ]; const classes = $q.config.screen?.bodyClasses === true; this.__update = (force) => { const [w, h138] = getSize(); if (h138 !== this.height) { this.height = h138; } if (w !== this.width) { this.width = w; } else if (force !== true) { return; } let s = this.sizes; this.gt.xs = w >= s.sm; this.gt.sm = w >= s.md; this.gt.md = w >= s.lg; this.gt.lg = w >= s.xl; this.lt.sm = w < s.sm; this.lt.md = w < s.md; this.lt.lg = w < s.lg; this.lt.xl = w < s.xl; this.xs = this.lt.sm; this.sm = this.gt.xs === true && this.lt.md === true; this.md = this.gt.sm === true && this.lt.lg === true; this.lg = this.gt.md === true && this.lt.xl === true; this.xl = this.gt.lg; s = this.xs === true && "xs" || this.sm === true && "sm" || this.md === true && "md" || this.lg === true && "lg" || "xl"; if (s !== this.name) { if (classes === true) { document.body.classList.remove(`screen--${this.name}`); document.body.classList.add(`screen--${s}`); } this.name = s; } }; let updateEvt, updateSizes = {}, updateDebounce = 16; this.setSizes = (sizes) => { SIZE_LIST.forEach((name2) => { if (sizes[name2] !== void 0) { updateSizes[name2] = sizes[name2]; } }); }; this.setDebounce = (deb) => { updateDebounce = deb; }; const start = () => { const style2 = getComputedStyle(document.body); if (style2.getPropertyValue("--q-size-sm")) { SIZE_LIST.forEach((name2) => { this.sizes[name2] = parseInt(style2.getPropertyValue(`--q-size-${name2}`), 10); }); } this.setSizes = (sizes) => { SIZE_LIST.forEach((name2) => { if (sizes[name2]) { this.sizes[name2] = sizes[name2]; } }); this.__update(true); }; this.setDebounce = (delay) => { updateEvt !== void 0 && target2.removeEventListener("resize", updateEvt, passive); updateEvt = delay > 0 ? debounce_default(this.__update, delay) : this.__update; target2.addEventListener("resize", updateEvt, passive); }; this.setDebounce(updateDebounce); if (Object.keys(updateSizes).length !== 0) { this.setSizes(updateSizes); updateSizes = void 0; } else { this.__update(); } classes === true && this.name === "xs" && document.body.classList.add("screen--xs"); }; if (isRuntimeSsrPreHydration.value === true) { onSSRHydrated.push(start); } else { start(); } } }); // src/plugins/dark/Dark.js var Plugin = createReactivePlugin({ isActive: false, mode: false }, { __media: void 0, set(val) { if (false) return; Plugin.mode = val; if (val === "auto") { if (Plugin.__media === void 0) { Plugin.__media = window.matchMedia("(prefers-color-scheme: dark)"); Plugin.__updateMedia = () => { Plugin.set("auto"); }; Plugin.__media.addListener(Plugin.__updateMedia); } val = Plugin.__media.matches; } else if (Plugin.__media !== void 0) { Plugin.__media.removeListener(Plugin.__updateMedia); Plugin.__media = void 0; } Plugin.isActive = val === true; document.body.classList.remove(`body--${val === true ? "light" : "dark"}`); document.body.classList.add(`body--${val === true ? "dark" : "light"}`); }, toggle() { if (true) { Plugin.set(Plugin.isActive === false); } }, install({ $q, ssrContext }) { const { dark } = $q.config; if (false) { this.isActive = dark === true; $q.dark = { isActive: false, mode: false, set: (val) => { ssrContext._meta.bodyClasses = ssrContext._meta.bodyClasses.replace(" body--light", "").replace(" body--dark", "") + ` body--${val === true ? "dark" : "light"}`; $q.dark.isActive = val === true; $q.dark.mode = val; }, toggle: () => { $q.dark.set($q.dark.isActive === false); } }; $q.dark.set(dark); return; } $q.dark = this; if (this.__installed !== true) { this.set(dark !== void 0 ? dark : false); } } }); var Dark_default = Plugin; // src/utils/css-var/set-css-var.js function setCssVar(propName, value2, element = document.body) { if (typeof propName !== "string") { throw new TypeError("Expected a string as propName"); } if (typeof value2 !== "string") { throw new TypeError("Expected a string as value"); } if (!(element instanceof Element)) { throw new TypeError("Expected a DOM element"); } element.style.setProperty(`--q-${propName}`, value2); } // src/utils/private.keyboard/key-composition.js var lastKeyCompositionStatus = false; function onKeyDownComposition(evt) { lastKeyCompositionStatus = evt.isComposing === true; } function shouldIgnoreKey(evt) { return lastKeyCompositionStatus === true || evt !== Object(evt) || evt.isComposing === true || evt.qKeyEvent === true; } function isKeyCode(evt, keyCodes4) { return shouldIgnoreKey(evt) === true ? false : [].concat(keyCodes4).includes(evt.keyCode); } // src/plugins/private.body/Body.js function getMobilePlatform(is) { if (is.ios === true) return "ios"; if (is.android === true) return "android"; } function getBodyClasses({ is, has: has2, within }, cfg) { const cls = [ is.desktop === true ? "desktop" : "mobile", `${has2.touch === false ? "no-" : ""}touch` ]; if (is.mobile === true) { const mobile = getMobilePlatform(is); mobile !== void 0 && cls.push("platform-" + mobile); } if (is.nativeMobile === true) { const type = is.nativeMobileWrapper; cls.push(type); cls.push("native-mobile"); if (is.ios === true && (cfg[type] === void 0 || cfg[type].iosStatusBarPadding !== false)) { cls.push("q-ios-padding"); } } else if (is.electron === true) { cls.push("electron"); } else if (is.bex === true) { cls.push("bex"); } within.iframe === true && cls.push("within-iframe"); return cls; } function applyClientSsrCorrections() { const { is } = client; const classes = document.body.className; const classList = new Set(classes.replace(/ {2}/g, " ").split(" ")); if (is.nativeMobile !== true && is.electron !== true && is.bex !== true) { if (is.desktop === true) { classList.delete("mobile"); classList.delete("platform-ios"); classList.delete("platform-android"); classList.add("desktop"); } else if (is.mobile === true) { classList.delete("desktop"); classList.add("mobile"); classList.delete("platform-ios"); classList.delete("platform-android"); const mobile = getMobilePlatform(is); if (mobile !== void 0) { classList.add(`platform-${mobile}`); } } } if (client.has.touch === true) { classList.delete("no-touch"); classList.add("touch"); } if (client.within.iframe === true) { classList.add("within-iframe"); } const newCls = Array.from(classList).join(" "); if (classes !== newCls) { document.body.className = newCls; } } function setColors(brand) { for (const color in brand) { setCssVar(color, brand[color]); } } var Body_default = { install(opts) { if (false) { const { $q, ssrContext } = opts; const cls = getBodyClasses($q.platform, $q.config); if ($q.config.screen?.bodyClass === true) { cls.push("screen--xs"); } ssrContext._meta.bodyClasses += cls.join(" "); const brand = $q.config.brand; if (brand !== void 0) { const vars = Object.keys(brand).map((key) => `--q-${key}:${brand[key]};`).join(""); ssrContext._meta.endingHeadTags += `<style>:root{${vars}}</style>`; } return; } if (this.__installed === true) return; if (isRuntimeSsrPreHydration.value === true) { applyClientSsrCorrections(); } else { const { $q } = opts; $q.config.brand !== void 0 && setColors($q.config.brand); const cls = getBodyClasses(client, $q.config); document.body.classList.add.apply(document.body.classList, cls); } if (client.is.ios === true) { document.body.addEventListener("touchstart", noop); } window.addEventListener("keydown", onKeyDownComposition, true); } }; // src/plugins/private.history/History.js var getTrue = () => true; function filterInvalidPath(path) { return typeof path === "string" && path !== "" && path !== "/" && path !== "#/"; } function normalizeExitPath(path) { path.startsWith("#") === true && (path = path.substring(1)); path.startsWith("/") === false && (path = "/" + path); path.endsWith("/") === true && (path = path.substring(0, path.length - 1)); return "#" + path; } function getShouldExitFn(cfg) { if (cfg.backButtonExit === false) { return () => false; } if (cfg.backButtonExit === "*") { return getTrue; } const exitPaths = ["#/"]; Array.isArray(cfg.backButtonExit) === true && exitPaths.push( ...cfg.backButtonExit.filter(filterInvalidPath).map(normalizeExitPath) ); return () => exitPaths.includes(window.location.hash); } var History_default = { __history: [], add: noop, remove: noop, install({ $q }) { if (this.__installed === true) return; const { cordova: cordova2, capacitor } = client.is; if (cordova2 !== true && capacitor !== true) return; const qConf = $q.config[cordova2 === true ? "cordova" : "capacitor"]; if (qConf?.backButton === false) return; if ( // if we're on Capacitor mode capacitor === true && (window.Capacitor === void 0 || window.Capacitor.Plugins.App === void 0) ) return; this.add = (entry) => { if (entry.condition === void 0) { entry.condition = getTrue; } this.__history.push(entry); }; this.remove = (entry) => { const index = this.__history.indexOf(entry); if (index >= 0) { this.__history.splice(index, 1); } }; const shouldExit = getShouldExitFn( Object.assign( { backButtonExit: true }, qConf ) ); const backHandler = () => { if (this.__history.length) { const entry = this.__history[this.__history.length - 1]; if (entry.condition() === true) { this.__history.pop(); entry.handler(); } } else if (shouldExit() === true) { navigator.app.exitApp(); } else { window.history.back(); } }; if (cordova2 === true) { document.addEventListener("deviceready", () => { document.addEventListener("backbutton", backHandler, false); }); } else { window.Capacitor.Plugins.App.addListener("backButton", backHandler); } } }; // lang/en-US.js var en_US_default = { isoName: "en-US", nativeName: "English (US)", label: { clear: "Clear", ok: "OK", cancel: "Cancel", close: "Close", set: "Set", select: "Select", reset: "Reset", remove: "Remove", update: "Update", create: "Create", search: "Search", filter: "Filter", refresh: "Refresh", expand: (label) => label ? `Expand "${label}"` : "Expand", collapse: (label) => label ? `Collapse "${label}"` : "Collapse" }, date: { days: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), daysShort: "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), monthsShort: "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), firstDayOfWeek: 0, // 0-6, 0 - Sunday, 1 Monday, ... format24h: false, pluralDay: "days", prevMonth: "Previous month", nextMonth: "Next month", prevYear: "Previous year", nextYear: "Next year", today: "Today", prevRangeYears: (range) => `Previous ${range} years`, nextRangeYears: (range) => `Next ${range} years` }, table: { noData: "No data available", noResults: "No matching records found", loading: "Loading...", selectedRecords: (rows) => rows === 1 ? "1 record selected." : (rows === 0 ? "No" : rows) + " records selected.", recordsPerPage: "Records per page:", allRows: "All", pagination: (start, end, total) => start + "-" + end + " of " + total, columns: "Columns" }, pagination: { first: "First page", prev: "Previous page", next: "Next page", last: "Last page" }, editor: { url: "URL", bold: "Bold", italic: "Italic", strikethrough: "Strikethrough", underline: "Underline", unorderedList: "Unordered List", orderedList: "Ordered List", subscript: "Subscript", superscript: "Superscript", hyperlink: "Hyperlink", toggleFullscreen: "Toggle Fullscreen", quote: "Quote", left: "Left align", center: "Center align", right: "Right align", justify: "Justify align", print: "Print", outdent: "Decrease indentation", indent: "Increase indentation", removeFormat: "Remove formatting", formatting: "Formatting", fontSize: "Font Size", align: "Align", hr: "Insert Horizontal Rule", undo: "Undo", redo: "Redo", heading1: "Heading 1", heading2: "Heading 2", heading3: "Heading 3", heading4: "Heading 4", heading5: "Heading 5", heading6: "Heading 6", paragraph: "Paragraph", code: "Code", size1: "Very small", size2: "A bit small", size3: "Normal", size4: "Medium-large", size5: "Big", size6: "Very big", size7: "Maximum", defaultFont: "Default Font", viewSource: "View Source" }, tree: { noNodes: "No nodes available", noResults: "No matching nodes found" } }; // src/plugins/lang/Lang.js function getLocale() { if (false) return; const val = Array.isArray(navigator.languages) === true && navigator.languages.length !== 0 ? navigator.languages[0] : navigator.language; if (typeof val === "string") { return val.split(/[-_]/).map((v, i) => i === 0 ? v.toLowerCase() : i > 1 || v.length < 4 ? v.toUpperCase() : v[0].toUpperCase() + v.slice(1).toLowerCase()).join("-"); } } var Plugin2 = createReactivePlugin({ __qLang: {} }, { // props: object // __langConfig: object getLocale, set(langObject = en_US_default, ssrContext) { const lang = { ...langObject, rtl: langObject.rtl === true, getLocale }; if (false) { if (ssrContext === void 0) { console.error("SSR ERROR: second param required: Lang.set(lang, ssrContext)"); return; } lang.set = ssrContext.$q.lang.set; if (ssrContext.$q.config.lang === void 0 || ssrContext.$q.config.lang.noHtmlAttrs !== true) { const dir = lang.rtl === true ? "rtl" : "ltr"; const attrs = `lang=${lang.isoName} dir=${dir}`; ssrContext._meta.htmlAttrs = ssrContext.__qPrevLang !== void 0 ? ssrContext._meta.htmlAttrs.replace(ssrContext.__qPrevLang, attrs) : attrs; ssrContext.__qPrevLang = attrs; } ssrContext.$q.lang = lang; } else { lang.set = Plugin2.set; if (Plugin2.__langConfig === void 0 || Plugin2.__langConfig.noHtmlAttrs !== true) { const el = document.documentElement; el.setAttribute("dir", lang.rtl === true ? "rtl" : "ltr"); el.setAttribute("lang", lang.isoName); } Object.assign(Plugin2.__qLang, lang); } }, install({ $q, lang, ssrContext }) { if (false) { const initialLang = lang || en_US_default; $q.lang = {}; $q.lang.set = (langObject) => { this.set(langObject, ssrContext); }; $q.lang.set(initialLang); if (this.props === void 0 || this.props.isoName !== initialLang.isoName) { this.props = { ...initialLang }; } } else { $q.lang = Plugin2.__qLang; Plugin2.__langConfig = $q.config.lang; if (this.__installed === true) { lang !== void 0 && this.set(lang); } else { this.props = new Proxy(this.__qLang, { get() { return Reflect.get(...arguments); }, ownKeys(target2) { return Reflect.ownKeys(target2).filter((key) => key !== "set" && key !== "getLocale"); } }); this.set(lang || en_US_default); } } } }); var Lang_default = Plugin2; // icon-set/material-icons.js var material_icons_default = { name: "material-icons", type: { positive: "check_circle", negative: "warning", info: "info", warning: "priority_high" }, arrow: { up: "arrow_upward", right: "arrow_forward", down: "arrow_downward", left: "arrow_back", dropdown: "arrow_drop_down" }, chevron: { left: "chevron_left", right: "chevron_right" }, colorPicker: { spectrum: "gradient", tune: "tune", palette: "style" }, pullToRefresh: { icon: "refresh" }, carousel: { left: "chevron_left", right: "chevron_right", up: "keyboard_arrow_up", down: "keyboard_arrow_down", navigationIcon: "lens" }, chip: { remove: "cancel", selected: "check" }, datetime: { arrowLeft: "chevron_left", arrowRight: "chevron_right", now: "access_time", today: "today" }, editor: { bold: "format_bold", italic: "format_italic", strikethrough: "strikethrough_s", underline: "format_underlined", unorderedList: "format_list_bulleted", orderedList: "format_list_numbered", subscript: "vertical_align_bottom", superscript: "vertical_align_top", hyperlink: "link", toggleFullscreen: "fullscreen", quote: "format_quote", left: "format_align_left", center: "format_align_center", right: "format_align_right", justify: "format_align_justify", print: "print", outdent: "format_indent_decrease", indent: "format_indent_increase", removeFormat: "format_clear", formatting: "text_format", fontSize: "format_size", align: "format_align_left", hr: "remove", undo: "undo", redo: "redo", heading: "format_size", code: "code", size: "format_size", font: "font_download", viewSource: "code" }, expansionItem: { icon: "keyboard_arrow_down", denseIcon: "arrow_drop_down" }, fab: { icon: "add", activeIcon: "close" }, field: { clear: "cancel", error: "error" }, pagination: { first: "first_page", prev: "keyboard_arrow_left", next: "keyboard_arrow_right", last: "last_page" }, rating: { icon: "grade" }, stepper: { done: "check", active: "edit", error: "warning" }, tabs: { left: "chevron_left", right: "chevron_right", up: "keyboard_arrow_up", down: "keyboard_arrow_down" }, table: { arrowUp: "arrow_upward", warning: "warning", firstPage: "first_page", prevPage: "chevron_left", nextPage: "chevron_right", lastPage: "last_page" }, tree: { icon: "play_arrow" }, uploader: { done: "done", clear: "clear", add: "add_box", upload: "cloud_upload", removeQueue: "clear_all", removeUploaded: "done_all" } }; // src/plugins/icon-set/IconSet.js var Plugin3 = createReactivePlugin({ iconMapFn: null, __qIconSet: {} }, { // props: object set(setObject, ssrContext) { const def = { ...setObject }; if (false) { if (ssrContext === void 0) { console.error("SSR ERROR: second param required: IconSet.set(iconSet, ssrContext)"); return; } def.set = ssrContext.$q.iconSet.set; Object.assign(ssrContext.$q.iconSet, def); } else { def.set = Plugin3.set; Object.assign(Plugin3.__qIconSet, def); } }, install({ $q, iconSet, ssrContext }) { if (false) { const initialSet = iconSet || material_icons_default; $q.iconMapFn = ssrContext.$q.config.iconMapFn || this.iconMapFn || null; $q.iconSet = {}; $q.iconSet.set = (setObject) => { this.set(setObject, ssrContext); }; $q.iconSet.set(initialSet); if (this.props === void 0 || this.props.name !== initialSet.name) { this.props = { ...initialSet }; } } else { if ($q.config.iconMapFn !== void 0) { this.iconMapFn = $q.config.iconMapFn; } $q.iconSet = this.__qIconSet; injectProp($q, "iconMapFn", () => this.iconMapFn, (val) => { this.iconMapFn = val; }); if (this.__installed === true) { iconSet !== void 0 && this.set(iconSet); } else { this.props = new Proxy(this.__qIconSet, { get() { return Reflect.get(...arguments); }, ownKeys(target2) { return Reflect.ownKeys(target2).filter((key) => key !== "set"); } }); this.set(iconSet || material_icons_default); } } } }); var IconSet_default = Plugin3; // src/utils/private.symbols/symbols.js var quasarKey = "_q_"; var timelineKey = "_q_t_"; var stepperKey = "_q_s_"; var layoutKey = "_q_l_"; var pageContainerKey = "_q_pc_"; var fabKey = "_q_f_"; var formKey = "_q_fo_"; var tabsKey = "_q_tabs_"; var uploaderKey = "_q_u_"; function emptyRenderFn() { } // src/utils/private.config/instance-config.js var globalConfig = {}; var globalConfigIsFrozen = false; function freezeGlobalConfig() { globalConfigIsFrozen = true; } // src/utils/is/is.js function isDeepEqual(a, b) { if (a === b) { return true; } if (a !== null && b !== null && typeof a === "object" && typeof b === "object") { if (a.constructor !== b.constructor) { return false; } let length, i; if (a.constructor === Array) { length = a.length; if (length !== b.length) { return false; } for (i = length; i-- !== 0; ) { if (isDeepEqual(a[i], b[i]) !== true) { return false; } } return true; } if (a.constructor === Map) { if (a.size !== b.size) { return false; } let iter = a.entries(); i = iter.next(); while (i.done !== true) { if (b.has(i.value[0]) !== true) { return false; } i = iter.next(); } iter = a.entries(); i = iter.next(); while (i.done !== true) { if (isDeepEqual(i.value[1], b.get(i.value[0])) !== true) { return false; } i = iter.next(); } return true; } if (a.constructor === Set) { if (a.size !== b.size) { return false; } const iter = a.entries(); i = iter.next(); while (i.done !== true) { if (b.has(i.value[0]) !== true) { return false; } i = iter.next(); } return true; } if (a.buffer != null && a.buffer.constructor === ArrayBuffer) { length = a.length; if (length !== b.length) { return false; } for (i = length; i-- !== 0; ) { if (a[i] !== b[i]) { return false; } } return true; } if (a.constructor === RegExp) { return a.source === b.source && a.flags === b.flags; } if (a.valueOf !== Object.prototype.valueOf) { return a.valueOf() === b.valueOf(); } if (a.toString !== Object.prototype.toString) { return a.toString() === b.toString(); } const keys = Object.keys(a).filter((key) => a[key] !== void 0); length = keys.length; if (length !== Object.keys(b).filter((key) => b[key] !== void 0).length) { return false; } for (i = length; i-- !== 0; ) { const key = keys[i]; if (isDeepEqual(a[key], b[key]) !== true) { return false; } } return true; } return a !== a && b !== b; } function isObject(v) { return v !== null && typeof v === "object" && Array.isArray(v) !== true; } function isDate(v) { return Object.prototype.toString.call(v) === "[object Date]"; } function isRegexp(v) { return Object.prototype.toString.call(v) === "[object RegExp]"; } function isNumber(v) { return typeof v === "number" && isFinite(v); } var is_default = { deepEqual: isDeepEqual, object: isObject, date: isDate, regexp: isRegexp, number: isNumber }; // src/install-quasar.js var autoInstalledPlugins = [ Platform_default, Body_default, Dark_default, Screen_default, History_default, Lang_default, IconSet_default ]; function createChildApp(appCfg, parentApp) { const app2 = createApp(appCfg); app2.config.globalProperties = parentApp.config.globalProperties; const { reload, ...appContext } = parentApp._context; Object.assign(app2._context, appContext); return app2; } function installPlugins(pluginOpts, pluginList) { pluginList.forEach((Plugin11) => { Plugin11.install(pluginOpts); Plugin11.__installed = true; }); } function prepareApp(app2, uiOpts, pluginOpts) { app2.config.globalProperties.$q = pluginOpts.$q; app2.provide(quasarKey, pluginOpts.$q); installPlugins(pluginOpts, autoInstalledPlugins); uiOpts.components !== void 0 && Object.values(uiOpts.components).forEach((c) => { if (isObject(c) === true && c.name !== void 0) { app2.component(c.name, c); } }); uiOpts.directives !== void 0 && Object.values(uiOpts.directives).forEach((d) => { if (isObject(d) === true && d.name !== void 0) { app2.directive(d.name, d); } }); uiOpts.plugins !== void 0 && installPlugins( pluginOpts, Object.values(uiOpts.plugins).filter( (p) => typeof p.install === "function" && autoInstalledPlugins.includes(p) === false ) ); if (isRuntimeSsrPreHydration.value === true) { pluginOpts.$q.onSSRHydrated = () => { pluginOpts.onSSRHydrated.forEach((fn) => { fn(); }); pluginOpts.$q.onSSRHydrated = () => { }; }; } } var install_quasar_default = false ? function(parentApp, opts = {}, ssrContext) { const $q = { version: "2.18.1", config: opts.config || {} }; Object.assign(ssrContext, { $q, _meta: { htmlAttrs: "", headTags: "", endingHeadTags: "", bodyClasses: "", bodyAttrs: "data-server-rendered", bodyTags: "" } }); if (ssrContext._modules === void 0) { ssrContext._modules = []; } if (ssrContext.onRendered === void 0) { ssrContext.onRendered = () => { }; } parentApp.config.globalProperties.ssrContext = ssrContext; prepareApp(parentApp, opts, { parentApp, $q, lang: opts.lang, iconSet: opts.iconSet, ssrContext }); } : function(parentApp, opts = {}) { const $q = { version: "2.18.1" }; if (globalConfigIsFrozen === false) { if (opts.config !== void 0) { Object.assign(globalConfig, opts.config); } $q.config = { ...globalConfig }; freezeGlobalConfig(); } else { $q.config = opts.config || {}; } prepareApp(parentApp, opts, { parentApp, $q, lang: opts.lang, iconSet: opts.iconSet, onSSRHydrated: [] }); }; // src/components/ajax-bar/QAjaxBar.js import { h, ref as ref2, computed, onMounted, onBeforeUnmount, getCurrentInstance } from "vue"; // src/utils/format/format.js var units = ["B", "KB", "MB", "GB", "TB", "PB"]; function humanStorageSize(bytes, decimals = 1) { let u = 0; while (parseInt(bytes, 10) >= 1024 && u < units.length - 1) { bytes /= 1024; ++u; } return `${bytes.toFixed(decimals)}${units[u]}`; } function capitalize(str) { return str.charAt(0).toUpperCase() + str.slice(1); } function between(v, min, max) { return max <= min ? min : Math.min(max, Math.max(min, v)); } function normalizeToInterval(v, min, max) { if (max <= min) { return min; } const size2 = max - min + 1; let index = min + (v - min) % size2; if (index < min) { index = size2 + index; } return index === 0 ? 0 : index; } function pad(v, length = 2, char = "0") { if (v === void 0 || v === null) { return v; } const val = "" + v; return val.length >= length ? val : new Array(length - val.length + 1).join(char) + val; } var format_default = { humanStorageSize, capitalize, between, normalizeToInterval, pad }; // src/components/ajax-bar/QAjaxBar.js var xhr = false ? null : XMLHttpRequest; var open = false ? null : xhr.prototype.open; var positionValues = ["top", "right", "bottom", "left"]; var stack = []; var highjackCount = 0; function translate({ p, pos, active, horiz, reverse, dir }) { let x = 1, y = 1; if (horiz === true) { if (reverse === true) { x = -1; } if (pos === "bottom") { y = -1; } return { transform: `translate3d(${x * (p - 100)}%,${active ? 0 : y * -200}%,0)` }; } if (reverse === true) { y = -1; } if (pos === "right") { x = -1; } return { transform: `translate3d(${active ? 0 : dir * x * -200}%,${y * (p - 100)}%,0)` }; } function inc(p, amount) { if (typeof amount !== "number") { if (p < 25) { amount = Math.random() * 3 + 3; } else if (p < 65) { amount = Math.random() * 3; } else if (p < 85) { amount = Math.random() * 2; } else if (p < 99) { amount = 0.6; } else { amount = 0; } } return between(p + amount, 0, 100); } function highjackAjax(stackEntry) { highjackCount++; stack.push(stackEntry); if (highjackCount > 1) return; xhr.prototype.open = function(_, url) { const stopStack = []; const loadStart = () => { stack.forEach((entry) => { if (entry.hijackFilter.value === null || entry.hijackFilter.value(url) === true) { entry.start(); stopStack.push(entry.stop); } }); }; const loadEnd = () => { stopStack.forEach((stop2) => { stop2(); }); }; this.addEventListener("loadstart", loadStart, { once: true }); this.addEventListener("loadend", loadEnd, { once: true }); open.apply(this, arguments); }; } function restoreAjax(start) { stack = stack.filter((entry) => entry.start !== start); highjackCount = Math.max(0, highjackCount - 1); if (highjackCount === 0) { xhr.prototype.open = open; } } var QAjaxBar_default = createComponent({ name: "QAjaxBar", props: { position: { type: String, default: "top", validator: (val) => positionValues.includes(val) }, size: { type: String, default: "2px" }, color: String, skipHijack: Boolean, reverse: Boolean, hijackFilter: Function }, emits: ["start", "stop"], setup(props4, { emit }) { const { proxy } = getCurrentInstance(); const progress = ref2(0); const onScreen = ref2(false); const animate = ref2(true); let sessions = 0, timer2 = null, speed; const classes = computed( () => `q-loading-bar q-loading-bar--${props4.position}` + (props4.color !== void 0 ? ` bg-${props4.color}` : "") + (animate.value === true ? "" : " no-transition") ); const horizontal = computed(() => props4.position === "top" || props4.position === "bottom"); const sizeProp = computed(() => horizontal.value === true ? "height" : "width"); const style2 = computed(() => { const active = onScreen.value; const obj = translate({ p: progress.value, pos: props4.position, active, horiz: horizontal.value, reverse: proxy.$q.lang.rtl === true && ["top", "bottom"].includes(props4.position) ? props4.reverse === false : props4.reverse, dir: proxy.$q.lang.rtl === true ? -1 : 1 }); obj[sizeProp.value] = props4.size; obj.opacity = active ? 1 : 0; return obj; }); const attributes = computed(() => onScreen.value === true ? { role: "progressbar", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": progress.value } : { "aria-hidden": "true" }); function start(newSpeed = 300) { const oldSpeed = speed; speed = Math.max(0, newSpeed) || 0; sessions++; if (sessions > 1) { if (oldSpeed === 0 && newSpeed > 0) { planNextStep(); } else if (timer2 !== null && oldSpeed > 0 && newSpeed <= 0) { clearTimeout(timer2); timer2 = null; } return sessions; } timer2 !== null && clearTimeout(timer2); emit("start"); progress.value = 0; timer2 = setTimeout(() => { timer2 = null; animate.value = true; newSpeed > 0 && planNextStep(); }, onScreen._value === true ? 500 : 1); if (onScreen._value !== true) { onScreen.value = true; animate.value = false; } return sessions; } function increment(amount) { if (sessions > 0) { progress.value = inc(progress.value, amount); } return sessions; } function stop2() { sessions = Math.max(0, sessions - 1); if (sessions > 0) { return sessions; } if (timer2 !== null) { clearTimeout(timer2); timer2 = null; } emit("stop"); const end = () => { animate.value = true; progress.value = 100; timer2 = setTimeout(() => { timer2 = null; onScreen.value = false; }, 1e3); }; if (progress.value === 0) { timer2 = setTimeout(end, 1); } else { end(); } return sessions; } function planNextStep() { if (progress.value < 100) { timer2 = setTimeout(() => { timer2 = null; increment(); planNextStep(); }, speed); } } let hijacked; onMounted(() => { if (props4.skipHijack !== true) { hijacked = true; highjackAjax({ start, stop: stop2, hijackFilter: computed(() => props4.hijackFilter || null) }); } }); onBeforeUnmount(() => { timer2 !== null && clearTimeout(timer2); hijacked === true && restoreAjax(start); }); Object.assign(proxy, { start, stop: stop2, increment }); return () => h("div", { class: classes.value, style: style2.value, ...attributes.value }); } }); // src/components/avatar/QAvatar.js import { h as h4, computed as computed4 } from "vue"; // src/components/icon/QIcon.js import { h as h3, computed as computed3, getCurrentInstance as getCurrentInstance2 } from "vue"; // src/composables/private.use-size/use-size.js import { computed as computed2 } from "vue"; var useSizeDefaults = { xs: 18, sm: 24, md: 32, lg: 38, xl: 46 }; var useSizeProps = { size: String }; function use_size_default(props4, sizes = useSizeDefaults) { return computed2(() => props4.size !== void 0 ? { fontSize: props4.size in sizes ? `${sizes[props4.size]}px` : props4.size } : null); } // src/utils/private.render/render.js import { h as h2, withDirectives } from "vue"; function hSlot(slot, otherwise) { return slot !== void 0 ? slot() || otherwise : otherwise; } function hUniqueSlot(slot, otherwise) { if (slot !== void 0) { const vnode = slot(); if (vnode !== void 0 && vnode !== null) { return vnode.slice(); } } return otherwise; } function hMergeSlot(slot, source) { return slot !== void 0 ? source.concat(slot()) : source; } function hMergeSlotSafely(slot, source) { if (slot === void 0) { return source; } return source !== void 0 ? source.concat(