// ==UserScript== // @name 微信读书-WEB端自动阅读插件 // @description ① 打开一本书的微信读书界面,点击界面右中方“读”字按钮,然后修改相应配置,再打开“自动阅读”到开启即可 ② 如果需要后台刷时长,请一定记得开启 **定时翻页** 开关 ③ Edge 浏览器请关闭TAB休眠或者在休眠配置里面排除 https://weread.qq.com // @version 2025.06.24.01 // @author 纯白约定 // @match https://weread.qq.com/* // @grant 纯白约定 // @license MIT // @namespace https://github.com/diduweiwu // @downloadURL https://update.greasyfork.icu/scripts/407535/%E5%BE%AE%E4%BF%A1%E8%AF%BB%E4%B9%A6-WEB%E7%AB%AF%E8%87%AA%E5%8A%A8%E9%98%85%E8%AF%BB%E6%8F%92%E4%BB%B6.user.js // @updateURL https://update.greasyfork.icu/scripts/407535/%E5%BE%AE%E4%BF%A1%E8%AF%BB%E4%B9%A6-WEB%E7%AB%AF%E8%87%AA%E5%8A%A8%E9%98%85%E8%AF%BB%E6%8F%92%E4%BB%B6.meta.js // ==/UserScript== /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 262: /***/ (function(__unused_webpack_module, exports) { "use strict"; var __webpack_unused_export__; __webpack_unused_export__ = ({ value: true }); // runtime helper for setting properties on components // in a tree-shakable way exports.A = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; /***/ }), /***/ 314: /***/ (function(module) { "use strict"; /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ module.exports = function (cssWithMappingToString) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = ""; var needLayer = typeof item[5] !== "undefined"; if (item[4]) { content += "@supports (".concat(item[4], ") {"); } if (item[2]) { content += "@media ".concat(item[2], " {"); } if (needLayer) { content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {"); } content += cssWithMappingToString(item); if (needLayer) { content += "}"; } if (item[2]) { content += "}"; } if (item[4]) { content += "}"; } return content; }).join(""); }; // import a list of modules into the list list.i = function i(modules, media, dedupe, supports, layer) { if (typeof modules === "string") { modules = [[null, modules, undefined]]; } var alreadyImportedModules = {}; if (dedupe) { for (var k = 0; k < this.length; k++) { var id = this[k][0]; if (id != null) { alreadyImportedModules[id] = true; } } } for (var _k = 0; _k < modules.length; _k++) { var item = [].concat(modules[_k]); if (dedupe && alreadyImportedModules[item[0]]) { continue; } if (typeof layer !== "undefined") { if (typeof item[5] === "undefined") { item[5] = layer; } else { item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}"); item[5] = layer; } } if (media) { if (!item[2]) { item[2] = media; } else { item[1] = "@media ".concat(item[2], " {").concat(item[1], "}"); item[2] = media; } } if (supports) { if (!item[4]) { item[4] = "".concat(supports); } else { item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}"); item[4] = supports; } } list.push(item); } }; return list; }; /***/ }), /***/ 435: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { // style-loader: Adds some css to the DOM by adding a `; } function ssrAdapter(id, style, ssrContext) { const { styles, ids } = ssrContext; // we need to impl other options to make it behaves the same as the client side if (ids.has(id)) return; if (styles !== null) { ids.add(id); styles.push(createStyleString(id, style)); } } const isBrowser = typeof document !== 'undefined'; function useSsrAdapter() { if (isBrowser) return undefined; const context = runtime_core_esm_bundler_inject(esm_ssrContextKey, null); if (context === null) return undefined; return { adapter: (id, style) => ssrAdapter(id, style, context), context }; } function setup(app) { const styles = []; const ssrContext = { styles, ids: new Set() }; app.provide(esm_ssrContextKey, ssrContext); return { collect() { const res = styles.join('\n'); styles.length = 0; return res; } }; } ;// ./node_modules/@css-render/plugin-bem/esm/index.js /* eslint-disable @typescript-eslint/restrict-template-expressions */ /* eslint-disable @typescript-eslint/strict-boolean-expressions */ function esm_plugin(options) { let _bPrefix = '.'; let _ePrefix = '__'; let _mPrefix = '--'; let c; if (options) { let t = options.blockPrefix; if (t) { _bPrefix = t; } t = options.elementPrefix; if (t) { _ePrefix = t; } t = options.modifierPrefix; if (t) { _mPrefix = t; } } const _plugin = { install(instance) { c = instance.c; const ctx = instance.context; ctx.bem = {}; ctx.bem.b = null; ctx.bem.els = null; } }; function b(arg) { let memorizedB; let memorizedE; return { before(ctx) { memorizedB = ctx.bem.b; memorizedE = ctx.bem.els; ctx.bem.els = null; }, after(ctx) { ctx.bem.b = memorizedB; ctx.bem.els = memorizedE; }, $({ context, props }) { arg = typeof arg === 'string' ? arg : arg({ context, props }); context.bem.b = arg; return `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}`; } }; } function e(arg) { let memorizedE; return { before(ctx) { memorizedE = ctx.bem.els; }, after(ctx) { ctx.bem.els = memorizedE; }, $({ context, props }) { arg = typeof arg === 'string' ? arg : arg({ context, props }); context.bem.els = arg.split(',').map(v => v.trim()); return context.bem.els .map(el => `${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${_ePrefix}${el}`).join(', '); } }; } function m(arg) { return { $({ context, props }) { arg = typeof arg === 'string' ? arg : arg({ context, props }); const modifiers = arg.split(',').map(v => v.trim()); function elementToSelector(el) { return modifiers.map(modifier => `&${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${el !== undefined ? `${_ePrefix}${el}` : ''}${_mPrefix}${modifier}`).join(', '); } const els = context.bem.els; if (els !== null) { if (false) {} return elementToSelector(els[0]); } else { return elementToSelector(); } } }; } function notM(arg) { return { $({ context, props }) { arg = typeof arg === 'string' ? arg : arg({ context, props }); const els = context.bem.els; if (false) {} return `&:not(${(props === null || props === void 0 ? void 0 : props.bPrefix) || _bPrefix}${context.bem.b}${(els !== null && els.length > 0) ? `${_ePrefix}${els[0]}` : ''}${_mPrefix}${arg})`; } }; } const cB = ((...args) => c(b(args[0]), args[1], args[2])); const cE = ((...args) => c(e(args[0]), args[1], args[2])); const cM = ((...args) => c(m(args[0]), args[1], args[2])); const cNotM = ((...args) => c(notM(args[0]), args[1], args[2])); Object.assign(_plugin, { cB, cE, cM, cNotM }); return _plugin; } /* harmony default export */ var esm = ((/* unused pure expression or super */ null && (esm_plugin))); ;// ./node_modules/css-render/esm/parse.js function ampCount(selector) { let cnt = 0; for (let i = 0; i < selector.length; ++i) { if (selector[i] === '&') ++cnt; } return cnt; } /** * Don't just use ',' to separate css selector. For example: * x:(a, b) {} will be split into 'x:(a' and 'b)', which is not expected. * Make sure comma doesn't exist inside parentheses. */ const separatorRegex = /\s*,(?![^(]*\))\s*/g; const extraSpaceRegex = /\s+/g; /** * selector must includes '&' * selector is trimmed * every part of amp is trimmed */ function resolveSelectorWithAmp(amp, selector) { const nextAmp = []; selector.split(separatorRegex).forEach(partialSelector => { let round = ampCount(partialSelector); // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (!round) { amp.forEach(partialAmp => { nextAmp.push( // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions (partialAmp && partialAmp + ' ') + partialSelector); }); return; } else if (round === 1) { amp.forEach(partialAmp => { nextAmp.push(partialSelector.replace('&', partialAmp)); }); return; } let partialNextAmp = [ partialSelector ]; // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions while (round--) { const nextPartialNextAmp = []; partialNextAmp.forEach(selectorItr => { amp.forEach(partialAmp => { nextPartialNextAmp.push(selectorItr.replace('&', partialAmp)); }); }); partialNextAmp = nextPartialNextAmp; } partialNextAmp.forEach(part => nextAmp.push(part)); }); return nextAmp; } /** * selector mustn't includes '&' * selector is trimmed */ function resolveSelector(amp, selector) { const nextAmp = []; selector.split(separatorRegex).forEach(partialSelector => { amp.forEach(partialAmp => { // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions nextAmp.push(((partialAmp && partialAmp + ' ') + partialSelector)); }); }); return nextAmp; } function parseSelectorPath(selectorPaths) { let amp = ['']; selectorPaths.forEach(selector => { // eslint-disable-next-line selector = selector && selector.trim(); if ( // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions !selector) { /** * if it's a empty selector, do nothing */ return; } // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (selector.includes('&')) { amp = resolveSelectorWithAmp(amp, selector); } else { amp = resolveSelector(amp, selector); } }); return amp.join(', ').replace(extraSpaceRegex, ' '); } ;// ./node_modules/css-render/esm/utils.js function removeElement(el) { /* istanbul ignore if */ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (!el) return; const parentElement = el.parentElement; /* istanbul ignore else */ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (parentElement) parentElement.removeChild(el); } function queryElement(id, parent) { return (parent !== null && parent !== void 0 ? parent : document.head).querySelector(`style[cssr-id="${id}"]`); } function createElement(id) { const el = document.createElement('style'); el.setAttribute('cssr-id', id); return el; } function isMediaOrSupports(selector) { // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (!selector) return false; return /^\s*@(s|m)/.test(selector); } ;// ./node_modules/css-render/esm/render.js const kebabRegex = /[A-Z]/g; function kebabCase(pattern) { return pattern.replace(kebabRegex, match => '-' + match.toLowerCase()); } /** TODO: refine it to solve nested object */ function unwrapProperty(prop, indent = ' ') { if (typeof prop === 'object' && prop !== null) { return (' {\n' + Object.entries(prop).map(v => { return indent + ` ${kebabCase(v[0])}: ${v[1]};`; }).join('\n') + '\n' + indent + '}'); } return `: ${prop};`; } /** unwrap properties */ function unwrapProperties(props, instance, params) { if (typeof props === 'function') { return props({ context: instance.context, props: params }); } return props; } function createStyle(selector, props, instance, params) { if (!props) return ''; // eslint-disable-next-line const unwrappedProps = unwrapProperties(props, instance, params); if (!unwrappedProps) return ''; if (typeof unwrappedProps === 'string') { return `${selector} {\n${unwrappedProps}\n}`; } const propertyNames = Object.keys(unwrappedProps); if (propertyNames.length === 0) { if (instance.config.keepEmptyBlock) return selector + ' {\n}'; return ''; } const statements = selector ? [ selector + ' {' ] : []; propertyNames.forEach(propertyName => { const property = unwrappedProps[propertyName]; if (propertyName === 'raw') { statements.push('\n' + property + '\n'); return; } propertyName = kebabCase(propertyName); if (property !== null && property !== undefined) { statements.push(` ${propertyName}${unwrapProperty(property)}`); } }); if (selector) { statements.push('}'); } return statements.join('\n'); } function loopCNodeListWithCallback(children, options, callback) { /* istanbul ignore if */ if (!children) return; children.forEach(child => { if (Array.isArray(child)) { loopCNodeListWithCallback(child, options, callback); } else if (typeof child === 'function') { const grandChildren = child(options); if (Array.isArray(grandChildren)) { loopCNodeListWithCallback(grandChildren, options, callback); } else if (grandChildren) { callback(grandChildren); } } else if (child) { callback(child); } }); } function traverseCNode(node, selectorPaths, styles, instance, params) { const $ = node.$; let blockSelector = ''; if (!$ || typeof $ === 'string') { if (isMediaOrSupports($)) { blockSelector = $; } else { // as a string selector selectorPaths.push($); } } else if (typeof $ === 'function') { const selector = $({ context: instance.context, props: params }); if (isMediaOrSupports(selector)) { blockSelector = selector; } else { // as a lazy selector selectorPaths.push(selector); } } else { // as a option selector if ($.before) $.before(instance.context); if (!$.$ || typeof $.$ === 'string') { if (isMediaOrSupports($.$)) { blockSelector = $.$; } else { // as a string selector selectorPaths.push($.$); } } else /* istanbul ignore else */ if ($.$) { const selector = $.$({ context: instance.context, props: params }); if (isMediaOrSupports(selector)) { blockSelector = selector; } else { // as a lazy selector selectorPaths.push(selector); } } } const selector = parseSelectorPath(selectorPaths); const style = createStyle(selector, node.props, instance, params); if (blockSelector) { styles.push(`${blockSelector} {`); } else if (style.length) { styles.push(style); } if (node.children) { loopCNodeListWithCallback(node.children, { context: instance.context, props: params }, childNode => { if (typeof childNode === 'string') { const style = createStyle(selector, { raw: childNode }, instance, params); styles.push(style); } else { traverseCNode(childNode, selectorPaths, styles, instance, params); } }); } selectorPaths.pop(); if (blockSelector) { styles.push('}'); } if ($ && $.after) $.after(instance.context); } function render_render(node, instance, props) { const styles = []; traverseCNode(node, [], styles, instance, props); return styles.join('\n\n'); } ;// ./node_modules/@emotion/hash/dist/hash.browser.esm.js /* eslint-disable */ // Inspired by https://github.com/garycourt/murmurhash-js // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86 function murmur2(str) { // 'm' and 'r' are mixing constants generated offline. // They're not really 'magic', they just happen to work well. // const m = 0x5bd1e995; // const r = 24; // Initialize the hash var h = 0; // Mix 4 bytes at a time into the hash var k, i = 0, len = str.length; for (; len >= 4; ++i, len -= 4) { k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24; k = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16); k ^= /* k >>> r: */ k >>> 24; h = /* Math.imul(k, m): */ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^ /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); } // Handle the last few bytes of the input array switch (len) { case 3: h ^= (str.charCodeAt(i + 2) & 0xff) << 16; case 2: h ^= (str.charCodeAt(i + 1) & 0xff) << 8; case 1: h ^= str.charCodeAt(i) & 0xff; h = /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); } // Do a few final mixes of the hash to ensure the last few // bytes are well-incorporated. h ^= h >>> 13; h = /* Math.imul(h, m): */ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16); return ((h ^ h >>> 15) >>> 0).toString(36); } /* harmony default export */ var hash_browser_esm = (murmur2); ;// ./node_modules/css-render/esm/mount.js /* eslint-disable @typescript-eslint/prefer-ts-expect-error */ /* eslint-disable @typescript-eslint/strict-boolean-expressions */ if (typeof window !== 'undefined') { window.__cssrContext = {}; } function unmount(instance, node, id, parent) { const { els } = node; // If id is undefined, unmount all styles if (id === undefined) { els.forEach(removeElement); node.els = []; } else { const target = queryElement(id, parent); // eslint-disable-next-line if (target && els.includes(target)) { removeElement(target); node.els = els.filter((el) => el !== target); } } } function addElementToList(els, target) { els.push(target); } function mount(instance, node, id, props, head, force, anchorMetaName, parent, ssrAdapter // eslint-disable-next-line @typescript-eslint/no-invalid-void-type ) { let style; if (id === undefined) { style = node.render(props); id = hash_browser_esm(style); } if (ssrAdapter) { ssrAdapter.adapter(id, style !== null && style !== void 0 ? style : node.render(props)); return; } if (parent === undefined) { parent = document.head; } const queriedTarget = queryElement(id, parent); if (queriedTarget !== null && !force) { return queriedTarget; } const target = queriedTarget !== null && queriedTarget !== void 0 ? queriedTarget : createElement(id); if (style === undefined) style = node.render(props); target.textContent = style; if (queriedTarget !== null) return queriedTarget; if (anchorMetaName) { const anchorMetaEl = parent.querySelector(`meta[name="${anchorMetaName}"]`); if (anchorMetaEl) { parent.insertBefore(target, anchorMetaEl); addElementToList(node.els, target); return target; } } if (head) { parent.insertBefore(target, parent.querySelector('style, link')); } else { parent.appendChild(target); } addElementToList(node.els, target); return target; } ;// ./node_modules/css-render/esm/c.js function wrappedRender(props) { return render_render(this, this.instance, props); } // do not guard node calling, it should throw an error. function wrappedMount(options = {} // eslint-disable-next-line @typescript-eslint/no-invalid-void-type ) { const { id, ssr, props, head = false, force = false, anchorMetaName, parent } = options; const targetElement = mount(this.instance, this, id, props, head, force, anchorMetaName, parent, ssr); return targetElement; } function wrappedUnmount(options = {}) { /* istanbul ignore next */ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions const { id, parent } = options; unmount(this.instance, this, id, parent); } const createCNode = function (instance, $, props, children) { return { instance, $, props, children, els: [], render: wrappedRender, mount: wrappedMount, unmount: wrappedUnmount }; }; const c = function (instance, $, props, children) { if (Array.isArray($)) { return createCNode(instance, { $: null }, null, $); } else if (Array.isArray(props)) { return createCNode(instance, $, null, props); } else if (Array.isArray(children)) { return createCNode(instance, $, props, children); } else { return createCNode(instance, $, props, null); } }; ;// ./node_modules/css-render/esm/CssRender.js function CssRender(config = {}) { const cssr = { c: ((...args) => c(cssr, ...args)), use: (plugin, ...args) => plugin.install(cssr, ...args), find: queryElement, context: {}, config }; return cssr; } ;// ./node_modules/naive-ui/es/_utils/cssr/index.mjs const namespace = 'n'; const cssr_prefix = `.${namespace}-`; const elementPrefix = '__'; const modifierPrefix = '--'; const cssr = CssRender(); const cssr_plugin = esm_plugin({ blockPrefix: cssr_prefix, elementPrefix, modifierPrefix }); cssr.use(cssr_plugin); const { c: cssr_c, find } = cssr; const { cB, cE, cM, cNotM } = cssr_plugin; function insideModal(style) { return cssr_c(({ props: { bPrefix } }) => `${bPrefix || cssr_prefix}modal, ${bPrefix || cssr_prefix}drawer`, [style]); } function insidePopover(style) { return cssr_c(({ props: { bPrefix } }) => `${bPrefix || cssr_prefix}popover`, [style]); } function asModal(style) { return cssr_c(({ props: { bPrefix } }) => `&${bPrefix || cssr_prefix}modal`, style); } // child block const cCB = (...args) => { return cssr_c('>', [cB(...args)]); }; function createKey(prefix, suffix) { return prefix + (suffix === 'default' ? '' : suffix.replace(/^[a-z]/, startChar => startChar.toUpperCase())); } ;// ./node_modules/naive-ui/es/_styles/common/_common.mjs /* harmony default export */ var _common = ({ fontFamily: 'v-sans, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', fontFamilyMono: 'v-mono, SFMono-Regular, Menlo, Consolas, Courier, monospace', fontWeight: '400', fontWeightStrong: '500', cubicBezierEaseInOut: 'cubic-bezier(.4, 0, .2, 1)', cubicBezierEaseOut: 'cubic-bezier(0, 0, .2, 1)', cubicBezierEaseIn: 'cubic-bezier(.4, 0, 1, 1)', borderRadius: '3px', borderRadiusSmall: '2px', fontSize: '14px', fontSizeMini: '12px', fontSizeTiny: '12px', fontSizeSmall: '14px', fontSizeMedium: '14px', fontSizeLarge: '15px', fontSizeHuge: '16px', lineHeight: '1.6', heightMini: '16px', // private now, it's too small heightTiny: '22px', heightSmall: '28px', heightMedium: '34px', heightLarge: '40px', heightHuge: '46px' }); ;// ./node_modules/naive-ui/es/_styles/global/index.cssr.mjs const { fontSize, fontFamily, lineHeight } = _common; // All the components need the style // It is static and won't be changed in the app's lifetime // If user want to overrides it they need to use `n-global-style` is provided // // Technically we can remove font-size & font-family & line-height to make // it pure. However the coding cost doesn't worth it. // // -webkit-tap-hilight-color: // https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-tap-highlight-color // In some android devices, there will be the style. /* harmony default export */ var index_cssr = (cssr_c('body', ` margin: 0; font-size: ${fontSize}; font-family: ${fontFamily}; line-height: ${lineHeight}; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; `, [cssr_c('input', ` font-family: inherit; font-size: inherit; `)])); ;// ./node_modules/naive-ui/es/_utils/vue/create-injection-key.mjs function createInjectionKey(key) { return key; } ;// ./node_modules/naive-ui/es/config-provider/src/context.mjs const context_configProviderInjectionKey = createInjectionKey('n-config-provider'); ;// ./node_modules/naive-ui/es/_mixins/common.mjs const cssrAnchorMetaName = 'naive-ui-style'; ;// ./node_modules/naive-ui/es/_mixins/use-style.mjs function useStyle(mountId, style, clsPrefixRef) { if (!style) { if (false) {} return; } const ssrAdapter = useSsrAdapter(); const NConfigProvider = runtime_core_esm_bundler_inject(context_configProviderInjectionKey, null); const mountStyle = () => { const clsPrefix = clsPrefixRef.value; style.mount({ id: clsPrefix === undefined ? mountId : clsPrefix + mountId, head: true, anchorMetaName: cssrAnchorMetaName, props: { bPrefix: clsPrefix ? `.${clsPrefix}-` : undefined }, ssr: ssrAdapter, parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget }); if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) { index_cssr.mount({ id: 'n-global', head: true, anchorMetaName: cssrAnchorMetaName, ssr: ssrAdapter, parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget }); } }; if (ssrAdapter) { mountStyle(); } else { onBeforeMount(mountStyle); } } ;// ./node_modules/naive-ui/es/_styles/transitions/icon-switch.cssr.mjs const { cubicBezierEaseInOut } = _common; function iconSwitchTransition({ originalTransform = '', left = 0, top = 0, transition = `all .3s ${cubicBezierEaseInOut} !important` } = {}) { return [cssr_c('&.icon-switch-transition-enter-from, &.icon-switch-transition-leave-to', { transform: `${originalTransform} scale(0.75)`, left, top, opacity: 0 }), cssr_c('&.icon-switch-transition-enter-to, &.icon-switch-transition-leave-from', { transform: `scale(1) ${originalTransform}`, left, top, opacity: 1 }), cssr_c('&.icon-switch-transition-enter-active, &.icon-switch-transition-leave-active', { transformOrigin: 'center', position: 'absolute', left, top, transition })]; } ;// ./node_modules/naive-ui/es/_internal/loading/src/styles/index.cssr.mjs /* harmony default export */ var styles_index_cssr = (cssr_c([cssr_c('@keyframes rotator', ` 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }`), cB('base-loading', ` position: relative; line-height: 0; width: 1em; height: 1em; `, [cE('transition-wrapper', ` position: absolute; width: 100%; height: 100%; `, [iconSwitchTransition()]), cE('placeholder', ` position: absolute; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); `, [iconSwitchTransition({ left: '50%', top: '50%', originalTransform: 'translateX(-50%) translateY(-50%)' })]), cE('container', ` animation: rotator 3s linear infinite both; `, [cE('icon', ` height: 1em; width: 1em; `)])])])); ;// ./node_modules/naive-ui/es/_internal/loading/src/Loading.mjs const duration = '1.6s'; const exposedLoadingProps = { strokeWidth: { type: Number, default: 28 }, stroke: { type: String, default: undefined } }; /* harmony default export */ var Loading = (defineComponent({ name: 'BaseLoading', props: Object.assign({ clsPrefix: { type: String, required: true }, show: { type: Boolean, default: true }, scale: { type: Number, default: 1 }, radius: { type: Number, default: 100 } }, exposedLoadingProps), setup(props) { useStyle('-base-loading', styles_index_cssr, toRef(props, 'clsPrefix')); }, render() { const { clsPrefix, radius, strokeWidth, stroke, scale } = this; const scaledRadius = radius / scale; return h("div", { class: `${clsPrefix}-base-loading`, role: "img", "aria-label": "loading" }, h(IconSwitchTransition, null, { default: () => this.show ? h("div", { key: "icon", class: `${clsPrefix}-base-loading__transition-wrapper` }, h("div", { class: `${clsPrefix}-base-loading__container` }, h("svg", { class: `${clsPrefix}-base-loading__icon`, viewBox: `0 0 ${2 * scaledRadius} ${2 * scaledRadius}`, xmlns: "http://www.w3.org/2000/svg", style: { color: stroke } }, h("g", null, h("animateTransform", { attributeName: "transform", type: "rotate", values: `0 ${scaledRadius} ${scaledRadius};270 ${scaledRadius} ${scaledRadius}`, begin: "0s", dur: duration, fill: "freeze", repeatCount: "indefinite" }), h("circle", { class: `${clsPrefix}-base-loading__icon`, fill: "none", stroke: "currentColor", "stroke-width": strokeWidth, "stroke-linecap": "round", cx: scaledRadius, cy: scaledRadius, r: radius - strokeWidth / 2, "stroke-dasharray": 5.67 * radius, "stroke-dashoffset": 18.48 * radius }, h("animateTransform", { attributeName: "transform", type: "rotate", values: `0 ${scaledRadius} ${scaledRadius};135 ${scaledRadius} ${scaledRadius};450 ${scaledRadius} ${scaledRadius}`, begin: "0s", dur: duration, fill: "freeze", repeatCount: "indefinite" }), h("animate", { attributeName: "stroke-dashoffset", values: `${5.67 * radius};${1.42 * radius};${5.67 * radius}`, begin: "0s", dur: duration, fill: "freeze", repeatCount: "indefinite" })))))) : h("div", { key: "placeholder", class: `${clsPrefix}-base-loading__placeholder` }, this.$slots) })); } })); ;// ./node_modules/naive-ui/es/_internal/wave/src/styles/index.cssr.mjs /* harmony default export */ var src_styles_index_cssr = (cB('base-wave', ` position: absolute; left: 0; right: 0; top: 0; bottom: 0; border-radius: inherit; `)); ;// ./node_modules/naive-ui/es/_internal/wave/src/Wave.mjs /* harmony default export */ var Wave = (defineComponent({ name: 'BaseWave', props: { clsPrefix: { type: String, required: true } }, setup(props) { useStyle('-base-wave', src_styles_index_cssr, toRef(props, 'clsPrefix')); const selfRef = ref(null); const activeRef = ref(false); let animationTimerId = null; runtime_core_esm_bundler_onBeforeUnmount(() => { if (animationTimerId !== null) { window.clearTimeout(animationTimerId); } }); return { active: activeRef, selfRef, play() { if (animationTimerId !== null) { window.clearTimeout(animationTimerId); activeRef.value = false; animationTimerId = null; } void nextTick(() => { var _a; void ((_a = selfRef.value) === null || _a === void 0 ? void 0 : _a.offsetHeight); activeRef.value = true; animationTimerId = window.setTimeout(() => { activeRef.value = false; animationTimerId = null; }, 1000); }); } }; }, render() { const { clsPrefix } = this; return h("div", { ref: "selfRef", "aria-hidden": true, class: [`${clsPrefix}-base-wave`, this.active && `${clsPrefix}-base-wave--active`] }); } })); ;// ./node_modules/lodash-es/_listCacheClear.js /** * Removes all key-value entries from the list cache. * * @private * @name clear * @memberOf ListCache */ function listCacheClear() { this.__data__ = []; this.size = 0; } /* harmony default export */ var _listCacheClear = (listCacheClear); ;// ./node_modules/lodash-es/eq.js /** * Performs a * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to compare. * @param {*} other The other value to compare. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * * var object = { 'a': 1 }; * var other = { 'a': 1 }; * * _.eq(object, object); * // => true * * _.eq(object, other); * // => false * * _.eq('a', 'a'); * // => true * * _.eq('a', Object('a')); * // => false * * _.eq(NaN, NaN); * // => true */ function eq(value, other) { return value === other || (value !== value && other !== other); } /* harmony default export */ var lodash_es_eq = (eq); ;// ./node_modules/lodash-es/_assocIndexOf.js /** * Gets the index at which the `key` is found in `array` of key-value pairs. * * @private * @param {Array} array The array to inspect. * @param {*} key The key to search for. * @returns {number} Returns the index of the matched value, else `-1`. */ function assocIndexOf(array, key) { var length = array.length; while (length--) { if (lodash_es_eq(array[length][0], key)) { return length; } } return -1; } /* harmony default export */ var _assocIndexOf = (assocIndexOf); ;// ./node_modules/lodash-es/_listCacheDelete.js /** Used for built-in method references. */ var _listCacheDelete_arrayProto = Array.prototype; /** Built-in value references. */ var splice = _listCacheDelete_arrayProto.splice; /** * Removes `key` and its value from the list cache. * * @private * @name delete * @memberOf ListCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function listCacheDelete(key) { var data = this.__data__, index = _assocIndexOf(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } /* harmony default export */ var _listCacheDelete = (listCacheDelete); ;// ./node_modules/lodash-es/_listCacheGet.js /** * Gets the list cache value for `key`. * * @private * @name get * @memberOf ListCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function listCacheGet(key) { var data = this.__data__, index = _assocIndexOf(data, key); return index < 0 ? undefined : data[index][1]; } /* harmony default export */ var _listCacheGet = (listCacheGet); ;// ./node_modules/lodash-es/_listCacheHas.js /** * Checks if a list cache value for `key` exists. * * @private * @name has * @memberOf ListCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function listCacheHas(key) { return _assocIndexOf(this.__data__, key) > -1; } /* harmony default export */ var _listCacheHas = (listCacheHas); ;// ./node_modules/lodash-es/_listCacheSet.js /** * Sets the list cache `key` to `value`. * * @private * @name set * @memberOf ListCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the list cache instance. */ function listCacheSet(key, value) { var data = this.__data__, index = _assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } /* harmony default export */ var _listCacheSet = (listCacheSet); ;// ./node_modules/lodash-es/_ListCache.js /** * Creates an list cache object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function ListCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `ListCache`. ListCache.prototype.clear = _listCacheClear; ListCache.prototype['delete'] = _listCacheDelete; ListCache.prototype.get = _listCacheGet; ListCache.prototype.has = _listCacheHas; ListCache.prototype.set = _listCacheSet; /* harmony default export */ var _ListCache = (ListCache); ;// ./node_modules/lodash-es/_stackClear.js /** * Removes all key-value entries from the stack. * * @private * @name clear * @memberOf Stack */ function stackClear() { this.__data__ = new _ListCache; this.size = 0; } /* harmony default export */ var _stackClear = (stackClear); ;// ./node_modules/lodash-es/_stackDelete.js /** * Removes `key` and its value from the stack. * * @private * @name delete * @memberOf Stack * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function stackDelete(key) { var data = this.__data__, result = data['delete'](key); this.size = data.size; return result; } /* harmony default export */ var _stackDelete = (stackDelete); ;// ./node_modules/lodash-es/_stackGet.js /** * Gets the stack value for `key`. * * @private * @name get * @memberOf Stack * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function stackGet(key) { return this.__data__.get(key); } /* harmony default export */ var _stackGet = (stackGet); ;// ./node_modules/lodash-es/_stackHas.js /** * Checks if a stack value for `key` exists. * * @private * @name has * @memberOf Stack * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function stackHas(key) { return this.__data__.has(key); } /* harmony default export */ var _stackHas = (stackHas); ;// ./node_modules/lodash-es/_freeGlobal.js /** Detect free variable `global` from Node.js. */ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; /* harmony default export */ var _freeGlobal = (freeGlobal); ;// ./node_modules/lodash-es/_root.js /** Detect free variable `self`. */ var freeSelf = typeof self == 'object' && self && self.Object === Object && self; /** Used as a reference to the global object. */ var root = _freeGlobal || freeSelf || Function('return this')(); /* harmony default export */ var _root = (root); ;// ./node_modules/lodash-es/_Symbol.js /** Built-in value references. */ var _Symbol_Symbol = _root.Symbol; /* harmony default export */ var _Symbol = (_Symbol_Symbol); ;// ./node_modules/lodash-es/_getRawTag.js /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var _getRawTag_hasOwnProperty = objectProto.hasOwnProperty; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var nativeObjectToString = objectProto.toString; /** Built-in value references. */ var symToStringTag = _Symbol ? _Symbol.toStringTag : undefined; /** * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private * @param {*} value The value to query. * @returns {string} Returns the raw `toStringTag`. */ function getRawTag(value) { var isOwn = _getRawTag_hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag]; try { value[symToStringTag] = undefined; var unmasked = true; } catch (e) {} var result = nativeObjectToString.call(value); if (unmasked) { if (isOwn) { value[symToStringTag] = tag; } else { delete value[symToStringTag]; } } return result; } /* harmony default export */ var _getRawTag = (getRawTag); ;// ./node_modules/lodash-es/_objectToString.js /** Used for built-in method references. */ var _objectToString_objectProto = Object.prototype; /** * Used to resolve the * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) * of values. */ var _objectToString_nativeObjectToString = _objectToString_objectProto.toString; /** * Converts `value` to a string using `Object.prototype.toString`. * * @private * @param {*} value The value to convert. * @returns {string} Returns the converted string. */ function _objectToString_objectToString(value) { return _objectToString_nativeObjectToString.call(value); } /* harmony default export */ var _objectToString = (_objectToString_objectToString); ;// ./node_modules/lodash-es/_baseGetTag.js /** `Object#toString` result references. */ var nullTag = '[object Null]', undefinedTag = '[object Undefined]'; /** Built-in value references. */ var _baseGetTag_symToStringTag = _Symbol ? _Symbol.toStringTag : undefined; /** * The base implementation of `getTag` without fallbacks for buggy environments. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ function baseGetTag(value) { if (value == null) { return value === undefined ? undefinedTag : nullTag; } return (_baseGetTag_symToStringTag && _baseGetTag_symToStringTag in Object(value)) ? _getRawTag(value) : _objectToString(value); } /* harmony default export */ var _baseGetTag = (baseGetTag); ;// ./node_modules/lodash-es/isObject.js /** * Checks if `value` is the * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * * _.isObject({}); * // => true * * _.isObject([1, 2, 3]); * // => true * * _.isObject(_.noop); * // => true * * _.isObject(null); * // => false */ function isObject_isObject(value) { var type = typeof value; return value != null && (type == 'object' || type == 'function'); } /* harmony default export */ var lodash_es_isObject = (isObject_isObject); ;// ./node_modules/lodash-es/isFunction.js /** `Object#toString` result references. */ var asyncTag = '[object AsyncFunction]', funcTag = '[object Function]', genTag = '[object GeneratorFunction]', proxyTag = '[object Proxy]'; /** * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * * _.isFunction(_); * // => true * * _.isFunction(/abc/); * // => false */ function isFunction_isFunction(value) { if (!lodash_es_isObject(value)) { return false; } // The use of `Object#toString` avoids issues with the `typeof` operator // in Safari 9 which returns 'object' for typed arrays and other constructors. var tag = _baseGetTag(value); return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /* harmony default export */ var lodash_es_isFunction = (isFunction_isFunction); ;// ./node_modules/lodash-es/_coreJsData.js /** Used to detect overreaching core-js shims. */ var coreJsData = _root['__core-js_shared__']; /* harmony default export */ var _coreJsData = (coreJsData); ;// ./node_modules/lodash-es/_isMasked.js /** Used to detect methods masquerading as native. */ var maskSrcKey = (function() { var uid = /[^.]+$/.exec(_coreJsData && _coreJsData.keys && _coreJsData.keys.IE_PROTO || ''); return uid ? ('Symbol(src)_1.' + uid) : ''; }()); /** * Checks if `func` has its source masked. * * @private * @param {Function} func The function to check. * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ function isMasked(func) { return !!maskSrcKey && (maskSrcKey in func); } /* harmony default export */ var _isMasked = (isMasked); ;// ./node_modules/lodash-es/_toSource.js /** Used for built-in method references. */ var funcProto = Function.prototype; /** Used to resolve the decompiled source of functions. */ var funcToString = funcProto.toString; /** * Converts `func` to its source code. * * @private * @param {Function} func The function to convert. * @returns {string} Returns the source code. */ function toSource(func) { if (func != null) { try { return funcToString.call(func); } catch (e) {} try { return (func + ''); } catch (e) {} } return ''; } /* harmony default export */ var _toSource = (toSource); ;// ./node_modules/lodash-es/_baseIsNative.js /** * Used to match `RegExp` * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; /** Used to detect host constructors (Safari). */ var reIsHostCtor = /^\[object .+?Constructor\]$/; /** Used for built-in method references. */ var _baseIsNative_funcProto = Function.prototype, _baseIsNative_objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var _baseIsNative_funcToString = _baseIsNative_funcProto.toString; /** Used to check objects for own properties. */ var _baseIsNative_hasOwnProperty = _baseIsNative_objectProto.hasOwnProperty; /** Used to detect if a method is native. */ var reIsNative = RegExp('^' + _baseIsNative_funcToString.call(_baseIsNative_hasOwnProperty).replace(reRegExpChar, '\\$&') .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' ); /** * The base implementation of `_.isNative` without bad shim checks. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a native function, * else `false`. */ function baseIsNative(value) { if (!lodash_es_isObject(value) || _isMasked(value)) { return false; } var pattern = lodash_es_isFunction(value) ? reIsNative : reIsHostCtor; return pattern.test(_toSource(value)); } /* harmony default export */ var _baseIsNative = (baseIsNative); ;// ./node_modules/lodash-es/_getValue.js /** * Gets the value at `key` of `object`. * * @private * @param {Object} [object] The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function _getValue_getValue(object, key) { return object == null ? undefined : object[key]; } /* harmony default export */ var _getValue = (_getValue_getValue); ;// ./node_modules/lodash-es/_getNative.js /** * Gets the native function at `key` of `object`. * * @private * @param {Object} object The object to query. * @param {string} key The key of the method to get. * @returns {*} Returns the function if it's native, else `undefined`. */ function getNative(object, key) { var value = _getValue(object, key); return _baseIsNative(value) ? value : undefined; } /* harmony default export */ var _getNative = (getNative); ;// ./node_modules/lodash-es/_Map.js /* Built-in method references that are verified to be native. */ var _Map_Map = _getNative(_root, 'Map'); /* harmony default export */ var _Map = (_Map_Map); ;// ./node_modules/lodash-es/_nativeCreate.js /* Built-in method references that are verified to be native. */ var nativeCreate = _getNative(Object, 'create'); /* harmony default export */ var _nativeCreate = (nativeCreate); ;// ./node_modules/lodash-es/_hashClear.js /** * Removes all key-value entries from the hash. * * @private * @name clear * @memberOf Hash */ function hashClear() { this.__data__ = _nativeCreate ? _nativeCreate(null) : {}; this.size = 0; } /* harmony default export */ var _hashClear = (hashClear); ;// ./node_modules/lodash-es/_hashDelete.js /** * Removes `key` and its value from the hash. * * @private * @name delete * @memberOf Hash * @param {Object} hash The hash to modify. * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function hashDelete(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } /* harmony default export */ var _hashDelete = (hashDelete); ;// ./node_modules/lodash-es/_hashGet.js /** Used to stand-in for `undefined` hash values. */ var HASH_UNDEFINED = '__lodash_hash_undefined__'; /** Used for built-in method references. */ var _hashGet_objectProto = Object.prototype; /** Used to check objects for own properties. */ var _hashGet_hasOwnProperty = _hashGet_objectProto.hasOwnProperty; /** * Gets the hash value for `key`. * * @private * @name get * @memberOf Hash * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function hashGet(key) { var data = this.__data__; if (_nativeCreate) { var result = data[key]; return result === HASH_UNDEFINED ? undefined : result; } return _hashGet_hasOwnProperty.call(data, key) ? data[key] : undefined; } /* harmony default export */ var _hashGet = (hashGet); ;// ./node_modules/lodash-es/_hashHas.js /** Used for built-in method references. */ var _hashHas_objectProto = Object.prototype; /** Used to check objects for own properties. */ var _hashHas_hasOwnProperty = _hashHas_objectProto.hasOwnProperty; /** * Checks if a hash value for `key` exists. * * @private * @name has * @memberOf Hash * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function hashHas(key) { var data = this.__data__; return _nativeCreate ? (data[key] !== undefined) : _hashHas_hasOwnProperty.call(data, key); } /* harmony default export */ var _hashHas = (hashHas); ;// ./node_modules/lodash-es/_hashSet.js /** Used to stand-in for `undefined` hash values. */ var _hashSet_HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Sets the hash `key` to `value`. * * @private * @name set * @memberOf Hash * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the hash instance. */ function hashSet(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = (_nativeCreate && value === undefined) ? _hashSet_HASH_UNDEFINED : value; return this; } /* harmony default export */ var _hashSet = (hashSet); ;// ./node_modules/lodash-es/_Hash.js /** * Creates a hash object. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Hash(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `Hash`. Hash.prototype.clear = _hashClear; Hash.prototype['delete'] = _hashDelete; Hash.prototype.get = _hashGet; Hash.prototype.has = _hashHas; Hash.prototype.set = _hashSet; /* harmony default export */ var _Hash = (Hash); ;// ./node_modules/lodash-es/_mapCacheClear.js /** * Removes all key-value entries from the map. * * @private * @name clear * @memberOf MapCache */ function mapCacheClear() { this.size = 0; this.__data__ = { 'hash': new _Hash, 'map': new (_Map || _ListCache), 'string': new _Hash }; } /* harmony default export */ var _mapCacheClear = (mapCacheClear); ;// ./node_modules/lodash-es/_isKeyable.js /** * Checks if `value` is suitable for use as unique object key. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ function isKeyable(value) { var type = typeof value; return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') ? (value !== '__proto__') : (value === null); } /* harmony default export */ var _isKeyable = (isKeyable); ;// ./node_modules/lodash-es/_getMapData.js /** * Gets the data for `map`. * * @private * @param {Object} map The map to query. * @param {string} key The reference key. * @returns {*} Returns the map data. */ function getMapData(map, key) { var data = map.__data__; return _isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map; } /* harmony default export */ var _getMapData = (getMapData); ;// ./node_modules/lodash-es/_mapCacheDelete.js /** * Removes `key` and its value from the map. * * @private * @name delete * @memberOf MapCache * @param {string} key The key of the value to remove. * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ function mapCacheDelete(key) { var result = _getMapData(this, key)['delete'](key); this.size -= result ? 1 : 0; return result; } /* harmony default export */ var _mapCacheDelete = (mapCacheDelete); ;// ./node_modules/lodash-es/_mapCacheGet.js /** * Gets the map value for `key`. * * @private * @name get * @memberOf MapCache * @param {string} key The key of the value to get. * @returns {*} Returns the entry value. */ function mapCacheGet(key) { return _getMapData(this, key).get(key); } /* harmony default export */ var _mapCacheGet = (mapCacheGet); ;// ./node_modules/lodash-es/_mapCacheHas.js /** * Checks if a map value for `key` exists. * * @private * @name has * @memberOf MapCache * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function mapCacheHas(key) { return _getMapData(this, key).has(key); } /* harmony default export */ var _mapCacheHas = (mapCacheHas); ;// ./node_modules/lodash-es/_mapCacheSet.js /** * Sets the map `key` to `value`. * * @private * @name set * @memberOf MapCache * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the map cache instance. */ function mapCacheSet(key, value) { var data = _getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } /* harmony default export */ var _mapCacheSet = (mapCacheSet); ;// ./node_modules/lodash-es/_MapCache.js /** * Creates a map cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function MapCache(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } // Add methods to `MapCache`. MapCache.prototype.clear = _mapCacheClear; MapCache.prototype['delete'] = _mapCacheDelete; MapCache.prototype.get = _mapCacheGet; MapCache.prototype.has = _mapCacheHas; MapCache.prototype.set = _mapCacheSet; /* harmony default export */ var _MapCache = (MapCache); ;// ./node_modules/lodash-es/_stackSet.js /** Used as the size to enable large array optimizations. */ var LARGE_ARRAY_SIZE = 200; /** * Sets the stack `key` to `value`. * * @private * @name set * @memberOf Stack * @param {string} key The key of the value to set. * @param {*} value The value to set. * @returns {Object} Returns the stack cache instance. */ function stackSet(key, value) { var data = this.__data__; if (data instanceof _ListCache) { var pairs = data.__data__; if (!_Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new _MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } /* harmony default export */ var _stackSet = (stackSet); ;// ./node_modules/lodash-es/_Stack.js /** * Creates a stack cache object to store key-value pairs. * * @private * @constructor * @param {Array} [entries] The key-value pairs to cache. */ function Stack(entries) { var data = this.__data__ = new _ListCache(entries); this.size = data.size; } // Add methods to `Stack`. Stack.prototype.clear = _stackClear; Stack.prototype['delete'] = _stackDelete; Stack.prototype.get = _stackGet; Stack.prototype.has = _stackHas; Stack.prototype.set = _stackSet; /* harmony default export */ var _Stack = (Stack); ;// ./node_modules/lodash-es/_defineProperty.js var defineProperty = (function() { try { var func = _getNative(Object, 'defineProperty'); func({}, '', {}); return func; } catch (e) {} }()); /* harmony default export */ var _defineProperty = (defineProperty); ;// ./node_modules/lodash-es/_baseAssignValue.js /** * The base implementation of `assignValue` and `assignMergeValue` without * value checks. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function baseAssignValue(object, key, value) { if (key == '__proto__' && _defineProperty) { _defineProperty(object, key, { 'configurable': true, 'enumerable': true, 'value': value, 'writable': true }); } else { object[key] = value; } } /* harmony default export */ var _baseAssignValue = (baseAssignValue); ;// ./node_modules/lodash-es/_assignMergeValue.js /** * This function is like `assignValue` except that it doesn't assign * `undefined` values. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignMergeValue(object, key, value) { if ((value !== undefined && !lodash_es_eq(object[key], value)) || (value === undefined && !(key in object))) { _baseAssignValue(object, key, value); } } /* harmony default export */ var _assignMergeValue = (assignMergeValue); ;// ./node_modules/lodash-es/_createBaseFor.js /** * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseFor(fromRight) { return function(object, iteratee, keysFunc) { var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length; while (length--) { var key = props[fromRight ? length : ++index]; if (iteratee(iterable[key], key, iterable) === false) { break; } } return object; }; } /* harmony default export */ var _createBaseFor = (createBaseFor); ;// ./node_modules/lodash-es/_baseFor.js /** * The base implementation of `baseForOwn` which iterates over `object` * properties returned by `keysFunc` and invokes `iteratee` for each property. * Iteratee functions may exit iteration early by explicitly returning `false`. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @param {Function} keysFunc The function to get the keys of `object`. * @returns {Object} Returns `object`. */ var baseFor = _createBaseFor(); /* harmony default export */ var _baseFor = (baseFor); ;// ./node_modules/lodash-es/_cloneBuffer.js /** Detect free variable `exports`. */ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var moduleExports = freeModule && freeModule.exports === freeExports; /** Built-in value references. */ var _cloneBuffer_Buffer = moduleExports ? _root.Buffer : undefined, allocUnsafe = _cloneBuffer_Buffer ? _cloneBuffer_Buffer.allocUnsafe : undefined; /** * Creates a clone of `buffer`. * * @private * @param {Buffer} buffer The buffer to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Buffer} Returns the cloned buffer. */ function cloneBuffer(buffer, isDeep) { if (isDeep) { return buffer.slice(); } var length = buffer.length, result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); buffer.copy(result); return result; } /* harmony default export */ var _cloneBuffer = (cloneBuffer); ;// ./node_modules/lodash-es/_Uint8Array.js /** Built-in value references. */ var _Uint8Array_Uint8Array = _root.Uint8Array; /* harmony default export */ var _Uint8Array = (_Uint8Array_Uint8Array); ;// ./node_modules/lodash-es/_cloneArrayBuffer.js /** * Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer. */ function cloneArrayBuffer(arrayBuffer) { var result = new arrayBuffer.constructor(arrayBuffer.byteLength); new _Uint8Array(result).set(new _Uint8Array(arrayBuffer)); return result; } /* harmony default export */ var _cloneArrayBuffer = (cloneArrayBuffer); ;// ./node_modules/lodash-es/_cloneTypedArray.js /** * Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array. */ function cloneTypedArray(typedArray, isDeep) { var buffer = isDeep ? _cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } /* harmony default export */ var _cloneTypedArray = (cloneTypedArray); ;// ./node_modules/lodash-es/_copyArray.js /** * Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`. */ function copyArray(source, array) { var index = -1, length = source.length; array || (array = Array(length)); while (++index < length) { array[index] = source[index]; } return array; } /* harmony default export */ var _copyArray = (copyArray); ;// ./node_modules/lodash-es/_baseCreate.js /** Built-in value references. */ var objectCreate = Object.create; /** * The base implementation of `_.create` without support for assigning * properties to the created object. * * @private * @param {Object} proto The object to inherit from. * @returns {Object} Returns the new object. */ var baseCreate = (function() { function object() {} return function(proto) { if (!lodash_es_isObject(proto)) { return {}; } if (objectCreate) { return objectCreate(proto); } object.prototype = proto; var result = new object; object.prototype = undefined; return result; }; }()); /* harmony default export */ var _baseCreate = (baseCreate); ;// ./node_modules/lodash-es/_overArg.js /** * Creates a unary function that invokes `func` with its argument transformed. * * @private * @param {Function} func The function to wrap. * @param {Function} transform The argument transform. * @returns {Function} Returns the new function. */ function overArg(func, transform) { return function(arg) { return func(transform(arg)); }; } /* harmony default export */ var _overArg = (overArg); ;// ./node_modules/lodash-es/_getPrototype.js /** Built-in value references. */ var getPrototype = _overArg(Object.getPrototypeOf, Object); /* harmony default export */ var _getPrototype = (getPrototype); ;// ./node_modules/lodash-es/_isPrototype.js /** Used for built-in method references. */ var _isPrototype_objectProto = Object.prototype; /** * Checks if `value` is likely a prototype object. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ function isPrototype(value) { var Ctor = value && value.constructor, proto = (typeof Ctor == 'function' && Ctor.prototype) || _isPrototype_objectProto; return value === proto; } /* harmony default export */ var _isPrototype = (isPrototype); ;// ./node_modules/lodash-es/_initCloneObject.js /** * Initializes an object clone. * * @private * @param {Object} object The object to clone. * @returns {Object} Returns the initialized clone. */ function initCloneObject(object) { return (typeof object.constructor == 'function' && !_isPrototype(object)) ? _baseCreate(_getPrototype(object)) : {}; } /* harmony default export */ var _initCloneObject = (initCloneObject); ;// ./node_modules/lodash-es/isObjectLike.js /** * Checks if `value` is object-like. A value is object-like if it's not `null` * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * * _.isObjectLike({}); * // => true * * _.isObjectLike([1, 2, 3]); * // => true * * _.isObjectLike(_.noop); * // => false * * _.isObjectLike(null); * // => false */ function isObjectLike(value) { return value != null && typeof value == 'object'; } /* harmony default export */ var lodash_es_isObjectLike = (isObjectLike); ;// ./node_modules/lodash-es/_baseIsArguments.js /** `Object#toString` result references. */ var argsTag = '[object Arguments]'; /** * The base implementation of `_.isArguments`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, */ function baseIsArguments(value) { return lodash_es_isObjectLike(value) && _baseGetTag(value) == argsTag; } /* harmony default export */ var _baseIsArguments = (baseIsArguments); ;// ./node_modules/lodash-es/isArguments.js /** Used for built-in method references. */ var isArguments_objectProto = Object.prototype; /** Used to check objects for own properties. */ var isArguments_hasOwnProperty = isArguments_objectProto.hasOwnProperty; /** Built-in value references. */ var propertyIsEnumerable = isArguments_objectProto.propertyIsEnumerable; /** * Checks if `value` is likely an `arguments` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an `arguments` object, * else `false`. * @example * * _.isArguments(function() { return arguments; }()); * // => true * * _.isArguments([1, 2, 3]); * // => false */ var isArguments = _baseIsArguments(function() { return arguments; }()) ? _baseIsArguments : function(value) { return lodash_es_isObjectLike(value) && isArguments_hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee'); }; /* harmony default export */ var lodash_es_isArguments = (isArguments); ;// ./node_modules/lodash-es/isArray.js /** * Checks if `value` is classified as an `Array` object. * * @static * @memberOf _ * @since 0.1.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * * _.isArray([1, 2, 3]); * // => true * * _.isArray(document.body.children); * // => false * * _.isArray('abc'); * // => false * * _.isArray(_.noop); * // => false */ var isArray_isArray = Array.isArray; /* harmony default export */ var lodash_es_isArray = (isArray_isArray); ;// ./node_modules/lodash-es/isLength.js /** Used as references for various `Number` constants. */ var MAX_SAFE_INTEGER = 9007199254740991; /** * Checks if `value` is a valid array-like length. * * **Note:** This method is loosely based on * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * * _.isLength(3); * // => true * * _.isLength(Number.MIN_VALUE); * // => false * * _.isLength(Infinity); * // => false * * _.isLength('3'); * // => false */ function isLength(value) { return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; } /* harmony default export */ var lodash_es_isLength = (isLength); ;// ./node_modules/lodash-es/isArrayLike.js /** * Checks if `value` is array-like. A value is considered array-like if it's * not a function and has a `value.length` that's an integer greater than or * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * * _.isArrayLike([1, 2, 3]); * // => true * * _.isArrayLike(document.body.children); * // => true * * _.isArrayLike('abc'); * // => true * * _.isArrayLike(_.noop); * // => false */ function isArrayLike(value) { return value != null && lodash_es_isLength(value.length) && !lodash_es_isFunction(value); } /* harmony default export */ var lodash_es_isArrayLike = (isArrayLike); ;// ./node_modules/lodash-es/isArrayLikeObject.js /** * This method is like `_.isArrayLike` except that it also checks if `value` * is an object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is an array-like object, * else `false`. * @example * * _.isArrayLikeObject([1, 2, 3]); * // => true * * _.isArrayLikeObject(document.body.children); * // => true * * _.isArrayLikeObject('abc'); * // => false * * _.isArrayLikeObject(_.noop); * // => false */ function isArrayLikeObject(value) { return lodash_es_isObjectLike(value) && lodash_es_isArrayLike(value); } /* harmony default export */ var lodash_es_isArrayLikeObject = (isArrayLikeObject); ;// ./node_modules/lodash-es/stubFalse.js /** * This method returns `false`. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {boolean} Returns `false`. * @example * * _.times(2, _.stubFalse); * // => [false, false] */ function stubFalse() { return false; } /* harmony default export */ var lodash_es_stubFalse = (stubFalse); ;// ./node_modules/lodash-es/isBuffer.js /** Detect free variable `exports`. */ var isBuffer_freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var isBuffer_freeModule = isBuffer_freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var isBuffer_moduleExports = isBuffer_freeModule && isBuffer_freeModule.exports === isBuffer_freeExports; /** Built-in value references. */ var isBuffer_Buffer = isBuffer_moduleExports ? _root.Buffer : undefined; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeIsBuffer = isBuffer_Buffer ? isBuffer_Buffer.isBuffer : undefined; /** * Checks if `value` is a buffer. * * @static * @memberOf _ * @since 4.3.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * * _.isBuffer(new Buffer(2)); * // => true * * _.isBuffer(new Uint8Array(2)); * // => false */ var isBuffer_isBuffer = nativeIsBuffer || lodash_es_stubFalse; /* harmony default export */ var lodash_es_isBuffer = (isBuffer_isBuffer); ;// ./node_modules/lodash-es/isPlainObject.js /** `Object#toString` result references. */ var objectTag = '[object Object]'; /** Used for built-in method references. */ var isPlainObject_funcProto = Function.prototype, isPlainObject_objectProto = Object.prototype; /** Used to resolve the decompiled source of functions. */ var isPlainObject_funcToString = isPlainObject_funcProto.toString; /** Used to check objects for own properties. */ var isPlainObject_hasOwnProperty = isPlainObject_objectProto.hasOwnProperty; /** Used to infer the `Object` constructor. */ var objectCtorString = isPlainObject_funcToString.call(Object); /** * Checks if `value` is a plain object, that is, an object created by the * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ * @since 0.8.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * * function Foo() { * this.a = 1; * } * * _.isPlainObject(new Foo); * // => false * * _.isPlainObject([1, 2, 3]); * // => false * * _.isPlainObject({ 'x': 0, 'y': 0 }); * // => true * * _.isPlainObject(Object.create(null)); * // => true */ function isPlainObject_isPlainObject(value) { if (!lodash_es_isObjectLike(value) || _baseGetTag(value) != objectTag) { return false; } var proto = _getPrototype(value); if (proto === null) { return true; } var Ctor = isPlainObject_hasOwnProperty.call(proto, 'constructor') && proto.constructor; return typeof Ctor == 'function' && Ctor instanceof Ctor && isPlainObject_funcToString.call(Ctor) == objectCtorString; } /* harmony default export */ var lodash_es_isPlainObject = (isPlainObject_isPlainObject); ;// ./node_modules/lodash-es/_baseIsTypedArray.js /** `Object#toString` result references. */ var _baseIsTypedArray_argsTag = '[object Arguments]', arrayTag = '[object Array]', boolTag = '[object Boolean]', dateTag = '[object Date]', errorTag = '[object Error]', _baseIsTypedArray_funcTag = '[object Function]', mapTag = '[object Map]', numberTag = '[object Number]', _baseIsTypedArray_objectTag = '[object Object]', regexpTag = '[object RegExp]', setTag = '[object Set]', stringTag = '[object String]', weakMapTag = '[object WeakMap]'; var arrayBufferTag = '[object ArrayBuffer]', dataViewTag = '[object DataView]', float32Tag = '[object Float32Array]', float64Tag = '[object Float64Array]', int8Tag = '[object Int8Array]', int16Tag = '[object Int16Array]', int32Tag = '[object Int32Array]', uint8Tag = '[object Uint8Array]', uint8ClampedTag = '[object Uint8ClampedArray]', uint16Tag = '[object Uint16Array]', uint32Tag = '[object Uint32Array]'; /** Used to identify `toStringTag` values of typed arrays. */ var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[_baseIsTypedArray_argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[_baseIsTypedArray_funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[_baseIsTypedArray_objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false; /** * The base implementation of `_.isTypedArray` without Node.js optimizations. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. */ function baseIsTypedArray(value) { return lodash_es_isObjectLike(value) && lodash_es_isLength(value.length) && !!typedArrayTags[_baseGetTag(value)]; } /* harmony default export */ var _baseIsTypedArray = (baseIsTypedArray); ;// ./node_modules/lodash-es/_baseUnary.js /** * The base implementation of `_.unary` without support for storing metadata. * * @private * @param {Function} func The function to cap arguments for. * @returns {Function} Returns the new capped function. */ function baseUnary(func) { return function(value) { return func(value); }; } /* harmony default export */ var _baseUnary = (baseUnary); ;// ./node_modules/lodash-es/_nodeUtil.js /** Detect free variable `exports`. */ var _nodeUtil_freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports; /** Detect free variable `module`. */ var _nodeUtil_freeModule = _nodeUtil_freeExports && typeof module == 'object' && module && !module.nodeType && module; /** Detect the popular CommonJS extension `module.exports`. */ var _nodeUtil_moduleExports = _nodeUtil_freeModule && _nodeUtil_freeModule.exports === _nodeUtil_freeExports; /** Detect free variable `process` from Node.js. */ var freeProcess = _nodeUtil_moduleExports && _freeGlobal.process; /** Used to access faster Node.js helpers. */ var nodeUtil = (function() { try { // Use `util.types` for Node.js 10+. var types = _nodeUtil_freeModule && _nodeUtil_freeModule.require && _nodeUtil_freeModule.require('util').types; if (types) { return types; } // Legacy `process.binding('util')` for Node.js < 10. return freeProcess && freeProcess.binding && freeProcess.binding('util'); } catch (e) {} }()); /* harmony default export */ var _nodeUtil = (nodeUtil); ;// ./node_modules/lodash-es/isTypedArray.js /* Node.js helper references. */ var nodeIsTypedArray = _nodeUtil && _nodeUtil.isTypedArray; /** * Checks if `value` is classified as a typed array. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * * _.isTypedArray(new Uint8Array); * // => true * * _.isTypedArray([]); * // => false */ var isTypedArray_isTypedArray = nodeIsTypedArray ? _baseUnary(nodeIsTypedArray) : _baseIsTypedArray; /* harmony default export */ var lodash_es_isTypedArray = (isTypedArray_isTypedArray); ;// ./node_modules/lodash-es/_safeGet.js /** * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private * @param {Object} object The object to query. * @param {string} key The key of the property to get. * @returns {*} Returns the property value. */ function safeGet(object, key) { if (key === 'constructor' && typeof object[key] === 'function') { return; } if (key == '__proto__') { return; } return object[key]; } /* harmony default export */ var _safeGet = (safeGet); ;// ./node_modules/lodash-es/_assignValue.js /** Used for built-in method references. */ var _assignValue_objectProto = Object.prototype; /** Used to check objects for own properties. */ var _assignValue_hasOwnProperty = _assignValue_objectProto.hasOwnProperty; /** * Assigns `value` to `key` of `object` if the existing value is not equivalent * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) * for equality comparisons. * * @private * @param {Object} object The object to modify. * @param {string} key The key of the property to assign. * @param {*} value The value to assign. */ function assignValue(object, key, value) { var objValue = object[key]; if (!(_assignValue_hasOwnProperty.call(object, key) && lodash_es_eq(objValue, value)) || (value === undefined && !(key in object))) { _baseAssignValue(object, key, value); } } /* harmony default export */ var _assignValue = (assignValue); ;// ./node_modules/lodash-es/_copyObject.js /** * Copies properties of `source` to `object`. * * @private * @param {Object} source The object to copy properties from. * @param {Array} props The property identifiers to copy. * @param {Object} [object={}] The object to copy properties to. * @param {Function} [customizer] The function to customize copied values. * @returns {Object} Returns `object`. */ function copyObject(source, props, object, customizer) { var isNew = !object; object || (object = {}); var index = -1, length = props.length; while (++index < length) { var key = props[index]; var newValue = customizer ? customizer(object[key], source[key], key, object, source) : undefined; if (newValue === undefined) { newValue = source[key]; } if (isNew) { _baseAssignValue(object, key, newValue); } else { _assignValue(object, key, newValue); } } return object; } /* harmony default export */ var _copyObject = (copyObject); ;// ./node_modules/lodash-es/_baseTimes.js /** * The base implementation of `_.times` without support for iteratee shorthands * or max array length checks. * * @private * @param {number} n The number of times to invoke `iteratee`. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the array of results. */ function baseTimes(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } /* harmony default export */ var _baseTimes = (baseTimes); ;// ./node_modules/lodash-es/_isIndex.js /** Used as references for various `Number` constants. */ var _isIndex_MAX_SAFE_INTEGER = 9007199254740991; /** Used to detect unsigned integer values. */ var reIsUint = /^(?:0|[1-9]\d*)$/; /** * Checks if `value` is a valid array-like index. * * @private * @param {*} value The value to check. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { var type = typeof value; length = length == null ? _isIndex_MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && (value > -1 && value % 1 == 0 && value < length); } /* harmony default export */ var _isIndex = (isIndex); ;// ./node_modules/lodash-es/_arrayLikeKeys.js /** Used for built-in method references. */ var _arrayLikeKeys_objectProto = Object.prototype; /** Used to check objects for own properties. */ var _arrayLikeKeys_hasOwnProperty = _arrayLikeKeys_objectProto.hasOwnProperty; /** * Creates an array of the enumerable property names of the array-like `value`. * * @private * @param {*} value The value to query. * @param {boolean} inherited Specify returning inherited property names. * @returns {Array} Returns the array of property names. */ function arrayLikeKeys(value, inherited) { var isArr = lodash_es_isArray(value), isArg = !isArr && lodash_es_isArguments(value), isBuff = !isArr && !isArg && lodash_es_isBuffer(value), isType = !isArr && !isArg && !isBuff && lodash_es_isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? _baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || _arrayLikeKeys_hasOwnProperty.call(value, key)) && !(skipIndexes && ( // Safari 9 has enumerable `arguments.length` in strict mode. key == 'length' || // Node.js 0.10 has enumerable non-index properties on buffers. (isBuff && (key == 'offset' || key == 'parent')) || // PhantomJS 2 has enumerable non-index properties on typed arrays. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || // Skip index properties. _isIndex(key, length) ))) { result.push(key); } } return result; } /* harmony default export */ var _arrayLikeKeys = (arrayLikeKeys); ;// ./node_modules/lodash-es/_nativeKeysIn.js /** * This function is like * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * except that it includes inherited enumerable properties. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function nativeKeysIn(object) { var result = []; if (object != null) { for (var key in Object(object)) { result.push(key); } } return result; } /* harmony default export */ var _nativeKeysIn = (nativeKeysIn); ;// ./node_modules/lodash-es/_baseKeysIn.js /** Used for built-in method references. */ var _baseKeysIn_objectProto = Object.prototype; /** Used to check objects for own properties. */ var _baseKeysIn_hasOwnProperty = _baseKeysIn_objectProto.hasOwnProperty; /** * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeysIn(object) { if (!lodash_es_isObject(object)) { return _nativeKeysIn(object); } var isProto = _isPrototype(object), result = []; for (var key in object) { if (!(key == 'constructor' && (isProto || !_baseKeysIn_hasOwnProperty.call(object, key)))) { result.push(key); } } return result; } /* harmony default export */ var _baseKeysIn = (baseKeysIn); ;// ./node_modules/lodash-es/keysIn.js /** * Creates an array of the own and inherited enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keysIn(new Foo); * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ function keysIn(object) { return lodash_es_isArrayLike(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object); } /* harmony default export */ var lodash_es_keysIn = (keysIn); ;// ./node_modules/lodash-es/toPlainObject.js /** * Converts `value` to a plain object flattening inherited enumerable string * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ * @since 3.0.0 * @category Lang * @param {*} value The value to convert. * @returns {Object} Returns the converted plain object. * @example * * function Foo() { * this.b = 2; * } * * Foo.prototype.c = 3; * * _.assign({ 'a': 1 }, new Foo); * // => { 'a': 1, 'b': 2 } * * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); * // => { 'a': 1, 'b': 2, 'c': 3 } */ function toPlainObject(value) { return _copyObject(value, lodash_es_keysIn(value)); } /* harmony default export */ var lodash_es_toPlainObject = (toPlainObject); ;// ./node_modules/lodash-es/_baseMergeDeep.js /** * A specialized version of `baseMerge` for arrays and objects which performs * deep merges and tracks traversed objects enabling objects with circular * references to be merged. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {string} key The key of the value to merge. * @param {number} srcIndex The index of `source`. * @param {Function} mergeFunc The function to merge values. * @param {Function} [customizer] The function to customize assigned values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { var objValue = _safeGet(object, key), srcValue = _safeGet(source, key), stacked = stack.get(srcValue); if (stacked) { _assignMergeValue(object, key, stacked); return; } var newValue = customizer ? customizer(objValue, srcValue, (key + ''), object, source, stack) : undefined; var isCommon = newValue === undefined; if (isCommon) { var isArr = lodash_es_isArray(srcValue), isBuff = !isArr && lodash_es_isBuffer(srcValue), isTyped = !isArr && !isBuff && lodash_es_isTypedArray(srcValue); newValue = srcValue; if (isArr || isBuff || isTyped) { if (lodash_es_isArray(objValue)) { newValue = objValue; } else if (lodash_es_isArrayLikeObject(objValue)) { newValue = _copyArray(objValue); } else if (isBuff) { isCommon = false; newValue = _cloneBuffer(srcValue, true); } else if (isTyped) { isCommon = false; newValue = _cloneTypedArray(srcValue, true); } else { newValue = []; } } else if (lodash_es_isPlainObject(srcValue) || lodash_es_isArguments(srcValue)) { newValue = objValue; if (lodash_es_isArguments(objValue)) { newValue = lodash_es_toPlainObject(objValue); } else if (!lodash_es_isObject(objValue) || lodash_es_isFunction(objValue)) { newValue = _initCloneObject(srcValue); } } else { isCommon = false; } } if (isCommon) { // Recursively merge objects and arrays (susceptible to call stack limits). stack.set(srcValue, newValue); mergeFunc(newValue, srcValue, srcIndex, customizer, stack); stack['delete'](srcValue); } _assignMergeValue(object, key, newValue); } /* harmony default export */ var _baseMergeDeep = (baseMergeDeep); ;// ./node_modules/lodash-es/_baseMerge.js /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } _baseFor(source, function(srcValue, key) { stack || (stack = new _Stack); if (lodash_es_isObject(srcValue)) { _baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(_safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } _assignMergeValue(object, key, newValue); } }, lodash_es_keysIn); } /* harmony default export */ var _baseMerge = (baseMerge); ;// ./node_modules/lodash-es/identity.js /** * This method returns the first argument it receives. * * @static * @since 0.1.0 * @memberOf _ * @category Util * @param {*} value Any value. * @returns {*} Returns `value`. * @example * * var object = { 'a': 1 }; * * console.log(_.identity(object) === object); * // => true */ function identity(value) { return value; } /* harmony default export */ var lodash_es_identity = (identity); ;// ./node_modules/lodash-es/_apply.js /** * A faster alternative to `Function#apply`, this function invokes `func` * with the `this` binding of `thisArg` and the arguments of `args`. * * @private * @param {Function} func The function to invoke. * @param {*} thisArg The `this` binding of `func`. * @param {Array} args The arguments to invoke `func` with. * @returns {*} Returns the result of `func`. */ function _apply_apply(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } /* harmony default export */ var _apply = (_apply_apply); ;// ./node_modules/lodash-es/_overRest.js /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; /** * A specialized version of `baseRest` which transforms the rest array. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @param {Function} transform The rest array transform. * @returns {Function} Returns the new function. */ function overRest(func, start, transform) { start = nativeMax(start === undefined ? (func.length - 1) : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return _apply(func, this, otherArgs); }; } /* harmony default export */ var _overRest = (overRest); ;// ./node_modules/lodash-es/constant.js /** * Creates a function that returns `value`. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {*} value The value to return from the new function. * @returns {Function} Returns the new constant function. * @example * * var objects = _.times(2, _.constant({ 'a': 1 })); * * console.log(objects); * // => [{ 'a': 1 }, { 'a': 1 }] * * console.log(objects[0] === objects[1]); * // => true */ function constant(value) { return function() { return value; }; } /* harmony default export */ var lodash_es_constant = (constant); ;// ./node_modules/lodash-es/_baseSetToString.js /** * The base implementation of `setToString` without support for hot loop shorting. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var baseSetToString = !_defineProperty ? lodash_es_identity : function(func, string) { return _defineProperty(func, 'toString', { 'configurable': true, 'enumerable': false, 'value': lodash_es_constant(string), 'writable': true }); }; /* harmony default export */ var _baseSetToString = (baseSetToString); ;// ./node_modules/lodash-es/_shortOut.js /** Used to detect hot functions by number of calls within a span of milliseconds. */ var HOT_COUNT = 800, HOT_SPAN = 16; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeNow = Date.now; /** * Creates a function that'll short out and invoke `identity` instead * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` * milliseconds. * * @private * @param {Function} func The function to restrict. * @returns {Function} Returns the new shortable function. */ function shortOut(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(undefined, arguments); }; } /* harmony default export */ var _shortOut = (shortOut); ;// ./node_modules/lodash-es/_setToString.js /** * Sets the `toString` method of `func` to return `string`. * * @private * @param {Function} func The function to modify. * @param {Function} string The `toString` result. * @returns {Function} Returns `func`. */ var setToString = _shortOut(_baseSetToString); /* harmony default export */ var _setToString = (setToString); ;// ./node_modules/lodash-es/_baseRest.js /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. * * @private * @param {Function} func The function to apply a rest parameter to. * @param {number} [start=func.length-1] The start position of the rest parameter. * @returns {Function} Returns the new function. */ function baseRest(func, start) { return _setToString(_overRest(func, start, lodash_es_identity), func + ''); } /* harmony default export */ var _baseRest = (baseRest); ;// ./node_modules/lodash-es/_isIterateeCall.js /** * Checks if the given arguments are from an iteratee call. * * @private * @param {*} value The potential iteratee value argument. * @param {*} index The potential iteratee index or key argument. * @param {*} object The potential iteratee object argument. * @returns {boolean} Returns `true` if the arguments are from an iteratee call, * else `false`. */ function isIterateeCall(value, index, object) { if (!lodash_es_isObject(object)) { return false; } var type = typeof index; if (type == 'number' ? (lodash_es_isArrayLike(object) && _isIndex(index, object.length)) : (type == 'string' && index in object) ) { return lodash_es_eq(object[index], value); } return false; } /* harmony default export */ var _isIterateeCall = (isIterateeCall); ;// ./node_modules/lodash-es/_createAssigner.js /** * Creates a function like `_.assign`. * * @private * @param {Function} assigner The function to assign values. * @returns {Function} Returns the new assigner function. */ function createAssigner(assigner) { return _baseRest(function(object, sources) { var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined, guard = length > 2 ? sources[2] : undefined; customizer = (assigner.length > 3 && typeof customizer == 'function') ? (length--, customizer) : undefined; if (guard && _isIterateeCall(sources[0], sources[1], guard)) { customizer = length < 3 ? undefined : customizer; length = 1; } object = Object(object); while (++index < length) { var source = sources[index]; if (source) { assigner(object, source, index, customizer); } } return object; }); } /* harmony default export */ var _createAssigner = (createAssigner); ;// ./node_modules/lodash-es/merge.js /** * This method is like `_.assign` except that it recursively merges own and * inherited enumerable string keyed properties of source objects into the * destination object. Source properties that resolve to `undefined` are * skipped if a destination value exists. Array and plain object properties * are merged recursively. Other objects and value types are overridden by * assignment. Source objects are applied from left to right. Subsequent * sources overwrite property assignments of previous sources. * * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 0.5.0 * @category Object * @param {Object} object The destination object. * @param {...Object} [sources] The source objects. * @returns {Object} Returns `object`. * @example * * var object = { * 'a': [{ 'b': 2 }, { 'd': 4 }] * }; * * var other = { * 'a': [{ 'c': 3 }, { 'e': 5 }] * }; * * _.merge(object, other); * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ var merge_merge = _createAssigner(function(object, source, srcIndex) { _baseMerge(object, source, srcIndex); }); /* harmony default export */ var lodash_es_merge = (merge_merge); ;// ./node_modules/naive-ui/es/_mixins/use-theme.mjs function createTheme(theme) { return theme; } function useTheme(resolveId, mountId, style, defaultTheme, props, clsPrefixRef) { const ssrAdapter = useSsrAdapter(); const NConfigProvider = runtime_core_esm_bundler_inject(context_configProviderInjectionKey, null); if (style) { const mountStyle = () => { const clsPrefix = clsPrefixRef === null || clsPrefixRef === void 0 ? void 0 : clsPrefixRef.value; style.mount({ id: clsPrefix === undefined ? mountId : clsPrefix + mountId, head: true, props: { bPrefix: clsPrefix ? `.${clsPrefix}-` : undefined }, anchorMetaName: cssrAnchorMetaName, ssr: ssrAdapter, parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget }); if (!(NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.preflightStyleDisabled)) { index_cssr.mount({ id: 'n-global', head: true, anchorMetaName: cssrAnchorMetaName, ssr: ssrAdapter, parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget }); } }; if (ssrAdapter) { mountStyle(); } else { onBeforeMount(mountStyle); } } const mergedThemeRef = runtime_core_esm_bundler_computed(() => { var _a; // keep props to make theme overrideable const { theme: { common: selfCommon, self, peers = {} } = {}, themeOverrides: selfOverrides = {}, builtinThemeOverrides: builtinOverrides = {} } = props; const { common: selfCommonOverrides, peers: peersOverrides } = selfOverrides; const { common: globalCommon = undefined, [resolveId]: { common: globalSelfCommon = undefined, self: globalSelf = undefined, peers: globalPeers = {} } = {} } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeRef.value) || {}; const { common: globalCommonOverrides = undefined, [resolveId]: globalSelfOverrides = {} } = (NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeOverridesRef.value) || {}; const { common: globalSelfCommonOverrides, peers: globalPeersOverrides = {} } = globalSelfOverrides; const mergedCommon = lodash_es_merge({}, selfCommon || globalSelfCommon || globalCommon || defaultTheme.common, globalCommonOverrides, globalSelfCommonOverrides, selfCommonOverrides); const mergedSelf = lodash_es_merge( // {}, executed every time, no need for empty obj (_a = self || globalSelf || defaultTheme.self) === null || _a === void 0 ? void 0 : _a(mergedCommon), builtinOverrides, globalSelfOverrides, selfOverrides); return { common: mergedCommon, self: mergedSelf, peers: lodash_es_merge({}, defaultTheme.peers, globalPeers, peers), peerOverrides: lodash_es_merge({}, builtinOverrides.peers, globalPeersOverrides, peersOverrides) }; }); return mergedThemeRef; } useTheme.props = { theme: Object, themeOverrides: Object, builtinThemeOverrides: Object }; /** * props.theme (Theme): * { * common: CommonThemeVars, * self(): ThemeVars, * peers: { Component: Theme } * } * provider.theme: * { * common: CommonThemeVars, * Button: Theme * ... * } * defaultTheme: * { * common: CommonThemeVars, * self(): ThemeVars, * peers: { Component: Theme } * } * * props.themeOverrides (ThemeOverrides): * { * common: CommonThemeVars, * peers: { Component: ThemeOverrides }, * ...ThemeVars * } * provider.themeOverrides: * { * common: CommonThemeVars, * Component: ThemeOverrides * ... * } * * mergedTheme: * { * common: CommonThemeVars, * self: ThemeVars, * peers: { Component: Theme }, * overrides: { Component: ThemeOverrides } * } */ /* harmony default export */ var use_theme = (useTheme); ;// ./node_modules/naive-ui/es/_mixins/use-form-item.mjs const formItemInjectionKey = createInjectionKey('n-form-item'); function useFormItem(props, { defaultSize = 'medium', mergedSize, mergedDisabled } = {}) { const NFormItem = runtime_core_esm_bundler_inject(formItemInjectionKey, null); provide(formItemInjectionKey, null); const mergedSizeRef = runtime_core_esm_bundler_computed(mergedSize ? () => mergedSize(NFormItem) : () => { const { size } = props; if (size) return size; if (NFormItem) { const { mergedSize } = NFormItem; if (mergedSize.value !== undefined) { return mergedSize.value; } } return defaultSize; }); const mergedDisabledRef = runtime_core_esm_bundler_computed(mergedDisabled ? () => mergedDisabled(NFormItem) : () => { const { disabled } = props; if (disabled !== undefined) { return disabled; } if (NFormItem) { return NFormItem.disabled.value; } return false; }); const mergedStatusRef = runtime_core_esm_bundler_computed(() => { const { status } = props; if (status) return status; return NFormItem === null || NFormItem === void 0 ? void 0 : NFormItem.mergedValidationStatus.value; }); runtime_core_esm_bundler_onBeforeUnmount(() => { if (NFormItem) { NFormItem.restoreValidation(); } }); return { mergedSizeRef, mergedDisabledRef, mergedStatusRef, nTriggerFormBlur() { if (NFormItem) { NFormItem.handleContentBlur(); } }, nTriggerFormChange() { if (NFormItem) { NFormItem.handleContentChange(); } }, nTriggerFormFocus() { if (NFormItem) { NFormItem.handleContentFocus(); } }, nTriggerFormInput() { if (NFormItem) { NFormItem.handleContentInput(); } } }; } ;// ./node_modules/naive-ui/es/_mixins/use-config.mjs const defaultClsPrefix = 'n'; function useConfig(props = {}, options = { defaultBordered: true }) { const NConfigProvider = runtime_core_esm_bundler_inject(context_configProviderInjectionKey, null); return { // NConfigProvider, inlineThemeDisabled: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.inlineThemeDisabled, mergedRtlRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedRtlRef, mergedComponentPropsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedComponentPropsRef, mergedBreakpointsRef: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBreakpointsRef, mergedBorderedRef: runtime_core_esm_bundler_computed(() => { var _a, _b; const { bordered } = props; if (bordered !== undefined) return bordered; return (_b = (_a = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedBorderedRef.value) !== null && _a !== void 0 ? _a : options.defaultBordered) !== null && _b !== void 0 ? _b : true; }), mergedClsPrefixRef: NConfigProvider ? NConfigProvider.mergedClsPrefixRef : reactivity_esm_bundler_shallowRef(defaultClsPrefix), namespaceRef: runtime_core_esm_bundler_computed(() => NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedNamespaceRef.value) }; } function useMergedClsPrefix() { const NConfigProvider = inject(configProviderInjectionKey, null); return NConfigProvider ? NConfigProvider.mergedClsPrefixRef : shallowRef(defaultClsPrefix); } ;// ./node_modules/naive-ui/es/_utils/naive/warn.mjs const warnedMessages = new Set(); function warnOnce(location, message) { const mergedMessage = `[naive/${location}]: ${message}`; if (warnedMessages.has(mergedMessage)) return; warnedMessages.add(mergedMessage); console.error(mergedMessage); } function warn_warn(location, message) { console.error(`[naive/${location}]: ${message}`); } function error(location, message, error) { console.error(`[naive/${location}]: ${message}`, error); } function throwError(location, message) { throw new Error(`[naive/${location}]: ${message}`); } ;// ./node_modules/naive-ui/es/_mixins/use-css-vars-class.mjs function useThemeClass(componentName, hashRef, cssVarsRef, props) { if (!cssVarsRef) throwError('useThemeClass', 'cssVarsRef is not passed'); const NConfigProvider = runtime_core_esm_bundler_inject(context_configProviderInjectionKey, null); const mergedThemeHashRef = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.mergedThemeHashRef; const styleMountTarget = NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget; const themeClassRef = ref(''); const ssrAdapter = useSsrAdapter(); let renderCallback; const hashClassPrefix = `__${componentName}`; const mountStyle = () => { let finalThemeHash = hashClassPrefix; const hashValue = hashRef ? hashRef.value : undefined; const themeHash = mergedThemeHashRef === null || mergedThemeHashRef === void 0 ? void 0 : mergedThemeHashRef.value; if (themeHash) finalThemeHash += `-${themeHash}`; if (hashValue) finalThemeHash += `-${hashValue}`; const { themeOverrides, builtinThemeOverrides } = props; if (themeOverrides) { finalThemeHash += `-${hash_browser_esm(JSON.stringify(themeOverrides))}`; } if (builtinThemeOverrides) { finalThemeHash += `-${hash_browser_esm(JSON.stringify(builtinThemeOverrides))}`; } themeClassRef.value = finalThemeHash; renderCallback = () => { const cssVars = cssVarsRef.value; let style = ''; for (const key in cssVars) { style += `${key}: ${cssVars[key]};`; } cssr_c(`.${finalThemeHash}`, style).mount({ id: finalThemeHash, ssr: ssrAdapter, parent: styleMountTarget }); renderCallback = undefined; }; }; watchEffect(() => { mountStyle(); }); return { themeClass: themeClassRef, onRender: () => { renderCallback === null || renderCallback === void 0 ? void 0 : renderCallback(); } }; } ;// ./node_modules/css-render/esm/exists.js function exists(id, ssr) { if (id === undefined) return false; if (ssr) { const { context: { ids } } = ssr; return ids.has(id); } return queryElement(id) !== null; } ;// ./node_modules/naive-ui/es/_mixins/use-rtl.mjs function useRtl(mountId, rtlStateRef, clsPrefixRef) { if (!rtlStateRef) return undefined; const ssrAdapter = useSsrAdapter(); const componentRtlStateRef = runtime_core_esm_bundler_computed(() => { const { value: rtlState } = rtlStateRef; if (!rtlState) { return undefined; } const componentRtlState = rtlState[mountId]; if (!componentRtlState) { return undefined; } return componentRtlState; }); const NConfigProvider = runtime_core_esm_bundler_inject(context_configProviderInjectionKey, null); const mountStyle = () => { watchEffect(() => { const { value: clsPrefix } = clsPrefixRef; const id = `${clsPrefix}${mountId}Rtl`; // if it already exists, we only need to watch clsPrefix, although in most // of time it's unnecessary... However we can at least listen less // handlers, which is great. if (exists(id, ssrAdapter)) return; const { value: componentRtlState } = componentRtlStateRef; if (!componentRtlState) return; componentRtlState.style.mount({ id, head: true, anchorMetaName: cssrAnchorMetaName, props: { bPrefix: clsPrefix ? `.${clsPrefix}-` : undefined }, ssr: ssrAdapter, parent: NConfigProvider === null || NConfigProvider === void 0 ? void 0 : NConfigProvider.styleMountTarget }); }); }; if (ssrAdapter) { mountStyle(); } else { onBeforeMount(mountStyle); } return componentRtlStateRef; } ;// ./node_modules/naive-ui/es/_utils/vue/call.mjs function call(funcs, ...args) { if (Array.isArray(funcs)) { funcs.forEach(func => call(func, ...args)); } else { return funcs(...args); } } ;// ./node_modules/naive-ui/es/_utils/css/color-to-class.mjs function color2Class(color) { return color.replace(/#|\(|\)|,|\s|\./g, '_'); } ;// ./node_modules/naive-ui/es/_utils/vue/resolve-slot.mjs function resolve_slot_ensureValidVNode(vnodes) { return vnodes.some(child => { if (!isVNode(child)) { return true; } if (child.type === Comment) { return false; } if (child.type === Fragment && !resolve_slot_ensureValidVNode(child.children)) { return false; } return true; }) ? vnodes : null; } /** * We shouldn't use the following functions with slot flags `_: 1, 2, 3` */ function resolveSlot(slot, fallback) { return slot && resolve_slot_ensureValidVNode(slot()) || fallback(); } function resolveSlotWithTypedProps(slot, props, fallback) { return slot && resolve_slot_ensureValidVNode(slot(props)) || fallback(props); } /** * Resolve slot with wrapper if content exists, no fallback */ function resolveWrappedSlot(slot, wrapper) { const children = slot && resolve_slot_ensureValidVNode(slot()); return wrapper(children || null); } /* * Resolve slot with wrapper if content exists, no fallback */ function resolveWrappedSlotWithProps(slot, props, wrapper) { const children = slot && resolve_slot_ensureValidVNode(slot(props)); return wrapper(children || null); } function isSlotEmpty(slot) { return !(slot && resolve_slot_ensureValidVNode(slot())); } ;// ./node_modules/naive-ui/es/_utils/color/index.mjs function createHoverColor(rgb) { return composite(rgb, [255, 255, 255, 0.16]); } function createPressedColor(rgb) { return composite(rgb, [0, 0, 0, 0.12]); } ;// ./node_modules/naive-ui/es/_utils/env/is-browser.mjs const is_browser_isBrowser = typeof document !== 'undefined' && typeof window !== 'undefined'; ;// ./node_modules/naive-ui/es/_utils/env/browser.mjs const isChrome = is_browser_isBrowser && 'chrome' in window; const isFirefox = is_browser_isBrowser && navigator.userAgent.includes('Firefox'); const isSafari = is_browser_isBrowser && navigator.userAgent.includes('Safari') && !isChrome; ;// ./node_modules/naive-ui/es/button-group/src/context.mjs const buttonGroupInjectionKey = createInjectionKey('n-button-group'); ;// ./node_modules/naive-ui/es/_styles/common/light.mjs const base = { neutralBase: '#FFF', neutralInvertBase: '#000', neutralTextBase: '#000', neutralPopover: '#fff', neutralCard: '#fff', neutralModal: '#fff', neutralBody: '#fff', alpha1: '0.82', alpha2: '0.72', alpha3: '0.38', alpha4: '0.24', // disabled text, placeholder, icon alpha5: '0.18', // disabled placeholder alphaClose: '0.6', alphaDisabled: '0.5', alphaDisabledInput: '0.02', alphaPending: '0.05', alphaTablePending: '0.02', alphaPressed: '0.07', alphaAvatar: '0.2', alphaRail: '0.14', alphaProgressRail: '.08', alphaBorder: '0.12', alphaDivider: '0.06', alphaInput: '0', alphaAction: '0.02', alphaTab: '0.04', alphaScrollbar: '0.25', alphaScrollbarHover: '0.4', alphaCode: '0.05', alphaTag: '0.02', // primary primaryHover: '#36ad6a', primaryDefault: '#18a058', primaryActive: '#0c7a43', primarySuppl: '#36ad6a', // info infoHover: '#4098fc', infoDefault: '#2080f0', infoActive: '#1060c9', infoSuppl: '#4098fc', // error errorHover: '#de576d', errorDefault: '#d03050', errorActive: '#ab1f3f', errorSuppl: '#de576d', // warning warningHover: '#fcb040', warningDefault: '#f0a020', warningActive: '#c97c10', warningSuppl: '#fcb040', // success successHover: '#36ad6a', successDefault: '#18a058', successActive: '#0c7a43', successSuppl: '#36ad6a' }; const baseBackgroundRgb = rgba(base.neutralBase); const baseInvertBackgroundRgb = rgba(base.neutralInvertBase); const overlayPrefix = `rgba(${baseInvertBackgroundRgb.slice(0, 3).join(', ')}, `; function overlay(alpha) { return `${overlayPrefix + String(alpha)})`; } function neutral(alpha) { const overlayRgba = Array.from(baseInvertBackgroundRgb); overlayRgba[3] = Number(alpha); return composite(baseBackgroundRgb, overlayRgba); } const derived = Object.assign(Object.assign({ name: 'common' }, _common), { baseColor: base.neutralBase, // primary color primaryColor: base.primaryDefault, primaryColorHover: base.primaryHover, primaryColorPressed: base.primaryActive, primaryColorSuppl: base.primarySuppl, // info color infoColor: base.infoDefault, infoColorHover: base.infoHover, infoColorPressed: base.infoActive, infoColorSuppl: base.infoSuppl, // success color successColor: base.successDefault, successColorHover: base.successHover, successColorPressed: base.successActive, successColorSuppl: base.successSuppl, // warning color warningColor: base.warningDefault, warningColorHover: base.warningHover, warningColorPressed: base.warningActive, warningColorSuppl: base.warningSuppl, // error color errorColor: base.errorDefault, errorColorHover: base.errorHover, errorColorPressed: base.errorActive, errorColorSuppl: base.errorSuppl, // text color textColorBase: base.neutralTextBase, textColor1: 'rgb(31, 34, 37)', textColor2: 'rgb(51, 54, 57)', textColor3: 'rgb(118, 124, 130)', // textColor4: neutral(base.alpha4), // disabled, placeholder, icon // textColor5: neutral(base.alpha5), textColorDisabled: neutral(base.alpha4), placeholderColor: neutral(base.alpha4), placeholderColorDisabled: neutral(base.alpha5), iconColor: neutral(base.alpha4), iconColorHover: scaleColor(neutral(base.alpha4), { lightness: 0.75 }), iconColorPressed: scaleColor(neutral(base.alpha4), { lightness: 0.9 }), iconColorDisabled: neutral(base.alpha5), opacity1: base.alpha1, opacity2: base.alpha2, opacity3: base.alpha3, opacity4: base.alpha4, opacity5: base.alpha5, dividerColor: 'rgb(239, 239, 245)', borderColor: 'rgb(224, 224, 230)', // close closeIconColor: neutral(Number(base.alphaClose)), closeIconColorHover: neutral(Number(base.alphaClose)), closeIconColorPressed: neutral(Number(base.alphaClose)), closeColorHover: 'rgba(0, 0, 0, .09)', closeColorPressed: 'rgba(0, 0, 0, .13)', // clear clearColor: neutral(base.alpha4), clearColorHover: scaleColor(neutral(base.alpha4), { lightness: 0.75 }), clearColorPressed: scaleColor(neutral(base.alpha4), { lightness: 0.9 }), scrollbarColor: overlay(base.alphaScrollbar), scrollbarColorHover: overlay(base.alphaScrollbarHover), scrollbarWidth: '5px', scrollbarHeight: '5px', scrollbarBorderRadius: '5px', progressRailColor: neutral(base.alphaProgressRail), railColor: 'rgb(219, 219, 223)', popoverColor: base.neutralPopover, tableColor: base.neutralCard, cardColor: base.neutralCard, modalColor: base.neutralModal, bodyColor: base.neutralBody, tagColor: '#eee', avatarColor: neutral(base.alphaAvatar), invertedColor: 'rgb(0, 20, 40)', inputColor: neutral(base.alphaInput), codeColor: 'rgb(244, 244, 248)', tabColor: 'rgb(247, 247, 250)', actionColor: 'rgb(250, 250, 252)', tableHeaderColor: 'rgb(250, 250, 252)', hoverColor: 'rgb(243, 243, 245)', // use color with alpha since it can be nested with header filter & sorter effect tableColorHover: 'rgba(0, 0, 100, 0.03)', tableColorStriped: 'rgba(0, 0, 100, 0.02)', pressedColor: 'rgb(237, 237, 239)', opacityDisabled: base.alphaDisabled, inputColorDisabled: 'rgb(250, 250, 252)', // secondary button color // can also be used in tertiary button & quaternary button buttonColor2: 'rgba(46, 51, 56, .05)', buttonColor2Hover: 'rgba(46, 51, 56, .09)', buttonColor2Pressed: 'rgba(46, 51, 56, .13)', boxShadow1: '0 1px 2px -2px rgba(0, 0, 0, .08), 0 3px 6px 0 rgba(0, 0, 0, .06), 0 5px 12px 4px rgba(0, 0, 0, .04)', boxShadow2: '0 3px 6px -4px rgba(0, 0, 0, .12), 0 6px 16px 0 rgba(0, 0, 0, .08), 0 9px 28px 8px rgba(0, 0, 0, .05)', boxShadow3: '0 6px 16px -9px rgba(0, 0, 0, .08), 0 9px 28px 0 rgba(0, 0, 0, .05), 0 12px 48px 16px rgba(0, 0, 0, .03)' }); /* harmony default export */ var light = (derived); ;// ./node_modules/naive-ui/es/button/styles/_common.mjs /* harmony default export */ var styles_common = ({ paddingTiny: '0 6px', paddingSmall: '0 10px', paddingMedium: '0 14px', paddingLarge: '0 18px', paddingRoundTiny: '0 10px', paddingRoundSmall: '0 14px', paddingRoundMedium: '0 18px', paddingRoundLarge: '0 22px', iconMarginTiny: '6px', iconMarginSmall: '6px', iconMarginMedium: '6px', iconMarginLarge: '6px', iconSizeTiny: '14px', iconSizeSmall: '18px', iconSizeMedium: '18px', iconSizeLarge: '20px', rippleDuration: '.6s' }); ;// ./node_modules/naive-ui/es/button/styles/light.mjs function light_self(vars) { const { heightTiny, heightSmall, heightMedium, heightLarge, borderRadius, fontSizeTiny, fontSizeSmall, fontSizeMedium, fontSizeLarge, opacityDisabled, textColor2, textColor3, primaryColorHover, primaryColorPressed, borderColor, primaryColor, baseColor, infoColor, infoColorHover, infoColorPressed, successColor, successColorHover, successColorPressed, warningColor, warningColorHover, warningColorPressed, errorColor, errorColorHover, errorColorPressed, fontWeight, buttonColor2, buttonColor2Hover, buttonColor2Pressed, fontWeightStrong } = vars; return Object.assign(Object.assign({}, styles_common), { heightTiny, heightSmall, heightMedium, heightLarge, borderRadiusTiny: borderRadius, borderRadiusSmall: borderRadius, borderRadiusMedium: borderRadius, borderRadiusLarge: borderRadius, fontSizeTiny, fontSizeSmall, fontSizeMedium, fontSizeLarge, opacityDisabled, // secondary colorOpacitySecondary: '0.16', colorOpacitySecondaryHover: '0.22', colorOpacitySecondaryPressed: '0.28', colorSecondary: buttonColor2, colorSecondaryHover: buttonColor2Hover, colorSecondaryPressed: buttonColor2Pressed, // tertiary colorTertiary: buttonColor2, colorTertiaryHover: buttonColor2Hover, colorTertiaryPressed: buttonColor2Pressed, // quaternary colorQuaternary: '#0000', colorQuaternaryHover: buttonColor2Hover, colorQuaternaryPressed: buttonColor2Pressed, // default type color: '#0000', colorHover: '#0000', colorPressed: '#0000', colorFocus: '#0000', colorDisabled: '#0000', textColor: textColor2, textColorTertiary: textColor3, textColorHover: primaryColorHover, textColorPressed: primaryColorPressed, textColorFocus: primaryColorHover, textColorDisabled: textColor2, textColorText: textColor2, textColorTextHover: primaryColorHover, textColorTextPressed: primaryColorPressed, textColorTextFocus: primaryColorHover, textColorTextDisabled: textColor2, textColorGhost: textColor2, textColorGhostHover: primaryColorHover, textColorGhostPressed: primaryColorPressed, textColorGhostFocus: primaryColorHover, textColorGhostDisabled: textColor2, border: `1px solid ${borderColor}`, borderHover: `1px solid ${primaryColorHover}`, borderPressed: `1px solid ${primaryColorPressed}`, borderFocus: `1px solid ${primaryColorHover}`, borderDisabled: `1px solid ${borderColor}`, rippleColor: primaryColor, // primary colorPrimary: primaryColor, colorHoverPrimary: primaryColorHover, colorPressedPrimary: primaryColorPressed, colorFocusPrimary: primaryColorHover, colorDisabledPrimary: primaryColor, textColorPrimary: baseColor, textColorHoverPrimary: baseColor, textColorPressedPrimary: baseColor, textColorFocusPrimary: baseColor, textColorDisabledPrimary: baseColor, textColorTextPrimary: primaryColor, textColorTextHoverPrimary: primaryColorHover, textColorTextPressedPrimary: primaryColorPressed, textColorTextFocusPrimary: primaryColorHover, textColorTextDisabledPrimary: textColor2, textColorGhostPrimary: primaryColor, textColorGhostHoverPrimary: primaryColorHover, textColorGhostPressedPrimary: primaryColorPressed, textColorGhostFocusPrimary: primaryColorHover, textColorGhostDisabledPrimary: primaryColor, borderPrimary: `1px solid ${primaryColor}`, borderHoverPrimary: `1px solid ${primaryColorHover}`, borderPressedPrimary: `1px solid ${primaryColorPressed}`, borderFocusPrimary: `1px solid ${primaryColorHover}`, borderDisabledPrimary: `1px solid ${primaryColor}`, rippleColorPrimary: primaryColor, // info colorInfo: infoColor, colorHoverInfo: infoColorHover, colorPressedInfo: infoColorPressed, colorFocusInfo: infoColorHover, colorDisabledInfo: infoColor, textColorInfo: baseColor, textColorHoverInfo: baseColor, textColorPressedInfo: baseColor, textColorFocusInfo: baseColor, textColorDisabledInfo: baseColor, textColorTextInfo: infoColor, textColorTextHoverInfo: infoColorHover, textColorTextPressedInfo: infoColorPressed, textColorTextFocusInfo: infoColorHover, textColorTextDisabledInfo: textColor2, textColorGhostInfo: infoColor, textColorGhostHoverInfo: infoColorHover, textColorGhostPressedInfo: infoColorPressed, textColorGhostFocusInfo: infoColorHover, textColorGhostDisabledInfo: infoColor, borderInfo: `1px solid ${infoColor}`, borderHoverInfo: `1px solid ${infoColorHover}`, borderPressedInfo: `1px solid ${infoColorPressed}`, borderFocusInfo: `1px solid ${infoColorHover}`, borderDisabledInfo: `1px solid ${infoColor}`, rippleColorInfo: infoColor, // success colorSuccess: successColor, colorHoverSuccess: successColorHover, colorPressedSuccess: successColorPressed, colorFocusSuccess: successColorHover, colorDisabledSuccess: successColor, textColorSuccess: baseColor, textColorHoverSuccess: baseColor, textColorPressedSuccess: baseColor, textColorFocusSuccess: baseColor, textColorDisabledSuccess: baseColor, textColorTextSuccess: successColor, textColorTextHoverSuccess: successColorHover, textColorTextPressedSuccess: successColorPressed, textColorTextFocusSuccess: successColorHover, textColorTextDisabledSuccess: textColor2, textColorGhostSuccess: successColor, textColorGhostHoverSuccess: successColorHover, textColorGhostPressedSuccess: successColorPressed, textColorGhostFocusSuccess: successColorHover, textColorGhostDisabledSuccess: successColor, borderSuccess: `1px solid ${successColor}`, borderHoverSuccess: `1px solid ${successColorHover}`, borderPressedSuccess: `1px solid ${successColorPressed}`, borderFocusSuccess: `1px solid ${successColorHover}`, borderDisabledSuccess: `1px solid ${successColor}`, rippleColorSuccess: successColor, // warning colorWarning: warningColor, colorHoverWarning: warningColorHover, colorPressedWarning: warningColorPressed, colorFocusWarning: warningColorHover, colorDisabledWarning: warningColor, textColorWarning: baseColor, textColorHoverWarning: baseColor, textColorPressedWarning: baseColor, textColorFocusWarning: baseColor, textColorDisabledWarning: baseColor, textColorTextWarning: warningColor, textColorTextHoverWarning: warningColorHover, textColorTextPressedWarning: warningColorPressed, textColorTextFocusWarning: warningColorHover, textColorTextDisabledWarning: textColor2, textColorGhostWarning: warningColor, textColorGhostHoverWarning: warningColorHover, textColorGhostPressedWarning: warningColorPressed, textColorGhostFocusWarning: warningColorHover, textColorGhostDisabledWarning: warningColor, borderWarning: `1px solid ${warningColor}`, borderHoverWarning: `1px solid ${warningColorHover}`, borderPressedWarning: `1px solid ${warningColorPressed}`, borderFocusWarning: `1px solid ${warningColorHover}`, borderDisabledWarning: `1px solid ${warningColor}`, rippleColorWarning: warningColor, // error colorError: errorColor, colorHoverError: errorColorHover, colorPressedError: errorColorPressed, colorFocusError: errorColorHover, colorDisabledError: errorColor, textColorError: baseColor, textColorHoverError: baseColor, textColorPressedError: baseColor, textColorFocusError: baseColor, textColorDisabledError: baseColor, textColorTextError: errorColor, textColorTextHoverError: errorColorHover, textColorTextPressedError: errorColorPressed, textColorTextFocusError: errorColorHover, textColorTextDisabledError: textColor2, textColorGhostError: errorColor, textColorGhostHoverError: errorColorHover, textColorGhostPressedError: errorColorPressed, textColorGhostFocusError: errorColorHover, textColorGhostDisabledError: errorColor, borderError: `1px solid ${errorColor}`, borderHoverError: `1px solid ${errorColorHover}`, borderPressedError: `1px solid ${errorColorPressed}`, borderFocusError: `1px solid ${errorColorHover}`, borderDisabledError: `1px solid ${errorColor}`, rippleColorError: errorColor, waveOpacity: '0.6', fontWeight, fontWeightStrong }); } const buttonLight = { name: 'Button', common: light, self: light_self }; /* harmony default export */ var styles_light = (buttonLight); ;// ./node_modules/naive-ui/es/_styles/transitions/fade-in-width-expand.cssr.mjs const { cubicBezierEaseInOut: fade_in_width_expand_cssr_cubicBezierEaseInOut } = _common; function fadeInWidthExpandTransition({ duration = '.2s', delay = '.1s' } = {}) { return [cssr_c('&.fade-in-width-expand-transition-leave-from, &.fade-in-width-expand-transition-enter-to', { opacity: 1 }), cssr_c('&.fade-in-width-expand-transition-leave-to, &.fade-in-width-expand-transition-enter-from', ` opacity: 0!important; margin-left: 0!important; margin-right: 0!important; `), cssr_c('&.fade-in-width-expand-transition-leave-active', ` overflow: hidden; transition: opacity ${duration} ${fade_in_width_expand_cssr_cubicBezierEaseInOut}, max-width ${duration} ${fade_in_width_expand_cssr_cubicBezierEaseInOut} ${delay}, margin-left ${duration} ${fade_in_width_expand_cssr_cubicBezierEaseInOut} ${delay}, margin-right ${duration} ${fade_in_width_expand_cssr_cubicBezierEaseInOut} ${delay}; `), cssr_c('&.fade-in-width-expand-transition-enter-active', ` overflow: hidden; transition: opacity ${duration} ${fade_in_width_expand_cssr_cubicBezierEaseInOut} ${delay}, max-width ${duration} ${fade_in_width_expand_cssr_cubicBezierEaseInOut}, margin-left ${duration} ${fade_in_width_expand_cssr_cubicBezierEaseInOut}, margin-right ${duration} ${fade_in_width_expand_cssr_cubicBezierEaseInOut}; `)]; } ;// ./node_modules/naive-ui/es/button/src/styles/index.cssr.mjs // vars: // --n-bezier // --n-bezier-ease-out // --n-ripple-duration // --n-opacity-disabled // --n-text-color // --n-text-color-hover // --n-text-color-pressed // --n-text-color-focus // --n-text-color-disabled // --n-color // --n-color-hover // --n-color-pressed // --n-color-focus // --n-color-disabled // --n-border // --n-border-hover // --n-border-pressed // --n-border-focus // --n-border-disabled // --n-ripple-color // --n-border-radius // --n-height // --n-width // --n-font-size // --n-padding // --n-icon-size // --n-icon-margin // --n-wave-opacity // --n-font-weight // // private-vars: // --n-border-color-xxx, used for custom color /* harmony default export */ var button_src_styles_index_cssr = (cssr_c([cB('button', ` margin: 0; font-weight: var(--n-font-weight); line-height: 1; font-family: inherit; padding: var(--n-padding); height: var(--n-height); font-size: var(--n-font-size); border-radius: var(--n-border-radius); color: var(--n-text-color); background-color: var(--n-color); width: var(--n-width); white-space: nowrap; outline: none; position: relative; z-index: auto; border: none; display: inline-flex; flex-wrap: nowrap; flex-shrink: 0; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; text-align: center; cursor: pointer; text-decoration: none; transition: color .3s var(--n-bezier), background-color .3s var(--n-bezier), opacity .3s var(--n-bezier), border-color .3s var(--n-bezier); `, [cM('color', [cE('border', { borderColor: 'var(--n-border-color)' }), cM('disabled', [cE('border', { borderColor: 'var(--n-border-color-disabled)' })]), cNotM('disabled', [cssr_c('&:focus', [cE('state-border', { borderColor: 'var(--n-border-color-focus)' })]), cssr_c('&:hover', [cE('state-border', { borderColor: 'var(--n-border-color-hover)' })]), cssr_c('&:active', [cE('state-border', { borderColor: 'var(--n-border-color-pressed)' })]), cM('pressed', [cE('state-border', { borderColor: 'var(--n-border-color-pressed)' })])])]), cM('disabled', { backgroundColor: 'var(--n-color-disabled)', color: 'var(--n-text-color-disabled)' }, [cE('border', { border: 'var(--n-border-disabled)' })]), cNotM('disabled', [cssr_c('&:focus', { backgroundColor: 'var(--n-color-focus)', color: 'var(--n-text-color-focus)' }, [cE('state-border', { border: 'var(--n-border-focus)' })]), cssr_c('&:hover', { backgroundColor: 'var(--n-color-hover)', color: 'var(--n-text-color-hover)' }, [cE('state-border', { border: 'var(--n-border-hover)' })]), cssr_c('&:active', { backgroundColor: 'var(--n-color-pressed)', color: 'var(--n-text-color-pressed)' }, [cE('state-border', { border: 'var(--n-border-pressed)' })]), cM('pressed', { backgroundColor: 'var(--n-color-pressed)', color: 'var(--n-text-color-pressed)' }, [cE('state-border', { border: 'var(--n-border-pressed)' })])]), cM('loading', 'cursor: wait;'), cB('base-wave', ` pointer-events: none; top: 0; right: 0; bottom: 0; left: 0; animation-iteration-count: 1; animation-duration: var(--n-ripple-duration); animation-timing-function: var(--n-bezier-ease-out), var(--n-bezier-ease-out); `, [cM('active', { zIndex: 1, animationName: 'button-wave-spread, button-wave-opacity' })]), is_browser_isBrowser && 'MozBoxSizing' in document.createElement('div').style ? cssr_c('&::moz-focus-inner', { border: 0 }) : null, cE('border, state-border', ` position: absolute; left: 0; top: 0; right: 0; bottom: 0; border-radius: inherit; transition: border-color .3s var(--n-bezier); pointer-events: none; `), cE('border', { border: 'var(--n-border)' }), cE('state-border', { border: 'var(--n-border)', borderColor: '#0000', zIndex: 1 }), cE('icon', ` margin: var(--n-icon-margin); margin-left: 0; height: var(--n-icon-size); width: var(--n-icon-size); max-width: var(--n-icon-size); font-size: var(--n-icon-size); position: relative; flex-shrink: 0; `, [cB('icon-slot', ` height: var(--n-icon-size); width: var(--n-icon-size); position: absolute; left: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; justify-content: center; `, [iconSwitchTransition({ top: '50%', originalTransform: 'translateY(-50%)' })]), fadeInWidthExpandTransition()]), cE('content', ` display: flex; align-items: center; flex-wrap: nowrap; min-width: 0; `, [cssr_c('~', [cE('icon', { margin: 'var(--n-icon-margin)', marginRight: 0 })])]), cM('block', ` display: flex; width: 100%; `), cM('dashed', [cE('border, state-border', { borderStyle: 'dashed !important' })]), cM('disabled', { cursor: 'not-allowed', opacity: 'var(--n-opacity-disabled)' })]), cssr_c('@keyframes button-wave-spread', { from: { boxShadow: '0 0 0.5px 0 var(--n-ripple-color)' }, to: { // don't use exact 5px since chrome will display the animation with glitches boxShadow: '0 0 0.5px 4.5px var(--n-ripple-color)' } }), cssr_c('@keyframes button-wave-opacity', { from: { opacity: 'var(--n-wave-opacity)' }, to: { opacity: 0 } })])); ;// ./node_modules/naive-ui/es/button/src/Button.mjs const buttonProps = Object.assign(Object.assign({}, use_theme.props), { color: String, textColor: String, text: Boolean, block: Boolean, loading: Boolean, disabled: Boolean, circle: Boolean, size: String, ghost: Boolean, round: Boolean, secondary: Boolean, tertiary: Boolean, quaternary: Boolean, strong: Boolean, focusable: { type: Boolean, default: true }, keyboard: { type: Boolean, default: true }, tag: { type: String, default: 'button' }, type: { type: String, default: 'default' }, dashed: Boolean, renderIcon: Function, iconPlacement: { type: String, default: 'left' }, attrType: { type: String, default: 'button' }, bordered: { type: Boolean, default: true }, onClick: [Function, Array], nativeFocusBehavior: { type: Boolean, default: !isSafari } }); const Button = defineComponent({ name: 'Button', props: buttonProps, slots: Object, setup(props) { if (false) {} const selfElRef = ref(null); const waveElRef = ref(null); const enterPressedRef = ref(false); const showBorderRef = use_memo(() => { return !props.quaternary && !props.tertiary && !props.secondary && !props.text && (!props.color || props.ghost || props.dashed) && props.bordered; }); const NButtonGroup = runtime_core_esm_bundler_inject(buttonGroupInjectionKey, {}); const { mergedSizeRef } = useFormItem({}, { defaultSize: 'medium', mergedSize: NFormItem => { const { size } = props; if (size) return size; const { size: buttonGroupSize } = NButtonGroup; if (buttonGroupSize) return buttonGroupSize; const { mergedSize: formItemSize } = NFormItem || {}; if (formItemSize) { return formItemSize.value; } return 'medium'; } }); const mergedFocusableRef = runtime_core_esm_bundler_computed(() => { return props.focusable && !props.disabled; }); const handleMousedown = e => { var _a; if (!mergedFocusableRef.value) { e.preventDefault(); } if (props.nativeFocusBehavior) { return; } e.preventDefault(); // normally this won't be called if disabled (when tag is button) // if not, we try to make it behave like a button if (props.disabled) { return; } if (mergedFocusableRef.value) { (_a = selfElRef.value) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }); } }; const handleClick = e => { var _a; if (!props.disabled && !props.loading) { const { onClick } = props; if (onClick) call(onClick, e); if (!props.text) { (_a = waveElRef.value) === null || _a === void 0 ? void 0 : _a.play(); } } }; const handleKeyup = e => { switch (e.key) { case 'Enter': if (!props.keyboard) { return; } enterPressedRef.value = false; } }; const handleKeydown = e => { switch (e.key) { case 'Enter': if (!props.keyboard || props.loading) { e.preventDefault(); return; } enterPressedRef.value = true; } }; const handleBlur = () => { enterPressedRef.value = false; }; const { inlineThemeDisabled, mergedClsPrefixRef, mergedRtlRef } = useConfig(props); const themeRef = use_theme('Button', '-button', button_src_styles_index_cssr, styles_light, props, mergedClsPrefixRef); const rtlEnabledRef = useRtl('Button', mergedRtlRef, mergedClsPrefixRef); const cssVarsRef = runtime_core_esm_bundler_computed(() => { const theme = themeRef.value; const { common: { cubicBezierEaseInOut, cubicBezierEaseOut }, self } = theme; const { rippleDuration, opacityDisabled, fontWeight, fontWeightStrong } = self; const size = mergedSizeRef.value; const { dashed, type, ghost, text, color, round, circle, textColor, secondary, tertiary, quaternary, strong } = props; // font const fontProps = { '--n-font-weight': strong ? fontWeightStrong : fontWeight }; // color let colorProps = { '--n-color': 'initial', '--n-color-hover': 'initial', '--n-color-pressed': 'initial', '--n-color-focus': 'initial', '--n-color-disabled': 'initial', '--n-ripple-color': 'initial', '--n-text-color': 'initial', '--n-text-color-hover': 'initial', '--n-text-color-pressed': 'initial', '--n-text-color-focus': 'initial', '--n-text-color-disabled': 'initial' }; const typeIsTertiary = type === 'tertiary'; const typeIsDefault = type === 'default'; const mergedType = typeIsTertiary ? 'default' : type; if (text) { const propTextColor = textColor || color; const mergedTextColor = propTextColor || self[createKey('textColorText', mergedType)]; colorProps = { '--n-color': '#0000', '--n-color-hover': '#0000', '--n-color-pressed': '#0000', '--n-color-focus': '#0000', '--n-color-disabled': '#0000', '--n-ripple-color': '#0000', '--n-text-color': mergedTextColor, '--n-text-color-hover': propTextColor ? createHoverColor(propTextColor) : self[createKey('textColorTextHover', mergedType)], '--n-text-color-pressed': propTextColor ? createPressedColor(propTextColor) : self[createKey('textColorTextPressed', mergedType)], '--n-text-color-focus': propTextColor ? createHoverColor(propTextColor) : self[createKey('textColorTextHover', mergedType)], '--n-text-color-disabled': propTextColor || self[createKey('textColorTextDisabled', mergedType)] }; } else if (ghost || dashed) { const mergedTextColor = textColor || color; colorProps = { '--n-color': '#0000', '--n-color-hover': '#0000', '--n-color-pressed': '#0000', '--n-color-focus': '#0000', '--n-color-disabled': '#0000', '--n-ripple-color': color || self[createKey('rippleColor', mergedType)], '--n-text-color': mergedTextColor || self[createKey('textColorGhost', mergedType)], '--n-text-color-hover': mergedTextColor ? createHoverColor(mergedTextColor) : self[createKey('textColorGhostHover', mergedType)], '--n-text-color-pressed': mergedTextColor ? createPressedColor(mergedTextColor) : self[createKey('textColorGhostPressed', mergedType)], '--n-text-color-focus': mergedTextColor ? createHoverColor(mergedTextColor) : self[createKey('textColorGhostHover', mergedType)], '--n-text-color-disabled': mergedTextColor || self[createKey('textColorGhostDisabled', mergedType)] }; } else if (secondary) { const typeTextColor = typeIsDefault ? self.textColor : typeIsTertiary ? self.textColorTertiary : self[createKey('color', mergedType)]; const mergedTextColor = color || typeTextColor; const isColoredType = type !== 'default' && type !== 'tertiary'; colorProps = { '--n-color': isColoredType ? changeColor(mergedTextColor, { alpha: Number(self.colorOpacitySecondary) }) : self.colorSecondary, '--n-color-hover': isColoredType ? changeColor(mergedTextColor, { alpha: Number(self.colorOpacitySecondaryHover) }) : self.colorSecondaryHover, '--n-color-pressed': isColoredType ? changeColor(mergedTextColor, { alpha: Number(self.colorOpacitySecondaryPressed) }) : self.colorSecondaryPressed, '--n-color-focus': isColoredType ? changeColor(mergedTextColor, { alpha: Number(self.colorOpacitySecondaryHover) }) : self.colorSecondaryHover, '--n-color-disabled': self.colorSecondary, '--n-ripple-color': '#0000', '--n-text-color': mergedTextColor, '--n-text-color-hover': mergedTextColor, '--n-text-color-pressed': mergedTextColor, '--n-text-color-focus': mergedTextColor, '--n-text-color-disabled': mergedTextColor }; } else if (tertiary || quaternary) { const typeColor = typeIsDefault ? self.textColor : typeIsTertiary ? self.textColorTertiary : self[createKey('color', mergedType)]; const mergedColor = color || typeColor; if (tertiary) { colorProps['--n-color'] = self.colorTertiary; colorProps['--n-color-hover'] = self.colorTertiaryHover; colorProps['--n-color-pressed'] = self.colorTertiaryPressed; colorProps['--n-color-focus'] = self.colorSecondaryHover; colorProps['--n-color-disabled'] = self.colorTertiary; } else { colorProps['--n-color'] = self.colorQuaternary; colorProps['--n-color-hover'] = self.colorQuaternaryHover; colorProps['--n-color-pressed'] = self.colorQuaternaryPressed; colorProps['--n-color-focus'] = self.colorQuaternaryHover; colorProps['--n-color-disabled'] = self.colorQuaternary; } colorProps['--n-ripple-color'] = '#0000'; colorProps['--n-text-color'] = mergedColor; colorProps['--n-text-color-hover'] = mergedColor; colorProps['--n-text-color-pressed'] = mergedColor; colorProps['--n-text-color-focus'] = mergedColor; colorProps['--n-text-color-disabled'] = mergedColor; } else { colorProps = { '--n-color': color || self[createKey('color', mergedType)], '--n-color-hover': color ? createHoverColor(color) : self[createKey('colorHover', mergedType)], '--n-color-pressed': color ? createPressedColor(color) : self[createKey('colorPressed', mergedType)], '--n-color-focus': color ? createHoverColor(color) : self[createKey('colorFocus', mergedType)], '--n-color-disabled': color || self[createKey('colorDisabled', mergedType)], '--n-ripple-color': color || self[createKey('rippleColor', mergedType)], '--n-text-color': textColor || (color ? self.textColorPrimary : typeIsTertiary ? self.textColorTertiary : self[createKey('textColor', mergedType)]), '--n-text-color-hover': textColor || (color ? self.textColorHoverPrimary : self[createKey('textColorHover', mergedType)]), '--n-text-color-pressed': textColor || (color ? self.textColorPressedPrimary : self[createKey('textColorPressed', mergedType)]), '--n-text-color-focus': textColor || (color ? self.textColorFocusPrimary : self[createKey('textColorFocus', mergedType)]), '--n-text-color-disabled': textColor || (color ? self.textColorDisabledPrimary : self[createKey('textColorDisabled', mergedType)]) }; } // border let borderProps = { '--n-border': 'initial', '--n-border-hover': 'initial', '--n-border-pressed': 'initial', '--n-border-focus': 'initial', '--n-border-disabled': 'initial' }; if (text) { borderProps = { '--n-border': 'none', '--n-border-hover': 'none', '--n-border-pressed': 'none', '--n-border-focus': 'none', '--n-border-disabled': 'none' }; } else { borderProps = { '--n-border': self[createKey('border', mergedType)], '--n-border-hover': self[createKey('borderHover', mergedType)], '--n-border-pressed': self[createKey('borderPressed', mergedType)], '--n-border-focus': self[createKey('borderFocus', mergedType)], '--n-border-disabled': self[createKey('borderDisabled', mergedType)] }; } // size const { [createKey('height', size)]: height, [createKey('fontSize', size)]: fontSize, [createKey('padding', size)]: padding, [createKey('paddingRound', size)]: paddingRound, [createKey('iconSize', size)]: iconSize, [createKey('borderRadius', size)]: borderRadius, [createKey('iconMargin', size)]: iconMargin, waveOpacity } = self; const sizeProps = { '--n-width': circle && !text ? height : 'initial', '--n-height': text ? 'initial' : height, '--n-font-size': fontSize, '--n-padding': circle ? 'initial' : text ? 'initial' : round ? paddingRound : padding, '--n-icon-size': iconSize, '--n-icon-margin': iconMargin, '--n-border-radius': text ? 'initial' : circle || round ? height : borderRadius }; return Object.assign(Object.assign(Object.assign(Object.assign({ '--n-bezier': cubicBezierEaseInOut, '--n-bezier-ease-out': cubicBezierEaseOut, '--n-ripple-duration': rippleDuration, '--n-opacity-disabled': opacityDisabled, '--n-wave-opacity': waveOpacity }, fontProps), colorProps), borderProps), sizeProps); }); const themeClassHandle = inlineThemeDisabled ? useThemeClass('button', runtime_core_esm_bundler_computed(() => { let hash = ''; const { dashed, type, ghost, text, color, round, circle, textColor, secondary, tertiary, quaternary, strong } = props; if (dashed) hash += 'a'; if (ghost) hash += 'b'; if (text) hash += 'c'; if (round) hash += 'd'; if (circle) hash += 'e'; if (secondary) hash += 'f'; if (tertiary) hash += 'g'; if (quaternary) hash += 'h'; if (strong) hash += 'i'; if (color) hash += `j${color2Class(color)}`; if (textColor) hash += `k${color2Class(textColor)}`; const { value: size } = mergedSizeRef; hash += `l${size[0]}`; hash += `m${type[0]}`; return hash; }), cssVarsRef, props) : undefined; return { selfElRef, waveElRef, mergedClsPrefix: mergedClsPrefixRef, mergedFocusable: mergedFocusableRef, mergedSize: mergedSizeRef, showBorder: showBorderRef, enterPressed: enterPressedRef, rtlEnabled: rtlEnabledRef, handleMousedown, handleKeydown, handleBlur, handleKeyup, handleClick, customColorCssVars: runtime_core_esm_bundler_computed(() => { const { color } = props; if (!color) return null; const hoverColor = createHoverColor(color); return { '--n-border-color': color, '--n-border-color-hover': hoverColor, '--n-border-color-pressed': createPressedColor(color), '--n-border-color-focus': hoverColor, '--n-border-color-disabled': color }; }), cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }; }, render() { const { mergedClsPrefix, tag: Component, onRender } = this; onRender === null || onRender === void 0 ? void 0 : onRender(); const children = resolveWrappedSlot(this.$slots.default, children => children && h("span", { class: `${mergedClsPrefix}-button__content` }, children)); return h(Component, { ref: "selfElRef", class: [this.themeClass, `${mergedClsPrefix}-button`, `${mergedClsPrefix}-button--${this.type}-type`, `${mergedClsPrefix}-button--${this.mergedSize}-type`, this.rtlEnabled && `${mergedClsPrefix}-button--rtl`, this.disabled && `${mergedClsPrefix}-button--disabled`, this.block && `${mergedClsPrefix}-button--block`, this.enterPressed && `${mergedClsPrefix}-button--pressed`, !this.text && this.dashed && `${mergedClsPrefix}-button--dashed`, this.color && `${mergedClsPrefix}-button--color`, this.secondary && `${mergedClsPrefix}-button--secondary`, this.loading && `${mergedClsPrefix}-button--loading`, this.ghost && `${mergedClsPrefix}-button--ghost` // required for button group border collapse ], tabindex: this.mergedFocusable ? 0 : -1, type: this.attrType, style: this.cssVars, disabled: this.disabled, onClick: this.handleClick, onBlur: this.handleBlur, onMousedown: this.handleMousedown, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown }, this.iconPlacement === 'right' && children, h(FadeInExpandTransition, { width: true }, { default: () => resolveWrappedSlot(this.$slots.icon, children => (this.loading || this.renderIcon || children) && h("span", { class: `${mergedClsPrefix}-button__icon`, style: { margin: isSlotEmpty(this.$slots.default) ? '0' : '' } }, h(IconSwitchTransition, null, { default: () => this.loading ? h(Loading, { clsPrefix: mergedClsPrefix, key: "loading", class: `${mergedClsPrefix}-icon-slot`, strokeWidth: 20 }) : h("div", { key: "icon", class: `${mergedClsPrefix}-icon-slot`, role: "none" }, this.renderIcon ? this.renderIcon() : children) }))) }), this.iconPlacement === 'left' && children, !this.text ? h(Wave, { ref: "waveElRef", clsPrefix: mergedClsPrefix }) : null, this.showBorder ? h("div", { "aria-hidden": true, class: `${mergedClsPrefix}-button__border`, style: this.customColorCssVars }) : null, this.showBorder ? h("div", { "aria-hidden": true, class: `${mergedClsPrefix}-button__state-border`, style: this.customColorCssVars }) : null); } }); /* harmony default export */ var src_Button = (Button); // XButton is for tsx type checking // It's not compatible with render function `h` // Currently we don't expose it as public // If there's any issue about this, we may expose it // Since most people use template, the type checking phase doesn't work as tsx const XButton = Button; // Also, we may make XButton a generic type which support `tag` prop // but currently vue doesn't export IntrinsicElementAttributes from runtime-dom // so we can't easily make an attr map by hand // just leave it for later ;// ./node_modules/seemly/es/css/index.js function depx(value) { if (typeof value === 'string') { if (value.endsWith('px')) { return Number(value.slice(0, value.length - 2)); } return Number(value); } return value; } function pxfy(value) { if (value === undefined || value === null) return undefined; if (typeof value === 'number') return `${value}px`; if (value.endsWith('px')) return value; return `${value}px`; } function getMargin(value, position) { const parts = value.trim().split(/\s+/g); const margin = { top: parts[0] }; switch (parts.length) { case 1: margin.right = parts[0]; margin.bottom = parts[0]; margin.left = parts[0]; break; case 2: margin.right = parts[1]; margin.left = parts[1]; margin.bottom = parts[0]; break; case 3: margin.right = parts[1]; margin.bottom = parts[2]; margin.left = parts[1]; break; case 4: margin.right = parts[1]; margin.bottom = parts[2]; margin.left = parts[3]; break; default: throw new Error('[seemly/getMargin]:' + value + ' is not a valid value.'); } if (position === undefined) return margin; return margin[position]; } function getGap(value, orient) { const [rowGap, colGap] = value.split(' '); if (!orient) return { row: rowGap, col: colGap || rowGap }; return orient === 'row' ? rowGap : colGap; } ;// ./node_modules/naive-ui/es/_utils/vue/flatten.mjs // o(n) flatten function flatten_flatten(vNodes, filterCommentNode = true, result = []) { vNodes.forEach(vNode => { if (vNode === null) return; if (typeof vNode !== 'object') { if (typeof vNode === 'string' || typeof vNode === 'number') { result.push(createTextVNode(String(vNode))); } return; } if (Array.isArray(vNode)) { flatten_flatten(vNode, filterCommentNode, result); return; } if (vNode.type === Fragment) { if (vNode.children === null) return; if (Array.isArray(vNode.children)) { flatten_flatten(vNode.children, filterCommentNode, result); } // rawSlot } else { if (vNode.type === Comment && filterCommentNode) return; result.push(vNode); } }); return result; } ;// ./node_modules/naive-ui/es/_utils/vue/get-slot.mjs function getSlot(instance, slotName = 'default', fallback = []) { const slots = instance.$slots; const slot = slots[slotName]; if (slot === undefined) return fallback; return slot(); } ;// ./node_modules/naive-ui/es/space/styles/_common.mjs /* harmony default export */ var space_styles_common = ({ gapSmall: '4px 8px', gapMedium: '8px 12px', gapLarge: '12px 16px' }); ;// ./node_modules/naive-ui/es/space/styles/light.mjs function styles_light_self() { return space_styles_common; } const spaceLight = { name: 'Space', self: styles_light_self }; /* harmony default export */ var space_styles_light = (spaceLight); ;// ./node_modules/naive-ui/es/space/src/utils.mjs let supportFlexGap; function ensureSupportFlexGap() { if (!is_browser_isBrowser) return true; if (supportFlexGap === undefined) { // create flex container with row-gap set const flex = document.createElement('div'); flex.style.display = 'flex'; flex.style.flexDirection = 'column'; flex.style.rowGap = '1px'; // create two, elements inside it flex.appendChild(document.createElement('div')); flex.appendChild(document.createElement('div')); // append to the DOM (needed to obtain scrollHeight) document.body.appendChild(flex); const isSupported = flex.scrollHeight === 1; // flex container should be 1px high from the row-gap document.body.removeChild(flex); return supportFlexGap = isSupported; } return supportFlexGap; } ;// ./node_modules/naive-ui/es/space/src/Space.mjs const spaceProps = Object.assign(Object.assign({}, use_theme.props), { align: String, justify: { type: String, default: 'start' }, inline: Boolean, vertical: Boolean, reverse: Boolean, size: { type: [String, Number, Array], default: 'medium' }, wrapItem: { type: Boolean, default: true }, itemClass: String, itemStyle: [String, Object], wrap: { type: Boolean, default: true }, // internal internalUseGap: { type: Boolean, default: undefined } }); /* harmony default export */ var Space = (defineComponent({ name: 'Space', props: spaceProps, setup(props) { const { mergedClsPrefixRef, mergedRtlRef } = useConfig(props); const themeRef = use_theme('Space', '-space', undefined, space_styles_light, props, mergedClsPrefixRef); const rtlEnabledRef = useRtl('Space', mergedRtlRef, mergedClsPrefixRef); return { useGap: ensureSupportFlexGap(), rtlEnabled: rtlEnabledRef, mergedClsPrefix: mergedClsPrefixRef, margin: runtime_core_esm_bundler_computed(() => { const { size } = props; if (Array.isArray(size)) { return { horizontal: size[0], vertical: size[1] }; } if (typeof size === 'number') { return { horizontal: size, vertical: size }; } const { self: { [createKey('gap', size)]: gap } } = themeRef.value; const { row, col } = getGap(gap); return { horizontal: depx(col), vertical: depx(row) }; }) }; }, render() { const { vertical, reverse, align, inline, justify, itemClass, itemStyle, margin, wrap, mergedClsPrefix, rtlEnabled, useGap, wrapItem, internalUseGap } = this; const children = flatten_flatten(getSlot(this), false); if (!children.length) return null; const horizontalMargin = `${margin.horizontal}px`; const semiHorizontalMargin = `${margin.horizontal / 2}px`; const verticalMargin = `${margin.vertical}px`; const semiVerticalMargin = `${margin.vertical / 2}px`; const lastIndex = children.length - 1; const isJustifySpace = justify.startsWith('space-'); return h("div", { role: "none", class: [`${mergedClsPrefix}-space`, rtlEnabled && `${mergedClsPrefix}-space--rtl`], style: { display: inline ? 'inline-flex' : 'flex', flexDirection: (() => { if (vertical && !reverse) return 'column'; if (vertical && reverse) return 'column-reverse'; if (!vertical && reverse) return 'row-reverse'; /** (!vertical && !reverse) */else return 'row'; })(), justifyContent: ['start', 'end'].includes(justify) ? `flex-${justify}` : justify, flexWrap: !wrap || vertical ? 'nowrap' : 'wrap', marginTop: useGap || vertical ? '' : `-${semiVerticalMargin}`, marginBottom: useGap || vertical ? '' : `-${semiVerticalMargin}`, alignItems: align, gap: useGap ? `${margin.vertical}px ${margin.horizontal}px` : '' } }, !wrapItem && (useGap || internalUseGap) ? children : children.map((child, index) => child.type === Comment ? child : h("div", { role: "none", class: itemClass, style: [itemStyle, { maxWidth: '100%' }, useGap ? '' : vertical ? { marginBottom: index !== lastIndex ? verticalMargin : '' } : rtlEnabled ? { marginLeft: isJustifySpace ? justify === 'space-between' && index === lastIndex ? '' : semiHorizontalMargin : index !== lastIndex ? horizontalMargin : '', marginRight: isJustifySpace ? justify === 'space-between' && index === 0 ? '' : semiHorizontalMargin : '', paddingTop: semiVerticalMargin, paddingBottom: semiVerticalMargin } : { marginRight: isJustifySpace ? justify === 'space-between' && index === lastIndex ? '' : semiHorizontalMargin : index !== lastIndex ? horizontalMargin : '', marginLeft: isJustifySpace ? justify === 'space-between' && index === 0 ? '' : semiHorizontalMargin : '', paddingTop: semiVerticalMargin, paddingBottom: semiVerticalMargin }] }, child))); } })); ;// ./node_modules/vdirs/es/utils.js const utils_warnedMessages = new Set(); function utils_warnOnce(location, message) { const mergedMessage = `[vdirs/${location}]: ${message}`; if (utils_warnedMessages.has(mergedMessage)) return; utils_warnedMessages.add(mergedMessage); } function utils_warn(location, message) { console.error(`[vdirs/${location}]: ${message}`); } ;// ./node_modules/vdirs/es/zindexable/z-index-manager.js class ZIndexManager { constructor() { this.elementZIndex = new Map(); this.nextZIndex = 2000; } get elementCount() { return this.elementZIndex.size; } ensureZIndex(el, zIndex) { const { elementZIndex } = this; if (zIndex !== undefined) { el.style.zIndex = `${zIndex}`; elementZIndex.delete(el); return; } const { nextZIndex } = this; if (elementZIndex.has(el)) { const currentZIndex = elementZIndex.get(el); if (currentZIndex + 1 === this.nextZIndex) return; } el.style.zIndex = `${nextZIndex}`; elementZIndex.set(el, nextZIndex); this.nextZIndex = nextZIndex + 1; this.squashState(); } unregister(el, zIndex) { const { elementZIndex } = this; if (elementZIndex.has(el)) { elementZIndex.delete(el); } else if (zIndex === undefined) { utils_warn('z-index-manager/unregister-element', 'Element not found when unregistering.'); } this.squashState(); } squashState() { const { elementCount } = this; if (!elementCount) { this.nextZIndex = 2000; } if (this.nextZIndex - elementCount > 2500) this.rearrange(); } rearrange() { const elementZIndexPair = Array.from(this.elementZIndex.entries()); elementZIndexPair.sort((pair1, pair2) => { return pair1[1] - pair2[1]; }); this.nextZIndex = 2000; elementZIndexPair.forEach((pair) => { const el = pair[0]; const zIndex = this.nextZIndex++; if (`${zIndex}` !== el.style.zIndex) el.style.zIndex = `${zIndex}`; }); } } /* harmony default export */ var z_index_manager = (new ZIndexManager()); ;// ./node_modules/vdirs/es/zindexable/index.js const ctx = '@@ziContext'; // We don't expect manually bound zindex should be changed const zindexable = { mounted(el, bindings) { const { value = {} } = bindings; const { zIndex, enabled } = value; el[ctx] = { enabled: !!enabled, initialized: false }; if (enabled) { z_index_manager.ensureZIndex(el, zIndex); el[ctx].initialized = true; } }, updated(el, bindings) { const { value = {} } = bindings; const { zIndex, enabled } = value; const cachedEnabled = el[ctx].enabled; if (enabled && !cachedEnabled) { z_index_manager.ensureZIndex(el, zIndex); el[ctx].initialized = true; } el[ctx].enabled = !!enabled; }, unmounted(el, bindings) { if (!el[ctx].initialized) return; const { value = {} } = bindings; const { zIndex } = value; z_index_manager.unregister(el, zIndex); } }; /* harmony default export */ var es_zindexable = (zindexable); ;// ./node_modules/vooks/es/use-merged-state.js function useMergedState(controlledStateRef, uncontrolledStateRef) { runtime_core_esm_bundler_watch(controlledStateRef, value => { if (value !== undefined) { uncontrolledStateRef.value = value; } }); return runtime_core_esm_bundler_computed(() => { if (controlledStateRef.value === undefined) { return uncontrolledStateRef.value; } return controlledStateRef.value; }); } ;// ./node_modules/vooks/es/use-compitable.js function useCompitable(reactive, keys) { // @ts-expect-error return runtime_core_esm_bundler_computed(() => { for (const key of keys) { if (reactive[key] !== undefined) return reactive[key]; } return reactive[keys[keys.length - 1]]; }); } ;// ./node_modules/seemly/es/animation/next-frame-once.js let onceCbs = []; const paramsMap = new WeakMap(); function flushOnceCallbacks() { onceCbs.forEach((cb) => cb(...paramsMap.get(cb))); onceCbs = []; } function beforeNextFrameOnce(cb, ...params) { paramsMap.set(cb, params); if (onceCbs.includes(cb)) return; onceCbs.push(cb) === 1 && requestAnimationFrame(flushOnceCallbacks); } ;// ./node_modules/evtd/es/utils.js function getEventTarget(e) { const path = e.composedPath(); return path[0]; } ;// ./node_modules/evtd/es/traps.js const traps = { mousemoveoutside: new WeakMap(), clickoutside: new WeakMap() }; function createTrapHandler(name, el, originalHandler) { if (name === 'mousemoveoutside') { const moveHandler = (e) => { if (el.contains(getEventTarget(e))) return; originalHandler(e); }; return { mousemove: moveHandler, touchstart: moveHandler }; } else if (name === 'clickoutside') { let mouseDownOutside = false; const downHandler = (e) => { mouseDownOutside = !el.contains(getEventTarget(e)); }; const upHanlder = (e) => { if (!mouseDownOutside) return; if (el.contains(getEventTarget(e))) return; originalHandler(e); }; return { mousedown: downHandler, mouseup: upHanlder, touchstart: downHandler, touchend: upHanlder }; } console.error( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions `[evtd/create-trap-handler]: name \`${name}\` is invalid. This could be a bug of evtd.`); return {}; } function ensureTrapHandlers(name, el, handler) { const handlers = traps[name]; let elHandlers = handlers.get(el); if (elHandlers === undefined) { handlers.set(el, (elHandlers = new WeakMap())); } let trapHandler = elHandlers.get(handler); if (trapHandler === undefined) { elHandlers.set(handler, (trapHandler = createTrapHandler(name, el, handler))); } return trapHandler; } function trapOn(name, el, handler, options) { if (name === 'mousemoveoutside' || name === 'clickoutside') { const trapHandlers = ensureTrapHandlers(name, el, handler); Object.keys(trapHandlers).forEach((key) => { on(key, document, trapHandlers[key], options); }); return true; } return false; } function trapOff(name, el, handler, options) { if (name === 'mousemoveoutside' || name === 'clickoutside') { const trapHandlers = ensureTrapHandlers(name, el, handler); Object.keys(trapHandlers).forEach((key) => { off(key, document, trapHandlers[key], options); }); return true; } return false; } ;// ./node_modules/evtd/es/delegate.js // currently `once` and `passive` is not supported function createDelegate() { if (typeof window === 'undefined') { return { on: () => { }, off: () => { } }; } const propagationStopped = new WeakMap(); const immediatePropagationStopped = new WeakMap(); function trackPropagation() { propagationStopped.set(this, true); } function trackImmediate() { propagationStopped.set(this, true); immediatePropagationStopped.set(this, true); } function spy(event, propName, fn) { const source = event[propName]; event[propName] = function () { fn.apply(event, arguments); return source.apply(event, arguments); }; return event; } function unspy(event, propName) { event[propName] = Event.prototype[propName]; } const currentTargets = new WeakMap(); const currentTargetDescriptor = Object.getOwnPropertyDescriptor(Event.prototype, 'currentTarget'); function getCurrentTarget() { var _a; return (_a = currentTargets.get(this)) !== null && _a !== void 0 ? _a : null; } function defineCurrentTarget(event, getter) { if (currentTargetDescriptor === undefined) return; Object.defineProperty(event, 'currentTarget', { configurable: true, enumerable: true, get: getter !== null && getter !== void 0 ? getter : currentTargetDescriptor.get }); } const phaseToTypeToElToHandlers = { bubble: {}, capture: {} }; const typeToWindowEventHandlers = {}; function createUnifiedHandler() { const delegeteHandler = function (e) { const { type, eventPhase, bubbles } = e; const target = getEventTarget(e); if (eventPhase === 2) return; const phase = eventPhase === 1 ? 'capture' : 'bubble'; let cursor = target; const path = []; // collecting bubble path while (true) { if (cursor === null) cursor = window; path.push(cursor); if (cursor === window) { break; } // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions cursor = (cursor.parentNode || null); } const captureElToHandlers = phaseToTypeToElToHandlers.capture[type]; const bubbleElToHandlers = phaseToTypeToElToHandlers.bubble[type]; spy(e, 'stopPropagation', trackPropagation); spy(e, 'stopImmediatePropagation', trackImmediate); defineCurrentTarget(e, getCurrentTarget); if (phase === 'capture') { if (captureElToHandlers === undefined) return; // capture for (let i = path.length - 1; i >= 0; --i) { if (propagationStopped.has(e)) break; const target = path[i]; const handlers = captureElToHandlers.get(target); if (handlers !== undefined) { currentTargets.set(e, target); for (const handler of handlers) { if (immediatePropagationStopped.has(e)) break; handler(e); } } if (i === 0 && !bubbles && bubbleElToHandlers !== undefined) { const bubbleHandlers = bubbleElToHandlers.get(target); if (bubbleHandlers !== undefined) { for (const handler of bubbleHandlers) { if (immediatePropagationStopped.has(e)) break; handler(e); } } } } } else if (phase === 'bubble') { if (bubbleElToHandlers === undefined) return; // bubble for (let i = 0; i < path.length; ++i) { if (propagationStopped.has(e)) break; const target = path[i]; const handlers = bubbleElToHandlers.get(target); if (handlers !== undefined) { currentTargets.set(e, target); for (const handler of handlers) { if (immediatePropagationStopped.has(e)) break; handler(e); } } } } unspy(e, 'stopPropagation'); unspy(e, 'stopImmediatePropagation'); defineCurrentTarget(e); }; delegeteHandler.displayName = 'evtdUnifiedHandler'; return delegeteHandler; } function createUnifiedWindowEventHandler() { const delegateHandler = function (e) { const { type, eventPhase } = e; if (eventPhase !== 2) return; const handlers = typeToWindowEventHandlers[type]; if (handlers === undefined) return; handlers.forEach((handler) => handler(e)); }; delegateHandler.displayName = 'evtdUnifiedWindowEventHandler'; return delegateHandler; } const unifiedHandler = createUnifiedHandler(); const unfiendWindowEventHandler = createUnifiedWindowEventHandler(); function ensureElToHandlers(phase, type) { const phaseHandlers = phaseToTypeToElToHandlers[phase]; if (phaseHandlers[type] === undefined) { phaseHandlers[type] = new Map(); window.addEventListener(type, unifiedHandler, phase === 'capture'); } return phaseHandlers[type]; } function ensureWindowEventHandlers(type) { const windowEventHandlers = typeToWindowEventHandlers[type]; if (windowEventHandlers === undefined) { typeToWindowEventHandlers[type] = new Set(); window.addEventListener(type, unfiendWindowEventHandler); } return typeToWindowEventHandlers[type]; } function ensureHandlers(elToHandlers, el) { let elHandlers = elToHandlers.get(el); if (elHandlers === undefined) { elToHandlers.set(el, (elHandlers = new Set())); } return elHandlers; } function handlerExist(el, phase, type, handler) { const elToHandlers = phaseToTypeToElToHandlers[phase][type]; // phase ${type} event has handlers if (elToHandlers !== undefined) { const handlers = elToHandlers.get(el); // phase using el with ${type} event has handlers if (handlers !== undefined) { if (handlers.has(handler)) return true; } } return false; } function windowEventHandlerExist(type, handler) { const handlers = typeToWindowEventHandlers[type]; if (handlers !== undefined) { if (handlers.has(handler)) { return true; } } return false; } function on(type, el, handler, options) { let mergedHandler; if (typeof options === 'object' && options.once === true) { mergedHandler = (e) => { off(type, el, mergedHandler, options); handler(e); }; } else { mergedHandler = handler; } const trapped = trapOn(type, el, mergedHandler, options); if (trapped) return; const phase = options === true || (typeof options === 'object' && options.capture === true) ? 'capture' : 'bubble'; const elToHandlers = ensureElToHandlers(phase, type); const handlers = ensureHandlers(elToHandlers, el); if (!handlers.has(mergedHandler)) handlers.add(mergedHandler); if (el === window) { const windowEventHandlers = ensureWindowEventHandlers(type); if (!windowEventHandlers.has(mergedHandler)) { windowEventHandlers.add(mergedHandler); } } } function off(type, el, handler, options) { const trapped = trapOff(type, el, handler, options); if (trapped) return; const capture = options === true || (typeof options === 'object' && options.capture === true); const phase = capture ? 'capture' : 'bubble'; const elToHandlers = ensureElToHandlers(phase, type); const handlers = ensureHandlers(elToHandlers, el); if (el === window) { const mirrorPhase = capture ? 'bubble' : 'capture'; if (!handlerExist(el, mirrorPhase, type, handler) && windowEventHandlerExist(type, handler)) { // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const windowEventHandlers = typeToWindowEventHandlers[type]; windowEventHandlers.delete(handler); if (windowEventHandlers.size === 0) { window.removeEventListener(type, unfiendWindowEventHandler); typeToWindowEventHandlers[type] = undefined; } } } if (handlers.has(handler)) handlers.delete(handler); if (handlers.size === 0) { elToHandlers.delete(el); } if (elToHandlers.size === 0) { window.removeEventListener(type, unifiedHandler, phase === 'capture'); phaseToTypeToElToHandlers[phase][type] = undefined; } } return { on: on, off: off }; } const { on, off } = createDelegate(); ;// ./node_modules/vueuc/es/shared/v-node.js function v_node_getSlot(scope, slots, slotName = 'default') { const slot = slots[slotName]; if (slot === undefined) { throw new Error(`[vueuc/${scope}]: slot[${slotName}] is empty.`); } return slot(); } // o(n) flatten function v_node_flatten(vNodes, filterCommentNode = true, result = []) { vNodes.forEach((vNode) => { if (vNode === null) return; if (typeof vNode !== 'object') { if (typeof vNode === 'string' || typeof vNode === 'number') { result.push(createTextVNode(String(vNode))); } return; } if (Array.isArray(vNode)) { v_node_flatten(vNode, filterCommentNode, result); return; } if (vNode.type === Fragment) { if (vNode.children === null) return; if (Array.isArray(vNode.children)) { v_node_flatten(vNode.children, filterCommentNode, result); } // rawSlot } else if (vNode.type !== Comment) { result.push(vNode); } }); return result; } function getFirstVNode(scope, slots, slotName = 'default') { const slot = slots[slotName]; if (slot === undefined) { throw new Error(`[vueuc/${scope}]: slot[${slotName}] is empty.`); } const content = v_node_flatten(slot()); // vue will normalize the slot, so slot must be an array if (content.length === 1) { return content[0]; } else { throw new Error(`[vueuc/${scope}]: slot[${slotName}] should have exactly one child.`); } } ;// ./node_modules/vueuc/es/binder/src/utils.js let viewMeasurer = null; function ensureViewBoundingRect() { if (viewMeasurer === null) { viewMeasurer = document.getElementById('v-binder-view-measurer'); if (viewMeasurer === null) { viewMeasurer = document.createElement('div'); viewMeasurer.id = 'v-binder-view-measurer'; const { style } = viewMeasurer; style.position = 'fixed'; style.left = '0'; style.right = '0'; style.top = '0'; style.bottom = '0'; style.pointerEvents = 'none'; style.visibility = 'hidden'; document.body.appendChild(viewMeasurer); } } return viewMeasurer.getBoundingClientRect(); } function getPointRect(x, y) { const viewRect = ensureViewBoundingRect(); return { top: y, left: x, height: 0, width: 0, right: viewRect.width - x, bottom: viewRect.height - y }; } function getRect(el) { const elRect = el.getBoundingClientRect(); const viewRect = ensureViewBoundingRect(); return { left: elRect.left - viewRect.left, top: elRect.top - viewRect.top, bottom: viewRect.height + viewRect.top - elRect.bottom, right: viewRect.width + viewRect.left - elRect.right, width: elRect.width, height: elRect.height }; } function getParentNode(node) { // document type if (node.nodeType === 9) { return null; } return node.parentNode; } function getScrollParent(node) { if (node === null) return null; const parentNode = getParentNode(node); if (parentNode === null) { return null; } // Document if (parentNode.nodeType === 9) { return document; } // Element if (parentNode.nodeType === 1) { // Firefox want us to check `-x` and `-y` variations as well const { overflow, overflowX, overflowY } = getComputedStyle(parentNode); if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { return parentNode; } } return getScrollParent(parentNode); } ;// ./node_modules/vueuc/es/binder/src/Binder.js /* eslint-disable @typescript-eslint/no-non-null-assertion */ const Binder = defineComponent({ name: 'Binder', props: { syncTargetWithParent: Boolean, syncTarget: { type: Boolean, default: true } }, setup(props) { var _a; provide('VBinder', (_a = runtime_core_esm_bundler_getCurrentInstance()) === null || _a === void 0 ? void 0 : _a.proxy); const VBinder = runtime_core_esm_bundler_inject('VBinder', null); const targetRef = ref(null); /** * If there's no nested vbinder, we can simply set the target ref. * * However, when it comes to: * <- syncTarget = false * * Should hold target DOM ref, but can't get it directly from * its VTarget. So if there are nested VBinder, we should: * 1. Stop setting target DOM from level-1 VTarget * 2. Set target DOM from level-2 VTarget * For (1), we need `syncTarget` to `false` * For (2), we need to set `syncTargetWithParent` to `true` on * level-2 VBinder * * <- syncTargetWithParent = true * target * * * content1 * * * * content2 * * */ const setTargetRef = (el) => { targetRef.value = el; // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (VBinder && props.syncTargetWithParent) { VBinder.setTargetRef(el); } }; // scroll related let scrollableNodes = []; const ensureScrollListener = () => { let cursor = targetRef.value; while (true) { cursor = getScrollParent(cursor); if (cursor === null) break; scrollableNodes.push(cursor); } for (const el of scrollableNodes) { on('scroll', el, onScroll, true); } }; const removeScrollListeners = () => { for (const el of scrollableNodes) { off('scroll', el, onScroll, true); } scrollableNodes = []; }; const followerScrollListeners = new Set(); const addScrollListener = (listener) => { if (followerScrollListeners.size === 0) { ensureScrollListener(); } if (!followerScrollListeners.has(listener)) { followerScrollListeners.add(listener); } }; const removeScrollListener = (listener) => { if (followerScrollListeners.has(listener)) { followerScrollListeners.delete(listener); } if (followerScrollListeners.size === 0) { removeScrollListeners(); } }; const onScroll = () => { beforeNextFrameOnce(onScrollRaf); }; const onScrollRaf = () => { followerScrollListeners.forEach((listener) => listener()); }; // resize related const followerResizeListeners = new Set(); const addResizeListener = (listener) => { if (followerResizeListeners.size === 0) { on('resize', window, onResize); } if (!followerResizeListeners.has(listener)) { followerResizeListeners.add(listener); } }; const removeResizeListener = (listener) => { if (followerResizeListeners.has(listener)) { followerResizeListeners.delete(listener); } if (followerResizeListeners.size === 0) { off('resize', window, onResize); } }; const onResize = () => { followerResizeListeners.forEach((listener) => listener()); }; runtime_core_esm_bundler_onBeforeUnmount(() => { off('resize', window, onResize); removeScrollListeners(); }); return { targetRef, setTargetRef, addScrollListener, removeScrollListener, addResizeListener, removeResizeListener }; }, render() { return v_node_getSlot('binder', this.$slots); } }); /* harmony default export */ var src_Binder = (Binder); ;// ./node_modules/vueuc/es/binder/src/Target.js /* eslint-disable @typescript-eslint/no-non-null-assertion */ /* harmony default export */ var Target = (defineComponent({ name: 'Target', setup() { const { setTargetRef, syncTarget } = runtime_core_esm_bundler_inject('VBinder'); const setTargetDirective = { mounted: setTargetRef, updated: setTargetRef }; return { syncTarget, setTargetDirective }; }, render() { const { syncTarget, setTargetDirective } = this; /** * If you are using VBinder as a child of VBinder, the children wouldn't be * a valid DOM or component that can be attached to by directive. * So we won't sync target on those kind of situation and control the * target sync logic manually. */ if (syncTarget) { return withDirectives(getFirstVNode('follower', this.$slots), [ [setTargetDirective] ]); } return getFirstVNode('follower', this.$slots); } })); ;// ./node_modules/naive-ui/es/_internal/select-menu/src/interface.mjs const internalSelectionMenuInjectionKey = createInjectionKey('n-internal-select-menu'); const internalSelectionMenuBodyInjectionKey = createInjectionKey('n-internal-select-menu-body'); ;// ./node_modules/naive-ui/es/drawer/src/interface.mjs const drawerBodyInjectionKey = createInjectionKey('n-drawer-body'); const drawerInjectionKey = createInjectionKey('n-drawer'); ;// ./node_modules/naive-ui/es/modal/src/interface.mjs const modalBodyInjectionKey = createInjectionKey('n-modal-body'); const modalProviderInjectionKey = createInjectionKey('n-modal-provider'); const modalInjectionKey = createInjectionKey('n-modal'); ;// ./node_modules/naive-ui/es/popover/src/interface.mjs const popoverBodyInjectionKey = createInjectionKey('n-popover-body'); ;// ./node_modules/naive-ui/es/_utils/composable/use-adjusted-to.mjs const teleportDisabled = '__disabled__'; function useAdjustedTo(props) { const modal = runtime_core_esm_bundler_inject(modalBodyInjectionKey, null); const drawer = runtime_core_esm_bundler_inject(drawerBodyInjectionKey, null); const popover = runtime_core_esm_bundler_inject(popoverBodyInjectionKey, null); const selectMenu = runtime_core_esm_bundler_inject(internalSelectionMenuBodyInjectionKey, null); const fullscreenElementRef = ref(); if (typeof document !== 'undefined') { fullscreenElementRef.value = document.fullscreenElement; const handleFullscreenChange = () => { fullscreenElementRef.value = document.fullscreenElement; }; runtime_core_esm_bundler_onMounted(() => { on('fullscreenchange', document, handleFullscreenChange); }); runtime_core_esm_bundler_onBeforeUnmount(() => { off('fullscreenchange', document, handleFullscreenChange); }); } return use_memo(() => { var _a; const { to } = props; if (to !== undefined) { if (to === false) return teleportDisabled; if (to === true) return fullscreenElementRef.value || 'body'; return to; } if (modal === null || modal === void 0 ? void 0 : modal.value) { return (_a = modal.value.$el) !== null && _a !== void 0 ? _a : modal.value; } if (drawer === null || drawer === void 0 ? void 0 : drawer.value) return drawer.value; if (popover === null || popover === void 0 ? void 0 : popover.value) return popover.value; if (selectMenu === null || selectMenu === void 0 ? void 0 : selectMenu.value) return selectMenu.value; return to !== null && to !== void 0 ? to : fullscreenElementRef.value || 'body'; }); } // teleport disabled key useAdjustedTo.tdkey = teleportDisabled; useAdjustedTo.propTo = { type: [String, Object, Boolean], default: undefined }; ;// ./node_modules/naive-ui/es/_utils/vue/get-first-slot-vnode.mjs function getFirstSlotVNode(slots, slotName = 'default', props = undefined) { const slot = slots[slotName]; if (!slot) { warn_warn('getFirstSlotVNode', `slot[${slotName}] is empty`); return null; } const slotContent = flatten_flatten(slot(props)); // vue will normalize the slot, so slot must be an array if (slotContent.length === 1) { return slotContent[0]; } else { warn_warn('getFirstSlotVNode', `slot[${slotName}] should have exactly one child`); return null; } } function getFirstSlotVNodeWithTypedProps(slotName, slot, props) { if (!slot) { return null; } const slotContent = flatten(slot(props)); // vue will normalize the slot, so slot must be an array if (slotContent.length === 1) { return slotContent[0]; } else { warn('getFirstSlotVNode', `slot[${slotName}] should have exactly one child`); return null; } } ;// ./node_modules/naive-ui/es/_utils/vue/keep.mjs function keep(object, keys = [], rest) { const keepedObject = {}; keys.forEach(key => { keepedObject[key] = object[key]; }); return Object.assign(keepedObject, rest); } ;// ./node_modules/seemly/es/dom/get-precise-event-target.js function getPreciseEventTarget(event) { return event.composedPath()[0] || null; } ;// ./node_modules/vdirs/es/clickoutside.js const ctxKey = '@@coContext'; const clickoutside = { mounted(el, { value, modifiers }) { el[ctxKey] = { handler: undefined }; if (typeof value === 'function') { el[ctxKey].handler = value; on('clickoutside', el, value, { capture: modifiers.capture }); } }, updated(el, { value, modifiers }) { const ctx = el[ctxKey]; if (typeof value === 'function') { if (ctx.handler) { if (ctx.handler !== value) { off('clickoutside', el, ctx.handler, { capture: modifiers.capture }); ctx.handler = value; on('clickoutside', el, value, { capture: modifiers.capture }); } } else { el[ctxKey].handler = value; on('clickoutside', el, value, { capture: modifiers.capture }); } } else { if (ctx.handler) { off('clickoutside', el, ctx.handler, { capture: modifiers.capture }); ctx.handler = undefined; } } }, unmounted(el, { modifiers }) { const { handler } = el[ctxKey]; if (handler) { off('clickoutside', el, handler, { capture: modifiers.capture }); } el[ctxKey].handler = undefined; } }; /* harmony default export */ var es_clickoutside = (clickoutside); ;// ./node_modules/vdirs/es/mousemoveoutside.js const mousemoveoutside_ctxKey = '@@mmoContext'; const mousemoveoutside = { mounted(el, { value }) { el[mousemoveoutside_ctxKey] = { handler: undefined }; if (typeof value === 'function') { el[mousemoveoutside_ctxKey].handler = value; on('mousemoveoutside', el, value); } }, updated(el, { value }) { const ctx = el[mousemoveoutside_ctxKey]; if (typeof value === 'function') { if (ctx.handler) { if (ctx.handler !== value) { off('mousemoveoutside', el, ctx.handler); ctx.handler = value; on('mousemoveoutside', el, value); } } else { el[mousemoveoutside_ctxKey].handler = value; on('mousemoveoutside', el, value); } } else { if (ctx.handler) { off('mousemoveoutside', el, ctx.handler); ctx.handler = undefined; } } }, unmounted(el) { const { handler } = el[mousemoveoutside_ctxKey]; if (handler) { off('mousemoveoutside', el, handler); } el[mousemoveoutside_ctxKey].handler = undefined; } }; /* harmony default export */ var es_mousemoveoutside = (mousemoveoutside); ;// ./node_modules/seemly/es/misc/index.js function createId(length = 8) { return Math.random() .toString(16) .slice(2, 2 + length); } function repeat(count, v) { const ret = []; for (let i = 0; i < count; ++i) { ret.push(v); } return ret; } function indexMap(count, createValue) { const ret = []; if (!createValue) { for (let i = 0; i < count; ++i) { ret.push(i); } return ret; } for (let i = 0; i < count; ++i) { ret.push(createValue(i)); } return ret; } async function sleep(ms) { return new Promise(resolve => { setTimeout(resolve, ms); }); } ;// ./node_modules/vueuc/es/focus-trap/src/utils.js /* eslint-disable @typescript-eslint/strict-boolean-expressions */ // ref https://www.w3.org/TR/wai-aria-practices-1.1/examples/dialog-modal/js/dialog.js function isHTMLElement(node) { return node instanceof HTMLElement; } function focusFirstDescendant(node) { for (let i = 0; i < node.childNodes.length; i++) { const child = node.childNodes[i]; if (isHTMLElement(child)) { if (attemptFocus(child) || focusFirstDescendant(child)) { return true; } } } return false; } function focusLastDescendant(element) { for (let i = element.childNodes.length - 1; i >= 0; i--) { const child = element.childNodes[i]; if (isHTMLElement(child)) { if (attemptFocus(child) || focusLastDescendant(child)) { return true; } } } return false; } function attemptFocus(element) { if (!isFocusable(element)) { return false; } try { element.focus({ preventScroll: true }); } catch (e) { } return document.activeElement === element; } function isFocusable(element) { if (element.tabIndex > 0 || (element.tabIndex === 0 && element.getAttribute('tabIndex') !== null)) { return true; } if (element.getAttribute('disabled')) { return false; } switch (element.nodeName) { case 'A': return (!!element.href && element.rel !== 'ignore'); case 'INPUT': return (element.type !== 'hidden' && element.type !== 'file'); case 'BUTTON': case 'SELECT': case 'TEXTAREA': return true; default: return false; } } ;// ./node_modules/vueuc/es/shared/resolve-to.js function resolveTo(selector) { if (typeof selector === 'string') { return document.querySelector(selector); } return selector(); } ;// ./node_modules/vueuc/es/focus-trap/src/index.js let src_stack = []; const FocusTrap = defineComponent({ name: 'FocusTrap', props: { disabled: Boolean, active: Boolean, autoFocus: { type: Boolean, default: true }, onEsc: Function, initialFocusTo: String, finalFocusTo: String, returnFocusOnDeactivated: { type: Boolean, default: true } }, setup(props) { const id = createId(); const focusableStartRef = ref(null); const focusableEndRef = ref(null); let activated = false; let ignoreInternalFocusChange = false; const lastFocusedElement = typeof document === 'undefined' ? null : document.activeElement; function isCurrentActive() { const currentActiveId = src_stack[src_stack.length - 1]; return currentActiveId === id; } function handleDocumentKeydown(e) { var _a; if (e.code === 'Escape') { if (isCurrentActive()) { (_a = props.onEsc) === null || _a === void 0 ? void 0 : _a.call(props, e); } } } runtime_core_esm_bundler_onMounted(() => { runtime_core_esm_bundler_watch(() => props.active, (value) => { if (value) { activate(); on('keydown', document, handleDocumentKeydown); } else { off('keydown', document, handleDocumentKeydown); if (activated) { deactivate(); } } }, { immediate: true }); }); runtime_core_esm_bundler_onBeforeUnmount(() => { off('keydown', document, handleDocumentKeydown); if (activated) deactivate(); }); function handleDocumentFocus(e) { if (ignoreInternalFocusChange) return; if (isCurrentActive()) { const mainEl = getMainEl(); if (mainEl === null) return; if (mainEl.contains(getPreciseEventTarget(e))) return; // I don't handle shift + tab status since it's too tricky to handle // Not impossible but I need to sleep resetFocusTo('first'); } } function getMainEl() { const focusableStartEl = focusableStartRef.value; if (focusableStartEl === null) return null; let mainEl = focusableStartEl; while (true) { mainEl = mainEl.nextSibling; if (mainEl === null) break; if (mainEl instanceof Element && mainEl.tagName === 'DIV') { break; } } return mainEl; } function activate() { var _a; if (props.disabled) return; src_stack.push(id); if (props.autoFocus) { const { initialFocusTo } = props; if (initialFocusTo === undefined) { resetFocusTo('first'); } else { (_a = resolveTo(initialFocusTo)) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }); } } activated = true; document.addEventListener('focus', handleDocumentFocus, true); } function deactivate() { var _a; if (props.disabled) return; document.removeEventListener('focus', handleDocumentFocus, true); src_stack = src_stack.filter((idInStack) => idInStack !== id); if (isCurrentActive()) return; const { finalFocusTo } = props; if (finalFocusTo !== undefined) { (_a = resolveTo(finalFocusTo)) === null || _a === void 0 ? void 0 : _a.focus({ preventScroll: true }); } else if (props.returnFocusOnDeactivated) { if (lastFocusedElement instanceof HTMLElement) { ignoreInternalFocusChange = true; lastFocusedElement.focus({ preventScroll: true }); ignoreInternalFocusChange = false; } } } function resetFocusTo(target) { if (!isCurrentActive()) return; if (props.active) { const focusableStartEl = focusableStartRef.value; const focusableEndEl = focusableEndRef.value; if (focusableStartEl !== null && focusableEndEl !== null) { const mainEl = getMainEl(); if (mainEl == null || mainEl === focusableEndEl) { ignoreInternalFocusChange = true; focusableStartEl.focus({ preventScroll: true }); ignoreInternalFocusChange = false; return; } ignoreInternalFocusChange = true; const focused = target === 'first' ? focusFirstDescendant(mainEl) : focusLastDescendant(mainEl); ignoreInternalFocusChange = false; if (!focused) { ignoreInternalFocusChange = true; focusableStartEl.focus({ preventScroll: true }); ignoreInternalFocusChange = false; } } } } function handleStartFocus(e) { if (ignoreInternalFocusChange) return; const mainEl = getMainEl(); if (mainEl === null) return; if (e.relatedTarget !== null && mainEl.contains(e.relatedTarget)) { // if it comes from inner, focus last resetFocusTo('last'); } else { // otherwise focus first resetFocusTo('first'); } } function handleEndFocus(e) { if (ignoreInternalFocusChange) return; if (e.relatedTarget !== null && e.relatedTarget === focusableStartRef.value) { // if it comes from first, focus last resetFocusTo('last'); } else { // otherwise focus first resetFocusTo('first'); } } return { focusableStartRef, focusableEndRef, focusableStyle: 'position: absolute; height: 0; width: 0;', handleStartFocus, handleEndFocus }; }, render() { const { default: defaultSlot } = this.$slots; if (defaultSlot === undefined) return null; if (this.disabled) return defaultSlot(); const { active, focusableStyle } = this; return h(Fragment, null, [ h('div', { 'aria-hidden': 'true', tabindex: active ? '0' : '-1', ref: 'focusableStartRef', style: focusableStyle, onFocus: this.handleStartFocus }), defaultSlot(), h('div', { 'aria-hidden': 'true', style: focusableStyle, ref: 'focusableEndRef', tabindex: active ? '0' : '-1', onFocus: this.handleEndFocus }) ]); } }); ;// ./node_modules/vooks/es/utils.js function hasInstance() { return getCurrentInstance() !== null; } const utils_isBrowser = typeof window !== 'undefined'; ;// ./node_modules/vooks/es/on-fonts-ready.js let fontsReady; let isFontReady; const init = () => { var _a, _b; fontsReady = utils_isBrowser ? (_b = (_a = document) === null || _a === void 0 ? void 0 : _a.fonts) === null || _b === void 0 ? void 0 : _b.ready : undefined; isFontReady = false; /* istanbul ignore if */ if (fontsReady !== undefined) { void fontsReady.then(() => { isFontReady = true; }); } else { isFontReady = true; } }; init(); // For testing /** * Call callback on fontsReady is resolved. If fontsReady is already resolved, * callback won't be called. */ function onFontsReady(cb) { /* istanbul ignore next */ if (isFontReady) return; let deactivated = false; runtime_core_esm_bundler_onMounted(() => { /* istanbul ignore next */ if (!isFontReady) { fontsReady === null || fontsReady === void 0 ? void 0 : fontsReady.then(() => { if (deactivated) return; cb(); }); } }); runtime_core_esm_bundler_onBeforeUnmount(() => { deactivated = true; }); } ;// ./node_modules/vueuc/es/shared/cssr.js const { c: shared_cssr_c } = CssRender(); const cssr_cssrAnchorMetaName = 'vueuc-style'; ;// ./node_modules/vooks/es/use-false-until-truthy.js function useFalseUntilTruthy(originalRef) { const currentRef = ref(!!originalRef.value); if (currentRef.value) return readonly(currentRef); const stop = runtime_core_esm_bundler_watch(originalRef, (value) => { if (value) { currentRef.value = true; stop(); } }); return readonly(currentRef); } ;// ./node_modules/vueuc/es/lazy-teleport/src/index.js /* harmony default export */ var src = (defineComponent({ name: 'LazyTeleport', props: { to: { type: [String, Object], default: undefined }, disabled: Boolean, show: { type: Boolean, required: true } }, setup(props) { return { showTeleport: useFalseUntilTruthy(toRef(props, 'show')), mergedTo: runtime_core_esm_bundler_computed(() => { const { to } = props; return to !== null && to !== void 0 ? to : 'body'; }) }; }, render() { return this.showTeleport ? this.disabled ? v_node_getSlot('lazy-teleport', this.$slots) : h(Teleport, { disabled: this.disabled, to: this.mergedTo }, v_node_getSlot('lazy-teleport', this.$slots)) : null; } })); ;// ./node_modules/vueuc/es/binder/src/get-placement-style.js const oppositionPositions = { top: 'bottom', bottom: 'top', left: 'right', right: 'left' }; const oppositeAligns = { start: 'end', center: 'center', end: 'start' }; const propToCompare = { top: 'height', bottom: 'height', left: 'width', right: 'width' }; const transformOrigins = { 'bottom-start': 'top left', bottom: 'top center', 'bottom-end': 'top right', 'top-start': 'bottom left', top: 'bottom center', 'top-end': 'bottom right', 'right-start': 'top left', right: 'center left', 'right-end': 'bottom left', 'left-start': 'top right', left: 'center right', 'left-end': 'bottom right' }; const overlapTransformOrigin = { 'bottom-start': 'bottom left', bottom: 'bottom center', 'bottom-end': 'bottom right', 'top-start': 'top left', top: 'top center', 'top-end': 'top right', 'right-start': 'top right', right: 'center right', 'right-end': 'bottom right', 'left-start': 'top left', left: 'center left', 'left-end': 'bottom left' }; const oppositeAlignCssPositionProps = { 'bottom-start': 'right', 'bottom-end': 'left', 'top-start': 'right', 'top-end': 'left', 'right-start': 'bottom', 'right-end': 'top', 'left-start': 'bottom', 'left-end': 'top' }; const keepOffsetDirection = { top: true, bottom: false, left: true, right: false // left-- }; const cssPositionToOppositeAlign = { top: 'end', bottom: 'start', left: 'end', right: 'start' }; function getPlacementAndOffsetOfFollower(placement, targetRect, followerRect, shift, flip, overlap) { if (!flip || overlap) { return { placement: placement, top: 0, left: 0 }; } const [position, align] = placement.split('-'); let properAlign = align !== null && align !== void 0 ? align : 'center'; let properOffset = { top: 0, left: 0 }; const deriveOffset = (oppositeAlignCssSizeProp, alignCssPositionProp, offsetVertically) => { let left = 0; let top = 0; const diff = followerRect[oppositeAlignCssSizeProp] - targetRect[alignCssPositionProp] - targetRect[oppositeAlignCssSizeProp]; if (diff > 0 && shift) { if (offsetVertically) { // screen border // |-----------------------------------------| // | | f | | // | | o | | // | | l | | // | | l |---- | // | | o |tar | | // | | w |get | | // | | e | | | // | | r |---- | // | ---- | // |-----------------------------------------| top = keepOffsetDirection[alignCssPositionProp] ? diff : -diff; } else { // screen border // |----------------------------------------| // | | // | ---------- | // | | target | | // | ---------------------------------- // | | follower | // | ---------------------------------- // | | // |----------------------------------------| left = keepOffsetDirection[alignCssPositionProp] ? diff : -diff; } } return { left, top }; }; const offsetVertically = position === 'left' || position === 'right'; // choose proper placement for non-center align if (properAlign !== 'center') { const oppositeAlignCssPositionProp = oppositeAlignCssPositionProps[placement]; const currentAlignCssPositionProp = oppositionPositions[oppositeAlignCssPositionProp]; const oppositeAlignCssSizeProp = propToCompare[oppositeAlignCssPositionProp]; // if follower rect is larger than target rect in align direction // ----------[ target ]---------| // ----------[ follower ] if (followerRect[oppositeAlignCssSizeProp] > targetRect[oppositeAlignCssSizeProp]) { if ( // current space is not enough // ----------[ target ]---------| // -------[ follower ] targetRect[oppositeAlignCssPositionProp] + targetRect[oppositeAlignCssSizeProp] < followerRect[oppositeAlignCssSizeProp]) { const followerOverTargetSize = (followerRect[oppositeAlignCssSizeProp] - targetRect[oppositeAlignCssSizeProp]) / 2; if (targetRect[oppositeAlignCssPositionProp] < followerOverTargetSize || targetRect[currentAlignCssPositionProp] < followerOverTargetSize) { // opposite align has larger space // -------[ target ]-----------| // -------[ follower ]-| if (targetRect[oppositeAlignCssPositionProp] < targetRect[currentAlignCssPositionProp]) { properAlign = oppositeAligns[align]; properOffset = deriveOffset(oppositeAlignCssSizeProp, currentAlignCssPositionProp, offsetVertically); } else { // ----------------[ target ]----| // --------[ follower ]----| properOffset = deriveOffset(oppositeAlignCssSizeProp, oppositeAlignCssPositionProp, offsetVertically); } } else { // 'center' align is better // ------------[ target ]--------| // -------[ follower ]--| properAlign = 'center'; } } } else if (followerRect[oppositeAlignCssSizeProp] < targetRect[oppositeAlignCssSizeProp]) { // TODO: maybe center is better if (targetRect[currentAlignCssPositionProp] < 0 && // opposite align has larger space // ------------[ target ] // ----------------[follower] targetRect[oppositeAlignCssPositionProp] > targetRect[currentAlignCssPositionProp]) { properAlign = oppositeAligns[align]; } } } else { const possibleAlternativeAlignCssPositionProp1 = position === 'bottom' || position === 'top' ? 'left' : 'top'; const possibleAlternativeAlignCssPositionProp2 = oppositionPositions[possibleAlternativeAlignCssPositionProp1]; const alternativeAlignCssSizeProp = propToCompare[possibleAlternativeAlignCssPositionProp1]; const followerOverTargetSize = (followerRect[alternativeAlignCssSizeProp] - targetRect[alternativeAlignCssSizeProp]) / 2; if ( // center is not enough // ----------- [ target ]--| // -------[ follower ] targetRect[possibleAlternativeAlignCssPositionProp1] < followerOverTargetSize || targetRect[possibleAlternativeAlignCssPositionProp2] < followerOverTargetSize) { // alternative 2 position's space is larger if (targetRect[possibleAlternativeAlignCssPositionProp1] > targetRect[possibleAlternativeAlignCssPositionProp2]) { properAlign = cssPositionToOppositeAlign[possibleAlternativeAlignCssPositionProp1]; properOffset = deriveOffset(alternativeAlignCssSizeProp, possibleAlternativeAlignCssPositionProp1, offsetVertically); } else { // alternative 1 position's space is larger properAlign = cssPositionToOppositeAlign[possibleAlternativeAlignCssPositionProp2]; properOffset = deriveOffset(alternativeAlignCssSizeProp, possibleAlternativeAlignCssPositionProp2, offsetVertically); } } } let properPosition = position; if ( // space is not enough targetRect[position] < followerRect[propToCompare[position]] && // opposite position's space is larger targetRect[position] < targetRect[oppositionPositions[position]]) { properPosition = oppositionPositions[position]; } return { placement: properAlign !== 'center' ? `${properPosition}-${properAlign}` : properPosition, left: properOffset.left, top: properOffset.top }; } function getProperTransformOrigin(placement, overlap) { if (overlap) return overlapTransformOrigin[placement]; return transformOrigins[placement]; } // ------------ // | offset | // | | // | [target] | // | | // ------------ // TODO: refactor it to remove dup logic function getOffset(placement, offsetRect, targetRect, offsetTopToStandardPlacement, offsetLeftToStandardPlacement, overlap) { if (overlap) { switch (placement) { case 'bottom-start': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`, left: `${Math.round(targetRect.left - offsetRect.left)}px`, transform: 'translateY(-100%)' }; case 'bottom-end': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`, transform: 'translateX(-100%) translateY(-100%)' }; case 'top-start': return { top: `${Math.round(targetRect.top - offsetRect.top)}px`, left: `${Math.round(targetRect.left - offsetRect.left)}px`, transform: '' }; case 'top-end': return { top: `${Math.round(targetRect.top - offsetRect.top)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`, transform: 'translateX(-100%)' }; case 'right-start': return { top: `${Math.round(targetRect.top - offsetRect.top)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`, transform: 'translateX(-100%)' }; case 'right-end': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`, transform: 'translateX(-100%) translateY(-100%)' }; case 'left-start': return { top: `${Math.round(targetRect.top - offsetRect.top)}px`, left: `${Math.round(targetRect.left - offsetRect.left)}px`, transform: '' }; case 'left-end': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`, left: `${Math.round(targetRect.left - offsetRect.left)}px`, transform: 'translateY(-100%)' }; case 'top': return { top: `${Math.round(targetRect.top - offsetRect.top)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width / 2)}px`, transform: 'translateX(-50%)' }; case 'right': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height / 2)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width)}px`, transform: 'translateX(-100%) translateY(-50%)' }; case 'left': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height / 2)}px`, left: `${Math.round(targetRect.left - offsetRect.left)}px`, transform: 'translateY(-50%)' }; case 'bottom': default: return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width / 2)}px`, transform: 'translateX(-50%) translateY(-100%)' }; } } switch (placement) { case 'bottom-start': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`, transform: '' }; case 'bottom-end': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width + offsetLeftToStandardPlacement)}px`, transform: 'translateX(-100%)' }; case 'top-start': return { top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`, transform: 'translateY(-100%)' }; case 'top-end': return { top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width + offsetLeftToStandardPlacement)}px`, transform: 'translateX(-100%) translateY(-100%)' }; case 'right-start': return { top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width + offsetLeftToStandardPlacement)}px`, transform: '' }; case 'right-end': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width + offsetLeftToStandardPlacement)}px`, transform: 'translateY(-100%)' }; case 'left-start': return { top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`, transform: 'translateX(-100%)' }; case 'left-end': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`, transform: 'translateX(-100%) translateY(-100%)' }; case 'top': return { top: `${Math.round(targetRect.top - offsetRect.top + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width / 2 + offsetLeftToStandardPlacement)}px`, transform: 'translateY(-100%) translateX(-50%)' }; case 'right': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height / 2 + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width + offsetLeftToStandardPlacement)}px`, transform: 'translateY(-50%)' }; case 'left': return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height / 2 + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + offsetLeftToStandardPlacement)}px`, transform: 'translateY(-50%) translateX(-100%)' }; case 'bottom': default: return { top: `${Math.round(targetRect.top - offsetRect.top + targetRect.height + offsetTopToStandardPlacement)}px`, left: `${Math.round(targetRect.left - offsetRect.left + targetRect.width / 2 + offsetLeftToStandardPlacement)}px`, transform: 'translateX(-50%)' }; } } ;// ./node_modules/vueuc/es/binder/src/Follower.js /* eslint-disable @typescript-eslint/no-non-null-assertion */ const style = shared_cssr_c([ shared_cssr_c('.v-binder-follower-container', { position: 'absolute', left: '0', right: '0', top: '0', height: '0', pointerEvents: 'none', zIndex: 'auto' }), shared_cssr_c('.v-binder-follower-content', { position: 'absolute', zIndex: 'auto' }, [ shared_cssr_c('> *', { pointerEvents: 'all' }) ]) ]); /* harmony default export */ var Follower = (defineComponent({ name: 'Follower', inheritAttrs: false, props: { show: Boolean, enabled: { type: Boolean, default: undefined }, placement: { type: String, default: 'bottom' }, syncTrigger: { type: Array, default: ['resize', 'scroll'] }, to: [String, Object], flip: { type: Boolean, default: true }, internalShift: Boolean, x: Number, y: Number, width: String, minWidth: String, containerClass: String, teleportDisabled: Boolean, zindexable: { type: Boolean, default: true }, zIndex: Number, overlap: Boolean }, setup(props) { const VBinder = runtime_core_esm_bundler_inject('VBinder'); const mergedEnabledRef = use_memo(() => { return props.enabled !== undefined ? props.enabled : props.show; }); const followerRef = ref(null); const offsetContainerRef = ref(null); const ensureListeners = () => { const { syncTrigger } = props; if (syncTrigger.includes('scroll')) { VBinder.addScrollListener(syncPosition); } if (syncTrigger.includes('resize')) { VBinder.addResizeListener(syncPosition); } }; const removeListeners = () => { VBinder.removeScrollListener(syncPosition); VBinder.removeResizeListener(syncPosition); }; runtime_core_esm_bundler_onMounted(() => { if (mergedEnabledRef.value) { syncPosition(); ensureListeners(); } }); const ssrAdapter = useSsrAdapter(); style.mount({ id: 'vueuc/binder', head: true, anchorMetaName: cssr_cssrAnchorMetaName, ssr: ssrAdapter }); runtime_core_esm_bundler_onBeforeUnmount(() => { removeListeners(); }); onFontsReady(() => { if (mergedEnabledRef.value) { syncPosition(); } }); const syncPosition = () => { if (!mergedEnabledRef.value) { return; } const follower = followerRef.value; // sometimes watched props change before its dom is ready // for example: show=false, x=undefined, y=undefined // show=true, x=0, y=0 // will cause error // I may optimize the watch start point later if (follower === null) return; const target = VBinder.targetRef; const { x, y, overlap } = props; const targetRect = x !== undefined && y !== undefined ? getPointRect(x, y) : getRect(target); follower.style.setProperty('--v-target-width', `${Math.round(targetRect.width)}px`); follower.style.setProperty('--v-target-height', `${Math.round(targetRect.height)}px`); const { width, minWidth, placement, internalShift, flip } = props; follower.setAttribute('v-placement', placement); if (overlap) { follower.setAttribute('v-overlap', ''); } else { follower.removeAttribute('v-overlap'); } const { style } = follower; if (width === 'target') { style.width = `${targetRect.width}px`; } else if (width !== undefined) { style.width = width; } else { style.width = ''; } if (minWidth === 'target') { style.minWidth = `${targetRect.width}px`; } else if (minWidth !== undefined) { style.minWidth = minWidth; } else { style.minWidth = ''; } const followerRect = getRect(follower); const offsetContainerRect = getRect(offsetContainerRef.value); const { left: offsetLeftToStandardPlacement, top: offsetTopToStandardPlacement, placement: properPlacement } = getPlacementAndOffsetOfFollower(placement, targetRect, followerRect, internalShift, flip, overlap); const properTransformOrigin = getProperTransformOrigin(properPlacement, overlap); const { left, top, transform } = getOffset(properPlacement, offsetContainerRect, targetRect, offsetTopToStandardPlacement, offsetLeftToStandardPlacement, overlap); // we assume that the content size doesn't change after flip, // nor we need to make sync logic more complex follower.setAttribute('v-placement', properPlacement); follower.style.setProperty('--v-offset-left', `${Math.round(offsetLeftToStandardPlacement)}px`); follower.style.setProperty('--v-offset-top', `${Math.round(offsetTopToStandardPlacement)}px`); follower.style.transform = `translateX(${left}) translateY(${top}) ${transform}`; follower.style.setProperty('--v-transform-origin', properTransformOrigin); follower.style.transformOrigin = properTransformOrigin; }; runtime_core_esm_bundler_watch(mergedEnabledRef, (value) => { if (value) { ensureListeners(); syncOnNextTick(); } else { removeListeners(); } }); const syncOnNextTick = () => { nextTick() .then(syncPosition) .catch((e) => console.error(e)); }; [ 'placement', 'x', 'y', 'internalShift', 'flip', 'width', 'overlap', 'minWidth' ].forEach((prop) => { runtime_core_esm_bundler_watch(toRef(props, prop), syncPosition); }); ['teleportDisabled'].forEach((prop) => { runtime_core_esm_bundler_watch(toRef(props, prop), syncOnNextTick); }); runtime_core_esm_bundler_watch(toRef(props, 'syncTrigger'), (value) => { if (!value.includes('resize')) { VBinder.removeResizeListener(syncPosition); } else { VBinder.addResizeListener(syncPosition); } if (!value.includes('scroll')) { VBinder.removeScrollListener(syncPosition); } else { VBinder.addScrollListener(syncPosition); } }); const isMountedRef = isMounted(); const mergedToRef = use_memo(() => { const { to } = props; if (to !== undefined) return to; if (isMountedRef.value) { // TODO: find proper container return undefined; } return undefined; }); return { VBinder, mergedEnabled: mergedEnabledRef, offsetContainerRef, followerRef, mergedTo: mergedToRef, syncPosition }; }, render() { return h(src, { show: this.show, to: this.mergedTo, disabled: this.teleportDisabled }, { default: () => { var _a, _b; const vNode = h('div', { class: ['v-binder-follower-container', this.containerClass], ref: 'offsetContainerRef' }, [ h('div', { class: 'v-binder-follower-content', ref: 'followerRef' }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a)) ]); if (this.zindexable) { return withDirectives(vNode, [ [ es_zindexable, { enabled: this.mergedEnabled, zIndex: this.zIndex } ] ]); } return vNode; } }); } })); ;// ./node_modules/vooks/es/use-is-ios.js const isIos = (typeof window === 'undefined' ? false : /iPad|iPhone|iPod/.test(navigator.platform) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1)) && // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions !window.MSStream; function useIsIos() { return isIos; } ;// ./node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js var resizeObservers = []; ;// ./node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js var hasActiveObservations = function () { return resizeObservers.some(function (ro) { return ro.activeTargets.length > 0; }); }; ;// ./node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js var hasSkippedObservations = function () { return resizeObservers.some(function (ro) { return ro.skippedTargets.length > 0; }); }; ;// ./node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js var msg = 'ResizeObserver loop completed with undelivered notifications.'; var deliverResizeLoopError = function () { var event; if (typeof ErrorEvent === 'function') { event = new ErrorEvent('error', { message: msg }); } else { event = document.createEvent('Event'); event.initEvent('error', false, false); event.message = msg; } window.dispatchEvent(event); }; ;// ./node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js var ResizeObserverBoxOptions; (function (ResizeObserverBoxOptions) { ResizeObserverBoxOptions["BORDER_BOX"] = "border-box"; ResizeObserverBoxOptions["CONTENT_BOX"] = "content-box"; ResizeObserverBoxOptions["DEVICE_PIXEL_CONTENT_BOX"] = "device-pixel-content-box"; })(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {})); ;// ./node_modules/@juggle/resize-observer/lib/utils/freeze.js var freeze = function (obj) { return Object.freeze(obj); }; ;// ./node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js var ResizeObserverSize = (function () { function ResizeObserverSize(inlineSize, blockSize) { this.inlineSize = inlineSize; this.blockSize = blockSize; freeze(this); } return ResizeObserverSize; }()); ;// ./node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js var DOMRectReadOnly = (function () { function DOMRectReadOnly(x, y, width, height) { this.x = x; this.y = y; this.width = width; this.height = height; this.top = this.y; this.left = this.x; this.bottom = this.top + this.height; this.right = this.left + this.width; return freeze(this); } DOMRectReadOnly.prototype.toJSON = function () { var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height; return { x: x, y: y, top: top, right: right, bottom: bottom, left: left, width: width, height: height }; }; DOMRectReadOnly.fromRect = function (rectangle) { return new DOMRectReadOnly(rectangle.x, rectangle.y, rectangle.width, rectangle.height); }; return DOMRectReadOnly; }()); ;// ./node_modules/@juggle/resize-observer/lib/utils/element.js var isSVG = function (target) { return target instanceof SVGElement && 'getBBox' in target; }; var isHidden = function (target) { if (isSVG(target)) { var _a = target.getBBox(), width = _a.width, height = _a.height; return !width && !height; } var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight; return !(offsetWidth || offsetHeight || target.getClientRects().length); }; var isElement = function (obj) { var _a; if (obj instanceof Element) { return true; } var scope = (_a = obj === null || obj === void 0 ? void 0 : obj.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView; return !!(scope && obj instanceof scope.Element); }; var isReplacedElement = function (target) { switch (target.tagName) { case 'INPUT': if (target.type !== 'image') { break; } case 'VIDEO': case 'AUDIO': case 'EMBED': case 'OBJECT': case 'CANVAS': case 'IFRAME': case 'IMG': return true; } return false; }; ;// ./node_modules/@juggle/resize-observer/lib/utils/global.js var global_global = typeof window !== 'undefined' ? window : {}; ;// ./node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js var cache = new WeakMap(); var scrollRegexp = /auto|scroll/; var verticalRegexp = /^tb|vertical/; var IE = (/msie|trident/i).test(global_global.navigator && global_global.navigator.userAgent); var parseDimension = function (pixel) { return parseFloat(pixel || '0'); }; var size = function (inlineSize, blockSize, switchSizes) { if (inlineSize === void 0) { inlineSize = 0; } if (blockSize === void 0) { blockSize = 0; } if (switchSizes === void 0) { switchSizes = false; } return new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0); }; var zeroBoxes = freeze({ devicePixelContentBoxSize: size(), borderBoxSize: size(), contentBoxSize: size(), contentRect: new DOMRectReadOnly(0, 0, 0, 0) }); var calculateBoxSizes = function (target, forceRecalculation) { if (forceRecalculation === void 0) { forceRecalculation = false; } if (cache.has(target) && !forceRecalculation) { return cache.get(target); } if (isHidden(target)) { cache.set(target, zeroBoxes); return zeroBoxes; } var cs = getComputedStyle(target); var svg = isSVG(target) && target.ownerSVGElement && target.getBBox(); var removePadding = !IE && cs.boxSizing === 'border-box'; var switchSizes = verticalRegexp.test(cs.writingMode || ''); var canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || ''); var canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || ''); var paddingTop = svg ? 0 : parseDimension(cs.paddingTop); var paddingRight = svg ? 0 : parseDimension(cs.paddingRight); var paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom); var paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft); var borderTop = svg ? 0 : parseDimension(cs.borderTopWidth); var borderRight = svg ? 0 : parseDimension(cs.borderRightWidth); var borderBottom = svg ? 0 : parseDimension(cs.borderBottomWidth); var borderLeft = svg ? 0 : parseDimension(cs.borderLeftWidth); var horizontalPadding = paddingLeft + paddingRight; var verticalPadding = paddingTop + paddingBottom; var horizontalBorderArea = borderLeft + borderRight; var verticalBorderArea = borderTop + borderBottom; var horizontalScrollbarThickness = !canScrollHorizontally ? 0 : target.offsetHeight - verticalBorderArea - target.clientHeight; var verticalScrollbarThickness = !canScrollVertically ? 0 : target.offsetWidth - horizontalBorderArea - target.clientWidth; var widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0; var heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0; var contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness; var contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness; var borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea; var borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea; var boxes = freeze({ devicePixelContentBoxSize: size(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes), borderBoxSize: size(borderBoxWidth, borderBoxHeight, switchSizes), contentBoxSize: size(contentWidth, contentHeight, switchSizes), contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight) }); cache.set(target, boxes); return boxes; }; var calculateBoxSize = function (target, observedBox, forceRecalculation) { var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize; switch (observedBox) { case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX: return devicePixelContentBoxSize; case ResizeObserverBoxOptions.BORDER_BOX: return borderBoxSize; default: return contentBoxSize; } }; ;// ./node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js var ResizeObserverEntry = (function () { function ResizeObserverEntry(target) { var boxes = calculateBoxSizes(target); this.target = target; this.contentRect = boxes.contentRect; this.borderBoxSize = freeze([boxes.borderBoxSize]); this.contentBoxSize = freeze([boxes.contentBoxSize]); this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]); } return ResizeObserverEntry; }()); ;// ./node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js var calculateDepthForNode = function (node) { if (isHidden(node)) { return Infinity; } var depth = 0; var parent = node.parentNode; while (parent) { depth += 1; parent = parent.parentNode; } return depth; }; ;// ./node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js var broadcastActiveObservations = function () { var shallowestDepth = Infinity; var callbacks = []; resizeObservers.forEach(function processObserver(ro) { if (ro.activeTargets.length === 0) { return; } var entries = []; ro.activeTargets.forEach(function processTarget(ot) { var entry = new ResizeObserverEntry(ot.target); var targetDepth = calculateDepthForNode(ot.target); entries.push(entry); ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox); if (targetDepth < shallowestDepth) { shallowestDepth = targetDepth; } }); callbacks.push(function resizeObserverCallback() { ro.callback.call(ro.observer, entries, ro.observer); }); ro.activeTargets.splice(0, ro.activeTargets.length); }); for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) { var callback = callbacks_1[_i]; callback(); } return shallowestDepth; }; ;// ./node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js var gatherActiveObservationsAtDepth = function (depth) { resizeObservers.forEach(function processObserver(ro) { ro.activeTargets.splice(0, ro.activeTargets.length); ro.skippedTargets.splice(0, ro.skippedTargets.length); ro.observationTargets.forEach(function processTarget(ot) { if (ot.isActive()) { if (calculateDepthForNode(ot.target) > depth) { ro.activeTargets.push(ot); } else { ro.skippedTargets.push(ot); } } }); }); }; ;// ./node_modules/@juggle/resize-observer/lib/utils/process.js var process_process = function () { var depth = 0; gatherActiveObservationsAtDepth(depth); while (hasActiveObservations()) { depth = broadcastActiveObservations(); gatherActiveObservationsAtDepth(depth); } if (hasSkippedObservations()) { deliverResizeLoopError(); } return depth > 0; }; ;// ./node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js var queueMicroTask_trigger; var callbacks = []; var notify = function () { return callbacks.splice(0).forEach(function (cb) { return cb(); }); }; var queueMicroTask = function (callback) { if (!queueMicroTask_trigger) { var toggle_1 = 0; var el_1 = document.createTextNode(''); var config = { characterData: true }; new MutationObserver(function () { return notify(); }).observe(el_1, config); queueMicroTask_trigger = function () { el_1.textContent = "".concat(toggle_1 ? toggle_1-- : toggle_1++); }; } callbacks.push(callback); queueMicroTask_trigger(); }; ;// ./node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js var queueResizeObserver = function (cb) { queueMicroTask(function ResizeObserver() { requestAnimationFrame(cb); }); }; ;// ./node_modules/@juggle/resize-observer/lib/utils/scheduler.js var watching = 0; var isWatching = function () { return !!watching; }; var CATCH_PERIOD = 250; var observerConfig = { attributes: true, characterData: true, childList: true, subtree: true }; var events = [ 'resize', 'load', 'transitionend', 'animationend', 'animationstart', 'animationiteration', 'keyup', 'keydown', 'mouseup', 'mousedown', 'mouseover', 'mouseout', 'blur', 'focus' ]; var time = function (timeout) { if (timeout === void 0) { timeout = 0; } return Date.now() + timeout; }; var scheduled = false; var Scheduler = (function () { function Scheduler() { var _this = this; this.stopped = true; this.listener = function () { return _this.schedule(); }; } Scheduler.prototype.run = function (timeout) { var _this = this; if (timeout === void 0) { timeout = CATCH_PERIOD; } if (scheduled) { return; } scheduled = true; var until = time(timeout); queueResizeObserver(function () { var elementsHaveResized = false; try { elementsHaveResized = process_process(); } finally { scheduled = false; timeout = until - time(); if (!isWatching()) { return; } if (elementsHaveResized) { _this.run(1000); } else if (timeout > 0) { _this.run(timeout); } else { _this.start(); } } }); }; Scheduler.prototype.schedule = function () { this.stop(); this.run(); }; Scheduler.prototype.observe = function () { var _this = this; var cb = function () { return _this.observer && _this.observer.observe(document.body, observerConfig); }; document.body ? cb() : global_global.addEventListener('DOMContentLoaded', cb); }; Scheduler.prototype.start = function () { var _this = this; if (this.stopped) { this.stopped = false; this.observer = new MutationObserver(this.listener); this.observe(); events.forEach(function (name) { return global_global.addEventListener(name, _this.listener, true); }); } }; Scheduler.prototype.stop = function () { var _this = this; if (!this.stopped) { this.observer && this.observer.disconnect(); events.forEach(function (name) { return global_global.removeEventListener(name, _this.listener, true); }); this.stopped = true; } }; return Scheduler; }()); var scheduler = new Scheduler(); var updateCount = function (n) { !watching && n > 0 && scheduler.start(); watching += n; !watching && scheduler.stop(); }; ;// ./node_modules/@juggle/resize-observer/lib/ResizeObservation.js var skipNotifyOnElement = function (target) { return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === 'inline'; }; var ResizeObservation = (function () { function ResizeObservation(target, observedBox) { this.target = target; this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX; this.lastReportedSize = { inlineSize: 0, blockSize: 0 }; } ResizeObservation.prototype.isActive = function () { var size = calculateBoxSize(this.target, this.observedBox, true); if (skipNotifyOnElement(this.target)) { this.lastReportedSize = size; } if (this.lastReportedSize.inlineSize !== size.inlineSize || this.lastReportedSize.blockSize !== size.blockSize) { return true; } return false; }; return ResizeObservation; }()); ;// ./node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js var ResizeObserverDetail = (function () { function ResizeObserverDetail(resizeObserver, callback) { this.activeTargets = []; this.skippedTargets = []; this.observationTargets = []; this.observer = resizeObserver; this.callback = callback; } return ResizeObserverDetail; }()); ;// ./node_modules/@juggle/resize-observer/lib/ResizeObserverController.js var observerMap = new WeakMap(); var getObservationIndex = function (observationTargets, target) { for (var i = 0; i < observationTargets.length; i += 1) { if (observationTargets[i].target === target) { return i; } } return -1; }; var ResizeObserverController = (function () { function ResizeObserverController() { } ResizeObserverController.connect = function (resizeObserver, callback) { var detail = new ResizeObserverDetail(resizeObserver, callback); observerMap.set(resizeObserver, detail); }; ResizeObserverController.observe = function (resizeObserver, target, options) { var detail = observerMap.get(resizeObserver); var firstObservation = detail.observationTargets.length === 0; if (getObservationIndex(detail.observationTargets, target) < 0) { firstObservation && resizeObservers.push(detail); detail.observationTargets.push(new ResizeObservation(target, options && options.box)); updateCount(1); scheduler.schedule(); } }; ResizeObserverController.unobserve = function (resizeObserver, target) { var detail = observerMap.get(resizeObserver); var index = getObservationIndex(detail.observationTargets, target); var lastObservation = detail.observationTargets.length === 1; if (index >= 0) { lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1); detail.observationTargets.splice(index, 1); updateCount(-1); } }; ResizeObserverController.disconnect = function (resizeObserver) { var _this = this; var detail = observerMap.get(resizeObserver); detail.observationTargets.slice().forEach(function (ot) { return _this.unobserve(resizeObserver, ot.target); }); detail.activeTargets.splice(0, detail.activeTargets.length); }; return ResizeObserverController; }()); ;// ./node_modules/@juggle/resize-observer/lib/ResizeObserver.js var ResizeObserver = (function () { function ResizeObserver(callback) { if (arguments.length === 0) { throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present."); } if (typeof callback !== 'function') { throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function."); } ResizeObserverController.connect(this, callback); } ResizeObserver.prototype.observe = function (target, options) { if (arguments.length === 0) { throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present."); } if (!isElement(target)) { throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element"); } ResizeObserverController.observe(this, target, options); }; ResizeObserver.prototype.unobserve = function (target) { if (arguments.length === 0) { throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present."); } if (!isElement(target)) { throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element"); } ResizeObserverController.unobserve(this, target); }; ResizeObserver.prototype.disconnect = function () { ResizeObserverController.disconnect(this); }; ResizeObserver.toString = function () { return 'function ResizeObserver () { [polyfill code] }'; }; return ResizeObserver; }()); ;// ./node_modules/@juggle/resize-observer/lib/exports/resize-observer.js ;// ./node_modules/vueuc/es/resize-observer/src/delegate.js class ResizeObserverDelegate { constructor() { this.handleResize = this.handleResize.bind(this); this.observer = new ((typeof window !== 'undefined' && window.ResizeObserver) || ResizeObserver)(this.handleResize); this.elHandlersMap = new Map(); } handleResize(entries) { for (const entry of entries) { const handler = this.elHandlersMap.get(entry.target); if (handler !== undefined) { handler(entry); } } } registerHandler(el, handler) { this.elHandlersMap.set(el, handler); this.observer.observe(el); } unregisterHandler(el) { if (!this.elHandlersMap.has(el)) { return; } this.elHandlersMap.delete(el); this.observer.unobserve(el); } } /* harmony default export */ var delegate = (new ResizeObserverDelegate()); ;// ./node_modules/vueuc/es/shared/warn.js function shared_warn_warn(location, message) { console.error(`[vueuc/${location}]: ${message}`); } ;// ./node_modules/vueuc/es/resize-observer/src/VResizeObserver.js /* harmony default export */ var VResizeObserver = (defineComponent({ name: 'ResizeObserver', props: { onResize: Function }, setup(props) { let registered = false; // eslint-disable-next-line @typescript-eslint/no-non-null-assertion const proxy = runtime_core_esm_bundler_getCurrentInstance().proxy; function handleResize(entry) { const { onResize } = props; if (onResize !== undefined) onResize(entry); } runtime_core_esm_bundler_onMounted(() => { const el = proxy.$el; if (el === undefined) { shared_warn_warn('resize-observer', '$el does not exist.'); return; } if (el.nextElementSibling !== el.nextSibling) { if (el.nodeType === 3 && el.nodeValue !== '') { shared_warn_warn('resize-observer', '$el can not be observed (it may be a text node).'); return; } } if (el.nextElementSibling !== null) { delegate.registerHandler(el.nextElementSibling, handleResize); registered = true; } }); runtime_core_esm_bundler_onBeforeUnmount(() => { if (registered) { delegate.unregisterHandler(proxy.$el.nextElementSibling); } }); }, render() { return renderSlot(this.$slots, 'default'); } })); ;// ./node_modules/naive-ui/es/_utils/composable/use-reactivated.mjs function useReactivated(callback) { const isDeactivatedRef = { isDeactivated: false }; let activateStateInitialized = false; onActivated(() => { isDeactivatedRef.isDeactivated = false; if (!activateStateInitialized) { activateStateInitialized = true; return; } callback(); }); onDeactivated(() => { isDeactivatedRef.isDeactivated = true; if (!activateStateInitialized) { activateStateInitialized = true; } }); return isDeactivatedRef; } ;// ./node_modules/naive-ui/es/_utils/css/rtl-inset.mjs function rtlInset(inset) { const { left, right, top, bottom } = getMargin(inset); return `${top} ${left} ${bottom} ${right}`; } ;// ./node_modules/naive-ui/es/_utils/vue/wrapper.mjs const Wrapper = defineComponent({ render() { var _a, _b; return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a); } }); ;// ./node_modules/naive-ui/es/_internal/scrollbar/styles/common.mjs const commonVars = { railInsetHorizontalBottom: 'auto 2px 4px 2px', railInsetHorizontalTop: '4px 2px auto 2px', railInsetVerticalRight: '2px 4px 2px auto', railInsetVerticalLeft: '2px auto 2px 4px', railColor: 'transparent' }; ;// ./node_modules/naive-ui/es/_internal/scrollbar/styles/light.mjs function scrollbar_styles_light_self(vars) { const { scrollbarColor, scrollbarColorHover, scrollbarHeight, scrollbarWidth, scrollbarBorderRadius } = vars; return Object.assign(Object.assign({}, commonVars), { height: scrollbarHeight, width: scrollbarWidth, borderRadius: scrollbarBorderRadius, color: scrollbarColor, colorHover: scrollbarColorHover }); } const scrollbarLight = { name: 'Scrollbar', common: light, self: scrollbar_styles_light_self }; /* harmony default export */ var scrollbar_styles_light = (scrollbarLight); ;// ./node_modules/naive-ui/es/_styles/transitions/fade-in.cssr.mjs const { cubicBezierEaseInOut: fade_in_cssr_cubicBezierEaseInOut } = _common; function fadeInTransition({ name = 'fade-in', enterDuration = '0.2s', leaveDuration = '0.2s', enterCubicBezier = fade_in_cssr_cubicBezierEaseInOut, leaveCubicBezier = fade_in_cssr_cubicBezierEaseInOut } = {}) { return [cssr_c(`&.${name}-transition-enter-active`, { transition: `all ${enterDuration} ${enterCubicBezier}!important` }), cssr_c(`&.${name}-transition-leave-active`, { transition: `all ${leaveDuration} ${leaveCubicBezier}!important` }), cssr_c(`&.${name}-transition-enter-from, &.${name}-transition-leave-to`, { opacity: 0 }), cssr_c(`&.${name}-transition-leave-from, &.${name}-transition-enter-to`, { opacity: 1 })]; } ;// ./node_modules/naive-ui/es/_internal/scrollbar/src/styles/index.cssr.mjs // vars: // --n-scrollbar-bezier // --n-scrollbar-color // --n-scrollbar-color-hover // --n-scrollbar-width // --n-scrollbar-height // --n-scrollbar-border-radius // --n-scrollbar-rail-inset-horizontal // --n-scrollbar-rail-inset-vertical // --n-scrollbar-rail-color /* harmony default export */ var scrollbar_src_styles_index_cssr = (cB('scrollbar', ` overflow: hidden; position: relative; z-index: auto; height: 100%; width: 100%; `, [cssr_c('>', [cB('scrollbar-container', ` width: 100%; overflow: scroll; height: 100%; min-height: inherit; max-height: inherit; scrollbar-width: none; `, [cssr_c('&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb', ` width: 0; height: 0; display: none; `), cssr_c('>', [ // We can't set overflow hidden since it affects positioning. cB('scrollbar-content', ` box-sizing: border-box; min-width: 100%; `)])])]), cssr_c('>, +', [cB('scrollbar-rail', ` position: absolute; pointer-events: none; user-select: none; background: var(--n-scrollbar-rail-color); -webkit-user-select: none; `, [cM('horizontal', ` height: var(--n-scrollbar-height); `, [cssr_c('>', [cE('scrollbar', ` height: var(--n-scrollbar-height); border-radius: var(--n-scrollbar-border-radius); right: 0; `)])]), cM('horizontal--top', ` top: var(--n-scrollbar-rail-top-horizontal-top); right: var(--n-scrollbar-rail-right-horizontal-top); bottom: var(--n-scrollbar-rail-bottom-horizontal-top); left: var(--n-scrollbar-rail-left-horizontal-top); `), cM('horizontal--bottom', ` top: var(--n-scrollbar-rail-top-horizontal-bottom); right: var(--n-scrollbar-rail-right-horizontal-bottom); bottom: var(--n-scrollbar-rail-bottom-horizontal-bottom); left: var(--n-scrollbar-rail-left-horizontal-bottom); `), cM('vertical', ` width: var(--n-scrollbar-width); `, [cssr_c('>', [cE('scrollbar', ` width: var(--n-scrollbar-width); border-radius: var(--n-scrollbar-border-radius); bottom: 0; `)])]), cM('vertical--left', ` top: var(--n-scrollbar-rail-top-vertical-left); right: var(--n-scrollbar-rail-right-vertical-left); bottom: var(--n-scrollbar-rail-bottom-vertical-left); left: var(--n-scrollbar-rail-left-vertical-left); `), cM('vertical--right', ` top: var(--n-scrollbar-rail-top-vertical-right); right: var(--n-scrollbar-rail-right-vertical-right); bottom: var(--n-scrollbar-rail-bottom-vertical-right); left: var(--n-scrollbar-rail-left-vertical-right); `), cM('disabled', [cssr_c('>', [cE('scrollbar', 'pointer-events: none;')])]), cssr_c('>', [cE('scrollbar', ` z-index: 1; position: absolute; cursor: pointer; pointer-events: all; background-color: var(--n-scrollbar-color); transition: background-color .2s var(--n-scrollbar-bezier); `, [fadeInTransition(), cssr_c('&:hover', 'background-color: var(--n-scrollbar-color-hover);')])])])])])); ;// ./node_modules/naive-ui/es/_internal/scrollbar/src/Scrollbar.mjs const scrollbarProps = Object.assign(Object.assign({}, use_theme.props), { duration: { type: Number, default: 0 }, scrollable: { type: Boolean, default: true }, xScrollable: Boolean, trigger: { type: String, default: 'hover' }, useUnifiedContainer: Boolean, triggerDisplayManually: Boolean, // If container is set, resize observer won't not attached container: Function, content: Function, containerClass: String, containerStyle: [String, Object], contentClass: [String, Array], contentStyle: [String, Object], horizontalRailStyle: [String, Object], verticalRailStyle: [String, Object], onScroll: Function, onWheel: Function, onResize: Function, internalOnUpdateScrollLeft: Function, internalHoistYRail: Boolean, yPlacement: { type: String, default: 'right' }, xPlacement: { type: String, default: 'bottom' } }); const Scrollbar = defineComponent({ name: 'Scrollbar', props: scrollbarProps, inheritAttrs: false, setup(props) { const { mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props); const rtlEnabledRef = useRtl('Scrollbar', mergedRtlRef, mergedClsPrefixRef); // dom ref const wrapperRef = ref(null); const containerRef = ref(null); const contentRef = ref(null); const yRailRef = ref(null); const xRailRef = ref(null); // data ref const contentHeightRef = ref(null); const contentWidthRef = ref(null); const containerHeightRef = ref(null); const containerWidthRef = ref(null); const yRailSizeRef = ref(null); const xRailSizeRef = ref(null); const containerScrollTopRef = ref(0); const containerScrollLeftRef = ref(0); const isShowXBarRef = ref(false); const isShowYBarRef = ref(false); let yBarPressed = false; let xBarPressed = false; let xBarVanishTimerId; let yBarVanishTimerId; let memoYTop = 0; let memoXLeft = 0; let memoMouseX = 0; let memoMouseY = 0; const isIos = useIsIos(); const themeRef = use_theme('Scrollbar', '-scrollbar', scrollbar_src_styles_index_cssr, scrollbar_styles_light, props, mergedClsPrefixRef); const yBarSizeRef = runtime_core_esm_bundler_computed(() => { const { value: containerHeight } = containerHeightRef; const { value: contentHeight } = contentHeightRef; const { value: yRailSize } = yRailSizeRef; if (containerHeight === null || contentHeight === null || yRailSize === null) { return 0; } else { return Math.min(containerHeight, yRailSize * containerHeight / contentHeight + depx(themeRef.value.self.width) * 1.5); } }); const yBarSizePxRef = runtime_core_esm_bundler_computed(() => { return `${yBarSizeRef.value}px`; }); const xBarSizeRef = runtime_core_esm_bundler_computed(() => { const { value: containerWidth } = containerWidthRef; const { value: contentWidth } = contentWidthRef; const { value: xRailSize } = xRailSizeRef; if (containerWidth === null || contentWidth === null || xRailSize === null) { return 0; } else { return xRailSize * containerWidth / contentWidth + depx(themeRef.value.self.height) * 1.5; } }); const xBarSizePxRef = runtime_core_esm_bundler_computed(() => { return `${xBarSizeRef.value}px`; }); const yBarTopRef = runtime_core_esm_bundler_computed(() => { const { value: containerHeight } = containerHeightRef; const { value: containerScrollTop } = containerScrollTopRef; const { value: contentHeight } = contentHeightRef; const { value: yRailSize } = yRailSizeRef; if (containerHeight === null || contentHeight === null || yRailSize === null) { return 0; } else { const heightDiff = contentHeight - containerHeight; if (!heightDiff) return 0; return containerScrollTop / heightDiff * (yRailSize - yBarSizeRef.value); } }); const yBarTopPxRef = runtime_core_esm_bundler_computed(() => { return `${yBarTopRef.value}px`; }); const xBarLeftRef = runtime_core_esm_bundler_computed(() => { const { value: containerWidth } = containerWidthRef; const { value: containerScrollLeft } = containerScrollLeftRef; const { value: contentWidth } = contentWidthRef; const { value: xRailSize } = xRailSizeRef; if (containerWidth === null || contentWidth === null || xRailSize === null) { return 0; } else { const widthDiff = contentWidth - containerWidth; if (!widthDiff) return 0; return containerScrollLeft / widthDiff * (xRailSize - xBarSizeRef.value); } }); const xBarLeftPxRef = runtime_core_esm_bundler_computed(() => { return `${xBarLeftRef.value}px`; }); const needYBarRef = runtime_core_esm_bundler_computed(() => { const { value: containerHeight } = containerHeightRef; const { value: contentHeight } = contentHeightRef; return containerHeight !== null && contentHeight !== null && contentHeight > containerHeight; }); const needXBarRef = runtime_core_esm_bundler_computed(() => { const { value: containerWidth } = containerWidthRef; const { value: contentWidth } = contentWidthRef; return containerWidth !== null && contentWidth !== null && contentWidth > containerWidth; }); const mergedShowXBarRef = runtime_core_esm_bundler_computed(() => { const { trigger } = props; return trigger === 'none' || isShowXBarRef.value; }); const mergedShowYBarRef = runtime_core_esm_bundler_computed(() => { const { trigger } = props; return trigger === 'none' || isShowYBarRef.value; }); const mergedContainerRef = runtime_core_esm_bundler_computed(() => { const { container } = props; if (container) return container(); return containerRef.value; }); const mergedContentRef = runtime_core_esm_bundler_computed(() => { const { content } = props; if (content) return content(); return contentRef.value; }); const scrollTo = (options, y) => { if (!props.scrollable) return; if (typeof options === 'number') { scrollToPosition(options, y !== null && y !== void 0 ? y : 0, 0, false, 'auto'); return; } const { left, top, index, elSize, position, behavior, el, debounce = true } = options; if (left !== undefined || top !== undefined) { scrollToPosition(left !== null && left !== void 0 ? left : 0, top !== null && top !== void 0 ? top : 0, 0, false, behavior); } if (el !== undefined) { scrollToPosition(0, el.offsetTop, el.offsetHeight, debounce, behavior); } else if (index !== undefined && elSize !== undefined) { scrollToPosition(0, index * elSize, elSize, debounce, behavior); } else if (position === 'bottom') { scrollToPosition(0, Number.MAX_SAFE_INTEGER, 0, false, behavior); } else if (position === 'top') { scrollToPosition(0, 0, 0, false, behavior); } }; const activateState = useReactivated(() => { // Only restore for builtin container & content if (!props.container) { // remount scrollTo({ top: containerScrollTopRef.value, left: containerScrollLeftRef.value }); } }); // methods const handleContentResize = () => { if (activateState.isDeactivated) return; sync(); }; const handleContainerResize = e => { if (activateState.isDeactivated) return; const { onResize } = props; if (onResize) onResize(e); sync(); }; const scrollBy = (options, y) => { if (!props.scrollable) return; const { value: container } = mergedContainerRef; if (!container) return; if (typeof options === 'object') { container.scrollBy(options); } else { container.scrollBy(options, y || 0); } }; function scrollToPosition(left, top, elSize, debounce, behavior) { const { value: container } = mergedContainerRef; if (!container) return; if (debounce) { const { scrollTop, offsetHeight } = container; if (top > scrollTop) { if (top + elSize <= scrollTop + offsetHeight) { // do nothing } else { container.scrollTo({ left, top: top + elSize - offsetHeight, behavior }); } return; } } container.scrollTo({ left, top, behavior }); } function handleMouseEnterWrapper() { showXBar(); showYBar(); sync(); } function handleMouseLeaveWrapper() { hideBar(); } function hideBar() { hideYBar(); hideXBar(); } function hideYBar() { if (yBarVanishTimerId !== undefined) { window.clearTimeout(yBarVanishTimerId); } yBarVanishTimerId = window.setTimeout(() => { isShowYBarRef.value = false; }, props.duration); } function hideXBar() { if (xBarVanishTimerId !== undefined) { window.clearTimeout(xBarVanishTimerId); } xBarVanishTimerId = window.setTimeout(() => { isShowXBarRef.value = false; }, props.duration); } function showXBar() { if (xBarVanishTimerId !== undefined) { window.clearTimeout(xBarVanishTimerId); } isShowXBarRef.value = true; } function showYBar() { if (yBarVanishTimerId !== undefined) { window.clearTimeout(yBarVanishTimerId); } isShowYBarRef.value = true; } function handleScroll(e) { const { onScroll } = props; if (onScroll) onScroll(e); syncScrollState(); } function syncScrollState() { // only collect scroll state, do not trigger any dom event const { value: container } = mergedContainerRef; if (container) { containerScrollTopRef.value = container.scrollTop; containerScrollLeftRef.value = container.scrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1); } } function syncPositionState() { // only collect position state, do not trigger any dom event // Don't use getClientBoundingRect because element may be scale transformed const { value: content } = mergedContentRef; if (content) { contentHeightRef.value = content.offsetHeight; contentWidthRef.value = content.offsetWidth; } const { value: container } = mergedContainerRef; if (container) { containerHeightRef.value = container.offsetHeight; containerWidthRef.value = container.offsetWidth; } const { value: xRailEl } = xRailRef; const { value: yRailEl } = yRailRef; if (xRailEl) { xRailSizeRef.value = xRailEl.offsetWidth; } if (yRailEl) { yRailSizeRef.value = yRailEl.offsetHeight; } } /** * Sometimes there's only one element that we can scroll, * For example for textarea, there won't be a content element. */ function syncUnifiedContainer() { const { value: container } = mergedContainerRef; if (container) { containerScrollTopRef.value = container.scrollTop; containerScrollLeftRef.value = container.scrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1); containerHeightRef.value = container.offsetHeight; containerWidthRef.value = container.offsetWidth; contentHeightRef.value = container.scrollHeight; contentWidthRef.value = container.scrollWidth; } const { value: xRailEl } = xRailRef; const { value: yRailEl } = yRailRef; if (xRailEl) { xRailSizeRef.value = xRailEl.offsetWidth; } if (yRailEl) { yRailSizeRef.value = yRailEl.offsetHeight; } } function sync() { if (!props.scrollable) return; if (props.useUnifiedContainer) { syncUnifiedContainer(); } else { syncPositionState(); syncScrollState(); } } function isMouseUpAway(e) { var _a; return !((_a = wrapperRef.value) === null || _a === void 0 ? void 0 : _a.contains(getPreciseEventTarget(e))); } function handleXScrollMouseDown(e) { e.preventDefault(); e.stopPropagation(); xBarPressed = true; on('mousemove', window, handleXScrollMouseMove, true); on('mouseup', window, handleXScrollMouseUp, true); memoXLeft = containerScrollLeftRef.value; memoMouseX = (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? window.innerWidth - e.clientX : e.clientX; } function handleXScrollMouseMove(e) { if (!xBarPressed) return; if (xBarVanishTimerId !== undefined) { window.clearTimeout(xBarVanishTimerId); } if (yBarVanishTimerId !== undefined) { window.clearTimeout(yBarVanishTimerId); } const { value: containerWidth } = containerWidthRef; const { value: contentWidth } = contentWidthRef; const { value: xBarSize } = xBarSizeRef; if (containerWidth === null || contentWidth === null) return; const dX = (rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? window.innerWidth - e.clientX - memoMouseX : e.clientX - memoMouseX; const dScrollLeft = dX * (contentWidth - containerWidth) / (containerWidth - xBarSize); const toScrollLeftUpperBound = contentWidth - containerWidth; let toScrollLeft = memoXLeft + dScrollLeft; toScrollLeft = Math.min(toScrollLeftUpperBound, toScrollLeft); toScrollLeft = Math.max(toScrollLeft, 0); const { value: container } = mergedContainerRef; if (container) { container.scrollLeft = toScrollLeft * ((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? -1 : 1); const { internalOnUpdateScrollLeft } = props; if (internalOnUpdateScrollLeft) internalOnUpdateScrollLeft(toScrollLeft); } } function handleXScrollMouseUp(e) { e.preventDefault(); e.stopPropagation(); off('mousemove', window, handleXScrollMouseMove, true); off('mouseup', window, handleXScrollMouseUp, true); xBarPressed = false; sync(); if (isMouseUpAway(e)) { hideBar(); } } function handleYScrollMouseDown(e) { e.preventDefault(); e.stopPropagation(); yBarPressed = true; on('mousemove', window, handleYScrollMouseMove, true); on('mouseup', window, handleYScrollMouseUp, true); memoYTop = containerScrollTopRef.value; memoMouseY = e.clientY; } function handleYScrollMouseMove(e) { if (!yBarPressed) return; if (xBarVanishTimerId !== undefined) { window.clearTimeout(xBarVanishTimerId); } if (yBarVanishTimerId !== undefined) { window.clearTimeout(yBarVanishTimerId); } const { value: containerHeight } = containerHeightRef; const { value: contentHeight } = contentHeightRef; const { value: yBarSize } = yBarSizeRef; if (containerHeight === null || contentHeight === null) return; const dY = e.clientY - memoMouseY; const dScrollTop = dY * (contentHeight - containerHeight) / (containerHeight - yBarSize); const toScrollTopUpperBound = contentHeight - containerHeight; let toScrollTop = memoYTop + dScrollTop; toScrollTop = Math.min(toScrollTopUpperBound, toScrollTop); toScrollTop = Math.max(toScrollTop, 0); const { value: container } = mergedContainerRef; if (container) { container.scrollTop = toScrollTop; } } function handleYScrollMouseUp(e) { e.preventDefault(); e.stopPropagation(); off('mousemove', window, handleYScrollMouseMove, true); off('mouseup', window, handleYScrollMouseUp, true); yBarPressed = false; sync(); if (isMouseUpAway(e)) { hideBar(); } } watchEffect(() => { const { value: needXBar } = needXBarRef; const { value: needYBar } = needYBarRef; const { value: mergedClsPrefix } = mergedClsPrefixRef; const { value: xRailEl } = xRailRef; const { value: yRailEl } = yRailRef; if (xRailEl) { if (!needXBar) { xRailEl.classList.add(`${mergedClsPrefix}-scrollbar-rail--disabled`); } else { xRailEl.classList.remove(`${mergedClsPrefix}-scrollbar-rail--disabled`); } } if (yRailEl) { if (!needYBar) { yRailEl.classList.add(`${mergedClsPrefix}-scrollbar-rail--disabled`); } else { yRailEl.classList.remove(`${mergedClsPrefix}-scrollbar-rail--disabled`); } } }); runtime_core_esm_bundler_onMounted(() => { // if container exist, it always can't be resolved when scrollbar is mounted // for example: // - component // - scrollbar // - inner // if you pass inner to scrollbar, you may use a ref inside component // however, when scrollbar is mounted, ref is not ready at component // you need to init by yourself if (props.container) return; sync(); }); runtime_core_esm_bundler_onBeforeUnmount(() => { if (xBarVanishTimerId !== undefined) { window.clearTimeout(xBarVanishTimerId); } if (yBarVanishTimerId !== undefined) { window.clearTimeout(yBarVanishTimerId); } off('mousemove', window, handleYScrollMouseMove, true); off('mouseup', window, handleYScrollMouseUp, true); }); const cssVarsRef = runtime_core_esm_bundler_computed(() => { const { common: { cubicBezierEaseInOut }, self: { color, colorHover, height, width, borderRadius, railInsetHorizontalTop, railInsetHorizontalBottom, railInsetVerticalRight, railInsetVerticalLeft, railColor } } = themeRef.value; const { top: railTopHorizontalTop, right: railRightHorizontalTop, bottom: railBottomHorizontalTop, left: railLeftHorizontalTop } = getMargin(railInsetHorizontalTop); const { top: railTopHorizontalBottom, right: railRightHorizontalBottom, bottom: railBottomHorizontalBottom, left: railLeftHorizontalBottom } = getMargin(railInsetHorizontalBottom); const { top: railTopVerticalRight, right: railRightVerticalRight, bottom: railBottomVerticalRight, left: railLeftVerticalRight } = getMargin((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? rtlInset(railInsetVerticalRight) : railInsetVerticalRight); const { top: railTopVerticalLeft, right: railRightVerticalLeft, bottom: railBottomVerticalLeft, left: railLeftVerticalLeft } = getMargin((rtlEnabledRef === null || rtlEnabledRef === void 0 ? void 0 : rtlEnabledRef.value) ? rtlInset(railInsetVerticalLeft) : railInsetVerticalLeft); return { '--n-scrollbar-bezier': cubicBezierEaseInOut, '--n-scrollbar-color': color, '--n-scrollbar-color-hover': colorHover, '--n-scrollbar-border-radius': borderRadius, '--n-scrollbar-width': width, '--n-scrollbar-height': height, '--n-scrollbar-rail-top-horizontal-top': railTopHorizontalTop, '--n-scrollbar-rail-right-horizontal-top': railRightHorizontalTop, '--n-scrollbar-rail-bottom-horizontal-top': railBottomHorizontalTop, '--n-scrollbar-rail-left-horizontal-top': railLeftHorizontalTop, '--n-scrollbar-rail-top-horizontal-bottom': railTopHorizontalBottom, '--n-scrollbar-rail-right-horizontal-bottom': railRightHorizontalBottom, '--n-scrollbar-rail-bottom-horizontal-bottom': railBottomHorizontalBottom, '--n-scrollbar-rail-left-horizontal-bottom': railLeftHorizontalBottom, '--n-scrollbar-rail-top-vertical-right': railTopVerticalRight, '--n-scrollbar-rail-right-vertical-right': railRightVerticalRight, '--n-scrollbar-rail-bottom-vertical-right': railBottomVerticalRight, '--n-scrollbar-rail-left-vertical-right': railLeftVerticalRight, '--n-scrollbar-rail-top-vertical-left': railTopVerticalLeft, '--n-scrollbar-rail-right-vertical-left': railRightVerticalLeft, '--n-scrollbar-rail-bottom-vertical-left': railBottomVerticalLeft, '--n-scrollbar-rail-left-vertical-left': railLeftVerticalLeft, '--n-scrollbar-rail-color': railColor }; }); const themeClassHandle = inlineThemeDisabled ? useThemeClass('scrollbar', undefined, cssVarsRef, props) : undefined; const exposedMethods = { scrollTo, scrollBy, sync, syncUnifiedContainer, handleMouseEnterWrapper, handleMouseLeaveWrapper }; return Object.assign(Object.assign({}, exposedMethods), { mergedClsPrefix: mergedClsPrefixRef, rtlEnabled: rtlEnabledRef, containerScrollTop: containerScrollTopRef, wrapperRef, containerRef, contentRef, yRailRef, xRailRef, needYBar: needYBarRef, needXBar: needXBarRef, yBarSizePx: yBarSizePxRef, xBarSizePx: xBarSizePxRef, yBarTopPx: yBarTopPxRef, xBarLeftPx: xBarLeftPxRef, isShowXBar: mergedShowXBarRef, isShowYBar: mergedShowYBarRef, isIos, handleScroll, handleContentResize, handleContainerResize, handleYScrollMouseDown, handleXScrollMouseDown, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }); }, render() { var _a; const { $slots, mergedClsPrefix, triggerDisplayManually, rtlEnabled, internalHoistYRail, yPlacement, xPlacement, xScrollable } = this; if (!this.scrollable) return (_a = $slots.default) === null || _a === void 0 ? void 0 : _a.call($slots); const triggerIsNone = this.trigger === 'none'; const createYRail = (className, style) => { return h("div", { ref: "yRailRef", class: [`${mergedClsPrefix}-scrollbar-rail`, `${mergedClsPrefix}-scrollbar-rail--vertical`, `${mergedClsPrefix}-scrollbar-rail--vertical--${yPlacement}`, className], "data-scrollbar-rail": true, style: [style || '', this.verticalRailStyle], "aria-hidden": true }, h(triggerIsNone ? Wrapper : Transition, triggerIsNone ? null : { name: 'fade-in-transition' }, { default: () => this.needYBar && this.isShowYBar && !this.isIos ? h("div", { class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`, style: { height: this.yBarSizePx, top: this.yBarTopPx }, onMousedown: this.handleYScrollMouseDown }) : null })); }; const createChildren = () => { var _a, _b; (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this); return h('div', mergeProps(this.$attrs, { role: 'none', ref: 'wrapperRef', class: [`${mergedClsPrefix}-scrollbar`, this.themeClass, rtlEnabled && `${mergedClsPrefix}-scrollbar--rtl`], style: this.cssVars, onMouseenter: triggerDisplayManually ? undefined : this.handleMouseEnterWrapper, onMouseleave: triggerDisplayManually ? undefined : this.handleMouseLeaveWrapper }), [this.container ? (_b = $slots.default) === null || _b === void 0 ? void 0 : _b.call($slots) : h("div", { role: "none", ref: "containerRef", class: [`${mergedClsPrefix}-scrollbar-container`, this.containerClass], style: this.containerStyle, onScroll: this.handleScroll, onWheel: this.onWheel }, h(VResizeObserver, { onResize: this.handleContentResize }, { default: () => h("div", { ref: "contentRef", role: "none", style: [{ width: this.xScrollable ? 'fit-content' : null }, this.contentStyle], class: [`${mergedClsPrefix}-scrollbar-content`, this.contentClass] }, $slots) })), internalHoistYRail ? null : createYRail(undefined, undefined), xScrollable && h("div", { ref: "xRailRef", class: [`${mergedClsPrefix}-scrollbar-rail`, `${mergedClsPrefix}-scrollbar-rail--horizontal`, `${mergedClsPrefix}-scrollbar-rail--horizontal--${xPlacement}`], style: this.horizontalRailStyle, "data-scrollbar-rail": true, "aria-hidden": true }, h(triggerIsNone ? Wrapper : Transition, triggerIsNone ? null : { name: 'fade-in-transition' }, { default: () => this.needXBar && this.isShowXBar && !this.isIos ? h("div", { class: `${mergedClsPrefix}-scrollbar-rail__scrollbar`, style: { width: this.xBarSizePx, right: rtlEnabled ? this.xBarLeftPx : undefined, left: rtlEnabled ? undefined : this.xBarLeftPx }, onMousedown: this.handleXScrollMouseDown }) : null }))]); }; const scrollbarNode = this.container ? createChildren() : h(VResizeObserver, { onResize: this.handleContainerResize }, { default: createChildren }); if (internalHoistYRail) { return h(Fragment, null, scrollbarNode, createYRail(this.themeClass, this.cssVars)); } else { return scrollbarNode; } } }); /* harmony default export */ var src_Scrollbar = (Scrollbar); const XScrollbar = Scrollbar; ;// ./node_modules/naive-ui/es/_utils/env/is-jsdom.mjs let _isJsdom; function isJsdom() { if (_isJsdom === undefined) { _isJsdom = navigator.userAgent.includes('Node.js') || navigator.userAgent.includes('jsdom'); } return _isJsdom; } ;// ./node_modules/naive-ui/es/_utils/css/format-length.mjs const pureNumberRegex = /^(\d|\.)+$/; const numberRegex = /(\d|\.)+/; function formatLength(length, { c = 1, offset = 0, attachPx = true } = {}) { if (typeof length === 'number') { const result = (length + offset) * c; if (result === 0) return '0'; return `${result}px`; } else if (typeof length === 'string') { if (pureNumberRegex.test(length)) { const result = (Number(length) + offset) * c; if (attachPx) { if (result === 0) return '0'; return `${result}px`; } else { return `${result}`; } } else { const result = numberRegex.exec(length); if (!result) return length; return length.replace(numberRegex, String((Number(result[0]) + offset) * c)); } } return length; } ;// ./node_modules/naive-ui/es/popover/styles/_common.mjs /* harmony default export */ var popover_styles_common = ({ space: '6px', spaceArrow: '10px', arrowOffset: '10px', arrowOffsetVertical: '10px', arrowHeight: '6px', padding: '8px 14px' }); ;// ./node_modules/naive-ui/es/popover/styles/light.mjs function popover_styles_light_self(vars) { const { boxShadow2, popoverColor, textColor2, borderRadius, fontSize, dividerColor } = vars; return Object.assign(Object.assign({}, popover_styles_common), { fontSize, borderRadius, color: popoverColor, dividerColor, textColor: textColor2, boxShadow: boxShadow2 }); } const popoverLight = { name: 'Popover', common: light, self: popover_styles_light_self }; /* harmony default export */ var popover_styles_light = (popoverLight); ;// ./node_modules/lodash-es/_arrayMap.js /** * A specialized version of `_.map` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function arrayMap(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } /* harmony default export */ var _arrayMap = (arrayMap); ;// ./node_modules/lodash-es/_setCacheAdd.js /** Used to stand-in for `undefined` hash values. */ var _setCacheAdd_HASH_UNDEFINED = '__lodash_hash_undefined__'; /** * Adds `value` to the array cache. * * @private * @name add * @memberOf SetCache * @alias push * @param {*} value The value to cache. * @returns {Object} Returns the cache instance. */ function setCacheAdd(value) { this.__data__.set(value, _setCacheAdd_HASH_UNDEFINED); return this; } /* harmony default export */ var _setCacheAdd = (setCacheAdd); ;// ./node_modules/lodash-es/_setCacheHas.js /** * Checks if `value` is in the array cache. * * @private * @name has * @memberOf SetCache * @param {*} value The value to search for. * @returns {number} Returns `true` if `value` is found, else `false`. */ function setCacheHas(value) { return this.__data__.has(value); } /* harmony default export */ var _setCacheHas = (setCacheHas); ;// ./node_modules/lodash-es/_SetCache.js /** * * Creates an array cache object to store unique values. * * @private * @constructor * @param {Array} [values] The values to cache. */ function SetCache(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new _MapCache; while (++index < length) { this.add(values[index]); } } // Add methods to `SetCache`. SetCache.prototype.add = SetCache.prototype.push = _setCacheAdd; SetCache.prototype.has = _setCacheHas; /* harmony default export */ var _SetCache = (SetCache); ;// ./node_modules/lodash-es/_arraySome.js /** * A specialized version of `_.some` for arrays without support for iteratee * shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {boolean} Returns `true` if any element passes the predicate check, * else `false`. */ function arraySome(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } /* harmony default export */ var _arraySome = (arraySome); ;// ./node_modules/lodash-es/_cacheHas.js /** * Checks if a `cache` value for `key` exists. * * @private * @param {Object} cache The cache to query. * @param {string} key The key of the entry to check. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ function cacheHas(cache, key) { return cache.has(key); } /* harmony default export */ var _cacheHas = (cacheHas); ;// ./node_modules/lodash-es/_equalArrays.js /** Used to compose bitmasks for value comparisons. */ var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2; /** * A specialized version of `baseIsEqualDeep` for arrays with support for * partial deep comparisons. * * @private * @param {Array} array The array to compare. * @param {Array} other The other array to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `array` and `other` objects. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } // Check that cyclic values are equal. var arrStacked = stack.get(array); var othStacked = stack.get(other); if (arrStacked && othStacked) { return arrStacked == other && othStacked == array; } var index = -1, result = true, seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new _SetCache : undefined; stack.set(array, other); stack.set(other, array); // Ignore non-index properties. while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== undefined) { if (compared) { continue; } result = false; break; } // Recursively compare arrays (susceptible to call stack limits). if (seen) { if (!_arraySome(other, function(othValue, othIndex) { if (!_cacheHas(seen, othIndex) && (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!( arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack) )) { result = false; break; } } stack['delete'](array); stack['delete'](other); return result; } /* harmony default export */ var _equalArrays = (equalArrays); ;// ./node_modules/lodash-es/_mapToArray.js /** * Converts `map` to its key-value pairs. * * @private * @param {Object} map The map to convert. * @returns {Array} Returns the key-value pairs. */ function mapToArray(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } /* harmony default export */ var _mapToArray = (mapToArray); ;// ./node_modules/lodash-es/_setToArray.js /** * Converts `set` to an array of its values. * * @private * @param {Object} set The set to convert. * @returns {Array} Returns the values. */ function setToArray(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } /* harmony default export */ var _setToArray = (setToArray); ;// ./node_modules/lodash-es/_equalByTag.js /** Used to compose bitmasks for value comparisons. */ var _equalByTag_COMPARE_PARTIAL_FLAG = 1, _equalByTag_COMPARE_UNORDERED_FLAG = 2; /** `Object#toString` result references. */ var _equalByTag_boolTag = '[object Boolean]', _equalByTag_dateTag = '[object Date]', _equalByTag_errorTag = '[object Error]', _equalByTag_mapTag = '[object Map]', _equalByTag_numberTag = '[object Number]', _equalByTag_regexpTag = '[object RegExp]', _equalByTag_setTag = '[object Set]', _equalByTag_stringTag = '[object String]', symbolTag = '[object Symbol]'; var _equalByTag_arrayBufferTag = '[object ArrayBuffer]', _equalByTag_dataViewTag = '[object DataView]'; /** Used to convert symbols to primitives and strings. */ var symbolProto = _Symbol ? _Symbol.prototype : undefined, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; /** * A specialized version of `baseIsEqualDeep` for comparing objects of * the same `toStringTag`. * * **Note:** This function only supports comparing values with tags of * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {string} tag The `toStringTag` of the objects to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case _equalByTag_dataViewTag: if ((object.byteLength != other.byteLength) || (object.byteOffset != other.byteOffset)) { return false; } object = object.buffer; other = other.buffer; case _equalByTag_arrayBufferTag: if ((object.byteLength != other.byteLength) || !equalFunc(new _Uint8Array(object), new _Uint8Array(other))) { return false; } return true; case _equalByTag_boolTag: case _equalByTag_dateTag: case _equalByTag_numberTag: // Coerce booleans to `1` or `0` and dates to milliseconds. // Invalid dates are coerced to `NaN`. return lodash_es_eq(+object, +other); case _equalByTag_errorTag: return object.name == other.name && object.message == other.message; case _equalByTag_regexpTag: case _equalByTag_stringTag: // Coerce regexes to strings and treat strings, primitives and objects, // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring // for more details. return object == (other + ''); case _equalByTag_mapTag: var convert = _mapToArray; case _equalByTag_setTag: var isPartial = bitmask & _equalByTag_COMPARE_PARTIAL_FLAG; convert || (convert = _setToArray); if (object.size != other.size && !isPartial) { return false; } // Assume cyclic values are equal. var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= _equalByTag_COMPARE_UNORDERED_FLAG; // Recursively compare objects (susceptible to call stack limits). stack.set(object, other); var result = _equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack['delete'](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } /* harmony default export */ var _equalByTag = (equalByTag); ;// ./node_modules/lodash-es/_arrayPush.js /** * Appends the elements of `values` to `array`. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to append. * @returns {Array} Returns `array`. */ function arrayPush(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } /* harmony default export */ var _arrayPush = (arrayPush); ;// ./node_modules/lodash-es/_baseGetAllKeys.js /** * The base implementation of `getAllKeys` and `getAllKeysIn` which uses * `keysFunc` and `symbolsFunc` to get the enumerable property names and * symbols of `object`. * * @private * @param {Object} object The object to query. * @param {Function} keysFunc The function to get the keys of `object`. * @param {Function} symbolsFunc The function to get the symbols of `object`. * @returns {Array} Returns the array of property names and symbols. */ function baseGetAllKeys(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return lodash_es_isArray(object) ? result : _arrayPush(result, symbolsFunc(object)); } /* harmony default export */ var _baseGetAllKeys = (baseGetAllKeys); ;// ./node_modules/lodash-es/_arrayFilter.js /** * A specialized version of `_.filter` for arrays without support for * iteratee shorthands. * * @private * @param {Array} [array] The array to iterate over. * @param {Function} predicate The function invoked per iteration. * @returns {Array} Returns the new filtered array. */ function arrayFilter(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } /* harmony default export */ var _arrayFilter = (arrayFilter); ;// ./node_modules/lodash-es/stubArray.js /** * This method returns a new empty array. * * @static * @memberOf _ * @since 4.13.0 * @category Util * @returns {Array} Returns the new empty array. * @example * * var arrays = _.times(2, _.stubArray); * * console.log(arrays); * // => [[], []] * * console.log(arrays[0] === arrays[1]); * // => false */ function stubArray() { return []; } /* harmony default export */ var lodash_es_stubArray = (stubArray); ;// ./node_modules/lodash-es/_getSymbols.js /** Used for built-in method references. */ var _getSymbols_objectProto = Object.prototype; /** Built-in value references. */ var _getSymbols_propertyIsEnumerable = _getSymbols_objectProto.propertyIsEnumerable; /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeGetSymbols = Object.getOwnPropertySymbols; /** * Creates an array of the own enumerable symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of symbols. */ var getSymbols = !nativeGetSymbols ? lodash_es_stubArray : function(object) { if (object == null) { return []; } object = Object(object); return _arrayFilter(nativeGetSymbols(object), function(symbol) { return _getSymbols_propertyIsEnumerable.call(object, symbol); }); }; /* harmony default export */ var _getSymbols = (getSymbols); ;// ./node_modules/lodash-es/_nativeKeys.js /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeKeys = _overArg(Object.keys, Object); /* harmony default export */ var _nativeKeys = (nativeKeys); ;// ./node_modules/lodash-es/_baseKeys.js /** Used for built-in method references. */ var _baseKeys_objectProto = Object.prototype; /** Used to check objects for own properties. */ var _baseKeys_hasOwnProperty = _baseKeys_objectProto.hasOwnProperty; /** * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. */ function baseKeys(object) { if (!_isPrototype(object)) { return _nativeKeys(object); } var result = []; for (var key in Object(object)) { if (_baseKeys_hasOwnProperty.call(object, key) && key != 'constructor') { result.push(key); } } return result; } /* harmony default export */ var _baseKeys = (baseKeys); ;// ./node_modules/lodash-es/keys.js /** * Creates an array of the own enumerable property names of `object`. * * **Note:** Non-object values are coerced to objects. See the * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) * for more details. * * @static * @since 0.1.0 * @memberOf _ * @category Object * @param {Object} object The object to query. * @returns {Array} Returns the array of property names. * @example * * function Foo() { * this.a = 1; * this.b = 2; * } * * Foo.prototype.c = 3; * * _.keys(new Foo); * // => ['a', 'b'] (iteration order is not guaranteed) * * _.keys('hi'); * // => ['0', '1'] */ function keys(object) { return lodash_es_isArrayLike(object) ? _arrayLikeKeys(object) : _baseKeys(object); } /* harmony default export */ var lodash_es_keys = (keys); ;// ./node_modules/lodash-es/_getAllKeys.js /** * Creates an array of own enumerable property names and symbols of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the array of property names and symbols. */ function getAllKeys(object) { return _baseGetAllKeys(object, lodash_es_keys, _getSymbols); } /* harmony default export */ var _getAllKeys = (getAllKeys); ;// ./node_modules/lodash-es/_equalObjects.js /** Used to compose bitmasks for value comparisons. */ var _equalObjects_COMPARE_PARTIAL_FLAG = 1; /** Used for built-in method references. */ var _equalObjects_objectProto = Object.prototype; /** Used to check objects for own properties. */ var _equalObjects_hasOwnProperty = _equalObjects_objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqualDeep` for objects with support for * partial deep comparisons. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & _equalObjects_COMPARE_PARTIAL_FLAG, objProps = _getAllKeys(object), objLength = objProps.length, othProps = _getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : _equalObjects_hasOwnProperty.call(other, key))) { return false; } } // Check that cyclic values are equal. var objStacked = stack.get(object); var othStacked = stack.get(other); if (objStacked && othStacked) { return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } // Recursively compare objects (susceptible to call stack limits). if (!(compared === undefined ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) : compared )) { result = false; break; } skipCtor || (skipCtor = key == 'constructor'); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; // Non `Object` object instances with different constructors are not equal. if (objCtor != othCtor && ('constructor' in object && 'constructor' in other) && !(typeof objCtor == 'function' && objCtor instanceof objCtor && typeof othCtor == 'function' && othCtor instanceof othCtor)) { result = false; } } stack['delete'](object); stack['delete'](other); return result; } /* harmony default export */ var _equalObjects = (equalObjects); ;// ./node_modules/lodash-es/_DataView.js /* Built-in method references that are verified to be native. */ var DataView = _getNative(_root, 'DataView'); /* harmony default export */ var _DataView = (DataView); ;// ./node_modules/lodash-es/_Promise.js /* Built-in method references that are verified to be native. */ var _Promise_Promise = _getNative(_root, 'Promise'); /* harmony default export */ var _Promise = (_Promise_Promise); ;// ./node_modules/lodash-es/_Set.js /* Built-in method references that are verified to be native. */ var _Set_Set = _getNative(_root, 'Set'); /* harmony default export */ var _Set = (_Set_Set); ;// ./node_modules/lodash-es/_WeakMap.js /* Built-in method references that are verified to be native. */ var _WeakMap_WeakMap = _getNative(_root, 'WeakMap'); /* harmony default export */ var _WeakMap = (_WeakMap_WeakMap); ;// ./node_modules/lodash-es/_getTag.js /** `Object#toString` result references. */ var _getTag_mapTag = '[object Map]', _getTag_objectTag = '[object Object]', promiseTag = '[object Promise]', _getTag_setTag = '[object Set]', _getTag_weakMapTag = '[object WeakMap]'; var _getTag_dataViewTag = '[object DataView]'; /** Used to detect maps, sets, and weakmaps. */ var dataViewCtorString = _toSource(_DataView), mapCtorString = _toSource(_Map), promiseCtorString = _toSource(_Promise), setCtorString = _toSource(_Set), weakMapCtorString = _toSource(_WeakMap); /** * Gets the `toStringTag` of `value`. * * @private * @param {*} value The value to query. * @returns {string} Returns the `toStringTag`. */ var getTag = _baseGetTag; // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. if ((_DataView && getTag(new _DataView(new ArrayBuffer(1))) != _getTag_dataViewTag) || (_Map && getTag(new _Map) != _getTag_mapTag) || (_Promise && getTag(_Promise.resolve()) != promiseTag) || (_Set && getTag(new _Set) != _getTag_setTag) || (_WeakMap && getTag(new _WeakMap) != _getTag_weakMapTag)) { getTag = function(value) { var result = _baseGetTag(value), Ctor = result == _getTag_objectTag ? value.constructor : undefined, ctorString = Ctor ? _toSource(Ctor) : ''; if (ctorString) { switch (ctorString) { case dataViewCtorString: return _getTag_dataViewTag; case mapCtorString: return _getTag_mapTag; case promiseCtorString: return promiseTag; case setCtorString: return _getTag_setTag; case weakMapCtorString: return _getTag_weakMapTag; } } return result; }; } /* harmony default export */ var _getTag = (getTag); ;// ./node_modules/lodash-es/_baseIsEqualDeep.js /** Used to compose bitmasks for value comparisons. */ var _baseIsEqualDeep_COMPARE_PARTIAL_FLAG = 1; /** `Object#toString` result references. */ var _baseIsEqualDeep_argsTag = '[object Arguments]', _baseIsEqualDeep_arrayTag = '[object Array]', _baseIsEqualDeep_objectTag = '[object Object]'; /** Used for built-in method references. */ var _baseIsEqualDeep_objectProto = Object.prototype; /** Used to check objects for own properties. */ var _baseIsEqualDeep_hasOwnProperty = _baseIsEqualDeep_objectProto.hasOwnProperty; /** * A specialized version of `baseIsEqual` for arrays and objects which performs * deep comparisons and tracks traversed objects enabling objects with circular * references to be compared. * * @private * @param {Object} object The object to compare. * @param {Object} other The other object to compare. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. * @param {Object} [stack] Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = lodash_es_isArray(object), othIsArr = lodash_es_isArray(other), objTag = objIsArr ? _baseIsEqualDeep_arrayTag : _getTag(object), othTag = othIsArr ? _baseIsEqualDeep_arrayTag : _getTag(other); objTag = objTag == _baseIsEqualDeep_argsTag ? _baseIsEqualDeep_objectTag : objTag; othTag = othTag == _baseIsEqualDeep_argsTag ? _baseIsEqualDeep_objectTag : othTag; var objIsObj = objTag == _baseIsEqualDeep_objectTag, othIsObj = othTag == _baseIsEqualDeep_objectTag, isSameTag = objTag == othTag; if (isSameTag && lodash_es_isBuffer(object)) { if (!lodash_es_isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new _Stack); return (objIsArr || lodash_es_isTypedArray(object)) ? _equalArrays(object, other, bitmask, customizer, equalFunc, stack) : _equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & _baseIsEqualDeep_COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && _baseIsEqualDeep_hasOwnProperty.call(object, '__wrapped__'), othIsWrapped = othIsObj && _baseIsEqualDeep_hasOwnProperty.call(other, '__wrapped__'); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new _Stack); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new _Stack); return _equalObjects(object, other, bitmask, customizer, equalFunc, stack); } /* harmony default export */ var _baseIsEqualDeep = (baseIsEqualDeep); ;// ./node_modules/lodash-es/_baseIsEqual.js /** * The base implementation of `_.isEqual` which supports partial comparisons * and tracks traversed objects. * * @private * @param {*} value The value to compare. * @param {*} other The other value to compare. * @param {boolean} bitmask The bitmask flags. * 1 - Unordered comparison * 2 - Partial comparison * @param {Function} [customizer] The function to customize comparisons. * @param {Object} [stack] Tracks traversed `value` and `other` objects. * @returns {boolean} Returns `true` if the values are equivalent, else `false`. */ function baseIsEqual(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || (!lodash_es_isObjectLike(value) && !lodash_es_isObjectLike(other))) { return value !== value && other !== other; } return _baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } /* harmony default export */ var _baseIsEqual = (baseIsEqual); ;// ./node_modules/lodash-es/_baseIsMatch.js /** Used to compose bitmasks for value comparisons. */ var _baseIsMatch_COMPARE_PARTIAL_FLAG = 1, _baseIsMatch_COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.isMatch` without support for iteratee shorthands. * * @private * @param {Object} object The object to inspect. * @param {Object} source The object of property values to match. * @param {Array} matchData The property names, values, and compare flags to match. * @param {Function} [customizer] The function to customize comparisons. * @returns {boolean} Returns `true` if `object` is a match, else `false`. */ function baseIsMatch(object, source, matchData, customizer) { var index = matchData.length, length = index, noCustomizer = !customizer; if (object == null) { return !length; } object = Object(object); while (index--) { var data = matchData[index]; if ((noCustomizer && data[2]) ? data[1] !== object[data[0]] : !(data[0] in object) ) { return false; } } while (++index < length) { data = matchData[index]; var key = data[0], objValue = object[key], srcValue = data[1]; if (noCustomizer && data[2]) { if (objValue === undefined && !(key in object)) { return false; } } else { var stack = new _Stack; if (customizer) { var result = customizer(objValue, srcValue, key, object, source, stack); } if (!(result === undefined ? _baseIsEqual(srcValue, objValue, _baseIsMatch_COMPARE_PARTIAL_FLAG | _baseIsMatch_COMPARE_UNORDERED_FLAG, customizer, stack) : result )) { return false; } } } return true; } /* harmony default export */ var _baseIsMatch = (baseIsMatch); ;// ./node_modules/lodash-es/_isStrictComparable.js /** * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` if suitable for strict * equality comparisons, else `false`. */ function isStrictComparable(value) { return value === value && !lodash_es_isObject(value); } /* harmony default export */ var _isStrictComparable = (isStrictComparable); ;// ./node_modules/lodash-es/_getMatchData.js /** * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. * @returns {Array} Returns the match data of `object`. */ function getMatchData(object) { var result = lodash_es_keys(object), length = result.length; while (length--) { var key = result[length], value = object[key]; result[length] = [key, value, _isStrictComparable(value)]; } return result; } /* harmony default export */ var _getMatchData = (getMatchData); ;// ./node_modules/lodash-es/_matchesStrictComparable.js /** * A specialized version of `matchesProperty` for source values suitable * for strict equality comparisons, i.e. `===`. * * @private * @param {string} key The key of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function matchesStrictComparable(key, srcValue) { return function(object) { if (object == null) { return false; } return object[key] === srcValue && (srcValue !== undefined || (key in Object(object))); }; } /* harmony default export */ var _matchesStrictComparable = (matchesStrictComparable); ;// ./node_modules/lodash-es/_baseMatches.js /** * The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function. */ function baseMatches(source) { var matchData = _getMatchData(source); if (matchData.length == 1 && matchData[0][2]) { return _matchesStrictComparable(matchData[0][0], matchData[0][1]); } return function(object) { return object === source || _baseIsMatch(object, source, matchData); }; } /* harmony default export */ var _baseMatches = (baseMatches); ;// ./node_modules/lodash-es/isSymbol.js /** `Object#toString` result references. */ var isSymbol_symbolTag = '[object Symbol]'; /** * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to check. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * * _.isSymbol(Symbol.iterator); * // => true * * _.isSymbol('abc'); * // => false */ function isSymbol_isSymbol(value) { return typeof value == 'symbol' || (lodash_es_isObjectLike(value) && _baseGetTag(value) == isSymbol_symbolTag); } /* harmony default export */ var lodash_es_isSymbol = (isSymbol_isSymbol); ;// ./node_modules/lodash-es/_isKey.js /** Used to match property names within property paths. */ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/; /** * Checks if `value` is a property name and not a property path. * * @private * @param {*} value The value to check. * @param {Object} [object] The object to query keys on. * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ function isKey(value, object) { if (lodash_es_isArray(value)) { return false; } var type = typeof value; if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || lodash_es_isSymbol(value)) { return true; } return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || (object != null && value in Object(object)); } /* harmony default export */ var _isKey = (isKey); ;// ./node_modules/lodash-es/memoize.js /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; /** * Creates a function that memoizes the result of `func`. If `resolver` is * provided, it determines the cache key for storing the result based on the * arguments provided to the memoized function. By default, the first argument * provided to the memoized function is used as the map cache key. The `func` * is invoked with the `this` binding of the memoized function. * * **Note:** The cache is exposed as the `cache` property on the memoized * function. Its creation may be customized by replacing the `_.memoize.Cache` * constructor with one whose instances implement the * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 * @category Function * @param {Function} func The function to have its output memoized. * @param {Function} [resolver] The function to resolve the cache key. * @returns {Function} Returns the new memoized function. * @example * * var object = { 'a': 1, 'b': 2 }; * var other = { 'c': 3, 'd': 4 }; * * var values = _.memoize(_.values); * values(object); * // => [1, 2] * * values(other); * // => [3, 4] * * object.a = 2; * values(object); * // => [1, 2] * * // Modify the result cache. * values.cache.set(object, ['a', 'b']); * values(object); * // => ['a', 'b'] * * // Replace `_.memoize.Cache`. * _.memoize.Cache = WeakMap; */ function memoize(func, resolver) { if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { throw new TypeError(FUNC_ERROR_TEXT); } var memoized = function() { var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache; if (cache.has(key)) { return cache.get(key); } var result = func.apply(this, args); memoized.cache = cache.set(key, result) || cache; return result; }; memoized.cache = new (memoize.Cache || _MapCache); return memoized; } // Expose `MapCache`. memoize.Cache = _MapCache; /* harmony default export */ var lodash_es_memoize = (memoize); ;// ./node_modules/lodash-es/_memoizeCapped.js /** Used as the maximum memoize cache size. */ var MAX_MEMOIZE_SIZE = 500; /** * A specialized version of `_.memoize` which clears the memoized function's * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private * @param {Function} func The function to have its output memoized. * @returns {Function} Returns the new memoized function. */ function memoizeCapped(func) { var result = lodash_es_memoize(func, function(key) { if (cache.size === MAX_MEMOIZE_SIZE) { cache.clear(); } return key; }); var cache = result.cache; return result; } /* harmony default export */ var _memoizeCapped = (memoizeCapped); ;// ./node_modules/lodash-es/_stringToPath.js /** Used to match property names within property paths. */ var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** Used to match backslashes in property paths. */ var reEscapeChar = /\\(\\)?/g; /** * Converts `string` to a property path array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the property path array. */ var stringToPath = _memoizeCapped(function(string) { var result = []; if (string.charCodeAt(0) === 46 /* . */) { result.push(''); } string.replace(rePropName, function(match, number, quote, subString) { result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); }); return result; }); /* harmony default export */ var _stringToPath = (stringToPath); ;// ./node_modules/lodash-es/_baseToString.js /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0; /** Used to convert symbols to primitives and strings. */ var _baseToString_symbolProto = _Symbol ? _Symbol.prototype : undefined, symbolToString = _baseToString_symbolProto ? _baseToString_symbolProto.toString : undefined; /** * The base implementation of `_.toString` which doesn't convert nullish * values to empty strings. * * @private * @param {*} value The value to process. * @returns {string} Returns the string. */ function baseToString(value) { // Exit early for strings to avoid a performance hit in some environments. if (typeof value == 'string') { return value; } if (lodash_es_isArray(value)) { // Recursively convert values (susceptible to call stack limits). return _arrayMap(value, baseToString) + ''; } if (lodash_es_isSymbol(value)) { return symbolToString ? symbolToString.call(value) : ''; } var result = (value + ''); return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } /* harmony default export */ var _baseToString = (baseToString); ;// ./node_modules/lodash-es/toString.js /** * Converts `value` to a string. An empty string is returned for `null` * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ * @since 4.0.0 * @category Lang * @param {*} value The value to convert. * @returns {string} Returns the converted string. * @example * * _.toString(null); * // => '' * * _.toString(-0); * // => '-0' * * _.toString([1, 2, 3]); * // => '1,2,3' */ function toString_toString(value) { return value == null ? '' : _baseToString(value); } /* harmony default export */ var lodash_es_toString = (toString_toString); ;// ./node_modules/lodash-es/_castPath.js /** * Casts `value` to a path array if it's not one. * * @private * @param {*} value The value to inspect. * @param {Object} [object] The object to query keys on. * @returns {Array} Returns the cast property path array. */ function castPath(value, object) { if (lodash_es_isArray(value)) { return value; } return _isKey(value, object) ? [value] : _stringToPath(lodash_es_toString(value)); } /* harmony default export */ var _castPath = (castPath); ;// ./node_modules/lodash-es/_toKey.js /** Used as references for various `Number` constants. */ var _toKey_INFINITY = 1 / 0; /** * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. * @returns {string|symbol} Returns the key. */ function toKey(value) { if (typeof value == 'string' || lodash_es_isSymbol(value)) { return value; } var result = (value + ''); return (result == '0' && (1 / value) == -_toKey_INFINITY) ? '-0' : result; } /* harmony default export */ var _toKey = (toKey); ;// ./node_modules/lodash-es/_baseGet.js /** * The base implementation of `_.get` without support for default values. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @returns {*} Returns the resolved value. */ function baseGet(object, path) { path = _castPath(path, object); var index = 0, length = path.length; while (object != null && index < length) { object = object[_toKey(path[index++])]; } return (index && index == length) ? object : undefined; } /* harmony default export */ var _baseGet = (baseGet); ;// ./node_modules/lodash-es/get.js /** * Gets the value at `path` of `object`. If the resolved value is * `undefined`, the `defaultValue` is returned in its place. * * @static * @memberOf _ * @since 3.7.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path of the property to get. * @param {*} [defaultValue] The value returned for `undefined` resolved values. * @returns {*} Returns the resolved value. * @example * * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * * _.get(object, 'a[0].b.c'); * // => 3 * * _.get(object, ['a', '0', 'b', 'c']); * // => 3 * * _.get(object, 'a.b.c', 'default'); * // => 'default' */ function get(object, path, defaultValue) { var result = object == null ? undefined : _baseGet(object, path); return result === undefined ? defaultValue : result; } /* harmony default export */ var lodash_es_get = (get); ;// ./node_modules/lodash-es/_baseHasIn.js /** * The base implementation of `_.hasIn` without support for deep paths. * * @private * @param {Object} [object] The object to query. * @param {Array|string} key The key to check. * @returns {boolean} Returns `true` if `key` exists, else `false`. */ function baseHasIn(object, key) { return object != null && key in Object(object); } /* harmony default export */ var _baseHasIn = (baseHasIn); ;// ./node_modules/lodash-es/_hasPath.js /** * Checks if `path` exists on `object`. * * @private * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @param {Function} hasFunc The function to check properties. * @returns {boolean} Returns `true` if `path` exists, else `false`. */ function hasPath(object, path, hasFunc) { path = _castPath(path, object); var index = -1, length = path.length, result = false; while (++index < length) { var key = _toKey(path[index]); if (!(result = object != null && hasFunc(object, key))) { break; } object = object[key]; } if (result || ++index != length) { return result; } length = object == null ? 0 : object.length; return !!length && lodash_es_isLength(length) && _isIndex(key, length) && (lodash_es_isArray(object) || lodash_es_isArguments(object)); } /* harmony default export */ var _hasPath = (hasPath); ;// ./node_modules/lodash-es/hasIn.js /** * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ * @since 4.0.0 * @category Object * @param {Object} object The object to query. * @param {Array|string} path The path to check. * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * * var object = _.create({ 'a': _.create({ 'b': 2 }) }); * * _.hasIn(object, 'a'); * // => true * * _.hasIn(object, 'a.b'); * // => true * * _.hasIn(object, ['a', 'b']); * // => true * * _.hasIn(object, 'b'); * // => false */ function hasIn(object, path) { return object != null && _hasPath(object, path, _baseHasIn); } /* harmony default export */ var lodash_es_hasIn = (hasIn); ;// ./node_modules/lodash-es/_baseMatchesProperty.js /** Used to compose bitmasks for value comparisons. */ var _baseMatchesProperty_COMPARE_PARTIAL_FLAG = 1, _baseMatchesProperty_COMPARE_UNORDERED_FLAG = 2; /** * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. * * @private * @param {string} path The path of the property to get. * @param {*} srcValue The value to match. * @returns {Function} Returns the new spec function. */ function baseMatchesProperty(path, srcValue) { if (_isKey(path) && _isStrictComparable(srcValue)) { return _matchesStrictComparable(_toKey(path), srcValue); } return function(object) { var objValue = lodash_es_get(object, path); return (objValue === undefined && objValue === srcValue) ? lodash_es_hasIn(object, path) : _baseIsEqual(srcValue, objValue, _baseMatchesProperty_COMPARE_PARTIAL_FLAG | _baseMatchesProperty_COMPARE_UNORDERED_FLAG); }; } /* harmony default export */ var _baseMatchesProperty = (baseMatchesProperty); ;// ./node_modules/lodash-es/_baseProperty.js /** * The base implementation of `_.property` without support for deep paths. * * @private * @param {string} key The key of the property to get. * @returns {Function} Returns the new accessor function. */ function baseProperty(key) { return function(object) { return object == null ? undefined : object[key]; }; } /* harmony default export */ var _baseProperty = (baseProperty); ;// ./node_modules/lodash-es/_basePropertyDeep.js /** * A specialized version of `baseProperty` which supports deep paths. * * @private * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. */ function basePropertyDeep(path) { return function(object) { return _baseGet(object, path); }; } /* harmony default export */ var _basePropertyDeep = (basePropertyDeep); ;// ./node_modules/lodash-es/property.js /** * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ * @since 2.4.0 * @category Util * @param {Array|string} path The path of the property to get. * @returns {Function} Returns the new accessor function. * @example * * var objects = [ * { 'a': { 'b': 2 } }, * { 'a': { 'b': 1 } } * ]; * * _.map(objects, _.property('a.b')); * // => [2, 1] * * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); * // => [1, 2] */ function property(path) { return _isKey(path) ? _baseProperty(_toKey(path)) : _basePropertyDeep(path); } /* harmony default export */ var lodash_es_property = (property); ;// ./node_modules/lodash-es/_baseIteratee.js /** * The base implementation of `_.iteratee`. * * @private * @param {*} [value=_.identity] The value to convert to an iteratee. * @returns {Function} Returns the iteratee. */ function baseIteratee(value) { // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. if (typeof value == 'function') { return value; } if (value == null) { return lodash_es_identity; } if (typeof value == 'object') { return lodash_es_isArray(value) ? _baseMatchesProperty(value[0], value[1]) : _baseMatches(value); } return lodash_es_property(value); } /* harmony default export */ var _baseIteratee = (baseIteratee); ;// ./node_modules/lodash-es/_baseForOwn.js /** * The base implementation of `_.forOwn` without support for iteratee shorthands. * * @private * @param {Object} object The object to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Object} Returns `object`. */ function baseForOwn(object, iteratee) { return object && _baseFor(object, iteratee, lodash_es_keys); } /* harmony default export */ var _baseForOwn = (baseForOwn); ;// ./node_modules/lodash-es/_createBaseEach.js /** * Creates a `baseEach` or `baseEachRight` function. * * @private * @param {Function} eachFunc The function to iterate over a collection. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Function} Returns the new base function. */ function createBaseEach(eachFunc, fromRight) { return function(collection, iteratee) { if (collection == null) { return collection; } if (!lodash_es_isArrayLike(collection)) { return eachFunc(collection, iteratee); } var length = collection.length, index = fromRight ? length : -1, iterable = Object(collection); while ((fromRight ? index-- : ++index < length)) { if (iteratee(iterable[index], index, iterable) === false) { break; } } return collection; }; } /* harmony default export */ var _createBaseEach = (createBaseEach); ;// ./node_modules/lodash-es/_baseEach.js /** * The base implementation of `_.forEach` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array|Object} Returns `collection`. */ var baseEach = _createBaseEach(_baseForOwn); /* harmony default export */ var _baseEach = (baseEach); ;// ./node_modules/lodash-es/_baseMap.js /** * The base implementation of `_.map` without support for iteratee shorthands. * * @private * @param {Array|Object} collection The collection to iterate over. * @param {Function} iteratee The function invoked per iteration. * @returns {Array} Returns the new mapped array. */ function baseMap(collection, iteratee) { var index = -1, result = lodash_es_isArrayLike(collection) ? Array(collection.length) : []; _baseEach(collection, function(value, key, collection) { result[++index] = iteratee(value, key, collection); }); return result; } /* harmony default export */ var _baseMap = (baseMap); ;// ./node_modules/lodash-es/map.js /** * Creates an array of values by running each element in `collection` thru * `iteratee`. The iteratee is invoked with three arguments: * (value, index|key, collection). * * Many lodash methods are guarded to work as iteratees for methods like * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. * * The guarded methods are: * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ * @since 0.1.0 * @category Collection * @param {Array|Object} collection The collection to iterate over. * @param {Function} [iteratee=_.identity] The function invoked per iteration. * @returns {Array} Returns the new mapped array. * @example * * function square(n) { * return n * n; * } * * _.map([4, 8], square); * // => [16, 64] * * _.map({ 'a': 4, 'b': 8 }, square); * // => [16, 64] (iteration order is not guaranteed) * * var users = [ * { 'user': 'barney' }, * { 'user': 'fred' } * ]; * * // The `_.property` iteratee shorthand. * _.map(users, 'user'); * // => ['barney', 'fred'] */ function map_map(collection, iteratee) { var func = lodash_es_isArray(collection) ? _arrayMap : _baseMap; return func(collection, _baseIteratee(iteratee, 3)); } /* harmony default export */ var lodash_es_map = (map_map); ;// ./node_modules/naive-ui/es/popover/src/styles/index.cssr.mjs const oppositePlacement = { top: 'bottom', bottom: 'top', left: 'right', right: 'left' }; const arrowSize = 'var(--n-arrow-height) * 1.414'; // vars: // --n-bezier // --n-bezier-ease-in // --n-bezier-ease-out // --n-font-size // --n-text-color // --n-color // --n-border-radius // --n-arrow-height // --n-arrow-offset // --n-arrow-offset-vertical // --n-padding // --n-space // --n-space-arrow // --n-divider-color /* harmony default export */ var popover_src_styles_index_cssr = (cssr_c([cB('popover', ` transition: box-shadow .3s var(--n-bezier), background-color .3s var(--n-bezier), color .3s var(--n-bezier); position: relative; font-size: var(--n-font-size); color: var(--n-text-color); box-shadow: var(--n-box-shadow); word-break: break-word; `, [cssr_c('>', [cB('scrollbar', ` height: inherit; max-height: inherit; `)]), cNotM('raw', ` background-color: var(--n-color); border-radius: var(--n-border-radius); `, [cNotM('scrollable', [cNotM('show-header-or-footer', 'padding: var(--n-padding);')])]), cE('header', ` padding: var(--n-padding); border-bottom: 1px solid var(--n-divider-color); transition: border-color .3s var(--n-bezier); `), cE('footer', ` padding: var(--n-padding); border-top: 1px solid var(--n-divider-color); transition: border-color .3s var(--n-bezier); `), cM('scrollable, show-header-or-footer', [cE('content', ` padding: var(--n-padding); `)])]), cB('popover-shared', ` transform-origin: inherit; `, [cB('popover-arrow-wrapper', ` position: absolute; overflow: hidden; pointer-events: none; `, [cB('popover-arrow', ` transition: background-color .3s var(--n-bezier); position: absolute; display: block; width: calc(${arrowSize}); height: calc(${arrowSize}); box-shadow: 0 0 8px 0 rgba(0, 0, 0, .12); transform: rotate(45deg); background-color: var(--n-color); pointer-events: all; `)]), // body transition cssr_c('&.popover-transition-enter-from, &.popover-transition-leave-to', ` opacity: 0; transform: scale(.85); `), cssr_c('&.popover-transition-enter-to, &.popover-transition-leave-from', ` transform: scale(1); opacity: 1; `), cssr_c('&.popover-transition-enter-active', ` transition: box-shadow .3s var(--n-bezier), background-color .3s var(--n-bezier), color .3s var(--n-bezier), opacity .15s var(--n-bezier-ease-out), transform .15s var(--n-bezier-ease-out); `), cssr_c('&.popover-transition-leave-active', ` transition: box-shadow .3s var(--n-bezier), background-color .3s var(--n-bezier), color .3s var(--n-bezier), opacity .15s var(--n-bezier-ease-in), transform .15s var(--n-bezier-ease-in); `)]), placementStyle('top-start', ` top: calc(${arrowSize} / -2); left: calc(${getArrowOffset('top-start')} - var(--v-offset-left)); `), placementStyle('top', ` top: calc(${arrowSize} / -2); transform: translateX(calc(${arrowSize} / -2)) rotate(45deg); left: 50%; `), placementStyle('top-end', ` top: calc(${arrowSize} / -2); right: calc(${getArrowOffset('top-end')} + var(--v-offset-left)); `), placementStyle('bottom-start', ` bottom: calc(${arrowSize} / -2); left: calc(${getArrowOffset('bottom-start')} - var(--v-offset-left)); `), placementStyle('bottom', ` bottom: calc(${arrowSize} / -2); transform: translateX(calc(${arrowSize} / -2)) rotate(45deg); left: 50%; `), placementStyle('bottom-end', ` bottom: calc(${arrowSize} / -2); right: calc(${getArrowOffset('bottom-end')} + var(--v-offset-left)); `), placementStyle('left-start', ` left: calc(${arrowSize} / -2); top: calc(${getArrowOffset('left-start')} - var(--v-offset-top)); `), placementStyle('left', ` left: calc(${arrowSize} / -2); transform: translateY(calc(${arrowSize} / -2)) rotate(45deg); top: 50%; `), placementStyle('left-end', ` left: calc(${arrowSize} / -2); bottom: calc(${getArrowOffset('left-end')} + var(--v-offset-top)); `), placementStyle('right-start', ` right: calc(${arrowSize} / -2); top: calc(${getArrowOffset('right-start')} - var(--v-offset-top)); `), placementStyle('right', ` right: calc(${arrowSize} / -2); transform: translateY(calc(${arrowSize} / -2)) rotate(45deg); top: 50%; `), placementStyle('right-end', ` right: calc(${arrowSize} / -2); bottom: calc(${getArrowOffset('right-end')} + var(--v-offset-top)); `), ...lodash_es_map({ top: ['right-start', 'left-start'], right: ['top-end', 'bottom-end'], bottom: ['right-end', 'left-end'], left: ['top-start', 'bottom-start'] }, (placements, direction) => { const isVertical = ['right', 'left'].includes(direction); const sizeType = isVertical ? 'width' : 'height'; return placements.map(placement => { const isReverse = placement.split('-')[1] === 'end'; const targetSize = `var(--v-target-${sizeType}, 0px)`; const centerOffset = `calc((${targetSize} - ${arrowSize}) / 2)`; const offset = getArrowOffset(placement); return cssr_c(`[v-placement="${placement}"] >`, [cB('popover-shared', [cM('center-arrow', [cB('popover-arrow', `${direction}: calc(max(${centerOffset}, ${offset}) ${isReverse ? '+' : '-'} var(--v-offset-${isVertical ? 'left' : 'top'}));`)])])]); }); })])); function getArrowOffset(placement) { return ['top', 'bottom'].includes(placement.split('-')[0]) ? 'var(--n-arrow-offset)' : 'var(--n-arrow-offset-vertical)'; } function placementStyle(placement, arrowStyleLiteral) { const position = placement.split('-')[0]; const sizeStyle = ['top', 'bottom'].includes(position) ? 'height: var(--n-space-arrow);' : 'width: var(--n-space-arrow);'; return cssr_c(`[v-placement="${placement}"] >`, [cB('popover-shared', ` margin-${oppositePlacement[position]}: var(--n-space); `, [cM('show-arrow', ` margin-${oppositePlacement[position]}: var(--n-space-arrow); `), cM('overlap', ` margin: 0; `), cCB('popover-arrow-wrapper', ` right: 0; left: 0; top: 0; bottom: 0; ${position}: 100%; ${oppositePlacement[position]}: auto; ${sizeStyle} `, [cB('popover-arrow', arrowStyleLiteral)])])]); } ;// ./node_modules/naive-ui/es/popover/src/PopoverBody.mjs const popoverBodyProps = Object.assign(Object.assign({}, use_theme.props), { to: useAdjustedTo.propTo, show: Boolean, trigger: String, showArrow: Boolean, delay: Number, duration: Number, raw: Boolean, arrowPointToCenter: Boolean, arrowClass: String, arrowStyle: [String, Object], arrowWrapperClass: String, arrowWrapperStyle: [String, Object], displayDirective: String, x: Number, y: Number, flip: Boolean, overlap: Boolean, placement: String, width: [Number, String], keepAliveOnHover: Boolean, scrollable: Boolean, contentClass: String, contentStyle: [Object, String], headerClass: String, headerStyle: [Object, String], footerClass: String, footerStyle: [Object, String], // private internalDeactivateImmediately: Boolean, animated: Boolean, onClickoutside: Function, internalTrapFocus: Boolean, internalOnAfterLeave: Function, // deprecated minWidth: Number, maxWidth: Number }); function renderArrow({ arrowClass, arrowStyle, arrowWrapperClass, arrowWrapperStyle, clsPrefix }) { return h("div", { key: "__popover-arrow__", style: arrowWrapperStyle, class: [`${clsPrefix}-popover-arrow-wrapper`, arrowWrapperClass] }, h("div", { class: [`${clsPrefix}-popover-arrow`, arrowClass], style: arrowStyle })); } /* harmony default export */ var PopoverBody = (defineComponent({ name: 'PopoverBody', inheritAttrs: false, props: popoverBodyProps, setup(props, { slots, attrs }) { const { namespaceRef, mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props); const themeRef = use_theme('Popover', '-popover', popover_src_styles_index_cssr, popover_styles_light, props, mergedClsPrefixRef); const followerRef = ref(null); const NPopover = runtime_core_esm_bundler_inject('NPopover'); const bodyRef = ref(null); const followerEnabledRef = ref(props.show); const displayedRef = ref(false); watchEffect(() => { const { show } = props; if (show && !isJsdom() && !props.internalDeactivateImmediately) { displayedRef.value = true; } }); const directivesRef = runtime_core_esm_bundler_computed(() => { const { trigger, onClickoutside } = props; const directives = []; const { positionManuallyRef: { value: positionManually } } = NPopover; if (!positionManually) { if (trigger === 'click' && !onClickoutside) { directives.push([es_clickoutside, handleClickOutside, undefined, { capture: true }]); } if (trigger === 'hover') { directives.push([es_mousemoveoutside, handleMouseMoveOutside]); } } if (onClickoutside) { directives.push([es_clickoutside, handleClickOutside, undefined, { capture: true }]); } if (props.displayDirective === 'show' || props.animated && displayedRef.value) { directives.push([vShow, props.show]); } return directives; }); const cssVarsRef = runtime_core_esm_bundler_computed(() => { const { common: { cubicBezierEaseInOut, cubicBezierEaseIn, cubicBezierEaseOut }, self: { space, spaceArrow, padding, fontSize, textColor, dividerColor, color, boxShadow, borderRadius, arrowHeight, arrowOffset, arrowOffsetVertical } } = themeRef.value; return { '--n-box-shadow': boxShadow, '--n-bezier': cubicBezierEaseInOut, '--n-bezier-ease-in': cubicBezierEaseIn, '--n-bezier-ease-out': cubicBezierEaseOut, '--n-font-size': fontSize, '--n-text-color': textColor, '--n-color': color, '--n-divider-color': dividerColor, '--n-border-radius': borderRadius, '--n-arrow-height': arrowHeight, '--n-arrow-offset': arrowOffset, '--n-arrow-offset-vertical': arrowOffsetVertical, '--n-padding': padding, '--n-space': space, '--n-space-arrow': spaceArrow }; }); const styleRef = runtime_core_esm_bundler_computed(() => { const width = props.width === 'trigger' ? undefined : formatLength(props.width); const style = []; if (width) { style.push({ width }); } const { maxWidth, minWidth } = props; if (maxWidth) { style.push({ maxWidth: formatLength(maxWidth) }); } if (minWidth) { style.push({ maxWidth: formatLength(minWidth) }); } if (!inlineThemeDisabled) { style.push(cssVarsRef.value); } return style; }); const themeClassHandle = inlineThemeDisabled ? useThemeClass('popover', undefined, cssVarsRef, props) : undefined; NPopover.setBodyInstance({ syncPosition }); runtime_core_esm_bundler_onBeforeUnmount(() => { NPopover.setBodyInstance(null); }); runtime_core_esm_bundler_watch(toRef(props, 'show'), value => { // If no animation, no transition component will be applied to the // component. So we need to trigger follower manaully. if (props.animated) return; if (value) { followerEnabledRef.value = true; } else { followerEnabledRef.value = false; } }); function syncPosition() { var _a; (_a = followerRef.value) === null || _a === void 0 ? void 0 : _a.syncPosition(); } function handleMouseEnter(e) { if (props.trigger === 'hover' && props.keepAliveOnHover && props.show) { NPopover.handleMouseEnter(e); } } function handleMouseLeave(e) { if (props.trigger === 'hover' && props.keepAliveOnHover) { NPopover.handleMouseLeave(e); } } function handleMouseMoveOutside(e) { if (props.trigger === 'hover' && !getTriggerElement().contains(getPreciseEventTarget(e))) { NPopover.handleMouseMoveOutside(e); } } function handleClickOutside(e) { if (props.trigger === 'click' && !getTriggerElement().contains(getPreciseEventTarget(e)) || props.onClickoutside) { NPopover.handleClickOutside(e); } } function getTriggerElement() { return NPopover.getTriggerElement(); } provide(popoverBodyInjectionKey, bodyRef); provide(drawerBodyInjectionKey, null); provide(modalBodyInjectionKey, null); function renderContentNode() { themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender(); const shouldRenderDom = props.displayDirective === 'show' || props.show || props.animated && displayedRef.value; if (!shouldRenderDom) { return null; } let contentNode; const renderBody = NPopover.internalRenderBodyRef.value; const { value: mergedClsPrefix } = mergedClsPrefixRef; if (!renderBody) { const { value: extraClass } = NPopover.extraClassRef; const { internalTrapFocus } = props; const hasHeaderOrFooter = !isSlotEmpty(slots.header) || !isSlotEmpty(slots.footer); const renderContentInnerNode = () => { var _a, _b; const body = hasHeaderOrFooter ? h(Fragment, null, resolveWrappedSlot(slots.header, children => { return children ? h("div", { class: [`${mergedClsPrefix}-popover__header`, props.headerClass], style: props.headerStyle }, children) : null; }), resolveWrappedSlot(slots.default, children => { return children ? h("div", { class: [`${mergedClsPrefix}-popover__content`, props.contentClass], style: props.contentStyle }, slots) : null; }), resolveWrappedSlot(slots.footer, children => { return children ? h("div", { class: [`${mergedClsPrefix}-popover__footer`, props.footerClass], style: props.footerStyle }, children) : null; })) : props.scrollable ? (_a = slots.default) === null || _a === void 0 ? void 0 : _a.call(slots) : h("div", { class: [`${mergedClsPrefix}-popover__content`, props.contentClass], style: props.contentStyle }, slots); const maybeScrollableBody = props.scrollable ? h(XScrollbar, { contentClass: hasHeaderOrFooter ? undefined : `${mergedClsPrefix}-popover__content ${(_b = props.contentClass) !== null && _b !== void 0 ? _b : ''}`, contentStyle: hasHeaderOrFooter ? undefined : props.contentStyle }, { default: () => body }) : body; const arrow = props.showArrow ? renderArrow({ arrowClass: props.arrowClass, arrowStyle: props.arrowStyle, arrowWrapperClass: props.arrowWrapperClass, arrowWrapperStyle: props.arrowWrapperStyle, clsPrefix: mergedClsPrefix }) : null; return [maybeScrollableBody, arrow]; }; contentNode = h('div', mergeProps({ class: [`${mergedClsPrefix}-popover`, `${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, extraClass.map(v => `${mergedClsPrefix}-${v}`), { [`${mergedClsPrefix}-popover--scrollable`]: props.scrollable, [`${mergedClsPrefix}-popover--show-header-or-footer`]: hasHeaderOrFooter, [`${mergedClsPrefix}-popover--raw`]: props.raw, [`${mergedClsPrefix}-popover-shared--overlap`]: props.overlap, [`${mergedClsPrefix}-popover-shared--show-arrow`]: props.showArrow, [`${mergedClsPrefix}-popover-shared--center-arrow`]: props.arrowPointToCenter }], ref: bodyRef, style: styleRef.value, onKeydown: NPopover.handleKeydown, onMouseenter: handleMouseEnter, onMouseleave: handleMouseLeave }, attrs), internalTrapFocus ? h(FocusTrap, { active: props.show, autoFocus: true }, { default: renderContentInnerNode }) : renderContentInnerNode()); } else { contentNode = renderBody( // The popover class and overlap class must exists, they will be used // to place the body & transition animation. // Shadow class exists for reuse box-shadow. [`${mergedClsPrefix}-popover-shared`, themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass.value, props.overlap && `${mergedClsPrefix}-popover-shared--overlap`, props.showArrow && `${mergedClsPrefix}-popover-shared--show-arrow`, props.arrowPointToCenter && `${mergedClsPrefix}-popover-shared--center-arrow`], bodyRef, styleRef.value, handleMouseEnter, handleMouseLeave); } return withDirectives(contentNode, directivesRef.value); } return { displayed: displayedRef, namespace: namespaceRef, isMounted: NPopover.isMountedRef, zIndex: NPopover.zIndexRef, followerRef, adjustedTo: useAdjustedTo(props), followerEnabled: followerEnabledRef, renderContentNode }; }, render() { return h(Follower, { ref: "followerRef", zIndex: this.zIndex, show: this.show, enabled: this.followerEnabled, to: this.adjustedTo, x: this.x, y: this.y, flip: this.flip, placement: this.placement, containerClass: this.namespace, overlap: this.overlap, width: this.width === 'trigger' ? 'target' : undefined, teleportDisabled: this.adjustedTo === useAdjustedTo.tdkey }, { default: () => { return this.animated ? h(Transition, { name: "popover-transition", appear: this.isMounted, // Don't use watch to enable follower, since the transition may // make position sync timing very subtle and buggy. onEnter: () => { this.followerEnabled = true; }, onAfterLeave: () => { var _a; (_a = this.internalOnAfterLeave) === null || _a === void 0 ? void 0 : _a.call(this); this.followerEnabled = false; this.displayed = false; } }, { default: this.renderContentNode }) : this.renderContentNode(); } }); } })); ;// ./node_modules/naive-ui/es/popover/src/Popover.mjs const bodyPropKeys = Object.keys(popoverBodyProps); const triggerEventMap = { focus: ['onFocus', 'onBlur'], click: ['onClick'], hover: ['onMouseenter', 'onMouseleave'], manual: [], nested: ['onFocus', 'onBlur', 'onMouseenter', 'onMouseleave', 'onClick'] }; function appendEvents(vNode, trigger, events) { triggerEventMap[trigger].forEach(eventName => { if (!vNode.props) { vNode.props = {}; } else { vNode.props = Object.assign({}, vNode.props); } const originalHandler = vNode.props[eventName]; const handler = events[eventName]; if (!originalHandler) { vNode.props[eventName] = handler; } else { vNode.props[eventName] = (...args) => { originalHandler(...args); handler(...args); }; } }); } const popoverBaseProps = { show: { type: Boolean, default: undefined }, defaultShow: Boolean, showArrow: { type: Boolean, default: true }, trigger: { type: String, default: 'hover' }, delay: { type: Number, default: 100 }, duration: { type: Number, default: 100 }, raw: Boolean, placement: { type: String, default: 'top' }, x: Number, y: Number, arrowPointToCenter: Boolean, disabled: Boolean, getDisabled: Function, displayDirective: { type: String, default: 'if' }, arrowClass: String, arrowStyle: [String, Object], arrowWrapperClass: String, arrowWrapperStyle: [String, Object], flip: { type: Boolean, default: true }, animated: { type: Boolean, default: true }, width: { type: [Number, String], default: undefined }, overlap: Boolean, keepAliveOnHover: { type: Boolean, default: true }, zIndex: Number, to: useAdjustedTo.propTo, scrollable: Boolean, contentClass: String, contentStyle: [Object, String], headerClass: String, headerStyle: [Object, String], footerClass: String, footerStyle: [Object, String], // events onClickoutside: Function, 'onUpdate:show': [Function, Array], onUpdateShow: [Function, Array], // internal internalDeactivateImmediately: Boolean, internalSyncTargetWithParent: Boolean, internalInheritedEventHandlers: { type: Array, default: () => [] }, internalTrapFocus: Boolean, internalExtraClass: { type: Array, default: () => [] }, // deprecated onShow: [Function, Array], onHide: [Function, Array], arrow: { type: Boolean, default: undefined }, minWidth: Number, maxWidth: Number }; const popoverProps = Object.assign(Object.assign(Object.assign({}, use_theme.props), popoverBaseProps), { internalOnAfterLeave: Function, internalRenderBody: Function }); /* harmony default export */ var Popover = (defineComponent({ name: 'Popover', inheritAttrs: false, props: popoverProps, slots: Object, __popover__: true, setup(props) { if (false) {} const isMountedRef = isMounted(); const binderInstRef = ref(null); // setup show const controlledShowRef = runtime_core_esm_bundler_computed(() => props.show); const uncontrolledShowRef = ref(props.defaultShow); const mergedShowWithoutDisabledRef = useMergedState(controlledShowRef, uncontrolledShowRef); const mergedShowConsideringDisabledPropRef = use_memo(() => { if (props.disabled) return false; return mergedShowWithoutDisabledRef.value; }); const getMergedDisabled = () => { if (props.disabled) return true; const { getDisabled } = props; if (getDisabled === null || getDisabled === void 0 ? void 0 : getDisabled()) return true; return false; }; const getMergedShow = () => { if (getMergedDisabled()) return false; return mergedShowWithoutDisabledRef.value; }; // setup show-arrow const compatibleShowArrowRef = useCompitable(props, ['arrow', 'showArrow']); const mergedShowArrowRef = runtime_core_esm_bundler_computed(() => { if (props.overlap) return false; return compatibleShowArrowRef.value; }); // bodyInstance let bodyInstance = null; const showTimerIdRef = ref(null); const hideTimerIdRef = ref(null); const positionManuallyRef = use_memo(() => { return props.x !== undefined && props.y !== undefined; }); // methods function doUpdateShow(value) { const { 'onUpdate:show': _onUpdateShow, onUpdateShow, onShow, onHide } = props; uncontrolledShowRef.value = value; if (_onUpdateShow) { call(_onUpdateShow, value); } if (onUpdateShow) { call(onUpdateShow, value); } if (value && onShow) { call(onShow, true); } if (value && onHide) { call(onHide, false); } } function syncPosition() { if (bodyInstance) { bodyInstance.syncPosition(); } } function clearShowTimer() { const { value: showTimerId } = showTimerIdRef; if (showTimerId) { window.clearTimeout(showTimerId); showTimerIdRef.value = null; } } function clearHideTimer() { const { value: hideTimerId } = hideTimerIdRef; if (hideTimerId) { window.clearTimeout(hideTimerId); hideTimerIdRef.value = null; } } function handleFocus() { const mergedDisabled = getMergedDisabled(); if (props.trigger === 'focus' && !mergedDisabled) { if (getMergedShow()) return; doUpdateShow(true); } } function handleBlur() { const mergedDisabled = getMergedDisabled(); if (props.trigger === 'focus' && !mergedDisabled) { if (!getMergedShow()) return; doUpdateShow(false); } } function handleMouseEnter() { const mergedDisabled = getMergedDisabled(); if (props.trigger === 'hover' && !mergedDisabled) { clearHideTimer(); if (showTimerIdRef.value !== null) return; if (getMergedShow()) return; const delayCallback = () => { doUpdateShow(true); showTimerIdRef.value = null; }; const { delay } = props; if (delay === 0) { delayCallback(); } else { showTimerIdRef.value = window.setTimeout(delayCallback, delay); } } } function handleMouseLeave() { const mergedDisabled = getMergedDisabled(); if (props.trigger === 'hover' && !mergedDisabled) { clearShowTimer(); if (hideTimerIdRef.value !== null) return; if (!getMergedShow()) return; const delayedCallback = () => { doUpdateShow(false); hideTimerIdRef.value = null; }; const { duration } = props; if (duration === 0) { delayedCallback(); } else { hideTimerIdRef.value = window.setTimeout(delayedCallback, duration); } } } // will be called in popover-content function handleMouseMoveOutside() { handleMouseLeave(); } // will be called in popover-content function handleClickOutside(e) { var _a; if (!getMergedShow()) return; if (props.trigger === 'click') { clearShowTimer(); clearHideTimer(); doUpdateShow(false); } (_a = props.onClickoutside) === null || _a === void 0 ? void 0 : _a.call(props, e); } function handleClick() { if (props.trigger === 'click' && !getMergedDisabled()) { clearShowTimer(); clearHideTimer(); const nextShow = !getMergedShow(); doUpdateShow(nextShow); } } function handleKeydown(e) { if (!props.internalTrapFocus) return; if (e.key === 'Escape') { clearShowTimer(); clearHideTimer(); doUpdateShow(false); } } function setShow(value) { uncontrolledShowRef.value = value; } function getTriggerElement() { var _a; return (_a = binderInstRef.value) === null || _a === void 0 ? void 0 : _a.targetRef; } function setBodyInstance(value) { bodyInstance = value; } provide('NPopover', { getTriggerElement, handleKeydown, handleMouseEnter, handleMouseLeave, handleClickOutside, handleMouseMoveOutside, setBodyInstance, positionManuallyRef, isMountedRef, zIndexRef: toRef(props, 'zIndex'), extraClassRef: toRef(props, 'internalExtraClass'), internalRenderBodyRef: toRef(props, 'internalRenderBody') }); watchEffect(() => { if (mergedShowWithoutDisabledRef.value && getMergedDisabled()) { doUpdateShow(false); } }); const returned = { binderInstRef, positionManually: positionManuallyRef, mergedShowConsideringDisabledProp: mergedShowConsideringDisabledPropRef, // if to show popover body uncontrolledShow: uncontrolledShowRef, mergedShowArrow: mergedShowArrowRef, getMergedShow, setShow, handleClick, handleMouseEnter, handleMouseLeave, handleFocus, handleBlur, syncPosition }; return returned; }, render() { var _a; const { positionManually, $slots: slots } = this; let triggerVNode; let popoverInside = false; if (!positionManually) { triggerVNode = getFirstSlotVNode(slots, 'trigger'); if (triggerVNode) { triggerVNode = cloneVNode(triggerVNode); triggerVNode = triggerVNode.type === Text ? h('span', [triggerVNode]) : triggerVNode; const handlers = { onClick: this.handleClick, onMouseenter: this.handleMouseEnter, onMouseleave: this.handleMouseLeave, onFocus: this.handleFocus, onBlur: this.handleBlur }; if ((_a = triggerVNode.type) === null || _a === void 0 ? void 0 : _a.__popover__) { popoverInside = true; // We assume that there's no DOM event handlers on popover element if (!triggerVNode.props) { triggerVNode.props = { internalSyncTargetWithParent: true, internalInheritedEventHandlers: [] }; } triggerVNode.props.internalSyncTargetWithParent = true; if (!triggerVNode.props.internalInheritedEventHandlers) { triggerVNode.props.internalInheritedEventHandlers = [handlers]; } else { triggerVNode.props.internalInheritedEventHandlers = [handlers, ...triggerVNode.props.internalInheritedEventHandlers]; } } else { const { internalInheritedEventHandlers } = this; const ascendantAndCurrentHandlers = [handlers, ...internalInheritedEventHandlers]; const mergedHandlers = { onBlur: e => { ascendantAndCurrentHandlers.forEach(_handlers => { _handlers.onBlur(e); }); }, onFocus: e => { ascendantAndCurrentHandlers.forEach(_handlers => { _handlers.onFocus(e); }); }, onClick: e => { ascendantAndCurrentHandlers.forEach(_handlers => { _handlers.onClick(e); }); }, onMouseenter: e => { ascendantAndCurrentHandlers.forEach(_handlers => { _handlers.onMouseenter(e); }); }, onMouseleave: e => { ascendantAndCurrentHandlers.forEach(_handlers => { _handlers.onMouseleave(e); }); } }; appendEvents(triggerVNode, internalInheritedEventHandlers ? 'nested' : positionManually ? 'manual' : this.trigger, mergedHandlers); } } } return h(src_Binder, { ref: "binderInstRef", syncTarget: !popoverInside, syncTargetWithParent: this.internalSyncTargetWithParent }, { default: () => { // We need to subscribe it. Sometimes rerender won't ge triggered. // `mergedShowConsideringDisabledProp` is not the final disabled status. // In ellpisis it's dynamic. void this.mergedShowConsideringDisabledProp; const mergedShow = this.getMergedShow(); return [this.internalTrapFocus && mergedShow ? withDirectives(h("div", { style: { position: 'fixed', top: 0, right: 0, bottom: 0, left: 0 } }), [[es_zindexable, { enabled: mergedShow, zIndex: this.zIndex }]]) : null, positionManually ? null : h(Target, null, { default: () => triggerVNode }), h(PopoverBody, keep(this.$props, bodyPropKeys, Object.assign(Object.assign({}, this.$attrs), { showArrow: this.mergedShowArrow, show: mergedShow })), { default: () => { var _a, _b; return (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a); }, header: () => { var _a, _b; return (_b = (_a = this.$slots).header) === null || _b === void 0 ? void 0 : _b.call(_a); }, footer: () => { var _a, _b; return (_b = (_a = this.$slots).footer) === null || _b === void 0 ? void 0 : _b.call(_a); } })]; } }); } })); ;// ./node_modules/naive-ui/es/_internal/icon/src/styles/index.cssr.mjs /* harmony default export */ var icon_src_styles_index_cssr = (cB('base-icon', ` height: 1em; width: 1em; line-height: 1em; text-align: center; display: inline-block; position: relative; fill: currentColor; transform: translateZ(0); `, [cssr_c('svg', ` height: 1em; width: 1em; `)])); ;// ./node_modules/naive-ui/es/_internal/icon/src/Icon.mjs /* harmony default export */ var Icon = (defineComponent({ name: 'BaseIcon', props: { role: String, ariaLabel: String, ariaDisabled: { type: Boolean, default: undefined }, ariaHidden: { type: Boolean, default: undefined }, clsPrefix: { type: String, required: true }, onClick: Function, onMousedown: Function, onMouseup: Function }, setup(props) { useStyle('-base-icon', icon_src_styles_index_cssr, toRef(props, 'clsPrefix')); }, render() { return h("i", { class: `${this.clsPrefix}-base-icon`, onClick: this.onClick, onMousedown: this.onMousedown, onMouseup: this.onMouseup, role: this.role, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "aria-disabled": this.ariaDisabled }, this.$slots); } })); ;// ./node_modules/lodash-es/_baseSlice.js /** * The base implementation of `_.slice` without an iteratee call guard. * * @private * @param {Array} array The array to slice. * @param {number} [start=0] The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the slice of `array`. */ function baseSlice(array, start, end) { var index = -1, length = array.length; if (start < 0) { start = -start > length ? 0 : (length + start); } end = end > length ? length : end; if (end < 0) { end += length; } length = start > end ? 0 : ((end - start) >>> 0); start >>>= 0; var result = Array(length); while (++index < length) { result[index] = array[index + start]; } return result; } /* harmony default export */ var _baseSlice = (baseSlice); ;// ./node_modules/lodash-es/_castSlice.js /** * Casts `array` to a slice if it's needed. * * @private * @param {Array} array The array to inspect. * @param {number} start The start position. * @param {number} [end=array.length] The end position. * @returns {Array} Returns the cast slice. */ function castSlice(array, start, end) { var length = array.length; end = end === undefined ? length : end; return (!start && end >= length) ? array : _baseSlice(array, start, end); } /* harmony default export */ var _castSlice = (castSlice); ;// ./node_modules/lodash-es/_hasUnicode.js /** Used to compose unicode character classes. */ var rsAstralRange = '\\ud800-\\udfff', rsComboMarksRange = '\\u0300-\\u036f', reComboHalfMarksRange = '\\ufe20-\\ufe2f', rsComboSymbolsRange = '\\u20d0-\\u20ff', rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsZWJ = '\\u200d'; /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); /** * Checks if `string` contains Unicode symbols. * * @private * @param {string} string The string to inspect. * @returns {boolean} Returns `true` if a symbol is found, else `false`. */ function hasUnicode(string) { return reHasUnicode.test(string); } /* harmony default export */ var _hasUnicode = (hasUnicode); ;// ./node_modules/lodash-es/_asciiToArray.js /** * Converts an ASCII `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function asciiToArray(string) { return string.split(''); } /* harmony default export */ var _asciiToArray = (asciiToArray); ;// ./node_modules/lodash-es/_unicodeToArray.js /** Used to compose unicode character classes. */ var _unicodeToArray_rsAstralRange = '\\ud800-\\udfff', _unicodeToArray_rsComboMarksRange = '\\u0300-\\u036f', _unicodeToArray_reComboHalfMarksRange = '\\ufe20-\\ufe2f', _unicodeToArray_rsComboSymbolsRange = '\\u20d0-\\u20ff', _unicodeToArray_rsComboRange = _unicodeToArray_rsComboMarksRange + _unicodeToArray_reComboHalfMarksRange + _unicodeToArray_rsComboSymbolsRange, _unicodeToArray_rsVarRange = '\\ufe0e\\ufe0f'; /** Used to compose unicode capture groups. */ var rsAstral = '[' + _unicodeToArray_rsAstralRange + ']', rsCombo = '[' + _unicodeToArray_rsComboRange + ']', rsFitz = '\\ud83c[\\udffb-\\udfff]', rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', rsNonAstral = '[^' + _unicodeToArray_rsAstralRange + ']', rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', _unicodeToArray_rsZWJ = '\\u200d'; /** Used to compose unicode regexes. */ var reOptMod = rsModifier + '?', rsOptVar = '[' + _unicodeToArray_rsVarRange + ']?', rsOptJoin = '(?:' + _unicodeToArray_rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', rsSeq = rsOptVar + reOptMod + rsOptJoin, rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); /** * Converts a Unicode `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function unicodeToArray(string) { return string.match(reUnicode) || []; } /* harmony default export */ var _unicodeToArray = (unicodeToArray); ;// ./node_modules/lodash-es/_stringToArray.js /** * Converts `string` to an array. * * @private * @param {string} string The string to convert. * @returns {Array} Returns the converted array. */ function stringToArray(string) { return _hasUnicode(string) ? _unicodeToArray(string) : _asciiToArray(string); } /* harmony default export */ var _stringToArray = (stringToArray); ;// ./node_modules/lodash-es/_createCaseFirst.js /** * Creates a function like `_.lowerFirst`. * * @private * @param {string} methodName The name of the `String` case method to use. * @returns {Function} Returns the new case function. */ function createCaseFirst(methodName) { return function(string) { string = lodash_es_toString(string); var strSymbols = _hasUnicode(string) ? _stringToArray(string) : undefined; var chr = strSymbols ? strSymbols[0] : string.charAt(0); var trailing = strSymbols ? _castSlice(strSymbols, 1).join('') : string.slice(1); return chr[methodName]() + trailing; }; } /* harmony default export */ var _createCaseFirst = (createCaseFirst); ;// ./node_modules/lodash-es/upperFirst.js /** * Converts the first character of `string` to upper case. * * @static * @memberOf _ * @since 4.0.0 * @category String * @param {string} [string=''] The string to convert. * @returns {string} Returns the converted string. * @example * * _.upperFirst('fred'); * // => 'Fred' * * _.upperFirst('FRED'); * // => 'FRED' */ var upperFirst = _createCaseFirst('toUpperCase'); /* harmony default export */ var lodash_es_upperFirst = (upperFirst); ;// ./node_modules/naive-ui/es/_internal/icons/replaceable.mjs function replaceable(name, icon) { const IconComponent = defineComponent({ render() { return icon(); } }); return defineComponent({ name: lodash_es_upperFirst(name), setup() { var _a; const mergedIconsRef = (_a = runtime_core_esm_bundler_inject(context_configProviderInjectionKey, null)) === null || _a === void 0 ? void 0 : _a.mergedIconsRef; return () => { var _a; const iconOverride = (_a = mergedIconsRef === null || mergedIconsRef === void 0 ? void 0 : mergedIconsRef.value) === null || _a === void 0 ? void 0 : _a[name]; return iconOverride ? iconOverride() : h(IconComponent, null); }; } }); } ;// ./node_modules/naive-ui/es/_internal/icons/Close.mjs /* harmony default export */ var Close = (replaceable('close', () => h("svg", { viewBox: "0 0 12 12", version: "1.1", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": true }, h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" }, h("g", { fill: "currentColor", "fill-rule": "nonzero" }, h("path", { d: "M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z" })))))); ;// ./node_modules/naive-ui/es/_internal/close/src/styles/index.cssr.mjs // vars: // --n-close-border-radius // --n-close-color-hover // --n-close-color-pressed // --n-close-icon-color // --n-close-icon-color-hover // --n-close-icon-color-pressed // --n-close-icon-color-disabled /* harmony default export */ var close_src_styles_index_cssr = (cB('base-close', ` display: flex; align-items: center; justify-content: center; cursor: pointer; background-color: transparent; color: var(--n-close-icon-color); border-radius: var(--n-close-border-radius); height: var(--n-close-size); width: var(--n-close-size); font-size: var(--n-close-icon-size); outline: none; border: none; position: relative; padding: 0; `, [cM('absolute', ` height: var(--n-close-icon-size); width: var(--n-close-icon-size); `), cssr_c('&::before', ` content: ""; position: absolute; width: var(--n-close-size); height: var(--n-close-size); left: 50%; top: 50%; transform: translateY(-50%) translateX(-50%); transition: inherit; border-radius: inherit; `), cNotM('disabled', [cssr_c('&:hover', ` color: var(--n-close-icon-color-hover); `), cssr_c('&:hover::before', ` background-color: var(--n-close-color-hover); `), cssr_c('&:focus::before', ` background-color: var(--n-close-color-hover); `), cssr_c('&:active', ` color: var(--n-close-icon-color-pressed); `), cssr_c('&:active::before', ` background-color: var(--n-close-color-pressed); `)]), cM('disabled', ` cursor: not-allowed; color: var(--n-close-icon-color-disabled); background-color: transparent; `), cM('round', [cssr_c('&::before', ` border-radius: 50%; `)])])); ;// ./node_modules/naive-ui/es/_internal/close/src/Close.mjs /* harmony default export */ var src_Close = (defineComponent({ name: 'BaseClose', props: { isButtonTag: { type: Boolean, default: true }, clsPrefix: { type: String, required: true }, disabled: { type: Boolean, default: undefined }, focusable: { type: Boolean, default: true }, round: Boolean, onClick: Function, absolute: Boolean }, setup(props) { useStyle('-base-close', close_src_styles_index_cssr, toRef(props, 'clsPrefix')); return () => { const { clsPrefix, disabled, absolute, round, isButtonTag } = props; const Tag = isButtonTag ? 'button' : 'div'; return h(Tag, { type: isButtonTag ? 'button' : undefined, tabindex: disabled || !props.focusable ? -1 : 0, "aria-disabled": disabled, "aria-label": "close", role: isButtonTag ? undefined : 'button', disabled: disabled, class: [`${clsPrefix}-base-close`, absolute && `${clsPrefix}-base-close--absolute`, disabled && `${clsPrefix}-base-close--disabled`, round && `${clsPrefix}-base-close--round`], onMousedown: e => { if (!props.focusable) { e.preventDefault(); } }, onClick: props.onClick }, h(Icon, { clsPrefix: clsPrefix }, { default: () => h(Close, null) })); }; } })); ;// ./node_modules/naive-ui/es/_utils/vue/keysOf.mjs function keysOf(obj) { return Object.keys(obj); } ;// ./node_modules/naive-ui/es/card/styles/_common.mjs /* harmony default export */ var card_styles_common = ({ paddingSmall: '12px 16px 12px', paddingMedium: '19px 24px 20px', paddingLarge: '23px 32px 24px', paddingHuge: '27px 40px 28px', titleFontSizeSmall: '16px', titleFontSizeMedium: '18px', titleFontSizeLarge: '18px', titleFontSizeHuge: '18px', closeIconSize: '18px', closeSize: '22px' }); ;// ./node_modules/naive-ui/es/card/styles/light.mjs function card_styles_light_self(vars) { const { primaryColor, borderRadius, lineHeight, fontSize, cardColor, textColor2, textColor1, dividerColor, fontWeightStrong, closeIconColor, closeIconColorHover, closeIconColorPressed, closeColorHover, closeColorPressed, modalColor, boxShadow1, popoverColor, actionColor } = vars; return Object.assign(Object.assign({}, card_styles_common), { lineHeight, color: cardColor, colorModal: modalColor, colorPopover: popoverColor, colorTarget: primaryColor, colorEmbedded: actionColor, colorEmbeddedModal: actionColor, colorEmbeddedPopover: actionColor, textColor: textColor2, titleTextColor: textColor1, borderColor: dividerColor, actionColor, titleFontWeight: fontWeightStrong, closeColorHover, closeColorPressed, closeBorderRadius: borderRadius, closeIconColor, closeIconColorHover, closeIconColorPressed, fontSizeSmall: fontSize, fontSizeMedium: fontSize, fontSizeLarge: fontSize, fontSizeHuge: fontSize, boxShadow: boxShadow1, borderRadius }); } const cardLight = { name: 'Card', common: light, self: card_styles_light_self }; /* harmony default export */ var card_styles_light = (cardLight); ;// ./node_modules/naive-ui/es/card/src/styles/index.cssr.mjs // vars: // --n-bezier // --n-border-radius // --n-color // --n-color-modal // --n-color-popover // --n-text-color // --n-line-height // --n-padding-top // --n-padding-bottom // --n-padding-left // --n-font-size // --n-action-color // --n-title-font-weight // --n-title-font-size // --n-title-text-color // --n-close-size // --n-close-icon-size // --n-close-color-hover // --n-close-color-pressed // --n-close-icon-color // --n-close-icon-color-hover // --n-close-icon-color-pressed // --n-border-color // --n-box-shadow // --n-color-embedded // --n-color-embedded-modal // --n-color-embedded-popover /* harmony default export */ var card_src_styles_index_cssr = (cssr_c([cB('card', ` font-size: var(--n-font-size); line-height: var(--n-line-height); display: flex; flex-direction: column; width: 100%; box-sizing: border-box; position: relative; border-radius: var(--n-border-radius); background-color: var(--n-color); color: var(--n-text-color); word-break: break-word; transition: color .3s var(--n-bezier), background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier), border-color .3s var(--n-bezier); `, [asModal({ background: 'var(--n-color-modal)' }), cM('hoverable', [cssr_c('&:hover', 'box-shadow: var(--n-box-shadow);')]), cM('content-segmented', [cssr_c('>', [cE('content', { paddingTop: 'var(--n-padding-bottom)' })])]), cM('content-soft-segmented', [cssr_c('>', [cE('content', ` margin: 0 var(--n-padding-left); padding: var(--n-padding-bottom) 0; `)])]), cM('footer-segmented', [cssr_c('>', [cE('footer', { paddingTop: 'var(--n-padding-bottom)' })])]), cM('footer-soft-segmented', [cssr_c('>', [cE('footer', ` padding: var(--n-padding-bottom) 0; margin: 0 var(--n-padding-left); `)])]), cssr_c('>', [cB('card-header', ` box-sizing: border-box; display: flex; align-items: center; font-size: var(--n-title-font-size); padding: var(--n-padding-top) var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left); `, [cE('main', ` font-weight: var(--n-title-font-weight); transition: color .3s var(--n-bezier); flex: 1; min-width: 0; color: var(--n-title-text-color); `), cE('extra', ` display: flex; align-items: center; font-size: var(--n-font-size); font-weight: 400; transition: color .3s var(--n-bezier); color: var(--n-text-color); `), cE('close', ` margin: 0 0 0 8px; transition: background-color .3s var(--n-bezier), color .3s var(--n-bezier); `)]), cE('action', ` box-sizing: border-box; transition: background-color .3s var(--n-bezier), border-color .3s var(--n-bezier); background-clip: padding-box; background-color: var(--n-action-color); `), cE('content', 'flex: 1; min-width: 0;'), cE('content, footer', ` box-sizing: border-box; padding: 0 var(--n-padding-left) var(--n-padding-bottom) var(--n-padding-left); font-size: var(--n-font-size); `, [cssr_c('&:first-child', { paddingTop: 'var(--n-padding-bottom)' })]), cE('action', ` background-color: var(--n-action-color); padding: var(--n-padding-bottom) var(--n-padding-left); border-bottom-left-radius: var(--n-border-radius); border-bottom-right-radius: var(--n-border-radius); `)]), cB('card-cover', ` overflow: hidden; width: 100%; border-radius: var(--n-border-radius) var(--n-border-radius) 0 0; `, [cssr_c('img', ` display: block; width: 100%; `)]), cM('bordered', ` border: 1px solid var(--n-border-color); `, [cssr_c('&:target', 'border-color: var(--n-color-target);')]), cM('action-segmented', [cssr_c('>', [cE('action', [cssr_c('&:not(:first-child)', { borderTop: '1px solid var(--n-border-color)' })])])]), cM('content-segmented, content-soft-segmented', [cssr_c('>', [cE('content', { transition: 'border-color 0.3s var(--n-bezier)' }, [cssr_c('&:not(:first-child)', { borderTop: '1px solid var(--n-border-color)' })])])]), cM('footer-segmented, footer-soft-segmented', [cssr_c('>', [cE('footer', { transition: 'border-color 0.3s var(--n-bezier)' }, [cssr_c('&:not(:first-child)', { borderTop: '1px solid var(--n-border-color)' })])])]), cM('embedded', ` background-color: var(--n-color-embedded); `)]), insideModal(cB('card', ` background: var(--n-color-modal); `, [cM('embedded', ` background-color: var(--n-color-embedded-modal); `)])), insidePopover(cB('card', ` background: var(--n-color-popover); `, [cM('embedded', ` background-color: var(--n-color-embedded-popover); `)]))])); ;// ./node_modules/naive-ui/es/card/src/Card.mjs const cardBaseProps = { title: [String, Function], contentClass: String, contentStyle: [Object, String], headerClass: String, headerStyle: [Object, String], headerExtraClass: String, headerExtraStyle: [Object, String], footerClass: String, footerStyle: [Object, String], embedded: Boolean, segmented: { type: [Boolean, Object], default: false }, size: { type: String, default: 'medium' }, bordered: { type: Boolean, default: true }, closable: Boolean, hoverable: Boolean, role: String, onClose: [Function, Array], tag: { type: String, default: 'div' }, cover: Function, content: [String, Function], footer: Function, action: Function, headerExtra: Function }; const cardBasePropKeys = keysOf(cardBaseProps); const cardProps = Object.assign(Object.assign({}, use_theme.props), cardBaseProps); /* harmony default export */ var Card = (defineComponent({ name: 'Card', props: cardProps, slots: Object, setup(props) { const handleCloseClick = () => { const { onClose } = props; if (onClose) call(onClose); }; const { inlineThemeDisabled, mergedClsPrefixRef, mergedRtlRef } = useConfig(props); const themeRef = use_theme('Card', '-card', card_src_styles_index_cssr, card_styles_light, props, mergedClsPrefixRef); const rtlEnabledRef = useRtl('Card', mergedRtlRef, mergedClsPrefixRef); const cssVarsRef = runtime_core_esm_bundler_computed(() => { const { size } = props; const { self: { color, colorModal, colorTarget, textColor, titleTextColor, titleFontWeight, borderColor, actionColor, borderRadius, lineHeight, closeIconColor, closeIconColorHover, closeIconColorPressed, closeColorHover, closeColorPressed, closeBorderRadius, closeIconSize, closeSize, boxShadow, colorPopover, colorEmbedded, colorEmbeddedModal, colorEmbeddedPopover, [createKey('padding', size)]: padding, [createKey('fontSize', size)]: fontSize, [createKey('titleFontSize', size)]: titleFontSize }, common: { cubicBezierEaseInOut } } = themeRef.value; const { top: paddingTop, left: paddingLeft, bottom: paddingBottom } = getMargin(padding); return { '--n-bezier': cubicBezierEaseInOut, '--n-border-radius': borderRadius, '--n-color': color, '--n-color-modal': colorModal, '--n-color-popover': colorPopover, '--n-color-embedded': colorEmbedded, '--n-color-embedded-modal': colorEmbeddedModal, '--n-color-embedded-popover': colorEmbeddedPopover, '--n-color-target': colorTarget, '--n-text-color': textColor, '--n-line-height': lineHeight, '--n-action-color': actionColor, '--n-title-text-color': titleTextColor, '--n-title-font-weight': titleFontWeight, '--n-close-icon-color': closeIconColor, '--n-close-icon-color-hover': closeIconColorHover, '--n-close-icon-color-pressed': closeIconColorPressed, '--n-close-color-hover': closeColorHover, '--n-close-color-pressed': closeColorPressed, '--n-border-color': borderColor, '--n-box-shadow': boxShadow, // size '--n-padding-top': paddingTop, '--n-padding-bottom': paddingBottom, '--n-padding-left': paddingLeft, '--n-font-size': fontSize, '--n-title-font-size': titleFontSize, '--n-close-size': closeSize, '--n-close-icon-size': closeIconSize, '--n-close-border-radius': closeBorderRadius }; }); const themeClassHandle = inlineThemeDisabled ? useThemeClass('card', runtime_core_esm_bundler_computed(() => { return props.size[0]; }), cssVarsRef, props) : undefined; return { rtlEnabled: rtlEnabledRef, mergedClsPrefix: mergedClsPrefixRef, mergedTheme: themeRef, handleCloseClick, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }; }, render() { const { segmented, bordered, hoverable, mergedClsPrefix, rtlEnabled, onRender, embedded, tag: Component, $slots } = this; onRender === null || onRender === void 0 ? void 0 : onRender(); return h(Component, { class: [`${mergedClsPrefix}-card`, this.themeClass, embedded && `${mergedClsPrefix}-card--embedded`, { [`${mergedClsPrefix}-card--rtl`]: rtlEnabled, [`${mergedClsPrefix}-card--content${typeof segmented !== 'boolean' && segmented.content === 'soft' ? '-soft' : ''}-segmented`]: segmented === true || segmented !== false && segmented.content, [`${mergedClsPrefix}-card--footer${typeof segmented !== 'boolean' && segmented.footer === 'soft' ? '-soft' : ''}-segmented`]: segmented === true || segmented !== false && segmented.footer, [`${mergedClsPrefix}-card--action-segmented`]: segmented === true || segmented !== false && segmented.action, [`${mergedClsPrefix}-card--bordered`]: bordered, [`${mergedClsPrefix}-card--hoverable`]: hoverable }], style: this.cssVars, role: this.role }, resolveWrappedSlot($slots.cover, children => { const mergedChildren = this.cover ? resolve_slot_ensureValidVNode([this.cover()]) : children; return mergedChildren && h("div", { class: `${mergedClsPrefix}-card-cover`, role: "none" }, mergedChildren); }), resolveWrappedSlot($slots.header, children => { const { title } = this; const mergedChildren = title ? resolve_slot_ensureValidVNode(typeof title === 'function' ? [title()] : [title]) : children; return mergedChildren || this.closable ? h("div", { class: [`${mergedClsPrefix}-card-header`, this.headerClass], style: this.headerStyle, role: "heading" }, h("div", { class: `${mergedClsPrefix}-card-header__main`, role: "heading" }, mergedChildren), resolveWrappedSlot($slots['header-extra'], children => { const mergedChildren = this.headerExtra ? resolve_slot_ensureValidVNode([this.headerExtra()]) : children; return mergedChildren && h("div", { class: [`${mergedClsPrefix}-card-header__extra`, this.headerExtraClass], style: this.headerExtraStyle }, mergedChildren); }), this.closable && h(src_Close, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-card-header__close`, onClick: this.handleCloseClick, absolute: true })) : null; }), resolveWrappedSlot($slots.default, children => { const { content } = this; const mergedChildren = content ? resolve_slot_ensureValidVNode(typeof content === 'function' ? [content()] : [content]) : children; return mergedChildren && h("div", { class: [`${mergedClsPrefix}-card__content`, this.contentClass], style: this.contentStyle, role: "none" }, mergedChildren); }), resolveWrappedSlot($slots.footer, children => { const mergedChildren = this.footer ? resolve_slot_ensureValidVNode([this.footer()]) : children; return mergedChildren && h("div", { class: [`${mergedClsPrefix}-card__footer`, this.footerClass], style: this.footerStyle, role: "none" }, mergedChildren); }), resolveWrappedSlot($slots.action, children => { const mergedChildren = this.action ? resolve_slot_ensureValidVNode([this.action()]) : children; return mergedChildren && h("div", { class: `${mergedClsPrefix}-card__action`, role: "none" }, mergedChildren); })); } })); ;// ./node_modules/seemly/es/css/responsive.js function parseResponsiveProp(reponsiveProp) { if (typeof reponsiveProp === "number") { return { '': reponsiveProp.toString() }; } const params = {}; reponsiveProp.split(/ +/).forEach((pairLiteral) => { if (pairLiteral === '') return; const [prefix, value] = pairLiteral.split(':'); if (value === undefined) { params[''] = prefix; } else { params[prefix] = value; } }); return params; } function parseResponsivePropValue(reponsiveProp, activeKeyOrSize) { var _a; if (reponsiveProp === undefined || reponsiveProp === null) return undefined; const classObj = parseResponsiveProp(reponsiveProp); if (activeKeyOrSize === undefined) return classObj['']; if (typeof activeKeyOrSize === 'string') { return (_a = classObj[activeKeyOrSize]) !== null && _a !== void 0 ? _a : classObj['']; } else if (Array.isArray(activeKeyOrSize)) { for (let i = activeKeyOrSize.length - 1; i >= 0; --i) { const key = activeKeyOrSize[i]; if (key in classObj) return classObj[key]; } return classObj['']; } else { // Here we suppose all the keys are number formatted let activeValue = undefined; let activeKey = -1; Object.keys(classObj).forEach((key) => { const keyAsNum = Number(key); if (!Number.isNaN(keyAsNum) && activeKeyOrSize >= keyAsNum && keyAsNum >= activeKey) { activeKey = keyAsNum; activeValue = classObj[key]; } }); return activeValue; } } ;// ./node_modules/vooks/es/use-breakpoints.js /* eslint-disable @typescript-eslint/consistent-type-assertions */ const defaultBreakpointOptions = { // mobile // 0 ~ 640 doesn't mean it should display well in all the range, // but means you should treat it like a mobile phone.) xs: 0, s: 640, m: 1024, l: 1280, xl: 1536, '2xl': 1920 // normal desktop display }; function createMediaQuery(screenWidth) { return `(min-width: ${screenWidth}px)`; } const mqlMap = {}; function useBreakpoints(screens = defaultBreakpointOptions) { if (!utils_isBrowser) return runtime_core_esm_bundler_computed(() => []); // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (typeof window.matchMedia !== 'function') return runtime_core_esm_bundler_computed(() => []); const breakpointStatusRef = ref({}); const breakpoints = Object.keys(screens); const updateBreakpoints = (e, breakpointName) => { if (e.matches) breakpointStatusRef.value[breakpointName] = true; else breakpointStatusRef.value[breakpointName] = false; }; breakpoints.forEach((key) => { const breakpointValue = screens[key]; let mql; let cbs; if (mqlMap[breakpointValue] === undefined) { mql = window.matchMedia(createMediaQuery(breakpointValue)); // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions if (mql.addEventListener) { mql.addEventListener('change', (e) => { cbs.forEach((cb) => { cb(e, key); }); }); // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions } else if (mql.addListener) { mql.addListener((e) => { cbs.forEach((cb) => { cb(e, key); }); }); } cbs = new Set(); mqlMap[breakpointValue] = { mql, cbs }; } else { mql = mqlMap[breakpointValue].mql; cbs = mqlMap[breakpointValue].cbs; } cbs.add(updateBreakpoints); if (mql.matches) { cbs.forEach((cb) => { cb(mql, key); }); } }); runtime_core_esm_bundler_onBeforeUnmount(() => { breakpoints.forEach((breakpoint) => { const { cbs } = mqlMap[screens[breakpoint]]; if (cbs.has(updateBreakpoints)) { cbs.delete(updateBreakpoints); } }); }); return runtime_core_esm_bundler_computed(() => { const { value } = breakpointStatusRef; return breakpoints.filter((key) => value[key]); }); } /* harmony default export */ var use_breakpoints = (useBreakpoints); ;// ./node_modules/naive-ui/es/_utils/vue/is-node-v-show-false.mjs function isNodeVShowFalse(vNode) { var _a; const showDir = (_a = vNode.dirs) === null || _a === void 0 ? void 0 : _a.find(({ dir }) => dir === vShow); return !!(showDir && showDir.value === false); } ;// ./node_modules/naive-ui/es/config-provider/src/config.mjs const defaultBreakpoints = { xs: 0, // mobile s: 640, // tablet m: 1024, // laptop s l: 1280, // laptop xl: 1536, // laptop l xxl: 1920 // normal desktop display }; ;// ./node_modules/naive-ui/es/grid/src/config.mjs const defaultSpan = 1; const gridInjectionKey = createInjectionKey('n-grid'); ;// ./node_modules/naive-ui/es/grid/src/Grid.mjs const defaultCols = 24; const SSR_ATTR_NAME = '__ssr__'; const gridProps = { layoutShiftDisabled: Boolean, responsive: { type: [String, Boolean], default: 'self' }, cols: { type: [Number, String], default: defaultCols }, itemResponsive: Boolean, collapsed: Boolean, // may create grid rows < collapsedRows since a item may take all the row collapsedRows: { type: Number, default: 1 }, itemStyle: [Object, String], xGap: { type: [Number, String], default: 0 }, yGap: { type: [Number, String], default: 0 } }; /* harmony default export */ var Grid = (defineComponent({ name: 'Grid', inheritAttrs: false, props: gridProps, setup(props) { const { mergedClsPrefixRef, mergedBreakpointsRef } = useConfig(props); const numRegex = /^\d+$/; const widthRef = ref(undefined); const breakpointsRef = use_breakpoints((mergedBreakpointsRef === null || mergedBreakpointsRef === void 0 ? void 0 : mergedBreakpointsRef.value) || defaultBreakpoints); const isResponsiveRef = use_memo(() => { if (props.itemResponsive) return true; if (!numRegex.test(props.cols.toString())) return true; if (!numRegex.test(props.xGap.toString())) return true; if (!numRegex.test(props.yGap.toString())) return true; return false; }); const responsiveQueryRef = runtime_core_esm_bundler_computed(() => { if (!isResponsiveRef.value) return undefined; return props.responsive === 'self' ? widthRef.value : breakpointsRef.value; }); const responsiveColsRef = use_memo(() => { var _a; return (_a = Number(parseResponsivePropValue(props.cols.toString(), responsiveQueryRef.value))) !== null && _a !== void 0 ? _a : defaultCols; }); const responsiveXGapRef = use_memo(() => parseResponsivePropValue(props.xGap.toString(), responsiveQueryRef.value)); const responsiveYGapRef = use_memo(() => parseResponsivePropValue(props.yGap.toString(), responsiveQueryRef.value)); const handleResize = entry => { widthRef.value = entry.contentRect.width; }; const handleResizeRaf = entry => { beforeNextFrameOnce(handleResize, entry); }; const overflowRef = ref(false); const handleResizeRef = runtime_core_esm_bundler_computed(() => { if (props.responsive === 'self') { return handleResizeRaf; } return undefined; }); // for SSR, fix bug https://github.com/tusen-ai/naive-ui/issues/2462 const isSsrRef = ref(false); const contentElRef = ref(); runtime_core_esm_bundler_onMounted(() => { const { value: contentEl } = contentElRef; if (contentEl) { if (contentEl.hasAttribute(SSR_ATTR_NAME)) { contentEl.removeAttribute(SSR_ATTR_NAME); isSsrRef.value = true; } } }); provide(gridInjectionKey, { layoutShiftDisabledRef: toRef(props, 'layoutShiftDisabled'), isSsrRef, itemStyleRef: toRef(props, 'itemStyle'), xGapRef: responsiveXGapRef, overflowRef }); return { isSsr: !is_browser_isBrowser, contentEl: contentElRef, mergedClsPrefix: mergedClsPrefixRef, style: runtime_core_esm_bundler_computed(() => { if (props.layoutShiftDisabled) { return { width: '100%', display: 'grid', gridTemplateColumns: `repeat(${props.cols}, minmax(0, 1fr))`, columnGap: pxfy(props.xGap), rowGap: pxfy(props.yGap) }; } return { width: '100%', display: 'grid', gridTemplateColumns: `repeat(${responsiveColsRef.value}, minmax(0, 1fr))`, columnGap: pxfy(responsiveXGapRef.value), rowGap: pxfy(responsiveYGapRef.value) }; }), isResponsive: isResponsiveRef, responsiveQuery: responsiveQueryRef, responsiveCols: responsiveColsRef, handleResize: handleResizeRef, overflow: overflowRef }; }, render() { if (this.layoutShiftDisabled) { return h('div', mergeProps({ ref: 'contentEl', class: `${this.mergedClsPrefix}-grid`, style: this.style }, this.$attrs), this.$slots); } const renderContent = () => { var _a, _b, _c, _d, _e, _f, _g; this.overflow = false; // render will be called twice when mounted, I can't figure out why // 2 jobs will be pushed into job queues with same id, and then be flushed const rawChildren = flatten_flatten(getSlot(this)); const childrenAndRawSpan = []; const { collapsed, collapsedRows, responsiveCols, responsiveQuery } = this; rawChildren.forEach(child => { var _a, _b, _c, _d, _e; if (((_a = child === null || child === void 0 ? void 0 : child.type) === null || _a === void 0 ? void 0 : _a.__GRID_ITEM__) !== true) return; if (isNodeVShowFalse(child)) { const clonedNode = cloneVNode(child); if (clonedNode.props) { clonedNode.props.privateShow = false; } else { clonedNode.props = { privateShow: false }; } childrenAndRawSpan.push({ child: clonedNode, rawChildSpan: 0 }); return; } // We don't want v-show to control display, so we need to stripe it // here, nor it may mess child's style child.dirs = ((_b = child.dirs) === null || _b === void 0 ? void 0 : _b.filter(({ dir }) => dir !== vShow)) || null; if (((_c = child.dirs) === null || _c === void 0 ? void 0 : _c.length) === 0) { child.dirs = null; } const clonedChild = cloneVNode(child); const rawChildSpan = Number((_e = parseResponsivePropValue((_d = clonedChild.props) === null || _d === void 0 ? void 0 : _d.span, responsiveQuery)) !== null && _e !== void 0 ? _e : defaultSpan); if (rawChildSpan === 0) return; childrenAndRawSpan.push({ child: clonedChild, rawChildSpan }); }); let suffixSpan = 0; const maybeSuffixNode = (_a = childrenAndRawSpan[childrenAndRawSpan.length - 1]) === null || _a === void 0 ? void 0 : _a.child; if (maybeSuffixNode === null || maybeSuffixNode === void 0 ? void 0 : maybeSuffixNode.props) { const suffixPropValue = (_b = maybeSuffixNode.props) === null || _b === void 0 ? void 0 : _b.suffix; if (suffixPropValue !== undefined && suffixPropValue !== false) { suffixSpan = Number((_d = parseResponsivePropValue((_c = maybeSuffixNode.props) === null || _c === void 0 ? void 0 : _c.span, responsiveQuery)) !== null && _d !== void 0 ? _d : defaultSpan); maybeSuffixNode.props.privateSpan = suffixSpan; maybeSuffixNode.props.privateColStart = responsiveCols + 1 - suffixSpan; maybeSuffixNode.props.privateShow = (_e = maybeSuffixNode.props.privateShow) !== null && _e !== void 0 ? _e : true; } } let spanCounter = 0; let done = false; for (const { child, rawChildSpan } of childrenAndRawSpan) { if (done) { this.overflow = true; } if (!done) { const childOffset = Number((_g = parseResponsivePropValue((_f = child.props) === null || _f === void 0 ? void 0 : _f.offset, responsiveQuery)) !== null && _g !== void 0 ? _g : 0); // it could be 0 sometimes (v-show = false) const childSpan = Math.min(rawChildSpan + childOffset, responsiveCols); if (!child.props) { child.props = { privateSpan: childSpan, privateOffset: childOffset }; } else { child.props.privateSpan = childSpan; child.props.privateOffset = childOffset; } if (collapsed) { const remainder = spanCounter % responsiveCols; if (childSpan + remainder > responsiveCols) { spanCounter += responsiveCols - remainder; } if (childSpan + spanCounter + suffixSpan > collapsedRows * responsiveCols) { done = true; } else { spanCounter += childSpan; } } } if (done) { if (child.props) { // suffix node's privateShow may be true if (child.props.privateShow !== true) { child.props.privateShow = false; } } else { child.props = { privateShow: false }; } } } return h('div', mergeProps({ ref: 'contentEl', class: `${this.mergedClsPrefix}-grid`, style: this.style, [SSR_ATTR_NAME]: this.isSsr || undefined }, this.$attrs), childrenAndRawSpan.map(({ child }) => child)); }; return this.isResponsive && this.responsive === 'self' ? h(VResizeObserver, { onResize: this.handleResize }, { default: renderContent }) : renderContent(); } })); ;// ./node_modules/naive-ui/es/grid/src/GridItem.mjs const GridItem_defaultSpan = 1; const gridItemProps = { span: { type: [Number, String], default: GridItem_defaultSpan }, offset: { type: [Number, String], default: 0 }, suffix: Boolean, // private props privateOffset: Number, privateSpan: Number, privateColStart: Number, privateShow: { type: Boolean, default: true } }; const gridItemPropKeys = keysOf(gridItemProps); /* harmony default export */ var GridItem = (defineComponent({ __GRID_ITEM__: true, name: 'GridItem', alias: ['Gi'], props: gridItemProps, setup() { const { isSsrRef, xGapRef, itemStyleRef, overflowRef, layoutShiftDisabledRef } = runtime_core_esm_bundler_inject(gridInjectionKey); const self = runtime_core_esm_bundler_getCurrentInstance(); return { overflow: overflowRef, itemStyle: itemStyleRef, layoutShiftDisabled: layoutShiftDisabledRef, mergedXGap: runtime_core_esm_bundler_computed(() => { return pxfy(xGapRef.value || 0); }), deriveStyle: () => { void isSsrRef.value; // Here is quite a hack, I hope there is a better way to solve it const { privateSpan = GridItem_defaultSpan, privateShow = true, privateColStart = undefined, privateOffset = 0 } = self.vnode.props; const { value: xGap } = xGapRef; const mergedXGap = pxfy(xGap || 0); return { display: !privateShow ? 'none' : '', gridColumn: `${privateColStart !== null && privateColStart !== void 0 ? privateColStart : `span ${privateSpan}`} / span ${privateSpan}`, marginLeft: privateOffset ? `calc((100% - (${privateSpan} - 1) * ${mergedXGap}) / ${privateSpan} * ${privateOffset} + ${mergedXGap} * ${privateOffset})` : '' }; } }; }, render() { var _a, _b; if (this.layoutShiftDisabled) { const { span, offset, mergedXGap } = this; return h("div", { style: { gridColumn: `span ${span} / span ${span}`, marginLeft: offset ? `calc((100% - (${span} - 1) * ${mergedXGap}) / ${span} * ${offset} + ${mergedXGap} * ${offset})` : '' } }, this.$slots); } return h("div", { style: [this.itemStyle, this.deriveStyle()] }, (_b = (_a = this.$slots).default) === null || _b === void 0 ? void 0 : _b.call(_a, { overflow: this.overflow })); } })); ;// ./node_modules/naive-ui/es/form/styles/_common.mjs /* harmony default export */ var form_styles_common = ({ feedbackPadding: '4px 0 0 2px', feedbackHeightSmall: '24px', feedbackHeightMedium: '24px', feedbackHeightLarge: '26px', feedbackFontSizeSmall: '13px', feedbackFontSizeMedium: '14px', feedbackFontSizeLarge: '14px', labelFontSizeLeftSmall: '14px', labelFontSizeLeftMedium: '14px', labelFontSizeLeftLarge: '15px', labelFontSizeTopSmall: '13px', labelFontSizeTopMedium: '14px', labelFontSizeTopLarge: '14px', labelHeightSmall: '24px', labelHeightMedium: '26px', labelHeightLarge: '28px', labelPaddingVertical: '0 0 6px 2px', labelPaddingHorizontal: '0 12px 0 0', labelTextAlignVertical: 'left', labelTextAlignHorizontal: 'right', labelFontWeight: '400' }); ;// ./node_modules/naive-ui/es/form/styles/light.mjs function form_styles_light_self(vars) { const { heightSmall, heightMedium, heightLarge, textColor1, errorColor, warningColor, lineHeight, textColor3 } = vars; return Object.assign(Object.assign({}, form_styles_common), { blankHeightSmall: heightSmall, blankHeightMedium: heightMedium, blankHeightLarge: heightLarge, lineHeight, labelTextColor: textColor1, asteriskColor: errorColor, feedbackTextColorError: errorColor, feedbackTextColorWarning: warningColor, feedbackTextColor: textColor3 }); } const formLight = { name: 'Form', common: light, self: form_styles_light_self }; /* harmony default export */ var form_styles_light = (formLight); ;// ./node_modules/naive-ui/es/form/src/context.mjs const formInjectionKey = createInjectionKey('n-form'); const formItemInstsInjectionKey = createInjectionKey('n-form-item-insts'); ;// ./node_modules/naive-ui/es/form/src/styles/form.cssr.mjs /* harmony default export */ var form_cssr = (cB('form', [cM('inline', ` width: 100%; display: inline-flex; align-items: flex-start; align-content: space-around; `, [cB('form-item', { width: 'auto', marginRight: '18px' }, [cssr_c('&:last-child', { marginRight: 0 })])])])); ;// ./node_modules/naive-ui/es/form/src/Form.mjs var __awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; const formProps = Object.assign(Object.assign({}, use_theme.props), { inline: Boolean, labelWidth: [Number, String], labelAlign: String, labelPlacement: { type: String, default: 'top' }, model: { type: Object, default: () => {} }, rules: Object, disabled: Boolean, size: String, showRequireMark: { type: Boolean, default: undefined }, requireMarkPlacement: String, showFeedback: { type: Boolean, default: true }, onSubmit: { type: Function, default: e => { e.preventDefault(); } }, showLabel: { type: Boolean, default: undefined }, validateMessages: Object }); /* harmony default export */ var Form = (defineComponent({ name: 'Form', props: formProps, setup(props) { const { mergedClsPrefixRef } = useConfig(props); use_theme('Form', '-form', form_cssr, form_styles_light, props, mergedClsPrefixRef); // from path to form-item const formItems = {}; // for label-width = 'auto' const maxChildLabelWidthRef = ref(undefined); const deriveMaxChildLabelWidth = currentWidth => { const currentMaxChildLabelWidth = maxChildLabelWidthRef.value; if (currentMaxChildLabelWidth === undefined || currentWidth >= currentMaxChildLabelWidth) { maxChildLabelWidthRef.value = currentWidth; } }; function validate(validateCallback_1) { return __awaiter(this, arguments, void 0, function* (validateCallback, shouldRuleBeApplied = () => true) { return yield new Promise((resolve, reject) => { const formItemValidationPromises = []; for (const key of keysOf(formItems)) { const formItemInstances = formItems[key]; for (const formItemInstance of formItemInstances) { if (formItemInstance.path) { formItemValidationPromises.push(formItemInstance.internalValidate(null, shouldRuleBeApplied)); } } } void Promise.all(formItemValidationPromises).then(results => { const formInvalid = results.some(result => !result.valid); const errors = []; const warnings = []; results.forEach(result => { var _a, _b; if ((_a = result.errors) === null || _a === void 0 ? void 0 : _a.length) { errors.push(result.errors); } if ((_b = result.warnings) === null || _b === void 0 ? void 0 : _b.length) { warnings.push(result.warnings); } }); if (validateCallback) { validateCallback(errors.length ? errors : undefined, { warnings: warnings.length ? warnings : undefined }); } if (formInvalid) { reject(errors.length ? errors : undefined); } else { resolve({ warnings: warnings.length ? warnings : undefined }); } }); }); }); } function restoreValidation() { for (const key of keysOf(formItems)) { const formItemInstances = formItems[key]; for (const formItemInstance of formItemInstances) { formItemInstance.restoreValidation(); } } } provide(formInjectionKey, { props, maxChildLabelWidthRef, deriveMaxChildLabelWidth }); provide(formItemInstsInjectionKey, { formItems }); const formExposedMethod = { validate, restoreValidation }; return Object.assign(formExposedMethod, { mergedClsPrefix: mergedClsPrefixRef }); }, render() { const { mergedClsPrefix } = this; return h("form", { class: [`${mergedClsPrefix}-form`, this.inline && `${mergedClsPrefix}-form--inline`], onSubmit: this.onSubmit }, this.$slots); } })); ;// ./node_modules/async-validator/dist-web/index.js function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } /* eslint no-console:0 */ var formatRegExp = /%[sdj%]/g; var warning = function warning() {}; // don't print warning message when in production env or node runtime if (typeof process !== 'undefined' && process.env && "production" !== 'production' && 0 && 0) {} function convertFieldsError(errors) { if (!errors || !errors.length) return null; var fields = {}; errors.forEach(function (error) { var field = error.field; fields[field] = fields[field] || []; fields[field].push(error); }); return fields; } function format(template) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } var i = 0; var len = args.length; if (typeof template === 'function') { return template.apply(null, args); } if (typeof template === 'string') { var str = template.replace(formatRegExp, function (x) { if (x === '%%') { return '%'; } if (i >= len) { return x; } switch (x) { case '%s': return String(args[i++]); case '%d': return Number(args[i++]); case '%j': try { return JSON.stringify(args[i++]); } catch (_) { return '[Circular]'; } break; default: return x; } }); return str; } return template; } function isNativeStringType(type) { return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern'; } function isEmptyValue(value, type) { if (value === undefined || value === null) { return true; } if (type === 'array' && Array.isArray(value) && !value.length) { return true; } if (isNativeStringType(type) && typeof value === 'string' && !value) { return true; } return false; } function asyncParallelArray(arr, func, callback) { var results = []; var total = 0; var arrLength = arr.length; function count(errors) { results.push.apply(results, errors || []); total++; if (total === arrLength) { callback(results); } } arr.forEach(function (a) { func(a, count); }); } function asyncSerialArray(arr, func, callback) { var index = 0; var arrLength = arr.length; function next(errors) { if (errors && errors.length) { callback(errors); return; } var original = index; index = index + 1; if (original < arrLength) { func(arr[original], next); } else { callback([]); } } next([]); } function flattenObjArr(objArr) { var ret = []; Object.keys(objArr).forEach(function (k) { ret.push.apply(ret, objArr[k] || []); }); return ret; } var AsyncValidationError = /*#__PURE__*/function (_Error) { _inheritsLoose(AsyncValidationError, _Error); function AsyncValidationError(errors, fields) { var _this; _this = _Error.call(this, 'Async Validation Error') || this; _this.errors = errors; _this.fields = fields; return _this; } return AsyncValidationError; }( /*#__PURE__*/_wrapNativeSuper(Error)); function asyncMap(objArr, option, func, callback, source) { if (option.first) { var _pending = new Promise(function (resolve, reject) { var next = function next(errors) { callback(errors); return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve(source); }; var flattenArr = flattenObjArr(objArr); asyncSerialArray(flattenArr, func, next); }); _pending["catch"](function (e) { return e; }); return _pending; } var firstFields = option.firstFields === true ? Object.keys(objArr) : option.firstFields || []; var objArrKeys = Object.keys(objArr); var objArrLength = objArrKeys.length; var total = 0; var results = []; var pending = new Promise(function (resolve, reject) { var next = function next(errors) { results.push.apply(results, errors); total++; if (total === objArrLength) { callback(results); return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve(source); } }; if (!objArrKeys.length) { callback(results); resolve(source); } objArrKeys.forEach(function (key) { var arr = objArr[key]; if (firstFields.indexOf(key) !== -1) { asyncSerialArray(arr, func, next); } else { asyncParallelArray(arr, func, next); } }); }); pending["catch"](function (e) { return e; }); return pending; } function isErrorObj(obj) { return !!(obj && obj.message !== undefined); } function dist_web_getValue(value, path) { var v = value; for (var i = 0; i < path.length; i++) { if (v == undefined) { return v; } v = v[path[i]]; } return v; } function complementError(rule, source) { return function (oe) { var fieldValue; if (rule.fullFields) { fieldValue = dist_web_getValue(source, rule.fullFields); } else { fieldValue = source[oe.field || rule.fullField]; } if (isErrorObj(oe)) { oe.field = oe.field || rule.fullField; oe.fieldValue = fieldValue; return oe; } return { message: typeof oe === 'function' ? oe() : oe, fieldValue: fieldValue, field: oe.field || rule.fullField }; }; } function deepMerge(target, source) { if (source) { for (var s in source) { if (source.hasOwnProperty(s)) { var value = source[s]; if (typeof value === 'object' && typeof target[s] === 'object') { target[s] = _extends({}, target[s], value); } else { target[s] = value; } } } } return target; } var required$1 = function required(rule, value, source, errors, options, type) { if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) { errors.push(format(options.messages.required, rule.fullField)); } }; /** * Rule for validating whitespace. * * @param rule The validation rule. * @param value The value of the field on the source object. * @param source The source object being validated. * @param errors An array of errors that this rule may add * validation errors to. * @param options The validation options. * @param options.messages The validation messages. */ var whitespace = function whitespace(rule, value, source, errors, options) { if (/^\s+$/.test(value) || value === '') { errors.push(format(options.messages.whitespace, rule.fullField)); } }; // https://github.com/kevva/url-regex/blob/master/index.js var urlReg; var getUrlRegex = (function () { if (urlReg) { return urlReg; } var word = '[a-fA-F\\d:]'; var b = function b(options) { return options && options.includeBoundaries ? "(?:(?<=\\s|^)(?=" + word + ")|(?<=" + word + ")(?=\\s|$))" : ''; }; var v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}'; var v6seg = '[a-fA-F\\d]{1,4}'; var v6 = ("\n(?:\n(?:" + v6seg + ":){7}(?:" + v6seg + "|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:" + v6seg + ":){6}(?:" + v4 + "|:" + v6seg + "|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:" + v6seg + ":){5}(?::" + v4 + "|(?::" + v6seg + "){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:" + v6seg + ":){4}(?:(?::" + v6seg + "){0,1}:" + v4 + "|(?::" + v6seg + "){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:" + v6seg + ":){3}(?:(?::" + v6seg + "){0,2}:" + v4 + "|(?::" + v6seg + "){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:" + v6seg + ":){2}(?:(?::" + v6seg + "){0,3}:" + v4 + "|(?::" + v6seg + "){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:" + v6seg + ":){1}(?:(?::" + v6seg + "){0,4}:" + v4 + "|(?::" + v6seg + "){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::" + v6seg + "){0,5}:" + v4 + "|(?::" + v6seg + "){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n").replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); // Pre-compile only the exact regexes because adding a global flag make regexes stateful var v46Exact = new RegExp("(?:^" + v4 + "$)|(?:^" + v6 + "$)"); var v4exact = new RegExp("^" + v4 + "$"); var v6exact = new RegExp("^" + v6 + "$"); var ip = function ip(options) { return options && options.exact ? v46Exact : new RegExp("(?:" + b(options) + v4 + b(options) + ")|(?:" + b(options) + v6 + b(options) + ")", 'g'); }; ip.v4 = function (options) { return options && options.exact ? v4exact : new RegExp("" + b(options) + v4 + b(options), 'g'); }; ip.v6 = function (options) { return options && options.exact ? v6exact : new RegExp("" + b(options) + v6 + b(options), 'g'); }; var protocol = "(?:(?:[a-z]+:)?//)"; var auth = '(?:\\S+(?::\\S*)?@)?'; var ipv4 = ip.v4().source; var ipv6 = ip.v6().source; var host = "(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)"; var domain = "(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"; var tld = "(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))"; var port = '(?::\\d{2,5})?'; var path = '(?:[/?#][^\\s"]*)?'; var regex = "(?:" + protocol + "|www\\.)" + auth + "(?:localhost|" + ipv4 + "|" + ipv6 + "|" + host + domain + tld + ")" + port + path; urlReg = new RegExp("(?:^" + regex + "$)", 'i'); return urlReg; }); /* eslint max-len:0 */ var pattern$2 = { // http://emailregex.com/ email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/, // url: new RegExp( // '^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$', // 'i', // ), hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i }; var types = { integer: function integer(value) { return types.number(value) && parseInt(value, 10) === value; }, "float": function float(value) { return types.number(value) && !types.integer(value); }, array: function array(value) { return Array.isArray(value); }, regexp: function regexp(value) { if (value instanceof RegExp) { return true; } try { return !!new RegExp(value); } catch (e) { return false; } }, date: function date(value) { return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime()); }, number: function number(value) { if (isNaN(value)) { return false; } return typeof value === 'number'; }, object: function object(value) { return typeof value === 'object' && !types.array(value); }, method: function method(value) { return typeof value === 'function'; }, email: function email(value) { return typeof value === 'string' && value.length <= 320 && !!value.match(pattern$2.email); }, url: function url(value) { return typeof value === 'string' && value.length <= 2048 && !!value.match(getUrlRegex()); }, hex: function hex(value) { return typeof value === 'string' && !!value.match(pattern$2.hex); } }; var type$1 = function type(rule, value, source, errors, options) { if (rule.required && value === undefined) { required$1(rule, value, source, errors, options); return; } var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex']; var ruleType = rule.type; if (custom.indexOf(ruleType) > -1) { if (!types[ruleType](value)) { errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); } // straight typeof check } else if (ruleType && typeof value !== rule.type) { errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type)); } }; var dist_web_range = function range(rule, value, source, errors, options) { var len = typeof rule.len === 'number'; var min = typeof rule.min === 'number'; var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane) var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; var val = value; var key = null; var num = typeof value === 'number'; var str = typeof value === 'string'; var arr = Array.isArray(value); if (num) { key = 'number'; } else if (str) { key = 'string'; } else if (arr) { key = 'array'; } // if the value is not of a supported type for range validation // the validation rule rule should use the // type property to also test for a particular type if (!key) { return false; } if (arr) { val = value.length; } if (str) { // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3 val = value.replace(spRegexp, '_').length; } if (len) { if (val !== rule.len) { errors.push(format(options.messages[key].len, rule.fullField, rule.len)); } } else if (min && !max && val < rule.min) { errors.push(format(options.messages[key].min, rule.fullField, rule.min)); } else if (max && !min && val > rule.max) { errors.push(format(options.messages[key].max, rule.fullField, rule.max)); } else if (min && max && (val < rule.min || val > rule.max)) { errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max)); } }; var ENUM$1 = 'enum'; var enumerable$1 = function enumerable(rule, value, source, errors, options) { rule[ENUM$1] = Array.isArray(rule[ENUM$1]) ? rule[ENUM$1] : []; if (rule[ENUM$1].indexOf(value) === -1) { errors.push(format(options.messages[ENUM$1], rule.fullField, rule[ENUM$1].join(', '))); } }; var pattern$1 = function pattern(rule, value, source, errors, options) { if (rule.pattern) { if (rule.pattern instanceof RegExp) { // if a RegExp instance is passed, reset `lastIndex` in case its `global` // flag is accidentally set to `true`, which in a validation scenario // is not necessary and the result might be misleading rule.pattern.lastIndex = 0; if (!rule.pattern.test(value)) { errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); } } else if (typeof rule.pattern === 'string') { var _pattern = new RegExp(rule.pattern); if (!_pattern.test(value)) { errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern)); } } } }; var rules = { required: required$1, whitespace: whitespace, type: type$1, range: dist_web_range, "enum": enumerable$1, pattern: pattern$1 }; var string = function string(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value, 'string') && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options, 'string'); if (!isEmptyValue(value, 'string')) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); rules.pattern(rule, value, source, errors, options); if (rule.whitespace === true) { rules.whitespace(rule, value, source, errors, options); } } } callback(errors); }; var method = function method(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); } } callback(errors); }; var number = function number(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (value === '') { value = undefined; } if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); } } callback(errors); }; var _boolean = function _boolean(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); } } callback(errors); }; var regexp = function regexp(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (!isEmptyValue(value)) { rules.type(rule, value, source, errors, options); } } callback(errors); }; var integer = function integer(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); } } callback(errors); }; var floatFn = function floatFn(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); } } callback(errors); }; var array = function array(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if ((value === undefined || value === null) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options, 'array'); if (value !== undefined && value !== null) { rules.type(rule, value, source, errors, options); rules.range(rule, value, source, errors, options); } } callback(errors); }; var object = function object(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules.type(rule, value, source, errors, options); } } callback(errors); }; var ENUM = 'enum'; var enumerable = function enumerable(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (value !== undefined) { rules[ENUM](rule, value, source, errors, options); } } callback(errors); }; var pattern = function pattern(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value, 'string') && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (!isEmptyValue(value, 'string')) { rules.pattern(rule, value, source, errors, options); } } callback(errors); }; var date = function date(rule, value, callback, source, options) { // console.log('integer rule called %j', rule); var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value); if (validate) { if (isEmptyValue(value, 'date') && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); if (!isEmptyValue(value, 'date')) { var dateObject; if (value instanceof Date) { dateObject = value; } else { dateObject = new Date(value); } rules.type(rule, dateObject, source, errors, options); if (dateObject) { rules.range(rule, dateObject.getTime(), source, errors, options); } } } callback(errors); }; var required = function required(rule, value, callback, source, options) { var errors = []; var type = Array.isArray(value) ? 'array' : typeof value; rules.required(rule, value, source, errors, options, type); callback(errors); }; var type = function type(rule, value, callback, source, options) { var ruleType = rule.type; var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value, ruleType) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options, ruleType); if (!isEmptyValue(value, ruleType)) { rules.type(rule, value, source, errors, options); } } callback(errors); }; var any = function any(rule, value, callback, source, options) { var errors = []; var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); if (validate) { if (isEmptyValue(value) && !rule.required) { return callback(); } rules.required(rule, value, source, errors, options); } callback(errors); }; var dist_web_validators = { string: string, method: method, number: number, "boolean": _boolean, regexp: regexp, integer: integer, "float": floatFn, array: array, object: object, "enum": enumerable, pattern: pattern, date: date, url: type, hex: type, email: type, required: required, any: any }; function newMessages() { return { "default": 'Validation error on field %s', required: '%s is required', "enum": '%s must be one of %s', whitespace: '%s cannot be empty', date: { format: '%s date %s is invalid for format %s', parse: '%s date could not be parsed, %s is invalid ', invalid: '%s date %s is invalid' }, types: { string: '%s is not a %s', method: '%s is not a %s (function)', array: '%s is not an %s', object: '%s is not an %s', number: '%s is not a %s', date: '%s is not a %s', "boolean": '%s is not a %s', integer: '%s is not an %s', "float": '%s is not a %s', regexp: '%s is not a valid %s', email: '%s is not a valid %s', url: '%s is not a valid %s', hex: '%s is not a valid %s' }, string: { len: '%s must be exactly %s characters', min: '%s must be at least %s characters', max: '%s cannot be longer than %s characters', range: '%s must be between %s and %s characters' }, number: { len: '%s must equal %s', min: '%s cannot be less than %s', max: '%s cannot be greater than %s', range: '%s must be between %s and %s' }, array: { len: '%s must be exactly %s in length', min: '%s cannot be less than %s in length', max: '%s cannot be greater than %s in length', range: '%s must be between %s and %s in length' }, pattern: { mismatch: '%s value %s does not match pattern %s' }, clone: function clone() { var cloned = JSON.parse(JSON.stringify(this)); cloned.clone = this.clone; return cloned; } }; } var messages = newMessages(); /** * Encapsulates a validation schema. * * @param descriptor An object declaring validation rules * for this schema. */ var Schema = /*#__PURE__*/function () { // ========================= Static ========================= // ======================== Instance ======================== function Schema(descriptor) { this.rules = null; this._messages = messages; this.define(descriptor); } var _proto = Schema.prototype; _proto.define = function define(rules) { var _this = this; if (!rules) { throw new Error('Cannot configure a schema with no rules'); } if (typeof rules !== 'object' || Array.isArray(rules)) { throw new Error('Rules must be an object'); } this.rules = {}; Object.keys(rules).forEach(function (name) { var item = rules[name]; _this.rules[name] = Array.isArray(item) ? item : [item]; }); }; _proto.messages = function messages(_messages) { if (_messages) { this._messages = deepMerge(newMessages(), _messages); } return this._messages; }; _proto.validate = function validate(source_, o, oc) { var _this2 = this; if (o === void 0) { o = {}; } if (oc === void 0) { oc = function oc() {}; } var source = source_; var options = o; var callback = oc; if (typeof options === 'function') { callback = options; options = {}; } if (!this.rules || Object.keys(this.rules).length === 0) { if (callback) { callback(null, source); } return Promise.resolve(source); } function complete(results) { var errors = []; var fields = {}; function add(e) { if (Array.isArray(e)) { var _errors; errors = (_errors = errors).concat.apply(_errors, e); } else { errors.push(e); } } for (var i = 0; i < results.length; i++) { add(results[i]); } if (!errors.length) { callback(null, source); } else { fields = convertFieldsError(errors); callback(errors, fields); } } if (options.messages) { var messages$1 = this.messages(); if (messages$1 === messages) { messages$1 = newMessages(); } deepMerge(messages$1, options.messages); options.messages = messages$1; } else { options.messages = this.messages(); } var series = {}; var keys = options.keys || Object.keys(this.rules); keys.forEach(function (z) { var arr = _this2.rules[z]; var value = source[z]; arr.forEach(function (r) { var rule = r; if (typeof rule.transform === 'function') { if (source === source_) { source = _extends({}, source); } value = source[z] = rule.transform(value); } if (typeof rule === 'function') { rule = { validator: rule }; } else { rule = _extends({}, rule); } // Fill validator. Skip if nothing need to validate rule.validator = _this2.getValidationMethod(rule); if (!rule.validator) { return; } rule.field = z; rule.fullField = rule.fullField || z; rule.type = _this2.getType(rule); series[z] = series[z] || []; series[z].push({ rule: rule, value: value, source: source, field: z }); }); }); var errorFields = {}; return asyncMap(series, options, function (data, doIt) { var rule = data.rule; var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField === 'object'); deep = deep && (rule.required || !rule.required && data.value); rule.field = data.field; function addFullField(key, schema) { return _extends({}, schema, { fullField: rule.fullField + "." + key, fullFields: rule.fullFields ? [].concat(rule.fullFields, [key]) : [key] }); } function cb(e) { if (e === void 0) { e = []; } var errorList = Array.isArray(e) ? e : [e]; if (!options.suppressWarning && errorList.length) { Schema.warning('async-validator:', errorList); } if (errorList.length && rule.message !== undefined) { errorList = [].concat(rule.message); } // Fill error info var filledErrors = errorList.map(complementError(rule, source)); if (options.first && filledErrors.length) { errorFields[rule.field] = 1; return doIt(filledErrors); } if (!deep) { doIt(filledErrors); } else { // if rule is required but the target object // does not exist fail at the rule level and don't // go deeper if (rule.required && !data.value) { if (rule.message !== undefined) { filledErrors = [].concat(rule.message).map(complementError(rule, source)); } else if (options.error) { filledErrors = [options.error(rule, format(options.messages.required, rule.field))]; } return doIt(filledErrors); } var fieldsSchema = {}; if (rule.defaultField) { Object.keys(data.value).map(function (key) { fieldsSchema[key] = rule.defaultField; }); } fieldsSchema = _extends({}, fieldsSchema, data.rule.fields); var paredFieldsSchema = {}; Object.keys(fieldsSchema).forEach(function (field) { var fieldSchema = fieldsSchema[field]; var fieldSchemaList = Array.isArray(fieldSchema) ? fieldSchema : [fieldSchema]; paredFieldsSchema[field] = fieldSchemaList.map(addFullField.bind(null, field)); }); var schema = new Schema(paredFieldsSchema); schema.messages(options.messages); if (data.rule.options) { data.rule.options.messages = options.messages; data.rule.options.error = options.error; } schema.validate(data.value, data.rule.options || options, function (errs) { var finalErrors = []; if (filledErrors && filledErrors.length) { finalErrors.push.apply(finalErrors, filledErrors); } if (errs && errs.length) { finalErrors.push.apply(finalErrors, errs); } doIt(finalErrors.length ? finalErrors : null); }); } } var res; if (rule.asyncValidator) { res = rule.asyncValidator(rule, data.value, cb, data.source, options); } else if (rule.validator) { try { res = rule.validator(rule, data.value, cb, data.source, options); } catch (error) { console.error == null ? void 0 : console.error(error); // rethrow to report error if (!options.suppressValidatorError) { setTimeout(function () { throw error; }, 0); } cb(error.message); } if (res === true) { cb(); } else if (res === false) { cb(typeof rule.message === 'function' ? rule.message(rule.fullField || rule.field) : rule.message || (rule.fullField || rule.field) + " fails"); } else if (res instanceof Array) { cb(res); } else if (res instanceof Error) { cb(res.message); } } if (res && res.then) { res.then(function () { return cb(); }, function (e) { return cb(e); }); } }, function (results) { complete(results); }, source); }; _proto.getType = function getType(rule) { if (rule.type === undefined && rule.pattern instanceof RegExp) { rule.type = 'pattern'; } if (typeof rule.validator !== 'function' && rule.type && !dist_web_validators.hasOwnProperty(rule.type)) { throw new Error(format('Unknown rule type %s', rule.type)); } return rule.type || 'string'; }; _proto.getValidationMethod = function getValidationMethod(rule) { if (typeof rule.validator === 'function') { return rule.validator; } var keys = Object.keys(rule); var messageIndex = keys.indexOf('message'); if (messageIndex !== -1) { keys.splice(messageIndex, 1); } if (keys.length === 1 && keys[0] === 'required') { return dist_web_validators.required; } return dist_web_validators[this.getType(rule)] || undefined; }; return Schema; }(); Schema.register = function register(type, validator) { if (typeof validator !== 'function') { throw new Error('Cannot register a validator by type, validator is not a function'); } dist_web_validators[type] = validator; }; Schema.warning = warning; Schema.messages = messages; Schema.validators = dist_web_validators; //# sourceMappingURL=index.js.map ;// ./node_modules/naive-ui/es/_utils/composable/use-collection.mjs // injection.collection { // key1: [insta, instb] // key2: [instc] // } function useInjectionInstanceCollection(injectionName, collectionKey, registerKeyRef) { var _a; const injection = runtime_core_esm_bundler_inject(injectionName, null); if (injection === null) return; const vm = (_a = runtime_core_esm_bundler_getCurrentInstance()) === null || _a === void 0 ? void 0 : _a.proxy; runtime_core_esm_bundler_watch(registerKeyRef, registerInstance); registerInstance(registerKeyRef.value); runtime_core_esm_bundler_onBeforeUnmount(() => { registerInstance(undefined, registerKeyRef.value); }); function registerInstance(key, oldKey) { if (!injection) return; const collection = injection[collectionKey]; if (oldKey !== undefined) removeInstance(collection, oldKey); if (key !== undefined) addInstance(collection, key); } function removeInstance(collection, key) { if (!collection[key]) collection[key] = []; collection[key].splice(collection[key].findIndex(instance => instance === vm), 1); } function addInstance(collection, key) { if (!collection[key]) collection[key] = []; if (!~collection[key].findIndex(instance => instance === vm)) { collection[key].push(vm); } } } // injection.collection { // key1: [insta.value, instb.value] // key2: [instc.value] // } function useInjectionCollection(injectionName, collectionKey, valueRef) { const injection = inject(injectionName, null); if (injection === null) return; if (!(collectionKey in injection)) { injection[collectionKey] = []; } injection[collectionKey].push(valueRef.value); watch(valueRef, (value, prevValue) => { const collectionArray = injection[collectionKey]; const index = collectionArray.findIndex(collectionValue => collectionValue === prevValue); if (~index) collectionArray.splice(index, 1); collectionArray.push(value); }); onBeforeUnmount(() => { const collectionArray = injection[collectionKey]; const index = collectionArray.findIndex(collectionValue => collectionValue === valueRef.value); if (~index) collectionArray.splice(index, 1); }); } // injection.collection { // key1: [insta.$el, instb.$el] // key2: [instc.$el] // } function useInjectionElementCollection(injectionName, collectionKey, getElement) { const injection = inject(injectionName, null); if (injection === null) return; if (!(collectionKey in injection)) { injection[collectionKey] = []; } onMounted(() => { const el = getElement(); if (!el) return; injection[collectionKey].push(el); }); onBeforeUnmount(() => { const collectionArray = injection[collectionKey]; const element = getElement(); const index = collectionArray.findIndex(collectionElement => collectionElement === element); if (~index) collectionArray.splice(index, 1); }); } ;// ./node_modules/naive-ui/es/_styles/transitions/fade-down.cssr.mjs const { cubicBezierEaseInOut: fade_down_cssr_cubicBezierEaseInOut } = _common; function fadeDownTransition({ name = 'fade-down', fromOffset = '-4px', enterDuration = '.3s', leaveDuration = '.3s', enterCubicBezier = fade_down_cssr_cubicBezierEaseInOut, leaveCubicBezier = fade_down_cssr_cubicBezierEaseInOut } = {}) { return [cssr_c(`&.${name}-transition-enter-from, &.${name}-transition-leave-to`, { opacity: 0, transform: `translateY(${fromOffset})` }), cssr_c(`&.${name}-transition-enter-to, &.${name}-transition-leave-from`, { opacity: 1, transform: 'translateY(0)' }), cssr_c(`&.${name}-transition-leave-active`, { transition: `opacity ${leaveDuration} ${leaveCubicBezier}, transform ${leaveDuration} ${leaveCubicBezier}` }), cssr_c(`&.${name}-transition-enter-active`, { transition: `opacity ${enterDuration} ${enterCubicBezier}, transform ${enterDuration} ${enterCubicBezier}` })]; } ;// ./node_modules/naive-ui/es/form/src/styles/form-item.cssr.mjs // vars: // --n-line-height // --n-blank-height // --n-feedback-padding // --n-feedback-font-size // --n-label-font-size-left // --n-label-font-size-top // --n-label-height // --n-label-padding // --n-asterisk-color // --n-label-text-color // --n-bezier // --n-feedback-text-color // --n-feedback-text-color-warning // --n-feedback-text-color-error // --n-label-text-align // --n-label-padding /* harmony default export */ var form_item_cssr = (cB('form-item', ` display: grid; line-height: var(--n-line-height); `, [cB('form-item-label', ` grid-area: label; align-items: center; line-height: 1.25; text-align: var(--n-label-text-align); font-size: var(--n-label-font-size); min-height: var(--n-label-height); padding: var(--n-label-padding); color: var(--n-label-text-color); transition: color .3s var(--n-bezier); box-sizing: border-box; font-weight: var(--n-label-font-weight); `, [cE('asterisk', ` white-space: nowrap; user-select: none; -webkit-user-select: none; color: var(--n-asterisk-color); transition: color .3s var(--n-bezier); `), cE('asterisk-placeholder', ` grid-area: mark; user-select: none; -webkit-user-select: none; visibility: hidden; `)]), cB('form-item-blank', ` grid-area: blank; min-height: var(--n-blank-height); `), cM('auto-label-width', [cB('form-item-label', 'white-space: nowrap;')]), cM('left-labelled', ` grid-template-areas: "label blank" "label feedback"; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: flex-start; `, [cB('form-item-label', ` display: grid; grid-template-columns: 1fr auto; min-height: var(--n-blank-height); height: auto; box-sizing: border-box; flex-shrink: 0; flex-grow: 0; `, [cM('reverse-columns-space', ` grid-template-columns: auto 1fr; `), cM('left-mark', ` grid-template-areas: "mark text" ". text"; `), cM('right-mark', ` grid-template-areas: "text mark" "text ."; `), cM('right-hanging-mark', ` grid-template-areas: "text mark" "text ."; `), cE('text', ` grid-area: text; `), cE('asterisk', ` grid-area: mark; align-self: end; `)])]), cM('top-labelled', ` grid-template-areas: "label" "blank" "feedback"; grid-template-rows: minmax(var(--n-label-height), auto) 1fr; grid-template-columns: minmax(0, 100%); `, [cM('no-label', ` grid-template-areas: "blank" "feedback"; grid-template-rows: 1fr; `), cB('form-item-label', ` display: flex; align-items: flex-start; justify-content: var(--n-label-text-align); `)]), cB('form-item-blank', ` box-sizing: border-box; display: flex; align-items: center; position: relative; `), cB('form-item-feedback-wrapper', ` grid-area: feedback; box-sizing: border-box; min-height: var(--n-feedback-height); font-size: var(--n-feedback-font-size); line-height: 1.25; transform-origin: top left; `, [cssr_c('&:not(:empty)', ` padding: var(--n-feedback-padding); `), cB('form-item-feedback', { transition: 'color .3s var(--n-bezier)', color: 'var(--n-feedback-text-color)' }, [cM('warning', { color: 'var(--n-feedback-text-color-warning)' }), cM('error', { color: 'var(--n-feedback-text-color-error)' }), fadeDownTransition({ fromOffset: '-3px', enterDuration: '.3s', leaveDuration: '.2s' })])])])); ;// ./node_modules/naive-ui/es/form/src/utils.mjs function formItemSize(props) { const NForm = runtime_core_esm_bundler_inject(formInjectionKey, null); return { mergedSize: runtime_core_esm_bundler_computed(() => { if (props.size !== undefined) return props.size; if ((NForm === null || NForm === void 0 ? void 0 : NForm.props.size) !== undefined) return NForm.props.size; return 'medium'; }) }; } function formItemMisc(props) { const NForm = runtime_core_esm_bundler_inject(formInjectionKey, null); const mergedLabelPlacementRef = runtime_core_esm_bundler_computed(() => { const { labelPlacement } = props; if (labelPlacement !== undefined) return labelPlacement; if (NForm === null || NForm === void 0 ? void 0 : NForm.props.labelPlacement) return NForm.props.labelPlacement; return 'top'; }); const isAutoLabelWidthRef = runtime_core_esm_bundler_computed(() => { return mergedLabelPlacementRef.value === 'left' && (props.labelWidth === 'auto' || (NForm === null || NForm === void 0 ? void 0 : NForm.props.labelWidth) === 'auto'); }); const mergedLabelWidthRef = runtime_core_esm_bundler_computed(() => { if (mergedLabelPlacementRef.value === 'top') return; const { labelWidth } = props; if (labelWidth !== undefined && labelWidth !== 'auto') { return formatLength(labelWidth); } if (isAutoLabelWidthRef.value) { const autoComputedWidth = NForm === null || NForm === void 0 ? void 0 : NForm.maxChildLabelWidthRef.value; if (autoComputedWidth !== undefined) { return formatLength(autoComputedWidth); } else { return undefined; } } if ((NForm === null || NForm === void 0 ? void 0 : NForm.props.labelWidth) !== undefined) { return formatLength(NForm.props.labelWidth); } return undefined; }); const mergedLabelAlignRef = runtime_core_esm_bundler_computed(() => { const { labelAlign } = props; if (labelAlign) return labelAlign; if (NForm === null || NForm === void 0 ? void 0 : NForm.props.labelAlign) return NForm.props.labelAlign; return undefined; }); const mergedLabelStyleRef = runtime_core_esm_bundler_computed(() => { var _a; return [(_a = props.labelProps) === null || _a === void 0 ? void 0 : _a.style, props.labelStyle, { width: mergedLabelWidthRef.value }]; }); const mergedShowRequireMarkRef = runtime_core_esm_bundler_computed(() => { const { showRequireMark } = props; if (showRequireMark !== undefined) return showRequireMark; return NForm === null || NForm === void 0 ? void 0 : NForm.props.showRequireMark; }); const mergedRequireMarkPlacementRef = runtime_core_esm_bundler_computed(() => { const { requireMarkPlacement } = props; if (requireMarkPlacement !== undefined) return requireMarkPlacement; return (NForm === null || NForm === void 0 ? void 0 : NForm.props.requireMarkPlacement) || 'right'; }); const validationErroredRef = ref(false); const validationWarnedRef = ref(false); const mergedValidationStatusRef = runtime_core_esm_bundler_computed(() => { const { validationStatus } = props; if (validationStatus !== undefined) return validationStatus; if (validationErroredRef.value) return 'error'; if (validationWarnedRef.value) return 'warning'; return undefined; }); const mergedShowFeedbackRef = runtime_core_esm_bundler_computed(() => { const { showFeedback } = props; if (showFeedback !== undefined) return showFeedback; if ((NForm === null || NForm === void 0 ? void 0 : NForm.props.showFeedback) !== undefined) return NForm.props.showFeedback; return true; }); const mergedShowLabelRef = runtime_core_esm_bundler_computed(() => { const { showLabel } = props; if (showLabel !== undefined) return showLabel; if ((NForm === null || NForm === void 0 ? void 0 : NForm.props.showLabel) !== undefined) return NForm.props.showLabel; return true; }); return { validationErrored: validationErroredRef, validationWarned: validationWarnedRef, mergedLabelStyle: mergedLabelStyleRef, mergedLabelPlacement: mergedLabelPlacementRef, mergedLabelAlign: mergedLabelAlignRef, mergedShowRequireMark: mergedShowRequireMarkRef, mergedRequireMarkPlacement: mergedRequireMarkPlacementRef, mergedValidationStatus: mergedValidationStatusRef, mergedShowFeedback: mergedShowFeedbackRef, mergedShowLabel: mergedShowLabelRef, isAutoLabelWidth: isAutoLabelWidthRef }; } function formItemRule(props) { const NForm = runtime_core_esm_bundler_inject(formInjectionKey, null); const compatibleRulePathRef = runtime_core_esm_bundler_computed(() => { const { rulePath } = props; if (rulePath !== undefined) return rulePath; const { path } = props; if (path !== undefined) return path; return undefined; }); const mergedRulesRef = runtime_core_esm_bundler_computed(() => { const rules = []; const { rule } = props; if (rule !== undefined) { if (Array.isArray(rule)) rules.push(...rule);else rules.push(rule); } if (NForm) { const { rules: formRules } = NForm.props; const { value: rulePath } = compatibleRulePathRef; if (formRules !== undefined && rulePath !== undefined) { const formRule = lodash_es_get(formRules, rulePath); if (formRule !== undefined) { if (Array.isArray(formRule)) { rules.push(...formRule); } else { // terminate object must be a form item rule rules.push(formRule); } } } } return rules; }); const hasRequiredRuleRef = runtime_core_esm_bundler_computed(() => { return mergedRulesRef.value.some(rule => rule.required); }); // deprecated const mergedRequiredRef = runtime_core_esm_bundler_computed(() => { return hasRequiredRuleRef.value || props.required; }); return { mergedRules: mergedRulesRef, mergedRequired: mergedRequiredRef }; } ;// ./node_modules/naive-ui/es/form/src/FormItem.mjs var FormItem_awaiter = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; const formItemProps = Object.assign(Object.assign({}, use_theme.props), { label: String, labelWidth: [Number, String], labelStyle: [String, Object], labelAlign: String, labelPlacement: String, path: String, first: Boolean, rulePath: String, required: Boolean, showRequireMark: { type: Boolean, default: undefined }, requireMarkPlacement: String, showFeedback: { type: Boolean, default: undefined }, rule: [Object, Array], size: String, ignorePathChange: Boolean, validationStatus: String, feedback: String, feedbackClass: String, feedbackStyle: [String, Object], showLabel: { type: Boolean, default: undefined }, labelProps: Object }); const formItemPropKeys = keysOf(formItemProps); // wrap sync validator function wrapValidator(validator, async) { return (...args) => { try { const validateResult = validator(...args); if (!async && (typeof validateResult === 'boolean' || validateResult instanceof Error || Array.isArray(validateResult)) // Error[] || (validateResult === null || validateResult === void 0 ? void 0 : validateResult.then)) { return validateResult; } else if (validateResult === undefined) { return true; } else { warn_warn('form-item/validate', `You return a ${typeof validateResult} ` + `typed value in the validator method, which is not recommended. Please use ${async ? '`Promise`' : '`boolean`, `Error` or `Promise`'} typed value instead.`); return true; } } catch (err) { warn_warn('form-item/validate', 'An error is catched in the validation, ' + 'so the validation won\'t be done. Your callback in `validate` method of ' + '`n-form` or `n-form-item` won\'t be called in this validation.'); console.error(err); // If returns undefined, async-validator won't trigger callback // so the result will be abandoned, which means not true and not false return undefined; } }; } /* harmony default export */ var FormItem = (defineComponent({ name: 'FormItem', props: formItemProps, setup(props) { useInjectionInstanceCollection(formItemInstsInjectionKey, 'formItems', toRef(props, 'path')); const { mergedClsPrefixRef, inlineThemeDisabled } = useConfig(props); const NForm = runtime_core_esm_bundler_inject(formInjectionKey, null); const formItemSizeRefs = formItemSize(props); const formItemMiscRefs = formItemMisc(props); const { validationErrored: validationErroredRef, validationWarned: validationWarnedRef } = formItemMiscRefs; const { mergedRequired: mergedRequiredRef, mergedRules: mergedRulesRef } = formItemRule(props); const { mergedSize: mergedSizeRef } = formItemSizeRefs; const { mergedLabelPlacement: labelPlacementRef, mergedLabelAlign: labelTextAlignRef, mergedRequireMarkPlacement: mergedRequireMarkPlacementRef } = formItemMiscRefs; const renderExplainsRef = ref([]); const feedbackIdRef = ref(createId()); const mergedDisabledRef = NForm ? toRef(NForm.props, 'disabled') : ref(false); const themeRef = use_theme('Form', '-form-item', form_item_cssr, form_styles_light, props, mergedClsPrefixRef); runtime_core_esm_bundler_watch(toRef(props, 'path'), () => { if (props.ignorePathChange) return; restoreValidation(); }); function restoreValidation() { renderExplainsRef.value = []; validationErroredRef.value = false; validationWarnedRef.value = false; if (props.feedback) { feedbackIdRef.value = createId(); } } const internalValidate = (...args_1) => FormItem_awaiter(this, [...args_1], void 0, function* (trigger = null, shouldRuleBeApplied = () => true, options = { suppressWarning: true }) { const { path } = props; if (!options) { options = {}; } else { if (!options.first) options.first = props.first; } const { value: rules } = mergedRulesRef; const value = NForm ? lodash_es_get(NForm.props.model, path || '') : undefined; const messageRenderers = {}; const originalMessageRendersMessage = {}; const activeRules = (!trigger ? rules : rules.filter(rule => { if (Array.isArray(rule.trigger)) { return rule.trigger.includes(trigger); } else { return rule.trigger === trigger; } })).filter(shouldRuleBeApplied).map((rule, i) => { const shallowClonedRule = Object.assign({}, rule); if (shallowClonedRule.validator) { shallowClonedRule.validator = wrapValidator(shallowClonedRule.validator, false); } if (shallowClonedRule.asyncValidator) { shallowClonedRule.asyncValidator = wrapValidator(shallowClonedRule.asyncValidator, true); } if (shallowClonedRule.renderMessage) { const rendererKey = `__renderMessage__${i}`; originalMessageRendersMessage[rendererKey] = shallowClonedRule.message; shallowClonedRule.message = rendererKey; messageRenderers[rendererKey] = shallowClonedRule.renderMessage; } return shallowClonedRule; }); const activeErrorRules = activeRules.filter(r => r.level !== 'warning'); const activeWarningRules = activeRules.filter(r => r.level === 'warning'); const validationResult = { valid: true, errors: undefined, warnings: undefined }; if (!activeRules.length) return validationResult; const mergedPath = path !== null && path !== void 0 ? path : '__n_no_path__'; const validator = new Schema({ [mergedPath]: activeErrorRules }); const warningValidator = new Schema({ [mergedPath]: activeWarningRules }); const { validateMessages } = (NForm === null || NForm === void 0 ? void 0 : NForm.props) || {}; if (validateMessages) { validator.messages(validateMessages); warningValidator.messages(validateMessages); } const renderMessages = errors => { renderExplainsRef.value = errors.map(error => { const transformedMessage = (error === null || error === void 0 ? void 0 : error.message) || ''; return { key: transformedMessage, render: () => { if (transformedMessage.startsWith('__renderMessage__')) { return messageRenderers[transformedMessage](); } return transformedMessage; } }; }); errors.forEach(error => { var _a; if ((_a = error.message) === null || _a === void 0 ? void 0 : _a.startsWith('__renderMessage__')) { error.message = originalMessageRendersMessage[error.message]; } }); }; if (activeErrorRules.length) { const errors = yield new Promise(resolve => { void validator.validate({ [mergedPath]: value }, options, resolve); }); if (errors === null || errors === void 0 ? void 0 : errors.length) { validationResult.valid = false; validationResult.errors = errors; renderMessages(errors); } } // if there are already errors, warning check can be skipped if (activeWarningRules.length && !validationResult.errors) { const warnings = yield new Promise(resolve => { void warningValidator.validate({ [mergedPath]: value }, options, resolve); }); if (warnings === null || warnings === void 0 ? void 0 : warnings.length) { renderMessages(warnings); validationResult.warnings = warnings; } } if (!validationResult.errors && !validationResult.warnings) { restoreValidation(); } else { validationErroredRef.value = !!validationResult.errors; validationWarnedRef.value = !!validationResult.warnings; } return validationResult; }); function handleContentBlur() { void internalValidate('blur'); } function handleContentChange() { void internalValidate('change'); } function handleContentFocus() { void internalValidate('focus'); } function handleContentInput() { void internalValidate('input'); } function validate(options, callback) { return FormItem_awaiter(this, void 0, void 0, function* () { /** the following code is for compatibility */ let trigger; let validateCallback; let shouldRuleBeApplied; let asyncValidatorOptions; if (typeof options === 'string') { trigger = options; validateCallback = callback; } else if (options !== null && typeof options === 'object') { trigger = options.trigger; validateCallback = options.callback; shouldRuleBeApplied = options.shouldRuleBeApplied; asyncValidatorOptions = options.options; } return yield new Promise((resolve, reject) => { void internalValidate(trigger, shouldRuleBeApplied, asyncValidatorOptions).then(({ valid, errors, warnings }) => { if (valid) { if (validateCallback) { validateCallback(undefined, { warnings }); } resolve({ warnings }); } else { if (validateCallback) { validateCallback(errors, { warnings }); } reject(errors); } }); }); }); } provide(formItemInjectionKey, { path: toRef(props, 'path'), disabled: mergedDisabledRef, mergedSize: formItemSizeRefs.mergedSize, mergedValidationStatus: formItemMiscRefs.mergedValidationStatus, restoreValidation, handleContentBlur, handleContentChange, handleContentFocus, handleContentInput }); const exposedRef = { validate, restoreValidation, internalValidate }; const labelElementRef = ref(null); runtime_core_esm_bundler_onMounted(() => { if (!formItemMiscRefs.isAutoLabelWidth.value) return; const labelElement = labelElementRef.value; if (labelElement !== null) { const memoizedWhitespace = labelElement.style.whiteSpace; labelElement.style.whiteSpace = 'nowrap'; labelElement.style.width = ''; NForm === null || NForm === void 0 ? void 0 : NForm.deriveMaxChildLabelWidth(Number(getComputedStyle(labelElement).width.slice(0, -2))); labelElement.style.whiteSpace = memoizedWhitespace; } }); const cssVarsRef = runtime_core_esm_bundler_computed(() => { var _a; const { value: size } = mergedSizeRef; const { value: labelPlacement } = labelPlacementRef; const direction = labelPlacement === 'top' ? 'vertical' : 'horizontal'; const { common: { cubicBezierEaseInOut }, self: { labelTextColor, asteriskColor, lineHeight, feedbackTextColor, feedbackTextColorWarning, feedbackTextColorError, feedbackPadding, labelFontWeight, [createKey('labelHeight', size)]: labelHeight, [createKey('blankHeight', size)]: blankHeight, [createKey('feedbackFontSize', size)]: feedbackFontSize, [createKey('feedbackHeight', size)]: feedbackHeight, [createKey('labelPadding', direction)]: labelPadding, [createKey('labelTextAlign', direction)]: labelTextAlign, [createKey(createKey('labelFontSize', labelPlacement), size)]: labelFontSize } } = themeRef.value; let mergedLabelTextAlign = (_a = labelTextAlignRef.value) !== null && _a !== void 0 ? _a : labelTextAlign; if (labelPlacement === 'top') { mergedLabelTextAlign = mergedLabelTextAlign === 'right' ? 'flex-end' : 'flex-start'; } const cssVars = { '--n-bezier': cubicBezierEaseInOut, '--n-line-height': lineHeight, '--n-blank-height': blankHeight, '--n-label-font-size': labelFontSize, '--n-label-text-align': mergedLabelTextAlign, '--n-label-height': labelHeight, '--n-label-padding': labelPadding, '--n-label-font-weight': labelFontWeight, '--n-asterisk-color': asteriskColor, '--n-label-text-color': labelTextColor, '--n-feedback-padding': feedbackPadding, '--n-feedback-font-size': feedbackFontSize, '--n-feedback-height': feedbackHeight, '--n-feedback-text-color': feedbackTextColor, '--n-feedback-text-color-warning': feedbackTextColorWarning, '--n-feedback-text-color-error': feedbackTextColorError }; return cssVars; }); const themeClassHandle = inlineThemeDisabled ? useThemeClass('form-item', runtime_core_esm_bundler_computed(() => { var _a; return `${mergedSizeRef.value[0]}${labelPlacementRef.value[0]}${((_a = labelTextAlignRef.value) === null || _a === void 0 ? void 0 : _a[0]) || ''}`; }), cssVarsRef, props) : undefined; const reverseColSpaceRef = runtime_core_esm_bundler_computed(() => { // label placement left // require-mark-placement | label align | areas (1fr auto) // left | left | mark text (need reverse) // left | right | mark text (okay) // right | left | mark text (okay) // right | right | mark text (okay) // right-hanging | left | text mark (okay) // right-hanging | right | text mark (okay) return labelPlacementRef.value === 'left' && mergedRequireMarkPlacementRef.value === 'left' && labelTextAlignRef.value === 'left'; }); return Object.assign(Object.assign(Object.assign(Object.assign({ labelElementRef, mergedClsPrefix: mergedClsPrefixRef, mergedRequired: mergedRequiredRef, feedbackId: feedbackIdRef, renderExplains: renderExplainsRef, reverseColSpace: reverseColSpaceRef }, formItemMiscRefs), formItemSizeRefs), exposedRef), { cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }); }, render() { const { $slots, mergedClsPrefix, mergedShowLabel, mergedShowRequireMark, mergedRequireMarkPlacement, onRender } = this; const renderedShowRequireMark = mergedShowRequireMark !== undefined ? mergedShowRequireMark : this.mergedRequired; onRender === null || onRender === void 0 ? void 0 : onRender(); const renderLabel = () => { const labelText = this.$slots.label ? this.$slots.label() : this.label; if (!labelText) return null; const textNode = h("span", { class: `${mergedClsPrefix}-form-item-label__text` }, labelText); const markNode = renderedShowRequireMark ? h("span", { class: `${mergedClsPrefix}-form-item-label__asterisk` }, mergedRequireMarkPlacement !== 'left' ? '\u00A0*' : '*\u00A0') : mergedRequireMarkPlacement === 'right-hanging' && h("span", { class: `${mergedClsPrefix}-form-item-label__asterisk-placeholder` }, '\u00A0*'); const { labelProps } = this; return h("label", Object.assign({}, labelProps, { class: [labelProps === null || labelProps === void 0 ? void 0 : labelProps.class, `${mergedClsPrefix}-form-item-label`, `${mergedClsPrefix}-form-item-label--${mergedRequireMarkPlacement}-mark`, this.reverseColSpace && `${mergedClsPrefix}-form-item-label--reverse-columns-space`], style: this.mergedLabelStyle, ref: "labelElementRef" }), mergedRequireMarkPlacement === 'left' ? [markNode, textNode] : [textNode, markNode]); }; return h("div", { class: [`${mergedClsPrefix}-form-item`, this.themeClass, `${mergedClsPrefix}-form-item--${this.mergedSize}-size`, `${mergedClsPrefix}-form-item--${this.mergedLabelPlacement}-labelled`, this.isAutoLabelWidth && `${mergedClsPrefix}-form-item--auto-label-width`, !mergedShowLabel && `${mergedClsPrefix}-form-item--no-label`], style: this.cssVars }, mergedShowLabel && renderLabel(), h("div", { class: [`${mergedClsPrefix}-form-item-blank`, this.mergedValidationStatus && `${mergedClsPrefix}-form-item-blank--${this.mergedValidationStatus}`] }, $slots), this.mergedShowFeedback ? h("div", { key: this.feedbackId, style: this.feedbackStyle, class: [`${mergedClsPrefix}-form-item-feedback-wrapper`, this.feedbackClass] }, h(Transition, { name: "fade-down-transition", mode: "out-in" }, { default: () => { const { mergedValidationStatus } = this; return resolveWrappedSlot($slots.feedback, children => { var _a; const { feedback } = this; const feedbackNodes = children || feedback ? h("div", { key: "__feedback__", class: `${mergedClsPrefix}-form-item-feedback__line` }, children || feedback) : this.renderExplains.length ? (_a = this.renderExplains) === null || _a === void 0 ? void 0 : _a.map(({ key, render }) => h("div", { key: key, class: `${mergedClsPrefix}-form-item-feedback__line` }, render())) : null; return feedbackNodes ? mergedValidationStatus === 'warning' ? h("div", { key: "controlled-warning", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--warning` }, feedbackNodes) : mergedValidationStatus === 'error' ? h("div", { key: "controlled-error", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--error` }, feedbackNodes) : mergedValidationStatus === 'success' ? h("div", { key: "controlled-success", class: `${mergedClsPrefix}-form-item-feedback ${mergedClsPrefix}-form-item-feedback--success` }, feedbackNodes) : h("div", { key: "controlled-default", class: `${mergedClsPrefix}-form-item-feedback` }, feedbackNodes) : null; }); } })) : null); } })); ;// ./node_modules/naive-ui/es/_internal/icons/Clear.mjs /* harmony default export */ var Clear = (replaceable('clear', () => h("svg", { viewBox: "0 0 16 16", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, h("g", { stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" }, h("g", { fill: "currentColor", "fill-rule": "nonzero" }, h("path", { d: "M8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 C2,4.6862915 4.6862915,2 8,2 Z M6.5343055,5.83859116 C6.33943736,5.70359511 6.07001296,5.72288026 5.89644661,5.89644661 L5.89644661,5.89644661 L5.83859116,5.9656945 C5.70359511,6.16056264 5.72288026,6.42998704 5.89644661,6.60355339 L5.89644661,6.60355339 L7.293,8 L5.89644661,9.39644661 L5.83859116,9.4656945 C5.70359511,9.66056264 5.72288026,9.92998704 5.89644661,10.1035534 L5.89644661,10.1035534 L5.9656945,10.1614088 C6.16056264,10.2964049 6.42998704,10.2771197 6.60355339,10.1035534 L6.60355339,10.1035534 L8,8.707 L9.39644661,10.1035534 L9.4656945,10.1614088 C9.66056264,10.2964049 9.92998704,10.2771197 10.1035534,10.1035534 L10.1035534,10.1035534 L10.1614088,10.0343055 C10.2964049,9.83943736 10.2771197,9.57001296 10.1035534,9.39644661 L10.1035534,9.39644661 L8.707,8 L10.1035534,6.60355339 L10.1614088,6.5343055 C10.2964049,6.33943736 10.2771197,6.07001296 10.1035534,5.89644661 L10.1035534,5.89644661 L10.0343055,5.83859116 C9.83943736,5.70359511 9.57001296,5.72288026 9.39644661,5.89644661 L9.39644661,5.89644661 L8,7.293 L6.60355339,5.89644661 Z" })))))); ;// ./node_modules/naive-ui/es/_internal/clear/src/styles/index.cssr.mjs // vars: // --n-bezier // --n-clear-color // --n-clear-size // --n-clear-color-hover // --n-clear-color-pressed /* harmony default export */ var clear_src_styles_index_cssr = (cB('base-clear', ` flex-shrink: 0; height: 1em; width: 1em; position: relative; `, [cssr_c('>', [cE('clear', ` font-size: var(--n-clear-size); height: 1em; width: 1em; cursor: pointer; color: var(--n-clear-color); transition: color .3s var(--n-bezier); display: flex; `, [cssr_c('&:hover', ` color: var(--n-clear-color-hover)!important; `), cssr_c('&:active', ` color: var(--n-clear-color-pressed)!important; `)]), cE('placeholder', ` display: flex; `), cE('clear, placeholder', ` position: absolute; left: 50%; top: 50%; transform: translateX(-50%) translateY(-50%); `, [iconSwitchTransition({ originalTransform: 'translateX(-50%) translateY(-50%)', left: '50%', top: '50%' })])])])); ;// ./node_modules/naive-ui/es/_internal/clear/src/Clear.mjs /* harmony default export */ var src_Clear = (defineComponent({ name: 'BaseClear', props: { clsPrefix: { type: String, required: true }, show: Boolean, onClear: Function }, setup(props) { useStyle('-base-clear', clear_src_styles_index_cssr, toRef(props, 'clsPrefix')); return { handleMouseDown(e) { e.preventDefault(); } }; }, render() { const { clsPrefix } = this; return h("div", { class: `${clsPrefix}-base-clear` }, h(IconSwitchTransition, null, { default: () => { var _a, _b; return this.show ? h("div", { key: "dismiss", class: `${clsPrefix}-base-clear__clear`, onClick: this.onClear, onMousedown: this.handleMouseDown, "data-clear": true }, resolveSlot(this.$slots.icon, () => [h(Icon, { clsPrefix: clsPrefix }, { default: () => h(Clear, null) })])) : h("div", { key: "icon", class: `${clsPrefix}-base-clear__placeholder` }, (_b = (_a = this.$slots).placeholder) === null || _b === void 0 ? void 0 : _b.call(_a)); } })); } })); ;// ./node_modules/naive-ui/es/_internal/icons/ChevronDown.mjs /* harmony default export */ var ChevronDown = (defineComponent({ name: 'ChevronDown', render() { return h("svg", { viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M3.14645 5.64645C3.34171 5.45118 3.65829 5.45118 3.85355 5.64645L8 9.79289L12.1464 5.64645C12.3417 5.45118 12.6583 5.45118 12.8536 5.64645C13.0488 5.84171 13.0488 6.15829 12.8536 6.35355L8.35355 10.8536C8.15829 11.0488 7.84171 11.0488 7.64645 10.8536L3.14645 6.35355C2.95118 6.15829 2.95118 5.84171 3.14645 5.64645Z", fill: "currentColor" })); } })); ;// ./node_modules/naive-ui/es/_internal/suffix/src/Suffix.mjs /* harmony default export */ var Suffix = (defineComponent({ name: 'InternalSelectionSuffix', props: { clsPrefix: { type: String, required: true }, showArrow: { type: Boolean, default: undefined }, showClear: { type: Boolean, default: undefined }, loading: { type: Boolean, default: false }, onClear: Function }, setup(props, { slots }) { return () => { const { clsPrefix } = props; return h(Loading, { clsPrefix: clsPrefix, class: `${clsPrefix}-base-suffix`, strokeWidth: 24, scale: 0.85, show: props.loading }, { default: () => props.showArrow ? h(src_Clear, { clsPrefix: clsPrefix, show: props.showClear, onClear: props.onClear }, { placeholder: () => h(Icon, { clsPrefix: clsPrefix, class: `${clsPrefix}-base-suffix__arrow` }, { default: () => resolveSlot(slots.default, () => [h(ChevronDown, null)]) }) }) : null }); }; } })); ;// ./node_modules/naive-ui/es/_internal/icons/Eye.mjs /* harmony default export */ var Eye = (defineComponent({ name: 'Eye', render() { return h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { d: "M255.66 112c-77.94 0-157.89 45.11-220.83 135.33a16 16 0 0 0-.27 17.77C82.92 340.8 161.8 400 255.66 400c92.84 0 173.34-59.38 221.79-135.25a16.14 16.14 0 0 0 0-17.47C428.89 172.28 347.8 112 255.66 112z", fill: "none", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round", "stroke-width": "32" }), h("circle", { cx: "256", cy: "256", r: "80", fill: "none", stroke: "currentColor", "stroke-miterlimit": "10", "stroke-width": "32" })); } })); ;// ./node_modules/naive-ui/es/_internal/icons/EyeOff.mjs /* harmony default export */ var EyeOff = (defineComponent({ name: 'EyeOff', render() { return h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("path", { d: "M432 448a15.92 15.92 0 0 1-11.31-4.69l-352-352a16 16 0 0 1 22.62-22.62l352 352A16 16 0 0 1 432 448z", fill: "currentColor" }), h("path", { d: "M255.66 384c-41.49 0-81.5-12.28-118.92-36.5c-34.07-22-64.74-53.51-88.7-91v-.08c19.94-28.57 41.78-52.73 65.24-72.21a2 2 0 0 0 .14-2.94L93.5 161.38a2 2 0 0 0-2.71-.12c-24.92 21-48.05 46.76-69.08 76.92a31.92 31.92 0 0 0-.64 35.54c26.41 41.33 60.4 76.14 98.28 100.65C162 402 207.9 416 255.66 416a239.13 239.13 0 0 0 75.8-12.58a2 2 0 0 0 .77-3.31l-21.58-21.58a4 4 0 0 0-3.83-1a204.8 204.8 0 0 1-51.16 6.47z", fill: "currentColor" }), h("path", { d: "M490.84 238.6c-26.46-40.92-60.79-75.68-99.27-100.53C349 110.55 302 96 255.66 96a227.34 227.34 0 0 0-74.89 12.83a2 2 0 0 0-.75 3.31l21.55 21.55a4 4 0 0 0 3.88 1a192.82 192.82 0 0 1 50.21-6.69c40.69 0 80.58 12.43 118.55 37c34.71 22.4 65.74 53.88 89.76 91a.13.13 0 0 1 0 .16a310.72 310.72 0 0 1-64.12 72.73a2 2 0 0 0-.15 2.95l19.9 19.89a2 2 0 0 0 2.7.13a343.49 343.49 0 0 0 68.64-78.48a32.2 32.2 0 0 0-.1-34.78z", fill: "currentColor" }), h("path", { d: "M256 160a95.88 95.88 0 0 0-21.37 2.4a2 2 0 0 0-1 3.38l112.59 112.56a2 2 0 0 0 3.38-1A96 96 0 0 0 256 160z", fill: "currentColor" }), h("path", { d: "M165.78 233.66a2 2 0 0 0-3.38 1a96 96 0 0 0 115 115a2 2 0 0 0 1-3.38z", fill: "currentColor" })); } })); ;// ./node_modules/naive-ui/es/locales/common/enUS.mjs const enUS = { name: 'en-US', global: { undo: 'Undo', redo: 'Redo', confirm: 'Confirm', clear: 'Clear' }, Popconfirm: { positiveText: 'Confirm', negativeText: 'Cancel' }, Cascader: { placeholder: 'Please Select', loading: 'Loading', loadingRequiredMessage: label => `Please load all ${label}'s descendants before checking it.` }, Time: { dateFormat: 'yyyy-MM-dd', dateTimeFormat: 'yyyy-MM-dd HH:mm:ss' }, DatePicker: { yearFormat: 'yyyy', monthFormat: 'MMM', dayFormat: 'eeeeee', yearTypeFormat: 'yyyy', monthTypeFormat: 'yyyy-MM', dateFormat: 'yyyy-MM-dd', dateTimeFormat: 'yyyy-MM-dd HH:mm:ss', quarterFormat: 'yyyy-qqq', weekFormat: 'YYYY-w', clear: 'Clear', now: 'Now', confirm: 'Confirm', selectTime: 'Select Time', selectDate: 'Select Date', datePlaceholder: 'Select Date', datetimePlaceholder: 'Select Date and Time', monthPlaceholder: 'Select Month', yearPlaceholder: 'Select Year', quarterPlaceholder: 'Select Quarter', weekPlaceholder: 'Select Week', startDatePlaceholder: 'Start Date', endDatePlaceholder: 'End Date', startDatetimePlaceholder: 'Start Date and Time', endDatetimePlaceholder: 'End Date and Time', startMonthPlaceholder: 'Start Month', endMonthPlaceholder: 'End Month', monthBeforeYear: true, firstDayOfWeek: 6, today: 'Today' }, DataTable: { checkTableAll: 'Select all in the table', uncheckTableAll: 'Unselect all in the table', confirm: 'Confirm', clear: 'Clear' }, LegacyTransfer: { sourceTitle: 'Source', targetTitle: 'Target' }, Transfer: { selectAll: 'Select all', unselectAll: 'Unselect all', clearAll: 'Clear', total: num => `Total ${num} items`, selected: num => `${num} items selected` }, Empty: { description: 'No Data' }, Select: { placeholder: 'Please Select' }, TimePicker: { placeholder: 'Select Time', positiveText: 'OK', negativeText: 'Cancel', now: 'Now', clear: 'Clear' }, Pagination: { goto: 'Goto', selectionSuffix: 'page' }, DynamicTags: { add: 'Add' }, Log: { loading: 'Loading' }, Input: { placeholder: 'Please Input' }, InputNumber: { placeholder: 'Please Input' }, DynamicInput: { create: 'Create' }, ThemeEditor: { title: 'Theme Editor', clearAllVars: 'Clear All Variables', clearSearch: 'Clear Search', filterCompName: 'Filter Component Name', filterVarName: 'Filter Variable Name', import: 'Import', export: 'Export', restore: 'Reset to Default' }, Image: { tipPrevious: 'Previous picture (←)', tipNext: 'Next picture (→)', tipCounterclockwise: 'Counterclockwise', tipClockwise: 'Clockwise', tipZoomOut: 'Zoom out', tipZoomIn: 'Zoom in', tipDownload: 'Download', tipClose: 'Close (Esc)', // TODO: translation tipOriginalSize: 'Zoom to original size' } }; /* harmony default export */ var common_enUS = (enUS); ;// ./node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs const formatDistanceLocale = { lessThanXSeconds: { one: "less than a second", other: "less than {{count}} seconds", }, xSeconds: { one: "1 second", other: "{{count}} seconds", }, halfAMinute: "half a minute", lessThanXMinutes: { one: "less than a minute", other: "less than {{count}} minutes", }, xMinutes: { one: "1 minute", other: "{{count}} minutes", }, aboutXHours: { one: "about 1 hour", other: "about {{count}} hours", }, xHours: { one: "1 hour", other: "{{count}} hours", }, xDays: { one: "1 day", other: "{{count}} days", }, aboutXWeeks: { one: "about 1 week", other: "about {{count}} weeks", }, xWeeks: { one: "1 week", other: "{{count}} weeks", }, aboutXMonths: { one: "about 1 month", other: "about {{count}} months", }, xMonths: { one: "1 month", other: "{{count}} months", }, aboutXYears: { one: "about 1 year", other: "about {{count}} years", }, xYears: { one: "1 year", other: "{{count}} years", }, overXYears: { one: "over 1 year", other: "over {{count}} years", }, almostXYears: { one: "almost 1 year", other: "almost {{count}} years", }, }; const formatDistance = (token, count, options) => { let result; const tokenValue = formatDistanceLocale[token]; if (typeof tokenValue === "string") { result = tokenValue; } else if (count === 1) { result = tokenValue.one; } else { result = tokenValue.other.replace("{{count}}", count.toString()); } if (options?.addSuffix) { if (options.comparison && options.comparison > 0) { return "in " + result; } else { return result + " ago"; } } return result; }; ;// ./node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs function buildFormatLongFn(args) { return (options = {}) => { // TODO: Remove String() const width = options.width ? String(options.width) : args.defaultWidth; const format = args.formats[width] || args.formats[args.defaultWidth]; return format; }; } ;// ./node_modules/date-fns/locale/en-US/_lib/formatLong.mjs const dateFormats = { full: "EEEE, MMMM do, y", long: "MMMM do, y", medium: "MMM d, y", short: "MM/dd/yyyy", }; const timeFormats = { full: "h:mm:ss a zzzz", long: "h:mm:ss a z", medium: "h:mm:ss a", short: "h:mm a", }; const dateTimeFormats = { full: "{{date}} 'at' {{time}}", long: "{{date}} 'at' {{time}}", medium: "{{date}}, {{time}}", short: "{{date}}, {{time}}", }; const formatLong = { date: buildFormatLongFn({ formats: dateFormats, defaultWidth: "full", }), time: buildFormatLongFn({ formats: timeFormats, defaultWidth: "full", }), dateTime: buildFormatLongFn({ formats: dateTimeFormats, defaultWidth: "full", }), }; ;// ./node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs const formatRelativeLocale = { lastWeek: "'last' eeee 'at' p", yesterday: "'yesterday at' p", today: "'today at' p", tomorrow: "'tomorrow at' p", nextWeek: "eeee 'at' p", other: "P", }; const formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token]; ;// ./node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs /* eslint-disable no-unused-vars */ /** * The localize function argument callback which allows to convert raw value to * the actual type. * * @param value - The value to convert * * @returns The converted value */ /** * The map of localized values for each width. */ /** * The index type of the locale unit value. It types conversion of units of * values that don't start at 0 (i.e. quarters). */ /** * Converts the unit value to the tuple of values. */ /** * The tuple of localized era values. The first element represents BC, * the second element represents AD. */ /** * The tuple of localized quarter values. The first element represents Q1. */ /** * The tuple of localized day values. The first element represents Sunday. */ /** * The tuple of localized month values. The first element represents January. */ function buildLocalizeFn(args) { return (value, options) => { const context = options?.context ? String(options.context) : "standalone"; let valuesArray; if (context === "formatting" && args.formattingValues) { const defaultWidth = args.defaultFormattingWidth || args.defaultWidth; const width = options?.width ? String(options.width) : defaultWidth; valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth]; } else { const defaultWidth = args.defaultWidth; const width = options?.width ? String(options.width) : args.defaultWidth; valuesArray = args.values[width] || args.values[defaultWidth]; } const index = args.argumentCallback ? args.argumentCallback(value) : value; // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it! return valuesArray[index]; }; } ;// ./node_modules/date-fns/locale/en-US/_lib/localize.mjs const eraValues = { narrow: ["B", "A"], abbreviated: ["BC", "AD"], wide: ["Before Christ", "Anno Domini"], }; const quarterValues = { narrow: ["1", "2", "3", "4"], abbreviated: ["Q1", "Q2", "Q3", "Q4"], wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"], }; // Note: in English, the names of days of the week and months are capitalized. // If you are making a new locale based on this one, check if the same is true for the language you're working on. // Generally, formatted dates should look like they are in the middle of a sentence, // e.g. in Spanish language the weekdays and months should be in the lowercase. const monthValues = { narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"], abbreviated: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ], wide: [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December", ], }; const dayValues = { narrow: ["S", "M", "T", "W", "T", "F", "S"], short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], wide: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", ], }; const dayPeriodValues = { narrow: { am: "a", pm: "p", midnight: "mi", noon: "n", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night", }, abbreviated: { am: "AM", pm: "PM", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night", }, wide: { am: "a.m.", pm: "p.m.", midnight: "midnight", noon: "noon", morning: "morning", afternoon: "afternoon", evening: "evening", night: "night", }, }; const formattingDayPeriodValues = { narrow: { am: "a", pm: "p", midnight: "mi", noon: "n", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night", }, abbreviated: { am: "AM", pm: "PM", midnight: "midnight", noon: "noon", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night", }, wide: { am: "a.m.", pm: "p.m.", midnight: "midnight", noon: "noon", morning: "in the morning", afternoon: "in the afternoon", evening: "in the evening", night: "at night", }, }; const ordinalNumber = (dirtyNumber, _options) => { const number = Number(dirtyNumber); // If ordinal numbers depend on context, for example, // if they are different for different grammatical genders, // use `options.unit`. // // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear', // 'day', 'hour', 'minute', 'second'. const rem100 = number % 100; if (rem100 > 20 || rem100 < 10) { switch (rem100 % 10) { case 1: return number + "st"; case 2: return number + "nd"; case 3: return number + "rd"; } } return number + "th"; }; const localize = { ordinalNumber, era: buildLocalizeFn({ values: eraValues, defaultWidth: "wide", }), quarter: buildLocalizeFn({ values: quarterValues, defaultWidth: "wide", argumentCallback: (quarter) => quarter - 1, }), month: buildLocalizeFn({ values: monthValues, defaultWidth: "wide", }), day: buildLocalizeFn({ values: dayValues, defaultWidth: "wide", }), dayPeriod: buildLocalizeFn({ values: dayPeriodValues, defaultWidth: "wide", formattingValues: formattingDayPeriodValues, defaultFormattingWidth: "wide", }), }; ;// ./node_modules/date-fns/locale/_lib/buildMatchFn.mjs function buildMatchFn(args) { return (string, options = {}) => { const width = options.width; const matchPattern = (width && args.matchPatterns[width]) || args.matchPatterns[args.defaultMatchWidth]; const matchResult = string.match(matchPattern); if (!matchResult) { return null; } const matchedString = matchResult[0]; const parsePatterns = (width && args.parsePatterns[width]) || args.parsePatterns[args.defaultParseWidth]; const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type buildMatchFn_findKey(parsePatterns, (pattern) => pattern.test(matchedString)); let value; value = args.valueCallback ? args.valueCallback(key) : key; value = options.valueCallback ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type options.valueCallback(value) : value; const rest = string.slice(matchedString.length); return { value, rest }; }; } function buildMatchFn_findKey(object, predicate) { for (const key in object) { if ( Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key]) ) { return key; } } return undefined; } function findIndex(array, predicate) { for (let key = 0; key < array.length; key++) { if (predicate(array[key])) { return key; } } return undefined; } ;// ./node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs function buildMatchPatternFn(args) { return (string, options = {}) => { const matchResult = string.match(args.matchPattern); if (!matchResult) return null; const matchedString = matchResult[0]; const parseResult = string.match(args.parsePattern); if (!parseResult) return null; let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0]; // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type value = options.valueCallback ? options.valueCallback(value) : value; const rest = string.slice(matchedString.length); return { value, rest }; }; } ;// ./node_modules/date-fns/locale/en-US/_lib/match.mjs const matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i; const parseOrdinalNumberPattern = /\d+/i; const matchEraPatterns = { narrow: /^(b|a)/i, abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i, wide: /^(before christ|before common era|anno domini|common era)/i, }; const parseEraPatterns = { any: [/^b/i, /^(a|c)/i], }; const matchQuarterPatterns = { narrow: /^[1234]/i, abbreviated: /^q[1234]/i, wide: /^[1234](th|st|nd|rd)? quarter/i, }; const parseQuarterPatterns = { any: [/1/i, /2/i, /3/i, /4/i], }; const matchMonthPatterns = { narrow: /^[jfmasond]/i, abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i, wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i, }; const parseMonthPatterns = { narrow: [ /^j/i, /^f/i, /^m/i, /^a/i, /^m/i, /^j/i, /^j/i, /^a/i, /^s/i, /^o/i, /^n/i, /^d/i, ], any: [ /^ja/i, /^f/i, /^mar/i, /^ap/i, /^may/i, /^jun/i, /^jul/i, /^au/i, /^s/i, /^o/i, /^n/i, /^d/i, ], }; const matchDayPatterns = { narrow: /^[smtwf]/i, short: /^(su|mo|tu|we|th|fr|sa)/i, abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i, wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i, }; const parseDayPatterns = { narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i], any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i], }; const matchDayPeriodPatterns = { narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i, any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i, }; const parseDayPeriodPatterns = { any: { am: /^a/i, pm: /^p/i, midnight: /^mi/i, noon: /^no/i, morning: /morning/i, afternoon: /afternoon/i, evening: /evening/i, night: /night/i, }, }; const match = { ordinalNumber: buildMatchPatternFn({ matchPattern: matchOrdinalNumberPattern, parsePattern: parseOrdinalNumberPattern, valueCallback: (value) => parseInt(value, 10), }), era: buildMatchFn({ matchPatterns: matchEraPatterns, defaultMatchWidth: "wide", parsePatterns: parseEraPatterns, defaultParseWidth: "any", }), quarter: buildMatchFn({ matchPatterns: matchQuarterPatterns, defaultMatchWidth: "wide", parsePatterns: parseQuarterPatterns, defaultParseWidth: "any", valueCallback: (index) => index + 1, }), month: buildMatchFn({ matchPatterns: matchMonthPatterns, defaultMatchWidth: "wide", parsePatterns: parseMonthPatterns, defaultParseWidth: "any", }), day: buildMatchFn({ matchPatterns: matchDayPatterns, defaultMatchWidth: "wide", parsePatterns: parseDayPatterns, defaultParseWidth: "any", }), dayPeriod: buildMatchFn({ matchPatterns: matchDayPeriodPatterns, defaultMatchWidth: "any", parsePatterns: parseDayPeriodPatterns, defaultParseWidth: "any", }), }; ;// ./node_modules/date-fns/locale/en-US.mjs /** * @category Locales * @summary English locale (United States). * @language English * @iso-639-2 eng * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp) * @author Lesha Koss [@leshakoss](https://github.com/leshakoss) */ const en_US_enUS = { code: "en-US", formatDistance: formatDistance, formatLong: formatLong, formatRelative: formatRelative, localize: localize, match: match, options: { weekStartsOn: 0 /* Sunday */, firstWeekContainsDate: 1, }, }; // Fallback for modularized imports: /* harmony default export */ var en_US = ((/* unused pure expression or super */ null && (en_US_enUS))); ;// ./node_modules/naive-ui/es/locales/date/enUS.mjs const dateEnUs = { name: 'en-US', locale: en_US_enUS }; /* harmony default export */ var date_enUS = (dateEnUs); ;// ./node_modules/naive-ui/es/_mixins/use-locale.mjs function useLocale(ns) { const { mergedLocaleRef, mergedDateLocaleRef } = runtime_core_esm_bundler_inject(context_configProviderInjectionKey, null) || {}; const localeRef = runtime_core_esm_bundler_computed(() => { var _a, _b; return (_b = (_a = mergedLocaleRef === null || mergedLocaleRef === void 0 ? void 0 : mergedLocaleRef.value) === null || _a === void 0 ? void 0 : _a[ns]) !== null && _b !== void 0 ? _b : common_enUS[ns]; }); const dateLocaleRef = runtime_core_esm_bundler_computed(() => { var _a; return (_a = mergedDateLocaleRef === null || mergedDateLocaleRef === void 0 ? void 0 : mergedDateLocaleRef.value) !== null && _a !== void 0 ? _a : date_enUS; }); return { dateLocaleRef, localeRef }; } ;// ./node_modules/naive-ui/es/input/styles/_common.mjs /* harmony default export */ var input_styles_common = ({ paddingTiny: '0 8px', paddingSmall: '0 10px', paddingMedium: '0 12px', paddingLarge: '0 14px', clearSize: '16px' }); ;// ./node_modules/naive-ui/es/input/styles/light.mjs function input_styles_light_self(vars) { const { textColor2, textColor3, textColorDisabled, primaryColor, primaryColorHover, inputColor, inputColorDisabled, borderColor, warningColor, warningColorHover, errorColor, errorColorHover, borderRadius, lineHeight, fontSizeTiny, fontSizeSmall, fontSizeMedium, fontSizeLarge, heightTiny, heightSmall, heightMedium, heightLarge, actionColor, clearColor, clearColorHover, clearColorPressed, placeholderColor, placeholderColorDisabled, iconColor, iconColorDisabled, iconColorHover, iconColorPressed, fontWeight } = vars; return Object.assign(Object.assign({}, input_styles_common), { fontWeight, countTextColorDisabled: textColorDisabled, countTextColor: textColor3, heightTiny, heightSmall, heightMedium, heightLarge, fontSizeTiny, fontSizeSmall, fontSizeMedium, fontSizeLarge, lineHeight, lineHeightTextarea: lineHeight, borderRadius, iconSize: '16px', groupLabelColor: actionColor, groupLabelTextColor: textColor2, textColor: textColor2, textColorDisabled, textDecorationColor: textColor2, caretColor: primaryColor, placeholderColor, placeholderColorDisabled, color: inputColor, colorDisabled: inputColorDisabled, colorFocus: inputColor, groupLabelBorder: `1px solid ${borderColor}`, border: `1px solid ${borderColor}`, borderHover: `1px solid ${primaryColorHover}`, borderDisabled: `1px solid ${borderColor}`, borderFocus: `1px solid ${primaryColorHover}`, boxShadowFocus: `0 0 0 2px ${changeColor(primaryColor, { alpha: 0.2 })}`, loadingColor: primaryColor, // warning loadingColorWarning: warningColor, borderWarning: `1px solid ${warningColor}`, borderHoverWarning: `1px solid ${warningColorHover}`, colorFocusWarning: inputColor, borderFocusWarning: `1px solid ${warningColorHover}`, boxShadowFocusWarning: `0 0 0 2px ${changeColor(warningColor, { alpha: 0.2 })}`, caretColorWarning: warningColor, // error loadingColorError: errorColor, borderError: `1px solid ${errorColor}`, borderHoverError: `1px solid ${errorColorHover}`, colorFocusError: inputColor, borderFocusError: `1px solid ${errorColorHover}`, boxShadowFocusError: `0 0 0 2px ${changeColor(errorColor, { alpha: 0.2 })}`, caretColorError: errorColor, clearColor, clearColorHover, clearColorPressed, iconColor, iconColorDisabled, iconColorHover, iconColorPressed, suffixTextColor: textColor2 }); } const inputLight = { name: 'Input', common: light, self: input_styles_light_self }; /* harmony default export */ var input_styles_light = (inputLight); ;// ./node_modules/naive-ui/es/input/src/interface.mjs const inputInjectionKey = createInjectionKey('n-input'); ;// ./node_modules/naive-ui/es/input/src/styles/input.cssr.mjs // vars: // --n-bezier // --n-color // --n-font-size // --n-border-radius // --n-height // --n-padding-left // --n-padding-right // --n-text-color // --n-text-color-disabled // --n-caret-color // --n-text-decoration-color // --n-border // --n-border-disabled // --n-border-hover // --n-border-focus // --n-placeholder-color // --n-placeholder-color-disabled // --n-line-height-textarea // --n-color-disabled // --n-color-focus // --n-box-shadow-focus // --n-clear-color // --n-clear-size // --n-clear-color-hover // --n-clear-color-pressed // --n-suffix-text-color // --n-icon-color // --n-icon-color-hover // --n-icon-color-pressed // --n-icon-color-disabled // --n-count-text-color // --n-count-text-color-disabled // --n-loading-color // ...form item vars /* harmony default export */ var input_cssr = (cB('input', ` max-width: 100%; cursor: text; line-height: 1.5; z-index: auto; outline: none; box-sizing: border-box; position: relative; display: inline-flex; border-radius: var(--n-border-radius); background-color: var(--n-color); transition: background-color .3s var(--n-bezier); font-size: var(--n-font-size); font-weight: var(--n-font-weight); --n-padding-vertical: calc((var(--n-height) - 1.5 * var(--n-font-size)) / 2); `, [ // common cE('input, textarea', ` overflow: hidden; flex-grow: 1; position: relative; `), cE('input-el, textarea-el, input-mirror, textarea-mirror, separator, placeholder', ` box-sizing: border-box; font-size: inherit; line-height: 1.5; font-family: inherit; border: none; outline: none; background-color: #0000; text-align: inherit; transition: -webkit-text-fill-color .3s var(--n-bezier), caret-color .3s var(--n-bezier), color .3s var(--n-bezier), text-decoration-color .3s var(--n-bezier); `), cE('input-el, textarea-el', ` -webkit-appearance: none; scrollbar-width: none; width: 100%; min-width: 0; text-decoration-color: var(--n-text-decoration-color); color: var(--n-text-color); caret-color: var(--n-caret-color); background-color: transparent; `, [cssr_c('&::-webkit-scrollbar, &::-webkit-scrollbar-track-piece, &::-webkit-scrollbar-thumb', ` width: 0; height: 0; display: none; `), cssr_c('&::placeholder', ` color: #0000; -webkit-text-fill-color: transparent !important; `), cssr_c('&:-webkit-autofill ~', [cE('placeholder', 'display: none;')])]), cM('round', [cNotM('textarea', 'border-radius: calc(var(--n-height) / 2);')]), cE('placeholder', ` pointer-events: none; position: absolute; left: 0; right: 0; top: 0; bottom: 0; overflow: hidden; color: var(--n-placeholder-color); `, [cssr_c('span', ` width: 100%; display: inline-block; `)]), cM('textarea', [cE('placeholder', 'overflow: visible;')]), cNotM('autosize', 'width: 100%;'), cM('autosize', [cE('textarea-el, input-el', ` position: absolute; top: 0; left: 0; height: 100%; `)]), // input cB('input-wrapper', ` overflow: hidden; display: inline-flex; flex-grow: 1; position: relative; padding-left: var(--n-padding-left); padding-right: var(--n-padding-right); `), cE('input-mirror', ` padding: 0; height: var(--n-height); line-height: var(--n-height); overflow: hidden; visibility: hidden; position: static; white-space: pre; pointer-events: none; `), cE('input-el', ` padding: 0; height: var(--n-height); line-height: var(--n-height); `, [cssr_c('&[type=password]::-ms-reveal', 'display: none;'), cssr_c('+', [cE('placeholder', ` display: flex; align-items: center; `)])]), cNotM('textarea', [cE('placeholder', 'white-space: nowrap;')]), cE('eye', ` display: flex; align-items: center; justify-content: center; transition: color .3s var(--n-bezier); `), // textarea cM('textarea', 'width: 100%;', [cB('input-word-count', ` position: absolute; right: var(--n-padding-right); bottom: var(--n-padding-vertical); `), cM('resizable', [cB('input-wrapper', ` resize: vertical; min-height: var(--n-height); `)]), cE('textarea-el, textarea-mirror, placeholder', ` height: 100%; padding-left: 0; padding-right: 0; padding-top: var(--n-padding-vertical); padding-bottom: var(--n-padding-vertical); word-break: break-word; display: inline-block; vertical-align: bottom; box-sizing: border-box; line-height: var(--n-line-height-textarea); margin: 0; resize: none; white-space: pre-wrap; scroll-padding-block-end: var(--n-padding-vertical); `), cE('textarea-mirror', ` width: 100%; pointer-events: none; overflow: hidden; visibility: hidden; position: static; white-space: pre-wrap; overflow-wrap: break-word; `)]), // pair cM('pair', [cE('input-el, placeholder', 'text-align: center;'), cE('separator', ` display: flex; align-items: center; transition: color .3s var(--n-bezier); color: var(--n-text-color); white-space: nowrap; `, [cB('icon', ` color: var(--n-icon-color); `), cB('base-icon', ` color: var(--n-icon-color); `)])]), cM('disabled', ` cursor: not-allowed; background-color: var(--n-color-disabled); `, [cE('border', 'border: var(--n-border-disabled);'), cE('input-el, textarea-el', ` cursor: not-allowed; color: var(--n-text-color-disabled); text-decoration-color: var(--n-text-color-disabled); `), cE('placeholder', 'color: var(--n-placeholder-color-disabled);'), cE('separator', 'color: var(--n-text-color-disabled);', [cB('icon', ` color: var(--n-icon-color-disabled); `), cB('base-icon', ` color: var(--n-icon-color-disabled); `)]), cB('input-word-count', ` color: var(--n-count-text-color-disabled); `), cE('suffix, prefix', 'color: var(--n-text-color-disabled);', [cB('icon', ` color: var(--n-icon-color-disabled); `), cB('internal-icon', ` color: var(--n-icon-color-disabled); `)])]), cNotM('disabled', [cE('eye', ` color: var(--n-icon-color); cursor: pointer; `, [cssr_c('&:hover', ` color: var(--n-icon-color-hover); `), cssr_c('&:active', ` color: var(--n-icon-color-pressed); `)]), cssr_c('&:hover', [cE('state-border', 'border: var(--n-border-hover);')]), cM('focus', 'background-color: var(--n-color-focus);', [cE('state-border', ` border: var(--n-border-focus); box-shadow: var(--n-box-shadow-focus); `)])]), cE('border, state-border', ` box-sizing: border-box; position: absolute; left: 0; right: 0; top: 0; bottom: 0; pointer-events: none; border-radius: inherit; border: var(--n-border); transition: box-shadow .3s var(--n-bezier), border-color .3s var(--n-bezier); `), cE('state-border', ` border-color: #0000; z-index: 1; `), cE('prefix', 'margin-right: 4px;'), cE('suffix', ` margin-left: 4px; `), cE('suffix, prefix', ` transition: color .3s var(--n-bezier); flex-wrap: nowrap; flex-shrink: 0; line-height: var(--n-height); white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; color: var(--n-suffix-text-color); `, [cB('base-loading', ` font-size: var(--n-icon-size); margin: 0 2px; color: var(--n-loading-color); `), cB('base-clear', ` font-size: var(--n-icon-size); `, [cE('placeholder', [cB('base-icon', ` transition: color .3s var(--n-bezier); color: var(--n-icon-color); font-size: var(--n-icon-size); `)])]), cssr_c('>', [cB('icon', ` transition: color .3s var(--n-bezier); color: var(--n-icon-color); font-size: var(--n-icon-size); `)]), cB('base-icon', ` font-size: var(--n-icon-size); `)]), cB('input-word-count', ` pointer-events: none; line-height: 1.5; font-size: .85em; color: var(--n-count-text-color); transition: color .3s var(--n-bezier); margin-left: 4px; font-variant: tabular-nums; `), ['warning', 'error'].map(status => cM(`${status}-status`, [cNotM('disabled', [cB('base-loading', ` color: var(--n-loading-color-${status}) `), cE('input-el, textarea-el', ` caret-color: var(--n-caret-color-${status}); `), cE('state-border', ` border: var(--n-border-${status}); `), cssr_c('&:hover', [cE('state-border', ` border: var(--n-border-hover-${status}); `)]), cssr_c('&:focus', ` background-color: var(--n-color-focus-${status}); `, [cE('state-border', ` box-shadow: var(--n-box-shadow-focus-${status}); border: var(--n-border-focus-${status}); `)]), cM('focus', ` background-color: var(--n-color-focus-${status}); `, [cE('state-border', ` box-shadow: var(--n-box-shadow-focus-${status}); border: var(--n-border-focus-${status}); `)])])]))])); const safariStyle = cB('input', [cM('disabled', [cE('input-el, textarea-el', ` -webkit-text-fill-color: var(--n-text-color-disabled); `)])]); ;// ./node_modules/naive-ui/es/input/src/utils.mjs function len(s) { let count = 0; for (const _ of s) { count++; } return count; } function isEmptyInputValue(value) { return value === '' || value == null; } function useCursor(inputElRef) { const selectionRef = ref(null); function recordCursor() { const { value: input } = inputElRef; if (!(input === null || input === void 0 ? void 0 : input.focus)) { reset(); return; } const { selectionStart, selectionEnd, value } = input; if (selectionStart == null || selectionEnd == null) { reset(); return; } selectionRef.value = { start: selectionStart, end: selectionEnd, beforeText: value.slice(0, selectionStart), afterText: value.slice(selectionEnd) }; } function restoreCursor() { var _a; const { value: selection } = selectionRef; const { value: inputEl } = inputElRef; if (!selection || !inputEl) { return; } const { value } = inputEl; const { start, beforeText, afterText } = selection; let startPos = value.length; if (value.endsWith(afterText)) { startPos = value.length - afterText.length; } else if (value.startsWith(beforeText)) { startPos = beforeText.length; } else { const beforeLastChar = beforeText[start - 1]; const newIndex = value.indexOf(beforeLastChar, start - 1); if (newIndex !== -1) { startPos = newIndex + 1; } } (_a = inputEl.setSelectionRange) === null || _a === void 0 ? void 0 : _a.call(inputEl, startPos, startPos); } function reset() { selectionRef.value = null; } runtime_core_esm_bundler_watch(inputElRef, reset); return { recordCursor, restoreCursor }; } ;// ./node_modules/naive-ui/es/input/src/WordCount.mjs /* harmony default export */ var WordCount = (defineComponent({ name: 'InputWordCount', setup(_, { slots }) { const { mergedValueRef, maxlengthRef, mergedClsPrefixRef, countGraphemesRef } = runtime_core_esm_bundler_inject(inputInjectionKey); const wordCountRef = runtime_core_esm_bundler_computed(() => { const { value: mergedValue } = mergedValueRef; if (mergedValue === null || Array.isArray(mergedValue)) return 0; return (countGraphemesRef.value || len)(mergedValue); }); return () => { const { value: maxlength } = maxlengthRef; const { value: mergedValue } = mergedValueRef; return h("span", { class: `${mergedClsPrefixRef.value}-input-word-count` }, resolveSlotWithTypedProps(slots.default, { value: mergedValue === null || Array.isArray(mergedValue) ? '' : mergedValue }, () => [maxlength === undefined ? wordCountRef.value : `${wordCountRef.value} / ${maxlength}`])); }; } })); ;// ./node_modules/naive-ui/es/input/src/Input.mjs const inputProps = Object.assign(Object.assign({}, use_theme.props), { bordered: { type: Boolean, default: undefined }, type: { type: String, default: 'text' }, placeholder: [Array, String], defaultValue: { type: [String, Array], default: null }, value: [String, Array], disabled: { type: Boolean, default: undefined }, size: String, rows: { type: [Number, String], default: 3 }, round: Boolean, minlength: [String, Number], maxlength: [String, Number], clearable: Boolean, autosize: { type: [Boolean, Object], default: false }, pair: Boolean, separator: String, readonly: { type: [String, Boolean], default: false }, passivelyActivated: Boolean, showPasswordOn: String, stateful: { type: Boolean, default: true }, autofocus: Boolean, inputProps: Object, resizable: { type: Boolean, default: true }, showCount: Boolean, loading: { type: Boolean, default: undefined }, allowInput: Function, renderCount: Function, onMousedown: Function, onKeydown: Function, onKeyup: [Function, Array], onInput: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array], onClick: [Function, Array], onChange: [Function, Array], onClear: [Function, Array], countGraphemes: Function, status: String, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array], /** private */ textDecoration: [String, Array], attrSize: { type: Number, default: 20 }, onInputBlur: [Function, Array], onInputFocus: [Function, Array], onDeactivate: [Function, Array], onActivate: [Function, Array], onWrapperFocus: [Function, Array], onWrapperBlur: [Function, Array], internalDeactivateOnEnter: Boolean, internalForceFocus: Boolean, internalLoadingBeforeSuffix: { type: Boolean, default: true }, /** deprecated */ showPasswordToggle: Boolean }); /* harmony default export */ var Input = (defineComponent({ name: 'Input', props: inputProps, slots: Object, setup(props) { if (false) {} const { mergedClsPrefixRef, mergedBorderedRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props); const themeRef = use_theme('Input', '-input', input_cssr, input_styles_light, props, mergedClsPrefixRef); if (isSafari) { useStyle('-input-safari', safariStyle, mergedClsPrefixRef); } // dom refs const wrapperElRef = ref(null); const textareaElRef = ref(null); const textareaMirrorElRef = ref(null); const inputMirrorElRef = ref(null); const inputElRef = ref(null); const inputEl2Ref = ref(null); const currentFocusedInputRef = ref(null); const focusedInputCursorControl = useCursor(currentFocusedInputRef); const textareaScrollbarInstRef = ref(null); // local const { localeRef } = useLocale('Input'); // value const uncontrolledValueRef = ref(props.defaultValue); const controlledValueRef = toRef(props, 'value'); const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef); // form-item const formItem = useFormItem(props); const { mergedSizeRef, mergedDisabledRef, mergedStatusRef } = formItem; // states const focusedRef = ref(false); const hoverRef = ref(false); const isComposingRef = ref(false); const activatedRef = ref(false); let syncSource = null; // placeholder const mergedPlaceholderRef = runtime_core_esm_bundler_computed(() => { const { placeholder, pair } = props; if (pair) { if (Array.isArray(placeholder)) { return placeholder; } else if (placeholder === undefined) { return ['', '']; } return [placeholder, placeholder]; } else if (placeholder === undefined) { return [localeRef.value.placeholder]; } else { return [placeholder]; } }); const showPlaceholder1Ref = runtime_core_esm_bundler_computed(() => { const { value: isComposing } = isComposingRef; const { value: mergedValue } = mergedValueRef; const { value: mergedPlaceholder } = mergedPlaceholderRef; return !isComposing && (isEmptyInputValue(mergedValue) || Array.isArray(mergedValue) && isEmptyInputValue(mergedValue[0])) && mergedPlaceholder[0]; }); const showPlaceholder2Ref = runtime_core_esm_bundler_computed(() => { const { value: isComposing } = isComposingRef; const { value: mergedValue } = mergedValueRef; const { value: mergedPlaceholder } = mergedPlaceholderRef; return !isComposing && mergedPlaceholder[1] && (isEmptyInputValue(mergedValue) || Array.isArray(mergedValue) && isEmptyInputValue(mergedValue[1])); }); // focus const mergedFocusRef = use_memo(() => { return props.internalForceFocus || focusedRef.value; }); // clear const showClearButton = use_memo(() => { if (mergedDisabledRef.value || props.readonly || !props.clearable || !mergedFocusRef.value && !hoverRef.value) { return false; } const { value: mergedValue } = mergedValueRef; const { value: mergedFocus } = mergedFocusRef; if (props.pair) { return !!(Array.isArray(mergedValue) && (mergedValue[0] || mergedValue[1])) && (hoverRef.value || mergedFocus); } else { return !!mergedValue && (hoverRef.value || mergedFocus); } }); // passwordVisible const mergedShowPasswordOnRef = runtime_core_esm_bundler_computed(() => { const { showPasswordOn } = props; if (showPasswordOn) { return showPasswordOn; } if (props.showPasswordToggle) return 'click'; return undefined; }); const passwordVisibleRef = ref(false); // text-decoration const textDecorationStyleRef = runtime_core_esm_bundler_computed(() => { const { textDecoration } = props; if (!textDecoration) return ['', '']; if (Array.isArray(textDecoration)) { return textDecoration.map(v => ({ textDecoration: v })); } return [{ textDecoration }]; }); const textAreaScrollContainerWidthRef = ref(undefined); // textarea autosize const updateTextAreaStyle = () => { var _a, _b; if (props.type === 'textarea') { const { autosize } = props; if (autosize) { textAreaScrollContainerWidthRef.value = (_b = (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.$el) === null || _b === void 0 ? void 0 : _b.offsetWidth; } if (!textareaElRef.value) return; if (typeof autosize === 'boolean') return; const { paddingTop: stylePaddingTop, paddingBottom: stylePaddingBottom, lineHeight: styleLineHeight } = window.getComputedStyle(textareaElRef.value); const paddingTop = Number(stylePaddingTop.slice(0, -2)); const paddingBottom = Number(stylePaddingBottom.slice(0, -2)); const lineHeight = Number(styleLineHeight.slice(0, -2)); const { value: textareaMirrorEl } = textareaMirrorElRef; if (!textareaMirrorEl) return; if (autosize.minRows) { const minRows = Math.max(autosize.minRows, 1); const styleMinHeight = `${paddingTop + paddingBottom + lineHeight * minRows}px`; textareaMirrorEl.style.minHeight = styleMinHeight; } if (autosize.maxRows) { const styleMaxHeight = `${paddingTop + paddingBottom + lineHeight * autosize.maxRows}px`; textareaMirrorEl.style.maxHeight = styleMaxHeight; } } }; // word count const maxlengthRef = runtime_core_esm_bundler_computed(() => { const { maxlength } = props; return maxlength === undefined ? undefined : Number(maxlength); }); runtime_core_esm_bundler_onMounted(() => { // sync mirror if is not pair const { value } = mergedValueRef; if (!Array.isArray(value)) { syncMirror(value); } }); // other methods const vm = runtime_core_esm_bundler_getCurrentInstance().proxy; function doUpdateValue(value, meta) { const { onUpdateValue, 'onUpdate:value': _onUpdateValue, onInput } = props; const { nTriggerFormInput } = formItem; if (onUpdateValue) call(onUpdateValue, value, meta); if (_onUpdateValue) call(_onUpdateValue, value, meta); if (onInput) call(onInput, value, meta); uncontrolledValueRef.value = value; nTriggerFormInput(); } function doChange(value, meta) { const { onChange } = props; const { nTriggerFormChange } = formItem; if (onChange) call(onChange, value, meta); uncontrolledValueRef.value = value; nTriggerFormChange(); } function doBlur(e) { const { onBlur } = props; const { nTriggerFormBlur } = formItem; if (onBlur) call(onBlur, e); nTriggerFormBlur(); } function doFocus(e) { const { onFocus } = props; const { nTriggerFormFocus } = formItem; if (onFocus) call(onFocus, e); nTriggerFormFocus(); } function doClear(e) { const { onClear } = props; if (onClear) call(onClear, e); } function doUpdateValueBlur(e) { const { onInputBlur } = props; if (onInputBlur) call(onInputBlur, e); } function doUpdateValueFocus(e) { const { onInputFocus } = props; if (onInputFocus) call(onInputFocus, e); } function doDeactivate() { const { onDeactivate } = props; if (onDeactivate) call(onDeactivate); } function doActivate() { const { onActivate } = props; if (onActivate) call(onActivate); } function doClick(e) { const { onClick } = props; if (onClick) call(onClick, e); } function doWrapperFocus(e) { const { onWrapperFocus } = props; if (onWrapperFocus) call(onWrapperFocus, e); } function doWrapperBlur(e) { const { onWrapperBlur } = props; if (onWrapperBlur) call(onWrapperBlur, e); } // methods function handleCompositionStart() { isComposingRef.value = true; } function handleCompositionEnd(e) { isComposingRef.value = false; if (e.target === inputEl2Ref.value) { handleInput(e, 1); } else { handleInput(e, 0); } } function handleInput(e, index = 0, event = 'input') { const targetValue = e.target.value; syncMirror(targetValue); if (e instanceof InputEvent && !e.isComposing) { isComposingRef.value = false; } if (props.type === 'textarea') { const { value: textareaScrollbarInst } = textareaScrollbarInstRef; if (textareaScrollbarInst) { textareaScrollbarInst.syncUnifiedContainer(); } } syncSource = targetValue; if (isComposingRef.value) return; focusedInputCursorControl.recordCursor(); const isIncomingValueValid = allowInput(targetValue); if (isIncomingValueValid) { if (!props.pair) { if (event === 'input') { doUpdateValue(targetValue, { source: index }); } else { doChange(targetValue, { source: index }); } } else { let { value } = mergedValueRef; if (!Array.isArray(value)) { value = ['', '']; } else { value = [value[0], value[1]]; } value[index] = targetValue; if (event === 'input') { doUpdateValue(value, { source: index }); } else { doChange(value, { source: index }); } } } // force update to sync input's view with value // if not set, after input, input value won't sync with dom input value vm.$forceUpdate(); if (!isIncomingValueValid) { void nextTick(focusedInputCursorControl.restoreCursor); } } function allowInput(value) { const { countGraphemes, maxlength, minlength } = props; if (countGraphemes) { let graphemesCount; if (maxlength !== undefined) { if (graphemesCount === undefined) { graphemesCount = countGraphemes(value); } if (graphemesCount > Number(maxlength)) return false; } if (minlength !== undefined) { if (graphemesCount === undefined) { graphemesCount = countGraphemes(value); } if (graphemesCount < Number(maxlength)) return false; } } const { allowInput } = props; if (typeof allowInput === 'function') { return allowInput(value); } return true; } function handleInputBlur(e) { doUpdateValueBlur(e); if (e.relatedTarget === wrapperElRef.value) { doDeactivate(); } if (!(e.relatedTarget !== null && (e.relatedTarget === inputElRef.value || e.relatedTarget === inputEl2Ref.value || e.relatedTarget === textareaElRef.value))) { activatedRef.value = false; } dealWithEvent(e, 'blur'); currentFocusedInputRef.value = null; } function handleInputFocus(e, index) { doUpdateValueFocus(e); focusedRef.value = true; activatedRef.value = true; doActivate(); dealWithEvent(e, 'focus'); if (index === 0) { currentFocusedInputRef.value = inputElRef.value; } else if (index === 1) { currentFocusedInputRef.value = inputEl2Ref.value; } else if (index === 2) { currentFocusedInputRef.value = textareaElRef.value; } } function handleWrapperBlur(e) { if (props.passivelyActivated) { doWrapperBlur(e); dealWithEvent(e, 'blur'); } } function handleWrapperFocus(e) { if (props.passivelyActivated) { focusedRef.value = true; doWrapperFocus(e); dealWithEvent(e, 'focus'); } } function dealWithEvent(e, type) { if (e.relatedTarget !== null && (e.relatedTarget === inputElRef.value || e.relatedTarget === inputEl2Ref.value || e.relatedTarget === textareaElRef.value || e.relatedTarget === wrapperElRef.value)) { /** * activeElement transfer inside the input, do nothing */ } else { if (type === 'focus') { doFocus(e); focusedRef.value = true; } else if (type === 'blur') { doBlur(e); focusedRef.value = false; } } } function handleChange(e, index) { handleInput(e, index, 'change'); } function handleClick(e) { doClick(e); } function handleClear(e) { doClear(e); clearValue(); } function clearValue() { if (props.pair) { doUpdateValue(['', ''], { source: 'clear' }); doChange(['', ''], { source: 'clear' }); } else { doUpdateValue('', { source: 'clear' }); doChange('', { source: 'clear' }); } } function handleMouseDown(e) { const { onMousedown } = props; if (onMousedown) onMousedown(e); const { tagName } = e.target; if (tagName !== 'INPUT' && tagName !== 'TEXTAREA') { if (props.resizable) { const { value: wrapperEl } = wrapperElRef; if (wrapperEl) { const { left, top, width, height } = wrapperEl.getBoundingClientRect(); const resizeHandleSize = 14; if (left + width - resizeHandleSize < e.clientX && e.clientX < left + width && top + height - resizeHandleSize < e.clientY && e.clientY < top + height) { // touching resize handle, just let it go. // resize won't take focus, maybe there is a better way to do this. // hope someone can figure out a better solution return; } } } e.preventDefault(); if (!focusedRef.value) { focus(); } } } function handleMouseEnter() { var _a; hoverRef.value = true; if (props.type === 'textarea') { (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.handleMouseEnterWrapper(); } } function handleMouseLeave() { var _a; hoverRef.value = false; if (props.type === 'textarea') { (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.handleMouseLeaveWrapper(); } } function handlePasswordToggleClick() { if (mergedDisabledRef.value) return; if (mergedShowPasswordOnRef.value !== 'click') return; passwordVisibleRef.value = !passwordVisibleRef.value; } function handlePasswordToggleMousedown(e) { if (mergedDisabledRef.value) return; e.preventDefault(); const preventDefaultOnce = e => { e.preventDefault(); off('mouseup', document, preventDefaultOnce); }; on('mouseup', document, preventDefaultOnce); if (mergedShowPasswordOnRef.value !== 'mousedown') return; passwordVisibleRef.value = true; const hidePassword = () => { passwordVisibleRef.value = false; off('mouseup', document, hidePassword); }; on('mouseup', document, hidePassword); } function handleWrapperKeyup(e) { if (props.onKeyup) call(props.onKeyup, e); } function handleWrapperKeydown(e) { if (props.onKeydown) call(props.onKeydown, e); switch (e.key) { case 'Escape': handleWrapperKeydownEsc(); break; case 'Enter': handleWrapperKeydownEnter(e); break; } } function handleWrapperKeydownEnter(e) { var _a, _b; if (props.passivelyActivated) { const { value: focused } = activatedRef; if (focused) { if (props.internalDeactivateOnEnter) { handleWrapperKeydownEsc(); } return; } e.preventDefault(); if (props.type === 'textarea') { (_a = textareaElRef.value) === null || _a === void 0 ? void 0 : _a.focus(); } else { (_b = inputElRef.value) === null || _b === void 0 ? void 0 : _b.focus(); } } } function handleWrapperKeydownEsc() { if (props.passivelyActivated) { activatedRef.value = false; void nextTick(() => { var _a; (_a = wrapperElRef.value) === null || _a === void 0 ? void 0 : _a.focus(); }); } } function focus() { var _a, _b, _c; if (mergedDisabledRef.value) return; if (props.passivelyActivated) { (_a = wrapperElRef.value) === null || _a === void 0 ? void 0 : _a.focus(); } else { (_b = textareaElRef.value) === null || _b === void 0 ? void 0 : _b.focus(); (_c = inputElRef.value) === null || _c === void 0 ? void 0 : _c.focus(); } } function blur() { var _a; if ((_a = wrapperElRef.value) === null || _a === void 0 ? void 0 : _a.contains(document.activeElement)) { ; document.activeElement.blur(); } } function select() { var _a, _b; (_a = textareaElRef.value) === null || _a === void 0 ? void 0 : _a.select(); (_b = inputElRef.value) === null || _b === void 0 ? void 0 : _b.select(); } function activate() { if (mergedDisabledRef.value) return; if (textareaElRef.value) textareaElRef.value.focus();else if (inputElRef.value) inputElRef.value.focus(); } function deactivate() { const { value: wrapperEl } = wrapperElRef; if ((wrapperEl === null || wrapperEl === void 0 ? void 0 : wrapperEl.contains(document.activeElement)) && wrapperEl !== document.activeElement) { handleWrapperKeydownEsc(); } } function scrollTo(options) { if (props.type === 'textarea') { const { value: textareaEl } = textareaElRef; textareaEl === null || textareaEl === void 0 ? void 0 : textareaEl.scrollTo(options); } else { const { value: inputEl } = inputElRef; inputEl === null || inputEl === void 0 ? void 0 : inputEl.scrollTo(options); } } function syncMirror(value) { const { type, pair, autosize } = props; if (!pair && autosize) { if (type === 'textarea') { const { value: textareaMirrorEl } = textareaMirrorElRef; if (textareaMirrorEl) { textareaMirrorEl.textContent = `${value !== null && value !== void 0 ? value : ''}\r\n`; } } else { const { value: inputMirrorEl } = inputMirrorElRef; if (inputMirrorEl) { if (value) { inputMirrorEl.textContent = value; } else { inputMirrorEl.innerHTML = ' '; } } } } } function handleTextAreaMirrorResize() { updateTextAreaStyle(); } const placeholderStyleRef = ref({ top: '0' }); function handleTextAreaScroll(e) { var _a; const { scrollTop } = e.target; placeholderStyleRef.value.top = `${-scrollTop}px`; (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.syncUnifiedContainer(); } let stopWatchMergedValue1 = null; watchEffect(() => { const { autosize, type } = props; if (autosize && type === 'textarea') { stopWatchMergedValue1 = runtime_core_esm_bundler_watch(mergedValueRef, value => { if (!Array.isArray(value) && value !== syncSource) { syncMirror(value); } }); } else { stopWatchMergedValue1 === null || stopWatchMergedValue1 === void 0 ? void 0 : stopWatchMergedValue1(); } }); let stopWatchMergedValue2 = null; watchEffect(() => { if (props.type === 'textarea') { stopWatchMergedValue2 = runtime_core_esm_bundler_watch(mergedValueRef, value => { var _a; if (!Array.isArray(value) && value !== syncSource) { (_a = textareaScrollbarInstRef.value) === null || _a === void 0 ? void 0 : _a.syncUnifiedContainer(); } }); } else { stopWatchMergedValue2 === null || stopWatchMergedValue2 === void 0 ? void 0 : stopWatchMergedValue2(); } }); provide(inputInjectionKey, { mergedValueRef, maxlengthRef, mergedClsPrefixRef, countGraphemesRef: toRef(props, 'countGraphemes') }); const exposedProps = { wrapperElRef, inputElRef, textareaElRef, isCompositing: isComposingRef, clear: clearValue, focus, blur, select, deactivate, activate, scrollTo }; const rtlEnabledRef = useRtl('Input', mergedRtlRef, mergedClsPrefixRef); const cssVarsRef = runtime_core_esm_bundler_computed(() => { const { value: size } = mergedSizeRef; const { common: { cubicBezierEaseInOut }, self: { color, borderRadius, textColor, caretColor, caretColorError, caretColorWarning, textDecorationColor, border, borderDisabled, borderHover, borderFocus, placeholderColor, placeholderColorDisabled, lineHeightTextarea, colorDisabled, colorFocus, textColorDisabled, boxShadowFocus, iconSize, colorFocusWarning, boxShadowFocusWarning, borderWarning, borderFocusWarning, borderHoverWarning, colorFocusError, boxShadowFocusError, borderError, borderFocusError, borderHoverError, clearSize, clearColor, clearColorHover, clearColorPressed, iconColor, iconColorDisabled, suffixTextColor, countTextColor, countTextColorDisabled, iconColorHover, iconColorPressed, loadingColor, loadingColorError, loadingColorWarning, fontWeight, [createKey('padding', size)]: padding, [createKey('fontSize', size)]: fontSize, [createKey('height', size)]: height } } = themeRef.value; const { left: paddingLeft, right: paddingRight } = getMargin(padding); return { '--n-bezier': cubicBezierEaseInOut, '--n-count-text-color': countTextColor, '--n-count-text-color-disabled': countTextColorDisabled, '--n-color': color, '--n-font-size': fontSize, '--n-font-weight': fontWeight, '--n-border-radius': borderRadius, '--n-height': height, '--n-padding-left': paddingLeft, '--n-padding-right': paddingRight, '--n-text-color': textColor, '--n-caret-color': caretColor, '--n-text-decoration-color': textDecorationColor, '--n-border': border, '--n-border-disabled': borderDisabled, '--n-border-hover': borderHover, '--n-border-focus': borderFocus, '--n-placeholder-color': placeholderColor, '--n-placeholder-color-disabled': placeholderColorDisabled, '--n-icon-size': iconSize, '--n-line-height-textarea': lineHeightTextarea, '--n-color-disabled': colorDisabled, '--n-color-focus': colorFocus, '--n-text-color-disabled': textColorDisabled, '--n-box-shadow-focus': boxShadowFocus, '--n-loading-color': loadingColor, // form warning '--n-caret-color-warning': caretColorWarning, '--n-color-focus-warning': colorFocusWarning, '--n-box-shadow-focus-warning': boxShadowFocusWarning, '--n-border-warning': borderWarning, '--n-border-focus-warning': borderFocusWarning, '--n-border-hover-warning': borderHoverWarning, '--n-loading-color-warning': loadingColorWarning, // form error '--n-caret-color-error': caretColorError, '--n-color-focus-error': colorFocusError, '--n-box-shadow-focus-error': boxShadowFocusError, '--n-border-error': borderError, '--n-border-focus-error': borderFocusError, '--n-border-hover-error': borderHoverError, '--n-loading-color-error': loadingColorError, // clear-button '--n-clear-color': clearColor, '--n-clear-size': clearSize, '--n-clear-color-hover': clearColorHover, '--n-clear-color-pressed': clearColorPressed, '--n-icon-color': iconColor, '--n-icon-color-hover': iconColorHover, '--n-icon-color-pressed': iconColorPressed, '--n-icon-color-disabled': iconColorDisabled, '--n-suffix-text-color': suffixTextColor }; }); const themeClassHandle = inlineThemeDisabled ? useThemeClass('input', runtime_core_esm_bundler_computed(() => { const { value: size } = mergedSizeRef; return size[0]; }), cssVarsRef, props) : undefined; return Object.assign(Object.assign({}, exposedProps), { // DOM ref wrapperElRef, inputElRef, inputMirrorElRef, inputEl2Ref, textareaElRef, textareaMirrorElRef, textareaScrollbarInstRef, // value rtlEnabled: rtlEnabledRef, uncontrolledValue: uncontrolledValueRef, mergedValue: mergedValueRef, passwordVisible: passwordVisibleRef, mergedPlaceholder: mergedPlaceholderRef, showPlaceholder1: showPlaceholder1Ref, showPlaceholder2: showPlaceholder2Ref, mergedFocus: mergedFocusRef, isComposing: isComposingRef, activated: activatedRef, showClearButton, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, textDecorationStyle: textDecorationStyleRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, mergedShowPasswordOn: mergedShowPasswordOnRef, placeholderStyle: placeholderStyleRef, mergedStatus: mergedStatusRef, textAreaScrollContainerWidth: textAreaScrollContainerWidthRef, // methods handleTextAreaScroll, handleCompositionStart, handleCompositionEnd, handleInput, handleInputBlur, handleInputFocus, handleWrapperBlur, handleWrapperFocus, handleMouseEnter, handleMouseLeave, handleMouseDown, handleChange, handleClick, handleClear, handlePasswordToggleClick, handlePasswordToggleMousedown, handleWrapperKeydown, handleWrapperKeyup, handleTextAreaMirrorResize, getTextareaScrollContainer: () => { return textareaElRef.value; }, mergedTheme: themeRef, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }); }, render() { var _a, _b; const { mergedClsPrefix, mergedStatus, themeClass, type, countGraphemes, onRender } = this; const $slots = this.$slots; onRender === null || onRender === void 0 ? void 0 : onRender(); return h("div", { ref: "wrapperElRef", class: [`${mergedClsPrefix}-input`, themeClass, mergedStatus && `${mergedClsPrefix}-input--${mergedStatus}-status`, { [`${mergedClsPrefix}-input--rtl`]: this.rtlEnabled, [`${mergedClsPrefix}-input--disabled`]: this.mergedDisabled, [`${mergedClsPrefix}-input--textarea`]: type === 'textarea', [`${mergedClsPrefix}-input--resizable`]: this.resizable && !this.autosize, [`${mergedClsPrefix}-input--autosize`]: this.autosize, [`${mergedClsPrefix}-input--round`]: this.round && !(type === 'textarea'), [`${mergedClsPrefix}-input--pair`]: this.pair, [`${mergedClsPrefix}-input--focus`]: this.mergedFocus, [`${mergedClsPrefix}-input--stateful`]: this.stateful }], style: this.cssVars, tabindex: !this.mergedDisabled && this.passivelyActivated && !this.activated ? 0 : undefined, onFocus: this.handleWrapperFocus, onBlur: this.handleWrapperBlur, onClick: this.handleClick, onMousedown: this.handleMouseDown, onMouseenter: this.handleMouseEnter, onMouseleave: this.handleMouseLeave, onCompositionstart: this.handleCompositionStart, onCompositionend: this.handleCompositionEnd, onKeyup: this.handleWrapperKeyup, onKeydown: this.handleWrapperKeydown }, h("div", { class: `${mergedClsPrefix}-input-wrapper` }, resolveWrappedSlot($slots.prefix, children => children && h("div", { class: `${mergedClsPrefix}-input__prefix` }, children)), type === 'textarea' ? h(src_Scrollbar, { ref: "textareaScrollbarInstRef", class: `${mergedClsPrefix}-input__textarea`, container: this.getTextareaScrollContainer, triggerDisplayManually: true, useUnifiedContainer: true, internalHoistYRail: true }, { default: () => { var _a, _b; const { textAreaScrollContainerWidth } = this; const scrollContainerWidthStyle = { width: this.autosize && textAreaScrollContainerWidth && `${textAreaScrollContainerWidth}px` }; return h(Fragment, null, h("textarea", Object.assign({}, this.inputProps, { ref: "textareaElRef", class: [`${mergedClsPrefix}-input__textarea-el`, (_a = this.inputProps) === null || _a === void 0 ? void 0 : _a.class], autofocus: this.autofocus, rows: Number(this.rows), placeholder: this.placeholder, value: this.mergedValue, disabled: this.mergedDisabled, maxlength: countGraphemes ? undefined : this.maxlength, minlength: countGraphemes ? undefined : this.minlength, readonly: this.readonly, tabindex: this.passivelyActivated && !this.activated ? -1 : undefined, style: [this.textDecorationStyle[0], (_b = this.inputProps) === null || _b === void 0 ? void 0 : _b.style, scrollContainerWidthStyle], onBlur: this.handleInputBlur, onFocus: e => { this.handleInputFocus(e, 2); }, onInput: this.handleInput, onChange: this.handleChange, onScroll: this.handleTextAreaScroll })), this.showPlaceholder1 ? h("div", { class: `${mergedClsPrefix}-input__placeholder`, style: [this.placeholderStyle, scrollContainerWidthStyle], key: "placeholder" }, this.mergedPlaceholder[0]) : null, this.autosize ? h(VResizeObserver, { onResize: this.handleTextAreaMirrorResize }, { default: () => h("div", { ref: "textareaMirrorElRef", class: `${mergedClsPrefix}-input__textarea-mirror`, key: "mirror" }) }) : null); } }) : h("div", { class: `${mergedClsPrefix}-input__input` }, h("input", Object.assign({ type: type === 'password' && this.mergedShowPasswordOn && this.passwordVisible ? 'text' : type }, this.inputProps, { ref: "inputElRef", class: [`${mergedClsPrefix}-input__input-el`, (_a = this.inputProps) === null || _a === void 0 ? void 0 : _a.class], style: [this.textDecorationStyle[0], (_b = this.inputProps) === null || _b === void 0 ? void 0 : _b.style], tabindex: this.passivelyActivated && !this.activated ? -1 : undefined, placeholder: this.mergedPlaceholder[0], disabled: this.mergedDisabled, maxlength: countGraphemes ? undefined : this.maxlength, minlength: countGraphemes ? undefined : this.minlength, value: Array.isArray(this.mergedValue) ? this.mergedValue[0] : this.mergedValue, readonly: this.readonly, autofocus: this.autofocus, size: this.attrSize, onBlur: this.handleInputBlur, onFocus: e => { this.handleInputFocus(e, 0); }, onInput: e => { this.handleInput(e, 0); }, onChange: e => { this.handleChange(e, 0); } })), this.showPlaceholder1 ? h("div", { class: `${mergedClsPrefix}-input__placeholder` }, h("span", null, this.mergedPlaceholder[0])) : null, this.autosize ? h("div", { class: `${mergedClsPrefix}-input__input-mirror`, key: "mirror", ref: "inputMirrorElRef" }, "\u00A0") : null), !this.pair && resolveWrappedSlot($slots.suffix, children => { return children || this.clearable || this.showCount || this.mergedShowPasswordOn || this.loading !== undefined ? h("div", { class: `${mergedClsPrefix}-input__suffix` }, [resolveWrappedSlot($slots['clear-icon-placeholder'], children => { return (this.clearable || children) && h(src_Clear, { clsPrefix: mergedClsPrefix, show: this.showClearButton, onClear: this.handleClear }, { placeholder: () => children, icon: () => { var _a, _b; return (_b = (_a = this.$slots)['clear-icon']) === null || _b === void 0 ? void 0 : _b.call(_a); } }); }), !this.internalLoadingBeforeSuffix ? children : null, this.loading !== undefined ? h(Suffix, { clsPrefix: mergedClsPrefix, loading: this.loading, showArrow: false, showClear: false, style: this.cssVars }) : null, this.internalLoadingBeforeSuffix ? children : null, this.showCount && this.type !== 'textarea' ? h(WordCount, null, { default: props => { var _a; const { renderCount } = this; if (renderCount) { return renderCount(props); } return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props); } }) : null, this.mergedShowPasswordOn && this.type === 'password' ? h("div", { class: `${mergedClsPrefix}-input__eye`, onMousedown: this.handlePasswordToggleMousedown, onClick: this.handlePasswordToggleClick }, this.passwordVisible ? resolveSlot($slots['password-visible-icon'], () => [h(Icon, { clsPrefix: mergedClsPrefix }, { default: () => h(Eye, null) })]) : resolveSlot($slots['password-invisible-icon'], () => [h(Icon, { clsPrefix: mergedClsPrefix }, { default: () => h(EyeOff, null) })])) : null]) : null; })), this.pair ? h("span", { class: `${mergedClsPrefix}-input__separator` }, resolveSlot($slots.separator, () => [this.separator])) : null, this.pair ? h("div", { class: `${mergedClsPrefix}-input-wrapper` }, h("div", { class: `${mergedClsPrefix}-input__input` }, h("input", { ref: "inputEl2Ref", type: this.type, class: `${mergedClsPrefix}-input__input-el`, tabindex: this.passivelyActivated && !this.activated ? -1 : undefined, placeholder: this.mergedPlaceholder[1], disabled: this.mergedDisabled, maxlength: countGraphemes ? undefined : this.maxlength, minlength: countGraphemes ? undefined : this.minlength, value: Array.isArray(this.mergedValue) ? this.mergedValue[1] : undefined, readonly: this.readonly, style: this.textDecorationStyle[1], onBlur: this.handleInputBlur, onFocus: e => { this.handleInputFocus(e, 1); }, onInput: e => { this.handleInput(e, 1); }, onChange: e => { this.handleChange(e, 1); } }), this.showPlaceholder2 ? h("div", { class: `${mergedClsPrefix}-input__placeholder` }, h("span", null, this.mergedPlaceholder[1])) : null), resolveWrappedSlot($slots.suffix, children => { return (this.clearable || children) && h("div", { class: `${mergedClsPrefix}-input__suffix` }, [this.clearable && h(src_Clear, { clsPrefix: mergedClsPrefix, show: this.showClearButton, onClear: this.handleClear }, { icon: () => { var _a; return (_a = $slots['clear-icon']) === null || _a === void 0 ? void 0 : _a.call($slots); }, placeholder: () => { var _a; return (_a = $slots['clear-icon-placeholder']) === null || _a === void 0 ? void 0 : _a.call($slots); } }), children]); })) : null, this.mergedBordered ? h("div", { class: `${mergedClsPrefix}-input__border` }) : null, this.mergedBordered ? h("div", { class: `${mergedClsPrefix}-input__state-border` }) : null, this.showCount && type === 'textarea' ? h(WordCount, null, { default: props => { var _a; const { renderCount } = this; if (renderCount) { return renderCount(props); } return (_a = $slots.count) === null || _a === void 0 ? void 0 : _a.call($slots, props); } }) : null); } })); ;// ./node_modules/naive-ui/es/radio/styles/_common.mjs /* harmony default export */ var radio_styles_common = ({ radioSizeSmall: '14px', radioSizeMedium: '16px', radioSizeLarge: '18px', labelPadding: '0 8px', labelFontWeight: '400' }); ;// ./node_modules/naive-ui/es/radio/styles/light.mjs function radio_styles_light_self(vars) { const { borderColor, primaryColor, baseColor, textColorDisabled, inputColorDisabled, textColor2, opacityDisabled, borderRadius, fontSizeSmall, fontSizeMedium, fontSizeLarge, heightSmall, heightMedium, heightLarge, lineHeight } = vars; return Object.assign(Object.assign({}, radio_styles_common), { labelLineHeight: lineHeight, buttonHeightSmall: heightSmall, buttonHeightMedium: heightMedium, buttonHeightLarge: heightLarge, fontSizeSmall, fontSizeMedium, fontSizeLarge, boxShadow: `inset 0 0 0 1px ${borderColor}`, boxShadowActive: `inset 0 0 0 1px ${primaryColor}`, boxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, { alpha: 0.2 })}`, boxShadowHover: `inset 0 0 0 1px ${primaryColor}`, boxShadowDisabled: `inset 0 0 0 1px ${borderColor}`, color: baseColor, colorDisabled: inputColorDisabled, colorActive: '#0000', textColor: textColor2, textColorDisabled, dotColorActive: primaryColor, dotColorDisabled: borderColor, buttonBorderColor: borderColor, buttonBorderColorActive: primaryColor, buttonBorderColorHover: borderColor, buttonColor: baseColor, buttonColorActive: baseColor, buttonTextColor: textColor2, buttonTextColorActive: primaryColor, buttonTextColorHover: primaryColor, opacityDisabled, buttonBoxShadowFocus: `inset 0 0 0 1px ${primaryColor}, 0 0 0 2px ${changeColor(primaryColor, { alpha: 0.3 })}`, buttonBoxShadowHover: 'inset 0 0 0 1px #0000', buttonBoxShadow: 'inset 0 0 0 1px #0000', buttonBorderRadius: borderRadius }); } const radioLight = { name: 'Radio', common: light, self: radio_styles_light_self }; /* harmony default export */ var radio_styles_light = (radioLight); ;// ./node_modules/naive-ui/es/radio/src/styles/radio.cssr.mjs // vars: // --n-bezier // --n-box-shadow // --n-box-shadow-active // --n-box-shadow-disabled // --n-box-shadow-focus // --n-box-shadow-hover // --n-color // --n-color-disabled // --n-dot-color-active // --n-dot-color-disabled // --n-font-size // --n-radio-size // --n-text-color // --n-text-color-disabled // --n-label-padding // --n-label-line-height // --n-color-active /* harmony default export */ var radio_cssr = (cB('radio', ` line-height: var(--n-label-line-height); outline: none; position: relative; user-select: none; -webkit-user-select: none; display: inline-flex; align-items: flex-start; flex-wrap: nowrap; font-size: var(--n-font-size); word-break: break-word; `, [cM('checked', [cE('dot', ` background-color: var(--n-color-active); `)]), cE('dot-wrapper', ` position: relative; flex-shrink: 0; flex-grow: 0; width: var(--n-radio-size); `), cB('radio-input', ` position: absolute; border: 0; border-radius: inherit; left: 0; right: 0; top: 0; bottom: 0; opacity: 0; z-index: 1; cursor: pointer; `), cE('dot', ` position: absolute; top: 50%; left: 0; transform: translateY(-50%); height: var(--n-radio-size); width: var(--n-radio-size); background: var(--n-color); box-shadow: var(--n-box-shadow); border-radius: 50%; transition: background-color .3s var(--n-bezier), box-shadow .3s var(--n-bezier); `, [cssr_c('&::before', ` content: ""; opacity: 0; position: absolute; left: 4px; top: 4px; height: calc(100% - 8px); width: calc(100% - 8px); border-radius: 50%; transform: scale(.8); background: var(--n-dot-color-active); transition: opacity .3s var(--n-bezier), background-color .3s var(--n-bezier), transform .3s var(--n-bezier); `), cM('checked', { boxShadow: 'var(--n-box-shadow-active)' }, [cssr_c('&::before', ` opacity: 1; transform: scale(1); `)])]), cE('label', ` color: var(--n-text-color); padding: var(--n-label-padding); font-weight: var(--n-label-font-weight); display: inline-block; transition: color .3s var(--n-bezier); `), cNotM('disabled', ` cursor: pointer; `, [cssr_c('&:hover', [cE('dot', { boxShadow: 'var(--n-box-shadow-hover)' })]), cM('focus', [cssr_c('&:not(:active)', [cE('dot', { boxShadow: 'var(--n-box-shadow-focus)' })])])]), cM('disabled', ` cursor: not-allowed; `, [cE('dot', { boxShadow: 'var(--n-box-shadow-disabled)', backgroundColor: 'var(--n-color-disabled)' }, [cssr_c('&::before', { backgroundColor: 'var(--n-dot-color-disabled)' }), cM('checked', ` opacity: 1; `)]), cE('label', { color: 'var(--n-text-color-disabled)' }), cB('radio-input', ` cursor: not-allowed; `)])])); ;// ./node_modules/naive-ui/es/radio/src/use-radio.mjs const radioBaseProps = { name: String, value: { type: [String, Number, Boolean], default: 'on' }, checked: { type: Boolean, default: undefined }, defaultChecked: Boolean, disabled: { type: Boolean, default: undefined }, label: String, size: String, onUpdateChecked: [Function, Array], 'onUpdate:checked': [Function, Array], // deprecated checkedValue: { type: Boolean, default: undefined } }; const radioGroupInjectionKey = createInjectionKey('n-radio-group'); function use_radio_setup(props) { if (false) {} const NRadioGroup = runtime_core_esm_bundler_inject(radioGroupInjectionKey, null); const formItem = useFormItem(props, { mergedSize(NFormItem) { const { size } = props; if (size !== undefined) return size; if (NRadioGroup) { const { mergedSizeRef: { value: mergedSize } } = NRadioGroup; if (mergedSize !== undefined) { return mergedSize; } } if (NFormItem) { return NFormItem.mergedSize.value; } return 'medium'; }, mergedDisabled(NFormItem) { if (props.disabled) return true; if (NRadioGroup === null || NRadioGroup === void 0 ? void 0 : NRadioGroup.disabledRef.value) return true; if (NFormItem === null || NFormItem === void 0 ? void 0 : NFormItem.disabled.value) return true; return false; } }); const { mergedSizeRef, mergedDisabledRef } = formItem; const inputRef = ref(null); const labelRef = ref(null); const uncontrolledCheckedRef = ref(props.defaultChecked); const controlledCheckedRef = toRef(props, 'checked'); const mergedCheckedRef = useMergedState(controlledCheckedRef, uncontrolledCheckedRef); const renderSafeCheckedRef = use_memo(() => { if (NRadioGroup) return NRadioGroup.valueRef.value === props.value; return mergedCheckedRef.value; }); const mergedNameRef = use_memo(() => { const { name } = props; if (name !== undefined) return name; if (NRadioGroup) return NRadioGroup.nameRef.value; }); const focusRef = ref(false); function doUpdateChecked() { if (NRadioGroup) { const { doUpdateValue } = NRadioGroup; const { value } = props; call(doUpdateValue, value); } else { const { onUpdateChecked, 'onUpdate:checked': _onUpdateChecked } = props; const { nTriggerFormInput, nTriggerFormChange } = formItem; if (onUpdateChecked) call(onUpdateChecked, true); if (_onUpdateChecked) call(_onUpdateChecked, true); nTriggerFormInput(); nTriggerFormChange(); uncontrolledCheckedRef.value = true; } } function toggle() { if (mergedDisabledRef.value) return; if (!renderSafeCheckedRef.value) { doUpdateChecked(); } } function handleRadioInputChange() { toggle(); // Restore element check prop's value to current state, since if doesn't // reflect current VNode. If not, bug will happens in component with element // that has internal state such as . if (inputRef.value) { inputRef.value.checked = renderSafeCheckedRef.value; } } function handleRadioInputBlur() { focusRef.value = false; } function handleRadioInputFocus() { focusRef.value = true; } return { mergedClsPrefix: NRadioGroup ? NRadioGroup.mergedClsPrefixRef : useConfig(props).mergedClsPrefixRef, inputRef, labelRef, mergedName: mergedNameRef, mergedDisabled: mergedDisabledRef, renderSafeChecked: renderSafeCheckedRef, focus: focusRef, mergedSize: mergedSizeRef, handleRadioInputChange, handleRadioInputBlur, handleRadioInputFocus }; } ;// ./node_modules/naive-ui/es/radio/src/Radio.mjs const radioProps = Object.assign(Object.assign({}, use_theme.props), radioBaseProps); /* harmony default export */ var Radio = (defineComponent({ name: 'Radio', props: radioProps, setup(props) { const radio = use_radio_setup(props); const themeRef = use_theme('Radio', '-radio', radio_cssr, radio_styles_light, props, radio.mergedClsPrefix); const cssVarsRef = runtime_core_esm_bundler_computed(() => { const { mergedSize: { value: size } } = radio; const { common: { cubicBezierEaseInOut }, self: { boxShadow, boxShadowActive, boxShadowDisabled, boxShadowFocus, boxShadowHover, color, colorDisabled, colorActive, textColor, textColorDisabled, dotColorActive, dotColorDisabled, labelPadding, labelLineHeight, labelFontWeight, [createKey('fontSize', size)]: fontSize, [createKey('radioSize', size)]: radioSize } } = themeRef.value; return { '--n-bezier': cubicBezierEaseInOut, '--n-label-line-height': labelLineHeight, '--n-label-font-weight': labelFontWeight, '--n-box-shadow': boxShadow, '--n-box-shadow-active': boxShadowActive, '--n-box-shadow-disabled': boxShadowDisabled, '--n-box-shadow-focus': boxShadowFocus, '--n-box-shadow-hover': boxShadowHover, '--n-color': color, '--n-color-active': colorActive, '--n-color-disabled': colorDisabled, '--n-dot-color-active': dotColorActive, '--n-dot-color-disabled': dotColorDisabled, '--n-font-size': fontSize, '--n-radio-size': radioSize, '--n-text-color': textColor, '--n-text-color-disabled': textColorDisabled, '--n-label-padding': labelPadding }; }); const { inlineThemeDisabled, mergedClsPrefixRef, mergedRtlRef } = useConfig(props); const rtlEnabledRef = useRtl('Radio', mergedRtlRef, mergedClsPrefixRef); const themeClassHandle = inlineThemeDisabled ? useThemeClass('radio', runtime_core_esm_bundler_computed(() => radio.mergedSize.value[0]), cssVarsRef, props) : undefined; return Object.assign(radio, { rtlEnabled: rtlEnabledRef, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }); }, render() { const { $slots, mergedClsPrefix, onRender, label } = this; onRender === null || onRender === void 0 ? void 0 : onRender(); return h("label", { class: [`${mergedClsPrefix}-radio`, this.themeClass, this.rtlEnabled && `${mergedClsPrefix}-radio--rtl`, this.mergedDisabled && `${mergedClsPrefix}-radio--disabled`, this.renderSafeChecked && `${mergedClsPrefix}-radio--checked`, this.focus && `${mergedClsPrefix}-radio--focus`], style: this.cssVars }, h("input", { ref: "inputRef", type: "radio", class: `${mergedClsPrefix}-radio-input`, value: this.value, name: this.mergedName, checked: this.renderSafeChecked, disabled: this.mergedDisabled, onChange: this.handleRadioInputChange, onFocus: this.handleRadioInputFocus, onBlur: this.handleRadioInputBlur }), h("div", { class: `${mergedClsPrefix}-radio__dot-wrapper` }, "\u00A0", h("div", { class: [`${mergedClsPrefix}-radio__dot`, this.renderSafeChecked && `${mergedClsPrefix}-radio__dot--checked`] })), resolveWrappedSlot($slots.default, children => { if (!children && !label) return null; return h("div", { ref: "labelRef", class: `${mergedClsPrefix}-radio__label` }, children || label); })); } })); ;// ./node_modules/naive-ui/es/radio/src/styles/radio-group.cssr.mjs // vars: // --n-bezier // --n-button-border-color // --n-button-border-color-active // --n-height // --n-opacity-disabled // --n-font-size /* harmony default export */ var radio_group_cssr = (cB('radio-group', ` display: inline-block; font-size: var(--n-font-size); `, [cE('splitor', ` display: inline-block; vertical-align: bottom; width: 1px; transition: background-color .3s var(--n-bezier), opacity .3s var(--n-bezier); background: var(--n-button-border-color); `, [cM('checked', { backgroundColor: 'var(--n-button-border-color-active)' }), cM('disabled', { opacity: 'var(--n-opacity-disabled)' })]), cM('button-group', ` white-space: nowrap; height: var(--n-height); line-height: var(--n-height); `, [cB('radio-button', { height: 'var(--n-height)', lineHeight: 'var(--n-height)' }), cE('splitor', { height: 'var(--n-height)' })]), cB('radio-button', ` vertical-align: bottom; outline: none; position: relative; user-select: none; -webkit-user-select: none; display: inline-block; box-sizing: border-box; padding-left: 14px; padding-right: 14px; white-space: nowrap; transition: background-color .3s var(--n-bezier), opacity .3s var(--n-bezier), border-color .3s var(--n-bezier), color .3s var(--n-bezier); background: var(--n-button-color); color: var(--n-button-text-color); border-top: 1px solid var(--n-button-border-color); border-bottom: 1px solid var(--n-button-border-color); `, [cB('radio-input', ` pointer-events: none; position: absolute; border: 0; border-radius: inherit; left: 0; right: 0; top: 0; bottom: 0; opacity: 0; z-index: 1; `), cE('state-border', ` z-index: 1; pointer-events: none; position: absolute; box-shadow: var(--n-button-box-shadow); transition: box-shadow .3s var(--n-bezier); left: -1px; bottom: -1px; right: -1px; top: -1px; `), cssr_c('&:first-child', ` border-top-left-radius: var(--n-button-border-radius); border-bottom-left-radius: var(--n-button-border-radius); border-left: 1px solid var(--n-button-border-color); `, [cE('state-border', ` border-top-left-radius: var(--n-button-border-radius); border-bottom-left-radius: var(--n-button-border-radius); `)]), cssr_c('&:last-child', ` border-top-right-radius: var(--n-button-border-radius); border-bottom-right-radius: var(--n-button-border-radius); border-right: 1px solid var(--n-button-border-color); `, [cE('state-border', ` border-top-right-radius: var(--n-button-border-radius); border-bottom-right-radius: var(--n-button-border-radius); `)]), cNotM('disabled', ` cursor: pointer; `, [cssr_c('&:hover', [cE('state-border', ` transition: box-shadow .3s var(--n-bezier); box-shadow: var(--n-button-box-shadow-hover); `), cNotM('checked', { color: 'var(--n-button-text-color-hover)' })]), cM('focus', [cssr_c('&:not(:active)', [cE('state-border', { boxShadow: 'var(--n-button-box-shadow-focus)' })])])]), cM('checked', ` background: var(--n-button-color-active); color: var(--n-button-text-color-active); border-color: var(--n-button-border-color-active); `), cM('disabled', ` cursor: not-allowed; opacity: var(--n-opacity-disabled); `)])])); ;// ./node_modules/naive-ui/es/radio/src/RadioGroup.mjs function mapSlot(defaultSlot, value, clsPrefix) { var _a; const children = []; let isButtonGroup = false; for (let i = 0; i < defaultSlot.length; ++i) { const wrappedInstance = defaultSlot[i]; const name = (_a = wrappedInstance.type) === null || _a === void 0 ? void 0 : _a.name; if (name === 'RadioButton') { isButtonGroup = true; } if (false) {} const instanceProps = wrappedInstance.props; if (name !== 'RadioButton') { children.push(wrappedInstance); continue; } if (i === 0) { children.push(wrappedInstance); } else { const lastInstanceProps = children[children.length - 1].props; const lastInstanceChecked = value === lastInstanceProps.value; const lastInstanceDisabled = lastInstanceProps.disabled; const currentInstanceChecked = value === instanceProps.value; const currentInstanceDisabled = instanceProps.disabled; /** * Priority of button splitor: * !disabled checked > * disabled checked > * !disabled !checked > * disabled !checked */ const lastInstancePriority = (lastInstanceChecked ? 2 : 0) + (!lastInstanceDisabled ? 1 : 0); const currentInstancePriority = (currentInstanceChecked ? 2 : 0) + (!currentInstanceDisabled ? 1 : 0); const lastInstanceClass = { [`${clsPrefix}-radio-group__splitor--disabled`]: lastInstanceDisabled, [`${clsPrefix}-radio-group__splitor--checked`]: lastInstanceChecked }; const currentInstanceClass = { [`${clsPrefix}-radio-group__splitor--disabled`]: currentInstanceDisabled, [`${clsPrefix}-radio-group__splitor--checked`]: currentInstanceChecked }; const splitorClass = lastInstancePriority < currentInstancePriority ? currentInstanceClass : lastInstanceClass; children.push(h("div", { class: [`${clsPrefix}-radio-group__splitor`, splitorClass] }), wrappedInstance); } } return { children, isButtonGroup }; } const radioGroupProps = Object.assign(Object.assign({}, use_theme.props), { name: String, value: [String, Number, Boolean], defaultValue: { type: [String, Number, Boolean], default: null }, size: String, disabled: { type: Boolean, default: undefined }, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array] }); /* harmony default export */ var RadioGroup = (defineComponent({ name: 'RadioGroup', props: radioGroupProps, setup(props) { const selfElRef = ref(null); const { mergedSizeRef, mergedDisabledRef, nTriggerFormChange, nTriggerFormInput, nTriggerFormBlur, nTriggerFormFocus } = useFormItem(props); const { mergedClsPrefixRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props); const themeRef = use_theme('Radio', '-radio-group', radio_group_cssr, radio_styles_light, props, mergedClsPrefixRef); const uncontrolledValueRef = ref(props.defaultValue); const controlledValueRef = toRef(props, 'value'); const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef); function doUpdateValue(value) { const { onUpdateValue, 'onUpdate:value': _onUpdateValue } = props; if (onUpdateValue) { call(onUpdateValue, value); } if (_onUpdateValue) { call(_onUpdateValue, value); } uncontrolledValueRef.value = value; nTriggerFormChange(); nTriggerFormInput(); } function handleFocusin(e) { const { value: selfEl } = selfElRef; if (!selfEl) return; if (selfEl.contains(e.relatedTarget)) return; nTriggerFormFocus(); } function handleFocusout(e) { const { value: selfEl } = selfElRef; if (!selfEl) return; if (selfEl.contains(e.relatedTarget)) return; nTriggerFormBlur(); } provide(radioGroupInjectionKey, { mergedClsPrefixRef, nameRef: toRef(props, 'name'), valueRef: mergedValueRef, disabledRef: mergedDisabledRef, mergedSizeRef, doUpdateValue }); const rtlEnabledRef = useRtl('Radio', mergedRtlRef, mergedClsPrefixRef); const cssVarsRef = runtime_core_esm_bundler_computed(() => { const { value: size } = mergedSizeRef; const { common: { cubicBezierEaseInOut }, self: { buttonBorderColor, buttonBorderColorActive, buttonBorderRadius, buttonBoxShadow, buttonBoxShadowFocus, buttonBoxShadowHover, buttonColor, buttonColorActive, buttonTextColor, buttonTextColorActive, buttonTextColorHover, opacityDisabled, [createKey('buttonHeight', size)]: height, [createKey('fontSize', size)]: fontSize } } = themeRef.value; return { '--n-font-size': fontSize, '--n-bezier': cubicBezierEaseInOut, '--n-button-border-color': buttonBorderColor, '--n-button-border-color-active': buttonBorderColorActive, '--n-button-border-radius': buttonBorderRadius, '--n-button-box-shadow': buttonBoxShadow, '--n-button-box-shadow-focus': buttonBoxShadowFocus, '--n-button-box-shadow-hover': buttonBoxShadowHover, '--n-button-color': buttonColor, '--n-button-color-active': buttonColorActive, '--n-button-text-color': buttonTextColor, '--n-button-text-color-hover': buttonTextColorHover, '--n-button-text-color-active': buttonTextColorActive, '--n-height': height, '--n-opacity-disabled': opacityDisabled }; }); const themeClassHandle = inlineThemeDisabled ? useThemeClass('radio-group', runtime_core_esm_bundler_computed(() => mergedSizeRef.value[0]), cssVarsRef, props) : undefined; return { selfElRef, rtlEnabled: rtlEnabledRef, mergedClsPrefix: mergedClsPrefixRef, mergedValue: mergedValueRef, handleFocusout, handleFocusin, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }; }, render() { var _a; const { mergedValue, mergedClsPrefix, handleFocusin, handleFocusout } = this; const { children, isButtonGroup } = mapSlot(flatten_flatten(getSlot(this)), mergedValue, mergedClsPrefix); (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this); return h("div", { onFocusin: handleFocusin, onFocusout: handleFocusout, ref: "selfElRef", class: [`${mergedClsPrefix}-radio-group`, this.rtlEnabled && `${mergedClsPrefix}-radio-group--rtl`, this.themeClass, isButtonGroup && `${mergedClsPrefix}-radio-group--button-group`], style: this.cssVars }, children); } })); ;// ./node_modules/naive-ui/es/_internal/icons/Success.mjs /* harmony default export */ var Success = (replaceable('success', () => h("svg", { viewBox: "0 0 48 48", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, h("g", { stroke: "none", "stroke-width": "1", "fill-rule": "evenodd" }, h("g", { "fill-rule": "nonzero" }, h("path", { d: "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M32.6338835,17.6161165 C32.1782718,17.1605048 31.4584514,17.1301307 30.9676119,17.5249942 L30.8661165,17.6161165 L20.75,27.732233 L17.1338835,24.1161165 C16.6457281,23.6279612 15.8542719,23.6279612 15.3661165,24.1161165 C14.9105048,24.5717282 14.8801307,25.2915486 15.2749942,25.7823881 L15.3661165,25.8838835 L19.8661165,30.3838835 C20.3217282,30.8394952 21.0415486,30.8698693 21.5323881,30.4750058 L21.6338835,30.3838835 L32.6338835,19.3838835 C33.1220388,18.8957281 33.1220388,18.1042719 32.6338835,17.6161165 Z" })))))); ;// ./node_modules/naive-ui/es/_internal/icons/Info.mjs /* harmony default export */ var Info = (replaceable('info', () => h("svg", { viewBox: "0 0 28 28", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, h("g", { stroke: "none", "stroke-width": "1", "fill-rule": "evenodd" }, h("g", { "fill-rule": "nonzero" }, h("path", { d: "M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,11 C13.4477,11 13,11.4477 13,12 L13,12 L13,20 C13,20.5523 13.4477,21 14,21 C14.5523,21 15,20.5523 15,20 L15,20 L15,12 C15,11.4477 14.5523,11 14,11 Z M14,6.75 C13.3096,6.75 12.75,7.30964 12.75,8 C12.75,8.69036 13.3096,9.25 14,9.25 C14.6904,9.25 15.25,8.69036 15.25,8 C15.25,7.30964 14.6904,6.75 14,6.75 Z" })))))); ;// ./node_modules/naive-ui/es/_internal/icons/Warning.mjs /* harmony default export */ var Warning = (replaceable('warning', () => h("svg", { viewBox: "0 0 24 24", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, h("g", { stroke: "none", "stroke-width": "1", "fill-rule": "evenodd" }, h("g", { "fill-rule": "nonzero" }, h("path", { d: "M12,2 C17.523,2 22,6.478 22,12 C22,17.522 17.523,22 12,22 C6.477,22 2,17.522 2,12 C2,6.478 6.477,2 12,2 Z M12.0018002,15.0037242 C11.450254,15.0037242 11.0031376,15.4508407 11.0031376,16.0023869 C11.0031376,16.553933 11.450254,17.0010495 12.0018002,17.0010495 C12.5533463,17.0010495 13.0004628,16.553933 13.0004628,16.0023869 C13.0004628,15.4508407 12.5533463,15.0037242 12.0018002,15.0037242 Z M11.99964,7 C11.4868042,7.00018474 11.0642719,7.38637706 11.0066858,7.8837365 L11,8.00036004 L11.0018003,13.0012393 L11.00857,13.117858 C11.0665141,13.6151758 11.4893244,14.0010638 12.0021602,14.0008793 C12.514996,14.0006946 12.9375283,13.6145023 12.9951144,13.1171428 L13.0018002,13.0005193 L13,7.99964009 L12.9932303,7.8830214 C12.9352861,7.38570354 12.5124758,6.99981552 11.99964,7 Z" })))))); ;// ./node_modules/naive-ui/es/_internal/icons/Error.mjs /* harmony default export */ var icons_Error = (replaceable('error', () => h("svg", { viewBox: "0 0 48 48", version: "1.1", xmlns: "http://www.w3.org/2000/svg" }, h("g", { stroke: "none", "stroke-width": "1", "fill-rule": "evenodd" }, h("g", { "fill-rule": "nonzero" }, h("path", { d: "M24,4 C35.045695,4 44,12.954305 44,24 C44,35.045695 35.045695,44 24,44 C12.954305,44 4,35.045695 4,24 C4,12.954305 12.954305,4 24,4 Z M17.8838835,16.1161165 L17.7823881,16.0249942 C17.3266086,15.6583353 16.6733914,15.6583353 16.2176119,16.0249942 L16.1161165,16.1161165 L16.0249942,16.2176119 C15.6583353,16.6733914 15.6583353,17.3266086 16.0249942,17.7823881 L16.1161165,17.8838835 L22.233,24 L16.1161165,30.1161165 L16.0249942,30.2176119 C15.6583353,30.6733914 15.6583353,31.3266086 16.0249942,31.7823881 L16.1161165,31.8838835 L16.2176119,31.9750058 C16.6733914,32.3416647 17.3266086,32.3416647 17.7823881,31.9750058 L17.8838835,31.8838835 L24,25.767 L30.1161165,31.8838835 L30.2176119,31.9750058 C30.6733914,32.3416647 31.3266086,32.3416647 31.7823881,31.9750058 L31.8838835,31.8838835 L31.9750058,31.7823881 C32.3416647,31.3266086 32.3416647,30.6733914 31.9750058,30.2176119 L31.8838835,30.1161165 L25.767,24 L31.8838835,17.8838835 L31.9750058,17.7823881 C32.3416647,17.3266086 32.3416647,16.6733914 31.9750058,16.2176119 L31.8838835,16.1161165 L31.7823881,16.0249942 C31.3266086,15.6583353 30.6733914,15.6583353 30.2176119,16.0249942 L30.1161165,16.1161165 L24,22.233 L17.8838835,16.1161165 L17.7823881,16.0249942 L17.8838835,16.1161165 Z" })))))); ;// ./node_modules/naive-ui/es/alert/styles/_common.mjs /* harmony default export */ var alert_styles_common = ({ iconMargin: '11px 8px 0 12px', iconMarginRtl: '11px 12px 0 8px', iconSize: '24px', closeIconSize: '16px', closeSize: '20px', closeMargin: '13px 14px 0 0', closeMarginRtl: '13px 0 0 14px', padding: '13px' }); ;// ./node_modules/naive-ui/es/alert/styles/light.mjs function alert_styles_light_self(vars) { const { lineHeight, borderRadius, fontWeightStrong, baseColor, dividerColor, actionColor, textColor1, textColor2, closeColorHover, closeColorPressed, closeIconColor, closeIconColorHover, closeIconColorPressed, infoColor, successColor, warningColor, errorColor, fontSize } = vars; return Object.assign(Object.assign({}, alert_styles_common), { fontSize, lineHeight, titleFontWeight: fontWeightStrong, borderRadius, border: `1px solid ${dividerColor}`, color: actionColor, titleTextColor: textColor1, iconColor: textColor2, contentTextColor: textColor2, closeBorderRadius: borderRadius, closeColorHover, closeColorPressed, closeIconColor, closeIconColorHover, closeIconColorPressed, borderInfo: `1px solid ${composite(baseColor, changeColor(infoColor, { alpha: 0.25 }))}`, colorInfo: composite(baseColor, changeColor(infoColor, { alpha: 0.08 })), titleTextColorInfo: textColor1, iconColorInfo: infoColor, contentTextColorInfo: textColor2, closeColorHoverInfo: closeColorHover, closeColorPressedInfo: closeColorPressed, closeIconColorInfo: closeIconColor, closeIconColorHoverInfo: closeIconColorHover, closeIconColorPressedInfo: closeIconColorPressed, borderSuccess: `1px solid ${composite(baseColor, changeColor(successColor, { alpha: 0.25 }))}`, colorSuccess: composite(baseColor, changeColor(successColor, { alpha: 0.08 })), titleTextColorSuccess: textColor1, iconColorSuccess: successColor, contentTextColorSuccess: textColor2, closeColorHoverSuccess: closeColorHover, closeColorPressedSuccess: closeColorPressed, closeIconColorSuccess: closeIconColor, closeIconColorHoverSuccess: closeIconColorHover, closeIconColorPressedSuccess: closeIconColorPressed, borderWarning: `1px solid ${composite(baseColor, changeColor(warningColor, { alpha: 0.33 }))}`, colorWarning: composite(baseColor, changeColor(warningColor, { alpha: 0.08 })), titleTextColorWarning: textColor1, iconColorWarning: warningColor, contentTextColorWarning: textColor2, closeColorHoverWarning: closeColorHover, closeColorPressedWarning: closeColorPressed, closeIconColorWarning: closeIconColor, closeIconColorHoverWarning: closeIconColorHover, closeIconColorPressedWarning: closeIconColorPressed, borderError: `1px solid ${composite(baseColor, changeColor(errorColor, { alpha: 0.25 }))}`, colorError: composite(baseColor, changeColor(errorColor, { alpha: 0.08 })), titleTextColorError: textColor1, iconColorError: errorColor, contentTextColorError: textColor2, closeColorHoverError: closeColorHover, closeColorPressedError: closeColorPressed, closeIconColorError: closeIconColor, closeIconColorHoverError: closeIconColorHover, closeIconColorPressedError: closeIconColorPressed }); } const alertLight = { name: 'Alert', common: light, self: alert_styles_light_self }; /* harmony default export */ var alert_styles_light = (alertLight); ;// ./node_modules/naive-ui/es/_styles/transitions/fade-in-height-expand.cssr.mjs const { cubicBezierEaseInOut: fade_in_height_expand_cssr_cubicBezierEaseInOut, cubicBezierEaseOut, cubicBezierEaseIn } = _common; function fadeInHeightExpandTransition({ overflow = 'hidden', duration = '.3s', originalTransition = '', leavingDelay = '0s', foldPadding = false, enterToProps = undefined, leaveToProps = undefined, reverse = false } = {}) { const enterClass = reverse ? 'leave' : 'enter'; const leaveClass = reverse ? 'enter' : 'leave'; return [cssr_c(`&.fade-in-height-expand-transition-${leaveClass}-from, &.fade-in-height-expand-transition-${enterClass}-to`, Object.assign(Object.assign({}, enterToProps), { opacity: 1 })), cssr_c(`&.fade-in-height-expand-transition-${leaveClass}-to, &.fade-in-height-expand-transition-${enterClass}-from`, Object.assign(Object.assign({}, leaveToProps), { opacity: 0, marginTop: '0 !important', marginBottom: '0 !important', paddingTop: foldPadding ? '0 !important' : undefined, paddingBottom: foldPadding ? '0 !important' : undefined })), cssr_c(`&.fade-in-height-expand-transition-${leaveClass}-active`, ` overflow: ${overflow}; transition: max-height ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut} ${leavingDelay}, opacity ${duration} ${cubicBezierEaseOut} ${leavingDelay}, margin-top ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut} ${leavingDelay}, margin-bottom ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut} ${leavingDelay}, padding-top ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut} ${leavingDelay}, padding-bottom ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut} ${leavingDelay} ${originalTransition ? `,${originalTransition}` : ''} `), cssr_c(`&.fade-in-height-expand-transition-${enterClass}-active`, ` overflow: ${overflow}; transition: max-height ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut}, opacity ${duration} ${cubicBezierEaseIn}, margin-top ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut}, margin-bottom ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut}, padding-top ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut}, padding-bottom ${duration} ${fade_in_height_expand_cssr_cubicBezierEaseInOut} ${originalTransition ? `,${originalTransition}` : ''} `)]; } ;// ./node_modules/naive-ui/es/alert/src/styles/index.cssr.mjs // vars: // --n-bezier // --n-color // --n-close-color-hover // --n-close-color-pressed // --n-close-icon-color // --n-close-icon-color-hover // --n-close-icon-color-pressed // --n-icon-color // --n-border // --n-title-text-color // --n-content-text-color // --n-line-height // --n-border-radius // --n-font-size // --n-title-font-weight // --n-icon-size // --n-icon-margin // --n-close-size // --n-close-icon-size // --n-close-margin // --n-padding // --n-icon-margin-left // --n-icon-margin-right /* harmony default export */ var alert_src_styles_index_cssr = (cB('alert', ` line-height: var(--n-line-height); border-radius: var(--n-border-radius); position: relative; transition: background-color .3s var(--n-bezier); background-color: var(--n-color); text-align: start; word-break: break-word; `, [cE('border', ` border-radius: inherit; position: absolute; left: 0; right: 0; top: 0; bottom: 0; transition: border-color .3s var(--n-bezier); border: var(--n-border); pointer-events: none; `), cM('closable', [cB('alert-body', [cE('title', ` padding-right: 24px; `)])]), cE('icon', { color: 'var(--n-icon-color)' }), cB('alert-body', { padding: 'var(--n-padding)' }, [cE('title', { color: 'var(--n-title-text-color)' }), cE('content', { color: 'var(--n-content-text-color)' })]), fadeInHeightExpandTransition({ originalTransition: 'transform .3s var(--n-bezier)', enterToProps: { transform: 'scale(1)' }, leaveToProps: { transform: 'scale(0.9)' } }), cE('icon', ` position: absolute; left: 0; top: 0; align-items: center; justify-content: center; display: flex; width: var(--n-icon-size); height: var(--n-icon-size); font-size: var(--n-icon-size); margin: var(--n-icon-margin); `), cE('close', ` transition: color .3s var(--n-bezier), background-color .3s var(--n-bezier); position: absolute; right: 0; top: 0; margin: var(--n-close-margin); `), cM('show-icon', [cB('alert-body', { paddingLeft: 'calc(var(--n-icon-margin-left) + var(--n-icon-size) + var(--n-icon-margin-right))' })]), // fix: https://github.com/tusen-ai/naive-ui/issues/4588 cM('right-adjust', [cB('alert-body', { paddingRight: 'calc(var(--n-close-size) + var(--n-padding) + 2px)' })]), cB('alert-body', ` border-radius: var(--n-border-radius); transition: border-color .3s var(--n-bezier); `, [cE('title', ` transition: color .3s var(--n-bezier); font-size: 16px; line-height: 19px; font-weight: var(--n-title-font-weight); `, [cssr_c('& +', [cE('content', { marginTop: '9px' })])]), cE('content', { transition: 'color .3s var(--n-bezier)', fontSize: 'var(--n-font-size)' })]), cE('icon', { transition: 'color .3s var(--n-bezier)' })])); ;// ./node_modules/naive-ui/es/alert/src/Alert.mjs const alertProps = Object.assign(Object.assign({}, use_theme.props), { title: String, showIcon: { type: Boolean, default: true }, type: { type: String, default: 'default' }, bordered: { type: Boolean, default: true }, closable: Boolean, onClose: Function, onAfterLeave: Function, /** @deprecated */ onAfterHide: Function }); /* harmony default export */ var Alert = (defineComponent({ name: 'Alert', inheritAttrs: false, props: alertProps, slots: Object, setup(props) { if (false) {} const { mergedClsPrefixRef, mergedBorderedRef, inlineThemeDisabled, mergedRtlRef } = useConfig(props); const themeRef = use_theme('Alert', '-alert', alert_src_styles_index_cssr, alert_styles_light, props, mergedClsPrefixRef); const rtlEnabledRef = useRtl('Alert', mergedRtlRef, mergedClsPrefixRef); const cssVarsRef = runtime_core_esm_bundler_computed(() => { const { common: { cubicBezierEaseInOut }, self } = themeRef.value; const { fontSize, borderRadius, titleFontWeight, lineHeight, iconSize, iconMargin, iconMarginRtl, closeIconSize, closeBorderRadius, closeSize, closeMargin, closeMarginRtl, padding } = self; const { type } = props; const { left, right } = getMargin(iconMargin); return { '--n-bezier': cubicBezierEaseInOut, '--n-color': self[createKey('color', type)], '--n-close-icon-size': closeIconSize, '--n-close-border-radius': closeBorderRadius, '--n-close-color-hover': self[createKey('closeColorHover', type)], '--n-close-color-pressed': self[createKey('closeColorPressed', type)], '--n-close-icon-color': self[createKey('closeIconColor', type)], '--n-close-icon-color-hover': self[createKey('closeIconColorHover', type)], '--n-close-icon-color-pressed': self[createKey('closeIconColorPressed', type)], '--n-icon-color': self[createKey('iconColor', type)], '--n-border': self[createKey('border', type)], '--n-title-text-color': self[createKey('titleTextColor', type)], '--n-content-text-color': self[createKey('contentTextColor', type)], '--n-line-height': lineHeight, '--n-border-radius': borderRadius, '--n-font-size': fontSize, '--n-title-font-weight': titleFontWeight, '--n-icon-size': iconSize, '--n-icon-margin': iconMargin, '--n-icon-margin-rtl': iconMarginRtl, '--n-close-size': closeSize, '--n-close-margin': closeMargin, '--n-close-margin-rtl': closeMarginRtl, '--n-padding': padding, '--n-icon-margin-left': left, '--n-icon-margin-right': right }; }); const themeClassHandle = inlineThemeDisabled ? useThemeClass('alert', runtime_core_esm_bundler_computed(() => { return props.type[0]; }), cssVarsRef, props) : undefined; const visibleRef = ref(true); const doAfterLeave = () => { const { onAfterLeave, onAfterHide // deprecated } = props; if (onAfterLeave) onAfterLeave(); if (onAfterHide) onAfterHide(); }; const handleCloseClick = () => { var _a; void Promise.resolve((_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props)).then(result => { if (result === false) return; visibleRef.value = false; }); }; const handleAfterLeave = () => { doAfterLeave(); }; return { rtlEnabled: rtlEnabledRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, visible: visibleRef, handleCloseClick, handleAfterLeave, mergedTheme: themeRef, cssVars: inlineThemeDisabled ? undefined : cssVarsRef, themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass, onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender }; }, render() { var _a; (_a = this.onRender) === null || _a === void 0 ? void 0 : _a.call(this); return h(FadeInExpandTransition, { onAfterLeave: this.handleAfterLeave }, { default: () => { const { mergedClsPrefix, $slots } = this; const attrs = { class: [`${mergedClsPrefix}-alert`, this.themeClass, this.closable && `${mergedClsPrefix}-alert--closable`, this.showIcon && `${mergedClsPrefix}-alert--show-icon`, // fix: https://github.com/tusen-ai/naive-ui/issues/4588 !this.title && this.closable && `${mergedClsPrefix}-alert--right-adjust`, this.rtlEnabled && `${mergedClsPrefix}-alert--rtl`], style: this.cssVars, role: 'alert' }; return this.visible ? h("div", Object.assign({}, mergeProps(this.$attrs, attrs)), this.closable && h(src_Close, { clsPrefix: mergedClsPrefix, class: `${mergedClsPrefix}-alert__close`, onClick: this.handleCloseClick }), this.bordered && h("div", { class: `${mergedClsPrefix}-alert__border` }), this.showIcon && h("div", { class: `${mergedClsPrefix}-alert__icon`, "aria-hidden": "true" }, resolveSlot($slots.icon, () => [h(Icon, { clsPrefix: mergedClsPrefix }, { default: () => { switch (this.type) { case 'success': return h(Success, null); case 'info': return h(Info, null); case 'warning': return h(Warning, null); case 'error': return h(icons_Error, null); default: return null; } } })])), h("div", { class: [`${mergedClsPrefix}-alert-body`, this.mergedBordered && `${mergedClsPrefix}-alert-body--bordered`] }, resolveWrappedSlot($slots.header, children => { const mergedChildren = children || this.title; return mergedChildren ? h("div", { class: `${mergedClsPrefix}-alert-body__title` }, mergedChildren) : null; }), $slots.default && h("div", { class: `${mergedClsPrefix}-alert-body__content` }, $slots))) : null; } }); } })); ;// ./node_modules/naive-ui/es/_internal/icons/Remove.mjs /* harmony default export */ var Remove = (defineComponent({ name: 'Remove', render() { return h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, h("line", { x1: "400", y1: "256", x2: "112", y2: "256", style: "\n fill: none;\n stroke: currentColor;\n stroke-linecap: round;\n stroke-linejoin: round;\n stroke-width: 32px;\n " })); } })); ;// ./node_modules/naive-ui/es/_internal/icons/Add.mjs /* harmony default export */ var Add = (defineComponent({ name: 'Add', render() { return h("svg", { width: "512", height: "512", viewBox: "0 0 512 512", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M256 112V400M400 256H112", stroke: "currentColor", "stroke-width": "32", "stroke-linecap": "round", "stroke-linejoin": "round" })); } })); ;// ./node_modules/naive-ui/es/input-number/styles/light.mjs function input_number_styles_light_self(vars) { const { textColorDisabled } = vars; return { iconColorDisabled: textColorDisabled }; } const inputNumberLight = createTheme({ name: 'InputNumber', common: light, peers: { Button: styles_light, Input: input_styles_light }, self: input_number_styles_light_self }); /* harmony default export */ var input_number_styles_light = (inputNumberLight); ;// ./node_modules/naive-ui/es/input-number/src/styles/input-number.cssr.mjs /* harmony default export */ var input_number_cssr = (cssr_c([cB('input-number-suffix', ` display: inline-block; margin-right: 10px; `), cB('input-number-prefix', ` display: inline-block; margin-left: 10px; `)])); ;// ./node_modules/naive-ui/es/input-number/src/utils.mjs // string => string (expected, not implemented) // string => number (legacy) function utils_parse(value) { if (value === undefined || value === null || typeof value === 'string' && value.trim() === '') { return null; } return Number(value); } // This function is created for `update-value-on-input` prop. When the prop is // true, the input value will update the value and 's value at the same // time. So we need to make user's content won't be replaced by its parsed value // in some certain cases. For example '0.' should be parsed and replaced by '0', // '-0' should be parsed and replaced by '0', since user may input '-0.1' after. function isWipValue(value) { return value.includes('.') && (/^(-)?\d+.*(\.|0)$/.test(value) || /^-?\d*$/.test(value)) || value === '-' || value === '-0'; } // string => boolean (expected, not implemented) // number => boolean (legacy) function utils_validator(value) { if (value === undefined || value === null) return true; if (Number.isNaN(value)) return false; return true; } // string => string (expected, not implemented) // number => string (legacy) function utils_format(value, precision) { if (typeof value !== 'number') return ''; return precision === undefined ? String(value) : value.toFixed(precision); } function parseNumber(number) { if (number === null) return null; if (typeof number === 'number') { return number; } else { const parsedNumber = Number(number); if (Number.isNaN(parsedNumber)) { return null; } else { return parsedNumber; } } } ;// ./node_modules/naive-ui/es/input-number/src/InputNumber.mjs const HOLDING_CHANGE_THRESHOLD = 800; const HOLDING_CHANGE_INTERVAL = 100; const inputNumberProps = Object.assign(Object.assign({}, use_theme.props), { autofocus: Boolean, loading: { type: Boolean, default: undefined }, placeholder: String, defaultValue: { type: Number, default: null }, value: Number, step: { type: [Number, String], default: 1 }, min: [Number, String], max: [Number, String], size: String, disabled: { type: Boolean, default: undefined }, validator: Function, bordered: { type: Boolean, default: undefined }, showButton: { type: Boolean, default: true }, buttonPlacement: { type: String, default: 'right' }, inputProps: Object, readonly: Boolean, clearable: Boolean, keyboard: { type: Object, default: {} }, updateValueOnInput: { type: Boolean, default: true }, round: { type: Boolean, default: undefined }, parse: Function, format: Function, precision: Number, status: String, 'onUpdate:value': [Function, Array], onUpdateValue: [Function, Array], onFocus: [Function, Array], onBlur: [Function, Array], onClear: [Function, Array], // deprecated onChange: [Function, Array] }); /* harmony default export */ var InputNumber = (defineComponent({ name: 'InputNumber', props: inputNumberProps, slots: Object, setup(props) { if (false) {} const { mergedBorderedRef, mergedClsPrefixRef, mergedRtlRef } = useConfig(props); const themeRef = use_theme('InputNumber', '-input-number', input_number_cssr, input_number_styles_light, props, mergedClsPrefixRef); const { localeRef } = useLocale('InputNumber'); const formItem = useFormItem(props); const { mergedSizeRef, mergedDisabledRef, mergedStatusRef } = formItem; // dom ref const inputInstRef = ref(null); const minusButtonInstRef = ref(null); const addButtonInstRef = ref(null); // value const uncontrolledValueRef = ref(props.defaultValue); const controlledValueRef = toRef(props, 'value'); const mergedValueRef = useMergedState(controlledValueRef, uncontrolledValueRef); const displayedValueRef = ref(''); const getPrecision = value => { const fraction = String(value).split('.')[1]; return fraction ? fraction.length : 0; }; const getMaxPrecision = currentValue => { const precisions = [props.min, props.max, props.step, currentValue].map(value => { if (value === undefined) return 0; return getPrecision(value); }); return Math.max(...precisions); }; const mergedPlaceholderRef = use_memo(() => { const { placeholder } = props; if (placeholder !== undefined) return placeholder; return localeRef.value.placeholder; }); const mergedStepRef = use_memo(() => { const parsedNumber = parseNumber(props.step); if (parsedNumber !== null) { return parsedNumber === 0 ? 1 : Math.abs(parsedNumber); } return 1; }); const mergedMinRef = use_memo(() => { const parsedNumber = parseNumber(props.min); if (parsedNumber !== null) return parsedNumber;else return null; }); const mergedMaxRef = use_memo(() => { const parsedNumber = parseNumber(props.max); if (parsedNumber !== null) return parsedNumber;else return null; }); const deriveDisplayedValueFromValue = () => { const { value: mergedValue } = mergedValueRef; if (utils_validator(mergedValue)) { const { format: formatProp, precision } = props; if (formatProp) { displayedValueRef.value = formatProp(mergedValue); } else { if (mergedValue === null || precision === undefined // precision overflow || getPrecision(mergedValue) > precision) { displayedValueRef.value = utils_format(mergedValue, undefined); } else { displayedValueRef.value = utils_format(mergedValue, precision); } } } else { // null can pass the validator check // so mergedValue is a number displayedValueRef.value = String(mergedValue); } }; deriveDisplayedValueFromValue(); const doUpdateValue = value => { const { value: mergedValue } = mergedValueRef; if (value === mergedValue) { deriveDisplayedValueFromValue(); return; } const { 'onUpdate:value': _onUpdateValue, onUpdateValue, onChange } = props; const { nTriggerFormInput, nTriggerFormChange } = formItem; if (onChange) call(onChange, value); if (onUpdateValue) call(onUpdateValue, value); if (_onUpdateValue) call(_onUpdateValue, value); uncontrolledValueRef.value = value; nTriggerFormInput(); nTriggerFormChange(); }; const deriveValueFromDisplayedValue = ({ offset, doUpdateIfValid, fixPrecision, isInputing }) => { const { value: displayedValue } = displayedValueRef; if (isInputing && isWipValue(displayedValue)) { return false; } const parsedValue = (props.parse || utils_parse)(displayedValue); if (parsedValue === null) { if (doUpdateIfValid) doUpdateValue(null); return null; } if (utils_validator(parsedValue)) { const currentPrecision = getPrecision(parsedValue); const { precision } = props; if (precision !== undefined && precision < currentPrecision && !fixPrecision) { return false; } let nextValue = Number.parseFloat((parsedValue + offset).toFixed(precision !== null && precision !== void 0 ? precision : getMaxPrecision(parsedValue))); if (utils_validator(nextValue)) { const { value: mergedMax } = mergedMaxRef; const { value: mergedMin } = mergedMinRef; if (mergedMax !== null && nextValue > mergedMax) { if (!doUpdateIfValid || isInputing) return false; // if doUpdateIfValid=true, we try to make it a valid value nextValue = mergedMax; } if (mergedMin !== null && nextValue < mergedMin) { if (!doUpdateIfValid || isInputing) return false; // if doUpdateIfValid=true, we try to make it a valid value nextValue = mergedMin; } if (props.validator && !props.validator(nextValue)) return false; if (doUpdateIfValid) doUpdateValue(nextValue); return nextValue; } } return false; }; const displayedValueInvalidRef = use_memo(() => { const derivedValue = deriveValueFromDisplayedValue({ offset: 0, doUpdateIfValid: false, isInputing: false, fixPrecision: false }); return derivedValue === false; }); const minusableRef = use_memo(() => { const { value: mergedValue } = mergedValueRef; if (props.validator && mergedValue === null) { return false; } const { value: mergedStep } = mergedStepRef; const derivedNextValue = deriveValueFromDisplayedValue({ offset: -mergedStep, doUpdateIfValid: false, isInputing: false, fixPrecision: false }); return derivedNextValue !== false; }); const addableRef = use_memo(() => { const { value: mergedValue } = mergedValueRef; if (props.validator && mergedValue === null) { return false; } const { value: mergedStep } = mergedStepRef; const derivedNextValue = deriveValueFromDisplayedValue({ offset: +mergedStep, doUpdateIfValid: false, isInputing: false, fixPrecision: false }); return derivedNextValue !== false; }); function doFocus(e) { const { onFocus } = props; const { nTriggerFormFocus } = formItem; if (onFocus) call(onFocus, e); nTriggerFormFocus(); } function doBlur(e) { var _a, _b; if (e.target === ((_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.wrapperElRef)) { // hit input wrapper // which means not activated return; } const value = deriveValueFromDisplayedValue({ offset: 0, doUpdateIfValid: true, isInputing: false, fixPrecision: true }); // If valid, update event has been emitted // make sure e.target.value is correct in blur callback if (value !== false) { const inputElRef = (_b = inputInstRef.value) === null || _b === void 0 ? void 0 : _b.inputElRef; if (inputElRef) { inputElRef.value = String(value || ''); } // If value is not changed, the displayed value may be greater than or // less than the current value. The derived value is reformatted so the // value is not changed. We can simply derive a new displayed value if (mergedValueRef.value === value) { deriveDisplayedValueFromValue(); } } else { // If not valid, nothing will be emitted, so derive displayed value from // origin value deriveDisplayedValueFromValue(); } const { onBlur } = props; const { nTriggerFormBlur } = formItem; if (onBlur) call(onBlur, e); nTriggerFormBlur(); // User may change value in blur callback, we make sure it will be // displayed. Sometimes mergedValue won't be viewed as changed void nextTick(() => { deriveDisplayedValueFromValue(); }); } function doClear(e) { const { onClear } = props; if (onClear) call(onClear, e); } function doAdd() { const { value: addable } = addableRef; if (!addable) { clearAddHoldTimeout(); return; } const { value: mergedValue } = mergedValueRef; if (mergedValue === null) { if (!props.validator) { doUpdateValue(createValidValue()); } } else { const { value: mergedStep } = mergedStepRef; deriveValueFromDisplayedValue({ offset: mergedStep, doUpdateIfValid: true, isInputing: false, fixPrecision: true }); } } function doMinus() { const { value: minusable } = minusableRef; if (!minusable) { clearMinusHoldTimeout(); return; } const { value: mergedValue } = mergedValueRef; if (mergedValue === null) { if (!props.validator) { doUpdateValue(createValidValue()); } } else { const { value: mergedStep } = mergedStepRef; deriveValueFromDisplayedValue({ offset: -mergedStep, doUpdateIfValid: true, isInputing: false, fixPrecision: true }); } } const handleFocus = doFocus; const handleBlur = doBlur; function createValidValue() { if (props.validator) return null; const { value: mergedMin } = mergedMinRef; const { value: mergedMax } = mergedMaxRef; if (mergedMin !== null) { return Math.max(0, mergedMin); } else if (mergedMax !== null) { return Math.min(0, mergedMax); } else { return 0; } } function handleClear(e) { doClear(e); doUpdateValue(null); } function handleMouseDown(e) { var _a, _b, _c; if ((_a = addButtonInstRef.value) === null || _a === void 0 ? void 0 : _a.$el.contains(e.target)) { e.preventDefault(); } if ((_b = minusButtonInstRef.value) === null || _b === void 0 ? void 0 : _b.$el.contains(e.target)) { e.preventDefault(); } (_c = inputInstRef.value) === null || _c === void 0 ? void 0 : _c.activate(); } let minusHoldStateIntervalId = null; let addHoldStateIntervalId = null; let firstMinusMousedownId = null; function clearMinusHoldTimeout() { if (firstMinusMousedownId) { window.clearTimeout(firstMinusMousedownId); firstMinusMousedownId = null; } if (minusHoldStateIntervalId) { window.clearInterval(minusHoldStateIntervalId); minusHoldStateIntervalId = null; } } let firstAddMousedownId = null; function clearAddHoldTimeout() { if (firstAddMousedownId) { window.clearTimeout(firstAddMousedownId); firstAddMousedownId = null; } if (addHoldStateIntervalId) { window.clearInterval(addHoldStateIntervalId); addHoldStateIntervalId = null; } } function handleMinusMousedown() { clearMinusHoldTimeout(); firstMinusMousedownId = window.setTimeout(() => { minusHoldStateIntervalId = window.setInterval(() => { doMinus(); }, HOLDING_CHANGE_INTERVAL); }, HOLDING_CHANGE_THRESHOLD); on('mouseup', document, clearMinusHoldTimeout, { once: true }); } function handleAddMousedown() { clearAddHoldTimeout(); firstAddMousedownId = window.setTimeout(() => { addHoldStateIntervalId = window.setInterval(() => { doAdd(); }, HOLDING_CHANGE_INTERVAL); }, HOLDING_CHANGE_THRESHOLD); on('mouseup', document, clearAddHoldTimeout, { once: true }); } const handleAddClick = () => { if (addHoldStateIntervalId) return; doAdd(); }; const handleMinusClick = () => { if (minusHoldStateIntervalId) return; doMinus(); }; function handleKeyDown(e) { var _a, _b; if (e.key === 'Enter') { if (e.target === ((_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.wrapperElRef)) { // hit input wrapper // which means not activated return; } const value = deriveValueFromDisplayedValue({ offset: 0, doUpdateIfValid: true, isInputing: false, fixPrecision: true }); if (value !== false) { (_b = inputInstRef.value) === null || _b === void 0 ? void 0 : _b.deactivate(); } } else if (e.key === 'ArrowUp') { if (!addableRef.value) return; if (props.keyboard.ArrowUp === false) return; e.preventDefault(); const value = deriveValueFromDisplayedValue({ offset: 0, doUpdateIfValid: true, isInputing: false, fixPrecision: true }); if (value !== false) { doAdd(); } } else if (e.key === 'ArrowDown') { if (!minusableRef.value) return; if (props.keyboard.ArrowDown === false) return; e.preventDefault(); const value = deriveValueFromDisplayedValue({ offset: 0, doUpdateIfValid: true, isInputing: false, fixPrecision: true }); if (value !== false) { doMinus(); } } } function handleUpdateDisplayedValue(value) { displayedValueRef.value = value; if (props.updateValueOnInput && !props.format && !props.parse && props.precision === undefined) { deriveValueFromDisplayedValue({ offset: 0, doUpdateIfValid: true, isInputing: true, fixPrecision: false }); } } runtime_core_esm_bundler_watch(mergedValueRef, () => { deriveDisplayedValueFromValue(); }); const exposedMethods = { focus: () => { var _a; return (_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.focus(); }, blur: () => { var _a; return (_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.blur(); }, select: () => { var _a; return (_a = inputInstRef.value) === null || _a === void 0 ? void 0 : _a.select(); } }; const rtlEnabledRef = useRtl('InputNumber', mergedRtlRef, mergedClsPrefixRef); return Object.assign(Object.assign({}, exposedMethods), { rtlEnabled: rtlEnabledRef, inputInstRef, minusButtonInstRef, addButtonInstRef, mergedClsPrefix: mergedClsPrefixRef, mergedBordered: mergedBorderedRef, uncontrolledValue: uncontrolledValueRef, mergedValue: mergedValueRef, mergedPlaceholder: mergedPlaceholderRef, displayedValueInvalid: displayedValueInvalidRef, mergedSize: mergedSizeRef, mergedDisabled: mergedDisabledRef, displayedValue: displayedValueRef, addable: addableRef, minusable: minusableRef, mergedStatus: mergedStatusRef, handleFocus, handleBlur, handleClear, handleMouseDown, handleAddClick, handleMinusClick, handleAddMousedown, handleMinusMousedown, handleKeyDown, handleUpdateDisplayedValue, // theme mergedTheme: themeRef, inputThemeOverrides: { paddingSmall: '0 8px 0 10px', paddingMedium: '0 8px 0 12px', paddingLarge: '0 8px 0 14px' }, buttonThemeOverrides: runtime_core_esm_bundler_computed(() => { const { self: { iconColorDisabled } } = themeRef.value; const [r, g, b, a] = rgba(iconColorDisabled); return { textColorTextDisabled: `rgb(${r}, ${g}, ${b})`, opacityDisabled: `${a}` }; }) }); }, render() { const { mergedClsPrefix, $slots } = this; const renderMinusButton = () => { return h(XButton, { text: true, disabled: !this.minusable || this.mergedDisabled || this.readonly, focusable: false, theme: this.mergedTheme.peers.Button, themeOverrides: this.mergedTheme.peerOverrides.Button, builtinThemeOverrides: this.buttonThemeOverrides, onClick: this.handleMinusClick, onMousedown: this.handleMinusMousedown, ref: "minusButtonInstRef" }, { icon: () => resolveSlot($slots['minus-icon'], () => [h(Icon, { clsPrefix: mergedClsPrefix }, { default: () => h(Remove, null) })]) }); }; const renderAddButton = () => { return h(XButton, { text: true, disabled: !this.addable || this.mergedDisabled || this.readonly, focusable: false, theme: this.mergedTheme.peers.Button, themeOverrides: this.mergedTheme.peerOverrides.Button, builtinThemeOverrides: this.buttonThemeOverrides, onClick: this.handleAddClick, onMousedown: this.handleAddMousedown, ref: "addButtonInstRef" }, { icon: () => resolveSlot($slots['add-icon'], () => [h(Icon, { clsPrefix: mergedClsPrefix }, { default: () => h(Add, null) })]) }); }; return h("div", { class: [`${mergedClsPrefix}-input-number`, this.rtlEnabled && `${mergedClsPrefix}-input-number--rtl`] }, h(Input, { ref: "inputInstRef", autofocus: this.autofocus, status: this.mergedStatus, bordered: this.mergedBordered, loading: this.loading, value: this.displayedValue, onUpdateValue: this.handleUpdateDisplayedValue, theme: this.mergedTheme.peers.Input, themeOverrides: this.mergedTheme.peerOverrides.Input, builtinThemeOverrides: this.inputThemeOverrides, size: this.mergedSize, placeholder: this.mergedPlaceholder, disabled: this.mergedDisabled, readonly: this.readonly, round: this.round, textDecoration: this.displayedValueInvalid ? 'line-through' : undefined, onFocus: this.handleFocus, onBlur: this.handleBlur, onKeydown: this.handleKeyDown, onMousedown: this.handleMouseDown, onClear: this.handleClear, clearable: this.clearable, inputProps: this.inputProps, internalLoadingBeforeSuffix: true }, { prefix: () => { var _a; return this.showButton && this.buttonPlacement === 'both' ? [renderMinusButton(), resolveWrappedSlot($slots.prefix, children => { if (children) { return h("span", { class: `${mergedClsPrefix}-input-number-prefix` }, children); } return null; })] : (_a = $slots.prefix) === null || _a === void 0 ? void 0 : _a.call($slots); }, suffix: () => { var _a; return this.showButton ? [resolveWrappedSlot($slots.suffix, children => { if (children) { return h("span", { class: `${mergedClsPrefix}-input-number-suffix` }, children); } return null; }), this.buttonPlacement === 'right' ? renderMinusButton() : null, renderAddButton()] : (_a = $slots.suffix) === null || _a === void 0 ? void 0 : _a.call($slots); } })); } })); ;// ./src/main.js // 挂载节点 var naive = es_create({ components: [src_Button, Space, Popover, Card, Grid, GridItem, Form, FormItem, Input, Radio, RadioGroup, Alert, InputNumber] }); var monkey_plugin = document.createElement("div"); monkey_plugin.id = "monkey_plugin"; monkey_plugin.style = "with:100%;z-index:1000"; document.body.appendChild(monkey_plugin); var app = createApp(App); app.use(naive); app.mount("#monkey_plugin"); }(); /******/ })() ;