1 |
- "use strict";function _interopDefault(e){return e&&"object"==typeof e&&"default"in e?e.default:e}function proxy(e,t,n){var r=n.get,o=n.set;sharedPropertyDefinition.get=r||noopFn,sharedPropertyDefinition.set=o||noopFn,Object.defineProperty(e,t,sharedPropertyDefinition)}function def(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function hasOwn(e,t){return hasOwnProperty.call(e,t)}function assert(e,t){if(!e)throw new Error("[vue-composition-api] "+t)}function isArray(e){return Array.isArray(e)}function isPlainObject(e){return"[object Object]"===toString(e)}function isFunction(e){return"function"==typeof e}function warn(e,t){Vue.util.warn(e,t)}function logError(e){if("undefined"==typeof window||"undefined"==typeof console)throw e;console.error(e)}function getCurrentVue(){return currentVue}function setCurrentVue(e){currentVue=e}function getCurrentVM(){return currentVM}function setCurrentVM(e){currentVM=e}function ensureCurrentVMInFn(){return getCurrentVM()}function createComponentInstance(e,t){void 0===t&&(t={});var n=e.config.silent;e.config.silent=!0;var r=new e(t);return e.config.silent=n,r}function isComponentInstance(e){return currentVue&&e instanceof currentVue}function createSlotProxy(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return e.$scopedSlots[t]?e.$scopedSlots[t].apply(e,n):warn("slots."+t+'() got called outside of the "render()" scope',e)}}function resolveSlots(e,t){var n;if(e){if(e._normalized)return e._normalized;for(var r in n={},e)e[r]&&"$"!==r[0]&&(n[r]=!0)}else n={};for(var r in t)r in n||(n[r]=!0);return n}function createSymbol(e){return hasSymbol?Symbol.for(e):e}function createRef(e){return Object.seal(new RefImpl(e))}function ref(e){var t,n=reactive(((t={})[RefKey]=e,t));return createRef({get:function(){return n[RefKey]},set:function(e){return n[RefKey]=e}})}function isRef(e){return e instanceof RefImpl}function toRefs(e){if(!isPlainObject(e))return e;var t={};return Object.keys(e).forEach(function(n){var r=e[n];isRef(r)||(r=createRef({get:function(){return e[n]},set:function(t){return e[n]=t}})),t[n]=r}),t}function isNonReactive(e){return hasOwn(e,NonReactiveIdentifierKey)&&e[NonReactiveIdentifierKey]===NonReactiveIdentifier}function isReactive(e){return hasOwn(e,ReactiveIdentifierKey)&&e[ReactiveIdentifierKey]===ReactiveIdentifier}function setupAccessControl(e){if(!(!isPlainObject(e)||isNonReactive(e)||Array.isArray(e)||isRef(e)||isComponentInstance(e)||hasOwn(e,AccessControlIdentifierKey)&&e[AccessControlIdentifierKey]===AccessControlIdentifier)){Object.isExtensible(e)&&def(e,AccessControlIdentifierKey,AccessControlIdentifier);for(var t=Object.keys(e),n=0;n<t.length;n++)defineAccessControl(e,t[n])}}function defineAccessControl(e,t,n){if("__ob__"!==t){var r,o,a=Object.getOwnPropertyDescriptor(e,t);if(a){if(!1===a.configurable)return;r=a.get,o=a.set,r&&!o||2!==arguments.length||(n=e[t])}setupAccessControl(n),Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var o=r?r.call(e):n;return t!==RefKey&&isRef(o)?o.value:o},set:function(a){if(!r||o){var i=r?r.call(e):n;t!==RefKey&&isRef(i)&&!isRef(a)?i.value=a:o?o.call(e,a):n=a,setupAccessControl(a)}}})}}function observe(e){var t,n=getCurrentVue();return t=n.observable?n.observable(e):createComponentInstance(n,{data:{$$state:e}})._data.$$state}function reactive(e){if(!isPlainObject(e)||isReactive(e)||isNonReactive(e)||!Object.isExtensible(e))return e;var t=observe(e);return def(t,ReactiveIdentifierKey,ReactiveIdentifier),setupAccessControl(t),t}function nonReactive(e){return isPlainObject(e)?(def(e,"__ob__",observe({}).__ob__),def(e,NonReactiveIdentifierKey,NonReactiveIdentifier),e):e}function isValidArrayIndex(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function set(e,t,n){var r=getCurrentVue().util,o=(r.warn,r.defineReactive);if(isArray(e)&&isValidArrayIndex(t))return e.length=Math.max(e.length,t),e.splice(t,1,n),n;if(t in e&&!(t in Object.prototype))return e[t]=n,n;var a=e.__ob__;return e._isVue||a&&a.vmCount?n:a?(o(a.value,t,n),defineAccessControl(e,t,n),a.dep.notify(),n):(e[t]=n,n)}function mergeData(e,t){if(!t)return e;for(var n,r,o,a=hasSymbol?Reflect.ownKeys(t):Object.keys(t),i=0;i<a.length;i++)"__ob__"!==(n=a[i])&&(r=e[n],o=t[n],hasOwn(e,n)?r!==o&&isPlainObject(r)&&!isRef(r)&&isPlainObject(o)&&!isRef(o)&&mergeData(r,o):e[n]=o);return e}function install(e,t){currentVue&¤tVue===e||(e.config.optionMergeStrategies.setup=function(e,t){return function(n,r){return mergeData("function"==typeof t&&t(n,r)||{},"function"==typeof e&&e(n,r)||{})}},setCurrentVue(e),t(e))}function __read(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,a=n.call(e),i=[];try{for(;(void 0===t||t-->0)&&!(r=a.next()).done;)i.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(o)throw o.error}}return i}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}function set$1(e,t,n){(e.__secret_vfa_state__=e.__secret_vfa_state__||{})[t]=n}function get(e,t){return(e.__secret_vfa_state__||{})[t]}function asVmProperty(e,t,n){var r=e.$options.props;t in e||r&&hasOwn(r,t)||proxy(e,t,{get:function(){return n.value},set:function(e){n.value=e}})}function updateTemplateRef(e){var t=vmStateManager.get(e,"rawBindings")||{};if(t&&Object.keys(t).length){for(var n=e.$refs,r=vmStateManager.get(e,"refs")||[],o=0;o<r.length;o++){var a=t[c=r[o]];!n[c]&&a&&isRef(a)&&(a.value=null)}var i=Object.keys(n),u=[];for(o=0;o<i.length;o++){var c;a=t[c=i[o]],n[c]&&a&&isRef(a)&&(a.value=n[c],u.push(c))}vmStateManager.set(e,"refs",u)}}function resolveScopedSlots(e,t){var n=e.$options._parentVnode;if(n){for(var r=vmStateManager.get(e,"slots")||[],o=resolveSlots(n.data.scopedSlots,e.$slots),a=0;a<r.length;a++)o[u=r[a]]||delete t[u];var i=Object.keys(o);for(a=0;a<i.length;a++){var u;t[u=i[a]]||(t[u]=createSlotProxy(e,u))}vmStateManager.set(e,"slots",i)}}function activateCurrentInstance(e,t,n){var r=getCurrentVM();setCurrentVM(e);try{return t(e)}catch(e){if(!n)throw e;n(e)}finally{setCurrentVM(r)}}function mixin(e){e.mixin({beforeCreate:function(){var e=this,t=e.$options,n=t.setup,r=t.render;if(r&&(t.render=function(){for(var t=this,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return activateCurrentInstance(e,function(){return r.apply(t,n)})}),n&&"function"==typeof n){var o=t.data;t.data=function(){return function(e,t){void 0===t&&(t={});var n,r=e.$options.setup,o=function(e){var t={slots:{}};return["root","parent","refs","attrs","listeners","isServer","ssrContext"].forEach(function(n){var r,o,a;Array.isArray(n)?(r=__read(n,2),o=r[0],a=r[1]):o=a=n,a="$"+a,proxy(t,o,{get:function(){return e[a]},set:function(){warn("Cannot assign to '"+o+"' because it is a read-only property",e)}})}),["emit"].forEach(function(n){var r="$"+n;proxy(t,n,{get:function(){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];e[r].apply(e,t)}}})}),t}(e);if(resolveScopedSlots(e,o.slots),activateCurrentInstance(e,function(){n=r(t,o)}),n){if(isFunction(n)){var a=n;return void(e.$options.render=function(){return resolveScopedSlots(e,o.slots),activateCurrentInstance(e,function(){return a()})})}if(isPlainObject(n)){var i=n;vmStateManager.set(e,"rawBindings",n),Object.keys(n).forEach(function(t){var n=i[t];isRef(n)||(n=ref(isReactive(n)?n:nonReactive(n))),asVmProperty(e,t,n)})}}}(e,e.$props),"function"==typeof o?o.call(e,e):o||{}}}},mounted:function(){updateTemplateRef(this)},updated:function(){updateTemplateRef(this)}})}function createComponent(e){return e}function createLifeCycle(e){return function(t){var n=ensureCurrentVMInFn(genName(e));injectHookOption(getCurrentVue(),n,e,t)}}function createLifeCycles(e,t){return function(n){var r=getCurrentVue(),o=ensureCurrentVMInFn(t);e.forEach(function(e){return injectHookOption(r,o,e,n)})}}function injectHookOption(e,t,n,r){var o=t.$options,a=e.config.optionMergeStrategies[n];o[n]=a(o[n],r)}function flushPreQueue(){flushQueue(this,WatcherPreFlushQueueKey)}function flushPostQueue(){flushQueue(this,WatcherPostFlushQueueKey)}function hasWatchEnv(e){return void 0!==e[WatcherPreFlushQueueKey]}function installWatchEnv(e){e[WatcherPreFlushQueueKey]=[],e[WatcherPostFlushQueueKey]=[],e.$on("hook:beforeUpdate",flushPreQueue),e.$on("hook:updated",flushPostQueue)}function flushQueue(e,t){for(var n=e[t],r=0;r<n.length;r++)n[r]();n.length=0}function queueFlushJob(e,t,n){var r=function(){e.$nextTick(function(){e[WatcherPreFlushQueueKey].length&&flushQueue(e,WatcherPreFlushQueueKey),e[WatcherPostFlushQueueKey].length&&flushQueue(e,WatcherPostFlushQueueKey)})};switch(n){case"pre":r(),e[WatcherPreFlushQueueKey].push(t);break;case"post":r(),e[WatcherPostFlushQueueKey].push(t);break;default:assert(!1,'flush must be one of ["post", "pre", "sync"], but got '+n)}}function createVueWatcher(e,t,n,r){var o=e._watchers.length;return e.$watch(t,n,{immediate:r.immediateInvokeCallback,deep:r.deep,lazy:r.noRun,sync:r.sync,before:r.before}),e._watchers[o]}function createWatcher(e,t,n,r){var o,a,i=r.flush,u="sync"===i,c=function(){o=function(){try{t()}catch(t){logError(t,e,"onCleanup()")}}},s=function(){o&&(o(),o=null)},f=function(t){return u||e===fallbackVM?t:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return queueFlushJob(e,function(){t.apply(void 0,__spread(n))},i)}};if(null===n){var l=createVueWatcher(e,function(){return t(c)},noopFn,{noRun:!0,deep:r.deep,sync:u,before:s});l.lazy=!1;var p=l.get.bind(l);return u?l.get():e.$nextTick(p),l.get=f(p),function(){l.teardown(),s()}}a=Array.isArray(t)?function(){return t.map(function(e){return isRef(e)?e.value:e()})}:isRef(t)?function(){return t.value}:t;var v=function(e,t){s(),n(e,t,c)},d=f(v);if(!r.lazy){var y=d,h=function(e,t){h=y,v(e,t)};d=function(e,t){h(e,t)}}var g=e.$watch(a,d,{immediate:!r.lazy,deep:r.deep,sync:u});return function(){g(),s()}}function watch(e,t,n){var r=null;"function"==typeof t?r=t:(n=t,r=null);var o=__assign({lazy:!1,deep:!1,flush:"post"},n),a=getCurrentVM();return a?hasWatchEnv(a)||installWatchEnv(a):(fallbackVM||(fallbackVM=createComponentInstance(getCurrentVue())),a=fallbackVM),createWatcher(a,e,r,o)}function computed(e){var t,n;"function"==typeof e?t=e:(t=e.get,n=e.set);var r=createComponentInstance(getCurrentVue(),{computed:{$$state:{get:t,set:n}}});return createRef({get:function(){return r.$$state},set:function(e){r.$$state=e}})}function resolveInject(e,t){for(var n=t;n;){if(n._provided&&hasOwn(n._provided,e))return n._provided[e];n=n.$parent}return NOT_FOUND}function provide(e,t){var n=ensureCurrentVMInFn("provide");if(!n._provided){var r={};Object.defineProperty(n,"_provided",{get:function(){return r},set:function(e){return Object.assign(r,e)}})}n._provided[e]=t}function inject(e,t){if(!e)return t;var n=resolveInject(e,ensureCurrentVMInFn("inject"));return n!==NOT_FOUND?n:void 0!==t?t:void 0}Object.defineProperty(exports,"__esModule",{value:!0});var Vue=_interopDefault(require("vue")),toString=function(e){return Object.prototype.toString.call(e)},hasSymbol="function"==typeof Symbol&&Symbol.for,noopFn=function(e){return e},sharedPropertyDefinition={enumerable:!0,configurable:!0,get:noopFn,set:noopFn},hasOwnProperty=Object.prototype.hasOwnProperty,currentVue=null,currentVM=null,WatcherPreFlushQueueKey=createSymbol("vfa.key.preFlushQueue"),WatcherPostFlushQueueKey=createSymbol("vfa.key.postFlushQueue"),AccessControlIdentifierKey=createSymbol("vfa.key.accessControlIdentifier"),ReactiveIdentifierKey=createSymbol("vfa.key.reactiveIdentifier"),NonReactiveIdentifierKey=createSymbol("vfa.key.nonReactiveIdentifier"),RefKey="vfa.key.refKey",RefImpl=function(){return function(e){proxy(this,"value",{get:e.get,set:e.set})}}(),AccessControlIdentifier={},ReactiveIdentifier={},NonReactiveIdentifier={},__assign=function(){return(__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;r>n;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},fallbackCreateElement,vmStateManager={set:set$1,get:get},createElement=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return currentVM?currentVM.$createElement.apply(currentVM,e):(warn("`createElement()` has been called outside of render function."),fallbackCreateElement||(fallbackCreateElement=createComponentInstance(getCurrentVue()).$createElement),fallbackCreateElement.apply(fallbackCreateElement,e))},genName=function(e){return"on"+(e[0].toUpperCase()+e.slice(1))},fallbackVM,onBeforeMount=createLifeCycle("beforeMount"),onMounted=createLifeCycle("mounted"),onBeforeUpdate=createLifeCycle("beforeUpdate"),onUpdated=createLifeCycle("updated"),onBeforeUnmount=createLifeCycle("beforeDestroy"),onUnmounted=createLifeCycles(["destroyed","deactivated"],genName("unmounted")),onErrorCaptured=createLifeCycle("errorCaptured"),onActivated=createLifeCycle("activated"),onDeactivated=createLifeCycle("deactivated"),onServerPrefetch=createLifeCycle("serverPrefetch"),NOT_FOUND={},_install=function(e){return install(e,mixin)},plugin={install:_install};currentVue&&"undefined"!=typeof window&&window.Vue&&_install(window.Vue),exports.computed=computed,exports.createComponent=createComponent,exports.createElement=createElement,exports.default=plugin,exports.getCurrentInstance=getCurrentVM,exports.inject=inject,exports.isRef=isRef,exports.onActivated=onActivated,exports.onBeforeMount=onBeforeMount,exports.onBeforeUnmount=onBeforeUnmount,exports.onBeforeUpdate=onBeforeUpdate,exports.onDeactivated=onDeactivated,exports.onErrorCaptured=onErrorCaptured,exports.onMounted=onMounted,exports.onServerPrefetch=onServerPrefetch,exports.onUnmounted=onUnmounted,exports.onUpdated=onUpdated,exports.provide=provide,exports.reactive=reactive,exports.ref=ref,exports.set=set,exports.toRefs=toRefs,exports.watch=watch;
|