@next-bricks/vb-experiment 1.3.16 → 1.3.17
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.
- package/dist/bricks.json +1 -1
- package/dist/chunks/1469.1099f419.js +2 -0
- package/dist/chunks/1469.1099f419.js.map +1 -0
- package/dist/chunks/{2857.bfd7ab6b.js → 2857.da8e603e.js} +2 -2
- package/dist/chunks/2857.da8e603e.js.map +1 -0
- package/dist/chunks/7131.ed1c7310.js +2 -0
- package/dist/chunks/7131.ed1c7310.js.map +1 -0
- package/dist/chunks/app-playground.57f8b0b2.js +2 -0
- package/dist/chunks/app-playground.57f8b0b2.js.map +1 -0
- package/dist/chunks/{main.5eb0373c.js → main.0ecb65a5.js} +2 -2
- package/dist/chunks/{main.5eb0373c.js.map → main.0ecb65a5.js.map} +1 -1
- package/dist/chunks/tsx-playground.afd56710.js +2 -0
- package/dist/chunks/tsx-playground.afd56710.js.map +1 -0
- package/dist/{index.b762a597.js → index.ab859801.js} +2 -2
- package/dist/{index.b762a597.js.map → index.ab859801.js.map} +1 -1
- package/dist/manifest.json +13 -0
- package/dist/types.json +27 -0
- package/dist-types/tsx-playground/index.d.ts +7 -0
- package/package.json +2 -2
- package/dist/chunks/1469.083be8f8.js +0 -2
- package/dist/chunks/1469.083be8f8.js.map +0 -1
- package/dist/chunks/2857.bfd7ab6b.js.map +0 -1
- package/dist/chunks/4154.371b28c0.js +0 -2
- package/dist/chunks/4154.371b28c0.js.map +0 -1
- package/dist/chunks/app-playground.0745e311.js +0 -2
- package/dist/chunks/app-playground.0745e311.js.map +0 -1
- package/dist/chunks/tsx-playground.edb19559.js +0 -2
- package/dist/chunks/tsx-playground.edb19559.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunks/2857.da8e603e.js","mappings":"mLAaA,IAAIA,EAEAC,EAEG,SAASC,IAOd,OANKF,IACHA,EAAsB,WACpB,MAAMG,GAASC,EAAAA,EAAA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I,EAAKC,EAAOzF,EAASgQ,EAAKnT,UAGtDiU,OACF,GAEJ,MAAO,CACLjU,KAAMmT,EAAKnT,KACX8U,SACAN,UACApU,KAAkB,QAAdmU,EAAE7L,EAAUvB,UAAE,IAAAoN,OAAA,EAAZA,EAAcnU,KACpB4K,MAAOmI,EAAKnI,MAEhB,C","sources":["webpack:///./src/tsx-playground/workers/tsxParser.ts","webpack:///../../../src/modules/validations.ts","webpack:///../../../src/modules/constants.ts","webpack:///../../../src/modules/getTplName.ts","webpack:///../../../src/modules/convertDataSource.ts","webpack:///../../src/convertEvents.ts","webpack:///../../src/expressions.ts","webpack:///../../src/deepReplaceVariables.ts","webpack:///../../src/convertTable.ts","webpack:///../../src/convertDashboard.ts","webpack:///../../src/convertComponent.ts","webpack:///../../src/convertList.ts","webpack:///../../src/convertDescriptions.ts","webpack:///../../src/convertCard.ts","webpack:///../../src/convertButton.ts","webpack:///../../src/convertForm.ts","webpack:///../../src/convertToolbar.ts","webpack:///../../src/convertModal.ts","webpack:///../../src/convertText.ts","webpack:///../../src/convertLink.ts","webpack:///../../src/convertOutput.ts","webpack:///../../src/convertTag.ts","webpack:///../../src/convertAvatar.ts","webpack:///../../src/convertAvatarGroup.ts","webpack:///../../src/convertCodeBlock.ts","webpack:///../../src/convertFormItem.ts","webpack:///../../src/convertForEach.ts","webpack:///../../src/convertIf.ts","webpack:///../../../src/modules/convertModule.ts"],"sourcesContent":["// istanbul ignore file\nimport type {\n ParsedApp,\n ParseOptions,\n SourceFile,\n} from \"@next-shared/tsx-parser\";\nimport { wrap } from \"comlink\";\n\nexport interface RemoteTsxParserWorker {\n parseView(source: string, options?: ParseOptions): Promise<ParsedApp>;\n parseApp(files: SourceFile[]): Promise<ParsedApp>;\n}\n\nlet remoteWorkerPromise: Promise<RemoteTsxParserWorker> | undefined;\n\nlet worker: Worker | undefined;\n\nexport function getRemoteTsxParserWorker() {\n if (!remoteWorkerPromise) {\n remoteWorkerPromise = (async () => {\n const Remote = wrap<{ new (): RemoteTsxParserWorker }>(getWorker());\n return await new Remote();\n })();\n }\n return remoteWorkerPromise;\n}\n\nfunction getWorker() {\n if (!worker) {\n worker = new Worker(new URL(\"./tsxParser.worker.ts\", import.meta.url));\n }\n return worker;\n}\n","import type { NodePath } from \"@babel/traverse\";\nimport * as t from \"@babel/types\";\nimport type { ComponentChild, ParsedModule } from \"./interfaces.js\";\nimport { MODULE_SOURCE } from \"./constants.js\";\n\nexport function validateFunction(\n fn: t.FunctionDeclaration | t.FunctionExpression | t.ArrowFunctionExpression,\n state: ParsedModule\n): boolean {\n if (fn.async || fn.generator) {\n state.errors.push({\n message: `Function cannot be async or generator`,\n node: fn,\n severity: \"error\",\n });\n return false;\n }\n\n return true;\n}\n\nexport function validateGlobalApi(\n id: NodePath<t.Identifier | t.JSXIdentifier>,\n api: string\n): boolean {\n const ref = id.referencesImport(MODULE_SOURCE, api);\n if (ref) {\n return true;\n }\n return id.node.name === api && !id.scope.getBinding(id.node.name);\n}\n\nexport function validateEmbeddedExpression(\n expr: t.Expression,\n state: ParsedModule | null\n): boolean {\n let invalidNode: t.Node | null = null;\n\n t.traverse(expr, {\n enter(node, parent) {\n if (\n !invalidNode &&\n (t.isFunctionExpression(node) ||\n t.isStatement(node) ||\n t.isAwaitExpression(node) ||\n t.isYieldExpression(node) ||\n t.isJSX(node) ||\n (t.isArrowFunctionExpression(node) &&\n (node.async ||\n node.generator ||\n t.isBlockStatement(node.body) ||\n t.isObjectProperty(parent[parent.length - 1]?.node))))\n ) {\n invalidNode = node;\n }\n },\n });\n\n if (invalidNode) {\n state?.errors.push({\n message: `Unsupported expression type: ${(invalidNode as t.Node).type}`,\n node: invalidNode,\n severity: \"error\",\n });\n return false;\n }\n\n return true;\n}\n\nexport function isNilPath(path: NodePath<t.Node>) {\n return (\n path.isNullLiteral() ||\n (path.isIdentifier() &&\n path.node.name === \"undefined\" &&\n path.scope.getBinding(\"undefined\") === undefined)\n );\n}\n\nconst EXPRESSION_PREFIX_REG = /^<%=?\\s/;\nconst EXPRESSION_SUFFIX_REG = /\\s%>$/;\n\nexport function isExpressionString(value: unknown): value is string {\n if (typeof value !== \"string\") {\n return false;\n }\n const trimmed = value.trim();\n return (\n EXPRESSION_PREFIX_REG.test(trimmed) && EXPRESSION_SUFFIX_REG.test(trimmed)\n );\n}\n\nexport function isAnyOfficialComponent(child: ComponentChild) {\n return (\n !child.reference ||\n (child.reference.type === \"imported\" &&\n child.reference.importSource === MODULE_SOURCE)\n );\n}\n\nexport function isOfficialComponent(child: ComponentChild, name: string) {\n return (\n isAnyOfficialComponent(child) &&\n (child.reference ? child.reference.name === name : child.name === name)\n );\n}\n\nexport function isGeneralCallExpression(\n path: NodePath<t.Node | null | undefined>\n): path is NodePath<t.CallExpression | t.OptionalCallExpression> {\n return path.isCallExpression() || path.isOptionalCallExpression();\n}\n\nexport function isGeneralMemberExpression(\n path: NodePath<t.Node | null | undefined>\n): path is NodePath<t.MemberExpression | t.OptionalMemberExpression> {\n return path.isMemberExpression() || path.isOptionalMemberExpression();\n}\n","export const MODULE_SOURCE = \"next-tsx\";\n\nexport const CALL_API_LIST = [\"callApi\", \"callHttp\", \"callTool\"] as const;\n","let counter = 0;\nconst tplNameMap = new Map<string, string>();\n\nexport function getViewTplName(name: string, rootId: string) {\n return `${getViewTplNamePrefixByRootId(rootId)}${getViewTplNameSuffix(name)}`;\n}\n\nexport function getAppTplName(name: string) {\n return `tpl-${getViewTplNameSuffix(name)}`;\n}\n\nfunction getViewTplNamePrefixByRootId(rootId: string) {\n if (!tplNameMap.has(rootId)) {\n tplNameMap.set(rootId, `isolated-tpl-${counter++}`);\n }\n return tplNameMap.get(rootId)!;\n}\n\nfunction getViewTplNameSuffix(name: string) {\n return name.replace(/([A-Z])/g, \"-$1\").toLowerCase();\n}\n","import type { ContextConf } from \"@next-core/types\";\nimport { isObject } from \"@next-core/utils/general\";\nimport type { DataSource } from \"@next-shared/tsx-parser\";\n\nexport function convertDataSource(resource: DataSource): ContextConf {\n const {\n name,\n http,\n api,\n params,\n tool,\n transform,\n rejectTransform,\n config,\n scope,\n } = resource;\n const hasEnabled =\n config && Object.prototype.hasOwnProperty.call(config, \"enabled\");\n\n return {\n name: name,\n resolve: {\n ...(http\n ? {\n useProvider: \"basic.http-request\",\n args: [api, params],\n }\n : tool\n ? {\n useProvider: \"ai-portal.call-tool\",\n args: [tool, params],\n }\n : {\n useProvider: `${api}:*`,\n params: params as Record<string, unknown> | undefined,\n // TODO: remove the temporary workaround below\n ...(api === \"easyops.api.data_exchange.olap@Query\" &&\n isObject(params)\n ? {\n params: {\n ...params,\n translate: [\"#showKey\"],\n limit: undefined,\n limitBy: undefined,\n order: undefined,\n displayName: true,\n },\n }\n : null),\n }),\n ...(transform ? { transform: { value: transform } } : null),\n ...(rejectTransform\n ? { onReject: { transform: { value: rejectTransform } } }\n : null),\n ...(hasEnabled\n ? {\n if: config.enabled as string | boolean,\n }\n : null),\n },\n track: true,\n ...(hasEnabled\n ? {\n value: config.fallback,\n }\n : null),\n ...(scope === \"template\" ? { expose: false } : null),\n };\n}\n","import type { BrickEventHandler, BrickEventsMap } from \"@next-core/types\";\nimport type { Component, EventHandler } from \"@next-shared/tsx-parser\";\nimport type { ConvertOptions } from \"./interfaces.js\";\n\nexport function convertEvents(component: Component, options: ConvertOptions) {\n const events: BrickEventsMap = {};\n for (const [event, handler] of Object.entries(component.events ?? {})) {\n switch (component.name) {\n case \"Table\":\n switch (event) {\n case \"select\": {\n const action = convertEventHandlers(handler, options);\n if (action) {\n events[\"row.select.v2\"] = action;\n }\n break;\n }\n case \"sort\": {\n const action = convertEventHandlers(handler, options);\n if (action) {\n events[\"sort.change\"] = action;\n }\n break;\n }\n case \"paginate\": {\n const action = convertEventHandlers(handler, options);\n if (action) {\n events[\"page.change\"] = action;\n }\n break;\n }\n }\n break;\n case \"Button\":\n if (event === \"click\") {\n const action = convertEventHandlers(handler, options);\n if (action) {\n events.click = action;\n }\n }\n break;\n case \"Search\":\n if (event === \"search\") {\n const action = convertEventHandlers(handler, options);\n if (action) {\n events.search = action;\n }\n }\n break;\n case \"Select\":\n if (event === \"change\") {\n const action = convertEventHandlers(handler, options);\n if (action) {\n events[\"change.v2\"] = action;\n }\n }\n break;\n default: {\n const action = convertEventHandlers(handler, options);\n if (action) {\n events[event] = action;\n }\n }\n }\n }\n return Object.keys(events).length > 0 ? events : undefined;\n}\n\nfunction convertEventHandlers(\n handler: EventHandler | EventHandler[] | null,\n options: ConvertOptions\n): BrickEventHandler[] | undefined {\n if (!handler) {\n return;\n }\n const list = (Array.isArray(handler) ? handler : [handler])\n .map((hdl) => convertEventHandler(hdl, options))\n .filter(Boolean) as BrickEventHandler[];\n return list.length > 0 ? list : undefined;\n}\n\nfunction convertEventHandler(\n handler: EventHandler,\n options: ConvertOptions\n): BrickEventHandler | undefined {\n switch (handler?.action) {\n case \"update_variable\":\n return {\n action:\n handler.payload.scope === \"template\"\n ? \"state.update\"\n : \"context.replace\",\n args: [handler.payload.name, handler.payload.value],\n };\n case \"refresh_data_source\":\n return {\n action:\n handler.payload.scope === \"template\"\n ? \"state.refresh\"\n : \"context.refresh\",\n args: [handler.payload.name],\n };\n case \"call_api\": {\n const { api, http, tool, params } = handler.payload;\n\n const success = handler.callback?.success\n ? convertEventHandlers(\n handler.callback.success as EventHandler | EventHandler[],\n options\n )\n : undefined;\n\n return {\n ...(http\n ? {\n useProvider: \"basic.http-request\",\n args: [api, params],\n }\n : tool\n ? {\n useProvider: \"ai-portal.call-tool\",\n args: [tool, params],\n }\n : {\n useProvider: `${api}:*`,\n params,\n }),\n callback: {\n ...(success && { success }),\n error: {\n action: \"handleHttpError\",\n },\n },\n };\n }\n case \"call_ref\":\n return {\n ...(handler.payload.scope === \"template\"\n ? {\n targetRef: handler.payload.ref,\n }\n : {\n target: `[data-root-id=\"${options.rootId}\"] [data-ref=\"${handler.payload.ref}\"]`,\n }),\n method: handler.payload.method,\n args: handler.payload.args,\n };\n case \"update_query\":\n return {\n action:\n handler.payload.method === \"replace\"\n ? \"history.replaceQuery\"\n : \"history.pushQuery\",\n args: handler.payload.args,\n };\n case \"show_message\":\n return {\n action: `message.${handler.payload.type}` as \"message.info\",\n args: [handler.payload.content],\n };\n case \"dispatch_event\":\n return {\n action: \"tpl.dispatchEvent\",\n args: [handler.payload.type, { detail: handler.payload.detail }],\n };\n case \"conditional\":\n return {\n if: handler.payload.test,\n then: convertEventHandlers(handler.payload.consequent, options) ?? [],\n else: convertEventHandlers(handler.payload.alternate, options),\n };\n }\n}\n","import { strictCollectMemberUsage } from \"@next-core/utils/storyboard\";\n\nconst EXPRESSION_PREFIX_REG = /^<%=?\\s/;\nconst EXPRESSION_SUFFIX_REG = /\\s%>$/;\n\n/**\n * @param value The trimmed string content\n * @returns if the value is a valid expression\n */\nfunction isExpression(value: string) {\n return EXPRESSION_PREFIX_REG.test(value) && EXPRESSION_SUFFIX_REG.test(value);\n}\n\nexport function parseDataSource(data: string | object):\n | {\n isString: false;\n embedded?: undefined;\n expression?: undefined;\n usedContexts?: undefined;\n }\n | {\n isString: true;\n embedded: string;\n expression: string;\n usedContexts: Set<string>;\n } {\n if (typeof data !== \"string\") {\n return {\n isString: false,\n };\n }\n\n let expression: string;\n const expr = data.trim();\n if (isExpression(expr)) {\n expression = expr\n .replace(EXPRESSION_PREFIX_REG, \"\")\n .replace(EXPRESSION_SUFFIX_REG, \"\")\n .trim();\n } else {\n // eslint-disable-next-line no-console\n console.warn(\"Invalid expression:\", JSON.stringify(data));\n expression = \"null\";\n }\n\n const usedContexts = strictCollectMemberUsage(data, \"CTX\");\n\n return {\n isString: true,\n embedded: data,\n expression,\n usedContexts,\n };\n}\n","import type * as t from \"@babel/types\";\nimport { preevaluate, type PreevaluateResult } from \"@next-core/cook\";\nimport { isExpressionString } from \"@next-shared/tsx-parser\";\n\nexport function deepReplaceVariables<T>(\n value: T,\n patterns: Map<string, string> | undefined\n): T {\n if (!patterns?.size) {\n return value;\n }\n\n if (Array.isArray(value)) {\n return value.map((item) =>\n deepReplaceVariables(item, patterns)\n ) as unknown as T;\n }\n\n if (typeof value === \"object\" && value !== null) {\n return Object.fromEntries(\n Object.entries(value).map(([k, v]) => [\n k,\n deepReplaceVariables(v, patterns),\n ])\n ) as T;\n }\n\n if (typeof value === \"string\" && isExpressionString(value)) {\n return replaceVariables(value, patterns) as unknown as T;\n }\n\n return value;\n}\n\ninterface Replacement {\n id: t.Identifier;\n shorthand?: boolean;\n}\n\nexport function replaceVariables(\n expr: string,\n patterns: Map<string, string> | undefined\n): string {\n if (!patterns?.size) {\n return expr;\n }\n const keywords = [...patterns.keys()];\n if (keywords.some((k) => expr.includes(k))) {\n const replacements: Replacement[] = [];\n let result: PreevaluateResult | undefined;\n try {\n result = preevaluate(expr, {\n withParent: true,\n hooks: {\n beforeVisitGlobal(node, path) {\n if (patterns.has(node.name)) {\n const p = path![path!.length - 1]?.node;\n let shorthand: boolean | undefined;\n if (p && p.type === \"Property\" && !p.computed && p.shorthand) {\n shorthand = true;\n }\n replacements.push({ id: node, shorthand });\n }\n },\n },\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Parse expression failed:\", error);\n }\n if (replacements.length > 0 && result) {\n const { prefix, source, suffix } = result;\n const chunks: string[] = [];\n let prevStart = 0;\n for (let i = 0; i < replacements.length; i++) {\n const { id, shorthand } = replacements[i];\n const { name, start, end } = id;\n chunks.push(\n source.substring(prevStart, start!),\n `${shorthand ? `${name}: ` : \"\"}${patterns.get(name)}`\n );\n prevStart = end!;\n }\n chunks.push(source.substring(prevStart));\n return `${prefix}${chunks.join(\"\")}${suffix}`;\n }\n }\n return expr;\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type {\n ComponentChild,\n ParsedModule,\n RenderUseBrick,\n} from \"@next-shared/tsx-parser\";\nimport type { TableColumn, TableProps } from \"../lib/components.js\";\nimport type { ConvertState, ConvertOptions } from \"./interfaces.js\";\n// import { lowLevelConvertToStoryboard } from \"./raw-data-generate/convert.js\";\nimport { parseDataSource } from \"./expressions.js\";\n// import { getPreGeneratedAttrViews } from \"./getPreGeneratedAttrViews.js\";\n// import { findObjectIdByUsedDataContexts } from \"./findObjectIdByUsedDataContexts.js\";\nimport { convertComponent } from \"./convertComponent.js\";\nimport { deepReplaceVariables } from \"./deepReplaceVariables.js\";\n\nconst columnUseBrickParams = [\"cellData\", \"rowData\"];\n\nexport default async function convertTable(\n component: ComponentChild,\n mod: ParsedModule,\n state: ConvertState,\n options: ConvertOptions,\n scope: \"page\" | \"view\" | \"template\"\n): Promise<BrickConf> {\n const { properties } = component;\n const { dataSource, size, columns, rowKey, pagination, ...restProps } =\n properties as Omit<TableProps<object>, \"dataSource\" | \"columns\"> & {\n dataSource: string | object;\n size?: \"small\" | \"medium\" | \"large\";\n pagination?: boolean;\n columns:\n | string\n | Array<\n Omit<TableColumn<object>, \"render\"> & {\n render?: RenderUseBrick;\n }\n >;\n };\n\n const parsedDataSource = parseDataSource(dataSource);\n\n // const objectId = findObjectIdByUsedDataContexts(\n // parsedDataSource.usedContexts,\n // view.dataSources,\n // view.variables\n // );\n\n // const attrViews = objectId\n // ? await getPreGeneratedAttrViews(objectId)\n // : undefined;\n\n const configuredColumns = new Map<string, BrickConf>();\n\n // if (attrViews?.size && Array.isArray(columns)) {\n // for (const column of columns) {\n // if (column.render || typeof column.dataIndex !== \"string\") {\n // continue;\n // }\n // const candidate = attrViews.get(column.dataIndex);\n // if (candidate) {\n // const brick = lowLevelConvertToStoryboard(candidate, \".cellData\");\n // if (brick) {\n // brick.slot = `[${column.dataIndex}]`;\n // configuredColumns.set(column.dataIndex, brick);\n // }\n // }\n // }\n // }\n\n const convertedColumns = Array.isArray(columns)\n ? await Promise.all(\n columns.map(async ({ render, ...column }) => {\n if (render) {\n const patterns = new Map<string, string>();\n for (\n let i = 0;\n i < render.params.length && i < columnUseBrickParams.length;\n i++\n ) {\n patterns.set(render.params[i], `DATA.${columnUseBrickParams[i]}`);\n }\n\n const useBrick = (\n await Promise.all(\n render.children.map((child) =>\n convertComponent(child, mod, state, options, scope)\n )\n )\n ).flatMap((child) => deepReplaceVariables(child, patterns));\n\n return {\n ...column,\n useBrick: useBrick.map((item) =>\n item.brick.startsWith(\":\")\n ? {\n brick: \"div\",\n children: [item],\n }\n : item\n ),\n };\n }\n return typeof column.dataIndex === \"string\" &&\n configuredColumns.has(column.dataIndex)\n ? {\n ...column,\n useChildren: `[${column.dataIndex}]`,\n }\n : column;\n })\n )\n : columns;\n\n return {\n brick: \"eo-next-table\",\n properties: {\n dataSource: parsedDataSource.isString\n ? parsedDataSource.embedded\n : dataSource,\n ...restProps,\n rowKey: rowKey ?? (Array.isArray(columns) ? columns[0]?.key : undefined),\n columns: convertedColumns,\n themeVariant: \"elevo\",\n scrollConfig: {\n x: \"max-content\",\n },\n ...(options.expanded\n ? {\n bordered: true,\n pagination,\n size: \"large\",\n }\n : {\n size: \"middle\",\n pagination: false,\n }),\n },\n children:\n configuredColumns.size > 0 ? Array.from(configuredColumns.values()) : [],\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component, ParsedModule } from \"@next-shared/tsx-parser\";\nimport type { DashboardProps, DashboardWidget } from \"../lib/components.js\";\nimport { parseDataSource } from \"./expressions.js\";\n// import { findObjectIdByUsedDataContexts } from \"./findObjectIdByUsedDataContexts.js\";\nimport {\n /* getPreGeneratedMetricGroups, */ type MetricWithGroup,\n} from \"./getPreGeneratedMetricGroups.js\";\nimport type { ConvertState, ConvertOptions } from \"./interfaces.js\";\n\nconst COLORS = [\n \"#336EF4\",\n \"#45CAFF\",\n \"#41CDCF\",\n \"#8146F3\",\n \"#F8A075\",\n \"#94E65E\",\n \"#57689C\",\n \"#C285EF\",\n \"#FAC60B\",\n \"#E4551F\",\n \"#8984FF\",\n \"#2540FF\",\n \"#08BF33\",\n \"#F7811C\",\n \"#AC7CFF\",\n \"#1BA5DC\",\n \"#E89716\",\n \"#76A6F5\",\n \"#4F69FF\",\n];\n\ninterface MergedWidget extends DashboardWidget {\n relevantMetrics?: string[];\n counterMetric?: string;\n groupTitle?: string;\n size?: \"small\" | \"medium\" | \"large\";\n}\n\nexport default async function convertDashboard(\n { properties }: Component,\n mod: ParsedModule,\n state: ConvertState,\n options: ConvertOptions\n): Promise<BrickConf> {\n const {\n dataSource,\n groupField: _groupField,\n widgets,\n } = properties as Omit<DashboardProps, \"dataSource\"> & {\n dataSource: string | object;\n };\n\n state.usedHelpers.add(\"_helper_getLatestMetricValue\");\n state.usedHelpers.add(\"_helper_extractList\");\n state.usedHelpers.add(\"_helper_groupMetricData\");\n state.usedHelpers.add(\"_helper_getMetricDisplayNames\");\n\n const groupField = _groupField ? \"#showKey\" : undefined;\n\n const { isString, expression /* , usedContexts */ } =\n parseDataSource(dataSource);\n\n const chartData = isString\n ? `<%= FN._helper_extractList((${expression})) %>`\n : dataSource;\n\n if (options.expanded) {\n let mergedWidgets = widgets as MergedWidget[];\n // const objectId = findObjectIdByUsedDataContexts(\n // usedContexts,\n // view.dataSources,\n // view.variables\n // );\n // const metricGroups = objectId\n // ? await getPreGeneratedMetricGroups(objectId)\n // : [];\n const metricGroups: MetricWithGroup[] = [];\n\n if (metricGroups.length > 0) {\n mergedWidgets = [];\n const mergedMetrics = new Set<string>();\n const metricIds = new Set(widgets.map((w) => w.metric.id));\n for (const widget of widgets) {\n if (mergedMetrics.has(widget.metric.id)) {\n continue; // Skip already merged metrics\n }\n const mergedWidget = { ...widget } as MergedWidget;\n mergedWidgets.push(mergedWidget);\n const group = metricGroups.find((g) =>\n g.metrics.includes(widget.metric.id)\n );\n if (group) {\n const relevantMetrics = group.metrics.filter((m) => metricIds.has(m));\n if (relevantMetrics.length > 1) {\n mergedWidget.relevantMetrics = relevantMetrics;\n mergedWidget.counterMetric = group.counter;\n mergedWidget.groupTitle = group.group;\n for (const metricId of relevantMetrics) {\n mergedMetrics.add(metricId);\n metricIds.delete(metricId);\n }\n }\n }\n }\n }\n\n let colorCursor = 0;\n\n return {\n brick: \"div\",\n properties: {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fit, minmax(500px, 1fr))\",\n gap: \"16px\",\n },\n dataset: {\n component: \"dashboard\",\n },\n },\n children: mergedWidgets.map((widget) => {\n const { title, /* type, */ metric, size, precision } = widget;\n const colorCount =\n widget.relevantMetrics?.length ?? (groupField ? 2 : 1);\n const colors = Array.from(\n { length: colorCount },\n (_, i) => COLORS[(colorCursor + i) % COLORS.length]\n );\n colorCursor += colorCount;\n const unit = metric.unit === \"load\" ? \"\" : metric.unit;\n const chart = {\n brick: \"chart-v2.time-series-chart\",\n properties: {\n data: chartData,\n xField: \"time\",\n ...(widget.relevantMetrics\n ? {\n // yFields: widget.relevantMetrics,\n yFields: `<% FN._helper_getMetricDisplayNames((${expression}).displayNameList, ${JSON.stringify(\n widget.relevantMetrics\n )}) %>`,\n }\n : {\n // yField: metric.id,\n yField: `<% FN._helper_getMetricDisplayNames((${expression}).displayNameList, [${JSON.stringify(\n metric.id\n )}])[0] %>`,\n }),\n ...(widget.counterMetric\n ? {\n forceAbsoluteNumbers: true,\n series: {\n [widget.counterMetric]: {\n isNegative: true,\n },\n },\n }\n : null),\n height: size === \"large\" ? 230 : 200,\n timeFormat: \"HH:mm\",\n ...(widget.relevantMetrics || groupField\n ? null\n : {\n areaOptions: {\n style: {\n fill: `l(90) 0:${colors[0]} 1:#ffffff`,\n },\n },\n }),\n axis: {\n yAxis: {\n unit,\n precision,\n ...(widget.counterMetric\n ? null\n : unit === \"percent(1)\"\n ? { min: 0, max: 1 }\n : unit === \"percent(100)\" || unit === \"%\"\n ? { min: 0, max: 100 }\n : { min: 0 }),\n shape: \"smooth\",\n },\n },\n groupField,\n areaShape: \"smooth\",\n legends: !!(widget.relevantMetrics || groupField),\n colors: colors,\n tooltip: {\n marker: {\n fill: colors[0],\n stroke: \"#fff\",\n lineWidth: 2,\n shadowColor: colors[0],\n shadowBlur: 8,\n shadowOffsetX: 0,\n shadowOffsetY: 4,\n },\n domStyles: {\n \"g2-tooltip\": {\n background: [\n `radial-gradient( farthest-corner at -20px 150px, ${colors[0]} 0%, rgba(238,238,238,0) 60%)`,\n \"linear-gradient( 180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.8) 100%)\",\n ].join(\", \"),\n boxShadow: `0px 4px 8px 0px ${convertHexColorToRGBA(colors[0], 0.08)}`,\n borderRadius: \"8px\",\n border: \"1px solid rgba(255,255,255,1)\",\n backdropFilter: \"blur(3px)\",\n },\n },\n },\n },\n };\n return {\n brick: \"div\",\n properties: {\n style: {\n background: \"rgba(255,255,255,0.8)\",\n boxShadow: \"0px 2px 4px 0px rgba(0,0,0,0.06)\",\n borderRadius: \"8px\",\n padding: \"16px 20px 20px\",\n },\n },\n children: [\n {\n brick: \"div\",\n properties: {\n style: {\n fontSize: \"16px\",\n fontWeight: \"500\",\n marginBottom: \"20px\",\n },\n textContent: widget.groupTitle || title || metric.id,\n },\n },\n chart,\n ],\n };\n }),\n };\n }\n\n if (groupField) {\n return {\n brick: \"div\",\n properties: {\n style: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"8px\",\n },\n },\n children: [\n {\n brick: \":forEach\",\n dataSource: `<%= FN._helper_groupMetricData(FN._helper_extractList((${expression})), ${JSON.stringify(groupField)}) %>`,\n children: [\n {\n brick: \"div\",\n properties: {\n textContent: \"<% `${ITEM.group}:` %>\",\n style: {\n fontWeight: \"500\",\n },\n },\n },\n {\n brick: \"div\",\n properties: {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(200px, 1fr))\",\n gap: \"10px\",\n marginBottom: \"8px\",\n },\n dataset: {\n component: \"dashboard\",\n },\n },\n children: widgets.map((widget, i) => {\n const { title, /* type, */ metric, precision } = widget;\n return {\n brick: \"ai-portal.stat-with-mini-chart\",\n properties: {\n size: \"small\",\n label: title || metric.id,\n data: \"<% ITEM.list %>\",\n xField: \"time\",\n yField: metric.id,\n lineColor: COLORS[i % COLORS.length],\n showArea: true,\n ...(metric.unit === \"percent(1)\"\n ? { min: 0, max: 1 }\n : metric.unit === \"percent(100)\" || metric.unit === \"%\"\n ? { min: 0, max: 100 }\n : { min: 0 }),\n value: `<%= FN._helper_getLatestMetricValue(ITEM.list, ${JSON.stringify(\n {\n metric,\n precision,\n }\n )}) %>`,\n },\n };\n }),\n },\n ],\n },\n ],\n };\n }\n\n return {\n brick: \"div\",\n properties: {\n style: {\n display: \"grid\",\n gridTemplateColumns: \"repeat(auto-fill, minmax(200px, 1fr))\",\n gap: \"10px\",\n },\n dataset: {\n component: \"dashboard\",\n },\n },\n children: widgets.map((widget, i) => {\n const { title, /* type, */ metric, precision } = widget;\n return {\n brick: \"ai-portal.stat-with-mini-chart\",\n properties: {\n size: \"small\",\n label: title || metric.id,\n data: chartData,\n xField: \"time\",\n yField: metric.id,\n lineColor: COLORS[i % COLORS.length],\n showArea: true,\n ...(metric.unit === \"percent(1)\"\n ? { min: 0, max: 1 }\n : metric.unit === \"percent(100)\" || metric.unit === \"%\"\n ? { min: 0, max: 100 }\n : { min: 0 }),\n value: `<%= FN._helper_getLatestMetricValue((${\n isString\n ? `FN._helper_extractList((${expression}))`\n : JSON.stringify(dataSource ?? null)\n }), ${JSON.stringify({\n metric,\n precision,\n })}) %>`,\n },\n };\n }),\n };\n}\n\nfunction convertHexColorToRGBA(color: string, alpha: number): string {\n const hex = color.slice(1);\n const bigint = parseInt(hex, 16);\n const r = (bigint >> 16) & 255;\n const g = (bigint >> 8) & 255;\n const b = bigint & 255;\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport {\n isAnyOfficialComponent,\n type ComponentChild,\n type ModulePart,\n type ParsedModule,\n} from \"@next-shared/tsx-parser\";\nimport type { ConvertState, ConvertOptions } from \"./interfaces.js\";\nimport { convertEvents } from \"./convertEvents.js\";\nimport convertList from \"./convertList.js\";\nimport convertTable from \"./convertTable.js\";\nimport convertDescriptions from \"./convertDescriptions.js\";\nimport convertDashboard from \"./convertDashboard.js\";\nimport convertButton from \"./convertButton.js\";\nimport convertForm from \"./convertForm.js\";\nimport convertFormItem from \"./convertFormItem.js\";\nimport convertModal from \"./convertModal.js\";\nimport convertToolbar from \"./convertToolbar.js\";\nimport convertText from \"./convertText.js\";\nimport convertCard from \"./convertCard.js\";\nimport convertForEach from \"./convertForEach.js\";\nimport convertIf from \"./convertIf.js\";\nimport convertOutput from \"./convertOutput.js\";\nimport convertLink from \"./convertLink.js\";\nimport convertTag from \"./convertTag.js\";\nimport convertAvatar from \"./convertAvatar.js\";\nimport convertAvatarGroup from \"./convertAvatarGroup.js\";\nimport convertCodeBlock from \"./convertCodeBlock.js\";\nimport { getAppTplName, getViewTplName } from \"./modules/getTplName.js\";\n\nexport async function convertComponent(\n component: ComponentChild,\n mod: ParsedModule,\n state: ConvertState,\n options: ConvertOptions,\n scope: \"page\" | \"view\" | \"template\"\n): Promise<BrickConf | BrickConf[]> {\n let brick: BrickConf | null = null;\n\n if (isAnyOfficialComponent(component)) {\n const componentName = component.reference\n ? component.reference.name\n : component.name;\n switch (componentName) {\n case \"List\":\n brick = await convertList(component);\n break;\n case \"Table\":\n brick = await convertTable(component, mod, state, options, scope);\n break;\n case \"Descriptions\":\n brick = await convertDescriptions(\n component,\n mod,\n state,\n options,\n scope\n );\n break;\n case \"Card\":\n brick = await convertCard(component);\n break;\n case \"Dashboard\":\n brick = await convertDashboard(component, mod, state, options);\n break;\n case \"Button\":\n brick = await convertButton(component);\n break;\n case \"Form\":\n brick = await convertForm(component);\n break;\n case \"Toolbar\":\n brick = await convertToolbar(component);\n break;\n case \"Modal\":\n brick = await convertModal(component);\n break;\n case \"Plaintext\":\n brick = await convertText(component);\n break;\n case \"Link\":\n brick = await convertLink(component, mod, state);\n break;\n case \"Output\":\n brick = await convertOutput(component);\n break;\n case \"Tag\":\n brick = await convertTag(component);\n break;\n case \"Avatar\":\n brick = await convertAvatar(component);\n break;\n case \"AvatarGroup\":\n brick = await convertAvatarGroup(component);\n break;\n case \"CodeBlock\":\n brick = await convertCodeBlock(component);\n break;\n case \"Search\":\n case \"Input\":\n case \"NumberInput\":\n case \"Textarea\":\n case \"Select\":\n case \"Radio\":\n case \"Checkbox\":\n case \"Switch\":\n case \"DatePicker\":\n case \"TimePicker\":\n brick = await convertFormItem(\n component,\n convertComponentName(component.name)\n );\n break;\n case \"ForEach\":\n brick = await convertForEach(component);\n break;\n case \"If\":\n brick = await convertIf(component);\n break;\n default:\n if (\n (state.app.appType === \"app\" || options.allowAnyBricks) &&\n component.name.toLowerCase() === component.name\n ) {\n // Allow any bricks in app mode or when allowAnyBricks is true\n brick = {\n brick: component.name.replaceAll(\"_\", \".\").replaceAll(\"--\", \".\"),\n properties: component.properties,\n };\n } else {\n // eslint-disable-next-line no-console\n console.error(\"Unknown component:\", component.name);\n }\n }\n } else {\n const { type, importSource, name } = component.reference!;\n let refPart: ModulePart | null | undefined;\n if (type === \"imported\") {\n const imported = state.app.modules.get(importSource!);\n refPart = name\n ? imported?.namedExports.get(name)\n : imported?.defaultExport;\n } else {\n const parts = [...mod.internals, ...mod.namedExports.values()];\n refPart = parts.find(\n (part) => part.type === \"template\" && part.component.id?.name === name\n );\n }\n if (refPart?.type === \"template\") {\n const tplName = refPart.component.id!.name;\n brick = {\n brick:\n state.app.appType === \"app\"\n ? getAppTplName(tplName)\n : getViewTplName(tplName, options.rootId),\n properties: component.properties,\n };\n } else {\n // eslint-disable-next-line no-console\n console.error(\n `Cannot find the component \"${component.reference!.name}\".`\n );\n }\n }\n\n if (!brick) {\n return [];\n }\n\n if (component.ref) {\n if (scope === \"template\") {\n (brick as { ref?: string }).ref = component.ref;\n } else {\n brick.properties ??= {};\n brick.properties.dataset ??= {};\n (brick.properties.dataset as Record<string, string>).ref = component.ref;\n }\n }\n\n if (component.slot) {\n brick.slot = component.slot;\n }\n\n brick.events = convertEvents(component, options);\n\n if (component.children?.length) {\n brick.children = (\n await Promise.all(\n component.children.map((child) =>\n convertComponent(child, mod, state, options, scope)\n )\n )\n ).flat();\n\n if (\n (component.name === \"Card\" || component.name === \"Modal\") &&\n brick.children.length > 0\n ) {\n brick.children = [\n {\n brick: \"eo-content-layout\",\n children: brick.children,\n },\n ];\n }\n }\n\n return brick;\n}\n\nfunction convertComponentName(name: string) {\n return name.includes(\"-\")\n ? name\n : `eo${name.replace(/([A-Z])/g, \"-$1\").toLowerCase()}`;\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\nimport type { ListProps } from \"../lib/components.js\";\nimport { parseDataSource } from \"./expressions.js\";\n\nexport default function convertList({ properties }: Component): BrickConf {\n const props = properties as Omit<ListProps, \"dataSource\"> & {\n dataSource: string | object;\n };\n\n const { dataSource, fields, variant } = props;\n\n const parsedDataSource = parseDataSource(dataSource);\n\n return {\n brick: \"eo-list\",\n properties: {\n variant,\n dataSource: parsedDataSource.isString\n ? parsedDataSource.embedded\n : dataSource,\n fields,\n themeVariant: \"elevo\",\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type {\n Component,\n ParsedModule,\n RenderUseBrick,\n} from \"@next-shared/tsx-parser\";\nimport type { DescriptionsProps } from \"../lib/components.js\";\n// import { convertToStoryboard } from \"./raw-data-generate/convert.js\";\n// import { getPreGeneratedAttrViews } from \"./getPreGeneratedAttrViews.js\";\nimport { parseDataSource } from \"./expressions.js\";\n// import { findObjectIdByUsedDataContexts } from \"./findObjectIdByUsedDataContexts.js\";\nimport { convertComponent } from \"./convertComponent.js\";\nimport { deepReplaceVariables } from \"./deepReplaceVariables.js\";\nimport type { ConvertState, ConvertOptions } from \"./interfaces.js\";\n\ninterface DescriptionItem {\n label: string;\n text?: string;\n field?: string;\n render?: RenderUseBrick;\n}\n\nexport default async function convertDescriptions(\n { properties }: Component,\n mod: ParsedModule,\n state: ConvertState,\n options: ConvertOptions,\n scope: \"page\" | \"view\" | \"template\"\n): Promise<BrickConf> {\n const { dataSource, title, list, columns, ...restProps } =\n properties as Partial<DescriptionsProps<object>> as Omit<\n DescriptionsProps<object>,\n \"list\"\n > & {\n dataSource: string | object;\n list: DescriptionItem[] | string;\n columns?: number;\n };\n\n const parsedDataSource = parseDataSource(dataSource);\n\n // const objectId = findObjectIdByUsedDataContexts(\n // parsedDataSource.usedContexts,\n // view.dataSources,\n // view.variables\n // );\n\n // const attrViews = objectId\n // ? await getPreGeneratedAttrViews(objectId)\n // : undefined;\n\n const configuredItems = new Map<string, BrickConf>();\n\n // if (attrViews?.size && Array.isArray(list)) {\n // for (const item of list) {\n // if (item.render) {\n // continue;\n // }\n // if (item.field) {\n // const candidate = attrViews.get(item.field);\n // if (candidate) {\n // const brick = convertToStoryboard(candidate, item.field);\n // if (brick) {\n // brick.slot = `[${item.field}]`;\n // configuredItems.set(item.field, brick);\n // }\n // }\n // }\n // }\n // }\n\n const convertedList = Array.isArray(list)\n ? await Promise.all(\n list.map(async ({ render, ...item }) => {\n if (render) {\n const patterns = new Map<string, string>();\n if (render.params.length > 0) {\n patterns.set(render.params[0], \"DATA\");\n }\n\n const useBrick = (\n await Promise.all(\n render.children.map((child) =>\n convertComponent(child, mod, state, options, scope)\n )\n )\n ).flatMap((child) => deepReplaceVariables(child, patterns));\n\n return {\n label: item.label,\n useBrick,\n };\n }\n const brick = item.field\n ? configuredItems.get(item.field)\n : undefined;\n return brick\n ? {\n label: item.label,\n useChildren: `[${item.field}]`,\n }\n : item;\n })\n )\n : list;\n\n return {\n brick: \"eo-descriptions\",\n properties: {\n ...restProps,\n dataSource: parsedDataSource.isString\n ? parsedDataSource.embedded\n : dataSource,\n // descriptionTitle: title,\n list: convertedList,\n ...(columns == null\n ? {\n column: options.expanded ? 3 : 1,\n templateColumns: \"repeat(auto-fill,minmax(360px,1fr))\",\n }\n : {\n column: columns,\n }),\n // showCard: !options.expanded,\n themeVariant: \"elevo\",\n },\n children:\n configuredItems.size > 0 ? Array.from(configuredItems.values()) : [],\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\nimport type { CardProps } from \"../lib/components.js\";\n\nexport default function convertCard(component: Component): BrickConf {\n const { properties } = component;\n const { title, textContent } = properties as CardProps & {\n textContent?: string;\n };\n return {\n brick: \"eo-card\",\n properties: {\n themeVariant: \"elevo\",\n cardTitle: title,\n background: \"#fff\",\n outline: \"background\",\n ...(textContent ? { textContent } : null),\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\nimport type { ButtonProps } from \"../lib/components.js\";\n\nexport default function convertButton(component: Component): BrickConf {\n const { properties } = component;\n const props = properties as ButtonProps & {\n textContent?: string;\n };\n return {\n brick: \"eo-button\",\n properties: {\n ...props,\n themeVariant: \"elevo\",\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\nimport type { FormProps } from \"../lib/components.js\";\n\nexport default function convertForm(component: Component): BrickConf {\n const { properties } = component;\n const { values } = (properties ?? {}) as FormProps<object>;\n\n return {\n brick: \"eo-form\",\n properties: {\n values: values ?? {},\n themeVariant: \"elevo\",\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\n\nexport default function convertToolbar(_component: Component): BrickConf {\n return {\n brick: \"eo-flex-layout\",\n properties: {\n gap: \"0.5em\",\n alignItems: \"center\",\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\nimport type { ModalProps } from \"../lib/components.js\";\n\nexport default function convertModal(component: Component): BrickConf {\n const { properties } = component;\n const { title, confirmText, cancelText, ...restProps } =\n properties as Partial<ModalProps> & {\n textContent?: string;\n };\n return {\n brick: \"eo-modal\",\n portal: true,\n properties: {\n themeVariant: \"elevo\",\n modalTitle: title,\n confirmText: confirmText,\n cancelText: cancelText,\n keyboard: true,\n ...restProps,\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\n\nexport default function convertText(component: Component): BrickConf {\n const { properties } = component;\n const props = properties as {\n textContent?: string;\n };\n return {\n brick: \"span\",\n properties: {\n ...props,\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component, ParsedModule } from \"@next-shared/tsx-parser\";\nimport type { LinkProps } from \"../lib/components.js\";\nimport type { ConvertState } from \"./interfaces.js\";\n\nexport default function convertLink(\n component: Component,\n mod: ParsedModule,\n state: ConvertState\n): BrickConf {\n const { properties } = component;\n const props = properties as LinkProps & {\n textContent?: string;\n };\n return {\n brick: \"eo-link\",\n properties: {\n ...props,\n inApp: state.app.appType === \"app\",\n themeVariant: \"elevo\",\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\n\nexport default function convertOutput(component: Component): BrickConf {\n const { properties } = component;\n const { style, ...restProps } = properties as {\n textContent?: string;\n style?: Record<string, any>;\n };\n\n return {\n brick: \"pre\",\n properties: {\n style: {\n background: \"hsl(230, 1%, 98%)\",\n color: \"hsl(230, 8%, 24%)\",\n fontFamily:\n '\"Fira Code\", \"Fira Mono\", Menlo, Consolas, \"DejaVu Sans Mono\", monospace',\n direction: \"ltr\",\n textAlign: \"left\",\n whiteSpace: \"pre\",\n wordSpacing: \"normal\",\n wordBreak: \"normal\",\n lineHeight: \"1.5\",\n tabSize: \"2\",\n hyphens: \"none\",\n fontSize: \"13px\",\n\n padding: \"1em\",\n // margin: \"0.5em 0\",\n margin: \"0\",\n overflowX: \"auto\",\n borderRadius: \"9px\",\n ...style,\n },\n ...restProps,\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\nimport type { TagProps } from \"../lib/components.js\";\n\nexport default function convertTag(component: Component): BrickConf {\n const { properties } = component;\n const props = properties as TagProps & {\n textContent?: string;\n };\n return {\n brick: \"eo-tag\",\n properties: {\n ...props,\n themeVariant: \"elevo\",\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\nimport type { AvatarProps } from \"../lib/components.js\";\n\nexport default function convertAvatar(component: Component): BrickConf {\n const { properties } = component;\n const props = properties as AvatarProps;\n return {\n brick: \"eo-avatar\",\n properties: {\n ...props,\n themeVariant: \"elevo\",\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\nimport type { AvatarGroupProps } from \"../lib/components.js\";\n\nexport default function convertAvatarGroup(component: Component): BrickConf {\n const { properties } = component;\n const props = properties as AvatarGroupProps;\n return {\n brick: \"eo-avatar-group\",\n properties: {\n ...props,\n themeVariant: \"elevo\",\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\nimport type { CodeBlockProps } from \"../lib/components.js\";\n\nexport default function convertCodeBlock(component: Component): BrickConf {\n const { properties } = component;\n const props = properties as Partial<CodeBlockProps>;\n return {\n brick: \"eo-code-block\",\n properties: {\n ...props,\n themeVariant: \"elevo\",\n },\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\n\nexport default function convertFormItem(\n component: Component,\n type: string\n): BrickConf {\n const { properties } = component;\n\n let brick = type;\n let props: Record<string, unknown> = {\n ...properties,\n themeVariant: \"elevo\",\n };\n\n switch (brick) {\n case \"eo-search\":\n props = {\n ...props,\n trim: true,\n };\n break;\n case \"eo-number-input\":\n brick = \"eo-input\";\n props = {\n type: \"number\",\n ...props,\n };\n break;\n }\n\n return {\n brick,\n properties: props,\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\n\nexport default function convertForEach(component: Component): BrickConf {\n const { properties } = component;\n const { dataSource } = properties as {\n dataSource?: unknown;\n };\n return {\n brick: \":forEach\",\n dataSource,\n };\n}\n","import type { BrickConf } from \"@next-core/types\";\nimport type { Component } from \"@next-shared/tsx-parser\";\n\nexport default function convertIf(component: Component): BrickConf {\n const { properties } = component;\n const { dataSource } = properties as {\n dataSource?: unknown;\n };\n return {\n brick: \":if\",\n dataSource,\n };\n}\n","import type { BrickConf, ContextConf } from \"@next-core/types\";\nimport {\n isOfficialComponent,\n type ComponentChild,\n type ModulePart,\n type ModulePartOfFunction,\n type ParsedModule,\n} from \"@next-shared/tsx-parser\";\nimport { convertDataSource } from \"./convertDataSource.js\";\nimport { convertComponent } from \"../convertComponent.js\";\nimport type { ConvertState, ConvertOptions } from \"../interfaces.js\";\n\nexport interface ConvertedModule {\n sourceModule: ParsedModule;\n defaultExport: ConvertedPart | null;\n namedExports: Map<string, ConvertedPart>;\n internals: ConvertedPart[];\n}\n\nexport type ConvertedPart = ConvertedPartOfComponent | ModulePartOfFunction;\n\nexport interface ConvertedPartOfComponent {\n type: \"page\" | \"view\" | \"template\";\n bricks: BrickConf[];\n context: ContextConf[];\n name?: string;\n title?: string;\n}\n\nexport default async function convertModule(\n mod: ParsedModule,\n state: ConvertState,\n options: ConvertOptions\n): Promise<ConvertedModule> {\n if (mod.usedHelpers.size > 0) {\n for (const helper of mod.usedHelpers) {\n state.usedHelpers.add(helper);\n }\n }\n\n const [defaultExport, namedExports, internals] = await Promise.all([\n mod.defaultExport\n ? parseModulePart(mod.defaultExport, mod, state, options)\n : null,\n Promise.all(\n Array.from(mod.namedExports.entries()).map(\n async ([name, part]) =>\n [name, await parseModulePart(part, mod, state, options)] as [\n string,\n ConvertedPart,\n ]\n )\n ).then((entries) => new Map(entries)),\n Promise.all(\n mod.internals.map((part) => parseModulePart(part, mod, state, options))\n ),\n ]);\n\n return {\n sourceModule: mod,\n defaultExport,\n namedExports,\n internals,\n };\n}\n\nasync function parseModulePart(\n part: ModulePart,\n mod: ParsedModule,\n state: ConvertState,\n options: ConvertOptions\n): Promise<ConvertedPart> {\n if (part.type === \"function\") {\n return part;\n }\n\n const context: ContextConf[] = [];\n\n const { component } = part;\n\n for (const binding of component.bindingMap.values()) {\n if (binding.kind === \"resource\") {\n context.push(convertDataSource(binding.resource!));\n } else if (\n binding.kind === \"state\" ||\n binding.kind === \"constant\" ||\n binding.kind === \"param\"\n ) {\n context.push({\n name: binding.id.name,\n value: binding.initialValue,\n expose: binding.kind === \"param\",\n track: true,\n });\n }\n }\n\n let children: ComponentChild[] | undefined;\n if (part.type === \"view\") {\n const view = component.children?.find((child) =>\n isOfficialComponent(child, \"View\")\n );\n if (view) {\n children = view.children;\n }\n } else {\n children = component.children;\n }\n\n const bricks = children?.length\n ? (\n await Promise.all(\n children.map((child) =>\n convertComponent(child, mod, state, options, part.type)\n )\n )\n ).flat()\n : [];\n\n return {\n type: part.type,\n bricks,\n context,\n name: component.id?.name,\n title: part.title,\n };\n}\n"],"names":["remoteWorkerPromise","worker","getRemoteTsxParserWorker","Remote","wrap","Worker","URL","EXPRESSION_PREFIX_REG","EXPRESSION_SUFFIX_REG","isExpressionString","value","trimmed","trim","test","isAnyOfficialComponent","child","reference","type","importSource","MODULE_SOURCE","isOfficialComponent","name","counter","tplNameMap","Map","getViewTplName","rootId","has","set","get","getViewTplNamePrefixByRootId","getViewTplNameSuffix","getAppTplName","replace","toLowerCase","convertDataSource","resource","http","api","params","tool","transform","rejectTransform","config","scope","hasEnabled","Object","prototype","hasOwnProperty","call","resolve","useProvider","args","isObject","translate","limit","undefined","limitBy","order","displayName","onReject","if","enabled","track","fallback","expose","convertEventHandlers","handler","options","list","Array","isArray","map","hdl","_convertEventHandlers","action","payload","_handler$callback","success","callback","error","targetRef","ref","target","method","content","detail","then","consequent","else","alternate","convertEventHandler","filter","Boolean","length","parseDataSource","data","isString","expression","expr","console","warn","JSON","stringify","embedded","usedContexts","strictCollectMemberUsage","deepReplaceVariables","patterns","size","item","fromEntries","entries","_ref","k","v","keys","some","includes","replacements","result","preevaluate","withParent","hooks","beforeVisitGlobal","node","path","_ref2","p","shorthand","computed","push","id","prefix","source","suffix","chunks","prevStart","i","start","end","substring","join","replaceVariables","columnUseBrickParams","COLORS","convertHexColorToRGBA","color","alpha","hex","slice","bigint","parseInt","async","convertComponent","component","mod","state","_component$children","brick","properties","props","dataSource","fields","variant","parsedDataSource","themeVariant","convertList","_columns$","columns","rowKey","pagination","restProps","configuredColumns","convertedColumns","Promise","all","render","column","useBrick","children","flatMap","startsWith","dataIndex","useChildren","key","scrollConfig","x","expanded","bordered","from","values","convertTable","title","configuredItems","convertedList","label","field","templateColumns","convertDescriptions","textContent","cardTitle","background","outline","convertCard","groupField","_groupField","widgets","usedHelpers","add","chartData","mergedWidgets","metricGroups","mergedMetrics","Set","metricIds","w","metric","widget","mergedWidget","group","find","g","metrics","relevantMetrics","m","counterMetric","groupTitle","metricId","delete","colorCursor","style","display","gridTemplateColumns","gap","dataset","_widget$relevantMetri","_widget$relevantMetri2","precision","colorCount","colors","_","unit","chart","xField","yFields","yField","forceAbsoluteNumbers","series","isNegative","height","timeFormat","areaOptions","fill","axis","yAxis","min","max","shape","areaShape","legends","tooltip","marker","stroke","lineWidth","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","domStyles","boxShadow","borderRadius","border","backdropFilter","padding","fontSize","fontWeight","marginBottom","flexDirection","lineColor","showArea","convertDashboard","convertButton","convertForm","alignItems","confirmText","cancelText","portal","modalTitle","keyboard","convertModal","convertText","inApp","app","appType","convertLink","fontFamily","direction","textAlign","whiteSpace","wordSpacing","wordBreak","lineHeight","tabSize","hyphens","margin","overflowX","convertOutput","convertTag","convertAvatar","convertAvatarGroup","convertCodeBlock","convertFormItem","convertForEach","convertIf","allowAnyBricks","replaceAll","_refPart","refPart","imported","modules","namedExports","defaultExport","internals","part","_part$component$id","tplName","_brick","_brick$properties","_brick$properties2","_brick$properties2$da","slot","events","event","_component$events","click","search","convertEvents","flat","convertModule","helper","parseModulePart","sourceModule","_children","_component$id","context","binding","bindingMap","kind","initialValue","view","bricks"],"sourceRoot":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(()=>{"use strict";var e,n,t,r,o,s,i,a,d,l,u,p,c,f,m,g,h,y,v,b={7131:(e,n,t)=>{var r=t(580),o=t(8135),s=t(4);const i="next-tsx",a=["callApi","callHttp","callTool"];function d(e,n){return!e.async&&!e.generator||(n.errors.push({message:"Function cannot be async or generator",node:e,severity:"error"}),!1)}function l(e,n){return!!e.referencesImport(i,n)||e.node.name===n&&!e.scope.getBinding(e.node.name)}function u(e,n){let t=null;return o.traverse(e,{enter(e,n){var r;!t&&(o.isFunctionExpression(e)||o.isStatement(e)||o.isAwaitExpression(e)||o.isYieldExpression(e)||o.isJSX(e)||o.isArrowFunctionExpression(e)&&(e.async||e.generator||o.isBlockStatement(e.body)||o.isObjectProperty(null===(r=n[n.length-1])||void 0===r?void 0:r.node)))&&(t=e)}}),!t||(null==n||n.errors.push({message:`Unsupported expression type: ${t.type}`,node:t,severity:"error"}),!1)}function p(e){return e.isNullLiteral()||e.isIdentifier()&&"undefined"===e.node.name&&void 0===e.scope.getBinding("undefined")}const c=/^<%=?\s/,f=/\s%>$/;function m(e){if("string"!=typeof e)return!1;const n=e.trim();return c.test(n)&&f.test(n)}function g(e){return e.isCallExpression()||e.isOptionalCallExpression()}function h(e){return e.isMemberExpression()||e.isOptionalMemberExpression()}function y(e,n,t,r){var o;const s=[],i={TSTypeAnnotation(e){s.push({type:"annotation",start:e.node.start,end:e.node.end}),e.skip()},TSTypeParameterInstantiation(e){s.push({type:"annotation",start:e.node.start,end:e.node.end}),e.skip()},TSAsExpression(e){s.push({type:"annotation",start:e.node.expression.end,end:e.node.end}),e.skip()},Identifier(e){var r,o,i,a,d,l;if(!e.isReferencedIdentifier())return;const u=e.parentPath.isObjectProperty()&&e.parentPath.node.shorthand,p=e.node.name,c=e.scope.getBindingIdentifier(p);if(c){var f,m;let l;switch(c){case null===(r=t.eventBinding)||void 0===r?void 0:r.id:l=null!==(o=t.eventBinding)&&void 0!==o&&o.isCallback?"EVENT.detail":"EVENT";break;case null===(i=t.forEachBinding)||void 0===i?void 0:i.item:l="ITEM";break;case null===(a=t.forEachBinding)||void 0===a?void 0:a.index:l="INDEX";break;case null===(d=t.dataBinding)||void 0===d?void 0:d.id:l="DATA"}if(l)return void s.push({type:"id",start:e.node.start,end:e.node.end,replacement:l,shorthand:u?p:void 0});const g=null===(f=t.component)||void 0===f?void 0:f.bindingMap.get(c);g?"state"===g.kind||"resource"===g.kind||"constant"===g.kind||"param"===g.kind||"query"===g.kind?s.push({type:"id",start:e.node.start,end:e.node.end,replacement:"query"===g.kind?"QUERY":`${"template"===t.component.type?"STATE":"CTX"}.${c.name}`,shorthand:u?p:void 0}):n.errors.push({message:`Invalid usage of ${g.kind} variable "${c.name}"`,node:e.node,severity:"error"}):null!==(m=t.functionBindings)&&void 0!==m&&m.has(c)&&s.push({type:"id",start:e.node.start,end:e.node.end,replacement:`FN.${p}`,shorthand:u?p:void 0})}else null!==(l=t.contextBindings)&&void 0!==l&&l.includes(p)&&s.push({type:"id",start:e.node.start,end:e.node.end,replacement:`CTX.${p}`,shorthand:u?p:void 0})}};e.isIdentifier()&&i.Identifier(e),e.traverse(i),s.sort(((e,n)=>e.start-n.start));const a=[];let d=e.node.start;for(const e of s)a.push(n.source.substring(d,e.start),"annotation"===e.type?"":`${e.shorthand?`${e.shorthand}:`:""}${e.replacement}`),d=e.end;a.push(n.source.substring(d,e.node.end));const l=a.join("");return r?l:`<%${null!==(o=t.modifier)&&void 0!==o?o:""} ${l} %>`}const v=Symbol("ambiguous");function b(e,n,t,r){if(e.isTSAsExpression())return b(e.get("expression"),n,t,r);if(e.isObjectExpression())return function(e,n,t,r){const o=e.get("properties");if(o.some((e=>e.isSpreadElement()||e.isObjectProperty()&&(e.node.computed||e.node.shorthand)))&&u(e.node,n))return r.ambiguous?v:y(e,n,r);const s={};for(const e of o){if(!e.isObjectProperty()){n.errors.push({message:`Unsupported property type: ${e.type}`,node:e.node,severity:"error"});continue}if(e.node.computed||e.node.shorthand){n.errors.push({message:"Unsupported computed or shorthand object property",node:e.node.key,severity:"error"});continue}const o=e.get("key");let i;if(o.isIdentifier())i=o.node.name;else{if(!o.isStringLiteral()){n.errors.push({message:`Unsupported object key type: ${o.node.type}`,node:o.node,severity:"error"});continue}i=o.node.value}s[i]=b(e.get("value"),n,t,r)}return s}(e,n,t,r);if(e.isArrayExpression())return function(e,n,t,r){const o=e.get("elements");if(o.some((e=>!e||e.isSpreadElement()))&&u(e.node,n))return r.ambiguous?v:y(e,n,r);const s=[];for(const i of o)i.node?i.isSpreadElement()?n.errors.push({message:"Spread elements are not supported in array",node:i.node,severity:"error"}):s.push(b(i,n,t,r)):n.errors.push({message:"Array elements cannot be empty",node:e.node,severity:"error"});return s}(e,n,t,r);if(e.isStringLiteral()||e.isNumericLiteral()||e.isBooleanLiteral())return e.node.value;if(e.isNullLiteral())return null;if(!e.isIdentifier()||"undefined"!==e.node.name||void 0!==e.scope.getBinding("undefined")){if(r.allowUseBrick&&e.isArrowFunctionExpression()){const o=e.get("body");if(o.isBlockStatement())return n.errors.push({message:"Block statements are not supported in render callback",node:o.node,severity:"error"}),null;const s=[];for(const t of e.get("params")){if(!t.isIdentifier())return n.errors.push({message:`Unsupported parameter type: ${t.type}`,node:t.node,severity:"error"}),null;s.push(t.node.name)}return{params:s,children:D(o,n,t,r)}}return e.isExpression()?u(e.node,n)?r.ambiguous?v:y(e,n,r):null:(n.errors.push({message:`Unsupported value type: ${e.node.type}`,node:e.node,severity:"error"}),null)}}function x(e,n,t,r){let s=!1;return o.traverse(e.node,{enter(e,n){var t;let r;s||o.isStringLiteral(e)||o.isNumericLiteral(e)||o.isBooleanLiteral(e)||o.isNullLiteral(e)||o.isObjectExpression(e)||o.isArrayExpression(e)||o.isObjectProperty(e)||o.isIdentifier(e)&&(r=null===(t=n[n.length-1])||void 0===t?void 0:t.node,1)&&(r&&o.isObjectProperty(r)?!r.computed&&!r.shorthand:"undefined"===e.name)||(s=!0)}}),s&&u(e.node,null)?y(e,n,r):b(e,n,t,r)}const $={callApi:[2,3],callHttp:[1,2],callTool:[2,3]};function E(e,n,t,r){if(!g(e))return n.errors.push({message:`Await expression must be a call expression, received ${e.node.type}`,node:e.node,severity:"error"}),null;const o=e.get("callee");let s;if(!o.isIdentifier())return n.errors.push({message:`Await expression must call an identifier, received ${o.type}`,node:o.node,severity:"error"}),null;for(const e of a)if(l(o,e)){s=e;break}if(!s)return n.errors.push({message:`Await expression must call "callApi", "callHttp" or "callTool", received "${o.node.name}"`,node:o.node,severity:"error"}),null;const i=$[s],d=e.get("arguments"),u=d.length<i[0];if((u||!i.includes(d.length))&&(n.errors.push({message:`"${s}()" expects ${i.join(" or ")} arguments, but got ${d.length}`,node:e.node,severity:u?"error":"warning"}),u))return null;let c;const f=d[0];if("callHttp"===s){const e=b(f,n,t,r);if("string"!=typeof e)return n.errors.push({message:`"${s}()" expects a string value as the first argument, but got ${typeof e}`,node:f.node,severity:"error"}),null;c={api:e,http:!0}}else if("callApi"===s){if(!f.isStringLiteral())return n.errors.push({message:`"${s}()" expects a string literal as the first argument, but got ${f.type}`,node:f.node,severity:"error"}),null;c={api:f.node.value}}else{const e=b(f,n,t,r);if("string"!=typeof e)return n.errors.push({message:`"${s}()" expects a string value as the first argument, but got ${typeof e}`,node:f.node,severity:"error"}),null;const o=d[1],i=b(o,n,t,r);if("string"!=typeof i)return n.errors.push({message:`"${s}()" expects a string value as the second argument, but got ${typeof i}`,node:o.node,severity:"error"}),null;const a=d[2];let l;a&&(l=b(a,n,t,r)),c={api:s,tool:{conversationId:e,stepId:i},params:l}}if("callApi"===s||"callHttp"===s){const e=d[1];if(e&&!p(e)){e.isObjectExpression()||n.errors.push({message:`Data source "params" prefers an object literal, but got ${e.type}`,node:e.node,severity:"notice"});const o=b(e,n,t,r);m(o)||"object"==typeof o&&null!==o?c.params=o:n.errors.push({message:"API params expects an object or expression, but got "+typeof o,node:e.node,severity:"error"})}}if("callApi"===s){const e=d[2];if(e&&!p(e))if(e.isObjectExpression()){const t=e.get("properties");for(const e of t){if(!e.isObjectProperty()){n.errors.push({message:`"callApi()" third param "meta" expects object properties, but got ${e.type}`,node:e.node,severity:"error"});continue}const t=e.get("key");if(!t.isIdentifier()){n.errors.push({message:`"callApi()" third param "meta" property key must be an identifier, but got ${t.type}`,node:t.node,severity:"error"});continue}if("objectId"!==t.node.name){n.errors.push({message:`"callApi()" third param "meta" property key must be "objectId", but got "${t.node.name}"`,node:t.node,severity:"error"});continue}const r=e.get("value");if(!p(r)){if(!r.isStringLiteral()){n.errors.push({message:`"callApi()" third param "meta" property "${t.node.name}" expects a string literal, but got ${r.type}`,node:r.node,severity:"error"});continue}c.objectId=r.node.value}}}else n.errors.push({message:`"callApi()" third param "meta" expects an object literal, but got ${e.type}`,node:e.node,severity:"error"})}return c}function S(e,n,t,r,o){if(!e.isArrowFunctionExpression())return n.errors.push({message:`Event handler must be an arrow function expression, but got ${e.type}`,node:e.node,severity:"error"}),null;const s=e.get("params");if(s.length>1)return n.errors.push({message:`Event handler arrow function must have at most one parameter, but got ${s.length}`,node:e.node,severity:"error"}),null;const i=s[0],a={...r,modifier:void 0,eventBinding:void 0};if(i){if(!i.isIdentifier())return n.errors.push({message:`Event handler arrow function parameter must be an identifier, but got ${i.type}`,node:i.node,severity:"error"}),null;a.eventBinding={id:i.node,isCallback:o}}const d=k(e.get("body"),n,t,a);return d?[].concat(d):null}function k(e,n,t,r){if(e.isBlockStatement())return e.get("body").flatMap((e=>k(e,n,t,r))).filter((e=>null!==e));if(e.isIfStatement())return{action:"conditional",payload:{test:b(e.get("test"),n,t,r),consequent:k(e.get("consequent"),n,t,r),alternate:e.node.alternate?k(e.get("alternate"),n,t,r):null}};if(e.isExpressionStatement())return k(e.get("expression"),n,t,r);if(g(e)){const d=e.get("callee"),u=e.get("arguments");if(d.isIdentifier()){if(l(d,"showMessage"))return 1!==u.length?(n.errors.push({message:`"showMessage()" expects exactly 1 argument, but got ${u.length}`,node:e.node,severity:"error"}),null):{action:"show_message",payload:b(u[0],n,t,r)};if(l(d,"pushQuery"))return 1!==u.length&&2!==u.length?(n.errors.push({message:`"pushQuery()" expects 1 or 2 arguments, but got ${u.length}`,node:e.node,severity:"error"}),null):{action:"update_query",payload:{method:"push",args:u.map((e=>b(e,n,t,r)))}};for(const o of a)if(l(d,o)){const o=E(e,n,t,r);return o?(n.contracts.add(o.api),{action:"call_api",payload:o}):null}const s=d.scope.getBindingIdentifier(d.node.name);let i;var o;return s&&(i=null===(o=r.component)||void 0===o?void 0:o.bindingMap.get(s)),i?"setState"===i.kind?{action:"update_variable",payload:{name:i.id.name,value:void 0===u[0]?void 0:b(u[0],n,t,{...r,modifier:void 0})}}:(n.errors.push({message:`"${d.node.name}" is not callable`,node:d.node,severity:"error"}),null):(n.errors.push({message:`Function "${d.node.name}" is not defined`,node:d.node,severity:"error"}),null)}if(h(d)){if(d.node.computed)return n.errors.push({message:"Event handler call expression with computed member expression is not supported",node:d.node,severity:"error"}),null;const e=d.get("object");if(h(e)){const o=e.get("property");if(!e.node.computed&&o.isIdentifier()&&"current"===o.node.name){const o=e.get("object");if(o.isIdentifier()){var s;const e=o.scope.getBindingIdentifier(o.node.name);let a;var i;if(e&&(a=null===(i=r.component)||void 0===i?void 0:i.bindingMap.get(e)),!a)return n.errors.push({message:`Variable "${o.node.name}" is not defined`,node:o.node,severity:"error"}),null;if("ref"!==a.kind)return n.errors.push({message:`Variable "${o.node.name}" is not a ref, but a ${a.kind}`,node:o.node,severity:"error"}),null;const l=d.get("property");return l.isIdentifier()?{action:"call_ref",payload:{ref:a.id.name,method:l.node.name,args:u.map((e=>b(e,n,t,r))),scope:"template"===(null===(s=r.component)||void 0===s?void 0:s.type)?"template":"global"}}:(n.errors.push({message:"Event handler call expression with non-identifier property is not supported",node:l.node,severity:"error"}),null)}}}if(!e.isCallExpression())return n.errors.push({message:`Member expression in event handler expects a call expression as object, but got ${e.type}`,node:e.node,severity:"error"}),null;const o=e.get("callee");if(!o.isIdentifier())return n.errors.push({message:`Member expression in event handler expects an identifier as callee, but got ${o.type}`,node:o.node,severity:"error"}),null;const p=d.get("property");if(!p.isIdentifier())return n.errors.push({message:`Member expression in event handler expects an identifier as property, but got ${p.type}`,node:p.node,severity:"error"}),null;let c;for(const e of a)if(l(o,e)){c=e;break}if(c){if("then"!==p.node.name)return n.errors.push({message:`"${c}()" expects "then" as its method, but got ${p.node.name}`,node:p.node,severity:"error"}),null;if(1!==u.length)return n.errors.push({message:`"${c}().then()" expects exactly 1 argument, but got ${u.length}`,node:p.node,severity:"error"}),null;const o=E(e,n,t,r);if(!o)return null;n.contracts.add(o.api);const s=S(u[0],n,t,r,!0);return{action:"call_api",payload:o,callback:s?{success:s}:void 0}}return n.errors.push({message:`Unsupported action in event handler: ${o.node.name}`,node:o.node,severity:"error"}),null}}return n.errors.push({message:"Unsupported event handler",node:e.node,severity:"error"}),null}const w=[".js",".jsx",".ts",".tsx"];function I(e,n,t){if(e.startsWith("/"))return T(e,t);if(e.startsWith("./")||e.startsWith("../")){const r=n.substring(0,n.lastIndexOf("/")),o=r?r.split("/"):[""],s=e.split("/");for(const e of s)"."!==e&&(".."===e?o.length>0&&o.pop():o.push(e));return T(o.join("/"),t)}return e}function T(e,n){if(n.some((n=>n.filePath===e)))return e;for(const t of w)if(n.some((n=>n.filePath===`${e}${t}`)))return`${e}${t}`;return e}function j(e,n,t,r){var o;if(!e.isReferencedIdentifier())return null;const s=e.node.name,i=e.scope.getBinding(s);if(!i)return null;if(null!==(o=r.componentBindings)&&void 0!==o&&o.has(i.identifier))return{type:"local",name:s};if("module"===i.kind){if(i.path.isImportSpecifier()&&i.path.parentPath.isImportDeclaration()){const e=i.path.get("imported");if(!e.isIdentifier())return n.errors.push({message:`Unsupported import specifier type: ${e.type}`,node:e.node,severity:"error"}),null;const r=i.path.parentPath.get("source");return{type:"imported",name:e.node.name,importSource:I(r.node.value,n.filePath,t.files)}}if(i.path.isImportDefaultSpecifier()&&i.path.parentPath.isImportDeclaration())return{type:"imported",importSource:I(i.path.parentPath.get("source").node.value,n.filePath,t.files)}}return n.errors.push({message:`Unsupported component binding for "${s}"`,node:i.identifier,severity:"error"}),null}function P(e,n,t){var r,o;if(!e.isJSXExpressionContainer())return void n.errors.push({message:`The "ref" attribute in component expects a JSXExpressionContainer, but got ${null===(r=e.node)||void 0===r?void 0:r.type}`,node:null!==(o=e.node)&&void 0!==o?o:e.parent,severity:"error"});const s=e.get("expression");if(!s.isIdentifier())return void n.errors.push({message:`The "ref" attribute in component expects an identifier, but got ${s.node.type}`,node:s.node,severity:"error"});const i=s.node.name,a=s.scope.getBindingIdentifier(i);let d;var l;if(a&&(d=null===(l=t.component)||void 0===l?void 0:l.bindingMap.get(a)),d){if("ref"===d.kind)return d.id.name;n.errors.push({message:`The variable "${i}" is not a ref, but a ${d.kind}`,node:e.node,severity:"error"})}else n.errors.push({message:`The ref "${i}" is not defined`,node:e.node,severity:"error"})}function A(e){return e.slice(2).replace(/([a-z])([A-Z])/g,"$1.$2").toLowerCase()}function C(e,n,t,r){if(e.isJSXFragment())return e.get("children").flatMap((e=>C(e,n,t,r)));if(e.isJSXText())return e.node.value.trim()?{type:"text",text:e.node.value}:null;if(e.isJSXExpressionContainer())return C(e.get("expression"),n,t,r);if(e.isJSXEmptyExpression())return null;if(e.isJSXElement())return function(e,n,t,r){const s=e.get("openingElement"),i=s.get("name");if(!i.isJSXIdentifier())return n.errors.push({message:`Unsupported JSX element name type: ${i.type}`,node:i.node,severity:"error"}),null;if(l(i,"Fragment")){for(const e of s.node.attributes)o.isJSXAttribute(e)&&o.isJSXIdentifier(e.name)&&"key"===e.name.name||n.errors.push({message:"Invalid attribute for Fragment",node:e,severity:"error"});return e.get("children").flatMap((e=>C(e,n,t,r)))}const a=j(i,n,t,r),d={};let u,p;const c=l(i,"Route");for(const e of s.get("attributes")){if(e.isJSXSpreadAttribute()){n.errors.push({message:"Spread attributes are not supported in component",node:e.node,severity:"error"});continue}const o=e.get("name");if(!o.isJSXIdentifier()){n.errors.push({message:`Expected JSXIdentifier, but got ${o.node.type}`,node:o.node,severity:"error"});continue}const s=o.node.name;if("key"===s)continue;const i=e.get("value");if(c)if("component"===s){if(!i.isJSXExpressionContainer()){var f,m;n.errors.push({message:`The "component" attribute in Route expects a JSXExpressionContainer, but got ${null===(f=i.node)||void 0===f?void 0:f.type}`,node:null!==(m=i.node)&&void 0!==m?m:i.parent,severity:"error"});continue}const e=i.get("expression");if(!e.isIdentifier()){n.errors.push({message:`The "component" attribute in Route expects an identifier, but got ${e.node.type}`,node:e.node,severity:"error"});continue}const o=j(e,n,t,r);if(!o){n.errors.push({message:`The component "${e.node.name}" is not defined`,node:e.node,severity:"error"});continue}d.component={name:e.node.name,reference:o}}else if("path"===s){if(!i.isStringLiteral()){var g,h;n.errors.push({message:`The "path" attribute in Route expects a string literal, but got ${null===(g=i.node)||void 0===g?void 0:g.type}`,node:null!==(h=i.node)&&void 0!==h?h:i.parent,severity:"error"});continue}d.path=i.node.value}else n.errors.push({message:`Unsupported attribute "${s}" in Route`,node:o.node,severity:"error"});else if("ref"!==s)if(/^on[A-Z]/.test(s)){if(!i.isJSXExpressionContainer()){var y,v;n.errors.push({message:`Event handler "${s}" expects a JSXExpressionContainer, but got ${null===(y=i.node)||void 0===y?void 0:y.type}`,node:null!==(v=i.node)&&void 0!==v?v:i.parent,severity:"error"});continue}const e=i.get("expression");if(e.isJSXEmptyExpression()){n.errors.push({message:"Empty expression in events is not allowed",node:e.node,severity:"warning"});continue}let o=null;if(e.isIdentifier()){const n=e.scope.getBindingIdentifier(e.node.name);if(n){var b;const e=null===(b=r.component)||void 0===b?void 0:b.bindingMap.get(n);e&&"eventHandler"===e.kind&&(o=[{action:"dispatch_event",payload:{type:A(e.id.name),detail:"<% EVENT.detail %>"}}])}}o||(o=S(e,n,t,r)),o&&(null!=u||(u={}),u[A(s)]=o)}else if(null==i.node)d[s]=!0;else if(i.isStringLiteral())d[s]=i.node.value;else if(i.isJSXExpressionContainer()){const e=i.get("expression");e.isJSXEmptyExpression()?n.errors.push({message:`Empty expression in JSX attribute "${s}" is not allowed`,node:e.node,severity:"warning"}):d[s]=x(e,n,t,{...r,allowUseBrick:!0,modifier:"="})}else n.errors.push({message:`Unsupported attribute value type in component: ${i.node.type}`,node:i.node,severity:"error"});else p=P(i,n,r)}const{textContent:$,children:E}=O(e.get("children"),n,t,r);return $&&(d.textContent=$),{type:"component",component:{name:i.node.name,reference:a,properties:d,ref:p,events:u,children:E}}}(e,n,t,r);if(g(e)){const o=e.get("callee");if(h(o)){const s=o.get("property");if(s.isIdentifier()&&"map"===s.node.name){const s=e.get("arguments");if(s.length>0){const e=s[0];if(e.isArrowFunctionExpression()){const s=e.get("body");if(s.isExpression()&&B(s.node)){const s=o.get("object");if(!u(s.node,n))return null;const i=e.get("params");if(i.length>2)return n.errors.push({message:`Array map function with JSX elements must have at most two parameters, but got ${i.length}`,node:i[2].node,severity:"error"}),null;const a=i.find((e=>!e.isIdentifier()));if(a)return n.errors.push({message:`Array map function with JSX elements must have identifier parameters, but got ${a.type}`,node:a.node,severity:"error"}),null;const d={...r,forEachBinding:void 0};if(i.length>0){const[e,n]=i;d.forEachBinding={item:e.node,index:null==n?void 0:n.node}}return{type:"component",component:{name:"ForEach",properties:{dataSource:x(s,n,t,{...r,modifier:"="})},children:D(e.get("body"),n,t,d)}}}}}}}}else if(e.isConditionalExpression()){const o=e.get("test"),s=e.get("consequent"),i=e.get("alternate");if(B(s.node)||B(i.node))return u(o.node,n)?{type:"component",component:{name:"If",properties:{dataSource:x(o,n,t,{...r,modifier:"="})},children:[...D(s,n,t,r),...D(i,n,t,r).map((e=>({...e,slot:"else"})))]}}:null}else if(e.isLogicalExpression()){const o=e.get("left"),s=e.get("right"),i=e.node.operator;if(("&&"===i||"||"===i)&&B(s.node)){if(!u(o.node,n))return null;const e=D(s,n,t,r);return{type:"component",component:{name:"If",properties:{dataSource:x(o,n,t,{...r,modifier:"="})},children:"&&"===i?e:e.map((e=>({...e,slot:"else"})))}}}}return e.isExpression()?u(e.node,n)?{type:"expression",expression:e}:null:(n.errors.push({message:`Unsupported node type in JSX children: ${e.type}`,node:e.node,severity:"error"}),null)}function B(e){let n=!1;return o.traverse(e,{enter(e){n||!o.isJSXElement(e)&&!o.isJSXFragment(e)||(n=!0)}}),n}function O(e,n,t,r){let o=e.flatMap((e=>C(e,n,t,r))),s=o.every((e=>"text"===(null==e?void 0:e.type)));if(!s){let e=null;const n=[];for(const t of o){if(null===t);else if("text"===t.type||"expression"===t.type){var i,a,d;if("text"===(null===(i=e)||void 0===i?void 0:i.type)||"expression"===(null===(a=e)||void 0===a?void 0:a.type)){e={type:"merged",children:[e,t]},n.splice(n.length-1,1,e);continue}if("merged"===(null===(d=e)||void 0===d?void 0:d.type)){e.children.push(t);continue}}e=t,n.push(t)}o=n,s=o.every((e=>"text"===(null==e?void 0:e.type)||"merged"===(null==e?void 0:e.type)&&e.children.every((e=>"text"===e.type))))}return s?{textContent:o.flatMap((e=>"text"===e.type?e.text:e.children.map((e=>e.text)))).join("").trim()}:o.every((e=>!!e&&"component"!==e.type))?{textContent:X(o.flatMap((e=>"merged"===e.type?e.children:e)),n,r)}:{children:o.filter((e=>!!e)).map((e=>"component"===e.type?e.component:{name:"Plaintext",properties:{textContent:"text"===e.type?e.text:"expression"===e.type?y(e.expression,n,{...r,modifier:"="}):X(e.children,n,r)}}))}}function X(e,n,t){return n.usedHelpers.add("_helper_mergeTexts"),`<%= FN._helper_mergeTexts(${e.map((e=>"text"===e.type?JSON.stringify(e):`{type:"expression",value:(${y(e.expression,n,t,!0)})}`)).join(", ")}) %>`}function D(e,n,t,r){const{textContent:o,children:s}=O([e],n,t,r);return null!=s?s:[{name:"Plaintext",properties:{textContent:o}}]}function J(e){var n,t;const r=null===(n=e.children)||void 0===n?void 0:n.find((e=>{return t="View",function(e){return!e.reference||"imported"===e.reference.type&&e.reference.importSource===i}(n=e)&&(n.reference?n.reference.name===t:n.name===t);var n,t})),o=null==r||null===(t=r.properties)||void 0===t?void 0:t.title;if("string"==typeof o&&!m(o))return o}const M=s.default;function R(e,n,t,r,o,s,i,a){const d=E(e,n,t,r);if(!d)return null;n.contracts.add(d.api);const l={name:o,config:s,...d};if(i){var u;if(i.length>("catch"===a?1:2))return n.errors.push({message:`".${a}()" expects no more than 2 arguments, but got ${i.length}`,node:null===(u=i[1])||void 0===u?void 0:u.node,severity:"error"}),null;if(i.length>0){const e=U(i[0],n,r);e&&(l["catch"===a?"rejectTransform":"transform"]=e)}if("catch"!==a&&i.length>1){const e=U(i[1],n,r);e&&(l.rejectTransform=e)}}return l}function U(e,n,t){if(!e.isArrowFunctionExpression())return n.errors.push({message:`".then()" callback expects an arrow function, but got ${e.type}`,node:e.node,severity:"error"}),null;const r=e.get("body");if(!r.isExpression())return n.errors.push({message:`".then()" callback function body expects an expression, but got ${r.type}`,node:r.node,severity:"error"}),null;const o=e.get("params");var s,i;if(o.length>1)return n.errors.push({message:`".then()" callback function expects exactly 0 or 1 parameter, but got ${o.length}`,node:null!==(s=null===(i=o[1])||void 0===i?void 0:i.node)&&void 0!==s?s:e,severity:"error"}),null;const a={...t,dataBinding:void 0},d=o[0];if(o.length>0){if(!d.isIdentifier())return n.errors.push({message:`".then()" callback function parameter expects an identifier, but got ${d.type}`,node:d.node,severity:"error"}),null;a.dataBinding={id:d.node}}return y(r,n,a)}function F(e,n,t,r,o){const s=e.get("id");if(!s.isArrayPattern())return null;const i=s.get("elements");if(1!==i.length&&2!==i.length)return null;const a=i[0];if(!a.isIdentifier())return null;if(1!==n.length&&2!==n.length)return null;const l=n[0];if(!l.isArrowFunctionExpression())return null;if(!d(l.node,t))return null;const u=l.get("body");if(u.isBlockStatement())return null;if(!u.isCallExpression())return null;const p=u.get("callee");if(!p.isIdentifier()&&!p.isMemberExpression())return null;const c=n[1];let f;if(c){if(!c.isObjectExpression())return t.errors.push({message:`"useResource()" second argument must be an object expression, but got ${c.type}`,node:c.node,severity:"error"}),null;for(const e of c.get("properties")){if(!e.isObjectProperty())return t.errors.push({message:`Unsupported property type in "useResource()" second argument: ${e.type}`,node:e.node,severity:"error"}),null;const n=e.get("key");if(!n.isIdentifier())return t.errors.push({message:`"useResource()" second argument property key must be an identifier, but got ${n.type}`,node:n.node,severity:"error"}),null;if(e.node.computed)return t.errors.push({message:'"useResource()" second argument property key cannot be computed',node:n.node,severity:"error"}),null;if("enabled"!==n.node.name&&"fallback"!==n.node.name)return t.errors.push({message:`"useResource()" second argument property key must be "enabled" or "fallback", but got "${n.node.name}"`,node:n.node,severity:"error"}),null;null!=f||(f={}),f[n.node.name]=b(e.get("value"),t,r,o)}}let m=null;if(p.isMemberExpression()){const e=p.get("property");if(!e.isIdentifier()||p.node.computed||"then"!==e.node.name&&"catch"!==e.node.name)return t.errors.push({message:"Unexpected awaited expression",node:e.node,severity:"error"}),null;m=R(p.get("object"),t,r,o,a.node.name,f,u.get("arguments"),e.node.name)}else m=R(u,t,r,o,a.node.name,f);return m?{id:a.node,kind:"resource",resource:m}:null}function N(e,n,t,r,o){if(!d(e.node,n))return null;const s=new Map,i={bindingMap:s,type:r,id:e.node.id},a={...o,component:i},p=e.get("params");if("template"===r){if(p.length>1)return n.errors.push({message:`Component function can only have zero or one parameter, received ${p.length}`,node:e.node,severity:"error"}),null;if(p.length>0){const e=p[0];if(!e.isObjectPattern())return n.errors.push({message:`Component function parameter must be an object pattern, received ${e.type}`,node:e.node,severity:"error"}),null;for(const r of e.get("properties")){if(r.isRestElement())return n.errors.push({message:"Component function parameter rest element is not allowed",node:r.node,severity:"error"}),null;const e=r.node;if(e.computed||!e.shorthand)return n.errors.push({message:"Component function parameter properties must be shorthand and not computed",node:r.node,severity:"error"}),null;const o=r.get("key"),i=r.get("value");if(!o.isIdentifier())return n.errors.push({message:`Component function parameter property key must be an identifier, received ${o.type}`,node:o.node,severity:"error"}),null;const d=o.node.name;if(/^on[A-Z]/.test(d)){if(!i.isIdentifier())return n.errors.push({message:`Event handler parameter "${d}" must be an identifier, received ${i.type}`,node:i.node,severity:"error"}),null;s.set(i.node,{id:i.node,kind:"eventHandler"})}else{let e,r;if(i.isAssignmentPattern()){const o=i.get("left");o.isIdentifier()&&(e=o.node,r=b(i.get("right"),n,t,a))}else i.isIdentifier()&&(e=i.node);if(!e){n.errors.push({message:`Component function parameter property value must be an identifier or assignment pattern, received ${i.type}`,node:i.node,severity:"error"});continue}const o={id:e,kind:"param",initialValue:r};s.set(e,o)}}}}else if(p.length>0)return n.errors.push({message:`Page function cannot have parameters, received ${p.length}`,node:p[0].node,severity:"error"}),null;let c,f=i;const m=e.get("body").get("body");for(const e of m)if(e.isVariableDeclaration()){if("const"!==e.node.kind){n.errors.push({message:`Only "const" variable declaration is allowed, received "${e.node.kind}"`,node:e.node,severity:"error"});continue}for(const r of e.get("declarations")){const e=r.get("init");if(e.isCallExpression()){const o=e.get("callee");if(o.isIdentifier()){const i=e.get("arguments");if(l(o,"useState")){const e=r.get("id");if(!e.isArrayPattern())continue;const o=e.get("elements");if(2!==o.length){n.errors.push({message:`useState() destructuring must have exactly two elements, received ${o.length}`,node:e.node,severity:"error"});continue}const d=o[0],l=o[1];if(!d.isIdentifier()||!l.isIdentifier()){n.errors.push({message:`useState() destructuring must have identifiers as elements, received ${o.map((e=>e.type)).join(", ")}`,node:e.node,severity:"error"});continue}const u={id:d.node,kind:"state"};s.set(d.node,u),s.set(l.node,{id:d.node,kind:"setState"}),i.length>0&&(u.initialValue=b(i[0],n,t,a)),i.length>1&&n.errors.push({message:`useState() only accepts at most one argument, received ${i.length}`,node:i[1].node,severity:"warning"});continue}if(l(o,"useResource")){const e=F(r,i,n,t,a);e&&s.set(e.id,e);continue}if(l(o,"useRef")){const e=r.get("id");if(!e.isIdentifier()){n.errors.push({message:`useRef() must be assigned to an identifier, received ${e.type}`,node:e.node,severity:"error"});continue}i.length>1&&n.errors.push({message:`useRef() only accepts at most one argument, received ${i.length}`,node:i[1].node,severity:"warning"});const t=i[0];t&&!t.isNullLiteral()&&n.errors.push({message:`useRef() first argument must be null, received ${t.type}`,node:t.node,severity:"warning"}),s.set(e.node,{id:e.node,kind:"ref"});continue}if(l(o,"useQuery")){const e=r.get("id");if(!e.isIdentifier()){n.errors.push({message:`useQuery() must be assigned to an identifier, received ${e.type}`,node:e.node,severity:"error"});continue}i.length>0&&n.errors.push({message:`useQuery() does not accept any arguments, received ${i.length}`,node:i[0].node,severity:"warning"}),s.set(e.node,{id:e.node,kind:"query"});continue}}}const o=r.get("id");if(!o.isIdentifier()){n.errors.push({message:`Expect an identifier as the variable name, received ${o.type}`,node:o.node,severity:"error"});continue}const i={id:o.node,kind:"constant"};s.set(o.node,i),e.node&&(i.initialValue=b(e,n,t,a))}}else{if(e.isReturnStatement()){const r=L(e,n,t,a);var g,h;r&&(null!==(h=(g=f).children)&&void 0!==h||(g.children=[]),f.children.push(...c?r.map((e=>({...e,slot:c}))):r));break}if(e.isIfStatement()){var y,v;const r=e.get("test");if(!u(r.node,n))return null;const o=e.get("consequent"),s=e.get("alternate"),i=_(o,n,t,a),d=s?_(s,n,t,a):null;null!==(v=(y=f).children)&&void 0!==v||(y.children=[]);const l={name:"If",properties:{dataSource:x(r,n,t,{...a,modifier:"="})},children:[...null!=i?i:[],...(null!=d?d:[]).map((e=>({...e,slot:"else"})))],slot:c};if(f.children.push(l),f=l,i&&(c="else",d))break}else e.isTSInterfaceDeclaration()||e.isTSTypeAliasDeclaration()||n.errors.push({message:`Unsupported top level statement type: ${e.type}`,node:e.node,severity:"error"})}return i}function L(e,n,t,r){const o=e.get("argument");return o.node?D(o,n,t,r):(n.errors.push({message:"Return statement in component function must have an argument",node:e,severity:"error"}),null)}function _(e,n,t,r){if(e.isBlockStatement()){const o=e.get("body");if(0===o.length)return n.errors.push({message:"If statement block must contain a return statement",node:e.node,severity:"error"}),null;let s=null;for(const e of o){const o=_(e,n,t,r);o&&(s=o)}return s}return e.isReturnStatement()?L(e,n,t,r):(n.errors.push({message:`Only return statement is allowed in if statement, but received: ${e.type}`,node:e.node,severity:"error"}),null)}function V(e,n,t){if(!d(e.node,n))return null;const r=[];e.traverse({Identifier(n){if(!n.isReferencedIdentifier())return;const o=n.parentPath.isObjectProperty()&&n.parentPath.node.shorthand,s=n.scope.getBindingIdentifier(n.node.name);var i;s&&s!==e.node.id&&null!==(i=t.functionBindings)&&void 0!==i&&i.has(s)&&r.push({type:"id",start:n.node.start,end:n.node.end,replacement:`FN.${s.name}`,shorthand:o?n.node.name:void 0})}}),r.sort(((e,n)=>e.start-n.start));const o=[];let s=e.node.start;for(const e of r)o.push(n.source.substring(s,e.start),`${e.shorthand?`${e.shorthand}:`:""}${e.replacement}`),s=e.end;return o.push(n.source.substring(s,e.node.end)),{name:e.node.id.name,source:o.join(""),typescript:!0}}const H=s.default;var q=function(e){return e.TopLevelStatement="top level statement",e.NamedExportDeclaration="named export declaration",e.DefaultExportDeclaration="default export declaration",e}(q||{});function W(e){return e.name[0]>="A"&&e.name[0]<="Z"}function Q(e,n,t,o){var s;const i=n.files.find((n=>n.filePath===e));if(!i)throw new Error(`File not found: ${e}`);if(n.modules.has(e))return;n.modules.set(e,null),t||(t=(0,r.parse)(i.content,{plugins:["jsx","typescript"],sourceType:"module",errorRecovery:!0}));const a=!n.entry,d=a?"entry":i.filePath.startsWith("/Pages/")?"page":i.filePath.startsWith("/Components/")?"template":"unknown",u={source:i.content,filePath:e,moduleType:d,defaultExport:null,namedExports:new Map,internals:[],errors:[],contracts:new Set,usedHelpers:new Set};if(null!==(s=t.errors)&&void 0!==s&&s.length)for(const e of t.errors)u.errors.push({message:`${e.code}: ${e.reasonCode}`,node:null,severity:"error"});a&&(n.entry=u),n.modules.set(e,u),function(e,n,t,r){const o=new Set,s=new Set,i={functionBindings:o,componentBindings:s,contextBindings:null==r?void 0:r.withContexts};H(t,{Program(t){const a=t.get("body"),d=[];let u=null,p=null;const c=[],f=(t,r)=>{if(t.isFunctionDeclaration()){const i=t.node.id;if(i&&(W(i)?s.add(i):o.add(i)),r===q.DefaultExportDeclaration)return void("app"===n.appType&&"entry"===e.moduleType?e.errors.push({message:"The entry module in an app cannot have a default export declaration.",node:t.node,severity:"error"}):u=t);if(!i)return void e.errors.push({message:"Function declaration must have a name",node:t.node,severity:"error"});r===q.NamedExportDeclaration?d.push({func:t,exported:!0}):d.push({func:t})}else if(t.isExportDefaultDeclaration()){const e=t.get("declaration");f(e,q.DefaultExportDeclaration)}else if(t.isExportNamedDeclaration()){const e=t.get("declaration");f(e,q.NamedExportDeclaration)}else if(t.isImportDeclaration()){const e=t.node.source.value;(e.startsWith(".")||e.startsWith("/"))&&c.push(e)}else t.isTSInterfaceDeclaration||t.isTSTypeAliasDeclaration()||e.errors.push({message:`Unsupported ${r} type: ${t.type}`,node:t.node,severity:"error"})};for(const t of a){if("app"===n.appType&&e===n.entry&&t.isExpressionStatement()){const n=t.get("expression");if(n.isCallExpression()){const t=n.get("callee");if(t.isIdentifier()&&l(t,"render")){const t=n.get("arguments");if(1!==t.length){e.errors.push({message:`render() expects exactly one argument, received: ${t.length}`,node:n.node,severity:"error"});continue}p=t[0];continue}}}f(t,q.TopLevelStatement)}for(const t of c)Q(I(t,e.filePath,n.files),n,void 0,r);for(const{func:t,exported:r}of d){const o=t.node.id;if(W(o)){const s="app"===n.appType&&"entry"===e.moduleType?"page":"template",a=N(t,e,n,s,i);if(a){const n={type:s,component:a};r?e.namedExports.set(o.name,n):e.internals.push(n)}}else{const n=V(t,e,i);if(n){const t={type:"function",function:n};r?e.namedExports.set(o.name,t):e.internals.push(t)}}}if(u){const t="entry"===e.moduleType?"template"===n.appType?"template":"view":"page"===e.moduleType?"page":"template",r=N(u,e,n,t,i);r&&(e.defaultExport={type:t,component:r,..."view"===t?{title:J(r)}:{}})}if(p){const t=D(p,e,n,i);e.render={type:"render",children:t}}t.stop()}})}(u,n,t,o)}(0,t(7695).p)(class{parseView(e,n){return function(e,n){var t;const s={appType:"view",modules:new Map,files:[{filePath:"/View.tsx",content:e},...null!==(t=null==n?void 0:n.libs)&&void 0!==t?t:[]],errors:[]};let i;try{i=(0,r.parse)(e,{plugins:["jsx","typescript"],sourceType:"module",errorRecovery:!0})}catch(e){return s.errors.push({message:`Failed to parse TSX: ${e}`,node:null,severity:"fatal"}),s}for(const e of i.program.body)if(o.isExportDefaultDeclaration(e)){if(o.isFunctionDeclaration(e.declaration))return Q("/View.tsx",s,i,n),s;break}return function(e,n,t,r){var o;const s=[];if(null!==(o=t.errors)&&void 0!==o&&o.length)for(const e of t.errors)s.push({message:`${e.code}: ${e.reasonCode}`,node:null,severity:"error"});const i=new Map,a={type:"view",bindingMap:i},d={component:a,contextBindings:null==r?void 0:r.withContexts},l={source:n.files.find((n=>n.filePath===e)).content,filePath:e,moduleType:"entry",defaultExport:{type:"view",component:a},internals:[],namedExports:new Map,errors:s,contracts:new Set,usedHelpers:new Set};M(t,{Program(e){const t=e.get("body");let r=!1;for(const e of t)if(e.isVariableDeclaration()){if(r){s.push({message:"Unexpected variable declaration after export",node:e.node,severity:"error"});continue}if("const"!==e.node.kind){s.push({message:`Only "const" variable declaration is allowed, received: ${e.node.kind}`,node:e.node,severity:"error"});continue}for(const t of e.get("declarations")){const e=t.get("id");if(!e.isIdentifier()){s.push({message:`Unsupported variable declaration pattern, expected: Identifier, received: ${e.type}`,node:e.node,severity:"error"});continue}const r={id:e.node,kind:"constant"},o=t.get("init");o.node&&(r.initialValue=b(o,l,n,d)),i.set(e.node,r)}}else if(e.isExportDefaultDeclaration()){r=!0;const t=e.get("declaration");t.isJSXElement()?a.children=D(t,l,n,d):s.push({message:`Default export must be a JSX element, received: ${t.type}`,node:e.node,severity:"error"});break}e.stop()}}),l.defaultExport.title=J(a),n.modules.set(e,l),n.entry=l}("/View.tsx",s,i,n),s}(e,n)}parseApp(e){return function(e){const n={appType:"app",modules:new Map,files:e,errors:[]};return Q("/index.tsx",n),n}(e)}})}},x={};function $(e){var n=x[e];if(void 0!==n)return n.exports;var t=x[e]={exports:{}};return b[e].call(t.exports,t,t.exports,$),t.exports}$.m=b,$.c=x,$.x=()=>{var e=$.O(void 0,[8135,3735,580],(()=>$(7131)));return $.O(e)},e=[],$.O=(n,t,r,o)=>{if(!t){var s=1/0;for(l=0;l<e.length;l++){for(var[t,r,o]=e[l],i=!0,a=0;a<t.length;a++)(!1&o||s>=o)&&Object.keys($.O).every((e=>$.O[e](t[a])))?t.splice(a--,1):(i=!1,o<s&&(s=o));if(i){e.splice(l--,1);var d=r();void 0!==d&&(n=d)}}return n}o=o||0;for(var l=e.length;l>0&&e[l-1][2]>o;l--)e[l]=e[l-1];e[l]=[t,r,o]},$.d=(e,n)=>{for(var t in n)$.o(n,t)&&!$.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},$.f={},$.e=e=>Promise.all(Object.keys($.f).reduce(((n,t)=>($.f[t](e,n),n)),[])),$.u=e=>"chunks/"+e+"."+{3735:"6be3dc55",6773:"87d0ae93",8135:"e17b904e"}[e]+".js",$.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),$.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{$.S={};var e={},n={};$.I=(t,r)=>{r||(r=[]);var o=n[t];if(o||(o=n[t]={}),!(r.indexOf(o)>=0)){if(r.push(o),e[t])return e[t];$.o($.S,t)||($.S[t]={}),$.S[t];var s=[];return e[t]=s.length?Promise.all(s).then((()=>e[t]=1)):1}}})(),(()=>{var e;$.g.importScripts&&(e=$.g.location+"");var n=$.g.document;if(!e&&n&&(n.currentScript&&"SCRIPT"===n.currentScript.tagName.toUpperCase()&&(e=n.currentScript.src),!e)){var t=n.getElementsByTagName("script");if(t.length)for(var r=t.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=t[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),$.p=e+"../"})(),n=e=>{var n=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),r=t[1]?n(t[1]):[];return t[2]&&(r.length++,r.push.apply(r,n(t[2]))),t[3]&&(r.push([]),r.push.apply(r,n(t[3]))),r},t=(e,t)=>{e=n(e),t=n(t);for(var r=0;;){if(r>=e.length)return r<t.length&&"u"!=(typeof t[r])[0];var o=e[r],s=(typeof o)[0];if(r>=t.length)return"u"==s;var i=t[r],a=(typeof i)[0];if(s!=a)return"o"==s&&"n"==a||"s"==a||"u"==s;if("o"!=s&&"u"!=s&&o!=i)return o<i;r++}},r=e=>{var n=e[0],t="";if(1===e.length)return"*";if(n+.5){t+=0==n?">=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var o=1,s=1;s<e.length;s++)o--,t+="u"==(typeof(a=e[s]))[0]?"-":(o>0?".":"")+(o=2,a);return t}var i=[];for(s=1;s<e.length;s++){var a=e[s];i.push(0===a?"not("+d()+")":1===a?"("+d()+" || "+d()+")":2===a?i.pop()+" "+i.pop():r(a))}return d();function d(){return i.pop().replace(/^\((.+)\)$/,"$1")}},o=(e,t)=>{if(0 in e){t=n(t);var r=e[0],s=r<0;s&&(r=-r-1);for(var i=0,a=1,d=!0;;a++,i++){var l,u,p=a<e.length?(typeof e[a])[0]:"";if(i>=t.length||"o"==(u=(typeof(l=t[i]))[0]))return!d||("u"==p?a>r&&!s:""==p!=s);if("u"==u){if(!d||"u"!=p)return!1}else if(d)if(p==u)if(a<=r){if(l!=e[a])return!1}else{if(s?l>e[a]:l<e[a])return!1;l!=e[a]&&(d=!1)}else if("s"!=p&&"n"!=p){if(s||a<=r)return!1;d=!1,a--}else{if(a<=r||u<p!=s)return!1;d=!1}else"s"!=p&&"n"!=p&&(d=!1,a--)}}var c=[],f=c.pop.bind(c);for(i=1;i<e.length;i++){var m=e[i];c.push(1==m?f()|f():2==m?f()&f():m?o(m,t):!f())}return!!f()},s=(e,n)=>e&&$.o(e,n),i=e=>(e.loaded=1,e.get()),a=e=>Object.keys(e).reduce(((n,t)=>(e[t].eager&&(n[t]=e[t]),n)),{}),d=(e,n,r)=>{var o=r?a(e[n]):e[n];return Object.keys(o).reduce(((e,n)=>!e||!o[e].loaded&&t(e,n)?n:e),0)},l=(e,n,t,o)=>"Unsatisfied version "+t+" from "+(t&&e[n][t].from)+" of shared singleton module "+n+" (required "+r(o)+")",u=e=>{throw new Error(e)},p=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},c=(e,n,t)=>t?t():((e,n)=>u("Shared module "+n+" doesn't exist in shared scope "+e))(e,n),f=(e=>function(n,t,r,o,s){var i=$.I(n);return i&&i.then&&!r?i.then(e.bind(e,n,$.S[n],t,!1,o,s)):e(n,$.S[n],t,r,o,s)})(((e,n,t,r,a,u)=>{if(!s(n,t))return c(e,t,u);var f=d(n,t,r);return o(a,f)||p(l(n,t,f,a)),i(n[t][f])})),m={},g={580:()=>f("default","@babel/parser",!1,[0],(()=>$.e(6773).then((()=>()=>$(6773)))))},h={580:[580]},y={},$.f.consumes=(e,n)=>{$.o(h,e)&&h[e].forEach((e=>{if($.o(m,e))return n.push(m[e]);if(!y[e]){var t=n=>{m[e]=0,$.m[e]=t=>{delete $.c[e],t.exports=n()}};y[e]=!0;var r=n=>{delete m[e],$.m[e]=t=>{throw delete $.c[e],n}};try{var o=g[e]();o.then?n.push(m[e]=o.then(t).catch(r)):t(o)}catch(e){r(e)}}}))},(()=>{var e={7131:1};$.f.i=(n,t)=>{e[n]||580!=n&&importScripts($.p+$.u(n))};var n=globalThis.webpackChunk_next_bricks_vb_experiment=globalThis.webpackChunk_next_bricks_vb_experiment||[],t=n.push.bind(n);n.push=n=>{var[r,o,s]=n;for(var i in o)$.o(o,i)&&($.m[i]=o[i]);for(s&&s($);r.length;)e[r.pop()]=1;t(n)}})(),v=$.x,$.x=()=>Promise.all([8135,3735,580].map($.e,$)).then(v),$.x()})();
|
|
2
|
+
//# sourceMappingURL=7131.ed1c7310.js.map
|