You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

0 lines
164 KiB

1 month ago
  1. {"ast":null,"code":"import { shallowRef, watchEffect, readonly, unref, ref, isVue3, version, watch, customRef, getCurrentScope, onScopeDispose, effectScope, provide, inject, isRef, computed, reactive, toRefs as toRefs$1, toRef, isVue2, set as set$1, getCurrentInstance, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\nvar __defProp$9 = Object.defineProperty;\nvar __defProps$6 = Object.defineProperties;\nvar __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols$b = Object.getOwnPropertySymbols;\nvar __hasOwnProp$b = Object.prototype.hasOwnProperty;\nvar __propIsEnum$b = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, {\n enumerable: true,\n configurable: true,\n writable: true,\n value\n}) : obj[key] = value;\nvar __spreadValues$9 = (a, b) => {\n for (var prop in b || (b = {})) if (__hasOwnProp$b.call(b, prop)) __defNormalProp$9(a, prop, b[prop]);\n if (__getOwnPropSymbols$b) for (var prop of __getOwnPropSymbols$b(b)) {\n if (__propIsEnum$b.call(b, prop)) __defNormalProp$9(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, __spreadProps$6(__spreadValues$9({}, options), {\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n }));\n return readonly(result);\n}\nvar _a;\nconst isClient = typeof window !== \"undefined\";\nconst isDef = val => typeof val !== \"undefined\";\nconst assert = (condition, ...infos) => {\n if (!condition) console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isBoolean = val => typeof val === \"boolean\";\nconst isFunction = val => typeof val === \"function\";\nconst isNumber = val => typeof val === \"number\";\nconst isString = val => typeof val === \"string\";\nconst isObject = val => toString.call(val) === \"[object Object]\";\nconst isWindow = val => typeof window !== \"undefined\" && toString.call(val) === \"[object Window]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst isIOS = isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nfunction resolveUnref(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), {\n fn,\n thisArg: this,\n args\n })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = invoke => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = timer2 => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = invoke => {\n const duration = resolveUnref(ms);\n const maxDuration = resolveUnref(options.maxWait);\n if (timer) _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer) _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n