How to use patchSuspense method in Playwright Internal

Best JavaScript code snippet using playwright-internal

Run Playwright Internal automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

runtime-core.cjs.prod.js

Source: runtime-core.cjs.prod.js Github

copy
1'use strict';
2
3Object.defineProperty(exports, '__esModule', { value: true });
4
5var reactivity = require('@vue/reactivity');
6
7// Patch flags are optimization hints generated by the compiler.
8// when a block with dynamicChildren is encountered during diff, the algorithm
9// enters "optimized mode". In this mode, we know that the vdom is produced by
10// a render function generated by the compiler, so the algorithm only needs to
11// handle updates explicitly marked by these patch flags.
12// runtime object for public consumption
13const PublicPatchFlags = {
14    TEXT: 1 /* TEXT */,
15    CLASS: 2 /* CLASS */,
16    STYLE: 4 /* STYLE */,
17    PROPS: 8 /* PROPS */,
18    NEED_PATCH: 32 /* NEED_PATCH */,
19    FULL_PROPS: 16 /* FULL_PROPS */,
20    KEYED_FRAGMENT: 64 /* KEYED_FRAGMENT */,
21    UNKEYED_FRAGMENT: 128 /* UNKEYED_FRAGMENT */,
22    DYNAMIC_SLOTS: 256 /* DYNAMIC_SLOTS */,
23    BAIL: -1 /* BAIL */
24};
25
26const globalsWhitelist = new Set(('Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +
27    'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +
28    'Object,Boolean,String,RegExp,Map,Set,JSON,Intl').split(','));
29
30const EMPTY_OBJ =  {};
31const EMPTY_ARR = [];
32const NOOP = () => { };
33const extend = (a, b) => {
34    for (const key in b) {
35        a[key] = b[key];
36    }
37    return a;
38};
39const hasOwnProperty = Object.prototype.hasOwnProperty;
40const hasOwn = (val, key) => hasOwnProperty.call(val, key);
41const isArray = Array.isArray;
42const isFunction = (val) => typeof val === 'function';
43const isString = (val) => typeof val === 'string';
44const isObject = (val) => val !== null && typeof val === 'object';
45const objectToString = Object.prototype.toString;
46const toTypeString = (value) => objectToString.call(value);
47const isPlainObject = (val) => toTypeString(val) === '[object Object]';
48const vnodeHooksRE = /^vnode/;
49const isReservedProp = (key) => key === 'key' || key === 'ref' || vnodeHooksRE.test(key);
50const camelizeRE = /-(\w)/g;
51const camelize = (str) => {
52    return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));
53};
54const hyphenateRE = /\B([A-Z])/g;
55const hyphenate = (str) => {
56    return str.replace(hyphenateRE, '-$1').toLowerCase();
57};
58const capitalize = (str) => {
59    return str.charAt(0).toUpperCase() + str.slice(1);
60};
61
62// implementation, close to no-op
63function createComponent(options) {
64    return isFunction(options) ? { setup: options } : options;
65}
66
67function callWithErrorHandling(fn, instance, type, args) {
68    let res;
69    try {
70        res = args ? fn(...args) : fn();
71    }
72    catch (err) {
73        handleError(err, instance, type);
74    }
75    return res;
76}
77function callWithAsyncErrorHandling(fn, instance, type, args) {
78    const res = callWithErrorHandling(fn, instance, type, args);
79    if (res != null && !res._isVue && typeof res.then === 'function') {
80        res.catch((err) => {
81            handleError(err, instance, type);
82        });
83    }
84    return res;
85}
86function handleError(err, instance, type) {
87    const contextVNode = instance ? instance.vnode : null;
88    if (instance) {
89        let cur = instance.parent;
90        // the exposed instance is the render proxy to keep it consistent with 2.x
91        const exposedInstance = instance.renderProxy;
92        // in production the hook receives only the error code
93        const errorInfo =  type;
94        while (cur) {
95            const errorCapturedHooks = cur.ec;
96            if (errorCapturedHooks !== null) {
97                for (let i = 0; i < errorCapturedHooks.length; i++) {
98                    if (errorCapturedHooks[i](err, exposedInstance, errorInfo)) {
99                        return;
100                    }
101                }
102            }
103            cur = cur.parent;
104        }
105        // app-level handling
106        const appErrorHandler = instance.appContext.config.errorHandler;
107        if (appErrorHandler) {
108            callWithErrorHandling(appErrorHandler, null, 8 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]);
109            return;
110        }
111    }
112    logError(err);
113}
114function logError(err, type, contextVNode) {
115    // default behavior is crash in prod & test, recover in dev.
116    // TODO we should probably make this configurable via `createApp`
117    {
118        throw err;
119    }
120}
121
122const queue = [];
123const postFlushCbs = [];
124const p = Promise.resolve();
125let isFlushing = false;
126function nextTick(fn) {
127    return fn ? p.then(fn) : p;
128}
129function queueJob(job) {
130    if (queue.indexOf(job) === -1) {
131        queue.push(job);
132        if (!isFlushing) {
133            nextTick(flushJobs);
134        }
135    }
136}
137function queuePostFlushCb(cb) {
138    if (Array.isArray(cb)) {
139        postFlushCbs.push.apply(postFlushCbs, cb);
140    }
141    else {
142        postFlushCbs.push(cb);
143    }
144    if (!isFlushing) {
145        nextTick(flushJobs);
146    }
147}
148const dedupe = (cbs) => Array.from(new Set(cbs));
149function flushPostFlushCbs() {
150    if (postFlushCbs.length) {
151        const cbs = dedupe(postFlushCbs);
152        postFlushCbs.length = 0;
153        for (let i = 0; i < cbs.length; i++) {
154            cbs[i]();
155        }
156    }
157}
158function flushJobs(seenJobs) {
159    isFlushing = true;
160    let job;
161    while ((job = queue.shift())) {
162        try {
163            job();
164        }
165        catch (err) {
166            handleError(err, null, 10 /* SCHEDULER */);
167        }
168    }
169    flushPostFlushCbs();
170    isFlushing = false;
171    // some postFlushCb queued jobs!
172    // keep flushing until it drains.
173    if (queue.length) {
174        flushJobs();
175    }
176}
177
178const Fragment =  Symbol();
179const Text =  Symbol();
180const Comment =  Symbol();
181const Portal =  Symbol();
182const Suspense =  Symbol();
183// Since v-if and v-for are the two possible ways node structure can dynamically
184// change, once we consider v-if branches and each v-for fragment a block, we
185// can divide a template into nested blocks, and within each block the node
186// structure would be stable. This allows us to skip most children diffing
187// and only worry about the dynamic nodes (indicated by patch flags).
188const blockStack = [];
189// Open a block.
190// This must be called before `createBlock`. It cannot be part of `createBlock`
191// because the children of the block are evaluated before `createBlock` itself
192// is called. The generated code typically looks like this:
193//
194//   function render() {
195//     return (openBlock(),createBlock('div', null, [...]))
196//   }
197//
198// disableTracking is true when creating a fragment block, since a fragment
199// always diffs its children.
200function openBlock(disableTracking) {
201    blockStack.push(disableTracking ? null : []);
202}
203let shouldTrack = true;
204// Create a block root vnode. Takes the same exact arguments as `createVNode`.
205// A block root keeps track of dynamic nodes within the block in the
206// `dynamicChildren` array.
207function createBlock(type, props, children, patchFlag, dynamicProps) {
208    // avoid a block with optFlag tracking itself
209    shouldTrack = false;
210    const vnode = createVNode(type, props, children, patchFlag, dynamicProps);
211    shouldTrack = true;
212    const trackedNodes = blockStack.pop();
213    vnode.dynamicChildren =
214        trackedNodes && trackedNodes.length ? trackedNodes : EMPTY_ARR;
215    // a block is always going to be patched
216    trackDynamicNode(vnode);
217    return vnode;
218}
219function createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null) {
220    // class & style normalization.
221    if (props !== null) {
222        // for reactive or proxy objects, we need to clone it to enable mutation.
223        if (reactivity.isReactive(props) || SetupProxySymbol in props) {
224            props = extend({}, props);
225        }
226        // class normalization only needed if the vnode isn't generated by
227        // compiler-optimized code
228        if (props.class != null && !(patchFlag & 2 /* CLASS */)) {
229            props.class = normalizeClass(props.class);
230        }
231        let { style } = props;
232        if (style != null) {
233            // reactive state objects need to be cloned since they are likely to be
234            // mutated
235            if (reactivity.isReactive(style) && !isArray(style)) {
236                style = extend({}, style);
237            }
238            props.style = normalizeStyle(style);
239        }
240    }
241    // encode the vnode type information into a bitmap
242    const shapeFlag = isString(type)
243        ? 1 /* ELEMENT */
244        : isObject(type)
245            ? 4 /* STATEFUL_COMPONENT */
246            : isFunction(type)
247                ? 2 /* FUNCTIONAL_COMPONENT */
248                : 0;
249    const vnode = {
250        _isVNode: true,
251        type,
252        props,
253        key: (props && props.key) || null,
254        ref: (props && props.ref) || null,
255        children: null,
256        component: null,
257        suspense: null,
258        el: null,
259        anchor: null,
260        target: null,
261        shapeFlag,
262        patchFlag,
263        dynamicProps,
264        dynamicChildren: null,
265        appContext: null
266    };
267    normalizeChildren(vnode, children);
268    // presence of a patch flag indicates this node needs patching on updates.
269    // component nodes also should always be patched, because even if the
270    // component doesn't need to update, it needs to persist the instance on to
271    // the next vnode so that it can be properly unmounted later.
272    if (shouldTrack &&
273        (patchFlag ||
274            shapeFlag & 4 /* STATEFUL_COMPONENT */ ||
275            shapeFlag & 2 /* FUNCTIONAL_COMPONENT */)) {
276        trackDynamicNode(vnode);
277    }
278    return vnode;
279}
280function trackDynamicNode(vnode) {
281    const currentBlockDynamicNodes = blockStack[blockStack.length - 1];
282    if (currentBlockDynamicNodes != null) {
283        currentBlockDynamicNodes.push(vnode);
284    }
285}
286function cloneVNode(vnode) {
287    return {
288        _isVNode: true,
289        type: vnode.type,
290        props: vnode.props,
291        key: vnode.key,
292        ref: vnode.ref,
293        children: vnode.children,
294        target: vnode.target,
295        shapeFlag: vnode.shapeFlag,
296        patchFlag: vnode.patchFlag,
297        dynamicProps: vnode.dynamicProps,
298        dynamicChildren: vnode.dynamicChildren,
299        appContext: vnode.appContext,
300        // these should be set to null since they should only be present on
301        // mounted VNodes. If they are somehow not null, this means we have
302        // encountered an already-mounted vnode being used again.
303        component: null,
304        suspense: null,
305        el: null,
306        anchor: null
307    };
308}
309function normalizeVNode(child) {
310    if (child == null) {
311        // empty placeholder
312        return createVNode(Comment);
313    }
314    else if (isArray(child)) {
315        // fragment
316        return createVNode(Fragment, null, child);
317    }
318    else if (typeof child === 'object') {
319        // already vnode, this should be the most common since compiled templates
320        // always produce all-vnode children arrays
321        return child.el === null ? child : cloneVNode(child);
322    }
323    else {
324        // primitive types
325        return createVNode(Text, null, child + '');
326    }
327}
328function normalizeChildren(vnode, children) {
329    let type = 0;
330    if (children == null) {
331        children = null;
332    }
333    else if (isArray(children)) {
334        type = 16 /* ARRAY_CHILDREN */;
335    }
336    else if (typeof children === 'object') {
337        type = 32 /* SLOTS_CHILDREN */;
338    }
339    else if (isFunction(children)) {
340        children = { default: children };
341        type = 32 /* SLOTS_CHILDREN */;
342    }
343    else {
344        children = isString(children) ? children : children + '';
345        type = 8 /* TEXT_CHILDREN */;
346    }
347    vnode.children = children;
348    vnode.shapeFlag |= type;
349}
350function normalizeStyle(value) {
351    if (isArray(value)) {
352        const res = {};
353        for (let i = 0; i < value.length; i++) {
354            const normalized = normalizeStyle(value[i]);
355            if (normalized) {
356                for (const key in normalized) {
357                    res[key] = normalized[key];
358                }
359            }
360        }
361        return res;
362    }
363    else if (isObject(value)) {
364        return value;
365    }
366}
367function normalizeClass(value) {
368    let res = '';
369    if (isString(value)) {
370        res = value;
371    }
372    else if (isArray(value)) {
373        for (let i = 0; i < value.length; i++) {
374            res += normalizeClass(value[i]) + ' ';
375        }
376    }
377    else if (isObject(value)) {
378        for (const name in value) {
379            if (value[name]) {
380                res += name + ' ';
381            }
382        }
383    }
384    return res.trim();
385}
386const handlersRE = /^on|^vnode/;
387function mergeProps(...args) {
388    const ret = {};
389    extend(ret, args[0]);
390    for (let i = 1; i < args.length; i++) {
391        const toMerge = args[i];
392        for (const key in toMerge) {
393            if (key === 'class') {
394                ret.class = normalizeClass([ret.class, toMerge.class]);
395            }
396            else if (key === 'style') {
397                ret.style = normalizeStyle([ret.style, toMerge.style]);
398            }
399            else if (handlersRE.test(key)) {
400                // on*, vnode*
401                const existing = ret[key];
402                ret[key] = existing
403                    ? [].concat(existing, toMerge[key])
404                    : toMerge[key];
405            }
406            else {
407                ret[key] = toMerge[key];
408            }
409        }
410    }
411    return ret;
412}
413
414function injectHook(type, hook, target) {
415    if (target) {
416        (target[type] || (target[type] = [])).push((...args) => {
417            if (target.isUnmounted) {
418                return;
419            }
420            // disable tracking inside all lifecycle hooks
421            // since they can potentially be called inside effects.
422            reactivity.pauseTracking();
423            // Set currentInstance during hook invocation.
424            // This assumes the hook does not synchronously trigger other hooks, which
425            // can only be false when the user does something really funky.
426            setCurrentInstance(target);
427            const res = callWithAsyncErrorHandling(hook, target, type, args);
428            setCurrentInstance(null);
429            reactivity.resumeTracking();
430            return res;
431        });
432    }
433}
434function onBeforeMount(hook, target = currentInstance) {
435    injectHook("bm" /* BEFORE_MOUNT */, hook, target);
436}
437function onMounted(hook, target = currentInstance) {
438    injectHook("m" /* MOUNTED */, hook, target);
439}
440function onBeforeUpdate(hook, target = currentInstance) {
441    injectHook("bu" /* BEFORE_UPDATE */, hook, target);
442}
443function onUpdated(hook, target = currentInstance) {
444    injectHook("u" /* UPDATED */, hook, target);
445}
446function onBeforeUnmount(hook, target = currentInstance) {
447    injectHook("bum" /* BEFORE_UNMOUNT */, hook, target);
448}
449function onUnmounted(hook, target = currentInstance) {
450    injectHook("um" /* UNMOUNTED */, hook, target);
451}
452function onRenderTriggered(hook, target = currentInstance) {
453    injectHook("rtg" /* RENDER_TRIGGERED */, hook, target);
454}
455function onRenderTracked(hook, target = currentInstance) {
456    injectHook("rtc" /* RENDER_TRACKED */, hook, target);
457}
458function onErrorCaptured(hook, target = currentInstance) {
459    injectHook("ec" /* ERROR_CAPTURED */, hook, target);
460}
461
462// mark the current rendering instance for asset resolution (e.g.
463// resolveComponent, resolveDirective) during render
464let currentRenderingInstance = null;
465function renderComponentRoot(instance) {
466    const { type: Component, vnode, renderProxy, props, slots, attrs, emit } = instance;
467    let result;
468    currentRenderingInstance = instance;
469    try {
470        if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
471            result = normalizeVNode(instance.render.call(renderProxy));
472        }
473        else {
474            // functional
475            const render = Component;
476            result = normalizeVNode(render.length > 1
477                ? render(props, {
478                    attrs,
479                    slots,
480                    emit
481                })
482                : render(props, null));
483        }
484    }
485    catch (err) {
486        handleError(err, instance, 1 /* RENDER_FUNCTION */);
487        result = createVNode(Comment);
488    }
489    currentRenderingInstance = null;
490    return result;
491}
492function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
493    const { props: prevProps, children: prevChildren } = prevVNode;
494    const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
495    if (patchFlag > 0) {
496        if (patchFlag & 256 /* DYNAMIC_SLOTS */) {
497            // slot content that references values that might have changed,
498            // e.g. in a v-for
499            return true;
500        }
501        if (patchFlag & 16 /* FULL_PROPS */) {
502            // presence of this flag indicates props are always non-null
503            return hasPropsChanged(prevProps, nextProps);
504        }
505        else if (patchFlag & 8 /* PROPS */) {
506            const dynamicProps = nextVNode.dynamicProps;
507            for (let i = 0; i < dynamicProps.length; i++) {
508                const key = dynamicProps[i];
509                if (nextProps[key] !== prevProps[key]) {
510                    return true;
511                }
512            }
513        }
514    }
515    else if (!optimized) {
516        // this path is only taken by manually written render functions
517        // so presence of any children leads to a forced update
518        if (prevChildren != null || nextChildren != null) {
519            return true;
520        }
521        if (prevProps === nextProps) {
522            return false;
523        }
524        if (prevProps === null) {
525            return nextProps !== null;
526        }
527        if (nextProps === null) {
528            return prevProps !== null;
529        }
530        return hasPropsChanged(prevProps, nextProps);
531    }
532    return false;
533}
534function hasPropsChanged(prevProps, nextProps) {
535    const nextKeys = Object.keys(nextProps);
536    if (nextKeys.length !== Object.keys(prevProps).length) {
537        return true;
538    }
539    for (let i = 0; i < nextKeys.length; i++) {
540        const key = nextKeys[i];
541        if (nextProps[key] !== prevProps[key]) {
542            return true;
543        }
544    }
545    return false;
546}
547
548// resolve raw VNode data.
549// - filter out reserved keys (key, ref, slots)
550// - extract class and style into $attrs (to be merged onto child
551//   component root)
552// - for the rest:
553//   - if has declared props: put declared ones in `props`, the rest in `attrs`
554//   - else: everything goes in `props`.
555function resolveProps(instance, rawProps, _options) {
556    const hasDeclaredProps = _options != null;
557    const options = normalizePropsOptions(_options);
558    if (!rawProps && !hasDeclaredProps) {
559        return;
560    }
561    const props = {};
562    let attrs = void 0;
563    // update the instance propsProxy (passed to setup()) to trigger potential
564    // changes
565    const propsProxy = instance.propsProxy;
566    const setProp = propsProxy
567        ? (key, val) => {
568            props[key] = val;
569            propsProxy[key] = val;
570        }
571        : (key, val) => {
572            props[key] = val;
573        };
574    // allow mutation of propsProxy (which is readonly by default)
575    reactivity.unlock();
576    if (rawProps != null) {
577        for (const key in rawProps) {
578            // key, ref are reserved
579            if (isReservedProp(key))
580                continue;
581            // any non-declared data are put into a separate `attrs` object
582            // for spreading
583            if (hasDeclaredProps && !hasOwn(options, key)) {
584                (attrs || (attrs = {}))[key] = rawProps[key];
585            }
586            else {
587                setProp(key, rawProps[key]);
588            }
589        }
590    }
591    // set default values, cast booleans & run validators
592    if (hasDeclaredProps) {
593        for (const key in options) {
594            let opt = options[key];
595            if (opt == null)
596                continue;
597            const isAbsent = !hasOwn(props, key);
598            const hasDefault = hasOwn(opt, 'default');
599            const currentValue = props[key];
600            // default values
601            if (hasDefault && currentValue === undefined) {
602                const defaultValue = opt.default;
603                setProp(key, isFunction(defaultValue) ? defaultValue() : defaultValue);
604            }
605            // boolean casting
606            if (opt["1" /* shouldCast */]) {
607                if (isAbsent && !hasDefault) {
608                    setProp(key, false);
609                }
610                else if (opt["2" /* shouldCastTrue */] &&
611                    (currentValue === '' || currentValue === hyphenate(key))) {
612                    setProp(key, true);
613                }
614            }
615        }
616    }
617    else {
618        // if component has no declared props, $attrs === $props
619        attrs = props;
620    }
621    // in case of dynamic props, check if we need to delete keys from
622    // the props proxy
623    const { patchFlag } = instance.vnode;
624    if (propsProxy !== null &&
625        (patchFlag === 0 || patchFlag & 16 /* FULL_PROPS */)) {
626        const rawInitialProps = reactivity.toRaw(propsProxy);
627        for (const key in rawInitialProps) {
628            if (!hasOwn(props, key)) {
629                delete propsProxy[key];
630            }
631        }
632    }
633    // lock readonly
634    reactivity.lock();
635    instance.props =  props;
636    instance.attrs = options
637        ?  attrs
638        : instance.props;
639}
640const normalizationMap = new WeakMap();
641function normalizePropsOptions(raw) {
642    if (!raw) {
643        return null;
644    }
645    if (normalizationMap.has(raw)) {
646        return normalizationMap.get(raw);
647    }
648    const normalized = {};
649    normalizationMap.set(raw, normalized);
650    if (isArray(raw)) {
651        for (let i = 0; i < raw.length; i++) {
652            const normalizedKey = camelize(raw[i]);
653            if (normalizedKey[0] !== '$') {
654                normalized[normalizedKey] = EMPTY_OBJ;
655            }
656        }
657    }
658    else {
659        for (const key in raw) {
660            const normalizedKey = camelize(key);
661            if (normalizedKey[0] !== '$') {
662                const opt = raw[key];
663                const prop = (normalized[normalizedKey] =
664                    isArray(opt) || isFunction(opt) ? { type: opt } : opt);
665                if (prop != null) {
666                    const booleanIndex = getTypeIndex(Boolean, prop.type);
667                    const stringIndex = getTypeIndex(String, prop.type);
668                    prop["1" /* shouldCast */] = booleanIndex > -1;
669                    prop["2" /* shouldCastTrue */] = booleanIndex < stringIndex;
670                }
671            }
672        }
673    }
674    return normalized;
675}
676// use function string name to check type constructors
677// so that it works across vms / iframes.
678function getType(ctor) {
679    const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
680    return match ? match[1] : '';
681}
682function isSameType(a, b) {
683    return getType(a) === getType(b);
684}
685function getTypeIndex(type, expectedTypes) {
686    if (isArray(expectedTypes)) {
687        for (let i = 0, len = expectedTypes.length; i < len; i++) {
688            if (isSameType(expectedTypes[i], type)) {
689                return i;
690            }
691        }
692    }
693    else if (isObject(expectedTypes)) {
694        return isSameType(expectedTypes, type) ? 0 : -1;
695    }
696    return -1;
697}
698
699const normalizeSlotValue = (value) => isArray(value)
700    ? value.map(normalizeVNode)
701    : [normalizeVNode(value)];
702const normalizeSlot = (key, rawSlot) => (props) => {
703    return normalizeSlotValue(rawSlot(props));
704};
705function resolveSlots(instance, children) {
706    let slots;
707    if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
708        if (children._compiled) {
709            // pre-normalized slots object generated by compiler
710            slots = children;
711        }
712        else {
713            slots = {};
714            for (const key in children) {
715                let value = children[key];
716                if (isFunction(value)) {
717                    slots[key] = normalizeSlot(key, value);
718                }
719                else if (value != null) {
720                    value = normalizeSlotValue(value);
721                    slots[key] = () => value;
722                }
723            }
724        }
725    }
726    else if (children !== null) {
727        const normalized = normalizeSlotValue(children);
728        slots = { default: () => normalized };
729    }
730    if (slots !== void 0) {
731        instance.slots = slots;
732    }
733}
734
735/**
736Runtime helper for applying directives to a vnode. Example usage:
737
738const comp = resolveComponent('comp')
739const foo = resolveDirective('foo')
740const bar = resolveDirective('bar')
741
742return applyDirectives(h(comp), [
743  [foo, this.x],
744  [bar, this.y]
745])
746*/
747const valueCache = new WeakMap();
748function applyDirective(props, instance, directive, value, arg, modifiers) {
749    let valueCacheForDir = valueCache.get(directive);
750    if (!valueCacheForDir) {
751        valueCacheForDir = new WeakMap();
752        valueCache.set(directive, valueCacheForDir);
753    }
754    for (const key in directive) {
755        const hook = directive[key];
756        const hookKey = `vnode` + key[0].toUpperCase() + key.slice(1);
757        const vnodeHook = (vnode, prevVNode) => {
758            let oldValue;
759            if (prevVNode != null) {
760                oldValue = valueCacheForDir.get(prevVNode);
761                valueCacheForDir.delete(prevVNode);
762            }
763            valueCacheForDir.set(vnode, value);
764            hook(vnode.el, {
765                instance: instance.renderProxy,
766                value,
767                oldValue,
768                arg,
769                modifiers
770            }, vnode, prevVNode);
771        };
772        const existing = props[hookKey];
773        props[hookKey] = existing
774            ? [].concat(existing, vnodeHook)
775            : vnodeHook;
776    }
777}
778function applyDirectives(vnode, directives) {
779    const instance = currentRenderingInstance;
780    if (instance !== null) {
781        vnode = cloneVNode(vnode);
782        vnode.props = vnode.props != null ? extend({}, vnode.props) : {};
783        for (let i = 0; i < directives.length; i++) {
784            applyDirective(vnode.props, instance, ...directives[i]);
785        }
786    }
787    return vnode;
788}
789function invokeDirectiveHook(hook, instance, vnode, prevVNode = null) {
790    const args = [vnode, prevVNode];
791    if (isArray(hook)) {
792        for (let i = 0; i < hook.length; i++) {
793            callWithAsyncErrorHandling(hook[i], instance, 7 /* DIRECTIVE_HOOK */, args);
794        }
795    }
796    else if (isFunction(hook)) {
797        callWithAsyncErrorHandling(hook, instance, 7 /* DIRECTIVE_HOOK */, args);
798    }
799}
800
801function createAppContext() {
802    return {
803        config: {
804            devtools: true,
805            performance: false,
806            errorHandler: undefined,
807            warnHandler: undefined
808        },
809        mixins: [],
810        components: {},
811        directives: {},
812        provides: {}
813    };
814}
815function createAppAPI(render) {
816    return function createApp() {
817        const context = createAppContext();
818        let isMounted = false;
819        const app = {
820            get config() {
821                return context.config;
822            },
823            set config(v) {
824            },
825            use(plugin) {
826                if (isFunction(plugin)) {
827                    plugin(app);
828                }
829                else if (isFunction(plugin.install)) {
830                    plugin.install(app);
831                }
832                return app;
833            },
834            mixin(mixin) {
835                context.mixins.push(mixin);
836                return app;
837            },
838            component(name, component) {
839                // TODO component name validation
840                if (!component) {
841                    return context.components[name];
842                }
843                else {
844                    context.components[name] = component;
845                    return app;
846                }
847            },
848            directive(name, directive) {
849                // TODO directive name validation
850                if (!directive) {
851                    return context.directives[name];
852                }
853                else {
854                    context.directives[name] = directive;
855                    return app;
856                }
857            },
858            mount(rootComponent, rootContainer, rootProps) {
859                if (!isMounted) {
860                    const vnode = createVNode(rootComponent, rootProps);
861                    // store app context on the root VNode.
862                    // this will be set on the root instance on initial mount.
863                    vnode.appContext = context;
864                    render(vnode, rootContainer);
865                    isMounted = true;
866                    return vnode.component.renderProxy;
867                }
868            },
869            provide(key, value) {
870                context.provides[key] = value;
871            }
872        };
873        return app;
874    };
875}
876
877function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, optimized) {
878    return {
879        vnode,
880        parent,
881        parentComponent,
882        isSVG,
883        optimized,
884        container,
885        hiddenContainer,
886        anchor,
887        deps: 0,
888        subTree: null,
889        fallbackTree: null,
890        isResolved: false,
891        isUnmounted: false,
892        effects: []
893    };
894}
895function normalizeSuspenseChildren(vnode) {
896    const { shapeFlag, children } = vnode;
897    if (shapeFlag & PublicShapeFlags.SLOTS_CHILDREN) {
898        const { default: d, fallback } = children;
899        return {
900            content: normalizeVNode(isFunction(d) ? d() : d),
901            fallback: normalizeVNode(isFunction(fallback) ? fallback() : fallback)
902        };
903    }
904    else {
905        return {
906            content: normalizeVNode(children),
907            fallback: normalizeVNode(null)
908        };
909    }
910}
911
912const prodEffectOptions = {
913    scheduler: queueJob
914};
915function isSameType$1(n1, n2) {
916    return n1.type === n2.type && n1.key === n2.key;
917}
918function invokeHooks(hooks, arg) {
919    for (let i = 0; i < hooks.length; i++) {
920        hooks[i](arg);
921    }
922}
923function queuePostRenderEffect(fn, suspense) {
924    if (suspense !== null && !suspense.isResolved) {
925        if (isArray(fn)) {
926            suspense.effects.push(...fn);
927        }
928        else {
929            suspense.effects.push(fn);
930        }
931    }
932    else {
933        queuePostFlushCb(fn);
934    }
935}
936/**
937 * The createRenderer function accepts two generic arguments:
938 * HostNode and HostElement, corresponding to Node and Element types in the
939 * host environment. For example, for runtime-dom, HostNode would be the DOM
940 * `Node` interface and HostElement would be the DOM `Element` interface.
941 *
942 * Custom renderers can pass in the platform specific types like this:
943 *
944 * ``` js
945 * const { render, createApp } = createRenderer<Node, Element>({
946 *   patchProp,
947 *   ...nodeOps
948 * })
949 * ```
950 */
951function createRenderer(options) {
952    const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, querySelector: hostQuerySelector } = options;
953    function patch(n1, // null means this is a mount
954    n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, optimized = false) {
955        // patching & not same type, unmount old tree
956        if (n1 != null && !isSameType$1(n1, n2)) {
957            anchor = getNextHostNode(n1);
958            unmount(n1, parentComponent, parentSuspense, true);
959            n1 = null;
960        }
961        const { type, shapeFlag } = n2;
962        switch (type) {
963            case Text:
964                processText(n1, n2, container, anchor);
965                break;
966            case Comment:
967                processCommentNode(n1, n2, container, anchor);
968                break;
969            case Fragment:
970                processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
971                break;
972            case Portal:
973                processPortal(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
974                break;
975            case Suspense:
976                {
977                    processSuspense(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
978                }
979                break;
980            default:
981                if (shapeFlag & 1 /* ELEMENT */) {
982                    processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
983                }
984                else if (shapeFlag & 6 /* COMPONENT */) {
985                    processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
986                }
987        }
988    }
989    function processText(n1, n2, container, anchor) {
990        if (n1 == null) {
991            hostInsert((n2.el = hostCreateText(n2.children)), container, anchor);
992        }
993        else {
994            const el = (n2.el = n1.el);
995            if (n2.children !== n1.children) {
996                hostSetText(el, n2.children);
997            }
998        }
999    }
1000    function processCommentNode(n1, n2, container, anchor) {
1001        if (n1 == null) {
1002            hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor);
1003        }
1004        else {
1005            // there's no support for dynamic comments
1006            n2.el = n1.el;
1007        }
1008    }
1009    function processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized) {
1010        if (n1 == null) {
1011            mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG);
1012        }
1013        else {
1014            patchElement(n1, n2, parentComponent, parentSuspense, isSVG, optimized);
1015        }
1016        if (n2.ref !== null && parentComponent !== null) {
1017            setRef(n2.ref, n1 && n1.ref, parentComponent, n2.el);
1018        }
1019    }
1020    function mountElement(vnode, container, anchor, parentComponent, parentSuspense, isSVG) {
1021        const tag = vnode.type;
1022        isSVG = isSVG || tag === 'svg';
1023        const el = (vnode.el = hostCreateElement(tag, isSVG));
1024        const { props, shapeFlag } = vnode;
1025        if (props != null) {
1026            for (const key in props) {
1027                if (isReservedProp(key))
1028                    continue;
1029                hostPatchProp(el, key, props[key], null, isSVG);
1030            }
1031            if (props.vnodeBeforeMount != null) {
1032                invokeDirectiveHook(props.vnodeBeforeMount, parentComponent, vnode);
1033            }
1034        }
1035        if (shapeFlag & 8 /* TEXT_CHILDREN */) {
1036            hostSetElementText(el, vnode.children);
1037        }
1038        else if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
1039            mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG);
1040        }
1041        hostInsert(el, container, anchor);
1042        if (props != null && props.vnodeMounted != null) {
1043            queuePostRenderEffect(() => {
1044                invokeDirectiveHook(props.vnodeMounted, parentComponent, vnode);
1045            }, parentSuspense);
1046        }
1047    }
1048    function mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, start = 0) {
1049        for (let i = start; i < children.length; i++) {
1050            const child = (children[i] = normalizeVNode(children[i]));
1051            patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG);
1052        }
1053    }
1054    function patchElement(n1, n2, parentComponent, parentSuspense, isSVG, optimized) {
1055        const el = (n2.el = n1.el);
1056        const { patchFlag, dynamicChildren } = n2;
1057        const oldProps = (n1 && n1.props) || EMPTY_OBJ;
1058        const newProps = n2.props || EMPTY_OBJ;
1059        if (newProps.vnodeBeforeUpdate != null) {
1060            invokeDirectiveHook(newProps.vnodeBeforeUpdate, parentComponent, n2, n1);
1061        }
1062        if (patchFlag > 0) {
1063            // the presence of a patchFlag means this element's render code was
1064            // generated by the compiler and can take the fast path.
1065            // in this path old node and new node are guaranteed to have the same shape
1066            // (i.e. at the exact same position in the source template)
1067            if (patchFlag & 16 /* FULL_PROPS */) {
1068                // element props contain dynamic keys, full diff needed
1069                patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
1070            }
1071            else {
1072                // class
1073                // this flag is matched when the element has dynamic class bindings.
1074                if (patchFlag & 2 /* CLASS */) {
1075                    if (oldProps.class !== newProps.class) {
1076                        hostPatchProp(el, 'class', newProps.class, null, isSVG);
1077                    }
1078                }
1079                // style
1080                // this flag is matched when the element has dynamic style bindings
1081                if (patchFlag & 4 /* STYLE */) {
1082                    hostPatchProp(el, 'style', newProps.style, oldProps.style, isSVG);
1083                }
1084                // props
1085                // This flag is matched when the element has dynamic prop/attr bindings
1086                // other than class and style. The keys of dynamic prop/attrs are saved for
1087                // faster iteration.
1088                // Note dynamic keys like :[foo]="bar" will cause this optimization to
1089                // bail out and go through a full diff because we need to unset the old key
1090                if (patchFlag & 8 /* PROPS */) {
1091                    // if the flag is present then dynamicProps must be non-null
1092                    const propsToUpdate = n2.dynamicProps;
1093                    for (let i = 0; i < propsToUpdate.length; i++) {
1094                        const key = propsToUpdate[i];
1095                        const prev = oldProps[key];
1096                        const next = newProps[key];
1097                        if (prev !== next) {
1098                            hostPatchProp(el, key, next, prev, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren);
1099                        }
1100                    }
1101                }
1102            }
1103            // text
1104            // This flag is matched when the element has only dynamic text children.
1105            // this flag is terminal (i.e. skips children diffing).
1106            if (patchFlag & 1 /* TEXT */) {
1107                if (n1.children !== n2.children) {
1108                    hostSetElementText(el, n2.children);
1109                }
1110                return; // terminal
1111            }
1112        }
1113        else if (!optimized) {
1114            // unoptimized, full diff
1115            patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
1116        }
1117        if (dynamicChildren != null) {
1118            // children fast path
1119            const oldDynamicChildren = n1.dynamicChildren;
1120            for (let i = 0; i < dynamicChildren.length; i++) {
1121                patch(oldDynamicChildren[i], dynamicChildren[i], el, null, parentComponent, parentSuspense, isSVG, true);
1122            }
1123        }
1124        else if (!optimized) {
1125            // full diff
1126            patchChildren(n1, n2, el, null, parentComponent, parentSuspense, isSVG);
1127        }
1128        if (newProps.vnodeUpdated != null) {
1129            queuePostRenderEffect(() => {
1130                invokeDirectiveHook(newProps.vnodeUpdated, parentComponent, n2, n1);
1131            }, parentSuspense);
1132        }
1133    }
1134    function patchProps(el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) {
1135        if (oldProps !== newProps) {
1136            for (const key in newProps) {
1137                if (isReservedProp(key))
1138                    continue;
1139                const next = newProps[key];
1140                const prev = oldProps[key];
1141                if (next !== prev) {
1142                    hostPatchProp(el, key, next, prev, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);
1143                }
1144            }
1145            if (oldProps !== EMPTY_OBJ) {
1146                for (const key in oldProps) {
1147                    if (isReservedProp(key))
1148                        continue;
1149                    if (!(key in newProps)) {
1150                        hostPatchProp(el, key, null, null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);
1151                    }
1152                }
1153            }
1154        }
1155    }
1156    function processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized) {
1157        const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateComment(''));
1158        const fragmentEndAnchor = (n2.anchor = n1
1159            ? n1.anchor
1160            : hostCreateComment(''));
1161        if (n1 == null) {
1162            hostInsert(fragmentStartAnchor, container, anchor);
1163            hostInsert(fragmentEndAnchor, container, anchor);
1164            // a fragment can only have array children
1165            // since they are either generated by the compiler, or implicitly created
1166            // from arrays.
1167            mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG);
1168        }
1169        else {
1170            patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, optimized);
1171        }
1172    }
1173    function processPortal(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized) {
1174        const targetSelector = n2.props && n2.props.target;
1175        const { patchFlag, shapeFlag, children } = n2;
1176        if (n1 == null) {
1177            const target = (n2.target = isString(targetSelector)
1178                ? hostQuerySelector(targetSelector)
1179                : null);
1180            if (target != null) {
1181                if (shapeFlag & 8 /* TEXT_CHILDREN */) {
1182                    hostSetElementText(target, children);
1183                }
1184                else if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
1185                    mountChildren(children, target, null, parentComponent, parentSuspense, isSVG);
1186                }
1187            }
1188        }
1189        else {
1190            // update content
1191            const target = (n2.target = n1.target);
1192            if (patchFlag === 1 /* TEXT */) {
1193                hostSetElementText(target, children);
1194            }
1195            else if (!optimized) {
1196                patchChildren(n1, n2, target, null, parentComponent, parentSuspense, isSVG);
1197            }
1198            // target changed
1199            if (targetSelector !== (n1.props && n1.props.target)) {
1200                const nextTarget = (n2.target = isString(targetSelector)
1201                    ? hostQuerySelector(targetSelector)
1202                    : null);
1203                if (nextTarget != null) {
1204                    // move content
1205                    if (shapeFlag & 8 /* TEXT_CHILDREN */) {
1206                        hostSetElementText(target, '');
1207                        hostSetElementText(nextTarget, children);
1208                    }
1209                    else if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
1210                        for (let i = 0; i < children.length; i++) {
1211                            move(children[i], nextTarget, null);
1212                        }
1213                    }
1214                }
1215            }
1216        }
1217        // insert an empty node as the placeholder for the portal
1218        processCommentNode(n1, n2, container, anchor);
1219    }
1220    function processSuspense(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized) {
1221        if (n1 == null) {
1222            mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
1223        }
1224        else {
1225            patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, optimized);
1226        }
1227    }
1228    function mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized) {
1229        const hiddenContainer = hostCreateElement('div');
1230        const suspense = (n2.suspense = createSuspenseBoundary(n2, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, optimized));
1231        const { content, fallback } = normalizeSuspenseChildren(n2);
1232        suspense.subTree = content;
1233        suspense.fallbackTree = fallback;
1234        // start mounting the content subtree in an off-dom container
1235        patch(null, content, hiddenContainer, null, parentComponent, suspense, isSVG, optimized);
1236        // now check if we have encountered any async deps
1237        if (suspense.deps > 0) {
1238            // mount the fallback tree
1239            patch(null, fallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context
1240            isSVG, optimized);
1241            n2.el = fallback.el;
1242        }
1243        else {
1244            // Suspense has no async deps. Just resolve.
1245            resolveSuspense(suspense);
1246        }
1247    }
1248    function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, optimized) {
1249        const suspense = (n2.suspense = n1.suspense);
1250        suspense.vnode = n2;
1251        const { content, fallback } = normalizeSuspenseChildren(n2);
1252        const oldSubTree = suspense.subTree;
1253        const oldFallbackTree = suspense.fallbackTree;
1254        if (!suspense.isResolved) {
1255            patch(oldSubTree, content, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, optimized);
1256            if (suspense.deps > 0) {
1257                // still pending. patch the fallback tree.
1258                patch(oldFallbackTree, fallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context
1259                isSVG, optimized);
1260                n2.el = fallback.el;
1261            }
1262            // If deps somehow becomes 0 after the patch it means the patch caused an
1263            // async dep component to unmount and removed its dep. It will cause the
1264            // suspense to resolve and we don't need to do anything here.
1265        }
1266        else {
1267            // just normal patch inner content as a fragment
1268            patch(oldSubTree, content, container, anchor, parentComponent, suspense, isSVG, optimized);
1269            n2.el = content.el;
1270        }
1271        suspense.subTree = content;
1272        suspense.fallbackTree = fallback;
1273    }
1274    function resolveSuspense(suspense) {
1275        const { vnode, subTree, fallbackTree, effects, parentComponent, container } = suspense;
1276        // this is initial anchor on mount
1277        let { anchor } = suspense;
1278        // unmount fallback tree
1279        if (fallbackTree.el) {
1280            // if the fallback tree was mounted, it may have been moved
1281            // as part of a parent suspense. get the latest anchor for insertion
1282            anchor = getNextHostNode(fallbackTree);
1283            unmount(fallbackTree, parentComponent, suspense, true);
1284        }
1285        // move content from off-dom container to actual container
1286        move(subTree, container, anchor);
1287        const el = (vnode.el = subTree.el);
1288        // suspense as the root node of a component...
1289        if (parentComponent && parentComponent.subTree === vnode) {
1290            parentComponent.vnode.el = el;
1291            updateHOCHostEl(parentComponent, el);
1292        }
1293        // check if there is a pending parent suspense
1294        let parent = suspense.parent;
1295        let hasUnresolvedAncestor = false;
1296        while (parent) {
1297            if (!parent.isResolved) {
1298                // found a pending parent suspense, merge buffered post jobs
1299                // into that parent
1300                parent.effects.push(...effects);
1301                hasUnresolvedAncestor = true;
1302                break;
1303            }
1304            parent = parent.parent;
1305        }
1306        // no pending parent suspense, flush all jobs
1307        if (!hasUnresolvedAncestor) {
1308            queuePostFlushCb(effects);
1309        }
1310        suspense.isResolved = true;
1311        // invoke @resolve event
1312        const onResolve = vnode.props && vnode.props.onResolve;
1313        if (isFunction(onResolve)) {
1314            onResolve();
1315        }
1316    }
1317    function restartSuspense(suspense) {
1318        suspense.isResolved = false;
1319        const { vnode, subTree, fallbackTree, parentComponent, container, hiddenContainer, isSVG, optimized } = suspense;
1320        // move content tree back to the off-dom container
1321        const anchor = getNextHostNode(subTree);
1322        move(subTree, hiddenContainer, null);
1323        // remount the fallback tree
1324        patch(null, fallbackTree, container, anchor, parentComponent, null, // fallback tree will not have suspense context
1325        isSVG, optimized);
1326        const el = (vnode.el = fallbackTree.el);
1327        // suspense as the root node of a component...
1328        if (parentComponent && parentComponent.subTree === vnode) {
1329            parentComponent.vnode.el = el;
1330            updateHOCHostEl(parentComponent, el);
1331        }
1332        // invoke @suspense event
1333        const onSuspense = vnode.props && vnode.props.onSuspense;
1334        if (isFunction(onSuspense)) {
1335            onSuspense();
1336        }
1337    }
1338    function processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized) {
1339        if (n1 == null) {
1340            mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG);
1341        }
1342        else {
1343            const instance = (n2.component = n1.component);
1344            if (shouldUpdateComponent(n1, n2, optimized)) {
1345                if (
1346                    instance.asyncDep &&
1347                    !instance.asyncResolved) {
1348                    updateComponentPreRender(instance, n2);
1349                    return;
1350                }
1351                else {
1352                    // normal update
1353                    instance.next = n2;
1354                    // instance.update is the reactive effect runner.
1355                    instance.update();
1356                }
1357            }
1358            else {
1359                // no update needed. just copy over properties
1360                n2.component = n1.component;
1361                n2.el = n1.el;
1362            }
1363        }
1364        if (n2.ref !== null && parentComponent !== null) {
1365            setRef(n2.ref, n1 && n1.ref, parentComponent, n2.component.renderProxy);
1366        }
1367    }
1368    function mountComponent(initialVNode, container, anchor, parentComponent, parentSuspense, isSVG) {
1369        const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent));
1370        // resolve props and slots for setup context
1371        const propsOptions = initialVNode.type.props;
1372        resolveProps(instance, initialVNode.props, propsOptions);
1373        resolveSlots(instance, initialVNode.children);
1374        // setup stateful logic
1375        if (initialVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
1376            setupStatefulComponent(instance, parentSuspense);
1377        }
1378        // setup() is async. This component relies on async logic to be resolved
1379        // before proceeding
1380        if ( instance.asyncDep) {
1381            if (!parentSuspense) {
1382                // TODO handle this properly
1383                throw new Error('Async component without a suspense boundary!');
1384            }
1385            // parent suspense already resolved, need to re-suspense
1386            // use queueJob so it's handled synchronously after patching the current
1387            // suspense tree
1388            if (parentSuspense.isResolved) {
1389                queueJob(() => {
1390                    restartSuspense(parentSuspense);
1391                });
1392            }
1393            parentSuspense.deps++;
1394            instance.asyncDep
1395                .catch(err => {
1396                handleError(err, instance, 0 /* SETUP_FUNCTION */);
1397            })
1398                .then(asyncSetupResult => {
1399                // component may be unmounted before resolve
1400                if (!instance.isUnmounted && !parentSuspense.isUnmounted) {
1401                    retryAsyncComponent(instance, asyncSetupResult, parentSuspense, isSVG);
1402                }
1403            });
1404            // give it a placeholder
1405            const placeholder = (instance.subTree = createVNode(Comment));
1406            processCommentNode(null, placeholder, container, anchor);
1407            initialVNode.el = placeholder.el;
1408            return;
1409        }
1410        setupRenderEffect(instance, parentSuspense, initialVNode, container, anchor, isSVG);
1411    }
1412    function retryAsyncComponent(instance, asyncSetupResult, parentSuspense, isSVG) {
1413        parentSuspense.deps--;
1414        // retry from this component
1415        instance.asyncResolved = true;
1416        const { vnode } = instance;
1417        handleSetupResult(instance, asyncSetupResult, parentSuspense);
1418        setupRenderEffect(instance, parentSuspense, vnode, 
1419        // component may have been moved before resolve
1420        hostParentNode(instance.subTree.el), getNextHostNode(instance.subTree), isSVG);
1421        updateHOCHostEl(instance, vnode.el);
1422        if (parentSuspense.deps === 0) {
1423            resolveSuspense(parentSuspense);
1424        }
1425    }
1426    function setupRenderEffect(instance, parentSuspense, initialVNode, container, anchor, isSVG) {
1427        // create reactive effect for rendering
1428        let mounted = false;
1429        instance.update = reactivity.effect(function componentEffect() {
1430            if (!mounted) {
1431                const subTree = (instance.subTree = renderComponentRoot(instance));
1432                // beforeMount hook
1433                if (instance.bm !== null) {
1434                    invokeHooks(instance.bm);
1435                }
1436                patch(null, subTree, container, anchor, instance, parentSuspense, isSVG);
1437                initialVNode.el = subTree.el;
1438                // mounted hook
1439                if (instance.m !== null) {
1440                    queuePostRenderEffect(instance.m, parentSuspense);
1441                }
1442                mounted = true;
1443            }
1444            else {
1445                // updateComponent
1446                // This is triggered by mutation of component's own state (next: null)
1447                // OR parent calling processComponent (next: HostVNode)
1448                const { next } = instance;
1449                if (next !== null) {
1450                    updateComponentPreRender(instance, next);
1451                }
1452                const prevTree = instance.subTree;
1453                const nextTree = (instance.subTree = renderComponentRoot(instance));
1454                // beforeUpdate hook
1455                if (instance.bu !== null) {
1456                    invokeHooks(instance.bu);
1457                }
1458                // reset refs
1459                // only needed if previous patch had refs
1460                if (instance.refs !== EMPTY_OBJ) {
1461                    instance.refs = {};
1462                }
1463                patch(prevTree, nextTree, 
1464                // parent may have changed if it's in a portal
1465                hostParentNode(prevTree.el), 
1466                // anchor may have changed if it's in a fragment
1467                getNextHostNode(prevTree), instance, parentSuspense, isSVG);
1468                instance.vnode.el = nextTree.el;
1469                if (next === null) {
1470                    // self-triggered update. In case of HOC, update parent component
1471                    // vnode el. HOC is indicated by parent instance's subTree pointing
1472                    // to child component's vnode
1473                    updateHOCHostEl(instance, nextTree.el);
1474                }
1475                // updated hook
1476                if (instance.u !== null) {
1477                    queuePostRenderEffect(instance.u, parentSuspense);
1478                }
1479            }
1480        },  prodEffectOptions);
1481    }
1482    function updateComponentPreRender(instance, nextVNode) {
1483        nextVNode.component = instance;
1484        instance.vnode = nextVNode;
1485        instance.next = null;
1486        resolveProps(instance, nextVNode.props, nextVNode.type.props);
1487        resolveSlots(instance, nextVNode.children);
1488    }
1489    function updateHOCHostEl({ vnode, parent }, el) {
1490        while (parent && parent.subTree === vnode) {
1491            (vnode = parent.vnode).el = el;
1492            parent = parent.parent;
1493        }
1494    }
1495    function patchChildren(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized = false) {
1496        const c1 = n1 && n1.children;
1497        const prevShapeFlag = n1 ? n1.shapeFlag : 0;
1498        const c2 = n2.children;
1499        const { patchFlag, shapeFlag } = n2;
1500        if (patchFlag === -1 /* BAIL */) {
1501            optimized = false;
1502        }
1503        // fast path
1504        if (patchFlag > 0) {
1505            if (patchFlag & 64 /* KEYED_FRAGMENT */) {
1506                // this could be either fully-keyed or mixed (some keyed some not)
1507                // presence of patchFlag means children are guaranteed to be arrays
1508                patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
1509                return;
1510            }
1511            else if (patchFlag & 128 /* UNKEYED_FRAGMENT */) {
1512                // unkeyed
1513                patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
1514                return;
1515            }
1516        }
1517        // children has 3 possibilities: text, array or no children.
1518        if (shapeFlag & 8 /* TEXT_CHILDREN */) {
1519            // text children fast path
1520            if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
1521                unmountChildren(c1, parentComponent, parentSuspense);
1522            }
1523            if (c2 !== c1) {
1524                hostSetElementText(container, c2);
1525            }
1526        }
1527        else {
1528            if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
1529                // prev children was array
1530                if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
1531                    // two arrays, cannot assume anything, do full diff
1532                    patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
1533                }
1534                else {
1535                    // no new children, just unmount old
1536                    unmountChildren(c1, parentComponent, parentSuspense, true);
1537                }
1538            }
1539            else {
1540                // prev children was text OR null
1541                // new children is array OR null
1542                if (prevShapeFlag & 8 /* TEXT_CHILDREN */) {
1543                    hostSetElementText(container, '');
1544                }
1545                // mount new if array
1546                if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
1547                    mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG);
1548                }
1549            }
1550        }
1551    }
1552    function patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, optimized) {
1553        c1 = c1 || EMPTY_ARR;
1554        c2 = c2 || EMPTY_ARR;
1555        const oldLength = c1.length;
1556        const newLength = c2.length;
1557        const commonLength = Math.min(oldLength, newLength);
1558        let i;
1559        for (i = 0; i < commonLength; i++) {
1560            const nextChild = (c2[i] = normalizeVNode(c2[i]));
1561            patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, optimized);
1562        }
1563        if (oldLength > newLength) {
1564            // remove old
1565            unmountChildren(c1, parentComponent, parentSuspense, true, commonLength);
1566        }
1567        else {
1568            // mount new
1569            mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, commonLength);
1570        }
1571    }
1572    // can be all-keyed or mixed
1573    function patchKeyedChildren(c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, optimized) {
1574        let i = 0;
1575        const l2 = c2.length;
1576        let e1 = c1.length - 1; // prev ending index
1577        let e2 = l2 - 1; // next ending index
1578        // 1. sync from start
1579        // (a b) c
1580        // (a b) d e
1581        while (i <= e1 && i <= e2) {
1582            const n1 = c1[i];
1583            const n2 = (c2[i] = normalizeVNode(c2[i]));
1584            if (isSameType$1(n1, n2)) {
1585                patch(n1, n2, container, parentAnchor, parentComponent, parentSuspense, isSVG, optimized);
1586            }
1587            else {
1588                break;
1589            }
1590            i++;
1591        }
1592        // 2. sync from end
1593        // a (b c)
1594        // d e (b c)
1595        while (i <= e1 && i <= e2) {
1596            const n1 = c1[e1];
1597            const n2 = (c2[e2] = normalizeVNode(c2[e2]));
1598            if (isSameType$1(n1, n2)) {
1599                patch(n1, n2, container, parentAnchor, parentComponent, parentSuspense, isSVG, optimized);
1600            }
1601            else {
1602                break;
1603            }
1604            e1--;
1605            e2--;
1606        }
1607        // 3. common sequence + mount
1608        // (a b)
1609        // (a b) c
1610        // i = 2, e1 = 1, e2 = 2
1611        // (a b)
1612        // c (a b)
1613        // i = 0, e1 = -1, e2 = 0
1614        if (i > e1) {
1615            if (i <= e2) {
1616                const nextPos = e2 + 1;
1617                const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
1618                while (i <= e2) {
1619                    patch(null, (c2[i] = normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG);
1620                    i++;
1621                }
1622            }
1623        }
1624        // 4. common sequence + unmount
1625        // (a b) c
1626        // (a b)
1627        // i = 2, e1 = 2, e2 = 1
1628        // a (b c)
1629        // (b c)
1630        // i = 0, e1 = 0, e2 = -1
1631        else if (i > e2) {
1632            while (i <= e1) {
1633                unmount(c1[i], parentComponent, parentSuspense, true);
1634                i++;
1635            }
1636        }
1637        // 5. unknown sequence
1638        // [i ... e1 + 1]: a b [c d e] f g
1639        // [i ... e2 + 1]: a b [e d c h] f g
1640        // i = 2, e1 = 4, e2 = 5
1641        else {
1642            const s1 = i; // prev starting index
1643            const s2 = i; // next starting index
1644            // 5.1 build key:index map for newChildren
1645            const keyToNewIndexMap = new Map();
1646            for (i = s2; i <= e2; i++) {
1647                const nextChild = (c2[i] = normalizeVNode(c2[i]));
1648                if (nextChild.key != null) {
1649                    keyToNewIndexMap.set(nextChild.key, i);
1650                }
1651            }
1652            // 5.2 loop through old children left to be patched and try to patch
1653            // matching nodes & remove nodes that are no longer present
1654            let j;
1655            let patched = 0;
1656            const toBePatched = e2 - s2 + 1;
1657            let moved = false;
1658            // used to track whether any node has moved
1659            let maxNewIndexSoFar = 0;
1660            // works as Map<newIndex, oldIndex>
1661            // Note that oldIndex is offset by +1
1662            // and oldIndex = 0 is a special value indicating the new node has
1663            // no corresponding old node.
1664            // used for determining longest stable subsequence
1665            const newIndexToOldIndexMap = [];
1666            for (i = 0; i < toBePatched; i++)
1667                newIndexToOldIndexMap.push(0);
1668            for (i = s1; i <= e1; i++) {
1669                const prevChild = c1[i];
1670                if (patched >= toBePatched) {
1671                    // all new children have been patched so this can only be a removal
1672                    unmount(prevChild, parentComponent, parentSuspense, true);
1673                    continue;
1674                }
1675                let newIndex;
1676                if (prevChild.key != null) {
1677                    newIndex = keyToNewIndexMap.get(prevChild.key);
1678                }
1679                else {
1680                    // key-less node, try to locate a key-less node of the same type
1681                    for (j = s2; j <= e2; j++) {
1682                        if (newIndexToOldIndexMap[j - s2] === 0 &&
1683                            isSameType$1(prevChild, c2[j])) {
1684                            newIndex = j;
1685                            break;
1686                        }
1687                    }
1688                }
1689                if (newIndex === undefined) {
1690                    unmount(prevChild, parentComponent, parentSuspense, true);
1691                }
1692                else {
1693                    newIndexToOldIndexMap[newIndex - s2] = i + 1;
1694                    if (newIndex >= maxNewIndexSoFar) {
1695                        maxNewIndexSoFar = newIndex;
1696                    }
1697                    else {
1698                        moved = true;
1699                    }
1700                    patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, optimized);
1701                    patched++;
1702                }
1703            }
1704            // 5.3 move and mount
1705            // generate longest stable subsequence only when nodes have moved
1706            const increasingNewIndexSequence = moved
1707                ? getSequence(newIndexToOldIndexMap)
1708                : EMPTY_ARR;
1709            j = increasingNewIndexSequence.length - 1;
1710            // looping backwards so that we can use last patched node as anchor
1711            for (i = toBePatched - 1; i >= 0; i--) {
1712                const nextIndex = s2 + i;
1713                const nextChild = c2[nextIndex];
1714                const anchor = nextIndex + 1 < l2
1715                    ? c2[nextIndex + 1].el
1716                    : parentAnchor;
1717                if (newIndexToOldIndexMap[i] === 0) {
1718                    // mount new
1719                    patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG);
1720                }
1721                else if (moved) {
1722                    // move if:
1723                    // There is no stable subsequence (e.g. a reverse)
1724                    // OR current node is not among the stable sequence
1725                    if (j < 0 || i !== increasingNewIndexSequence[j]) {
1726                        move(nextChild, container, anchor);
1727                    }
1728                    else {
1729                        j--;
1730                    }
1731                }
1732            }
1733        }
1734    }
1735    function move(vnode, container, anchor) {
1736        if (vnode.component !== null) {
1737            move(vnode.component.subTree, container, anchor);
1738            return;
1739        }
1740        if ( vnode.type === Suspense) {
1741            const suspense = vnode.suspense;
1742            move(suspense.isResolved ? suspense.subTree : suspense.fallbackTree, container, anchor);
1743            suspense.container = container;
1744            return;
1745        }
1746        if (vnode.type === Fragment) {
1747            hostInsert(vnode.el, container, anchor);
1748            const children = vnode.children;
1749            for (let i = 0; i < children.length; i++) {
1750                move(children[i], container, anchor);
1751            }
1752            hostInsert(vnode.anchor, container, anchor);
1753        }
1754        else {
1755            hostInsert(vnode.el, container, anchor);
1756        }
1757    }
1758    function unmount(vnode, parentComponent, parentSuspense, doRemove) {
1759        const { props, ref, type, component, suspense, children, dynamicChildren, shapeFlag, anchor } = vnode;
1760        // unset ref
1761        if (ref !== null && parentComponent !== null) {
1762            setRef(ref, null, parentComponent, null);
1763        }
1764        if (component != null) {
1765            unmountComponent(component, parentSuspense, doRemove);
1766            return;
1767        }
1768        if ( suspense != null) {
1769            unmountSuspense(suspense, parentComponent, parentSuspense, doRemove);
1770            return;
1771        }
1772        if (props != null && props.vnodeBeforeUnmount != null) {
1773            invokeDirectiveHook(props.vnodeBeforeUnmount, parentComponent, vnode);
1774        }
1775        const shouldRemoveChildren = type === Fragment && doRemove;
1776        if (dynamicChildren != null) {
1777            unmountChildren(dynamicChildren, parentComponent, parentSuspense, shouldRemoveChildren);
1778        }
1779        else if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
1780            unmountChildren(children, parentComponent, parentSuspense, shouldRemoveChildren);
1781        }
1782        if (doRemove) {
1783            hostRemove(vnode.el);
1784            if (anchor != null)
1785                hostRemove(anchor);
1786        }
1787        if (props != null && props.vnodeUnmounted != null) {
1788            queuePostRenderEffect(() => {
1789                invokeDirectiveHook(props.vnodeUnmounted, parentComponent, vnode);
1790            }, parentSuspense);
1791        }
1792    }
1793    function unmountComponent(instance, parentSuspense, doRemove) {
1794        const { bum, effects, update, subTree, um } = instance;
1795        // beforeUnmount hook
1796        if (bum !== null) {
1797            invokeHooks(bum);
1798        }
1799        if (effects !== null) {
1800            for (let i = 0; i < effects.length; i++) {
1801                reactivity.stop(effects[i]);
1802            }
1803        }
1804        // update may be null if a component is unmounted before its async
1805        // setup has resolved.
1806        if (update !== null) {
1807            reactivity.stop(update);
1808            unmount(subTree, instance, parentSuspense, doRemove);
1809        }
1810        // unmounted hook
1811        if (um !== null) {
1812            queuePostRenderEffect(um, parentSuspense);
1813        }
1814        queuePostFlushCb(() => {
1815            instance.isUnmounted = true;
1816        });
1817        // A component with async dep inside a pending suspense is unmounted before
1818        // its async dep resolves. This should remove the dep from the suspense, and
1819        // cause the suspense to resolve immediately if that was the last dep.
1820        if (
1821            parentSuspense !== null &&
1822            !parentSuspense.isResolved &&
1823            !parentSuspense.isUnmounted &&
1824            instance.asyncDep !== null &&
1825            !instance.asyncResolved) {
1826            parentSuspense.deps--;
1827            if (parentSuspense.deps === 0) {
1828                resolveSuspense(parentSuspense);
1829            }
1830        }
1831    }
1832    function unmountSuspense(suspense, parentComponent, parentSuspense, doRemove) {
1833        suspense.isUnmounted = true;
1834        unmount(suspense.subTree, parentComponent, parentSuspense, doRemove);
1835        if (!suspense.isResolved) {
1836            unmount(suspense.fallbackTree, parentComponent, parentSuspense, doRemove);
1837        }
1838    }
1839    function unmountChildren(children, parentComponent, parentSuspense, doRemove, start = 0) {
1840        for (let i = start; i < children.length; i++) {
1841            unmount(children[i], parentComponent, parentSuspense, doRemove);
1842        }
1843    }
1844    function getNextHostNode({ component, suspense, anchor, el }) {
1845        if (component !== null) {
1846            return getNextHostNode(component.subTree);
1847        }
1848        if ( suspense !== null) {
1849            return getNextHostNode(suspense.isResolved ? suspense.subTree : suspense.fallbackTree);
1850        }
1851        return hostNextSibling((anchor || el));
1852    }
1853    function setRef(ref, oldRef, parent, value) {
1854        const refs = parent.refs === EMPTY_OBJ ? (parent.refs = {}) : parent.refs;
1855        const renderContext = reactivity.toRaw(parent.renderContext);
1856        // unset old ref
1857        if (oldRef !== null && oldRef !== ref) {
1858            if (isString(oldRef)) {
1859                refs[oldRef] = null;
1860                const oldSetupRef = renderContext[oldRef];
1861                if (reactivity.isRef(oldSetupRef)) {
1862                    oldSetupRef.value = null;
1863                }
1864            }
1865            else if (reactivity.isRef(oldRef)) {
1866                oldRef.value = null;
1867            }
1868        }
1869        if (isString(ref)) {
1870            const setupRef = renderContext[ref];
1871            if (reactivity.isRef(setupRef)) {
1872                setupRef.value = value;
1873            }
1874            refs[ref] = value;
1875        }
1876        else if (reactivity.isRef(ref)) {
1877            ref.value = value;
1878        }
1879        else if (isFunction(ref)) {
1880            ref(value, refs);
1881        }
1882    }
1883    function render(vnode, rawContainer) {
1884        let container = rawContainer;
1885        if (isString(container)) {
1886            container = hostQuerySelector(container);
1887            if (!container) {
1888                return;
1889            }
1890        }
1891        if (vnode == null) {
1892            if (container._vnode) {
1893                unmount(container._vnode, null, null, true);
1894            }
1895        }
1896        else {
1897            patch(container._vnode || null, vnode, container);
1898        }
1899        flushPostFlushCbs();
1900        container._vnode = vnode;
1901    }
1902    return {
1903        render,
1904        createApp: createAppAPI(render)
1905    };
1906}
1907// https://en.wikipedia.org/wiki/Longest_increasing_subsequence
1908function getSequence(arr) {
1909    const p = arr.slice();
1910    const result = [0];
1911    let i, j, u, v, c;
1912    const len = arr.length;
1913    for (i = 0; i < len; i++) {
1914        const arrI = arr[i];
1915        if (arrI !== 0) {
1916            j = result[result.length - 1];
1917            if (arr[j] < arrI) {
1918                p[i] = j;
1919                result.push(i);
1920                continue;
1921            }
1922            u = 0;
1923            v = result.length - 1;
1924            while (u < v) {
1925                c = ((u + v) / 2) | 0;
1926                if (arr[result[c]] < arrI) {
1927                    u = c + 1;
1928                }
1929                else {
1930                    v = c;
1931                }
1932            }
1933            if (arrI < arr[result[u]]) {
1934                if (u > 0) {
1935                    p[i] = result[u - 1];
1936                }
1937                result[u] = i;
1938            }
1939        }
1940    }
1941    u = result.length;
1942    v = result[u - 1];
1943    while (u-- > 0) {
1944        result[u] = v;
1945        v = p[v];
1946    }
1947    return result;
1948}
1949
1950const invoke = (fn) => fn();
1951// implementation
1952function watch(effectOrSource, cbOrOptions, options) {
1953    if (isFunction(cbOrOptions)) {
1954        // effect callback as 2nd argument - this is a source watcher
1955        return doWatch(effectOrSource, cbOrOptions, options);
1956    }
1957    else {
1958        // 2nd argument is either missing or an options object
1959        // - this is a simple effect watcher
1960        return doWatch(effectOrSource, null, cbOrOptions);
1961    }
1962}
1963function doWatch(source, cb, { lazy, deep, flush, onTrack, onTrigger } = EMPTY_OBJ) {
1964    const instance = currentInstance;
1965    const suspense = currentSuspense;
1966    let getter;
1967    if (isArray(source)) {
1968        getter = () => source.map(s => reactivity.isRef(s)
1969            ? s.value
1970            : callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */));
1971    }
1972    else if (reactivity.isRef(source)) {
1973        getter = () => source.value;
1974    }
1975    else if (cb) {
1976        // getter with cb
1977        getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */);
1978    }
1979    else {
1980        // no cb -> simple effect
1981        getter = () => {
1982            if (instance && instance.isUnmounted) {
1983                return;
1984            }
1985            if (cleanup) {
1986                cleanup();
1987            }
1988            return callWithErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [registerCleanup]);
1989        };
1990    }
1991    if (deep) {
1992        const baseGetter = getter;
1993        getter = () => traverse(baseGetter());
1994    }
1995    let cleanup;
1996    const registerCleanup = (fn) => {
1997        // TODO wrap the cleanup fn for error handling
1998        cleanup = runner.onStop = () => {
1999            callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */);
2000        };
2001    };
2002    let oldValue = isArray(source) ? [] : undefined;
2003    const applyCb = cb
2004        ? () => {
2005            if (instance && instance.isUnmounted) {
2006                return;
2007            }
2008            const newValue = runner();
2009            if (deep || newValue !== oldValue) {
2010                // cleanup before running cb again
2011                if (cleanup) {
2012                    cleanup();
2013                }
2014                callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [
2015                    newValue,
2016                    oldValue,
2017                    registerCleanup
2018                ]);
2019                oldValue = newValue;
2020            }
2021        }
2022        : void 0;
2023    let scheduler;
2024    if (flush === 'sync') {
2025        scheduler = invoke;
2026    }
2027    else if (flush === 'pre') {
2028        scheduler = job => {
2029            if (!instance || instance.vnode.el != null) {
2030                queueJob(job);
2031            }
2032            else {
2033                // with 'pre' option, the first call must happen before
2034                // the component is mounted so it is called synchronously.
2035                job();
2036            }
2037        };
2038    }
2039    else {
2040        scheduler = job => {
2041            queuePostRenderEffect(job, suspense);
2042        };
2043    }
2044    const runner = reactivity.effect(getter, {
2045        lazy: true,
2046        // so it runs before component update effects in pre flush mode
2047        computed: true,
2048        onTrack,
2049        onTrigger,
2050        scheduler: applyCb ? () => scheduler(applyCb) : scheduler
2051    });
2052    if (!lazy) {
2053        if (applyCb) {
2054            scheduler(applyCb);
2055        }
2056        else {
2057            scheduler(runner);
2058        }
2059    }
2060    else {
2061        oldValue = runner();
2062    }
2063    recordEffect(runner);
2064    return () => {
2065        reactivity.stop(runner);
2066    };
2067}
2068// this.$watch
2069function instanceWatch(source, cb, options) {
2070    const ctx = this.renderProxy;
2071    const getter = isString(source) ? () => ctx[source] : source.bind(ctx);
2072    const stop = watch(getter, cb.bind(ctx), options);
2073    onBeforeUnmount(stop, this);
2074    return stop;
2075}
2076function traverse(value, seen = new Set()) {
2077    if (!isObject(value) || seen.has(value)) {
2078        return;
2079    }
2080    seen.add(value);
2081    if (isArray(value)) {
2082        for (let i = 0; i < value.length; i++) {
2083            traverse(value[i], seen);
2084        }
2085    }
2086    else if (value instanceof Map) {
2087        value.forEach((v, key) => {
2088            // to register mutation dep for existing keys
2089            traverse(value.get(key), seen);
2090        });
2091    }
2092    else if (value instanceof Set) {
2093        value.forEach(v => {
2094            traverse(v, seen);
2095        });
2096    }
2097    else {
2098        for (const key in value) {
2099            traverse(value[key], seen);
2100        }
2101    }
2102    return value;
2103}
2104
2105const PublicInstanceProxyHandlers = {
2106    get(target, key) {
2107        const { renderContext, data, props, propsProxy } = target;
2108        if (data !== EMPTY_OBJ && hasOwn(data, key)) {
2109            return data[key];
2110        }
2111        else if (hasOwn(renderContext, key)) {
2112            return renderContext[key];
2113        }
2114        else if (hasOwn(props, key)) {
2115            // return the value from propsProxy for ref unwrapping and readonly
2116            return propsProxy[key];
2117        }
2118        else {
2119            // TODO simplify this?
2120            switch (key) {
2121                case '$data':
2122                    return data;
2123                case '$props':
2124                    return propsProxy;
2125                case '$attrs':
2126                    return target.attrs;
2127                case '$slots':
2128                    return target.slots;
2129                case '$refs':
2130                    return target.refs;
2131                case '$parent':
2132                    return target.parent;
2133                case '$root':
2134                    return target.root;
2135                case '$emit':
2136                    return target.emit;
2137                case '$el':
2138                    return target.vnode.el;
2139                case '$options':
2140                    return target.type;
2141                default:
2142                    // methods are only exposed when options are supported
2143                    {
2144                        switch (key) {
2145                            case '$forceUpdate':
2146                                return target.update;
2147                            case '$nextTick':
2148                                return nextTick;
2149                            case '$watch':
2150                                return instanceWatch.bind(target);
2151                        }
2152                    }
2153                    return target.user[key];
2154            }
2155        }
2156    },
2157    // this trap is only called in browser-compiled render functions that use
2158    // `with (this) {}`
2159    has(_, key) {
2160        return key[0] !== '_' && !globalsWhitelist.has(key);
2161    },
2162    set(target, key, value) {
2163        const { data, renderContext } = target;
2164        if (data !== EMPTY_OBJ && hasOwn(data, key)) {
2165            data[key] = value;
2166        }
2167        else if (hasOwn(renderContext, key)) {
2168            renderContext[key] = value;
2169        }
2170        else if (key[0] === '$' && key.slice(1) in target) {
2171            // TODO warn attempt of mutating public property
2172            return false;
2173        }
2174        else if (key in target.props) {
2175            // TODO warn attempt of mutating prop
2176            return false;
2177        }
2178        else {
2179            target.user[key] = value;
2180        }
2181        return true;
2182    }
2183};
2184
2185function provide(key, value) {
2186    if (!currentInstance) ;
2187    else {
2188        let provides = currentInstance.provides;
2189        // by default an instance inherits its parent's provides object
2190        // but when it needs to provide values of its own, it creates its
2191        // own provides object using parent provides object as prototype.
2192        // this way in `inject` we can simply look up injections from direct
2193        // parent and let the prototype chain do the work.
2194        const parentProvides = currentInstance.parent && currentInstance.parent.provides;
2195        if (parentProvides === provides) {
2196            provides = currentInstance.provides = Object.create(parentProvides);
2197        }
2198        provides[key] = value;
2199    }
2200}
2201function inject(key, defaultValue) {
2202    if (currentInstance) {
2203        const provides = currentInstance.provides;
2204        if (key in provides) {
2205            return provides[key];
2206        }
2207        else if (defaultValue !== undefined) {
2208            return defaultValue;
2209        }
2210    }
2211}
2212
2213function applyOptions(instance, options, asMixin = false) {
2214    const renderContext = instance.renderContext === EMPTY_OBJ
2215        ? (instance.renderContext = reactivity.reactive({}))
2216        : instance.renderContext;
2217    const ctx = instance.renderProxy;
2218    const { 
2219    // composition
2220    mixins, extends: extendsOptions, 
2221    // state
2222    data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions, 
2223    // assets
2224    components, directives, 
2225    // lifecycle
2226    beforeMount, mounted, beforeUpdate, updated, 
2227    // TODO activated
2228    // TODO deactivated
2229    beforeUnmount, unmounted, renderTracked, renderTriggered, errorCaptured } = options;
2230    const globalMixins = instance.appContext.mixins;
2231    // applyOptions is called non-as-mixin once per instance
2232    if (!asMixin) {
2233        callSyncHook('beforeCreate', options, ctx, globalMixins);
2234        // global mixins are applied first
2235        applyMixins(instance, globalMixins);
2236    }
2237    // extending a base component...
2238    if (extendsOptions) {
2239        applyOptions(instance, extendsOptions, true);
2240    }
2241    // local mixins
2242    if (mixins) {
2243        applyMixins(instance, mixins);
2244    }
2245    // state options
2246    if (dataOptions) {
2247        const data = isFunction(dataOptions) ? dataOptions.call(ctx) : dataOptions;
2248        if (!isObject(data)) ;
2249        else if (instance.data === EMPTY_OBJ) {
2250            instance.data = reactivity.reactive(data);
2251        }
2252        else {
2253            // existing data: this is a mixin or extends.
2254            extend(instance.data, data);
2255        }
2256    }
2257    if (computedOptions) {
2258        for (const key in computedOptions) {
2259            const opt = computedOptions[key];
2260            renderContext[key] = isFunction(opt)
2261                ? computed(opt.bind(ctx))
2262                : computed({
2263                    get: opt.get.bind(ctx),
2264                    set: opt.set.bind(ctx)
2265                });
2266        }
2267    }
2268    if (methods) {
2269        for (const key in methods) {
2270            renderContext[key] = methods[key].bind(ctx);
2271        }
2272    }
2273    if (watchOptions) {
2274        for (const key in watchOptions) {
2275            const raw = watchOptions[key];
2276            const getter = () => ctx[key];
2277            if (isString(raw)) {
2278                const handler = renderContext[raw];
2279                if (isFunction(handler)) {
2280                    watch(getter, handler);
2281                }
2282            }
2283            else if (isFunction(raw)) {
2284                watch(getter, raw.bind(ctx));
2285            }
2286            else if (isObject(raw)) {
2287                // TODO 2.x compat
2288                watch(getter, raw.handler.bind(ctx), raw);
2289            }
2290        }
2291    }
2292    if (provideOptions) {
2293        const provides = isFunction(provideOptions)
2294            ? provideOptions.call(ctx)
2295            : provideOptions;
2296        for (const key in provides) {
2297            provide(key, provides[key]);
2298        }
2299    }
2300    if (injectOptions) {
2301        if (isArray(injectOptions)) {
2302            for (let i = 0; i < injectOptions.length; i++) {
2303                const key = injectOptions[i];
2304                renderContext[key] = inject(key);
2305            }
2306        }
2307        else {
2308            for (const key in injectOptions) {
2309                const opt = injectOptions[key];
2310                if (isObject(opt)) {
2311                    renderContext[key] = inject(opt.from, opt.default);
2312                }
2313                else {
2314                    renderContext[key] = inject(opt);
2315                }
2316            }
2317        }
2318    }
2319    // asset options
2320    if (components) {
2321        extend(instance.components, components);
2322    }
2323    if (directives) {
2324        extend(instance.directives, directives);
2325    }
2326    // lifecycle options
2327    if (!asMixin) {
2328        callSyncHook('created', options, ctx, globalMixins);
2329    }
2330    if (beforeMount) {
2331        onBeforeMount(beforeMount.bind(ctx));
2332    }
2333    if (mounted) {
2334        onMounted(mounted.bind(ctx));
2335    }
2336    if (beforeUpdate) {
2337        onBeforeUpdate(beforeUpdate.bind(ctx));
2338    }
2339    if (updated) {
2340        onUpdated(updated.bind(ctx));
2341    }
2342    if (errorCaptured) {
2343        onErrorCaptured(errorCaptured.bind(ctx));
2344    }
2345    if (renderTracked) {
2346        onRenderTracked(renderTracked.bind(ctx));
2347    }
2348    if (renderTriggered) {
2349        onRenderTriggered(renderTriggered.bind(ctx));
2350    }
2351    if (beforeUnmount) {
2352        onBeforeUnmount(beforeUnmount.bind(ctx));
2353    }
2354    if (unmounted) {
2355        onUnmounted(unmounted.bind(ctx));
2356    }
2357}
2358function callSyncHook(name, options, ctx, globalMixins) {
2359    callHookFromMixins(name, globalMixins, ctx);
2360    const baseHook = options.extends && options.extends[name];
2361    if (baseHook) {
2362        baseHook.call(ctx);
2363    }
2364    const mixins = options.mixins;
2365    if (mixins) {
2366        callHookFromMixins(name, mixins, ctx);
2367    }
2368    const selfHook = options[name];
2369    if (selfHook) {
2370        selfHook.call(ctx);
2371    }
2372}
2373function callHookFromMixins(name, mixins, ctx) {
2374    for (let i = 0; i < mixins.length; i++) {
2375        const fn = mixins[i][name];
2376        if (fn) {
2377            fn.call(ctx);
2378        }
2379    }
2380}
2381function applyMixins(instance, mixins) {
2382    for (let i = 0; i < mixins.length; i++) {
2383        applyOptions(instance, mixins[i], true);
2384    }
2385}
2386
2387const emptyAppContext = createAppContext();
2388function createComponentInstance(vnode, parent) {
2389    // inherit parent app context - or - if root, adopt from root vnode
2390    const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
2391    const instance = {
2392        vnode,
2393        parent,
2394        appContext,
2395        type: vnode.type,
2396        root: null,
2397        next: null,
2398        subTree: null,
2399        update: null,
2400        render: null,
2401        renderProxy: null,
2402        propsProxy: null,
2403        setupContext: null,
2404        effects: null,
2405        provides: parent ? parent.provides : Object.create(appContext.provides),
2406        // setup context properties
2407        renderContext: EMPTY_OBJ,
2408        data: EMPTY_OBJ,
2409        props: EMPTY_OBJ,
2410        attrs: EMPTY_OBJ,
2411        slots: EMPTY_OBJ,
2412        refs: EMPTY_OBJ,
2413        // per-instance asset storage (mutable during options resolution)
2414        components: Object.create(appContext.components),
2415        directives: Object.create(appContext.directives),
2416        // async dependency management
2417        asyncDep: null,
2418        asyncResult: null,
2419        asyncResolved: false,
2420        // user namespace for storing whatever the user assigns to `this`
2421        user: {},
2422        // lifecycle hooks
2423        // not using enums here because it results in computed properties
2424        isUnmounted: false,
2425        bc: null,
2426        c: null,
2427        bm: null,
2428        m: null,
2429        bu: null,
2430        u: null,
2431        um: null,
2432        bum: null,
2433        da: null,
2434        a: null,
2435        rtg: null,
2436        rtc: null,
2437        ec: null,
2438        emit: (event, ...args) => {
2439            const props = instance.vnode.props || EMPTY_OBJ;
2440            const handler = props[`on${event}`] || props[`on${capitalize(event)}`];
2441            if (handler) {
2442                if (isArray(handler)) {
2443                    for (let i = 0; i < handler.length; i++) {
2444                        callWithAsyncErrorHandling(handler[i], instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
2445                    }
2446                }
2447                else {
2448                    callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
2449                }
2450            }
2451        }
2452    };
2453    instance.root = parent ? parent.root : instance;
2454    return instance;
2455}
2456let currentInstance = null;
2457let currentSuspense = null;
2458const getCurrentInstance = () => currentInstance;
2459const setCurrentInstance = (instance) => {
2460    currentInstance = instance;
2461};
2462function setupStatefulComponent(instance, parentSuspense) {
2463    const Component = instance.type;
2464    // 1. create render proxy
2465    instance.renderProxy = new Proxy(instance, PublicInstanceProxyHandlers);
2466    // 2. create props proxy
2467    // the propsProxy is a reactive AND readonly proxy to the actual props.
2468    // it will be updated in resolveProps() on updates before render
2469    const propsProxy = (instance.propsProxy = reactivity.readonly(instance.props));
2470    // 3. call setup()
2471    const { setup } = Component;
2472    if (setup) {
2473        const setupContext = (instance.setupContext =
2474            setup.length > 1 ? createSetupContext(instance) : null);
2475        currentInstance = instance;
2476        currentSuspense = parentSuspense;
2477        const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [propsProxy, setupContext]);
2478        currentInstance = null;
2479        currentSuspense = null;
2480        if (setupResult &&
2481            isFunction(setupResult.then) &&
2482            isFunction(setupResult.catch)) {
2483            {
2484                // async setup returned Promise.
2485                // bail here and wait for re-entry.
2486                instance.asyncDep = setupResult;
2487            }
2488            return;
2489        }
2490        else {
2491            handleSetupResult(instance, setupResult, parentSuspense);
2492        }
2493    }
2494    else {
2495        finishComponentSetup(instance, parentSuspense);
2496    }
2497}
2498function handleSetupResult(instance, setupResult, parentSuspense) {
2499    if (isFunction(setupResult)) {
2500        // setup returned an inline render function
2501        instance.render = setupResult;
2502    }
2503    else if (isObject(setupResult)) {
2504        // setup returned bindings.
2505        // assuming a render function compiled from template is present.
2506        instance.renderContext = reactivity.reactive(setupResult);
2507    }
2508    finishComponentSetup(instance, parentSuspense);
2509}
2510let compile;
2511function registerRuntimeCompiler(_compile) {
2512    compile = _compile;
2513}
2514function finishComponentSetup(instance, parentSuspense) {
2515    const Component = instance.type;
2516    if (!instance.render) {
2517        if (Component.template && !Component.render) {
2518            if (compile) {
2519                Component.render = compile(Component.template, {
2520                    onError(err) { }
2521                });
2522            }
2523        }
2524        instance.render = (Component.render || NOOP);
2525    }
2526    // support for 2.x options
2527    {
2528        currentInstance = instance;
2529        currentSuspense = parentSuspense;
2530        applyOptions(instance, Component);
2531        currentInstance = null;
2532        currentSuspense = null;
2533    }
2534    if (instance.renderContext === EMPTY_OBJ) {
2535        instance.renderContext = reactivity.reactive({});
2536    }
2537}
2538// used to identify a setup context proxy
2539const SetupProxySymbol = Symbol();
2540const SetupProxyHandlers = {};
2541['attrs', 'slots', 'refs'].forEach((type) => {
2542    SetupProxyHandlers[type] = {
2543        get: (instance, key) => instance[type][key],
2544        has: (instance, key) => key === SetupProxySymbol || key in instance[type],
2545        ownKeys: instance => Reflect.ownKeys(instance[type]),
2546        // this is necessary for ownKeys to work properly
2547        getOwnPropertyDescriptor: (instance, key) => Reflect.getOwnPropertyDescriptor(instance[type], key),
2548        set: () => false,
2549        deleteProperty: () => false
2550    };
2551});
2552function createSetupContext(instance) {
2553    const context = {
2554        // attrs, slots & refs are non-reactive, but they need to always expose
2555        // the latest values (instance.xxx may get replaced during updates) so we
2556        // need to expose them through a proxy
2557        attrs: new Proxy(instance, SetupProxyHandlers.attrs),
2558        slots: new Proxy(instance, SetupProxyHandlers.slots),
2559        refs: new Proxy(instance, SetupProxyHandlers.refs),
2560        emit: instance.emit
2561    };
2562    return  context;
2563}
2564
2565// record effects created during a component's setup() so that they can be
2566// stopped when the component unmounts
2567function recordEffect(effect) {
2568    if (currentInstance) {
2569        (currentInstance.effects || (currentInstance.effects = [])).push(effect);
2570    }
2571}
2572function computed(getterOrOptions) {
2573    const c = reactivity.computed(getterOrOptions);
2574    recordEffect(c.effect);
2575    return c;
2576}
2577
2578// Actual implementation
2579function h(type, propsOrChildren, children) {
2580    if (arguments.length === 2) {
2581        if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
2582            // props without children
2583            return createVNode(type, propsOrChildren);
2584        }
2585        else {
2586            // omit props
2587            return createVNode(type, null, propsOrChildren);
2588        }
2589    }
2590    else {
2591        return createVNode(type, propsOrChildren, children);
2592    }
2593}
2594
2595// but the flags are also exported as an actual object for external use
2596const PublicShapeFlags = {
2597    ELEMENT: 1 /* ELEMENT */,
2598    FUNCTIONAL_COMPONENT: 2 /* FUNCTIONAL_COMPONENT */,
2599    STATEFUL_COMPONENT: 4 /* STATEFUL_COMPONENT */,
2600    TEXT_CHILDREN: 8 /* TEXT_CHILDREN */,
2601    ARRAY_CHILDREN: 16 /* ARRAY_CHILDREN */,
2602    SLOTS_CHILDREN: 32 /* SLOTS_CHILDREN */,
2603    COMPONENT: 6 /* COMPONENT */
2604};
2605
2606function resolveComponent(name) {
2607    return resolveAsset('components', name);
2608}
2609function resolveDirective(name) {
2610    return resolveAsset('directives', name);
2611}
2612function resolveAsset(type, name) {
2613    const instance = currentRenderingInstance || currentInstance;
2614    if (instance) {
2615        let camelized;
2616        const registry = instance[type];
2617        const res = registry[name] ||
2618            registry[(camelized = camelize(name))] ||
2619            registry[capitalize(camelized)];
2620        return res;
2621    }
2622}
2623
2624function renderList(source, renderItem) {
2625    let ret = [];
2626    if (isArray(source) || isString(source)) {
2627        for (let i = 0, l = source.length; i < l; i++) {
2628            ret.push(renderItem(source[i], i));
2629        }
2630    }
2631    else if (typeof source === 'number') {
2632        for (let i = 0; i < source; i++) {
2633            ret.push(renderItem(i + 1, i));
2634        }
2635    }
2636    else if (isObject(source)) {
2637        if (source[Symbol.iterator]) {
2638            ret = [];
2639            const iterator = source[Symbol.iterator]();
2640            let result = iterator.next();
2641            while (!result.done) {
2642                ret.push(renderItem(result.value, ret.length));
2643                result = iterator.next();
2644            }
2645        }
2646        else {
2647            const keys = Object.keys(source);
2648            ret = new Array(keys.length);
2649            for (let i = 0, l = keys.length; i < l; i++) {
2650                const key = keys[i];
2651                ret[i] = renderItem(source[key], key, i);
2652            }
2653        }
2654    }
2655    return ret;
2656}
2657
2658// for converting {{ interpolation }} values to displayed strings.
2659function toString(val) {
2660    return val == null
2661        ? ''
2662        : isArray(val) || (isPlainObject(val) && val.toString === objectToString)
2663            ? JSON.stringify(val, null, 2)
2664            : String(val);
2665}
2666
2667// For prefixing keys in v-on="obj" with "on"
2668function toHandlers(obj) {
2669    const ret = {};
2670    for (const key in obj) {
2671        ret[`on${key}`] = obj[key];
2672    }
2673    return ret;
2674}
2675
2676function renderSlot(slots, name, props = {}, 
2677// this is not a user-facing function, so the fallback is always generated by
2678// the compiler and guaranteed to be an array
2679fallback) {
2680    const slot = slots[name];
2681    return (openBlock(),
2682        createBlock(Fragment, { key: props.key }, slot ? slot(props) : fallback || [], slots._compiled ? 0 : -1 /* BAIL */));
2683}
2684
2685function createSlots(slots, dynamicSlots) {
2686    for (let i = 0; i < dynamicSlots.length; i++) {
2687        const slot = dynamicSlots[i];
2688        // array of dynamic slot generated by <template v-for="..." #[...]>
2689        if (isArray(slot)) {
2690            for (let j = 0; j < slot.length; j++) {
2691                slots[slot[j].name] = slot[j].fn;
2692            }
2693        }
2694        else {
2695            // conditional single slot generated by <template v-if="..." #foo>
2696            slots[slot.name] = slot.fn;
2697        }
2698    }
2699    return slots;
2700}
2701
2702Object.defineProperty(exports, 'effect', {
2703  enumerable: true,
2704  get: function () {
2705    return reactivity.effect;
2706  }
2707});
2708Object.defineProperty(exports, 'isReactive', {
2709  enumerable: true,
2710  get: function () {
2711    return reactivity.isReactive;
2712  }
2713});
2714Object.defineProperty(exports, 'isReadonly', {
2715  enumerable: true,
2716  get: function () {
2717    return reactivity.isReadonly;
2718  }
2719});
2720Object.defineProperty(exports, 'isRef', {
2721  enumerable: true,
2722  get: function () {
2723    return reactivity.isRef;
2724  }
2725});
2726Object.defineProperty(exports, 'markNonReactive', {
2727  enumerable: true,
2728  get: function () {
2729    return reactivity.markNonReactive;
2730  }
2731});
2732Object.defineProperty(exports, 'markReadonly', {
2733  enumerable: true,
2734  get: function () {
2735    return reactivity.markReadonly;
2736  }
2737});
2738Object.defineProperty(exports, 'reactive', {
2739  enumerable: true,
2740  get: function () {
2741    return reactivity.reactive;
2742  }
2743});
2744Object.defineProperty(exports, 'readonly', {
2745  enumerable: true,
2746  get: function () {
2747    return reactivity.readonly;
2748  }
2749});
2750Object.defineProperty(exports, 'ref', {
2751  enumerable: true,
2752  get: function () {
2753    return reactivity.ref;
2754  }
2755});
2756Object.defineProperty(exports, 'toRaw', {
2757  enumerable: true,
2758  get: function () {
2759    return reactivity.toRaw;
2760  }
2761});
2762Object.defineProperty(exports, 'toRefs', {
2763  enumerable: true,
2764  get: function () {
2765    return reactivity.toRefs;
2766  }
2767});
2768exports.Comment = Comment;
2769exports.Fragment = Fragment;
2770exports.PatchFlags = PublicPatchFlags;
2771exports.Portal = Portal;
2772exports.ShapeFlags = PublicShapeFlags;
2773exports.Suspense = Suspense;
2774exports.Text = Text;
2775exports.applyDirectives = applyDirectives;
2776exports.callWithAsyncErrorHandling = callWithAsyncErrorHandling;
2777exports.callWithErrorHandling = callWithErrorHandling;
2778exports.camelize = camelize;
2779exports.capitalize = capitalize;
2780exports.cloneVNode = cloneVNode;
2781exports.computed = computed;
2782exports.createBlock = createBlock;
2783exports.createComponent = createComponent;
2784exports.createRenderer = createRenderer;
2785exports.createSlots = createSlots;
2786exports.createVNode = createVNode;
2787exports.getCurrentInstance = getCurrentInstance;
2788exports.h = h;
2789exports.handleError = handleError;
2790exports.inject = inject;
2791exports.instanceWatch = instanceWatch;
2792exports.mergeProps = mergeProps;
2793exports.nextTick = nextTick;
2794exports.onBeforeMount = onBeforeMount;
2795exports.onBeforeUnmount = onBeforeUnmount;
2796exports.onBeforeUpdate = onBeforeUpdate;
2797exports.onErrorCaptured = onErrorCaptured;
2798exports.onMounted = onMounted;
2799exports.onRenderTracked = onRenderTracked;
2800exports.onRenderTriggered = onRenderTriggered;
2801exports.onUnmounted = onUnmounted;
2802exports.onUpdated = onUpdated;
2803exports.openBlock = openBlock;
2804exports.provide = provide;
2805exports.recordEffect = recordEffect;
2806exports.registerRuntimeCompiler = registerRuntimeCompiler;
2807exports.renderList = renderList;
2808exports.renderSlot = renderSlot;
2809exports.resolveComponent = resolveComponent;
2810exports.resolveDirective = resolveDirective;
2811exports.toHandlers = toHandlers;
2812exports.toString = toString;
2813exports.watch = watch;
2814
Full Screen