instaui 0.1.15__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- instaui/__init__.py +9 -0
- instaui/_helper/observable_helper.py +45 -0
- instaui/arco/__init__.py +191 -0
- instaui/arco/_settings.py +25 -0
- instaui/arco/_use_tools/locale.py +50 -0
- instaui/arco/component_types.py +1019 -0
- instaui/arco/components/_utils.py +22 -0
- instaui/arco/components/affix.py +29 -0
- instaui/arco/components/alert.py +42 -0
- instaui/arco/components/anchor.py +42 -0
- instaui/arco/components/auto_complete.py +96 -0
- instaui/arco/components/avatar.py +55 -0
- instaui/arco/components/back_top.py +14 -0
- instaui/arco/components/badge.py +14 -0
- instaui/arco/components/breadcrumb.py +14 -0
- instaui/arco/components/button.py +43 -0
- instaui/arco/components/calendar.py +47 -0
- instaui/arco/components/card.py +14 -0
- instaui/arco/components/carousel.py +33 -0
- instaui/arco/components/cascader.py +111 -0
- instaui/arco/components/checkbox.py +32 -0
- instaui/arco/components/collapse.py +31 -0
- instaui/arco/components/color_picker.py +45 -0
- instaui/arco/components/comment.py +14 -0
- instaui/arco/components/config_provider.py +13 -0
- instaui/arco/components/date_picker.py +111 -0
- instaui/arco/components/descriptions.py +14 -0
- instaui/arco/components/divider.py +13 -0
- instaui/arco/components/drawer.py +98 -0
- instaui/arco/components/dropdown.py +45 -0
- instaui/arco/components/empty.py +14 -0
- instaui/arco/components/form.py +55 -0
- instaui/arco/components/icon.py +17 -0
- instaui/arco/components/image.py +33 -0
- instaui/arco/components/input.py +102 -0
- instaui/arco/components/input_number.py +97 -0
- instaui/arco/components/input_password.py +38 -0
- instaui/arco/components/input_search.py +37 -0
- instaui/arco/components/input_tag.py +110 -0
- instaui/arco/components/layout.py +13 -0
- instaui/arco/components/layout_content.py +6 -0
- instaui/arco/components/layout_footer.py +6 -0
- instaui/arco/components/layout_header.py +6 -0
- instaui/arco/components/layout_sider.py +53 -0
- instaui/arco/components/link.py +36 -0
- instaui/arco/components/list.py +68 -0
- instaui/arco/components/mention.py +97 -0
- instaui/arco/components/menu.py +88 -0
- instaui/arco/components/modal.py +97 -0
- instaui/arco/components/overflow_list.py +29 -0
- instaui/arco/components/page_header.py +29 -0
- instaui/arco/components/pagination.py +45 -0
- instaui/arco/components/pop_confirm.py +58 -0
- instaui/arco/components/popover.py +32 -0
- instaui/arco/components/progress.py +14 -0
- instaui/arco/components/radio.py +40 -0
- instaui/arco/components/radio_group.py +42 -0
- instaui/arco/components/rate.py +45 -0
- instaui/arco/components/resize_box.py +62 -0
- instaui/arco/components/result.py +14 -0
- instaui/arco/components/select.py +182 -0
- instaui/arco/components/skeleton.py +14 -0
- instaui/arco/components/slider.py +38 -0
- instaui/arco/components/space.py +14 -0
- instaui/arco/components/spin.py +14 -0
- instaui/arco/components/split.py +76 -0
- instaui/arco/components/statistic.py +14 -0
- instaui/arco/components/steps.py +32 -0
- instaui/arco/components/switch.py +57 -0
- instaui/arco/components/tab_pane.py +12 -0
- instaui/arco/components/table.py +276 -0
- instaui/arco/components/tabs.py +101 -0
- instaui/arco/components/tag.py +42 -0
- instaui/arco/components/textarea.py +84 -0
- instaui/arco/components/time_picker.py +76 -0
- instaui/arco/components/timeline.py +14 -0
- instaui/arco/components/tooltip.py +29 -0
- instaui/arco/components/transfer.py +58 -0
- instaui/arco/components/tree.py +120 -0
- instaui/arco/components/tree_select.py +86 -0
- instaui/arco/components/trigger.py +58 -0
- instaui/arco/components/typography.py +142 -0
- instaui/arco/components/upload.py +71 -0
- instaui/arco/components/verification_code.py +58 -0
- instaui/arco/components/watermark.py +14 -0
- instaui/arco/locales/__init__.py +4 -0
- instaui/arco/locales/_index.py +31 -0
- instaui/arco/locales/en_us.py +227 -0
- instaui/arco/locales/zh_cn.py +224 -0
- instaui/arco/setup.py +36 -0
- instaui/arco/static/instaui-arco.css +1 -0
- instaui/arco/static/instaui-arco.js +55771 -0
- instaui/arco/types.py +24 -0
- instaui/boot_info.py +43 -0
- instaui/common/jsonable.py +37 -0
- instaui/components/__init__.py +0 -0
- instaui/components/column.py +26 -0
- instaui/components/component.py +47 -0
- instaui/components/content.py +34 -0
- instaui/components/directive.py +55 -0
- instaui/components/element.py +573 -0
- instaui/components/grid.py +213 -0
- instaui/components/html/__init__.py +49 -0
- instaui/components/html/_mixins.py +34 -0
- instaui/components/html/_preset.py +4 -0
- instaui/components/html/button.py +38 -0
- instaui/components/html/checkbox.py +35 -0
- instaui/components/html/date.py +28 -0
- instaui/components/html/div.py +7 -0
- instaui/components/html/form.py +7 -0
- instaui/components/html/heading.py +51 -0
- instaui/components/html/input.py +28 -0
- instaui/components/html/label.py +21 -0
- instaui/components/html/li.py +17 -0
- instaui/components/html/link.py +31 -0
- instaui/components/html/number.py +34 -0
- instaui/components/html/paragraph.py +29 -0
- instaui/components/html/range.py +48 -0
- instaui/components/html/select.py +69 -0
- instaui/components/html/span.py +19 -0
- instaui/components/html/table.py +36 -0
- instaui/components/html/textarea.py +28 -0
- instaui/components/html/ul.py +20 -0
- instaui/components/label.py +5 -0
- instaui/components/markdown/markdown.js +33 -0
- instaui/components/markdown/markdown.py +41 -0
- instaui/components/markdown/static/github-markdown.css +12 -0
- instaui/components/markdown/static/marked.esm.js +2579 -0
- instaui/components/match.py +108 -0
- instaui/components/row.py +17 -0
- instaui/components/shiki_code/shiki_code.js +126 -0
- instaui/components/shiki_code/shiki_code.py +99 -0
- instaui/components/shiki_code/static/langs/css.mjs +5 -0
- instaui/components/shiki_code/static/langs/markdown.mjs +5 -0
- instaui/components/shiki_code/static/langs/python.mjs +5 -0
- instaui/components/shiki_code/static/langs/shell.mjs +2 -0
- instaui/components/shiki_code/static/langs/shellscript.mjs +5 -0
- instaui/components/shiki_code/static/shiki-core.js +5784 -0
- instaui/components/shiki_code/static/shiki-style.css +179 -0
- instaui/components/shiki_code/static/shiki-transformers.js +461 -0
- instaui/components/shiki_code/static/themes/vitesse-dark.mjs +2 -0
- instaui/components/shiki_code/static/themes/vitesse-light.mjs +2 -0
- instaui/components/slot.py +81 -0
- instaui/components/transition_group.py +9 -0
- instaui/components/value_element.py +52 -0
- instaui/components/vfor.py +142 -0
- instaui/components/vif.py +42 -0
- instaui/consts.py +23 -0
- instaui/dependencies/component_dependency.py +22 -0
- instaui/dependencies/plugin_dependency.py +28 -0
- instaui/event/event_mixin.py +12 -0
- instaui/event/js_event.py +82 -0
- instaui/event/vue_event.py +66 -0
- instaui/event/web_event.py +123 -0
- instaui/experimental/__init__.py +3 -0
- instaui/experimental/debug.py +48 -0
- instaui/extra_libs/_echarts.py +3 -0
- instaui/extra_libs/_import_error.py +9 -0
- instaui/extra_libs/_mermaid.py +3 -0
- instaui/extra_libs/_shiki_code.py +3 -0
- instaui/fastapi_server/_utils.py +42 -0
- instaui/fastapi_server/_uvicorn.py +37 -0
- instaui/fastapi_server/debug_mode_router.py +60 -0
- instaui/fastapi_server/dependency_router.py +28 -0
- instaui/fastapi_server/event_router.py +58 -0
- instaui/fastapi_server/middlewares.py +19 -0
- instaui/fastapi_server/request_context.py +19 -0
- instaui/fastapi_server/resource.py +30 -0
- instaui/fastapi_server/server.py +308 -0
- instaui/fastapi_server/watch_router.py +53 -0
- instaui/handlers/_utils.py +88 -0
- instaui/handlers/event_handler.py +60 -0
- instaui/handlers/watch_handler.py +61 -0
- instaui/html_tools.py +94 -0
- instaui/inject.py +33 -0
- instaui/js/__init__.py +4 -0
- instaui/js/js_output.py +15 -0
- instaui/js/lambda_func.py +35 -0
- instaui/launch_collector.py +52 -0
- instaui/page_info.py +13 -0
- instaui/runtime/__init__.py +29 -0
- instaui/runtime/_app.py +234 -0
- instaui/runtime/_inner_helper.py +9 -0
- instaui/runtime/_link_manager.py +89 -0
- instaui/runtime/context.py +47 -0
- instaui/runtime/dataclass.py +30 -0
- instaui/runtime/resource.py +65 -0
- instaui/runtime/scope.py +133 -0
- instaui/runtime/ui_state_scope.py +15 -0
- instaui/settings/__init__.py +4 -0
- instaui/settings/__settings.py +13 -0
- instaui/shadcn_classless/_index.py +42 -0
- instaui/shadcn_classless/static/shadcn-classless.css +403 -0
- instaui/skip.py +12 -0
- instaui/spa_router/__init__.py +26 -0
- instaui/spa_router/_components.py +35 -0
- instaui/spa_router/_file_base_utils.py +273 -0
- instaui/spa_router/_functions.py +122 -0
- instaui/spa_router/_install.py +11 -0
- instaui/spa_router/_route_model.py +117 -0
- instaui/spa_router/_router_box.py +40 -0
- instaui/spa_router/_router_output.py +22 -0
- instaui/spa_router/_router_param_var.py +51 -0
- instaui/spa_router/_types.py +4 -0
- instaui/spa_router/templates/page_routes +60 -0
- instaui/static/insta-ui.css +1 -0
- instaui/static/insta-ui.esm-browser.prod.js +3717 -0
- instaui/static/insta-ui.ico +0 -0
- instaui/static/insta-ui.js.map +1 -0
- instaui/static/instaui-tools-browser.js +511 -0
- instaui/static/templates/debug/sse.html +117 -0
- instaui/static/templates/web.html +74 -0
- instaui/static/templates/webview.html +78 -0
- instaui/static/templates/zero.html +71 -0
- instaui/static/vue.esm-browser.prod.js +9 -0
- instaui/static/vue.global.prod.js +9 -0
- instaui/static/vue.runtime.esm-browser.prod.js +5 -0
- instaui/systems/file_system.py +6 -0
- instaui/systems/func_system.py +119 -0
- instaui/systems/js_system.py +22 -0
- instaui/systems/module_system.py +46 -0
- instaui/systems/pydantic_system.py +27 -0
- instaui/systems/string_system.py +10 -0
- instaui/tailwind/__init__.py +6 -0
- instaui/tailwind/_index.py +24 -0
- instaui/tailwind/static/tailwindcss-v3.min.js +62 -0
- instaui/tailwind/static/tailwindcss-v4.min.js +8 -0
- instaui/template/__init__.py +4 -0
- instaui/template/_utils.py +23 -0
- instaui/template/env.py +7 -0
- instaui/template/web_template.py +49 -0
- instaui/template/webview_template.py +48 -0
- instaui/template/zero_template.py +105 -0
- instaui/ui/__init__.py +144 -0
- instaui/ui/__init__.pyi +149 -0
- instaui/ui/events.py +25 -0
- instaui/ui_functions/input_slient_data.py +16 -0
- instaui/ui_functions/server.py +15 -0
- instaui/ui_functions/str_format.py +36 -0
- instaui/ui_functions/ui_page.py +16 -0
- instaui/ui_functions/ui_types.py +13 -0
- instaui/ui_functions/url_location.py +33 -0
- instaui/vars/_types.py +8 -0
- instaui/vars/data.py +68 -0
- instaui/vars/element_ref.py +40 -0
- instaui/vars/event_context.py +49 -0
- instaui/vars/event_extend.py +0 -0
- instaui/vars/js_computed.py +117 -0
- instaui/vars/mixin_types/common_type.py +5 -0
- instaui/vars/mixin_types/element_binding.py +16 -0
- instaui/vars/mixin_types/observable.py +7 -0
- instaui/vars/mixin_types/pathable.py +14 -0
- instaui/vars/mixin_types/py_binding.py +13 -0
- instaui/vars/mixin_types/str_format_binding.py +8 -0
- instaui/vars/mixin_types/var_type.py +5 -0
- instaui/vars/path_var.py +90 -0
- instaui/vars/ref.py +103 -0
- instaui/vars/slot_prop.py +46 -0
- instaui/vars/state.py +97 -0
- instaui/vars/types.py +24 -0
- instaui/vars/vfor_item.py +204 -0
- instaui/vars/vue_computed.py +81 -0
- instaui/vars/web_computed.py +209 -0
- instaui/vars/web_view_computed.py +1 -0
- instaui/version.py +3 -0
- instaui/watch/_types.py +4 -0
- instaui/watch/_utils.py +3 -0
- instaui/watch/js_watch.py +110 -0
- instaui/watch/vue_watch.py +77 -0
- instaui/watch/web_watch.py +181 -0
- instaui/webview/__init__.py +2 -0
- instaui/webview/_utils.py +8 -0
- instaui/webview/api.py +72 -0
- instaui/webview/func.py +114 -0
- instaui/webview/index.py +161 -0
- instaui/webview/resource.py +172 -0
- instaui/zero/__init__.py +3 -0
- instaui/zero/func.py +123 -0
- instaui/zero/scope.py +109 -0
- instaui-0.1.15.dist-info/METADATA +152 -0
- instaui-0.1.15.dist-info/RECORD +283 -0
- instaui-0.1.15.dist-info/WHEEL +5 -0
- instaui-0.1.15.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,3717 @@
|
|
1
|
+
var Wn = Object.defineProperty;
|
2
|
+
var Un = (e, t, n) => t in e ? Wn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
|
+
var B = (e, t, n) => Un(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
+
import * as Kn from "vue";
|
5
|
+
import { toRaw as Gn, customRef as Ce, toValue as q, unref as W, watch as G, nextTick as Te, isRef as qt, ref as Z, shallowRef as J, watchEffect as Ht, computed as U, readonly as qn, provide as Ie, inject as ee, shallowReactive as Hn, defineComponent as F, reactive as zn, h as A, getCurrentInstance as zt, normalizeStyle as Jn, normalizeClass as Ye, toDisplayString as Jt, onUnmounted as xe, Fragment as De, vModelDynamic as Qn, vShow as Yn, resolveDynamicComponent as ft, normalizeProps as Xn, withDirectives as Zn, onErrorCaptured as er, openBlock as he, createElementBlock as Ve, createElementVNode as tr, createVNode as nr, withCtx as rr, renderList as or, createBlock as sr, TransitionGroup as Qt, KeepAlive as ir } from "vue";
|
6
|
+
let Yt;
|
7
|
+
function ar(e) {
|
8
|
+
Yt = e;
|
9
|
+
}
|
10
|
+
function Xe() {
|
11
|
+
return Yt;
|
12
|
+
}
|
13
|
+
function ye() {
|
14
|
+
const { queryPath: e, pathParams: t, queryParams: n } = Xe();
|
15
|
+
return {
|
16
|
+
path: e,
|
17
|
+
...t === void 0 ? {} : { params: t },
|
18
|
+
...n === void 0 ? {} : { queryParams: n }
|
19
|
+
};
|
20
|
+
}
|
21
|
+
class cr extends Map {
|
22
|
+
constructor(t) {
|
23
|
+
super(), this.factory = t;
|
24
|
+
}
|
25
|
+
getOrDefault(t) {
|
26
|
+
if (!this.has(t)) {
|
27
|
+
const n = this.factory();
|
28
|
+
return this.set(t, n), n;
|
29
|
+
}
|
30
|
+
return super.get(t);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
function _e(e) {
|
34
|
+
return new cr(e);
|
35
|
+
}
|
36
|
+
function Ot(e, t) {
|
37
|
+
Object.entries(e).forEach(([n, r]) => t(r, n));
|
38
|
+
}
|
39
|
+
function Oe(e, t) {
|
40
|
+
return Xt(e, {
|
41
|
+
valueFn: t
|
42
|
+
});
|
43
|
+
}
|
44
|
+
function Xt(e, t) {
|
45
|
+
const { valueFn: n, keyFn: r } = t;
|
46
|
+
return Object.fromEntries(
|
47
|
+
Object.entries(e).map(([o, s], i) => [
|
48
|
+
r ? r(o, s) : o,
|
49
|
+
n(s, o, i)
|
50
|
+
])
|
51
|
+
);
|
52
|
+
}
|
53
|
+
function Zt(e, t, n) {
|
54
|
+
if (Array.isArray(t)) {
|
55
|
+
const [o, ...s] = t;
|
56
|
+
switch (o) {
|
57
|
+
case "!":
|
58
|
+
return !e;
|
59
|
+
case "+":
|
60
|
+
return e + s[0];
|
61
|
+
case "~+":
|
62
|
+
return s[0] + e;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
const r = en(t, n);
|
66
|
+
return e[r];
|
67
|
+
}
|
68
|
+
function en(e, t) {
|
69
|
+
if (typeof e == "string" || typeof e == "number")
|
70
|
+
return e;
|
71
|
+
if (!Array.isArray(e))
|
72
|
+
throw new Error(`Invalid path ${e}`);
|
73
|
+
const [n, ...r] = e;
|
74
|
+
switch (n) {
|
75
|
+
case "bind":
|
76
|
+
if (!t)
|
77
|
+
throw new Error("No bindable function provided");
|
78
|
+
return t(r[0]);
|
79
|
+
default:
|
80
|
+
throw new Error(`Invalid flag ${n} in array at ${e}`);
|
81
|
+
}
|
82
|
+
}
|
83
|
+
function be(e, t, n) {
|
84
|
+
return t.reduce(
|
85
|
+
(r, o) => Zt(r, o, n),
|
86
|
+
e
|
87
|
+
);
|
88
|
+
}
|
89
|
+
function Ze(e, t, n, r) {
|
90
|
+
t.reduce((o, s, i) => {
|
91
|
+
if (i === t.length - 1)
|
92
|
+
o[en(s, r)] = n;
|
93
|
+
else
|
94
|
+
return Zt(o, s, r);
|
95
|
+
}, e);
|
96
|
+
}
|
97
|
+
function tn(e) {
|
98
|
+
return JSON.parse(JSON.stringify(e));
|
99
|
+
}
|
100
|
+
class ur {
|
101
|
+
toString() {
|
102
|
+
return "";
|
103
|
+
}
|
104
|
+
}
|
105
|
+
const we = new ur();
|
106
|
+
function Ee(e) {
|
107
|
+
return Gn(e) === we;
|
108
|
+
}
|
109
|
+
function bt(e, t, n) {
|
110
|
+
const { paths: r, getBindableValueFn: o } = t, { paths: s, getBindableValueFn: i } = t;
|
111
|
+
return r === void 0 || r.length === 0 ? e : Ce(() => ({
|
112
|
+
get() {
|
113
|
+
try {
|
114
|
+
return be(
|
115
|
+
q(e),
|
116
|
+
r,
|
117
|
+
o
|
118
|
+
);
|
119
|
+
} catch {
|
120
|
+
return;
|
121
|
+
}
|
122
|
+
},
|
123
|
+
set(c) {
|
124
|
+
Ze(
|
125
|
+
q(e),
|
126
|
+
s || r,
|
127
|
+
c,
|
128
|
+
i
|
129
|
+
);
|
130
|
+
}
|
131
|
+
}));
|
132
|
+
}
|
133
|
+
function nn(e) {
|
134
|
+
return Ce((t, n) => ({
|
135
|
+
get() {
|
136
|
+
return t(), e;
|
137
|
+
},
|
138
|
+
set(r) {
|
139
|
+
!Ee(e) && JSON.stringify(r) === JSON.stringify(e) || (e = r, n());
|
140
|
+
}
|
141
|
+
}));
|
142
|
+
}
|
143
|
+
function de(e) {
|
144
|
+
return typeof e == "function" ? e() : W(e);
|
145
|
+
}
|
146
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
147
|
+
const et = () => {
|
148
|
+
};
|
149
|
+
function tt(e, t = !1, n = "Timeout") {
|
150
|
+
return new Promise((r, o) => {
|
151
|
+
setTimeout(t ? () => o(n) : r, e);
|
152
|
+
});
|
153
|
+
}
|
154
|
+
function nt(e, t = !1) {
|
155
|
+
function n(u, { flush: f = "sync", deep: d = !1, timeout: v, throwOnTimeout: p } = {}) {
|
156
|
+
let g = null;
|
157
|
+
const _ = [new Promise((O) => {
|
158
|
+
g = G(
|
159
|
+
e,
|
160
|
+
(R) => {
|
161
|
+
u(R) !== t && (g ? g() : Te(() => g == null ? void 0 : g()), O(R));
|
162
|
+
},
|
163
|
+
{
|
164
|
+
flush: f,
|
165
|
+
deep: d,
|
166
|
+
immediate: !0
|
167
|
+
}
|
168
|
+
);
|
169
|
+
})];
|
170
|
+
return v != null && _.push(
|
171
|
+
tt(v, p).then(() => de(e)).finally(() => g == null ? void 0 : g())
|
172
|
+
), Promise.race(_);
|
173
|
+
}
|
174
|
+
function r(u, f) {
|
175
|
+
if (!qt(u))
|
176
|
+
return n((R) => R === u, f);
|
177
|
+
const { flush: d = "sync", deep: v = !1, timeout: p, throwOnTimeout: g } = f ?? {};
|
178
|
+
let y = null;
|
179
|
+
const O = [new Promise((R) => {
|
180
|
+
y = G(
|
181
|
+
[e, u],
|
182
|
+
([D, C]) => {
|
183
|
+
t !== (D === C) && (y ? y() : Te(() => y == null ? void 0 : y()), R(D));
|
184
|
+
},
|
185
|
+
{
|
186
|
+
flush: d,
|
187
|
+
deep: v,
|
188
|
+
immediate: !0
|
189
|
+
}
|
190
|
+
);
|
191
|
+
})];
|
192
|
+
return p != null && O.push(
|
193
|
+
tt(p, g).then(() => de(e)).finally(() => (y == null || y(), de(e)))
|
194
|
+
), Promise.race(O);
|
195
|
+
}
|
196
|
+
function o(u) {
|
197
|
+
return n((f) => !!f, u);
|
198
|
+
}
|
199
|
+
function s(u) {
|
200
|
+
return r(null, u);
|
201
|
+
}
|
202
|
+
function i(u) {
|
203
|
+
return r(void 0, u);
|
204
|
+
}
|
205
|
+
function c(u) {
|
206
|
+
return n(Number.isNaN, u);
|
207
|
+
}
|
208
|
+
function l(u, f) {
|
209
|
+
return n((d) => {
|
210
|
+
const v = Array.from(d);
|
211
|
+
return v.includes(u) || v.includes(de(u));
|
212
|
+
}, f);
|
213
|
+
}
|
214
|
+
function h(u) {
|
215
|
+
return a(1, u);
|
216
|
+
}
|
217
|
+
function a(u = 1, f) {
|
218
|
+
let d = -1;
|
219
|
+
return n(() => (d += 1, d >= u), f);
|
220
|
+
}
|
221
|
+
return Array.isArray(de(e)) ? {
|
222
|
+
toMatch: n,
|
223
|
+
toContains: l,
|
224
|
+
changed: h,
|
225
|
+
changedTimes: a,
|
226
|
+
get not() {
|
227
|
+
return nt(e, !t);
|
228
|
+
}
|
229
|
+
} : {
|
230
|
+
toMatch: n,
|
231
|
+
toBe: r,
|
232
|
+
toBeTruthy: o,
|
233
|
+
toBeNull: s,
|
234
|
+
toBeNaN: c,
|
235
|
+
toBeUndefined: i,
|
236
|
+
changed: h,
|
237
|
+
changedTimes: a,
|
238
|
+
get not() {
|
239
|
+
return nt(e, !t);
|
240
|
+
}
|
241
|
+
};
|
242
|
+
}
|
243
|
+
function lr(e) {
|
244
|
+
return nt(e);
|
245
|
+
}
|
246
|
+
function fr(e, t, n) {
|
247
|
+
let r;
|
248
|
+
qt(n) ? r = {
|
249
|
+
evaluating: n
|
250
|
+
} : r = n || {};
|
251
|
+
const {
|
252
|
+
lazy: o = !1,
|
253
|
+
evaluating: s = void 0,
|
254
|
+
shallow: i = !0,
|
255
|
+
onError: c = et
|
256
|
+
} = r, l = Z(!o), h = i ? J(t) : Z(t);
|
257
|
+
let a = 0;
|
258
|
+
return Ht(async (u) => {
|
259
|
+
if (!l.value)
|
260
|
+
return;
|
261
|
+
a++;
|
262
|
+
const f = a;
|
263
|
+
let d = !1;
|
264
|
+
s && Promise.resolve().then(() => {
|
265
|
+
s.value = !0;
|
266
|
+
});
|
267
|
+
try {
|
268
|
+
const v = await e((p) => {
|
269
|
+
u(() => {
|
270
|
+
s && (s.value = !1), d || p();
|
271
|
+
});
|
272
|
+
});
|
273
|
+
f === a && (h.value = v);
|
274
|
+
} catch (v) {
|
275
|
+
c(v);
|
276
|
+
} finally {
|
277
|
+
s && f === a && (s.value = !1), d = !0;
|
278
|
+
}
|
279
|
+
}), o ? U(() => (l.value = !0, h.value)) : h;
|
280
|
+
}
|
281
|
+
function hr(e, t, n) {
|
282
|
+
const {
|
283
|
+
immediate: r = !0,
|
284
|
+
delay: o = 0,
|
285
|
+
onError: s = et,
|
286
|
+
onSuccess: i = et,
|
287
|
+
resetOnExecute: c = !0,
|
288
|
+
shallow: l = !0,
|
289
|
+
throwError: h
|
290
|
+
} = {}, a = l ? J(t) : Z(t), u = Z(!1), f = Z(!1), d = J(void 0);
|
291
|
+
async function v(y = 0, ..._) {
|
292
|
+
c && (a.value = t), d.value = void 0, u.value = !1, f.value = !0, y > 0 && await tt(y);
|
293
|
+
const O = typeof e == "function" ? e(..._) : e;
|
294
|
+
try {
|
295
|
+
const R = await O;
|
296
|
+
a.value = R, u.value = !0, i(R);
|
297
|
+
} catch (R) {
|
298
|
+
if (d.value = R, s(R), h)
|
299
|
+
throw R;
|
300
|
+
} finally {
|
301
|
+
f.value = !1;
|
302
|
+
}
|
303
|
+
return a.value;
|
304
|
+
}
|
305
|
+
r && v(o);
|
306
|
+
const p = {
|
307
|
+
state: a,
|
308
|
+
isReady: u,
|
309
|
+
isLoading: f,
|
310
|
+
error: d,
|
311
|
+
execute: v
|
312
|
+
};
|
313
|
+
function g() {
|
314
|
+
return new Promise((y, _) => {
|
315
|
+
lr(f).toBe(!1).then(() => y(p)).catch(_);
|
316
|
+
});
|
317
|
+
}
|
318
|
+
return {
|
319
|
+
...p,
|
320
|
+
then(y, _) {
|
321
|
+
return g().then(y, _);
|
322
|
+
}
|
323
|
+
};
|
324
|
+
}
|
325
|
+
function L(e, t) {
|
326
|
+
t = t || {};
|
327
|
+
const n = [...Object.keys(t), "__Vue"], r = [...Object.values(t), Kn];
|
328
|
+
try {
|
329
|
+
return new Function(...n, `return (${e})`)(...r);
|
330
|
+
} catch (o) {
|
331
|
+
throw new Error(o + " in function code: " + e);
|
332
|
+
}
|
333
|
+
}
|
334
|
+
function dr(e) {
|
335
|
+
if (e.startsWith(":")) {
|
336
|
+
e = e.slice(1);
|
337
|
+
try {
|
338
|
+
return L(e);
|
339
|
+
} catch (t) {
|
340
|
+
throw new Error(t + " in function code: " + e);
|
341
|
+
}
|
342
|
+
}
|
343
|
+
}
|
344
|
+
function rn(e) {
|
345
|
+
return e.constructor.name === "AsyncFunction";
|
346
|
+
}
|
347
|
+
function pr(e, t) {
|
348
|
+
return Z(e.value);
|
349
|
+
}
|
350
|
+
function mr(e, t, n) {
|
351
|
+
const { bind: r = {}, code: o, const: s = [] } = e, i = Object.values(r).map((a, u) => s[u] === 1 ? a : t.getVueRefObjectOrValue(a));
|
352
|
+
if (rn(new Function(o)))
|
353
|
+
return fr(
|
354
|
+
async () => {
|
355
|
+
const a = Object.fromEntries(
|
356
|
+
Object.keys(r).map((u, f) => [u, i[f]])
|
357
|
+
);
|
358
|
+
return await L(o, a)();
|
359
|
+
},
|
360
|
+
null,
|
361
|
+
{ lazy: !0 }
|
362
|
+
);
|
363
|
+
const c = Object.fromEntries(
|
364
|
+
Object.keys(r).map((a, u) => [a, i[u]])
|
365
|
+
), l = L(o, c);
|
366
|
+
return U(l);
|
367
|
+
}
|
368
|
+
function gr(e, t, n) {
|
369
|
+
const {
|
370
|
+
inputs: r = [],
|
371
|
+
code: o,
|
372
|
+
slient: s,
|
373
|
+
data: i,
|
374
|
+
asyncInit: c = null,
|
375
|
+
deepEqOnInput: l = 0
|
376
|
+
} = e, h = s || Array(r.length).fill(0), a = i || Array(r.length).fill(0), u = r.filter((g, y) => h[y] === 0 && a[y] === 0).map((g) => t.getVueRefObject(g));
|
377
|
+
function f() {
|
378
|
+
return r.map(
|
379
|
+
(g, y) => a[y] === 1 ? g : t.getObjectToValue(g)
|
380
|
+
);
|
381
|
+
}
|
382
|
+
const d = L(o), v = l === 0 ? J(we) : nn(we), p = { immediate: !0, deep: !0 };
|
383
|
+
return rn(d) ? (v.value = c, G(
|
384
|
+
u,
|
385
|
+
async () => {
|
386
|
+
f().some(Ee) || (v.value = await d(...f()));
|
387
|
+
},
|
388
|
+
p
|
389
|
+
)) : G(
|
390
|
+
u,
|
391
|
+
() => {
|
392
|
+
const g = f();
|
393
|
+
g.some(Ee) || (v.value = d(...g));
|
394
|
+
},
|
395
|
+
p
|
396
|
+
), qn(v);
|
397
|
+
}
|
398
|
+
function vr() {
|
399
|
+
return [];
|
400
|
+
}
|
401
|
+
const Se = _e(vr);
|
402
|
+
function on(e, t) {
|
403
|
+
var s, i, c, l, h;
|
404
|
+
const n = Se.getOrDefault(e.id), r = /* @__PURE__ */ new Map();
|
405
|
+
n.push(r), t.replaceSnapshot({
|
406
|
+
scopeSnapshot: sn()
|
407
|
+
});
|
408
|
+
const o = (a, u) => {
|
409
|
+
r.set(a.id, u);
|
410
|
+
};
|
411
|
+
return (s = e.refs) == null || s.forEach((a) => {
|
412
|
+
o(a, pr(a));
|
413
|
+
}), (i = e.web_computed) == null || i.forEach((a) => {
|
414
|
+
const { init: u } = a, f = a.deepEqOnInput === void 0 ? J(u ?? we) : nn(u ?? we);
|
415
|
+
o(a, f);
|
416
|
+
}), (c = e.vue_computed) == null || c.forEach((a) => {
|
417
|
+
o(
|
418
|
+
a,
|
419
|
+
mr(a, t)
|
420
|
+
);
|
421
|
+
}), (l = e.js_computed) == null || l.forEach((a) => {
|
422
|
+
o(
|
423
|
+
a,
|
424
|
+
gr(a, t)
|
425
|
+
);
|
426
|
+
}), (h = e.data) == null || h.forEach((a) => {
|
427
|
+
o(a, a.value);
|
428
|
+
}), n.length - 1;
|
429
|
+
}
|
430
|
+
function sn() {
|
431
|
+
const e = /* @__PURE__ */ new Map();
|
432
|
+
for (const [n, r] of Se) {
|
433
|
+
const o = r[r.length - 1];
|
434
|
+
e.set(n, [o]);
|
435
|
+
}
|
436
|
+
function t(n) {
|
437
|
+
return an(n, e);
|
438
|
+
}
|
439
|
+
return {
|
440
|
+
getVueRef: t
|
441
|
+
};
|
442
|
+
}
|
443
|
+
function yr(e) {
|
444
|
+
return an(e, Se);
|
445
|
+
}
|
446
|
+
function an(e, t) {
|
447
|
+
const n = t.get(e.sid);
|
448
|
+
if (!n)
|
449
|
+
throw new Error(`Scope ${e.sid} not found`);
|
450
|
+
const o = n[n.length - 1].get(e.id);
|
451
|
+
if (!o)
|
452
|
+
throw new Error(`Var ${e.id} not found in scope ${e.sid}`);
|
453
|
+
return o;
|
454
|
+
}
|
455
|
+
function wr(e) {
|
456
|
+
Se.delete(e);
|
457
|
+
}
|
458
|
+
function cn(e, t) {
|
459
|
+
const n = Se.get(e);
|
460
|
+
n && n.splice(t, 1);
|
461
|
+
}
|
462
|
+
const ht = _e(() => []);
|
463
|
+
function Er(e) {
|
464
|
+
var r;
|
465
|
+
const t = /* @__PURE__ */ new Map(), n = ht.getOrDefault(e.id).push(t);
|
466
|
+
return (r = e.eRefs) == null || r.forEach((o) => {
|
467
|
+
const s = J();
|
468
|
+
t.set(o.id, s);
|
469
|
+
}), n;
|
470
|
+
}
|
471
|
+
function _r(e, t) {
|
472
|
+
const n = ht.get(e);
|
473
|
+
n && n.splice(t, 1);
|
474
|
+
}
|
475
|
+
function un() {
|
476
|
+
const e = new Map(
|
477
|
+
Array.from(ht.entries()).map(([n, r]) => [
|
478
|
+
n,
|
479
|
+
r[r.length - 1]
|
480
|
+
])
|
481
|
+
);
|
482
|
+
function t(n) {
|
483
|
+
return e.get(n.sid).get(n.id);
|
484
|
+
}
|
485
|
+
return {
|
486
|
+
getRef: t
|
487
|
+
};
|
488
|
+
}
|
489
|
+
var N;
|
490
|
+
((e) => {
|
491
|
+
function t(f) {
|
492
|
+
return f.type === "var";
|
493
|
+
}
|
494
|
+
e.isVar = t;
|
495
|
+
function n(f) {
|
496
|
+
return f.type === "routePar";
|
497
|
+
}
|
498
|
+
e.isRouterParams = n;
|
499
|
+
function r(f) {
|
500
|
+
return f.type === "routeAct";
|
501
|
+
}
|
502
|
+
e.isRouterAction = r;
|
503
|
+
function o(f) {
|
504
|
+
return f.type === "js";
|
505
|
+
}
|
506
|
+
e.isJs = o;
|
507
|
+
function s(f) {
|
508
|
+
return f.type === "jsOutput";
|
509
|
+
}
|
510
|
+
e.isJsOutput = s;
|
511
|
+
function i(f) {
|
512
|
+
return f.type === "vf";
|
513
|
+
}
|
514
|
+
e.isVForItem = i;
|
515
|
+
function c(f) {
|
516
|
+
return f.type === "vf-i";
|
517
|
+
}
|
518
|
+
e.isVForIndex = c;
|
519
|
+
function l(f) {
|
520
|
+
return f.type === "sp";
|
521
|
+
}
|
522
|
+
e.isSlotProp = l;
|
523
|
+
function h(f) {
|
524
|
+
return f.type === "event";
|
525
|
+
}
|
526
|
+
e.isEventContext = h;
|
527
|
+
function a(f) {
|
528
|
+
return f.type === "ele_ref";
|
529
|
+
}
|
530
|
+
e.isElementRef = a;
|
531
|
+
function u(f) {
|
532
|
+
return f.type !== void 0;
|
533
|
+
}
|
534
|
+
e.IsBinding = u;
|
535
|
+
})(N || (N = {}));
|
536
|
+
const Me = _e(() => []);
|
537
|
+
function Or(e) {
|
538
|
+
const t = Me.getOrDefault(e);
|
539
|
+
return t.push(J({})), t.length - 1;
|
540
|
+
}
|
541
|
+
function br(e, t, n) {
|
542
|
+
Me.get(e)[t].value = n;
|
543
|
+
}
|
544
|
+
function Sr(e) {
|
545
|
+
Me.delete(e);
|
546
|
+
}
|
547
|
+
function Rr() {
|
548
|
+
const e = /* @__PURE__ */ new Map();
|
549
|
+
for (const [n, r] of Me) {
|
550
|
+
const o = r[r.length - 1];
|
551
|
+
e.set(n, o);
|
552
|
+
}
|
553
|
+
function t(n) {
|
554
|
+
return e.get(n.id).value[n.name];
|
555
|
+
}
|
556
|
+
return {
|
557
|
+
getPropsValue: t
|
558
|
+
};
|
559
|
+
}
|
560
|
+
const ln = /* @__PURE__ */ new Map(), dt = _e(() => /* @__PURE__ */ new Map()), fn = /* @__PURE__ */ new Set(), hn = Symbol("vfor");
|
561
|
+
function Pr(e) {
|
562
|
+
const t = dn() ?? {};
|
563
|
+
Ie(hn, { ...t, [e.fid]: e.key });
|
564
|
+
}
|
565
|
+
function dn() {
|
566
|
+
return ee(hn, void 0);
|
567
|
+
}
|
568
|
+
function kr() {
|
569
|
+
const e = dn(), t = /* @__PURE__ */ new Map();
|
570
|
+
return e === void 0 || Object.keys(e).forEach((n) => {
|
571
|
+
t.set(n, e[n]);
|
572
|
+
}), t;
|
573
|
+
}
|
574
|
+
function Vr(e, t, n, r) {
|
575
|
+
if (r) {
|
576
|
+
fn.add(e);
|
577
|
+
return;
|
578
|
+
}
|
579
|
+
let o;
|
580
|
+
if (n)
|
581
|
+
o = new Cr(t);
|
582
|
+
else {
|
583
|
+
const s = Array.isArray(t) ? t : Object.entries(t).map(([i, c], l) => [c, i, l]);
|
584
|
+
o = new jr(s);
|
585
|
+
}
|
586
|
+
ln.set(e, o);
|
587
|
+
}
|
588
|
+
function Nr(e, t, n) {
|
589
|
+
const r = dt.getOrDefault(e);
|
590
|
+
r.has(t) || r.set(t, Z(n)), r.get(t).value = n;
|
591
|
+
}
|
592
|
+
function Ir(e) {
|
593
|
+
const t = /* @__PURE__ */ new Set();
|
594
|
+
function n(o) {
|
595
|
+
t.add(o);
|
596
|
+
}
|
597
|
+
function r() {
|
598
|
+
const o = dt.get(e);
|
599
|
+
o !== void 0 && o.forEach((s, i) => {
|
600
|
+
t.has(i) || o.delete(i);
|
601
|
+
});
|
602
|
+
}
|
603
|
+
return {
|
604
|
+
add: n,
|
605
|
+
removeUnusedKeys: r
|
606
|
+
};
|
607
|
+
}
|
608
|
+
function Tr(e) {
|
609
|
+
const t = e, n = kr();
|
610
|
+
function r(o) {
|
611
|
+
const s = n.get(o) ?? t;
|
612
|
+
return dt.get(o).get(s).value;
|
613
|
+
}
|
614
|
+
return {
|
615
|
+
getVForIndex: r
|
616
|
+
};
|
617
|
+
}
|
618
|
+
function Ar(e) {
|
619
|
+
return ln.get(e.binding.fid).createRefObjectWithPaths(e);
|
620
|
+
}
|
621
|
+
function $r(e) {
|
622
|
+
return fn.has(e);
|
623
|
+
}
|
624
|
+
class jr {
|
625
|
+
constructor(t) {
|
626
|
+
this.array = t;
|
627
|
+
}
|
628
|
+
createRefObjectWithPaths(t) {
|
629
|
+
const { binding: n } = t, { snapshot: r } = t, { path: o = [] } = n, s = [...o], i = r.getVForIndex(n.fid);
|
630
|
+
return s.unshift(i), Ce(() => ({
|
631
|
+
get: () => be(
|
632
|
+
this.array,
|
633
|
+
s,
|
634
|
+
r.getObjectToValue
|
635
|
+
),
|
636
|
+
set: () => {
|
637
|
+
throw new Error("Cannot set value to a constant array");
|
638
|
+
}
|
639
|
+
}));
|
640
|
+
}
|
641
|
+
}
|
642
|
+
class Cr {
|
643
|
+
constructor(t) {
|
644
|
+
B(this, "_isDictSource");
|
645
|
+
this.binding = t;
|
646
|
+
}
|
647
|
+
isDictSource(t) {
|
648
|
+
if (this._isDictSource === void 0) {
|
649
|
+
const n = q(t);
|
650
|
+
this._isDictSource = n !== null && !Array.isArray(n);
|
651
|
+
}
|
652
|
+
return this._isDictSource;
|
653
|
+
}
|
654
|
+
createRefObjectWithPaths(t) {
|
655
|
+
const { binding: n } = t, { path: r = [] } = n, o = [...r], { snapshot: s } = t, i = s.getVueRefObject(this.binding), c = this.isDictSource(i), l = s.getVForIndex(n.fid), h = c && o.length === 0 ? [0] : [];
|
656
|
+
return o.unshift(l, ...h), Ce(() => ({
|
657
|
+
get: () => {
|
658
|
+
const a = q(i), u = c ? Object.entries(a).map(([f, d], v) => [
|
659
|
+
d,
|
660
|
+
f,
|
661
|
+
v
|
662
|
+
]) : a;
|
663
|
+
try {
|
664
|
+
return be(
|
665
|
+
q(u),
|
666
|
+
o,
|
667
|
+
s.getObjectToValue
|
668
|
+
);
|
669
|
+
} catch {
|
670
|
+
return;
|
671
|
+
}
|
672
|
+
},
|
673
|
+
set: (a) => {
|
674
|
+
const u = q(i);
|
675
|
+
if (c) {
|
676
|
+
const f = Object.keys(u);
|
677
|
+
if (l >= f.length)
|
678
|
+
throw new Error("Cannot set value to a non-existent key");
|
679
|
+
const d = f[l];
|
680
|
+
Ze(
|
681
|
+
u,
|
682
|
+
[d],
|
683
|
+
a,
|
684
|
+
s.getObjectToValue
|
685
|
+
);
|
686
|
+
return;
|
687
|
+
}
|
688
|
+
Ze(
|
689
|
+
u,
|
690
|
+
o,
|
691
|
+
a,
|
692
|
+
s.getObjectToValue
|
693
|
+
);
|
694
|
+
}
|
695
|
+
}));
|
696
|
+
}
|
697
|
+
}
|
698
|
+
function xr(e, t, n = !1) {
|
699
|
+
return n && (e = `$computed(${e})`, t = { ...t, $computed: U }), L(e, t);
|
700
|
+
}
|
701
|
+
function St(e) {
|
702
|
+
return e == null;
|
703
|
+
}
|
704
|
+
function Dr() {
|
705
|
+
return pn().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
706
|
+
}
|
707
|
+
function pn() {
|
708
|
+
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
709
|
+
}
|
710
|
+
const Mr = typeof Proxy == "function", Fr = "devtools-plugin:setup", Br = "plugin:settings:set";
|
711
|
+
let ie, rt;
|
712
|
+
function Lr() {
|
713
|
+
var e;
|
714
|
+
return ie !== void 0 || (typeof window < "u" && window.performance ? (ie = !0, rt = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (ie = !0, rt = globalThis.perf_hooks.performance) : ie = !1), ie;
|
715
|
+
}
|
716
|
+
function Wr() {
|
717
|
+
return Lr() ? rt.now() : Date.now();
|
718
|
+
}
|
719
|
+
class Ur {
|
720
|
+
constructor(t, n) {
|
721
|
+
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
|
722
|
+
const r = {};
|
723
|
+
if (t.settings)
|
724
|
+
for (const i in t.settings) {
|
725
|
+
const c = t.settings[i];
|
726
|
+
r[i] = c.defaultValue;
|
727
|
+
}
|
728
|
+
const o = `__vue-devtools-plugin-settings__${t.id}`;
|
729
|
+
let s = Object.assign({}, r);
|
730
|
+
try {
|
731
|
+
const i = localStorage.getItem(o), c = JSON.parse(i);
|
732
|
+
Object.assign(s, c);
|
733
|
+
} catch {
|
734
|
+
}
|
735
|
+
this.fallbacks = {
|
736
|
+
getSettings() {
|
737
|
+
return s;
|
738
|
+
},
|
739
|
+
setSettings(i) {
|
740
|
+
try {
|
741
|
+
localStorage.setItem(o, JSON.stringify(i));
|
742
|
+
} catch {
|
743
|
+
}
|
744
|
+
s = i;
|
745
|
+
},
|
746
|
+
now() {
|
747
|
+
return Wr();
|
748
|
+
}
|
749
|
+
}, n && n.on(Br, (i, c) => {
|
750
|
+
i === this.plugin.id && this.fallbacks.setSettings(c);
|
751
|
+
}), this.proxiedOn = new Proxy({}, {
|
752
|
+
get: (i, c) => this.target ? this.target.on[c] : (...l) => {
|
753
|
+
this.onQueue.push({
|
754
|
+
method: c,
|
755
|
+
args: l
|
756
|
+
});
|
757
|
+
}
|
758
|
+
}), this.proxiedTarget = new Proxy({}, {
|
759
|
+
get: (i, c) => this.target ? this.target[c] : c === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(c) ? (...l) => (this.targetQueue.push({
|
760
|
+
method: c,
|
761
|
+
args: l,
|
762
|
+
resolve: () => {
|
763
|
+
}
|
764
|
+
}), this.fallbacks[c](...l)) : (...l) => new Promise((h) => {
|
765
|
+
this.targetQueue.push({
|
766
|
+
method: c,
|
767
|
+
args: l,
|
768
|
+
resolve: h
|
769
|
+
});
|
770
|
+
})
|
771
|
+
});
|
772
|
+
}
|
773
|
+
async setRealTarget(t) {
|
774
|
+
this.target = t;
|
775
|
+
for (const n of this.onQueue)
|
776
|
+
this.target.on[n.method](...n.args);
|
777
|
+
for (const n of this.targetQueue)
|
778
|
+
n.resolve(await this.target[n.method](...n.args));
|
779
|
+
}
|
780
|
+
}
|
781
|
+
function Kr(e, t) {
|
782
|
+
const n = e, r = pn(), o = Dr(), s = Mr && n.enableEarlyProxy;
|
783
|
+
if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
|
784
|
+
o.emit(Fr, e, t);
|
785
|
+
else {
|
786
|
+
const i = s ? new Ur(n, o) : null;
|
787
|
+
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
|
788
|
+
pluginDescriptor: n,
|
789
|
+
setupFn: t,
|
790
|
+
proxy: i
|
791
|
+
}), i && t(i.proxiedTarget);
|
792
|
+
}
|
793
|
+
}
|
794
|
+
var S = {};
|
795
|
+
const z = typeof document < "u";
|
796
|
+
function mn(e) {
|
797
|
+
return typeof e == "object" || "displayName" in e || "props" in e || "__vccOpts" in e;
|
798
|
+
}
|
799
|
+
function Gr(e) {
|
800
|
+
return e.__esModule || e[Symbol.toStringTag] === "Module" || // support CF with dynamic imports that do not
|
801
|
+
// add the Module string tag
|
802
|
+
e.default && mn(e.default);
|
803
|
+
}
|
804
|
+
const I = Object.assign;
|
805
|
+
function He(e, t) {
|
806
|
+
const n = {};
|
807
|
+
for (const r in t) {
|
808
|
+
const o = t[r];
|
809
|
+
n[r] = K(o) ? o.map(e) : e(o);
|
810
|
+
}
|
811
|
+
return n;
|
812
|
+
}
|
813
|
+
const ve = () => {
|
814
|
+
}, K = Array.isArray;
|
815
|
+
function P(e) {
|
816
|
+
const t = Array.from(arguments).slice(1);
|
817
|
+
console.warn.apply(console, ["[Vue Router warn]: " + e].concat(t));
|
818
|
+
}
|
819
|
+
const gn = /#/g, qr = /&/g, Hr = /\//g, zr = /=/g, Jr = /\?/g, vn = /\+/g, Qr = /%5B/g, Yr = /%5D/g, yn = /%5E/g, Xr = /%60/g, wn = /%7B/g, Zr = /%7C/g, En = /%7D/g, eo = /%20/g;
|
820
|
+
function pt(e) {
|
821
|
+
return encodeURI("" + e).replace(Zr, "|").replace(Qr, "[").replace(Yr, "]");
|
822
|
+
}
|
823
|
+
function to(e) {
|
824
|
+
return pt(e).replace(wn, "{").replace(En, "}").replace(yn, "^");
|
825
|
+
}
|
826
|
+
function ot(e) {
|
827
|
+
return pt(e).replace(vn, "%2B").replace(eo, "+").replace(gn, "%23").replace(qr, "%26").replace(Xr, "`").replace(wn, "{").replace(En, "}").replace(yn, "^");
|
828
|
+
}
|
829
|
+
function no(e) {
|
830
|
+
return ot(e).replace(zr, "%3D");
|
831
|
+
}
|
832
|
+
function ro(e) {
|
833
|
+
return pt(e).replace(gn, "%23").replace(Jr, "%3F");
|
834
|
+
}
|
835
|
+
function oo(e) {
|
836
|
+
return e == null ? "" : ro(e).replace(Hr, "%2F");
|
837
|
+
}
|
838
|
+
function ae(e) {
|
839
|
+
try {
|
840
|
+
return decodeURIComponent("" + e);
|
841
|
+
} catch {
|
842
|
+
S.NODE_ENV !== "production" && P(`Error decoding "${e}". Using original value`);
|
843
|
+
}
|
844
|
+
return "" + e;
|
845
|
+
}
|
846
|
+
const so = /\/$/, io = (e) => e.replace(so, "");
|
847
|
+
function ze(e, t, n = "/") {
|
848
|
+
let r, o = {}, s = "", i = "";
|
849
|
+
const c = t.indexOf("#");
|
850
|
+
let l = t.indexOf("?");
|
851
|
+
return c < l && c >= 0 && (l = -1), l > -1 && (r = t.slice(0, l), s = t.slice(l + 1, c > -1 ? c : t.length), o = e(s)), c > -1 && (r = r || t.slice(0, c), i = t.slice(c, t.length)), r = uo(r ?? t, n), {
|
852
|
+
fullPath: r + (s && "?") + s + i,
|
853
|
+
path: r,
|
854
|
+
query: o,
|
855
|
+
hash: ae(i)
|
856
|
+
};
|
857
|
+
}
|
858
|
+
function ao(e, t) {
|
859
|
+
const n = t.query ? e(t.query) : "";
|
860
|
+
return t.path + (n && "?") + n + (t.hash || "");
|
861
|
+
}
|
862
|
+
function Rt(e, t) {
|
863
|
+
return !t || !e.toLowerCase().startsWith(t.toLowerCase()) ? e : e.slice(t.length) || "/";
|
864
|
+
}
|
865
|
+
function Pt(e, t, n) {
|
866
|
+
const r = t.matched.length - 1, o = n.matched.length - 1;
|
867
|
+
return r > -1 && r === o && te(t.matched[r], n.matched[o]) && _n(t.params, n.params) && e(t.query) === e(n.query) && t.hash === n.hash;
|
868
|
+
}
|
869
|
+
function te(e, t) {
|
870
|
+
return (e.aliasOf || e) === (t.aliasOf || t);
|
871
|
+
}
|
872
|
+
function _n(e, t) {
|
873
|
+
if (Object.keys(e).length !== Object.keys(t).length)
|
874
|
+
return !1;
|
875
|
+
for (const n in e)
|
876
|
+
if (!co(e[n], t[n]))
|
877
|
+
return !1;
|
878
|
+
return !0;
|
879
|
+
}
|
880
|
+
function co(e, t) {
|
881
|
+
return K(e) ? kt(e, t) : K(t) ? kt(t, e) : e === t;
|
882
|
+
}
|
883
|
+
function kt(e, t) {
|
884
|
+
return K(t) ? e.length === t.length && e.every((n, r) => n === t[r]) : e.length === 1 && e[0] === t;
|
885
|
+
}
|
886
|
+
function uo(e, t) {
|
887
|
+
if (e.startsWith("/"))
|
888
|
+
return e;
|
889
|
+
if (S.NODE_ENV !== "production" && !t.startsWith("/"))
|
890
|
+
return P(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`), e;
|
891
|
+
if (!e)
|
892
|
+
return t;
|
893
|
+
const n = t.split("/"), r = e.split("/"), o = r[r.length - 1];
|
894
|
+
(o === ".." || o === ".") && r.push("");
|
895
|
+
let s = n.length - 1, i, c;
|
896
|
+
for (i = 0; i < r.length; i++)
|
897
|
+
if (c = r[i], c !== ".")
|
898
|
+
if (c === "..")
|
899
|
+
s > 1 && s--;
|
900
|
+
else
|
901
|
+
break;
|
902
|
+
return n.slice(0, s).join("/") + "/" + r.slice(i).join("/");
|
903
|
+
}
|
904
|
+
const Y = {
|
905
|
+
path: "/",
|
906
|
+
// TODO: could we use a symbol in the future?
|
907
|
+
name: void 0,
|
908
|
+
params: {},
|
909
|
+
query: {},
|
910
|
+
hash: "",
|
911
|
+
fullPath: "/",
|
912
|
+
matched: [],
|
913
|
+
meta: {},
|
914
|
+
redirectedFrom: void 0
|
915
|
+
};
|
916
|
+
var ce;
|
917
|
+
(function(e) {
|
918
|
+
e.pop = "pop", e.push = "push";
|
919
|
+
})(ce || (ce = {}));
|
920
|
+
var oe;
|
921
|
+
(function(e) {
|
922
|
+
e.back = "back", e.forward = "forward", e.unknown = "";
|
923
|
+
})(oe || (oe = {}));
|
924
|
+
const Je = "";
|
925
|
+
function On(e) {
|
926
|
+
if (!e)
|
927
|
+
if (z) {
|
928
|
+
const t = document.querySelector("base");
|
929
|
+
e = t && t.getAttribute("href") || "/", e = e.replace(/^\w+:\/\/[^\/]+/, "");
|
930
|
+
} else
|
931
|
+
e = "/";
|
932
|
+
return e[0] !== "/" && e[0] !== "#" && (e = "/" + e), io(e);
|
933
|
+
}
|
934
|
+
const lo = /^[^#]+#/;
|
935
|
+
function bn(e, t) {
|
936
|
+
return e.replace(lo, "#") + t;
|
937
|
+
}
|
938
|
+
function fo(e, t) {
|
939
|
+
const n = document.documentElement.getBoundingClientRect(), r = e.getBoundingClientRect();
|
940
|
+
return {
|
941
|
+
behavior: t.behavior,
|
942
|
+
left: r.left - n.left - (t.left || 0),
|
943
|
+
top: r.top - n.top - (t.top || 0)
|
944
|
+
};
|
945
|
+
}
|
946
|
+
const Fe = () => ({
|
947
|
+
left: window.scrollX,
|
948
|
+
top: window.scrollY
|
949
|
+
});
|
950
|
+
function ho(e) {
|
951
|
+
let t;
|
952
|
+
if ("el" in e) {
|
953
|
+
const n = e.el, r = typeof n == "string" && n.startsWith("#");
|
954
|
+
if (S.NODE_ENV !== "production" && typeof e.el == "string" && (!r || !document.getElementById(e.el.slice(1))))
|
955
|
+
try {
|
956
|
+
const s = document.querySelector(e.el);
|
957
|
+
if (r && s) {
|
958
|
+
P(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);
|
959
|
+
return;
|
960
|
+
}
|
961
|
+
} catch {
|
962
|
+
P(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);
|
963
|
+
return;
|
964
|
+
}
|
965
|
+
const o = typeof n == "string" ? r ? document.getElementById(n.slice(1)) : document.querySelector(n) : n;
|
966
|
+
if (!o) {
|
967
|
+
S.NODE_ENV !== "production" && P(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);
|
968
|
+
return;
|
969
|
+
}
|
970
|
+
t = fo(o, e);
|
971
|
+
} else
|
972
|
+
t = e;
|
973
|
+
"scrollBehavior" in document.documentElement.style ? window.scrollTo(t) : window.scrollTo(t.left != null ? t.left : window.scrollX, t.top != null ? t.top : window.scrollY);
|
974
|
+
}
|
975
|
+
function Vt(e, t) {
|
976
|
+
return (history.state ? history.state.position - t : -1) + e;
|
977
|
+
}
|
978
|
+
const st = /* @__PURE__ */ new Map();
|
979
|
+
function po(e, t) {
|
980
|
+
st.set(e, t);
|
981
|
+
}
|
982
|
+
function mo(e) {
|
983
|
+
const t = st.get(e);
|
984
|
+
return st.delete(e), t;
|
985
|
+
}
|
986
|
+
let go = () => location.protocol + "//" + location.host;
|
987
|
+
function Sn(e, t) {
|
988
|
+
const { pathname: n, search: r, hash: o } = t, s = e.indexOf("#");
|
989
|
+
if (s > -1) {
|
990
|
+
let c = o.includes(e.slice(s)) ? e.slice(s).length : 1, l = o.slice(c);
|
991
|
+
return l[0] !== "/" && (l = "/" + l), Rt(l, "");
|
992
|
+
}
|
993
|
+
return Rt(n, e) + r + o;
|
994
|
+
}
|
995
|
+
function vo(e, t, n, r) {
|
996
|
+
let o = [], s = [], i = null;
|
997
|
+
const c = ({ state: f }) => {
|
998
|
+
const d = Sn(e, location), v = n.value, p = t.value;
|
999
|
+
let g = 0;
|
1000
|
+
if (f) {
|
1001
|
+
if (n.value = d, t.value = f, i && i === v) {
|
1002
|
+
i = null;
|
1003
|
+
return;
|
1004
|
+
}
|
1005
|
+
g = p ? f.position - p.position : 0;
|
1006
|
+
} else
|
1007
|
+
r(d);
|
1008
|
+
o.forEach((y) => {
|
1009
|
+
y(n.value, v, {
|
1010
|
+
delta: g,
|
1011
|
+
type: ce.pop,
|
1012
|
+
direction: g ? g > 0 ? oe.forward : oe.back : oe.unknown
|
1013
|
+
});
|
1014
|
+
});
|
1015
|
+
};
|
1016
|
+
function l() {
|
1017
|
+
i = n.value;
|
1018
|
+
}
|
1019
|
+
function h(f) {
|
1020
|
+
o.push(f);
|
1021
|
+
const d = () => {
|
1022
|
+
const v = o.indexOf(f);
|
1023
|
+
v > -1 && o.splice(v, 1);
|
1024
|
+
};
|
1025
|
+
return s.push(d), d;
|
1026
|
+
}
|
1027
|
+
function a() {
|
1028
|
+
const { history: f } = window;
|
1029
|
+
f.state && f.replaceState(I({}, f.state, { scroll: Fe() }), "");
|
1030
|
+
}
|
1031
|
+
function u() {
|
1032
|
+
for (const f of s)
|
1033
|
+
f();
|
1034
|
+
s = [], window.removeEventListener("popstate", c), window.removeEventListener("beforeunload", a);
|
1035
|
+
}
|
1036
|
+
return window.addEventListener("popstate", c), window.addEventListener("beforeunload", a, {
|
1037
|
+
passive: !0
|
1038
|
+
}), {
|
1039
|
+
pauseListeners: l,
|
1040
|
+
listen: h,
|
1041
|
+
destroy: u
|
1042
|
+
};
|
1043
|
+
}
|
1044
|
+
function Nt(e, t, n, r = !1, o = !1) {
|
1045
|
+
return {
|
1046
|
+
back: e,
|
1047
|
+
current: t,
|
1048
|
+
forward: n,
|
1049
|
+
replaced: r,
|
1050
|
+
position: window.history.length,
|
1051
|
+
scroll: o ? Fe() : null
|
1052
|
+
};
|
1053
|
+
}
|
1054
|
+
function yo(e) {
|
1055
|
+
const { history: t, location: n } = window, r = {
|
1056
|
+
value: Sn(e, n)
|
1057
|
+
}, o = { value: t.state };
|
1058
|
+
o.value || s(r.value, {
|
1059
|
+
back: null,
|
1060
|
+
current: r.value,
|
1061
|
+
forward: null,
|
1062
|
+
// the length is off by one, we need to decrease it
|
1063
|
+
position: t.length - 1,
|
1064
|
+
replaced: !0,
|
1065
|
+
// don't add a scroll as the user may have an anchor, and we want
|
1066
|
+
// scrollBehavior to be triggered without a saved position
|
1067
|
+
scroll: null
|
1068
|
+
}, !0);
|
1069
|
+
function s(l, h, a) {
|
1070
|
+
const u = e.indexOf("#"), f = u > -1 ? (n.host && document.querySelector("base") ? e : e.slice(u)) + l : go() + e + l;
|
1071
|
+
try {
|
1072
|
+
t[a ? "replaceState" : "pushState"](h, "", f), o.value = h;
|
1073
|
+
} catch (d) {
|
1074
|
+
S.NODE_ENV !== "production" ? P("Error with push/replace State", d) : console.error(d), n[a ? "replace" : "assign"](f);
|
1075
|
+
}
|
1076
|
+
}
|
1077
|
+
function i(l, h) {
|
1078
|
+
const a = I({}, t.state, Nt(
|
1079
|
+
o.value.back,
|
1080
|
+
// keep back and forward entries but override current position
|
1081
|
+
l,
|
1082
|
+
o.value.forward,
|
1083
|
+
!0
|
1084
|
+
), h, { position: o.value.position });
|
1085
|
+
s(l, a, !0), r.value = l;
|
1086
|
+
}
|
1087
|
+
function c(l, h) {
|
1088
|
+
const a = I(
|
1089
|
+
{},
|
1090
|
+
// use current history state to gracefully handle a wrong call to
|
1091
|
+
// history.replaceState
|
1092
|
+
// https://github.com/vuejs/router/issues/366
|
1093
|
+
o.value,
|
1094
|
+
t.state,
|
1095
|
+
{
|
1096
|
+
forward: l,
|
1097
|
+
scroll: Fe()
|
1098
|
+
}
|
1099
|
+
);
|
1100
|
+
S.NODE_ENV !== "production" && !t.state && P(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:
|
1101
|
+
|
1102
|
+
history.replaceState(history.state, '', url)
|
1103
|
+
|
1104
|
+
You can find more information at https://router.vuejs.org/guide/migration/#Usage-of-history-state`), s(a.current, a, !0);
|
1105
|
+
const u = I({}, Nt(r.value, l, null), { position: a.position + 1 }, h);
|
1106
|
+
s(l, u, !1), r.value = l;
|
1107
|
+
}
|
1108
|
+
return {
|
1109
|
+
location: r,
|
1110
|
+
state: o,
|
1111
|
+
push: c,
|
1112
|
+
replace: i
|
1113
|
+
};
|
1114
|
+
}
|
1115
|
+
function Rn(e) {
|
1116
|
+
e = On(e);
|
1117
|
+
const t = yo(e), n = vo(e, t.state, t.location, t.replace);
|
1118
|
+
function r(s, i = !0) {
|
1119
|
+
i || n.pauseListeners(), history.go(s);
|
1120
|
+
}
|
1121
|
+
const o = I({
|
1122
|
+
// it's overridden right after
|
1123
|
+
location: "",
|
1124
|
+
base: e,
|
1125
|
+
go: r,
|
1126
|
+
createHref: bn.bind(null, e)
|
1127
|
+
}, t, n);
|
1128
|
+
return Object.defineProperty(o, "location", {
|
1129
|
+
enumerable: !0,
|
1130
|
+
get: () => t.location.value
|
1131
|
+
}), Object.defineProperty(o, "state", {
|
1132
|
+
enumerable: !0,
|
1133
|
+
get: () => t.state.value
|
1134
|
+
}), o;
|
1135
|
+
}
|
1136
|
+
function wo(e = "") {
|
1137
|
+
let t = [], n = [Je], r = 0;
|
1138
|
+
e = On(e);
|
1139
|
+
function o(c) {
|
1140
|
+
r++, r !== n.length && n.splice(r), n.push(c);
|
1141
|
+
}
|
1142
|
+
function s(c, l, { direction: h, delta: a }) {
|
1143
|
+
const u = {
|
1144
|
+
direction: h,
|
1145
|
+
delta: a,
|
1146
|
+
type: ce.pop
|
1147
|
+
};
|
1148
|
+
for (const f of t)
|
1149
|
+
f(c, l, u);
|
1150
|
+
}
|
1151
|
+
const i = {
|
1152
|
+
// rewritten by Object.defineProperty
|
1153
|
+
location: Je,
|
1154
|
+
// TODO: should be kept in queue
|
1155
|
+
state: {},
|
1156
|
+
base: e,
|
1157
|
+
createHref: bn.bind(null, e),
|
1158
|
+
replace(c) {
|
1159
|
+
n.splice(r--, 1), o(c);
|
1160
|
+
},
|
1161
|
+
push(c, l) {
|
1162
|
+
o(c);
|
1163
|
+
},
|
1164
|
+
listen(c) {
|
1165
|
+
return t.push(c), () => {
|
1166
|
+
const l = t.indexOf(c);
|
1167
|
+
l > -1 && t.splice(l, 1);
|
1168
|
+
};
|
1169
|
+
},
|
1170
|
+
destroy() {
|
1171
|
+
t = [], n = [Je], r = 0;
|
1172
|
+
},
|
1173
|
+
go(c, l = !0) {
|
1174
|
+
const h = this.location, a = (
|
1175
|
+
// we are considering delta === 0 going forward, but in abstract mode
|
1176
|
+
// using 0 for the delta doesn't make sense like it does in html5 where
|
1177
|
+
// it reloads the page
|
1178
|
+
c < 0 ? oe.back : oe.forward
|
1179
|
+
);
|
1180
|
+
r = Math.max(0, Math.min(r + c, n.length - 1)), l && s(this.location, h, {
|
1181
|
+
direction: a,
|
1182
|
+
delta: c
|
1183
|
+
});
|
1184
|
+
}
|
1185
|
+
};
|
1186
|
+
return Object.defineProperty(i, "location", {
|
1187
|
+
enumerable: !0,
|
1188
|
+
get: () => n[r]
|
1189
|
+
}), i;
|
1190
|
+
}
|
1191
|
+
function Eo(e) {
|
1192
|
+
return e = location.host ? e || location.pathname + location.search : "", e.includes("#") || (e += "#"), S.NODE_ENV !== "production" && !e.endsWith("#/") && !e.endsWith("#") && P(`A hash base must end with a "#":
|
1193
|
+
"${e}" should be "${e.replace(/#.*$/, "#")}".`), Rn(e);
|
1194
|
+
}
|
1195
|
+
function Ae(e) {
|
1196
|
+
return typeof e == "string" || e && typeof e == "object";
|
1197
|
+
}
|
1198
|
+
function Pn(e) {
|
1199
|
+
return typeof e == "string" || typeof e == "symbol";
|
1200
|
+
}
|
1201
|
+
const it = Symbol(S.NODE_ENV !== "production" ? "navigation failure" : "");
|
1202
|
+
var It;
|
1203
|
+
(function(e) {
|
1204
|
+
e[e.aborted = 4] = "aborted", e[e.cancelled = 8] = "cancelled", e[e.duplicated = 16] = "duplicated";
|
1205
|
+
})(It || (It = {}));
|
1206
|
+
const _o = {
|
1207
|
+
1({ location: e, currentLocation: t }) {
|
1208
|
+
return `No match for
|
1209
|
+
${JSON.stringify(e)}${t ? `
|
1210
|
+
while being at
|
1211
|
+
` + JSON.stringify(t) : ""}`;
|
1212
|
+
},
|
1213
|
+
2({ from: e, to: t }) {
|
1214
|
+
return `Redirected from "${e.fullPath}" to "${bo(t)}" via a navigation guard.`;
|
1215
|
+
},
|
1216
|
+
4({ from: e, to: t }) {
|
1217
|
+
return `Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`;
|
1218
|
+
},
|
1219
|
+
8({ from: e, to: t }) {
|
1220
|
+
return `Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`;
|
1221
|
+
},
|
1222
|
+
16({ from: e, to: t }) {
|
1223
|
+
return `Avoided redundant navigation to current location: "${e.fullPath}".`;
|
1224
|
+
}
|
1225
|
+
};
|
1226
|
+
function ue(e, t) {
|
1227
|
+
return S.NODE_ENV !== "production" ? I(new Error(_o[e](t)), {
|
1228
|
+
type: e,
|
1229
|
+
[it]: !0
|
1230
|
+
}, t) : I(new Error(), {
|
1231
|
+
type: e,
|
1232
|
+
[it]: !0
|
1233
|
+
}, t);
|
1234
|
+
}
|
1235
|
+
function H(e, t) {
|
1236
|
+
return e instanceof Error && it in e && (t == null || !!(e.type & t));
|
1237
|
+
}
|
1238
|
+
const Oo = ["params", "query", "hash"];
|
1239
|
+
function bo(e) {
|
1240
|
+
if (typeof e == "string")
|
1241
|
+
return e;
|
1242
|
+
if (e.path != null)
|
1243
|
+
return e.path;
|
1244
|
+
const t = {};
|
1245
|
+
for (const n of Oo)
|
1246
|
+
n in e && (t[n] = e[n]);
|
1247
|
+
return JSON.stringify(t, null, 2);
|
1248
|
+
}
|
1249
|
+
const Tt = "[^/]+?", So = {
|
1250
|
+
sensitive: !1,
|
1251
|
+
strict: !1,
|
1252
|
+
start: !0,
|
1253
|
+
end: !0
|
1254
|
+
}, Ro = /[.+*?^${}()[\]/\\]/g;
|
1255
|
+
function Po(e, t) {
|
1256
|
+
const n = I({}, So, t), r = [];
|
1257
|
+
let o = n.start ? "^" : "";
|
1258
|
+
const s = [];
|
1259
|
+
for (const h of e) {
|
1260
|
+
const a = h.length ? [] : [
|
1261
|
+
90
|
1262
|
+
/* PathScore.Root */
|
1263
|
+
];
|
1264
|
+
n.strict && !h.length && (o += "/");
|
1265
|
+
for (let u = 0; u < h.length; u++) {
|
1266
|
+
const f = h[u];
|
1267
|
+
let d = 40 + (n.sensitive ? 0.25 : 0);
|
1268
|
+
if (f.type === 0)
|
1269
|
+
u || (o += "/"), o += f.value.replace(Ro, "\\$&"), d += 40;
|
1270
|
+
else if (f.type === 1) {
|
1271
|
+
const { value: v, repeatable: p, optional: g, regexp: y } = f;
|
1272
|
+
s.push({
|
1273
|
+
name: v,
|
1274
|
+
repeatable: p,
|
1275
|
+
optional: g
|
1276
|
+
});
|
1277
|
+
const _ = y || Tt;
|
1278
|
+
if (_ !== Tt) {
|
1279
|
+
d += 10;
|
1280
|
+
try {
|
1281
|
+
new RegExp(`(${_})`);
|
1282
|
+
} catch (R) {
|
1283
|
+
throw new Error(`Invalid custom RegExp for param "${v}" (${_}): ` + R.message);
|
1284
|
+
}
|
1285
|
+
}
|
1286
|
+
let O = p ? `((?:${_})(?:/(?:${_}))*)` : `(${_})`;
|
1287
|
+
u || (O = // avoid an optional / if there are more segments e.g. /:p?-static
|
1288
|
+
// or /:p?-:p2
|
1289
|
+
g && h.length < 2 ? `(?:/${O})` : "/" + O), g && (O += "?"), o += O, d += 20, g && (d += -8), p && (d += -20), _ === ".*" && (d += -50);
|
1290
|
+
}
|
1291
|
+
a.push(d);
|
1292
|
+
}
|
1293
|
+
r.push(a);
|
1294
|
+
}
|
1295
|
+
if (n.strict && n.end) {
|
1296
|
+
const h = r.length - 1;
|
1297
|
+
r[h][r[h].length - 1] += 0.7000000000000001;
|
1298
|
+
}
|
1299
|
+
n.strict || (o += "/?"), n.end ? o += "$" : n.strict && !o.endsWith("/") && (o += "(?:/|$)");
|
1300
|
+
const i = new RegExp(o, n.sensitive ? "" : "i");
|
1301
|
+
function c(h) {
|
1302
|
+
const a = h.match(i), u = {};
|
1303
|
+
if (!a)
|
1304
|
+
return null;
|
1305
|
+
for (let f = 1; f < a.length; f++) {
|
1306
|
+
const d = a[f] || "", v = s[f - 1];
|
1307
|
+
u[v.name] = d && v.repeatable ? d.split("/") : d;
|
1308
|
+
}
|
1309
|
+
return u;
|
1310
|
+
}
|
1311
|
+
function l(h) {
|
1312
|
+
let a = "", u = !1;
|
1313
|
+
for (const f of e) {
|
1314
|
+
(!u || !a.endsWith("/")) && (a += "/"), u = !1;
|
1315
|
+
for (const d of f)
|
1316
|
+
if (d.type === 0)
|
1317
|
+
a += d.value;
|
1318
|
+
else if (d.type === 1) {
|
1319
|
+
const { value: v, repeatable: p, optional: g } = d, y = v in h ? h[v] : "";
|
1320
|
+
if (K(y) && !p)
|
1321
|
+
throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);
|
1322
|
+
const _ = K(y) ? y.join("/") : y;
|
1323
|
+
if (!_)
|
1324
|
+
if (g)
|
1325
|
+
f.length < 2 && (a.endsWith("/") ? a = a.slice(0, -1) : u = !0);
|
1326
|
+
else
|
1327
|
+
throw new Error(`Missing required param "${v}"`);
|
1328
|
+
a += _;
|
1329
|
+
}
|
1330
|
+
}
|
1331
|
+
return a || "/";
|
1332
|
+
}
|
1333
|
+
return {
|
1334
|
+
re: i,
|
1335
|
+
score: r,
|
1336
|
+
keys: s,
|
1337
|
+
parse: c,
|
1338
|
+
stringify: l
|
1339
|
+
};
|
1340
|
+
}
|
1341
|
+
function ko(e, t) {
|
1342
|
+
let n = 0;
|
1343
|
+
for (; n < e.length && n < t.length; ) {
|
1344
|
+
const r = t[n] - e[n];
|
1345
|
+
if (r)
|
1346
|
+
return r;
|
1347
|
+
n++;
|
1348
|
+
}
|
1349
|
+
return e.length < t.length ? e.length === 1 && e[0] === 80 ? -1 : 1 : e.length > t.length ? t.length === 1 && t[0] === 80 ? 1 : -1 : 0;
|
1350
|
+
}
|
1351
|
+
function kn(e, t) {
|
1352
|
+
let n = 0;
|
1353
|
+
const r = e.score, o = t.score;
|
1354
|
+
for (; n < r.length && n < o.length; ) {
|
1355
|
+
const s = ko(r[n], o[n]);
|
1356
|
+
if (s)
|
1357
|
+
return s;
|
1358
|
+
n++;
|
1359
|
+
}
|
1360
|
+
if (Math.abs(o.length - r.length) === 1) {
|
1361
|
+
if (At(r))
|
1362
|
+
return 1;
|
1363
|
+
if (At(o))
|
1364
|
+
return -1;
|
1365
|
+
}
|
1366
|
+
return o.length - r.length;
|
1367
|
+
}
|
1368
|
+
function At(e) {
|
1369
|
+
const t = e[e.length - 1];
|
1370
|
+
return e.length > 0 && t[t.length - 1] < 0;
|
1371
|
+
}
|
1372
|
+
const Vo = {
|
1373
|
+
type: 0,
|
1374
|
+
value: ""
|
1375
|
+
}, No = /[a-zA-Z0-9_]/;
|
1376
|
+
function Io(e) {
|
1377
|
+
if (!e)
|
1378
|
+
return [[]];
|
1379
|
+
if (e === "/")
|
1380
|
+
return [[Vo]];
|
1381
|
+
if (!e.startsWith("/"))
|
1382
|
+
throw new Error(S.NODE_ENV !== "production" ? `Route paths should start with a "/": "${e}" should be "/${e}".` : `Invalid path "${e}"`);
|
1383
|
+
function t(d) {
|
1384
|
+
throw new Error(`ERR (${n})/"${h}": ${d}`);
|
1385
|
+
}
|
1386
|
+
let n = 0, r = n;
|
1387
|
+
const o = [];
|
1388
|
+
let s;
|
1389
|
+
function i() {
|
1390
|
+
s && o.push(s), s = [];
|
1391
|
+
}
|
1392
|
+
let c = 0, l, h = "", a = "";
|
1393
|
+
function u() {
|
1394
|
+
h && (n === 0 ? s.push({
|
1395
|
+
type: 0,
|
1396
|
+
value: h
|
1397
|
+
}) : n === 1 || n === 2 || n === 3 ? (s.length > 1 && (l === "*" || l === "+") && t(`A repeatable param (${h}) must be alone in its segment. eg: '/:ids+.`), s.push({
|
1398
|
+
type: 1,
|
1399
|
+
value: h,
|
1400
|
+
regexp: a,
|
1401
|
+
repeatable: l === "*" || l === "+",
|
1402
|
+
optional: l === "*" || l === "?"
|
1403
|
+
})) : t("Invalid state to consume buffer"), h = "");
|
1404
|
+
}
|
1405
|
+
function f() {
|
1406
|
+
h += l;
|
1407
|
+
}
|
1408
|
+
for (; c < e.length; ) {
|
1409
|
+
if (l = e[c++], l === "\\" && n !== 2) {
|
1410
|
+
r = n, n = 4;
|
1411
|
+
continue;
|
1412
|
+
}
|
1413
|
+
switch (n) {
|
1414
|
+
case 0:
|
1415
|
+
l === "/" ? (h && u(), i()) : l === ":" ? (u(), n = 1) : f();
|
1416
|
+
break;
|
1417
|
+
case 4:
|
1418
|
+
f(), n = r;
|
1419
|
+
break;
|
1420
|
+
case 1:
|
1421
|
+
l === "(" ? n = 2 : No.test(l) ? f() : (u(), n = 0, l !== "*" && l !== "?" && l !== "+" && c--);
|
1422
|
+
break;
|
1423
|
+
case 2:
|
1424
|
+
l === ")" ? a[a.length - 1] == "\\" ? a = a.slice(0, -1) + l : n = 3 : a += l;
|
1425
|
+
break;
|
1426
|
+
case 3:
|
1427
|
+
u(), n = 0, l !== "*" && l !== "?" && l !== "+" && c--, a = "";
|
1428
|
+
break;
|
1429
|
+
default:
|
1430
|
+
t("Unknown state");
|
1431
|
+
break;
|
1432
|
+
}
|
1433
|
+
}
|
1434
|
+
return n === 2 && t(`Unfinished custom RegExp for param "${h}"`), u(), i(), o;
|
1435
|
+
}
|
1436
|
+
function To(e, t, n) {
|
1437
|
+
const r = Po(Io(e.path), n);
|
1438
|
+
if (S.NODE_ENV !== "production") {
|
1439
|
+
const s = /* @__PURE__ */ new Set();
|
1440
|
+
for (const i of r.keys)
|
1441
|
+
s.has(i.name) && P(`Found duplicated params with name "${i.name}" for path "${e.path}". Only the last one will be available on "$route.params".`), s.add(i.name);
|
1442
|
+
}
|
1443
|
+
const o = I(r, {
|
1444
|
+
record: e,
|
1445
|
+
parent: t,
|
1446
|
+
// these needs to be populated by the parent
|
1447
|
+
children: [],
|
1448
|
+
alias: []
|
1449
|
+
});
|
1450
|
+
return t && !o.record.aliasOf == !t.record.aliasOf && t.children.push(o), o;
|
1451
|
+
}
|
1452
|
+
function Ao(e, t) {
|
1453
|
+
const n = [], r = /* @__PURE__ */ new Map();
|
1454
|
+
t = xt({ strict: !1, end: !0, sensitive: !1 }, t);
|
1455
|
+
function o(u) {
|
1456
|
+
return r.get(u);
|
1457
|
+
}
|
1458
|
+
function s(u, f, d) {
|
1459
|
+
const v = !d, p = jt(u);
|
1460
|
+
S.NODE_ENV !== "production" && xo(p, f), p.aliasOf = d && d.record;
|
1461
|
+
const g = xt(t, u), y = [p];
|
1462
|
+
if ("alias" in u) {
|
1463
|
+
const R = typeof u.alias == "string" ? [u.alias] : u.alias;
|
1464
|
+
for (const D of R)
|
1465
|
+
y.push(
|
1466
|
+
// we need to normalize again to ensure the `mods` property
|
1467
|
+
// being non enumerable
|
1468
|
+
jt(I({}, p, {
|
1469
|
+
// this allows us to hold a copy of the `components` option
|
1470
|
+
// so that async components cache is hold on the original record
|
1471
|
+
components: d ? d.record.components : p.components,
|
1472
|
+
path: D,
|
1473
|
+
// we might be the child of an alias
|
1474
|
+
aliasOf: d ? d.record : p
|
1475
|
+
// the aliases are always of the same kind as the original since they
|
1476
|
+
// are defined on the same record
|
1477
|
+
}))
|
1478
|
+
);
|
1479
|
+
}
|
1480
|
+
let _, O;
|
1481
|
+
for (const R of y) {
|
1482
|
+
const { path: D } = R;
|
1483
|
+
if (f && D[0] !== "/") {
|
1484
|
+
const C = f.record.path, x = C[C.length - 1] === "/" ? "" : "/";
|
1485
|
+
R.path = f.record.path + (D && x + D);
|
1486
|
+
}
|
1487
|
+
if (S.NODE_ENV !== "production" && R.path === "*")
|
1488
|
+
throw new Error(`Catch all routes ("*") must now be defined using a param with a custom regexp.
|
1489
|
+
See more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.`);
|
1490
|
+
if (_ = To(R, f, g), S.NODE_ENV !== "production" && f && D[0] === "/" && Mo(_, f), d ? (d.alias.push(_), S.NODE_ENV !== "production" && Co(d, _)) : (O = O || _, O !== _ && O.alias.push(_), v && u.name && !Ct(_) && (S.NODE_ENV !== "production" && Do(u, f), i(u.name))), Vn(_) && l(_), p.children) {
|
1491
|
+
const C = p.children;
|
1492
|
+
for (let x = 0; x < C.length; x++)
|
1493
|
+
s(C[x], _, d && d.children[x]);
|
1494
|
+
}
|
1495
|
+
d = d || _;
|
1496
|
+
}
|
1497
|
+
return O ? () => {
|
1498
|
+
i(O);
|
1499
|
+
} : ve;
|
1500
|
+
}
|
1501
|
+
function i(u) {
|
1502
|
+
if (Pn(u)) {
|
1503
|
+
const f = r.get(u);
|
1504
|
+
f && (r.delete(u), n.splice(n.indexOf(f), 1), f.children.forEach(i), f.alias.forEach(i));
|
1505
|
+
} else {
|
1506
|
+
const f = n.indexOf(u);
|
1507
|
+
f > -1 && (n.splice(f, 1), u.record.name && r.delete(u.record.name), u.children.forEach(i), u.alias.forEach(i));
|
1508
|
+
}
|
1509
|
+
}
|
1510
|
+
function c() {
|
1511
|
+
return n;
|
1512
|
+
}
|
1513
|
+
function l(u) {
|
1514
|
+
const f = Fo(u, n);
|
1515
|
+
n.splice(f, 0, u), u.record.name && !Ct(u) && r.set(u.record.name, u);
|
1516
|
+
}
|
1517
|
+
function h(u, f) {
|
1518
|
+
let d, v = {}, p, g;
|
1519
|
+
if ("name" in u && u.name) {
|
1520
|
+
if (d = r.get(u.name), !d)
|
1521
|
+
throw ue(1, {
|
1522
|
+
location: u
|
1523
|
+
});
|
1524
|
+
if (S.NODE_ENV !== "production") {
|
1525
|
+
const O = Object.keys(u.params || {}).filter((R) => !d.keys.find((D) => D.name === R));
|
1526
|
+
O.length && P(`Discarded invalid param(s) "${O.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);
|
1527
|
+
}
|
1528
|
+
g = d.record.name, v = I(
|
1529
|
+
// paramsFromLocation is a new object
|
1530
|
+
$t(
|
1531
|
+
f.params,
|
1532
|
+
// only keep params that exist in the resolved location
|
1533
|
+
// only keep optional params coming from a parent record
|
1534
|
+
d.keys.filter((O) => !O.optional).concat(d.parent ? d.parent.keys.filter((O) => O.optional) : []).map((O) => O.name)
|
1535
|
+
),
|
1536
|
+
// discard any existing params in the current location that do not exist here
|
1537
|
+
// #1497 this ensures better active/exact matching
|
1538
|
+
u.params && $t(u.params, d.keys.map((O) => O.name))
|
1539
|
+
), p = d.stringify(v);
|
1540
|
+
} else if (u.path != null)
|
1541
|
+
p = u.path, S.NODE_ENV !== "production" && !p.startsWith("/") && P(`The Matcher cannot resolve relative paths but received "${p}". Unless you directly called \`matcher.resolve("${p}")\`, this is probably a bug in vue-router. Please open an issue at https://github.com/vuejs/router/issues/new/choose.`), d = n.find((O) => O.re.test(p)), d && (v = d.parse(p), g = d.record.name);
|
1542
|
+
else {
|
1543
|
+
if (d = f.name ? r.get(f.name) : n.find((O) => O.re.test(f.path)), !d)
|
1544
|
+
throw ue(1, {
|
1545
|
+
location: u,
|
1546
|
+
currentLocation: f
|
1547
|
+
});
|
1548
|
+
g = d.record.name, v = I({}, f.params, u.params), p = d.stringify(v);
|
1549
|
+
}
|
1550
|
+
const y = [];
|
1551
|
+
let _ = d;
|
1552
|
+
for (; _; )
|
1553
|
+
y.unshift(_.record), _ = _.parent;
|
1554
|
+
return {
|
1555
|
+
name: g,
|
1556
|
+
path: p,
|
1557
|
+
params: v,
|
1558
|
+
matched: y,
|
1559
|
+
meta: jo(y)
|
1560
|
+
};
|
1561
|
+
}
|
1562
|
+
e.forEach((u) => s(u));
|
1563
|
+
function a() {
|
1564
|
+
n.length = 0, r.clear();
|
1565
|
+
}
|
1566
|
+
return {
|
1567
|
+
addRoute: s,
|
1568
|
+
resolve: h,
|
1569
|
+
removeRoute: i,
|
1570
|
+
clearRoutes: a,
|
1571
|
+
getRoutes: c,
|
1572
|
+
getRecordMatcher: o
|
1573
|
+
};
|
1574
|
+
}
|
1575
|
+
function $t(e, t) {
|
1576
|
+
const n = {};
|
1577
|
+
for (const r of t)
|
1578
|
+
r in e && (n[r] = e[r]);
|
1579
|
+
return n;
|
1580
|
+
}
|
1581
|
+
function jt(e) {
|
1582
|
+
const t = {
|
1583
|
+
path: e.path,
|
1584
|
+
redirect: e.redirect,
|
1585
|
+
name: e.name,
|
1586
|
+
meta: e.meta || {},
|
1587
|
+
aliasOf: e.aliasOf,
|
1588
|
+
beforeEnter: e.beforeEnter,
|
1589
|
+
props: $o(e),
|
1590
|
+
children: e.children || [],
|
1591
|
+
instances: {},
|
1592
|
+
leaveGuards: /* @__PURE__ */ new Set(),
|
1593
|
+
updateGuards: /* @__PURE__ */ new Set(),
|
1594
|
+
enterCallbacks: {},
|
1595
|
+
// must be declared afterwards
|
1596
|
+
// mods: {},
|
1597
|
+
components: "components" in e ? e.components || null : e.component && { default: e.component }
|
1598
|
+
};
|
1599
|
+
return Object.defineProperty(t, "mods", {
|
1600
|
+
value: {}
|
1601
|
+
}), t;
|
1602
|
+
}
|
1603
|
+
function $o(e) {
|
1604
|
+
const t = {}, n = e.props || !1;
|
1605
|
+
if ("component" in e)
|
1606
|
+
t.default = n;
|
1607
|
+
else
|
1608
|
+
for (const r in e.components)
|
1609
|
+
t[r] = typeof n == "object" ? n[r] : n;
|
1610
|
+
return t;
|
1611
|
+
}
|
1612
|
+
function Ct(e) {
|
1613
|
+
for (; e; ) {
|
1614
|
+
if (e.record.aliasOf)
|
1615
|
+
return !0;
|
1616
|
+
e = e.parent;
|
1617
|
+
}
|
1618
|
+
return !1;
|
1619
|
+
}
|
1620
|
+
function jo(e) {
|
1621
|
+
return e.reduce((t, n) => I(t, n.meta), {});
|
1622
|
+
}
|
1623
|
+
function xt(e, t) {
|
1624
|
+
const n = {};
|
1625
|
+
for (const r in e)
|
1626
|
+
n[r] = r in t ? t[r] : e[r];
|
1627
|
+
return n;
|
1628
|
+
}
|
1629
|
+
function at(e, t) {
|
1630
|
+
return e.name === t.name && e.optional === t.optional && e.repeatable === t.repeatable;
|
1631
|
+
}
|
1632
|
+
function Co(e, t) {
|
1633
|
+
for (const n of e.keys)
|
1634
|
+
if (!n.optional && !t.keys.find(at.bind(null, n)))
|
1635
|
+
return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
1636
|
+
for (const n of t.keys)
|
1637
|
+
if (!n.optional && !e.keys.find(at.bind(null, n)))
|
1638
|
+
return P(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);
|
1639
|
+
}
|
1640
|
+
function xo(e, t) {
|
1641
|
+
t && t.record.name && !e.name && !e.path && P(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);
|
1642
|
+
}
|
1643
|
+
function Do(e, t) {
|
1644
|
+
for (let n = t; n; n = n.parent)
|
1645
|
+
if (n.record.name === e.name)
|
1646
|
+
throw new Error(`A route named "${String(e.name)}" has been added as a ${t === n ? "child" : "descendant"} of a route with the same name. Route names must be unique and a nested route cannot use the same name as an ancestor.`);
|
1647
|
+
}
|
1648
|
+
function Mo(e, t) {
|
1649
|
+
for (const n of t.keys)
|
1650
|
+
if (!e.keys.find(at.bind(null, n)))
|
1651
|
+
return P(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`);
|
1652
|
+
}
|
1653
|
+
function Fo(e, t) {
|
1654
|
+
let n = 0, r = t.length;
|
1655
|
+
for (; n !== r; ) {
|
1656
|
+
const s = n + r >> 1;
|
1657
|
+
kn(e, t[s]) < 0 ? r = s : n = s + 1;
|
1658
|
+
}
|
1659
|
+
const o = Bo(e);
|
1660
|
+
return o && (r = t.lastIndexOf(o, r - 1), S.NODE_ENV !== "production" && r < 0 && P(`Finding ancestor route "${o.record.path}" failed for "${e.record.path}"`)), r;
|
1661
|
+
}
|
1662
|
+
function Bo(e) {
|
1663
|
+
let t = e;
|
1664
|
+
for (; t = t.parent; )
|
1665
|
+
if (Vn(t) && kn(e, t) === 0)
|
1666
|
+
return t;
|
1667
|
+
}
|
1668
|
+
function Vn({ record: e }) {
|
1669
|
+
return !!(e.name || e.components && Object.keys(e.components).length || e.redirect);
|
1670
|
+
}
|
1671
|
+
function Lo(e) {
|
1672
|
+
const t = {};
|
1673
|
+
if (e === "" || e === "?")
|
1674
|
+
return t;
|
1675
|
+
const r = (e[0] === "?" ? e.slice(1) : e).split("&");
|
1676
|
+
for (let o = 0; o < r.length; ++o) {
|
1677
|
+
const s = r[o].replace(vn, " "), i = s.indexOf("="), c = ae(i < 0 ? s : s.slice(0, i)), l = i < 0 ? null : ae(s.slice(i + 1));
|
1678
|
+
if (c in t) {
|
1679
|
+
let h = t[c];
|
1680
|
+
K(h) || (h = t[c] = [h]), h.push(l);
|
1681
|
+
} else
|
1682
|
+
t[c] = l;
|
1683
|
+
}
|
1684
|
+
return t;
|
1685
|
+
}
|
1686
|
+
function Dt(e) {
|
1687
|
+
let t = "";
|
1688
|
+
for (let n in e) {
|
1689
|
+
const r = e[n];
|
1690
|
+
if (n = no(n), r == null) {
|
1691
|
+
r !== void 0 && (t += (t.length ? "&" : "") + n);
|
1692
|
+
continue;
|
1693
|
+
}
|
1694
|
+
(K(r) ? r.map((s) => s && ot(s)) : [r && ot(r)]).forEach((s) => {
|
1695
|
+
s !== void 0 && (t += (t.length ? "&" : "") + n, s != null && (t += "=" + s));
|
1696
|
+
});
|
1697
|
+
}
|
1698
|
+
return t;
|
1699
|
+
}
|
1700
|
+
function Wo(e) {
|
1701
|
+
const t = {};
|
1702
|
+
for (const n in e) {
|
1703
|
+
const r = e[n];
|
1704
|
+
r !== void 0 && (t[n] = K(r) ? r.map((o) => o == null ? null : "" + o) : r == null ? r : "" + r);
|
1705
|
+
}
|
1706
|
+
return t;
|
1707
|
+
}
|
1708
|
+
const Uo = Symbol(S.NODE_ENV !== "production" ? "router view location matched" : ""), Mt = Symbol(S.NODE_ENV !== "production" ? "router view depth" : ""), Be = Symbol(S.NODE_ENV !== "production" ? "router" : ""), mt = Symbol(S.NODE_ENV !== "production" ? "route location" : ""), ct = Symbol(S.NODE_ENV !== "production" ? "router view location" : "");
|
1709
|
+
function pe() {
|
1710
|
+
let e = [];
|
1711
|
+
function t(r) {
|
1712
|
+
return e.push(r), () => {
|
1713
|
+
const o = e.indexOf(r);
|
1714
|
+
o > -1 && e.splice(o, 1);
|
1715
|
+
};
|
1716
|
+
}
|
1717
|
+
function n() {
|
1718
|
+
e = [];
|
1719
|
+
}
|
1720
|
+
return {
|
1721
|
+
add: t,
|
1722
|
+
list: () => e.slice(),
|
1723
|
+
reset: n
|
1724
|
+
};
|
1725
|
+
}
|
1726
|
+
function X(e, t, n, r, o, s = (i) => i()) {
|
1727
|
+
const i = r && // name is defined if record is because of the function overload
|
1728
|
+
(r.enterCallbacks[o] = r.enterCallbacks[o] || []);
|
1729
|
+
return () => new Promise((c, l) => {
|
1730
|
+
const h = (f) => {
|
1731
|
+
f === !1 ? l(ue(4, {
|
1732
|
+
from: n,
|
1733
|
+
to: t
|
1734
|
+
})) : f instanceof Error ? l(f) : Ae(f) ? l(ue(2, {
|
1735
|
+
from: t,
|
1736
|
+
to: f
|
1737
|
+
})) : (i && // since enterCallbackArray is truthy, both record and name also are
|
1738
|
+
r.enterCallbacks[o] === i && typeof f == "function" && i.push(f), c());
|
1739
|
+
}, a = s(() => e.call(r && r.instances[o], t, n, S.NODE_ENV !== "production" ? Ko(h, t, n) : h));
|
1740
|
+
let u = Promise.resolve(a);
|
1741
|
+
if (e.length < 3 && (u = u.then(h)), S.NODE_ENV !== "production" && e.length > 2) {
|
1742
|
+
const f = `The "next" callback was never called inside of ${e.name ? '"' + e.name + '"' : ""}:
|
1743
|
+
${e.toString()}
|
1744
|
+
. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;
|
1745
|
+
if (typeof a == "object" && "then" in a)
|
1746
|
+
u = u.then((d) => h._called ? d : (P(f), Promise.reject(new Error("Invalid navigation guard"))));
|
1747
|
+
else if (a !== void 0 && !h._called) {
|
1748
|
+
P(f), l(new Error("Invalid navigation guard"));
|
1749
|
+
return;
|
1750
|
+
}
|
1751
|
+
}
|
1752
|
+
u.catch((f) => l(f));
|
1753
|
+
});
|
1754
|
+
}
|
1755
|
+
function Ko(e, t, n) {
|
1756
|
+
let r = 0;
|
1757
|
+
return function() {
|
1758
|
+
r++ === 1 && P(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`), e._called = !0, r === 1 && e.apply(null, arguments);
|
1759
|
+
};
|
1760
|
+
}
|
1761
|
+
function Qe(e, t, n, r, o = (s) => s()) {
|
1762
|
+
const s = [];
|
1763
|
+
for (const i of e) {
|
1764
|
+
S.NODE_ENV !== "production" && !i.components && !i.children.length && P(`Record with path "${i.path}" is either missing a "component(s)" or "children" property.`);
|
1765
|
+
for (const c in i.components) {
|
1766
|
+
let l = i.components[c];
|
1767
|
+
if (S.NODE_ENV !== "production") {
|
1768
|
+
if (!l || typeof l != "object" && typeof l != "function")
|
1769
|
+
throw P(`Component "${c}" in record with path "${i.path}" is not a valid component. Received "${String(l)}".`), new Error("Invalid route component");
|
1770
|
+
if ("then" in l) {
|
1771
|
+
P(`Component "${c}" in record with path "${i.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);
|
1772
|
+
const h = l;
|
1773
|
+
l = () => h;
|
1774
|
+
} else l.__asyncLoader && // warn only once per component
|
1775
|
+
!l.__warnedDefineAsync && (l.__warnedDefineAsync = !0, P(`Component "${c}" in record with path "${i.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`));
|
1776
|
+
}
|
1777
|
+
if (!(t !== "beforeRouteEnter" && !i.instances[c]))
|
1778
|
+
if (mn(l)) {
|
1779
|
+
const a = (l.__vccOpts || l)[t];
|
1780
|
+
a && s.push(X(a, n, r, i, c, o));
|
1781
|
+
} else {
|
1782
|
+
let h = l();
|
1783
|
+
S.NODE_ENV !== "production" && !("catch" in h) && (P(`Component "${c}" in record with path "${i.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`), h = Promise.resolve(h)), s.push(() => h.then((a) => {
|
1784
|
+
if (!a)
|
1785
|
+
throw new Error(`Couldn't resolve component "${c}" at "${i.path}"`);
|
1786
|
+
const u = Gr(a) ? a.default : a;
|
1787
|
+
i.mods[c] = a, i.components[c] = u;
|
1788
|
+
const d = (u.__vccOpts || u)[t];
|
1789
|
+
return d && X(d, n, r, i, c, o)();
|
1790
|
+
}));
|
1791
|
+
}
|
1792
|
+
}
|
1793
|
+
}
|
1794
|
+
return s;
|
1795
|
+
}
|
1796
|
+
function Ft(e) {
|
1797
|
+
const t = ee(Be), n = ee(mt);
|
1798
|
+
let r = !1, o = null;
|
1799
|
+
const s = U(() => {
|
1800
|
+
const a = W(e.to);
|
1801
|
+
return S.NODE_ENV !== "production" && (!r || a !== o) && (Ae(a) || (r ? P(`Invalid value for prop "to" in useLink()
|
1802
|
+
- to:`, a, `
|
1803
|
+
- previous to:`, o, `
|
1804
|
+
- props:`, e) : P(`Invalid value for prop "to" in useLink()
|
1805
|
+
- to:`, a, `
|
1806
|
+
- props:`, e)), o = a, r = !0), t.resolve(a);
|
1807
|
+
}), i = U(() => {
|
1808
|
+
const { matched: a } = s.value, { length: u } = a, f = a[u - 1], d = n.matched;
|
1809
|
+
if (!f || !d.length)
|
1810
|
+
return -1;
|
1811
|
+
const v = d.findIndex(te.bind(null, f));
|
1812
|
+
if (v > -1)
|
1813
|
+
return v;
|
1814
|
+
const p = Bt(a[u - 2]);
|
1815
|
+
return (
|
1816
|
+
// we are dealing with nested routes
|
1817
|
+
u > 1 && // if the parent and matched route have the same path, this link is
|
1818
|
+
// referring to the empty child. Or we currently are on a different
|
1819
|
+
// child of the same parent
|
1820
|
+
Bt(f) === p && // avoid comparing the child with its parent
|
1821
|
+
d[d.length - 1].path !== p ? d.findIndex(te.bind(null, a[u - 2])) : v
|
1822
|
+
);
|
1823
|
+
}), c = U(() => i.value > -1 && Jo(n.params, s.value.params)), l = U(() => i.value > -1 && i.value === n.matched.length - 1 && _n(n.params, s.value.params));
|
1824
|
+
function h(a = {}) {
|
1825
|
+
if (zo(a)) {
|
1826
|
+
const u = t[W(e.replace) ? "replace" : "push"](
|
1827
|
+
W(e.to)
|
1828
|
+
// avoid uncaught errors are they are logged anyway
|
1829
|
+
).catch(ve);
|
1830
|
+
return e.viewTransition && typeof document < "u" && "startViewTransition" in document && document.startViewTransition(() => u), u;
|
1831
|
+
}
|
1832
|
+
return Promise.resolve();
|
1833
|
+
}
|
1834
|
+
if (S.NODE_ENV !== "production" && z) {
|
1835
|
+
const a = zt();
|
1836
|
+
if (a) {
|
1837
|
+
const u = {
|
1838
|
+
route: s.value,
|
1839
|
+
isActive: c.value,
|
1840
|
+
isExactActive: l.value,
|
1841
|
+
error: null
|
1842
|
+
};
|
1843
|
+
a.__vrl_devtools = a.__vrl_devtools || [], a.__vrl_devtools.push(u), Ht(() => {
|
1844
|
+
u.route = s.value, u.isActive = c.value, u.isExactActive = l.value, u.error = Ae(W(e.to)) ? null : 'Invalid "to" value';
|
1845
|
+
}, { flush: "post" });
|
1846
|
+
}
|
1847
|
+
}
|
1848
|
+
return {
|
1849
|
+
route: s,
|
1850
|
+
href: U(() => s.value.href),
|
1851
|
+
isActive: c,
|
1852
|
+
isExactActive: l,
|
1853
|
+
navigate: h
|
1854
|
+
};
|
1855
|
+
}
|
1856
|
+
function Go(e) {
|
1857
|
+
return e.length === 1 ? e[0] : e;
|
1858
|
+
}
|
1859
|
+
const qo = /* @__PURE__ */ F({
|
1860
|
+
name: "RouterLink",
|
1861
|
+
compatConfig: { MODE: 3 },
|
1862
|
+
props: {
|
1863
|
+
to: {
|
1864
|
+
type: [String, Object],
|
1865
|
+
required: !0
|
1866
|
+
},
|
1867
|
+
replace: Boolean,
|
1868
|
+
activeClass: String,
|
1869
|
+
// inactiveClass: String,
|
1870
|
+
exactActiveClass: String,
|
1871
|
+
custom: Boolean,
|
1872
|
+
ariaCurrentValue: {
|
1873
|
+
type: String,
|
1874
|
+
default: "page"
|
1875
|
+
}
|
1876
|
+
},
|
1877
|
+
useLink: Ft,
|
1878
|
+
setup(e, { slots: t }) {
|
1879
|
+
const n = zn(Ft(e)), { options: r } = ee(Be), o = U(() => ({
|
1880
|
+
[Lt(e.activeClass, r.linkActiveClass, "router-link-active")]: n.isActive,
|
1881
|
+
// [getLinkClass(
|
1882
|
+
// props.inactiveClass,
|
1883
|
+
// options.linkInactiveClass,
|
1884
|
+
// 'router-link-inactive'
|
1885
|
+
// )]: !link.isExactActive,
|
1886
|
+
[Lt(e.exactActiveClass, r.linkExactActiveClass, "router-link-exact-active")]: n.isExactActive
|
1887
|
+
}));
|
1888
|
+
return () => {
|
1889
|
+
const s = t.default && Go(t.default(n));
|
1890
|
+
return e.custom ? s : A("a", {
|
1891
|
+
"aria-current": n.isExactActive ? e.ariaCurrentValue : null,
|
1892
|
+
href: n.href,
|
1893
|
+
// this would override user added attrs but Vue will still add
|
1894
|
+
// the listener, so we end up triggering both
|
1895
|
+
onClick: n.navigate,
|
1896
|
+
class: o.value
|
1897
|
+
}, s);
|
1898
|
+
};
|
1899
|
+
}
|
1900
|
+
}), Ho = qo;
|
1901
|
+
function zo(e) {
|
1902
|
+
if (!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) && !e.defaultPrevented && !(e.button !== void 0 && e.button !== 0)) {
|
1903
|
+
if (e.currentTarget && e.currentTarget.getAttribute) {
|
1904
|
+
const t = e.currentTarget.getAttribute("target");
|
1905
|
+
if (/\b_blank\b/i.test(t))
|
1906
|
+
return;
|
1907
|
+
}
|
1908
|
+
return e.preventDefault && e.preventDefault(), !0;
|
1909
|
+
}
|
1910
|
+
}
|
1911
|
+
function Jo(e, t) {
|
1912
|
+
for (const n in t) {
|
1913
|
+
const r = t[n], o = e[n];
|
1914
|
+
if (typeof r == "string") {
|
1915
|
+
if (r !== o)
|
1916
|
+
return !1;
|
1917
|
+
} else if (!K(o) || o.length !== r.length || r.some((s, i) => s !== o[i]))
|
1918
|
+
return !1;
|
1919
|
+
}
|
1920
|
+
return !0;
|
1921
|
+
}
|
1922
|
+
function Bt(e) {
|
1923
|
+
return e ? e.aliasOf ? e.aliasOf.path : e.path : "";
|
1924
|
+
}
|
1925
|
+
const Lt = (e, t, n) => e ?? t ?? n, Qo = /* @__PURE__ */ F({
|
1926
|
+
name: "RouterView",
|
1927
|
+
// #674 we manually inherit them
|
1928
|
+
inheritAttrs: !1,
|
1929
|
+
props: {
|
1930
|
+
name: {
|
1931
|
+
type: String,
|
1932
|
+
default: "default"
|
1933
|
+
},
|
1934
|
+
route: Object
|
1935
|
+
},
|
1936
|
+
// Better compat for @vue/compat users
|
1937
|
+
// https://github.com/vuejs/router/issues/1315
|
1938
|
+
compatConfig: { MODE: 3 },
|
1939
|
+
setup(e, { attrs: t, slots: n }) {
|
1940
|
+
S.NODE_ENV !== "production" && Xo();
|
1941
|
+
const r = ee(ct), o = U(() => e.route || r.value), s = ee(Mt, 0), i = U(() => {
|
1942
|
+
let h = W(s);
|
1943
|
+
const { matched: a } = o.value;
|
1944
|
+
let u;
|
1945
|
+
for (; (u = a[h]) && !u.components; )
|
1946
|
+
h++;
|
1947
|
+
return h;
|
1948
|
+
}), c = U(() => o.value.matched[i.value]);
|
1949
|
+
Ie(Mt, U(() => i.value + 1)), Ie(Uo, c), Ie(ct, o);
|
1950
|
+
const l = Z();
|
1951
|
+
return G(() => [l.value, c.value, e.name], ([h, a, u], [f, d, v]) => {
|
1952
|
+
a && (a.instances[u] = h, d && d !== a && h && h === f && (a.leaveGuards.size || (a.leaveGuards = d.leaveGuards), a.updateGuards.size || (a.updateGuards = d.updateGuards))), h && a && // if there is no instance but to and from are the same this might be
|
1953
|
+
// the first visit
|
1954
|
+
(!d || !te(a, d) || !f) && (a.enterCallbacks[u] || []).forEach((p) => p(h));
|
1955
|
+
}, { flush: "post" }), () => {
|
1956
|
+
const h = o.value, a = e.name, u = c.value, f = u && u.components[a];
|
1957
|
+
if (!f)
|
1958
|
+
return Wt(n.default, { Component: f, route: h });
|
1959
|
+
const d = u.props[a], v = d ? d === !0 ? h.params : typeof d == "function" ? d(h) : d : null, g = A(f, I({}, v, t, {
|
1960
|
+
onVnodeUnmounted: (y) => {
|
1961
|
+
y.component.isUnmounted && (u.instances[a] = null);
|
1962
|
+
},
|
1963
|
+
ref: l
|
1964
|
+
}));
|
1965
|
+
if (S.NODE_ENV !== "production" && z && g.ref) {
|
1966
|
+
const y = {
|
1967
|
+
depth: i.value,
|
1968
|
+
name: u.name,
|
1969
|
+
path: u.path,
|
1970
|
+
meta: u.meta
|
1971
|
+
};
|
1972
|
+
(K(g.ref) ? g.ref.map((O) => O.i) : [g.ref.i]).forEach((O) => {
|
1973
|
+
O.__vrv_devtools = y;
|
1974
|
+
});
|
1975
|
+
}
|
1976
|
+
return (
|
1977
|
+
// pass the vnode to the slot as a prop.
|
1978
|
+
// h and <component :is="..."> both accept vnodes
|
1979
|
+
Wt(n.default, { Component: g, route: h }) || g
|
1980
|
+
);
|
1981
|
+
};
|
1982
|
+
}
|
1983
|
+
});
|
1984
|
+
function Wt(e, t) {
|
1985
|
+
if (!e)
|
1986
|
+
return null;
|
1987
|
+
const n = e(t);
|
1988
|
+
return n.length === 1 ? n[0] : n;
|
1989
|
+
}
|
1990
|
+
const Yo = Qo;
|
1991
|
+
function Xo() {
|
1992
|
+
const e = zt(), t = e.parent && e.parent.type.name, n = e.parent && e.parent.subTree && e.parent.subTree.type;
|
1993
|
+
if (t && (t === "KeepAlive" || t.includes("Transition")) && typeof n == "object" && n.name === "RouterView") {
|
1994
|
+
const r = t === "KeepAlive" ? "keep-alive" : "transition";
|
1995
|
+
P(`<router-view> can no longer be used directly inside <transition> or <keep-alive>.
|
1996
|
+
Use slot props instead:
|
1997
|
+
|
1998
|
+
<router-view v-slot="{ Component }">
|
1999
|
+
<${r}>
|
2000
|
+
<component :is="Component" />
|
2001
|
+
</${r}>
|
2002
|
+
</router-view>`);
|
2003
|
+
}
|
2004
|
+
}
|
2005
|
+
function me(e, t) {
|
2006
|
+
const n = I({}, e, {
|
2007
|
+
// remove variables that can contain vue instances
|
2008
|
+
matched: e.matched.map((r) => us(r, ["instances", "children", "aliasOf"]))
|
2009
|
+
});
|
2010
|
+
return {
|
2011
|
+
_custom: {
|
2012
|
+
type: null,
|
2013
|
+
readOnly: !0,
|
2014
|
+
display: e.fullPath,
|
2015
|
+
tooltip: t,
|
2016
|
+
value: n
|
2017
|
+
}
|
2018
|
+
};
|
2019
|
+
}
|
2020
|
+
function Ne(e) {
|
2021
|
+
return {
|
2022
|
+
_custom: {
|
2023
|
+
display: e
|
2024
|
+
}
|
2025
|
+
};
|
2026
|
+
}
|
2027
|
+
let Zo = 0;
|
2028
|
+
function es(e, t, n) {
|
2029
|
+
if (t.__hasDevtools)
|
2030
|
+
return;
|
2031
|
+
t.__hasDevtools = !0;
|
2032
|
+
const r = Zo++;
|
2033
|
+
Kr({
|
2034
|
+
id: "org.vuejs.router" + (r ? "." + r : ""),
|
2035
|
+
label: "Vue Router",
|
2036
|
+
packageName: "vue-router",
|
2037
|
+
homepage: "https://router.vuejs.org",
|
2038
|
+
logo: "https://router.vuejs.org/logo.png",
|
2039
|
+
componentStateTypes: ["Routing"],
|
2040
|
+
app: e
|
2041
|
+
}, (o) => {
|
2042
|
+
typeof o.now != "function" && console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."), o.on.inspectComponent((a, u) => {
|
2043
|
+
a.instanceData && a.instanceData.state.push({
|
2044
|
+
type: "Routing",
|
2045
|
+
key: "$route",
|
2046
|
+
editable: !1,
|
2047
|
+
value: me(t.currentRoute.value, "Current Route")
|
2048
|
+
});
|
2049
|
+
}), o.on.visitComponentTree(({ treeNode: a, componentInstance: u }) => {
|
2050
|
+
if (u.__vrv_devtools) {
|
2051
|
+
const f = u.__vrv_devtools;
|
2052
|
+
a.tags.push({
|
2053
|
+
label: (f.name ? `${f.name.toString()}: ` : "") + f.path,
|
2054
|
+
textColor: 0,
|
2055
|
+
tooltip: "This component is rendered by <router-view>",
|
2056
|
+
backgroundColor: Nn
|
2057
|
+
});
|
2058
|
+
}
|
2059
|
+
K(u.__vrl_devtools) && (u.__devtoolsApi = o, u.__vrl_devtools.forEach((f) => {
|
2060
|
+
let d = f.route.path, v = An, p = "", g = 0;
|
2061
|
+
f.error ? (d = f.error, v = ss, g = is) : f.isExactActive ? (v = Tn, p = "This is exactly active") : f.isActive && (v = In, p = "This link is active"), a.tags.push({
|
2062
|
+
label: d,
|
2063
|
+
textColor: g,
|
2064
|
+
tooltip: p,
|
2065
|
+
backgroundColor: v
|
2066
|
+
});
|
2067
|
+
}));
|
2068
|
+
}), G(t.currentRoute, () => {
|
2069
|
+
l(), o.notifyComponentUpdate(), o.sendInspectorTree(c), o.sendInspectorState(c);
|
2070
|
+
});
|
2071
|
+
const s = "router:navigations:" + r;
|
2072
|
+
o.addTimelineLayer({
|
2073
|
+
id: s,
|
2074
|
+
label: `Router${r ? " " + r : ""} Navigations`,
|
2075
|
+
color: 4237508
|
2076
|
+
}), t.onError((a, u) => {
|
2077
|
+
o.addTimelineEvent({
|
2078
|
+
layerId: s,
|
2079
|
+
event: {
|
2080
|
+
title: "Error during Navigation",
|
2081
|
+
subtitle: u.fullPath,
|
2082
|
+
logType: "error",
|
2083
|
+
time: o.now(),
|
2084
|
+
data: { error: a },
|
2085
|
+
groupId: u.meta.__navigationId
|
2086
|
+
}
|
2087
|
+
});
|
2088
|
+
});
|
2089
|
+
let i = 0;
|
2090
|
+
t.beforeEach((a, u) => {
|
2091
|
+
const f = {
|
2092
|
+
guard: Ne("beforeEach"),
|
2093
|
+
from: me(u, "Current Location during this navigation"),
|
2094
|
+
to: me(a, "Target location")
|
2095
|
+
};
|
2096
|
+
Object.defineProperty(a.meta, "__navigationId", {
|
2097
|
+
value: i++
|
2098
|
+
}), o.addTimelineEvent({
|
2099
|
+
layerId: s,
|
2100
|
+
event: {
|
2101
|
+
time: o.now(),
|
2102
|
+
title: "Start of navigation",
|
2103
|
+
subtitle: a.fullPath,
|
2104
|
+
data: f,
|
2105
|
+
groupId: a.meta.__navigationId
|
2106
|
+
}
|
2107
|
+
});
|
2108
|
+
}), t.afterEach((a, u, f) => {
|
2109
|
+
const d = {
|
2110
|
+
guard: Ne("afterEach")
|
2111
|
+
};
|
2112
|
+
f ? (d.failure = {
|
2113
|
+
_custom: {
|
2114
|
+
type: Error,
|
2115
|
+
readOnly: !0,
|
2116
|
+
display: f ? f.message : "",
|
2117
|
+
tooltip: "Navigation Failure",
|
2118
|
+
value: f
|
2119
|
+
}
|
2120
|
+
}, d.status = Ne("❌")) : d.status = Ne("✅"), d.from = me(u, "Current Location during this navigation"), d.to = me(a, "Target location"), o.addTimelineEvent({
|
2121
|
+
layerId: s,
|
2122
|
+
event: {
|
2123
|
+
title: "End of navigation",
|
2124
|
+
subtitle: a.fullPath,
|
2125
|
+
time: o.now(),
|
2126
|
+
data: d,
|
2127
|
+
logType: f ? "warning" : "default",
|
2128
|
+
groupId: a.meta.__navigationId
|
2129
|
+
}
|
2130
|
+
});
|
2131
|
+
});
|
2132
|
+
const c = "router-inspector:" + r;
|
2133
|
+
o.addInspector({
|
2134
|
+
id: c,
|
2135
|
+
label: "Routes" + (r ? " " + r : ""),
|
2136
|
+
icon: "book",
|
2137
|
+
treeFilterPlaceholder: "Search routes"
|
2138
|
+
});
|
2139
|
+
function l() {
|
2140
|
+
if (!h)
|
2141
|
+
return;
|
2142
|
+
const a = h;
|
2143
|
+
let u = n.getRoutes().filter((f) => !f.parent || // these routes have a parent with no component which will not appear in the view
|
2144
|
+
// therefore we still need to include them
|
2145
|
+
!f.parent.record.components);
|
2146
|
+
u.forEach(Cn), a.filter && (u = u.filter((f) => (
|
2147
|
+
// save matches state based on the payload
|
2148
|
+
ut(f, a.filter.toLowerCase())
|
2149
|
+
))), u.forEach((f) => jn(f, t.currentRoute.value)), a.rootNodes = u.map($n);
|
2150
|
+
}
|
2151
|
+
let h;
|
2152
|
+
o.on.getInspectorTree((a) => {
|
2153
|
+
h = a, a.app === e && a.inspectorId === c && l();
|
2154
|
+
}), o.on.getInspectorState((a) => {
|
2155
|
+
if (a.app === e && a.inspectorId === c) {
|
2156
|
+
const f = n.getRoutes().find((d) => d.record.__vd_id === a.nodeId);
|
2157
|
+
f && (a.state = {
|
2158
|
+
options: ns(f)
|
2159
|
+
});
|
2160
|
+
}
|
2161
|
+
}), o.sendInspectorTree(c), o.sendInspectorState(c);
|
2162
|
+
});
|
2163
|
+
}
|
2164
|
+
function ts(e) {
|
2165
|
+
return e.optional ? e.repeatable ? "*" : "?" : e.repeatable ? "+" : "";
|
2166
|
+
}
|
2167
|
+
function ns(e) {
|
2168
|
+
const { record: t } = e, n = [
|
2169
|
+
{ editable: !1, key: "path", value: t.path }
|
2170
|
+
];
|
2171
|
+
return t.name != null && n.push({
|
2172
|
+
editable: !1,
|
2173
|
+
key: "name",
|
2174
|
+
value: t.name
|
2175
|
+
}), n.push({ editable: !1, key: "regexp", value: e.re }), e.keys.length && n.push({
|
2176
|
+
editable: !1,
|
2177
|
+
key: "keys",
|
2178
|
+
value: {
|
2179
|
+
_custom: {
|
2180
|
+
type: null,
|
2181
|
+
readOnly: !0,
|
2182
|
+
display: e.keys.map((r) => `${r.name}${ts(r)}`).join(" "),
|
2183
|
+
tooltip: "Param keys",
|
2184
|
+
value: e.keys
|
2185
|
+
}
|
2186
|
+
}
|
2187
|
+
}), t.redirect != null && n.push({
|
2188
|
+
editable: !1,
|
2189
|
+
key: "redirect",
|
2190
|
+
value: t.redirect
|
2191
|
+
}), e.alias.length && n.push({
|
2192
|
+
editable: !1,
|
2193
|
+
key: "aliases",
|
2194
|
+
value: e.alias.map((r) => r.record.path)
|
2195
|
+
}), Object.keys(e.record.meta).length && n.push({
|
2196
|
+
editable: !1,
|
2197
|
+
key: "meta",
|
2198
|
+
value: e.record.meta
|
2199
|
+
}), n.push({
|
2200
|
+
key: "score",
|
2201
|
+
editable: !1,
|
2202
|
+
value: {
|
2203
|
+
_custom: {
|
2204
|
+
type: null,
|
2205
|
+
readOnly: !0,
|
2206
|
+
display: e.score.map((r) => r.join(", ")).join(" | "),
|
2207
|
+
tooltip: "Score used to sort routes",
|
2208
|
+
value: e.score
|
2209
|
+
}
|
2210
|
+
}
|
2211
|
+
}), n;
|
2212
|
+
}
|
2213
|
+
const Nn = 15485081, In = 2450411, Tn = 8702998, rs = 2282478, An = 16486972, os = 6710886, ss = 16704226, is = 12131356;
|
2214
|
+
function $n(e) {
|
2215
|
+
const t = [], { record: n } = e;
|
2216
|
+
n.name != null && t.push({
|
2217
|
+
label: String(n.name),
|
2218
|
+
textColor: 0,
|
2219
|
+
backgroundColor: rs
|
2220
|
+
}), n.aliasOf && t.push({
|
2221
|
+
label: "alias",
|
2222
|
+
textColor: 0,
|
2223
|
+
backgroundColor: An
|
2224
|
+
}), e.__vd_match && t.push({
|
2225
|
+
label: "matches",
|
2226
|
+
textColor: 0,
|
2227
|
+
backgroundColor: Nn
|
2228
|
+
}), e.__vd_exactActive && t.push({
|
2229
|
+
label: "exact",
|
2230
|
+
textColor: 0,
|
2231
|
+
backgroundColor: Tn
|
2232
|
+
}), e.__vd_active && t.push({
|
2233
|
+
label: "active",
|
2234
|
+
textColor: 0,
|
2235
|
+
backgroundColor: In
|
2236
|
+
}), n.redirect && t.push({
|
2237
|
+
label: typeof n.redirect == "string" ? `redirect: ${n.redirect}` : "redirects",
|
2238
|
+
textColor: 16777215,
|
2239
|
+
backgroundColor: os
|
2240
|
+
});
|
2241
|
+
let r = n.__vd_id;
|
2242
|
+
return r == null && (r = String(as++), n.__vd_id = r), {
|
2243
|
+
id: r,
|
2244
|
+
label: n.path,
|
2245
|
+
tags: t,
|
2246
|
+
children: e.children.map($n)
|
2247
|
+
};
|
2248
|
+
}
|
2249
|
+
let as = 0;
|
2250
|
+
const cs = /^\/(.*)\/([a-z]*)$/;
|
2251
|
+
function jn(e, t) {
|
2252
|
+
const n = t.matched.length && te(t.matched[t.matched.length - 1], e.record);
|
2253
|
+
e.__vd_exactActive = e.__vd_active = n, n || (e.__vd_active = t.matched.some((r) => te(r, e.record))), e.children.forEach((r) => jn(r, t));
|
2254
|
+
}
|
2255
|
+
function Cn(e) {
|
2256
|
+
e.__vd_match = !1, e.children.forEach(Cn);
|
2257
|
+
}
|
2258
|
+
function ut(e, t) {
|
2259
|
+
const n = String(e.re).match(cs);
|
2260
|
+
if (e.__vd_match = !1, !n || n.length < 3)
|
2261
|
+
return !1;
|
2262
|
+
if (new RegExp(n[1].replace(/\$$/, ""), n[2]).test(t))
|
2263
|
+
return e.children.forEach((i) => ut(i, t)), e.record.path !== "/" || t === "/" ? (e.__vd_match = e.re.test(t), !0) : !1;
|
2264
|
+
const o = e.record.path.toLowerCase(), s = ae(o);
|
2265
|
+
return !t.startsWith("/") && (s.includes(t) || o.includes(t)) || s.startsWith(t) || o.startsWith(t) || e.record.name && String(e.record.name).includes(t) ? !0 : e.children.some((i) => ut(i, t));
|
2266
|
+
}
|
2267
|
+
function us(e, t) {
|
2268
|
+
const n = {};
|
2269
|
+
for (const r in e)
|
2270
|
+
t.includes(r) || (n[r] = e[r]);
|
2271
|
+
return n;
|
2272
|
+
}
|
2273
|
+
function ls(e) {
|
2274
|
+
const t = Ao(e.routes, e), n = e.parseQuery || Lo, r = e.stringifyQuery || Dt, o = e.history;
|
2275
|
+
if (S.NODE_ENV !== "production" && !o)
|
2276
|
+
throw new Error('Provide the "history" option when calling "createRouter()": https://router.vuejs.org/api/interfaces/RouterOptions.html#history');
|
2277
|
+
const s = pe(), i = pe(), c = pe(), l = J(Y);
|
2278
|
+
let h = Y;
|
2279
|
+
z && e.scrollBehavior && "scrollRestoration" in history && (history.scrollRestoration = "manual");
|
2280
|
+
const a = He.bind(null, (m) => "" + m), u = He.bind(null, oo), f = (
|
2281
|
+
// @ts-expect-error: intentionally avoid the type check
|
2282
|
+
He.bind(null, ae)
|
2283
|
+
);
|
2284
|
+
function d(m, E) {
|
2285
|
+
let w, b;
|
2286
|
+
return Pn(m) ? (w = t.getRecordMatcher(m), S.NODE_ENV !== "production" && !w && P(`Parent route "${String(m)}" not found when adding child route`, E), b = E) : b = m, t.addRoute(b, w);
|
2287
|
+
}
|
2288
|
+
function v(m) {
|
2289
|
+
const E = t.getRecordMatcher(m);
|
2290
|
+
E ? t.removeRoute(E) : S.NODE_ENV !== "production" && P(`Cannot remove non-existent route "${String(m)}"`);
|
2291
|
+
}
|
2292
|
+
function p() {
|
2293
|
+
return t.getRoutes().map((m) => m.record);
|
2294
|
+
}
|
2295
|
+
function g(m) {
|
2296
|
+
return !!t.getRecordMatcher(m);
|
2297
|
+
}
|
2298
|
+
function y(m, E) {
|
2299
|
+
if (E = I({}, E || l.value), typeof m == "string") {
|
2300
|
+
const k = ze(n, m, E.path), $ = t.resolve({ path: k.path }, E), re = o.createHref(k.fullPath);
|
2301
|
+
return S.NODE_ENV !== "production" && (re.startsWith("//") ? P(`Location "${m}" resolved to "${re}". A resolved location cannot start with multiple slashes.`) : $.matched.length || P(`No match found for location with path "${m}"`)), I(k, $, {
|
2302
|
+
params: f($.params),
|
2303
|
+
hash: ae(k.hash),
|
2304
|
+
redirectedFrom: void 0,
|
2305
|
+
href: re
|
2306
|
+
});
|
2307
|
+
}
|
2308
|
+
if (S.NODE_ENV !== "production" && !Ae(m))
|
2309
|
+
return P(`router.resolve() was passed an invalid location. This will fail in production.
|
2310
|
+
- Location:`, m), y({});
|
2311
|
+
let w;
|
2312
|
+
if (m.path != null)
|
2313
|
+
S.NODE_ENV !== "production" && "params" in m && !("name" in m) && // @ts-expect-error: the type is never
|
2314
|
+
Object.keys(m.params).length && P(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`), w = I({}, m, {
|
2315
|
+
path: ze(n, m.path, E.path).path
|
2316
|
+
});
|
2317
|
+
else {
|
2318
|
+
const k = I({}, m.params);
|
2319
|
+
for (const $ in k)
|
2320
|
+
k[$] == null && delete k[$];
|
2321
|
+
w = I({}, m, {
|
2322
|
+
params: u(k)
|
2323
|
+
}), E.params = u(E.params);
|
2324
|
+
}
|
2325
|
+
const b = t.resolve(w, E), T = m.hash || "";
|
2326
|
+
S.NODE_ENV !== "production" && T && !T.startsWith("#") && P(`A \`hash\` should always start with the character "#". Replace "${T}" with "#${T}".`), b.params = a(f(b.params));
|
2327
|
+
const j = ao(r, I({}, m, {
|
2328
|
+
hash: to(T),
|
2329
|
+
path: b.path
|
2330
|
+
})), V = o.createHref(j);
|
2331
|
+
return S.NODE_ENV !== "production" && (V.startsWith("//") ? P(`Location "${m}" resolved to "${V}". A resolved location cannot start with multiple slashes.`) : b.matched.length || P(`No match found for location with path "${m.path != null ? m.path : m}"`)), I({
|
2332
|
+
fullPath: j,
|
2333
|
+
// keep the hash encoded so fullPath is effectively path + encodedQuery +
|
2334
|
+
// hash
|
2335
|
+
hash: T,
|
2336
|
+
query: (
|
2337
|
+
// if the user is using a custom query lib like qs, we might have
|
2338
|
+
// nested objects, so we keep the query as is, meaning it can contain
|
2339
|
+
// numbers at `$route.query`, but at the point, the user will have to
|
2340
|
+
// use their own type anyway.
|
2341
|
+
// https://github.com/vuejs/router/issues/328#issuecomment-649481567
|
2342
|
+
r === Dt ? Wo(m.query) : m.query || {}
|
2343
|
+
)
|
2344
|
+
}, b, {
|
2345
|
+
redirectedFrom: void 0,
|
2346
|
+
href: V
|
2347
|
+
});
|
2348
|
+
}
|
2349
|
+
function _(m) {
|
2350
|
+
return typeof m == "string" ? ze(n, m, l.value.path) : I({}, m);
|
2351
|
+
}
|
2352
|
+
function O(m, E) {
|
2353
|
+
if (h !== m)
|
2354
|
+
return ue(8, {
|
2355
|
+
from: E,
|
2356
|
+
to: m
|
2357
|
+
});
|
2358
|
+
}
|
2359
|
+
function R(m) {
|
2360
|
+
return x(m);
|
2361
|
+
}
|
2362
|
+
function D(m) {
|
2363
|
+
return R(I(_(m), { replace: !0 }));
|
2364
|
+
}
|
2365
|
+
function C(m) {
|
2366
|
+
const E = m.matched[m.matched.length - 1];
|
2367
|
+
if (E && E.redirect) {
|
2368
|
+
const { redirect: w } = E;
|
2369
|
+
let b = typeof w == "function" ? w(m) : w;
|
2370
|
+
if (typeof b == "string" && (b = b.includes("?") || b.includes("#") ? b = _(b) : (
|
2371
|
+
// force empty params
|
2372
|
+
{ path: b }
|
2373
|
+
), b.params = {}), S.NODE_ENV !== "production" && b.path == null && !("name" in b))
|
2374
|
+
throw P(`Invalid redirect found:
|
2375
|
+
${JSON.stringify(b, null, 2)}
|
2376
|
+
when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`), new Error("Invalid redirect");
|
2377
|
+
return I({
|
2378
|
+
query: m.query,
|
2379
|
+
hash: m.hash,
|
2380
|
+
// avoid transferring params if the redirect has a path
|
2381
|
+
params: b.path != null ? {} : m.params
|
2382
|
+
}, b);
|
2383
|
+
}
|
2384
|
+
}
|
2385
|
+
function x(m, E) {
|
2386
|
+
const w = h = y(m), b = l.value, T = m.state, j = m.force, V = m.replace === !0, k = C(w);
|
2387
|
+
if (k)
|
2388
|
+
return x(
|
2389
|
+
I(_(k), {
|
2390
|
+
state: typeof k == "object" ? I({}, T, k.state) : T,
|
2391
|
+
force: j,
|
2392
|
+
replace: V
|
2393
|
+
}),
|
2394
|
+
// keep original redirectedFrom if it exists
|
2395
|
+
E || w
|
2396
|
+
);
|
2397
|
+
const $ = w;
|
2398
|
+
$.redirectedFrom = E;
|
2399
|
+
let re;
|
2400
|
+
return !j && Pt(r, b, w) && (re = ue(16, { to: $, from: b }), Et(
|
2401
|
+
b,
|
2402
|
+
b,
|
2403
|
+
// this is a push, the only way for it to be triggered from a
|
2404
|
+
// history.listen is with a redirect, which makes it become a push
|
2405
|
+
!0,
|
2406
|
+
// This cannot be the first navigation because the initial location
|
2407
|
+
// cannot be manually navigated to
|
2408
|
+
!1
|
2409
|
+
)), (re ? Promise.resolve(re) : gt($, b)).catch((M) => H(M) ? (
|
2410
|
+
// navigation redirects still mark the router as ready
|
2411
|
+
H(
|
2412
|
+
M,
|
2413
|
+
2
|
2414
|
+
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
2415
|
+
) ? M : Ke(M)
|
2416
|
+
) : (
|
2417
|
+
// reject any unknown error
|
2418
|
+
Ue(M, $, b)
|
2419
|
+
)).then((M) => {
|
2420
|
+
if (M) {
|
2421
|
+
if (H(
|
2422
|
+
M,
|
2423
|
+
2
|
2424
|
+
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
2425
|
+
))
|
2426
|
+
return S.NODE_ENV !== "production" && // we are redirecting to the same location we were already at
|
2427
|
+
Pt(r, y(M.to), $) && // and we have done it a couple of times
|
2428
|
+
E && // @ts-expect-error: added only in dev
|
2429
|
+
(E._count = E._count ? (
|
2430
|
+
// @ts-expect-error
|
2431
|
+
E._count + 1
|
2432
|
+
) : 1) > 30 ? (P(`Detected a possibly infinite redirection in a navigation guard when going from "${b.fullPath}" to "${$.fullPath}". Aborting to avoid a Stack Overflow.
|
2433
|
+
Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`), Promise.reject(new Error("Infinite redirect in navigation guard"))) : x(
|
2434
|
+
// keep options
|
2435
|
+
I({
|
2436
|
+
// preserve an existing replacement but allow the redirect to override it
|
2437
|
+
replace: V
|
2438
|
+
}, _(M.to), {
|
2439
|
+
state: typeof M.to == "object" ? I({}, T, M.to.state) : T,
|
2440
|
+
force: j
|
2441
|
+
}),
|
2442
|
+
// preserve the original redirectedFrom if any
|
2443
|
+
E || $
|
2444
|
+
);
|
2445
|
+
} else
|
2446
|
+
M = yt($, b, !0, V, T);
|
2447
|
+
return vt($, b, M), M;
|
2448
|
+
});
|
2449
|
+
}
|
2450
|
+
function Le(m, E) {
|
2451
|
+
const w = O(m, E);
|
2452
|
+
return w ? Promise.reject(w) : Promise.resolve();
|
2453
|
+
}
|
2454
|
+
function le(m) {
|
2455
|
+
const E = ke.values().next().value;
|
2456
|
+
return E && typeof E.runWithContext == "function" ? E.runWithContext(m) : m();
|
2457
|
+
}
|
2458
|
+
function gt(m, E) {
|
2459
|
+
let w;
|
2460
|
+
const [b, T, j] = fs(m, E);
|
2461
|
+
w = Qe(b.reverse(), "beforeRouteLeave", m, E);
|
2462
|
+
for (const k of b)
|
2463
|
+
k.leaveGuards.forEach(($) => {
|
2464
|
+
w.push(X($, m, E));
|
2465
|
+
});
|
2466
|
+
const V = Le.bind(null, m, E);
|
2467
|
+
return w.push(V), se(w).then(() => {
|
2468
|
+
w = [];
|
2469
|
+
for (const k of s.list())
|
2470
|
+
w.push(X(k, m, E));
|
2471
|
+
return w.push(V), se(w);
|
2472
|
+
}).then(() => {
|
2473
|
+
w = Qe(T, "beforeRouteUpdate", m, E);
|
2474
|
+
for (const k of T)
|
2475
|
+
k.updateGuards.forEach(($) => {
|
2476
|
+
w.push(X($, m, E));
|
2477
|
+
});
|
2478
|
+
return w.push(V), se(w);
|
2479
|
+
}).then(() => {
|
2480
|
+
w = [];
|
2481
|
+
for (const k of j)
|
2482
|
+
if (k.beforeEnter)
|
2483
|
+
if (K(k.beforeEnter))
|
2484
|
+
for (const $ of k.beforeEnter)
|
2485
|
+
w.push(X($, m, E));
|
2486
|
+
else
|
2487
|
+
w.push(X(k.beforeEnter, m, E));
|
2488
|
+
return w.push(V), se(w);
|
2489
|
+
}).then(() => (m.matched.forEach((k) => k.enterCallbacks = {}), w = Qe(j, "beforeRouteEnter", m, E, le), w.push(V), se(w))).then(() => {
|
2490
|
+
w = [];
|
2491
|
+
for (const k of i.list())
|
2492
|
+
w.push(X(k, m, E));
|
2493
|
+
return w.push(V), se(w);
|
2494
|
+
}).catch((k) => H(
|
2495
|
+
k,
|
2496
|
+
8
|
2497
|
+
/* ErrorTypes.NAVIGATION_CANCELLED */
|
2498
|
+
) ? k : Promise.reject(k));
|
2499
|
+
}
|
2500
|
+
function vt(m, E, w) {
|
2501
|
+
c.list().forEach((b) => le(() => b(m, E, w)));
|
2502
|
+
}
|
2503
|
+
function yt(m, E, w, b, T) {
|
2504
|
+
const j = O(m, E);
|
2505
|
+
if (j)
|
2506
|
+
return j;
|
2507
|
+
const V = E === Y, k = z ? history.state : {};
|
2508
|
+
w && (b || V ? o.replace(m.fullPath, I({
|
2509
|
+
scroll: V && k && k.scroll
|
2510
|
+
}, T)) : o.push(m.fullPath, T)), l.value = m, Et(m, E, w, V), Ke();
|
2511
|
+
}
|
2512
|
+
let fe;
|
2513
|
+
function Bn() {
|
2514
|
+
fe || (fe = o.listen((m, E, w) => {
|
2515
|
+
if (!_t.listening)
|
2516
|
+
return;
|
2517
|
+
const b = y(m), T = C(b);
|
2518
|
+
if (T) {
|
2519
|
+
x(I(T, { replace: !0, force: !0 }), b).catch(ve);
|
2520
|
+
return;
|
2521
|
+
}
|
2522
|
+
h = b;
|
2523
|
+
const j = l.value;
|
2524
|
+
z && po(Vt(j.fullPath, w.delta), Fe()), gt(b, j).catch((V) => H(
|
2525
|
+
V,
|
2526
|
+
12
|
2527
|
+
/* ErrorTypes.NAVIGATION_CANCELLED */
|
2528
|
+
) ? V : H(
|
2529
|
+
V,
|
2530
|
+
2
|
2531
|
+
/* ErrorTypes.NAVIGATION_GUARD_REDIRECT */
|
2532
|
+
) ? (x(
|
2533
|
+
I(_(V.to), {
|
2534
|
+
force: !0
|
2535
|
+
}),
|
2536
|
+
b
|
2537
|
+
// avoid an uncaught rejection, let push call triggerError
|
2538
|
+
).then((k) => {
|
2539
|
+
H(
|
2540
|
+
k,
|
2541
|
+
20
|
2542
|
+
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
2543
|
+
) && !w.delta && w.type === ce.pop && o.go(-1, !1);
|
2544
|
+
}).catch(ve), Promise.reject()) : (w.delta && o.go(-w.delta, !1), Ue(V, b, j))).then((V) => {
|
2545
|
+
V = V || yt(
|
2546
|
+
// after navigation, all matched components are resolved
|
2547
|
+
b,
|
2548
|
+
j,
|
2549
|
+
!1
|
2550
|
+
), V && (w.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history
|
2551
|
+
// entry while a different route is displayed
|
2552
|
+
!H(
|
2553
|
+
V,
|
2554
|
+
8
|
2555
|
+
/* ErrorTypes.NAVIGATION_CANCELLED */
|
2556
|
+
) ? o.go(-w.delta, !1) : w.type === ce.pop && H(
|
2557
|
+
V,
|
2558
|
+
20
|
2559
|
+
/* ErrorTypes.NAVIGATION_DUPLICATED */
|
2560
|
+
) && o.go(-1, !1)), vt(b, j, V);
|
2561
|
+
}).catch(ve);
|
2562
|
+
}));
|
2563
|
+
}
|
2564
|
+
let We = pe(), wt = pe(), Pe;
|
2565
|
+
function Ue(m, E, w) {
|
2566
|
+
Ke(m);
|
2567
|
+
const b = wt.list();
|
2568
|
+
return b.length ? b.forEach((T) => T(m, E, w)) : (S.NODE_ENV !== "production" && P("uncaught error during route navigation:"), console.error(m)), Promise.reject(m);
|
2569
|
+
}
|
2570
|
+
function Ln() {
|
2571
|
+
return Pe && l.value !== Y ? Promise.resolve() : new Promise((m, E) => {
|
2572
|
+
We.add([m, E]);
|
2573
|
+
});
|
2574
|
+
}
|
2575
|
+
function Ke(m) {
|
2576
|
+
return Pe || (Pe = !m, Bn(), We.list().forEach(([E, w]) => m ? w(m) : E()), We.reset()), m;
|
2577
|
+
}
|
2578
|
+
function Et(m, E, w, b) {
|
2579
|
+
const { scrollBehavior: T } = e;
|
2580
|
+
if (!z || !T)
|
2581
|
+
return Promise.resolve();
|
2582
|
+
const j = !w && mo(Vt(m.fullPath, 0)) || (b || !w) && history.state && history.state.scroll || null;
|
2583
|
+
return Te().then(() => T(m, E, j)).then((V) => V && ho(V)).catch((V) => Ue(V, m, E));
|
2584
|
+
}
|
2585
|
+
const Ge = (m) => o.go(m);
|
2586
|
+
let qe;
|
2587
|
+
const ke = /* @__PURE__ */ new Set(), _t = {
|
2588
|
+
currentRoute: l,
|
2589
|
+
listening: !0,
|
2590
|
+
addRoute: d,
|
2591
|
+
removeRoute: v,
|
2592
|
+
clearRoutes: t.clearRoutes,
|
2593
|
+
hasRoute: g,
|
2594
|
+
getRoutes: p,
|
2595
|
+
resolve: y,
|
2596
|
+
options: e,
|
2597
|
+
push: R,
|
2598
|
+
replace: D,
|
2599
|
+
go: Ge,
|
2600
|
+
back: () => Ge(-1),
|
2601
|
+
forward: () => Ge(1),
|
2602
|
+
beforeEach: s.add,
|
2603
|
+
beforeResolve: i.add,
|
2604
|
+
afterEach: c.add,
|
2605
|
+
onError: wt.add,
|
2606
|
+
isReady: Ln,
|
2607
|
+
install(m) {
|
2608
|
+
const E = this;
|
2609
|
+
m.component("RouterLink", Ho), m.component("RouterView", Yo), m.config.globalProperties.$router = E, Object.defineProperty(m.config.globalProperties, "$route", {
|
2610
|
+
enumerable: !0,
|
2611
|
+
get: () => W(l)
|
2612
|
+
}), z && // used for the initial navigation client side to avoid pushing
|
2613
|
+
// multiple times when the router is used in multiple apps
|
2614
|
+
!qe && l.value === Y && (qe = !0, R(o.location).catch((T) => {
|
2615
|
+
S.NODE_ENV !== "production" && P("Unexpected error when starting the router:", T);
|
2616
|
+
}));
|
2617
|
+
const w = {};
|
2618
|
+
for (const T in Y)
|
2619
|
+
Object.defineProperty(w, T, {
|
2620
|
+
get: () => l.value[T],
|
2621
|
+
enumerable: !0
|
2622
|
+
});
|
2623
|
+
m.provide(Be, E), m.provide(mt, Hn(w)), m.provide(ct, l);
|
2624
|
+
const b = m.unmount;
|
2625
|
+
ke.add(m), m.unmount = function() {
|
2626
|
+
ke.delete(m), ke.size < 1 && (h = Y, fe && fe(), fe = null, l.value = Y, qe = !1, Pe = !1), b();
|
2627
|
+
}, S.NODE_ENV !== "production" && z && es(m, E, t);
|
2628
|
+
}
|
2629
|
+
};
|
2630
|
+
function se(m) {
|
2631
|
+
return m.reduce((E, w) => E.then(() => le(w)), Promise.resolve());
|
2632
|
+
}
|
2633
|
+
return _t;
|
2634
|
+
}
|
2635
|
+
function fs(e, t) {
|
2636
|
+
const n = [], r = [], o = [], s = Math.max(t.matched.length, e.matched.length);
|
2637
|
+
for (let i = 0; i < s; i++) {
|
2638
|
+
const c = t.matched[i];
|
2639
|
+
c && (e.matched.find((h) => te(h, c)) ? r.push(c) : n.push(c));
|
2640
|
+
const l = e.matched[i];
|
2641
|
+
l && (t.matched.find((h) => te(h, l)) || o.push(l));
|
2642
|
+
}
|
2643
|
+
return [n, r, o];
|
2644
|
+
}
|
2645
|
+
function hs() {
|
2646
|
+
return ee(Be);
|
2647
|
+
}
|
2648
|
+
function ds(e) {
|
2649
|
+
return ee(mt);
|
2650
|
+
}
|
2651
|
+
function ne(e) {
|
2652
|
+
let t = sn(), n = Rr(), r = Tr(e), o = un(), s = hs(), i = ds();
|
2653
|
+
function c(p) {
|
2654
|
+
p.scopeSnapshot && (t = p.scopeSnapshot), p.slotSnapshot && (n = p.slotSnapshot), p.vforSnapshot && (r = p.vforSnapshot), p.elementRefSnapshot && (o = p.elementRefSnapshot), p.routerSnapshot && (s = p.routerSnapshot);
|
2655
|
+
}
|
2656
|
+
function l(p) {
|
2657
|
+
if (N.isVar(p))
|
2658
|
+
return q(h(p));
|
2659
|
+
if (N.isVForItem(p))
|
2660
|
+
return $r(p.fid) ? r.getVForIndex(p.fid) : q(h(p));
|
2661
|
+
if (N.isVForIndex(p))
|
2662
|
+
return r.getVForIndex(p.fid);
|
2663
|
+
if (N.isJs(p)) {
|
2664
|
+
const { code: g, bind: y } = p, _ = Oe(y, (O) => a(O));
|
2665
|
+
return xr(g, _)();
|
2666
|
+
}
|
2667
|
+
if (N.isSlotProp(p))
|
2668
|
+
return n.getPropsValue(p);
|
2669
|
+
if (N.isRouterParams(p))
|
2670
|
+
return q(h(p));
|
2671
|
+
throw new Error(`Invalid binding: ${p}`);
|
2672
|
+
}
|
2673
|
+
function h(p) {
|
2674
|
+
if (N.isVar(p)) {
|
2675
|
+
const g = t.getVueRef(p) || yr(p);
|
2676
|
+
return bt(g, {
|
2677
|
+
paths: p.path,
|
2678
|
+
getBindableValueFn: l
|
2679
|
+
});
|
2680
|
+
}
|
2681
|
+
if (N.isVForItem(p))
|
2682
|
+
return Ar({
|
2683
|
+
binding: p,
|
2684
|
+
snapshot: v
|
2685
|
+
});
|
2686
|
+
if (N.isVForIndex(p))
|
2687
|
+
return () => l(p);
|
2688
|
+
if (N.isRouterParams(p)) {
|
2689
|
+
const { prop: g = "params" } = p;
|
2690
|
+
return bt(() => i[g], {
|
2691
|
+
paths: p.path,
|
2692
|
+
getBindableValueFn: l
|
2693
|
+
});
|
2694
|
+
}
|
2695
|
+
throw new Error(`Invalid binding: ${p}`);
|
2696
|
+
}
|
2697
|
+
function a(p) {
|
2698
|
+
if (N.isVar(p) || N.isVForItem(p))
|
2699
|
+
return h(p);
|
2700
|
+
if (N.isVForIndex(p))
|
2701
|
+
return l(p);
|
2702
|
+
if (N.isJs(p))
|
2703
|
+
return null;
|
2704
|
+
if (N.isRouterParams(p))
|
2705
|
+
return h(p);
|
2706
|
+
throw new Error(`Invalid binding: ${p}`);
|
2707
|
+
}
|
2708
|
+
function u(p) {
|
2709
|
+
if (N.isVar(p))
|
2710
|
+
return {
|
2711
|
+
sid: p.sid,
|
2712
|
+
id: p.id
|
2713
|
+
};
|
2714
|
+
if (N.isVForItem(p))
|
2715
|
+
return {
|
2716
|
+
type: "vf",
|
2717
|
+
fid: p.fid
|
2718
|
+
};
|
2719
|
+
if (N.isVForIndex(p))
|
2720
|
+
return {
|
2721
|
+
type: "vf-i",
|
2722
|
+
fid: p.fid,
|
2723
|
+
value: null
|
2724
|
+
};
|
2725
|
+
if (N.isJs(p))
|
2726
|
+
return null;
|
2727
|
+
}
|
2728
|
+
function f(p) {
|
2729
|
+
var g, y;
|
2730
|
+
(g = p.vars) == null || g.forEach((_) => {
|
2731
|
+
h({ type: "var", ..._ }).value = _.val;
|
2732
|
+
}), (y = p.ele_refs) == null || y.forEach((_) => {
|
2733
|
+
o.getRef({
|
2734
|
+
sid: _.sid,
|
2735
|
+
id: _.id
|
2736
|
+
}).value[_.method](..._.args);
|
2737
|
+
});
|
2738
|
+
}
|
2739
|
+
function d(p, g) {
|
2740
|
+
if (St(g) || St(p.values))
|
2741
|
+
return;
|
2742
|
+
g = g;
|
2743
|
+
const y = p.values, _ = p.skips || new Array(g.length).fill(0);
|
2744
|
+
g.forEach((O, R) => {
|
2745
|
+
if (_[R] === 1)
|
2746
|
+
return;
|
2747
|
+
if (N.isVar(O)) {
|
2748
|
+
const C = h(O);
|
2749
|
+
C.value = y[R];
|
2750
|
+
return;
|
2751
|
+
}
|
2752
|
+
if (N.isRouterAction(O)) {
|
2753
|
+
const C = y[R], x = s[C.fn];
|
2754
|
+
x(...C.args);
|
2755
|
+
return;
|
2756
|
+
}
|
2757
|
+
if (N.isElementRef(O)) {
|
2758
|
+
const C = o.getRef(O).value, x = y[R], { method: Le, args: le = [] } = x;
|
2759
|
+
C[Le](...le);
|
2760
|
+
return;
|
2761
|
+
}
|
2762
|
+
if (N.isJsOutput(O)) {
|
2763
|
+
const C = y[R], x = L(C);
|
2764
|
+
typeof x == "function" && x();
|
2765
|
+
return;
|
2766
|
+
}
|
2767
|
+
const D = h(O);
|
2768
|
+
D.value = y[R];
|
2769
|
+
});
|
2770
|
+
}
|
2771
|
+
const v = {
|
2772
|
+
getVForIndex: r.getVForIndex,
|
2773
|
+
getObjectToValue: l,
|
2774
|
+
getVueRefObject: h,
|
2775
|
+
getVueRefObjectOrValue: a,
|
2776
|
+
getBindingServerInfo: u,
|
2777
|
+
updateRefFromServer: f,
|
2778
|
+
updateOutputsRefFromServer: d,
|
2779
|
+
replaceSnapshot: c
|
2780
|
+
};
|
2781
|
+
return v;
|
2782
|
+
}
|
2783
|
+
class ps {
|
2784
|
+
async eventSend(t, n) {
|
2785
|
+
const { fType: r, hKey: o, key: s } = t, i = Xe().webServerInfo, c = s !== void 0 ? { key: s } : {}, l = r === "sync" ? i.event_url : i.event_async_url;
|
2786
|
+
let h = {};
|
2787
|
+
const a = await fetch(l, {
|
2788
|
+
method: "POST",
|
2789
|
+
headers: {
|
2790
|
+
"Content-Type": "application/json"
|
2791
|
+
},
|
2792
|
+
body: JSON.stringify({
|
2793
|
+
bind: n,
|
2794
|
+
hKey: o,
|
2795
|
+
...c,
|
2796
|
+
page: ye(),
|
2797
|
+
...h
|
2798
|
+
})
|
2799
|
+
});
|
2800
|
+
if (!a.ok)
|
2801
|
+
throw new Error(`HTTP error! status: ${a.status}`);
|
2802
|
+
return await a.json();
|
2803
|
+
}
|
2804
|
+
async watchSend(t) {
|
2805
|
+
const { outputs: n, fType: r, key: o } = t.watchConfig, s = Xe().webServerInfo, i = r === "sync" ? s.watch_url : s.watch_async_url, c = t.getServerInputs(), l = {
|
2806
|
+
key: o,
|
2807
|
+
input: c,
|
2808
|
+
page: ye()
|
2809
|
+
};
|
2810
|
+
return await (await fetch(i, {
|
2811
|
+
method: "POST",
|
2812
|
+
headers: {
|
2813
|
+
"Content-Type": "application/json"
|
2814
|
+
},
|
2815
|
+
body: JSON.stringify(l)
|
2816
|
+
})).json();
|
2817
|
+
}
|
2818
|
+
}
|
2819
|
+
class ms {
|
2820
|
+
async eventSend(t, n) {
|
2821
|
+
const { fType: r, hKey: o, key: s } = t, i = s !== void 0 ? { key: s } : {};
|
2822
|
+
let c = {};
|
2823
|
+
const l = {
|
2824
|
+
bind: n,
|
2825
|
+
fType: r,
|
2826
|
+
hKey: o,
|
2827
|
+
...i,
|
2828
|
+
page: ye(),
|
2829
|
+
...c
|
2830
|
+
};
|
2831
|
+
return await window.pywebview.api.event_call(l);
|
2832
|
+
}
|
2833
|
+
async watchSend(t) {
|
2834
|
+
const { outputs: n, fType: r, key: o } = t.watchConfig, s = t.getServerInputs(), i = {
|
2835
|
+
key: o,
|
2836
|
+
input: s,
|
2837
|
+
fType: r,
|
2838
|
+
page: ye()
|
2839
|
+
};
|
2840
|
+
return await window.pywebview.api.watch_call(i);
|
2841
|
+
}
|
2842
|
+
}
|
2843
|
+
let lt;
|
2844
|
+
function gs(e) {
|
2845
|
+
switch (e.mode) {
|
2846
|
+
case "web":
|
2847
|
+
lt = new ps();
|
2848
|
+
break;
|
2849
|
+
case "webview":
|
2850
|
+
lt = new ms();
|
2851
|
+
break;
|
2852
|
+
}
|
2853
|
+
}
|
2854
|
+
function xn() {
|
2855
|
+
return lt;
|
2856
|
+
}
|
2857
|
+
function vs(e) {
|
2858
|
+
const t = {
|
2859
|
+
type: "var",
|
2860
|
+
sid: e.sid,
|
2861
|
+
id: e.id
|
2862
|
+
};
|
2863
|
+
return {
|
2864
|
+
...e,
|
2865
|
+
immediate: !0,
|
2866
|
+
outputs: [t, ...e.outputs || []]
|
2867
|
+
};
|
2868
|
+
}
|
2869
|
+
function ys(e, t, n) {
|
2870
|
+
return new ws(e, t, n);
|
2871
|
+
}
|
2872
|
+
class ws {
|
2873
|
+
constructor(t, n, r) {
|
2874
|
+
B(this, "taskQueue", []);
|
2875
|
+
B(this, "id2TaskMap", /* @__PURE__ */ new Map());
|
2876
|
+
B(this, "input2TaskIdMap", _e(() => []));
|
2877
|
+
this.snapshots = r;
|
2878
|
+
const o = [], s = (i) => {
|
2879
|
+
var l;
|
2880
|
+
const c = new Es(i, r);
|
2881
|
+
return this.id2TaskMap.set(c.id, c), (l = i.inputs) == null || l.forEach((h, a) => {
|
2882
|
+
var f, d;
|
2883
|
+
if (((f = i.data) == null ? void 0 : f[a]) === 0 && ((d = i.slient) == null ? void 0 : d[a]) === 0) {
|
2884
|
+
const v = `${h.sid}-${h.id}`;
|
2885
|
+
this.input2TaskIdMap.getOrDefault(v).push(c.id);
|
2886
|
+
}
|
2887
|
+
}), c;
|
2888
|
+
};
|
2889
|
+
t == null || t.forEach((i) => {
|
2890
|
+
const c = s(i);
|
2891
|
+
o.push(c);
|
2892
|
+
}), n == null || n.forEach((i) => {
|
2893
|
+
const c = s(
|
2894
|
+
vs(i)
|
2895
|
+
);
|
2896
|
+
o.push(c);
|
2897
|
+
}), o.forEach((i) => {
|
2898
|
+
const {
|
2899
|
+
deep: c = !0,
|
2900
|
+
once: l,
|
2901
|
+
flush: h,
|
2902
|
+
immediate: a = !0
|
2903
|
+
} = i.watchConfig, u = {
|
2904
|
+
immediate: a,
|
2905
|
+
deep: c,
|
2906
|
+
once: l,
|
2907
|
+
flush: h
|
2908
|
+
}, f = this._getWatchTargets(i);
|
2909
|
+
G(
|
2910
|
+
f,
|
2911
|
+
(d) => {
|
2912
|
+
d.some(Ee) || (i.modify = !0, this.taskQueue.push(new _s(i)), this._scheduleNextTick());
|
2913
|
+
},
|
2914
|
+
u
|
2915
|
+
);
|
2916
|
+
});
|
2917
|
+
}
|
2918
|
+
_getWatchTargets(t) {
|
2919
|
+
if (!t.watchConfig.inputs)
|
2920
|
+
return [];
|
2921
|
+
const n = t.slientInputs, r = t.constDataInputs;
|
2922
|
+
return t.watchConfig.inputs.filter(
|
2923
|
+
(s, i) => !r[i] && (N.isVar(s) || N.isVForItem(s) || N.isRouterParams(s)) && !n[i]
|
2924
|
+
).map((s) => this.snapshots.getVueRefObjectOrValue(s));
|
2925
|
+
}
|
2926
|
+
_scheduleNextTick() {
|
2927
|
+
Te(() => this._runAllTasks());
|
2928
|
+
}
|
2929
|
+
_runAllTasks() {
|
2930
|
+
const t = this.taskQueue.slice();
|
2931
|
+
this.taskQueue.length = 0, this._setTaskNodeRelations(t), t.forEach((n) => {
|
2932
|
+
n.run();
|
2933
|
+
});
|
2934
|
+
}
|
2935
|
+
_setTaskNodeRelations(t) {
|
2936
|
+
t.forEach((n) => {
|
2937
|
+
const r = this._findNextNodes(n, t);
|
2938
|
+
n.appendNextNodes(...r), r.forEach((o) => {
|
2939
|
+
o.appendPrevNodes(n);
|
2940
|
+
});
|
2941
|
+
});
|
2942
|
+
}
|
2943
|
+
_findNextNodes(t, n) {
|
2944
|
+
const r = t.watchTask.watchConfig.outputs;
|
2945
|
+
if (r && r.length <= 0)
|
2946
|
+
return [];
|
2947
|
+
const o = this._getCalculatorTasksByOutput(
|
2948
|
+
t.watchTask.watchConfig.outputs
|
2949
|
+
);
|
2950
|
+
return n.filter(
|
2951
|
+
(s) => o.has(s.watchTask.id) && s.watchTask.id !== t.watchTask.id
|
2952
|
+
);
|
2953
|
+
}
|
2954
|
+
_getCalculatorTasksByOutput(t) {
|
2955
|
+
const n = /* @__PURE__ */ new Set();
|
2956
|
+
return t == null || t.forEach((r) => {
|
2957
|
+
const o = `${r.sid}-${r.id}`;
|
2958
|
+
(this.input2TaskIdMap.get(o) || []).forEach((i) => n.add(i));
|
2959
|
+
}), n;
|
2960
|
+
}
|
2961
|
+
}
|
2962
|
+
class Es {
|
2963
|
+
constructor(t, n) {
|
2964
|
+
B(this, "modify", !0);
|
2965
|
+
B(this, "_running", !1);
|
2966
|
+
B(this, "id");
|
2967
|
+
B(this, "_runningPromise", null);
|
2968
|
+
B(this, "_runningPromiseResolve", null);
|
2969
|
+
B(this, "_inputInfos");
|
2970
|
+
this.watchConfig = t, this.snapshot = n, this.id = Symbol(t.debug), this._inputInfos = this.createInputInfos();
|
2971
|
+
}
|
2972
|
+
createInputInfos() {
|
2973
|
+
const { inputs: t = [] } = this.watchConfig, n = this.watchConfig.data || new Array(t.length).fill(0), r = this.watchConfig.slient || new Array(t.length).fill(0);
|
2974
|
+
return {
|
2975
|
+
const_data: n,
|
2976
|
+
slients: r
|
2977
|
+
};
|
2978
|
+
}
|
2979
|
+
get slientInputs() {
|
2980
|
+
return this._inputInfos.slients;
|
2981
|
+
}
|
2982
|
+
get constDataInputs() {
|
2983
|
+
return this._inputInfos.const_data;
|
2984
|
+
}
|
2985
|
+
getServerInputs() {
|
2986
|
+
const { const_data: t } = this._inputInfos;
|
2987
|
+
return this.watchConfig.inputs ? this.watchConfig.inputs.map((n, r) => t[r] === 0 ? this.snapshot.getObjectToValue(n) : n) : [];
|
2988
|
+
}
|
2989
|
+
get running() {
|
2990
|
+
return this._running;
|
2991
|
+
}
|
2992
|
+
get runningPromise() {
|
2993
|
+
return this._runningPromise;
|
2994
|
+
}
|
2995
|
+
/**
|
2996
|
+
* setRunning
|
2997
|
+
*/
|
2998
|
+
setRunning() {
|
2999
|
+
this._running = !0, this._runningPromise = new Promise((t) => {
|
3000
|
+
this._runningPromiseResolve = t;
|
3001
|
+
}), this._trySetRunningRef(!0);
|
3002
|
+
}
|
3003
|
+
/**
|
3004
|
+
* taskDone
|
3005
|
+
*/
|
3006
|
+
taskDone() {
|
3007
|
+
this._running = !1, this._runningPromiseResolve && (this._runningPromiseResolve(), this._runningPromiseResolve = null), this._trySetRunningRef(!1);
|
3008
|
+
}
|
3009
|
+
_trySetRunningRef(t) {
|
3010
|
+
if (this.watchConfig.running) {
|
3011
|
+
const n = this.snapshot.getVueRefObject(
|
3012
|
+
this.watchConfig.running
|
3013
|
+
);
|
3014
|
+
n.value = t;
|
3015
|
+
}
|
3016
|
+
}
|
3017
|
+
}
|
3018
|
+
class _s {
|
3019
|
+
/**
|
3020
|
+
*
|
3021
|
+
*/
|
3022
|
+
constructor(t) {
|
3023
|
+
B(this, "prevNodes", []);
|
3024
|
+
B(this, "nextNodes", []);
|
3025
|
+
B(this, "_runningPrev", !1);
|
3026
|
+
this.watchTask = t;
|
3027
|
+
}
|
3028
|
+
/**
|
3029
|
+
* appendPrevNodes
|
3030
|
+
*/
|
3031
|
+
appendPrevNodes(...t) {
|
3032
|
+
this.prevNodes.push(...t);
|
3033
|
+
}
|
3034
|
+
/**
|
3035
|
+
*
|
3036
|
+
*/
|
3037
|
+
appendNextNodes(...t) {
|
3038
|
+
this.nextNodes.push(...t);
|
3039
|
+
}
|
3040
|
+
/**
|
3041
|
+
* hasNextNodes
|
3042
|
+
*/
|
3043
|
+
hasNextNodes() {
|
3044
|
+
return this.nextNodes.length > 0;
|
3045
|
+
}
|
3046
|
+
/**
|
3047
|
+
* run
|
3048
|
+
*/
|
3049
|
+
async run() {
|
3050
|
+
if (this.prevNodes.length > 0 && !this._runningPrev)
|
3051
|
+
try {
|
3052
|
+
this._runningPrev = !0, await Promise.all(this.prevNodes.map((t) => t.run()));
|
3053
|
+
} finally {
|
3054
|
+
this._runningPrev = !1;
|
3055
|
+
}
|
3056
|
+
if (this.watchTask.running) {
|
3057
|
+
await this.watchTask.runningPromise;
|
3058
|
+
return;
|
3059
|
+
}
|
3060
|
+
if (this.watchTask.modify) {
|
3061
|
+
this.watchTask.modify = !1, this.watchTask.setRunning();
|
3062
|
+
try {
|
3063
|
+
await Os(this.watchTask);
|
3064
|
+
} finally {
|
3065
|
+
this.watchTask.taskDone();
|
3066
|
+
}
|
3067
|
+
}
|
3068
|
+
}
|
3069
|
+
}
|
3070
|
+
async function Os(e) {
|
3071
|
+
const { snapshot: t } = e, { outputs: n } = e.watchConfig, r = await xn().watchSend(e);
|
3072
|
+
r && t.updateOutputsRefFromServer(r, n);
|
3073
|
+
}
|
3074
|
+
function bs(e, t) {
|
3075
|
+
const {
|
3076
|
+
on: n,
|
3077
|
+
code: r,
|
3078
|
+
immediate: o,
|
3079
|
+
deep: s,
|
3080
|
+
once: i,
|
3081
|
+
flush: c,
|
3082
|
+
bind: l = {},
|
3083
|
+
onData: h,
|
3084
|
+
bindData: a
|
3085
|
+
} = e, u = h || new Array(n.length).fill(0), f = a || new Array(Object.keys(l).length).fill(0), d = Oe(
|
3086
|
+
l,
|
3087
|
+
(g, y, _) => f[_] === 0 ? t.getVueRefObject(g) : g
|
3088
|
+
), v = L(r, d), p = n.length === 1 ? Ut(u[0] === 1, n[0], t) : n.map(
|
3089
|
+
(g, y) => Ut(u[y] === 1, g, t)
|
3090
|
+
);
|
3091
|
+
return G(p, v, { immediate: o, deep: s, once: i, flush: c });
|
3092
|
+
}
|
3093
|
+
function Ut(e, t, n) {
|
3094
|
+
return e ? () => t : n.getVueRefObject(t);
|
3095
|
+
}
|
3096
|
+
function Ss(e, t) {
|
3097
|
+
const {
|
3098
|
+
inputs: n = [],
|
3099
|
+
outputs: r,
|
3100
|
+
slient: o,
|
3101
|
+
data: s,
|
3102
|
+
code: i,
|
3103
|
+
immediate: c = !0,
|
3104
|
+
deep: l,
|
3105
|
+
once: h,
|
3106
|
+
flush: a
|
3107
|
+
} = e, u = o || new Array(n.length).fill(0), f = s || new Array(n.length).fill(0), d = L(i), v = n.filter((g, y) => u[y] === 0 && f[y] === 0).map((g) => t.getVueRefObject(g));
|
3108
|
+
function p() {
|
3109
|
+
return n.map((g, y) => f[y] === 0 ? tn(q(t.getVueRefObject(g))) : g);
|
3110
|
+
}
|
3111
|
+
G(
|
3112
|
+
v,
|
3113
|
+
() => {
|
3114
|
+
let g = d(...p());
|
3115
|
+
if (!r)
|
3116
|
+
return;
|
3117
|
+
const _ = r.length === 1 ? [g] : g, O = _.map((R) => R === void 0 ? 1 : 0);
|
3118
|
+
t.updateOutputsRefFromServer(
|
3119
|
+
{ values: _, skips: O },
|
3120
|
+
r
|
3121
|
+
);
|
3122
|
+
},
|
3123
|
+
{ immediate: c, deep: l, once: h, flush: a }
|
3124
|
+
);
|
3125
|
+
}
|
3126
|
+
function Rs(e, t) {
|
3127
|
+
return Object.assign(
|
3128
|
+
{},
|
3129
|
+
...Object.entries(e ?? {}).map(([n, r]) => {
|
3130
|
+
const o = r.map((c) => {
|
3131
|
+
if (c.type === "web") {
|
3132
|
+
const l = Ps(c.bind, t);
|
3133
|
+
return ks(c, l, t);
|
3134
|
+
} else {
|
3135
|
+
if (c.type === "vue")
|
3136
|
+
return Ns(c, t);
|
3137
|
+
if (c.type === "js")
|
3138
|
+
return Vs(c, t);
|
3139
|
+
}
|
3140
|
+
throw new Error(`unknown event type ${c}`);
|
3141
|
+
}), i = L(
|
3142
|
+
" (...args)=> Promise.all(promises(...args))",
|
3143
|
+
{
|
3144
|
+
promises: (...c) => o.map(async (l) => {
|
3145
|
+
await l(...c);
|
3146
|
+
})
|
3147
|
+
}
|
3148
|
+
);
|
3149
|
+
return { [n]: i };
|
3150
|
+
})
|
3151
|
+
);
|
3152
|
+
}
|
3153
|
+
function Ps(e, t) {
|
3154
|
+
return (...n) => (e ?? []).map((r) => {
|
3155
|
+
if (N.isEventContext(r)) {
|
3156
|
+
if (r.path.startsWith(":")) {
|
3157
|
+
const o = r.path.slice(1);
|
3158
|
+
return L(o)(...n);
|
3159
|
+
}
|
3160
|
+
return be(n[0], r.path.split("."));
|
3161
|
+
}
|
3162
|
+
return N.IsBinding(r) ? t.getObjectToValue(r) : r;
|
3163
|
+
});
|
3164
|
+
}
|
3165
|
+
function ks(e, t, n) {
|
3166
|
+
async function r(...o) {
|
3167
|
+
const s = t(...o), i = await xn().eventSend(e, s);
|
3168
|
+
i && n.updateOutputsRefFromServer(i, e.set);
|
3169
|
+
}
|
3170
|
+
return r;
|
3171
|
+
}
|
3172
|
+
function Vs(e, t) {
|
3173
|
+
const { code: n, inputs: r = [], set: o } = e, s = L(n);
|
3174
|
+
function i(...c) {
|
3175
|
+
const l = (r ?? []).map((a) => {
|
3176
|
+
if (N.isEventContext(a)) {
|
3177
|
+
if (a.path.startsWith(":")) {
|
3178
|
+
const u = a.path.slice(1);
|
3179
|
+
return L(u)(...c);
|
3180
|
+
}
|
3181
|
+
return be(c[0], a.path.split("."));
|
3182
|
+
}
|
3183
|
+
return N.IsBinding(a) ? tn(t.getObjectToValue(a)) : a;
|
3184
|
+
}), h = s(...l);
|
3185
|
+
if (o !== void 0) {
|
3186
|
+
const u = o.length === 1 ? [h] : h, f = u.map((d) => d === void 0 ? 1 : 0);
|
3187
|
+
t.updateOutputsRefFromServer({ values: u, skips: f }, o);
|
3188
|
+
}
|
3189
|
+
}
|
3190
|
+
return i;
|
3191
|
+
}
|
3192
|
+
function Ns(e, t) {
|
3193
|
+
const { code: n, bind: r = {}, bindData: o } = e, s = o || new Array(Object.keys(r).length).fill(0), i = Oe(
|
3194
|
+
r,
|
3195
|
+
(h, a, u) => s[u] === 0 ? t.getVueRefObject(h) : h
|
3196
|
+
), c = L(n, i);
|
3197
|
+
function l(...h) {
|
3198
|
+
c(...h);
|
3199
|
+
}
|
3200
|
+
return l;
|
3201
|
+
}
|
3202
|
+
function Is(e, t) {
|
3203
|
+
const n = [];
|
3204
|
+
(e.bStyle || []).forEach((s) => {
|
3205
|
+
Array.isArray(s) ? n.push(
|
3206
|
+
...s.map((i) => t.getObjectToValue(i))
|
3207
|
+
) : n.push(
|
3208
|
+
Oe(
|
3209
|
+
s,
|
3210
|
+
(i) => t.getObjectToValue(i)
|
3211
|
+
)
|
3212
|
+
);
|
3213
|
+
});
|
3214
|
+
const r = Jn([e.style || {}, n]);
|
3215
|
+
return {
|
3216
|
+
hasStyle: r && Object.keys(r).length > 0,
|
3217
|
+
styles: r
|
3218
|
+
};
|
3219
|
+
}
|
3220
|
+
function Ts(e, t) {
|
3221
|
+
const n = e.classes;
|
3222
|
+
if (!n)
|
3223
|
+
return null;
|
3224
|
+
if (typeof n == "string")
|
3225
|
+
return Ye(n);
|
3226
|
+
const { str: r, map: o, bind: s } = n, i = [];
|
3227
|
+
return r && i.push(r), o && i.push(
|
3228
|
+
Oe(
|
3229
|
+
o,
|
3230
|
+
(c) => t.getObjectToValue(c)
|
3231
|
+
)
|
3232
|
+
), s && i.push(...s.map((c) => t.getObjectToValue(c))), Ye(i);
|
3233
|
+
}
|
3234
|
+
function $e(e, t = !0) {
|
3235
|
+
if (!(typeof e != "object" || e === null)) {
|
3236
|
+
if (Array.isArray(e)) {
|
3237
|
+
t && e.forEach((n) => $e(n, !0));
|
3238
|
+
return;
|
3239
|
+
}
|
3240
|
+
for (const [n, r] of Object.entries(e))
|
3241
|
+
if (n.startsWith(":"))
|
3242
|
+
try {
|
3243
|
+
e[n.slice(1)] = new Function(`return (${r})`)(), delete e[n];
|
3244
|
+
} catch (o) {
|
3245
|
+
console.error(
|
3246
|
+
`Error while converting ${n} attribute to function:`,
|
3247
|
+
o
|
3248
|
+
);
|
3249
|
+
}
|
3250
|
+
else
|
3251
|
+
t && $e(r, !0);
|
3252
|
+
}
|
3253
|
+
}
|
3254
|
+
function As(e, t) {
|
3255
|
+
const n = e.startsWith(":");
|
3256
|
+
return n && (e = e.slice(1), t = L(t)), { name: e, value: t, isFunc: n };
|
3257
|
+
}
|
3258
|
+
function $s(e, t, n) {
|
3259
|
+
var o;
|
3260
|
+
const r = {};
|
3261
|
+
return Ot(e.bProps || {}, (s, i) => {
|
3262
|
+
const c = n.getObjectToValue(s);
|
3263
|
+
Ee(c) || ($e(c), r[i] = js(c, i));
|
3264
|
+
}), (o = e.proxyProps) == null || o.forEach((s) => {
|
3265
|
+
const i = n.getObjectToValue(s);
|
3266
|
+
typeof i == "object" && Ot(i, (c, l) => {
|
3267
|
+
const { name: h, value: a } = As(l, c);
|
3268
|
+
r[h] = a;
|
3269
|
+
});
|
3270
|
+
}), { ...t || {}, ...r };
|
3271
|
+
}
|
3272
|
+
function js(e, t) {
|
3273
|
+
return t === "innerText" ? Jt(e) : e;
|
3274
|
+
}
|
3275
|
+
function Cs(e, { slots: t }) {
|
3276
|
+
const { id: n, use: r } = e.propsInfo, o = Or(n);
|
3277
|
+
return xe(() => {
|
3278
|
+
Sr(n);
|
3279
|
+
}), () => {
|
3280
|
+
const s = e.propsValue;
|
3281
|
+
return br(
|
3282
|
+
n,
|
3283
|
+
o,
|
3284
|
+
Object.fromEntries(
|
3285
|
+
r.map((i) => [i, s[i]])
|
3286
|
+
)
|
3287
|
+
), A(De, null, t.default());
|
3288
|
+
};
|
3289
|
+
}
|
3290
|
+
const xs = F(Cs, {
|
3291
|
+
props: ["propsInfo", "propsValue"]
|
3292
|
+
});
|
3293
|
+
function Ds(e, t) {
|
3294
|
+
if (!e.slots)
|
3295
|
+
return null;
|
3296
|
+
const n = e.slots ?? {};
|
3297
|
+
return Array.isArray(n) ? t ? ge(n) : () => ge(n) : Xt(n, { keyFn: (i) => i === ":" ? "default" : i, valueFn: (i) => {
|
3298
|
+
const { items: c } = i;
|
3299
|
+
return (l) => {
|
3300
|
+
if (i.scope) {
|
3301
|
+
const h = () => i.props ? Kt(i.props, l, c) : ge(c);
|
3302
|
+
return A(Re, { scope: i.scope }, h);
|
3303
|
+
}
|
3304
|
+
return i.props ? Kt(i.props, l, c) : ge(c);
|
3305
|
+
};
|
3306
|
+
} });
|
3307
|
+
}
|
3308
|
+
function Kt(e, t, n) {
|
3309
|
+
return A(
|
3310
|
+
xs,
|
3311
|
+
{ propsInfo: e, propsValue: t },
|
3312
|
+
() => ge(n)
|
3313
|
+
);
|
3314
|
+
}
|
3315
|
+
function ge(e) {
|
3316
|
+
const t = (e ?? []).map((n) => A(Q, {
|
3317
|
+
component: n
|
3318
|
+
}));
|
3319
|
+
return t.length <= 0 ? null : t;
|
3320
|
+
}
|
3321
|
+
function Ms(e, t) {
|
3322
|
+
const n = {}, r = [];
|
3323
|
+
return (e || []).forEach((o) => {
|
3324
|
+
const { sys: s, name: i, arg: c, value: l, mf: h } = o;
|
3325
|
+
if (i === "vmodel") {
|
3326
|
+
const a = t.getVueRefObject(l);
|
3327
|
+
if (n[`onUpdate:${c}`] = (u) => {
|
3328
|
+
a.value = u;
|
3329
|
+
}, s === 1) {
|
3330
|
+
const u = h ? Object.fromEntries(h.map((f) => [f, !0])) : {};
|
3331
|
+
r.push([Qn, a.value, void 0, u]);
|
3332
|
+
} else
|
3333
|
+
n[c] = a.value;
|
3334
|
+
} else if (i === "vshow") {
|
3335
|
+
const a = t.getVueRefObject(l);
|
3336
|
+
r.push([Yn, a.value]);
|
3337
|
+
} else
|
3338
|
+
console.warn(`Directive ${i} is not supported yet`);
|
3339
|
+
}), {
|
3340
|
+
newProps: n,
|
3341
|
+
directiveArray: r
|
3342
|
+
};
|
3343
|
+
}
|
3344
|
+
function Fs(e, t) {
|
3345
|
+
const { eRef: n } = e;
|
3346
|
+
return n === void 0 ? {} : { ref: t.getRef(n) };
|
3347
|
+
}
|
3348
|
+
function Bs(e) {
|
3349
|
+
const t = ne(), n = un(), r = e.component.props ?? {};
|
3350
|
+
return $e(r, !0), () => {
|
3351
|
+
const { tag: o } = e.component, s = N.IsBinding(o) ? t.getObjectToValue(o) : o, i = ft(s), c = typeof i == "string", l = Ts(e.component, t), { styles: h, hasStyle: a } = Is(e.component, t), u = Rs(e.component.events ?? {}, t), f = Ds(e.component, c), d = $s(e.component, r, t), { newProps: v, directiveArray: p } = Ms(
|
3352
|
+
e.component.dir,
|
3353
|
+
t
|
3354
|
+
), g = Fs(
|
3355
|
+
e.component,
|
3356
|
+
n
|
3357
|
+
), y = Xn({
|
3358
|
+
...d,
|
3359
|
+
...u,
|
3360
|
+
...v,
|
3361
|
+
...g
|
3362
|
+
}) || {};
|
3363
|
+
a && (y.style = h), l && (y.class = l);
|
3364
|
+
const _ = A(i, { ...y }, f);
|
3365
|
+
return p.length > 0 ? Zn(
|
3366
|
+
// @ts-ignore
|
3367
|
+
_,
|
3368
|
+
p
|
3369
|
+
) : _;
|
3370
|
+
};
|
3371
|
+
}
|
3372
|
+
const Q = F(Bs, {
|
3373
|
+
props: ["component"]
|
3374
|
+
});
|
3375
|
+
function Dn(e, t) {
|
3376
|
+
var n, r;
|
3377
|
+
if (e) {
|
3378
|
+
const o = Er(e), s = on(e, ne(t)), i = ne(t);
|
3379
|
+
ys(e.py_watch, e.web_computed, i), (n = e.vue_watch) == null || n.forEach((c) => bs(c, i)), (r = e.js_watch) == null || r.forEach((c) => Ss(c, i)), xe(() => {
|
3380
|
+
cn(e.id, s), _r(e.id, o);
|
3381
|
+
});
|
3382
|
+
}
|
3383
|
+
}
|
3384
|
+
function Ls(e, { slots: t }) {
|
3385
|
+
const { scope: n } = e;
|
3386
|
+
return Dn(n), () => A(De, null, t.default());
|
3387
|
+
}
|
3388
|
+
const Re = F(Ls, {
|
3389
|
+
props: ["scope"]
|
3390
|
+
}), Ws = F(
|
3391
|
+
(e) => {
|
3392
|
+
const { scope: t, items: n, vforInfo: r } = e;
|
3393
|
+
return Pr(r), Dn(t, r.key), n.length === 1 ? () => A(Q, {
|
3394
|
+
component: n[0]
|
3395
|
+
}) : () => n.map(
|
3396
|
+
(s) => A(Q, {
|
3397
|
+
component: s
|
3398
|
+
})
|
3399
|
+
);
|
3400
|
+
},
|
3401
|
+
{
|
3402
|
+
props: ["scope", "items", "vforInfo"]
|
3403
|
+
}
|
3404
|
+
);
|
3405
|
+
function Us(e, t) {
|
3406
|
+
const { state: n, isReady: r, isLoading: o } = hr(async () => {
|
3407
|
+
let s = e;
|
3408
|
+
const i = t;
|
3409
|
+
if (!s && !i)
|
3410
|
+
throw new Error("Either config or configUrl must be provided");
|
3411
|
+
if (!s && i && (s = await (await fetch(i)).json()), !s)
|
3412
|
+
throw new Error("Failed to load config");
|
3413
|
+
return s;
|
3414
|
+
}, {});
|
3415
|
+
return { config: n, isReady: r, isLoading: o };
|
3416
|
+
}
|
3417
|
+
function Ks(e, t) {
|
3418
|
+
let n;
|
3419
|
+
return t.component ? n = `Error captured from component:tag: ${t.component.tag} ; id: ${t.component.id} ` : n = "Error captured from app init", console.group(n), console.error("Component:", t.component), console.error("Error:", e), console.groupEnd(), !1;
|
3420
|
+
}
|
3421
|
+
const Gs = { class: "app-box" }, qs = {
|
3422
|
+
key: 0,
|
3423
|
+
style: { position: "absolute", top: "50%", left: "50%", transform: "translate(-50%, -50%)" }
|
3424
|
+
}, Hs = /* @__PURE__ */ F({
|
3425
|
+
__name: "App",
|
3426
|
+
props: {
|
3427
|
+
config: {},
|
3428
|
+
configUrl: {}
|
3429
|
+
},
|
3430
|
+
setup(e) {
|
3431
|
+
const t = e, { config: n, isLoading: r } = Us(
|
3432
|
+
t.config,
|
3433
|
+
t.configUrl
|
3434
|
+
);
|
3435
|
+
let o = null;
|
3436
|
+
return G(n, (s) => {
|
3437
|
+
o = s, s.url && (ar({
|
3438
|
+
mode: s.mode,
|
3439
|
+
version: s.version,
|
3440
|
+
queryPath: s.url.path,
|
3441
|
+
pathParams: s.url.params,
|
3442
|
+
webServerInfo: s.webInfo
|
3443
|
+
}), gs(s));
|
3444
|
+
}), er(Ks), (s, i) => (he(), Ve("div", Gs, [
|
3445
|
+
W(r) ? (he(), Ve("div", qs, i[0] || (i[0] = [
|
3446
|
+
tr("p", { style: { margin: "auto" } }, "Loading ...", -1)
|
3447
|
+
]))) : (he(), Ve("div", {
|
3448
|
+
key: 1,
|
3449
|
+
class: Ye(["insta-main", W(n).class])
|
3450
|
+
}, [
|
3451
|
+
nr(W(Re), {
|
3452
|
+
scope: W(o).scope
|
3453
|
+
}, {
|
3454
|
+
default: rr(() => [
|
3455
|
+
(he(!0), Ve(De, null, or(W(o).items, (c) => (he(), sr(W(Q), { component: c }, null, 8, ["component"]))), 256))
|
3456
|
+
]),
|
3457
|
+
_: 1
|
3458
|
+
}, 8, ["scope"])
|
3459
|
+
], 2))
|
3460
|
+
]));
|
3461
|
+
}
|
3462
|
+
});
|
3463
|
+
function zs(e) {
|
3464
|
+
const { on: t, scope: n, items: r } = e, o = ne();
|
3465
|
+
return () => {
|
3466
|
+
const s = typeof t == "boolean" ? t : o.getObjectToValue(t);
|
3467
|
+
return A(Re, { scope: n }, () => s ? r.map(
|
3468
|
+
(c) => A(Q, { component: c })
|
3469
|
+
) : void 0);
|
3470
|
+
};
|
3471
|
+
}
|
3472
|
+
const Js = F(zs, {
|
3473
|
+
props: ["on", "scope", "items"]
|
3474
|
+
});
|
3475
|
+
function Qs(e) {
|
3476
|
+
const { start: t = 0, end: n, step: r = 1 } = e;
|
3477
|
+
let o = [];
|
3478
|
+
if (r > 0)
|
3479
|
+
for (let s = t; s < n; s += r)
|
3480
|
+
o.push(s);
|
3481
|
+
else
|
3482
|
+
for (let s = t; s > n; s += r)
|
3483
|
+
o.push(s);
|
3484
|
+
return o;
|
3485
|
+
}
|
3486
|
+
function Ys(e) {
|
3487
|
+
const { array: t, bArray: n, items: r, fkey: o, fid: s, scope: i, num: c, tsGroup: l = {} } = e, h = t === void 0, a = c !== void 0, u = h ? n : t, f = ne();
|
3488
|
+
Vr(s, u, h, a);
|
3489
|
+
const v = ni(o ?? "index");
|
3490
|
+
return xe(() => {
|
3491
|
+
wr(i.id);
|
3492
|
+
}), () => {
|
3493
|
+
const p = Zs(
|
3494
|
+
a,
|
3495
|
+
h,
|
3496
|
+
u,
|
3497
|
+
f,
|
3498
|
+
c
|
3499
|
+
), g = Ir(s), y = p.map((_, O) => {
|
3500
|
+
const R = v(_, O);
|
3501
|
+
return g.add(R), Nr(s, R, O), A(Ws, {
|
3502
|
+
scope: e.scope,
|
3503
|
+
items: r,
|
3504
|
+
vforInfo: {
|
3505
|
+
fid: s,
|
3506
|
+
key: R
|
3507
|
+
},
|
3508
|
+
key: R
|
3509
|
+
});
|
3510
|
+
});
|
3511
|
+
return g.removeUnusedKeys(), l && Object.keys(l).length > 0 ? A(Qt, l, {
|
3512
|
+
default: () => y
|
3513
|
+
}) : y;
|
3514
|
+
};
|
3515
|
+
}
|
3516
|
+
const Xs = F(Ys, {
|
3517
|
+
props: ["array", "items", "fid", "bArray", "scope", "num", "fkey", "tsGroup"]
|
3518
|
+
});
|
3519
|
+
function Zs(e, t, n, r, o) {
|
3520
|
+
if (e) {
|
3521
|
+
let i = 0;
|
3522
|
+
return typeof o == "number" ? i = o : i = r.getObjectToValue(o) ?? 0, Qs({
|
3523
|
+
end: Math.max(0, i)
|
3524
|
+
});
|
3525
|
+
}
|
3526
|
+
const s = t ? r.getObjectToValue(n) || [] : n;
|
3527
|
+
return typeof s == "object" ? Object.values(s) : s;
|
3528
|
+
}
|
3529
|
+
const ei = (e) => e, ti = (e, t) => t;
|
3530
|
+
function ni(e) {
|
3531
|
+
const t = dr(e);
|
3532
|
+
return typeof t == "function" ? t : e === "item" ? ei : ti;
|
3533
|
+
}
|
3534
|
+
function ri(e) {
|
3535
|
+
return e.map((n) => {
|
3536
|
+
if (n.tag)
|
3537
|
+
return A(Q, { component: n });
|
3538
|
+
const r = ft(Mn);
|
3539
|
+
return A(r, {
|
3540
|
+
scope: n
|
3541
|
+
});
|
3542
|
+
});
|
3543
|
+
}
|
3544
|
+
const Mn = F(
|
3545
|
+
(e) => {
|
3546
|
+
const t = e.scope;
|
3547
|
+
return () => ri(t.items ?? []);
|
3548
|
+
},
|
3549
|
+
{
|
3550
|
+
props: ["scope"]
|
3551
|
+
}
|
3552
|
+
);
|
3553
|
+
function oi(e) {
|
3554
|
+
return e.map((t) => {
|
3555
|
+
if (t.tag)
|
3556
|
+
return A(Q, { component: t });
|
3557
|
+
const n = ft(Mn);
|
3558
|
+
return A(n, {
|
3559
|
+
scope: t
|
3560
|
+
});
|
3561
|
+
});
|
3562
|
+
}
|
3563
|
+
const si = F(
|
3564
|
+
(e) => {
|
3565
|
+
const { scope: t, on: n, items: r } = e, o = J(r), s = on(t), i = ne();
|
3566
|
+
return je.createDynamicWatchRefresh(n, i, async () => {
|
3567
|
+
const { items: c, on: l } = await je.fetchRemote(e, i);
|
3568
|
+
return o.value = c, l;
|
3569
|
+
}), xe(() => {
|
3570
|
+
cn(t.id, s);
|
3571
|
+
}), () => oi(o.value);
|
3572
|
+
},
|
3573
|
+
{
|
3574
|
+
props: ["sid", "url", "hKey", "on", "bind", "items", "scope"]
|
3575
|
+
}
|
3576
|
+
);
|
3577
|
+
var je;
|
3578
|
+
((e) => {
|
3579
|
+
function t(r, o, s) {
|
3580
|
+
let i = null, c = r, l = c.map((a) => o.getVueRefObject(a));
|
3581
|
+
function h() {
|
3582
|
+
i && i(), i = G(
|
3583
|
+
l,
|
3584
|
+
async () => {
|
3585
|
+
c = await s(), l = c.map((a) => o.getVueRefObject(a)), h();
|
3586
|
+
},
|
3587
|
+
{ deep: !0 }
|
3588
|
+
);
|
3589
|
+
}
|
3590
|
+
return h(), () => {
|
3591
|
+
i && i();
|
3592
|
+
};
|
3593
|
+
}
|
3594
|
+
e.createDynamicWatchRefresh = t;
|
3595
|
+
async function n(r, o) {
|
3596
|
+
const s = Object.values(r.bind).map((a) => ({
|
3597
|
+
sid: a.sid,
|
3598
|
+
id: a.id,
|
3599
|
+
value: o.getObjectToValue(a)
|
3600
|
+
})), i = {
|
3601
|
+
sid: r.sid,
|
3602
|
+
bind: s,
|
3603
|
+
hKey: r.hKey,
|
3604
|
+
page: ye()
|
3605
|
+
}, c = {
|
3606
|
+
method: "POST",
|
3607
|
+
headers: {
|
3608
|
+
"Content-Type": "application/json"
|
3609
|
+
},
|
3610
|
+
body: JSON.stringify(i)
|
3611
|
+
}, l = await fetch(r.url, c);
|
3612
|
+
if (!l.ok)
|
3613
|
+
throw new Error("Failed to fetch data");
|
3614
|
+
return await l.json();
|
3615
|
+
}
|
3616
|
+
e.fetchRemote = n;
|
3617
|
+
})(je || (je = {}));
|
3618
|
+
function ii(e) {
|
3619
|
+
const { scope: t, items: n } = e;
|
3620
|
+
return () => {
|
3621
|
+
const r = n.map((o) => A(Q, { component: o }));
|
3622
|
+
return A(Re, { scope: t }, () => r);
|
3623
|
+
};
|
3624
|
+
}
|
3625
|
+
const Gt = F(ii, {
|
3626
|
+
props: ["scope", "items"]
|
3627
|
+
});
|
3628
|
+
function ai(e) {
|
3629
|
+
const { on: t, case: n, default: r } = e, o = ne();
|
3630
|
+
return () => {
|
3631
|
+
const s = o.getObjectToValue(t), i = n.map((c) => {
|
3632
|
+
const { value: l, items: h, scope: a } = c.props;
|
3633
|
+
if (s === l)
|
3634
|
+
return A(Gt, {
|
3635
|
+
scope: a,
|
3636
|
+
items: h,
|
3637
|
+
key: ["case", l].join("-")
|
3638
|
+
});
|
3639
|
+
}).filter((c) => c);
|
3640
|
+
if (r && !i.length) {
|
3641
|
+
const { items: c, scope: l } = r.props;
|
3642
|
+
i.push(A(Gt, { scope: l, items: c, key: "default" }));
|
3643
|
+
}
|
3644
|
+
return A(De, i);
|
3645
|
+
};
|
3646
|
+
}
|
3647
|
+
const ci = F(ai, {
|
3648
|
+
props: ["case", "on", "default"]
|
3649
|
+
});
|
3650
|
+
function ui(e, { slots: t }) {
|
3651
|
+
const { name: n = "fade", tag: r } = e;
|
3652
|
+
return () => A(
|
3653
|
+
Qt,
|
3654
|
+
{ name: n, tag: r },
|
3655
|
+
{
|
3656
|
+
default: t.default
|
3657
|
+
}
|
3658
|
+
);
|
3659
|
+
}
|
3660
|
+
const li = F(ui, {
|
3661
|
+
props: ["name", "tag"]
|
3662
|
+
});
|
3663
|
+
function fi(e) {
|
3664
|
+
const { content: t, r: n = 0 } = e, r = ne(), o = n === 1 ? () => r.getObjectToValue(t) : () => t;
|
3665
|
+
return () => Jt(o());
|
3666
|
+
}
|
3667
|
+
const hi = F(fi, {
|
3668
|
+
props: ["content", "r"]
|
3669
|
+
});
|
3670
|
+
function di(e) {
|
3671
|
+
if (!e.router)
|
3672
|
+
throw new Error("Router config is not provided.");
|
3673
|
+
const { routes: t, kAlive: n = !1 } = e.router;
|
3674
|
+
return t.map(
|
3675
|
+
(o) => Fn(o, n)
|
3676
|
+
);
|
3677
|
+
}
|
3678
|
+
function Fn(e, t) {
|
3679
|
+
var l;
|
3680
|
+
const { server: n = !1, vueItem: r, scope: o } = e, s = () => {
|
3681
|
+
if (n)
|
3682
|
+
throw new Error("Server-side rendering is not supported yet.");
|
3683
|
+
return Promise.resolve(pi(r, o, t));
|
3684
|
+
}, i = (l = r.children) == null ? void 0 : l.map(
|
3685
|
+
(h) => Fn(h, t)
|
3686
|
+
), c = {
|
3687
|
+
...r,
|
3688
|
+
children: i,
|
3689
|
+
component: s
|
3690
|
+
};
|
3691
|
+
return r.component.length === 0 && delete c.component, i === void 0 && delete c.children, c;
|
3692
|
+
}
|
3693
|
+
function pi(e, t, n) {
|
3694
|
+
const { path: r, component: o } = e, s = A(
|
3695
|
+
Re,
|
3696
|
+
{ scope: t, key: r },
|
3697
|
+
() => o.map((c) => A(Q, { component: c }))
|
3698
|
+
);
|
3699
|
+
return n ? A(ir, null, () => s) : s;
|
3700
|
+
}
|
3701
|
+
function mi(e, t) {
|
3702
|
+
const { mode: n = "hash" } = t.router, r = n === "hash" ? Eo() : n === "memory" ? wo() : Rn();
|
3703
|
+
e.use(
|
3704
|
+
ls({
|
3705
|
+
history: r,
|
3706
|
+
routes: di(t)
|
3707
|
+
})
|
3708
|
+
);
|
3709
|
+
}
|
3710
|
+
function yi(e, t) {
|
3711
|
+
e.component("insta-ui", Hs), e.component("vif", Js), e.component("vfor", Xs), e.component("match", ci), e.component("refresh", si), e.component("ts-group", li), e.component("content", hi), t.router && mi(e, t);
|
3712
|
+
}
|
3713
|
+
export {
|
3714
|
+
$e as convertDynamicProperties,
|
3715
|
+
yi as install
|
3716
|
+
};
|
3717
|
+
//# sourceMappingURL=insta-ui.js.map
|