@vtj/renderer
Version:
VTJ 是一款基于 Vue3 + Typescript 的低代码页面可视化设计器。内置低代码引擎、渲染器和代码生成器,面向前端开发者,开箱即用。 无缝嵌入本地开发工程,不改变前端开发流程和编码习惯。
1,688 lines (1,687 loc) • 47.1 kB
JavaScript
import { Base as Fe, BUILT_IN_COMPONENTS as Ae, ProjectModel as D, HistoryModel as le } from "@vtj/core";
import { isUrl as Me, url as P, dedupArray as Ie, isString as j, isFunction as q, logger as R, storage as B, cookie as U, toArray as se, unRSA as re, delay as ue, createRequest as pe, jsonp as de, merge as He, pathToRegexp as Te, pathToRegexpMatch as De, formDataToJson as xe, cloneDeep as ne, camelCase as b, upperFirst as Oe, pick as Ne, request as J, loadScript as ie, Storage as Be, mapToObject as Q } from "@vtj/utils";
import * as O from "vue";
import { inject as fe, defineComponent as he, h as K, ref as z, defineAsyncComponent as oe, watchEffect as Ue } from "vue";
import { useRoute as me } from "vue-router";
/**!
* Copyright (c) 2025, VTJ.PRO All rights reserved.
* @name @vtj/renderer
* @author CHC chenhuachun1549@dingtalk.com
* @version 0.11.13
* @license <a href="https://vtj.pro/license.html">MIT License</a>
*/
const C = "0.11.13";
var y = /* @__PURE__ */ ((r) => (r.Runtime = "Runtime", r.Design = "Design", r.Raw = "Raw", r.VNode = "VNode", r))(y || {});
const ae = [
"$el",
"$emit",
"$nextTick",
"$parent",
"$root",
"$attrs",
"$slots",
"$watch",
"$props",
"$options",
"$forceUpdate"
], Vt = [
"beforeCreate",
"created",
"beforeMount",
"mounted",
"beforeUpdate",
"updated",
"beforeUnmount",
"unmounted",
"errorCaptured",
"renderTracked",
"renderTriggered",
"activated",
"deactivated"
], Le = [
"vIf",
"vShow",
"vModel",
"vFor",
"vBind",
"vHtml"
], qe = {
String,
Number,
Boolean,
Array,
Object,
Function,
Date
}, k = "VtjPage", T = "VtjHomepage", Je = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot".split(
","
), Ke = "component,slot".split(",");
function I(r, e) {
return r.map((t) => Me(t) || t.startsWith("/") ? t : `${e}${t}`);
}
function X(r) {
return /\.css$/.test(r);
}
function Z(r) {
return /\.js$/.test(r);
}
function ze(r) {
return /\.json$/.test(r);
}
function Wt(r) {
return r.map(
(e) => `<script src="${P.append(e, { v: C })}"><\/script>`
).join("");
}
function Gt(r = []) {
return r.map(
(e) => `<link rel="stylesheet" href="${P.append(e, { v: C })}" />`
).join("");
}
function Ve(r, e = !1) {
return e && r.endsWith(".prod.js") ? r.replace(".prod.js", ".js") : r;
}
function We(r, e, t = !1) {
const s = r.filter((m) => !!m.enabled), n = [], i = [], a = [], o = [], c = {}, l = {}, p = [], d = {};
return s.forEach(
({ urls: m, assetsUrl: h, library: f, assetsLibrary: u, localeLibrary: w }) => {
m?.forEach((g) => {
Z(g) && n.push(Ve(g, t)), X(g) && i.push(g);
}), f && (o.push(f), c[f] = I(m || [], e), w && (l[f] = w)), h && a.push(h), u && p.push(u), f && u && (d[u] = f);
}
), {
scripts: I(n, e),
css: I(i, e),
materials: I(a, e),
libraryExports: o,
materialExports: Ie(p),
materialMapLibrary: d,
libraryMap: c,
libraryLocaleMap: l
};
}
function Ge(r, e) {
const { name: t, parent: s, alias: n } = r;
return s ? e[s]?.[n || t] : e[n || t];
}
function ge(r) {
return j(r) ? r : JSON.stringify(r);
}
function ve(r, e, t) {
const s = r.CSSStyleSheet;
if (s.prototype.replaceSync) {
const n = new s();
n.id = e, n.replaceSync(t);
const i = r.document, a = i.adoptedStyleSheets, o = Array.from(a).filter(
(c) => c.id !== e
);
i.adoptedStyleSheets = [...o, n];
} else {
const n = r.document;
let i = n.getElementById(e);
i ? i.innerHTML = t : (i = n.createElement("style"), i.id = e, i.innerHTML = t, n.head.appendChild(i));
}
}
async function Ye(r, e) {
const t = await window.fetch(e).then((s) => s.text()).catch(() => "");
t && ve(window, r, t);
}
function Qe(r, e = window) {
const t = e.document, s = e.document.head;
for (const n of r)
if (!t.getElementById(n)) {
const a = t.createElement("link");
a.rel = "stylesheet", a.id = n, a.href = n, s.appendChild(a);
}
}
async function Xe(r, e, t = window) {
const s = t.document, n = t.document.head;
let i = t[e];
return i ? i.default || i : new Promise((a, o) => {
for (const c of r) {
const l = s.createElement("script");
l.src = c, l.onload = () => {
i = t[e], i ? a(i.default || i) : o(null);
}, l.onerror = (p) => {
o(p);
}, n.appendChild(l);
}
});
}
function Ze(r) {
return q(r) || q(r?.install);
}
function et(r) {
return Ke.includes(r);
}
function tt(r) {
return Je.includes(r);
}
function F(r = window) {
const e = window?.Mock;
if (e) return e;
const t = r?.Mock;
if (t && window)
return window.Mock = t, t;
}
function Yt(r, e, t) {
Object.assign(e.meta, t.meta);
const s = r?._container;
t?.type === "page" && s.classList.add("is-page"), t?.pure && s.classList.add("is-pure");
}
function A(r, e, t = !1, s = !1) {
try {
const n = ['"use strict";', "var __self = arguments[0];"];
n.push("return ");
let i = (r.value || "").trim();
i = i.replace(/this(\W|$)/g, (o, c) => `__self${c}`), i = n.join(`
`) + i;
const a = `with(${t ? "{}" : "$scope || {}"}) { ${i} }`;
return new Function("$scope", a)(e);
} catch (n) {
if (R.error("parseExpression.error", n, r, e?.__self ?? e), s)
throw n;
}
}
function V(r, e, t = !1, s = !1) {
const n = A(r, e, t, s);
if (typeof n != "function" && (R.error(
"parseFunction.error",
"not a function",
r,
e?.__self ?? e
), s))
throw new Error(`"${r.value}" not a function`);
return n;
}
function _(r) {
return r && r.type === "JSExpression";
}
function M(r) {
return typeof r == "object" && r && r.type === "JSFunction";
}
function st(r) {
return _(r) || M(r);
}
function Qt(r) {
return st(r) ? r.value : JSON.stringify(r);
}
const rt = {
session: !1,
authKey: "Authorization",
storageKey: "ACCESS_STORAGE",
storagePrefix: "__VTJ_",
unauthorized: void 0,
auth: "/#/login",
redirectParam: "r",
unauthorizedCode: 401,
unauthorizedMessage: "登录已经失效,请重新登录!",
noPermissionMessage: "无权限访问该页面",
appName: "",
statusKey: "code"
}, ye = Symbol("access");
class _e {
options;
data = null;
mode = y.Raw;
interceptResponse = !0;
constructor(e) {
this.options = Object.assign({}, rt, e), this.loadData();
}
enableIntercept() {
this.interceptResponse = !0;
}
disableIntercept() {
this.interceptResponse = !1;
}
connect(e) {
const { mode: t, router: s, request: n } = e;
this.mode = t, s && this.mode === y.Raw && this.setGuard(s), n && this.setRequest(n);
}
login(e) {
const { storageKey: t, storagePrefix: s, session: n, authKey: i } = this.options;
this.setData(e), this.data && (B.save(t, e, {
type: "local",
prefix: s
}), n && U.set(i, this.data.token));
}
clear() {
const { storageKey: e, storagePrefix: t, session: s, authKey: n } = this.options;
this.data = null, B.remove(e, {
type: "local",
prefix: t
}), s && U.remove(n);
}
logout() {
this.clear(), this.toLogin();
}
getData() {
return this.data ? this.data : (this.loadData(), this.data);
}
getToken() {
return this.data || this.loadData(), this.data?.token;
}
can(e) {
const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
return typeof e == "function" ? e(s) : se(e).every((i) => s[i] || s[t + "." + i]);
}
some(e) {
const { appName: t } = this.options, { permissions: s = {} } = this.data || {};
return se(e).some((i) => s[i] || s[t + "." + i]);
}
install(e) {
e.config.globalProperties.$access = this, e.provide(ye, this);
}
isAuthPath(e) {
const { auth: t, isAuth: s } = this.options;
if (s)
return s(e);
if (e.path && typeof t == "string") {
const n = t.split("#")[1] || t;
return e.path === n;
}
return !1;
}
toLogin() {
const { auth: e, redirectParam: t } = this.options;
if (!e) return;
const s = t ? `?${t}=${encodeURIComponent(location.href)}` : "";
typeof e == "function" ? e(s) : location.href = t ? `${e}${s}` : e;
}
setData(e) {
const { privateKey: t } = this.options;
if (Array.isArray(e) && t) {
const s = e.map((n) => re(n, t));
try {
this.data = JSON.parse(s.join(""));
} catch (n) {
console.warn(n);
}
return;
}
if (typeof e == "string")
try {
const s = t ? re(e, t) : e;
s ? this.data = JSON.parse(s) : console.warn("RSA解密失败或登录信息缺失");
} catch (s) {
console.warn(s);
}
else
this.data = e;
}
loadData() {
const { storageKey: e, storagePrefix: t } = this.options, s = B.get(e, {
type: "local",
prefix: t
});
this.setData(s || null);
}
isLogined() {
const { session: e, authKey: t } = this.options;
return e && t ? !!U.get(t) : !!this.getToken();
}
hasRoutePermission(e) {
if (e.name === k) {
const t = e.params.id;
return t && this.can(t);
}
return !0;
}
setGuard(e) {
e.beforeEach((t, s, n) => this.guard(t, n));
}
async guard(e, t) {
if (this.isWhiteList(e) || this.isAuthPath(e))
return t();
if (this.isLogined()) {
if (this.hasRoutePermission(e))
return t();
{
const { noPermissionMessage: s = "无权限访问", unauthorized: n = !1 } = this.options;
return await this.showTip(s), q(n) ? (n(), t(!1)) : j(n) ? t(n) : t(!1);
}
}
t(!1), this.toLogin();
}
isWhiteList(e) {
const { whiteList: t } = this.options;
return t ? Array.isArray(t) ? t.some((s) => e.fullPath.startsWith(s)) : t(e) : !1;
}
isUnauthorized(e) {
const { unauthorizedCode: t = 401, statusKey: s = "code" } = this.options;
return e.status === t || e.data?.[s] === t;
}
async showUnauthorizedAlert(e) {
const { unauthorizedMessage: t = "登录已失效" } = this.options;
this.isUnauthorized(e) && (await this.showTip(t), this.toLogin());
}
async showTip(e) {
const { alert: t } = this.options;
return t ? (await ue(150), await t(e, {
title: "提示",
type: "warning"
}).catch(() => !1)) : !1;
}
setRequest(e) {
e.useRequest((t) => (this.data?.token && (t.headers[this.options.authKey] = this.data?.token), t)), e.useResponse(
async (t) => (this.interceptResponse && await this.showUnauthorizedAlert(t), t),
async (t) => {
if (!this.interceptResponse) return Promise.reject(t);
const s = t.response || t || {};
return await this.showUnauthorizedAlert(s), Promise.reject(t);
}
);
}
}
function nt() {
return fe(ye, null);
}
function Xt(r = {}) {
const {
notify: e,
loading: t,
settings: s = {},
Startup: n,
access: i,
useTitle: a,
alert: o
} = r;
let c = null;
return {
request: pe({
settings: {
type: "form",
validSuccess: !0,
originResponse: !1,
loading: !0,
validate: (p) => p.data?.code === 0 || !!p.data?.success,
failMessage: !0,
showError: (p) => {
e && e(p || "未知错误");
},
showLoading: () => {
c && c.close(), t && (c = t());
},
hideLoading: () => {
c && (c.close(), c = null);
},
...s
}
}),
jsonp: de,
notify: e,
loading: t,
useTitle: a,
startupComponent: n,
access: i ? new _e({ alert: o, ...i }) : void 0
};
}
function Zt(r = {}) {
return new _e(r);
}
function it(r, e) {
const { jsonp: t, request: s } = e;
if (r.method === "jsonp")
return (n = {}) => t(r.url, {
...r.jsonpOptions,
query: n
});
{
const n = r.headers ? A(r.headers, {}, !0) : void 0, i = {
url: r.url,
method: r.method,
settings: {
...r.settings,
headers: n
}
};
return (a, o) => (delete i.data, s.send(He(i, o || {}, { data: a })));
}
}
function ot(r, e) {
const { metaQuery: t } = e;
if (!t) return;
const { code: s, queryCode: n } = r;
return (i, a) => {
if (!t) {
console.warn("adapter.metaQuery is not defined!");
return;
}
return t(s, n, i, a);
};
}
function at(r = [], e = [], t) {
const s = {};
for (const n of r)
s[n.id] = it(n, t);
for (const n of e)
s[n.id] = ot(n, t);
return s;
}
async function ct(r = [], e = window) {
const t = F(e);
t && (we(e), r.forEach((s) => ut(t, s)));
}
function lt(r, e = window) {
const t = M(r.mockTemplate) && r.mockTemplate.value ? V(r.mockTemplate, {}, !0) : void 0, s = F(e);
return async (...n) => {
let i = {};
if (t)
try {
i = await t.apply(t, n);
} catch (a) {
R.warn("模拟数据模版异常", a);
}
return s?.mock(i);
};
}
function ut(r, e) {
if (!e.mock) return;
const { url: t, mockTemplate: s } = e;
if (t && s) {
const n = Te(`${t}(.*)`), i = De(t, { decode: decodeURIComponent }), a = A(s, {}, !0);
r.mock(n, (o) => {
const c = P.parse(o.url) || {}, l = o.body instanceof FormData ? xe(o.body) : o.body, p = i(o.url)?.params;
return Object.assign(o, { data: l, params: c, query: p }), r.mock(a(o));
});
}
}
function we(r = window) {
const e = F(r);
e && (e._mocked = {});
}
class pt {
__id = null;
__mode;
__instance = null;
__contextRefs = {};
__refs = {};
context = {};
state = {};
props = {};
$props = {};
$refs = {};
$el = null;
$emit = null;
$nextTick = null;
$parent = null;
$root = null;
$attrs = null;
$slots = null;
$watch = null;
$options = null;
$forceUpdate = null;
$components = {};
$libs = {};
$apis = {};
__transform = {};
constructor(e) {
const { mode: t, dsl: s, attrs: n } = e;
this.__mode = t, s && (this.__id = s.id || null, this.__transform = s.transform || {}), n && Object.assign(this, n);
}
setup(e, t = O) {
const s = t.getCurrentInstance();
if (!s) return;
this.__refs = {}, this.$refs = {}, this.context = {}, this.__contextRefs = {}, this.__instance = s.proxy;
const n = s.appContext.config.globalProperties;
Object.assign(this, n), Object.assign(this, e || {}), this.__proxy(), t.onMounted(() => {
this.__proxy();
}), t.onUnmounted(() => {
this.__cleanup();
}), t.onBeforeUpdate(() => {
this.__reset();
});
}
__proxy() {
this.__instance && ae.forEach((e) => {
this[e] = this.__instance?.[e];
});
}
__cleanup() {
ae.forEach((e) => {
this[e] = null;
}), this.__reset();
}
__reset() {
this.__refs = {}, this.$refs = {}, this.__contextRefs = {}, this.context = {};
}
__parseFunction(e) {
if (e)
if (this.__mode === y.Runtime) {
const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
return V({ type: s, value: n }, this);
} else
return V(e, this);
}
__parseExpression(e) {
if (e)
if (this.__mode === y.Runtime) {
const { id: t, type: s } = e, n = t ? this.__transform[t] ?? e.value : e.value;
return A({ type: s, value: n }, this);
} else
return A(e, this);
}
__ref(e = null, t) {
if (this.__mode !== y.VNode)
return e && e !== this.__id && (this.__contextRefs[e] = this), async (s) => {
await ue(0);
let n = s?.$vtjEl || s?.$el || s?._?.vnode?.el || s;
if (!n) {
typeof t == "string" && (delete this.$refs[t], e && delete this.__refs[e]);
return;
}
return n.nodeType === 3 && n.nextSibling && (n = n.nextSibling), n.__vtj__ = e, y.Design === this.__mode && (n.__context__ = this, n.draggable = !0), e && (this.__refs[e] = this.__getRefEl(this.__refs, e, s)), typeof t == "function" ? t(s) : t && (this.$refs[t] = this.__getRefEl(this.$refs, t, s)), s;
};
}
__getRefEl(e, t, s) {
const n = e[t];
if (n && s !== n) {
const i = new Set([].concat(n, s));
return Array.from(i);
} else
return s;
}
__clone(e = {}) {
const t = { ...this.context, ...e }, s = {
...t,
context: t
};
return s.context.__proto__ = this.context, s.__proto__ = this, s;
}
}
function W(r) {
const {
Vue: e = O,
mode: t = y.Runtime,
components: s = {},
libs: n = {},
apis: i = {},
loader: a
} = r, o = e.computed(() => r.dsl), c = {
$components: s,
$libs: n,
$apis: i
}, l = new pt({
mode: t,
dsl: o.value,
attrs: c
}), p = e.defineComponent({
name: o.value.name,
props: {
...ft(o.value.props ?? [], l)
},
setup(d) {
l.$props = d, l.props = d, o.value.id && ve(
r.window || window,
o.value.id,
o.value.css || ""
), l.state = ht(e, o.value.state ?? {}, l);
const m = mt(e, o.value.computed ?? {}, l), h = gt(o.value.methods ?? {}, l), f = vt(e, o.value.inject, l), u = yt(
o.value.dataSources || {},
l
), w = {
...f,
...m,
...h,
...u
};
return l.setup(w, e), _t(e, o.value.watch ?? [], l), {
vtj: l
};
},
emits: dt(o.value.emits),
expose: ["vtj"],
render() {
if (!o.value.nodes) return null;
const d = o.value.nodes || [];
return d.length === 1 ? x(d[0], l, e, a) : d.map((m) => x(m, l, e, a));
},
...wt(o.value.lifeCycles ?? {}, l)
});
return {
renderer: e.markRaw(p),
context: l
};
}
function dt(r = []) {
return r.map((e) => j(e) ? e : e.name);
}
function ft(r = [], e) {
const t = (s) => s ? (Array.isArray(s) ? s : [s]).map((i) => qe[i]) : void 0;
return r.map((s) => j(s) ? {
name: s
} : {
name: s.name,
type: s.type,
required: s.required,
default: _(s.default) ? e.__parseExpression(s.default) : s.default
}).reduce(
(s, n) => (s[n.name] = {
type: t(n.type),
required: n.required,
default: n.default
}, s),
{}
);
}
function ht(r, e, t) {
return r.reactive(
Object.keys(e || {}).reduce(
(s, n) => {
let i = e[n];
return _(i) ? i = t.__parseExpression(i) : M(i) && (i = t.__parseFunction(i)), s[n] = i, s;
},
{}
)
);
}
function mt(r, e, t) {
return Object.entries(e ?? {}).reduce(
(s, [n, i]) => (s[n] = r.computed(t.__parseFunction(i)), s),
{}
);
}
function gt(r, e) {
return Object.entries(r ?? {}).reduce(
(t, [s, n]) => (t[s] = e.__parseFunction(n), t),
{}
);
}
function vt(r, e = [], t) {
return e.reduce(
(s, n) => {
const { name: i, from: a } = n || {};
n.default;
const o = _(a) ? t.__parseExpression(a) || i : a ?? i, c = _(n.default) ? t.__parseExpression(n.default) : n.default ?? null;
return s[i] = r.inject(o, c), s;
},
{}
);
}
function yt(r, e) {
return Object.keys(r).reduce(
(t, s) => {
const n = r[s];
if (n.type === "mock")
t[s] = lt(n);
else if (n.ref) {
const i = e.$apis[n.ref], a = M(n.transform) ? n.transform.value ? e.__parseFunction(n.transform) : void 0 : n.transform;
t[s] = async (...o) => {
const c = await i.apply(e, o);
return a ? a(c) : c;
};
}
return t;
},
{}
);
}
function _t(r, e = [], t) {
e.forEach((s) => {
r.watch(
t.__parseExpression(s.source),
t.__parseFunction(s.handler),
{
deep: s.deep,
immediate: s.immediate
}
);
});
}
function wt(r, e) {
return Object.entries(r ?? {}).reduce(
(t, [s, n]) => (t[s] = e.__parseFunction(n), t),
{}
);
}
let L = [], E = {};
const St = (r) => r;
async function Se(r, e = window) {
const { urls: t = [], library: s } = r, n = t.filter((o) => Z(o));
if (n.length === 0 || !s) return null;
const i = t.filter((o) => X(o));
return i.length && Qe(i, e), await Xe(n, s, e).catch(
(o) => (console.warn("loadScriptUrl error", n, s, o), null)
);
}
function G(r) {
const { getDsl: e, getDslByUrl: t, options: s } = r;
return s.window && (L.forEach((n) => {
delete s.window[n];
}), L = []), (n, i, a = O) => {
if (!i || typeof i == "string") return n;
if (i.type === "Schema" && i.id)
return a.defineAsyncComponent(async () => {
const o = E[i.id] || await e(i.id);
return o && (o.name = n, E[i.id] = o), o ? W({
...s,
Vue: a,
dsl: ne(o),
mode: y.Runtime,
loader: G(r)
}).renderer : null;
});
if (i.type === "UrlSchema" && i.url)
return a.defineAsyncComponent(async () => {
const o = E[i.url] || await t(i.url);
return o && (o.name = n, E[i.url] = o), o ? W({
...s,
Vue: a,
dsl: ne(o),
mode: y.Runtime,
loader: G(r)
}).renderer : null;
});
if (i.type === "Plugin") {
let o = i.library ? E[i.library] : null;
return o || (i.library && L.push(i.library), o = E[i.library || Symbol()] = a.defineAsyncComponent(
async () => {
const c = await Se(i, s.window);
return c || (console.warn("getPlugin result is null", i), null);
}
), o);
}
return n;
};
}
function es() {
E = {};
}
function x(r, e, t = O, s = St) {
if (!r || !r.name || r.invisible) return null;
const n = t.getCurrentInstance()?.appContext, { id: i = null, directives: a = [] } = r, { vIf: o, vFor: c, vShow: l, vModels: p, vBind: d, vHtml: m, others: h } = jt(a);
if (o && !bt(o, e))
return null;
const f = (u) => {
const w = u.$components, g = (() => {
if (r.name === "component")
return Et(u, r.props?.is);
if (r.name === "slot") return r.name;
const $ = s(r.name, r.from, t);
return j($) ? et($) || tt($) ? $ : w[$] ?? n?.app?.component($) ?? $ : $;
})(), S = Pt(i, r.props ?? {}, u), Ce = Rt(t, r.events ?? {}, u);
if (r.name === "slot")
return Ct(t, r, S, u, s);
d && Object.assign(S, u.__parseExpression(d.value)), l && (S.style = Object.assign(
S.style ?? {},
Ft(l, u)
)), m && Object.assign(S, At(m, u)), p.forEach(($) => {
Object.assign(S, Mt(t, $, u));
});
const ke = It(
t,
r.children ?? [],
u,
s,
r
);
let N = t.createVNode(g, { ...S, ...Ce }, ke);
const te = n ? $t(n, h, u) : [];
return te.length && (N = t.withDirectives(N, te)), N;
};
return c ? Dt(c, f, e) : f(e);
}
function $t(r, e, t) {
const s = r.app;
return e.map((n) => {
const i = typeof n.name == "string" ? s.directive(n.name) : t.__parseExpression(n.name);
if (!i) return null;
const a = [i];
return n.value && a.push(t.__parseExpression(n.value)), n.arg && a.push(n.arg), n.modifiers && a.push(n.modifiers), a;
}).filter((n) => !!n);
}
function jt(r = []) {
const e = r.find((c) => b(c.name) === "vIf"), t = r.find((c) => b(c.name) === "vFor"), s = r.find((c) => b(c.name) === "vShow"), n = r.find((c) => b(c.name) === "vBind"), i = r.find((c) => b(c.name) === "vHtml"), a = r.filter(
(c) => b(c.name) === "vModel"
), o = r.filter(
(c) => !Le.includes(b(c.name))
);
return {
vIf: e,
vFor: t,
vShow: s,
vModels: a,
vBind: n,
others: o,
vHtml: i
};
}
function bt(r, e) {
return !!e.__parseExpression(r.value);
}
function Et(r, e) {
return e ? _(e) ? r.__parseExpression(e) : e : "div";
}
function Pt(r, e, t) {
const s = Y(e, t);
return s.ref = t.__ref(r, s.ref), s;
}
function Y(r, e) {
return _(r) ? e.__parseExpression(r) : M(r) ? e.__parseFunction(r) : Array.isArray(r) ? r.map((t) => Y(t, e)) : typeof r == "object" ? Object.keys(r || {}).reduce(
(t, s) => {
let n = r[s];
return t[s] = Y(n, e), t;
},
{}
) : r;
}
function Rt(r, e, t) {
const s = ["passive", "capture", "once"], n = {
capture: "Capture",
once: "Once",
passive: "OnceCapture"
};
return Object.keys(e || {}).reduce(
(i, a) => {
const o = e[a], c = $e(o.modifiers), l = c.find((m) => s.includes(m)), p = "on" + Oe(a) + (l && n[l] || ""), d = t.__parseFunction(o.handler);
return d && (i[p] = r.withModifiers(d, c)), i;
},
{}
);
}
function $e(r = {}, e = !1) {
const t = Object.keys(r);
return e ? t.map((s) => "." + s) : t;
}
function Ct(r, e, t, s, n) {
const { children: i } = e, a = kt(e, s), o = s.$slots?.[a.name];
return o ? o(t) : i ? j(i) ? r.createTextVNode(i) : _(i) ? r.createTextVNode(
ge(s.__parseExpression(i))
) : Array.isArray(i) ? i.map(
(c) => x(c, s, r, n)
) : null : null;
}
function kt(r, e) {
const { props: t } = r, s = t?.name || "default";
return {
name: _(s) ? e.__parseExpression(s) : s,
params: []
};
}
function Ft(r, e) {
return e.__parseExpression(r.value) ? {} : {
display: "none"
};
}
function At(r, e) {
return {
innerHTML: e.__parseExpression(r.value) || ""
};
}
function Mt(r, e, t) {
const s = {
type: "JSFunction",
value: e.value?.value ? `(v) => {
${e.value.value} = v;
}` : "(v) => {}"
}, n = t.__parseFunction(s), i = $e(
_(e.modifiers) ? t.__parseExpression(e.modifiers) : e.modifiers
), a = _(e.arg) ? t.__parseExpression(e.arg) : e.arg || "modelValue";
return {
[a]: t.__parseExpression(e.value),
[`onUpdate:${a}`]: i.length && n ? r.withModifiers(n, i) : n
};
}
function It(r, e, t, s, n) {
if (!e) return null;
if (j(e))
return { default: () => e };
if (_(e))
return {
default: () => ge(t.__parseExpression(e))
};
if (Array.isArray(e) && e.length > 0) {
const i = Ht(e), a = (o) => !o || !n ? {} : n?.id && Object.keys(o).length ? {
[`scope_${n.id}`]: o
} : {};
return Object.entries(i).reduce((o, [c, { nodes: l, params: p }]) => (o[c] = (d) => {
const m = p.length ? Ne(d ?? {}, p) : a(d);
return l.map(
(h) => x(h, t.__clone(m), r, s)
);
}, o), {});
}
return null;
}
function Ht(r) {
const e = {
default: {
params: [],
nodes: []
}
};
for (const t of r) {
const s = Tt(t.slot), n = s.name;
e[n] ? (e[n].nodes.push(t), e[n].params = e[n].params.concat(s.params)) : e[n] = {
nodes: [t],
params: s.params
};
}
return e;
}
function Tt(r = "default") {
return j(r) ? { name: r, params: [] } : { params: [], ...r };
}
function Dt(r, e, t) {
const { value: s, iterator: n } = r, { item: i = "item", index: a = "index" } = n || {};
let o = t.__parseExpression(s) || [];
return Number.isInteger(o) && (o = new Array(o).fill(!0).map((c, l) => l + 1)), Array.isArray(o) ? o.map((c, l) => e(t.__clone({ [i]: c, [a]: l }))) : (console.warn("[vForRender]:", `${s?.value} is not a Arrary`), []);
}
const ce = he({
name: "VtjPageContainer",
async setup() {
const r = be(), e = me(), t = e.params.id, s = t ? r.getPage(t) : r.getHomepage(), n = s ? await r.getRenderComponent(s.id) : null, i = z(Symbol());
if (s) {
Object.assign(e.meta, s.meta || {}, { cache: s.cache });
const { useTitle: a } = r?.adapter;
a && a(s.title || "VTJ");
}
return {
provider: r,
component: n,
file: s,
query: e.query,
meta: e.meta,
sid: i,
route: e
};
},
render() {
const { component: r, query: e, sid: t } = this;
return r ? K(r, { ...e, key: t }) : K("div", "页面不存在");
},
activated() {
this.meta.cache === !1 && (this.sid = Symbol());
}
}), xt = he({
name: "VtjStartupContainer",
render() {
return K("div", "page not found!");
}
}), je = Symbol("Provider");
var Ot = /* @__PURE__ */ ((r) => (r.Production = "production", r.Development = "development", r))(Ot || {});
class Nt extends Fe {
constructor(e) {
super(), this.options = e;
const {
service: t,
mode: s = y.Raw,
dependencies: n,
materials: i,
project: a = {},
adapter: o = {},
globals: c = {},
modules: l = {},
router: p = null,
materialPath: d = "./",
nodeEnv: m = "development"
/* Development */
} = e;
this.mode = s, this.modules = l, this.service = t, this.router = p, this.materialPath = d, this.nodeEnv = m, n && (this.dependencies = n), i && (this.materials = i), Object.assign(this.globals, c), Object.assign(this.adapter, o);
const { access: h, request: f } = this.adapter;
h && h.connect({ mode: s, router: p, request: f }), a && s !== y.Design ? this.load(a) : this.project = a;
}
mode;
globals = {};
modules = {};
adapter = { request: J, jsonp: de };
apis = {};
dependencies = {};
materials = {};
library = {};
service;
project = null;
components = {};
nodeEnv = "development";
router = null;
materialPath = "./";
urlDslCaches = {};
createMock(e) {
return async (...t) => {
let s = {};
if (e)
try {
s = await e.apply(e, t);
} catch (i) {
R.warn("模拟数据模版异常", i);
}
return F()?.mock(s);
};
}
async load(e) {
const t = this.modules[`.vtj/projects/${e.id}.json`] || this.modules[`/src/.vtj/projects/${e.id}.json`];
if (this.project = t ? await t() : await this.service.init(e), !this.project)
throw new Error("project is null");
const { apis: s = [], meta: n = [] } = this.project, i = window;
i && (i.CKEDITOR_VERSION = void 0), this.mode === y.Raw ? await this.loadDependencies(i) : await this.loadAssets(i), this.initMock(i), this.apis = at(s, n, this.adapter), we(i), ct(s, i), e.platform !== "uniapp" && this.initRouter(), this.triggerReady();
}
initMock(e) {
const t = F(e);
t && t.setup({
timeout: "50-500"
});
}
async loadDependencies(e) {
const t = Object.entries(this.dependencies);
for (const [s, n] of t)
e[s] || (e[s] = this.library[s] = await n());
}
async loadAssets(e) {
const { dependencies: t = [] } = this.project, { dependencies: s, library: n, components: i, materialPath: a, nodeEnv: o } = this, {
libraryExports: c,
libraryMap: l,
materials: p,
materialExports: d,
materialMapLibrary: m
} = We(
t,
a,
o === "development"
/* Development */
);
for (const h of c) {
const f = s[h], u = e[h];
if (u)
n[h] = u;
else if (f)
e[h] = n[h] = await f();
else {
const w = l[h] || [];
for (const g of w)
X(g) && await Ye(h, P.append(g, { v: C })), Z(g) && await ie(P.append(g, { v: C }));
n[h] = e[h];
}
}
if (o === "development") {
for (const f of p)
await ie(P.append(f, { v: C }));
const h = this.materials || {};
for (const f of d) {
const u = e[m[f]], w = Ae[f];
if (w)
u && w.forEach((g) => {
i[g] = u[g];
});
else {
const g = h[f] ? (await h[f]()).default : e[f];
g && u && (g.components || []).forEach((S) => {
i[S.name] = Ge(S, u);
});
}
}
}
}
initRouter() {
const { router: e, project: t, options: s, adapter: n } = this;
if (!e) return;
const i = t?.platform === "uniapp" ? "pages" : "page", {
routeAppendTo: a,
pageRouteName: o = i,
routeMeta: c
} = s, l = a ? "" : "/", p = {
path: `${l}${o}/:id`,
name: k,
component: ce
}, d = {
path: l,
name: T,
component: t?.homepage ? ce : n.startupComponent || xt,
meta: c
};
e.hasRoute(k) && e.removeRoute(k), e.hasRoute(T) && e.removeRoute(T), a ? (e.addRoute(a, p), e.addRoute(a, d)) : (e.addRoute(p), e.addRoute(d));
}
install(e) {
const t = e.config.globalProperties.installed || {};
for (const [s, n] of Object.entries(this.library))
!t[s] && Ze(n) && (e.use(n), t[s] = !0);
this.options.install && e.use(this.options.install), this.adapter.access && e.use(this.adapter.access), e.provide(je, this), e.config.globalProperties.$provider = this, e.config.globalProperties.installed = t, this.mode === y.Design && (e.config.errorHandler = (s, n, i) => {
const a = n?.$options.name, o = typeof s == "string" ? s : s?.message || s?.msg || "未知错误", c = `[ ${a} ] ${o} ${i}`;
console.error(
"[VTJ Error]:",
{
err: s,
instance: n,
info: i
},
s?.stack
), this.adapter.notify && this.adapter.notify(c, "组件渲染错误", "error");
});
}
getFile(e) {
const { blocks: t = [] } = this.project || {};
return this.getPage(e) || t.find((s) => s.id === e) || null;
}
getPage(e) {
const { pages: t = [] } = this.project || {}, s = (n, i = []) => {
for (const a of i) {
if (a.id === n)
return a;
if (a.children && a.children.length) {
const o = s(n, a.children);
if (o)
return o;
}
}
};
return s(e, t) || null;
}
getHomepage() {
const { homepage: e } = this.project || {};
return e ? this.getPage(e) : null;
}
async getDsl(e) {
const t = this.modules[`.vtj/files/${e}.json`] || this.modules[`/src/.vtj/files/${e}.json`];
return t ? await t() : this.service.getFile(e, this.project || void 0).catch(() => null);
}
async getDslByUrl(e) {
const t = this.urlDslCaches[e];
return t || (this.adapter.request ? this.urlDslCaches[e] = this.adapter.request.send({
url: e,
method: "get",
settings: {
validSuccess: !1,
originResponse: !0
}
}).then((s) => s.data).catch(() => null) : null);
}
createDslRenderer(e, t = {}) {
const { library: s, components: n, mode: i, apis: a } = this, o = {
mode: i,
Vue: s.Vue,
components: n,
libs: s,
apis: a,
window,
...t
}, c = G({
getDsl: async (l) => await this.getDsl(l) || null,
getDslByUrl: async (l) => await this.getDslByUrl(l) || null,
options: o
});
return W({
...o,
dsl: e,
loader: c
});
}
async getRenderComponent(e, t) {
const s = this.getFile(e);
if (!s)
return R.warn(`Can not find file: ${e}`), null;
t && t(s);
const n = `.vtj/vue/${e}.vue`, i = this.modules[n] || this.modules[`/src/pages/${e}.vue`];
if (i)
return (await i())?.default;
const a = await this.getDsl(s.id);
return a ? this.createDslRenderer(a).renderer : (R.warn(`Can not find dsl: ${e}`), null);
}
defineUrlSchemaComponent(e, t) {
return oe(async () => {
const s = await this.getDslByUrl(e);
return s ? (s.name = t || s.name, this.createDslRenderer(s).renderer) : null;
});
}
definePluginComponent(e) {
return oe(async () => await Se(e, window));
}
}
function ts(r) {
const e = new Nt(r);
return {
provider: e,
onReady: (s) => e.ready(s)
};
}
function be(r = {}) {
const e = fe(je, null);
if (!e)
throw new Error("Can not find provider");
if (e.nodeEnv === "development") {
const { id: t, version: s } = r;
t && s && (async () => {
const n = await e.getDsl(t);
n?.__VERSION__ !== s && e.adapter.notify && e.adapter.notify(
`[ ${n?.name} ] 组件源码版本与运行时版本不一致,请重新发布组件`,
"版本不一致",
"warning"
);
})();
}
return e;
}
const Ee = {
type: "json",
validSuccess: !0,
originResponse: !1,
failMessage: !0,
validate: (r) => r.data?.code === 0
}, Bt = (r, e = "/__vtj__/api/:type.json") => (t, s, n) => r.send({
url: e,
method: "post",
params: { type: t },
query: n,
data: {
type: t,
data: s
},
settings: Ee
}), Ut = (r, e = "/__vtj__/api/uploader.json") => async (t, s) => await r.send({
url: e,
method: "post",
data: {
files: t,
projectId: s
},
settings: {
...Ee,
type: "data"
}
}).then((n) => n && n[0] ? n[0] : null).catch(() => null);
function ss(r) {
return pe({
settings: {
type: "json",
validSuccess: !0,
originResponse: !1,
failMessage: !0,
validate: (e) => e.data?.code === 0,
showError: (e) => {
r && r(e || "未知错误");
}
}
});
}
class ee {
constructor(e = J) {
this.req = e, this.api = Bt(e), this.uploader = Ut(e);
}
api;
pluginCaches = {};
uploader;
async getExtension() {
console.log("BaseService.getExtension");
}
async init(e) {
return console.log("BaseService.init", e), {};
}
async saveProject(e, t) {
return !!await this.api("saveProject", e, { type: t }).catch(
() => !1
);
}
async saveMaterials(e, t) {
return console.log("BaseService.saveMaterials", e, t), !1;
}
async saveFile(e) {
return console.log("BaseService.saveFile", e), !1;
}
async getFile(e) {
return console.log("BaseService.getFile", e), {};
}
async removeFile(e) {
return console.log("BaseService.removeFile", e), !1;
}
async saveHistory(e) {
return console.log("BaseService.saveHistory", e), !1;
}
async removeHistory(e) {
return console.log("BaseService.removeHistory", e), !1;
}
async getHistory(e) {
return console.log("BaseService.getHistory", e), {};
}
async getHistoryItem(e, t) {
return console.log("BaseService.getHistoryItem", e, t), {};
}
async saveHistoryItem(e, t) {
return console.log("BaseService.saveHistoryItem", e, t), !1;
}
async removeHistoryItem(e, t) {
return console.log("BaseService.removeHistoryItem", e, t), !1;
}
async publish(e) {
return !!await this.api("publish", e).catch(() => !1);
}
async publishFile(e, t) {
return !!await this.api("publishFile", { project: e, file: t }).catch(
() => !1
);
}
async genVueContent(e, t) {
return await this.api("genVueContent", { project: e, dsl: t }).catch(() => "");
}
async createRawPage(e) {
return await this.api("createRawPage", e).catch(() => "");
}
async removeRawPage(e) {
return await this.api("removeRawPage", e).catch(() => "");
}
async uploadStaticFile(e, t) {
return await this.uploader(e, t).catch(() => null);
}
async getStaticFiles(e) {
return await this.api("getStaticFiles", e).catch(() => []);
}
async removeStaticFile(e, t) {
return await this.api("removeStaticFile", { name: e, projectId: t }).catch(
() => ""
);
}
async clearStaticFiles(e) {
return await this.api("clearStaticFiles", e).catch(() => "");
}
async getPluginMaterial(e) {
const { urls: t = [] } = e, s = t.filter((i) => ze(i))[0];
if (!s) return null;
const n = this.pluginCaches[s];
return n || (this.pluginCaches[s] = J.send({
url: s,
method: "get",
settings: {
validSuccess: !1,
originResponse: !0
}
}).then((i) => i.data).catch(() => null));
}
async genSource(e) {
return console.log("BaseService.genSource", e), "";
}
}
const v = new Be({
type: "local",
expired: 0,
prefix: "__VTJ_"
});
class rs extends ee {
init(e) {
const t = new D(e), s = v.get(`project_${t.id}`), n = Object.assign(t.toDsl(), s || {});
return v.save(`project_${t.id}`, n), Promise.resolve(n);
}
saveProject(e) {
const t = new D(e);
return v.save(`project_${t.id}`, t.toDsl()), Promise.resolve(!0);
}
saveMaterials(e, t) {
return v.save(`materials_${e.id}`, Q(t)), Promise.resolve(!0);
}
saveFile(e) {
return v.save(`file_${e.id}`, e), Promise.resolve(!0);
}
getFile(e) {
const t = v.get(`file_${e}`);
return t ? Promise.resolve(t) : Promise.reject(null);
}
removeFile(e) {
return v.remove(`file_${e}`), Promise.resolve(!0);
}
saveHistory(e) {
return v.save(`history_${e.id}`, e), Promise.resolve(!0);
}
removeHistory(e) {
const t = v.get(`history_${e}`);
if (t) {
const n = (t.items || []).map((i) => i.id);
this.removeHistoryItem(e, n), v.remove(`history_${e}`);
}
return Promise.resolve(!0);
}
getHistory(e) {
const t = v.get(`history_${e}`), s = new le(t || { id: e });
return Promise.resolve(s.toDsl());
}
getHistoryItem(e, t) {
const s = v.get(`history_${e}_${t}`);
return Promise.resolve(s);
}
saveHistoryItem(e, t) {
return v.save(`history_${e}_${t.id}`, t), Promise.resolve(!0);
}
removeHistoryItem(e, t) {
return t.forEach((s) => {
v.remove(`history_${e}_${s}`);
}), Promise.resolve(!0);
}
}
class Lt extends ee {
projects = {};
materials = {};
files = {};
histories = {};
historyItems = {};
init(e) {
const t = new D(e), s = this.projects[t.id] || {}, n = Object.assign(t.toDsl(), s);
return this.projects[n.id] = n, Promise.resolve(n);
}
saveProject(e) {
const t = new D(e);
return this.projects[t.id] = t.toDsl(), Promise.resolve(!0);
}
saveMaterials(e, t) {
return e.id && (this.materials[e.id] = Q(t)), Promise.resolve(!0);
}
saveFile(e) {
return this.files[e.id] = e, Promise.resolve(!0);
}
getFile(e) {
const t = this.files[e];
return t ? Promise.resolve(t) : Promise.reject(null);
}
removeFile(e) {
return delete this.files[e], Promise.resolve(!0);
}
saveHistory(e) {
return this.histories[e.id] = e, Promise.resolve(!0);
}
removeHistory(e) {
const t = this.histories[e];
if (t) {
const n = (t.items || []).map((i) => i.id);
this.removeHistoryItem(e, n), delete this.historyItems[e];
}
return Promise.resolve(!0);
}
getHistory(e) {
const t = this.histories[e], s = new le(t || { id: e });
return Promise.resolve(s);
}
getHistoryItem(e, t) {
const s = `${e}_${t}`, n = this.historyItems[s] || {};
return Promise.resolve(n);
}
saveHistoryItem(e, t) {
const s = `${e}_${t.id}`;
return this.historyItems[s] = t, Promise.resolve(!0);
}
removeHistoryItem(e, t) {
return t.forEach((s) => {
const n = `${e}_${s}`;
delete this.historyItems[n];
}), Promise.resolve(!0);
}
}
let H = null;
function ns() {
return H || (H = new Lt(), H);
}
class is extends ee {
getFileCaches = {};
async getExtension() {
return await this.api("getExtension", {}).catch(() => {
});
}
async init(e) {
return await this.api("init", e).catch(() => null) || {};
}
async saveProject(e, t) {
return !!await this.api("saveProject", e, { type: t }).catch(
() => !1
);
}
async saveMaterials(e, t) {
return !!await this.api("saveMaterials", {
project: e,
materials: Q(t)
}).catch(() => !1);
}
async saveFile(e) {
return !!await this.api("saveFile", e).catch(() => !1);
}
async getFile(e) {
const t = this.getFileCaches[e];
return t || (this.getFileCaches[e] = this.api("getFile", e).catch(
() => null
)).finally(() => {
delete this.getFileCaches[e];
});
}
async removeFile(e) {
return !!await this.api("removeFile", e).catch(() => !1);
}
async saveHistory(e) {
return !!await this.api("saveHistory", e).catch(() => !1);
}
async removeHistory(e) {
return !!await this.api("removeHistory", e).catch(() => !1);
}
async getHistory(e) {
return await this.api("getHistory", e).catch(() => null) || {};
}
async getHistoryItem(e, t) {
return await this.api("getHistoryItem", { fId: e, id: t }).catch(() => null) || {};
}
async saveHistoryItem(e, t) {
return !!await this.api("saveHistoryItem", { fId: e, item: t }).catch(
() => !1
);
}
async removeHistoryItem(e, t) {
return !!await this.api("removeHistoryItem", { fId: e, ids: t }).catch(
() => !1
);
}
}
function Pe(r, e, t = []) {
return t.map((s) => {
const { id: n, title: i, icon: a, children: o, hidden: c } = s;
return {
id: n,
title: i,
icon: a,
hidden: c,
url: `${r}/${e}/${n}`,
children: o && o.length ? Pe(r, e, o) : void 0
};
});
}
function Re(r, e) {
if (!e) return r;
let t = [];
for (const s of r)
if (s.children && s.children.length) {
const n = Re(s.children, e);
n.length && (s.children = n, t.push(s));
} else
e.can(s.id.toString()) && t.push(s);
return t;
}
function os(r) {
const {
menuPathPrefix: e = "",
pageRouteName: t = "page",
disableMenusFilter: s = !1
} = r || {}, n = be(), i = me(), a = nt(), o = z(!1), c = z(!1), l = n.project;
Ue(() => {
const { name: m, params: h, meta: f } = i;
if (m === k) {
const u = n.getPage(h.id);
o.value = !u?.mask, c.value = !!u?.pure;
} else if (m === T) {
const u = n.getHomepage();
o.value = !u?.mask, c.value = !!u?.pure;
} else
o.value = !f.mask, c.value = !!f.pure;
});
const p = Pe(
e,
t,
l?.pages
), d = l?.config;
return {
disabled: o,
logo: d?.logo,
themeSwitchable: d?.themeSwitchable,
title: d?.title || l?.description || l?.name || "VTJ App",
menus: s ? p : Re(p, a),
pure: c
};
}
export {
ye as ACCESS_KEY,
_e as Access,
Ke as BUILD_IN_TAGS,
Le as BUILT_IN_DIRECTIVES,
ee as BaseService,
ae as CONTEXT_HOST,
pt as Context,
y as ContextMode,
qe as DATA_TYPES,
T as HOMEPAGE_ROUTE_NAME,
Je as HTML_TAGS,
Qt as JSCodeToString,
Vt as LIFE_CYCLES_LIST,
is as LocalService,
Lt as MemoryService,
Ot as NodeEnv,
k as PAGE_ROUTE_NAME,
Nt as Provider,
rs as StorageService,
C as VTJ_RENDERER_VERSION,
ve as adoptedStyleSheets,
es as clearLoaderCache,
Zt as createAccess,
Xt as createAdapter,
Wt as createAssetScripts,
Gt as createAssetsCss,
yt as createDataSources,
G as createLoader,
ns as createMemoryService,
ot as createMetaApi,
lt as createMock,
ts as createProvider,
W as createRenderer,
it as createSchemaApi,
at as createSchemaApis,
ss as createServiceRequest,
St as defaultLoader,
I as fillBasePath,
F as getMock,
$e as getModifiers,
Se as getPlugin,
Ge as getRawComponent,
et as isBuiltInTag,
X as isCSSUrl,
st as isJSCode,
_ as isJSExpression,
M as isJSFunction,
ze as isJSON,
Z as isJSUrl,
tt as isNativeTag,
Ze as isVuePlugin,
Ye as loadCss,
Qe as loadCssUrl,
Xe as loadScriptUrl,
ut as mockApi,
ct as mockApis,
we as mockCleanup,
x as nodeRender,
We as parseDeps,
A as parseExpression,
V as parseFunction,
je as providerKey,
Ve as removeProdFlag,
Yt as setupPageSetting,
ge as toString,
nt as useAccess,
os as useMask,
be as useProvider
};