@vue/composition-api
Advanced tools
Comparing version 1.0.0-beta.14 to 1.0.0-beta.15
@@ -0,1 +1,15 @@ | ||
<a name="1.0.0-beta.15"></a> | ||
# [1.0.0-beta.15](https://github.com/vuejs/composition-api/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2020-10-04) | ||
### Bug Fixes | ||
* **reactive:** fix issue when using reactive `array` in the template ([#532](https://github.com/vuejs/composition-api/issues/532)) ([d99b91d](https://github.com/vuejs/composition-api/commit/d99b91d)) | ||
* `reactive` in SSR ([#546](https://github.com/vuejs/composition-api/issues/546)) ([535c829](https://github.com/vuejs/composition-api/commit/535c829)) | ||
* incorrect warning for `getRegisteredVueOrDefault`, resolve [#544](https://github.com/vuejs/composition-api/issues/544) ([3a1d992](https://github.com/vuejs/composition-api/commit/3a1d992)) | ||
* reactive for props ([#547](https://github.com/vuejs/composition-api/issues/547)) ([4d39443](https://github.com/vuejs/composition-api/commit/4d39443)) | ||
* **vue-test:** prevent warning when using multiple `localVue` ([#531](https://github.com/vuejs/composition-api/issues/531)) ([5484bb7](https://github.com/vuejs/composition-api/commit/5484bb7)) | ||
<a name="1.0.0-beta.14"></a> | ||
@@ -2,0 +16,0 @@ # [1.0.0-beta.14](https://github.com/vuejs/composition-api/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2020-09-15) |
@@ -226,2 +226,3 @@ import Vue$1, { VueConstructor, ComponentOptions, VNode, CreateElement } from 'vue'; | ||
declare function isRaw(obj: any): boolean; | ||
declare function isReadonly(obj: any): boolean; | ||
@@ -336,2 +337,2 @@ declare function isReactive(obj: any): boolean; | ||
export default Plugin; | ||
export { ComponentRenderProxy, ComputedRef, FlushMode, InjectionKey, PropOptions, PropType, Ref, SetupContext, ShallowUnwrapRef, UnwrapRef, VueWatcher, WatchCallback, WatchEffect, WatchOptions, WatchOptionsBase, WatchSource, WatchStopHandle, WritableComputedRef, computed, createApp, customRef, defineComponent, getCurrentInstance, createElement as h, inject, isReactive, isReadonly, isRef, markRaw, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useCSSModule, version, watch, watchEffect }; | ||
export { ComponentRenderProxy, ComputedRef, FlushMode, InjectionKey, PropOptions, PropType, Ref, SetupContext, ShallowUnwrapRef, UnwrapRef, VueWatcher, WatchCallback, WatchEffect, WatchOptions, WatchOptionsBase, WatchSource, WatchStopHandle, WritableComputedRef, computed, createApp, customRef, defineComponent, getCurrentInstance, createElement as h, inject, isRaw, isReactive, isReadonly, isRef, markRaw, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useCSSModule, version, watch, watchEffect }; |
@@ -5,6 +5,8 @@ 'use strict'; | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var Vue = require('vue'); | ||
var Vue = _interopDefault(require('vue')); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue); | ||
var toString = function (x) { return Object.prototype.toString.call(x); }; | ||
@@ -59,3 +61,3 @@ function isNative(Ctor) { | ||
function warn(msg, vm) { | ||
Vue.util.warn(msg, vm); | ||
Vue__default['default'].util.warn(msg, vm); | ||
} | ||
@@ -97,3 +99,3 @@ function logError(err, vm, info) { | ||
{ | ||
assert(vueConstructor, "No vue dependency found."); | ||
assert(constructor, "No vue dependency found."); | ||
} | ||
@@ -103,3 +105,4 @@ return constructor; | ||
function setVueConstructor(Vue) { | ||
if ( vueConstructor) { | ||
// @ts-ignore | ||
if ( vueConstructor && Vue.__proto__ !== vueConstructor.__proto__) { | ||
warn('Another instance of vue installed'); | ||
@@ -270,3 +273,2 @@ } | ||
var RefKey = 'composition-api.refKey'; | ||
var PropsReactive = '__props_reactive__'; | ||
@@ -310,5 +312,2 @@ var accessModifiedSet = new WeakMap(); | ||
} | ||
function isPropObject(obj) { | ||
return obj && typeof obj === 'object' && PropsReactive in obj; | ||
} | ||
function unref(ref) { | ||
@@ -318,3 +317,3 @@ return isRef(ref) ? ref.value : ref; | ||
function toRefs(obj) { | ||
if ( !isReactive(obj) && !isPropObject(obj)) { | ||
if ( !isReactive(obj)) { | ||
warn("toRefs() expects a reactive object but received a plain one."); | ||
@@ -498,4 +497,11 @@ } | ||
} | ||
// in SSR, there is no __ob__. Mock for reactivity check | ||
if (!hasOwn(observed, '__ob__')) { | ||
def(observed, '__ob__', {}); | ||
} | ||
return observed; | ||
} | ||
function createObserver() { | ||
return observe({}).__ob__ || {}; | ||
} | ||
function shallowReactive(obj) { | ||
@@ -507,3 +513,5 @@ var e_1, _a; | ||
} | ||
if (!isPlainObject(obj) || isRaw(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || | ||
isRaw(obj) || | ||
!Object.isExtensible(obj)) { | ||
return obj; | ||
@@ -534,7 +542,9 @@ } | ||
get: function getterHandler() { | ||
var _a; | ||
var value = getter ? getter.call(obj) : val; | ||
ob.dep.depend(); | ||
(_a = ob.dep) === null || _a === void 0 ? void 0 : _a.depend(); | ||
return value; | ||
}, | ||
set: function setterHandler(newVal) { | ||
var _a; | ||
if (getter && !setter) | ||
@@ -548,3 +558,3 @@ return; | ||
} | ||
ob.dep.notify(); | ||
(_a = ob.dep) === null || _a === void 0 ? void 0 : _a.notify(); | ||
}, | ||
@@ -578,3 +588,5 @@ }); | ||
} | ||
if (!isPlainObject(obj) || isRaw(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || | ||
isRaw(obj) || | ||
!Object.isExtensible(obj)) { | ||
return obj; | ||
@@ -588,3 +600,3 @@ } | ||
var e_2, _a; | ||
if (!isPlainObject(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) { | ||
return obj; | ||
@@ -647,7 +659,7 @@ } | ||
function markRaw(obj) { | ||
if (!isPlainObject(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) { | ||
return obj; | ||
} | ||
// set the vue observable flag at obj | ||
var ob = observe({}).__ob__; | ||
var ob = createObserver(); | ||
ob.__raw__ = true; | ||
@@ -850,3 +862,3 @@ def(obj, '__ob__', ob); | ||
// We have to monkeypatch the teardown function so Vue will run | ||
// runCleanup() when it tears down the watcher on unmmount. | ||
// runCleanup() when it tears down the watcher on unmounted. | ||
function patchWatcherTeardown(watcher, runCleanup) { | ||
@@ -1388,3 +1400,3 @@ var _teardown = watcher.teardown; | ||
// fake reactive for `toRefs(props)` | ||
def(props, PropsReactive, true); | ||
def(props, '__ob__', createObserver()); | ||
// resolve scopedSlots and slots to functions | ||
@@ -1425,3 +1437,11 @@ resolveScopedSlots(vm, ctx.slots); | ||
} | ||
else if (hasReactiveArrayChild(bindingValue)) { | ||
// creates a custom reactive properties without make the object explicitly reactive | ||
// NOTE we should try to avoid this, better implementation needed | ||
customReactive(bindingValue); | ||
} | ||
} | ||
else if (isArray(bindingValue)) { | ||
bindingValue = ref(bindingValue); | ||
} | ||
} | ||
@@ -1438,2 +1458,36 @@ asVmProperty(vm, name, bindingValue); | ||
} | ||
function customReactive(target) { | ||
if (!isPlainObject(target) || | ||
isRef(target) || | ||
isReactive(target) || | ||
isRaw(target)) | ||
return; | ||
var Vue = getVueConstructor(); | ||
var defineReactive = Vue.util.defineReactive; | ||
Object.keys(target).forEach(function (k) { | ||
var val = target[k]; | ||
defineReactive(target, k, val); | ||
if (val) { | ||
customReactive(val); | ||
} | ||
return; | ||
}); | ||
} | ||
function hasReactiveArrayChild(target, visited) { | ||
if (visited === void 0) { visited = new Map(); } | ||
if (visited.has(target)) { | ||
return visited.get(target); | ||
} | ||
visited.set(target, false); | ||
if (Array.isArray(target) && isReactive(target)) { | ||
visited.set(target, true); | ||
return true; | ||
} | ||
if (!isPlainObject(target) || isRaw(target)) { | ||
return false; | ||
} | ||
return Object.keys(target).some(function (x) { | ||
return hasReactiveArrayChild(target[x], visited); | ||
}); | ||
} | ||
function createSetupContext(vm) { | ||
@@ -1556,3 +1610,3 @@ var ctx = { | ||
var version = "1.0.0-beta.14"; | ||
var version = "1.0.0-beta.15"; | ||
// auto install when using CDN | ||
@@ -1571,2 +1625,3 @@ if (typeof window !== 'undefined' && window.Vue) { | ||
exports.inject = inject; | ||
exports.isRaw = isRaw; | ||
exports.isReactive = isReactive; | ||
@@ -1573,0 +1628,0 @@ exports.isReadonly = isReadonly; |
@@ -1,2 +0,2 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=(e=require("vue"))&&"object"==typeof e&&"default"in e?e.default:e;function n(e){return"function"==typeof e&&/native code/.test(e.toString())}var r="undefined"!=typeof Symbol&&n(Symbol)&&"undefined"!=typeof Reflect&&n(Reflect.ownKeys),o=function(e){return e},i={enumerable:!0,configurable:!0,get:o,set:o};function u(e,t,n){var r=n.get,u=n.set;i.get=r||o,i.set=u||o,Object.defineProperty(e,t,i)}function a(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function f(e,t){return Object.hasOwnProperty.call(e,t)}function c(e){return"[object Object]"===function(e){return Object.prototype.toString.call(e)}(e)}function s(e){return"function"==typeof e}function l(e,n){t.util.warn(e,n)}var v=void 0;try{v=require("vue")}catch(e){}var p,d=null,y=null;function _(){return d}function b(){return y}function h(e){y=e}function g(e){return b()}function m(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 x(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):l("slots."+t+'() got called outside of the "render()" scope',e)}}var w=function(){return(w=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)}; | ||
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("vue"));function n(e){return"function"==typeof e&&/native code/.test(e.toString())}var r="undefined"!=typeof Symbol&&n(Symbol)&&"undefined"!=typeof Reflect&&n(Reflect.ownKeys),o=function(e){return e},i={enumerable:!0,configurable:!0,get:o,set:o};function u(e,t,n){var r=n.get,u=n.set;i.get=r||o,i.set=u||o,Object.defineProperty(e,t,i)}function a(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}function f(e,t){return Object.hasOwnProperty.call(e,t)}function c(e){return Array.isArray(e)}function s(e){return"[object Object]"===function(e){return Object.prototype.toString.call(e)}(e)}function l(e){return"function"==typeof e}function v(e,n){t.default.util.warn(e,n)}var p=void 0;try{p=require("vue")}catch(e){}var d,_=null,y=null;function b(){return _}function h(){return y}function g(e){y=e}function m(e){return h()}function x(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 w(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):v("slots."+t+'() got called outside of the "render()" scope',e)}}var j=function(){return(j=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)}; | ||
/*! ***************************************************************************** | ||
@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation. | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function j(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function $(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(O(arguments[t]));return e}function k(e){return r?Symbol.for(e):e}var S=k("composition-api.preFlushQueue"),R=k("composition-api.postFlushQueue"),E="composition-api.refKey",P=new WeakMap,M=new WeakMap,A=new WeakMap,C=function(e){u(this,"value",{get:e.get,set:e.set})};function D(e,t){var n=new C(e),r=Object.seal(n);return A.set(r,!0),r}function B(e){var t;if(U(e))return e;var n=J(((t={})[E]=e,t));return D({get:function(){return n[E]},set:function(e){return n[E]=e}})}function U(e){return e instanceof C}function W(e){return U(e)?e.value:e}function z(e){if(!c(e))return e;var t={};for(var n in e)t[n]=F(e,n);return t}function F(e,t){var n=e[t];return U(n)?n:D({get:function(){return e[t]},set:function(n){return e[t]=n}})}function T(e){var t;return Boolean((null==e?void 0:e.__ob__)&&(null===(t=e.__ob__)||void 0===t?void 0:t.__raw__))}function V(e){var t;return Boolean((null==e?void 0:e.__ob__)&&!(null===(t=e.__ob__)||void 0===t?void 0:t.__raw__))}function I(e){if(!(!c(e)||T(e)||Array.isArray(e)||U(e)||function(e){var t=_();return t&&e instanceof t}(e)||P.has(e))){P.set(e,!0);for(var t=Object.keys(e),n=0;n<t.length;n++)K(e,t[n])}}function K(e,t,n){if("__ob__"!==t&&!T(e[t])){var r,o,i=Object.getOwnPropertyDescriptor(e,t);if(i){if(!1===i.configurable)return;r=i.get,o=i.set,r&&!o||2!==arguments.length||(n=e[t])}I(n),Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var o=r?r.call(e):n;return t!==E&&U(o)?o.value:o},set:function(i){if(!r||o){var u=r?r.call(e):n;t!==E&&U(u)&&!U(i)?u.value=i:o?o.call(e,i):n=i,I(i)}}})}}function q(e){var t,n=d||v;n.observable?t=n.observable(e):t=m(n,{data:{$$state:e}})._data.$$state;return t}function Q(e){var t,n;if(!c(e)||T(e)||!Object.isExtensible(e))return e;var r=q({});I(r);var o=r.__ob__,i=function(t){var n,i,a=e[t],f=Object.getOwnPropertyDescriptor(e,t);if(f){if(!1===f.configurable)return"continue";n=f.get,i=f.set,n&&!i||2!==u.length||(a=e[t])}Object.defineProperty(r,t,{enumerable:!0,configurable:!0,get:function(){var t=n?n.call(e):a;return o.dep.depend(),t},set:function(t){n&&!i||(i?i.call(e,t):a=t,o.dep.notify())}})},u=arguments;try{for(var a=j(Object.keys(e)),f=a.next();!f.done;f=a.next()){var s=f.value;i(s)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r}function J(e){if(!c(e)||T(e)||!Object.isExtensible(e))return e;var t=q(e);return I(t),t}function N(e){return function(t){var n,r=g(((n=e)[0].toUpperCase(),n.slice(1)));r&&function(e,t,n,r){var o=t.$options,i=e.config.optionMergeStrategies[n];o[n]=i(o[n],function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=b();h(e);try{return t.apply(void 0,$(n))}finally{h(o)}}}(t,r))}(_(),r,e,t)}}var G,H=N("beforeMount"),L=N("mounted"),X=N("beforeUpdate"),Y=N("updated"),Z=N("beforeDestroy"),ee=N("destroyed"),te=N("errorCaptured"),ne=N("activated"),re=N("deactivated"),oe=N("serverPrefetch");function ie(){fe(this,S)}function ue(){fe(this,R)}function ae(){var e=b();return e?function(e){return void 0!==e[S]}(e)||function(e){e[S]=[],e[R]=[],e.$on("hook:beforeUpdate",ie),e.$on("hook:updated",ue)}(e):(G||(G=m(_())),e=G),e}function fe(e,t){for(var n=e[t],r=0;r<n.length;r++)n[r]();n.length=0}function ce(e,t,n){var r=function(){e.$nextTick((function(){e[S].length&&fe(e,S),e[R].length&&fe(e,R)}))};switch(n){case"pre":r(),e[S].push(t);break;case"post":r(),e[R].push(t);break;default:!function(e,t){if(!e)throw new Error("[vue-composition-api] "+t)}(!1,'flush must be one of ["post", "pre", "sync"], but got '+n)}}function se(e,t){var n=e.teardown;e.teardown=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n.apply(e,r),t()}}function le(e,t,n,r){var i,u,a=r.flush,f="sync"===a,c=function(e){u=function(){try{e()}catch(e){!function(e,t,n){if("undefined"==typeof window||"undefined"==typeof console)throw e;console.error(e)}(e)}}},v=function(){u&&(u(),u=null)},p=function(t){return f||e===G?t:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return ce(e,(function(){t.apply(void 0,$(n))}),a)}};if(null===n){var d=!1,y=function(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]}(e,(function(){if(!d)try{d=!0,t(c)}finally{d=!1}}),o,{deep:r.deep||!1,sync:f,before:v});se(y,v),y.lazy=!1;var _=y.get.bind(y);return y.get=p(_),function(){y.teardown()}}var b,h=r.deep;Array.isArray(t)?b=function(){return t.map((function(e){return U(e)?e.value:e()}))}:U(t)?b=function(){return t.value}:V(t)?(b=function(){return t},h=!0):s(t)?b=t:(b=o,l("Invalid watch source: "+JSON.stringify(t)+".\n A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.",e));var g=function(e,t){v(),n(e,t,c)},m=p(g);if(r.immediate){var x=m,w=function(e,t){w=x,g(e,t)};m=function(e,t){w(e,t)}}var j=e.$watch(b,m,{immediate:r.immediate,deep:h,sync:f}),O=e._watchers[e._watchers.length-1];return V(O.value)&&(null===(i=O.value.__ob__)||void 0===i?void 0:i.dep)&&h&&O.value.__ob__.dep.addSub({update:function(){O.run()}}),se(O,v),function(){j()}}var ve={};var pe={};var de;var ye={set:function(e,t,n){(e.__composition_api_state__=e.__composition_api_state__||{})[t]=n},get:function(e,t){return(e.__composition_api_state__||{})[t]}};function _e(e){var t=ye.get(e,"rawBindings")||{};if(t&&Object.keys(t).length){for(var n=e.$refs,r=ye.get(e,"refs")||[],o=0;o<r.length;o++){var i=t[f=r[o]];!n[f]&&i&&U(i)&&(i.value=null)}var u=Object.keys(n),a=[];for(o=0;o<u.length;o++){var f;i=t[f=u[o]];n[f]&&i&&U(i)&&(i.value=n[f],a.push(f))}ye.set(e,"refs",a)}}function be(e,t){var n=e.$options._parentVnode;if(n){for(var r=ye.get(e,"slots")||[],o=function(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}(n.data.scopedSlots,e.$slots),i=0;i<r.length;i++){o[a=r[i]]||delete t[a]}var u=Object.keys(o);for(i=0;i<u.length;i++){var a;t[a=u[i]]||(t[a]=x(e,a))}ye.set(e,"slots",u)}}function he(e,t,n){var r=b();h(e);try{return t(e)}catch(e){if(!n)throw e;n(e)}finally{h(r)}}function ge(e){e.mixin({beforeCreate:function(){var e=this,t=e.$options,n=t.setup,r=t.render;r&&(t.render=function(){for(var t=this,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return he(e,(function(){return r.apply(t,n)}))});if(!n)return;if("function"!=typeof n)return;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:{}},n=["emit"];return["root","parent","refs","attrs","listeners","isServer","ssrContext"].forEach((function(n){var r,o,i;Array.isArray(n)?(r=O(n,2),o=r[0],i=r[1]):o=i=n,i="$"+i,u(t,o,{get:function(){return e[i]},set:function(){l("Cannot assign to '"+o+"' because it is a read-only property",e)}})})),n.forEach((function(n){var r="$"+n;u(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(a(t,"__props_reactive__",!0),be(e,o.slots),he(e,(function(){n=r(t,o)})),!n)return;if(s(n)){var i=n;return void(e.$options.render=function(){return be(e,o.slots),he(e,(function(){return i()}))})}if(c(n)){V(n)&&(n=z(n)),ye.set(e,"rawBindings",n);var v=n;Object.keys(v).forEach((function(t){var n,r=v[t];U(r)||V(r)||(s(r)?r=r.bind(e):(null===(n=r)||"object"!=typeof n)&&(r=B(r))),function(e,t,n){var r=e.$options.props;t in e||r&&f(r,t)||(U(n)?u(e,t,{get:function(){return n.value},set:function(e){n.value=e}}):e[t]=n)}(e,t,r)}))}}(e,e.$props),"function"==typeof o?o.call(e,e):o||{}}},mounted:function(){_e(this)},updated:function(){_e(this)}})}function me(e){(function(e){return f(e,"__composition_api_installed__")})(e)||(e.config.optionMergeStrategies.setup=function(e,t){return function(n,o){return function e(t,n){if(!t)return n;if(!n)return t;for(var o,i,u,a=r?Reflect.ownKeys(t):Object.keys(t),s=0;s<a.length;s++)"__ob__"!==(o=a[s])&&(i=n[o],u=t[o],f(n,o)?i!==u&&c(i)&&!U(i)&&c(u)&&!U(u)&&e(u,i):n[o]=u);return n}("function"==typeof e?e(n,o)||{}:void 0,"function"==typeof t?t(n,o)||{}:void 0)}},function(e){d=e,Object.defineProperty(e,"__composition_api_installed__",{configurable:!0,writable:!0,value:!0})}(e),ge(e))}var xe={install:function(e){return me(e)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(xe),exports.computed=function(e){var t,n,r,i,u=b();if("function"==typeof e?t=e:(t=e.get,n=e.set),u&&!u.$isServer){var a,f=function(){if(!p){var e=m(_(),{computed:{value:function(){return 0}}}),t=e._computedWatchers.value.constructor,n=e._data.__ob__.dep.constructor;p={Watcher:t,Dep:n},e.$destroy()}return p}(),c=f.Watcher,s=f.Dep;i=function(){return a||(a=new c(u,t,o,{lazy:!0})),a.dirty&&a.evaluate(),s.target&&a.depend(),a.value},r=function(e){n&&n(e)}}else{var l=m(_(),{computed:{$$state:{get:t,set:n}}});u&&u.$on("hook:destroyed",(function(){return l.$destroy()})),i=function(){return l.$$state},r=function(e){l.$$state=e}}return D({get:i,set:r})},exports.createApp=function(e,t){void 0===t&&(t=void 0);var n=_(),r=void 0;return{config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),directive:n.directive.bind(n),mount:function(o,i){return r||((r=new n(w({propsData:t},e))).$mount(o,i),r)},unmount:function(){r&&(r.$destroy(),r=void 0)}}},exports.customRef=function(e){var t=B(0);return D(e((function(){t.value}),(function(){++t.value})))},exports.default=xe,exports.defineComponent=function(e){return e},exports.getCurrentInstance=b,exports.h=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=b();return n?n.$createElement.apply(n,e):(l("`createElement()` has been called outside of render function."),de||(de=m(_()).$createElement),de.apply(de,e))},exports.inject=function(e,t,n){if(void 0===n&&(n=!1),!e)return t;var r=b();if(r){var o=function(e,t){for(var n=t;n;){if(n._provided&&f(n._provided,e))return n._provided[e];n=n.$parent}return ve}(e,r);return o!==ve?o:n&&s(t)?t():t}l("inject() can only be used inside setup() or functional components.")},exports.isReactive=V,exports.isReadonly=function(e){return A.has(e)},exports.isRef=U,exports.markRaw=function(e){if(!c(e)||!Object.isExtensible(e))return e;var t=q({}).__ob__;return t.__raw__=!0,a(e,"__ob__",t),M.set(e,!0),e},exports.nextTick=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return null===(e=_())||void 0===e?void 0:e.nextTick.apply(this,t)},exports.onActivated=ne,exports.onBeforeMount=H,exports.onBeforeUnmount=Z,exports.onBeforeUpdate=X,exports.onDeactivated=re,exports.onErrorCaptured=te,exports.onMounted=L,exports.onServerPrefetch=oe,exports.onUnmounted=ee,exports.onUpdated=Y,exports.provide=function(e,t){var n=g();if(n){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}},exports.proxyRefs=function(e){var t,n,r;if(V(e))return e;var o=J(((t={})[E]=e,t)),i=function(e){u(o,e,{get:function(){return U(o[e])?o[e].value:o[e]},set:function(t){if(U(o[e]))return o[e].value=W(t);o[e]=W(t)}})};try{for(var a=j(Object.keys(e)),f=a.next();!f.done;f=a.next()){i(f.value)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},exports.reactive=J,exports.ref=B,exports.set=function(e,t,n){var r,o=_().util,i=(o.warn,o.defineReactive);if(r=e,Array.isArray(r)&&function(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}(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 u=e.__ob__;return e._isVue||u&&u.vmCount?n:u?(i(u.value,t,n),K(e,t,n),u.dep.notify(),n):(e[t]=n,n)},exports.shallowReactive=Q,exports.shallowReadonly=function(e){var t,n;if(!c(e)||!Object.isExtensible(e))return e;var r={},o=J({}),i=o.__ob__,u=function(t){var n,o=e[t],u=void 0,f=Object.getOwnPropertyDescriptor(e,t);if(f){if(!1===f.configurable)return"continue";n=f.get,u=f.set,n&&!u||2!==a.length||(o=e[t])}Object.defineProperty(r,t,{enumerable:!0,configurable:!0,get:function(){var t=n?n.call(e):o;return i.dep.depend(),t},set:function(e){}})},a=arguments;try{for(var f=j(Object.keys(e)),s=f.next();!s.done;s=f.next()){var l=s.value;u(l)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}return A.set(r,!0),r},exports.shallowRef=function(e){var t;if(U(e))return e;var n=Q(((t={})[E]=e,t));return D({get:function(){return n[E]},set:function(e){return n[E]=e}})},exports.toRaw=function(e){var t,n;return T(e)||!Object.isExtensible(e)?e:(null===(n=null===(t=e)||void 0===t?void 0:t.__ob__)||void 0===n?void 0:n.value)||e},exports.toRef=F,exports.toRefs=z,exports.triggerRef=function(e){U(e)&&(e.value=e.value)},exports.unref=W,exports.useCSSModule=function(e){void 0===e&&(e="$style");var t=b();if(!t)return pe;var n=t[e];return n||pe},exports.version="1.0.0-beta.14",exports.watch=function(e,t,n){var r=null;"function"==typeof t?r=t:(n=t,r=null);var o=function(e){return w({immediate:!1,deep:!1,flush:"post"},e)}(n);return le(ae(),e,r,o)},exports.watchEffect=function(e,t){var n=function(e){return w({immediate:!0,deep:!1,flush:"post"},e)}(t);return le(ae(),e,null,n)}; | ||
***************************************************************************** */function O(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function k(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($(arguments[t]));return e}function S(e){return r?Symbol.for(e):e}var R=S("composition-api.preFlushQueue"),E=S("composition-api.postFlushQueue"),P="composition-api.refKey",A=new WeakMap,M=new WeakMap,C=new WeakMap,D=function(e){u(this,"value",{get:e.get,set:e.set})};function B(e,t){var n=new D(e),r=Object.seal(n);return C.set(r,!0),r}function U(e){var t;if(W(e))return e;var n=G(((t={})[P]=e,t));return B({get:function(){return n[P]},set:function(e){return n[P]=e}})}function W(e){return e instanceof D}function z(e){return W(e)?e.value:e}function F(e){if(!s(e))return e;var t={};for(var n in e)t[n]=T(e,n);return t}function T(e,t){var n=e[t];return W(n)?n:B({get:function(){return e[t]},set:function(n){return e[t]=n}})}function V(e){var t;return Boolean((null==e?void 0:e.__ob__)&&(null===(t=e.__ob__)||void 0===t?void 0:t.__raw__))}function I(e){var t;return Boolean((null==e?void 0:e.__ob__)&&!(null===(t=e.__ob__)||void 0===t?void 0:t.__raw__))}function K(e){if(!(!s(e)||V(e)||Array.isArray(e)||W(e)||function(e){var t=b();return t&&e instanceof t}(e)||A.has(e))){A.set(e,!0);for(var t=Object.keys(e),n=0;n<t.length;n++)q(e,t[n])}}function q(e,t,n){if("__ob__"!==t&&!V(e[t])){var r,o,i=Object.getOwnPropertyDescriptor(e,t);if(i){if(!1===i.configurable)return;r=i.get,o=i.set,r&&!o||2!==arguments.length||(n=e[t])}K(n),Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var o=r?r.call(e):n;return t!==P&&W(o)?o.value:o},set:function(i){if(!r||o){var u=r?r.call(e):n;t!==P&&W(u)&&!W(i)?u.value=i:o?o.call(e,i):n=i,K(i)}}})}}function Q(e){var t,n=_||p;n.observable?t=n.observable(e):t=x(n,{data:{$$state:e}})._data.$$state;return f(t,"__ob__")||a(t,"__ob__",{}),t}function J(){return Q({}).__ob__||{}}function N(e){var t,n;if(!s(e)&&!c(e)||V(e)||!Object.isExtensible(e))return e;var r=Q({});K(r);var o=r.__ob__,i=function(t){var n,i,a=e[t],f=Object.getOwnPropertyDescriptor(e,t);if(f){if(!1===f.configurable)return"continue";n=f.get,i=f.set,n&&!i||2!==u.length||(a=e[t])}Object.defineProperty(r,t,{enumerable:!0,configurable:!0,get:function(){var t,r=n?n.call(e):a;return null===(t=o.dep)||void 0===t||t.depend(),r},set:function(t){var r;n&&!i||(i?i.call(e,t):a=t,null===(r=o.dep)||void 0===r||r.notify())}})},u=arguments;try{for(var a=O(Object.keys(e)),f=a.next();!f.done;f=a.next()){var l=f.value;i(l)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return r}function G(e){if(!s(e)&&!c(e)||V(e)||!Object.isExtensible(e))return e;var t=Q(e);return K(t),t}function H(e){return function(t){var n,r=m(((n=e)[0].toUpperCase(),n.slice(1)));r&&function(e,t,n,r){var o=t.$options,i=e.config.optionMergeStrategies[n];o[n]=i(o[n],function(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=h();g(e);try{return t.apply(void 0,k(n))}finally{g(o)}}}(t,r))}(b(),r,e,t)}}var L,X=H("beforeMount"),Y=H("mounted"),Z=H("beforeUpdate"),ee=H("updated"),te=H("beforeDestroy"),ne=H("destroyed"),re=H("errorCaptured"),oe=H("activated"),ie=H("deactivated"),ue=H("serverPrefetch");function ae(){se(this,R)}function fe(){se(this,E)}function ce(){var e=h();return e?function(e){return void 0!==e[R]}(e)||function(e){e[R]=[],e[E]=[],e.$on("hook:beforeUpdate",ae),e.$on("hook:updated",fe)}(e):(L||(L=x(b())),e=L),e}function se(e,t){for(var n=e[t],r=0;r<n.length;r++)n[r]();n.length=0}function le(e,t,n){var r=function(){e.$nextTick((function(){e[R].length&&se(e,R),e[E].length&&se(e,E)}))};switch(n){case"pre":r(),e[R].push(t);break;case"post":r(),e[E].push(t);break;default:!function(e,t){if(!e)throw new Error("[vue-composition-api] "+t)}(!1,'flush must be one of ["post", "pre", "sync"], but got '+n)}}function ve(e,t){var n=e.teardown;e.teardown=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n.apply(e,r),t()}}function pe(e,t,n,r){var i,u,a=r.flush,f="sync"===a,c=function(e){u=function(){try{e()}catch(e){!function(e,t,n){if("undefined"==typeof window||"undefined"==typeof console)throw e;console.error(e)}(e)}}},s=function(){u&&(u(),u=null)},p=function(t){return f||e===L?t:function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return le(e,(function(){t.apply(void 0,k(n))}),a)}};if(null===n){var d=!1,_=function(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]}(e,(function(){if(!d)try{d=!0,t(c)}finally{d=!1}}),o,{deep:r.deep||!1,sync:f,before:s});ve(_,s),_.lazy=!1;var y=_.get.bind(_);return _.get=p(y),function(){_.teardown()}}var b,h=r.deep;Array.isArray(t)?b=function(){return t.map((function(e){return W(e)?e.value:e()}))}:W(t)?b=function(){return t.value}:I(t)?(b=function(){return t},h=!0):l(t)?b=t:(b=o,v("Invalid watch source: "+JSON.stringify(t)+".\n A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.",e));var g=function(e,t){s(),n(e,t,c)},m=p(g);if(r.immediate){var x=m,w=function(e,t){w=x,g(e,t)};m=function(e,t){w(e,t)}}var j=e.$watch(b,m,{immediate:r.immediate,deep:h,sync:f}),O=e._watchers[e._watchers.length-1];return I(O.value)&&(null===(i=O.value.__ob__)||void 0===i?void 0:i.dep)&&h&&O.value.__ob__.dep.addSub({update:function(){O.run()}}),ve(O,s),function(){j()}}var de={};var _e={};var ye;var be={set:function(e,t,n){(e.__composition_api_state__=e.__composition_api_state__||{})[t]=n},get:function(e,t){return(e.__composition_api_state__||{})[t]}};function he(e){var t=be.get(e,"rawBindings")||{};if(t&&Object.keys(t).length){for(var n=e.$refs,r=be.get(e,"refs")||[],o=0;o<r.length;o++){var i=t[f=r[o]];!n[f]&&i&&W(i)&&(i.value=null)}var u=Object.keys(n),a=[];for(o=0;o<u.length;o++){var f;i=t[f=u[o]];n[f]&&i&&W(i)&&(i.value=n[f],a.push(f))}be.set(e,"refs",a)}}function ge(e,t){var n=e.$options._parentVnode;if(n){for(var r=be.get(e,"slots")||[],o=function(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}(n.data.scopedSlots,e.$slots),i=0;i<r.length;i++){o[a=r[i]]||delete t[a]}var u=Object.keys(o);for(i=0;i<u.length;i++){var a;t[a=u[i]]||(t[a]=w(e,a))}be.set(e,"slots",u)}}function me(e,t,n){var r=h();g(e);try{return t(e)}catch(e){if(!n)throw e;n(e)}finally{g(r)}}function xe(e){function t(e){if(s(e)&&!W(e)&&!I(e)&&!V(e)){var n=b().util.defineReactive;Object.keys(e).forEach((function(r){var o=e[r];n(e,r,o),o&&t(o)}))}}function n(e,t){return void 0===t&&(t=new Map),t.has(e)?t.get(e):(t.set(e,!1),Array.isArray(e)&&I(e)?(t.set(e,!0),!0):!(!s(e)||V(e))&&Object.keys(e).some((function(r){return n(e[r],t)})))}e.mixin({beforeCreate:function(){var e=this,r=e.$options,o=r.setup,i=r.render;i&&(r.render=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return me(e,(function(){return i.apply(t,n)}))});if(!o)return;if("function"!=typeof o)return;var p=r.data;r.data=function(){return function(e,r){void 0===r&&(r={});var o,i=e.$options.setup,p=function(e){var t={slots:{}},n=["emit"];return["root","parent","refs","attrs","listeners","isServer","ssrContext"].forEach((function(n){var r,o,i;Array.isArray(n)?(r=$(n,2),o=r[0],i=r[1]):o=i=n,i="$"+i,u(t,o,{get:function(){return e[i]},set:function(){v("Cannot assign to '"+o+"' because it is a read-only property",e)}})})),n.forEach((function(n){var r="$"+n;u(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(a(r,"__ob__",J()),ge(e,p.slots),me(e,(function(){o=i(r,p)})),!o)return;if(l(o)){var d=o;return void(e.$options.render=function(){return ge(e,p.slots),me(e,(function(){return d()}))})}if(s(o)){I(o)&&(o=F(o)),be.set(e,"rawBindings",o);var _=o;Object.keys(_).forEach((function(r){var o,i=_[r];W(i)||(I(i)?c(i)&&(i=U(i)):l(i)?i=i.bind(e):null===(o=i)||"object"!=typeof o?i=U(i):n(i)&&t(i)),function(e,t,n){var r=e.$options.props;t in e||r&&f(r,t)||(W(n)?u(e,t,{get:function(){return n.value},set:function(e){n.value=e}}):e[t]=n)}(e,r,i)}))}}(e,e.$props),"function"==typeof p?p.call(e,e):p||{}}},mounted:function(){he(this)},updated:function(){he(this)}})}function we(e,t){if(!e)return t;if(!t)return e;for(var n,o,i,u=r?Reflect.ownKeys(e):Object.keys(e),a=0;a<u.length;a++)"__ob__"!==(n=u[a])&&(o=t[n],i=e[n],f(t,n)?o!==i&&s(o)&&!W(o)&&s(i)&&!W(i)&&we(i,o):t[n]=i);return t}function je(e){(function(e){return f(e,"__composition_api_installed__")})(e)||(e.config.optionMergeStrategies.setup=function(e,t){return function(n,r){return we("function"==typeof e?e(n,r)||{}:void 0,"function"==typeof t?t(n,r)||{}:void 0)}},function(e){_=e,Object.defineProperty(e,"__composition_api_installed__",{configurable:!0,writable:!0,value:!0})}(e),xe(e))}var Oe={install:function(e){return je(e)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(Oe),exports.computed=function(e){var t,n,r,i,u=h();if("function"==typeof e?t=e:(t=e.get,n=e.set),u&&!u.$isServer){var a,f=function(){if(!d){var e=x(b(),{computed:{value:function(){return 0}}}),t=e._computedWatchers.value.constructor,n=e._data.__ob__.dep.constructor;d={Watcher:t,Dep:n},e.$destroy()}return d}(),c=f.Watcher,s=f.Dep;i=function(){return a||(a=new c(u,t,o,{lazy:!0})),a.dirty&&a.evaluate(),s.target&&a.depend(),a.value},r=function(e){n&&n(e)}}else{var l=x(b(),{computed:{$$state:{get:t,set:n}}});u&&u.$on("hook:destroyed",(function(){return l.$destroy()})),i=function(){return l.$$state},r=function(e){l.$$state=e}}return B({get:i,set:r})},exports.createApp=function(e,t){void 0===t&&(t=void 0);var n=b(),r=void 0;return{config:n.config,use:n.use.bind(n),mixin:n.mixin.bind(n),component:n.component.bind(n),directive:n.directive.bind(n),mount:function(o,i){return r||((r=new n(j({propsData:t},e))).$mount(o,i),r)},unmount:function(){r&&(r.$destroy(),r=void 0)}}},exports.customRef=function(e){var t=U(0);return B(e((function(){t.value}),(function(){++t.value})))},exports.default=Oe,exports.defineComponent=function(e){return e},exports.getCurrentInstance=h,exports.h=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=h();return n?n.$createElement.apply(n,e):(v("`createElement()` has been called outside of render function."),ye||(ye=x(b()).$createElement),ye.apply(ye,e))},exports.inject=function(e,t,n){if(void 0===n&&(n=!1),!e)return t;var r=h();if(r){var o=function(e,t){for(var n=t;n;){if(n._provided&&f(n._provided,e))return n._provided[e];n=n.$parent}return de}(e,r);return o!==de?o:n&&l(t)?t():t}v("inject() can only be used inside setup() or functional components.")},exports.isRaw=V,exports.isReactive=I,exports.isReadonly=function(e){return C.has(e)},exports.isRef=W,exports.markRaw=function(e){if(!s(e)&&!c(e)||!Object.isExtensible(e))return e;var t=J();return t.__raw__=!0,a(e,"__ob__",t),M.set(e,!0),e},exports.nextTick=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return null===(e=b())||void 0===e?void 0:e.nextTick.apply(this,t)},exports.onActivated=oe,exports.onBeforeMount=X,exports.onBeforeUnmount=te,exports.onBeforeUpdate=Z,exports.onDeactivated=ie,exports.onErrorCaptured=re,exports.onMounted=Y,exports.onServerPrefetch=ue,exports.onUnmounted=ne,exports.onUpdated=ee,exports.provide=function(e,t){var n=m();if(n){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}},exports.proxyRefs=function(e){var t,n,r;if(I(e))return e;var o=G(((t={})[P]=e,t)),i=function(e){u(o,e,{get:function(){return W(o[e])?o[e].value:o[e]},set:function(t){if(W(o[e]))return o[e].value=z(t);o[e]=z(t)}})};try{for(var a=O(Object.keys(e)),f=a.next();!f.done;f=a.next()){i(f.value)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(n)throw n.error}}return o},exports.reactive=G,exports.ref=U,exports.set=function(e,t,n){var r=b().util,o=(r.warn,r.defineReactive);if(c(e)&&function(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}(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 i=e.__ob__;return e._isVue||i&&i.vmCount?n:i?(o(i.value,t,n),q(e,t,n),i.dep.notify(),n):(e[t]=n,n)},exports.shallowReactive=N,exports.shallowReadonly=function(e){var t,n;if(!s(e)&&!c(e)||!Object.isExtensible(e))return e;var r={},o=G({}),i=o.__ob__,u=function(t){var n,o=e[t],u=void 0,f=Object.getOwnPropertyDescriptor(e,t);if(f){if(!1===f.configurable)return"continue";n=f.get,u=f.set,n&&!u||2!==a.length||(o=e[t])}Object.defineProperty(r,t,{enumerable:!0,configurable:!0,get:function(){var t=n?n.call(e):o;return i.dep.depend(),t},set:function(e){}})},a=arguments;try{for(var f=O(Object.keys(e)),l=f.next();!l.done;l=f.next()){var v=l.value;u(v)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}return C.set(r,!0),r},exports.shallowRef=function(e){var t;if(W(e))return e;var n=N(((t={})[P]=e,t));return B({get:function(){return n[P]},set:function(e){return n[P]=e}})},exports.toRaw=function(e){var t,n;return V(e)||!Object.isExtensible(e)?e:(null===(n=null===(t=e)||void 0===t?void 0:t.__ob__)||void 0===n?void 0:n.value)||e},exports.toRef=T,exports.toRefs=F,exports.triggerRef=function(e){W(e)&&(e.value=e.value)},exports.unref=z,exports.useCSSModule=function(e){void 0===e&&(e="$style");var t=h();if(!t)return _e;var n=t[e];return n||_e},exports.version="1.0.0-beta.15",exports.watch=function(e,t,n){var r=null;"function"==typeof t?r=t:(n=t,r=null);var o=function(e){return j({immediate:!1,deep:!1,flush:"post"},e)}(n);return pe(ce(),e,r,o)},exports.watchEffect=function(e,t){var n=function(e){return j({immediate:!0,deep:!1,flush:"post"},e)}(t);return pe(ce(),e,null,n)}; |
@@ -89,3 +89,3 @@ import Vue from 'vue'; | ||
if ((process.env.NODE_ENV !== 'production')) { | ||
assert(vueConstructor, "No vue dependency found."); | ||
assert(constructor, "No vue dependency found."); | ||
} | ||
@@ -95,3 +95,4 @@ return constructor; | ||
function setVueConstructor(Vue) { | ||
if ((process.env.NODE_ENV !== 'production') && vueConstructor) { | ||
// @ts-ignore | ||
if ((process.env.NODE_ENV !== 'production') && vueConstructor && Vue.__proto__ !== vueConstructor.__proto__) { | ||
warn('Another instance of vue installed'); | ||
@@ -262,3 +263,2 @@ } | ||
var RefKey = 'composition-api.refKey'; | ||
var PropsReactive = '__props_reactive__'; | ||
@@ -302,5 +302,2 @@ var accessModifiedSet = new WeakMap(); | ||
} | ||
function isPropObject(obj) { | ||
return obj && typeof obj === 'object' && PropsReactive in obj; | ||
} | ||
function unref(ref) { | ||
@@ -310,3 +307,3 @@ return isRef(ref) ? ref.value : ref; | ||
function toRefs(obj) { | ||
if ((process.env.NODE_ENV !== 'production') && !isReactive(obj) && !isPropObject(obj)) { | ||
if ((process.env.NODE_ENV !== 'production') && !isReactive(obj)) { | ||
warn("toRefs() expects a reactive object but received a plain one."); | ||
@@ -490,4 +487,11 @@ } | ||
} | ||
// in SSR, there is no __ob__. Mock for reactivity check | ||
if (!hasOwn(observed, '__ob__')) { | ||
def(observed, '__ob__', {}); | ||
} | ||
return observed; | ||
} | ||
function createObserver() { | ||
return observe({}).__ob__ || {}; | ||
} | ||
function shallowReactive(obj) { | ||
@@ -499,3 +503,5 @@ var e_1, _a; | ||
} | ||
if (!isPlainObject(obj) || isRaw(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || | ||
isRaw(obj) || | ||
!Object.isExtensible(obj)) { | ||
return obj; | ||
@@ -526,7 +532,9 @@ } | ||
get: function getterHandler() { | ||
var _a; | ||
var value = getter ? getter.call(obj) : val; | ||
ob.dep.depend(); | ||
(_a = ob.dep) === null || _a === void 0 ? void 0 : _a.depend(); | ||
return value; | ||
}, | ||
set: function setterHandler(newVal) { | ||
var _a; | ||
if (getter && !setter) | ||
@@ -540,3 +548,3 @@ return; | ||
} | ||
ob.dep.notify(); | ||
(_a = ob.dep) === null || _a === void 0 ? void 0 : _a.notify(); | ||
}, | ||
@@ -570,3 +578,5 @@ }); | ||
} | ||
if (!isPlainObject(obj) || isRaw(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || | ||
isRaw(obj) || | ||
!Object.isExtensible(obj)) { | ||
return obj; | ||
@@ -580,3 +590,3 @@ } | ||
var e_2, _a; | ||
if (!isPlainObject(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) { | ||
return obj; | ||
@@ -639,7 +649,7 @@ } | ||
function markRaw(obj) { | ||
if (!isPlainObject(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) { | ||
return obj; | ||
} | ||
// set the vue observable flag at obj | ||
var ob = observe({}).__ob__; | ||
var ob = createObserver(); | ||
ob.__raw__ = true; | ||
@@ -842,3 +852,3 @@ def(obj, '__ob__', ob); | ||
// We have to monkeypatch the teardown function so Vue will run | ||
// runCleanup() when it tears down the watcher on unmmount. | ||
// runCleanup() when it tears down the watcher on unmounted. | ||
function patchWatcherTeardown(watcher, runCleanup) { | ||
@@ -1381,3 +1391,3 @@ var _teardown = watcher.teardown; | ||
// fake reactive for `toRefs(props)` | ||
def(props, PropsReactive, true); | ||
def(props, '__ob__', createObserver()); | ||
// resolve scopedSlots and slots to functions | ||
@@ -1418,3 +1428,11 @@ resolveScopedSlots(vm, ctx.slots); | ||
} | ||
else if (hasReactiveArrayChild(bindingValue)) { | ||
// creates a custom reactive properties without make the object explicitly reactive | ||
// NOTE we should try to avoid this, better implementation needed | ||
customReactive(bindingValue); | ||
} | ||
} | ||
else if (isArray(bindingValue)) { | ||
bindingValue = ref(bindingValue); | ||
} | ||
} | ||
@@ -1431,2 +1449,36 @@ asVmProperty(vm, name, bindingValue); | ||
} | ||
function customReactive(target) { | ||
if (!isPlainObject(target) || | ||
isRef(target) || | ||
isReactive(target) || | ||
isRaw(target)) | ||
return; | ||
var Vue = getVueConstructor(); | ||
var defineReactive = Vue.util.defineReactive; | ||
Object.keys(target).forEach(function (k) { | ||
var val = target[k]; | ||
defineReactive(target, k, val); | ||
if (val) { | ||
customReactive(val); | ||
} | ||
return; | ||
}); | ||
} | ||
function hasReactiveArrayChild(target, visited) { | ||
if (visited === void 0) { visited = new Map(); } | ||
if (visited.has(target)) { | ||
return visited.get(target); | ||
} | ||
visited.set(target, false); | ||
if (Array.isArray(target) && isReactive(target)) { | ||
visited.set(target, true); | ||
return true; | ||
} | ||
if (!isPlainObject(target) || isRaw(target)) { | ||
return false; | ||
} | ||
return Object.keys(target).some(function (x) { | ||
return hasReactiveArrayChild(target[x], visited); | ||
}); | ||
} | ||
function createSetupContext(vm) { | ||
@@ -1552,3 +1604,3 @@ var ctx = { | ||
var version = "1.0.0-beta.14"; | ||
var version = "1.0.0-beta.15"; | ||
// auto install when using CDN | ||
@@ -1560,2 +1612,2 @@ if (typeof window !== 'undefined' && window.Vue) { | ||
export default Plugin; | ||
export { computed, createApp, customRef, defineComponent, getCurrentInstance, createElement as h, inject, isReactive, isReadonly, isRef, markRaw, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useCSSModule, version, watch, watchEffect }; | ||
export { computed, createApp, customRef, defineComponent, getCurrentInstance, createElement as h, inject, isRaw, isReactive, isReadonly, isRef, markRaw, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated, provide, proxyRefs, reactive, ref, set, shallowReactive, shallowReadonly, shallowRef, toRaw, toRef, toRefs, triggerRef, unref, useCSSModule, version, watch, watchEffect }; |
@@ -7,4 +7,6 @@ (function (global, factory) { | ||
Vue = Vue && Object.prototype.hasOwnProperty.call(Vue, 'default') ? Vue['default'] : Vue; | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue); | ||
var toString = function (x) { return Object.prototype.toString.call(x); }; | ||
@@ -59,3 +61,3 @@ function isNative(Ctor) { | ||
function warn(msg, vm) { | ||
Vue.util.warn(msg, vm); | ||
Vue__default['default'].util.warn(msg, vm); | ||
} | ||
@@ -97,3 +99,3 @@ function logError(err, vm, info) { | ||
{ | ||
assert(vueConstructor, "No vue dependency found."); | ||
assert(constructor, "No vue dependency found."); | ||
} | ||
@@ -103,3 +105,4 @@ return constructor; | ||
function setVueConstructor(Vue) { | ||
if ( vueConstructor) { | ||
// @ts-ignore | ||
if ( vueConstructor && Vue.__proto__ !== vueConstructor.__proto__) { | ||
warn('Another instance of vue installed'); | ||
@@ -270,3 +273,2 @@ } | ||
var RefKey = 'composition-api.refKey'; | ||
var PropsReactive = '__props_reactive__'; | ||
@@ -310,5 +312,2 @@ var accessModifiedSet = new WeakMap(); | ||
} | ||
function isPropObject(obj) { | ||
return obj && typeof obj === 'object' && PropsReactive in obj; | ||
} | ||
function unref(ref) { | ||
@@ -318,3 +317,3 @@ return isRef(ref) ? ref.value : ref; | ||
function toRefs(obj) { | ||
if ( !isReactive(obj) && !isPropObject(obj)) { | ||
if ( !isReactive(obj)) { | ||
warn("toRefs() expects a reactive object but received a plain one."); | ||
@@ -498,4 +497,11 @@ } | ||
} | ||
// in SSR, there is no __ob__. Mock for reactivity check | ||
if (!hasOwn(observed, '__ob__')) { | ||
def(observed, '__ob__', {}); | ||
} | ||
return observed; | ||
} | ||
function createObserver() { | ||
return observe({}).__ob__ || {}; | ||
} | ||
function shallowReactive(obj) { | ||
@@ -507,3 +513,5 @@ var e_1, _a; | ||
} | ||
if (!isPlainObject(obj) || isRaw(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || | ||
isRaw(obj) || | ||
!Object.isExtensible(obj)) { | ||
return obj; | ||
@@ -534,7 +542,9 @@ } | ||
get: function getterHandler() { | ||
var _a; | ||
var value = getter ? getter.call(obj) : val; | ||
ob.dep.depend(); | ||
(_a = ob.dep) === null || _a === void 0 ? void 0 : _a.depend(); | ||
return value; | ||
}, | ||
set: function setterHandler(newVal) { | ||
var _a; | ||
if (getter && !setter) | ||
@@ -548,3 +558,3 @@ return; | ||
} | ||
ob.dep.notify(); | ||
(_a = ob.dep) === null || _a === void 0 ? void 0 : _a.notify(); | ||
}, | ||
@@ -578,3 +588,5 @@ }); | ||
} | ||
if (!isPlainObject(obj) || isRaw(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || | ||
isRaw(obj) || | ||
!Object.isExtensible(obj)) { | ||
return obj; | ||
@@ -588,3 +600,3 @@ } | ||
var e_2, _a; | ||
if (!isPlainObject(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) { | ||
return obj; | ||
@@ -647,7 +659,7 @@ } | ||
function markRaw(obj) { | ||
if (!isPlainObject(obj) || !Object.isExtensible(obj)) { | ||
if (!(isPlainObject(obj) || isArray(obj)) || !Object.isExtensible(obj)) { | ||
return obj; | ||
} | ||
// set the vue observable flag at obj | ||
var ob = observe({}).__ob__; | ||
var ob = createObserver(); | ||
ob.__raw__ = true; | ||
@@ -850,3 +862,3 @@ def(obj, '__ob__', ob); | ||
// We have to monkeypatch the teardown function so Vue will run | ||
// runCleanup() when it tears down the watcher on unmmount. | ||
// runCleanup() when it tears down the watcher on unmounted. | ||
function patchWatcherTeardown(watcher, runCleanup) { | ||
@@ -1388,3 +1400,3 @@ var _teardown = watcher.teardown; | ||
// fake reactive for `toRefs(props)` | ||
def(props, PropsReactive, true); | ||
def(props, '__ob__', createObserver()); | ||
// resolve scopedSlots and slots to functions | ||
@@ -1425,3 +1437,11 @@ resolveScopedSlots(vm, ctx.slots); | ||
} | ||
else if (hasReactiveArrayChild(bindingValue)) { | ||
// creates a custom reactive properties without make the object explicitly reactive | ||
// NOTE we should try to avoid this, better implementation needed | ||
customReactive(bindingValue); | ||
} | ||
} | ||
else if (isArray(bindingValue)) { | ||
bindingValue = ref(bindingValue); | ||
} | ||
} | ||
@@ -1438,2 +1458,36 @@ asVmProperty(vm, name, bindingValue); | ||
} | ||
function customReactive(target) { | ||
if (!isPlainObject(target) || | ||
isRef(target) || | ||
isReactive(target) || | ||
isRaw(target)) | ||
return; | ||
var Vue = getVueConstructor(); | ||
var defineReactive = Vue.util.defineReactive; | ||
Object.keys(target).forEach(function (k) { | ||
var val = target[k]; | ||
defineReactive(target, k, val); | ||
if (val) { | ||
customReactive(val); | ||
} | ||
return; | ||
}); | ||
} | ||
function hasReactiveArrayChild(target, visited) { | ||
if (visited === void 0) { visited = new Map(); } | ||
if (visited.has(target)) { | ||
return visited.get(target); | ||
} | ||
visited.set(target, false); | ||
if (Array.isArray(target) && isReactive(target)) { | ||
visited.set(target, true); | ||
return true; | ||
} | ||
if (!isPlainObject(target) || isRaw(target)) { | ||
return false; | ||
} | ||
return Object.keys(target).some(function (x) { | ||
return hasReactiveArrayChild(target[x], visited); | ||
}); | ||
} | ||
function createSetupContext(vm) { | ||
@@ -1556,3 +1610,3 @@ var ctx = { | ||
var version = "1.0.0-beta.14"; | ||
var version = "1.0.0-beta.15"; | ||
// auto install when using CDN | ||
@@ -1571,2 +1625,3 @@ if (typeof window !== 'undefined' && window.Vue) { | ||
exports.inject = inject; | ||
exports.isRaw = isRaw; | ||
exports.isReactive = isReactive; | ||
@@ -1573,0 +1628,0 @@ exports.isReadonly = isReadonly; |
@@ -1,2 +0,2 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).VueCompositionAPI={},e.Vue)}(this,(function(e,n){"use strict";n=n&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n;function t(e){return"function"==typeof e&&/native code/.test(e.toString())}var r="undefined"!=typeof Symbol&&t(Symbol)&&"undefined"!=typeof Reflect&&t(Reflect.ownKeys),o=function(e){return e},i={enumerable:!0,configurable:!0,get:o,set:o};function u(e,n,t){var r=t.get,u=t.set;i.get=r||o,i.set=u||o,Object.defineProperty(e,n,i)}function a(e,n,t,r){Object.defineProperty(e,n,{value:t,enumerable:!!r,writable:!0,configurable:!0})}function f(e,n){return Object.hasOwnProperty.call(e,n)}function c(e){return"[object Object]"===function(e){return Object.prototype.toString.call(e)}(e)}function l(e){return"function"==typeof e}function s(e,t){n.util.warn(e,t)}var v=void 0;try{v=require("vue")}catch(e){}var d,p=null,y=null;function _(){return p}function b(){return y}function h(e){y=e}function g(e){return b()}function m(e,n){void 0===n&&(n={});var t=e.config.silent;e.config.silent=!0;var r=new e(n);return e.config.silent=t,r}function w(e,n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.$scopedSlots[n]?e.$scopedSlots[n].apply(e,t):s("slots."+n+'() got called outside of the "render()" scope',e)}}var O=function(){return(O=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)}; | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).VueCompositionAPI={},e.Vue)}(this,(function(e,n){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(n);function o(e){return"function"==typeof e&&/native code/.test(e.toString())}var i="undefined"!=typeof Symbol&&o(Symbol)&&"undefined"!=typeof Reflect&&o(Reflect.ownKeys),u=function(e){return e},a={enumerable:!0,configurable:!0,get:u,set:u};function f(e,n,t){var r=t.get,o=t.set;a.get=r||u,a.set=o||u,Object.defineProperty(e,n,a)}function c(e,n,t,r){Object.defineProperty(e,n,{value:t,enumerable:!!r,writable:!0,configurable:!0})}function l(e,n){return Object.hasOwnProperty.call(e,n)}function s(e){return Array.isArray(e)}function v(e){return"[object Object]"===function(e){return Object.prototype.toString.call(e)}(e)}function d(e){return"function"==typeof e}function p(e,n){r.default.util.warn(e,n)}var y=void 0;try{y=require("vue")}catch(e){}var _,b=null,h=null,g="__composition_api_installed__";function m(){return b}function w(){return h}function j(e){h=e}function O(e){return w()}function $(e,n){void 0===n&&(n={});var t=e.config.silent;e.config.silent=!0;var r=new e(n);return e.config.silent=t,r}function k(e,n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.$scopedSlots[n]?e.$scopedSlots[n].apply(e,t):p("slots."+n+'() got called outside of the "render()" scope',e)}}var x=function(){return(x=Object.assign||function(e){for(var n,t=1,r=arguments.length;t<r;t++)for(var o in n=arguments[t])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)}; | ||
/*! ***************************************************************************** | ||
@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation. | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */function j(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function $(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),u=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return u}function x(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat($(arguments[n]));return e}function k(e){return r?Symbol.for(e):e}var S=k("composition-api.preFlushQueue"),R=k("composition-api.postFlushQueue"),P="composition-api.refKey",E=new WeakMap,A=new WeakMap,C=new WeakMap,M=function(e){u(this,"value",{get:e.get,set:e.set})};function D(e,n){var t=new M(e),r=Object.seal(t);return C.set(r,!0),r}function B(e){var n;if(U(e))return e;var t=J(((n={})[P]=e,n));return D({get:function(){return t[P]},set:function(e){return t[P]=e}})}function U(e){return e instanceof M}function T(e){return U(e)?e.value:e}function V(e){if(!c(e))return e;var n={};for(var t in e)n[t]=W(e,t);return n}function W(e,n){var t=e[n];return U(t)?t:D({get:function(){return e[n]},set:function(t){return e[n]=t}})}function z(e){var n;return Boolean((null==e?void 0:e.__ob__)&&(null===(n=e.__ob__)||void 0===n?void 0:n.__raw__))}function F(e){var n;return Boolean((null==e?void 0:e.__ob__)&&!(null===(n=e.__ob__)||void 0===n?void 0:n.__raw__))}function I(e){if(!(!c(e)||z(e)||Array.isArray(e)||U(e)||function(e){var n=_();return n&&e instanceof n}(e)||E.has(e))){E.set(e,!0);for(var n=Object.keys(e),t=0;t<n.length;t++)K(e,n[t])}}function K(e,n,t){if("__ob__"!==n&&!z(e[n])){var r,o,i=Object.getOwnPropertyDescriptor(e,n);if(i){if(!1===i.configurable)return;r=i.get,o=i.set,r&&!o||2!==arguments.length||(t=e[n])}I(t),Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:function(){var o=r?r.call(e):t;return n!==P&&U(o)?o.value:o},set:function(i){if(!r||o){var u=r?r.call(e):t;n!==P&&U(u)&&!U(i)?u.value=i:o?o.call(e,i):t=i,I(i)}}})}}function q(e){var n,t=p||v;t.observable?n=t.observable(e):n=m(t,{data:{$$state:e}})._data.$$state;return n}function Q(e){var n,t;if(!c(e)||z(e)||!Object.isExtensible(e))return e;var r=q({});I(r);var o=r.__ob__,i=function(n){var t,i,a=e[n],f=Object.getOwnPropertyDescriptor(e,n);if(f){if(!1===f.configurable)return"continue";t=f.get,i=f.set,t&&!i||2!==u.length||(a=e[n])}Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:function(){var n=t?t.call(e):a;return o.dep.depend(),n},set:function(n){t&&!i||(i?i.call(e,n):a=n,o.dep.notify())}})},u=arguments;try{for(var a=j(Object.keys(e)),f=a.next();!f.done;f=a.next()){var l=f.value;i(l)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return r}function J(e){if(!c(e)||z(e)||!Object.isExtensible(e))return e;var n=q(e);return I(n),n}function N(e){return function(n){var t,r=g(((t=e)[0].toUpperCase(),t.slice(1)));r&&function(e,n,t,r){var o=n.$options,i=e.config.optionMergeStrategies[t];o[t]=i(o[t],function(e,n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=b();h(e);try{return n.apply(void 0,x(t))}finally{h(o)}}}(n,r))}(_(),r,e,n)}}var G,H=N("beforeMount"),L=N("mounted"),X=N("beforeUpdate"),Y=N("updated"),Z=N("beforeDestroy"),ee=N("destroyed"),ne=N("errorCaptured"),te=N("activated"),re=N("deactivated"),oe=N("serverPrefetch");function ie(){fe(this,S)}function ue(){fe(this,R)}function ae(){var e=b();return e?function(e){return void 0!==e[S]}(e)||function(e){e[S]=[],e[R]=[],e.$on("hook:beforeUpdate",ie),e.$on("hook:updated",ue)}(e):(G||(G=m(_())),e=G),e}function fe(e,n){for(var t=e[n],r=0;r<t.length;r++)t[r]();t.length=0}function ce(e,n,t){var r=function(){e.$nextTick((function(){e[S].length&&fe(e,S),e[R].length&&fe(e,R)}))};switch(t){case"pre":r(),e[S].push(n);break;case"post":r(),e[R].push(n);break;default:!function(e,n){if(!e)throw new Error("[vue-composition-api] "+n)}(!1,'flush must be one of ["post", "pre", "sync"], but got '+t)}}function le(e,n){var t=e.teardown;e.teardown=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];t.apply(e,r),n()}}function se(e,n,t,r){var i,u,a=r.flush,f="sync"===a,c=function(e){u=function(){try{e()}catch(e){!function(e,n,t){if("undefined"==typeof window||"undefined"==typeof console)throw e;console.error(e)}(e)}}},v=function(){u&&(u(),u=null)},d=function(n){return f||e===G?n:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return ce(e,(function(){n.apply(void 0,x(t))}),a)}};if(null===t){var p=!1,y=function(e,n,t,r){var o=e._watchers.length;return e.$watch(n,t,{immediate:r.immediateInvokeCallback,deep:r.deep,lazy:r.noRun,sync:r.sync,before:r.before}),e._watchers[o]}(e,(function(){if(!p)try{p=!0,n(c)}finally{p=!1}}),o,{deep:r.deep||!1,sync:f,before:v});le(y,v),y.lazy=!1;var _=y.get.bind(y);return y.get=d(_),function(){y.teardown()}}var b,h=r.deep;Array.isArray(n)?b=function(){return n.map((function(e){return U(e)?e.value:e()}))}:U(n)?b=function(){return n.value}:F(n)?(b=function(){return n},h=!0):l(n)?b=n:(b=o,s("Invalid watch source: "+JSON.stringify(n)+".\n A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.",e));var g=function(e,n){v(),t(e,n,c)},m=d(g);if(r.immediate){var w=m,O=function(e,n){O=w,g(e,n)};m=function(e,n){O(e,n)}}var j=e.$watch(b,m,{immediate:r.immediate,deep:h,sync:f}),$=e._watchers[e._watchers.length-1];return F($.value)&&(null===(i=$.value.__ob__)||void 0===i?void 0:i.dep)&&h&&$.value.__ob__.dep.addSub({update:function(){$.run()}}),le($,v),function(){j()}}var ve={};var de={};var pe;var ye={set:function(e,n,t){(e.__composition_api_state__=e.__composition_api_state__||{})[n]=t},get:function(e,n){return(e.__composition_api_state__||{})[n]}};function _e(e){var n=ye.get(e,"rawBindings")||{};if(n&&Object.keys(n).length){for(var t=e.$refs,r=ye.get(e,"refs")||[],o=0;o<r.length;o++){var i=n[f=r[o]];!t[f]&&i&&U(i)&&(i.value=null)}var u=Object.keys(t),a=[];for(o=0;o<u.length;o++){var f;i=n[f=u[o]];t[f]&&i&&U(i)&&(i.value=t[f],a.push(f))}ye.set(e,"refs",a)}}function be(e,n){var t=e.$options._parentVnode;if(t){for(var r=ye.get(e,"slots")||[],o=function(e,n){var t;if(e){if(e._normalized)return e._normalized;for(var r in t={},e)e[r]&&"$"!==r[0]&&(t[r]=!0)}else t={};for(var r in n)r in t||(t[r]=!0);return t}(t.data.scopedSlots,e.$slots),i=0;i<r.length;i++){o[a=r[i]]||delete n[a]}var u=Object.keys(o);for(i=0;i<u.length;i++){var a;n[a=u[i]]||(n[a]=w(e,a))}ye.set(e,"slots",u)}}function he(e,n,t){var r=b();h(e);try{return n(e)}catch(e){if(!t)throw e;t(e)}finally{h(r)}}function ge(e){e.mixin({beforeCreate:function(){var e=this,n=e.$options,t=n.setup,r=n.render;r&&(n.render=function(){for(var n=this,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return he(e,(function(){return r.apply(n,t)}))});if(!t)return;if("function"!=typeof t)return;var o=n.data;n.data=function(){return function(e,n){void 0===n&&(n={});var t,r=e.$options.setup,o=function(e){var n={slots:{}},t=["emit"];return["root","parent","refs","attrs","listeners","isServer","ssrContext"].forEach((function(t){var r,o,i;Array.isArray(t)?(r=$(t,2),o=r[0],i=r[1]):o=i=t,i="$"+i,u(n,o,{get:function(){return e[i]},set:function(){s("Cannot assign to '"+o+"' because it is a read-only property",e)}})})),t.forEach((function(t){var r="$"+t;u(n,t,{get:function(){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];e[r].apply(e,n)}}})})),n}(e);if(a(n,"__props_reactive__",!0),be(e,o.slots),he(e,(function(){t=r(n,o)})),!t)return;if(l(t)){var i=t;return void(e.$options.render=function(){return be(e,o.slots),he(e,(function(){return i()}))})}if(c(t)){F(t)&&(t=V(t)),ye.set(e,"rawBindings",t);var v=t;Object.keys(v).forEach((function(n){var t,r=v[n];U(r)||F(r)||(l(r)?r=r.bind(e):(null===(t=r)||"object"!=typeof t)&&(r=B(r))),function(e,n,t){var r=e.$options.props;n in e||r&&f(r,n)||(U(t)?u(e,n,{get:function(){return t.value},set:function(e){t.value=e}}):e[n]=t)}(e,n,r)}))}}(e,e.$props),"function"==typeof o?o.call(e,e):o||{}}},mounted:function(){_e(this)},updated:function(){_e(this)}})}function me(e){(function(e){return f(e,"__composition_api_installed__")})(e)||(e.config.optionMergeStrategies.setup=function(e,n){return function(t,o){return function e(n,t){if(!n)return t;if(!t)return n;for(var o,i,u,a=r?Reflect.ownKeys(n):Object.keys(n),l=0;l<a.length;l++)"__ob__"!==(o=a[l])&&(i=t[o],u=n[o],f(t,o)?i!==u&&c(i)&&!U(i)&&c(u)&&!U(u)&&e(u,i):t[o]=u);return t}("function"==typeof e?e(t,o)||{}:void 0,"function"==typeof n?n(t,o)||{}:void 0)}},function(e){p=e,Object.defineProperty(e,"__composition_api_installed__",{configurable:!0,writable:!0,value:!0})}(e),ge(e))}var we={install:function(e){return me(e)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(we),e.computed=function(e){var n,t,r,i,u=b();if("function"==typeof e?n=e:(n=e.get,t=e.set),u&&!u.$isServer){var a,f=function(){if(!d){var e=m(_(),{computed:{value:function(){return 0}}}),n=e._computedWatchers.value.constructor,t=e._data.__ob__.dep.constructor;d={Watcher:n,Dep:t},e.$destroy()}return d}(),c=f.Watcher,l=f.Dep;i=function(){return a||(a=new c(u,n,o,{lazy:!0})),a.dirty&&a.evaluate(),l.target&&a.depend(),a.value},r=function(e){t&&t(e)}}else{var s=m(_(),{computed:{$$state:{get:n,set:t}}});u&&u.$on("hook:destroyed",(function(){return s.$destroy()})),i=function(){return s.$$state},r=function(e){s.$$state=e}}return D({get:i,set:r})},e.createApp=function(e,n){void 0===n&&(n=void 0);var t=_(),r=void 0;return{config:t.config,use:t.use.bind(t),mixin:t.mixin.bind(t),component:t.component.bind(t),directive:t.directive.bind(t),mount:function(o,i){return r||((r=new t(O({propsData:n},e))).$mount(o,i),r)},unmount:function(){r&&(r.$destroy(),r=void 0)}}},e.customRef=function(e){var n=B(0);return D(e((function(){n.value}),(function(){++n.value})))},e.default=we,e.defineComponent=function(e){return e},e.getCurrentInstance=b,e.h=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=b();return t?t.$createElement.apply(t,e):(s("`createElement()` has been called outside of render function."),pe||(pe=m(_()).$createElement),pe.apply(pe,e))},e.inject=function(e,n,t){if(void 0===t&&(t=!1),!e)return n;var r=b();if(r){var o=function(e,n){for(var t=n;t;){if(t._provided&&f(t._provided,e))return t._provided[e];t=t.$parent}return ve}(e,r);return o!==ve?o:t&&l(n)?n():n}s("inject() can only be used inside setup() or functional components.")},e.isReactive=F,e.isReadonly=function(e){return C.has(e)},e.isRef=U,e.markRaw=function(e){if(!c(e)||!Object.isExtensible(e))return e;var n=q({}).__ob__;return n.__raw__=!0,a(e,"__ob__",n),A.set(e,!0),e},e.nextTick=function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return null===(e=_())||void 0===e?void 0:e.nextTick.apply(this,n)},e.onActivated=te,e.onBeforeMount=H,e.onBeforeUnmount=Z,e.onBeforeUpdate=X,e.onDeactivated=re,e.onErrorCaptured=ne,e.onMounted=L,e.onServerPrefetch=oe,e.onUnmounted=ee,e.onUpdated=Y,e.provide=function(e,n){var t=g();if(t){if(!t._provided){var r={};Object.defineProperty(t,"_provided",{get:function(){return r},set:function(e){return Object.assign(r,e)}})}t._provided[e]=n}},e.proxyRefs=function(e){var n,t,r;if(F(e))return e;var o=J(((n={})[P]=e,n)),i=function(e){u(o,e,{get:function(){return U(o[e])?o[e].value:o[e]},set:function(n){if(U(o[e]))return o[e].value=T(n);o[e]=T(n)}})};try{for(var a=j(Object.keys(e)),f=a.next();!f.done;f=a.next()){i(f.value)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}return o},e.reactive=J,e.ref=B,e.set=function(e,n,t){var r,o=_().util,i=(o.warn,o.defineReactive);if(r=e,Array.isArray(r)&&function(e){var n=parseFloat(String(e));return n>=0&&Math.floor(n)===n&&isFinite(e)}(n))return e.length=Math.max(e.length,n),e.splice(n,1,t),t;if(n in e&&!(n in Object.prototype))return e[n]=t,t;var u=e.__ob__;return e._isVue||u&&u.vmCount?t:u?(i(u.value,n,t),K(e,n,t),u.dep.notify(),t):(e[n]=t,t)},e.shallowReactive=Q,e.shallowReadonly=function(e){var n,t;if(!c(e)||!Object.isExtensible(e))return e;var r={},o=J({}),i=o.__ob__,u=function(n){var t,o=e[n],u=void 0,f=Object.getOwnPropertyDescriptor(e,n);if(f){if(!1===f.configurable)return"continue";t=f.get,u=f.set,t&&!u||2!==a.length||(o=e[n])}Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:function(){var n=t?t.call(e):o;return i.dep.depend(),n},set:function(e){}})},a=arguments;try{for(var f=j(Object.keys(e)),l=f.next();!l.done;l=f.next()){var s=l.value;u(s)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(t=f.return)&&t.call(f)}finally{if(n)throw n.error}}return C.set(r,!0),r},e.shallowRef=function(e){var n;if(U(e))return e;var t=Q(((n={})[P]=e,n));return D({get:function(){return t[P]},set:function(e){return t[P]=e}})},e.toRaw=function(e){var n,t;return z(e)||!Object.isExtensible(e)?e:(null===(t=null===(n=e)||void 0===n?void 0:n.__ob__)||void 0===t?void 0:t.value)||e},e.toRef=W,e.toRefs=V,e.triggerRef=function(e){U(e)&&(e.value=e.value)},e.unref=T,e.useCSSModule=function(e){void 0===e&&(e="$style");var n=b();if(!n)return de;var t=n[e];return t||de},e.version="1.0.0-beta.14",e.watch=function(e,n,t){var r=null;"function"==typeof n?r=n:(t=n,r=null);var o=function(e){return O({immediate:!1,deep:!1,flush:"post"},e)}(t);return se(ae(),e,r,o)},e.watchEffect=function(e,n){var t=function(e){return O({immediate:!0,deep:!1,flush:"post"},e)}(n);return se(ae(),e,null,t)},Object.defineProperty(e,"__esModule",{value:!0})})); | ||
***************************************************************************** */function S(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var r,o,i=t.call(e),u=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(t=i.return)&&t.call(i)}finally{if(o)throw o.error}}return u}function E(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(R(arguments[n]));return e}function P(e){return i?Symbol.for(e):e}var A=P("composition-api.preFlushQueue"),M=P("composition-api.postFlushQueue"),C="composition-api.refKey",D=new WeakMap,B=new WeakMap,U=new WeakMap,T=function(e){f(this,"value",{get:e.get,set:e.set})};function V(e,n){var t=new T(e),r=Object.seal(t);return U.set(r,!0),r}function W(e){var n;if(z(e))return e;var t=X(((n={})[C]=e,n));return V({get:function(){return t[C]},set:function(e){return t[C]=e}})}function z(e){return e instanceof T}function F(e){return z(e)?e.value:e}function I(e){if(!v(e))return e;var n={};for(var t in e)n[t]=K(e,t);return n}function K(e,n){var t=e[n];return z(t)?t:V({get:function(){return e[n]},set:function(t){return e[n]=t}})}function q(e){var n;return Boolean((null==e?void 0:e.__ob__)&&(null===(n=e.__ob__)||void 0===n?void 0:n.__raw__))}function Q(e){var n;return Boolean((null==e?void 0:e.__ob__)&&!(null===(n=e.__ob__)||void 0===n?void 0:n.__raw__))}function J(e){if(!(!v(e)||q(e)||Array.isArray(e)||z(e)||function(e){var n=m();return n&&e instanceof n}(e)||D.has(e))){D.set(e,!0);for(var n=Object.keys(e),t=0;t<n.length;t++)N(e,n[t])}}function N(e,n,t){if("__ob__"!==n&&!q(e[n])){var r,o,i=Object.getOwnPropertyDescriptor(e,n);if(i){if(!1===i.configurable)return;r=i.get,o=i.set,r&&!o||2!==arguments.length||(t=e[n])}J(t),Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:function(){var o=r?r.call(e):t;return n!==C&&z(o)?o.value:o},set:function(i){if(!r||o){var u=r?r.call(e):t;n!==C&&z(u)&&!z(i)?u.value=i:o?o.call(e,i):t=i,J(i)}}})}}function G(e){var n,t=b||y;t.observable?n=t.observable(e):n=$(t,{data:{$$state:e}})._data.$$state;return l(n,"__ob__")||c(n,"__ob__",{}),n}function H(){return G({}).__ob__||{}}function L(e){var n,t;if(!v(e)&&!s(e)||q(e)||!Object.isExtensible(e))return e;var r=G({});J(r);var o=r.__ob__,i=function(n){var t,i,a=e[n],f=Object.getOwnPropertyDescriptor(e,n);if(f){if(!1===f.configurable)return"continue";t=f.get,i=f.set,t&&!i||2!==u.length||(a=e[n])}Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:function(){var n,r=t?t.call(e):a;return null===(n=o.dep)||void 0===n||n.depend(),r},set:function(n){var r;t&&!i||(i?i.call(e,n):a=n,null===(r=o.dep)||void 0===r||r.notify())}})},u=arguments;try{for(var a=S(Object.keys(e)),f=a.next();!f.done;f=a.next()){var c=f.value;i(c)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(t=a.return)&&t.call(a)}finally{if(n)throw n.error}}return r}function X(e){if(!v(e)&&!s(e)||q(e)||!Object.isExtensible(e))return e;var n=G(e);return J(n),n}function Y(e){return function(n){var t,r=O(((t=e)[0].toUpperCase(),t.slice(1)));r&&function(e,n,t,r){var o=n.$options,i=e.config.optionMergeStrategies[t];o[t]=i(o[t],function(e,n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var o=w();j(e);try{return n.apply(void 0,E(t))}finally{j(o)}}}(n,r))}(m(),r,e,n)}}var Z,ee=Y("beforeMount"),ne=Y("mounted"),te=Y("beforeUpdate"),re=Y("updated"),oe=Y("beforeDestroy"),ie=Y("destroyed"),ue=Y("errorCaptured"),ae=Y("activated"),fe=Y("deactivated"),ce=Y("serverPrefetch");function le(){de(this,A)}function se(){de(this,M)}function ve(){var e=w();return e?function(e){return void 0!==e[A]}(e)||function(e){e[A]=[],e[M]=[],e.$on("hook:beforeUpdate",le),e.$on("hook:updated",se)}(e):(Z||(Z=$(m())),e=Z),e}function de(e,n){for(var t=e[n],r=0;r<t.length;r++)t[r]();t.length=0}function pe(e,n,t){var r=function(){e.$nextTick((function(){e[A].length&&de(e,A),e[M].length&&de(e,M)}))};switch(t){case"pre":r(),e[A].push(n);break;case"post":r(),e[M].push(n);break;default:!function(e,n){if(!e)throw new Error("[vue-composition-api] "+n)}(!1,'flush must be one of ["post", "pre", "sync"], but got '+t)}}function ye(e,n){var t=e.teardown;e.teardown=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];t.apply(e,r),n()}}function _e(e,n,t,r){var o,i,a=r.flush,f="sync"===a,c=function(e){i=function(){try{e()}catch(e){!function(e,n,t){if("undefined"==typeof window||"undefined"==typeof console)throw e;console.error(e)}(e)}}},l=function(){i&&(i(),i=null)},s=function(n){return f||e===Z?n:function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return pe(e,(function(){n.apply(void 0,E(t))}),a)}};if(null===t){var v=!1,y=function(e,n,t,r){var o=e._watchers.length;return e.$watch(n,t,{immediate:r.immediateInvokeCallback,deep:r.deep,lazy:r.noRun,sync:r.sync,before:r.before}),e._watchers[o]}(e,(function(){if(!v)try{v=!0,n(c)}finally{v=!1}}),u,{deep:r.deep||!1,sync:f,before:l});ye(y,l),y.lazy=!1;var _=y.get.bind(y);return y.get=s(_),function(){y.teardown()}}var b,h=r.deep;Array.isArray(n)?b=function(){return n.map((function(e){return z(e)?e.value:e()}))}:z(n)?b=function(){return n.value}:Q(n)?(b=function(){return n},h=!0):d(n)?b=n:(b=u,p("Invalid watch source: "+JSON.stringify(n)+".\n A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.",e));var g=function(e,n){l(),t(e,n,c)},m=s(g);if(r.immediate){var w=m,j=function(e,n){j=w,g(e,n)};m=function(e,n){j(e,n)}}var O=e.$watch(b,m,{immediate:r.immediate,deep:h,sync:f}),$=e._watchers[e._watchers.length-1];return Q($.value)&&(null===(o=$.value.__ob__)||void 0===o?void 0:o.dep)&&h&&$.value.__ob__.dep.addSub({update:function(){$.run()}}),ye($,l),function(){O()}}var be={};var he={};var ge;var me={set:function(e,n,t){(e.__composition_api_state__=e.__composition_api_state__||{})[n]=t},get:function(e,n){return(e.__composition_api_state__||{})[n]}};function we(e){var n=me.get(e,"rawBindings")||{};if(n&&Object.keys(n).length){for(var t=e.$refs,r=me.get(e,"refs")||[],o=0;o<r.length;o++){var i=n[f=r[o]];!t[f]&&i&&z(i)&&(i.value=null)}var u=Object.keys(t),a=[];for(o=0;o<u.length;o++){var f;i=n[f=u[o]];t[f]&&i&&z(i)&&(i.value=t[f],a.push(f))}me.set(e,"refs",a)}}function je(e,n){var t=e.$options._parentVnode;if(t){for(var r=me.get(e,"slots")||[],o=function(e,n){var t;if(e){if(e._normalized)return e._normalized;for(var r in t={},e)e[r]&&"$"!==r[0]&&(t[r]=!0)}else t={};for(var r in n)r in t||(t[r]=!0);return t}(t.data.scopedSlots,e.$slots),i=0;i<r.length;i++){o[a=r[i]]||delete n[a]}var u=Object.keys(o);for(i=0;i<u.length;i++){var a;n[a=u[i]]||(n[a]=k(e,a))}me.set(e,"slots",u)}}function Oe(e,n,t){var r=w();j(e);try{return n(e)}catch(e){if(!t)throw e;t(e)}finally{j(r)}}function $e(e){function n(e){if(v(e)&&!z(e)&&!Q(e)&&!q(e)){var t=m().util.defineReactive;Object.keys(e).forEach((function(r){var o=e[r];t(e,r,o),o&&n(o)}))}}function t(e,n){return void 0===n&&(n=new Map),n.has(e)?n.get(e):(n.set(e,!1),Array.isArray(e)&&Q(e)?(n.set(e,!0),!0):!(!v(e)||q(e))&&Object.keys(e).some((function(r){return t(e[r],n)})))}e.mixin({beforeCreate:function(){var e=this,r=e.$options,o=r.setup,i=r.render;i&&(r.render=function(){for(var n=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return Oe(e,(function(){return i.apply(n,t)}))});if(!o)return;if("function"!=typeof o)return;var u=r.data;r.data=function(){return function(e,r){void 0===r&&(r={});var o,i=e.$options.setup,u=function(e){var n={slots:{}},t=["emit"];return["root","parent","refs","attrs","listeners","isServer","ssrContext"].forEach((function(t){var r,o,i;Array.isArray(t)?(r=R(t,2),o=r[0],i=r[1]):o=i=t,i="$"+i,f(n,o,{get:function(){return e[i]},set:function(){p("Cannot assign to '"+o+"' because it is a read-only property",e)}})})),t.forEach((function(t){var r="$"+t;f(n,t,{get:function(){return function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];e[r].apply(e,n)}}})})),n}(e);if(c(r,"__ob__",H()),je(e,u.slots),Oe(e,(function(){o=i(r,u)})),!o)return;if(d(o)){var a=o;return void(e.$options.render=function(){return je(e,u.slots),Oe(e,(function(){return a()}))})}if(v(o)){Q(o)&&(o=I(o)),me.set(e,"rawBindings",o);var y=o;Object.keys(y).forEach((function(r){var o,i=y[r];z(i)||(Q(i)?s(i)&&(i=W(i)):d(i)?i=i.bind(e):null===(o=i)||"object"!=typeof o?i=W(i):t(i)&&n(i)),function(e,n,t){var r=e.$options.props;n in e||r&&l(r,n)||(z(t)?f(e,n,{get:function(){return t.value},set:function(e){t.value=e}}):e[n]=t)}(e,r,i)}))}}(e,e.$props),"function"==typeof u?u.call(e,e):u||{}}},mounted:function(){we(this)},updated:function(){we(this)}})}function ke(e,n){if(!e)return n;if(!n)return e;for(var t,r,o,u=i?Reflect.ownKeys(e):Object.keys(e),a=0;a<u.length;a++)"__ob__"!==(t=u[a])&&(r=n[t],o=e[t],l(n,t)?r!==o&&v(r)&&!z(r)&&v(o)&&!z(o)&&ke(o,r):n[t]=o);return n}function xe(e){(function(e){return l(e,g)})(e)||(e.config.optionMergeStrategies.setup=function(e,n){return function(t,r){return ke("function"==typeof e?e(t,r)||{}:void 0,"function"==typeof n?n(t,r)||{}:void 0)}},function(e){b=e,Object.defineProperty(e,g,{configurable:!0,writable:!0,value:!0})}(e),$e(e))}var Se={install:function(e){return xe(e)}};"undefined"!=typeof window&&window.Vue&&window.Vue.use(Se),e.computed=function(e){var n,t,r,o,i=w();if("function"==typeof e?n=e:(n=e.get,t=e.set),i&&!i.$isServer){var a,f=function(){if(!_){var e=$(m(),{computed:{value:function(){return 0}}}),n=e._computedWatchers.value.constructor,t=e._data.__ob__.dep.constructor;_={Watcher:n,Dep:t},e.$destroy()}return _}(),c=f.Watcher,l=f.Dep;o=function(){return a||(a=new c(i,n,u,{lazy:!0})),a.dirty&&a.evaluate(),l.target&&a.depend(),a.value},r=function(e){t&&t(e)}}else{var s=$(m(),{computed:{$$state:{get:n,set:t}}});i&&i.$on("hook:destroyed",(function(){return s.$destroy()})),o=function(){return s.$$state},r=function(e){s.$$state=e}}return V({get:o,set:r})},e.createApp=function(e,n){void 0===n&&(n=void 0);var t=m(),r=void 0;return{config:t.config,use:t.use.bind(t),mixin:t.mixin.bind(t),component:t.component.bind(t),directive:t.directive.bind(t),mount:function(o,i){return r||((r=new t(x({propsData:n},e))).$mount(o,i),r)},unmount:function(){r&&(r.$destroy(),r=void 0)}}},e.customRef=function(e){var n=W(0);return V(e((function(){n.value}),(function(){++n.value})))},e.default=Se,e.defineComponent=function(e){return e},e.getCurrentInstance=w,e.h=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var t=w();return t?t.$createElement.apply(t,e):(p("`createElement()` has been called outside of render function."),ge||(ge=$(m()).$createElement),ge.apply(ge,e))},e.inject=function(e,n,t){if(void 0===t&&(t=!1),!e)return n;var r=w();if(r){var o=function(e,n){for(var t=n;t;){if(t._provided&&l(t._provided,e))return t._provided[e];t=t.$parent}return be}(e,r);return o!==be?o:t&&d(n)?n():n}p("inject() can only be used inside setup() or functional components.")},e.isRaw=q,e.isReactive=Q,e.isReadonly=function(e){return U.has(e)},e.isRef=z,e.markRaw=function(e){if(!v(e)&&!s(e)||!Object.isExtensible(e))return e;var n=H();return n.__raw__=!0,c(e,"__ob__",n),B.set(e,!0),e},e.nextTick=function(){for(var e,n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];return null===(e=m())||void 0===e?void 0:e.nextTick.apply(this,n)},e.onActivated=ae,e.onBeforeMount=ee,e.onBeforeUnmount=oe,e.onBeforeUpdate=te,e.onDeactivated=fe,e.onErrorCaptured=ue,e.onMounted=ne,e.onServerPrefetch=ce,e.onUnmounted=ie,e.onUpdated=re,e.provide=function(e,n){var t=O();if(t){if(!t._provided){var r={};Object.defineProperty(t,"_provided",{get:function(){return r},set:function(e){return Object.assign(r,e)}})}t._provided[e]=n}},e.proxyRefs=function(e){var n,t,r;if(Q(e))return e;var o=X(((n={})[C]=e,n)),i=function(e){f(o,e,{get:function(){return z(o[e])?o[e].value:o[e]},set:function(n){if(z(o[e]))return o[e].value=F(n);o[e]=F(n)}})};try{for(var u=S(Object.keys(e)),a=u.next();!a.done;a=u.next()){i(a.value)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}return o},e.reactive=X,e.ref=W,e.set=function(e,n,t){var r=m().util,o=(r.warn,r.defineReactive);if(s(e)&&function(e){var n=parseFloat(String(e));return n>=0&&Math.floor(n)===n&&isFinite(e)}(n))return e.length=Math.max(e.length,n),e.splice(n,1,t),t;if(n in e&&!(n in Object.prototype))return e[n]=t,t;var i=e.__ob__;return e._isVue||i&&i.vmCount?t:i?(o(i.value,n,t),N(e,n,t),i.dep.notify(),t):(e[n]=t,t)},e.shallowReactive=L,e.shallowReadonly=function(e){var n,t;if(!v(e)&&!s(e)||!Object.isExtensible(e))return e;var r={},o=X({}),i=o.__ob__,u=function(n){var t,o=e[n],u=void 0,f=Object.getOwnPropertyDescriptor(e,n);if(f){if(!1===f.configurable)return"continue";t=f.get,u=f.set,t&&!u||2!==a.length||(o=e[n])}Object.defineProperty(r,n,{enumerable:!0,configurable:!0,get:function(){var n=t?t.call(e):o;return i.dep.depend(),n},set:function(e){}})},a=arguments;try{for(var f=S(Object.keys(e)),c=f.next();!c.done;c=f.next()){var l=c.value;u(l)}}catch(e){n={error:e}}finally{try{c&&!c.done&&(t=f.return)&&t.call(f)}finally{if(n)throw n.error}}return U.set(r,!0),r},e.shallowRef=function(e){var n;if(z(e))return e;var t=L(((n={})[C]=e,n));return V({get:function(){return t[C]},set:function(e){return t[C]=e}})},e.toRaw=function(e){var n,t;return q(e)||!Object.isExtensible(e)?e:(null===(t=null===(n=e)||void 0===n?void 0:n.__ob__)||void 0===t?void 0:t.value)||e},e.toRef=K,e.toRefs=I,e.triggerRef=function(e){z(e)&&(e.value=e.value)},e.unref=F,e.useCSSModule=function(e){void 0===e&&(e="$style");var n=w();if(!n)return he;var t=n[e];return t||he},e.version="1.0.0-beta.15",e.watch=function(e,n,t){var r=null;"function"==typeof n?r=n:(t=n,r=null);var o=function(e){return x({immediate:!1,deep:!1,flush:"post"},e)}(t);return _e(ve(),e,r,o)},e.watchEffect=function(e,n){var t=function(e){return x({immediate:!0,deep:!1,flush:"post"},e)}(n);return _e(ve(),e,null,t)},Object.defineProperty(e,"__esModule",{value:!0})})); |
{ | ||
"name": "@vue/composition-api", | ||
"version": "1.0.0-beta.14", | ||
"version": "1.0.0-beta.15", | ||
"description": "Provide logic composition capabilities for Vue.", | ||
@@ -47,24 +47,24 @@ "keywords": [ | ||
"devDependencies": { | ||
"@rollup/plugin-node-resolve": "8.4.0", | ||
"@rollup/plugin-node-resolve": "^9.0.0", | ||
"@rollup/plugin-replace": "^2.3.3", | ||
"@types/jest": "^26.0.9", | ||
"@types/node": "^14.0.27", | ||
"@types/jest": "^26.0.13", | ||
"@types/node": "^14.10.1", | ||
"concurrently": "^5.3.0", | ||
"conventional-changelog-cli": "^2.0.35", | ||
"conventional-changelog-cli": "^2.1.0", | ||
"conventional-github-releaser": "^3.1.5", | ||
"cross-env": "^7.0.2", | ||
"husky": "^4.2.5", | ||
"jest": "^26.3.0", | ||
"lint-staged": "^10.2.11", | ||
"prettier": "^2.0.5", | ||
"husky": "^4.3.0", | ||
"jest": "^26.4.2", | ||
"lint-staged": "^10.3.0", | ||
"prettier": "^2.1.1", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.23.1", | ||
"rollup-plugin-dts": "^1.4.10", | ||
"rollup-plugin-terser": "^7.0.0", | ||
"rollup": "^2.26.11", | ||
"rollup-plugin-dts": "^1.4.13", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.27.2", | ||
"ts-jest": "^26.1.4", | ||
"typescript": "^3.9.7", | ||
"vue": "^2.6.11", | ||
"vue-router": "^3.4.2", | ||
"vue-server-renderer": "^2.6.11" | ||
"ts-jest": "^26.3.0", | ||
"typescript": "^4.0.2", | ||
"vue": "^2.6.12", | ||
"vue-router": "^3.4.3", | ||
"vue-server-renderer": "^2.6.12" | ||
}, | ||
@@ -71,0 +71,0 @@ "peerDependencies": { |
@@ -46,3 +46,3 @@ # @vue/composition-api | ||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@vue/composition-api@1.0.0-beta.14"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@vue/composition-api@1.0.0-beta.15"></script> | ||
``` | ||
@@ -158,2 +158,29 @@ <!--cdn-links-end--> | ||
<summary> | ||
✅ <b>Should</b> always use <code>ref</code> in a <code>reactive</code> when working with <code>Array</code> | ||
</summary> | ||
```js | ||
const a = reactive({ | ||
list: [ | ||
reactive({ | ||
count: ref(0), | ||
}), | ||
] | ||
}) | ||
// unwrapped | ||
a.list[0].count === 0 // true | ||
a.list.push( | ||
reactive({ | ||
count: ref(1), | ||
}) | ||
) | ||
// unwrapped | ||
a.list[1].count === 1 // true | ||
``` | ||
</details> | ||
<details> | ||
<summary> | ||
⚠️ `set` workaround for adding new reactive properties | ||
@@ -160,0 +187,0 @@ </summary> |
@@ -43,3 +43,3 @@ # @vue/composition-api | ||
<script src="https://cdn.jsdelivr.net/npm/vue@2.6"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@vue/composition-api@1.0.0-beta.14"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/@vue/composition-api@1.0.0-beta.15"></script> | ||
``` | ||
@@ -46,0 +46,0 @@ <!--cdn-links-end--> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
251834
5244
477