assistsx-js 0.1.41 → 0.2.0

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.
Files changed (104) hide show
  1. package/README.md +32 -0
  2. package/dist/index.cjs +7957 -0
  3. package/dist/index.cjs.map +1 -0
  4. package/dist/index.d.mts +4231 -0
  5. package/dist/index.d.ts +4231 -30
  6. package/dist/index.global.js +46 -0
  7. package/dist/index.global.js.map +1 -0
  8. package/dist/index.js +7879 -30
  9. package/dist/index.js.map +1 -0
  10. package/package.json +11 -5
  11. package/src/{AssistsXAsync.ts → assistsx-async.ts} +8 -8
  12. package/src/{AssistsX.ts → assistsx.ts} +8 -8
  13. package/src/barutils/bar-utils.ts +3 -3
  14. package/src/filesystem/fileio/file-io.ts +2 -2
  15. package/src/filesystem/fileutils/file-utils.ts +2 -2
  16. package/src/filesystem/path.ts +2 -2
  17. package/src/floatingwindow/float.ts +4 -4
  18. package/src/gallery/gallery.ts +2 -2
  19. package/src/global.d.ts +6 -1
  20. package/src/imageutils/image-utils.ts +2 -2
  21. package/src/ime/ime.ts +2 -2
  22. package/src/index.ts +21 -20
  23. package/src/log/log-call-method.ts +28 -0
  24. package/src/log/log.ts +445 -0
  25. package/src/mlkit/mlkit.ts +3 -3
  26. package/src/network/http.ts +2 -2
  27. package/src/{NodeAsync.ts → node-async.ts} +5 -5
  28. package/src/{Node.ts → node.ts} +5 -5
  29. package/src/{StepAsync.ts → step-async.ts} +8 -8
  30. package/src/{Step.ts → step.ts} +7 -7
  31. package/dist/AccessibilityEventFilter.d.ts +0 -105
  32. package/dist/AccessibilityEventFilter.js +0 -89
  33. package/dist/AppInfo.d.ts +0 -45
  34. package/dist/AppInfo.js +0 -38
  35. package/dist/AssistsX.d.ts +0 -484
  36. package/dist/AssistsX.js +0 -828
  37. package/dist/AssistsXAsync.d.ts +0 -532
  38. package/dist/AssistsXAsync.js +0 -874
  39. package/dist/Bounds.d.ts +0 -48
  40. package/dist/Bounds.js +0 -68
  41. package/dist/CallMethod.d.ts +0 -69
  42. package/dist/CallMethod.js +0 -71
  43. package/dist/CallResponse.d.ts +0 -10
  44. package/dist/CallResponse.js +0 -28
  45. package/dist/DeviceInfo.d.ts +0 -69
  46. package/dist/DeviceInfo.js +0 -50
  47. package/dist/Node.d.ts +0 -334
  48. package/dist/Node.js +0 -369
  49. package/dist/NodeAsync.d.ts +0 -213
  50. package/dist/NodeAsync.js +0 -313
  51. package/dist/NodeClassValue.d.ts +0 -15
  52. package/dist/NodeClassValue.js +0 -15
  53. package/dist/Step.d.ts +0 -355
  54. package/dist/Step.js +0 -689
  55. package/dist/StepAsync.d.ts +0 -162
  56. package/dist/StepAsync.js +0 -264
  57. package/dist/StepError.d.ts +0 -35
  58. package/dist/StepError.js +0 -26
  59. package/dist/StepStateStore.d.ts +0 -14
  60. package/dist/StepStateStore.js +0 -37
  61. package/dist/Utils.d.ts +0 -3
  62. package/dist/Utils.js +0 -20
  63. package/dist/WindowFlags.d.ts +0 -75
  64. package/dist/WindowFlags.js +0 -97
  65. package/dist/barutils/BarUtilsCallMethod.d.ts +0 -24
  66. package/dist/barutils/BarUtilsCallMethod.js +0 -26
  67. package/dist/barutils/bar-utils.d.ts +0 -41
  68. package/dist/barutils/bar-utils.js +0 -205
  69. package/dist/filesystem/fileio/file-io.d.ts +0 -101
  70. package/dist/filesystem/fileio/file-io.js +0 -235
  71. package/dist/filesystem/fileutils/file-utils.d.ts +0 -242
  72. package/dist/filesystem/fileutils/file-utils.js +0 -493
  73. package/dist/filesystem/path.d.ts +0 -252
  74. package/dist/filesystem/path.js +0 -589
  75. package/dist/floatingwindow/FloatCallMethod.d.ts +0 -19
  76. package/dist/floatingwindow/FloatCallMethod.js +0 -18
  77. package/dist/floatingwindow/float.d.ts +0 -29
  78. package/dist/floatingwindow/float.js +0 -149
  79. package/dist/gallery/gallery.d.ts +0 -60
  80. package/dist/gallery/gallery.js +0 -142
  81. package/dist/imageutils/image-utils.d.ts +0 -442
  82. package/dist/imageutils/image-utils.js +0 -543
  83. package/dist/ime/ime.d.ts +0 -80
  84. package/dist/ime/ime.js +0 -141
  85. package/dist/mlkit/MlkitCallMethod.d.ts +0 -27
  86. package/dist/mlkit/MlkitCallMethod.js +0 -26
  87. package/dist/mlkit/mlkit.d.ts +0 -86
  88. package/dist/mlkit/mlkit.js +0 -169
  89. package/dist/network/http.d.ts +0 -127
  90. package/dist/network/http.js +0 -202
  91. /package/src/{AccessibilityEventFilter.ts → accessibility-event-filter.ts} +0 -0
  92. /package/src/{AppInfo.ts → app-info.ts} +0 -0
  93. /package/src/barutils/{BarUtilsCallMethod.ts → bar-utils-call-method.ts} +0 -0
  94. /package/src/{Bounds.ts → bounds.ts} +0 -0
  95. /package/src/{CallMethod.ts → call-method.ts} +0 -0
  96. /package/src/{CallResponse.ts → call-response.ts} +0 -0
  97. /package/src/{DeviceInfo.ts → device-info.ts} +0 -0
  98. /package/src/floatingwindow/{FloatCallMethod.ts → float-call-method.ts} +0 -0
  99. /package/src/mlkit/{MlkitCallMethod.ts → mlkit-call-method.ts} +0 -0
  100. /package/src/{NodeClassValue.ts → node-class-value.ts} +0 -0
  101. /package/src/{StepError.ts → step-error.ts} +0 -0
  102. /package/src/{StepStateStore.ts → step-state-store.ts} +0 -0
  103. /package/src/{Utils.ts → utils.ts} +0 -0
  104. /package/src/{WindowFlags.ts → window-flags.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/bounds.ts","../src/call-method.ts","../src/call-response.ts","../src/utils.ts","../src/app-info.ts","../src/device-info.ts","../src/assistsx-async.ts","../node_modules/@vue/shared/dist/shared.esm-bundler.js","../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../node_modules/pinia/dist/pinia.mjs","../src/step-state-store.ts","../src/step-error.ts","../src/step-async.ts","../src/step.ts","../src/node-async.ts","../src/node.ts","../src/assistsx.ts","../src/node-class-value.ts","../src/window-flags.ts","../src/accessibility-event-filter.ts","../src/network/http.ts","../src/filesystem/path.ts","../src/filesystem/fileio/file-io.ts","../src/filesystem/fileutils/file-utils.ts","../src/ime/ime.ts","../src/imageutils/image-utils.ts","../src/gallery/gallery.ts","../src/mlkit/mlkit-call-method.ts","../src/mlkit/mlkit.ts","../src/barutils/bar-utils-call-method.ts","../src/barutils/bar-utils.ts","../src/floatingwindow/float-call-method.ts","../src/floatingwindow/float.ts","../src/log/log-call-method.ts","../src/log/log.ts"],"sourcesContent":["export * from \"./assistsx\";\nexport * from \"./node\";\nexport * from \"./call-method\";\nexport * from \"./call-response\";\nexport * from \"./node-class-value\";\nexport * from \"./utils\";\nexport * from \"./bounds\";\nexport * from \"./step\";\nexport * from \"./step-state-store\";\nexport * from \"./window-flags\";\nexport * from \"./node-async\";\nexport * from \"./assistsx-async\";\nexport * from \"./step-async\";\nexport * from \"./accessibility-event-filter\";\nexport * from \"./app-info\";\nexport * from \"./device-info\";\nexport * from \"./step-error\";\nexport * from \"./network/http\";\nexport * from \"./filesystem/path\";\nexport * from \"./filesystem/fileio/file-io\";\nexport * from \"./filesystem/fileutils/file-utils\";\nexport * from \"./ime/ime\";\nexport * from \"./imageutils/image-utils\";\nexport * from \"./gallery/gallery\";\nexport * from \"./mlkit/mlkit\";\nexport * from \"./mlkit/mlkit-call-method\";\nexport * from \"./barutils/bar-utils\";\nexport * from \"./barutils/bar-utils-call-method\";\nexport * from \"./floatingwindow/float\";\nexport * from \"./floatingwindow/float-call-method\";\nexport * from \"./log/log\";","// Bounds 类,对应 Kotlin 的 data class\nexport class Bounds {\n // 构造函数\n constructor(\n public readonly left: number,\n public readonly top: number,\n public readonly right: number,\n public readonly bottom: number,\n public readonly width: number,\n public readonly height: number,\n public readonly centerX: number,\n public readonly centerY: number,\n public readonly exactCenterX: number,\n public readonly exactCenterY: number,\n public readonly isEmpty: boolean\n ) { }\n\n /**\n * 判断该 Bounds 是否在屏幕内(满足基本几何有效性)\n * @returns {boolean}\n */\n public isInScreen(): boolean {\n return this.centerX > 0 &&\n this.centerY > 0 &&\n this.height > 0 &&\n this.width > 0;\n }\n\n\n // 从普通对象创建 Bounds 实例\n static from(data: {\n left: number;\n top: number;\n right: number;\n bottom: number;\n width: number;\n height: number;\n centerX: number;\n centerY: number;\n exactCenterX: number;\n exactCenterY: number;\n isEmpty: boolean;\n }): Bounds {\n return new Bounds(\n data.left,\n data.top,\n data.right,\n data.bottom,\n data.width,\n data.height,\n data.centerX,\n data.centerY,\n data.exactCenterX,\n data.exactCenterY,\n data.isEmpty\n );\n }\n\n // 从 JSON 字符串创建实例\n static fromJSON(json: string): Bounds {\n const data = JSON.parse(json);\n return Bounds.from(data);\n }\n\n static fromData(data: any): Bounds {\n // 如果 data 为 null 或 undefined,返回一个空的 Bounds\n if (data == null) {\n return new Bounds(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, true);\n }\n // 如果 data 不是对象类型,抛出详细异常\n if (typeof data !== \"object\" || Array.isArray(data)) {\n throw new Error(\n `Bounds.fromData: Expected object, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return new Bounds(\n data.left,\n data.top,\n data.right,\n data.bottom,\n data.width,\n data.height,\n data.centerX,\n data.centerY,\n data.exactCenterX,\n data.exactCenterY,\n data.isEmpty\n );\n }\n\n // 转换为普通对象\n toJSON(): {\n left: number;\n top: number;\n right: number;\n bottom: number;\n width: number;\n height: number;\n centerX: number;\n centerY: number;\n exactCenterX: number;\n exactCenterY: number;\n isEmpty: boolean;\n } {\n return {\n left: this.left,\n top: this.top,\n right: this.right,\n bottom: this.bottom,\n width: this.width,\n height: this.height,\n centerX: this.centerX,\n centerY: this.centerY,\n exactCenterX: this.exactCenterX,\n exactCenterY: this.exactCenterY,\n isEmpty: this.isEmpty,\n };\n }\n\n // 克隆方法\n clone(): Bounds {\n return new Bounds(\n this.left,\n this.top,\n this.right,\n this.bottom,\n this.width,\n this.height,\n this.centerX,\n this.centerY,\n this.exactCenterX,\n this.exactCenterY,\n this.isEmpty\n );\n }\n}\n","// CallMethod 常量对象\nexport const CallMethod = {\n takeScreenshot: \"takeScreenshot\",\n takeScreenshotSave: \"takeScreenshotSave\",\n takeScreenshotToFile: \"takeScreenshotToFile\",\n overlayToast: \"overlayToast\",\n setNodeText: \"setNodeText\",\n findByTags: \"findByTags\",\n findById: \"findById\",\n findByText: \"findByText\",\n findByTextAllMatch: \"findByTextAllMatch\",\n containsText: \"containsText\",\n getAllText: \"getAllText\",\n findFirstParentByTags: \"findFirstParentByTags\",\n getAllNodes: \"getAllNodes\",\n getNodes: \"getNodes\",\n findFirstParentClickable: \"findFirstParentClickable\",\n getChildren: \"getChildren\",\n getBoundsInScreen: \"getBoundsInScreen\",\n isVisible: \"isVisible\",\n click: \"click\",\n longClick: \"longClick\",\n back: \"back\",\n home: \"home\",\n notifications: \"notifications\",\n recentApps: \"recentApps\",\n paste: \"paste\",\n focus: \"focus\",\n selectionText: \"selectionText\",\n scrollForward: \"scrollForward\",\n launchApp: \"launchApp\",\n getPackageName: \"getPackageName\",\n getScreenSize: \"getScreenSize\",\n getAppScreenSize: \"getAppScreenSize\",\n scrollBackward: \"scrollBackward\",\n setOverlayFlags: \"setOverlayFlags\",\n scanQR: \"scanQR\",\n loadWebViewOverlay: \"loadWebViewOverlay\",\n closeOverlay: \"closeOverlay\",\n recognizeTextInScreenshot: \"recognizeTextInScreenshot\",\n\n clickByGesture: \"clickByGesture\",\n clickNodeByGesture: \"clickNodeByGesture\",\n doubleClickNodeByGesture: \"doubleClickNodeByGesture\",\n performLinearGesture: \"performLinearGesture\",\n longPressGestureAutoPaste: \"longPressGestureAutoPaste\",\n\n getAppInfo: \"getAppInfo\",\n getMacAddress: \"getMacAddress\",\n getAndroidID: \"getAndroidID\",\n getUniqueDeviceId: \"getUniqueDeviceId\",\n\n addAccessibilityEventFilter: \"addAccessibilityEventFilter\",\n setAccessibilityEventFilters: \"setAccessibilityEventFilters\",\n\n httpRequest: \"httpRequest\",\n getDeviceInfo: \"getDeviceInfo\",\n getNetworkType: \"getNetworkType\",\n isAppInstalled: \"isAppInstalled\",\n getClipboardLatestText: \"getClipboardLatestText\",\n getClipboardText: \"getClipboardText\",\n openUrlInBrowser: \"openUrlInBrowser\",\n keepScreenOn: \"keepScreenOn\",\n clearKeepScreenOn: \"clearKeepScreenOn\",\n download: \"download\",\n audioPlayFromFile: \"audioPlayFromFile\",\n audioStop: \"audioStop\",\n audioPlayRingtone: \"audioPlayRingtone\",\n audioStopRingtone: \"audioStopRingtone\",\n\n // 通讯录相关方法\n addContact: \"addContact\",\n getAllContacts: \"getAllContacts\",\n\n // 节点树相关方法\n saveRootNodeTreeJson: \"saveRootNodeTreeJson\",\n} as const;\n\n// 导出类型定义\nexport type CallMethodType = (typeof CallMethod)[keyof typeof CallMethod];\n","// CallResponse 泛型类\nexport class CallResponse {\n constructor(\n public readonly code: number,\n public readonly data: any | null,\n public readonly callbackId: string | null,\n ) { }\n\n // 判断是否成功\n public isSuccess(): boolean {\n return this.code === 0;\n }\n\n // 获取数据,如果数据为空则抛出错误\n public getData(): any | null {\n if (this.data === null) {\n throw new Error('Data is null');\n }\n return this.data;\n }\n\n // 获取数据,如果数据为空则返回默认值\n public getDataOrNull(): any | null {\n return this.data;\n }\n\n // 获取数据,如果数据为空则返回默认值\n public getDataOrDefault(defaultValue: any): any {\n return this.data ?? defaultValue;\n }\n} ","// 导出工具函数\nexport function sleep(ms: number): Promise<void> {\n return new Promise((resolve) => setTimeout(resolve, ms));\n}\n\n// 生成UUID\nexport function generateUUID(): string {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0;\n const v = c === \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport function decodeBase64UTF8(base64: string): string {\n const binary = atob(base64);\n const bytes = new Uint8Array(binary.length);\n for (let i = 0; i < binary.length; i++) {\n bytes[i] = binary.charCodeAt(i);\n }\n return new TextDecoder(\"utf-8\").decode(bytes);\n}\n","/**\n * 应用信息实体类\n */\nexport class AppInfo {\n /**\n * 是否为系统应用\n */\n isSystem: boolean;\n\n /**\n * 最低SDK版本\n */\n minSdkVersion: number;\n\n /**\n * 应用名称\n */\n name: string;\n\n /**\n * 应用包名\n */\n packageName: string;\n\n /**\n * 目标SDK版本\n */\n targetSdkVersion: number;\n\n /**\n * 版本号\n */\n versionCode: number;\n\n /**\n * 版本名称\n */\n versionName: string;\n\n constructor(\n isSystem: boolean = false,\n minSdkVersion: number = 0,\n name: string = \"\",\n packageName: string = \"\",\n targetSdkVersion: number = 0,\n versionCode: number = 0,\n versionName: string = \"\"\n ) {\n this.isSystem = isSystem;\n this.minSdkVersion = minSdkVersion;\n this.name = name;\n this.packageName = packageName;\n this.targetSdkVersion = targetSdkVersion;\n this.versionCode = versionCode;\n this.versionName = versionName;\n }\n\n /**\n * 从JSON对象创建AppInfo实例\n * @param data JSON对象\n * @returns AppInfo实例\n */\n static fromJSON(data: any): AppInfo {\n return new AppInfo(\n data.isSystem ?? false,\n data.minSdkVersion ?? 0,\n data.name ?? \"\",\n data.packageName ?? \"\",\n data.targetSdkVersion ?? 0,\n data.versionCode ?? 0,\n data.versionName ?? \"\"\n );\n }\n\n /**\n * 转换为JSON对象\n * @returns JSON对象\n */\n toJSON(): any {\n return {\n isSystem: this.isSystem,\n minSdkVersion: this.minSdkVersion,\n name: this.name,\n packageName: this.packageName,\n targetSdkVersion: this.targetSdkVersion,\n versionCode: this.versionCode,\n versionName: this.versionName,\n };\n }\n}\n","/**\n * 设备信息实体类\n */\nexport class DeviceInfo {\n /**\n * 设备唯一标识\n */\n uniqueDeviceId: string;\n\n /**\n * Android ID\n */\n androidID: string;\n\n /**\n * MAC地址\n */\n macAddress: string;\n\n /**\n * 是否已Root\n */\n isDeviceRooted: boolean;\n\n /**\n * 制造商\n */\n manufacturer: string;\n\n /**\n * 设备型号\n */\n model: string;\n\n /**\n * SDK版本号\n */\n sdkVersionCode: number;\n\n /**\n * SDK版本名称\n */\n sdkVersionName: string;\n\n /**\n * ABI列表\n */\n abiList: string[];\n\n /**\n * 是否启用ADB调试\n */\n isAdbEnabled: boolean;\n\n /**\n * 是否启用开发者选项\n */\n isDevelopmentSettingsEnabled: boolean;\n\n /**\n * 是否为模拟器\n */\n isEmulator: boolean;\n\n /**\n * 是否为平板\n */\n isTablet: boolean;\n\n constructor(\n uniqueDeviceId: string = \"\",\n androidID: string = \"\",\n macAddress: string = \"\",\n isDeviceRooted: boolean = false,\n manufacturer: string = \"\",\n model: string = \"\",\n sdkVersionCode: number = 0,\n sdkVersionName: string = \"\",\n abiList: string[] = [],\n isAdbEnabled: boolean = false,\n isDevelopmentSettingsEnabled: boolean = false,\n isEmulator: boolean = false,\n isTablet: boolean = false\n ) {\n this.uniqueDeviceId = uniqueDeviceId;\n this.androidID = androidID;\n this.macAddress = macAddress;\n this.isDeviceRooted = isDeviceRooted;\n this.manufacturer = manufacturer;\n this.model = model;\n this.sdkVersionCode = sdkVersionCode;\n this.sdkVersionName = sdkVersionName;\n this.abiList = abiList;\n this.isAdbEnabled = isAdbEnabled;\n this.isDevelopmentSettingsEnabled = isDevelopmentSettingsEnabled;\n this.isEmulator = isEmulator;\n this.isTablet = isTablet;\n }\n\n /**\n * 从JSON对象创建DeviceInfo实例\n * @param data JSON对象\n * @returns DeviceInfo实例\n */\n static fromJSON(data: any): DeviceInfo {\n return new DeviceInfo(\n data.uniqueDeviceId ?? \"\",\n data.androidID ?? \"\",\n data.macAddress ?? \"\",\n data.isDeviceRooted ?? false,\n data.manufacturer ?? \"\",\n data.model ?? \"\",\n data.sdkVersionCode ?? 0,\n data.sdkVersionName ?? \"\",\n data.abiList ?? [],\n data.isAdbEnabled ?? false,\n data.isDevelopmentSettingsEnabled ?? false,\n data.isEmulator ?? false,\n data.isTablet ?? false\n );\n }\n\n /**\n * 转换为JSON对象\n * @returns JSON对象\n */\n toJSON(): any {\n return {\n uniqueDeviceId: this.uniqueDeviceId,\n androidID: this.androidID,\n macAddress: this.macAddress,\n isDeviceRooted: this.isDeviceRooted,\n manufacturer: this.manufacturer,\n model: this.model,\n sdkVersionCode: this.sdkVersionCode,\n sdkVersionName: this.sdkVersionName,\n abiList: this.abiList,\n isAdbEnabled: this.isAdbEnabled,\n isDevelopmentSettingsEnabled: this.isDevelopmentSettingsEnabled,\n isEmulator: this.isEmulator,\n isTablet: this.isTablet,\n };\n }\n}\n","/**\n * AssistsX 类\n * 提供与移动应用程序界面交互的工具类,包括节点查找、手势操作、屏幕操作等功能\n */\nimport { Node } from \"./node\";\nimport { CallMethod } from \"./call-method\";\nimport { CallResponse } from \"./call-response\";\nimport { Bounds } from \"./bounds\";\nimport { generateUUID } from \"./utils\";\nimport { AppInfo } from \"./app-info\";\nimport { DeviceInfo } from \"./device-info\";\nimport {\n AssistsX,\n callbacks,\n WebFloatingWindowOptions,\n} from \"./assistsx\";\n\n/**\n * 截图识别位置信息\n */\nexport interface RecognizeTextInScreenshotPosition {\n text: string;\n left: number;\n top: number;\n right: number;\n bottom: number;\n width: number;\n height: number;\n}\n\n/**\n * 截图识别结果\n */\nexport interface RecognizeTextInScreenshotResult {\n fullText: string;\n processingTimeMillis: number;\n positions: RecognizeTextInScreenshotPosition[];\n}\n\n/**\n * 截图识别区域参数\n */\nexport interface RecognizeTextRegion {\n left?: number;\n top?: number;\n right?: number;\n bottom?: number;\n width?: number;\n height?: number;\n}\n\n/**\n * 联系人信息\n */\nexport interface Contact {\n id: string;\n name: string;\n phoneNumbers: string[];\n emails: string[];\n address: string;\n}\n\nexport class AssistsXAsync {\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n private static async asyncCall(\n method: string,\n {\n args,\n node,\n nodes,\n timeout = 30,\n }: { args?: any; node?: Node; nodes?: Node[]; timeout?: number } = {}\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n node: node ? node : undefined,\n nodes: nodes ? nodes : undefined,\n callbackId: uuid,\n };\n const promise = new Promise((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n // 超时后删除回调函数\n callbacks.delete(uuid);\n resolve(new CallResponse(0, null, uuid));\n }, timeout * 1000);\n });\n const result = window.assistsxAsync.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n const response = new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n return response;\n }\n throw new Error(\"Call failed\");\n }\n\n /**\n * 设置悬浮窗标志\n * @param flags 标志\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否设置成功\n */\n public static async setOverlayFlags(\n flags: number,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.setOverlayFlags, {\n args: { flags: flags },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n /**\n * 设置悬浮窗标志\n * @param flags 标志\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否设置成功\n */\n public static async setOverlayFlagList(\n flags: number[],\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.setOverlayFlags, {\n args: { flags: flags },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n /**\n * 获取所有符合条件的节点\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @param filterText 文本过滤\n * @param timeout 超时时间(秒),默认30秒\n * @returns 节点数组\n */\n public static async getAllNodes({\n filterClass,\n filterViewId,\n filterDes,\n filterText,\n timeout,\n }: {\n filterClass?: string;\n filterViewId?: string;\n filterDes?: string;\n filterText?: string;\n timeout?: number;\n } = {}): Promise<Node[]> {\n const response = await this.asyncCall(CallMethod.getAllNodes, {\n args: { filterClass, filterViewId, filterDes, filterText },\n timeout,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsXAsync.getAllNodes: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 设置节点文本\n * @param node 目标节点\n * @param text 要设置的文本\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否设置成功\n */\n public static async setNodeText(\n node: Node,\n text: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.setNodeText, {\n args: { text },\n node,\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 对指定节点进行截图\n * @param nodes 要截图的节点数组\n * @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)\n * @param timeout 超时时间(秒),默认30秒\n * @returns 截图路径数组\n */\n public static async takeScreenshotNodes(\n nodes: Node[],\n overlayHiddenScreenshotDelayMillis: number = 250,\n timeout?: number\n ): Promise<string[]> {\n const response = await this.asyncCall(CallMethod.takeScreenshot, {\n nodes,\n args: { overlayHiddenScreenshotDelayMillis },\n timeout,\n });\n const data = response.getDataOrDefault({ images: [] });\n return data.images;\n }\n\n /**\n * 保存全屏截图到文件\n * @param options 截图保存选项\n * @param options.filePath 文件路径(可选,不提供则自动生成)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认为 \"PNG\"\n * @param options.overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒),默认为 250\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns 保存的文件路径\n */\n public static async takeScreenshotSave(\n options: {\n filePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n overlayHiddenScreenshotDelayMillis?: number;\n timeout?: number;\n } = {}\n ): Promise<string> {\n const {\n filePath,\n format = \"PNG\",\n overlayHiddenScreenshotDelayMillis = 250,\n timeout,\n } = options;\n\n const response = await this.asyncCall(CallMethod.takeScreenshotSave, {\n args: {\n filePath,\n format,\n overlayHiddenScreenshotDelayMillis,\n },\n timeout,\n });\n const data = response.getDataOrDefault({ file: \"\" });\n return data.file;\n }\n\n /**\n * 保存截图到文件(支持多个节点)\n * @param options 截图保存选项\n * @param options.nodes 要截图的节点数组(可选,不提供则保存全屏截图)\n * @param options.filePath 文件路径(可选,不提供则自动生成。多个节点时会自动添加索引后缀)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认为 \"PNG\"\n * @param options.overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒),默认为 250\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns 保存的文件路径数组\n */\n public static async takeScreenshotToFile(\n options: {\n nodes?: Node[];\n filePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n overlayHiddenScreenshotDelayMillis?: number;\n timeout?: number;\n } = {}\n ): Promise<string[]> {\n const {\n nodes,\n filePath,\n format = \"PNG\",\n overlayHiddenScreenshotDelayMillis = 250,\n timeout,\n } = options;\n\n const response = await this.asyncCall(CallMethod.takeScreenshotToFile, {\n nodes,\n args: {\n filePath,\n format,\n overlayHiddenScreenshotDelayMillis,\n },\n timeout,\n });\n const data = response.getDataOrDefault({ files: [] });\n if (!Array.isArray(data.files)) {\n throw new Error(\n `AssistsXAsync.takeScreenshotToFile: Expected files array, but got ${typeof data.files}. ` +\n `Value: ${JSON.stringify(data.files)}`\n );\n }\n return data.files;\n }\n\n /**\n * 截图识别文本\n * @param param0 识别参数\n * @returns 截图识别结果\n */\n public static async recognizeTextInScreenshot(\n targetText: string,\n options: {\n rotationDegrees?: number;\n overlayHiddenScreenshotDelayMillis?: number;\n restoreOverlay?: boolean;\n region?: RecognizeTextRegion;\n timeout?: number;\n } = {}\n ): Promise<RecognizeTextInScreenshotResult> {\n const {\n rotationDegrees = 0,\n overlayHiddenScreenshotDelayMillis = 250,\n restoreOverlay = true,\n region,\n timeout,\n } = options;\n\n const response = await this.asyncCall(\n CallMethod.recognizeTextInScreenshot,\n {\n args: {\n targetText,\n rotationDegrees,\n overlayHiddenScreenshotDelayMillis,\n restoreOverlay,\n region,\n },\n timeout,\n }\n );\n return response.getDataOrDefault({\n fullText: \"\",\n processingTimeMillis: 0,\n positions: [],\n });\n }\n public static async scanQR(timeout?: number): Promise<string> {\n const response = await this.asyncCall(CallMethod.scanQR, { timeout });\n const data = response.getDataOrDefault({ value: \"\" });\n return data.value;\n }\n public static async loadWebViewOverlay(\n url: string,\n options: WebFloatingWindowOptions & { timeout?: number } = {}\n ): Promise<any> {\n const {\n initialWidth,\n initialHeight,\n initialX,\n initialY,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n initialCenter,\n showTopOperationArea,\n showBottomOperationArea,\n backgroundColor,\n timeout,\n } = options;\n const response = await this.asyncCall(CallMethod.loadWebViewOverlay, {\n args: {\n url,\n initialWidth,\n initialHeight,\n initialX,\n initialY,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n initialCenter,\n showTopOperationArea,\n showBottomOperationArea,\n backgroundColor,\n },\n timeout,\n });\n const data = response.getDataOrDefault({});\n return data;\n }\n\n /**\n * 关闭当前 WebView 悬浮窗\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否关闭成功(当前页面在悬浮窗内时返回 true,否则 false)\n */\n public static async closeOverlay(timeout?: number): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.closeOverlay, {\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 点击节点\n * @param node 要点击的节点\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否点击成功\n */\n public static async click(node: Node, timeout?: number): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.click, { node, timeout });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 长按节点\n * @param node 要长按的节点\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否长按成功\n */\n public static async longClick(\n node: Node,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.longClick, {\n node,\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 启动应用\n * @param packageName 应用包名\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否启动成功\n */\n public static async launchApp(\n packageName: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.launchApp, {\n args: { packageName },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 获取当前应用包名\n * @param timeout 超时时间(秒),默认30秒\n * @returns 包名\n */\n public static async getPackageName(timeout?: number): Promise<string> {\n const response = await this.asyncCall(CallMethod.getPackageName, {\n timeout,\n });\n return response.getDataOrDefault(\"\");\n }\n\n /**\n * 显示悬浮提示\n * @param text 提示文本\n * @param delay 显示时长(毫秒)\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否显示成功\n */\n public static async overlayToast(\n text: string,\n delay: number = 2000,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.overlayToast, {\n args: { text, delay },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 通过ID查找节点\n * @param id 节点ID\n * @param filterClass 类名过滤\n * @param filterText 文本过滤\n * @param filterDes 描述过滤\n * @param node 父节点范围\n * @param timeout 超时时间(秒),默认30秒\n * @returns 节点数组\n */\n public static async findById(\n id: string,\n {\n filterClass,\n filterText,\n filterDes,\n node,\n timeout,\n }: {\n filterClass?: string;\n filterText?: string;\n filterDes?: string;\n node?: Node;\n timeout?: number;\n } = {}\n ): Promise<Node[]> {\n const response = await this.asyncCall(CallMethod.findById, {\n args: { id, filterClass, filterText, filterDes },\n node,\n timeout,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsXAsync.findById: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 通过文本查找节点\n * @param text 要查找的文本\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @param node 父节点范围\n * @param timeout 超时时间(秒),默认30秒\n * @returns 节点数组\n */\n public static async findByText(\n text: string,\n {\n filterClass,\n filterViewId,\n filterDes,\n node,\n timeout,\n }: {\n filterClass?: string;\n filterViewId?: string;\n filterDes?: string;\n node?: Node;\n timeout?: number;\n } = {}\n ): Promise<Node[]> {\n const response = await this.asyncCall(CallMethod.findByText, {\n args: { text, filterClass, filterViewId, filterDes },\n node,\n timeout,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsXAsync.findByText: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 通过标签查找节点\n * @param className 类名\n * @param filterText 文本过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @param node 父节点范围\n * @param timeout 超时时间(秒),默认30秒\n * @returns 节点数组\n */\n public static async findByTags(\n className: string,\n {\n filterText,\n filterViewId,\n filterDes,\n node,\n timeout,\n }: {\n filterText?: string;\n filterViewId?: string;\n filterDes?: string;\n node?: Node;\n timeout?: number;\n } = {}\n ): Promise<Node[]> {\n const response = await this.asyncCall(CallMethod.findByTags, {\n args: { className, filterText, filterViewId, filterDes },\n node,\n timeout,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsXAsync.findByTags: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 查找所有匹配文本的节点\n * @param text 要查找的文本\n * @param timeout 超时时间(秒),默认30秒\n * @returns 节点数组\n */\n public static async findByTextAllMatch(\n text: string,\n timeout?: number\n ): Promise<Node[]> {\n const response = await this.asyncCall(CallMethod.findByTextAllMatch, {\n args: { text },\n timeout,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsXAsync.findByTextAllMatch: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 检查是否包含指定文本\n * @param text 要检查的文本\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否包含\n */\n public static async containsText(\n text: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.containsText, {\n args: { text },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 获取所有文本\n * @param timeout 超时时间(秒),默认30秒\n * @returns 文本数组\n */\n public static async getAllText(timeout?: number): Promise<string[]> {\n const response = await this.asyncCall(CallMethod.getAllText, { timeout });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsXAsync.getAllText: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return data;\n }\n\n /**\n * 查找第一个匹配标签的父节点\n * @param className 类名\n * @param timeout 超时时间(秒),默认30秒\n * @returns 父节点\n */\n public static async findFirstParentByTags(\n node: Node,\n className: string,\n timeout?: number\n ): Promise<Node> {\n const response = await this.asyncCall(CallMethod.findFirstParentByTags, {\n args: { className },\n node,\n timeout,\n });\n return Node.create(response.getDataOrDefault({}));\n }\n\n /**\n * 获取节点的所有子节点\n * @param node 父节点\n * @param timeout 超时时间(秒),默认30秒\n * @returns 子节点数组\n */\n public static async getNodes(node: Node, timeout?: number): Promise<Node[]> {\n const response = await this.asyncCall(CallMethod.getNodes, {\n node,\n timeout,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsXAsync.getNodes: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 获取节点的直接子节点\n * @param node 父节点\n * @param timeout 超时时间(秒),默认30秒\n * @returns 子节点数组\n */\n public static async getChildren(\n node: Node,\n timeout?: number\n ): Promise<Node[]> {\n const response = await this.asyncCall(CallMethod.getChildren, {\n node,\n timeout,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsXAsync.getChildren: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 查找第一个可点击的父节点\n * @param node 起始节点\n * @param timeout 超时时间(秒),默认30秒\n * @returns 可点击的父节点\n */\n public static async findFirstParentClickable(\n node: Node,\n timeout?: number\n ): Promise<Node> {\n const response = await this.asyncCall(CallMethod.findFirstParentClickable, {\n node,\n timeout,\n });\n return Node.create(response.getDataOrDefault({}));\n }\n\n /**\n * 获取节点在屏幕中的边界\n * @param node 目标节点\n * @param timeout 超时时间(秒),默认30秒\n * @returns 边界对象\n */\n public static async getBoundsInScreen(\n node: Node,\n timeout?: number\n ): Promise<Bounds> {\n const response = await this.asyncCall(CallMethod.getBoundsInScreen, {\n node,\n timeout,\n });\n return Bounds.fromData(response.getDataOrDefault({}));\n }\n\n /**\n * 检查节点是否可见\n * @param node 目标节点\n * @param compareNode 比较节点\n * @param isFullyByCompareNode 是否完全可见\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否可见\n */\n public static async isVisible(\n node: Node,\n {\n compareNode,\n isFullyByCompareNode,\n timeout,\n }: {\n compareNode?: Node;\n isFullyByCompareNode?: boolean;\n timeout?: number;\n } = {}\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.isVisible, {\n node,\n args: { compareNode, isFullyByCompareNode },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 执行点击手势\n * @param x 横坐标\n * @param y 纵坐标\n * @param duration 持续时间\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async clickByGesture(\n x: number,\n y: number,\n duration: number,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.clickByGesture, {\n args: { x, y, duration },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 返回操作\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async back(timeout?: number): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.back, { timeout });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 回到主页\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async home(timeout?: number): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.home, { timeout });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 打开通知栏\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async notifications(timeout?: number): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.notifications, {\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 显示最近应用\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async recentApps(timeout?: number): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.recentApps, { timeout });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 在节点中粘贴文本\n * @param node 目标节点\n * @param text 要粘贴的文本\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async paste(\n node: Node,\n text: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.paste, {\n args: { text },\n node,\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n public static async focus(node: Node, timeout?: number): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.focus, { node, timeout });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 选择文本\n * @param node 目标节点\n * @param selectionStart 选择起始位置\n * @param selectionEnd 选择结束位置\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async selectionText(\n node: Node,\n selectionStart: number,\n selectionEnd: number,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.selectionText, {\n args: { selectionStart, selectionEnd },\n node,\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 向前滚动\n * @param node 可滚动节点\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async scrollForward(\n node: Node,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.scrollForward, {\n node,\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 向后滚动\n * @param node 可滚动节点\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async scrollBackward(\n node: Node,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.scrollBackward, {\n node,\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 对节点执行点击手势\n * @param node 目标节点\n * @param offsetX X轴偏移\n * @param offsetY Y轴偏移\n * @param switchWindowIntervalDelay 窗口切换延迟\n * @param clickDuration 点击持续时间\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async clickNodeByGesture(\n node: Node,\n {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n timeout,\n }: {\n offsetX?: number;\n offsetY?: number;\n switchWindowIntervalDelay?: number;\n clickDuration?: number;\n timeout?: number;\n } = {}\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.clickNodeByGesture, {\n node,\n args: { offsetX, offsetY, switchWindowIntervalDelay, clickDuration },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 对节点执行双击手势\n * @param node 目标节点\n * @param offsetX X轴偏移\n * @param offsetY Y轴偏移\n * @param switchWindowIntervalDelay 窗口切换延迟\n * @param clickDuration 点击持续时间\n * @param clickInterval 点击间隔\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async doubleClickNodeByGesture(\n node: Node,\n {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n clickInterval,\n timeout,\n }: {\n offsetX?: number;\n offsetY?: number;\n switchWindowIntervalDelay?: number;\n clickDuration?: number;\n clickInterval?: number;\n timeout?: number;\n } = {}\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.doubleClickNodeByGesture, {\n node,\n args: {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n clickInterval,\n },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n /**\n * 执行线型手势\n * @param startPoint\n * @param endPoint\n * @param param2\n * @param timeout 超时时间(秒),默认30秒\n * @returns\n */\n public static async performLinearGesture(\n startPoint: { x: number; y: number },\n endPoint: { x: number; y: number },\n { duration, timeout }: { duration?: number; timeout?: number } = {}\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.performLinearGesture, {\n args: { startPoint, endPoint, duration },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n public static async longPressNodeByGestureAutoPaste(\n node: Node,\n text: string,\n {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n timeout,\n }: {\n matchedPackageName?: string;\n matchedText?: string;\n timeoutMillis?: number;\n longPressDuration?: number;\n timeout?: number;\n } = { matchedText: \"粘贴\", timeoutMillis: 1500, longPressDuration: 600 }\n ): Promise<boolean> {\n const response = await this.asyncCall(\n CallMethod.longPressGestureAutoPaste,\n {\n node,\n args: {\n text,\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n },\n timeout,\n }\n );\n return response.getDataOrDefault(false);\n }\n\n public static async longPressGestureAutoPaste(\n point: { x: number; y: number },\n text: string,\n {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n timeout,\n }: {\n matchedPackageName?: string;\n matchedText?: string;\n timeoutMillis?: number;\n longPressDuration?: number;\n timeout?: number;\n } = { matchedText: \"粘贴\", timeoutMillis: 1500, longPressDuration: 600 }\n ): Promise<boolean> {\n const response = await this.asyncCall(\n CallMethod.longPressGestureAutoPaste,\n {\n args: {\n point,\n text,\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n },\n timeout,\n }\n );\n return response.getDataOrDefault(false);\n }\n public static async getAppInfo(\n packageName: string,\n timeout?: number\n ): Promise<AppInfo> {\n const response = await this.asyncCall(CallMethod.getAppInfo, {\n args: { packageName },\n timeout,\n });\n return AppInfo.fromJSON(response.getDataOrDefault({}));\n }\n public static async getUniqueDeviceId(timeout?: number): Promise<any> {\n const response = await this.asyncCall(CallMethod.getUniqueDeviceId, {\n timeout,\n });\n return response.getDataOrDefault(\"\");\n }\n public static async getAndroidID(timeout?: number): Promise<any> {\n const response = await this.asyncCall(CallMethod.getAndroidID, { timeout });\n return response.getDataOrDefault(\"\");\n }\n public static async getMacAddress(timeout?: number): Promise<any> {\n const response = await this.asyncCall(CallMethod.getMacAddress, {\n timeout,\n });\n return response.getDataOrDefault({});\n }\n public static async getDeviceInfo(timeout?: number): Promise<DeviceInfo> {\n const response = await this.asyncCall(CallMethod.getDeviceInfo, {\n timeout,\n });\n return DeviceInfo.fromJSON(response.getDataOrDefault({}));\n }\n\n /**\n * 获取屏幕尺寸\n * @param timeout 超时时间(秒),默认30秒\n * @returns 屏幕尺寸对象\n */\n public static async getScreenSize(timeout?: number): Promise<any> {\n const response = await this.asyncCall(CallMethod.getScreenSize, {\n timeout,\n });\n return response.getDataOrDefault({});\n }\n\n /**\n * 获取应用窗口尺寸\n * @param timeout 超时时间(秒),默认30秒\n * @returns 应用窗口尺寸对象\n */\n public static async getAppScreenSize(timeout?: number): Promise<any> {\n const response = await this.asyncCall(CallMethod.getAppScreenSize, {\n timeout,\n });\n return response.getDataOrDefault({});\n }\n\n /**\n * 在浏览器中打开URL\n * @param url 要打开的URL\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功打开\n */\n public static async openUrlInBrowser(\n url: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.openUrlInBrowser, {\n args: { url },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n public static async download(\n url: string,\n timeout?: number\n ): Promise<string | null | undefined> {\n const response = await this.asyncCall(CallMethod.download, {\n args: { url },\n timeout,\n });\n return response.getDataOrDefault(null);\n }\n public static async audioPlayFromFile(\n filePath: string,\n {\n volume = undefined,\n useAbsoluteVolume = false,\n timeout = 30,\n }: {\n volume?: number;\n useAbsoluteVolume?: boolean;\n timeout?: number;\n }\n ): Promise<string | null | undefined> {\n const response = await this.asyncCall(CallMethod.audioPlayFromFile, {\n args: { filePath, volume, useAbsoluteVolume },\n timeout,\n });\n return response.getDataOrDefault(null);\n }\n public static async audioStop({\n timeout = 30,\n }: {\n timeout?: number;\n }): Promise<boolean | null | undefined> {\n const response = await this.asyncCall(CallMethod.audioStop, {\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 播放系统电话铃声\n * @param timeout 超时时间(秒),默认30秒\n * @returns 播放结果消息\n */\n public static async audioPlayRingtone({\n timeout = 30,\n }: {\n timeout?: number;\n }): Promise<string> {\n const response = await this.asyncCall(CallMethod.audioPlayRingtone, {\n timeout,\n });\n return response.getDataOrDefault(\"\");\n }\n\n /**\n * 停止播放系统电话铃声\n * @param timeout 超时时间(秒),默认30秒\n * @returns 停止结果消息\n */\n public static async audioStopRingtone({\n timeout = 30,\n }: {\n timeout?: number;\n }): Promise<string> {\n const response = await this.asyncCall(CallMethod.audioStopRingtone, {\n timeout,\n });\n return response.getDataOrDefault(\"\");\n }\n\n /**\n * 添加联系人\n * @param name 联系人姓名(必填)\n * @param phoneNumber 电话号码(必填)\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否添加成功\n */\n public static async addContact(\n name: string,\n phoneNumber: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.addContact, {\n args: { name, phoneNumber },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 获取所有联系人\n * @param timeout 超时时间(秒),默认30秒\n * @returns 联系人列表\n */\n public static async getAllContacts(timeout?: number): Promise<Contact[]> {\n const response = await this.asyncCall(CallMethod.getAllContacts, {\n timeout,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsXAsync.getAllContacts: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return data;\n }\n\n /**\n * 保存根节点树为JSON文件\n * @param options 保存选项\n * @param options.filePath 文件路径(可选,不提供则自动生成)\n * @param options.prettyPrint 是否格式化输出,默认为 true\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns 保存的文件路径\n */\n public static async saveRootNodeTreeJson(\n options: {\n filePath?: string;\n prettyPrint?: boolean;\n timeout?: number;\n } = {}\n ): Promise<string> {\n const {\n filePath,\n prettyPrint = true,\n timeout,\n } = options;\n\n const response = await this.asyncCall(CallMethod.saveRootNodeTreeJson, {\n args: {\n filePath,\n prettyPrint,\n },\n timeout,\n });\n const data = response.getDataOrDefault({ file: \"\" });\n return data.file;\n }\n\n /**\n * 获取剪贴板文本内容\n * @param timeout 超时时间(秒),默认30秒\n * @returns 剪贴板文本内容,如果获取失败则返回空字符串\n */\n public static async getClipboardText(timeout?: number): Promise<string> {\n const response = await this.asyncCall(CallMethod.getClipboardText, {\n timeout,\n });\n const data = response.getDataOrDefault({ text: \"\" });\n return data.text || \"\";\n }\n\n /**\n * 发送HTTP请求\n * @param options 请求选项\n * @returns HTTP响应\n */\n // public static async httpRequest(\n // options: HttpRequestOptions\n // ): Promise<HttpResponse> {\n // const { url, method = \"GET\", headers, body, timeout = 30 } = options;\n // const response = await this.asyncCall(CallMethod.httpRequest, {\n // args: { url, method, headers, body, timeout },\n // });\n // return response.getDataOrDefault({\n // statusCode: -1,\n // statusMessage: \"\",\n // body: \"\",\n // headers: {},\n // });\n // }\n}\n","/**\n* @vue/shared v3.5.16\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str) {\n const map = /* @__PURE__ */ Object.create(null);\n for (const key of str.split(\",\")) map[key] = 1;\n return (val) => val in map;\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction(\n (str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n }\n);\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction(\n (str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n }\n);\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, ...arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](...arg);\n }\n};\nconst def = (obj, key, value, writable = false) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n writable,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\nfunction genCacheKey(source, options) {\n return source + JSON.stringify(\n options,\n (_, val) => typeof val === \"function\" ? val.toString() : val\n );\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"CACHED\": -1,\n \"-1\": \"CACHED\",\n \"BAIL\": -2,\n \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n \"ELEMENT\": 1,\n \"1\": \"ELEMENT\",\n \"FUNCTIONAL_COMPONENT\": 2,\n \"2\": \"FUNCTIONAL_COMPONENT\",\n \"STATEFUL_COMPONENT\": 4,\n \"4\": \"STATEFUL_COMPONENT\",\n \"TEXT_CHILDREN\": 8,\n \"8\": \"TEXT_CHILDREN\",\n \"ARRAY_CHILDREN\": 16,\n \"16\": \"ARRAY_CHILDREN\",\n \"SLOTS_CHILDREN\": 32,\n \"32\": \"SLOTS_CHILDREN\",\n \"TELEPORT\": 64,\n \"64\": \"TELEPORT\",\n \"SUSPENSE\": 128,\n \"128\": \"SUSPENSE\",\n \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n \"COMPONENT_KEPT_ALIVE\": 512,\n \"512\": \"COMPONENT_KEPT_ALIVE\",\n \"COMPONENT\": 6,\n \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n \"STABLE\": 1,\n \"1\": \"STABLE\",\n \"DYNAMIC\": 2,\n \"2\": \"DYNAMIC\",\n \"FORWARDED\": 3,\n \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n start = Math.max(0, Math.min(start, source.length));\n end = Math.max(0, Math.min(end, source.length));\n if (start > end) return \"\";\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length) continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n if (!styles) return \"\";\n if (isString(styles)) return styles;\n let ret = \"\";\n for (const key in styles) {\n const value = styles[key];\n if (isString(value) || typeof value === \"number\") {\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props) return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nconst isKnownMathMLAttr = /* @__PURE__ */ makeMap(\n `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`\n);\nfunction isRenderableAttrValue(value) {\n if (value == null) {\n return false;\n }\n const type = typeof value;\n return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \"&quot;\";\n break;\n case 38:\n escaped = \"&amp;\";\n break;\n case 39:\n escaped = \"&#39;\";\n break;\n case 60:\n escaped = \"&lt;\";\n break;\n case 62:\n escaped = \"&gt;\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;\nfunction escapeHtmlComment(src) {\n return src.replace(commentStripRE, \"\");\n}\nconst cssVarNameEscapeSymbolsRE = /[ !\"#$%&'()*+,./:;<=>?@[\\\\\\]^`{|}~]/g;\nfunction getEscapedCssVarName(key, doubleEscape) {\n return key.replace(\n cssVarNameEscapeSymbolsRE,\n (s) => doubleEscape ? s === '\"' ? '\\\\\\\\\\\\\"' : `\\\\\\\\${s}` : `\\\\${s}`\n );\n}\n\nfunction looseCompareArrays(a, b) {\n if (a.length !== b.length) return false;\n let equal = true;\n for (let i = 0; equal && i < a.length; i++) {\n equal = looseEqual(a[i], b[i]);\n }\n return equal;\n}\nfunction looseEqual(a, b) {\n if (a === b) return true;\n let aValidType = isDate(a);\n let bValidType = isDate(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n }\n aValidType = isSymbol(a);\n bValidType = isSymbol(b);\n if (aValidType || bValidType) {\n return a === b;\n }\n aValidType = isArray(a);\n bValidType = isArray(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? looseCompareArrays(a, b) : false;\n }\n aValidType = isObject(a);\n bValidType = isObject(b);\n if (aValidType || bValidType) {\n if (!aValidType || !bValidType) {\n return false;\n }\n const aKeysCount = Object.keys(a).length;\n const bKeysCount = Object.keys(b).length;\n if (aKeysCount !== bKeysCount) {\n return false;\n }\n for (const key in a) {\n const aHasKey = a.hasOwnProperty(key);\n const bHasKey = b.hasOwnProperty(key);\n if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {\n return false;\n }\n }\n }\n return String(a) === String(b);\n}\nfunction looseIndexOf(arr, val) {\n return arr.findIndex((item) => looseEqual(item, val));\n}\n\nconst isRef = (val) => {\n return !!(val && val[\"__v_isRef\"] === true);\n};\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (isRef(val)) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce(\n (entries, [key, val2], i) => {\n entries[stringifySymbol(key, i) + \" =>\"] = val2;\n return entries;\n },\n {}\n )\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n };\n } else if (isSymbol(val)) {\n return stringifySymbol(val);\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n var _a;\n return (\n // Symbol.description in es2019+ so we need to cast here to pass\n // the lib: es2016 check\n isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v\n );\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","/**\n* @vue/reactivity v3.5.16\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { extend, hasChanged, isArray, isIntegerKey, isSymbol, isMap, hasOwn, makeMap, isObject, capitalize, toRawType, def, isFunction, EMPTY_OBJ, isSet, isPlainObject, remove, NOOP } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal track `on` calls, allow `on` call multiple times\n */\n this._on = 0;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this._isPaused = false;\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n pause() {\n if (this._active) {\n this._isPaused = true;\n let i, l;\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].pause();\n }\n }\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].pause();\n }\n }\n }\n /**\n * Resumes the effect scope, including all child scopes and effects.\n */\n resume() {\n if (this._active) {\n if (this._isPaused) {\n this._isPaused = false;\n let i, l;\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].resume();\n }\n }\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].resume();\n }\n }\n }\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n if (++this._on === 1) {\n this.prevScope = activeEffectScope;\n activeEffectScope = this;\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n if (this._on > 0 && --this._on === 0) {\n activeEffectScope = this.prevScope;\n this.prevScope = void 0;\n }\n }\n stop(fromParent) {\n if (this._active) {\n this._active = false;\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n this.effects.length = 0;\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n this.cleanups.length = 0;\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n this.scopes.length = 0;\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn, failSilently = false) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nlet activeSub;\nconst EffectFlags = {\n \"ACTIVE\": 1,\n \"1\": \"ACTIVE\",\n \"RUNNING\": 2,\n \"2\": \"RUNNING\",\n \"TRACKING\": 4,\n \"4\": \"TRACKING\",\n \"NOTIFIED\": 8,\n \"8\": \"NOTIFIED\",\n \"DIRTY\": 16,\n \"16\": \"DIRTY\",\n \"ALLOW_RECURSE\": 32,\n \"32\": \"ALLOW_RECURSE\",\n \"PAUSED\": 64,\n \"64\": \"PAUSED\",\n \"EVALUATED\": 128,\n \"128\": \"EVALUATED\"\n};\nconst pausedQueueEffects = /* @__PURE__ */ new WeakSet();\nclass ReactiveEffect {\n constructor(fn) {\n this.fn = fn;\n /**\n * @internal\n */\n this.deps = void 0;\n /**\n * @internal\n */\n this.depsTail = void 0;\n /**\n * @internal\n */\n this.flags = 1 | 4;\n /**\n * @internal\n */\n this.next = void 0;\n /**\n * @internal\n */\n this.cleanup = void 0;\n this.scheduler = void 0;\n if (activeEffectScope && activeEffectScope.active) {\n activeEffectScope.effects.push(this);\n }\n }\n pause() {\n this.flags |= 64;\n }\n resume() {\n if (this.flags & 64) {\n this.flags &= -65;\n if (pausedQueueEffects.has(this)) {\n pausedQueueEffects.delete(this);\n this.trigger();\n }\n }\n }\n /**\n * @internal\n */\n notify() {\n if (this.flags & 2 && !(this.flags & 32)) {\n return;\n }\n if (!(this.flags & 8)) {\n batch(this);\n }\n }\n run() {\n if (!(this.flags & 1)) {\n return this.fn();\n }\n this.flags |= 2;\n cleanupEffect(this);\n prepareDeps(this);\n const prevEffect = activeSub;\n const prevShouldTrack = shouldTrack;\n activeSub = this;\n shouldTrack = true;\n try {\n return this.fn();\n } finally {\n if (!!(process.env.NODE_ENV !== \"production\") && activeSub !== this) {\n warn(\n \"Active effect was not restored correctly - this is likely a Vue internal bug.\"\n );\n }\n cleanupDeps(this);\n activeSub = prevEffect;\n shouldTrack = prevShouldTrack;\n this.flags &= -3;\n }\n }\n stop() {\n if (this.flags & 1) {\n for (let link = this.deps; link; link = link.nextDep) {\n removeSub(link);\n }\n this.deps = this.depsTail = void 0;\n cleanupEffect(this);\n this.onStop && this.onStop();\n this.flags &= -2;\n }\n }\n trigger() {\n if (this.flags & 64) {\n pausedQueueEffects.add(this);\n } else if (this.scheduler) {\n this.scheduler();\n } else {\n this.runIfDirty();\n }\n }\n /**\n * @internal\n */\n runIfDirty() {\n if (isDirty(this)) {\n this.run();\n }\n }\n get dirty() {\n return isDirty(this);\n }\n}\nlet batchDepth = 0;\nlet batchedSub;\nlet batchedComputed;\nfunction batch(sub, isComputed = false) {\n sub.flags |= 8;\n if (isComputed) {\n sub.next = batchedComputed;\n batchedComputed = sub;\n return;\n }\n sub.next = batchedSub;\n batchedSub = sub;\n}\nfunction startBatch() {\n batchDepth++;\n}\nfunction endBatch() {\n if (--batchDepth > 0) {\n return;\n }\n if (batchedComputed) {\n let e = batchedComputed;\n batchedComputed = void 0;\n while (e) {\n const next = e.next;\n e.next = void 0;\n e.flags &= -9;\n e = next;\n }\n }\n let error;\n while (batchedSub) {\n let e = batchedSub;\n batchedSub = void 0;\n while (e) {\n const next = e.next;\n e.next = void 0;\n e.flags &= -9;\n if (e.flags & 1) {\n try {\n ;\n e.trigger();\n } catch (err) {\n if (!error) error = err;\n }\n }\n e = next;\n }\n }\n if (error) throw error;\n}\nfunction prepareDeps(sub) {\n for (let link = sub.deps; link; link = link.nextDep) {\n link.version = -1;\n link.prevActiveLink = link.dep.activeLink;\n link.dep.activeLink = link;\n }\n}\nfunction cleanupDeps(sub) {\n let head;\n let tail = sub.depsTail;\n let link = tail;\n while (link) {\n const prev = link.prevDep;\n if (link.version === -1) {\n if (link === tail) tail = prev;\n removeSub(link);\n removeDep(link);\n } else {\n head = link;\n }\n link.dep.activeLink = link.prevActiveLink;\n link.prevActiveLink = void 0;\n link = prev;\n }\n sub.deps = head;\n sub.depsTail = tail;\n}\nfunction isDirty(sub) {\n for (let link = sub.deps; link; link = link.nextDep) {\n if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {\n return true;\n }\n }\n if (sub._dirty) {\n return true;\n }\n return false;\n}\nfunction refreshComputed(computed) {\n if (computed.flags & 4 && !(computed.flags & 16)) {\n return;\n }\n computed.flags &= -17;\n if (computed.globalVersion === globalVersion) {\n return;\n }\n computed.globalVersion = globalVersion;\n if (!computed.isSSR && computed.flags & 128 && (!computed.deps && !computed._dirty || !isDirty(computed))) {\n return;\n }\n computed.flags |= 2;\n const dep = computed.dep;\n const prevSub = activeSub;\n const prevShouldTrack = shouldTrack;\n activeSub = computed;\n shouldTrack = true;\n try {\n prepareDeps(computed);\n const value = computed.fn(computed._value);\n if (dep.version === 0 || hasChanged(value, computed._value)) {\n computed.flags |= 128;\n computed._value = value;\n dep.version++;\n }\n } catch (err) {\n dep.version++;\n throw err;\n } finally {\n activeSub = prevSub;\n shouldTrack = prevShouldTrack;\n cleanupDeps(computed);\n computed.flags &= -3;\n }\n}\nfunction removeSub(link, soft = false) {\n const { dep, prevSub, nextSub } = link;\n if (prevSub) {\n prevSub.nextSub = nextSub;\n link.prevSub = void 0;\n }\n if (nextSub) {\n nextSub.prevSub = prevSub;\n link.nextSub = void 0;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && dep.subsHead === link) {\n dep.subsHead = nextSub;\n }\n if (dep.subs === link) {\n dep.subs = prevSub;\n if (!prevSub && dep.computed) {\n dep.computed.flags &= -5;\n for (let l = dep.computed.deps; l; l = l.nextDep) {\n removeSub(l, true);\n }\n }\n }\n if (!soft && !--dep.sc && dep.map) {\n dep.map.delete(dep.key);\n }\n}\nfunction removeDep(link) {\n const { prevDep, nextDep } = link;\n if (prevDep) {\n prevDep.nextDep = nextDep;\n link.prevDep = void 0;\n }\n if (nextDep) {\n nextDep.prevDep = prevDep;\n link.nextDep = void 0;\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const e = new ReactiveEffect(fn);\n if (options) {\n extend(e, options);\n }\n try {\n e.run();\n } catch (err) {\n e.stop();\n throw err;\n }\n const runner = e.run.bind(e);\n runner.effect = e;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction onEffectCleanup(fn, failSilently = false) {\n if (activeSub instanceof ReactiveEffect) {\n activeSub.cleanup = fn;\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onEffectCleanup() was called when there was no active effect to associate with.`\n );\n }\n}\nfunction cleanupEffect(e) {\n const { cleanup } = e;\n e.cleanup = void 0;\n if (cleanup) {\n const prevSub = activeSub;\n activeSub = void 0;\n try {\n cleanup();\n } finally {\n activeSub = prevSub;\n }\n }\n}\n\nlet globalVersion = 0;\nclass Link {\n constructor(sub, dep) {\n this.sub = sub;\n this.dep = dep;\n this.version = dep.version;\n this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n }\n}\nclass Dep {\n constructor(computed) {\n this.computed = computed;\n this.version = 0;\n /**\n * Link between this dep and the current active effect\n */\n this.activeLink = void 0;\n /**\n * Doubly linked list representing the subscribing effects (tail)\n */\n this.subs = void 0;\n /**\n * For object property deps cleanup\n */\n this.map = void 0;\n this.key = void 0;\n /**\n * Subscriber counter\n */\n this.sc = 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.subsHead = void 0;\n }\n }\n track(debugInfo) {\n if (!activeSub || !shouldTrack || activeSub === this.computed) {\n return;\n }\n let link = this.activeLink;\n if (link === void 0 || link.sub !== activeSub) {\n link = this.activeLink = new Link(activeSub, this);\n if (!activeSub.deps) {\n activeSub.deps = activeSub.depsTail = link;\n } else {\n link.prevDep = activeSub.depsTail;\n activeSub.depsTail.nextDep = link;\n activeSub.depsTail = link;\n }\n addSub(link);\n } else if (link.version === -1) {\n link.version = this.version;\n if (link.nextDep) {\n const next = link.nextDep;\n next.prevDep = link.prevDep;\n if (link.prevDep) {\n link.prevDep.nextDep = next;\n }\n link.prevDep = activeSub.depsTail;\n link.nextDep = void 0;\n activeSub.depsTail.nextDep = link;\n activeSub.depsTail = link;\n if (activeSub.deps === link) {\n activeSub.deps = next;\n }\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") && activeSub.onTrack) {\n activeSub.onTrack(\n extend(\n {\n effect: activeSub\n },\n debugInfo\n )\n );\n }\n return link;\n }\n trigger(debugInfo) {\n this.version++;\n globalVersion++;\n this.notify(debugInfo);\n }\n notify(debugInfo) {\n startBatch();\n try {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n for (let head = this.subsHead; head; head = head.nextSub) {\n if (head.sub.onTrigger && !(head.sub.flags & 8)) {\n head.sub.onTrigger(\n extend(\n {\n effect: head.sub\n },\n debugInfo\n )\n );\n }\n }\n }\n for (let link = this.subs; link; link = link.prevSub) {\n if (link.sub.notify()) {\n ;\n link.sub.dep.notify();\n }\n }\n } finally {\n endBatch();\n }\n }\n}\nfunction addSub(link) {\n link.dep.sc++;\n if (link.sub.flags & 4) {\n const computed = link.dep.computed;\n if (computed && !link.dep.subs) {\n computed.flags |= 4 | 16;\n for (let l = computed.deps; l; l = l.nextDep) {\n addSub(l);\n }\n }\n const currentTail = link.dep.subs;\n if (currentTail !== link) {\n link.prevSub = currentTail;\n if (currentTail) currentTail.nextSub = link;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && link.dep.subsHead === void 0) {\n link.dep.subsHead = link;\n }\n link.dep.subs = link;\n }\n}\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Object iterate\" : \"\"\n);\nconst MAP_KEY_ITERATE_KEY = Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Map keys iterate\" : \"\"\n);\nconst ARRAY_ITERATE_KEY = Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Array iterate\" : \"\"\n);\nfunction track(target, type, key) {\n if (shouldTrack && activeSub) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = new Dep());\n dep.map = depsMap;\n dep.key = key;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n dep.track({\n target,\n type,\n key\n });\n } else {\n dep.track();\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n globalVersion++;\n return;\n }\n const run = (dep) => {\n if (dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n dep.trigger({\n target,\n type,\n key,\n newValue,\n oldValue,\n oldTarget\n });\n } else {\n dep.trigger();\n }\n }\n };\n startBatch();\n if (type === \"clear\") {\n depsMap.forEach(run);\n } else {\n const targetIsArray = isArray(target);\n const isArrayIndex = targetIsArray && isIntegerKey(key);\n if (targetIsArray && key === \"length\") {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {\n run(dep);\n }\n });\n } else {\n if (key !== void 0 || depsMap.has(void 0)) {\n run(depsMap.get(key));\n }\n if (isArrayIndex) {\n run(depsMap.get(ARRAY_ITERATE_KEY));\n }\n switch (type) {\n case \"add\":\n if (!targetIsArray) {\n run(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n run(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isArrayIndex) {\n run(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!targetIsArray) {\n run(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n run(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n run(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n }\n endBatch();\n}\nfunction getDepFromReactive(object, key) {\n const depMap = targetMap.get(object);\n return depMap && depMap.get(key);\n}\n\nfunction reactiveReadArray(array) {\n const raw = toRaw(array);\n if (raw === array) return raw;\n track(raw, \"iterate\", ARRAY_ITERATE_KEY);\n return isShallow(array) ? raw : raw.map(toReactive);\n}\nfunction shallowReadArray(arr) {\n track(arr = toRaw(arr), \"iterate\", ARRAY_ITERATE_KEY);\n return arr;\n}\nconst arrayInstrumentations = {\n __proto__: null,\n [Symbol.iterator]() {\n return iterator(this, Symbol.iterator, toReactive);\n },\n concat(...args) {\n return reactiveReadArray(this).concat(\n ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)\n );\n },\n entries() {\n return iterator(this, \"entries\", (value) => {\n value[1] = toReactive(value[1]);\n return value;\n });\n },\n every(fn, thisArg) {\n return apply(this, \"every\", fn, thisArg, void 0, arguments);\n },\n filter(fn, thisArg) {\n return apply(this, \"filter\", fn, thisArg, (v) => v.map(toReactive), arguments);\n },\n find(fn, thisArg) {\n return apply(this, \"find\", fn, thisArg, toReactive, arguments);\n },\n findIndex(fn, thisArg) {\n return apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n },\n findLast(fn, thisArg) {\n return apply(this, \"findLast\", fn, thisArg, toReactive, arguments);\n },\n findLastIndex(fn, thisArg) {\n return apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n },\n // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement\n forEach(fn, thisArg) {\n return apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n },\n includes(...args) {\n return searchProxy(this, \"includes\", args);\n },\n indexOf(...args) {\n return searchProxy(this, \"indexOf\", args);\n },\n join(separator) {\n return reactiveReadArray(this).join(separator);\n },\n // keys() iterator only reads `length`, no optimisation required\n lastIndexOf(...args) {\n return searchProxy(this, \"lastIndexOf\", args);\n },\n map(fn, thisArg) {\n return apply(this, \"map\", fn, thisArg, void 0, arguments);\n },\n pop() {\n return noTracking(this, \"pop\");\n },\n push(...args) {\n return noTracking(this, \"push\", args);\n },\n reduce(fn, ...args) {\n return reduce(this, \"reduce\", fn, args);\n },\n reduceRight(fn, ...args) {\n return reduce(this, \"reduceRight\", fn, args);\n },\n shift() {\n return noTracking(this, \"shift\");\n },\n // slice could use ARRAY_ITERATE but also seems to beg for range tracking\n some(fn, thisArg) {\n return apply(this, \"some\", fn, thisArg, void 0, arguments);\n },\n splice(...args) {\n return noTracking(this, \"splice\", args);\n },\n toReversed() {\n return reactiveReadArray(this).toReversed();\n },\n toSorted(comparer) {\n return reactiveReadArray(this).toSorted(comparer);\n },\n toSpliced(...args) {\n return reactiveReadArray(this).toSpliced(...args);\n },\n unshift(...args) {\n return noTracking(this, \"unshift\", args);\n },\n values() {\n return iterator(this, \"values\", toReactive);\n }\n};\nfunction iterator(self, method, wrapValue) {\n const arr = shallowReadArray(self);\n const iter = arr[method]();\n if (arr !== self && !isShallow(self)) {\n iter._next = iter.next;\n iter.next = () => {\n const result = iter._next();\n if (result.value) {\n result.value = wrapValue(result.value);\n }\n return result;\n };\n }\n return iter;\n}\nconst arrayProto = Array.prototype;\nfunction apply(self, method, fn, thisArg, wrappedRetFn, args) {\n const arr = shallowReadArray(self);\n const needsWrap = arr !== self && !isShallow(self);\n const methodFn = arr[method];\n if (methodFn !== arrayProto[method]) {\n const result2 = methodFn.apply(self, args);\n return needsWrap ? toReactive(result2) : result2;\n }\n let wrappedFn = fn;\n if (arr !== self) {\n if (needsWrap) {\n wrappedFn = function(item, index) {\n return fn.call(this, toReactive(item), index, self);\n };\n } else if (fn.length > 2) {\n wrappedFn = function(item, index) {\n return fn.call(this, item, index, self);\n };\n }\n }\n const result = methodFn.call(arr, wrappedFn, thisArg);\n return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n}\nfunction reduce(self, method, fn, args) {\n const arr = shallowReadArray(self);\n let wrappedFn = fn;\n if (arr !== self) {\n if (!isShallow(self)) {\n wrappedFn = function(acc, item, index) {\n return fn.call(this, acc, toReactive(item), index, self);\n };\n } else if (fn.length > 3) {\n wrappedFn = function(acc, item, index) {\n return fn.call(this, acc, item, index, self);\n };\n }\n }\n return arr[method](wrappedFn, ...args);\n}\nfunction searchProxy(self, method, args) {\n const arr = toRaw(self);\n track(arr, \"iterate\", ARRAY_ITERATE_KEY);\n const res = arr[method](...args);\n if ((res === -1 || res === false) && isProxy(args[0])) {\n args[0] = toRaw(args[0]);\n return arr[method](...args);\n }\n return res;\n}\nfunction noTracking(self, method, args = []) {\n pauseTracking();\n startBatch();\n const res = toRaw(self)[method].apply(self, args);\n endBatch();\n resetTracking();\n return res;\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nfunction hasOwnProperty(key) {\n if (!isSymbol(key)) key = String(key);\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n constructor(_isReadonly = false, _isShallow = false) {\n this._isReadonly = _isReadonly;\n this._isShallow = _isShallow;\n }\n get(target, key, receiver) {\n if (key === \"__v_skip\") return target[\"__v_skip\"];\n const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return isShallow2;\n } else if (key === \"__v_raw\") {\n if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n // this means the receiver is a user proxy of the reactive proxy\n Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n return target;\n }\n return;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n let fn;\n if (targetIsArray && (fn = arrayInstrumentations[key])) {\n return fn;\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(\n target,\n key,\n // if this is a proxy wrapping a ref, return methods using the raw ref\n // as receiver so that we don't have to call `toRaw` on the ref in all\n // its class methods\n isRef(target) ? target : receiver\n );\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (isShallow2) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(false, isShallow2);\n }\n set(target, key, value, receiver) {\n let oldValue = target[key];\n if (!this._isShallow) {\n const isOldValueReadonly = isReadonly(oldValue);\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n if (isOldValueReadonly) {\n return false;\n } else {\n oldValue.value = value;\n return true;\n }\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(\n target,\n key,\n value,\n isRef(target) ? target : receiver\n );\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n }\n deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n }\n has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n }\n ownKeys(target) {\n track(\n target,\n \"iterate\",\n isArray(target) ? \"length\" : ITERATE_KEY\n );\n return Reflect.ownKeys(target);\n }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(true, isShallow2);\n }\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction createIterableMethod(method, isReadonly2, isShallow2) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n !isReadonly2 && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n warn(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n };\n}\nfunction createInstrumentations(readonly, shallow) {\n const instrumentations = {\n get(key) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!readonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has } = getProto(rawTarget);\n const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n if (has.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n },\n get size() {\n const target = this[\"__v_raw\"];\n !readonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n },\n has(key) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!readonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n },\n forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n !readonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n }\n };\n extend(\n instrumentations,\n readonly ? {\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\")\n } : {\n add(value) {\n if (!shallow && !isShallow(value) && !isReadonly(value)) {\n value = toRaw(value);\n }\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n },\n set(key, value) {\n if (!shallow && !isShallow(value) && !isReadonly(value)) {\n value = toRaw(value);\n }\n const target = toRaw(this);\n const { has, get } = getProto(target);\n let hadKey = has.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has, key);\n }\n const oldValue = get.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n },\n delete(key) {\n const target = toRaw(this);\n const { has, get } = getProto(target);\n let hadKey = has.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has, key);\n }\n const oldValue = get ? get.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n },\n clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(\n target,\n \"clear\",\n void 0,\n void 0,\n oldTarget\n );\n }\n return result;\n }\n }\n );\n const iteratorMethods = [\n \"keys\",\n \"values\",\n \"entries\",\n Symbol.iterator\n ];\n iteratorMethods.forEach((method) => {\n instrumentations[method] = createIterableMethod(method, readonly, shallow);\n });\n return instrumentations;\n}\nfunction createInstrumentationGetter(isReadonly2, shallow) {\n const instrumentations = createInstrumentations(isReadonly2, shallow);\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has.call(target, rawKey)) {\n const type = toRawType(target);\n warn(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `value cannot be made ${isReadonly2 ? \"readonly\" : \"reactive\"}: ${String(\n target\n )}`\n );\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return value ? !!value[\"__v_raw\"] : false;\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n if (!hasOwn(value, \"__v_skip\") && Object.isExtensible(value)) {\n def(value, \"__v_skip\", true);\n }\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nfunction isRef(r) {\n return r ? r[\"__v_isRef\"] === true : false;\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, isShallow2) {\n this.dep = new Dep();\n this[\"__v_isRef\"] = true;\n this[\"__v_isShallow\"] = false;\n this._rawValue = isShallow2 ? value : toRaw(value);\n this._value = isShallow2 ? value : toReactive(value);\n this[\"__v_isShallow\"] = isShallow2;\n }\n get value() {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n });\n } else {\n this.dep.track();\n }\n return this._value;\n }\n set value(newValue) {\n const oldValue = this._rawValue;\n const useDirectValue = this[\"__v_isShallow\"] || isShallow(newValue) || isReadonly(newValue);\n newValue = useDirectValue ? newValue : toRaw(newValue);\n if (hasChanged(newValue, oldValue)) {\n this._rawValue = newValue;\n this._value = useDirectValue ? newValue : toReactive(newValue);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.dep.trigger({\n target: this,\n type: \"set\",\n key: \"value\",\n newValue,\n oldValue\n });\n } else {\n this.dep.trigger();\n }\n }\n }\n}\nfunction triggerRef(ref2) {\n if (ref2.dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n ref2.dep.trigger({\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: ref2._value\n });\n } else {\n ref2.dep.trigger();\n }\n }\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => key === \"__v_raw\" ? target : unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this[\"__v_isRef\"] = true;\n this._value = void 0;\n const dep = this.dep = new Dep();\n const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._value = this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n warn(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this[\"__v_isRef\"] = true;\n this._value = void 0;\n }\n get value() {\n const val = this._object[this._key];\n return this._value = val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this[\"__v_isRef\"] = true;\n this[\"__v_isReadonly\"] = true;\n this._value = void 0;\n }\n get value() {\n return this._value = this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nclass ComputedRefImpl {\n constructor(fn, setter, isSSR) {\n this.fn = fn;\n this.setter = setter;\n /**\n * @internal\n */\n this._value = void 0;\n /**\n * @internal\n */\n this.dep = new Dep(this);\n /**\n * @internal\n */\n this.__v_isRef = true;\n // TODO isolatedDeclarations \"__v_isReadonly\"\n // A computed is also a subscriber that tracks other deps\n /**\n * @internal\n */\n this.deps = void 0;\n /**\n * @internal\n */\n this.depsTail = void 0;\n /**\n * @internal\n */\n this.flags = 16;\n /**\n * @internal\n */\n this.globalVersion = globalVersion - 1;\n /**\n * @internal\n */\n this.next = void 0;\n // for backwards compat\n this.effect = this;\n this[\"__v_isReadonly\"] = !setter;\n this.isSSR = isSSR;\n }\n /**\n * @internal\n */\n notify() {\n this.flags |= 16;\n if (!(this.flags & 8) && // avoid infinite self recursion\n activeSub !== this) {\n batch(this, true);\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\")) ;\n }\n get value() {\n const link = !!(process.env.NODE_ENV !== \"production\") ? this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n }) : this.dep.track();\n refreshComputed(this);\n if (link) {\n link.version = this.dep.version;\n }\n return this._value;\n }\n set value(newValue) {\n if (this.setter) {\n this.setter(newValue);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\"Write operation failed: computed value is readonly\");\n }\n }\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n if (isFunction(getterOrOptions)) {\n getter = getterOrOptions;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.onTrack = debugOptions.onTrack;\n cRef.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nconst TrackOpTypes = {\n \"GET\": \"get\",\n \"HAS\": \"has\",\n \"ITERATE\": \"iterate\"\n};\nconst TriggerOpTypes = {\n \"SET\": \"set\",\n \"ADD\": \"add\",\n \"DELETE\": \"delete\",\n \"CLEAR\": \"clear\"\n};\nconst ReactiveFlags = {\n \"SKIP\": \"__v_skip\",\n \"IS_REACTIVE\": \"__v_isReactive\",\n \"IS_READONLY\": \"__v_isReadonly\",\n \"IS_SHALLOW\": \"__v_isShallow\",\n \"RAW\": \"__v_raw\",\n \"IS_REF\": \"__v_isRef\"\n};\n\nconst WatchErrorCodes = {\n \"WATCH_GETTER\": 2,\n \"2\": \"WATCH_GETTER\",\n \"WATCH_CALLBACK\": 3,\n \"3\": \"WATCH_CALLBACK\",\n \"WATCH_CLEANUP\": 4,\n \"4\": \"WATCH_CLEANUP\"\n};\nconst INITIAL_WATCHER_VALUE = {};\nconst cleanupMap = /* @__PURE__ */ new WeakMap();\nlet activeWatcher = void 0;\nfunction getCurrentWatcher() {\n return activeWatcher;\n}\nfunction onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {\n if (owner) {\n let cleanups = cleanupMap.get(owner);\n if (!cleanups) cleanupMap.set(owner, cleanups = []);\n cleanups.push(cleanupFn);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onWatcherCleanup() was called when there was no active watcher to associate with.`\n );\n }\n}\nfunction watch(source, cb, options = EMPTY_OBJ) {\n const { immediate, deep, once, scheduler, augmentJob, call } = options;\n const warnInvalidSource = (s) => {\n (options.onWarn || warn)(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const reactiveGetter = (source2) => {\n if (deep) return source2;\n if (isShallow(source2) || deep === false || deep === 0)\n return traverse(source2, 1);\n return traverse(source2);\n };\n let effect;\n let getter;\n let cleanup;\n let boundCleanup;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow(source);\n } else if (isReactive(source)) {\n getter = () => reactiveGetter(source);\n forceTrigger = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return reactiveGetter(s);\n } else if (isFunction(s)) {\n return call ? call(s, 2) : s();\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = call ? () => call(source, 2) : source;\n } else {\n getter = () => {\n if (cleanup) {\n pauseTracking();\n try {\n cleanup();\n } finally {\n resetTracking();\n }\n }\n const currentEffect = activeWatcher;\n activeWatcher = effect;\n try {\n return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);\n } finally {\n activeWatcher = currentEffect;\n }\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n const depth = deep === true ? Infinity : deep;\n getter = () => traverse(baseGetter(), depth);\n }\n const scope = getCurrentScope();\n const watchHandle = () => {\n effect.stop();\n if (scope && scope.active) {\n remove(scope.effects, effect);\n }\n };\n if (once && cb) {\n const _cb = cb;\n cb = (...args) => {\n _cb(...args);\n watchHandle();\n };\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = (immediateFirstRun) => {\n if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {\n if (cleanup) {\n cleanup();\n }\n const currentWatcher = activeWatcher;\n activeWatcher = effect;\n try {\n const args = [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n boundCleanup\n ];\n oldValue = newValue;\n call ? call(cb, 3, args) : (\n // @ts-expect-error\n cb(...args)\n );\n } finally {\n activeWatcher = currentWatcher;\n }\n }\n } else {\n effect.run();\n }\n };\n if (augmentJob) {\n augmentJob(job);\n }\n effect = new ReactiveEffect(getter);\n effect.scheduler = scheduler ? () => scheduler(job, false) : job;\n boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);\n cleanup = effect.onStop = () => {\n const cleanups = cleanupMap.get(effect);\n if (cleanups) {\n if (call) {\n call(cleanups, 4);\n } else {\n for (const cleanup2 of cleanups) cleanup2();\n }\n cleanupMap.delete(effect);\n }\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = options.onTrack;\n effect.onTrigger = options.onTrigger;\n }\n if (cb) {\n if (immediate) {\n job(true);\n } else {\n oldValue = effect.run();\n }\n } else if (scheduler) {\n scheduler(job.bind(null, true), true);\n } else {\n effect.run();\n }\n watchHandle.pause = effect.pause.bind(effect);\n watchHandle.resume = effect.resume.bind(effect);\n watchHandle.stop = watchHandle;\n return watchHandle;\n}\nfunction traverse(value, depth = Infinity, seen) {\n if (depth <= 0 || !isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n depth--;\n if (isRef(value)) {\n traverse(value.value, depth, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], depth, seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, depth, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], depth, seen);\n }\n for (const key of Object.getOwnPropertySymbols(value)) {\n if (Object.prototype.propertyIsEnumerable.call(value, key)) {\n traverse(value[key], depth, seen);\n }\n }\n }\n return value;\n}\n\nexport { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, onWatcherCleanup, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref, watch };\n","/**\n* @vue/runtime-core v3.5.16\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, isReadonly, shallowReadArray, toReadonly, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1 } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, EMPTY_OBJ, isPromise, isArray, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, isGloballyAllowed, NO, EMPTY_ARR, hyphenate, makeMap, toRawType, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nlet isWarning = false;\nfunction warn$1(msg, ...args) {\n if (isWarning) return;\n isWarning = true;\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n // eslint-disable-next-line no-restricted-syntax\n msg + args.map((a) => {\n var _a, _b;\n return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);\n }).join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n isWarning = false;\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\nfunction assertNumber(val, type) {\n if (!!!(process.env.NODE_ENV !== \"production\")) return;\n if (val === void 0) {\n return;\n } else if (typeof val !== \"number\") {\n warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n } else if (isNaN(val)) {\n warn$1(`${type} is NaN - the duration expression might be incorrect.`);\n }\n}\n\nconst ErrorCodes = {\n \"SETUP_FUNCTION\": 0,\n \"0\": \"SETUP_FUNCTION\",\n \"RENDER_FUNCTION\": 1,\n \"1\": \"RENDER_FUNCTION\",\n \"NATIVE_EVENT_HANDLER\": 5,\n \"5\": \"NATIVE_EVENT_HANDLER\",\n \"COMPONENT_EVENT_HANDLER\": 6,\n \"6\": \"COMPONENT_EVENT_HANDLER\",\n \"VNODE_HOOK\": 7,\n \"7\": \"VNODE_HOOK\",\n \"DIRECTIVE_HOOK\": 8,\n \"8\": \"DIRECTIVE_HOOK\",\n \"TRANSITION_HOOK\": 9,\n \"9\": \"TRANSITION_HOOK\",\n \"APP_ERROR_HANDLER\": 10,\n \"10\": \"APP_ERROR_HANDLER\",\n \"APP_WARN_HANDLER\": 11,\n \"11\": \"APP_WARN_HANDLER\",\n \"FUNCTION_REF\": 12,\n \"12\": \"FUNCTION_REF\",\n \"ASYNC_COMPONENT_LOADER\": 13,\n \"13\": \"ASYNC_COMPONENT_LOADER\",\n \"SCHEDULER\": 14,\n \"14\": \"SCHEDULER\",\n \"COMPONENT_UPDATE\": 15,\n \"15\": \"COMPONENT_UPDATE\",\n \"APP_UNMOUNT_CLEANUP\": 16,\n \"16\": \"APP_UNMOUNT_CLEANUP\"\n};\nconst ErrorTypeStrings$1 = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush\",\n [15]: \"component update\",\n [16]: \"app unmount cleanup function\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n try {\n return args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n if (isArray(fn)) {\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`\n );\n }\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n if (errorHandler) {\n pauseTracking();\n callWithErrorHandling(errorHandler, null, 10, [\n err,\n exposedInstance,\n errorInfo\n ]);\n resetTracking();\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);\n}\nfunction logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings$1[type];\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n throw err;\n } else {\n console.error(err);\n }\n } else if (throwInProd) {\n throw err;\n } else {\n console.error(err);\n }\n}\n\nconst queue = [];\nlet flushIndex = -1;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJob = queue[middle];\n const middleJobId = getId(middleJob);\n if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {\n start = middle + 1;\n } else {\n end = middle;\n }\n }\n return start;\n}\nfunction queueJob(job) {\n if (!(job.flags & 1)) {\n const jobId = getId(job);\n const lastJob = queue[queue.length - 1];\n if (!lastJob || // fast path when the job id is larger than the tail\n !(job.flags & 2) && jobId >= getId(lastJob)) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(jobId), 0, job);\n }\n job.flags |= 1;\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!currentFlushPromise) {\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (activePostFlushCbs && cb.id === -1) {\n activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);\n } else if (!(cb.flags & 1)) {\n pendingPostFlushCbs.push(cb);\n cb.flags |= 1;\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = flushIndex + 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.flags & 2) {\n if (instance && cb.id !== instance.uid) {\n continue;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n if (cb.flags & 4) {\n cb.flags &= -2;\n }\n cb();\n if (!(cb.flags & 4)) {\n cb.flags &= -2;\n }\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)].sort(\n (a, b) => getId(a) - getId(b)\n );\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n const cb = activePostFlushCbs[postFlushIndex];\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n if (cb.flags & 4) {\n cb.flags &= -2;\n }\n if (!(cb.flags & 8)) cb();\n cb.flags &= -2;\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;\nfunction flushJobs(seen) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && !(job.flags & 8)) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n if (job.flags & 4) {\n job.flags &= ~1;\n }\n callWithErrorHandling(\n job,\n job.i,\n job.i ? 15 : 14\n );\n if (!(job.flags & 4)) {\n job.flags &= ~1;\n }\n }\n }\n } finally {\n for (; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job) {\n job.flags &= -2;\n }\n }\n flushIndex = -1;\n queue.length = 0;\n flushPostFlushCbs(seen);\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n const count = seen.get(fn) || 0;\n if (count > RECURSION_LIMIT) {\n const instance = fn.i;\n const componentName = instance && getComponentName(instance.type);\n handleError(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\n null,\n 10\n );\n return true;\n }\n seen.set(fn, count + 1);\n return false;\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Map();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\n createRecord: tryWrap(createRecord),\n rerender: tryWrap(rerender),\n reload: tryWrap(reload)\n };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n const id = instance.type.__hmrId;\n let record = map.get(id);\n if (!record) {\n createRecord(id, instance.type);\n record = map.get(id);\n }\n record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n if (map.has(id)) {\n return false;\n }\n map.set(id, {\n initialDef: normalizeClassComponent(initialDef),\n instances: /* @__PURE__ */ new Set()\n });\n return true;\n}\nfunction normalizeClassComponent(component) {\n return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n const record = map.get(id);\n if (!record) {\n return;\n }\n record.initialDef.render = newRender;\n [...record.instances].forEach((instance) => {\n if (newRender) {\n instance.render = newRender;\n normalizeClassComponent(instance.type).render = newRender;\n }\n instance.renderCache = [];\n isHmrUpdating = true;\n instance.update();\n isHmrUpdating = false;\n });\n}\nfunction reload(id, newComp) {\n const record = map.get(id);\n if (!record) return;\n newComp = normalizeClassComponent(newComp);\n updateComponentDef(record.initialDef, newComp);\n const instances = [...record.instances];\n for (let i = 0; i < instances.length; i++) {\n const instance = instances[i];\n const oldComp = normalizeClassComponent(instance.type);\n let dirtyInstances = hmrDirtyComponents.get(oldComp);\n if (!dirtyInstances) {\n if (oldComp !== record.initialDef) {\n updateComponentDef(oldComp, newComp);\n }\n hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());\n }\n dirtyInstances.add(instance);\n instance.appContext.propsCache.delete(instance.type);\n instance.appContext.emitsCache.delete(instance.type);\n instance.appContext.optionsCache.delete(instance.type);\n if (instance.ceReload) {\n dirtyInstances.add(instance);\n instance.ceReload(newComp.styles);\n dirtyInstances.delete(instance);\n } else if (instance.parent) {\n queueJob(() => {\n isHmrUpdating = true;\n instance.parent.update();\n isHmrUpdating = false;\n dirtyInstances.delete(instance);\n });\n } else if (instance.appContext.reload) {\n instance.appContext.reload();\n } else if (typeof window !== \"undefined\") {\n window.location.reload();\n } else {\n console.warn(\n \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n );\n }\n if (instance.root.ce && instance !== instance.root) {\n instance.root.ce._removeChildStyle(oldComp);\n }\n }\n queuePostFlushCb(() => {\n hmrDirtyComponents.clear();\n });\n}\nfunction updateComponentDef(oldComp, newComp) {\n extend(oldComp, newComp);\n for (const key in oldComp) {\n if (key !== \"__file\" && !(key in newComp)) {\n delete oldComp[key];\n }\n }\n}\nfunction tryWrap(fn) {\n return (id, arg) => {\n try {\n return fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn(\n `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n );\n }\n };\n}\n\nlet devtools$1;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools$1) {\n devtools$1.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook$1(hook, target) {\n var _a, _b;\n devtools$1 = hook;\n if (devtools$1) {\n devtools$1.enabled = true;\n buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n // eslint-disable-next-line no-restricted-syntax\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook$1(newHook, target);\n });\n setTimeout(() => {\n if (!devtools$1) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nfunction devtoolsUnmountApp(app) {\n emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\"component:added\" /* COMPONENT_ADDED */);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools$1 && typeof devtools$1.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools$1.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n component.parent ? component.parent.uid : void 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\"perf:start\" /* PERFORMANCE_START */);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\"perf:end\" /* PERFORMANCE_END */);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nfunction pushScopeId(id) {\n currentScopeId = id;\n}\nfunction popScopeId() {\n currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx) return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn$1(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n if (currentRenderingInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getComponentPublicInstance(currentRenderingInstance);\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n const bindings = vnode.dirs;\n const oldBindings = prevVNode && prevVNode.dirs;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (oldBindings) {\n binding.oldValue = oldBindings[i].value;\n }\n let hook = binding.dir[name];\n if (hook) {\n pauseTracking();\n callWithAsyncErrorHandling(hook, instance, 8, [\n vnode.el,\n binding,\n vnode,\n prevVNode\n ]);\n resetTracking();\n }\n }\n}\n\nconst TeleportEndKey = Symbol(\"_vte\");\nconst isTeleport = (type) => type.__isTeleport;\nconst isTeleportDisabled = (props) => props && (props.disabled || props.disabled === \"\");\nconst isTeleportDeferred = (props) => props && (props.defer || props.defer === \"\");\nconst isTargetSVG = (target) => typeof SVGElement !== \"undefined\" && target instanceof SVGElement;\nconst isTargetMathML = (target) => typeof MathMLElement === \"function\" && target instanceof MathMLElement;\nconst resolveTarget = (props, select) => {\n const targetSelector = props && props.to;\n if (isString(targetSelector)) {\n if (!select) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\n `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`\n );\n return null;\n } else {\n const target = select(targetSelector);\n if (!!(process.env.NODE_ENV !== \"production\") && !target && !isTeleportDisabled(props)) {\n warn$1(\n `Failed to locate Teleport target with selector \"${targetSelector}\". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`\n );\n }\n return target;\n }\n } else {\n if (!!(process.env.NODE_ENV !== \"production\") && !targetSelector && !isTeleportDisabled(props)) {\n warn$1(`Invalid Teleport target: ${targetSelector}`);\n }\n return targetSelector;\n }\n};\nconst TeleportImpl = {\n name: \"Teleport\",\n __isTeleport: true,\n process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {\n const {\n mc: mountChildren,\n pc: patchChildren,\n pbc: patchBlockChildren,\n o: { insert, querySelector, createText, createComment }\n } = internals;\n const disabled = isTeleportDisabled(n2.props);\n let { shapeFlag, children, dynamicChildren } = n2;\n if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n optimized = false;\n dynamicChildren = null;\n }\n if (n1 == null) {\n const placeholder = n2.el = !!(process.env.NODE_ENV !== \"production\") ? createComment(\"teleport start\") : createText(\"\");\n const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== \"production\") ? createComment(\"teleport end\") : createText(\"\");\n insert(placeholder, container, anchor);\n insert(mainAnchor, container, anchor);\n const mount = (container2, anchor2) => {\n if (shapeFlag & 16) {\n if (parentComponent && parentComponent.isCE) {\n parentComponent.ce._teleportTarget = container2;\n }\n mountChildren(\n children,\n container2,\n anchor2,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n }\n };\n const mountToTarget = () => {\n const target = n2.target = resolveTarget(n2.props, querySelector);\n const targetAnchor = prepareAnchor(target, n2, createText, insert);\n if (target) {\n if (namespace !== \"svg\" && isTargetSVG(target)) {\n namespace = \"svg\";\n } else if (namespace !== \"mathml\" && isTargetMathML(target)) {\n namespace = \"mathml\";\n }\n if (!disabled) {\n mount(target, targetAnchor);\n updateCssVars(n2, false);\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && !disabled) {\n warn$1(\n \"Invalid Teleport target on mount:\",\n target,\n `(${typeof target})`\n );\n }\n };\n if (disabled) {\n mount(container, mainAnchor);\n updateCssVars(n2, true);\n }\n if (isTeleportDeferred(n2.props)) {\n n2.el.__isMounted = false;\n queuePostRenderEffect(() => {\n mountToTarget();\n delete n2.el.__isMounted;\n }, parentSuspense);\n } else {\n mountToTarget();\n }\n } else {\n if (isTeleportDeferred(n2.props) && n1.el.__isMounted === false) {\n queuePostRenderEffect(() => {\n TeleportImpl.process(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized,\n internals\n );\n }, parentSuspense);\n return;\n }\n n2.el = n1.el;\n n2.targetStart = n1.targetStart;\n const mainAnchor = n2.anchor = n1.anchor;\n const target = n2.target = n1.target;\n const targetAnchor = n2.targetAnchor = n1.targetAnchor;\n const wasDisabled = isTeleportDisabled(n1.props);\n const currentContainer = wasDisabled ? container : target;\n const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;\n if (namespace === \"svg\" || isTargetSVG(target)) {\n namespace = \"svg\";\n } else if (namespace === \"mathml\" || isTargetMathML(target)) {\n namespace = \"mathml\";\n }\n if (dynamicChildren) {\n patchBlockChildren(\n n1.dynamicChildren,\n dynamicChildren,\n currentContainer,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds\n );\n traverseStaticChildren(n1, n2, !!!(process.env.NODE_ENV !== \"production\"));\n } else if (!optimized) {\n patchChildren(\n n1,\n n2,\n currentContainer,\n currentAnchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n false\n );\n }\n if (disabled) {\n if (!wasDisabled) {\n moveTeleport(\n n2,\n container,\n mainAnchor,\n internals,\n 1\n );\n } else {\n if (n2.props && n1.props && n2.props.to !== n1.props.to) {\n n2.props.to = n1.props.to;\n }\n }\n } else {\n if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {\n const nextTarget = n2.target = resolveTarget(\n n2.props,\n querySelector\n );\n if (nextTarget) {\n moveTeleport(\n n2,\n nextTarget,\n null,\n internals,\n 0\n );\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n \"Invalid Teleport target on update:\",\n target,\n `(${typeof target})`\n );\n }\n } else if (wasDisabled) {\n moveTeleport(\n n2,\n target,\n targetAnchor,\n internals,\n 1\n );\n }\n }\n updateCssVars(n2, disabled);\n }\n },\n remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {\n const {\n shapeFlag,\n children,\n anchor,\n targetStart,\n targetAnchor,\n target,\n props\n } = vnode;\n if (target) {\n hostRemove(targetStart);\n hostRemove(targetAnchor);\n }\n doRemove && hostRemove(anchor);\n if (shapeFlag & 16) {\n const shouldRemove = doRemove || !isTeleportDisabled(props);\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n unmount(\n child,\n parentComponent,\n parentSuspense,\n shouldRemove,\n !!child.dynamicChildren\n );\n }\n }\n },\n move: moveTeleport,\n hydrate: hydrateTeleport\n};\nfunction moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {\n if (moveType === 0) {\n insert(vnode.targetAnchor, container, parentAnchor);\n }\n const { el, anchor, shapeFlag, children, props } = vnode;\n const isReorder = moveType === 2;\n if (isReorder) {\n insert(el, container, parentAnchor);\n }\n if (!isReorder || isTeleportDisabled(props)) {\n if (shapeFlag & 16) {\n for (let i = 0; i < children.length; i++) {\n move(\n children[i],\n container,\n parentAnchor,\n 2\n );\n }\n }\n }\n if (isReorder) {\n insert(anchor, container, parentAnchor);\n }\n}\nfunction hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {\n o: { nextSibling, parentNode, querySelector, insert, createText }\n}, hydrateChildren) {\n const target = vnode.target = resolveTarget(\n vnode.props,\n querySelector\n );\n if (target) {\n const disabled = isTeleportDisabled(vnode.props);\n const targetNode = target._lpa || target.firstChild;\n if (vnode.shapeFlag & 16) {\n if (disabled) {\n vnode.anchor = hydrateChildren(\n nextSibling(node),\n vnode,\n parentNode(node),\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n vnode.targetStart = targetNode;\n vnode.targetAnchor = targetNode && nextSibling(targetNode);\n } else {\n vnode.anchor = nextSibling(node);\n let targetAnchor = targetNode;\n while (targetAnchor) {\n if (targetAnchor && targetAnchor.nodeType === 8) {\n if (targetAnchor.data === \"teleport start anchor\") {\n vnode.targetStart = targetAnchor;\n } else if (targetAnchor.data === \"teleport anchor\") {\n vnode.targetAnchor = targetAnchor;\n target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);\n break;\n }\n }\n targetAnchor = nextSibling(targetAnchor);\n }\n if (!vnode.targetAnchor) {\n prepareAnchor(target, vnode, createText, insert);\n }\n hydrateChildren(\n targetNode && nextSibling(targetNode),\n vnode,\n target,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n }\n }\n updateCssVars(vnode, disabled);\n }\n return vnode.anchor && nextSibling(vnode.anchor);\n}\nconst Teleport = TeleportImpl;\nfunction updateCssVars(vnode, isDisabled) {\n const ctx = vnode.ctx;\n if (ctx && ctx.ut) {\n let node, anchor;\n if (isDisabled) {\n node = vnode.el;\n anchor = vnode.anchor;\n } else {\n node = vnode.targetStart;\n anchor = vnode.targetAnchor;\n }\n while (node && node !== anchor) {\n if (node.nodeType === 1) node.setAttribute(\"data-v-owner\", ctx.uid);\n node = node.nextSibling;\n }\n ctx.ut();\n }\n}\nfunction prepareAnchor(target, vnode, createText, insert) {\n const targetStart = vnode.targetStart = createText(\"\");\n const targetAnchor = vnode.targetAnchor = createText(\"\");\n targetStart[TeleportEndKey] = targetAnchor;\n if (target) {\n insert(targetStart, target);\n insert(targetAnchor, target);\n }\n return targetAnchor;\n}\n\nconst leaveCbKey = Symbol(\"_leaveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nfunction useTransitionState() {\n const state = {\n isMounted: false,\n isLeaving: false,\n isUnmounting: false,\n leavingVNodes: /* @__PURE__ */ new Map()\n };\n onMounted(() => {\n state.isMounted = true;\n });\n onBeforeUnmount(() => {\n state.isUnmounting = true;\n });\n return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n mode: String,\n appear: Boolean,\n persisted: Boolean,\n // enter\n onBeforeEnter: TransitionHookValidator,\n onEnter: TransitionHookValidator,\n onAfterEnter: TransitionHookValidator,\n onEnterCancelled: TransitionHookValidator,\n // leave\n onBeforeLeave: TransitionHookValidator,\n onLeave: TransitionHookValidator,\n onAfterLeave: TransitionHookValidator,\n onLeaveCancelled: TransitionHookValidator,\n // appear\n onBeforeAppear: TransitionHookValidator,\n onAppear: TransitionHookValidator,\n onAfterAppear: TransitionHookValidator,\n onAppearCancelled: TransitionHookValidator\n};\nconst recursiveGetSubtree = (instance) => {\n const subTree = instance.subTree;\n return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;\n};\nconst BaseTransitionImpl = {\n name: `BaseTransition`,\n props: BaseTransitionPropsValidators,\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const state = useTransitionState();\n return () => {\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\n if (!children || !children.length) {\n return;\n }\n const child = findNonCommentChild(children);\n const rawProps = toRaw(props);\n const { mode } = rawProps;\n if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n warn$1(`invalid <transition> mode: ${mode}`);\n }\n if (state.isLeaving) {\n return emptyPlaceholder(child);\n }\n const innerChild = getInnerChild$1(child);\n if (!innerChild) {\n return emptyPlaceholder(child);\n }\n let enterHooks = resolveTransitionHooks(\n innerChild,\n rawProps,\n state,\n instance,\n // #11061, ensure enterHooks is fresh after clone\n (hooks) => enterHooks = hooks\n );\n if (innerChild.type !== Comment) {\n setTransitionHooks(innerChild, enterHooks);\n }\n let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);\n if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {\n let leavingHooks = resolveTransitionHooks(\n oldInnerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(oldInnerChild, leavingHooks);\n if (mode === \"out-in\" && innerChild.type !== Comment) {\n state.isLeaving = true;\n leavingHooks.afterLeave = () => {\n state.isLeaving = false;\n if (!(instance.job.flags & 8)) {\n instance.update();\n }\n delete leavingHooks.afterLeave;\n oldInnerChild = void 0;\n };\n return emptyPlaceholder(child);\n } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n const leavingVNodesCache = getLeavingNodesForType(\n state,\n oldInnerChild\n );\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n el[leaveCbKey] = () => {\n earlyRemove();\n el[leaveCbKey] = void 0;\n delete enterHooks.delayedLeave;\n oldInnerChild = void 0;\n };\n enterHooks.delayedLeave = () => {\n delayedLeave();\n delete enterHooks.delayedLeave;\n oldInnerChild = void 0;\n };\n };\n } else {\n oldInnerChild = void 0;\n }\n } else if (oldInnerChild) {\n oldInnerChild = void 0;\n }\n return child;\n };\n }\n};\nfunction findNonCommentChild(children) {\n let child = children[0];\n if (children.length > 1) {\n let hasFound = false;\n for (const c of children) {\n if (c.type !== Comment) {\n if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n warn$1(\n \"<transition> can only be used on a single element or component. Use <transition-group> for lists.\"\n );\n break;\n }\n child = c;\n hasFound = true;\n if (!!!(process.env.NODE_ENV !== \"production\")) break;\n }\n }\n }\n return child;\n}\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n const { leavingVNodes } = state;\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\n if (!leavingVNodesCache) {\n leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n leavingVNodes.set(vnode.type, leavingVNodesCache);\n }\n return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance, postClone) {\n const {\n appear,\n mode,\n persisted = false,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n onBeforeAppear,\n onAppear,\n onAfterAppear,\n onAppearCancelled\n } = props;\n const key = String(vnode.key);\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n const callHook = (hook, args) => {\n hook && callWithAsyncErrorHandling(\n hook,\n instance,\n 9,\n args\n );\n };\n const callAsyncHook = (hook, args) => {\n const done = args[1];\n callHook(hook, args);\n if (isArray(hook)) {\n if (hook.every((hook2) => hook2.length <= 1)) done();\n } else if (hook.length <= 1) {\n done();\n }\n };\n const hooks = {\n mode,\n persisted,\n beforeEnter(el) {\n let hook = onBeforeEnter;\n if (!state.isMounted) {\n if (appear) {\n hook = onBeforeAppear || onBeforeEnter;\n } else {\n return;\n }\n }\n if (el[leaveCbKey]) {\n el[leaveCbKey](\n true\n /* cancelled */\n );\n }\n const leavingVNode = leavingVNodesCache[key];\n if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {\n leavingVNode.el[leaveCbKey]();\n }\n callHook(hook, [el]);\n },\n enter(el) {\n let hook = onEnter;\n let afterHook = onAfterEnter;\n let cancelHook = onEnterCancelled;\n if (!state.isMounted) {\n if (appear) {\n hook = onAppear || onEnter;\n afterHook = onAfterAppear || onAfterEnter;\n cancelHook = onAppearCancelled || onEnterCancelled;\n } else {\n return;\n }\n }\n let called = false;\n const done = el[enterCbKey] = (cancelled) => {\n if (called) return;\n called = true;\n if (cancelled) {\n callHook(cancelHook, [el]);\n } else {\n callHook(afterHook, [el]);\n }\n if (hooks.delayedLeave) {\n hooks.delayedLeave();\n }\n el[enterCbKey] = void 0;\n };\n if (hook) {\n callAsyncHook(hook, [el, done]);\n } else {\n done();\n }\n },\n leave(el, remove) {\n const key2 = String(vnode.key);\n if (el[enterCbKey]) {\n el[enterCbKey](\n true\n /* cancelled */\n );\n }\n if (state.isUnmounting) {\n return remove();\n }\n callHook(onBeforeLeave, [el]);\n let called = false;\n const done = el[leaveCbKey] = (cancelled) => {\n if (called) return;\n called = true;\n remove();\n if (cancelled) {\n callHook(onLeaveCancelled, [el]);\n } else {\n callHook(onAfterLeave, [el]);\n }\n el[leaveCbKey] = void 0;\n if (leavingVNodesCache[key2] === vnode) {\n delete leavingVNodesCache[key2];\n }\n };\n leavingVNodesCache[key2] = vnode;\n if (onLeave) {\n callAsyncHook(onLeave, [el, done]);\n } else {\n done();\n }\n },\n clone(vnode2) {\n const hooks2 = resolveTransitionHooks(\n vnode2,\n props,\n state,\n instance,\n postClone\n );\n if (postClone) postClone(hooks2);\n return hooks2;\n }\n };\n return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n if (isKeepAlive(vnode)) {\n vnode = cloneVNode(vnode);\n vnode.children = null;\n return vnode;\n }\n}\nfunction getInnerChild$1(vnode) {\n if (!isKeepAlive(vnode)) {\n if (isTeleport(vnode.type) && vnode.children) {\n return findNonCommentChild(vnode.children);\n }\n return vnode;\n }\n if (vnode.component) {\n return vnode.component.subTree;\n }\n const { shapeFlag, children } = vnode;\n if (children) {\n if (shapeFlag & 16) {\n return children[0];\n }\n if (shapeFlag & 32 && isFunction(children.default)) {\n return children.default();\n }\n }\n}\nfunction setTransitionHooks(vnode, hooks) {\n if (vnode.shapeFlag & 6 && vnode.component) {\n vnode.transition = hooks;\n setTransitionHooks(vnode.component.subTree, hooks);\n } else if (vnode.shapeFlag & 128) {\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n } else {\n vnode.transition = hooks;\n }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n let ret = [];\n let keyedFragmentCount = 0;\n for (let i = 0; i < children.length; i++) {\n let child = children[i];\n const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n if (child.type === Fragment) {\n if (child.patchFlag & 128) keyedFragmentCount++;\n ret = ret.concat(\n getTransitionRawChildren(child.children, keepComment, key)\n );\n } else if (keepComment || child.type !== Comment) {\n ret.push(key != null ? cloneVNode(child, { key }) : child);\n }\n }\n if (keyedFragmentCount > 1) {\n for (let i = 0; i < ret.length; i++) {\n ret[i].patchFlag = -2;\n }\n }\n return ret;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8236: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nfunction useId() {\n const i = getCurrentInstance();\n if (i) {\n return (i.appContext.config.idPrefix || \"v\") + \"-\" + i.ids[0] + i.ids[1]++;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `useId() is called when there is no active component instance to be associated with.`\n );\n }\n return \"\";\n}\nfunction markAsyncBoundary(instance) {\n instance.ids = [instance.ids[0] + instance.ids[2]++ + \"-\", 0, 0];\n}\n\nconst knownTemplateRefs = /* @__PURE__ */ new WeakSet();\nfunction useTemplateRef(key) {\n const i = getCurrentInstance();\n const r = shallowRef(null);\n if (i) {\n const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;\n let desc;\n if (!!(process.env.NODE_ENV !== \"production\") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {\n warn$1(`useTemplateRef('${key}') already exists.`);\n } else {\n Object.defineProperty(refs, key, {\n enumerable: true,\n get: () => r.value,\n set: (val) => r.value = val\n });\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `useTemplateRef() is called when there is no active component instance to be associated with.`\n );\n }\n const ret = !!(process.env.NODE_ENV !== \"production\") ? readonly(r) : r;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n knownTemplateRefs.add(ret);\n }\n return ret;\n}\n\nfunction setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\n if (isArray(rawRef)) {\n rawRef.forEach(\n (r, i) => setRef(\n r,\n oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),\n parentSuspense,\n vnode,\n isUnmount\n )\n );\n return;\n }\n if (isAsyncWrapper(vnode) && !isUnmount) {\n if (vnode.shapeFlag & 512 && vnode.type.__asyncResolved && vnode.component.subTree.component) {\n setRef(rawRef, oldRawRef, parentSuspense, vnode.component.subTree);\n }\n return;\n }\n const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;\n const value = isUnmount ? null : refValue;\n const { i: owner, r: ref } = rawRef;\n if (!!(process.env.NODE_ENV !== \"production\") && !owner) {\n warn$1(\n `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`\n );\n return;\n }\n const oldRef = oldRawRef && oldRawRef.r;\n const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;\n const setupState = owner.setupState;\n const rawSetupState = toRaw(setupState);\n const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {\n warn$1(\n `Template ref \"${key}\" used on a non-ref value. It will not work in the production build.`\n );\n }\n if (knownTemplateRefs.has(rawSetupState[key])) {\n return false;\n }\n }\n return hasOwn(rawSetupState, key);\n };\n if (oldRef != null && oldRef !== ref) {\n if (isString(oldRef)) {\n refs[oldRef] = null;\n if (canSetSetupRef(oldRef)) {\n setupState[oldRef] = null;\n }\n } else if (isRef(oldRef)) {\n oldRef.value = null;\n }\n }\n if (isFunction(ref)) {\n callWithErrorHandling(ref, owner, 12, [value, refs]);\n } else {\n const _isString = isString(ref);\n const _isRef = isRef(ref);\n if (_isString || _isRef) {\n const doSet = () => {\n if (rawRef.f) {\n const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;\n if (isUnmount) {\n isArray(existing) && remove(existing, refValue);\n } else {\n if (!isArray(existing)) {\n if (_isString) {\n refs[ref] = [refValue];\n if (canSetSetupRef(ref)) {\n setupState[ref] = refs[ref];\n }\n } else {\n ref.value = [refValue];\n if (rawRef.k) refs[rawRef.k] = ref.value;\n }\n } else if (!existing.includes(refValue)) {\n existing.push(refValue);\n }\n }\n } else if (_isString) {\n refs[ref] = value;\n if (canSetSetupRef(ref)) {\n setupState[ref] = value;\n }\n } else if (_isRef) {\n ref.value = value;\n if (rawRef.k) refs[rawRef.k] = value;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\"Invalid template ref type:\", ref, `(${typeof ref})`);\n }\n };\n if (value) {\n doSet.id = -1;\n queuePostRenderEffect(doSet, parentSuspense);\n } else {\n doSet();\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\"Invalid template ref type:\", ref, `(${typeof ref})`);\n }\n }\n}\n\nlet hasLoggedMismatchError = false;\nconst logMismatchError = () => {\n if (hasLoggedMismatchError) {\n return;\n }\n console.error(\"Hydration completed but contains mismatches.\");\n hasLoggedMismatchError = true;\n};\nconst isSVGContainer = (container) => container.namespaceURI.includes(\"svg\") && container.tagName !== \"foreignObject\";\nconst isMathMLContainer = (container) => container.namespaceURI.includes(\"MathML\");\nconst getContainerType = (container) => {\n if (container.nodeType !== 1) return void 0;\n if (isSVGContainer(container)) return \"svg\";\n if (isMathMLContainer(container)) return \"mathml\";\n return void 0;\n};\nconst isComment = (node) => node.nodeType === 8;\nfunction createHydrationFunctions(rendererInternals) {\n const {\n mt: mountComponent,\n p: patch,\n o: {\n patchProp,\n createText,\n nextSibling,\n parentNode,\n remove,\n insert,\n createComment\n }\n } = rendererInternals;\n const hydrate = (vnode, container) => {\n if (!container.hasChildNodes()) {\n (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`\n );\n patch(null, vnode, container);\n flushPostFlushCbs();\n container._vnode = vnode;\n return;\n }\n hydrateNode(container.firstChild, vnode, null, null, null);\n flushPostFlushCbs();\n container._vnode = vnode;\n };\n const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {\n optimized = optimized || !!vnode.dynamicChildren;\n const isFragmentStart = isComment(node) && node.data === \"[\";\n const onMismatch = () => handleMismatch(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n isFragmentStart\n );\n const { type, ref, shapeFlag, patchFlag } = vnode;\n let domType = node.nodeType;\n vnode.el = node;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n def(node, \"__vnode\", vnode, true);\n def(node, \"__vueParentComponent\", parentComponent, true);\n }\n if (patchFlag === -2) {\n optimized = false;\n vnode.dynamicChildren = null;\n }\n let nextNode = null;\n switch (type) {\n case Text:\n if (domType !== 3) {\n if (vnode.children === \"\") {\n insert(vnode.el = createText(\"\"), parentNode(node), node);\n nextNode = node;\n } else {\n nextNode = onMismatch();\n }\n } else {\n if (node.data !== vnode.children) {\n (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n `Hydration text mismatch in`,\n node.parentNode,\n `\n - rendered on server: ${JSON.stringify(\n node.data\n )}\n - expected on client: ${JSON.stringify(vnode.children)}`\n );\n logMismatchError();\n node.data = vnode.children;\n }\n nextNode = nextSibling(node);\n }\n break;\n case Comment:\n if (isTemplateNode(node)) {\n nextNode = nextSibling(node);\n replaceNode(\n vnode.el = node.content.firstChild,\n node,\n parentComponent\n );\n } else if (domType !== 8 || isFragmentStart) {\n nextNode = onMismatch();\n } else {\n nextNode = nextSibling(node);\n }\n break;\n case Static:\n if (isFragmentStart) {\n node = nextSibling(node);\n domType = node.nodeType;\n }\n if (domType === 1 || domType === 3) {\n nextNode = node;\n const needToAdoptContent = !vnode.children.length;\n for (let i = 0; i < vnode.staticCount; i++) {\n if (needToAdoptContent)\n vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;\n if (i === vnode.staticCount - 1) {\n vnode.anchor = nextNode;\n }\n nextNode = nextSibling(nextNode);\n }\n return isFragmentStart ? nextSibling(nextNode) : nextNode;\n } else {\n onMismatch();\n }\n break;\n case Fragment:\n if (!isFragmentStart) {\n nextNode = onMismatch();\n } else {\n nextNode = hydrateFragment(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n }\n break;\n default:\n if (shapeFlag & 1) {\n if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {\n nextNode = onMismatch();\n } else {\n nextNode = hydrateElement(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n }\n } else if (shapeFlag & 6) {\n vnode.slotScopeIds = slotScopeIds;\n const container = parentNode(node);\n if (isFragmentStart) {\n nextNode = locateClosingAnchor(node);\n } else if (isComment(node) && node.data === \"teleport start\") {\n nextNode = locateClosingAnchor(node, node.data, \"teleport end\");\n } else {\n nextNode = nextSibling(node);\n }\n mountComponent(\n vnode,\n container,\n null,\n parentComponent,\n parentSuspense,\n getContainerType(container),\n optimized\n );\n if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved) {\n let subTree;\n if (isFragmentStart) {\n subTree = createVNode(Fragment);\n subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;\n } else {\n subTree = node.nodeType === 3 ? createTextVNode(\"\") : createVNode(\"div\");\n }\n subTree.el = node;\n vnode.component.subTree = subTree;\n }\n } else if (shapeFlag & 64) {\n if (domType !== 8) {\n nextNode = onMismatch();\n } else {\n nextNode = vnode.type.hydrate(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized,\n rendererInternals,\n hydrateChildren\n );\n }\n } else if (shapeFlag & 128) {\n nextNode = vnode.type.hydrate(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n getContainerType(parentNode(node)),\n slotScopeIds,\n optimized,\n rendererInternals,\n hydrateNode\n );\n } else if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) {\n warn$1(\"Invalid HostVNode type:\", type, `(${typeof type})`);\n }\n }\n if (ref != null) {\n setRef(ref, null, parentSuspense, vnode);\n }\n return nextNode;\n };\n const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n optimized = optimized || !!vnode.dynamicChildren;\n const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;\n const forcePatch = type === \"input\" || type === \"option\";\n if (!!(process.env.NODE_ENV !== \"production\") || forcePatch || patchFlag !== -1) {\n if (dirs) {\n invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n }\n let needCallTransitionHooks = false;\n if (isTemplateNode(el)) {\n needCallTransitionHooks = needTransition(\n null,\n // no need check parentSuspense in hydration\n transition\n ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;\n const content = el.content.firstChild;\n if (needCallTransitionHooks) {\n const cls = content.getAttribute(\"class\");\n if (cls) content.$cls = cls;\n transition.beforeEnter(content);\n }\n replaceNode(content, el, parentComponent);\n vnode.el = el = content;\n }\n if (shapeFlag & 16 && // skip if element has innerHTML / textContent\n !(props && (props.innerHTML || props.textContent))) {\n let next = hydrateChildren(\n el.firstChild,\n vnode,\n el,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n let hasWarned = false;\n while (next) {\n if (!isMismatchAllowed(el, 1 /* CHILDREN */)) {\n if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {\n warn$1(\n `Hydration children mismatch on`,\n el,\n `\nServer rendered element contains more child nodes than client vdom.`\n );\n hasWarned = true;\n }\n logMismatchError();\n }\n const cur = next;\n next = next.nextSibling;\n remove(cur);\n }\n } else if (shapeFlag & 8) {\n let clientText = vnode.children;\n if (clientText[0] === \"\\n\" && (el.tagName === \"PRE\" || el.tagName === \"TEXTAREA\")) {\n clientText = clientText.slice(1);\n }\n if (el.textContent !== clientText) {\n if (!isMismatchAllowed(el, 0 /* TEXT */)) {\n (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n `Hydration text content mismatch on`,\n el,\n `\n - rendered on server: ${el.textContent}\n - expected on client: ${vnode.children}`\n );\n logMismatchError();\n }\n el.textContent = vnode.children;\n }\n }\n if (props) {\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {\n const isCustomElement = el.tagName.includes(\"-\");\n for (const key in props) {\n if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks\n // as it could have mutated the DOM in any possible way\n !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {\n logMismatchError();\n }\n if (forcePatch && (key.endsWith(\"value\") || key === \"indeterminate\") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers\n key[0] === \".\" || isCustomElement) {\n patchProp(el, key, null, props[key], void 0, parentComponent);\n }\n }\n } else if (props.onClick) {\n patchProp(\n el,\n \"onClick\",\n null,\n props.onClick,\n void 0,\n parentComponent\n );\n } else if (patchFlag & 4 && isReactive(props.style)) {\n for (const key in props.style) props.style[key];\n }\n }\n let vnodeHooks;\n if (vnodeHooks = props && props.onVnodeBeforeMount) {\n invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n }\n if (dirs) {\n invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n }\n if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {\n queueEffectWithSuspense(() => {\n vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n needCallTransitionHooks && transition.enter(el);\n dirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n }, parentSuspense);\n }\n }\n return el.nextSibling;\n };\n const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n optimized = optimized || !!parentVNode.dynamicChildren;\n const children = parentVNode.children;\n const l = children.length;\n let hasWarned = false;\n for (let i = 0; i < l; i++) {\n const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);\n const isText = vnode.type === Text;\n if (node) {\n if (isText && !optimized) {\n if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {\n insert(\n createText(\n node.data.slice(vnode.children.length)\n ),\n container,\n nextSibling(node)\n );\n node.data = vnode.children;\n }\n }\n node = hydrateNode(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n } else if (isText && !vnode.children) {\n insert(vnode.el = createText(\"\"), container);\n } else {\n if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {\n if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {\n warn$1(\n `Hydration children mismatch on`,\n container,\n `\nServer rendered element contains fewer child nodes than client vdom.`\n );\n hasWarned = true;\n }\n logMismatchError();\n }\n patch(\n null,\n vnode,\n container,\n null,\n parentComponent,\n parentSuspense,\n getContainerType(container),\n slotScopeIds\n );\n }\n }\n return node;\n };\n const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n const { slotScopeIds: fragmentSlotScopeIds } = vnode;\n if (fragmentSlotScopeIds) {\n slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n }\n const container = parentNode(node);\n const next = hydrateChildren(\n nextSibling(node),\n vnode,\n container,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n if (next && isComment(next) && next.data === \"]\") {\n return nextSibling(vnode.anchor = next);\n } else {\n logMismatchError();\n insert(vnode.anchor = createComment(`]`), container, next);\n return next;\n }\n };\n const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {\n if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) {\n (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n `Hydration node mismatch:\n- rendered on server:`,\n node,\n node.nodeType === 3 ? `(text)` : isComment(node) && node.data === \"[\" ? `(start of fragment)` : ``,\n `\n- expected on client:`,\n vnode.type\n );\n logMismatchError();\n }\n vnode.el = null;\n if (isFragment) {\n const end = locateClosingAnchor(node);\n while (true) {\n const next2 = nextSibling(node);\n if (next2 && next2 !== end) {\n remove(next2);\n } else {\n break;\n }\n }\n }\n const next = nextSibling(node);\n const container = parentNode(node);\n remove(node);\n patch(\n null,\n vnode,\n container,\n next,\n parentComponent,\n parentSuspense,\n getContainerType(container),\n slotScopeIds\n );\n if (parentComponent) {\n parentComponent.vnode.el = vnode.el;\n updateHOCHostEl(parentComponent, vnode.el);\n }\n return next;\n };\n const locateClosingAnchor = (node, open = \"[\", close = \"]\") => {\n let match = 0;\n while (node) {\n node = nextSibling(node);\n if (node && isComment(node)) {\n if (node.data === open) match++;\n if (node.data === close) {\n if (match === 0) {\n return nextSibling(node);\n } else {\n match--;\n }\n }\n }\n }\n return node;\n };\n const replaceNode = (newNode, oldNode, parentComponent) => {\n const parentNode2 = oldNode.parentNode;\n if (parentNode2) {\n parentNode2.replaceChild(newNode, oldNode);\n }\n let parent = parentComponent;\n while (parent) {\n if (parent.vnode.el === oldNode) {\n parent.vnode.el = parent.subTree.el = newNode;\n }\n parent = parent.parent;\n }\n };\n const isTemplateNode = (node) => {\n return node.nodeType === 1 && node.tagName === \"TEMPLATE\";\n };\n return [hydrate, hydrateNode];\n}\nfunction propHasMismatch(el, key, clientValue, vnode, instance) {\n let mismatchType;\n let mismatchKey;\n let actual;\n let expected;\n if (key === \"class\") {\n if (el.$cls) {\n actual = el.$cls;\n delete el.$cls;\n } else {\n actual = el.getAttribute(\"class\");\n }\n expected = normalizeClass(clientValue);\n if (!isSetEqual(toClassSet(actual || \"\"), toClassSet(expected))) {\n mismatchType = 2 /* CLASS */;\n mismatchKey = `class`;\n }\n } else if (key === \"style\") {\n actual = el.getAttribute(\"style\") || \"\";\n expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));\n const actualMap = toStyleMap(actual);\n const expectedMap = toStyleMap(expected);\n if (vnode.dirs) {\n for (const { dir, value } of vnode.dirs) {\n if (dir.name === \"show\" && !value) {\n expectedMap.set(\"display\", \"none\");\n }\n }\n }\n if (instance) {\n resolveCssVars(instance, vnode, expectedMap);\n }\n if (!isMapEqual(actualMap, expectedMap)) {\n mismatchType = 3 /* STYLE */;\n mismatchKey = \"style\";\n }\n } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {\n if (isBooleanAttr(key)) {\n actual = el.hasAttribute(key);\n expected = includeBooleanAttr(clientValue);\n } else if (clientValue == null) {\n actual = el.hasAttribute(key);\n expected = false;\n } else {\n if (el.hasAttribute(key)) {\n actual = el.getAttribute(key);\n } else if (key === \"value\" && el.tagName === \"TEXTAREA\") {\n actual = el.value;\n } else {\n actual = false;\n }\n expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;\n }\n if (actual !== expected) {\n mismatchType = 4 /* ATTRIBUTE */;\n mismatchKey = key;\n }\n }\n if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {\n const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}=\"${v}\"`;\n const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`;\n const postSegment = `\n - rendered on server: ${format(actual)}\n - expected on client: ${format(expected)}\n Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.\n You should fix the source of the mismatch.`;\n {\n warn$1(preSegment, el, postSegment);\n }\n return true;\n }\n return false;\n}\nfunction toClassSet(str) {\n return new Set(str.trim().split(/\\s+/));\n}\nfunction isSetEqual(a, b) {\n if (a.size !== b.size) {\n return false;\n }\n for (const s of a) {\n if (!b.has(s)) {\n return false;\n }\n }\n return true;\n}\nfunction toStyleMap(str) {\n const styleMap = /* @__PURE__ */ new Map();\n for (const item of str.split(\";\")) {\n let [key, value] = item.split(\":\");\n key = key.trim();\n value = value && value.trim();\n if (key && value) {\n styleMap.set(key, value);\n }\n }\n return styleMap;\n}\nfunction isMapEqual(a, b) {\n if (a.size !== b.size) {\n return false;\n }\n for (const [key, value] of a) {\n if (value !== b.get(key)) {\n return false;\n }\n }\n return true;\n}\nfunction resolveCssVars(instance, vnode, expectedMap) {\n const root = instance.subTree;\n if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {\n const cssVars = instance.getCssVars();\n for (const key in cssVars) {\n expectedMap.set(\n `--${getEscapedCssVarName(key, false)}`,\n String(cssVars[key])\n );\n }\n }\n if (vnode === root && instance.parent) {\n resolveCssVars(instance.parent, instance.vnode, expectedMap);\n }\n}\nconst allowMismatchAttr = \"data-allow-mismatch\";\nconst MismatchTypeString = {\n [0 /* TEXT */]: \"text\",\n [1 /* CHILDREN */]: \"children\",\n [2 /* CLASS */]: \"class\",\n [3 /* STYLE */]: \"style\",\n [4 /* ATTRIBUTE */]: \"attribute\"\n};\nfunction isMismatchAllowed(el, allowedType) {\n if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) {\n while (el && !el.hasAttribute(allowMismatchAttr)) {\n el = el.parentElement;\n }\n }\n const allowedAttr = el && el.getAttribute(allowMismatchAttr);\n if (allowedAttr == null) {\n return false;\n } else if (allowedAttr === \"\") {\n return true;\n } else {\n const list = allowedAttr.split(\",\");\n if (allowedType === 0 /* TEXT */ && list.includes(\"children\")) {\n return true;\n }\n return allowedAttr.split(\",\").includes(MismatchTypeString[allowedType]);\n }\n}\n\nconst requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));\nconst cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));\nconst hydrateOnIdle = (timeout = 1e4) => (hydrate) => {\n const id = requestIdleCallback(hydrate, { timeout });\n return () => cancelIdleCallback(id);\n};\nfunction elementIsVisibleInViewport(el) {\n const { top, left, bottom, right } = el.getBoundingClientRect();\n const { innerHeight, innerWidth } = window;\n return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);\n}\nconst hydrateOnVisible = (opts) => (hydrate, forEach) => {\n const ob = new IntersectionObserver((entries) => {\n for (const e of entries) {\n if (!e.isIntersecting) continue;\n ob.disconnect();\n hydrate();\n break;\n }\n }, opts);\n forEach((el) => {\n if (!(el instanceof Element)) return;\n if (elementIsVisibleInViewport(el)) {\n hydrate();\n ob.disconnect();\n return false;\n }\n ob.observe(el);\n });\n return () => ob.disconnect();\n};\nconst hydrateOnMediaQuery = (query) => (hydrate) => {\n if (query) {\n const mql = matchMedia(query);\n if (mql.matches) {\n hydrate();\n } else {\n mql.addEventListener(\"change\", hydrate, { once: true });\n return () => mql.removeEventListener(\"change\", hydrate);\n }\n }\n};\nconst hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {\n if (isString(interactions)) interactions = [interactions];\n let hasHydrated = false;\n const doHydrate = (e) => {\n if (!hasHydrated) {\n hasHydrated = true;\n teardown();\n hydrate();\n e.target.dispatchEvent(new e.constructor(e.type, e));\n }\n };\n const teardown = () => {\n forEach((el) => {\n for (const i of interactions) {\n el.removeEventListener(i, doHydrate);\n }\n });\n };\n forEach((el) => {\n for (const i of interactions) {\n el.addEventListener(i, doHydrate, { once: true });\n }\n });\n return teardown;\n};\nfunction forEachElement(node, cb) {\n if (isComment(node) && node.data === \"[\") {\n let depth = 1;\n let next = node.nextSibling;\n while (next) {\n if (next.nodeType === 1) {\n const result = cb(next);\n if (result === false) {\n break;\n }\n } else if (isComment(next)) {\n if (next.data === \"]\") {\n if (--depth === 0) break;\n } else if (next.data === \"[\") {\n depth++;\n }\n }\n next = next.nextSibling;\n }\n } else {\n cb(node);\n }\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineAsyncComponent(source) {\n if (isFunction(source)) {\n source = { loader: source };\n }\n const {\n loader,\n loadingComponent,\n errorComponent,\n delay = 200,\n hydrate: hydrateStrategy,\n timeout,\n // undefined = never times out\n suspensible = true,\n onError: userOnError\n } = source;\n let pendingRequest = null;\n let resolvedComp;\n let retries = 0;\n const retry = () => {\n retries++;\n pendingRequest = null;\n return load();\n };\n const load = () => {\n let thisRequest;\n return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n err = err instanceof Error ? err : new Error(String(err));\n if (userOnError) {\n return new Promise((resolve, reject) => {\n const userRetry = () => resolve(retry());\n const userFail = () => reject(err);\n userOnError(err, userRetry, userFail, retries + 1);\n });\n } else {\n throw err;\n }\n }).then((comp) => {\n if (thisRequest !== pendingRequest && pendingRequest) {\n return pendingRequest;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n warn$1(\n `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n );\n }\n if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n comp = comp.default;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n throw new Error(`Invalid async component load result: ${comp}`);\n }\n resolvedComp = comp;\n return comp;\n }));\n };\n return defineComponent({\n name: \"AsyncComponentWrapper\",\n __asyncLoader: load,\n __asyncHydrate(el, instance, hydrate) {\n let patched = false;\n const doHydrate = hydrateStrategy ? () => {\n const performHydrate = () => {\n if (!!(process.env.NODE_ENV !== \"production\") && patched) {\n warn$1(\n `Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`\n );\n return;\n }\n hydrate();\n };\n const teardown = hydrateStrategy(\n performHydrate,\n (cb) => forEachElement(el, cb)\n );\n if (teardown) {\n (instance.bum || (instance.bum = [])).push(teardown);\n }\n (instance.u || (instance.u = [])).push(() => patched = true);\n } : hydrate;\n if (resolvedComp) {\n doHydrate();\n } else {\n load().then(() => !instance.isUnmounted && doHydrate());\n }\n },\n get __asyncResolved() {\n return resolvedComp;\n },\n setup() {\n const instance = currentInstance;\n markAsyncBoundary(instance);\n if (resolvedComp) {\n return () => createInnerComp(resolvedComp, instance);\n }\n const onError = (err) => {\n pendingRequest = null;\n handleError(\n err,\n instance,\n 13,\n !errorComponent\n );\n };\n if (suspensible && instance.suspense || isInSSRComponentSetup) {\n return load().then((comp) => {\n return () => createInnerComp(comp, instance);\n }).catch((err) => {\n onError(err);\n return () => errorComponent ? createVNode(errorComponent, {\n error: err\n }) : null;\n });\n }\n const loaded = ref(false);\n const error = ref();\n const delayed = ref(!!delay);\n if (delay) {\n setTimeout(() => {\n delayed.value = false;\n }, delay);\n }\n if (timeout != null) {\n setTimeout(() => {\n if (!loaded.value && !error.value) {\n const err = new Error(\n `Async component timed out after ${timeout}ms.`\n );\n onError(err);\n error.value = err;\n }\n }, timeout);\n }\n load().then(() => {\n loaded.value = true;\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n instance.parent.update();\n }\n }).catch((err) => {\n onError(err);\n error.value = err;\n });\n return () => {\n if (loaded.value && resolvedComp) {\n return createInnerComp(resolvedComp, instance);\n } else if (error.value && errorComponent) {\n return createVNode(errorComponent, {\n error: error.value\n });\n } else if (loadingComponent && !delayed.value) {\n return createVNode(loadingComponent);\n }\n };\n }\n });\n}\nfunction createInnerComp(comp, parent) {\n const { ref: ref2, props, children, ce } = parent.vnode;\n const vnode = createVNode(comp, props, children);\n vnode.ref = ref2;\n vnode.ce = ce;\n delete parent.vnode.ce;\n return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n name: `KeepAlive`,\n // Marker for special handling inside the renderer. We are not using a ===\n // check directly on KeepAlive in the renderer, because importing it directly\n // would prevent it from being tree-shaken.\n __isKeepAlive: true,\n props: {\n include: [String, RegExp, Array],\n exclude: [String, RegExp, Array],\n max: [String, Number]\n },\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const sharedContext = instance.ctx;\n if (!sharedContext.renderer) {\n return () => {\n const children = slots.default && slots.default();\n return children && children.length === 1 ? children[0] : children;\n };\n }\n const cache = /* @__PURE__ */ new Map();\n const keys = /* @__PURE__ */ new Set();\n let current = null;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n instance.__v_cache = cache;\n }\n const parentSuspense = instance.suspense;\n const {\n renderer: {\n p: patch,\n m: move,\n um: _unmount,\n o: { createElement }\n }\n } = sharedContext;\n const storageContainer = createElement(\"div\");\n sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {\n const instance2 = vnode.component;\n move(vnode, container, anchor, 0, parentSuspense);\n patch(\n instance2.vnode,\n vnode,\n container,\n anchor,\n instance2,\n parentSuspense,\n namespace,\n vnode.slotScopeIds,\n optimized\n );\n queuePostRenderEffect(() => {\n instance2.isDeactivated = false;\n if (instance2.a) {\n invokeArrayFns(instance2.a);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n sharedContext.deactivate = (vnode) => {\n const instance2 = vnode.component;\n invalidateMount(instance2.m);\n invalidateMount(instance2.a);\n move(vnode, storageContainer, null, 1, parentSuspense);\n queuePostRenderEffect(() => {\n if (instance2.da) {\n invokeArrayFns(instance2.da);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n instance2.isDeactivated = true;\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n if (!!(process.env.NODE_ENV !== \"production\") && true) {\n instance2.__keepAliveStorageContainer = storageContainer;\n }\n };\n function unmount(vnode) {\n resetShapeFlag(vnode);\n _unmount(vnode, instance, parentSuspense, true);\n }\n function pruneCache(filter) {\n cache.forEach((vnode, key) => {\n const name = getComponentName(vnode.type);\n if (name && !filter(name)) {\n pruneCacheEntry(key);\n }\n });\n }\n function pruneCacheEntry(key) {\n const cached = cache.get(key);\n if (cached && (!current || !isSameVNodeType(cached, current))) {\n unmount(cached);\n } else if (current) {\n resetShapeFlag(current);\n }\n cache.delete(key);\n keys.delete(key);\n }\n watch(\n () => [props.include, props.exclude],\n ([include, exclude]) => {\n include && pruneCache((name) => matches(include, name));\n exclude && pruneCache((name) => !matches(exclude, name));\n },\n // prune post-render after `current` has been updated\n { flush: \"post\", deep: true }\n );\n let pendingCacheKey = null;\n const cacheSubtree = () => {\n if (pendingCacheKey != null) {\n if (isSuspense(instance.subTree.type)) {\n queuePostRenderEffect(() => {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }, instance.subTree.suspense);\n } else {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }\n }\n };\n onMounted(cacheSubtree);\n onUpdated(cacheSubtree);\n onBeforeUnmount(() => {\n cache.forEach((cached) => {\n const { subTree, suspense } = instance;\n const vnode = getInnerChild(subTree);\n if (cached.type === vnode.type && cached.key === vnode.key) {\n resetShapeFlag(vnode);\n const da = vnode.component.da;\n da && queuePostRenderEffect(da, suspense);\n return;\n }\n unmount(cached);\n });\n });\n return () => {\n pendingCacheKey = null;\n if (!slots.default) {\n return current = null;\n }\n const children = slots.default();\n const rawVNode = children[0];\n if (children.length > 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`KeepAlive should contain exactly one component child.`);\n }\n current = null;\n return children;\n } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n current = null;\n return rawVNode;\n }\n let vnode = getInnerChild(rawVNode);\n if (vnode.type === Comment) {\n current = null;\n return vnode;\n }\n const comp = vnode.type;\n const name = getComponentName(\n isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n );\n const { include, exclude, max } = props;\n if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n vnode.shapeFlag &= -257;\n current = vnode;\n return rawVNode;\n }\n const key = vnode.key == null ? comp : vnode.key;\n const cachedVNode = cache.get(key);\n if (vnode.el) {\n vnode = cloneVNode(vnode);\n if (rawVNode.shapeFlag & 128) {\n rawVNode.ssContent = vnode;\n }\n }\n pendingCacheKey = key;\n if (cachedVNode) {\n vnode.el = cachedVNode.el;\n vnode.component = cachedVNode.component;\n if (vnode.transition) {\n setTransitionHooks(vnode, vnode.transition);\n }\n vnode.shapeFlag |= 512;\n keys.delete(key);\n keys.add(key);\n } else {\n keys.add(key);\n if (max && keys.size > parseInt(max, 10)) {\n pruneCacheEntry(keys.values().next().value);\n }\n }\n vnode.shapeFlag |= 256;\n current = vnode;\n return isSuspense(rawVNode.type) ? rawVNode : vnode;\n };\n }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n if (isArray(pattern)) {\n return pattern.some((p) => matches(p, name));\n } else if (isString(pattern)) {\n return pattern.split(\",\").includes(name);\n } else if (isRegExp(pattern)) {\n pattern.lastIndex = 0;\n return pattern.test(name);\n }\n return false;\n}\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\nfunction resetShapeFlag(vnode) {\n vnode.shapeFlag &= -257;\n vnode.shapeFlag &= -513;\n}\nfunction getInnerChild(vnode) {\n return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n pauseTracking();\n const reset = setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n reset();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, \"\"));\n warn$1(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => {\n if (!isInSSRComponentSetup || lifecycle === \"sp\") {\n injectHook(lifecycle, (...args) => hook(...args), target);\n }\n};\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\n \"bu\"\n);\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\n \"bum\"\n);\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\n \"sp\"\n);\nconst onRenderTriggered = createHook(\"rtg\");\nconst onRenderTracked = createHook(\"rtc\");\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n if (isString(component)) {\n return resolveAsset(COMPONENTS, component, false) || component;\n } else {\n return component || NULL_DYNAMIC_COMPONENT;\n }\n}\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n let ret;\n const cached = cache && cache[index];\n const sourceIsArray = isArray(source);\n if (sourceIsArray || isString(source)) {\n const sourceIsReactiveArray = sourceIsArray && isReactive(source);\n let needsWrap = false;\n let isReadonlySource = false;\n if (sourceIsReactiveArray) {\n needsWrap = !isShallow(source);\n isReadonlySource = isReadonly(source);\n source = shallowReadArray(source);\n }\n ret = new Array(source.length);\n for (let i = 0, l = source.length; i < l; i++) {\n ret[i] = renderItem(\n needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],\n i,\n void 0,\n cached && cached[i]\n );\n }\n } else if (typeof source === \"number\") {\n if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n warn$1(`The v-for range expect an integer value but got ${source}.`);\n }\n ret = new Array(source);\n for (let i = 0; i < source; i++) {\n ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n }\n } else if (isObject(source)) {\n if (source[Symbol.iterator]) {\n ret = Array.from(\n source,\n (item, i) => renderItem(item, i, void 0, cached && cached[i])\n );\n } else {\n const keys = Object.keys(source);\n ret = new Array(keys.length);\n for (let i = 0, l = keys.length; i < l; i++) {\n const key = keys[i];\n ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n }\n }\n } else {\n ret = [];\n }\n if (cache) {\n cache[index] = ret;\n }\n return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n for (let i = 0; i < dynamicSlots.length; i++) {\n const slot = dynamicSlots[i];\n if (isArray(slot)) {\n for (let j = 0; j < slot.length; j++) {\n slots[slot[j].name] = slot[j].fn;\n }\n } else if (slot) {\n slots[slot.name] = slot.key ? (...args) => {\n const res = slot.fn(...args);\n if (res) res.key = slot.key;\n return res;\n } : slot.fn;\n }\n }\n return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {\n if (name !== \"default\") props.name = name;\n return openBlock(), createBlock(\n Fragment,\n null,\n [createVNode(\"slot\", props, fallback && fallback())],\n 64\n );\n }\n let slot = slots[name];\n if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n warn$1(\n `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n );\n slot = () => [];\n }\n if (slot && slot._c) {\n slot._d = false;\n }\n openBlock();\n const validSlotContent = slot && ensureValidVNode(slot(props));\n const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch\n // key attached in the `createSlots` helper, respect that\n validSlotContent && validSlotContent.key;\n const rendered = createBlock(\n Fragment,\n {\n key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content\n (!validSlotContent && fallback ? \"_fb\" : \"\")\n },\n validSlotContent || (fallback ? fallback() : []),\n validSlotContent && slots._ === 1 ? 64 : -2\n );\n if (!noSlotted && rendered.scopeId) {\n rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n }\n if (slot && slot._c) {\n slot._d = true;\n }\n return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n return vnodes.some((child) => {\n if (!isVNode(child)) return true;\n if (child.type === Comment) return false;\n if (child.type === Fragment && !ensureValidVNode(child.children))\n return false;\n return true;\n }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn$1(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i) return null;\n if (isStatefulComponent(i)) return getComponentPublicInstance(i);\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n $el: (i) => i.vnode.el,\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $host: (i) => i.ce,\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => {\n queueJob(i.update);\n }),\n $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n if (key === \"__v_skip\") {\n return true;\n }\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance.attrs, \"get\", \"\");\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn$1(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn$1(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn$1(`Cannot mutate <script setup> binding \"${key}\" from Options API.`);\n return false;\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n data[key] = value;\n return true;\n } else if (hasOwn(instance.props, key)) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`Attempting to mutate prop \"${key}\". Props are readonly.`);\n return false;\n }\n if (key[0] === \"$\" && key.slice(1) in instance) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\n `Attempting to mutate public property \"${key}\". Properties starting with $ are reserved and readonly.`\n );\n return false;\n } else {\n if (!!(process.env.NODE_ENV !== \"production\") && key in instance.appContext.config.globalProperties) {\n Object.defineProperty(ctx, key, {\n enumerable: true,\n configurable: true,\n value\n });\n } else {\n ctx[key] = value;\n }\n }\n return true;\n },\n has({\n _: { data, setupState, accessCache, ctx, appContext, propsOptions }\n }, key) {\n let normalizedProps;\n return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);\n },\n defineProperty(target, key, descriptor) {\n if (descriptor.get != null) {\n target._.accessCache[key] = 0;\n } else if (hasOwn(descriptor, \"value\")) {\n this.set(target, key, descriptor.value, null);\n }\n return Reflect.defineProperty(target, key, descriptor);\n }\n};\nif (!!(process.env.NODE_ENV !== \"production\") && true) {\n PublicInstanceProxyHandlers.ownKeys = (target) => {\n warn$1(\n `Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`\n );\n return Reflect.ownKeys(target);\n };\n}\nconst RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend({}, PublicInstanceProxyHandlers, {\n get(target, key) {\n if (key === Symbol.unscopables) {\n return;\n }\n return PublicInstanceProxyHandlers.get(target, key, target);\n },\n has(_, key) {\n const has = key[0] !== \"_\" && !isGloballyAllowed(key);\n if (!!(process.env.NODE_ENV !== \"production\") && !has && PublicInstanceProxyHandlers.has(_, key)) {\n warn$1(\n `Property ${JSON.stringify(\n key\n )} should not start with _ which is a reserved prefix for Vue internals.`\n );\n }\n return has;\n }\n});\nfunction createDevRenderContext(instance) {\n const target = {};\n Object.defineProperty(target, `_`, {\n configurable: true,\n enumerable: false,\n get: () => instance\n });\n Object.keys(publicPropertiesMap).forEach((key) => {\n Object.defineProperty(target, key, {\n configurable: true,\n enumerable: false,\n get: () => publicPropertiesMap[key](instance),\n // intercepted by the proxy so no need for implementation,\n // but needed to prevent set errors\n set: NOOP\n });\n });\n return target;\n}\nfunction exposePropsOnRenderContext(instance) {\n const {\n ctx,\n propsOptions: [propsOptions]\n } = instance;\n if (propsOptions) {\n Object.keys(propsOptions).forEach((key) => {\n Object.defineProperty(ctx, key, {\n enumerable: true,\n configurable: true,\n get: () => instance.props[key],\n set: NOOP\n });\n });\n }\n}\nfunction exposeSetupStateOnRenderContext(instance) {\n const { ctx, setupState } = instance;\n Object.keys(toRaw(setupState)).forEach((key) => {\n if (!setupState.__isScriptSetup) {\n if (isReservedPrefix(key[0])) {\n warn$1(\n `setup() return property ${JSON.stringify(\n key\n )} should not start with \"$\" or \"_\" which are reserved prefixes for Vue internals.`\n );\n return;\n }\n Object.defineProperty(ctx, key, {\n enumerable: true,\n configurable: true,\n get: () => setupState[key],\n set: NOOP\n });\n }\n });\n}\n\nconst warnRuntimeUsage = (method) => warn$1(\n `${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`\n);\nfunction defineProps() {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warnRuntimeUsage(`defineProps`);\n }\n return null;\n}\nfunction defineEmits() {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warnRuntimeUsage(`defineEmits`);\n }\n return null;\n}\nfunction defineExpose(exposed) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warnRuntimeUsage(`defineExpose`);\n }\n}\nfunction defineOptions(options) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warnRuntimeUsage(`defineOptions`);\n }\n}\nfunction defineSlots() {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warnRuntimeUsage(`defineSlots`);\n }\n return null;\n}\nfunction defineModel() {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warnRuntimeUsage(\"defineModel\");\n }\n}\nfunction withDefaults(props, defaults) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warnRuntimeUsage(`withDefaults`);\n }\n return null;\n}\nfunction useSlots() {\n return getContext().slots;\n}\nfunction useAttrs() {\n return getContext().attrs;\n}\nfunction getContext() {\n const i = getCurrentInstance();\n if (!!(process.env.NODE_ENV !== \"production\") && !i) {\n warn$1(`useContext() called without active instance.`);\n }\n return i.setupContext || (i.setupContext = createSetupContext(i));\n}\nfunction normalizePropsOrEmits(props) {\n return isArray(props) ? props.reduce(\n (normalized, p) => (normalized[p] = null, normalized),\n {}\n ) : props;\n}\nfunction mergeDefaults(raw, defaults) {\n const props = normalizePropsOrEmits(raw);\n for (const key in defaults) {\n if (key.startsWith(\"__skip\")) continue;\n let opt = props[key];\n if (opt) {\n if (isArray(opt) || isFunction(opt)) {\n opt = props[key] = { type: opt, default: defaults[key] };\n } else {\n opt.default = defaults[key];\n }\n } else if (opt === null) {\n opt = props[key] = { default: defaults[key] };\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`props default key \"${key}\" has no corresponding declaration.`);\n }\n if (opt && defaults[`__skip_${key}`]) {\n opt.skipFactory = true;\n }\n }\n return props;\n}\nfunction mergeModels(a, b) {\n if (!a || !b) return a || b;\n if (isArray(a) && isArray(b)) return a.concat(b);\n return extend({}, normalizePropsOrEmits(a), normalizePropsOrEmits(b));\n}\nfunction createPropsRestProxy(props, excludedKeys) {\n const ret = {};\n for (const key in props) {\n if (!excludedKeys.includes(key)) {\n Object.defineProperty(ret, key, {\n enumerable: true,\n get: () => props[key]\n });\n }\n }\n return ret;\n}\nfunction withAsyncContext(getAwaitable) {\n const ctx = getCurrentInstance();\n if (!!(process.env.NODE_ENV !== \"production\") && !ctx) {\n warn$1(\n `withAsyncContext called without active current instance. This is likely a bug.`\n );\n }\n let awaitable = getAwaitable();\n unsetCurrentInstance();\n if (isPromise(awaitable)) {\n awaitable = awaitable.catch((e) => {\n setCurrentInstance(ctx);\n throw e;\n });\n }\n return [awaitable, () => setCurrentInstance(ctx)];\n}\n\nfunction createDuplicateChecker() {\n const cache = /* @__PURE__ */ Object.create(null);\n return (type, key) => {\n if (cache[key]) {\n warn$1(`${type} property \"${key}\" is already defined in ${cache[key]}.`);\n } else {\n cache[key] = type;\n }\n };\n}\nlet shouldCacheAccess = true;\nfunction applyOptions(instance) {\n const options = resolveMergedOptions(instance);\n const publicThis = instance.proxy;\n const ctx = instance.ctx;\n shouldCacheAccess = false;\n if (options.beforeCreate) {\n callHook(options.beforeCreate, instance, \"bc\");\n }\n const {\n // state\n data: dataOptions,\n computed: computedOptions,\n methods,\n watch: watchOptions,\n provide: provideOptions,\n inject: injectOptions,\n // lifecycle\n created,\n beforeMount,\n mounted,\n beforeUpdate,\n updated,\n activated,\n deactivated,\n beforeDestroy,\n beforeUnmount,\n destroyed,\n unmounted,\n render,\n renderTracked,\n renderTriggered,\n errorCaptured,\n serverPrefetch,\n // public API\n expose,\n inheritAttrs,\n // assets\n components,\n directives,\n filters\n } = options;\n const checkDuplicateProperties = !!(process.env.NODE_ENV !== \"production\") ? createDuplicateChecker() : null;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const [propsOptions] = instance.propsOptions;\n if (propsOptions) {\n for (const key in propsOptions) {\n checkDuplicateProperties(\"Props\" /* PROPS */, key);\n }\n }\n }\n if (injectOptions) {\n resolveInjections(injectOptions, ctx, checkDuplicateProperties);\n }\n if (methods) {\n for (const key in methods) {\n const methodHandler = methods[key];\n if (isFunction(methodHandler)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n Object.defineProperty(ctx, key, {\n value: methodHandler.bind(publicThis),\n configurable: true,\n enumerable: true,\n writable: true\n });\n } else {\n ctx[key] = methodHandler.bind(publicThis);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n checkDuplicateProperties(\"Methods\" /* METHODS */, key);\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `Method \"${key}\" has type \"${typeof methodHandler}\" in the component definition. Did you reference the function correctly?`\n );\n }\n }\n }\n if (dataOptions) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(dataOptions)) {\n warn$1(\n `The data option must be a function. Plain object usage is no longer supported.`\n );\n }\n const data = dataOptions.call(publicThis, publicThis);\n if (!!(process.env.NODE_ENV !== \"production\") && isPromise(data)) {\n warn$1(\n `data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`\n );\n }\n if (!isObject(data)) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`data() should return an object.`);\n } else {\n instance.data = reactive(data);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n for (const key in data) {\n checkDuplicateProperties(\"Data\" /* DATA */, key);\n if (!isReservedPrefix(key[0])) {\n Object.defineProperty(ctx, key, {\n configurable: true,\n enumerable: true,\n get: () => data[key],\n set: NOOP\n });\n }\n }\n }\n }\n }\n shouldCacheAccess = true;\n if (computedOptions) {\n for (const key in computedOptions) {\n const opt = computedOptions[key];\n const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;\n if (!!(process.env.NODE_ENV !== \"production\") && get === NOOP) {\n warn$1(`Computed property \"${key}\" has no getter.`);\n }\n const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== \"production\") ? () => {\n warn$1(\n `Write operation failed: computed property \"${key}\" is readonly.`\n );\n } : NOOP;\n const c = computed({\n get,\n set\n });\n Object.defineProperty(ctx, key, {\n enumerable: true,\n configurable: true,\n get: () => c.value,\n set: (v) => c.value = v\n });\n if (!!(process.env.NODE_ENV !== \"production\")) {\n checkDuplicateProperties(\"Computed\" /* COMPUTED */, key);\n }\n }\n }\n if (watchOptions) {\n for (const key in watchOptions) {\n createWatcher(watchOptions[key], ctx, publicThis, key);\n }\n }\n if (provideOptions) {\n const provides = isFunction(provideOptions) ? provideOptions.call(publicThis) : provideOptions;\n Reflect.ownKeys(provides).forEach((key) => {\n provide(key, provides[key]);\n });\n }\n if (created) {\n callHook(created, instance, \"c\");\n }\n function registerLifecycleHook(register, hook) {\n if (isArray(hook)) {\n hook.forEach((_hook) => register(_hook.bind(publicThis)));\n } else if (hook) {\n register(hook.bind(publicThis));\n }\n }\n registerLifecycleHook(onBeforeMount, beforeMount);\n registerLifecycleHook(onMounted, mounted);\n registerLifecycleHook(onBeforeUpdate, beforeUpdate);\n registerLifecycleHook(onUpdated, updated);\n registerLifecycleHook(onActivated, activated);\n registerLifecycleHook(onDeactivated, deactivated);\n registerLifecycleHook(onErrorCaptured, errorCaptured);\n registerLifecycleHook(onRenderTracked, renderTracked);\n registerLifecycleHook(onRenderTriggered, renderTriggered);\n registerLifecycleHook(onBeforeUnmount, beforeUnmount);\n registerLifecycleHook(onUnmounted, unmounted);\n registerLifecycleHook(onServerPrefetch, serverPrefetch);\n if (isArray(expose)) {\n if (expose.length) {\n const exposed = instance.exposed || (instance.exposed = {});\n expose.forEach((key) => {\n Object.defineProperty(exposed, key, {\n get: () => publicThis[key],\n set: (val) => publicThis[key] = val\n });\n });\n } else if (!instance.exposed) {\n instance.exposed = {};\n }\n }\n if (render && instance.render === NOOP) {\n instance.render = render;\n }\n if (inheritAttrs != null) {\n instance.inheritAttrs = inheritAttrs;\n }\n if (components) instance.components = components;\n if (directives) instance.directives = directives;\n if (serverPrefetch) {\n markAsyncBoundary(instance);\n }\n}\nfunction resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP) {\n if (isArray(injectOptions)) {\n injectOptions = normalizeInject(injectOptions);\n }\n for (const key in injectOptions) {\n const opt = injectOptions[key];\n let injected;\n if (isObject(opt)) {\n if (\"default\" in opt) {\n injected = inject(\n opt.from || key,\n opt.default,\n true\n );\n } else {\n injected = inject(opt.from || key);\n }\n } else {\n injected = inject(opt);\n }\n if (isRef(injected)) {\n Object.defineProperty(ctx, key, {\n enumerable: true,\n configurable: true,\n get: () => injected.value,\n set: (v) => injected.value = v\n });\n } else {\n ctx[key] = injected;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n checkDuplicateProperties(\"Inject\" /* INJECT */, key);\n }\n }\n}\nfunction callHook(hook, instance, type) {\n callWithAsyncErrorHandling(\n isArray(hook) ? hook.map((h) => h.bind(instance.proxy)) : hook.bind(instance.proxy),\n instance,\n type\n );\n}\nfunction createWatcher(raw, ctx, publicThis, key) {\n let getter = key.includes(\".\") ? createPathGetter(publicThis, key) : () => publicThis[key];\n if (isString(raw)) {\n const handler = ctx[raw];\n if (isFunction(handler)) {\n {\n watch(getter, handler);\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`Invalid watch handler specified by key \"${raw}\"`, handler);\n }\n } else if (isFunction(raw)) {\n {\n watch(getter, raw.bind(publicThis));\n }\n } else if (isObject(raw)) {\n if (isArray(raw)) {\n raw.forEach((r) => createWatcher(r, ctx, publicThis, key));\n } else {\n const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];\n if (isFunction(handler)) {\n watch(getter, handler, raw);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`Invalid watch handler specified by key \"${raw.handler}\"`, handler);\n }\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`Invalid watch option: \"${key}\"`, raw);\n }\n}\nfunction resolveMergedOptions(instance) {\n const base = instance.type;\n const { mixins, extends: extendsOptions } = base;\n const {\n mixins: globalMixins,\n optionsCache: cache,\n config: { optionMergeStrategies }\n } = instance.appContext;\n const cached = cache.get(base);\n let resolved;\n if (cached) {\n resolved = cached;\n } else if (!globalMixins.length && !mixins && !extendsOptions) {\n {\n resolved = base;\n }\n } else {\n resolved = {};\n if (globalMixins.length) {\n globalMixins.forEach(\n (m) => mergeOptions(resolved, m, optionMergeStrategies, true)\n );\n }\n mergeOptions(resolved, base, optionMergeStrategies);\n }\n if (isObject(base)) {\n cache.set(base, resolved);\n }\n return resolved;\n}\nfunction mergeOptions(to, from, strats, asMixin = false) {\n const { mixins, extends: extendsOptions } = from;\n if (extendsOptions) {\n mergeOptions(to, extendsOptions, strats, true);\n }\n if (mixins) {\n mixins.forEach(\n (m) => mergeOptions(to, m, strats, true)\n );\n }\n for (const key in from) {\n if (asMixin && key === \"expose\") {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\n `\"expose\" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`\n );\n } else {\n const strat = internalOptionMergeStrats[key] || strats && strats[key];\n to[key] = strat ? strat(to[key], from[key]) : from[key];\n }\n }\n return to;\n}\nconst internalOptionMergeStrats = {\n data: mergeDataFn,\n props: mergeEmitsOrPropsOptions,\n emits: mergeEmitsOrPropsOptions,\n // objects\n methods: mergeObjectOptions,\n computed: mergeObjectOptions,\n // lifecycle\n beforeCreate: mergeAsArray,\n created: mergeAsArray,\n beforeMount: mergeAsArray,\n mounted: mergeAsArray,\n beforeUpdate: mergeAsArray,\n updated: mergeAsArray,\n beforeDestroy: mergeAsArray,\n beforeUnmount: mergeAsArray,\n destroyed: mergeAsArray,\n unmounted: mergeAsArray,\n activated: mergeAsArray,\n deactivated: mergeAsArray,\n errorCaptured: mergeAsArray,\n serverPrefetch: mergeAsArray,\n // assets\n components: mergeObjectOptions,\n directives: mergeObjectOptions,\n // watch\n watch: mergeWatchOptions,\n // provide / inject\n provide: mergeDataFn,\n inject: mergeInject\n};\nfunction mergeDataFn(to, from) {\n if (!from) {\n return to;\n }\n if (!to) {\n return from;\n }\n return function mergedDataFn() {\n return (extend)(\n isFunction(to) ? to.call(this, this) : to,\n isFunction(from) ? from.call(this, this) : from\n );\n };\n}\nfunction mergeInject(to, from) {\n return mergeObjectOptions(normalizeInject(to), normalizeInject(from));\n}\nfunction normalizeInject(raw) {\n if (isArray(raw)) {\n const res = {};\n for (let i = 0; i < raw.length; i++) {\n res[raw[i]] = raw[i];\n }\n return res;\n }\n return raw;\n}\nfunction mergeAsArray(to, from) {\n return to ? [...new Set([].concat(to, from))] : from;\n}\nfunction mergeObjectOptions(to, from) {\n return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;\n}\nfunction mergeEmitsOrPropsOptions(to, from) {\n if (to) {\n if (isArray(to) && isArray(from)) {\n return [.../* @__PURE__ */ new Set([...to, ...from])];\n }\n return extend(\n /* @__PURE__ */ Object.create(null),\n normalizePropsOrEmits(to),\n normalizePropsOrEmits(from != null ? from : {})\n );\n } else {\n return from;\n }\n}\nfunction mergeWatchOptions(to, from) {\n if (!to) return from;\n if (!from) return to;\n const merged = extend(/* @__PURE__ */ Object.create(null), to);\n for (const key in from) {\n merged[key] = mergeAsArray(to[key], from[key]);\n }\n return merged;\n}\n\nfunction createAppContext() {\n return {\n app: null,\n config: {\n isNativeTag: NO,\n performance: false,\n globalProperties: {},\n optionMergeStrategies: {},\n errorHandler: void 0,\n warnHandler: void 0,\n compilerOptions: {}\n },\n mixins: [],\n components: {},\n directives: {},\n provides: /* @__PURE__ */ Object.create(null),\n optionsCache: /* @__PURE__ */ new WeakMap(),\n propsCache: /* @__PURE__ */ new WeakMap(),\n emitsCache: /* @__PURE__ */ new WeakMap()\n };\n}\nlet uid$1 = 0;\nfunction createAppAPI(render, hydrate) {\n return function createApp(rootComponent, rootProps = null) {\n if (!isFunction(rootComponent)) {\n rootComponent = extend({}, rootComponent);\n }\n if (rootProps != null && !isObject(rootProps)) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`root props passed to app.mount() must be an object.`);\n rootProps = null;\n }\n const context = createAppContext();\n const installedPlugins = /* @__PURE__ */ new WeakSet();\n const pluginCleanupFns = [];\n let isMounted = false;\n const app = context.app = {\n _uid: uid$1++,\n _component: rootComponent,\n _props: rootProps,\n _container: null,\n _context: context,\n _instance: null,\n version,\n get config() {\n return context.config;\n },\n set config(v) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `app.config cannot be replaced. Modify individual options instead.`\n );\n }\n },\n use(plugin, ...options) {\n if (installedPlugins.has(plugin)) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`Plugin has already been applied to target app.`);\n } else if (plugin && isFunction(plugin.install)) {\n installedPlugins.add(plugin);\n plugin.install(app, ...options);\n } else if (isFunction(plugin)) {\n installedPlugins.add(plugin);\n plugin(app, ...options);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `A plugin must either be a function or an object with an \"install\" function.`\n );\n }\n return app;\n },\n mixin(mixin) {\n if (__VUE_OPTIONS_API__) {\n if (!context.mixins.includes(mixin)) {\n context.mixins.push(mixin);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n \"Mixin has already been applied to target app\" + (mixin.name ? `: ${mixin.name}` : \"\")\n );\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\"Mixins are only available in builds supporting Options API\");\n }\n return app;\n },\n component(name, component) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n validateComponentName(name, context.config);\n }\n if (!component) {\n return context.components[name];\n }\n if (!!(process.env.NODE_ENV !== \"production\") && context.components[name]) {\n warn$1(`Component \"${name}\" has already been registered in target app.`);\n }\n context.components[name] = component;\n return app;\n },\n directive(name, directive) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n validateDirectiveName(name);\n }\n if (!directive) {\n return context.directives[name];\n }\n if (!!(process.env.NODE_ENV !== \"production\") && context.directives[name]) {\n warn$1(`Directive \"${name}\" has already been registered in target app.`);\n }\n context.directives[name] = directive;\n return app;\n },\n mount(rootContainer, isHydrate, namespace) {\n if (!isMounted) {\n if (!!(process.env.NODE_ENV !== \"production\") && rootContainer.__vue_app__) {\n warn$1(\n `There is already an app instance mounted on the host container.\n If you want to mount another app on the same host container, you need to unmount the previous app by calling \\`app.unmount()\\` first.`\n );\n }\n const vnode = app._ceVNode || createVNode(rootComponent, rootProps);\n vnode.appContext = context;\n if (namespace === true) {\n namespace = \"svg\";\n } else if (namespace === false) {\n namespace = void 0;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n context.reload = () => {\n const cloned = cloneVNode(vnode);\n cloned.el = null;\n render(cloned, rootContainer, namespace);\n };\n }\n if (isHydrate && hydrate) {\n hydrate(vnode, rootContainer);\n } else {\n render(vnode, rootContainer, namespace);\n }\n isMounted = true;\n app._container = rootContainer;\n rootContainer.__vue_app__ = app;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n app._instance = vnode.component;\n devtoolsInitApp(app, version);\n }\n return getComponentPublicInstance(vnode.component);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `App has already been mounted.\nIf you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \\`const createMyApp = () => createApp(App)\\``\n );\n }\n },\n onUnmount(cleanupFn) {\n if (!!(process.env.NODE_ENV !== \"production\") && typeof cleanupFn !== \"function\") {\n warn$1(\n `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`\n );\n }\n pluginCleanupFns.push(cleanupFn);\n },\n unmount() {\n if (isMounted) {\n callWithAsyncErrorHandling(\n pluginCleanupFns,\n app._instance,\n 16\n );\n render(null, app._container);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n app._instance = null;\n devtoolsUnmountApp(app);\n }\n delete app._container.__vue_app__;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`Cannot unmount an app that is not mounted.`);\n }\n },\n provide(key, value) {\n if (!!(process.env.NODE_ENV !== \"production\") && key in context.provides) {\n if (hasOwn(context.provides, key)) {\n warn$1(\n `App already provides property with key \"${String(key)}\". It will be overwritten with the new value.`\n );\n } else {\n warn$1(\n `App already provides property with key \"${String(key)}\" inherited from its parent element. It will be overwritten with the new value.`\n );\n }\n }\n context.provides[key] = value;\n return app;\n },\n runWithContext(fn) {\n const lastApp = currentApp;\n currentApp = app;\n try {\n return fn();\n } finally {\n currentApp = lastApp;\n }\n }\n };\n return app;\n };\n}\nlet currentApp = null;\n\nfunction provide(key, value) {\n if (!currentInstance) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`provide() can only be used inside setup().`);\n }\n } else {\n let provides = currentInstance.provides;\n const parentProvides = currentInstance.parent && currentInstance.parent.provides;\n if (parentProvides === provides) {\n provides = currentInstance.provides = Object.create(parentProvides);\n }\n provides[key] = value;\n }\n}\nfunction inject(key, defaultValue, treatDefaultAsFactory = false) {\n const instance = currentInstance || currentRenderingInstance;\n if (instance || currentApp) {\n let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;\n if (provides && key in provides) {\n return provides[key];\n } else if (arguments.length > 1) {\n return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`injection \"${String(key)}\" not found.`);\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`inject() can only be used inside setup() or functional components.`);\n }\n}\nfunction hasInjectionContext() {\n return !!(currentInstance || currentRenderingInstance || currentApp);\n}\n\nconst internalObjectProto = {};\nconst createInternalObject = () => Object.create(internalObjectProto);\nconst isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;\n\nfunction initProps(instance, rawProps, isStateful, isSSR = false) {\n const props = {};\n const attrs = createInternalObject();\n instance.propsDefaults = /* @__PURE__ */ Object.create(null);\n setFullProps(instance, rawProps, props, attrs);\n for (const key in instance.propsOptions[0]) {\n if (!(key in props)) {\n props[key] = void 0;\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n validateProps(rawProps || {}, props, instance);\n }\n if (isStateful) {\n instance.props = isSSR ? props : shallowReactive(props);\n } else {\n if (!instance.type.props) {\n instance.props = attrs;\n } else {\n instance.props = props;\n }\n }\n instance.attrs = attrs;\n}\nfunction isInHmrContext(instance) {\n while (instance) {\n if (instance.type.__hmrId) return true;\n instance = instance.parent;\n }\n}\nfunction updateProps(instance, rawProps, rawPrevProps, optimized) {\n const {\n props,\n attrs,\n vnode: { patchFlag }\n } = instance;\n const rawCurrentProps = toRaw(props);\n const [options] = instance.propsOptions;\n let hasAttrsChanged = false;\n if (\n // always force full diff in dev\n // - #1942 if hmr is enabled with sfc component\n // - vite#872 non-sfc component used by sfc component\n !(!!(process.env.NODE_ENV !== \"production\") && isInHmrContext(instance)) && (optimized || patchFlag > 0) && !(patchFlag & 16)\n ) {\n if (patchFlag & 8) {\n const propsToUpdate = instance.vnode.dynamicProps;\n for (let i = 0; i < propsToUpdate.length; i++) {\n let key = propsToUpdate[i];\n if (isEmitListener(instance.emitsOptions, key)) {\n continue;\n }\n const value = rawProps[key];\n if (options) {\n if (hasOwn(attrs, key)) {\n if (value !== attrs[key]) {\n attrs[key] = value;\n hasAttrsChanged = true;\n }\n } else {\n const camelizedKey = camelize(key);\n props[camelizedKey] = resolvePropValue(\n options,\n rawCurrentProps,\n camelizedKey,\n value,\n instance,\n false\n );\n }\n } else {\n if (value !== attrs[key]) {\n attrs[key] = value;\n hasAttrsChanged = true;\n }\n }\n }\n }\n } else {\n if (setFullProps(instance, rawProps, props, attrs)) {\n hasAttrsChanged = true;\n }\n let kebabKey;\n for (const key in rawCurrentProps) {\n if (!rawProps || // for camelCase\n !hasOwn(rawProps, key) && // it's possible the original props was passed in as kebab-case\n // and converted to camelCase (#955)\n ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {\n if (options) {\n if (rawPrevProps && // for camelCase\n (rawPrevProps[key] !== void 0 || // for kebab-case\n rawPrevProps[kebabKey] !== void 0)) {\n props[key] = resolvePropValue(\n options,\n rawCurrentProps,\n key,\n void 0,\n instance,\n true\n );\n }\n } else {\n delete props[key];\n }\n }\n }\n if (attrs !== rawCurrentProps) {\n for (const key in attrs) {\n if (!rawProps || !hasOwn(rawProps, key) && true) {\n delete attrs[key];\n hasAttrsChanged = true;\n }\n }\n }\n }\n if (hasAttrsChanged) {\n trigger(instance.attrs, \"set\", \"\");\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n validateProps(rawProps || {}, props, instance);\n }\n}\nfunction setFullProps(instance, rawProps, props, attrs) {\n const [options, needCastKeys] = instance.propsOptions;\n let hasAttrsChanged = false;\n let rawCastValues;\n if (rawProps) {\n for (let key in rawProps) {\n if (isReservedProp(key)) {\n continue;\n }\n const value = rawProps[key];\n let camelKey;\n if (options && hasOwn(options, camelKey = camelize(key))) {\n if (!needCastKeys || !needCastKeys.includes(camelKey)) {\n props[camelKey] = value;\n } else {\n (rawCastValues || (rawCastValues = {}))[camelKey] = value;\n }\n } else if (!isEmitListener(instance.emitsOptions, key)) {\n if (!(key in attrs) || value !== attrs[key]) {\n attrs[key] = value;\n hasAttrsChanged = true;\n }\n }\n }\n }\n if (needCastKeys) {\n const rawCurrentProps = toRaw(props);\n const castValues = rawCastValues || EMPTY_OBJ;\n for (let i = 0; i < needCastKeys.length; i++) {\n const key = needCastKeys[i];\n props[key] = resolvePropValue(\n options,\n rawCurrentProps,\n key,\n castValues[key],\n instance,\n !hasOwn(castValues, key)\n );\n }\n }\n return hasAttrsChanged;\n}\nfunction resolvePropValue(options, props, key, value, instance, isAbsent) {\n const opt = options[key];\n if (opt != null) {\n const hasDefault = hasOwn(opt, \"default\");\n if (hasDefault && value === void 0) {\n const defaultValue = opt.default;\n if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {\n const { propsDefaults } = instance;\n if (key in propsDefaults) {\n value = propsDefaults[key];\n } else {\n const reset = setCurrentInstance(instance);\n value = propsDefaults[key] = defaultValue.call(\n null,\n props\n );\n reset();\n }\n } else {\n value = defaultValue;\n }\n if (instance.ce) {\n instance.ce._setProp(key, value);\n }\n }\n if (opt[0 /* shouldCast */]) {\n if (isAbsent && !hasDefault) {\n value = false;\n } else if (opt[1 /* shouldCastTrue */] && (value === \"\" || value === hyphenate(key))) {\n value = true;\n }\n }\n }\n return value;\n}\nconst mixinPropsCache = /* @__PURE__ */ new WeakMap();\nfunction normalizePropsOptions(comp, appContext, asMixin = false) {\n const cache = __VUE_OPTIONS_API__ && asMixin ? mixinPropsCache : appContext.propsCache;\n const cached = cache.get(comp);\n if (cached) {\n return cached;\n }\n const raw = comp.props;\n const normalized = {};\n const needCastKeys = [];\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendProps = (raw2) => {\n hasExtends = true;\n const [props, keys] = normalizePropsOptions(raw2, appContext, true);\n extend(normalized, props);\n if (keys) needCastKeys.push(...keys);\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendProps);\n }\n if (comp.extends) {\n extendProps(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendProps);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, EMPTY_ARR);\n }\n return EMPTY_ARR;\n }\n if (isArray(raw)) {\n for (let i = 0; i < raw.length; i++) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isString(raw[i])) {\n warn$1(`props must be strings when using array syntax.`, raw[i]);\n }\n const normalizedKey = camelize(raw[i]);\n if (validatePropName(normalizedKey)) {\n normalized[normalizedKey] = EMPTY_OBJ;\n }\n }\n } else if (raw) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(raw)) {\n warn$1(`invalid props options`, raw);\n }\n for (const key in raw) {\n const normalizedKey = camelize(key);\n if (validatePropName(normalizedKey)) {\n const opt = raw[key];\n const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);\n const propType = prop.type;\n let shouldCast = false;\n let shouldCastTrue = true;\n if (isArray(propType)) {\n for (let index = 0; index < propType.length; ++index) {\n const type = propType[index];\n const typeName = isFunction(type) && type.name;\n if (typeName === \"Boolean\") {\n shouldCast = true;\n break;\n } else if (typeName === \"String\") {\n shouldCastTrue = false;\n }\n }\n } else {\n shouldCast = isFunction(propType) && propType.name === \"Boolean\";\n }\n prop[0 /* shouldCast */] = shouldCast;\n prop[1 /* shouldCastTrue */] = shouldCastTrue;\n if (shouldCast || hasOwn(prop, \"default\")) {\n needCastKeys.push(normalizedKey);\n }\n }\n }\n }\n const res = [normalized, needCastKeys];\n if (isObject(comp)) {\n cache.set(comp, res);\n }\n return res;\n}\nfunction validatePropName(key) {\n if (key[0] !== \"$\" && !isReservedProp(key)) {\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`Invalid prop name: \"${key}\" is a reserved property.`);\n }\n return false;\n}\nfunction getType(ctor) {\n if (ctor === null) {\n return \"null\";\n }\n if (typeof ctor === \"function\") {\n return ctor.name || \"\";\n } else if (typeof ctor === \"object\") {\n const name = ctor.constructor && ctor.constructor.name;\n return name || \"\";\n }\n return \"\";\n}\nfunction validateProps(rawProps, props, instance) {\n const resolvedValues = toRaw(props);\n const options = instance.propsOptions[0];\n const camelizePropsKey = Object.keys(rawProps).map((key) => camelize(key));\n for (const key in options) {\n let opt = options[key];\n if (opt == null) continue;\n validateProp(\n key,\n resolvedValues[key],\n opt,\n !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(resolvedValues) : resolvedValues,\n !camelizePropsKey.includes(key)\n );\n }\n}\nfunction validateProp(name, value, prop, props, isAbsent) {\n const { type, required, validator, skipCheck } = prop;\n if (required && isAbsent) {\n warn$1('Missing required prop: \"' + name + '\"');\n return;\n }\n if (value == null && !required) {\n return;\n }\n if (type != null && type !== true && !skipCheck) {\n let isValid = false;\n const types = isArray(type) ? type : [type];\n const expectedTypes = [];\n for (let i = 0; i < types.length && !isValid; i++) {\n const { valid, expectedType } = assertType(value, types[i]);\n expectedTypes.push(expectedType || \"\");\n isValid = valid;\n }\n if (!isValid) {\n warn$1(getInvalidTypeMessage(name, value, expectedTypes));\n return;\n }\n }\n if (validator && !validator(value, props)) {\n warn$1('Invalid prop: custom validator check failed for prop \"' + name + '\".');\n }\n}\nconst isSimpleType = /* @__PURE__ */ makeMap(\n \"String,Number,Boolean,Function,Symbol,BigInt\"\n);\nfunction assertType(value, type) {\n let valid;\n const expectedType = getType(type);\n if (expectedType === \"null\") {\n valid = value === null;\n } else if (isSimpleType(expectedType)) {\n const t = typeof value;\n valid = t === expectedType.toLowerCase();\n if (!valid && t === \"object\") {\n valid = value instanceof type;\n }\n } else if (expectedType === \"Object\") {\n valid = isObject(value);\n } else if (expectedType === \"Array\") {\n valid = isArray(value);\n } else {\n valid = value instanceof type;\n }\n return {\n valid,\n expectedType\n };\n}\nfunction getInvalidTypeMessage(name, value, expectedTypes) {\n if (expectedTypes.length === 0) {\n return `Prop type [] for prop \"${name}\" won't match anything. Did you mean to use type Array instead?`;\n }\n let message = `Invalid prop: type check failed for prop \"${name}\". Expected ${expectedTypes.map(capitalize).join(\" | \")}`;\n const expectedType = expectedTypes[0];\n const receivedType = toRawType(value);\n const expectedValue = styleValue(value, expectedType);\n const receivedValue = styleValue(value, receivedType);\n if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) {\n message += ` with value ${expectedValue}`;\n }\n message += `, got ${receivedType} `;\n if (isExplicable(receivedType)) {\n message += `with value ${receivedValue}.`;\n }\n return message;\n}\nfunction styleValue(value, type) {\n if (type === \"String\") {\n return `\"${value}\"`;\n } else if (type === \"Number\") {\n return `${Number(value)}`;\n } else {\n return `${value}`;\n }\n}\nfunction isExplicable(type) {\n const explicitTypes = [\"string\", \"number\", \"boolean\"];\n return explicitTypes.some((elem) => type.toLowerCase() === elem);\n}\nfunction isBoolean(...args) {\n return args.some((elem) => elem.toLowerCase() === \"boolean\");\n}\n\nconst isInternalKey = (key) => key[0] === \"_\" || key === \"$stable\";\nconst normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];\nconst normalizeSlot = (key, rawSlot, ctx) => {\n if (rawSlot._n) {\n return rawSlot;\n }\n const normalized = withCtx((...args) => {\n if (!!(process.env.NODE_ENV !== \"production\") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {\n warn$1(\n `Slot \"${key}\" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`\n );\n }\n return normalizeSlotValue(rawSlot(...args));\n }, ctx);\n normalized._c = false;\n return normalized;\n};\nconst normalizeObjectSlots = (rawSlots, slots, instance) => {\n const ctx = rawSlots._ctx;\n for (const key in rawSlots) {\n if (isInternalKey(key)) continue;\n const value = rawSlots[key];\n if (isFunction(value)) {\n slots[key] = normalizeSlot(key, value, ctx);\n } else if (value != null) {\n if (!!(process.env.NODE_ENV !== \"production\") && true) {\n warn$1(\n `Non-function value encountered for slot \"${key}\". Prefer function slots for better performance.`\n );\n }\n const normalized = normalizeSlotValue(value);\n slots[key] = () => normalized;\n }\n }\n};\nconst normalizeVNodeSlots = (instance, children) => {\n if (!!(process.env.NODE_ENV !== \"production\") && !isKeepAlive(instance.vnode) && true) {\n warn$1(\n `Non-function value encountered for default slot. Prefer function slots for better performance.`\n );\n }\n const normalized = normalizeSlotValue(children);\n instance.slots.default = () => normalized;\n};\nconst assignSlots = (slots, children, optimized) => {\n for (const key in children) {\n if (optimized || !isInternalKey(key)) {\n slots[key] = children[key];\n }\n }\n};\nconst initSlots = (instance, children, optimized) => {\n const slots = instance.slots = createInternalObject();\n if (instance.vnode.shapeFlag & 32) {\n const type = children._;\n if (type) {\n assignSlots(slots, children, optimized);\n if (optimized) {\n def(slots, \"_\", type, true);\n }\n } else {\n normalizeObjectSlots(children, slots);\n }\n } else if (children) {\n normalizeVNodeSlots(instance, children);\n }\n};\nconst updateSlots = (instance, children, optimized) => {\n const { vnode, slots } = instance;\n let needDeletionCheck = true;\n let deletionComparisonTarget = EMPTY_OBJ;\n if (vnode.shapeFlag & 32) {\n const type = children._;\n if (type) {\n if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n assignSlots(slots, children, optimized);\n trigger(instance, \"set\", \"$slots\");\n } else if (optimized && type === 1) {\n needDeletionCheck = false;\n } else {\n assignSlots(slots, children, optimized);\n }\n } else {\n needDeletionCheck = !children.$stable;\n normalizeObjectSlots(children, slots);\n }\n deletionComparisonTarget = children;\n } else if (children) {\n normalizeVNodeSlots(instance, children);\n deletionComparisonTarget = { default: 1 };\n }\n if (needDeletionCheck) {\n for (const key in slots) {\n if (!isInternalKey(key) && deletionComparisonTarget[key] == null) {\n delete slots[key];\n }\n }\n }\n};\n\nlet supported;\nlet perf;\nfunction startMeasure(instance, type) {\n if (instance.appContext.config.performance && isSupported()) {\n perf.mark(`vue-${type}-${instance.uid}`);\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsPerfStart(instance, type, isSupported() ? perf.now() : Date.now());\n }\n}\nfunction endMeasure(instance, type) {\n if (instance.appContext.config.performance && isSupported()) {\n const startTag = `vue-${type}-${instance.uid}`;\n const endTag = startTag + `:end`;\n perf.mark(endTag);\n perf.measure(\n `<${formatComponentName(instance, instance.type)}> ${type}`,\n startTag,\n endTag\n );\n perf.clearMarks(startTag);\n perf.clearMarks(endTag);\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsPerfEnd(instance, type, isSupported() ? perf.now() : Date.now());\n }\n}\nfunction isSupported() {\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else {\n supported = false;\n }\n return supported;\n}\n\nfunction initFeatureFlags() {\n const needWarn = [];\n if (typeof __VUE_OPTIONS_API__ !== \"boolean\") {\n !!(process.env.NODE_ENV !== \"production\") && needWarn.push(`__VUE_OPTIONS_API__`);\n getGlobalThis().__VUE_OPTIONS_API__ = true;\n }\n if (typeof __VUE_PROD_DEVTOOLS__ !== \"boolean\") {\n !!(process.env.NODE_ENV !== \"production\") && needWarn.push(`__VUE_PROD_DEVTOOLS__`);\n getGlobalThis().__VUE_PROD_DEVTOOLS__ = false;\n }\n if (typeof __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ !== \"boolean\") {\n !!(process.env.NODE_ENV !== \"production\") && needWarn.push(`__VUE_PROD_HYDRATION_MISMATCH_DETAILS__`);\n getGlobalThis().__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = false;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && needWarn.length) {\n const multi = needWarn.length > 1;\n console.warn(\n `Feature flag${multi ? `s` : ``} ${needWarn.join(\", \")} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, which expects these compile-time feature flags to be globally injected via the bundler config in order to get better tree-shaking in the production bundle.\n\nFor more details, see https://link.vuejs.org/feature-flags.`\n );\n }\n}\n\nconst queuePostRenderEffect = queueEffectWithSuspense ;\nfunction createRenderer(options) {\n return baseCreateRenderer(options);\n}\nfunction createHydrationRenderer(options) {\n return baseCreateRenderer(options, createHydrationFunctions);\n}\nfunction baseCreateRenderer(options, createHydrationFns) {\n {\n initFeatureFlags();\n }\n const target = getGlobalThis();\n target.__VUE__ = true;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);\n }\n const {\n insert: hostInsert,\n remove: hostRemove,\n patchProp: hostPatchProp,\n createElement: hostCreateElement,\n createText: hostCreateText,\n createComment: hostCreateComment,\n setText: hostSetText,\n setElementText: hostSetElementText,\n parentNode: hostParentNode,\n nextSibling: hostNextSibling,\n setScopeId: hostSetScopeId = NOOP,\n insertStaticContent: hostInsertStaticContent\n } = options;\n const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = !!(process.env.NODE_ENV !== \"production\") && isHmrUpdating ? false : !!n2.dynamicChildren) => {\n if (n1 === n2) {\n return;\n }\n if (n1 && !isSameVNodeType(n1, n2)) {\n anchor = getNextHostNode(n1);\n unmount(n1, parentComponent, parentSuspense, true);\n n1 = null;\n }\n if (n2.patchFlag === -2) {\n optimized = false;\n n2.dynamicChildren = null;\n }\n const { type, ref, shapeFlag } = n2;\n switch (type) {\n case Text:\n processText(n1, n2, container, anchor);\n break;\n case Comment:\n processCommentNode(n1, n2, container, anchor);\n break;\n case Static:\n if (n1 == null) {\n mountStaticNode(n2, container, anchor, namespace);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n patchStaticNode(n1, n2, container, namespace);\n }\n break;\n case Fragment:\n processFragment(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n break;\n default:\n if (shapeFlag & 1) {\n processElement(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n } else if (shapeFlag & 6) {\n processComponent(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n } else if (shapeFlag & 64) {\n type.process(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized,\n internals\n );\n } else if (shapeFlag & 128) {\n type.process(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized,\n internals\n );\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\"Invalid VNode type:\", type, `(${typeof type})`);\n }\n }\n if (ref != null && parentComponent) {\n setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);\n }\n };\n const processText = (n1, n2, container, anchor) => {\n if (n1 == null) {\n hostInsert(\n n2.el = hostCreateText(n2.children),\n container,\n anchor\n );\n } else {\n const el = n2.el = n1.el;\n if (n2.children !== n1.children) {\n hostSetText(el, n2.children);\n }\n }\n };\n const processCommentNode = (n1, n2, container, anchor) => {\n if (n1 == null) {\n hostInsert(\n n2.el = hostCreateComment(n2.children || \"\"),\n container,\n anchor\n );\n } else {\n n2.el = n1.el;\n }\n };\n const mountStaticNode = (n2, container, anchor, namespace) => {\n [n2.el, n2.anchor] = hostInsertStaticContent(\n n2.children,\n container,\n anchor,\n namespace,\n n2.el,\n n2.anchor\n );\n };\n const patchStaticNode = (n1, n2, container, namespace) => {\n if (n2.children !== n1.children) {\n const anchor = hostNextSibling(n1.anchor);\n removeStaticNode(n1);\n [n2.el, n2.anchor] = hostInsertStaticContent(\n n2.children,\n container,\n anchor,\n namespace\n );\n } else {\n n2.el = n1.el;\n n2.anchor = n1.anchor;\n }\n };\n const moveStaticNode = ({ el, anchor }, container, nextSibling) => {\n let next;\n while (el && el !== anchor) {\n next = hostNextSibling(el);\n hostInsert(el, container, nextSibling);\n el = next;\n }\n hostInsert(anchor, container, nextSibling);\n };\n const removeStaticNode = ({ el, anchor }) => {\n let next;\n while (el && el !== anchor) {\n next = hostNextSibling(el);\n hostRemove(el);\n el = next;\n }\n hostRemove(anchor);\n };\n const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n if (n2.type === \"svg\") {\n namespace = \"svg\";\n } else if (n2.type === \"math\") {\n namespace = \"mathml\";\n }\n if (n1 == null) {\n mountElement(\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n } else {\n patchElement(\n n1,\n n2,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n }\n };\n const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n let el;\n let vnodeHook;\n const { props, shapeFlag, transition, dirs } = vnode;\n el = vnode.el = hostCreateElement(\n vnode.type,\n namespace,\n props && props.is,\n props\n );\n if (shapeFlag & 8) {\n hostSetElementText(el, vnode.children);\n } else if (shapeFlag & 16) {\n mountChildren(\n vnode.children,\n el,\n null,\n parentComponent,\n parentSuspense,\n resolveChildrenNamespace(vnode, namespace),\n slotScopeIds,\n optimized\n );\n }\n if (dirs) {\n invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n }\n setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);\n if (props) {\n for (const key in props) {\n if (key !== \"value\" && !isReservedProp(key)) {\n hostPatchProp(el, key, null, props[key], namespace, parentComponent);\n }\n }\n if (\"value\" in props) {\n hostPatchProp(el, \"value\", null, props.value, namespace);\n }\n if (vnodeHook = props.onVnodeBeforeMount) {\n invokeVNodeHook(vnodeHook, parentComponent, vnode);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n def(el, \"__vnode\", vnode, true);\n def(el, \"__vueParentComponent\", parentComponent, true);\n }\n if (dirs) {\n invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n }\n const needCallTransitionHooks = needTransition(parentSuspense, transition);\n if (needCallTransitionHooks) {\n transition.beforeEnter(el);\n }\n hostInsert(el, container, anchor);\n if ((vnodeHook = props && props.onVnodeMounted) || needCallTransitionHooks || dirs) {\n queuePostRenderEffect(() => {\n vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n needCallTransitionHooks && transition.enter(el);\n dirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n }, parentSuspense);\n }\n };\n const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {\n if (scopeId) {\n hostSetScopeId(el, scopeId);\n }\n if (slotScopeIds) {\n for (let i = 0; i < slotScopeIds.length; i++) {\n hostSetScopeId(el, slotScopeIds[i]);\n }\n }\n if (parentComponent) {\n let subTree = parentComponent.subTree;\n if (!!(process.env.NODE_ENV !== \"production\") && subTree.patchFlag > 0 && subTree.patchFlag & 2048) {\n subTree = filterSingleRoot(subTree.children) || subTree;\n }\n if (vnode === subTree || isSuspense(subTree.type) && (subTree.ssContent === vnode || subTree.ssFallback === vnode)) {\n const parentVNode = parentComponent.vnode;\n setScopeId(\n el,\n parentVNode,\n parentVNode.scopeId,\n parentVNode.slotScopeIds,\n parentComponent.parent\n );\n }\n }\n };\n const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {\n for (let i = start; i < children.length; i++) {\n const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);\n patch(\n null,\n child,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n }\n };\n const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n const el = n2.el = n1.el;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n el.__vnode = n2;\n }\n let { patchFlag, dynamicChildren, dirs } = n2;\n patchFlag |= n1.patchFlag & 16;\n const oldProps = n1.props || EMPTY_OBJ;\n const newProps = n2.props || EMPTY_OBJ;\n let vnodeHook;\n parentComponent && toggleRecurse(parentComponent, false);\n if (vnodeHook = newProps.onVnodeBeforeUpdate) {\n invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n }\n if (dirs) {\n invokeDirectiveHook(n2, n1, parentComponent, \"beforeUpdate\");\n }\n parentComponent && toggleRecurse(parentComponent, true);\n if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n patchFlag = 0;\n optimized = false;\n dynamicChildren = null;\n }\n if (oldProps.innerHTML && newProps.innerHTML == null || oldProps.textContent && newProps.textContent == null) {\n hostSetElementText(el, \"\");\n }\n if (dynamicChildren) {\n patchBlockChildren(\n n1.dynamicChildren,\n dynamicChildren,\n el,\n parentComponent,\n parentSuspense,\n resolveChildrenNamespace(n2, namespace),\n slotScopeIds\n );\n if (!!(process.env.NODE_ENV !== \"production\")) {\n traverseStaticChildren(n1, n2);\n }\n } else if (!optimized) {\n patchChildren(\n n1,\n n2,\n el,\n null,\n parentComponent,\n parentSuspense,\n resolveChildrenNamespace(n2, namespace),\n slotScopeIds,\n false\n );\n }\n if (patchFlag > 0) {\n if (patchFlag & 16) {\n patchProps(el, oldProps, newProps, parentComponent, namespace);\n } else {\n if (patchFlag & 2) {\n if (oldProps.class !== newProps.class) {\n hostPatchProp(el, \"class\", null, newProps.class, namespace);\n }\n }\n if (patchFlag & 4) {\n hostPatchProp(el, \"style\", oldProps.style, newProps.style, namespace);\n }\n if (patchFlag & 8) {\n const propsToUpdate = n2.dynamicProps;\n for (let i = 0; i < propsToUpdate.length; i++) {\n const key = propsToUpdate[i];\n const prev = oldProps[key];\n const next = newProps[key];\n if (next !== prev || key === \"value\") {\n hostPatchProp(el, key, prev, next, namespace, parentComponent);\n }\n }\n }\n }\n if (patchFlag & 1) {\n if (n1.children !== n2.children) {\n hostSetElementText(el, n2.children);\n }\n }\n } else if (!optimized && dynamicChildren == null) {\n patchProps(el, oldProps, newProps, parentComponent, namespace);\n }\n if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {\n queuePostRenderEffect(() => {\n vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);\n dirs && invokeDirectiveHook(n2, n1, parentComponent, \"updated\");\n }, parentSuspense);\n }\n };\n const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {\n for (let i = 0; i < newChildren.length; i++) {\n const oldVNode = oldChildren[i];\n const newVNode = newChildren[i];\n const container = (\n // oldVNode may be an errored async setup() component inside Suspense\n // which will not have a mounted element\n oldVNode.el && // - In the case of a Fragment, we need to provide the actual parent\n // of the Fragment itself so it can move its children.\n (oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement\n // which also requires the correct parent container\n !isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.\n oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldVNode.el) : (\n // In other cases, the parent container is not actually used so we\n // just pass the block element here to avoid a DOM parentNode call.\n fallbackContainer\n )\n );\n patch(\n oldVNode,\n newVNode,\n container,\n null,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n true\n );\n }\n };\n const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {\n if (oldProps !== newProps) {\n if (oldProps !== EMPTY_OBJ) {\n for (const key in oldProps) {\n if (!isReservedProp(key) && !(key in newProps)) {\n hostPatchProp(\n el,\n key,\n oldProps[key],\n null,\n namespace,\n parentComponent\n );\n }\n }\n }\n for (const key in newProps) {\n if (isReservedProp(key)) continue;\n const next = newProps[key];\n const prev = oldProps[key];\n if (next !== prev && key !== \"value\") {\n hostPatchProp(el, key, prev, next, namespace, parentComponent);\n }\n }\n if (\"value\" in newProps) {\n hostPatchProp(el, \"value\", oldProps.value, newProps.value, namespace);\n }\n }\n };\n const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText(\"\");\n const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText(\"\");\n let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;\n if (!!(process.env.NODE_ENV !== \"production\") && // #5523 dev root fragment may inherit directives\n (isHmrUpdating || patchFlag & 2048)) {\n patchFlag = 0;\n optimized = false;\n dynamicChildren = null;\n }\n if (fragmentSlotScopeIds) {\n slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n }\n if (n1 == null) {\n hostInsert(fragmentStartAnchor, container, anchor);\n hostInsert(fragmentEndAnchor, container, anchor);\n mountChildren(\n // #10007\n // such fragment like `<></>` will be compiled into\n // a fragment which doesn't have a children.\n // In this case fallback to an empty array\n n2.children || [],\n container,\n fragmentEndAnchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n } else {\n if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result\n // of renderSlot() with no valid children\n n1.dynamicChildren) {\n patchBlockChildren(\n n1.dynamicChildren,\n dynamicChildren,\n container,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds\n );\n if (!!(process.env.NODE_ENV !== \"production\")) {\n traverseStaticChildren(n1, n2);\n } else if (\n // #2080 if the stable fragment has a key, it's a <template v-for> that may\n // get moved around. Make sure all root level vnodes inherit el.\n // #2134 or if it's a component root, it may also get moved around\n // as the component is being moved.\n n2.key != null || parentComponent && n2 === parentComponent.subTree\n ) {\n traverseStaticChildren(\n n1,\n n2,\n true\n /* shallow */\n );\n }\n } else {\n patchChildren(\n n1,\n n2,\n container,\n fragmentEndAnchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n }\n }\n };\n const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n n2.slotScopeIds = slotScopeIds;\n if (n1 == null) {\n if (n2.shapeFlag & 512) {\n parentComponent.ctx.activate(\n n2,\n container,\n anchor,\n namespace,\n optimized\n );\n } else {\n mountComponent(\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n optimized\n );\n }\n } else {\n updateComponent(n1, n2, optimized);\n }\n };\n const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {\n const instance = (initialVNode.component = createComponentInstance(\n initialVNode,\n parentComponent,\n parentSuspense\n ));\n if (!!(process.env.NODE_ENV !== \"production\") && instance.type.__hmrId) {\n registerHMR(instance);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(initialVNode);\n startMeasure(instance, `mount`);\n }\n if (isKeepAlive(initialVNode)) {\n instance.ctx.renderer = internals;\n }\n {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n startMeasure(instance, `init`);\n }\n setupComponent(instance, false, optimized);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n endMeasure(instance, `init`);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) initialVNode.el = null;\n if (instance.asyncDep) {\n parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);\n if (!initialVNode.el) {\n const placeholder = instance.subTree = createVNode(Comment);\n processCommentNode(null, placeholder, container, anchor);\n }\n } else {\n setupRenderEffect(\n instance,\n initialVNode,\n container,\n anchor,\n parentSuspense,\n namespace,\n optimized\n );\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n endMeasure(instance, `mount`);\n }\n };\n const updateComponent = (n1, n2, optimized) => {\n const instance = n2.component = n1.component;\n if (shouldUpdateComponent(n1, n2, optimized)) {\n if (instance.asyncDep && !instance.asyncResolved) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(n2);\n }\n updateComponentPreRender(instance, n2, optimized);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n }\n return;\n } else {\n instance.next = n2;\n instance.update();\n }\n } else {\n n2.el = n1.el;\n instance.vnode = n2;\n }\n };\n const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {\n const componentUpdateFn = () => {\n if (!instance.isMounted) {\n let vnodeHook;\n const { el, props } = initialVNode;\n const { bm, m, parent, root, type } = instance;\n const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);\n toggleRecurse(instance, false);\n if (bm) {\n invokeArrayFns(bm);\n }\n if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeBeforeMount)) {\n invokeVNodeHook(vnodeHook, parent, initialVNode);\n }\n toggleRecurse(instance, true);\n if (el && hydrateNode) {\n const hydrateSubTree = () => {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n startMeasure(instance, `render`);\n }\n instance.subTree = renderComponentRoot(instance);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n endMeasure(instance, `render`);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n startMeasure(instance, `hydrate`);\n }\n hydrateNode(\n el,\n instance.subTree,\n instance,\n parentSuspense,\n null\n );\n if (!!(process.env.NODE_ENV !== \"production\")) {\n endMeasure(instance, `hydrate`);\n }\n };\n if (isAsyncWrapperVNode && type.__asyncHydrate) {\n type.__asyncHydrate(\n el,\n instance,\n hydrateSubTree\n );\n } else {\n hydrateSubTree();\n }\n } else {\n if (root.ce) {\n root.ce._injectChildStyle(type);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n startMeasure(instance, `render`);\n }\n const subTree = instance.subTree = renderComponentRoot(instance);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n endMeasure(instance, `render`);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n startMeasure(instance, `patch`);\n }\n patch(\n null,\n subTree,\n container,\n anchor,\n instance,\n parentSuspense,\n namespace\n );\n if (!!(process.env.NODE_ENV !== \"production\")) {\n endMeasure(instance, `patch`);\n }\n initialVNode.el = subTree.el;\n }\n if (m) {\n queuePostRenderEffect(m, parentSuspense);\n }\n if (!isAsyncWrapperVNode && (vnodeHook = props && props.onVnodeMounted)) {\n const scopedInitialVNode = initialVNode;\n queuePostRenderEffect(\n () => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode),\n parentSuspense\n );\n }\n if (initialVNode.shapeFlag & 256 || parent && isAsyncWrapper(parent.vnode) && parent.vnode.shapeFlag & 256) {\n instance.a && queuePostRenderEffect(instance.a, parentSuspense);\n }\n instance.isMounted = true;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance);\n }\n initialVNode = container = anchor = null;\n } else {\n let { next, bu, u, parent, vnode } = instance;\n {\n const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);\n if (nonHydratedAsyncRoot) {\n if (next) {\n next.el = vnode.el;\n updateComponentPreRender(instance, next, optimized);\n }\n nonHydratedAsyncRoot.asyncDep.then(() => {\n if (!instance.isUnmounted) {\n componentUpdateFn();\n }\n });\n return;\n }\n }\n let originNext = next;\n let vnodeHook;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(next || instance.vnode);\n }\n toggleRecurse(instance, false);\n if (next) {\n next.el = vnode.el;\n updateComponentPreRender(instance, next, optimized);\n } else {\n next = vnode;\n }\n if (bu) {\n invokeArrayFns(bu);\n }\n if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) {\n invokeVNodeHook(vnodeHook, parent, next, vnode);\n }\n toggleRecurse(instance, true);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n startMeasure(instance, `render`);\n }\n const nextTree = renderComponentRoot(instance);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n endMeasure(instance, `render`);\n }\n const prevTree = instance.subTree;\n instance.subTree = nextTree;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n startMeasure(instance, `patch`);\n }\n patch(\n prevTree,\n nextTree,\n // parent may have changed if it's in a teleport\n hostParentNode(prevTree.el),\n // anchor may have changed if it's in a fragment\n getNextHostNode(prevTree),\n instance,\n parentSuspense,\n namespace\n );\n if (!!(process.env.NODE_ENV !== \"production\")) {\n endMeasure(instance, `patch`);\n }\n next.el = nextTree.el;\n if (originNext === null) {\n updateHOCHostEl(instance, nextTree.el);\n }\n if (u) {\n queuePostRenderEffect(u, parentSuspense);\n }\n if (vnodeHook = next.props && next.props.onVnodeUpdated) {\n queuePostRenderEffect(\n () => invokeVNodeHook(vnodeHook, parent, next, vnode),\n parentSuspense\n );\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(instance);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n }\n }\n };\n instance.scope.on();\n const effect = instance.effect = new ReactiveEffect(componentUpdateFn);\n instance.scope.off();\n const update = instance.update = effect.run.bind(effect);\n const job = instance.job = effect.runIfDirty.bind(effect);\n job.i = instance;\n job.id = instance.uid;\n effect.scheduler = () => queueJob(job);\n toggleRecurse(instance, true);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;\n effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;\n }\n update();\n };\n const updateComponentPreRender = (instance, nextVNode, optimized) => {\n nextVNode.component = instance;\n const prevProps = instance.vnode.props;\n instance.vnode = nextVNode;\n instance.next = null;\n updateProps(instance, nextVNode.props, prevProps, optimized);\n updateSlots(instance, nextVNode.children, optimized);\n pauseTracking();\n flushPreFlushCbs(instance);\n resetTracking();\n };\n const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {\n const c1 = n1 && n1.children;\n const prevShapeFlag = n1 ? n1.shapeFlag : 0;\n const c2 = n2.children;\n const { patchFlag, shapeFlag } = n2;\n if (patchFlag > 0) {\n if (patchFlag & 128) {\n patchKeyedChildren(\n c1,\n c2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n return;\n } else if (patchFlag & 256) {\n patchUnkeyedChildren(\n c1,\n c2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n return;\n }\n }\n if (shapeFlag & 8) {\n if (prevShapeFlag & 16) {\n unmountChildren(c1, parentComponent, parentSuspense);\n }\n if (c2 !== c1) {\n hostSetElementText(container, c2);\n }\n } else {\n if (prevShapeFlag & 16) {\n if (shapeFlag & 16) {\n patchKeyedChildren(\n c1,\n c2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n } else {\n unmountChildren(c1, parentComponent, parentSuspense, true);\n }\n } else {\n if (prevShapeFlag & 8) {\n hostSetElementText(container, \"\");\n }\n if (shapeFlag & 16) {\n mountChildren(\n c2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n }\n }\n }\n };\n const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n c1 = c1 || EMPTY_ARR;\n c2 = c2 || EMPTY_ARR;\n const oldLength = c1.length;\n const newLength = c2.length;\n const commonLength = Math.min(oldLength, newLength);\n let i;\n for (i = 0; i < commonLength; i++) {\n const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n patch(\n c1[i],\n nextChild,\n container,\n null,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n }\n if (oldLength > newLength) {\n unmountChildren(\n c1,\n parentComponent,\n parentSuspense,\n true,\n false,\n commonLength\n );\n } else {\n mountChildren(\n c2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized,\n commonLength\n );\n }\n };\n const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {\n let i = 0;\n const l2 = c2.length;\n let e1 = c1.length - 1;\n let e2 = l2 - 1;\n while (i <= e1 && i <= e2) {\n const n1 = c1[i];\n const n2 = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n if (isSameVNodeType(n1, n2)) {\n patch(\n n1,\n n2,\n container,\n null,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n } else {\n break;\n }\n i++;\n }\n while (i <= e1 && i <= e2) {\n const n1 = c1[e1];\n const n2 = c2[e2] = optimized ? cloneIfMounted(c2[e2]) : normalizeVNode(c2[e2]);\n if (isSameVNodeType(n1, n2)) {\n patch(\n n1,\n n2,\n container,\n null,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n } else {\n break;\n }\n e1--;\n e2--;\n }\n if (i > e1) {\n if (i <= e2) {\n const nextPos = e2 + 1;\n const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;\n while (i <= e2) {\n patch(\n null,\n c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]),\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n i++;\n }\n }\n } else if (i > e2) {\n while (i <= e1) {\n unmount(c1[i], parentComponent, parentSuspense, true);\n i++;\n }\n } else {\n const s1 = i;\n const s2 = i;\n const keyToNewIndexMap = /* @__PURE__ */ new Map();\n for (i = s2; i <= e2; i++) {\n const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);\n if (nextChild.key != null) {\n if (!!(process.env.NODE_ENV !== \"production\") && keyToNewIndexMap.has(nextChild.key)) {\n warn$1(\n `Duplicate keys found during update:`,\n JSON.stringify(nextChild.key),\n `Make sure keys are unique.`\n );\n }\n keyToNewIndexMap.set(nextChild.key, i);\n }\n }\n let j;\n let patched = 0;\n const toBePatched = e2 - s2 + 1;\n let moved = false;\n let maxNewIndexSoFar = 0;\n const newIndexToOldIndexMap = new Array(toBePatched);\n for (i = 0; i < toBePatched; i++) newIndexToOldIndexMap[i] = 0;\n for (i = s1; i <= e1; i++) {\n const prevChild = c1[i];\n if (patched >= toBePatched) {\n unmount(prevChild, parentComponent, parentSuspense, true);\n continue;\n }\n let newIndex;\n if (prevChild.key != null) {\n newIndex = keyToNewIndexMap.get(prevChild.key);\n } else {\n for (j = s2; j <= e2; j++) {\n if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {\n newIndex = j;\n break;\n }\n }\n }\n if (newIndex === void 0) {\n unmount(prevChild, parentComponent, parentSuspense, true);\n } else {\n newIndexToOldIndexMap[newIndex - s2] = i + 1;\n if (newIndex >= maxNewIndexSoFar) {\n maxNewIndexSoFar = newIndex;\n } else {\n moved = true;\n }\n patch(\n prevChild,\n c2[newIndex],\n container,\n null,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n patched++;\n }\n }\n const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;\n j = increasingNewIndexSequence.length - 1;\n for (i = toBePatched - 1; i >= 0; i--) {\n const nextIndex = s2 + i;\n const nextChild = c2[nextIndex];\n const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;\n if (newIndexToOldIndexMap[i] === 0) {\n patch(\n null,\n nextChild,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n } else if (moved) {\n if (j < 0 || i !== increasingNewIndexSequence[j]) {\n move(nextChild, container, anchor, 2);\n } else {\n j--;\n }\n }\n }\n }\n };\n const move = (vnode, container, anchor, moveType, parentSuspense = null) => {\n const { el, type, transition, children, shapeFlag } = vnode;\n if (shapeFlag & 6) {\n move(vnode.component.subTree, container, anchor, moveType);\n return;\n }\n if (shapeFlag & 128) {\n vnode.suspense.move(container, anchor, moveType);\n return;\n }\n if (shapeFlag & 64) {\n type.move(vnode, container, anchor, internals);\n return;\n }\n if (type === Fragment) {\n hostInsert(el, container, anchor);\n for (let i = 0; i < children.length; i++) {\n move(children[i], container, anchor, moveType);\n }\n hostInsert(vnode.anchor, container, anchor);\n return;\n }\n if (type === Static) {\n moveStaticNode(vnode, container, anchor);\n return;\n }\n const needTransition2 = moveType !== 2 && shapeFlag & 1 && transition;\n if (needTransition2) {\n if (moveType === 0) {\n transition.beforeEnter(el);\n hostInsert(el, container, anchor);\n queuePostRenderEffect(() => transition.enter(el), parentSuspense);\n } else {\n const { leave, delayLeave, afterLeave } = transition;\n const remove2 = () => {\n if (vnode.ctx.isUnmounted) {\n hostRemove(el);\n } else {\n hostInsert(el, container, anchor);\n }\n };\n const performLeave = () => {\n leave(el, () => {\n remove2();\n afterLeave && afterLeave();\n });\n };\n if (delayLeave) {\n delayLeave(el, remove2, performLeave);\n } else {\n performLeave();\n }\n }\n } else {\n hostInsert(el, container, anchor);\n }\n };\n const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {\n const {\n type,\n props,\n ref,\n children,\n dynamicChildren,\n shapeFlag,\n patchFlag,\n dirs,\n cacheIndex\n } = vnode;\n if (patchFlag === -2) {\n optimized = false;\n }\n if (ref != null) {\n pauseTracking();\n setRef(ref, null, parentSuspense, vnode, true);\n resetTracking();\n }\n if (cacheIndex != null) {\n parentComponent.renderCache[cacheIndex] = void 0;\n }\n if (shapeFlag & 256) {\n parentComponent.ctx.deactivate(vnode);\n return;\n }\n const shouldInvokeDirs = shapeFlag & 1 && dirs;\n const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);\n let vnodeHook;\n if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) {\n invokeVNodeHook(vnodeHook, parentComponent, vnode);\n }\n if (shapeFlag & 6) {\n unmountComponent(vnode.component, parentSuspense, doRemove);\n } else {\n if (shapeFlag & 128) {\n vnode.suspense.unmount(parentSuspense, doRemove);\n return;\n }\n if (shouldInvokeDirs) {\n invokeDirectiveHook(vnode, null, parentComponent, \"beforeUnmount\");\n }\n if (shapeFlag & 64) {\n vnode.type.remove(\n vnode,\n parentComponent,\n parentSuspense,\n internals,\n doRemove\n );\n } else if (dynamicChildren && // #5154\n // when v-once is used inside a block, setBlockTracking(-1) marks the\n // parent block with hasOnce: true\n // so that it doesn't take the fast path during unmount - otherwise\n // components nested in v-once are never unmounted.\n !dynamicChildren.hasOnce && // #1153: fast path should not be taken for non-stable (v-for) fragments\n (type !== Fragment || patchFlag > 0 && patchFlag & 64)) {\n unmountChildren(\n dynamicChildren,\n parentComponent,\n parentSuspense,\n false,\n true\n );\n } else if (type === Fragment && patchFlag & (128 | 256) || !optimized && shapeFlag & 16) {\n unmountChildren(children, parentComponent, parentSuspense);\n }\n if (doRemove) {\n remove(vnode);\n }\n }\n if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || shouldInvokeDirs) {\n queuePostRenderEffect(() => {\n vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);\n shouldInvokeDirs && invokeDirectiveHook(vnode, null, parentComponent, \"unmounted\");\n }, parentSuspense);\n }\n };\n const remove = (vnode) => {\n const { type, el, anchor, transition } = vnode;\n if (type === Fragment) {\n if (!!(process.env.NODE_ENV !== \"production\") && vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) {\n vnode.children.forEach((child) => {\n if (child.type === Comment) {\n hostRemove(child.el);\n } else {\n remove(child);\n }\n });\n } else {\n removeFragment(el, anchor);\n }\n return;\n }\n if (type === Static) {\n removeStaticNode(vnode);\n return;\n }\n const performRemove = () => {\n hostRemove(el);\n if (transition && !transition.persisted && transition.afterLeave) {\n transition.afterLeave();\n }\n };\n if (vnode.shapeFlag & 1 && transition && !transition.persisted) {\n const { leave, delayLeave } = transition;\n const performLeave = () => leave(el, performRemove);\n if (delayLeave) {\n delayLeave(vnode.el, performRemove, performLeave);\n } else {\n performLeave();\n }\n } else {\n performRemove();\n }\n };\n const removeFragment = (cur, end) => {\n let next;\n while (cur !== end) {\n next = hostNextSibling(cur);\n hostRemove(cur);\n cur = next;\n }\n hostRemove(end);\n };\n const unmountComponent = (instance, parentSuspense, doRemove) => {\n if (!!(process.env.NODE_ENV !== \"production\") && instance.type.__hmrId) {\n unregisterHMR(instance);\n }\n const {\n bum,\n scope,\n job,\n subTree,\n um,\n m,\n a,\n parent,\n slots: { __: slotCacheKeys }\n } = instance;\n invalidateMount(m);\n invalidateMount(a);\n if (bum) {\n invokeArrayFns(bum);\n }\n if (parent && isArray(slotCacheKeys)) {\n slotCacheKeys.forEach((v) => {\n parent.renderCache[v] = void 0;\n });\n }\n scope.stop();\n if (job) {\n job.flags |= 8;\n unmount(subTree, instance, parentSuspense, doRemove);\n }\n if (um) {\n queuePostRenderEffect(um, parentSuspense);\n }\n queuePostRenderEffect(() => {\n instance.isUnmounted = true;\n }, parentSuspense);\n if (parentSuspense && parentSuspense.pendingBranch && !parentSuspense.isUnmounted && instance.asyncDep && !instance.asyncResolved && instance.suspenseId === parentSuspense.pendingId) {\n parentSuspense.deps--;\n if (parentSuspense.deps === 0) {\n parentSuspense.resolve();\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentRemoved(instance);\n }\n };\n const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {\n for (let i = start; i < children.length; i++) {\n unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);\n }\n };\n const getNextHostNode = (vnode) => {\n if (vnode.shapeFlag & 6) {\n return getNextHostNode(vnode.component.subTree);\n }\n if (vnode.shapeFlag & 128) {\n return vnode.suspense.next();\n }\n const el = hostNextSibling(vnode.anchor || vnode.el);\n const teleportEnd = el && el[TeleportEndKey];\n return teleportEnd ? hostNextSibling(teleportEnd) : el;\n };\n let isFlushing = false;\n const render = (vnode, container, namespace) => {\n if (vnode == null) {\n if (container._vnode) {\n unmount(container._vnode, null, null, true);\n }\n } else {\n patch(\n container._vnode || null,\n vnode,\n container,\n null,\n null,\n null,\n namespace\n );\n }\n container._vnode = vnode;\n if (!isFlushing) {\n isFlushing = true;\n flushPreFlushCbs();\n flushPostFlushCbs();\n isFlushing = false;\n }\n };\n const internals = {\n p: patch,\n um: unmount,\n m: move,\n r: remove,\n mt: mountComponent,\n mc: mountChildren,\n pc: patchChildren,\n pbc: patchBlockChildren,\n n: getNextHostNode,\n o: options\n };\n let hydrate;\n let hydrateNode;\n if (createHydrationFns) {\n [hydrate, hydrateNode] = createHydrationFns(\n internals\n );\n }\n return {\n render,\n hydrate,\n createApp: createAppAPI(render, hydrate)\n };\n}\nfunction resolveChildrenNamespace({ type, props }, currentNamespace) {\n return currentNamespace === \"svg\" && type === \"foreignObject\" || currentNamespace === \"mathml\" && type === \"annotation-xml\" && props && props.encoding && props.encoding.includes(\"html\") ? void 0 : currentNamespace;\n}\nfunction toggleRecurse({ effect, job }, allowed) {\n if (allowed) {\n effect.flags |= 32;\n job.flags |= 4;\n } else {\n effect.flags &= -33;\n job.flags &= -5;\n }\n}\nfunction needTransition(parentSuspense, transition) {\n return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;\n}\nfunction traverseStaticChildren(n1, n2, shallow = false) {\n const ch1 = n1.children;\n const ch2 = n2.children;\n if (isArray(ch1) && isArray(ch2)) {\n for (let i = 0; i < ch1.length; i++) {\n const c1 = ch1[i];\n let c2 = ch2[i];\n if (c2.shapeFlag & 1 && !c2.dynamicChildren) {\n if (c2.patchFlag <= 0 || c2.patchFlag === 32) {\n c2 = ch2[i] = cloneIfMounted(ch2[i]);\n c2.el = c1.el;\n }\n if (!shallow && c2.patchFlag !== -2)\n traverseStaticChildren(c1, c2);\n }\n if (c2.type === Text) {\n c2.el = c1.el;\n }\n if (c2.type === Comment && !c2.el) {\n c2.el = c1.el;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n c2.el && (c2.el.__vnode = c2);\n }\n }\n }\n}\nfunction getSequence(arr) {\n const p = arr.slice();\n const result = [0];\n let i, j, u, v, c;\n const len = arr.length;\n for (i = 0; i < len; i++) {\n const arrI = arr[i];\n if (arrI !== 0) {\n j = result[result.length - 1];\n if (arr[j] < arrI) {\n p[i] = j;\n result.push(i);\n continue;\n }\n u = 0;\n v = result.length - 1;\n while (u < v) {\n c = u + v >> 1;\n if (arr[result[c]] < arrI) {\n u = c + 1;\n } else {\n v = c;\n }\n }\n if (arrI < arr[result[u]]) {\n if (u > 0) {\n p[i] = result[u - 1];\n }\n result[u] = i;\n }\n }\n }\n u = result.length;\n v = result[u - 1];\n while (u-- > 0) {\n result[u] = v;\n v = p[v];\n }\n return result;\n}\nfunction locateNonHydratedAsyncRoot(instance) {\n const subComponent = instance.subTree.component;\n if (subComponent) {\n if (subComponent.asyncDep && !subComponent.asyncResolved) {\n return subComponent;\n } else {\n return locateNonHydratedAsyncRoot(subComponent);\n }\n }\n}\nfunction invalidateMount(hooks) {\n if (hooks) {\n for (let i = 0; i < hooks.length; i++)\n hooks[i].flags |= 8;\n }\n}\n\nconst ssrContextKey = Symbol.for(\"v-scx\");\nconst useSSRContext = () => {\n {\n const ctx = inject(ssrContextKey);\n if (!ctx) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\n `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`\n );\n }\n return ctx;\n }\n};\n\nfunction watchEffect(effect, options) {\n return doWatch(effect, null, options);\n}\nfunction watchPostEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"post\" }) : { flush: \"post\" }\n );\n}\nfunction watchSyncEffect(effect, options) {\n return doWatch(\n effect,\n null,\n !!(process.env.NODE_ENV !== \"production\") ? extend({}, options, { flush: \"sync\" }) : { flush: \"sync\" }\n );\n}\nfunction watch(source, cb, options) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isFunction(cb)) {\n warn$1(\n `\\`watch(fn, options?)\\` signature has been moved to a separate API. Use \\`watchEffect(fn, options?)\\` instead. \\`watch\\` now only supports \\`watch(source, cb, options?) signature.`\n );\n }\n return doWatch(source, cb, options);\n}\nfunction doWatch(source, cb, options = EMPTY_OBJ) {\n const { immediate, deep, flush, once } = options;\n if (!!(process.env.NODE_ENV !== \"production\") && !cb) {\n if (immediate !== void 0) {\n warn$1(\n `watch() \"immediate\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (deep !== void 0) {\n warn$1(\n `watch() \"deep\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n if (once !== void 0) {\n warn$1(\n `watch() \"once\" option is only respected when using the watch(source, callback, options?) signature.`\n );\n }\n }\n const baseWatchOptions = extend({}, options);\n if (!!(process.env.NODE_ENV !== \"production\")) baseWatchOptions.onWarn = warn$1;\n const runsImmediately = cb && immediate || !cb && flush !== \"post\";\n let ssrCleanup;\n if (isInSSRComponentSetup) {\n if (flush === \"sync\") {\n const ctx = useSSRContext();\n ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);\n } else if (!runsImmediately) {\n const watchStopHandle = () => {\n };\n watchStopHandle.stop = NOOP;\n watchStopHandle.resume = NOOP;\n watchStopHandle.pause = NOOP;\n return watchStopHandle;\n }\n }\n const instance = currentInstance;\n baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);\n let isPre = false;\n if (flush === \"post\") {\n baseWatchOptions.scheduler = (job) => {\n queuePostRenderEffect(job, instance && instance.suspense);\n };\n } else if (flush !== \"sync\") {\n isPre = true;\n baseWatchOptions.scheduler = (job, isFirstRun) => {\n if (isFirstRun) {\n job();\n } else {\n queueJob(job);\n }\n };\n }\n baseWatchOptions.augmentJob = (job) => {\n if (cb) {\n job.flags |= 4;\n }\n if (isPre) {\n job.flags |= 2;\n if (instance) {\n job.id = instance.uid;\n job.i = instance;\n }\n }\n };\n const watchHandle = watch$1(source, cb, baseWatchOptions);\n if (isInSSRComponentSetup) {\n if (ssrCleanup) {\n ssrCleanup.push(watchHandle);\n } else if (runsImmediately) {\n watchHandle();\n }\n }\n return watchHandle;\n}\nfunction instanceWatch(source, value, options) {\n const publicThis = this.proxy;\n const getter = isString(source) ? source.includes(\".\") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);\n let cb;\n if (isFunction(value)) {\n cb = value;\n } else {\n cb = value.handler;\n options = value;\n }\n const reset = setCurrentInstance(this);\n const res = doWatch(getter, cb.bind(publicThis), options);\n reset();\n return res;\n}\nfunction createPathGetter(ctx, path) {\n const segments = path.split(\".\");\n return () => {\n let cur = ctx;\n for (let i = 0; i < segments.length && cur; i++) {\n cur = cur[segments[i]];\n }\n return cur;\n };\n}\n\nfunction useModel(props, name, options = EMPTY_OBJ) {\n const i = getCurrentInstance();\n if (!!(process.env.NODE_ENV !== \"production\") && !i) {\n warn$1(`useModel() called without active instance.`);\n return ref();\n }\n const camelizedName = camelize(name);\n if (!!(process.env.NODE_ENV !== \"production\") && !i.propsOptions[0][camelizedName]) {\n warn$1(`useModel() called with prop \"${name}\" which is not declared.`);\n return ref();\n }\n const hyphenatedName = hyphenate(name);\n const modifiers = getModelModifiers(props, camelizedName);\n const res = customRef((track, trigger) => {\n let localValue;\n let prevSetValue = EMPTY_OBJ;\n let prevEmittedValue;\n watchSyncEffect(() => {\n const propValue = props[camelizedName];\n if (hasChanged(localValue, propValue)) {\n localValue = propValue;\n trigger();\n }\n });\n return {\n get() {\n track();\n return options.get ? options.get(localValue) : localValue;\n },\n set(value) {\n const emittedValue = options.set ? options.set(value) : value;\n if (!hasChanged(emittedValue, localValue) && !(prevSetValue !== EMPTY_OBJ && hasChanged(value, prevSetValue))) {\n return;\n }\n const rawProps = i.vnode.props;\n if (!(rawProps && // check if parent has passed v-model\n (name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps))) {\n localValue = value;\n trigger();\n }\n i.emit(`update:${name}`, emittedValue);\n if (hasChanged(value, emittedValue) && hasChanged(value, prevSetValue) && !hasChanged(emittedValue, prevEmittedValue)) {\n trigger();\n }\n prevSetValue = value;\n prevEmittedValue = emittedValue;\n }\n };\n });\n res[Symbol.iterator] = () => {\n let i2 = 0;\n return {\n next() {\n if (i2 < 2) {\n return { value: i2++ ? modifiers || EMPTY_OBJ : res, done: false };\n } else {\n return { done: true };\n }\n }\n };\n };\n return res;\n}\nconst getModelModifiers = (props, modelName) => {\n return modelName === \"modelValue\" || modelName === \"model-value\" ? props.modelModifiers : props[`${modelName}Modifiers`] || props[`${camelize(modelName)}Modifiers`] || props[`${hyphenate(modelName)}Modifiers`];\n};\n\nfunction emit(instance, event, ...rawArgs) {\n if (instance.isUnmounted) return;\n const props = instance.vnode.props || EMPTY_OBJ;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const {\n emitsOptions,\n propsOptions: [propsOptions]\n } = instance;\n if (emitsOptions) {\n if (!(event in emitsOptions) && true) {\n if (!propsOptions || !(toHandlerKey(camelize(event)) in propsOptions)) {\n warn$1(\n `Component emitted event \"${event}\" but it is neither declared in the emits option nor as an \"${toHandlerKey(camelize(event))}\" prop.`\n );\n }\n } else {\n const validator = emitsOptions[event];\n if (isFunction(validator)) {\n const isValid = validator(...rawArgs);\n if (!isValid) {\n warn$1(\n `Invalid event arguments: event validation failed for event \"${event}\".`\n );\n }\n }\n }\n }\n }\n let args = rawArgs;\n const isModelListener = event.startsWith(\"update:\");\n const modifiers = isModelListener && getModelModifiers(props, event.slice(7));\n if (modifiers) {\n if (modifiers.trim) {\n args = rawArgs.map((a) => isString(a) ? a.trim() : a);\n }\n if (modifiers.number) {\n args = rawArgs.map(looseToNumber);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentEmit(instance, event, args);\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const lowerCaseEvent = event.toLowerCase();\n if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {\n warn$1(\n `Event \"${lowerCaseEvent}\" is emitted in component ${formatComponentName(\n instance,\n instance.type\n )} but the handler is registered for \"${event}\". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use \"${hyphenate(\n event\n )}\" instead of \"${event}\".`\n );\n }\n }\n let handlerName;\n let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249)\n props[handlerName = toHandlerKey(camelize(event))];\n if (!handler && isModelListener) {\n handler = props[handlerName = toHandlerKey(hyphenate(event))];\n }\n if (handler) {\n callWithAsyncErrorHandling(\n handler,\n instance,\n 6,\n args\n );\n }\n const onceHandler = props[handlerName + `Once`];\n if (onceHandler) {\n if (!instance.emitted) {\n instance.emitted = {};\n } else if (instance.emitted[handlerName]) {\n return;\n }\n instance.emitted[handlerName] = true;\n callWithAsyncErrorHandling(\n onceHandler,\n instance,\n 6,\n args\n );\n }\n}\nfunction normalizeEmitsOptions(comp, appContext, asMixin = false) {\n const cache = appContext.emitsCache;\n const cached = cache.get(comp);\n if (cached !== void 0) {\n return cached;\n }\n const raw = comp.emits;\n let normalized = {};\n let hasExtends = false;\n if (__VUE_OPTIONS_API__ && !isFunction(comp)) {\n const extendEmits = (raw2) => {\n const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true);\n if (normalizedFromExtend) {\n hasExtends = true;\n extend(normalized, normalizedFromExtend);\n }\n };\n if (!asMixin && appContext.mixins.length) {\n appContext.mixins.forEach(extendEmits);\n }\n if (comp.extends) {\n extendEmits(comp.extends);\n }\n if (comp.mixins) {\n comp.mixins.forEach(extendEmits);\n }\n }\n if (!raw && !hasExtends) {\n if (isObject(comp)) {\n cache.set(comp, null);\n }\n return null;\n }\n if (isArray(raw)) {\n raw.forEach((key) => normalized[key] = null);\n } else {\n extend(normalized, raw);\n }\n if (isObject(comp)) {\n cache.set(comp, normalized);\n }\n return normalized;\n}\nfunction isEmitListener(options, key) {\n if (!options || !isOn(key)) {\n return false;\n }\n key = key.slice(2).replace(/Once$/, \"\");\n return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);\n}\n\nlet accessedAttrs = false;\nfunction markAttrsAccessed() {\n accessedAttrs = true;\n}\nfunction renderComponentRoot(instance) {\n const {\n type: Component,\n vnode,\n proxy,\n withProxy,\n propsOptions: [propsOptions],\n slots,\n attrs,\n emit,\n render,\n renderCache,\n props,\n data,\n setupState,\n ctx,\n inheritAttrs\n } = instance;\n const prev = setCurrentRenderingInstance(instance);\n let result;\n let fallthroughAttrs;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n accessedAttrs = false;\n }\n try {\n if (vnode.shapeFlag & 4) {\n const proxyToUse = withProxy || proxy;\n const thisProxy = !!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {\n get(target, key, receiver) {\n warn$1(\n `Property '${String(\n key\n )}' was accessed via 'this'. Avoid using 'this' in templates.`\n );\n return Reflect.get(target, key, receiver);\n }\n }) : proxyToUse;\n result = normalizeVNode(\n render.call(\n thisProxy,\n proxyToUse,\n renderCache,\n !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n setupState,\n data,\n ctx\n )\n );\n fallthroughAttrs = attrs;\n } else {\n const render2 = Component;\n if (!!(process.env.NODE_ENV !== \"production\") && attrs === props) {\n markAttrsAccessed();\n }\n result = normalizeVNode(\n render2.length > 1 ? render2(\n !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n !!(process.env.NODE_ENV !== \"production\") ? {\n get attrs() {\n markAttrsAccessed();\n return shallowReadonly(attrs);\n },\n slots,\n emit\n } : { attrs, slots, emit }\n ) : render2(\n !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(props) : props,\n null\n )\n );\n fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs);\n }\n } catch (err) {\n blockStack.length = 0;\n handleError(err, instance, 1);\n result = createVNode(Comment);\n }\n let root = result;\n let setRoot = void 0;\n if (!!(process.env.NODE_ENV !== \"production\") && result.patchFlag > 0 && result.patchFlag & 2048) {\n [root, setRoot] = getChildRoot(result);\n }\n if (fallthroughAttrs && inheritAttrs !== false) {\n const keys = Object.keys(fallthroughAttrs);\n const { shapeFlag } = root;\n if (keys.length) {\n if (shapeFlag & (1 | 6)) {\n if (propsOptions && keys.some(isModelListener)) {\n fallthroughAttrs = filterModelListeners(\n fallthroughAttrs,\n propsOptions\n );\n }\n root = cloneVNode(root, fallthroughAttrs, false, true);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !accessedAttrs && root.type !== Comment) {\n const allAttrs = Object.keys(attrs);\n const eventAttrs = [];\n const extraAttrs = [];\n for (let i = 0, l = allAttrs.length; i < l; i++) {\n const key = allAttrs[i];\n if (isOn(key)) {\n if (!isModelListener(key)) {\n eventAttrs.push(key[2].toLowerCase() + key.slice(3));\n }\n } else {\n extraAttrs.push(key);\n }\n }\n if (extraAttrs.length) {\n warn$1(\n `Extraneous non-props attributes (${extraAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text or teleport root nodes.`\n );\n }\n if (eventAttrs.length) {\n warn$1(\n `Extraneous non-emits event listeners (${eventAttrs.join(\", \")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the \"emits\" option.`\n );\n }\n }\n }\n }\n if (vnode.dirs) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn$1(\n `Runtime directive used on component with non-element root node. The directives will not function as intended.`\n );\n }\n root = cloneVNode(root, null, false, true);\n root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;\n }\n if (vnode.transition) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isElementRoot(root)) {\n warn$1(\n `Component inside <Transition> renders non-element root node that cannot be animated.`\n );\n }\n setTransitionHooks(root, vnode.transition);\n }\n if (!!(process.env.NODE_ENV !== \"production\") && setRoot) {\n setRoot(root);\n } else {\n result = root;\n }\n setCurrentRenderingInstance(prev);\n return result;\n}\nconst getChildRoot = (vnode) => {\n const rawChildren = vnode.children;\n const dynamicChildren = vnode.dynamicChildren;\n const childRoot = filterSingleRoot(rawChildren, false);\n if (!childRoot) {\n return [vnode, void 0];\n } else if (!!(process.env.NODE_ENV !== \"production\") && childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) {\n return getChildRoot(childRoot);\n }\n const index = rawChildren.indexOf(childRoot);\n const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;\n const setRoot = (updatedRoot) => {\n rawChildren[index] = updatedRoot;\n if (dynamicChildren) {\n if (dynamicIndex > -1) {\n dynamicChildren[dynamicIndex] = updatedRoot;\n } else if (updatedRoot.patchFlag > 0) {\n vnode.dynamicChildren = [...dynamicChildren, updatedRoot];\n }\n }\n };\n return [normalizeVNode(childRoot), setRoot];\n};\nfunction filterSingleRoot(children, recurse = true) {\n let singleRoot;\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n if (isVNode(child)) {\n if (child.type !== Comment || child.children === \"v-if\") {\n if (singleRoot) {\n return;\n } else {\n singleRoot = child;\n if (!!(process.env.NODE_ENV !== \"production\") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) {\n return filterSingleRoot(singleRoot.children);\n }\n }\n }\n } else {\n return;\n }\n }\n return singleRoot;\n}\nconst getFunctionalFallthrough = (attrs) => {\n let res;\n for (const key in attrs) {\n if (key === \"class\" || key === \"style\" || isOn(key)) {\n (res || (res = {}))[key] = attrs[key];\n }\n }\n return res;\n};\nconst filterModelListeners = (attrs, props) => {\n const res = {};\n for (const key in attrs) {\n if (!isModelListener(key) || !(key.slice(9) in props)) {\n res[key] = attrs[key];\n }\n }\n return res;\n};\nconst isElementRoot = (vnode) => {\n return vnode.shapeFlag & (6 | 1) || vnode.type === Comment;\n};\nfunction shouldUpdateComponent(prevVNode, nextVNode, optimized) {\n const { props: prevProps, children: prevChildren, component } = prevVNode;\n const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;\n const emits = component.emitsOptions;\n if (!!(process.env.NODE_ENV !== \"production\") && (prevChildren || nextChildren) && isHmrUpdating) {\n return true;\n }\n if (nextVNode.dirs || nextVNode.transition) {\n return true;\n }\n if (optimized && patchFlag >= 0) {\n if (patchFlag & 1024) {\n return true;\n }\n if (patchFlag & 16) {\n if (!prevProps) {\n return !!nextProps;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n } else if (patchFlag & 8) {\n const dynamicProps = nextVNode.dynamicProps;\n for (let i = 0; i < dynamicProps.length; i++) {\n const key = dynamicProps[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) {\n return true;\n }\n }\n }\n } else {\n if (prevChildren || nextChildren) {\n if (!nextChildren || !nextChildren.$stable) {\n return true;\n }\n }\n if (prevProps === nextProps) {\n return false;\n }\n if (!prevProps) {\n return !!nextProps;\n }\n if (!nextProps) {\n return true;\n }\n return hasPropsChanged(prevProps, nextProps, emits);\n }\n return false;\n}\nfunction hasPropsChanged(prevProps, nextProps, emitsOptions) {\n const nextKeys = Object.keys(nextProps);\n if (nextKeys.length !== Object.keys(prevProps).length) {\n return true;\n }\n for (let i = 0; i < nextKeys.length; i++) {\n const key = nextKeys[i];\n if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) {\n return true;\n }\n }\n return false;\n}\nfunction updateHOCHostEl({ vnode, parent }, el) {\n while (parent) {\n const root = parent.subTree;\n if (root.suspense && root.suspense.activeBranch === vnode) {\n root.el = vnode.el;\n }\n if (root === vnode) {\n (vnode = parent.vnode).el = el;\n parent = parent.parent;\n } else {\n break;\n }\n }\n}\n\nconst isSuspense = (type) => type.__isSuspense;\nlet suspenseId = 0;\nconst SuspenseImpl = {\n name: \"Suspense\",\n // In order to make Suspense tree-shakable, we need to avoid importing it\n // directly in the renderer. The renderer checks for the __isSuspense flag\n // on a vnode's type and calls the `process` method, passing in renderer\n // internals.\n __isSuspense: true,\n process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n if (n1 == null) {\n mountSuspense(\n n2,\n container,\n anchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n } else {\n if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {\n n2.suspense = n1.suspense;\n n2.suspense.vnode = n2;\n n2.el = n1.el;\n return;\n }\n patchSuspense(\n n1,\n n2,\n container,\n anchor,\n parentComponent,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n }\n },\n hydrate: hydrateSuspense,\n normalize: normalizeSuspenseChildren\n};\nconst Suspense = SuspenseImpl ;\nfunction triggerEvent(vnode, name) {\n const eventListener = vnode.props && vnode.props[name];\n if (isFunction(eventListener)) {\n eventListener();\n }\n}\nfunction mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {\n const {\n p: patch,\n o: { createElement }\n } = rendererInternals;\n const hiddenContainer = createElement(\"div\");\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n container,\n hiddenContainer,\n anchor,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals\n );\n patch(\n null,\n suspense.pendingBranch = vnode.ssContent,\n hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds\n );\n if (suspense.deps > 0) {\n triggerEvent(vnode, \"onPending\");\n triggerEvent(vnode, \"onFallback\");\n patch(\n null,\n vnode.ssFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n namespace,\n slotScopeIds\n );\n setActiveBranch(suspense, vnode.ssFallback);\n } else {\n suspense.resolve(false, true);\n }\n}\nfunction patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {\n const suspense = n2.suspense = n1.suspense;\n suspense.vnode = n2;\n n2.el = n1.el;\n const newBranch = n2.ssContent;\n const newFallback = n2.ssFallback;\n const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;\n if (pendingBranch) {\n suspense.pendingBranch = newBranch;\n if (isSameVNodeType(newBranch, pendingBranch)) {\n patch(\n pendingBranch,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else if (isInFallback) {\n if (!isHydrating) {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n namespace,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n }\n } else {\n suspense.pendingId = suspenseId++;\n if (isHydrating) {\n suspense.isHydrating = false;\n suspense.activeBranch = pendingBranch;\n } else {\n unmount(pendingBranch, parentComponent, suspense);\n }\n suspense.deps = 0;\n suspense.effects.length = 0;\n suspense.hiddenContainer = createElement(\"div\");\n if (isInFallback) {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n patch(\n activeBranch,\n newFallback,\n container,\n anchor,\n parentComponent,\n null,\n // fallback tree will not have suspense context\n namespace,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newFallback);\n }\n } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n suspense.resolve(true);\n } else {\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n }\n }\n }\n } else {\n if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {\n patch(\n activeBranch,\n newBranch,\n container,\n anchor,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, newBranch);\n } else {\n triggerEvent(n2, \"onPending\");\n suspense.pendingBranch = newBranch;\n if (newBranch.shapeFlag & 512) {\n suspense.pendingId = newBranch.component.suspenseId;\n } else {\n suspense.pendingId = suspenseId++;\n }\n patch(\n null,\n newBranch,\n suspense.hiddenContainer,\n null,\n parentComponent,\n suspense,\n namespace,\n slotScopeIds,\n optimized\n );\n if (suspense.deps <= 0) {\n suspense.resolve();\n } else {\n const { timeout, pendingId } = suspense;\n if (timeout > 0) {\n setTimeout(() => {\n if (suspense.pendingId === pendingId) {\n suspense.fallback(newFallback);\n }\n }, timeout);\n } else if (timeout === 0) {\n suspense.fallback(newFallback);\n }\n }\n }\n }\n}\nlet hasWarned = false;\nfunction createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {\n if (!!(process.env.NODE_ENV !== \"production\") && true && !hasWarned) {\n hasWarned = true;\n console[console.info ? \"info\" : \"log\"](\n `<Suspense> is an experimental feature and its API will likely change.`\n );\n }\n const {\n p: patch,\n m: move,\n um: unmount,\n n: next,\n o: { parentNode, remove }\n } = rendererInternals;\n let parentSuspenseId;\n const isSuspensible = isVNodeSuspensible(vnode);\n if (isSuspensible) {\n if (parentSuspense && parentSuspense.pendingBranch) {\n parentSuspenseId = parentSuspense.pendingId;\n parentSuspense.deps++;\n }\n }\n const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n assertNumber(timeout, `Suspense timeout`);\n }\n const initialAnchor = anchor;\n const suspense = {\n vnode,\n parent: parentSuspense,\n parentComponent,\n namespace,\n container,\n hiddenContainer,\n deps: 0,\n pendingId: suspenseId++,\n timeout: typeof timeout === \"number\" ? timeout : -1,\n activeBranch: null,\n pendingBranch: null,\n isInFallback: !isHydrating,\n isHydrating,\n isUnmounted: false,\n effects: [],\n resolve(resume = false, sync = false) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (!resume && !suspense.pendingBranch) {\n throw new Error(\n `suspense.resolve() is called without a pending branch.`\n );\n }\n if (suspense.isUnmounted) {\n throw new Error(\n `suspense.resolve() is called on an already unmounted suspense boundary.`\n );\n }\n }\n const {\n vnode: vnode2,\n activeBranch,\n pendingBranch,\n pendingId,\n effects,\n parentComponent: parentComponent2,\n container: container2\n } = suspense;\n let delayEnter = false;\n if (suspense.isHydrating) {\n suspense.isHydrating = false;\n } else if (!resume) {\n delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = () => {\n if (pendingId === suspense.pendingId) {\n move(\n pendingBranch,\n container2,\n anchor === initialAnchor ? next(activeBranch) : anchor,\n 0\n );\n queuePostFlushCb(effects);\n }\n };\n }\n if (activeBranch) {\n if (parentNode(activeBranch.el) === container2) {\n anchor = next(activeBranch);\n }\n unmount(activeBranch, parentComponent2, suspense, true);\n }\n if (!delayEnter) {\n move(pendingBranch, container2, anchor, 0);\n }\n }\n setActiveBranch(suspense, pendingBranch);\n suspense.pendingBranch = null;\n suspense.isInFallback = false;\n let parent = suspense.parent;\n let hasUnresolvedAncestor = false;\n while (parent) {\n if (parent.pendingBranch) {\n parent.effects.push(...effects);\n hasUnresolvedAncestor = true;\n break;\n }\n parent = parent.parent;\n }\n if (!hasUnresolvedAncestor && !delayEnter) {\n queuePostFlushCb(effects);\n }\n suspense.effects = [];\n if (isSuspensible) {\n if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {\n parentSuspense.deps--;\n if (parentSuspense.deps === 0 && !sync) {\n parentSuspense.resolve();\n }\n }\n }\n triggerEvent(vnode2, \"onResolve\");\n },\n fallback(fallbackVNode) {\n if (!suspense.pendingBranch) {\n return;\n }\n const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;\n triggerEvent(vnode2, \"onFallback\");\n const anchor2 = next(activeBranch);\n const mountFallback = () => {\n if (!suspense.isInFallback) {\n return;\n }\n patch(\n null,\n fallbackVNode,\n container2,\n anchor2,\n parentComponent2,\n null,\n // fallback tree will not have suspense context\n namespace2,\n slotScopeIds,\n optimized\n );\n setActiveBranch(suspense, fallbackVNode);\n };\n const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === \"out-in\";\n if (delayEnter) {\n activeBranch.transition.afterLeave = mountFallback;\n }\n suspense.isInFallback = true;\n unmount(\n activeBranch,\n parentComponent2,\n null,\n // no suspense so unmount hooks fire now\n true\n // shouldRemove\n );\n if (!delayEnter) {\n mountFallback();\n }\n },\n move(container2, anchor2, type) {\n suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type);\n suspense.container = container2;\n },\n next() {\n return suspense.activeBranch && next(suspense.activeBranch);\n },\n registerDep(instance, setupRenderEffect, optimized2) {\n const isInPendingSuspense = !!suspense.pendingBranch;\n if (isInPendingSuspense) {\n suspense.deps++;\n }\n const hydratedEl = instance.vnode.el;\n instance.asyncDep.catch((err) => {\n handleError(err, instance, 0);\n }).then((asyncSetupResult) => {\n if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {\n return;\n }\n instance.asyncResolved = true;\n const { vnode: vnode2 } = instance;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n pushWarningContext(vnode2);\n }\n handleSetupResult(instance, asyncSetupResult, false);\n if (hydratedEl) {\n vnode2.el = hydratedEl;\n }\n const placeholder = !hydratedEl && instance.subTree.el;\n setupRenderEffect(\n instance,\n vnode2,\n // component may have been moved before resolve.\n // if this is not a hydration, instance.subTree will be the comment\n // placeholder.\n parentNode(hydratedEl || instance.subTree.el),\n // anchor will not be used if this is hydration, so only need to\n // consider the comment placeholder case.\n hydratedEl ? null : next(instance.subTree),\n suspense,\n namespace,\n optimized2\n );\n if (placeholder) {\n remove(placeholder);\n }\n updateHOCHostEl(instance, vnode2.el);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n popWarningContext();\n }\n if (isInPendingSuspense && --suspense.deps === 0) {\n suspense.resolve();\n }\n });\n },\n unmount(parentSuspense2, doRemove) {\n suspense.isUnmounted = true;\n if (suspense.activeBranch) {\n unmount(\n suspense.activeBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n if (suspense.pendingBranch) {\n unmount(\n suspense.pendingBranch,\n parentComponent,\n parentSuspense2,\n doRemove\n );\n }\n }\n };\n return suspense;\n}\nfunction hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {\n const suspense = vnode.suspense = createSuspenseBoundary(\n vnode,\n parentSuspense,\n parentComponent,\n node.parentNode,\n // eslint-disable-next-line no-restricted-globals\n document.createElement(\"div\"),\n null,\n namespace,\n slotScopeIds,\n optimized,\n rendererInternals,\n true\n );\n const result = hydrateNode(\n node,\n suspense.pendingBranch = vnode.ssContent,\n parentComponent,\n suspense,\n slotScopeIds,\n optimized\n );\n if (suspense.deps === 0) {\n suspense.resolve(false, true);\n }\n return result;\n}\nfunction normalizeSuspenseChildren(vnode) {\n const { shapeFlag, children } = vnode;\n const isSlotChildren = shapeFlag & 32;\n vnode.ssContent = normalizeSuspenseSlot(\n isSlotChildren ? children.default : children\n );\n vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment);\n}\nfunction normalizeSuspenseSlot(s) {\n let block;\n if (isFunction(s)) {\n const trackBlock = isBlockTreeEnabled && s._c;\n if (trackBlock) {\n s._d = false;\n openBlock();\n }\n s = s();\n if (trackBlock) {\n s._d = true;\n block = currentBlock;\n closeBlock();\n }\n }\n if (isArray(s)) {\n const singleChild = filterSingleRoot(s);\n if (!!(process.env.NODE_ENV !== \"production\") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {\n warn$1(`<Suspense> slots expect a single root node.`);\n }\n s = singleChild;\n }\n s = normalizeVNode(s);\n if (block && !s.dynamicChildren) {\n s.dynamicChildren = block.filter((c) => c !== s);\n }\n return s;\n}\nfunction queueEffectWithSuspense(fn, suspense) {\n if (suspense && suspense.pendingBranch) {\n if (isArray(fn)) {\n suspense.effects.push(...fn);\n } else {\n suspense.effects.push(fn);\n }\n } else {\n queuePostFlushCb(fn);\n }\n}\nfunction setActiveBranch(suspense, branch) {\n suspense.activeBranch = branch;\n const { vnode, parentComponent } = suspense;\n let el = branch.el;\n while (!el && branch.component) {\n branch = branch.component.subTree;\n el = branch.el;\n }\n vnode.el = el;\n if (parentComponent && parentComponent.subTree === vnode) {\n parentComponent.vnode.el = el;\n updateHOCHostEl(parentComponent, el);\n }\n}\nfunction isVNodeSuspensible(vnode) {\n const suspensible = vnode.props && vnode.props.suspensible;\n return suspensible != null && suspensible !== false;\n}\n\nconst Fragment = Symbol.for(\"v-fgt\");\nconst Text = Symbol.for(\"v-txt\");\nconst Comment = Symbol.for(\"v-cmt\");\nconst Static = Symbol.for(\"v-stc\");\nconst blockStack = [];\nlet currentBlock = null;\nfunction openBlock(disableTracking = false) {\n blockStack.push(currentBlock = disableTracking ? null : []);\n}\nfunction closeBlock() {\n blockStack.pop();\n currentBlock = blockStack[blockStack.length - 1] || null;\n}\nlet isBlockTreeEnabled = 1;\nfunction setBlockTracking(value, inVOnce = false) {\n isBlockTreeEnabled += value;\n if (value < 0 && currentBlock && inVOnce) {\n currentBlock.hasOnce = true;\n }\n}\nfunction setupBlock(vnode) {\n vnode.dynamicChildren = isBlockTreeEnabled > 0 ? currentBlock || EMPTY_ARR : null;\n closeBlock();\n if (isBlockTreeEnabled > 0 && currentBlock) {\n currentBlock.push(vnode);\n }\n return vnode;\n}\nfunction createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {\n return setupBlock(\n createBaseVNode(\n type,\n props,\n children,\n patchFlag,\n dynamicProps,\n shapeFlag,\n true\n )\n );\n}\nfunction createBlock(type, props, children, patchFlag, dynamicProps) {\n return setupBlock(\n createVNode(\n type,\n props,\n children,\n patchFlag,\n dynamicProps,\n true\n )\n );\n}\nfunction isVNode(value) {\n return value ? value.__v_isVNode === true : false;\n}\nfunction isSameVNodeType(n1, n2) {\n if (!!(process.env.NODE_ENV !== \"production\") && n2.shapeFlag & 6 && n1.component) {\n const dirtyInstances = hmrDirtyComponents.get(n2.type);\n if (dirtyInstances && dirtyInstances.has(n1.component)) {\n n1.shapeFlag &= -257;\n n2.shapeFlag &= -513;\n return false;\n }\n }\n return n1.type === n2.type && n1.key === n2.key;\n}\nlet vnodeArgsTransformer;\nfunction transformVNodeArgs(transformer) {\n vnodeArgsTransformer = transformer;\n}\nconst createVNodeWithArgsTransform = (...args) => {\n return _createVNode(\n ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args\n );\n};\nconst normalizeKey = ({ key }) => key != null ? key : null;\nconst normalizeRef = ({\n ref,\n ref_key,\n ref_for\n}) => {\n if (typeof ref === \"number\") {\n ref = \"\" + ref;\n }\n return ref != null ? isString(ref) || isRef(ref) || isFunction(ref) ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for } : ref : null;\n};\nfunction createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1, isBlockNode = false, needFullChildrenNormalization = false) {\n const vnode = {\n __v_isVNode: true,\n __v_skip: true,\n type,\n props,\n key: props && normalizeKey(props),\n ref: props && normalizeRef(props),\n scopeId: currentScopeId,\n slotScopeIds: null,\n children,\n component: null,\n suspense: null,\n ssContent: null,\n ssFallback: null,\n dirs: null,\n transition: null,\n el: null,\n anchor: null,\n target: null,\n targetStart: null,\n targetAnchor: null,\n staticCount: 0,\n shapeFlag,\n patchFlag,\n dynamicProps,\n dynamicChildren: null,\n appContext: null,\n ctx: currentRenderingInstance\n };\n if (needFullChildrenNormalization) {\n normalizeChildren(vnode, children);\n if (shapeFlag & 128) {\n type.normalize(vnode);\n }\n } else if (children) {\n vnode.shapeFlag |= isString(children) ? 8 : 16;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && vnode.key !== vnode.key) {\n warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);\n }\n if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself\n !isBlockNode && // has current parent block\n currentBlock && // presence of a patch flag indicates this node needs patching on updates.\n // component nodes also should always be patched, because even if the\n // component doesn't need to update, it needs to persist the instance on to\n // the next vnode so that it can be properly unmounted later.\n (vnode.patchFlag > 0 || shapeFlag & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the\n // vnode should not be considered dynamic due to handler caching.\n vnode.patchFlag !== 32) {\n currentBlock.push(vnode);\n }\n return vnode;\n}\nconst createVNode = !!(process.env.NODE_ENV !== \"production\") ? createVNodeWithArgsTransform : _createVNode;\nfunction _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {\n if (!type || type === NULL_DYNAMIC_COMPONENT) {\n if (!!(process.env.NODE_ENV !== \"production\") && !type) {\n warn$1(`Invalid vnode type when creating vnode: ${type}.`);\n }\n type = Comment;\n }\n if (isVNode(type)) {\n const cloned = cloneVNode(\n type,\n props,\n true\n /* mergeRef: true */\n );\n if (children) {\n normalizeChildren(cloned, children);\n }\n if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {\n if (cloned.shapeFlag & 6) {\n currentBlock[currentBlock.indexOf(type)] = cloned;\n } else {\n currentBlock.push(cloned);\n }\n }\n cloned.patchFlag = -2;\n return cloned;\n }\n if (isClassComponent(type)) {\n type = type.__vccOpts;\n }\n if (props) {\n props = guardReactiveProps(props);\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (isObject(style)) {\n if (isProxy(style) && !isArray(style)) {\n style = extend({}, style);\n }\n props.style = normalizeStyle(style);\n }\n }\n const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;\n if (!!(process.env.NODE_ENV !== \"production\") && shapeFlag & 4 && isProxy(type)) {\n type = toRaw(type);\n warn$1(\n `Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \\`markRaw\\` or using \\`shallowRef\\` instead of \\`ref\\`.`,\n `\nComponent that was made reactive: `,\n type\n );\n }\n return createBaseVNode(\n type,\n props,\n children,\n patchFlag,\n dynamicProps,\n shapeFlag,\n isBlockNode,\n true\n );\n}\nfunction guardReactiveProps(props) {\n if (!props) return null;\n return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;\n}\nfunction cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false) {\n const { props, ref, patchFlag, children, transition } = vnode;\n const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;\n const cloned = {\n __v_isVNode: true,\n __v_skip: true,\n type: vnode.type,\n props: mergedProps,\n key: mergedProps && normalizeKey(mergedProps),\n ref: extraProps && extraProps.ref ? (\n // #2078 in the case of <component :is=\"vnode\" ref=\"extra\"/>\n // if the vnode itself already has a ref, cloneVNode will need to merge\n // the refs so the single vnode can be set on multiple refs\n mergeRef && ref ? isArray(ref) ? ref.concat(normalizeRef(extraProps)) : [ref, normalizeRef(extraProps)] : normalizeRef(extraProps)\n ) : ref,\n scopeId: vnode.scopeId,\n slotScopeIds: vnode.slotScopeIds,\n children: !!(process.env.NODE_ENV !== \"production\") && patchFlag === -1 && isArray(children) ? children.map(deepCloneVNode) : children,\n target: vnode.target,\n targetStart: vnode.targetStart,\n targetAnchor: vnode.targetAnchor,\n staticCount: vnode.staticCount,\n shapeFlag: vnode.shapeFlag,\n // if the vnode is cloned with extra props, we can no longer assume its\n // existing patch flag to be reliable and need to add the FULL_PROPS flag.\n // note: preserve flag for fragments since they use the flag for children\n // fast paths only.\n patchFlag: extraProps && vnode.type !== Fragment ? patchFlag === -1 ? 16 : patchFlag | 16 : patchFlag,\n dynamicProps: vnode.dynamicProps,\n dynamicChildren: vnode.dynamicChildren,\n appContext: vnode.appContext,\n dirs: vnode.dirs,\n transition,\n // These should technically only be non-null on mounted VNodes. However,\n // they *should* be copied for kept-alive vnodes. So we just always copy\n // them since them being non-null during a mount doesn't affect the logic as\n // they will simply be overwritten.\n component: vnode.component,\n suspense: vnode.suspense,\n ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),\n ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),\n el: vnode.el,\n anchor: vnode.anchor,\n ctx: vnode.ctx,\n ce: vnode.ce\n };\n if (transition && cloneTransition) {\n setTransitionHooks(\n cloned,\n transition.clone(cloned)\n );\n }\n return cloned;\n}\nfunction deepCloneVNode(vnode) {\n const cloned = cloneVNode(vnode);\n if (isArray(vnode.children)) {\n cloned.children = vnode.children.map(deepCloneVNode);\n }\n return cloned;\n}\nfunction createTextVNode(text = \" \", flag = 0) {\n return createVNode(Text, null, text, flag);\n}\nfunction createStaticVNode(content, numberOfNodes) {\n const vnode = createVNode(Static, null, content);\n vnode.staticCount = numberOfNodes;\n return vnode;\n}\nfunction createCommentVNode(text = \"\", asBlock = false) {\n return asBlock ? (openBlock(), createBlock(Comment, null, text)) : createVNode(Comment, null, text);\n}\nfunction normalizeVNode(child) {\n if (child == null || typeof child === \"boolean\") {\n return createVNode(Comment);\n } else if (isArray(child)) {\n return createVNode(\n Fragment,\n null,\n // #3666, avoid reference pollution when reusing vnode\n child.slice()\n );\n } else if (isVNode(child)) {\n return cloneIfMounted(child);\n } else {\n return createVNode(Text, null, String(child));\n }\n}\nfunction cloneIfMounted(child) {\n return child.el === null && child.patchFlag !== -1 || child.memo ? child : cloneVNode(child);\n}\nfunction normalizeChildren(vnode, children) {\n let type = 0;\n const { shapeFlag } = vnode;\n if (children == null) {\n children = null;\n } else if (isArray(children)) {\n type = 16;\n } else if (typeof children === \"object\") {\n if (shapeFlag & (1 | 64)) {\n const slot = children.default;\n if (slot) {\n slot._c && (slot._d = false);\n normalizeChildren(vnode, slot());\n slot._c && (slot._d = true);\n }\n return;\n } else {\n type = 32;\n const slotFlag = children._;\n if (!slotFlag && !isInternalObject(children)) {\n children._ctx = currentRenderingInstance;\n } else if (slotFlag === 3 && currentRenderingInstance) {\n if (currentRenderingInstance.slots._ === 1) {\n children._ = 1;\n } else {\n children._ = 2;\n vnode.patchFlag |= 1024;\n }\n }\n }\n } else if (isFunction(children)) {\n children = { default: children, _ctx: currentRenderingInstance };\n type = 32;\n } else {\n children = String(children);\n if (shapeFlag & 64) {\n type = 16;\n children = [createTextVNode(children)];\n } else {\n type = 8;\n }\n }\n vnode.children = children;\n vnode.shapeFlag |= type;\n}\nfunction mergeProps(...args) {\n const ret = {};\n for (let i = 0; i < args.length; i++) {\n const toMerge = args[i];\n for (const key in toMerge) {\n if (key === \"class\") {\n if (ret.class !== toMerge.class) {\n ret.class = normalizeClass([ret.class, toMerge.class]);\n }\n } else if (key === \"style\") {\n ret.style = normalizeStyle([ret.style, toMerge.style]);\n } else if (isOn(key)) {\n const existing = ret[key];\n const incoming = toMerge[key];\n if (incoming && existing !== incoming && !(isArray(existing) && existing.includes(incoming))) {\n ret[key] = existing ? [].concat(existing, incoming) : incoming;\n }\n } else if (key !== \"\") {\n ret[key] = toMerge[key];\n }\n }\n }\n return ret;\n}\nfunction invokeVNodeHook(hook, instance, vnode, prevVNode = null) {\n callWithAsyncErrorHandling(hook, instance, 7, [\n vnode,\n prevVNode\n ]);\n}\n\nconst emptyAppContext = createAppContext();\nlet uid = 0;\nfunction createComponentInstance(vnode, parent, suspense) {\n const type = vnode.type;\n const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;\n const instance = {\n uid: uid++,\n vnode,\n type,\n parent,\n appContext,\n root: null,\n // to be immediately set\n next: null,\n subTree: null,\n // will be set synchronously right after creation\n effect: null,\n update: null,\n // will be set synchronously right after creation\n job: null,\n scope: new EffectScope(\n true\n /* detached */\n ),\n render: null,\n proxy: null,\n exposed: null,\n exposeProxy: null,\n withProxy: null,\n provides: parent ? parent.provides : Object.create(appContext.provides),\n ids: parent ? parent.ids : [\"\", 0, 0],\n accessCache: null,\n renderCache: [],\n // local resolved assets\n components: null,\n directives: null,\n // resolved props and emits options\n propsOptions: normalizePropsOptions(type, appContext),\n emitsOptions: normalizeEmitsOptions(type, appContext),\n // emit\n emit: null,\n // to be set immediately\n emitted: null,\n // props default value\n propsDefaults: EMPTY_OBJ,\n // inheritAttrs\n inheritAttrs: type.inheritAttrs,\n // state\n ctx: EMPTY_OBJ,\n data: EMPTY_OBJ,\n props: EMPTY_OBJ,\n attrs: EMPTY_OBJ,\n slots: EMPTY_OBJ,\n refs: EMPTY_OBJ,\n setupState: EMPTY_OBJ,\n setupContext: null,\n // suspense related\n suspense,\n suspenseId: suspense ? suspense.pendingId : 0,\n asyncDep: null,\n asyncResolved: false,\n // lifecycle hooks\n // not using enums here because it results in computed properties\n isMounted: false,\n isUnmounted: false,\n isDeactivated: false,\n bc: null,\n c: null,\n bm: null,\n m: null,\n bu: null,\n u: null,\n um: null,\n bum: null,\n da: null,\n a: null,\n rtg: null,\n rtc: null,\n ec: null,\n sp: null\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n instance.ctx = createDevRenderContext(instance);\n } else {\n instance.ctx = { _: instance };\n }\n instance.root = parent ? parent.root : instance;\n instance.emit = emit.bind(null, instance);\n if (vnode.ce) {\n vnode.ce(instance);\n }\n return instance;\n}\nlet currentInstance = null;\nconst getCurrentInstance = () => currentInstance || currentRenderingInstance;\nlet internalSetCurrentInstance;\nlet setInSSRSetupState;\n{\n const g = getGlobalThis();\n const registerGlobalSetter = (key, setter) => {\n let setters;\n if (!(setters = g[key])) setters = g[key] = [];\n setters.push(setter);\n return (v) => {\n if (setters.length > 1) setters.forEach((set) => set(v));\n else setters[0](v);\n };\n };\n internalSetCurrentInstance = registerGlobalSetter(\n `__VUE_INSTANCE_SETTERS__`,\n (v) => currentInstance = v\n );\n setInSSRSetupState = registerGlobalSetter(\n `__VUE_SSR_SETTERS__`,\n (v) => isInSSRComponentSetup = v\n );\n}\nconst setCurrentInstance = (instance) => {\n const prev = currentInstance;\n internalSetCurrentInstance(instance);\n instance.scope.on();\n return () => {\n instance.scope.off();\n internalSetCurrentInstance(prev);\n };\n};\nconst unsetCurrentInstance = () => {\n currentInstance && currentInstance.scope.off();\n internalSetCurrentInstance(null);\n};\nconst isBuiltInTag = /* @__PURE__ */ makeMap(\"slot,component\");\nfunction validateComponentName(name, { isNativeTag }) {\n if (isBuiltInTag(name) || isNativeTag(name)) {\n warn$1(\n \"Do not use built-in or reserved HTML elements as component id: \" + name\n );\n }\n}\nfunction isStatefulComponent(instance) {\n return instance.vnode.shapeFlag & 4;\n}\nlet isInSSRComponentSetup = false;\nfunction setupComponent(instance, isSSR = false, optimized = false) {\n isSSR && setInSSRSetupState(isSSR);\n const { props, children } = instance.vnode;\n const isStateful = isStatefulComponent(instance);\n initProps(instance, props, isStateful, isSSR);\n initSlots(instance, children, optimized || isSSR);\n const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;\n isSSR && setInSSRSetupState(false);\n return setupResult;\n}\nfunction setupStatefulComponent(instance, isSSR) {\n var _a;\n const Component = instance.type;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (Component.name) {\n validateComponentName(Component.name, instance.appContext.config);\n }\n if (Component.components) {\n const names = Object.keys(Component.components);\n for (let i = 0; i < names.length; i++) {\n validateComponentName(names[i], instance.appContext.config);\n }\n }\n if (Component.directives) {\n const names = Object.keys(Component.directives);\n for (let i = 0; i < names.length; i++) {\n validateDirectiveName(names[i]);\n }\n }\n if (Component.compilerOptions && isRuntimeOnly()) {\n warn$1(\n `\"compilerOptions\" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`\n );\n }\n }\n instance.accessCache = /* @__PURE__ */ Object.create(null);\n instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n exposePropsOnRenderContext(instance);\n }\n const { setup } = Component;\n if (setup) {\n pauseTracking();\n const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;\n const reset = setCurrentInstance(instance);\n const setupResult = callWithErrorHandling(\n setup,\n instance,\n 0,\n [\n !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(instance.props) : instance.props,\n setupContext\n ]\n );\n const isAsyncSetup = isPromise(setupResult);\n resetTracking();\n reset();\n if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) {\n markAsyncBoundary(instance);\n }\n if (isAsyncSetup) {\n setupResult.then(unsetCurrentInstance, unsetCurrentInstance);\n if (isSSR) {\n return setupResult.then((resolvedResult) => {\n handleSetupResult(instance, resolvedResult, isSSR);\n }).catch((e) => {\n handleError(e, instance, 0);\n });\n } else {\n instance.asyncDep = setupResult;\n if (!!(process.env.NODE_ENV !== \"production\") && !instance.suspense) {\n const name = (_a = Component.name) != null ? _a : \"Anonymous\";\n warn$1(\n `Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`\n );\n }\n }\n } else {\n handleSetupResult(instance, setupResult, isSSR);\n }\n } else {\n finishComponentSetup(instance, isSSR);\n }\n}\nfunction handleSetupResult(instance, setupResult, isSSR) {\n if (isFunction(setupResult)) {\n if (instance.type.__ssrInlineRender) {\n instance.ssrRender = setupResult;\n } else {\n instance.render = setupResult;\n }\n } else if (isObject(setupResult)) {\n if (!!(process.env.NODE_ENV !== \"production\") && isVNode(setupResult)) {\n warn$1(\n `setup() should not return VNodes directly - return a render function instead.`\n );\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n instance.devtoolsRawSetupState = setupResult;\n }\n instance.setupState = proxyRefs(setupResult);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n exposeSetupStateOnRenderContext(instance);\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupResult !== void 0) {\n warn$1(\n `setup() should return an object. Received: ${setupResult === null ? \"null\" : typeof setupResult}`\n );\n }\n finishComponentSetup(instance, isSSR);\n}\nlet compile;\nlet installWithProxy;\nfunction registerRuntimeCompiler(_compile) {\n compile = _compile;\n installWithProxy = (i) => {\n if (i.render._rc) {\n i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);\n }\n };\n}\nconst isRuntimeOnly = () => !compile;\nfunction finishComponentSetup(instance, isSSR, skipOptions) {\n const Component = instance.type;\n if (!instance.render) {\n if (!isSSR && compile && !Component.render) {\n const template = Component.template || __VUE_OPTIONS_API__ && resolveMergedOptions(instance).template;\n if (template) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n startMeasure(instance, `compile`);\n }\n const { isCustomElement, compilerOptions } = instance.appContext.config;\n const { delimiters, compilerOptions: componentCompilerOptions } = Component;\n const finalCompilerOptions = extend(\n extend(\n {\n isCustomElement,\n delimiters\n },\n compilerOptions\n ),\n componentCompilerOptions\n );\n Component.render = compile(template, finalCompilerOptions);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n endMeasure(instance, `compile`);\n }\n }\n }\n instance.render = Component.render || NOOP;\n if (installWithProxy) {\n installWithProxy(instance);\n }\n }\n if (__VUE_OPTIONS_API__ && true) {\n const reset = setCurrentInstance(instance);\n pauseTracking();\n try {\n applyOptions(instance);\n } finally {\n resetTracking();\n reset();\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !Component.render && instance.render === NOOP && !isSSR) {\n if (!compile && Component.template) {\n warn$1(\n `Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".` )\n );\n } else {\n warn$1(`Component is missing template or render function: `, Component);\n }\n }\n}\nconst attrsProxyHandlers = !!(process.env.NODE_ENV !== \"production\") ? {\n get(target, key) {\n markAttrsAccessed();\n track(target, \"get\", \"\");\n return target[key];\n },\n set() {\n warn$1(`setupContext.attrs is readonly.`);\n return false;\n },\n deleteProperty() {\n warn$1(`setupContext.attrs is readonly.`);\n return false;\n }\n} : {\n get(target, key) {\n track(target, \"get\", \"\");\n return target[key];\n }\n};\nfunction getSlotsProxy(instance) {\n return new Proxy(instance.slots, {\n get(target, key) {\n track(instance, \"get\", \"$slots\");\n return target[key];\n }\n });\n}\nfunction createSetupContext(instance) {\n const expose = (exposed) => {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (instance.exposed) {\n warn$1(`expose() should be called only once per setup().`);\n }\n if (exposed != null) {\n let exposedType = typeof exposed;\n if (exposedType === \"object\") {\n if (isArray(exposed)) {\n exposedType = \"array\";\n } else if (isRef(exposed)) {\n exposedType = \"ref\";\n }\n }\n if (exposedType !== \"object\") {\n warn$1(\n `expose() should be passed a plain object, received ${exposedType}.`\n );\n }\n }\n }\n instance.exposed = exposed || {};\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n let attrsProxy;\n let slotsProxy;\n return Object.freeze({\n get attrs() {\n return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));\n },\n get slots() {\n return slotsProxy || (slotsProxy = getSlotsProxy(instance));\n },\n get emit() {\n return (event, ...args) => instance.emit(event, ...args);\n },\n expose\n });\n } else {\n return {\n attrs: new Proxy(instance.attrs, attrsProxyHandlers),\n slots: instance.slots,\n emit: instance.emit,\n expose\n };\n }\n}\nfunction getComponentPublicInstance(instance) {\n if (instance.exposed) {\n return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {\n get(target, key) {\n if (key in target) {\n return target[key];\n } else if (key in publicPropertiesMap) {\n return publicPropertiesMap[key](instance);\n }\n },\n has(target, key) {\n return key in target || key in publicPropertiesMap;\n }\n }));\n } else {\n return instance.proxy;\n }\n}\nconst classifyRE = /(?:^|[-_])(\\w)/g;\nconst classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, \"\");\nfunction getComponentName(Component, includeInferred = true) {\n return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;\n}\nfunction formatComponentName(instance, Component, isRoot = false) {\n let name = getComponentName(Component);\n if (!name && Component.__file) {\n const match = Component.__file.match(/([^/\\\\]+)\\.\\w+$/);\n if (match) {\n name = match[1];\n }\n }\n if (!name && instance && instance.parent) {\n const inferFromRegistry = (registry) => {\n for (const key in registry) {\n if (registry[key] === Component) {\n return key;\n }\n }\n };\n name = inferFromRegistry(\n instance.components || instance.parent.type.components\n ) || inferFromRegistry(instance.appContext.components);\n }\n return name ? classify(name) : isRoot ? `App` : `Anonymous`;\n}\nfunction isClassComponent(value) {\n return isFunction(value) && \"__vccOpts\" in value;\n}\n\nconst computed = (getterOrOptions, debugOptions) => {\n const c = computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const i = getCurrentInstance();\n if (i && i.appContext.config.warnRecursiveComputed) {\n c._warnRecursive = true;\n }\n }\n return c;\n};\n\nfunction h(type, propsOrChildren, children) {\n const l = arguments.length;\n if (l === 2) {\n if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {\n if (isVNode(propsOrChildren)) {\n return createVNode(type, null, [propsOrChildren]);\n }\n return createVNode(type, propsOrChildren);\n } else {\n return createVNode(type, null, propsOrChildren);\n }\n } else {\n if (l > 3) {\n children = Array.prototype.slice.call(arguments, 2);\n } else if (l === 3 && isVNode(children)) {\n children = [children];\n }\n return createVNode(type, propsOrChildren, children);\n }\n}\n\nfunction initCustomFormatter() {\n if (!!!(process.env.NODE_ENV !== \"production\") || typeof window === \"undefined\") {\n return;\n }\n const vueStyle = { style: \"color:#3ba776\" };\n const numberStyle = { style: \"color:#1677ff\" };\n const stringStyle = { style: \"color:#f5222d\" };\n const keywordStyle = { style: \"color:#eb2f96\" };\n const formatter = {\n __vue_custom_formatter: true,\n header(obj) {\n if (!isObject(obj)) {\n return null;\n }\n if (obj.__isVue) {\n return [\"div\", vueStyle, `VueInstance`];\n } else if (isRef(obj)) {\n pauseTracking();\n const value = obj.value;\n resetTracking();\n return [\n \"div\",\n {},\n [\"span\", vueStyle, genRefFlag(obj)],\n \"<\",\n formatValue(value),\n `>`\n ];\n } else if (isReactive(obj)) {\n return [\n \"div\",\n {},\n [\"span\", vueStyle, isShallow(obj) ? \"ShallowReactive\" : \"Reactive\"],\n \"<\",\n formatValue(obj),\n `>${isReadonly(obj) ? ` (readonly)` : ``}`\n ];\n } else if (isReadonly(obj)) {\n return [\n \"div\",\n {},\n [\"span\", vueStyle, isShallow(obj) ? \"ShallowReadonly\" : \"Readonly\"],\n \"<\",\n formatValue(obj),\n \">\"\n ];\n }\n return null;\n },\n hasBody(obj) {\n return obj && obj.__isVue;\n },\n body(obj) {\n if (obj && obj.__isVue) {\n return [\n \"div\",\n {},\n ...formatInstance(obj.$)\n ];\n }\n }\n };\n function formatInstance(instance) {\n const blocks = [];\n if (instance.type.props && instance.props) {\n blocks.push(createInstanceBlock(\"props\", toRaw(instance.props)));\n }\n if (instance.setupState !== EMPTY_OBJ) {\n blocks.push(createInstanceBlock(\"setup\", instance.setupState));\n }\n if (instance.data !== EMPTY_OBJ) {\n blocks.push(createInstanceBlock(\"data\", toRaw(instance.data)));\n }\n const computed = extractKeys(instance, \"computed\");\n if (computed) {\n blocks.push(createInstanceBlock(\"computed\", computed));\n }\n const injected = extractKeys(instance, \"inject\");\n if (injected) {\n blocks.push(createInstanceBlock(\"injected\", injected));\n }\n blocks.push([\n \"div\",\n {},\n [\n \"span\",\n {\n style: keywordStyle.style + \";opacity:0.66\"\n },\n \"$ (internal): \"\n ],\n [\"object\", { object: instance }]\n ]);\n return blocks;\n }\n function createInstanceBlock(type, target) {\n target = extend({}, target);\n if (!Object.keys(target).length) {\n return [\"span\", {}];\n }\n return [\n \"div\",\n { style: \"line-height:1.25em;margin-bottom:0.6em\" },\n [\n \"div\",\n {\n style: \"color:#476582\"\n },\n type\n ],\n [\n \"div\",\n {\n style: \"padding-left:1.25em\"\n },\n ...Object.keys(target).map((key) => {\n return [\n \"div\",\n {},\n [\"span\", keywordStyle, key + \": \"],\n formatValue(target[key], false)\n ];\n })\n ]\n ];\n }\n function formatValue(v, asRaw = true) {\n if (typeof v === \"number\") {\n return [\"span\", numberStyle, v];\n } else if (typeof v === \"string\") {\n return [\"span\", stringStyle, JSON.stringify(v)];\n } else if (typeof v === \"boolean\") {\n return [\"span\", keywordStyle, v];\n } else if (isObject(v)) {\n return [\"object\", { object: asRaw ? toRaw(v) : v }];\n } else {\n return [\"span\", stringStyle, String(v)];\n }\n }\n function extractKeys(instance, type) {\n const Comp = instance.type;\n if (isFunction(Comp)) {\n return;\n }\n const extracted = {};\n for (const key in instance.ctx) {\n if (isKeyOfType(Comp, key, type)) {\n extracted[key] = instance.ctx[key];\n }\n }\n return extracted;\n }\n function isKeyOfType(Comp, key, type) {\n const opts = Comp[type];\n if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {\n return true;\n }\n if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {\n return true;\n }\n if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {\n return true;\n }\n }\n function genRefFlag(v) {\n if (isShallow(v)) {\n return `ShallowRef`;\n }\n if (v.effect) {\n return `ComputedRef`;\n }\n return `Ref`;\n }\n if (window.devtoolsFormatters) {\n window.devtoolsFormatters.push(formatter);\n } else {\n window.devtoolsFormatters = [formatter];\n }\n}\n\nfunction withMemo(memo, render, cache, index) {\n const cached = cache[index];\n if (cached && isMemoSame(cached, memo)) {\n return cached;\n }\n const ret = render();\n ret.memo = memo.slice();\n ret.cacheIndex = index;\n return cache[index] = ret;\n}\nfunction isMemoSame(cached, memo) {\n const prev = cached.memo;\n if (prev.length != memo.length) {\n return false;\n }\n for (let i = 0; i < prev.length; i++) {\n if (hasChanged(prev[i], memo[i])) {\n return false;\n }\n }\n if (isBlockTreeEnabled > 0 && currentBlock) {\n currentBlock.push(cached);\n }\n return true;\n}\n\nconst version = \"3.5.16\";\nconst warn = !!(process.env.NODE_ENV !== \"production\") ? warn$1 : NOOP;\nconst ErrorTypeStrings = ErrorTypeStrings$1 ;\nconst devtools = !!(process.env.NODE_ENV !== \"production\") || true ? devtools$1 : void 0;\nconst setDevtoolsHook = !!(process.env.NODE_ENV !== \"production\") || true ? setDevtoolsHook$1 : NOOP;\nconst _ssrUtils = {\n createComponentInstance,\n setupComponent,\n renderComponentRoot,\n setCurrentRenderingInstance,\n isVNode: isVNode,\n normalizeVNode,\n getComponentPublicInstance,\n ensureValidVNode,\n pushWarningContext,\n popWarningContext\n};\nconst ssrUtils = _ssrUtils ;\nconst resolveFilter = null;\nconst compatUtils = null;\nconst DeprecationTypes = null;\n\nexport { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, Static, Suspense, Teleport, Text, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, cloneVNode, compatUtils, computed, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, getCurrentInstance, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, inject, isMemoSame, isRuntimeOnly, isVNode, mergeDefaults, mergeModels, mergeProps, nextTick, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, pushScopeId, queuePostFlushCb, registerRuntimeCompiler, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, ssrContextKey, ssrUtils, toHandlers, transformVNodeArgs, useAttrs, useId, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };\n","/*!\n * pinia v3.0.3\n * (c) 2025 Eduardo San Martin Morote\n * @license MIT\n */\nimport { hasInjectionContext, inject, toRaw, watch, unref, markRaw, effectScope, ref, isRef, isReactive, getCurrentScope, onScopeDispose, getCurrentInstance, reactive, toRef, nextTick, computed, toRefs } from 'vue';\nimport { setupDevtoolsPlugin } from '@vue/devtools-api';\n\n/**\n * setActivePinia must be called to handle SSR at the top of functions like\n * `fetch`, `setup`, `serverPrefetch` and others\n */\nlet activePinia;\n/**\n * Sets or unsets the active pinia. Used in SSR and internally when calling\n * actions and getters\n *\n * @param pinia - Pinia instance\n */\n// @ts-expect-error: cannot constrain the type of the return\nconst setActivePinia = (pinia) => (activePinia = pinia);\n/**\n * Get the currently active pinia if there is any.\n */\nconst getActivePinia = () => (hasInjectionContext() && inject(piniaSymbol)) || activePinia;\nconst piniaSymbol = ((process.env.NODE_ENV !== 'production') ? Symbol('pinia') : /* istanbul ignore next */ Symbol());\n\nfunction isPlainObject(\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\no) {\n return (o &&\n typeof o === 'object' &&\n Object.prototype.toString.call(o) === '[object Object]' &&\n typeof o.toJSON !== 'function');\n}\n// type DeepReadonly<T> = { readonly [P in keyof T]: DeepReadonly<T[P]> }\n// TODO: can we change these to numbers?\n/**\n * Possible types for SubscriptionCallback\n */\nvar MutationType;\n(function (MutationType) {\n /**\n * Direct mutation of the state:\n *\n * - `store.name = 'new name'`\n * - `store.$state.name = 'new name'`\n * - `store.list.push('new item')`\n */\n MutationType[\"direct\"] = \"direct\";\n /**\n * Mutated the state with `$patch` and an object\n *\n * - `store.$patch({ name: 'newName' })`\n */\n MutationType[\"patchObject\"] = \"patch object\";\n /**\n * Mutated the state with `$patch` and a function\n *\n * - `store.$patch(state => state.name = 'newName')`\n */\n MutationType[\"patchFunction\"] = \"patch function\";\n // maybe reset? for $state = {} and $reset\n})(MutationType || (MutationType = {}));\n\nconst IS_CLIENT = typeof window !== 'undefined';\n\n/*\n * FileSaver.js A saveAs() FileSaver implementation.\n *\n * Originally by Eli Grey, adapted as an ESM module by Eduardo San Martin\n * Morote.\n *\n * License : MIT\n */\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nconst _global = /*#__PURE__*/ (() => typeof window === 'object' && window.window === window\n ? window\n : typeof self === 'object' && self.self === self\n ? self\n : typeof global === 'object' && global.global === global\n ? global\n : typeof globalThis === 'object'\n ? globalThis\n : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n // prepend BOM for UTF-8 XML and text/* types (including HTML)\n // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n if (autoBom &&\n /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(0xfeff), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open('GET', url);\n xhr.responseType = 'blob';\n xhr.onload = function () {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function () {\n console.error('could not download file');\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n // use sync to avoid popup blocker\n xhr.open('HEAD', url, false);\n try {\n xhr.send();\n }\n catch (e) { }\n return xhr.status >= 200 && xhr.status <= 299;\n}\n// `a.click()` doesn't work for all browsers (#465)\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent('click'));\n }\n catch (e) {\n const evt = new MouseEvent('click', {\n bubbles: true,\n cancelable: true,\n view: window,\n detail: 0,\n screenX: 80,\n screenY: 20,\n clientX: 80,\n clientY: 20,\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false,\n button: 0,\n relatedTarget: null,\n });\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === 'object' ? navigator : { userAgent: '' };\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nconst isMacOSWebView = /*#__PURE__*/ (() => /Macintosh/.test(_navigator.userAgent) &&\n /AppleWebKit/.test(_navigator.userAgent) &&\n !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT\n ? () => { } // noop\n : // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== 'undefined' &&\n 'download' in HTMLAnchorElement.prototype &&\n !isMacOSWebView\n ? downloadSaveAs\n : // Use msSaveOrOpenBlob as a second approach\n 'msSaveOrOpenBlob' in _navigator\n ? msSaveAs\n : // Fallback to using FileReader and a popup\n fileSaverSaveAs;\nfunction downloadSaveAs(blob, name = 'download', opts) {\n const a = document.createElement('a');\n a.download = name;\n a.rel = 'noopener'; // tabnabbing\n // TODO: detect chrome extensions & packaged apps\n // a.target = '_blank'\n if (typeof blob === 'string') {\n // Support regular links\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n }\n else {\n a.target = '_blank';\n click(a);\n }\n }\n else {\n click(a);\n }\n }\n else {\n // Support blobs\n a.href = URL.createObjectURL(blob);\n setTimeout(function () {\n URL.revokeObjectURL(a.href);\n }, 4e4); // 40s\n setTimeout(function () {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = 'download', opts) {\n if (typeof blob === 'string') {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n }\n else {\n const a = document.createElement('a');\n a.href = blob;\n a.target = '_blank';\n setTimeout(function () {\n click(a);\n });\n }\n }\n else {\n // @ts-ignore: works on windows\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n // Open a popup immediately do go around popup blocker\n // Mostly only available on user interaction and the fileReader is async so...\n popup = popup || open('', '_blank');\n if (popup) {\n popup.document.title = popup.document.body.innerText = 'downloading...';\n }\n if (typeof blob === 'string')\n return download(blob, name, opts);\n const force = blob.type === 'application/octet-stream';\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || 'safari' in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || (force && isSafari) || isMacOSWebView) &&\n typeof FileReader !== 'undefined') {\n // Safari doesn't allow downloading of blob URLs\n const reader = new FileReader();\n reader.onloadend = function () {\n let url = reader.result;\n if (typeof url !== 'string') {\n popup = null;\n throw new Error('Wrong reader.result type');\n }\n url = isChromeIOS\n ? url\n : url.replace(/^data:[^;]*;/, 'data:attachment/file;');\n if (popup) {\n popup.location.href = url;\n }\n else {\n location.assign(url);\n }\n popup = null; // reverse-tabnabbing #460\n };\n reader.readAsDataURL(blob);\n }\n else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null; // reverse-tabnabbing #460\n setTimeout(function () {\n URL.revokeObjectURL(url);\n }, 4e4); // 40s\n }\n}\n\n/**\n * Shows a toast or console.log\n *\n * @param message - message to log\n * @param type - different color of the tooltip\n */\nfunction toastMessage(message, type) {\n const piniaMessage = '🍍 ' + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === 'function') {\n // No longer available :(\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type);\n }\n else if (type === 'error') {\n console.error(piniaMessage);\n }\n else if (type === 'warn') {\n console.warn(piniaMessage);\n }\n else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return '_a' in o && 'install' in o;\n}\n\n/**\n * This file contain devtools actions, they are not Pinia actions.\n */\n// ---\nfunction checkClipboardAccess() {\n if (!('clipboard' in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, 'error');\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error &&\n error.message.toLowerCase().includes('document is not focused')) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', 'warn');\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia.state.value));\n toastMessage('Global state copied to clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia) {\n if (checkClipboardAccess())\n return;\n try {\n loadStoresState(pinia, JSON.parse(await navigator.clipboard.readText()));\n toastMessage('Global state pasted from clipboard.');\n }\n catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia) {\n try {\n saveAs(new Blob([JSON.stringify(pinia.state.value)], {\n type: 'text/plain;charset=utf-8',\n }), 'pinia-state.json');\n }\n catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement('input');\n fileInput.type = 'file';\n fileInput.accept = '.json';\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n // @ts-ignore: TODO: changed from 4.3 to 4.4\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia) {\n try {\n const open = getFileOpener();\n const result = await open();\n if (!result)\n return;\n const { text, file } = result;\n loadStoresState(pinia, JSON.parse(text));\n toastMessage(`Global state imported from \"${file.name}\".`);\n }\n catch (error) {\n toastMessage(`Failed to import the state from JSON. Check the console for more details.`, 'error');\n console.error(error);\n }\n}\nfunction loadStoresState(pinia, state) {\n for (const key in state) {\n const storeState = pinia.state.value[key];\n // store is already instantiated, patch it\n if (storeState) {\n Object.assign(storeState, state[key]);\n }\n else {\n // store is not instantiated, set the initial state\n pinia.state.value[key] = state[key];\n }\n }\n}\n\nfunction formatDisplay(display) {\n return {\n _custom: {\n display,\n },\n };\n}\nconst PINIA_ROOT_LABEL = '🍍 Pinia (root)';\nconst PINIA_ROOT_ID = '_root';\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store)\n ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL,\n }\n : {\n id: store.$id,\n label: store.$id,\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId],\n })),\n getters: storeNames\n .filter((id) => storeMap.get(id)._getters)\n .map((id) => {\n const store = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store._getters.reduce((getters, key) => {\n getters[key] = store[key];\n return getters;\n }, {}),\n };\n }),\n };\n return state;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key],\n })),\n };\n // avoid adding empty getters\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName],\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key],\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n // TODO: handle add and delete for arrays and objects\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {},\n });\n }\n else {\n return {\n operation: formatDisplay(events.type),\n key: formatDisplay(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue,\n };\n }\n}\nfunction formatMutationType(type) {\n switch (type) {\n case MutationType.direct:\n return 'mutation';\n case MutationType.patchFunction:\n return '$patch';\n case MutationType.patchObject:\n return '$patch';\n default:\n return 'unknown';\n }\n}\n\n// timeline can be paused when directly changing the state\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = 'pinia:mutations';\nconst INSPECTOR_ID = 'pinia';\nconst { assign: assign$1 } = Object;\n/**\n * Gets the displayed name of a store in devtools\n *\n * @param id - id of the store\n * @returns a formatted string\n */\nconst getStoreType = (id) => '🍍 ' + id;\n/**\n * Add the pinia plugin without any store. Allows displaying a Pinia plugin tab\n * as soon as it is added to the application.\n *\n * @param app - Vue application\n * @param pinia - pinia instance\n */\nfunction registerPiniaDevtools(app, pinia) {\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n }, (api) => {\n if (typeof api.now !== 'function') {\n toastMessage('You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.');\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 0xe5df88,\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: 'Pinia 🍍',\n icon: 'storage',\n treeFilterPlaceholder: 'Search stores',\n actions: [\n {\n icon: 'content_copy',\n action: () => {\n actionGlobalCopyState(pinia);\n },\n tooltip: 'Serialize and copy the state',\n },\n {\n icon: 'content_paste',\n action: async () => {\n await actionGlobalPasteState(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Replace the state with the content of your clipboard',\n },\n {\n icon: 'save',\n action: () => {\n actionGlobalSaveState(pinia);\n },\n tooltip: 'Save the state as a JSON file',\n },\n {\n icon: 'folder_open',\n action: async () => {\n await actionGlobalOpenStateFile(pinia);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: 'Import the state from a JSON file',\n },\n ],\n nodeActions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state (with \"$reset\")',\n action: (nodeId) => {\n const store = pinia._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, 'warn');\n }\n else if (typeof store.$reset !== 'function') {\n toastMessage(`Cannot reset \"${nodeId}\" store because it doesn't have a \"$reset\" method implemented.`, 'warn');\n }\n else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n },\n },\n ],\n });\n api.on.inspectComponent((payload) => {\n const proxy = (payload.componentInstance &&\n payload.componentInstance.proxy);\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'state',\n editable: true,\n value: store._isOptionsAPI\n ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: 'restore',\n tooltip: 'Reset the state of this store',\n action: () => store.$reset(),\n },\n ],\n },\n }\n : // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {}),\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: 'getters',\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n }\n catch (error) {\n // @ts-expect-error: we just want to show it in devtools\n getters[key] = error;\n }\n return getters;\n }, {}),\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia];\n stores = stores.concat(Array.from(pinia._s.values()));\n payload.rootNodes = (payload.filter\n ? stores.filter((store) => '$id' in store\n ? store.$id\n .toLowerCase()\n .includes(payload.filter.toLowerCase())\n : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase()))\n : stores).map(formatStoreForInspectorTree);\n }\n });\n // Expose pinia instance as $pinia to window\n globalThis.$pinia = pinia;\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n // this could be the selected store restored for a different project\n // so it's better not to say anything here\n return;\n }\n if (inspectedStore) {\n // Expose selected store as $store to window\n if (payload.nodeId !== PINIA_ROOT_ID)\n globalThis.$store = toRaw(inspectedStore);\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID\n ? pinia\n : pinia._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n // access only the state\n if (path.length !== 1 ||\n !inspectedStore._customProperties.has(path[0]) ||\n path[0] in inspectedStore.$state) {\n path.unshift('$state');\n }\n }\n else {\n // Root access, we can omit the `.value` because the devtools API does it for us\n path.unshift('state');\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith('🍍')) {\n const storeId = payload.type.replace(/^🍍\\s*/, '');\n const store = pinia._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, 'error');\n }\n const { path } = payload;\n if (path[0] !== 'state') {\n return toastMessage(`Invalid path for store \"${storeId}\":\\n${path}\\nOnly state can be modified.`);\n }\n // rewrite the first entry to be able to directly set the state as\n // well as any other path\n path[0] = '$state';\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin({\n id: 'dev.esm.pinia',\n label: 'Pinia 🍍',\n logo: 'https://pinia.vuejs.org/logo.svg',\n packageName: 'pinia',\n homepage: 'https://pinia.vuejs.org',\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: 'Notify about new/deleted stores',\n type: 'boolean',\n defaultValue: true,\n },\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n },\n }, (api) => {\n // gracefully handle errors\n const now = typeof api.now === 'function' ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛫 ' + name,\n subtitle: 'start',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n },\n groupId,\n },\n });\n after((result) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🛬 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n result,\n },\n groupId,\n },\n });\n });\n onError((error) => {\n activeAction = undefined;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n logType: 'error',\n title: '💥 ' + name,\n subtitle: 'end',\n data: {\n store: formatDisplay(store.$id),\n action: formatDisplay(name),\n args,\n error,\n },\n groupId,\n },\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: 'Change',\n subtitle: name,\n data: {\n newValue,\n oldValue,\n },\n groupId: activeAction,\n },\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n // rootStore.state[store.id] = state\n const eventData = {\n time: now(),\n title: formatMutationType(type),\n data: assign$1({ store: formatDisplay(store.$id) }, formatEventData(events)),\n groupId: activeAction,\n };\n if (type === MutationType.patchFunction) {\n eventData.subtitle = '⤵️';\n }\n else if (type === MutationType.patchObject) {\n eventData.subtitle = '🧩';\n }\n else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data['rawEvent(s)'] = {\n _custom: {\n display: 'DebuggerEvent',\n type: 'object',\n tooltip: 'raw DebuggerEvent[]',\n value: events,\n },\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData,\n });\n }, { detached: true, flush: 'sync' });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now(),\n title: '🔥 ' + store.$id,\n subtitle: 'HMR update',\n data: {\n store: formatDisplay(store.$id),\n info: formatDisplay(`HMR update`),\n },\n },\n });\n // update the devtools too\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n // trigger an update so it can display new registered stores\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges &&\n toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\n/**\n * Patches a store to enable action grouping in devtools by wrapping the store with a Proxy that is passed as the\n * context of all actions, allowing us to set `runningAction` on each access and effectively associating any state\n * mutation to the action.\n *\n * @param store - store to patch\n * @param actionNames - list of actionst to patch\n */\nfunction patchActionForGrouping(store, actionNames, wrapWithProxy) {\n // original actions of the store as they are given by pinia. We are going to override them\n const actions = actionNames.reduce((storeActions, actionName) => {\n // use toRaw to avoid tracking #541\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function () {\n // the running action id is incremented in a before action hook\n const _actionId = runningActionId;\n const trackedStore = wrapWithProxy\n ? new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n },\n })\n : store;\n // For Setup Stores we need https://github.com/tc39/proposal-async-context\n activeAction = _actionId;\n const retValue = actions[actionName].apply(trackedStore, arguments);\n // this is safer as async actions in Setup Stores would associate mutations done outside of the action\n activeAction = undefined;\n return retValue;\n };\n }\n}\n/**\n * pinia.use(devtoolsPlugin)\n */\nfunction devtoolsPlugin({ app, store, options }) {\n // HMR module\n if (store.$id.startsWith('__hot:')) {\n return;\n }\n // detect option api vs setup api\n store._isOptionsAPI = !!options.state;\n // Do not overwrite actions mocked by @pinia/testing (#2298)\n if (!store._p._testing) {\n patchActionForGrouping(store, Object.keys(options.actions), store._isOptionsAPI);\n // Upgrade the HMR to also update the new actions\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function (newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions), !!store._isOptionsAPI);\n };\n }\n addStoreToDevtools(app, \n // FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?\n store);\n}\n\n/**\n * Creates a Pinia instance to be used by the application\n */\nfunction createPinia() {\n const scope = effectScope(true);\n // NOTE: here we could check the window object for a state and directly set it\n // if there is anything like it with Vue 3 SSR\n const state = scope.run(() => ref({}));\n let _p = [];\n // plugins added before calling app.use(pinia)\n let toBeInstalled = [];\n const pinia = markRaw({\n install(app) {\n // this allows calling useStore() outside of a component setup after\n // installing pinia's plugin\n setActivePinia(pinia);\n pinia._a = app;\n app.provide(piniaSymbol, pinia);\n app.config.globalProperties.$pinia = pinia;\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n registerPiniaDevtools(app, pinia);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n },\n use(plugin) {\n if (!this._a) {\n toBeInstalled.push(plugin);\n }\n else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: new Map(),\n state,\n });\n // pinia devtools rely on dev only features so they cannot be forced unless\n // the dev build of Vue is used. Avoid old browsers like IE11.\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT && typeof Proxy !== 'undefined') {\n pinia.use(devtoolsPlugin);\n }\n return pinia;\n}\n/**\n * Dispose a Pinia instance by stopping its effectScope and removing the state, plugins and stores. This is mostly\n * useful in tests, with both a testing pinia or a regular pinia and in applications that use multiple pinia instances.\n * Once disposed, the pinia instance cannot be used anymore.\n *\n * @param pinia - pinia instance\n */\nfunction disposePinia(pinia) {\n pinia._e.stop();\n pinia._s.clear();\n pinia._p.splice(0);\n pinia.state.value = {};\n // @ts-expect-error: non valid\n pinia._a = null;\n}\n\n/**\n * Checks if a function is a `StoreDefinition`.\n *\n * @param fn - object to test\n * @returns true if `fn` is a StoreDefinition\n */\nconst isUseStore = (fn) => {\n return typeof fn === 'function' && typeof fn.$id === 'string';\n};\n/**\n * Mutates in place `newState` with `oldState` to _hot update_ it. It will\n * remove any key not existing in `newState` and recursively merge plain\n * objects.\n *\n * @param newState - new state object to be patched\n * @param oldState - old state that should be used to patch newState\n * @returns - newState\n */\nfunction patchObject(newState, oldState) {\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in oldState) {\n const subPatch = oldState[key];\n // skip the whole sub tree\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n }\n else {\n // objects are either a bit more complex (e.g. refs) or primitives, so we\n // just set the whole thing\n newState[key] = subPatch;\n }\n }\n return newState;\n}\n/**\n * Creates an _accept_ function to pass to `import.meta.hot` in Vite applications.\n *\n * @example\n * ```js\n * const useUser = defineStore(...)\n * if (import.meta.hot) {\n * import.meta.hot.accept(acceptHMRUpdate(useUser, import.meta.hot))\n * }\n * ```\n *\n * @param initialUseStore - return of the defineStore to hot update\n * @param hot - `import.meta.hot`\n */\nfunction acceptHMRUpdate(initialUseStore, hot) {\n // strip as much as possible from iife.prod\n if (!(process.env.NODE_ENV !== 'production')) {\n return () => { };\n }\n return (newModule) => {\n const pinia = hot.data.pinia || initialUseStore._pinia;\n if (!pinia) {\n // this store is still not used\n return;\n }\n // preserve the pinia instance across loads\n hot.data.pinia = pinia;\n // console.log('got data', newStore)\n for (const exportName in newModule) {\n const useStore = newModule[exportName];\n // console.log('checking for', exportName)\n if (isUseStore(useStore) && pinia._s.has(useStore.$id)) {\n // console.log('Accepting update for', useStore.$id)\n const id = useStore.$id;\n if (id !== initialUseStore.$id) {\n console.warn(`The id of the store changed from \"${initialUseStore.$id}\" to \"${id}\". Reloading.`);\n // return import.meta.hot.invalidate()\n return hot.invalidate();\n }\n const existingStore = pinia._s.get(id);\n if (!existingStore) {\n console.log(`[Pinia]: skipping hmr because store doesn't exist yet`);\n return;\n }\n useStore(pinia, existingStore);\n }\n }\n };\n}\n\nconst noop = () => { };\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\n\nconst fallbackRunWithContext = (fn) => fn();\n/**\n * Marks a function as an action for `$onAction`\n * @internal\n */\nconst ACTION_MARKER = Symbol();\n/**\n * Action name symbol. Allows to add a name to an action after defining it\n * @internal\n */\nconst ACTION_NAME = Symbol();\nfunction mergeReactiveObjects(target, patchToApply) {\n // Handle Map instances\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n else if (target instanceof Set && patchToApply instanceof Set) {\n // Handle Set instances\n patchToApply.forEach(target.add, target);\n }\n // no need to go through symbols because they cannot be serialized anyway\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) &&\n isPlainObject(subPatch) &&\n target.hasOwnProperty(key) &&\n !isRef(subPatch) &&\n !isReactive(subPatch)) {\n // NOTE: here I wanted to warn about inconsistent types but it's not possible because in setup stores one might\n // start the value of a property as a certain type e.g. a Map, and then for some reason, during SSR, change that\n // to `undefined`. When trying to hydrate, we want to override the Map with `undefined`.\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n }\n else {\n // @ts-expect-error: subPatch is a valid value\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = (process.env.NODE_ENV !== 'production')\n ? Symbol('pinia:skipHydration')\n : /* istanbul ignore next */ Symbol();\n/**\n * Tells Pinia to skip the hydration process of a given object. This is useful in setup stores (only) when you return a\n * stateful object in the store but it isn't really state. e.g. returning a router instance in a setup store.\n *\n * @param obj - target object\n * @returns obj\n */\nfunction skipHydrate(obj) {\n return Object.defineProperty(obj, skipHydrateSymbol, {});\n}\n/**\n * Returns whether a value should be hydrated\n *\n * @param obj - target variable\n * @returns true if `obj` should be hydrated\n */\nfunction shouldHydrate(obj) {\n return (!isPlainObject(obj) ||\n !Object.prototype.hasOwnProperty.call(obj, skipHydrateSymbol));\n}\nconst { assign } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n pinia.state.value[id] = state ? state() : {};\n }\n // avoid creating a state in pinia.state.value\n const localState = (process.env.NODE_ENV !== 'production') && hot\n ? // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n : toRefs(pinia.state.value[id]);\n return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if ((process.env.NODE_ENV !== 'production') && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia);\n // it was created just before\n const store = pinia._s.get(id);\n // allow cross using stores\n // @ts-expect-error\n // return getters![name].call(context, context)\n // TODO: avoid reading the getter while assigning with a global variable\n return getters[name].call(store, store);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign({ actions: {} }, options);\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && !pinia._e.active) {\n throw new Error('Pinia destroyed');\n }\n // watcher options for $subscribe\n const $subscribeOptions = { deep: true };\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n $subscribeOptions.onTrigger = (event) => {\n /* istanbul ignore else */\n if (isListening) {\n debuggerEvents = event;\n // avoid triggering this while the store is being built and the state is being set in pinia\n }\n else if (isListening == false && !store._hotUpdating) {\n // let patch send all the events together later\n /* istanbul ignore else */\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n }\n else {\n console.error('🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.');\n }\n }\n };\n }\n // internal state\n let isListening; // set to true at the end\n let isSyncListening; // set to true at the end\n let subscriptions = [];\n let actionSubscriptions = [];\n let debuggerEvents;\n const initialState = pinia.state.value[$id];\n // avoid setting the state for option stores if it is set\n // by the setup\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== 'production') || !hot)) {\n /* istanbul ignore if */\n pinia.state.value[$id] = {};\n }\n const hotState = ref({});\n // avoid triggering too many listeners\n // https://github.com/vuejs/pinia/issues/1129\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n // reset the debugger events since patches are sync\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === 'function') {\n partialStateOrMutator(pinia.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n else {\n mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents,\n };\n }\n const myListenerId = (activeListener = Symbol());\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n // because we paused the watcher, we need to manually call the subscriptions\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);\n }\n const $reset = isOptionsStore\n ? function $reset() {\n const { state } = options;\n const newState = state ? state() : {};\n // we use a patch to group all changes into one single subscription\n this.$patch(($state) => {\n // @ts-expect-error: FIXME: shouldn't error?\n assign($state, newState);\n });\n }\n : /* istanbul ignore next */\n (process.env.NODE_ENV !== 'production')\n ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n }\n : noop;\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia._s.delete($id);\n }\n /**\n * Helper that wraps function so it can be tracked with $onAction\n * @param fn - action to wrap\n * @param name - name of the action\n */\n const action = (fn, name = '') => {\n if (ACTION_MARKER in fn) {\n fn[ACTION_NAME] = name;\n return fn;\n }\n const wrappedAction = function () {\n setActivePinia(pinia);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n // @ts-expect-error\n triggerSubscriptions(actionSubscriptions, {\n args,\n name: wrappedAction[ACTION_NAME],\n store,\n after,\n onError,\n });\n let ret;\n try {\n ret = fn.apply(this && this.$id === $id ? this : store, args);\n // handle sync errors\n }\n catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret\n .then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n })\n .catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n // trigger after callbacks\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n wrappedAction[ACTION_MARKER] = true;\n wrappedAction[ACTION_NAME] = name; // will be set later\n // @ts-expect-error: we are intentionally limiting the returned type to just Fn\n // because all the added properties are internals that are exposed through `$onAction()` only\n return wrappedAction;\n };\n const _hmrPayload = /*#__PURE__*/ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState,\n });\n const partialStore = {\n _p: pinia,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {\n if (options.flush === 'sync' ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents,\n }, state);\n }\n }, assign({}, $subscribeOptions, options)));\n return removeSubscription;\n },\n $dispose,\n };\n const store = reactive((process.env.NODE_ENV !== 'production') || ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT)\n ? assign({\n _hmrPayload,\n _customProperties: markRaw(new Set()), // devtools custom properties\n }, partialStore\n // must be added later\n // setupStore\n )\n : partialStore);\n // store the partial store now so the setup of stores can instantiate each other before they are finished without\n // creating infinite loops.\n pinia._s.set($id, store);\n const runWithContext = (pinia._a && pinia._a.runWithContext) || fallbackRunWithContext;\n // TODO: idea create skipSerialize that marks properties as non serializable and they are skipped\n const setupStore = runWithContext(() => pinia._e.run(() => (scope = effectScope()).run(() => setup({ action }))));\n // overwrite existing actions to support $onAction\n for (const key in setupStore) {\n const prop = setupStore[key];\n if ((isRef(prop) && !isComputed(prop)) || isReactive(prop)) {\n // mark it as a piece of state to be serialized\n if ((process.env.NODE_ENV !== 'production') && hot) {\n hotState.value[key] = toRef(setupStore, key);\n // createOptionStore directly sets the state in pinia.state.value so we\n // can just skip that\n }\n else if (!isOptionsStore) {\n // in setup stores we must hydrate the state and sync pinia state tree with the refs the user just created\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n }\n else {\n // probably a reactive object, lets recursively assign\n // @ts-expect-error: prop is unknown\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n // transfer the ref to the pinia state to keep everything in sync\n pinia.state.value[$id][key] = prop;\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.state.push(key);\n }\n // action\n }\n else if (typeof prop === 'function') {\n const actionValue = (process.env.NODE_ENV !== 'production') && hot ? prop : action(prop, key);\n // this a hot module replacement store because the hotUpdate method needs\n // to do it with the right context\n // @ts-expect-error\n setupStore[key] = actionValue;\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n _hmrPayload.actions[key] = prop;\n }\n // list actions so they can be used in plugins\n // @ts-expect-error\n optionsForPlugin.actions[key] = prop;\n }\n else if ((process.env.NODE_ENV !== 'production')) {\n // add getters for devtools\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore\n ? // @ts-expect-error\n options.getters[key]\n : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters ||\n // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n // add the state, getters, and action properties\n /* istanbul ignore if */\n assign(store, setupStore);\n // allows retrieving reactive objects with `storeToRefs()`. Must be called after assigning to the reactive object.\n // Make `storeToRefs()` work with `reactive()` #799\n assign(toRaw(store), setupStore);\n // use this instead of a computed with setter to be able to create it anywhere\n // without linking the computed lifespan to wherever the store is first\n // created.\n Object.defineProperty(store, '$state', {\n get: () => ((process.env.NODE_ENV !== 'production') && hot ? hotState.value : pinia.state.value[$id]),\n set: (state) => {\n /* istanbul ignore if */\n if ((process.env.NODE_ENV !== 'production') && hot) {\n throw new Error('cannot set hotState');\n }\n $patch(($state) => {\n // @ts-expect-error: FIXME: shouldn't error?\n assign($state, state);\n });\n },\n });\n // add the hotUpdate before plugins to allow them to override it\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === 'object' &&\n isPlainObject(newStateTarget) &&\n isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n }\n else {\n // transfer the ref\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n // patch direct access properties to allow store.stateProperty to work as\n // store.$state.stateProperty\n // @ts-expect-error: any type\n store[stateKey] = toRef(newStore.$state, stateKey);\n });\n // remove deleted state properties\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[stateKey];\n }\n });\n // avoid devtools logging this as a mutation\n isListening = false;\n isSyncListening = false;\n pinia.state.value[$id] = toRef(newStore._hmrPayload, 'hotState');\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const actionFn = newStore[actionName];\n // @ts-expect-error: actionName is a string\n store[actionName] =\n //\n action(actionFn, actionName);\n }\n // TODO: does this work in both setup and option store?\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore\n ? // special handling of options api\n computed(() => {\n setActivePinia(pinia);\n return getter.call(store, store);\n })\n : getter;\n // @ts-expect-error: getterName is a string\n store[getterName] =\n //\n getterValue;\n }\n // remove deleted getters\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[key];\n }\n });\n // remove old actions\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n // @ts-expect-error: noop if doesn't exist\n delete store[key];\n }\n });\n // update the values used in devtools and to allow deleting new properties later on\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false,\n };\n ['_p', '_hmrPayload', '_getters', '_customProperties'].forEach((p) => {\n Object.defineProperty(store, p, assign({ value: store[p] }, nonEnumerable));\n });\n }\n // apply all plugins\n pinia._p.forEach((extender) => {\n /* istanbul ignore else */\n if ((((process.env.NODE_ENV !== 'production') || (typeof __VUE_PROD_DEVTOOLS__ !== 'undefined' && __VUE_PROD_DEVTOOLS__)) && !(process.env.NODE_ENV === 'test')) && IS_CLIENT) {\n const extensions = scope.run(() => extender({\n store: store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign(store, extensions);\n }\n else {\n assign(store, scope.run(() => extender({\n store: store,\n app: pinia._a,\n pinia,\n options: optionsForPlugin,\n })));\n }\n });\n if ((process.env.NODE_ENV !== 'production') &&\n store.$state &&\n typeof store.$state === 'object' &&\n typeof store.$state.constructor === 'function' &&\n !store.$state.constructor.toString().includes('[native code]')) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\\n` +\n `\\tstate: () => new MyClass()\\n` +\n `Found in store \"${store.$id}\".`);\n }\n // only apply hydrate to option stores with an initial state in pinia\n if (initialState &&\n isOptionsStore &&\n options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\n// allows unused stores to be tree shaken\n/*! #__NO_SIDE_EFFECTS__ */\nfunction defineStore(\n// TODO: add proper types from above\nid, setup, setupOptions) {\n let options;\n const isSetupStore = typeof setup === 'function';\n // the option store setup will contain the actual options in this case\n options = isSetupStore ? setupOptions : setup;\n function useStore(pinia, hot) {\n const hasContext = hasInjectionContext();\n pinia =\n // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n ((process.env.NODE_ENV === 'test') && activePinia && activePinia._testing ? null : pinia) ||\n (hasContext ? inject(piniaSymbol, null) : null);\n if (pinia)\n setActivePinia(pinia);\n if ((process.env.NODE_ENV !== 'production') && !activePinia) {\n throw new Error(`[🍍]: \"getActivePinia()\" was called but there was no active Pinia. Are you trying to use a store before calling \"app.use(pinia)\"?\\n` +\n `See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.\\n` +\n `This will fail in production.`);\n }\n pinia = activePinia;\n if (!pinia._s.has(id)) {\n // creating the store registers it in `pinia._s`\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia);\n }\n else {\n createOptionsStore(id, options, pinia);\n }\n /* istanbul ignore else */\n if ((process.env.NODE_ENV !== 'production')) {\n // @ts-expect-error: not the right inferred type\n useStore._pinia = pinia;\n }\n }\n const store = pinia._s.get(id);\n if ((process.env.NODE_ENV !== 'production') && hot) {\n const hotId = '__hot:' + id;\n const newStore = isSetupStore\n ? createSetupStore(hotId, setup, options, pinia, true)\n : createOptionsStore(hotId, assign({}, options), pinia, true);\n hot._hotUpdate(newStore);\n // cleanup the state properties and the store from the cache\n delete pinia.state.value[hotId];\n pinia._s.delete(hotId);\n }\n if ((process.env.NODE_ENV !== 'production') && IS_CLIENT) {\n const currentInstance = getCurrentInstance();\n // save stores in instances to access them devtools\n if (currentInstance &&\n currentInstance.proxy &&\n // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = '_pStores' in vm ? vm._pStores : (vm._pStores = {});\n cache[id] = store;\n }\n }\n // StoreGeneric cannot be casted towards Store\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\n\nlet mapStoreSuffix = 'Store';\n/**\n * Changes the suffix added by `mapStores()`. Can be set to an empty string.\n * Defaults to `\"Store\"`. Make sure to extend the MapStoresCustomization\n * interface if you are using TypeScript.\n *\n * @param suffix - new suffix\n */\nfunction setMapStoreSuffix(suffix // could be 'Store' but that would be annoying for JS\n) {\n mapStoreSuffix = suffix;\n}\n/**\n * Allows using stores without the composition API (`setup()`) by generating an\n * object to be spread in the `computed` field of a component. It accepts a list\n * of store definitions.\n *\n * @example\n * ```js\n * export default {\n * computed: {\n * // other computed properties\n * ...mapStores(useUserStore, useCartStore)\n * },\n *\n * created() {\n * this.userStore // store with id \"user\"\n * this.cartStore // store with id \"cart\"\n * }\n * }\n * ```\n *\n * @param stores - list of stores to map to an object\n */\nfunction mapStores(...stores) {\n if ((process.env.NODE_ENV !== 'production') && Array.isArray(stores[0])) {\n console.warn(`[🍍]: Directly pass all stores to \"mapStores()\" without putting them in an array:\\n` +\n `Replace\\n` +\n `\\tmapStores([useAuthStore, useCartStore])\\n` +\n `with\\n` +\n `\\tmapStores(useAuthStore, useCartStore)\\n` +\n `This will fail in production if not fixed.`);\n stores = stores[0];\n }\n return stores.reduce((reduced, useStore) => {\n // @ts-expect-error: $id is added by defineStore\n reduced[useStore.$id + mapStoreSuffix] = function () {\n return useStore(this.$pinia);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = function () {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[key];\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function () {\n const store = useStore(this.$pinia);\n const storeKey = keysOrMapper[key];\n // for some reason TS is unable to infer the type of storeKey to be a\n // function\n return typeof storeKey === 'function'\n ? storeKey.call(this, store)\n : // @ts-expect-error: FIXME: should work?\n store[storeKey];\n };\n return reduced;\n }, {});\n}\n/**\n * Alias for `mapState()`. You should use `mapState()` instead.\n * @deprecated use `mapState()` instead.\n */\nconst mapGetters = mapState;\n/**\n * Allows directly using actions from your store without using the composition\n * API (`setup()`) by generating an object to be spread in the `methods` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapActions(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[key](...args);\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n // @ts-expect-error\n reduced[key] = function (...args) {\n // @ts-expect-error: FIXME: should work?\n return useStore(this.$pinia)[keysOrMapper[key]](...args);\n };\n return reduced;\n }, {});\n}\n/**\n * Allows using state and getters from one store without using the composition\n * API (`setup()`) by generating an object to be spread in the `computed` field\n * of a component.\n *\n * @param useStore - store to map from\n * @param keysOrMapper - array or object\n */\nfunction mapWritableState(useStore, keysOrMapper) {\n return Array.isArray(keysOrMapper)\n ? keysOrMapper.reduce((reduced, key) => {\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[key];\n },\n set(value) {\n return (useStore(this.$pinia)[key] = value);\n },\n };\n return reduced;\n }, {})\n : Object.keys(keysOrMapper).reduce((reduced, key) => {\n reduced[key] = {\n get() {\n return useStore(this.$pinia)[keysOrMapper[key]];\n },\n set(value) {\n return (useStore(this.$pinia)[keysOrMapper[key]] = value);\n },\n };\n return reduced;\n }, {});\n}\n\n/**\n * Creates an object of references with all the state, getters, and plugin-added\n * state properties of the store. Similar to `toRefs()` but specifically\n * designed for Pinia stores so methods and non reactive properties are\n * completely ignored.\n *\n * @param store - store to extract the refs from\n */\nfunction storeToRefs(store) {\n const rawStore = toRaw(store);\n const refs = {};\n for (const key in rawStore) {\n const value = rawStore[key];\n // There is no native method to check for a computed\n // https://github.com/vuejs/core/pull/4165\n if (value.effect) {\n // @ts-expect-error: too hard to type correctly\n refs[key] =\n // ...\n computed({\n get: () => store[key],\n set(value) {\n store[key] = value;\n },\n });\n }\n else if (isRef(value) || isReactive(value)) {\n // @ts-expect-error: the key is state or getter\n refs[key] =\n // ---\n toRef(store, key);\n }\n }\n return refs;\n}\n\nexport { MutationType, acceptHMRUpdate, createPinia, defineStore, disposePinia, getActivePinia, mapActions, mapGetters, mapState, mapStores, mapWritableState, setActivePinia, setMapStoreSuffix, shouldHydrate, skipHydrate, storeToRefs };\n","import { defineStore } from 'pinia'\n\nexport type StepStatus = 'idle' | 'running' | 'completed' | 'error';\n\nexport interface StepState {\n status: StepStatus;\n stepId?: string;\n tag?: string;\n data?: any;\n error?: string;\n}\n\nexport const useStepStore = defineStore('step', {\n state: (): StepState => ({\n status: 'idle',\n stepId: undefined,\n tag: undefined,\n data: undefined,\n error: undefined\n }),\n actions: {\n // 开始执行步骤\n startStep(stepId: string, tag?: string, data?: any) {\n this.status = 'running';\n this.stepId = stepId;\n this.tag = tag;\n this.data = data;\n this.error = undefined;\n },\n\n // 完成步骤\n completeStep() {\n this.status = 'completed';\n },\n\n // 步骤出错\n setError(error: string) {\n this.status = 'error';\n this.error = error;\n },\n\n // 重置状态\n reset() {\n this.status = 'idle';\n this.stepId = undefined;\n this.tag = undefined;\n this.data = undefined;\n this.error = undefined;\n }\n }\n}) ","/**\n * 步骤执行错误类\n * 用于携带步骤执行过程中的错误信息和当前步骤对象\n * 支持传入可选数据:message,data任何类型的数据\n */\nexport class StepError extends Error {\n /**\n * 步骤实现函数名\n */\n readonly impl?: string;\n\n /**\n * 步骤标签\n */\n readonly tag?: string | undefined;\n\n /**\n * 步骤数据,可以是任何类型\n */\n readonly data?: any;\n\n /**\n * 原始错误\n */\n readonly originalError?: any;\n\n /**\n * 当前步骤对象\n */\n readonly currentStep?: any;\n\n constructor(\n message?: string,\n data?: any,\n impl?: string,\n tag?: string | undefined,\n originalError?: any,\n currentStep?: any | undefined\n ) {\n super(message);\n this.name = \"StepError\";\n this.data = data;\n this.impl = impl;\n this.tag = tag;\n this.originalError = originalError;\n this.currentStep = currentStep;\n }\n}\n\n/**\n * 主动停止异常类\n * 用于表示步骤被主动停止执行\n */\nexport class StepStopError extends StepError {\n constructor(message?: string, data?: any) {\n super(message || \"主动中断步骤\", data);\n this.name = \"StepStopError\";\n }\n}\n","/**\n * 步骤执行控制类\n * 用于管理和执行自动化步骤,提供步骤的生命周期管理、状态控制和界面操作功能\n */\nimport { AssistsX } from \"./assistsx\";\nimport { Node } from \"./node\";\nimport { CallMethod } from \"./call-method\";\nimport { useStepStore } from \"./step-state-store\";\nimport { generateUUID } from \"./utils\";\nimport { StepError } from \"./step-error\";\nimport { AssistsXAsync } from \"./assistsx-async\";\nimport { Step } from \"./step\";\n\nexport class StepAsync {\n private step: Step;\n\n /**\n * 构造函数\n * @param step Step实例\n */\n constructor(step: Step) {\n this.step = step;\n }\n\n /**\n * 对单个节点进行截图\n * @param node 目标节点\n * @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)\n * @returns 截图路径\n */\n public async takeScreenshotByNode(\n node: Node,\n overlayHiddenScreenshotDelayMillis: number = 250\n ): Promise<string> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.takeScreenshotNodes(\n [node],\n overlayHiddenScreenshotDelayMillis\n );\n Step.assert(this.step.stepId);\n return result[0];\n }\n\n /**\n * 对多个节点进行截图\n * @param nodes 目标节点数组\n * @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)\n * @returns 截图路径数组\n */\n public async takeScreenshotNodes(\n nodes: Node[],\n overlayHiddenScreenshotDelayMillis: number = 250\n ): Promise<string[]> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.takeScreenshotNodes(\n nodes,\n overlayHiddenScreenshotDelayMillis\n );\n Step.assert(this.step.stepId);\n return result;\n }\n\n /**\n * 获取所有符合条件的节点\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @param filterText 文本过滤\n * @returns 节点数组\n */\n public async getAllNodes({\n filterClass,\n filterViewId,\n filterDes,\n filterText,\n }: {\n filterClass?: string;\n filterViewId?: string;\n filterDes?: string;\n filterText?: string;\n } = {}): Promise<Node[]> {\n Step.assert(this.step.stepId);\n const nodes = await AssistsXAsync.getAllNodes({\n filterClass,\n filterViewId,\n filterDes,\n filterText,\n });\n Step.assert(this.step.stepId);\n Step.assignIdsToNodes(nodes, this.step.stepId);\n return nodes;\n }\n\n /**\n * 启动应用\n * @param packageName 应用包名\n * @returns 是否启动成功\n */\n public async launchApp(packageName: string): Promise<boolean> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.launchApp(packageName);\n Step.assert(this.step.stepId);\n return result;\n }\n\n /**\n * 获取当前应用包名\n * @returns 包名\n */\n public async getPackageName(): Promise<string> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.getPackageName();\n Step.assert(this.step.stepId);\n return result;\n }\n\n /**\n * 通过ID查找节点\n * @param id 节点ID\n * @param filterClass 类名过滤\n * @param filterText 文本过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public async findById(\n id: string,\n {\n filterClass,\n filterText,\n filterDes,\n }: { filterClass?: string; filterText?: string; filterDes?: string } = {}\n ): Promise<Node[]> {\n Step.assert(this.step.stepId);\n const nodes = await AssistsXAsync.findById(id, {\n filterClass,\n filterText,\n filterDes,\n });\n Step.assert(this.step.stepId);\n Step.assignIdsToNodes(nodes, this.step.stepId);\n return nodes;\n }\n\n /**\n * 通过文本查找节点\n * @param text 要查找的文本\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public async findByText(\n text: string,\n {\n filterClass,\n filterViewId,\n filterDes,\n }: { filterClass?: string; filterViewId?: string; filterDes?: string } = {}\n ): Promise<Node[]> {\n Step.assert(this.step.stepId);\n const nodes = await AssistsXAsync.findByText(text, {\n filterClass,\n filterViewId,\n filterDes,\n });\n Step.assert(this.step.stepId);\n Step.assignIdsToNodes(nodes, this.step.stepId);\n return nodes;\n }\n\n /**\n * 通过标签查找节点\n * @param className 类名\n * @param filterText 文本过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public async findByTags(\n className: string,\n {\n filterText,\n filterViewId,\n filterDes,\n }: { filterText?: string; filterViewId?: string; filterDes?: string } = {}\n ): Promise<Node[]> {\n Step.assert(this.step.stepId);\n const nodes = await AssistsXAsync.findByTags(className, {\n filterText,\n filterViewId,\n filterDes,\n });\n Step.assert(this.step.stepId);\n Step.assignIdsToNodes(nodes, this.step.stepId);\n return nodes;\n }\n\n /**\n * 查找所有匹配文本的节点\n * @param text 要查找的文本\n * @returns 节点数组\n */\n public async findByTextAllMatch(text: string): Promise<Node[]> {\n Step.assert(this.step.stepId);\n const nodes = await AssistsXAsync.findByTextAllMatch(text);\n Step.assert(this.step.stepId);\n Step.assignIdsToNodes(nodes, this.step.stepId);\n return nodes;\n }\n\n /**\n * 检查是否包含指定文本\n * @param text 要检查的文本\n * @returns 是否包含\n */\n public async containsText(text: string): Promise<boolean> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.containsText(text);\n Step.assert(this.step.stepId);\n return result;\n }\n\n /**\n * 获取所有文本\n * @returns 文本数组\n */\n public async getAllText(): Promise<string[]> {\n Step.assert(this.step.stepId);\n const texts = await AssistsXAsync.getAllText();\n Step.assert(this.step.stepId);\n return texts;\n }\n\n /**\n * 执行点击手势\n * @param x 横坐标\n * @param y 纵坐标\n * @param duration 持续时间(毫秒)\n * @returns 是否成功\n */\n public async clickByGesture(\n x: number,\n y: number,\n duration: number\n ): Promise<boolean> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.clickByGesture(x, y, duration);\n Step.assert(this.step.stepId);\n return result;\n }\n\n public async longPressGestureAutoPaste(\n point: { x: number; y: number },\n text: string,\n {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n }: {\n matchedPackageName?: string;\n matchedText?: string;\n timeoutMillis?: number;\n longPressDuration?: number;\n } = { matchedText: \"粘贴\", timeoutMillis: 1500, longPressDuration: 600 }\n ): Promise<boolean> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.longPressGestureAutoPaste(point, text, {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n });\n Step.assert(this.step.stepId);\n return result;\n }\n public async getAppInfo(packageName: string): Promise<any> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.getAppInfo(packageName);\n Step.assert(this.step.stepId);\n return result;\n }\n public async performLinearGesture(\n startPoint: { x: number; y: number },\n endPoint: { x: number; y: number },\n { duration }: { duration?: number } = {}\n ): Promise<boolean> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.performLinearGesture(\n startPoint,\n endPoint,\n {\n duration,\n }\n );\n Step.assert(this.step.stepId);\n return result;\n }\n\n /**\n * 返回操作\n * @returns 是否成功\n */\n public async back(): Promise<boolean> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.back();\n Step.assert(this.step.stepId);\n return result;\n }\n\n /**\n * 回到主页\n * @returns 是否成功\n */\n public async home(): Promise<boolean> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.home();\n Step.assert(this.step.stepId);\n return result;\n }\n\n /**\n * 打开通知栏\n * @returns 是否成功\n */\n public async notifications(): Promise<boolean> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.notifications();\n Step.assert(this.step.stepId);\n return result;\n }\n\n /**\n * 显示最近应用\n * @returns 是否成功\n */\n public async recentApps(): Promise<boolean> {\n Step.assert(this.step.stepId);\n const result = await AssistsXAsync.recentApps();\n Step.assert(this.step.stepId);\n return result;\n }\n\n /**\n * 获取屏幕尺寸\n * @returns 屏幕尺寸对象\n */\n public async getScreenSize(): Promise<any> {\n Step.assert(this.step.stepId);\n const data = await AssistsXAsync.getScreenSize();\n Step.assert(this.step.stepId);\n return data;\n }\n\n /**\n * 获取应用窗口尺寸\n * @returns 应用窗口尺寸对象\n */\n public async getAppScreenSize(): Promise<any> {\n Step.assert(this.step.stepId);\n const data = await AssistsXAsync.getAppScreenSize();\n Step.assert(this.step.stepId);\n return data;\n }\n}\n","/**\n * 步骤执行控制类\n * 用于管理和执行自动化步骤,提供步骤的生命周期管理、状态控制和界面操作功能\n */\nimport { AssistsX } from \"./assistsx\";\nimport { Node } from \"./node\";\nimport { CallMethod } from \"./call-method\";\nimport { useStepStore } from \"./step-state-store\";\nimport { generateUUID } from \"./utils\";\nimport { StepError, StepStopError } from \"./step-error\";\nimport { StepAsync } from \"./step-async\";\n\n// 步骤结果类型,可以是Step实例或undefined\nexport type StepResult = Step | undefined;\n\n// 步骤实现函数类型\nexport type StepImpl = (step: Step) => Promise<StepResult>;\n\n// 步骤拦截器函数类型\nexport type StepInterceptor = (step: Step) => StepResult | Promise<StepResult>;\n\nexport class Step {\n static delayMsDefault: number = 1000;\n static readonly repeatCountInfinite: number = -1;\n static repeatCountMaxDefault: number = Step.repeatCountInfinite;\n static showLog: boolean = false;\n static exceptionRetryCountMaxDefault: number = 3;\n\n /**\n * 当前执行步骤的ID\n */\n private static _stepId: string | undefined = undefined;\n\n /**\n * 步骤拦截器列表\n */\n private static _interceptors: StepInterceptor[] = [];\n\n /**\n * 步骤异常变量,默认为空\n */\n public static exception: StepError | undefined = undefined;\n\n /**\n * 运行步骤实现\n * @param impl 步骤实现函数\n * @param tag 步骤标签\n * @param data 步骤数据\n * @param delayMs 步骤延迟时间(毫秒)\n */\n static async run(\n impl: StepImpl,\n {\n stepId,\n tag,\n data,\n delayMs = Step.delayMsDefault,\n exceptionRetryCountMax = Step.exceptionRetryCountMaxDefault,\n }: {\n stepId?: string | undefined;\n tag?: string | undefined;\n data?: any | undefined;\n delayMs?: number;\n exceptionRetryCountMax?: number;\n } = {}\n ): Promise<Step | undefined> {\n this.exception = undefined;\n const stepStore = useStepStore();\n let implnName = impl.name;\n let currentStep: Step | undefined;\n let nextStep: Step | undefined;\n try {\n //步骤开始\n if (stepId) {\n this._stepId = stepId;\n if (Step.showLog) {\n console.log(`使用传入步骤ID: ${this._stepId}`);\n }\n } else {\n this._stepId = generateUUID();\n if (Step.showLog) {\n console.log(`生成步骤ID: ${this._stepId}`);\n }\n }\n\n stepStore.startStep(this._stepId, tag, data);\n currentStep = new Step({\n stepId: this._stepId,\n impl,\n tag,\n data,\n delayMs,\n exceptionRetryCountMax,\n });\n while (true) {\n // 在循环开始处定义变量,以便在 catch 块中访问\n let interceptedStep: StepResult = undefined;\n let stepForRetry: Step = currentStep; // 用于异常重试的步骤配置\n try {\n if (currentStep.delayMs) {\n if (Step.showLog) {\n console.log(`延迟${currentStep.delayMs}毫秒`);\n }\n await currentStep.delay(currentStep.delayMs);\n Step.assert(currentStep.stepId);\n }\n //执行步骤\n implnName = currentStep.impl?.name ?? \"undefined\";\n if (Step.showLog) {\n console.log(\n `执行步骤${implnName},重复次数${currentStep.repeatCount}`\n );\n }\n\n // 执行拦截器\n for (const interceptor of this._interceptors) {\n try {\n const result = await interceptor(currentStep);\n if (result) {\n interceptedStep = result;\n if (Step.showLog) {\n console.log(`步骤${implnName}被拦截器拦截,执行拦截后的步骤`);\n }\n break;\n }\n } catch (e: any) {\n if (Step.showLog) {\n console.error(`拦截器执行出错`, e);\n }\n // 拦截器出错不影响主流程,继续执行原步骤\n }\n }\n\n // 如果被拦截,执行拦截后的步骤,否则执行原步骤\n stepForRetry = currentStep; // 默认使用当前步骤的重试配置\n if (interceptedStep !== undefined) {\n // 执行拦截后的步骤,需要处理延迟和重复次数\n const stepToExecute = interceptedStep;\n stepForRetry = stepToExecute; // 使用拦截后步骤的重试配置\n\n // 如果拦截后的步骤有延迟时间,先执行延迟\n if (stepToExecute.delayMs) {\n if (Step.showLog) {\n console.log(`拦截步骤延迟${stepToExecute.delayMs}毫秒`);\n }\n await stepToExecute.delay(stepToExecute.delayMs);\n Step.assert(stepToExecute.stepId);\n }\n\n // 打印拦截步骤的执行信息\n const interceptedImplName = stepToExecute.impl?.name;\n if (Step.showLog) {\n console.log(\n `执行拦截步骤${interceptedImplName},重复次数${stepToExecute.repeatCount}`\n );\n }\n\n // 执行拦截后的步骤\n nextStep = await stepToExecute.impl?.(stepToExecute);\n } else {\n nextStep = await currentStep.impl?.(currentStep);\n }\n if (\n currentStep.repeatCountMax >= Step.repeatCountInfinite &&\n currentStep.repeatCount >= currentStep.repeatCountMax\n ) {\n if (Step.showLog) {\n console.log(\n `重复次数${currentStep.repeatCount}超过最大次数${currentStep.repeatCountMax},停止执行`\n );\n }\n throw new StepError(\"步骤重复次数达到最大次数\", { stepId: currentStep.stepId, repeatCount: currentStep.repeatCount, repeatCountMax: currentStep.repeatCountMax });\n }\n\n Step.assert(currentStep.stepId);\n\n // 执行成功,重置异常重试次数(使用实际执行的步骤配置)\n stepForRetry.exceptionRetryCount = 0;\n\n if (nextStep) {\n currentStep = nextStep;\n if (currentStep.isEnd) {\n if (Step.showLog) {\n console.log(`步骤${implnName}结束`);\n }\n break;\n }\n } else {\n break;\n }\n } catch (e: any) {\n // 如果是步骤重复次数达到最大次数的异常,直接抛出,不进行重试\n if (e?.message === \"步骤重复次数达到最大次数\") {\n throw e;\n }\n\n // 捕获循环内部的异常\n // stepForRetry 已在循环开始处定义,如果执行的是拦截后的步骤,使用拦截后步骤的配置\n stepForRetry.exceptionRetryCount++;\n if (stepForRetry.exceptionRetryCount < stepForRetry.exceptionRetryCountMax) {\n // 未达到最大重试次数,继续重试\n if (Step.showLog) {\n console.warn(\n `步骤${implnName}执行异常,重试第${stepForRetry.exceptionRetryCount}次,最大重试次数${stepForRetry.exceptionRetryCountMax}`,\n e\n );\n }\n // 继续循环,重试执行\n continue;\n } else {\n // 达到最大重试次数,抛出异常\n if (Step.showLog) {\n console.error(\n `步骤${implnName}执行异常,已达到最大重试次数${stepForRetry.exceptionRetryCountMax},停止重试`,\n e\n );\n }\n throw e;\n }\n }\n }\n //步骤执行完成\n stepStore.completeStep();\n } catch (e: any) {\n console.error(`步骤${implnName}执行出错`, e);\n //步骤执行出错\n const errorMsg = JSON.stringify({\n impl: implnName,\n tag: tag,\n data: data,\n error: e?.message ?? String(e),\n });\n stepStore.setError(errorMsg);\n throw e\n }\n return currentStep;\n }\n\n /**\n * 获取当前步骤ID\n */\n static get stepId(): string | undefined {\n return this._stepId;\n }\n\n /**\n * 验证步骤ID是否匹配,如果不匹配则表示停止\n * @param stepId 要验证的步骤ID\n */\n static assert(stepId: string | undefined) {\n // 检查异常变量,如果不为空则直接抛出\n if (Step.exception) {\n throw Step.exception;\n }\n if (stepId && Step.stepId != stepId) {\n throw new StepError(\"StepId mismatch\", { stepId, currentStepId: Step.stepId });\n }\n }\n\n /**\n * 为节点数组分配步骤ID\n * @param nodes 节点数组\n * @param stepId 步骤ID\n */\n static assignIdsToNodes(nodes: Node[], stepId: string | undefined): void {\n if (stepId) {\n nodes.forEach((node) => {\n node.stepId = stepId;\n });\n }\n }\n\n /**\n * 停止当前步骤执行\n * @param exception 可选的异常对象,如果传入则使用该异常,否则使用默认的StepStopError\n */\n static stop(exception?: StepError): void {\n this._stepId = \"STEP_STOP\";\n if (exception) {\n this.exception = exception;\n } else {\n this.exception = new StepStopError(\"主动中断步骤\", { stepId: this._stepId });\n }\n }\n\n /**\n * 添加步骤拦截器\n * @param interceptor 拦截器函数\n */\n static addInterceptor(interceptor: StepInterceptor): void {\n this._interceptors.push(interceptor);\n }\n\n /**\n * 移除步骤拦截器\n * @param interceptor 要移除的拦截器函数\n * @returns 是否成功删除\n */\n static removeInterceptor(interceptor: StepInterceptor): boolean {\n const index = this._interceptors.indexOf(interceptor);\n if (index > -1) {\n this._interceptors.splice(index, 1);\n return true;\n }\n return false;\n }\n\n /**\n * 按索引移除步骤拦截器\n * @param index 要移除的拦截器索引\n * @returns 是否成功删除\n */\n static removeInterceptorByIndex(index: number): boolean {\n if (index >= 0 && index < this._interceptors.length) {\n this._interceptors.splice(index, 1);\n return true;\n }\n return false;\n }\n\n /**\n * 移除所有匹配的步骤拦截器\n * @param interceptor 要移除的拦截器函数\n * @returns 删除的拦截器数量\n */\n static removeAllInterceptors(interceptor: StepInterceptor): number {\n let removedCount = 0;\n for (let i = this._interceptors.length - 1; i >= 0; i--) {\n if (this._interceptors[i] === interceptor) {\n this._interceptors.splice(i, 1);\n removedCount++;\n }\n }\n return removedCount;\n }\n\n /**\n * 按条件移除步骤拦截器\n * @param predicate 判断是否删除的条件函数\n * @returns 删除的拦截器数量\n */\n static removeInterceptorByPredicate(\n predicate: (interceptor: StepInterceptor, index: number) => boolean\n ): number {\n let removedCount = 0;\n for (let i = this._interceptors.length - 1; i >= 0; i--) {\n if (predicate(this._interceptors[i], i)) {\n this._interceptors.splice(i, 1);\n removedCount++;\n }\n }\n return removedCount;\n }\n\n /**\n * 清空所有拦截器\n */\n static clearInterceptors(): void {\n this._interceptors = [];\n }\n\n /**\n * 获取所有拦截器\n * @returns 拦截器数组\n */\n static getInterceptors(): StepInterceptor[] {\n return [...this._interceptors];\n }\n\n /**\n * 步骤ID\n */\n stepId: string = \"\";\n\n /**\n * 步骤重复执行次数\n */\n repeatCount: number = 0;\n\n /**\n * 步骤重复执行最大次数,默认不限制\n */\n repeatCountMax: number = Step.repeatCountMaxDefault;\n\n /**\n * 异常重试次数\n */\n exceptionRetryCount: number = 0;\n\n /**\n * 异常重试最大次数,默认3次\n */\n exceptionRetryCountMax: number = Step.exceptionRetryCountMaxDefault;\n\n /**\n * 步骤标签\n */\n tag: string | undefined;\n isEnd: boolean = false;\n\n /**\n * 步骤数据\n */\n data: any | undefined;\n\n /**\n * 步骤延迟时间(毫秒)\n */\n delayMs: number = Step.delayMsDefault;\n\n /**\n * 步骤实现函数\n */\n impl: StepImpl | undefined;\n\n /**\n * 构造函数\n * @param stepId 步骤ID\n * @param impl 步骤实现函数\n * @param tag 步骤标签\n * @param data 步骤数据\n * @param delayMs 步骤延迟时间(毫秒)\n */\n constructor({\n stepId,\n impl,\n tag,\n data,\n delayMs = Step.delayMsDefault,\n repeatCountMax = Step.repeatCountMaxDefault,\n exceptionRetryCountMax = Step.exceptionRetryCountMaxDefault,\n isEnd = false,\n }: {\n stepId: string;\n impl: StepImpl | undefined;\n tag?: string | undefined;\n data?: any | undefined;\n delayMs?: number;\n repeatCountMax?: number;\n exceptionRetryCountMax?: number;\n isEnd?: boolean;\n }) {\n this.tag = tag;\n this.stepId = stepId;\n this.data = data ?? {};\n this.impl = impl;\n this.delayMs = delayMs;\n this.repeatCountMax = repeatCountMax;\n this.exceptionRetryCountMax = exceptionRetryCountMax;\n this.isEnd = isEnd;\n }\n\n public get async(): StepAsync {\n return new StepAsync(this);\n }\n /**\n * 创建下一个步骤\n * @param impl 下一步骤实现函数\n * @param tag 步骤标签\n * @param data 步骤数据\n * @param delayMs 步骤延迟时间(毫秒)\n * @returns 新的步骤实例\n */\n next(\n impl: StepImpl,\n {\n tag,\n data,\n delayMs = Step.delayMsDefault,\n repeatCountMax = Step.repeatCountMaxDefault,\n exceptionRetryCountMax = Step.exceptionRetryCountMaxDefault,\n }: {\n tag?: string | undefined;\n data?: any | undefined;\n delayMs?: number;\n repeatCountMax?: number;\n exceptionRetryCountMax?: number;\n } = {}\n ): Step {\n Step.assert(this.stepId);\n return new Step({\n stepId: this.stepId,\n impl,\n tag,\n data: data ?? this.data ?? {},\n delayMs,\n repeatCountMax,\n exceptionRetryCountMax,\n });\n }\n end(\n {\n tag,\n data,\n delayMs = Step.delayMsDefault,\n repeatCountMax = Step.repeatCountMaxDefault,\n exceptionRetryCountMax = Step.exceptionRetryCountMaxDefault,\n }: {\n tag?: string | undefined;\n data?: any | undefined;\n delayMs?: number;\n repeatCountMax?: number;\n exceptionRetryCountMax?: number;\n } = {}\n ): Step {\n Step.assert(this.stepId);\n return new Step({\n stepId: this.stepId,\n impl: undefined,\n tag,\n data: data ?? this.data ?? {},\n delayMs,\n repeatCountMax,\n exceptionRetryCountMax,\n isEnd: true,\n });\n }\n\n /**\n * 重复当前步骤\n * @param stepId 步骤ID\n * @param tag 步骤标签\n * @param data 步骤数据\n * @param delayMs 步骤延迟时间(毫秒)\n * @returns 当前步骤实例\n */\n repeat({\n stepId = this.stepId,\n tag = this.tag,\n data = this.data ?? {},\n delayMs = this.delayMs,\n repeatCountMax = this.repeatCountMax,\n exceptionRetryCountMax = this.exceptionRetryCountMax,\n }: {\n stepId?: string;\n tag?: string | undefined;\n data?: any | undefined;\n delayMs?: number;\n repeatCountMax?: number;\n exceptionRetryCountMax?: number;\n } = {}): Step {\n Step.assert(this.stepId);\n this.repeatCount++;\n this.stepId = stepId;\n this.tag = tag;\n this.data = data;\n this.delayMs = delayMs;\n this.repeatCountMax = repeatCountMax;\n this.exceptionRetryCountMax = exceptionRetryCountMax;\n // 重复执行时重置异常重试次数\n this.exceptionRetryCount = 0;\n return this;\n }\n\n /**\n * 延迟执行\n * @param ms 延迟时间(毫秒)\n * @returns Promise\n */\n async delay(ms: number): Promise<void> {\n while (true) {\n ms -= 100;\n if (ms <= 0) {\n break;\n }\n await new Promise((resolve) => setTimeout(resolve, 100));\n Step.assert(this.stepId);\n }\n }\n\n /**\n * 等待异步方法执行完成\n * @param method 异步方法\n * @returns Promise<T>\n */\n async await<T>(method: () => Promise<T>): Promise<T> {\n Step.assert(this.stepId);\n const result = await method();\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 对单个节点进行截图\n * @param node 目标节点\n * @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)\n * @returns 截图路径\n */\n public async takeScreenshotByNode(\n node: Node,\n overlayHiddenScreenshotDelayMillis: number = 250\n ): Promise<string> {\n Step.assert(this.stepId);\n const result = await AssistsX.takeScreenshotNodes(\n [node],\n overlayHiddenScreenshotDelayMillis\n );\n Step.assert(this.stepId);\n return result[0];\n }\n\n /**\n * 对多个节点进行截图\n * @param nodes 目标节点数组\n * @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)\n * @returns 截图路径数组\n */\n public async takeScreenshotNodes(\n nodes: Node[],\n overlayHiddenScreenshotDelayMillis: number = 250\n ): Promise<string[]> {\n Step.assert(this.stepId);\n const result = await AssistsX.takeScreenshotNodes(\n nodes,\n overlayHiddenScreenshotDelayMillis\n );\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 获取所有符合条件的节点\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @param filterText 文本过滤\n * @returns 节点数组\n */\n public getAllNodes({\n filterClass,\n filterViewId,\n filterDes,\n filterText,\n }: {\n filterClass?: string;\n filterViewId?: string;\n filterDes?: string;\n filterText?: string;\n } = {}): Node[] {\n Step.assert(this.stepId);\n const nodes = AssistsX.getAllNodes({\n filterClass,\n filterViewId,\n filterDes,\n filterText,\n });\n Step.assert(this.stepId);\n Step.assignIdsToNodes(nodes, this.stepId);\n return nodes;\n }\n\n /**\n * 启动应用\n * @param packageName 应用包名\n * @returns 是否启动成功\n */\n public launchApp(packageName: string): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.launchApp(packageName);\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 获取当前应用包名\n * @returns 包名\n */\n public getPackageName(): string {\n Step.assert(this.stepId);\n const result = AssistsX.getPackageName();\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 通过ID查找节点\n * @param id 节点ID\n * @param filterClass 类名过滤\n * @param filterText 文本过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public findById(\n id: string,\n {\n filterClass,\n filterText,\n filterDes,\n }: { filterClass?: string; filterText?: string; filterDes?: string } = {}\n ): Node[] {\n Step.assert(this.stepId);\n const nodes = AssistsX.findById(id, { filterClass, filterText, filterDes });\n Step.assert(this.stepId);\n Step.assignIdsToNodes(nodes, this.stepId);\n return nodes;\n }\n\n /**\n * 通过文本查找节点\n * @param text 要查找的文本\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public findByText(\n text: string,\n {\n filterClass,\n filterViewId,\n filterDes,\n }: { filterClass?: string; filterViewId?: string; filterDes?: string } = {}\n ): Node[] {\n Step.assert(this.stepId);\n const nodes = AssistsX.findByText(text, {\n filterClass,\n filterViewId,\n filterDes,\n });\n Step.assert(this.stepId);\n Step.assignIdsToNodes(nodes, this.stepId);\n return nodes;\n }\n\n /**\n * 通过标签查找节点\n * @param className 类名\n * @param filterText 文本过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public findByTags(\n className: string,\n {\n filterText,\n filterViewId,\n filterDes,\n }: { filterText?: string; filterViewId?: string; filterDes?: string } = {}\n ): Node[] {\n Step.assert(this.stepId);\n const nodes = AssistsX.findByTags(className, {\n filterText,\n filterViewId,\n filterDes,\n });\n Step.assert(this.stepId);\n Step.assignIdsToNodes(nodes, this.stepId);\n return nodes;\n }\n\n /**\n * 查找所有匹配文本的节点\n * @param text 要查找的文本\n * @returns 节点数组\n */\n public findByTextAllMatch(text: string): Node[] {\n Step.assert(this.stepId);\n const nodes = AssistsX.findByTextAllMatch(text);\n Step.assert(this.stepId);\n Step.assignIdsToNodes(nodes, this.stepId);\n return nodes;\n }\n\n /**\n * 检查是否包含指定文本\n * @param text 要检查的文本\n * @returns 是否包含\n */\n public containsText(text: string): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.containsText(text);\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 获取所有文本\n * @returns 文本数组\n */\n public getAllText(): string[] {\n Step.assert(this.stepId);\n const texts = AssistsX.getAllText();\n Step.assert(this.stepId);\n return texts;\n }\n\n /**\n * 执行点击手势\n * @param x 横坐标\n * @param y 纵坐标\n * @param duration 持续时间(毫秒)\n * @returns 是否成功\n */\n public async clickByGesture(\n x: number,\n y: number,\n duration: number\n ): Promise<boolean> {\n Step.assert(this.stepId);\n const result = await AssistsX.clickByGesture(x, y, duration);\n Step.assert(this.stepId);\n return result;\n }\n\n public async longPressGestureAutoPaste(\n point: { x: number; y: number },\n text: string,\n {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n }: {\n matchedPackageName?: string;\n matchedText?: string;\n timeoutMillis?: number;\n longPressDuration?: number;\n } = { matchedText: \"粘贴\", timeoutMillis: 1500, longPressDuration: 600 }\n ): Promise<boolean> {\n Step.assert(this.stepId);\n const result = await AssistsX.longPressGestureAutoPaste(point, text, {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n });\n Step.assert(this.stepId);\n return result;\n }\n public async getAppInfo(packageName: string): Promise<any> {\n Step.assert(this.stepId);\n const result = await AssistsX.getAppInfo(packageName);\n Step.assert(this.stepId);\n return result;\n }\n public async performLinearGesture(\n startPoint: { x: number; y: number },\n endPoint: { x: number; y: number },\n { duration }: { duration?: number } = {}\n ): Promise<boolean> {\n Step.assert(this.stepId);\n const result = await AssistsX.performLinearGesture(startPoint, endPoint, {\n duration,\n });\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 返回操作\n * @returns 是否成功\n */\n public back(): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.back();\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 回到主页\n * @returns 是否成功\n */\n public home(): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.home();\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 打开通知栏\n * @returns 是否成功\n */\n public notifications(): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.notifications();\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 显示最近应用\n * @returns 是否成功\n */\n public recentApps(): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.recentApps();\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 获取屏幕尺寸\n * @returns 屏幕尺寸对象\n */\n public getScreenSize(): any {\n Step.assert(this.stepId);\n const data = AssistsX.getScreenSize();\n Step.assert(this.stepId);\n return data;\n }\n\n /**\n * 获取应用窗口尺寸\n * @returns 应用窗口尺寸对象\n */\n public getAppScreenSize(): any {\n Step.assert(this.stepId);\n const data = AssistsX.getAppScreenSize();\n Step.assert(this.stepId);\n return data;\n }\n}\n","/**\n * 节点类\n * 表示界面上的一个可交互元素,包含元素的属性和可执行的操作\n */\nimport { Bounds } from \"./bounds\";\nimport { AssistsX } from \"./assistsx\";\nimport { Step } from \"./step\";\nimport { AssistsXAsync } from \"./assistsx-async\";\nimport { Node } from \"./node\";\n\nexport class NodeAsync {\n private node: Node;\n\n /**\n * 构造函数\n * @param node Node实例\n */\n constructor(node: Node) {\n this.node = node;\n }\n /**\n * 查找第一个匹配标签的父节点\n * @param className 类名\n * @returns 父节点\n */\n public async findFirstParentByTags(className: string): Promise<Node> {\n Step.assert(this.node.stepId);\n const node = await AssistsXAsync.findFirstParentByTags(\n this.node,\n className\n );\n Step.assert(this.node.stepId);\n return node;\n }\n /**\n * 对节点执行点击手势\n * @param offsetX X轴偏移\n * @param offsetY Y轴偏移\n * @param switchWindowIntervalDelay 窗口切换延迟\n * @param clickDuration 点击持续时间\n * @returns 是否点击成功\n */\n public async clickNodeByGesture({\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n }: {\n offsetX?: number;\n offsetY?: number;\n switchWindowIntervalDelay?: number;\n clickDuration?: number;\n } = {}): Promise<boolean> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.clickNodeByGesture(this.node, {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n });\n Step.assert(this.node.stepId);\n return result;\n }\n /**\n * 对节点执行双击手势\n * @param offsetX X轴偏移\n * @param offsetY Y轴偏移\n * @param switchWindowIntervalDelay 窗口切换延迟\n * @param clickDuration 点击持续时间\n * @param clickInterval 点击间隔\n * @returns 是否双击成功\n */\n public async doubleClickNodeByGesture({\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n clickInterval,\n }: {\n offsetX?: number;\n offsetY?: number;\n switchWindowIntervalDelay?: number;\n clickDuration?: number;\n clickInterval?: number;\n } = {}): Promise<boolean> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.doubleClickNodeByGesture(this.node, {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n clickInterval,\n });\n Step.assert(this.node.stepId);\n return result;\n }\n\n public async longPressNodeByGestureAutoPaste(\n text: string,\n {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n }: {\n matchedPackageName?: string;\n matchedText?: string;\n timeoutMillis?: number;\n longPressDuration?: number;\n } = { matchedText: \"粘贴\", timeoutMillis: 1500, longPressDuration: 600 }\n ): Promise<boolean> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.longPressNodeByGestureAutoPaste(\n this.node,\n text,\n {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n }\n );\n Step.assert(this.node.stepId);\n return result;\n }\n\n /**\n * 在当前节点范围内通过标签查找节点\n * @param className 类名\n * @param filterText 文本过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public async findByTags(\n className: string,\n {\n filterText,\n filterViewId,\n filterDes,\n }: { filterText?: string; filterViewId?: string; filterDes?: string } = {}\n ): Promise<Node[]> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.findByTags(className, {\n filterText,\n filterViewId,\n filterDes,\n node: this.node,\n });\n Step.assignIdsToNodes(result, this.node.stepId);\n Step.assert(this.node.stepId);\n return result;\n }\n /**\n * 在当前节点范围内通过ID查找节点\n * @param id 节点ID\n * @param filterClass 类名过滤\n * @param filterText 文本过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public async findById(\n id: string,\n {\n filterClass,\n filterText,\n filterDes,\n }: { filterClass?: string; filterText?: string; filterDes?: string } = {}\n ): Promise<Node[]> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.findById(id, {\n filterClass,\n filterText,\n filterDes,\n node: this.node,\n });\n Step.assignIdsToNodes(result, this.node.stepId);\n Step.assert(this.node.stepId);\n return result;\n }\n /**\n * 在当前节点范围内通过文本查找节点\n * @param text 要查找的文本\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public async findByText(\n text: string,\n {\n filterClass,\n filterViewId,\n filterDes,\n }: { filterClass?: string; filterViewId?: string; filterDes?: string } = {}\n ): Promise<Node[]> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.findByText(text, {\n filterClass,\n filterViewId,\n filterDes,\n node: this.node,\n });\n Step.assignIdsToNodes(result, this.node.stepId);\n Step.assert(this.node.stepId);\n return result;\n }\n\n /**\n * 向前滚动节点\n * @returns 是否滚动成功\n */\n public async scrollForward(): Promise<boolean> {\n Step.assert(this.node.stepId);\n const response = await AssistsXAsync.scrollForward(this.node);\n Step.assert(this.node.stepId);\n return response;\n }\n\n /**\n * 向后滚动节点\n * @returns 是否滚动成功\n */\n public async scrollBackward(): Promise<boolean> {\n Step.assert(this.node.stepId);\n const response = await AssistsXAsync.scrollBackward(this.node);\n Step.assert(this.node.stepId);\n return response;\n }\n /**\n * 检查节点是否可见\n * @param compareNode 比较节点\n * @param isFullyByCompareNode 是否完全可见\n * @returns 是否可见\n */\n public async isVisible({\n compareNode,\n isFullyByCompareNode,\n }: {\n compareNode?: Node;\n isFullyByCompareNode?: boolean;\n } = {}): Promise<boolean> {\n Step.assert(this.node.stepId);\n const response = await AssistsXAsync.isVisible(this.node, {\n compareNode,\n isFullyByCompareNode,\n });\n Step.assert(this.node.stepId);\n return response;\n }\n /**\n * 对节点进行截图\n * @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)\n * @returns 截图路径\n */\n public async takeScreenshot(\n overlayHiddenScreenshotDelayMillis: number = 250\n ): Promise<string> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.takeScreenshotNodes(\n [this.node],\n overlayHiddenScreenshotDelayMillis\n );\n Step.assert(this.node.stepId);\n return result[0];\n }\n /**\n * 设置节点文本\n * @param text 要设置的文本\n * @returns 是否设置成功\n */\n public async setNodeText(text: string): Promise<boolean> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.setNodeText(this.node, text);\n Step.assert(this.node.stepId);\n return result;\n }\n public async paste(text: string): Promise<boolean> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.paste(this.node, text);\n Step.assert(this.node.stepId);\n return result;\n }\n public async focus(): Promise<boolean> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.focus(this.node);\n Step.assert(this.node.stepId);\n return result;\n }\n\n /**\n * 点击节点\n * @returns 是否点击成功\n */\n public async click(): Promise<boolean> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.click(this.node);\n Step.assert(this.node.stepId);\n return result;\n }\n /**\n * 长按节点\n * @returns 是否长按成功\n */\n public async longClick(): Promise<boolean> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.longClick(this.node);\n Step.assert(this.node.stepId);\n return result;\n }\n /**\n * 查找第一个可点击的父节点\n * @returns 可点击的父节点\n */\n public async findFirstParentClickable(): Promise<Node> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.findFirstParentClickable(this.node);\n Step.assert(this.node.stepId);\n Step.assignIdsToNodes([result], this.node.stepId);\n return result;\n }\n /**\n * 获取节点在屏幕中的边界\n * @returns 边界对象\n */\n public async getBoundsInScreen(): Promise<Bounds> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.getBoundsInScreen(this.node);\n Step.assert(this.node.stepId);\n return result;\n }\n /**\n * 获取节点的所有子节点\n * @returns 子节点数组\n */\n public async getNodes(): Promise<Node[]> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.getNodes(this.node);\n Step.assert(this.node.stepId);\n Step.assignIdsToNodes(result, this.node.stepId);\n return result;\n }\n /**\n * 获取节点的直接子节点\n * @returns 子节点数组\n */\n public async getChildren(): Promise<Node[]> {\n Step.assert(this.node.stepId);\n const result = await AssistsXAsync.getChildren(this.node);\n Step.assert(this.node.stepId);\n Step.assignIdsToNodes(result, this.node.stepId);\n return result;\n }\n\n /**\n * 从JSON字符串创建节点实例\n * @param json JSON字符串\n * @returns 节点实例\n */\n static fromJSON(json: string): Node {\n const data = JSON.parse(json);\n return new Node(data);\n }\n\n /**\n * 从普通对象创建节点实例\n * @param data 对象数据\n * @returns 节点实例\n */\n static from(data: any): Node {\n return new Node(data);\n }\n\n /**\n * JSON.parse的reviver函数,用于将解析的JSON对象转换为Node实例\n * @param key 属性键\n * @param value 属性值\n * @returns 转换后的值\n */\n static reviver(key: string, value: any): any {\n return key === \"\" ? new Node(value) : value;\n }\n\n /**\n * 创建新的节点实例\n * @param params 节点参数对象\n * @returns 节点实例\n */\n static create(params: {\n nodeId: string;\n text: string;\n des: string;\n viewId: string;\n className: string;\n isScrollable: boolean;\n isClickable: boolean;\n isEnabled: boolean;\n stepId: string | undefined;\n hintText: string;\n isCheckable: boolean;\n isChecked: boolean;\n isFocusable: boolean;\n isFocused: boolean;\n isLongClickable: boolean;\n isPassword: boolean;\n isSelected: boolean;\n isVisibleToUser: boolean;\n drawingOrder: number;\n bounds?: Bounds;\n /** @deprecated 请使用 bounds 替代 */\n boundsInScreen?: Bounds;\n }): Node {\n return new Node(params);\n }\n\n /**\n * 从JSON数组创建节点数组\n * @param array JSON数组\n * @returns 节点数组\n */\n static fromJSONArray(array: Array<any>): Node[] {\n // 如果 array 不是数组,抛出详细异常\n if (!Array.isArray(array)) {\n throw new Error(\n `NodeAsync.fromJSONArray: Expected array, but got ${typeof array}. ` +\n `Value: ${JSON.stringify(array)}`\n );\n }\n return array.map((data) => new Node(data));\n }\n}\n","/**\n * 节点类\n * 表示界面上的一个可交互元素,包含元素的属性和可执行的操作\n */\nimport { Bounds } from \"./bounds\";\nimport { AssistsX } from \"./assistsx\";\nimport { AssistsXAsync } from \"./assistsx-async\";\nimport { Step } from \"./step\";\nimport { NodeAsync } from \"./node-async\";\n\n// 将接口改造为类\nexport class Node {\n /**\n * 节点唯一标识\n */\n nodeId: string;\n\n /**\n * 节点文本内容\n */\n text: string;\n\n /**\n * 节点描述信息\n */\n des: string;\n\n /**\n * 节点视图ID\n */\n viewId: string;\n\n /**\n * 节点类名\n */\n className: string;\n\n /**\n * 是否可滚动\n */\n isScrollable: boolean;\n\n /**\n * 是否可点击\n */\n isClickable: boolean;\n\n /**\n * 是否启用\n */\n isEnabled: boolean;\n\n /**\n * 所属步骤ID\n */\n stepId: string | undefined;\n\n /**\n * 提示文本\n */\n hintText: string;\n\n /**\n * 是否可选择\n */\n isCheckable: boolean;\n\n /**\n * 是否已选中\n */\n isChecked: boolean;\n\n /**\n * 是否可聚焦\n */\n isFocusable: boolean;\n\n /**\n * 是否已聚焦\n */\n isFocused: boolean;\n\n /**\n * 是否可长按\n */\n isLongClickable: boolean;\n\n /**\n * 是否为密码字段\n */\n isPassword: boolean;\n\n /**\n * 是否已选中\n */\n isSelected: boolean;\n\n /**\n * 是否对用户可见\n */\n isVisibleToUser: boolean;\n\n /**\n * 绘制顺序\n */\n drawingOrder: number;\n\n /**\n * 节点在屏幕中的边界\n */\n bounds: Bounds;\n\n /**\n * 节点在屏幕中的边界\n * @deprecated 请使用 bounds 字段替代\n */\n get boundsInScreen(): Bounds {\n return this.bounds;\n }\n\n /**\n * 构造函数\n * @param params 节点参数对象\n */\n constructor(params: {\n nodeId: string;\n text: string;\n des: string;\n viewId: string;\n className: string;\n isScrollable: boolean;\n isClickable: boolean;\n isEnabled: boolean;\n stepId: string | undefined;\n hintText: string;\n isCheckable: boolean;\n isChecked: boolean;\n isFocusable: boolean;\n isFocused: boolean;\n isLongClickable: boolean;\n isPassword: boolean;\n isSelected: boolean;\n isVisibleToUser: boolean;\n drawingOrder: number;\n /** @deprecated 请使用 bounds 替代 */\n boundsInScreen?: Bounds | any;\n bounds?: Bounds | any;\n }) {\n this.nodeId = params.nodeId;\n this.text = params.text;\n this.des = params.des;\n this.viewId = params.viewId;\n this.className = params.className;\n this.isScrollable = params.isScrollable;\n this.isClickable = params.isClickable;\n this.isEnabled = params.isEnabled;\n this.stepId = params.stepId;\n this.hintText = params.hintText;\n this.isCheckable = params.isCheckable;\n this.isChecked = params.isChecked;\n this.isFocusable = params.isFocusable;\n this.isFocused = params.isFocused;\n this.isLongClickable = params.isLongClickable;\n this.isPassword = params.isPassword;\n this.isSelected = params.isSelected;\n this.isVisibleToUser = params.isVisibleToUser;\n this.drawingOrder = params.drawingOrder;\n // 优先使用 bounds,兼容旧的 boundsInScreen;确保为 Bounds 实例\n const rawBounds = params.bounds ?? params.boundsInScreen;\n this.bounds = rawBounds instanceof Bounds ? rawBounds : Bounds.fromData(rawBounds);\n }\n\n public get async(): NodeAsync {\n return new NodeAsync(this);\n }\n\n /**\n * 查找第一个匹配标签的父节点\n * @param className 类名\n * @returns 父节点\n */\n public findFirstParentByTags(className: string): Node {\n Step.assert(this.stepId);\n const node = AssistsX.findFirstParentByTags(this, className);\n Step.assert(this.stepId);\n return node;\n }\n\n /**\n * 对节点执行点击手势\n * @param offsetX X轴偏移\n * @param offsetY Y轴偏移\n * @param switchWindowIntervalDelay 窗口切换延迟\n * @param clickDuration 点击持续时间\n * @returns 是否点击成功\n */\n public async clickNodeByGesture({\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n }: {\n offsetX?: number;\n offsetY?: number;\n switchWindowIntervalDelay?: number;\n clickDuration?: number;\n } = {}): Promise<boolean> {\n Step.assert(this.stepId);\n const result = await AssistsX.clickNodeByGesture(this, {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n });\n Step.assert(this.stepId);\n return result;\n }\n /**\n * 对节点执行双击手势\n * @param offsetX X轴偏移\n * @param offsetY Y轴偏移\n * @param switchWindowIntervalDelay 窗口切换延迟\n * @param clickDuration 点击持续时间\n * @param clickInterval 点击间隔\n * @returns 是否双击成功\n */\n public async doubleClickNodeByGesture({\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n clickInterval,\n }: {\n offsetX?: number;\n offsetY?: number;\n switchWindowIntervalDelay?: number;\n clickDuration?: number;\n clickInterval?: number;\n } = {}): Promise<boolean> {\n Step.assert(this.stepId);\n const result = await AssistsX.doubleClickNodeByGesture(this, {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n clickInterval,\n });\n Step.assert(this.stepId);\n return result;\n }\n\n public async longPressNodeByGestureAutoPaste(\n text: string,\n {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n }: {\n matchedPackageName?: string;\n matchedText?: string;\n timeoutMillis?: number;\n longPressDuration?: number;\n } = { matchedText: \"粘贴\", timeoutMillis: 1500, longPressDuration: 600 }\n ): Promise<boolean> {\n Step.assert(this.stepId);\n const result = await AssistsX.longPressNodeByGestureAutoPaste(this, text, {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n });\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 在当前节点范围内通过标签查找节点\n * @param className 类名\n * @param filterText 文本过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public findByTags(\n className: string,\n {\n filterText,\n filterViewId,\n filterDes,\n }: { filterText?: string; filterViewId?: string; filterDes?: string } = {}\n ): Node[] {\n Step.assert(this.stepId);\n const result = AssistsX.findByTags(className, {\n filterText,\n filterViewId,\n filterDes,\n node: this,\n });\n Step.assignIdsToNodes(result, this.stepId);\n Step.assert(this.stepId);\n return result;\n }\n /**\n * 在当前节点范围内通过ID查找节点\n * @param id 节点ID\n * @param filterClass 类名过滤\n * @param filterText 文本过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public findById(\n id: string,\n {\n filterClass,\n filterText,\n filterDes,\n }: { filterClass?: string; filterText?: string; filterDes?: string } = {}\n ): Node[] {\n Step.assert(this.stepId);\n const result = AssistsX.findById(id, {\n filterClass,\n filterText,\n filterDes,\n node: this,\n });\n Step.assignIdsToNodes(result, this.stepId);\n Step.assert(this.stepId);\n return result;\n }\n /**\n * 在当前节点范围内通过文本查找节点\n * @param text 要查找的文本\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @returns 节点数组\n */\n public findByText(\n text: string,\n {\n filterClass,\n filterViewId,\n filterDes,\n }: { filterClass?: string; filterViewId?: string; filterDes?: string } = {}\n ): Node[] {\n Step.assert(this.stepId);\n const result = AssistsX.findByText(text, {\n filterClass,\n filterViewId,\n filterDes,\n node: this,\n });\n Step.assignIdsToNodes(result, this.stepId);\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 向前滚动节点\n * @returns 是否滚动成功\n */\n public scrollForward(): boolean {\n Step.assert(this.stepId);\n const response = AssistsX.scrollForward(this);\n Step.assert(this.stepId);\n return response;\n }\n\n /**\n * 向后滚动节点\n * @returns 是否滚动成功\n */\n public scrollBackward(): boolean {\n Step.assert(this.stepId);\n const response = AssistsX.scrollBackward(this);\n Step.assert(this.stepId);\n return response;\n }\n /**\n * 检查节点是否可见\n * @param compareNode 比较节点\n * @param isFullyByCompareNode 是否完全可见\n * @returns 是否可见\n */\n public isVisible({\n compareNode,\n isFullyByCompareNode,\n }: { compareNode?: Node; isFullyByCompareNode?: boolean } = {}): boolean {\n Step.assert(this.stepId);\n const response = AssistsX.isVisible(this, {\n compareNode,\n isFullyByCompareNode,\n });\n Step.assert(this.stepId);\n return response;\n }\n /**\n * 对节点进行截图\n * @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)\n * @returns 截图路径\n */\n public async takeScreenshot(\n overlayHiddenScreenshotDelayMillis: number = 250\n ): Promise<string> {\n Step.assert(this.stepId);\n const result = await AssistsX.takeScreenshotNodes(\n [this],\n overlayHiddenScreenshotDelayMillis\n );\n Step.assert(this.stepId);\n return result[0];\n }\n /**\n * 保存节点截图到文件\n * @param options 截图保存选项\n * @param options.filePath 文件路径(可选,不提供则自动生成)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认为 \"PNG\"\n * @param options.overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒),默认为 250\n * @returns 保存的文件路径\n */\n public async takeScreenshotToFile(\n options: {\n filePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n overlayHiddenScreenshotDelayMillis?: number;\n } = {}\n ): Promise<string> {\n Step.assert(this.stepId);\n const result = await AssistsXAsync.takeScreenshotToFile({\n nodes: [this],\n ...options,\n });\n Step.assert(this.stepId);\n return result[0];\n }\n /**\n * 设置节点文本\n * @param text 要设置的文本\n * @returns 是否设置成功\n */\n public setNodeText(text: string): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.setNodeText(this, text);\n Step.assert(this.stepId);\n return result;\n }\n public paste(text: string): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.paste(this, text);\n Step.assert(this.stepId);\n return result;\n }\n public focus(): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.focus(this);\n Step.assert(this.stepId);\n return result;\n }\n\n /**\n * 点击节点\n * @returns 是否点击成功\n */\n public click(): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.click(this);\n Step.assert(this.stepId);\n return result;\n }\n /**\n * 长按节点\n * @returns 是否长按成功\n */\n public longClick(): boolean {\n Step.assert(this.stepId);\n const result = AssistsX.longClick(this);\n Step.assert(this.stepId);\n return result;\n }\n /**\n * 查找第一个可点击的父节点\n * @returns 可点击的父节点\n */\n public findFirstParentClickable(): Node {\n Step.assert(this.stepId);\n const result = AssistsX.findFirstParentClickable(this);\n Step.assert(this.stepId);\n Step.assignIdsToNodes([result], this.stepId);\n return result;\n }\n /**\n * 获取节点在屏幕中的边界\n * @returns 边界对象\n */\n public getBoundsInScreen(): Bounds {\n Step.assert(this.stepId);\n const result = AssistsX.getBoundsInScreen(this);\n Step.assert(this.stepId);\n return result;\n }\n /**\n * 获取节点的所有子节点\n * @returns 子节点数组\n */\n public getNodes(): Node[] {\n Step.assert(this.stepId);\n const result = AssistsX.getNodes(this);\n Step.assert(this.stepId);\n Step.assignIdsToNodes(result, this.stepId);\n return result;\n }\n /**\n * 获取节点的直接子节点\n * @returns 子节点数组\n */\n public getChildren(): Node[] {\n Step.assert(this.stepId);\n const result = AssistsX.getChildren(this);\n Step.assert(this.stepId);\n Step.assignIdsToNodes(result, this.stepId);\n return result;\n }\n\n /**\n * 从JSON字符串创建节点实例\n * @param json JSON字符串\n * @returns 节点实例\n */\n static fromJSON(json: string): Node {\n const data = JSON.parse(json);\n return new Node(data);\n }\n\n /**\n * 从普通对象创建节点实例\n * @param data 对象数据\n * @returns 节点实例\n */\n static from(data: any): Node {\n return new Node(data);\n }\n\n /**\n * JSON.parse的reviver函数,用于将解析的JSON对象转换为Node实例\n * @param key 属性键\n * @param value 属性值\n * @returns 转换后的值\n */\n static reviver(key: string, value: any): any {\n return key === \"\" ? new Node(value) : value;\n }\n\n /**\n * 创建新的节点实例\n * @param params 节点参数对象\n * @returns 节点实例\n */\n static create(params: {\n nodeId: string;\n text: string;\n des: string;\n viewId: string;\n className: string;\n isScrollable: boolean;\n isClickable: boolean;\n isEnabled: boolean;\n stepId: string | undefined;\n hintText: string;\n isCheckable: boolean;\n isChecked: boolean;\n isFocusable: boolean;\n isFocused: boolean;\n isLongClickable: boolean;\n isPassword: boolean;\n isSelected: boolean;\n isVisibleToUser: boolean;\n drawingOrder: number;\n bounds?: Bounds;\n /** @deprecated 请使用 bounds 替代 */\n boundsInScreen?: Bounds;\n }): Node {\n return new Node(params);\n }\n\n /**\n * 从JSON数组创建节点数组\n * @param array JSON数组\n * @returns 节点数组\n */\n static fromJSONArray(array: Array<any>): Node[] {\n // 如果 array 不是数组,抛出详细异常\n if (!Array.isArray(array)) {\n throw new Error(\n `Node.fromJSONArray: Expected array, but got ${typeof array}. ` +\n `Value: ${JSON.stringify(array)}`\n );\n }\n return array.map((data) => new Node(data));\n }\n}\n","/**\n * AssistsX 类\n * 提供与移动应用程序界面交互的工具类,包括节点查找、手势操作、屏幕操作等功能\n */\nimport { Node } from \"./node\";\nimport { CallMethod } from \"./call-method\";\nimport { CallResponse } from \"./call-response\";\nimport { Bounds } from \"./bounds\";\nimport { decodeBase64UTF8, generateUUID } from \"./utils\";\nimport { AccessibilityEventFilter } from \"./accessibility-event-filter\";\nimport { AppInfo } from \"./app-info\";\nimport { DeviceInfo } from \"./device-info\";\n\n/**\n * 无障碍事件数据结构\n */\nexport interface AccessibilityEventData {\n packageName: string;\n className: string;\n eventType: number;\n action: number;\n texts: string[];\n node: Node | null;\n}\n\n/**\n * 无障碍事件完整结构\n */\nexport interface AccessibilityEvent {\n callbackId: string;\n code: number;\n data: AccessibilityEventData;\n message: string;\n}\n\n/**\n * 无障碍事件监听器类型\n */\nexport type AccessibilityEventListener = (event: AccessibilityEvent) => void;\n\n/**\n * Web浮动窗口选项接口定义\n */\nexport interface WebFloatingWindowOptions {\n initialWidth?: number;\n initialHeight?: number;\n /** Initial window X position (default 0) */\n initialX?: number;\n /** Initial window Y position (default 0) */\n initialY?: number;\n minWidth?: number;\n minHeight?: number;\n maxWidth?: number;\n maxHeight?: number;\n initialCenter?: boolean;\n /** Whether to show top operation area (title bar, close button, etc.) */\n showTopOperationArea?: boolean;\n /** Whether to show bottom operation area (zoom, back/forward/refresh, etc.) */\n showBottomOperationArea?: boolean;\n /** Background color: hex string (e.g. \"#ffffff\") or Android color int */\n backgroundColor?: string | number;\n}\n\n// 回调函数存储对象\nexport const callbacks: Map<string, (data: string) => void> = new Map();\n\n// 无障碍事件监听器存储\nexport const accessibilityEventListeners: AccessibilityEventListener[] = [];\n\n/**\n * 屏幕尺寸类型(width/height 为整型像素值)\n */\nexport interface Screen {\n width: number;\n height: number;\n}\n\n/** 全局屏幕尺寸,在 assistsxCallback 初始化后自动加载 */\nexport let screen: Screen | null = null;\n\n// 初始化全局回调函数\nif (typeof window !== \"undefined\" && !window.assistsxCallback) {\n window.assistsxCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.log(e);\n } finally {\n // 无论成功还是失败,都删除回调函数\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\n// 初始化全局无障碍事件函数\nif (typeof window !== \"undefined\" && !window.onAccessibilityEvent) {\n window.onAccessibilityEvent = (event: string) => {\n // 通知所有注册的监听器,每个监听器都有独立的错误处理\n accessibilityEventListeners.forEach((listener) => {\n try {\n //base64 decode\n const decodedEvent = decodeBase64UTF8(event);\n const parsedEvent: AccessibilityEvent = JSON.parse(decodedEvent);\n listener(parsedEvent);\n } catch (error) {\n console.error(\"Accessibility event listener error:\", error);\n }\n });\n };\n}\n\nexport class AssistsX {\n /**\n * 屏幕尺寸(与全局变量 screen 同源)\n * @deprecated 已过时,请使用全局变量 {@link screen}\n */\n public static get screenSize(): any {\n if (screen == null) return null;\n return {\n width: screen.width,\n height: screen.height,\n screenWidth: screen.width,\n screenHeight: screen.height,\n };\n }\n\n /**\n * 执行同步调用\n * @param method 方法名\n * @param args 参数对象\n * @returns 调用响应\n */\n public static call(\n method: string,\n { args, node }: { args?: any; node?: Node } = {}\n ): CallResponse {\n const params = {\n method,\n arguments: args ? args : undefined,\n node: node ? node : undefined,\n };\n const result = window.assistsx.call(JSON.stringify(params));\n if (typeof result === \"string\") {\n const responseData = JSON.parse(result);\n const response = new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n return response;\n }\n throw new Error(\"Call failed\");\n }\n\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n public static async asyncCall(\n method: string,\n {\n args,\n node,\n nodes,\n timeout = 30,\n }: { args?: any; node?: Node; nodes?: Node[]; timeout?: number } = {}\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n node: node ? node : undefined,\n nodes: nodes ? nodes : undefined,\n callbackId: uuid,\n };\n const promise = new Promise((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n // 超时后删除回调函数\n callbacks.delete(uuid);\n resolve(new CallResponse(0, null, uuid));\n }, timeout * 1000);\n });\n const result = window.assistsx.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n const response = new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n return response;\n }\n throw new Error(\"Call failed\");\n }\n\n /**\n * 设置悬浮窗标志\n * @param flags 标志\n * @returns 是否设置成功\n */\n public static setOverlayFlags(flags: number): boolean {\n const response = this.call(CallMethod.setOverlayFlags, {\n args: { flags: flags },\n });\n return response.getDataOrDefault(false);\n }\n /**\n * 设置悬浮窗标志\n * @param flags 标志\n * @returns 是否设置成功\n */\n public static setOverlayFlagList(flags: number[]): boolean {\n const response = this.call(CallMethod.setOverlayFlags, {\n args: { flags: flags },\n });\n return response.getDataOrDefault(false);\n }\n /**\n * 获取所有符合条件的节点\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @param filterText 文本过滤\n * @returns 节点数组\n */\n public static getAllNodes({\n filterClass,\n filterViewId,\n filterDes,\n filterText,\n }: {\n filterClass?: string;\n filterViewId?: string;\n filterDes?: string;\n filterText?: string;\n } = {}): Node[] {\n const response = this.call(CallMethod.getAllNodes, {\n args: { filterClass, filterViewId, filterDes, filterText },\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsX.getAllNodes: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 设置节点文本\n * @param node 目标节点\n * @param text 要设置的文本\n * @returns 是否设置成功\n */\n public static setNodeText(node: Node, text: string): boolean {\n const response = this.call(CallMethod.setNodeText, {\n args: { text },\n node,\n });\n return response.getDataOrDefault(false);\n }\n /**\n * 获取剪贴板最新文本\n * @returns 剪贴板最新文本\n */\n public static getClipboardLatestText(): any {\n const response = this.call(CallMethod.getClipboardLatestText);\n return response.getDataOrDefault({});\n }\n\n /**\n * 获取剪贴板文本内容(异步)\n * @param timeout 超时时间(秒),默认30秒\n * @returns 剪贴板文本内容,如果获取失败则返回空字符串\n */\n public static async getClipboardText(timeout?: number): Promise<string> {\n const response = await this.asyncCall(CallMethod.getClipboardText, {\n timeout,\n });\n const data = response.getDataOrDefault({ text: \"\" });\n return data.text || \"\";\n }\n\n /**\n * 在浏览器中打开URL\n * @param url 要打开的URL\n * @returns 是否成功打开\n */\n public static openUrlInBrowser(url: string): boolean {\n const response = this.call(CallMethod.openUrlInBrowser, {\n args: { url },\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 保持屏幕常亮\n * @param tip 提示文本\n * @returns 是否保持屏幕常亮成功\n */\n public static keepScreenOn(tip?: string): boolean {\n const response = this.call(CallMethod.keepScreenOn, {\n args: { tip },\n });\n return response.getDataOrDefault(false);\n }\n public static clearKeepScreenOn(): boolean {\n const response = this.call(CallMethod.clearKeepScreenOn, {});\n return response.getDataOrDefault(false);\n }\n public static isAppInstalled(packageName: string): boolean {\n const response = this.call(CallMethod.isAppInstalled, {\n args: { packageName },\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 对指定节点进行截图\n * @param nodes 要截图的节点数组\n * @param overlayHiddenScreenshotDelayMillis 截图延迟时间(毫秒)\n * @param timeout 超时时间(秒),默认30秒\n * @returns 截图路径数组\n */\n public static async takeScreenshotNodes(\n nodes: Node[],\n overlayHiddenScreenshotDelayMillis: number = 250,\n timeout?: number\n ): Promise<string[]> {\n const response = await this.asyncCall(CallMethod.takeScreenshot, {\n nodes,\n args: { overlayHiddenScreenshotDelayMillis },\n timeout,\n });\n const data = response.getDataOrDefault({ images: [] });\n return data.images;\n }\n public static async scanQR(timeout?: number): Promise<string> {\n const response = await this.asyncCall(CallMethod.scanQR, { timeout });\n const data = response.getDataOrDefault({ value: \"\" });\n return data.value;\n }\n public static async loadWebViewOverlay(\n url: string,\n options: WebFloatingWindowOptions & { timeout?: number } = {}\n ): Promise<any> {\n const {\n initialWidth,\n initialHeight,\n initialX,\n initialY,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n initialCenter,\n showTopOperationArea,\n showBottomOperationArea,\n backgroundColor,\n timeout,\n } = options;\n const response = await this.asyncCall(CallMethod.loadWebViewOverlay, {\n args: {\n url,\n initialWidth,\n initialHeight,\n initialX,\n initialY,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n initialCenter,\n showTopOperationArea,\n showBottomOperationArea,\n backgroundColor,\n },\n timeout,\n });\n const data = response.getDataOrDefault({});\n return data;\n }\n\n /**\n * 点击节点\n * @param node 要点击的节点\n * @returns 是否点击成功\n */\n public static click(node: Node): boolean {\n const response = this.call(CallMethod.click, { node });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 长按节点\n * @param node 要长按的节点\n * @returns 是否长按成功\n */\n public static longClick(node: Node): boolean {\n const response = this.call(CallMethod.longClick, { node });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 启动应用\n * @param packageName 应用包名\n * @returns 是否启动成功\n */\n public static launchApp(packageName: string): boolean {\n const response = this.call(CallMethod.launchApp, { args: { packageName } });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 获取当前应用包名\n * @returns 包名\n */\n public static getPackageName(): string {\n const response = this.call(CallMethod.getPackageName);\n return response.getDataOrDefault(\"\");\n }\n\n /**\n * 显示悬浮提示\n * @param text 提示文本\n * @param delay 显示时长(毫秒)\n * @returns 是否显示成功\n */\n public static overlayToast(text: string, delay: number = 2000): boolean {\n const response = this.call(CallMethod.overlayToast, {\n args: { text, delay },\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 通过ID查找节点\n * @param id 节点ID\n * @param filterClass 类名过滤\n * @param filterText 文本过滤\n * @param filterDes 描述过滤\n * @param node 父节点范围\n * @returns 节点数组\n */\n public static findById(\n id: string,\n {\n filterClass,\n filterText,\n filterDes,\n node,\n }: {\n filterClass?: string;\n filterText?: string;\n filterDes?: string;\n node?: Node;\n } = {}\n ): Node[] {\n const response = this.call(CallMethod.findById, {\n args: { id, filterClass, filterText, filterDes },\n node,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsX.findById: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 通过文本查找节点\n * @param text 要查找的文本\n * @param filterClass 类名过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @param node 父节点范围\n * @returns 节点数组\n */\n public static findByText(\n text: string,\n {\n filterClass,\n filterViewId,\n filterDes,\n node,\n }: {\n filterClass?: string;\n filterViewId?: string;\n filterDes?: string;\n node?: Node;\n } = {}\n ): Node[] {\n const response = this.call(CallMethod.findByText, {\n args: { text, filterClass, filterViewId, filterDes },\n node,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsX.findByText: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 通过标签查找节点\n * @param className 类名\n * @param filterText 文本过滤\n * @param filterViewId 视图ID过滤\n * @param filterDes 描述过滤\n * @param node 父节点范围\n * @returns 节点数组\n */\n public static findByTags(\n className: string,\n {\n filterText,\n filterViewId,\n filterDes,\n node,\n }: {\n filterText?: string;\n filterViewId?: string;\n filterDes?: string;\n node?: Node;\n } = {}\n ): Node[] {\n const response = this.call(CallMethod.findByTags, {\n args: { className, filterText, filterViewId, filterDes },\n node,\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsX.findByTags: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 查找所有匹配文本的节点\n * @param text 要查找的文本\n * @returns 节点数组\n */\n public static findByTextAllMatch(text: string): Node[] {\n const response = this.call(CallMethod.findByTextAllMatch, {\n args: { text },\n });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsX.findByTextAllMatch: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 检查是否包含指定文本\n * @param text 要检查的文本\n * @returns 是否包含\n */\n public static containsText(text: string): boolean {\n const response = this.call(CallMethod.containsText, { args: { text } });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 获取所有文本\n * @returns 文本数组\n */\n public static getAllText(): string[] {\n const response = this.call(CallMethod.getAllText);\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsX.getAllText: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return data;\n }\n\n /**\n * 查找第一个匹配标签的父节点\n * @param className 类名\n * @returns 父节点\n */\n public static findFirstParentByTags(node: Node, className: string): Node {\n const response = this.call(CallMethod.findFirstParentByTags, {\n args: { className },\n node,\n });\n return Node.create(response.getDataOrDefault({}));\n }\n\n /**\n * 获取节点的所有子节点\n * @param node 父节点\n * @returns 子节点数组\n */\n public static getNodes(node: Node): Node[] {\n const response = this.call(CallMethod.getNodes, { node });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsX.getNodes: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 获取节点的直接子节点\n * @param node 父节点\n * @returns 子节点数组\n */\n public static getChildren(node: Node): Node[] {\n const response = this.call(CallMethod.getChildren, { node });\n const data = response.getDataOrDefault([]);\n if (!Array.isArray(data)) {\n throw new Error(\n `AssistsX.getChildren: Expected array, but got ${typeof data}. ` +\n `Value: ${JSON.stringify(data)}`\n );\n }\n return Node.fromJSONArray(data);\n }\n\n /**\n * 查找第一个可点击的父节点\n * @param node 起始节点\n * @returns 可点击的父节点\n */\n public static findFirstParentClickable(node: Node): Node {\n const response = this.call(CallMethod.findFirstParentClickable, { node });\n return Node.create(response.getDataOrDefault({}));\n }\n\n /**\n * 获取节点在屏幕中的边界\n * @param node 目标节点\n * @returns 边界对象\n */\n public static getBoundsInScreen(node: Node): Bounds {\n const response = this.call(CallMethod.getBoundsInScreen, { node });\n return Bounds.fromData(response.getDataOrDefault({}));\n }\n\n /**\n * 检查节点是否可见\n * @param node 目标节点\n * @param compareNode 比较节点\n * @param isFullyByCompareNode 是否完全可见\n * @returns 是否可见\n */\n public static isVisible(\n node: Node,\n {\n compareNode,\n isFullyByCompareNode,\n }: { compareNode?: Node; isFullyByCompareNode?: boolean } = {}\n ): boolean {\n const response = this.call(CallMethod.isVisible, {\n node,\n args: { compareNode, isFullyByCompareNode },\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 执行点击手势\n * @param x 横坐标\n * @param y 纵坐标\n * @param duration 持续时间\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async clickByGesture(\n x: number,\n y: number,\n duration: number,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.clickByGesture, {\n args: { x, y, duration },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 返回操作\n * @returns 是否成功\n */\n public static back(): boolean {\n const response = this.call(CallMethod.back);\n return response.getDataOrDefault(false);\n }\n\n /**\n * 回到主页\n * @returns 是否成功\n */\n public static home(): boolean {\n const response = this.call(CallMethod.home);\n return response.getDataOrDefault(false);\n }\n\n /**\n * 打开通知栏\n * @returns 是否成功\n */\n public static notifications(): boolean {\n const response = this.call(CallMethod.notifications);\n return response.getDataOrDefault(false);\n }\n\n /**\n * 显示最近应用\n * @returns 是否成功\n */\n public static recentApps(): boolean {\n const response = this.call(CallMethod.recentApps);\n return response.getDataOrDefault(false);\n }\n\n /**\n * 在节点中粘贴文本\n * @param node 目标节点\n * @param text 要粘贴的文本\n * @returns 是否成功\n */\n public static paste(node: Node, text: string): boolean {\n const response = this.call(CallMethod.paste, { args: { text }, node });\n return response.getDataOrDefault(false);\n }\n public static focus(node: Node): boolean {\n const response = this.call(CallMethod.focus, { node });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 选择文本\n * @param node 目标节点\n * @param selectionStart 选择起始位置\n * @param selectionEnd 选择结束位置\n * @returns 是否成功\n */\n public static selectionText(\n node: Node,\n selectionStart: number,\n selectionEnd: number\n ): boolean {\n const response = this.call(CallMethod.selectionText, {\n args: { selectionStart, selectionEnd },\n node,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 向前滚动\n * @param node 可滚动节点\n * @returns 是否成功\n */\n public static scrollForward(node: Node): boolean {\n const response = this.call(CallMethod.scrollForward, { node });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 向后滚动\n * @param node 可滚动节点\n * @returns 是否成功\n */\n public static scrollBackward(node: Node): boolean {\n const response = this.call(CallMethod.scrollBackward, { node });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 对节点执行点击手势\n * @param node 目标节点\n * @param offsetX X轴偏移\n * @param offsetY Y轴偏移\n * @param switchWindowIntervalDelay 窗口切换延迟\n * @param clickDuration 点击持续时间\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async clickNodeByGesture(\n node: Node,\n {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n timeout,\n }: {\n offsetX?: number;\n offsetY?: number;\n switchWindowIntervalDelay?: number;\n clickDuration?: number;\n timeout?: number;\n } = {}\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.clickNodeByGesture, {\n node,\n args: { offsetX, offsetY, switchWindowIntervalDelay, clickDuration },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n\n /**\n * 对节点执行双击手势\n * @param node 目标节点\n * @param offsetX X轴偏移\n * @param offsetY Y轴偏移\n * @param switchWindowIntervalDelay 窗口切换延迟\n * @param clickDuration 点击持续时间\n * @param clickInterval 点击间隔\n * @param timeout 超时时间(秒),默认30秒\n * @returns 是否成功\n */\n public static async doubleClickNodeByGesture(\n node: Node,\n {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n clickInterval,\n timeout,\n }: {\n offsetX?: number;\n offsetY?: number;\n switchWindowIntervalDelay?: number;\n clickDuration?: number;\n clickInterval?: number;\n timeout?: number;\n } = {}\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.doubleClickNodeByGesture, {\n node,\n args: {\n offsetX,\n offsetY,\n switchWindowIntervalDelay,\n clickDuration,\n clickInterval,\n },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n /**\n * 执行线型手势\n * @param startPoint\n * @param endPoint\n * @param param2\n * @param timeout 超时时间(秒),默认30秒\n * @returns\n */\n public static async performLinearGesture(\n startPoint: { x: number; y: number },\n endPoint: { x: number; y: number },\n { duration, timeout }: { duration?: number; timeout?: number } = {}\n ): Promise<boolean> {\n const response = await this.asyncCall(CallMethod.performLinearGesture, {\n args: { startPoint, endPoint, duration },\n timeout,\n });\n return response.getDataOrDefault(false);\n }\n public static async longPressNodeByGestureAutoPaste(\n node: Node,\n text: string,\n {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n timeout,\n }: {\n matchedPackageName?: string;\n matchedText?: string;\n timeoutMillis?: number;\n longPressDuration?: number;\n timeout?: number;\n } = { matchedText: \"粘贴\", timeoutMillis: 1500, longPressDuration: 600 }\n ): Promise<boolean> {\n const response = await this.asyncCall(\n CallMethod.longPressGestureAutoPaste,\n {\n node,\n args: {\n text,\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n },\n timeout,\n }\n );\n return response.getDataOrDefault(false);\n }\n\n public static async longPressGestureAutoPaste(\n point: { x: number; y: number },\n text: string,\n {\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n timeout,\n }: {\n matchedPackageName?: string;\n matchedText?: string;\n timeoutMillis?: number;\n longPressDuration?: number;\n timeout?: number;\n } = { matchedText: \"粘贴\", timeoutMillis: 1500, longPressDuration: 600 }\n ): Promise<boolean> {\n const response = await this.asyncCall(\n CallMethod.longPressGestureAutoPaste,\n {\n args: {\n point,\n text,\n matchedPackageName,\n matchedText,\n timeoutMillis,\n longPressDuration,\n },\n timeout,\n }\n );\n return response.getDataOrDefault(false);\n }\n public static async getAppInfo(\n packageName: string,\n timeout?: number\n ): Promise<AppInfo> {\n const response = await this.asyncCall(CallMethod.getAppInfo, {\n args: { packageName },\n timeout,\n });\n return AppInfo.fromJSON(response.getDataOrDefault({}));\n }\n public static getUniqueDeviceId(): any {\n const response = this.call(CallMethod.getUniqueDeviceId);\n return response.getDataOrDefault(\"\");\n }\n public static getAndroidID(): any {\n const response = this.call(CallMethod.getAndroidID);\n return response.getDataOrDefault(\"\");\n }\n public static async getMacAddress(timeout?: number): Promise<any> {\n const response = await this.asyncCall(CallMethod.getMacAddress, {\n timeout,\n });\n return response.getDataOrDefault({});\n }\n public static async getDeviceInfo(timeout?: number): Promise<DeviceInfo> {\n const response = await this.asyncCall(CallMethod.getDeviceInfo, {\n timeout,\n });\n return DeviceInfo.fromJSON(response.getDataOrDefault({}));\n }\n public static async getNetworkType(timeout?: number): Promise<any> {\n const response = await this.asyncCall(CallMethod.getNetworkType, {\n timeout,\n });\n return response.getDataOrDefault({});\n }\n /**\n * 播放系统电话铃声\n * @param timeout 超时时间(秒),默认30秒\n * @returns 播放结果消息\n */\n public static async audioPlayRingtone(timeout?: number): Promise<string> {\n const response = await this.asyncCall(CallMethod.audioPlayRingtone, {\n timeout,\n });\n return response.getDataOrDefault(\"\");\n }\n /**\n * 停止播放系统电话铃声\n * @param timeout 超时时间(秒),默认30秒\n * @returns 停止结果消息\n */\n public static async audioStopRingtone(timeout?: number): Promise<string> {\n const response = await this.asyncCall(CallMethod.audioStopRingtone, {\n timeout,\n });\n return response.getDataOrDefault(\"\");\n }\n public static async setAccessibilityEventFilters(\n value: AccessibilityEventFilter[]\n ): Promise<any> {\n const response = this.call(CallMethod.setAccessibilityEventFilters, {\n args: { value },\n });\n return response.getDataOrDefault({});\n }\n public static async addAccessibilityEventFilter(\n value: AccessibilityEventFilter\n ): Promise<any> {\n const response = this.call(CallMethod.addAccessibilityEventFilter, {\n args: { value },\n });\n return response.getDataOrDefault({});\n }\n\n /**\n * 获取屏幕尺寸\n * @returns 屏幕尺寸对象(width, height)\n */\n public static getScreenSize(): Screen | null {\n const response = this.call(CallMethod.getScreenSize);\n const data = response.getDataOrDefault({});\n return normalizeScreen(data);\n }\n\n /**\n * 获取应用窗口尺寸\n * @returns 应用窗口尺寸对象\n */\n public static getAppScreenSize(): any {\n const response = this.call(CallMethod.getAppScreenSize);\n return response.getDataOrDefault({});\n }\n\n /**\n * 添加无障碍事件监听器\n * @param listener 监听器函数\n */\n public static addAccessibilityEventListener(\n listener: AccessibilityEventListener\n ): void {\n accessibilityEventListeners.push(listener);\n }\n /**\n * 判断是否包含无障碍事件监听器\n * @param listener 监听器函数\n * @returns 是否包含\n */\n public static containsAccessibilityEventListener(\n listener: AccessibilityEventListener\n ): boolean {\n return accessibilityEventListeners.indexOf(listener) > -1;\n }\n\n /**\n * 移除无障碍事件监听器\n * @param listener 要移除的监听器函数\n * @returns 是否移除成功\n */\n public static removeAccessibilityEventListener(\n listener: AccessibilityEventListener\n ): boolean {\n const index = accessibilityEventListeners.indexOf(listener);\n if (index > -1) {\n accessibilityEventListeners.splice(index, 1);\n return true;\n }\n return false;\n }\n\n /**\n * 移除所有无障碍事件监听器\n */\n public static removeAllAccessibilityEventListeners(): void {\n accessibilityEventListeners.length = 0;\n }\n\n /**\n * 获取当前注册的无障碍事件监听器数量\n * @returns 监听器数量\n */\n public static getAccessibilityEventListenerCount(): number {\n return accessibilityEventListeners.length;\n }\n\n}\n\n/** 将原生返回的 screenWidth/screenHeight 规范为 width/height */\nfunction normalizeScreen(data: any): Screen | null {\n if (data == null) return null;\n const w = typeof data.width === \"number\" ? data.width : data.screenWidth;\n const h = typeof data.height === \"number\" ? data.height : data.screenHeight;\n if (typeof w !== \"number\" || typeof h !== \"number\") return null;\n return { width: Math.floor(w), height: Math.floor(h) };\n}\n\n// 在 assistsxCallback 初始化后,初始化屏幕尺寸\nif (typeof window !== \"undefined\") {\n try {\n // 检查 assistsx 是否可用,如果可用则初始化屏幕尺寸\n if ((window as any).assistsx && typeof (window as any).assistsx.call === \"function\") {\n screen = AssistsX.getScreenSize();\n }\n } catch (e) {\n // 如果初始化失败,screen 保持为 null\n console.log(\"Failed to initialize screen size:\", e);\n }\n}\n","/**\n * Android 视图类型常量\n */\nexport const NodeClassValue = {\n ImageView: \"android.widget.ImageView\",\n TextView: \"android.widget.TextView\",\n LinearLayout: \"android.widget.LinearLayout\",\n RelativeLayout: \"android.widget.RelativeLayout\",\n Button: \"android.widget.Button\",\n ImageButton: \"android.widget.ImageButton\",\n EditText: \"android.widget.EditText\",\n View: \"android.view.View\",\n ViewGroup: \"android.view.ViewGroup\",\n FrameLayout: \"android.widget.FrameLayout\"\n} as const; ","/**\n * 窗口标志位常量类\n * 定义了各种窗口行为和属性的标志位\n */\nexport class WindowFlags {\n /** 不获取焦点 */\n static readonly FLAG_NOT_FOCUSABLE = 8; // 0x08\n\n /** 不响应触摸 */\n static readonly FLAG_NOT_TOUCHABLE = 16; // 0x10\n\n /** 不拦截触摸 */\n static readonly FLAG_NOT_TOUCH_MODAL = 32; // 0x20\n\n /** 监听窗外点击 */\n static readonly FLAG_WATCH_OUTSIDE_TOUCH = 4; // 0x04\n\n /** 可绘制超出屏幕 */\n static readonly FLAG_LAYOUT_NO_LIMITS = 512; // 0x200\n\n /** 屏幕全区域布局 */\n static readonly FLAG_LAYOUT_IN_SCREEN = 256; // 0x100\n\n /** 全屏显示 */\n static readonly FLAG_FULLSCREEN = 1024; // 0x400\n\n /** 背景变暗 */\n static readonly FLAG_DIM_BEHIND = 2; // 0x02\n\n /** 防录屏防截图 */\n static readonly FLAG_SECURE = 8192; // 0x2000\n\n /** 保持常亮 */\n static readonly FLAG_KEEP_SCREEN_ON = 128; // 0x80\n\n /** 锁屏时可见 */\n static readonly FLAG_SHOW_WHEN_LOCKED = 524288; // 0x80000\n\n /** 解锁屏幕 */\n static readonly FLAG_DISMISS_KEYGUARD = 4194304; // 0x400000\n\n /** 点亮屏幕 */\n static readonly FLAG_TURN_SCREEN_ON = 2097152; // 0x200000\n\n /** 自动锁屏(不常用) */\n static readonly FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 128; // 0x80\n\n /** 显示墙纸 */\n static readonly FLAG_SHOW_WALLPAPER = 1048576; // 0x100000\n\n /** 强制硬件加速 */\n static readonly FLAG_HARDWARE_ACCELERATED = 16777216; // 0x1000000\n\n /**\n * 获取标志位的十六进制表示\n * @param flag 标志位值\n * @returns 十六进制字符串\n */\n static toHex(flag: number): string {\n return `0x${flag.toString(16).toUpperCase()}`;\n }\n\n /**\n * 检查是否包含指定标志位\n * @param flags 当前标志位组合\n * @param flag 要检查的标志位\n * @returns 是否包含该标志位\n */\n static hasFlag(flags: number, flag: number): boolean {\n return (flags & flag) === flag;\n }\n\n /**\n * 添加标志位\n * @param flags 当前标志位组合\n * @param flag 要添加的标志位\n * @returns 新的标志位组合\n */\n static addFlag(flags: number, flag: number): number {\n return flags | flag;\n }\n\n /**\n * 移除标志位\n * @param flags 当前标志位组合\n * @param flag 要移除的标志位\n * @returns 新的标志位组合\n */\n static removeFlag(flags: number, flag: number): number {\n return flags & ~flag;\n }\n\n /**\n * 获取所有标志位的描述信息\n * @returns 标志位描述对象数组\n */\n static getAllFlags(): Array<{ name: string, value: number, hex: string, description: string }> {\n return [\n { name: 'FLAG_NOT_FOCUSABLE', value: this.FLAG_NOT_FOCUSABLE, hex: this.toHex(this.FLAG_NOT_FOCUSABLE), description: '不获取焦点' },\n { name: 'FLAG_NOT_TOUCHABLE', value: this.FLAG_NOT_TOUCHABLE, hex: this.toHex(this.FLAG_NOT_TOUCHABLE), description: '不响应触摸' },\n { name: 'FLAG_NOT_TOUCH_MODAL', value: this.FLAG_NOT_TOUCH_MODAL, hex: this.toHex(this.FLAG_NOT_TOUCH_MODAL), description: '不拦截触摸' },\n { name: 'FLAG_WATCH_OUTSIDE_TOUCH', value: this.FLAG_WATCH_OUTSIDE_TOUCH, hex: this.toHex(this.FLAG_WATCH_OUTSIDE_TOUCH), description: '监听窗外点击' },\n { name: 'FLAG_LAYOUT_NO_LIMITS', value: this.FLAG_LAYOUT_NO_LIMITS, hex: this.toHex(this.FLAG_LAYOUT_NO_LIMITS), description: '可绘制超出屏幕' },\n { name: 'FLAG_LAYOUT_IN_SCREEN', value: this.FLAG_LAYOUT_IN_SCREEN, hex: this.toHex(this.FLAG_LAYOUT_IN_SCREEN), description: '屏幕全区域布局' },\n { name: 'FLAG_FULLSCREEN', value: this.FLAG_FULLSCREEN, hex: this.toHex(this.FLAG_FULLSCREEN), description: '全屏显示' },\n { name: 'FLAG_DIM_BEHIND', value: this.FLAG_DIM_BEHIND, hex: this.toHex(this.FLAG_DIM_BEHIND), description: '背景变暗' },\n { name: 'FLAG_SECURE', value: this.FLAG_SECURE, hex: this.toHex(this.FLAG_SECURE), description: '防录屏防截图' },\n { name: 'FLAG_KEEP_SCREEN_ON', value: this.FLAG_KEEP_SCREEN_ON, hex: this.toHex(this.FLAG_KEEP_SCREEN_ON), description: '保持常亮' },\n { name: 'FLAG_SHOW_WHEN_LOCKED', value: this.FLAG_SHOW_WHEN_LOCKED, hex: this.toHex(this.FLAG_SHOW_WHEN_LOCKED), description: '锁屏时可见' },\n { name: 'FLAG_DISMISS_KEYGUARD', value: this.FLAG_DISMISS_KEYGUARD, hex: this.toHex(this.FLAG_DISMISS_KEYGUARD), description: '解锁屏幕' },\n { name: 'FLAG_TURN_SCREEN_ON', value: this.FLAG_TURN_SCREEN_ON, hex: this.toHex(this.FLAG_TURN_SCREEN_ON), description: '点亮屏幕' },\n { name: 'FLAG_ALLOW_LOCK_WHILE_SCREEN_ON', value: this.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON, hex: this.toHex(this.FLAG_ALLOW_LOCK_WHILE_SCREEN_ON), description: '自动锁屏(不常用)' },\n { name: 'FLAG_SHOW_WALLPAPER', value: this.FLAG_SHOW_WALLPAPER, hex: this.toHex(this.FLAG_SHOW_WALLPAPER), description: '显示墙纸' },\n { name: 'FLAG_HARDWARE_ACCELERATED', value: this.FLAG_HARDWARE_ACCELERATED, hex: this.toHex(this.FLAG_HARDWARE_ACCELERATED), description: '强制硬件加速' }\n ];\n }\n} ","/**\n * AccessibilityEvent过滤配置接口\n * 用于配置AccessibilityEvent的处理方式和过滤条件\n */\nexport interface AccessibilityEventFilterConfig {\n /**\n * 包名过滤\n * 如果为空或null,则处理所有包的事件\n * 如果指定包名,则只处理该包的事件\n */\n packageName?: string | null;\n\n /**\n * 是否在子线程中处理AccessibilityEvent\n * true: 在子线程中处理,避免阻塞主线程\n * false: 在主线程中处理\n */\n processInBackground?: boolean;\n\n /**\n * 是否获取节点信息\n * true: 获取并解析AccessibilityNodeInfo节点信息\n * false: 不获取节点信息,提高处理性能\n */\n fetchNodeInfo?: boolean;\n\n /**\n * 是否启用日志输出\n * true: 输出AccessibilityEvent处理日志\n * false: 不输出日志\n */\n enableLogging?: boolean;\n\n /**\n * 事件类型过滤\n * 如果为空,则处理所有类型的事件\n * 如果指定类型,则只处理指定类型的事件\n */\n eventTypes?: number[] | null;\n\n /**\n * 是否启用事件去重\n * true: 启用去重,避免重复处理相同事件\n * false: 不启用去重\n */\n enableDeduplication?: boolean;\n}\n\n/**\n * AccessibilityEvent过滤配置类\n * 用于配置AccessibilityEvent的处理方式和过滤条件\n */\nexport class AccessibilityEventFilter {\n /**\n * 包名过滤\n */\n public readonly packageName: string | null;\n\n /**\n * 是否在子线程中处理AccessibilityEvent\n */\n public readonly processInBackground: boolean;\n\n /**\n * 是否获取节点信息\n */\n public readonly fetchNodeInfo: boolean;\n\n /**\n * 是否启用日志输出\n */\n public readonly enableLogging: boolean;\n\n /**\n * 事件类型过滤\n */\n public readonly eventTypes?: number[] | null;\n\n /**\n * 是否启用事件去重\n */\n public readonly enableDeduplication: boolean;\n\n constructor(config: AccessibilityEventFilterConfig = {}) {\n this.packageName = config.packageName ?? null;\n this.processInBackground = config.processInBackground ?? true;\n this.fetchNodeInfo = config.fetchNodeInfo ?? true;\n this.enableLogging = config.enableLogging ?? false;\n this.eventTypes = config.eventTypes;\n this.enableDeduplication = config.enableDeduplication ?? false;\n }\n\n /**\n * 检查是否应该处理指定包的事件\n * @param targetPackageName 目标包名\n * @returns true表示应该处理,false表示应该过滤\n */\n public shouldProcessPackage(targetPackageName: string | null): boolean {\n return this.packageName === null || this.packageName === targetPackageName;\n }\n\n /**\n * 检查是否应该处理指定类型的事件\n * @param eventType 事件类型\n * @returns true表示应该处理,false表示应该过滤\n */\n public shouldProcessEventType(eventType: number): boolean {\n return (\n this.eventTypes === null ||\n (this.eventTypes?.includes(eventType) ?? false)\n );\n }\n\n /**\n * 创建默认的过滤配置\n * 所有包名,子线程处理,获取节点信息,启用日志\n */\n public static createDefault(): AccessibilityEventFilter {\n return new AccessibilityEventFilter({\n packageName: null,\n processInBackground: true,\n fetchNodeInfo: true,\n enableLogging: false,\n eventTypes: null,\n enableDeduplication: false,\n });\n }\n\n /**\n * 创建高性能配置\n * 不获取节点信息,不启用日志,启用去重\n */\n public static createHighPerformance(): AccessibilityEventFilter {\n return new AccessibilityEventFilter({\n packageName: null,\n processInBackground: true,\n fetchNodeInfo: false,\n enableLogging: false,\n eventTypes: null,\n enableDeduplication: true,\n });\n }\n\n /**\n * 创建调试配置\n * 启用所有功能,便于调试\n */\n public static createDebug(): AccessibilityEventFilter {\n return new AccessibilityEventFilter({\n packageName: null,\n processInBackground: true,\n fetchNodeInfo: true,\n enableLogging: true,\n eventTypes: null,\n enableDeduplication: false,\n });\n }\n\n /**\n * 创建指定包名的过滤配置\n * @param targetPackageName 目标包名\n */\n public static createForPackage(\n targetPackageName: string\n ): AccessibilityEventFilter {\n return new AccessibilityEventFilter({\n packageName: targetPackageName,\n processInBackground: true,\n fetchNodeInfo: true,\n enableLogging: false,\n eventTypes: null,\n enableDeduplication: false,\n });\n }\n}\n","/**\n * HTTP 请求相关功能\n * 提供 HTTP 请求相关的功能,包括 GET、POST、文件上传和下载\n */\nimport { CallResponse } from \"../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../utils\";\n\n/**\n * HTTP 响应数据接口定义\n */\nexport interface HttpResponse {\n statusCode: number;\n statusMessage: string;\n body: string;\n headers: Record<string, string>;\n}\n\n/**\n * HTTP 配置接口定义\n */\nexport interface HttpConfig {\n connectTimeout?: number;\n readTimeout?: number;\n writeTimeout?: number;\n}\n\n/**\n * HTTP 下载响应接口定义\n */\nexport interface HttpDownloadResponse {\n statusCode: number;\n statusMessage: string;\n savePath: string;\n fileSize: number;\n saveToGallerySuccess?: boolean;\n galleryUri?: string;\n galleryId?: number;\n galleryType?: string;\n headers: Record<string, string>;\n}\n\n/**\n * 文件上传信息接口定义\n */\nexport interface FileUploadInfo {\n filePath: string;\n fieldName?: string;\n fileName?: string;\n contentType?: string;\n}\n\n// 回调函数存储对象\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\n// 初始化全局回调函数\nif (typeof window !== \"undefined\" && !window.assistsxHttpCallback) {\n window.assistsxHttpCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"Http callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class Http {\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n private async asyncCall(\n method: string,\n args?: any,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(JSON.stringify(new CallResponse(0, null, uuid)));\n }, timeout * 1000);\n });\n const result = window.assistsxHttp.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n return new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n }\n throw new Error(\"Call failed\");\n }\n\n /**\n * 执行 GET 请求\n * @param url 请求 URL\n * @param headers 请求头\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<HTTP响应>\n */\n async httpGet(\n url: string,\n headers?: Record<string, string>,\n timeout?: number\n ): Promise<HttpResponse> {\n const response = await this.asyncCall(\n \"httpGet\",\n { url, headers },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"HTTP GET request failed\");\n }\n return response.data as HttpResponse;\n }\n\n /**\n * 执行 POST 请求\n * @param url 请求 URL\n * @param body 请求体\n * @param headers 请求头\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<HTTP响应>\n */\n async httpPost(\n url: string,\n body: string,\n headers?: Record<string, string>,\n timeout?: number\n ): Promise<HttpResponse> {\n const response = await this.asyncCall(\n \"httpPost\",\n { url, body, headers },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"HTTP POST request failed\");\n }\n return response.data as HttpResponse;\n }\n\n /**\n * 执行文件上传 POST 请求\n * 支持单个文件和多文件上传,同时支持多个表单字段\n * \n * @param url 请求 URL(必需)\n * @param files 文件数组(必需),每个文件对象包含:\n * - filePath: 文件路径(必需)\n * - fieldName: 字段名(可选,默认 \"file\")\n * - fileName: 文件名(可选,默认使用文件原名)\n * - contentType: 文件类型(可选,默认 \"application/octet-stream\")\n * @param formData 表单字段(可选),支持字符串值或字符串数组(同名字段多个值)\n * @param headers 请求头(可选)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<HTTP响应>\n * \n * @example\n * // 单文件上传\n * await http.httpPostFile(\"https://example.com/upload\", [\n * { filePath: \"/path/to/file.jpg\", fieldName: \"file\" }\n * ]);\n * \n * @example\n * // 多文件上传\n * await http.httpPostFile(\"https://example.com/upload\", [\n * { filePath: \"/path/to/file1.jpg\", fieldName: \"file1\" },\n * { filePath: \"/path/to/file2.jpg\", fieldName: \"file2\" }\n * ], { description: \"My files\" });\n */\n async httpPostFile(\n url: string,\n files: FileUploadInfo[],\n formData?: Record<string, string | string[]>,\n headers?: Record<string, string>,\n timeout?: number\n ): Promise<HttpResponse> {\n if (!files || files.length === 0) {\n throw new Error(\"files参数不能为空,至少需要上传一个文件\");\n }\n\n // 验证每个文件对象\n for (const file of files) {\n if (!file.filePath) {\n throw new Error(\"files数组中的filePath参数不能为空\");\n }\n }\n\n const response = await this.asyncCall(\n \"httpPostFile\",\n { url, files, formData, headers },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"HTTP POST file request failed\");\n }\n return response.data as HttpResponse;\n }\n\n /**\n * 下载文件\n * @param url 下载 URL\n * @param savePath 保存路径\n * @param headers 请求头\n * @param saveToGallery 是否保存到系统相册(仅支持图片和视频文件),默认 false\n * @param displayName 保存到相册时的显示名称(可选,默认使用文件名)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<下载响应>\n */\n async httpDownload(\n url: string,\n savePath: string,\n headers?: Record<string, string>,\n saveToGallery?: boolean,\n displayName?: string,\n timeout?: number\n ): Promise<HttpDownloadResponse> {\n const response = await this.asyncCall(\n \"httpDownload\",\n { url, savePath, headers, saveToGallery, displayName },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"HTTP download failed\");\n }\n return response.data as HttpDownloadResponse;\n }\n\n /**\n * 配置 OkHttpClient\n * @param config 配置选项\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<配置信息>\n */\n async httpConfigure(\n config: HttpConfig,\n timeout?: number\n ): Promise<HttpConfig> {\n const response = await this.asyncCall(\n \"httpConfigure\",\n config,\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"HTTP configure failed\");\n }\n return response.data as HttpConfig;\n }\n\n /**\n * 重置 OkHttpClient 配置\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<配置信息>\n */\n async httpReset(timeout?: number): Promise<HttpConfig> {\n const response = await this.asyncCall(\"httpReset\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"HTTP reset failed\");\n }\n return response.data as HttpConfig;\n }\n\n /**\n * 获取当前配置信息\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<配置信息>\n */\n async httpGetConfig(timeout?: number): Promise<HttpConfig> {\n const response = await this.asyncCall(\"httpGetConfig\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get HTTP config failed\");\n }\n return response.data as HttpConfig;\n }\n}\n\n// 导出常量实例\nexport const http = new Http();\n\n","/**\n * 路径相关功能\n * 提供文件系统路径相关的功能\n */\nimport { CallResponse } from \"../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../utils\";\n\n// 回调函数存储对象\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\n// 初始化全局回调函数\nif (typeof window !== \"undefined\" && !window.assistsxPathCallback) {\n window.assistsxPathCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"Path callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class Path {\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n private async asyncCall(\n method: string,\n args?: any,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(JSON.stringify(new CallResponse(0, null, uuid)));\n }, timeout * 1000);\n });\n const result = window.assistsxPath.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n return new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n }\n throw new Error(\"Call failed\");\n }\n /**\n * 获取根路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getRootPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getRootPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get root path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取数据路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getDataPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getDataPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get data path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取下载缓存路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getDownloadCachePath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getDownloadCachePath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get download cache path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取内部应用数据路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getInternalAppDataPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getInternalAppDataPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get internal app data path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取内部应用代码缓存目录\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getInternalAppCodeCacheDir(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getInternalAppCodeCacheDir\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get internal app code cache dir failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取内部应用缓存路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getInternalAppCachePath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getInternalAppCachePath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get internal app cache path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取内部应用数据库路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getInternalAppDbsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getInternalAppDbsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get internal app dbs path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取内部应用数据库文件路径\n * @param dbName 数据库名称\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getInternalAppDbPath(dbName: string, timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getInternalAppDbPath\", { dbName }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get internal app db path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取内部应用文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getInternalAppFilesPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getInternalAppFilesPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get internal app files path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取内部应用 SharedPreferences 路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getInternalAppSpPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getInternalAppSpPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get internal app sp path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取内部应用无备份文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getInternalAppNoBackupFilesPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getInternalAppNoBackupFilesPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get internal app no backup files path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部存储路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalStoragePath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalStoragePath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external storage path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部音乐路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalMusicPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalMusicPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external music path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部播客路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalPodcastsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalPodcastsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external podcasts path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部铃声路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalRingtonesPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalRingtonesPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external ringtones path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部闹钟路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAlarmsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAlarmsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external alarms path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部通知路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalNotificationsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalNotificationsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external notifications path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部图片路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalPicturesPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalPicturesPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external pictures path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部电影路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalMoviesPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalMoviesPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external movies path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部下载路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalDownloadsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalDownloadsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external downloads path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部 DCIM 路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalDcimPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalDcimPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external dcim path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部文档路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalDocumentsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalDocumentsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external documents path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用数据路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppDataPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppDataPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app data path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用缓存路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppCachePath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppCachePath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app cache path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppFilesPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppFilesPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app files path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用音乐路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppMusicPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppMusicPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app music path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用播客路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppPodcastsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppPodcastsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app podcasts path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用铃声路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppRingtonesPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppRingtonesPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app ringtones path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用闹钟路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppAlarmsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppAlarmsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app alarms path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用通知路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppNotificationsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppNotificationsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app notifications path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用图片路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppPicturesPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppPicturesPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app pictures path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用电影路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppMoviesPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppMoviesPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app movies path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用下载路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppDownloadPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppDownloadPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app download path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用 DCIM 路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppDcimPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppDcimPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app dcim path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用文档路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppDocumentsPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppDocumentsPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app documents path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取外部应用 OBB 路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getExternalAppObbPath(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getExternalAppObbPath\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get external app obb path failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取根路径(优先外部存储)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getRootPathExternalFirst(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getRootPathExternalFirst\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get root path external first failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取应用数据路径(优先外部存储)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getAppDataPathExternalFirst(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getAppDataPathExternalFirst\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get app data path external first failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取文件路径(优先外部存储)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getFilesPathExternalFirst(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getFilesPathExternalFirst\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get files path external first failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取缓存路径(优先外部存储)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<路径字符串>\n */\n async getCachePathExternalFirst(timeout?: number): Promise<string> {\n const response = await this.asyncCall(\"getCachePathExternalFirst\", undefined, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get cache path external first failed\");\n }\n return response.data as string;\n }\n}\n\n// 导出常量实例\nexport const pathUtils = new Path();\n\n","/**\n * 文件IO相关功能\n * 提供文件读写相关的功能\n */\nimport { CallResponse } from \"../../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../../utils\";\n\n// 回调函数存储对象\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\n// 初始化全局回调函数\nif (typeof window !== \"undefined\" && !window.assistsxFileIOCallback) {\n window.assistsxFileIOCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"FileIO callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class FileIO {\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n private async asyncCall(\n method: string,\n args?: any,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(JSON.stringify(new CallResponse(0, null, uuid)));\n }, timeout * 1000);\n });\n const result = window.assistsxFileIO.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n return new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n }\n throw new Error(\"Call failed\");\n }\n /**\n * 从输入流写入文件\n * @param filePath 文件路径\n * @param inputStreamBase64 Base64 编码的输入流数据\n * @param append 是否追加,默认为 false\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async writeFileFromIS(\n filePath: string,\n inputStreamBase64: string,\n append: boolean = false,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\n \"writeFileFromIS\",\n { filePath, inputStreamBase64, append },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Write file from input stream failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 从字节数组写入文件(使用流)\n * @param filePath 文件路径\n * @param bytesBase64 Base64 编码的字节数组\n * @param append 是否追加,默认为 false\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async writeFileFromBytesByStream(\n filePath: string,\n bytesBase64: string,\n append: boolean = false,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\n \"writeFileFromBytesByStream\",\n { filePath, bytesBase64, append },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Write file from bytes by stream failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 从字节数组写入文件(使用通道)\n * @param filePath 文件路径\n * @param bytesBase64 Base64 编码的字节数组\n * @param append 是否追加,默认为 false\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async writeFileFromBytesByChannel(\n filePath: string,\n bytesBase64: string,\n append: boolean = false,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\n \"writeFileFromBytesByChannel\",\n { filePath, bytesBase64, append },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Write file from bytes by channel failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 从字节数组写入文件(使用内存映射)\n * @param filePath 文件路径\n * @param bytesBase64 Base64 编码的字节数组\n * @param append 是否追加,默认为 false\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async writeFileFromBytesByMap(\n filePath: string,\n bytesBase64: string,\n append: boolean = false,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\n \"writeFileFromBytesByMap\",\n { filePath, bytesBase64, append },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Write file from bytes by map failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 从字符串写入文件\n * @param filePath 文件路径\n * @param content 文件内容\n * @param append 是否追加,默认为 false\n * @param threadSafe 是否线程安全写入,默认为 false\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async writeFileFromString(\n filePath: string,\n content: string,\n append: boolean = false,\n threadSafe: boolean = false,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\n \"writeFileFromString\",\n { filePath, content, append, threadSafe },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Write file from string failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 读取文件为字符串列表\n * @param filePath 文件路径\n * @param charsetName 字符集名称,默认为 \"UTF-8\"\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<字符串数组>\n */\n async readFile2List(\n filePath: string,\n charsetName: string = \"UTF-8\",\n timeout?: number\n ): Promise<string[]> {\n const response = await this.asyncCall(\n \"readFile2List\",\n { filePath, charsetName },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Read file to list failed\");\n }\n return response.data as string[];\n }\n\n /**\n * 读取文件为字符串\n * @param filePath 文件路径\n * @param charsetName 字符集名称,默认为 \"UTF-8\"\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<文件内容字符串>\n */\n async readFile2String(\n filePath: string,\n charsetName: string = \"UTF-8\",\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\n \"readFile2String\",\n { filePath, charsetName },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Read file to string failed\");\n }\n return response.data as string;\n }\n\n /**\n * 读取文件为字节数组(使用流)\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<Base64 编码的字节数组>\n */\n async readFile2BytesByStream(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\n \"readFile2BytesByStream\",\n { filePath },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Read file to bytes by stream failed\");\n }\n return response.data as string;\n }\n\n /**\n * 读取文件为字节数组(使用通道)\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<Base64 编码的字节数组>\n */\n async readFile2BytesByChannel(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\n \"readFile2BytesByChannel\",\n { filePath },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Read file to bytes by channel failed\");\n }\n return response.data as string;\n }\n\n /**\n * 读取文件为字节数组(使用内存映射)\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<Base64 编码的字节数组>\n */\n async readFile2BytesByMap(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\n \"readFile2BytesByMap\",\n { filePath },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Read file to bytes by map failed\");\n }\n return response.data as string;\n }\n\n /**\n * 设置缓冲区大小\n * @param bufferSize 缓冲区大小(字节)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async setBufferSize(\n bufferSize: number,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\n \"setBufferSize\",\n { bufferSize },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Set buffer size failed\");\n }\n return response.data as boolean;\n }\n}\n\n// 导出常量实例\nexport const fileIO = new FileIO();\n\n","/**\n * 文件工具相关功能\n * 提供文件操作相关的功能\n */\nimport { CallResponse } from \"../../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../../utils\";\n\n/**\n * 文件信息接口定义\n */\nexport interface FileInfo {\n path: string;\n exists: boolean;\n}\n\n/**\n * 文件列表项接口定义\n */\nexport interface FileListItem {\n path: string;\n name: string;\n isDirectory: boolean;\n length: number;\n}\n\n// 回调函数存储对象\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\n// 初始化全局回调函数\nif (typeof window !== \"undefined\" && !window.assistsxFileUtilsCallback) {\n window.assistsxFileUtilsCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"FileUtils callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class FileUtils {\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n private async asyncCall(\n method: string,\n args?: any,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(JSON.stringify(new CallResponse(0, null, uuid)));\n }, timeout * 1000);\n });\n const result = window.assistsxFileUtils.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n return new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n }\n throw new Error(\"Call failed\");\n }\n /**\n * 根据路径获取文件\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<文件信息>\n */\n async getFileByPath(\n filePath: string,\n timeout?: number\n ): Promise<FileInfo> {\n const response = await this.asyncCall(\"getFileByPath\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file by path failed\");\n }\n return response.data as FileInfo;\n }\n\n /**\n * 检查文件是否存在\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否存在>\n */\n async isFileExists(\n filePath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"isFileExists\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Check file exists failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 重命名文件\n * @param filePath 文件路径\n * @param newName 新名称\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async rename(\n filePath: string,\n newName: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"rename\", { filePath, newName }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Rename file failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 检查是否为目录\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否为目录>\n */\n async isDir(\n filePath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"isDir\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Check is directory failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 检查是否为文件\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否为文件>\n */\n async isFile(\n filePath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"isFile\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Check is file failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 创建或存在目录\n * @param dirPath 目录路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async createOrExistsDir(\n dirPath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"createOrExistsDir\", { dirPath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Create or exists dir failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 创建或存在文件\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async createOrExistsFile(\n filePath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"createOrExistsFile\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Create or exists file failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 创建文件(如果存在则删除旧文件)\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async createFileByDeleteOldFile(\n filePath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"createFileByDeleteOldFile\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Create file by delete old file failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 复制文件\n * @param srcFilePath 源文件路径\n * @param destFilePath 目标文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async copy(\n srcFilePath: string,\n destFilePath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"copy\", { srcFilePath, destFilePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Copy file failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 移动文件\n * @param srcFilePath 源文件路径\n * @param destFilePath 目标文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async move(\n srcFilePath: string,\n destFilePath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"move\", { srcFilePath, destFilePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Move file failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 删除文件或目录\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async delete(\n filePath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"delete\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Delete file failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 删除目录中的所有内容\n * @param dirPath 目录路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async deleteAllInDir(\n dirPath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"deleteAllInDir\", { dirPath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Delete all in dir failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 删除目录中的所有文件\n * @param dirPath 目录路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async deleteFilesInDir(\n dirPath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"deleteFilesInDir\", { dirPath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Delete files in dir failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 删除目录中匹配过滤器的文件\n * @param dirPath 目录路径\n * @param filterPattern 过滤模式(正则表达式)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async deleteFilesInDirWithFilter(\n dirPath: string,\n filterPattern?: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\n \"deleteFilesInDirWithFilter\",\n { dirPath, filterPattern },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Delete files in dir with filter failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 列出目录中的文件\n * @param dirPath 目录路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<文件列表>\n */\n async listFilesInDir(\n dirPath: string,\n timeout?: number\n ): Promise<FileListItem[]> {\n const response = await this.asyncCall(\"listFilesInDir\", { dirPath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"List files in dir failed\");\n }\n return response.data as FileListItem[];\n }\n\n /**\n * 列出目录中匹配过滤器的文件\n * @param dirPath 目录路径\n * @param filterPattern 过滤模式(正则表达式)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<文件列表>\n */\n async listFilesInDirWithFilter(\n dirPath: string,\n filterPattern?: string,\n timeout?: number\n ): Promise<FileListItem[]> {\n const response = await this.asyncCall(\n \"listFilesInDirWithFilter\",\n { dirPath, filterPattern },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"List files in dir with filter failed\");\n }\n return response.data as FileListItem[];\n }\n\n /**\n * 获取文件最后修改时间\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<时间戳(毫秒)>\n */\n async getFileLastModified(\n filePath: string,\n timeout?: number\n ): Promise<number> {\n const response = await this.asyncCall(\"getFileLastModified\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file last modified failed\");\n }\n return response.data as number;\n }\n\n /**\n * 获取文件字符集(简单检测)\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<字符集名称>\n */\n async getFileCharsetSimple(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\"getFileCharsetSimple\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file charset simple failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取文件行数\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<行数>\n */\n async getFileLines(\n filePath: string,\n timeout?: number\n ): Promise<number> {\n const response = await this.asyncCall(\"getFileLines\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file lines failed\");\n }\n return response.data as number;\n }\n\n /**\n * 获取文件或目录大小\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<大小(字节)>\n */\n async getSize(\n filePath: string,\n timeout?: number\n ): Promise<number> {\n const response = await this.asyncCall(\"getSize\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get size failed\");\n }\n return response.data as number;\n }\n\n /**\n * 获取文件长度\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<长度(字节)>\n */\n async getLength(\n filePath: string,\n timeout?: number\n ): Promise<number> {\n const response = await this.asyncCall(\"getLength\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get length failed\");\n }\n return response.data as number;\n }\n\n /**\n * 获取文件 MD5(Base64 编码)\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<Base64 编码的 MD5>\n */\n async getFileMD5(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\"getFileMD5\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file MD5 failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取文件 MD5(字符串)\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<MD5 字符串>\n */\n async getFileMD5ToString(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\"getFileMD5ToString\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file MD5 to string failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取目录名\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<目录名>\n */\n async getDirName(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\"getDirName\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get dir name failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取文件名\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<文件名>\n */\n async getFileName(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\"getFileName\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file name failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取文件名(不含扩展名)\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<文件名(不含扩展名)>\n */\n async getFileNameNoExtension(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\"getFileNameNoExtension\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file name no extension failed\");\n }\n return response.data as string;\n }\n\n /**\n * 获取文件扩展名\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<扩展名>\n */\n async getFileExtension(\n filePath: string,\n timeout?: number\n ): Promise<string> {\n const response = await this.asyncCall(\"getFileExtension\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file extension failed\");\n }\n return response.data as string;\n }\n\n /**\n * 通知系统扫描文件\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否成功>\n */\n async notifySystemToScan(\n filePath: string,\n timeout?: number\n ): Promise<boolean> {\n const response = await this.asyncCall(\"notifySystemToScan\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Notify system to scan failed\");\n }\n return response.data as boolean;\n }\n\n /**\n * 获取文件系统总大小\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<总大小(字节)>\n */\n async getFsTotalSize(\n filePath: string,\n timeout?: number\n ): Promise<number> {\n const response = await this.asyncCall(\"getFsTotalSize\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file system total size failed\");\n }\n return response.data as number;\n }\n\n /**\n * 获取文件系统可用大小\n * @param filePath 文件路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<可用大小(字节)>\n */\n async getFsAvailableSize(\n filePath: string,\n timeout?: number\n ): Promise<number> {\n const response = await this.asyncCall(\"getFsAvailableSize\", { filePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Get file system available size failed\");\n }\n return response.data as number;\n }\n}\n\n// 导出常量实例\nexport const fileUtils = new FileUtils();\n\n","/**\n * 输入法相关功能\n * 提供输入法操作相关的功能,如执行编辑器动作(搜索等)\n */\nimport { CallResponse } from \"../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../utils\";\n\n/**\n * IME 动作 ID 常量\n */\nexport enum ImeAction {\n /** 无动作 */\n NONE = 0,\n /** 前往 */\n GO = 2,\n /** 搜索 */\n SEARCH = 3,\n /** 发送 */\n SEND = 4,\n /** 下一步 */\n NEXT = 5,\n /** 完成 */\n DONE = 6,\n /** 上一个 */\n PREVIOUS = 7,\n}\n\n/**\n * 执行编辑器动作响应接口定义\n */\nexport interface PerformEditorActionResponse {\n success: boolean;\n actionId: number;\n}\n\n/**\n * 打开输入法设置响应接口定义\n */\nexport interface OpenInputMethodSettingsResponse {\n success: boolean;\n}\n\n/**\n * 检查输入法是否启用响应接口定义\n */\nexport interface IsInputMethodEnabledResponse {\n enabled: boolean;\n}\n\n/**\n * 检查当前选中的输入法是否是当前输入法响应接口定义\n */\nexport interface IsCurrentInputMethodResponse {\n isCurrent: boolean;\n}\n\n// 回调函数存储对象\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\n// 初始化全局回调函数\nif (typeof window !== \"undefined\" && !window.assistsxImeCallback) {\n window.assistsxImeCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"Ime callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class Ime {\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n private async asyncCall(\n method: string,\n args?: any,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(JSON.stringify(new CallResponse(0, null, uuid)));\n }, timeout * 1000);\n });\n const result = window.assistsxIme.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n return new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n }\n throw new Error(\"Call failed\");\n }\n\n /**\n * 执行编辑器动作(如搜索)\n * @param actionId 动作 ID,默认为 ImeAction.SEARCH\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<执行结果>\n */\n async performEditorAction(\n actionId: number = ImeAction.SEARCH,\n timeout?: number\n ): Promise<PerformEditorActionResponse> {\n const response = await this.asyncCall(\n \"performEditorAction\",\n { actionId },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Perform editor action failed\");\n }\n return response.data as PerformEditorActionResponse;\n }\n\n /**\n * 跳转到输入法管理页面\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<执行结果>\n */\n async openInputMethodSettings(\n timeout?: number\n ): Promise<OpenInputMethodSettingsResponse> {\n const response = await this.asyncCall(\n \"openInputMethodSettings\",\n undefined,\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Open input method settings failed\");\n }\n return response.data as OpenInputMethodSettingsResponse;\n }\n\n /**\n * 检查输入法是否启用\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<检查结果>\n */\n async isInputMethodEnabled(\n timeout?: number\n ): Promise<IsInputMethodEnabledResponse> {\n const response = await this.asyncCall(\n \"isInputMethodEnabled\",\n undefined,\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Check input method enabled failed\");\n }\n return response.data as IsInputMethodEnabledResponse;\n }\n\n /**\n * 检查当前选中的输入法是否是当前输入法\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<检查结果>\n */\n async isCurrentInputMethod(\n timeout?: number\n ): Promise<IsCurrentInputMethodResponse> {\n const response = await this.asyncCall(\n \"isCurrentInputMethod\",\n undefined,\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Check current input method failed\");\n }\n return response.data as IsCurrentInputMethodResponse;\n }\n}\n\n// 导出常量实例\nexport const ime = new Ime();\n\n","/**\n * 图片工具相关功能\n * 提供图片处理相关的功能,包括转换、处理、压缩、保存等\n */\nimport { CallResponse } from \"../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../utils\";\n\n/**\n * 图片尺寸信息\n */\nexport interface ImageSize {\n filePath: string;\n width: number;\n height: number;\n}\n\n/**\n * 图片类型信息\n */\nexport interface ImageType {\n filePath: string;\n imageType: string;\n}\n\n/**\n * 图片旋转角度信息\n */\nexport interface ImageRotateDegree {\n filePath: string;\n degree: number;\n}\n\n/**\n * 图片处理结果\n */\nexport interface ImageProcessResult {\n filePath: string;\n}\n\n/**\n * 图片保存结果\n */\nexport interface ImageSaveResult {\n success: boolean;\n filePath: string;\n}\n\n// 回调函数存储对象\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\n// 初始化全局回调函数\nif (typeof window !== \"undefined\" && !window.assistsxImageUtilsCallback) {\n window.assistsxImageUtilsCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"ImageUtils callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class ImageUtils {\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n private async asyncCall(\n method: string,\n args?: any,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(JSON.stringify(new CallResponse(0, null, uuid)));\n }, timeout * 1000);\n });\n const result = window.assistsxImageUtils.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n return new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n }\n throw new Error(\"Call failed\");\n }\n\n // ==================== 获取相关 ====================\n\n /**\n * 获取图片尺寸\n * @param imagePath 图片路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<图片尺寸信息>\n */\n async getSize(imagePath: string, timeout?: number): Promise<ImageSize> {\n const response = await this.asyncCall(\"getSize\", { imagePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"获取图片尺寸失败\");\n }\n return response.data as ImageSize;\n }\n\n /**\n * 获取图片类型\n * @param imagePath 图片路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<图片类型信息>\n */\n async getImageType(imagePath: string, timeout?: number): Promise<ImageType> {\n const response = await this.asyncCall(\"getImageType\", { imagePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"获取图片类型失败\");\n }\n return response.data as ImageType;\n }\n\n /**\n * 判断是否为图片\n * @param fileName 文件名\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<是否为图片>\n */\n async isImage(fileName: string, timeout?: number): Promise<boolean> {\n const response = await this.asyncCall(\"isImage\", { fileName }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"判断是否为图片失败\");\n }\n return (response.data as { isImage: boolean }).isImage;\n }\n\n /**\n * 获取图片旋转角度\n * @param imagePath 图片路径\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<图片旋转角度信息>\n */\n async getRotateDegree(imagePath: string, timeout?: number): Promise<ImageRotateDegree> {\n const response = await this.asyncCall(\"getRotateDegree\", { imagePath }, timeout);\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"获取图片旋转角度失败\");\n }\n return response.data as ImageRotateDegree;\n }\n\n // ==================== 图片处理相关 ====================\n\n /**\n * 缩放图片\n * @param imagePath 图片路径\n * @param options 缩放选项\n * @param options.scaleWidth 缩放宽度(可选)\n * @param options.scaleHeight 缩放高度(可选)\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async scale(\n imagePath: string,\n options: {\n scaleWidth?: number;\n scaleHeight?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { scaleWidth, scaleHeight, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"scale\",\n { imagePath, scaleWidth, scaleHeight, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"缩放图片失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 裁剪图片\n * @param imagePath 图片路径\n * @param options 裁剪选项\n * @param options.x 起始X坐标,默认0\n * @param options.y 起始Y坐标,默认0\n * @param options.width 裁剪宽度(可选,不提供则裁剪到图片右边界)\n * @param options.height 裁剪高度(可选,不提供则裁剪到图片下边界)\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async clip(\n imagePath: string,\n options: {\n x?: number;\n y?: number;\n width?: number;\n height?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { x = 0, y = 0, width, height, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"clip\",\n { imagePath, x, y, width, height, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"裁剪图片失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 倾斜图片\n * @param imagePath 图片路径\n * @param options 倾斜选项\n * @param options.kx X轴倾斜系数,默认0\n * @param options.ky Y轴倾斜系数,默认0\n * @param options.px X轴倾斜点(可选)\n * @param options.py Y轴倾斜点(可选)\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async skew(\n imagePath: string,\n options: {\n kx?: number;\n ky?: number;\n px?: number;\n py?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { kx = 0, ky = 0, px, py, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"skew\",\n { imagePath, kx, ky, px, py, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"倾斜图片失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 旋转图片\n * @param imagePath 图片路径\n * @param options 旋转选项\n * @param options.degree 旋转角度,默认0\n * @param options.px 旋转中心X坐标(可选)\n * @param options.py 旋转中心Y坐标(可选)\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async rotate(\n imagePath: string,\n options: {\n degree?: number;\n px?: number;\n py?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { degree = 0, px, py, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"rotate\",\n { imagePath, degree, px, py, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"旋转图片失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 转为圆形图片\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async toRound(\n imagePath: string,\n options: {\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"toRound\",\n { imagePath, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"转为圆形图片失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 转为圆角图片\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.radius 圆角半径,默认0\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async toRoundCorner(\n imagePath: string,\n options: {\n radius?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { radius = 0, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"toRoundCorner\",\n { imagePath, radius, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"转为圆角图片失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 添加圆角边框\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.borderSize 边框大小,默认0\n * @param options.color 边框颜色,默认\"#000000\"\n * @param options.cornerRadius 圆角半径,默认0\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async addCornerBorder(\n imagePath: string,\n options: {\n borderSize?: number;\n color?: string;\n cornerRadius?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { borderSize = 0, color = \"#000000\", cornerRadius = 0, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"addCornerBorder\",\n { imagePath, borderSize, color, cornerRadius, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"添加圆角边框失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 添加圆形边框\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.borderSize 边框大小,默认0\n * @param options.color 边框颜色,默认\"#000000\"\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async addCircleBorder(\n imagePath: string,\n options: {\n borderSize?: number;\n color?: string;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { borderSize = 0, color = \"#000000\", savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"addCircleBorder\",\n { imagePath, borderSize, color, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"添加圆形边框失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 添加倒影\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.reflectionHeight 倒影高度,默认0\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async addReflection(\n imagePath: string,\n options: {\n reflectionHeight?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { reflectionHeight = 0, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"addReflection\",\n { imagePath, reflectionHeight, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"添加倒影失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 添加文字水印\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.text 水印文字,默认\"\"\n * @param options.x 文字X坐标,默认0\n * @param options.y 文字Y坐标,默认0\n * @param options.color 文字颜色,默认\"#000000\"\n * @param options.size 文字大小,默认16\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async addTextWatermark(\n imagePath: string,\n options: {\n text?: string;\n x?: number;\n y?: number;\n color?: string;\n size?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { text = \"\", x = 0, y = 0, color = \"#000000\", size = 16, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"addTextWatermark\",\n { imagePath, text, x, y, color, size, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"添加文字水印失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 添加图片水印\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.watermarkPath 水印图片路径(必需)\n * @param options.x 水印X坐标,默认0\n * @param options.y 水印Y坐标,默认0\n * @param options.alpha 透明度,默认255\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async addImageWatermark(\n imagePath: string,\n options: {\n watermarkPath: string;\n x?: number;\n y?: number;\n alpha?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n }\n ): Promise<string> {\n const { watermarkPath, x = 0, y = 0, alpha = 255, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"addImageWatermark\",\n { imagePath, watermarkPath, x, y, alpha, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"添加图片水印失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 转为 alpha 位图\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async toAlpha(\n imagePath: string,\n options: {\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"toAlpha\",\n { imagePath, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"转为 alpha 位图失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 转为灰度图片\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async toGray(\n imagePath: string,\n options: {\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"toGray\",\n { imagePath, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"转为灰度图片失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 快速模糊\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.radius 模糊半径,默认0\n * @param options.scale 缩放比例,默认1\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async fastBlur(\n imagePath: string,\n options: {\n radius?: number;\n scale?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { radius = 0, scale = 1, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"fastBlur\",\n { imagePath, radius, scale, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"快速模糊失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * RenderScript 模糊\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.radius 模糊半径,默认0\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async renderScriptBlur(\n imagePath: string,\n options: {\n radius?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { radius = 0, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"renderScriptBlur\",\n { imagePath, radius, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"RenderScript 模糊失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * Stack 模糊\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.radius 模糊半径,默认0\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<处理后的图片路径>\n */\n async stackBlur(\n imagePath: string,\n options: {\n radius?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { radius = 0, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"stackBlur\",\n { imagePath, radius, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Stack 模糊失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n // ==================== 压缩相关 ====================\n\n /**\n * 按缩放压缩\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.scaleWidth 缩放宽度(可选)\n * @param options.scaleHeight 缩放高度(可选)\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<压缩后的图片路径>\n */\n async compressByScale(\n imagePath: string,\n options: {\n scaleWidth?: number;\n scaleHeight?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { scaleWidth, scaleHeight, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"compressByScale\",\n { imagePath, scaleWidth, scaleHeight, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"按缩放压缩失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 按质量压缩\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.quality 压缩质量,0-100,默认100\n * @param options.format 图片格式,支持 \"JPEG\"、\"PNG\"、\"WEBP\",默认\"JPEG\"\n * @param options.savePath 保存路径(可选)\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<压缩后的图片路径>\n */\n async compressByQuality(\n imagePath: string,\n options: {\n quality?: number;\n format?: \"JPEG\" | \"PNG\" | \"WEBP\";\n savePath?: string;\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { quality = 100, format = \"JPEG\", savePath, timeout } = options;\n const response = await this.asyncCall(\n \"compressByQuality\",\n { imagePath, quality, format, savePath },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"按质量压缩失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n /**\n * 按采样大小压缩\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.sampleSize 采样大小,默认1\n * @param options.savePath 保存路径(可选)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<压缩后的图片路径>\n */\n async compressBySampleSize(\n imagePath: string,\n options: {\n sampleSize?: number;\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<string> {\n const { sampleSize = 1, savePath, format, timeout } = options;\n const response = await this.asyncCall(\n \"compressBySampleSize\",\n { imagePath, sampleSize, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"按采样大小压缩失败\");\n }\n return (response.data as ImageProcessResult).filePath;\n }\n\n // ==================== 保存相关 ====================\n\n /**\n * 保存图片\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.savePath 保存路径(可选,不提供则自动生成)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<保存结果>\n */\n async save(\n imagePath: string,\n options: {\n savePath?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<ImageSaveResult> {\n const { savePath, format = \"PNG\", timeout } = options;\n const response = await this.asyncCall(\n \"save\",\n { imagePath, savePath, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"保存图片失败\");\n }\n return response.data as ImageSaveResult;\n }\n\n /**\n * 保存图片到相册\n * @param imagePath 图片路径\n * @param options 选项\n * @param options.fileName 文件名(可选,不提供则自动生成)\n * @param options.format 图片格式,支持 \"PNG\"、\"JPEG\"、\"JPG\"、\"WEBP\",默认\"PNG\"\n * @param options.timeout 超时时间(秒),默认30秒\n * @returns Promise<保存结果>\n */\n async save2Album(\n imagePath: string,\n options: {\n fileName?: string;\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\";\n timeout?: number;\n } = {}\n ): Promise<ImageSaveResult> {\n const { fileName, format = \"PNG\", timeout } = options;\n const response = await this.asyncCall(\n \"save2Album\",\n { imagePath, fileName, format },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"保存图片到相册失败\");\n }\n return response.data as ImageSaveResult;\n }\n}\n\n// 导出常量实例\nexport const imageUtils = new ImageUtils();\n","/**\n * 系统相册相关功能\n * 提供添加图片/视频到相册和从相册删除的功能\n */\nimport { CallResponse } from \"../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../utils\";\n\n/**\n * 相册操作响应接口定义\n */\nexport interface GalleryResponse {\n success: boolean;\n uri?: string;\n id?: number;\n type?: string;\n message?: string;\n}\n\n/**\n * 删除相册项响应接口定义\n */\nexport interface GalleryDeleteResponse {\n success: boolean;\n deletedRows: number;\n message?: string;\n}\n\n// 回调函数存储对象\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\n// 初始化全局回调函数\nif (typeof window !== \"undefined\" && !window.assistsxGalleryCallback) {\n window.assistsxGalleryCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"Gallery callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class Gallery {\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n private async asyncCall(\n method: string,\n args?: any,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(JSON.stringify(new CallResponse(0, null, uuid)));\n }, timeout * 1000);\n });\n const result = window.assistsxGallery.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n return new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n }\n throw new Error(\"Call failed\");\n }\n\n /**\n * 添加图片到系统相册\n * @param filePath 图片文件路径(必需)\n * @param displayName 显示名称(可选,默认使用文件名)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<相册操作响应>\n */\n async addImageToGallery(\n filePath: string,\n displayName?: string,\n timeout?: number\n ): Promise<GalleryResponse> {\n if (!filePath) {\n throw new Error(\"filePath参数不能为空\");\n }\n\n const response = await this.asyncCall(\n \"addImageToGallery\",\n { filePath, displayName },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"添加图片到相册失败\");\n }\n return response.data as GalleryResponse;\n }\n\n /**\n * 添加视频到系统相册\n * @param filePath 视频文件路径(必需)\n * @param displayName 显示名称(可选,默认使用文件名)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<相册操作响应>\n */\n async addVideoToGallery(\n filePath: string,\n displayName?: string,\n timeout?: number\n ): Promise<GalleryResponse> {\n if (!filePath) {\n throw new Error(\"filePath参数不能为空\");\n }\n\n const response = await this.asyncCall(\n \"addVideoToGallery\",\n { filePath, displayName },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"添加视频到相册失败\");\n }\n return response.data as GalleryResponse;\n }\n\n /**\n * 从系统相册删除\n * @param uri 媒体文件的URI(必需,格式如:content://media/external/images/media/123)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<删除响应>\n */\n async deleteFromGalleryByUri(\n uri: string,\n timeout?: number\n ): Promise<GalleryDeleteResponse> {\n if (!uri) {\n throw new Error(\"uri参数不能为空\");\n }\n\n const response = await this.asyncCall(\n \"deleteFromGallery\",\n { uri },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"从相册删除失败\");\n }\n return response.data as GalleryDeleteResponse;\n }\n\n /**\n * 从系统相册删除(通过ID和类型)\n * @param id 媒体文件的ID(必需)\n * @param type 媒体类型,\"image\" 或 \"video\"(必需)\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<删除响应>\n */\n async deleteFromGalleryById(\n id: number,\n type: \"image\" | \"video\",\n timeout?: number\n ): Promise<GalleryDeleteResponse> {\n if (id === undefined || id === null) {\n throw new Error(\"id参数不能为空\");\n }\n if (!type || (type !== \"image\" && type !== \"video\")) {\n throw new Error(\"type参数必须为 'image' 或 'video'\");\n }\n\n const response = await this.asyncCall(\n \"deleteFromGallery\",\n { id, type },\n timeout\n );\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"从相册删除失败\");\n }\n return response.data as GalleryDeleteResponse;\n }\n}\n\n// 导出常量实例\nexport const gallery = new Gallery();\n","/**\n * ML Kit 文字识别相关的方法常量定义\n * 支持识别屏幕中指定词组位置以及识别屏幕文字内容位置\n */\nexport const MlkitCallMethod = {\n /**\n * 识别屏幕中指定词组的位置(基于当前截图)\n * 参数:targetText 必填;region 可选 { left, top, right, bottom };rotationDegrees 可选,默认 0\n */\n findPhrasePositions: \"findPhrasePositions\",\n\n /**\n * 识别屏幕中所有文字内容及其位置(基于当前截图)\n * 参数:region 可选 { left, top, right, bottom };rotationDegrees 可选,默认 0\n */\n getScreenTextPositions: \"getScreenTextPositions\",\n\n /**\n * 识别屏幕中指定词组的位置,直接返回 JSON 字符串(基于当前截图)\n * 参数:targetText 必填;region 可选 { left, top, right, bottom };rotationDegrees 可选,默认 0\n */\n findPhrasePositionsOnScreenAsJson: \"findPhrasePositionsOnScreenAsJson\",\n\n /**\n * 识别屏幕中所有文字及其位置,直接返回 JSON 字符串(基于当前截图)\n * 参数:region 可选 { left, top, right, bottom };rotationDegrees 可选,默认 0\n */\n getScreenTextPositionsAsJson: \"getScreenTextPositionsAsJson\",\n} as const;\n\nexport type MlkitCallMethodType = (typeof MlkitCallMethod)[keyof typeof MlkitCallMethod];\n","/**\n * ML Kit 文字识别相关功能\n * 提供识别屏幕中指定词组位置、识别屏幕文字内容位置的能力\n */\nimport { CallResponse } from \"../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../utils\";\nimport { MlkitCallMethod } from \"./mlkit-call-method\";\n\n/**\n * 识别区域接口,用于限定识别范围\n */\nexport interface MlkitRegion {\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\n/**\n * 文字位置信息\n */\nexport interface TextPosition {\n text: string;\n left: number;\n top: number;\n right: number;\n bottom: number;\n}\n\n/**\n * findPhrasePositions / getScreenTextPositions 返回结果\n */\nexport interface ScreenTextRecognitionResult {\n fullText: string;\n positions: TextPosition[];\n processingTimeMillis: number;\n}\n\n/**\n * findPhrasePositionsOnScreenAsJson / getScreenTextPositionsAsJson 返回结果\n */\nexport interface ScreenTextJsonResult {\n jsonResult: string;\n}\n\n// 回调函数存储对象\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\n// 初始化全局回调函数\nif (typeof window !== \"undefined\" && !window.assistsxMlkitCallback) {\n window.assistsxMlkitCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"Mlkit callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class Mlkit {\n /**\n * 执行异步调用\n * @param method 方法名\n * @param args 参数对象\n * @param timeout 超时时间(秒),默认30秒\n * @returns Promise<调用响应>\n */\n private async asyncCall(\n method: string,\n args?: any,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ? args : undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(JSON.stringify(new CallResponse(0, null, uuid)));\n }, timeout * 1000);\n });\n const result = window.assistsxMlkit.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n return new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n }\n throw new Error(\"Call failed\");\n }\n\n /**\n * 识别屏幕中指定词组的位置(基于当前截图)\n * @param targetText 要搜索的目标词组(必填)\n * @param options 可选参数:region 识别区域;rotationDegrees 旋转角度,默认 0;timeout 超时时间\n * @returns Promise<识别结果>\n */\n async findPhrasePositions(\n targetText: string,\n options: {\n region?: MlkitRegion;\n rotationDegrees?: number;\n timeout?: number;\n } = {}\n ): Promise<ScreenTextRecognitionResult> {\n if (!targetText || targetText.trim() === \"\") {\n throw new Error(\"targetText cannot be empty\");\n }\n\n const {\n region,\n rotationDegrees = 0,\n timeout,\n } = options;\n\n const response = await this.asyncCall(\n MlkitCallMethod.findPhrasePositions,\n {\n targetText: targetText.trim(),\n ...(region && {\n left: region.left,\n top: region.top,\n right: region.right,\n bottom: region.bottom,\n }),\n rotationDegrees,\n },\n timeout\n );\n\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Recognition failed\");\n }\n return response.data as ScreenTextRecognitionResult;\n }\n\n /**\n * 识别屏幕中所有文字内容及其位置(基于当前截图)\n * @param options 可选参数:region 识别区域;rotationDegrees 旋转角度,默认 0;timeout 超时时间\n * @returns Promise<识别结果>\n */\n async getScreenTextPositions(\n options: {\n region?: MlkitRegion;\n rotationDegrees?: number;\n timeout?: number;\n } = {}\n ): Promise<ScreenTextRecognitionResult> {\n const {\n region,\n rotationDegrees = 0,\n timeout,\n } = options;\n\n const response = await this.asyncCall(\n MlkitCallMethod.getScreenTextPositions,\n {\n ...(region && {\n left: region.left,\n top: region.top,\n right: region.right,\n bottom: region.bottom,\n }),\n rotationDegrees,\n },\n timeout\n );\n\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Recognition failed\");\n }\n return response.data as ScreenTextRecognitionResult;\n }\n\n /**\n * 识别屏幕中指定词组的位置,直接返回 JSON 字符串(基于当前截图)\n * @param targetText 要搜索的目标词组(必填)\n * @param options 可选参数:region 识别区域;rotationDegrees 旋转角度,默认 0;timeout 超时时间\n * @returns Promise<JSON 字符串结果>\n */\n async findPhrasePositionsOnScreenAsJson(\n targetText: string,\n options: {\n region?: MlkitRegion;\n rotationDegrees?: number;\n timeout?: number;\n } = {}\n ): Promise<string> {\n if (!targetText || targetText.trim() === \"\") {\n throw new Error(\"targetText cannot be empty\");\n }\n\n const {\n region,\n rotationDegrees = 0,\n timeout,\n } = options;\n\n const response = await this.asyncCall(\n MlkitCallMethod.findPhrasePositionsOnScreenAsJson,\n {\n targetText: targetText.trim(),\n ...(region && {\n left: region.left,\n top: region.top,\n right: region.right,\n bottom: region.bottom,\n }),\n rotationDegrees,\n },\n timeout\n );\n\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Recognition failed\");\n }\n const data = response.data as ScreenTextJsonResult;\n return data.jsonResult;\n }\n\n /**\n * 识别屏幕中所有文字及其位置,直接返回 JSON 字符串(基于当前截图)\n * @param options 可选参数:region 识别区域;rotationDegrees 旋转角度,默认 0;timeout 超时时间\n * @returns Promise<JSON 字符串结果>\n */\n async getScreenTextPositionsAsJson(\n options: {\n region?: MlkitRegion;\n rotationDegrees?: number;\n timeout?: number;\n } = {}\n ): Promise<string> {\n const {\n region,\n rotationDegrees = 0,\n timeout,\n } = options;\n\n const response = await this.asyncCall(\n MlkitCallMethod.getScreenTextPositionsAsJson,\n {\n ...(region && {\n left: region.left,\n top: region.top,\n right: region.right,\n bottom: region.bottom,\n }),\n rotationDegrees,\n },\n timeout\n );\n\n if (!response.isSuccess()) {\n throw new Error(response.data?.message || \"Recognition failed\");\n }\n const data = response.data as ScreenTextJsonResult;\n return data.jsonResult;\n }\n}\n\n// 导出常量实例\nexport const mlkit = new Mlkit();\n","/**\n * Bar utils (status bar, nav bar, action bar) method constants.\n * Matches BarUtilsCallMethod in Kotlin.\n */\nexport const BarUtilsCallMethod = {\n // Status bar\n getStatusBarHeight: \"getStatusBarHeight\",\n setStatusBarVisibility: \"setStatusBarVisibility\",\n isStatusBarVisible: \"isStatusBarVisible\",\n setStatusBarLightMode: \"setStatusBarLightMode\",\n isStatusBarLightMode: \"isStatusBarLightMode\",\n setStatusBarColor: \"setStatusBarColor\",\n transparentStatusBar: \"transparentStatusBar\",\n\n // ActionBar\n getActionBarHeight: \"getActionBarHeight\",\n\n // Nav bar\n getNavBarHeight: \"getNavBarHeight\",\n setNavBarVisibility: \"setNavBarVisibility\",\n isNavBarVisible: \"isNavBarVisible\",\n setNavBarColor: \"setNavBarColor\",\n getNavBarColor: \"getNavBarColor\",\n isSupportNavBar: \"isSupportNavBar\",\n setNavBarLightMode: \"setNavBarLightMode\",\n isNavBarLightMode: \"isNavBarLightMode\",\n transparentNavBar: \"transparentNavBar\",\n} as const;\n\nexport type BarUtilsCallMethodType =\n (typeof BarUtilsCallMethod)[keyof typeof BarUtilsCallMethod];\n","/**\n * Bar utils (status bar, nav bar, action bar) for WebView.\n * Requires Activity context on native side. Matches BarUtilsJavascriptInterface.kt.\n */\nimport { CallResponse } from \"../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../utils\";\nimport { BarUtilsCallMethod } from \"./bar-utils-call-method\";\n\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\nif (typeof window !== \"undefined\" && !(window as any).assistsxBarUtilsCallback) {\n (window as any).assistsxBarUtilsCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"BarUtils callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class BarUtils {\n private async asyncCall(\n method: string,\n args?: Record<string, unknown>,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ?? undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(\n JSON.stringify(\n new CallResponse(-1, { message: \"Timeout\" }, uuid)\n )\n );\n }, timeout * 1000);\n });\n (window as any).assistsxBarUtils.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n const data =\n responseData.code !== 0 && responseData.message != null\n ? { message: responseData.message }\n : responseData.data;\n return new CallResponse(\n responseData.code,\n data,\n responseData.callbackId\n );\n }\n throw new Error(\"BarUtils call failed\");\n }\n\n private errorMessage(res: CallResponse, fallback: string): string {\n const d = res.getDataOrNull();\n if (\n d &&\n typeof d === \"object\" &&\n typeof (d as { message?: string }).message === \"string\"\n ) {\n return (d as { message: string }).message;\n }\n if (typeof d === \"string\") return d;\n return fallback;\n }\n\n // --- Status bar ---\n\n /** Get status bar height in px. */\n async getStatusBarHeight(timeout?: number): Promise<number> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.getStatusBarHeight,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(this.errorMessage(res, \"getStatusBarHeight failed\"));\n }\n return (res.getData() as { height: number }).height;\n }\n\n /** Set status bar visibility. */\n async setStatusBarVisibility(\n isVisible: boolean = true,\n timeout?: number\n ): Promise<void> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.setStatusBarVisibility,\n { isVisible },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"setStatusBarVisibility failed\")\n );\n }\n }\n\n /** Check if status bar is visible. */\n async isStatusBarVisible(timeout?: number): Promise<boolean> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.isStatusBarVisible,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"isStatusBarVisible failed\")\n );\n }\n return (res.getData() as { visible: boolean }).visible;\n }\n\n /** Set status bar light mode (light content on dark background). */\n async setStatusBarLightMode(\n isLightMode: boolean = true,\n timeout?: number\n ): Promise<void> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.setStatusBarLightMode,\n { isLightMode },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"setStatusBarLightMode failed\")\n );\n }\n }\n\n /** Check if status bar is in light mode. */\n async isStatusBarLightMode(timeout?: number): Promise<boolean> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.isStatusBarLightMode,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"isStatusBarLightMode failed\")\n );\n }\n return (res.getData() as { isLightMode: boolean }).isLightMode;\n }\n\n /** Set status bar color. color: Android color int (e.g. 0xff0000). isDecor: whether to apply to decor. */\n async setStatusBarColor(\n color: number,\n options?: { isDecor?: boolean },\n timeout?: number\n ): Promise<void> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.setStatusBarColor,\n { color, isDecor: options?.isDecor ?? false },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"setStatusBarColor failed\")\n );\n }\n }\n\n /** Make status bar transparent. */\n async transparentStatusBar(timeout?: number): Promise<void> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.transparentStatusBar,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"transparentStatusBar failed\")\n );\n }\n }\n\n // --- ActionBar ---\n\n /** Get action bar height in px. */\n async getActionBarHeight(timeout?: number): Promise<number> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.getActionBarHeight,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"getActionBarHeight failed\")\n );\n }\n return (res.getData() as { height: number }).height;\n }\n\n // --- Nav bar ---\n\n /** Get navigation bar height in px. */\n async getNavBarHeight(timeout?: number): Promise<number> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.getNavBarHeight,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"getNavBarHeight failed\")\n );\n }\n return (res.getData() as { height: number }).height;\n }\n\n /** Set navigation bar visibility. */\n async setNavBarVisibility(\n isVisible: boolean = true,\n timeout?: number\n ): Promise<void> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.setNavBarVisibility,\n { isVisible },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"setNavBarVisibility failed\")\n );\n }\n }\n\n /** Check if navigation bar is visible. */\n async isNavBarVisible(timeout?: number): Promise<boolean> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.isNavBarVisible,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"isNavBarVisible failed\")\n );\n }\n return (res.getData() as { visible: boolean }).visible;\n }\n\n /** Set navigation bar color. color: Android color int. */\n async setNavBarColor(color: number, timeout?: number): Promise<void> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.setNavBarColor,\n { color },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"setNavBarColor failed\")\n );\n }\n }\n\n /** Get current navigation bar color. */\n async getNavBarColor(timeout?: number): Promise<number> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.getNavBarColor,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"getNavBarColor failed\")\n );\n }\n return (res.getData() as { color: number }).color;\n }\n\n /** Check if device supports navigation bar. */\n async isSupportNavBar(timeout?: number): Promise<boolean> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.isSupportNavBar,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"isSupportNavBar failed\")\n );\n }\n return (res.getData() as { support: boolean }).support;\n }\n\n /** Set navigation bar light mode. */\n async setNavBarLightMode(\n isLightMode: boolean = true,\n timeout?: number\n ): Promise<void> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.setNavBarLightMode,\n { isLightMode },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"setNavBarLightMode failed\")\n );\n }\n }\n\n /** Check if navigation bar is in light mode. */\n async isNavBarLightMode(timeout?: number): Promise<boolean> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.isNavBarLightMode,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"isNavBarLightMode failed\")\n );\n }\n return (res.getData() as { isLightMode: boolean }).isLightMode;\n }\n\n /** Make navigation bar transparent. */\n async transparentNavBar(timeout?: number): Promise<void> {\n const res = await this.asyncCall(\n BarUtilsCallMethod.transparentNavBar,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(\n this.errorMessage(res, \"transparentNavBar failed\")\n );\n }\n }\n}\n\nexport const barUtils = new BarUtils();\n","/**\n * Float window method constants.\n * Matches FloatCallMethod.kt.\n */\nexport const FloatCallMethod = {\n /** Load floating window */\n open: \"open\",\n /** Close floating window */\n close: \"close\",\n /** Set overlay flags */\n setFlags: \"setFlags\",\n /** Show overlay toast */\n toast: \"toast\",\n /** Move floating window by x, y */\n move: \"move\",\n /** Refresh floating window view config (width, height, x, y) */\n refresh: \"refresh\",\n} as const;\n\nexport type FloatCallMethodType =\n (typeof FloatCallMethod)[keyof typeof FloatCallMethod];\n","/**\n * Float window API for WebView.\n * Requires assistsxFloat native bridge. Matches FloatJsInterface.kt.\n */\nimport { CallResponse } from \"../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../utils\";\nimport { FloatCallMethod } from \"./float-call-method\";\nimport type { WebFloatingWindowOptions } from \"../assistsx\";\n\nconst callbacks: Map<string, (data: string) => void> = new Map();\n\nif (typeof window !== \"undefined\" && !(window as any).assistsxFloatCallback) {\n (window as any).assistsxFloatCallback = (data: string) => {\n let callbackId: string | undefined;\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json);\n callbackId = response.callbackId;\n if (callbackId) {\n const callback = callbacks.get(callbackId);\n if (callback) {\n callback(json);\n }\n }\n } catch (e) {\n console.error(\"Float callback error:\", e);\n } finally {\n if (callbackId) {\n callbacks.delete(callbackId);\n }\n }\n };\n}\n\nexport class Float {\n private async asyncCall(\n method: string,\n args?: Record<string, unknown>,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ?? undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n callbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n callbacks.delete(uuid);\n resolve(\n JSON.stringify(\n new CallResponse(-1, { message: \"Timeout\" }, uuid)\n )\n );\n }, timeout * 1000);\n });\n (window as any).assistsxFloat.call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n const data =\n responseData.code !== 0 && responseData.message != null\n ? { message: responseData.message }\n : responseData.data;\n return new CallResponse(\n responseData.code,\n data,\n responseData.callbackId\n );\n }\n throw new Error(\"Float call failed\");\n }\n\n private errorMessage(res: CallResponse, fallback: string): string {\n const d = res.getDataOrNull();\n if (\n d &&\n typeof d === \"object\" &&\n typeof (d as { message?: string }).message === \"string\"\n ) {\n return (d as { message: string }).message;\n }\n if (typeof d === \"string\") return d;\n return fallback;\n }\n\n /** Load floating window */\n async open(\n url: string,\n options: WebFloatingWindowOptions & { timeout?: number } = {}\n ): Promise<boolean> {\n const {\n initialWidth,\n initialHeight,\n initialX,\n initialY,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n initialCenter,\n showTopOperationArea,\n showBottomOperationArea,\n backgroundColor,\n timeout,\n } = options;\n const res = await this.asyncCall(\n FloatCallMethod.open,\n {\n url,\n initialWidth,\n initialHeight,\n initialX,\n initialY,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n initialCenter,\n showTopOperationArea,\n showBottomOperationArea,\n backgroundColor,\n },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(this.errorMessage(res, \"Float.open failed\"));\n }\n return res.getDataOrDefault(false);\n }\n\n /** Close current floating window */\n async close(timeout?: number): Promise<boolean> {\n const res = await this.asyncCall(\n FloatCallMethod.close,\n undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(this.errorMessage(res, \"Float.close failed\"));\n }\n return res.getDataOrDefault(false);\n }\n\n /** Set overlay flags */\n async setFlags(\n flags: number | number[],\n timeout?: number\n ): Promise<void> {\n const flagList = Array.isArray(flags) ? flags : [flags];\n const res = await this.asyncCall(\n FloatCallMethod.setFlags,\n { flags: flagList },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(this.errorMessage(res, \"Float.setFlags failed\"));\n }\n }\n\n /** Show overlay toast */\n async toast(\n text: string,\n delay: number = 2000,\n timeout?: number\n ): Promise<void> {\n const res = await this.asyncCall(\n FloatCallMethod.toast,\n { text, delay },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(this.errorMessage(res, \"Float.toast failed\"));\n }\n }\n\n /** Move floating window to x, y */\n async move(x: number, y: number, timeout?: number): Promise<void> {\n const res = await this.asyncCall(\n FloatCallMethod.move,\n { x, y },\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(this.errorMessage(res, \"Float.move failed\"));\n }\n }\n\n /** Refresh floating window view config. Optional: showTopOperationArea, showBottomOperationArea, backgroundColor, width, height, x, y (omit to keep current) */\n async refresh(\n options: {\n showTopOperationArea?: boolean;\n showBottomOperationArea?: boolean;\n backgroundColor?: string | number;\n width?: number;\n height?: number;\n x?: number;\n y?: number;\n timeout?: number;\n } = {}\n ): Promise<void> {\n const {\n showTopOperationArea,\n showBottomOperationArea,\n backgroundColor,\n width,\n height,\n x,\n y,\n timeout,\n } = options;\n const args: Record<string, number | boolean | string | undefined> = {};\n if (showTopOperationArea !== undefined)\n args.showTopOperationArea = showTopOperationArea;\n if (showBottomOperationArea !== undefined)\n args.showBottomOperationArea = showBottomOperationArea;\n if (backgroundColor !== undefined) args.backgroundColor = backgroundColor;\n if (width !== undefined) args.width = width;\n if (height !== undefined) args.height = height;\n if (x !== undefined) args.x = x;\n if (y !== undefined) args.y = y;\n const res = await this.asyncCall(\n FloatCallMethod.refresh,\n Object.keys(args).length ? args : undefined,\n timeout\n );\n if (!res.isSuccess()) {\n throw new Error(this.errorMessage(res, \"Float.refresh failed\"));\n }\n }\n}\n\nexport const float = new Float();\n","/**\n * 日志桥接方法名(与 tools/log/AssistsLogCallMethod.kt 一致)\n */\nexport const LogCallMethod = {\n readAllText: \"readAllText\",\n clear: \"clear\",\n refreshFromFile: \"refreshFromFile\",\n appendLine: \"appendLine\",\n appendTimestampedEntry: \"appendTimestampedEntry\",\n replaceAll: \"replaceAll\",\n subscribe: \"subscribe\",\n unsubscribe: \"unsubscribe\",\n uploadLogs: \"uploadLogs\",\n\n /** 获取日志服务当前域名(origin,无路径;与上传、管理后台同源),对应 AssistsLogDiagnostics.adminWebBaseUrl() */\n getLogServiceBaseUrl: \"getLogServiceBaseUrl\",\n} as const;\n\n/** 与 ASWebView / AssistsLogJavascriptInterface companion 对齐 */\nexport const LogStream = {\n latestLine: \"latestLine\",\n entireLogText: \"entireLogText\",\n} as const;\n\nexport type LogStreamType = (typeof LogStream)[keyof typeof LogStream];\n\nexport type LogCallMethodType =\n (typeof LogCallMethod)[keyof typeof LogCallMethod];\n","/**\n * 日志桥接:与 tools/log/AssistsLogJavascriptInterface.kt、ASWebView.kt 对齐。\n * 使用 assistsxLog.call + assistsxLogCallback;页面级推送 onAssistsLogUpdate。\n */\nimport { CallResponse } from \"../call-response\";\nimport { decodeBase64UTF8, generateUUID } from \"../utils\";\nimport { LogCallMethod, type LogStreamType } from \"./log-call-method\";\n\nconst pendingCallbacks: Map<string, (data: string) => void> = new Map();\nconst streamHandlers: Map<string, (data: string) => void> = new Map();\nconst subscriptionIdToCallbackId: Map<string, string> = new Map();\n\nif (typeof window !== \"undefined\" && !window.assistsxLogCallback) {\n window.assistsxLogCallback = (data: string) => {\n try {\n const json = decodeBase64UTF8(data);\n const response = JSON.parse(json) as {\n callbackId?: string;\n code?: number;\n message?: string;\n data?: Record<string, unknown>;\n };\n const callbackId = response.callbackId;\n if (!callbackId) {\n return;\n }\n if (streamHandlers.has(callbackId)) {\n streamHandlers.get(callbackId)!(json);\n return;\n }\n const pending = pendingCallbacks.get(callbackId);\n if (pending) {\n pending(json);\n pendingCallbacks.delete(callbackId);\n }\n } catch (e) {\n console.error(\"Log bridge callback error:\", e);\n }\n };\n}\n\n/**\n * onAssistsLogUpdate 推送的监听器列表(与 accessibilityEventListeners 风格一致)。\n * 在页面加载本模块后,向此数组 push,或使用 log.addLogUpdateListener。\n * 注意:若页面在 import 本模块之前已自定义 `window.onAssistsLogUpdate`,则不会安装默认分发函数,需自行解码并转发到监听器。\n */\nexport const logUpdateListeners: Array<\n (payload: LogUpdateEvent) => void\n> = [];\n\n/**\n * Base64 解码后的 CallResponse,data 含 stream / text\n */\nexport interface LogUpdateEvent {\n code: number;\n data: LogUpdateData | null;\n message?: string;\n callbackId?: string | null;\n}\n\nexport interface LogUpdateData {\n stream: LogStreamType;\n text: string;\n}\n\nexport interface LogSubscribeUpdatePayload {\n text: string;\n stream: string;\n subscriptionId: string;\n}\n\nexport interface LogUploadOptions {\n baseUrl?: string;\n /** PNG(默认)| JPEG | JPG | WEBP */\n format?: \"PNG\" | \"JPEG\" | \"JPG\" | \"WEBP\" | string;\n prettyPrint?: boolean;\n overlayHiddenDelayMillis?: number;\n /** 与 Kotlin handleUploadLogs / AssistsLogDiagnostics.uploadLogs 的 uploadKey 一致 */\n uploadKey?: string;\n}\n\n/** 与 Kotlin assistsLogUploadResultToJson 对齐 */\nexport interface LogUploadResult {\n success: boolean;\n message: string;\n httpCode?: number;\n responseBody?: string;\n data?: unknown;\n localLogFilePath?: string;\n localScreenshotFilePath?: string;\n localNodeTreeFilePath?: string;\n causeMessage?: string;\n}\n\nif (typeof window !== \"undefined\" && !window.onAssistsLogUpdate) {\n window.onAssistsLogUpdate = (encoded: string) => {\n logUpdateListeners.forEach((listener) => {\n try {\n const decoded = decodeBase64UTF8(encoded);\n const parsed = JSON.parse(decoded) as LogUpdateEvent;\n listener(parsed);\n } catch (error) {\n console.error(\"Log update listener error:\", error);\n }\n });\n };\n}\n\nexport class Log {\n private getBridge(): NonNullable<Window[\"assistsxLog\"]> {\n if (typeof window === \"undefined\" || !window.assistsxLog) {\n throw new Error(\"assistsxLog bridge is not available\");\n }\n return window.assistsxLog;\n }\n\n private async asyncCall(\n method: string,\n args?: Record<string, unknown>,\n timeout: number = 30\n ): Promise<CallResponse> {\n const uuid = generateUUID();\n const params = {\n method,\n arguments: args ?? undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n pendingCallbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n pendingCallbacks.delete(uuid);\n resolve(\n JSON.stringify(new CallResponse(-1, null, uuid))\n );\n }, timeout * 1000);\n });\n this.getBridge().call(JSON.stringify(params));\n const promiseResult = await promise;\n if (typeof promiseResult === \"string\") {\n const responseData = JSON.parse(promiseResult);\n return new CallResponse(\n responseData.code,\n responseData.data,\n responseData.callbackId\n );\n }\n throw new Error(\"Log bridge call failed\");\n }\n\n /** 读取当前日志全文 */\n async readAllText(timeout?: number): Promise<string> {\n const res = await this.asyncCall(\n LogCallMethod.readAllText,\n undefined,\n timeout\n );\n const d = res.getDataOrNull() as { text?: string } | null;\n return d?.text ?? \"\";\n }\n\n /**\n * 获取日志服务当前域名(origin,无路径;与上传、管理后台同源)。\n * 与 Kotlin getLogServiceBaseUrl / adminWebBaseUrl 对齐。\n */\n async getLogServiceBaseUrl(timeout?: number): Promise<string> {\n const res = await this.asyncCall(\n LogCallMethod.getLogServiceBaseUrl,\n undefined,\n timeout\n );\n const d = res.getDataOrNull() as { baseUrl?: string } | null;\n return d?.baseUrl ?? \"\";\n }\n\n /** 清空日志 */\n async clear(timeout?: number): Promise<boolean> {\n const res = await this.asyncCall(\n LogCallMethod.clear,\n undefined,\n timeout\n );\n return res.isSuccess();\n }\n\n /** 从文件重新加载到内存 Flow */\n async refreshFromFile(timeout?: number): Promise<boolean> {\n const res = await this.asyncCall(\n LogCallMethod.refreshFromFile,\n undefined,\n timeout\n );\n return res.isSuccess();\n }\n\n /** 追加一行 */\n async appendLine(\n line: string,\n maxLength?: number,\n timeout?: number\n ): Promise<boolean> {\n const args: Record<string, unknown> = { line };\n if (maxLength !== undefined) {\n args.maxLength = maxLength;\n }\n const res = await this.asyncCall(\n LogCallMethod.appendLine,\n args,\n timeout\n );\n return res.isSuccess();\n }\n\n /** 追加带时间戳的条目 */\n async appendTimestampedEntry(\n message: string,\n timeout?: number\n ): Promise<boolean> {\n const res = await this.asyncCall(\n LogCallMethod.appendTimestampedEntry,\n { message },\n timeout\n );\n return res.isSuccess();\n }\n\n /** 替换全部内容 */\n async replaceAll(\n content: string,\n timeout?: number\n ): Promise<boolean> {\n const res = await this.asyncCall(\n LogCallMethod.replaceAll,\n { content },\n timeout\n );\n return res.isSuccess();\n }\n\n /**\n * 订阅 Flow:先收到 subscribed,再多次 update。\n * resolve 后请保留 dispose 或调用 unsubscribe(subscriptionId) 以释放原生协程与 JS 回调。\n */\n async subscribe(\n stream: LogStreamType,\n onUpdate: (payload: LogSubscribeUpdatePayload) => void,\n options?: { timeout?: number }\n ): Promise<{\n subscriptionId: string;\n dispose: () => Promise<void>;\n }> {\n const self = this;\n const callbackId = generateUUID();\n const timeoutSec = options?.timeout ?? 30;\n\n return new Promise((resolve, reject) => {\n let settled = false;\n const timer = setTimeout(() => {\n if (!settled) {\n settled = true;\n streamHandlers.delete(callbackId);\n reject(new Error(\"Log subscribe timeout\"));\n }\n }, timeoutSec * 1000);\n\n streamHandlers.set(callbackId, (raw: string) => {\n let response: {\n code?: number;\n message?: string;\n data?: {\n event?: string;\n subscriptionId?: string;\n stream?: string;\n text?: string;\n };\n };\n try {\n response = JSON.parse(raw);\n } catch {\n return;\n }\n const data = response.data;\n const code = response.code;\n\n if (typeof code === \"number\" && code !== 0) {\n if (!settled) {\n settled = true;\n clearTimeout(timer);\n streamHandlers.delete(callbackId);\n reject(\n new Error(\n response.message ?? \"Log subscribe failed\"\n )\n );\n }\n return;\n }\n\n if (data?.event === \"subscribed\" && data.subscriptionId) {\n if (!settled) {\n settled = true;\n clearTimeout(timer);\n const sid = data.subscriptionId;\n subscriptionIdToCallbackId.set(sid, callbackId);\n resolve({\n subscriptionId: sid,\n dispose: async () => {\n await self.unsubscribe(sid);\n },\n });\n }\n return;\n }\n\n if (data?.event === \"update\" && data.subscriptionId) {\n onUpdate({\n text: data.text ?? \"\",\n stream: data.stream ?? stream,\n subscriptionId: data.subscriptionId,\n });\n }\n });\n\n try {\n this.getBridge().call(\n JSON.stringify({\n method: LogCallMethod.subscribe,\n arguments: { stream },\n callbackId,\n })\n );\n } catch (e) {\n clearTimeout(timer);\n streamHandlers.delete(callbackId);\n reject(e);\n }\n });\n }\n\n /** 取消订阅(与 Kotlin handleUnsubscribe 对齐) */\n async unsubscribe(\n subscriptionId: string,\n timeout?: number\n ): Promise<boolean> {\n const cbId = subscriptionIdToCallbackId.get(subscriptionId);\n const res = await this.asyncCall(\n LogCallMethod.unsubscribe,\n { subscriptionId },\n timeout\n );\n if (res.isSuccess() && cbId) {\n streamHandlers.delete(cbId);\n subscriptionIdToCallbackId.delete(subscriptionId);\n }\n return res.isSuccess();\n }\n\n /** 截图 + 节点树 + 日志上传(需 Android API 30+) */\n async uploadLogs(\n options?: LogUploadOptions & { timeout?: number }\n ): Promise<LogUploadResult> {\n const { timeout = 60, ...args } = options ?? {};\n const payload: Record<string, unknown> = {};\n if (args.baseUrl !== undefined) {\n payload.baseUrl = args.baseUrl;\n }\n if (args.format !== undefined) {\n payload.format = args.format;\n }\n if (args.prettyPrint !== undefined) {\n payload.prettyPrint = args.prettyPrint;\n }\n if (args.overlayHiddenDelayMillis !== undefined) {\n payload.overlayHiddenDelayMillis = args.overlayHiddenDelayMillis;\n }\n if (args.uploadKey !== undefined) {\n payload.uploadKey = args.uploadKey;\n }\n const uuid = generateUUID();\n const params = {\n method: LogCallMethod.uploadLogs,\n arguments:\n Object.keys(payload).length > 0 ? payload : undefined,\n callbackId: uuid,\n };\n const promise = new Promise<string>((resolve) => {\n pendingCallbacks.set(uuid, (data: string) => {\n resolve(data);\n });\n setTimeout(() => {\n pendingCallbacks.delete(uuid);\n resolve(JSON.stringify({ code: -1, data: null, callbackId: uuid }));\n }, timeout * 1000);\n });\n this.getBridge().call(JSON.stringify(params));\n const rawStr = await promise;\n const raw = JSON.parse(rawStr) as {\n code: number;\n data?: LogUploadResult | null;\n message?: string;\n callbackId?: string | null;\n };\n const d = raw.data;\n if (d && typeof d === \"object\" && \"success\" in d) {\n return d;\n }\n return {\n success: raw.code === 0,\n message:\n typeof raw.message === \"string\"\n ? raw.message\n : raw.code !== 0\n ? \"uploadLogs failed\"\n : \"\",\n };\n }\n\n /**\n * 注册 onAssistsLogUpdate 推送监听(ASWebView 注入的 Base64 CallResponse,解码后见 LogUpdateEvent)\n */\n addLogUpdateListener(listener: (payload: LogUpdateEvent) => void): void {\n logUpdateListeners.push(listener);\n }\n\n /**\n * 移除先前通过 addLogUpdateListener 注册的同一函数引用\n */\n removeLogUpdateListener(listener: (payload: LogUpdateEvent) => void): void {\n const i = logUpdateListeners.indexOf(listener);\n if (i !== -1) {\n logUpdateListeners.splice(i, 1);\n }\n }\n}\n\n/** 默认单例,用法与 floatingwindow 模块导出的 float 一致 */\nexport const log = new Log();\n\nexport {\n LogCallMethod,\n LogStream,\n type LogCallMethodType,\n type LogStreamType,\n} from \"./log-call-method\";\n"],"mappings":"4cAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,8BAAAE,GAAA,YAAAC,GAAA,aAAAC,EAAA,kBAAAC,EAAA,aAAAC,GAAA,uBAAAC,EAAA,WAAAC,EAAA,eAAAC,EAAA,iBAAAC,EAAA,eAAAC,GAAA,WAAAC,GAAA,cAAAC,GAAA,UAAAC,GAAA,oBAAAC,GAAA,YAAAC,GAAA,SAAAC,GAAA,eAAAC,GAAA,QAAAC,GAAA,cAAAC,GAAA,QAAAC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D,CACpEF,GAAmB,KAAKE,CAAQ,CACpC,CAKA,wBAAwBA,EAAmD,CACvE,IAAM2C,EAAI7C,GAAmB,QAAQE,CAAQ,EACzC2C,IAAM,IACN7C,GAAmB,OAAO6C,EAAG,CAAC,CAEtC,CACJ,EAGaC,GAAM,IAAIxC","names":["index_exports","__export","AccessibilityEventFilter","AppInfo","AssistsX","AssistsXAsync","BarUtils","BarUtilsCallMethod","Bounds","CallMethod","CallResponse","DeviceInfo","FileIO","FileUtils","Float","FloatCallMethod","Gallery","Http","ImageUtils","Ime","ImeAction","Log","LogCallMethod","LogStream","Mlkit","MlkitCallMethod","Node","NodeAsync","NodeClassValue","Path","Step","StepAsync","StepError","StepStopError","WindowFlags","accessibilityEventListeners","barUtils","callbacks","decodeBase64UTF8","fileIO","fileUtils","float","gallery","generateUUID","http","imageUtils","ime","log","logUpdateListeners","mlkit","pathUtils","screen","sleep","useStepStore","Bounds","_Bounds","left","top","right","bottom","width","height","centerX","centerY","exactCenterX","exactCenterY","isEmpty","data","json","CallMethod","CallResponse","code","data","callbackId","defaultValue","_a","sleep","ms","resolve","generateUUID","c","r","decodeBase64UTF8","base64","binary","bytes","i","AppInfo","_AppInfo","isSystem","minSdkVersion","name","packageName","targetSdkVersion","versionCode","versionName","data","_a","_b","_c","_d","_e","_f","_g","DeviceInfo","_DeviceInfo","uniqueDeviceId","androidID","macAddress","isDeviceRooted","manufacturer","model","sdkVersionCode","sdkVersionName","abiList","isAdbEnabled","isDevelopmentSettingsEnabled","isEmulator","isTablet","data","_a","_b","_c","_d","_e","_f","_g","_h","_i","_j","_k","_l","_m","AssistsXAsync","method","args","node","nodes","timeout","uuid","generateUUID","params","promise","resolve","callbacks","data","CallResponse","result","promiseResult","responseData","flags","CallMethod","filterClass","filterViewId","filterDes","filterText","Node","text","overlayHiddenScreenshotDelayMillis","options","filePath","format","targetText","rotationDegrees","restoreOverlay","region","url","initialWidth","initialHeight","initialX","initialY","minWidth","minHeight","maxWidth","maxHeight","initialCenter","showTopOperationArea","showBottomOperationArea","backgroundColor","packageName","delay","id","className","response","Bounds","compareNode","isFullyByCompareNode","x","y","duration","selectionStart","selectionEnd","offsetX","offsetY","switchWindowIntervalDelay","clickDuration","clickInterval","startPoint","endPoint","matchedPackageName","matchedText","timeoutMillis","longPressDuration","point","AppInfo","DeviceInfo","volume","useAbsoluteVolume","name","phoneNumber","prettyPrint","makeMap","str","map","key","val","EMPTY_OBJ","NOOP","NO","extend","remove","arr","el","i","hasOwnProperty","hasOwn","val","key","isArray","isMap","toTypeString","isSet","isFunction","val","isString","isSymbol","isObject","isPromise","objectToString","toTypeString","value","toRawType","isPlainObject","isIntegerKey","key","cacheStringFunction","fn","cache","str","camelizeRE","camelize","_","c","hyphenateRE","hyphenate","capitalize","toHandlerKey","hasChanged","value","oldValue","def","obj","key","value","writable","_globalThis","getGlobalThis","specialBooleanAttrs","isBooleanAttr","makeMap","specialBooleanAttrs","warn","msg","args","activeEffectScope","EffectScope","detached","i","l","fn","currentEffectScope","fromParent","last","effectScope","getCurrentScope","onScopeDispose","failSilently","activeSub","pausedQueueEffects","ReactiveEffect","fn","activeEffectScope","batch","cleanupEffect","prepareDeps","prevEffect","activeSub","prevShouldTrack","shouldTrack","cleanupDeps","link","removeSub","isDirty","batchDepth","batchedSub","batchedComputed","sub","isComputed","startBatch","endBatch","next","error","err","head","tail","prev","removeDep","refreshComputed","computed","globalVersion","dep","prevSub","value","hasChanged","soft","nextSub","l","prevDep","nextDep","shouldTrack","trackStack","pauseTracking","resetTracking","last","trackStack","shouldTrack","cleanupEffect","e","cleanup","prevSub","activeSub","globalVersion","Link","sub","dep","Dep","computed","debugInfo","shouldTrack","link","addSub","next","startBatch","endBatch","l","currentTail","targetMap","ITERATE_KEY","MAP_KEY_ITERATE_KEY","ARRAY_ITERATE_KEY","track","target","type","key","depsMap","trigger","newValue","oldValue","oldTarget","run","targetIsArray","isArray","isArrayIndex","isIntegerKey","newLength","key2","isSymbol","isMap","getDepFromReactive","object","depMap","reactiveReadArray","array","raw","toRaw","isShallow","toReactive","shallowReadArray","arr","arrayInstrumentations","iterator","args","x","value","fn","thisArg","apply","v","searchProxy","separator","noTracking","reduce","comparer","self","method","wrapValue","iter","result","arrayProto","wrappedRetFn","needsWrap","methodFn","result2","wrappedFn","item","index","acc","res","isProxy","pauseTracking","resetTracking","isNonTrackableKeys","makeMap","builtInSymbols","hasOwnProperty","obj","BaseReactiveHandler","_isReadonly","_isShallow","receiver","isReadonly2","isShallow2","shallowReadonlyMap","readonlyMap","shallowReactiveMap","reactiveMap","isRef","isObject","readonly","reactive","MutableReactiveHandler","isOldValueReadonly","isReadonly","hadKey","hasOwn","hasChanged","ReadonlyReactiveHandler","mutableHandlers","readonlyHandlers","toShallow","value","getProto","v","createIterableMethod","method","isReadonly2","isShallow2","args","target","rawTarget","toRaw","targetIsMap","isMap","isPair","isKeyOnly","innerIterator","wrap","toReadonly","toReactive","track","MAP_KEY_ITERATE_KEY","ITERATE_KEY","done","createReadonlyMethod","type","createInstrumentations","readonly","shallow","instrumentations","key","rawKey","hasChanged","has","callback","thisArg","observed","extend","isShallow","isReadonly","trigger","get","hadKey","oldValue","result","hadItems","oldTarget","createInstrumentationGetter","receiver","hasOwn","mutableCollectionHandlers","readonlyCollectionHandlers","createInstrumentationGetter","reactiveMap","shallowReactiveMap","readonlyMap","shallowReadonlyMap","targetTypeMap","rawType","getTargetType","value","toRawType","reactive","target","isReadonly","createReactiveObject","mutableHandlers","mutableCollectionHandlers","readonly","target","createReactiveObject","readonlyHandlers","readonlyCollectionHandlers","readonlyMap","createReactiveObject","target","isReadonly2","baseHandlers","collectionHandlers","proxyMap","isObject","targetType","getTargetType","existingProxy","proxy","isReactive","value","isReadonly","isShallow","isProxy","toRaw","observed","raw","markRaw","hasOwn","def","toReactive","reactive","toReadonly","readonly","isRef","ref","createRef","createRef","rawValue","shallow","isRef","RefImpl","value","isShallow2","Dep","toRaw","toReactive","newValue","oldValue","useDirectValue","isShallow","isReadonly","hasChanged","toRefs","object","ret","isArray","key","propertyToRef","ObjectRefImpl","_object","_key","_defaultValue","val","newVal","getDepFromReactive","toRaw","propertyToRef","source","key","defaultValue","val","isRef","ObjectRefImpl","ComputedRefImpl","fn","setter","isSSR","Dep","globalVersion","activeSub","batch","link","refreshComputed","newValue","computed","getterOrOptions","debugOptions","getter","isFunction","INITIAL_WATCHER_VALUE","cleanupMap","activeWatcher","onWatcherCleanup","cleanupFn","failSilently","owner","activeWatcher","cleanups","cleanupMap","watch","source","cb","options","EMPTY_OBJ","immediate","deep","once","scheduler","augmentJob","call","warnInvalidSource","s","warn","reactiveGetter","source2","isShallow","traverse","effect","getter","cleanup","boundCleanup","forceTrigger","isMultiSource","isRef","isReactive","isArray","isFunction","pauseTracking","resetTracking","currentEffect","NOOP","baseGetter","depth","scope","getCurrentScope","watchHandle","remove","_cb","args","oldValue","INITIAL_WATCHER_VALUE","job","immediateFirstRun","newValue","v","i","hasChanged","currentWatcher","ReactiveEffect","fn","cleanup2","value","seen","isObject","isSet","isMap","isPlainObject","key","callWithErrorHandling","fn","instance","type","args","err","handleError","callWithAsyncErrorHandling","isFunction","res","isPromise","isArray","values","throwInDev","contextVNode","errorHandler","throwUnhandledErrorInProduction","EMPTY_OBJ","cur","exposedInstance","errorInfo","errorCapturedHooks","i","pauseTracking","resetTracking","logError","throwInProd","queue","flushIndex","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","resolvedPromise","currentFlushPromise","nextTick","fn","p","currentFlushPromise","resolvedPromise","findInsertionIndex","id","start","flushIndex","end","queue","middle","middleJob","middleJobId","getId","queueJob","job","jobId","lastJob","queueFlush","flushJobs","queuePostFlushCb","cb","isArray","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","flushPostFlushCbs","seen","pendingPostFlushCbs","deduped","a","b","getId","activePostFlushCbs","postFlushIndex","cb","job","flushJobs","check","NOOP","flushIndex","queue","callWithErrorHandling","currentFlushPromise","currentRenderingInstance","requestIdleCallback","getGlobalThis","cb","cancelIdleCallback","id","injectHook","type","hook","target","currentInstance","prepend","hooks","wrappedHook","args","pauseTracking","reset","setCurrentInstance","res","callWithAsyncErrorHandling","resetTracking","createHook","lifecycle","isInSSRComponentSetup","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","onServerPrefetch","onRenderTriggered","onRenderTracked","createAppContext","NO","currentApp","inject","key","defaultValue","treatDefaultAsFactory","instance","currentInstance","currentRenderingInstance","currentApp","provides","isFunction","hasInjectionContext","queuePostRenderEffect","queueEffectWithSuspense","ssrContextKey","useSSRContext","ctx","inject","watch","source","cb","options","doWatch","EMPTY_OBJ","immediate","deep","flush","once","baseWatchOptions","extend","runsImmediately","ssrCleanup","isInSSRComponentSetup","ctx","useSSRContext","watchStopHandle","NOOP","instance","currentInstance","fn","type","args","callWithAsyncErrorHandling","isPre","job","queuePostRenderEffect","isFirstRun","queueJob","watchHandle","queueEffectWithSuspense","fn","suspense","isArray","queuePostFlushCb","emptyAppContext","createAppContext","currentInstance","internalSetCurrentInstance","setInSSRSetupState","g","getGlobalThis","registerGlobalSetter","key","setter","setters","v","set","currentInstance","isInSSRComponentSetup","setCurrentInstance","instance","prev","isInSSRComponentSetup","computed","getterOrOptions","debugOptions","isInSSRComponentSetup","activePinia","setActivePinia","pinia","piniaSymbol","isPlainObject","o","MutationType","IS_CLIENT","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","e","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","a","popup","force","isSafari","isChromeIOS","reader","assign$1","noop","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","args","fallbackRunWithContext","fn","ACTION_MARKER","ACTION_NAME","mergeReactiveObjects","target","patchToApply","value","key","subPatch","targetValue","isPlainObject","isRef","isReactive","skipHydrateSymbol","shouldHydrate","obj","isPlainObject","skipHydrateSymbol","assign","isComputed","o","isRef","createOptionsStore","id","options","pinia","hot","state","actions","getters","initialState","store","setup","localState","toRefs","computedGetters","name","markRaw","computed","setActivePinia","createSetupStore","$id","isOptionsStore","scope","optionsForPlugin","$subscribeOptions","isListening","isSyncListening","subscriptions","actionSubscriptions","debuggerEvents","hotState","ref","activeListener","$patch","partialStateOrMutator","subscriptionMutation","MutationType","mergeReactiveObjects","myListenerId","nextTick","triggerSubscriptions","$reset","newState","$state","noop","$dispose","action","fn","ACTION_MARKER","ACTION_NAME","wrappedAction","args","afterCallbackList","onErrorCallbackList","after","callback","onError","ret","error","value","_hmrPayload","partialStore","addSubscription","removeSubscription","stopWatcher","watch","reactive","IS_CLIENT","setupStore","fallbackRunWithContext","effectScope","key","prop","isReactive","actionValue","toRaw","nonEnumerable","p","extender","extensions","defineStore","setupOptions","isSetupStore","useStore","hasContext","hasInjectionContext","inject","piniaSymbol","activePinia","useStepStore","defineStore","stepId","tag","data","error","StepError","message","data","impl","tag","originalError","currentStep","StepStopError","StepAsync","step","node","overlayHiddenScreenshotDelayMillis","Step","result","AssistsXAsync","nodes","filterClass","filterViewId","filterDes","filterText","packageName","id","text","className","texts","x","y","duration","point","matchedPackageName","matchedText","timeoutMillis","longPressDuration","startPoint","endPoint","data","_Step","stepId","impl","tag","data","delayMs","repeatCountMax","exceptionRetryCountMax","isEnd","_a","_b","_c","_d","_e","_f","stepStore","useStepStore","implnName","currentStep","nextStep","generateUUID","interceptedStep","stepForRetry","interceptor","result","e","stepToExecute","interceptedImplName","StepError","errorMsg","nodes","node","exception","StepStopError","index","removedCount","i","predicate","StepAsync","ms","resolve","method","overlayHiddenScreenshotDelayMillis","AssistsX","filterClass","filterViewId","filterDes","filterText","packageName","id","text","className","texts","x","y","duration","point","matchedPackageName","matchedText","timeoutMillis","longPressDuration","startPoint","endPoint","Step","NodeAsync","node","className","Step","AssistsXAsync","offsetX","offsetY","switchWindowIntervalDelay","clickDuration","result","clickInterval","text","matchedPackageName","matchedText","timeoutMillis","longPressDuration","filterText","filterViewId","filterDes","id","filterClass","response","compareNode","isFullyByCompareNode","overlayHiddenScreenshotDelayMillis","json","data","Node","key","value","params","array","Node","_Node","params","_a","rawBounds","Bounds","NodeAsync","className","Step","node","AssistsX","offsetX","offsetY","switchWindowIntervalDelay","clickDuration","result","clickInterval","text","matchedPackageName","matchedText","timeoutMillis","longPressDuration","filterText","filterViewId","filterDes","id","filterClass","response","compareNode","isFullyByCompareNode","overlayHiddenScreenshotDelayMillis","options","AssistsXAsync","json","data","key","value","array","callbacks","accessibilityEventListeners","screen","data","callbackId","json","decodeBase64UTF8","callback","e","event","listener","decodedEvent","parsedEvent","error","AssistsX","method","args","node","params","result","responseData","CallResponse","nodes","timeout","uuid","generateUUID","promise","resolve","promiseResult","flags","CallMethod","filterClass","filterViewId","filterDes","filterText","Node","text","url","tip","packageName","overlayHiddenScreenshotDelayMillis","options","initialWidth","initialHeight","initialX","initialY","minWidth","minHeight","maxWidth","maxHeight","initialCenter","showTopOperationArea","showBottomOperationArea","backgroundColor","delay","id","className","response","Bounds","compareNode","isFullyByCompareNode","x","y","duration","selectionStart","selectionEnd","offsetX","offsetY","switchWindowIntervalDelay","clickDuration","clickInterval","startPoint","endPoint","matchedPackageName","matchedText","timeoutMillis","longPressDuration","point","AppInfo","DeviceInfo","value","normalizeScreen","index","w","h","NodeClassValue","WindowFlags","flag","flags","AccessibilityEventFilter","_AccessibilityEventFilter","config","_a","_b","_c","_d","_e","targetPackageName","eventType","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","Http","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","result","promiseResult","responseData","url","headers","_a","response","body","files","formData","file","savePath","saveToGallery","displayName","config","http","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","Path","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","result","promiseResult","responseData","_a","response","dbName","pathUtils","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","FileIO","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","result","promiseResult","responseData","filePath","inputStreamBase64","append","_a","response","bytesBase64","content","threadSafe","charsetName","bufferSize","fileIO","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","FileUtils","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","result","promiseResult","responseData","filePath","_a","response","newName","dirPath","srcFilePath","destFilePath","filterPattern","fileUtils","ImeAction","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","Ime","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","result","promiseResult","responseData","actionId","_a","response","ime","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","ImageUtils","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","result","promiseResult","responseData","imagePath","_a","response","fileName","options","scaleWidth","scaleHeight","savePath","format","x","y","width","height","kx","ky","px","py","degree","radius","borderSize","color","cornerRadius","reflectionHeight","text","size","watermarkPath","alpha","scale","quality","sampleSize","imageUtils","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","Gallery","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","result","promiseResult","responseData","filePath","displayName","_a","response","uri","id","type","gallery","MlkitCallMethod","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","Mlkit","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","result","promiseResult","responseData","targetText","options","_a","region","rotationDegrees","response","MlkitCallMethod","mlkit","BarUtilsCallMethod","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","BarUtils","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","promiseResult","responseData","res","fallback","d","BarUtilsCallMethod","isVisible","isLightMode","color","options","_a","barUtils","FloatCallMethod","callbacks","data","callbackId","json","decodeBase64UTF8","callback","e","Float","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","promiseResult","responseData","res","fallback","d","url","options","initialWidth","initialHeight","initialX","initialY","minWidth","minHeight","maxWidth","maxHeight","initialCenter","showTopOperationArea","showBottomOperationArea","backgroundColor","FloatCallMethod","flags","flagList","text","delay","x","y","width","height","float","LogCallMethod","LogStream","pendingCallbacks","streamHandlers","subscriptionIdToCallbackId","data","json","decodeBase64UTF8","callbackId","pending","logUpdateListeners","encoded","listener","decoded","parsed","error","Log","method","args","timeout","uuid","generateUUID","params","promise","resolve","CallResponse","promiseResult","responseData","_a","d","LogCallMethod","line","maxLength","message","content","stream","onUpdate","options","self","timeoutSec","reject","settled","timer","raw","_b","_c","response","e","code","sid","subscriptionId","cbId","res","payload","rawStr","i","log"]}