diff --git a/ArkUIKit/StateMigrationProject/AppScope/app.json5 b/ArkUIKit/StateMigrationProject/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..e85520146e7d9b4817c850552b57448555abfd7b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/AppScope/app.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "app": { + "bundleName": "com.samples.statemigrationproject", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name" + } +} diff --git a/ArkUIKit/StateMigrationProject/AppScope/resources/base/element/string.json b/ArkUIKit/StateMigrationProject/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..13a613e8fccccf05502e2bd282e778580b091cee --- /dev/null +++ b/ArkUIKit/StateMigrationProject/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "CustomCanvas" + } + ] +} diff --git a/ArkUIKit/StateMigrationProject/AppScope/resources/base/media/background.png b/ArkUIKit/StateMigrationProject/AppScope/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..b400ac8bc6cbc645e41bbf7c2dd1e2875a05852f Binary files /dev/null and b/ArkUIKit/StateMigrationProject/AppScope/resources/base/media/background.png differ diff --git a/ArkUIKit/StateMigrationProject/AppScope/resources/base/media/foreground.png b/ArkUIKit/StateMigrationProject/AppScope/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..e58ebabb168e1b4a6cc0a07d13676ea0613ba69e Binary files /dev/null and b/ArkUIKit/StateMigrationProject/AppScope/resources/base/media/foreground.png differ diff --git a/ArkUIKit/StateMigrationProject/AppScope/resources/base/media/layered_image.json b/ArkUIKit/StateMigrationProject/AppScope/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/AppScope/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/README_zh.md b/ArkUIKit/StateMigrationProject/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..28f6d3eac30df79481cad9b4bbf129b66fbb3ed2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/README_zh.md @@ -0,0 +1,110 @@ +# 组件内状态变量迁移指导指南文档示例 + +### 介绍 + +本示例通过使用[ArkUI指南文档](https://gitcode.com/openharmony/docs/tree/master/zh-cn/application-dev/ui)中各场景的开发示例,展示在工程中,帮助开发者更好地理解ArkUI提供的组件及组件属性、状态管理并合理使用。该工程中展示的代码详细描述可查如下链接: + +[组件内状态变量迁移指导](https://gitcode.com/tianlongdevcode/docs_zh/blob/master/zh-cn/application-dev/ui/state-management/arkts-v1-v2-migration-inner-component.md)。 + + +### 1. [组件内状态变量迁移指导] +### 效果预览 + +| 列表 | 示例 +|------------------------------------|--------------------------------------| +| ![](screenshots/device/image1.png) | ![](screenshots/device/image2.png) | + +### 使用说明 + +1. 在主界面,可以点击对应卡片,选择需要参考的组件示例。 + +2. 在组件目录选择详细的示例参考。 + +3. 进入示例界面,查看参考示例。 + +4. 通过自动测试框架可进行测试及维护。 + +### 工程目录 +``` +entry/src/main/ets/ +|---entryability +|---pages +| |---componentstatemigration //组件内状态变量迁移指导 +| | |---StateEasyV1.ets //V1 @State装饰器 +| | |---StateEasyV2.ets //V2 @Local装饰器 +| | |---StateComplexV1.ets //V1 @State装饰器 +| | |---StateComplexV2.ets //V2 @ObservedV2和@Trace装饰器 +| | |---StateExternalInitializationV1.ets //V1 @State装饰器 +| | |---StateExternalInitializationV2.ets //V2 @Param和@Once装饰器 +| | |---LinkMiigrationV1.ets //V1 @Link装饰器 +| | |---LinkMiigrationV2.ets //V2 @Param和@Event装饰器 +| | |---PropEasyV1.ets //V1 @Prop装饰器 +| | |---PropEasyV2.ets //V2 @Param装饰器 +| | |---PropComplexV1.ets //V1 @Prop装饰器 +| | |---PropComplexV2.ets //V2 @Param装饰器 +| | |---PropSubComponentUpdateVarV1.ets //V1 @Prop装饰器 +| | |---PropSubComponentUpdateVarV2.ets //V2 @Param和@Once装饰器 +| | |---PropSubComponentUpdateVarLocalV1.ets //V1 @Prop装饰器 +| | |---PropSubComponentUpdateVarLocalV2.ets //V2 @Param和@Once、@Monitor装饰器 +| | |---ProvideAliasV1.ets //V1 @Provide和@Consume装饰器 +| | |---ProvideAliasV2.ets //V2 @Provider和@Consumer装饰器 +| | |---ProvideConsumeNoInitV1.ets //V1 @@Provide和@Consume装饰器 +| | |---ProvideConsumeInitV2.ets //V2 @Provider和@Consumer装饰器 +| | |---ProvideParentInitV1.ets //V1 @Provide和@Consume装饰器 +| | |---ProvideParentNoInitV2.ets //V2 @Provider和@Consumer装饰器 +| | |---ProvideNoAllowOverrideV1.ets /V1 @Provide和@Consume装饰器 +| | |---ProvideAllowOverrideV2.ets //V2 @Provider和@Consumer装饰器 +| | |---WatchSingleVarV1.ets /V1 @Watch 装饰器 +| | |---WatchSingleVarV2.ets //V2 @Monitor装饰器 +| | |---WatchMoreVarV1.ets /V1 @Watch 装饰器 +| | |---WatchMoreVarV2.ets //V2 @Monitor装饰器 +| | |---ComputedV1.ets /V1 @State装饰器 +| | |---ComputedV2.ets //V2 @Computed装饰器 +|---pages +| |---Index.ets // 应用主页面 +entry/src/ohosTest/ +|---ets +| |---ComponentStateMigration.test.ets // 组件内状态变量迁移指导示例代码测试代码 +``` + +### 具体实现 + +1. 复杂类型迁移需补全观察能力 + + V1 的 @State 可直接观察复杂对象第一层属性变化,V2 的 @Local 仅观察对象自身。实际改造时,需先在复杂类上添加 @ObservedV2 装饰器,再在需追踪的属性上标注 @Trace,例如 Child 类的 value 属性,确保对象内部变化能触发 UI 更新。 + +2. 双向/单向绑定逻辑需重构 + + 双向绑定(V1@Link)迁移时,需拆分为 V2 的 @Param(父到子传值)+@Event(子触发父更新),通过子组件调用 @Event 回调修改父组件状态;单向绑定(V1@Prop)若需子组件修改值,需用 @Param+@Once 组合,若需父组件后续更新仍同步子组件,需额外搭配 @Monitor 监听父值变化并覆写子组件本地变量。 + +3. 计算与监听能力需适配新装饰器 + + V1 无计算属性时重复的表达式(如拼接姓名),V2 需定义 @Computed 修饰的 getter 方法(如 fullName),实现一次计算多处复用;变量监听(V1@Watch)迁移为 V2@Monitor 后,可在单个回调中监听多个变量(如同时监听 apple 和 orange),并通过 monitor.value () 获取变化前后的值,减少回调函数数量。 + +### 相关权限 + +不涉及。 + +### 依赖 + +不涉及。 + +### 约束与限制 + +1.本示例仅支持标准系统上运行, 支持设备:RK3568。 + +2.本示例为Stage模型,支持API21版本SDK,版本号:6.0.0.33,镜像版本号:OpenHarmony_6.0.0.33。 + +3.本示例需要使用DevEco Studio 6.0.0 Release (Build Version: 6.0.0.858, built on September 24, 2025)及以上版本才可编译运行。 + +### 下载 + +如需单独下载本工程,执行如下命令: + +```` +git init +git config core.sparsecheckout true +echo code/DocsSample/ArkUISample/StateMigrationProject > .git/info/sparse-checkout +git remote add origin https://gitCode.com/openharmony/applications_app_samples.git +git pull origin master +```` \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/build-profile.json5 b/ArkUIKit/StateMigrationProject/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..692c5fdfb8ae6c256cd5ba9bdf86a337693113c3 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/build-profile.json5 @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "app": { + "signingConfigs": [ + + ], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compileSdkVersion": "6.0.0(20)", + "compatibleSdkVersion": "6.0.0(20)", + "targetSdkVersion": "6.0.0(20)", + "runtimeOS": "HarmonyOS", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/code-linter.json5 b/ArkUIKit/StateMigrationProject/code-linter.json5 new file mode 100644 index 0000000000000000000000000000000000000000..039b73502077ce0501502ab4331c1d0d8dedf7d0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/code-linter.json5 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "files": [ + "**/*.ets" + ], + "ignore": [ + "**/src/ohosTest/**/*", + "**/src/test/**/*", + "**/src/mock/**/*", + "**/node_modules/**/*", + "**/oh_modules/**/*", + "**/build/**/*", + "**/.preview/**/*" + ], + "ruleSet": [ + "plugin:@performance/recommended", + "plugin:@typescript-eslint/recommended" + ], + "rules": { + "@security/no-unsafe-aes": "error", + "@security/no-unsafe-hash": "error", + "@security/no-unsafe-mac": "warn", + "@security/no-unsafe-dh": "error", + "@security/no-unsafe-dsa": "error", + "@security/no-unsafe-ecdsa": "error", + "@security/no-unsafe-rsa-encrypt": "error", + "@security/no-unsafe-rsa-sign": "error", + "@security/no-unsafe-rsa-key": "error", + "@security/no-unsafe-dsa-key": "error", + "@security/no-unsafe-dh-key": "error", + "@security/no-unsafe-3des": "error", + "@performance/lottie-animation-destroy-check": "suggestion" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build-profile.json5 b/ArkUIKit/StateMigrationProject/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..9016faf39f8a65cf648bae246a53575510fe8b9f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build-profile.json5 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "apiType": "stageMode", + "buildOption": { + "resOptions": { + "copyCodeResource": { + "enable": false + } + } + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/config/buildConfig.json b/ArkUIKit/StateMigrationProject/entry/build/config/buildConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..29431a8dcaed17d457eec6722b793862b9190983 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/config/buildConfig.json @@ -0,0 +1 @@ +{"compileConfig":{"deviceType":"default","buildMode":"debug","compilerType":"ark","note":"false","logLevel":"3","hapMode":"false","img2bin":"true","Path":"D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\tools\\node\\","projectProfilePath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\build-profile.json5","localPropertiesPath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\local.properties","appResource":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\res\\default\\ResourceTable.txt","cachePath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\cache\\default\\default@CompileArkTS\\esmodule\\debug","aceBuildJson":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\loader\\default\\loader.json","aceModuleJsonPath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\res\\default\\module.json","aceSoPath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\loader_out\\default\\nativeDependencies.txt","aceModuleRoot":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets","aceModuleBuild":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\loader_out\\default\\ets","aceProfilePath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\res\\default\\resources\\base\\profile","aceSuperVisualPath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\supervisual","watchMode":"false"},"patchConfig":{"changedFileList":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\patch\\default\\changedFileList.json"}} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/.ts_checker_cache b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/.ts_checker_cache new file mode 100644 index 0000000000000000000000000000000000000000..3115660033619b92a75a846caf4724d32f38710c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/.ts_checker_cache @@ -0,0 +1,1978 @@ +{ + "runtimeOS": "HarmonyOS", + "sdkInfo": "false:20:6.0.0.47:Release", + "fileList": { + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityConstant.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.appManager.d.ts" + ], + "parent": [ + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entryability\\EntryAbility.ets", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Ability.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.EnvironmentCallback.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.ConfigurationConstant.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entryability\\EntryAbility.ets", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Configuration.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Ability.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.rpc.d.ts" + ], + "parent": [ + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entryability\\EntryAbility.ets", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityLifecycleCallback.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entryability\\EntryAbility.ets", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.dialogRequest.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\abilityResult.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.unifiedDataChannel.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\startAbilityParameter.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AppServiceExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\embedded_component.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.hilog.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entryability\\EntryAbility.ets", + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entrybackupability\\EntryBackupAbility.ets", + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\PropSubComponentUpdateVarLocalV2.ets", + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\WatchSingleVarV1.ets", + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\WatchSingleVarV2.ets", + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\WatchMoreVarV1.ets", + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\WatchMoreVarV2.ets" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\BaseContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.ConfigurationConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entryability\\EntryAbility.ets", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityLifecycleCallback.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\component\\navigation.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\folder_stack.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\nav_destination.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\navigation.d.ts" + ], + "error": false + }, + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entryability\\EntryAbility.ets": { + "mtimeMs": 1761463405606.0278, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.ConfigurationConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.hilog.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.appManager.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ProcessInformation.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationStateObserver.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStateData.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AppStateData.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ProcessData.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ProcessInformation.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.appManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.resourceManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.rpc.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.mediaquery.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.inspector.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.promptAction.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.router.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.observer.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\component\\navigation.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.componentSnapshot.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.dragController.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.unifiedDataChannel.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityHelper.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.rdb.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimodalInput.pointer.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneResources.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\embedded_component.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\nav_destination.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\navigation.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\pattern_lock.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\video.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.web.webview.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.security.cert.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.security.cryptoFramework.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.print.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ProcessInformation.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.appManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.appManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationStateObserver.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AppStateData.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStateData.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ProcessData.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.appManager.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStateData.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.appManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationStateObserver.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AppStateData.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.appManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationStateObserver.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ProcessData.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.appManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationStateObserver.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Metadata.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ElementName.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ApplicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\AbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\BundleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ExtensionAbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Skill.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ProcessInformation.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ApplicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\AbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\BundleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ExtensionAbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Metadata.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ApplicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\AbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ExtensionAbilityInfo.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ElementName.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\connectOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.CompletionHandler.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ApplicationInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Metadata.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\global\\resource.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\AbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\BundleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ExtensionAbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\AbilityInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ApplicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Metadata.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Skill.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\BundleInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ApplicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\AbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ExtensionAbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Metadata.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\BundleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStageContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ExtensionAbilityInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ApplicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Metadata.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Skill.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\Skill.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\AbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ExtensionAbilityInfo.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\global\\resource.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ApplicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.resourceManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\units.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Ability.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Configuration.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\connectOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.dialogRequest.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AtomicServiceOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.ConfigurationConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIServiceProxy.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIServiceExtensionConnectCallback.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStartCallback.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\AbilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\abilityResult.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.OpenLinkOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Configuration.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.observer.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\EmbeddableUIAbilityContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.rpc.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\connectOptions.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Configuration.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.ConfigurationConstant.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Ability.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.EnvironmentCallback.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStageContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\BaseContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.rdb.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.colorSpaceManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.resourceManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.rpc.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.drawableDescriptor.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.componentSnapshot.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.unifiedDataChannel.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\PhotoEditorExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimodalInput.pointer.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.web.webview.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.font.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.mediaquery.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.inspector.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.promptAction.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.router.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.componentUtils.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.animator.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.observer.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.animator.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.measure.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.componentSnapshot.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.dragController.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimodalInput.pointer.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\BuilderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\ComponentContent.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\NodeController.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\XComponentNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\BuilderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\BuilderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\BuilderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\NodeController.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\RenderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\XComponentNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Content.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\ComponentContent.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\NodeContent.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\content_slot.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\node_container.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.colorSpaceManager.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.resourceManager.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\global\\rawFileDescriptor.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\global\\resource.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.drawableDescriptor.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\global\\rawFileDescriptor.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.resourceManager.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.drawableDescriptor.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.resourceManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\image.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.font.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.mediaquery.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.inspector.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.promptAction.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\action_sheet.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\alert_dialog.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\custom_dialog_controller.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.router.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.componentUtils.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.animator.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.observer.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\component\\navigation.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.measure.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.componentSnapshot.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.dragController.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.unifiedDataChannel.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStageContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\BaseContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\FormExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\EventHub.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityHelper.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStartCallback.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\connectOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\VpnExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\EmbeddableUIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\PhotoEditorExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIServiceProxy.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIServiceExtensionConnectCallback.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AppServiceExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\abilityResult.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimodalInput.pointer.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\BuilderNode.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\ComponentContent.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\XComponentNode.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\NodeController.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\RenderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\ComponentContent.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\BuilderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\NodeController.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\XComponentNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\NodeContent.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\canvas.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.common2D.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\global\\resource.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\BuilderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\RenderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\NodeController.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\particle.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\units.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\RenderNode.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\XComponentNode.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\BuilderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Content.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\ComponentContent.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\NodeContent.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\ComponentContent.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\BuilderNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Content.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\NodeContent.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Content.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.common2D.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.colorSpaceManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\global\\resource.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\canvas.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.text.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.common2D.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.text.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\component\\navigation.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.observer.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\connectOptions.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ElementName.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.rpc.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AppServiceExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.dialogRequest.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AtomicServiceOptions.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.CompletionHandlerForAtomicService.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIServiceProxy.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIServiceExtensionConnectCallback.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStartCallback.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\abilityResult.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\abilityResult.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStartCallback.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\PhotoEditorExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\EventHub.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ApplicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\BaseContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.resourceManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.contextConstant.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStageContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.print.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.OpenLinkOptions.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.contextConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.bundleManager.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.CompletionHandler.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AtomicServiceOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AppServiceExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.CompletionHandlerForAtomicService.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AtomicServiceOptions.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.contextConstant.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.CompletionHandler.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ElementName.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\EventHub.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ProcessInformation.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.ConfigurationConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityLifecycleCallback.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.EnvironmentCallback.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.ApplicationStateChangeCallback.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityLifecycleCallback.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.UIAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.EnvironmentCallback.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AbilityConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Configuration.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.ApplicationStateChangeCallback.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ApplicationContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.unifiedDataChannel.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.dragController.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\abilityResult.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\connectOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.AtomicServiceOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.OpenLinkOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.ConfigurationConstant.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIServiceProxy.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIServiceExtensionConnectCallback.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AbilityStageContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Configuration.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\HapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Configuration.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundleManager\\ExtensionAbilityInfo.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\FormExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\VpnExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\PhotoEditorExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AppServiceExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.file.BackupExtensionContext.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\FormExtensionContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityHelper.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\data\\rdb\\resultSet.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityOperation.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityResult.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.dataAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.rdb.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\VpnExtensionContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\EmbeddableUIAbilityContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\UIAbilityContext.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\PhotoEditorExtensionContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\abilityResult.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\AppServiceExtensionContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\connectOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.StartOptions.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\data\\rdb\\resultSet.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityHelper.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.rdb.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityOperation.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.dataAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.rdb.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityHelper.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityResult.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityHelper.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.dataAbility.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.rdb.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityHelper.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityOperation.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.rdb.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\data\\rdb\\resultSet.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\BaseContext.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityHelper.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityOperation.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.dataAbility.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\startAbilityParameter.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\abilityResult.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\appVersionInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityHelper.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\connectOptions.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\processInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\dataAbilityOperation.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\ability\\startAbilityParameter.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\appVersionInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\applicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\processInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\elementName.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\BaseContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\hapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\appVersionInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\abilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\processInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.ability.featureAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\applicationInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\moduleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\customizeData.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\abilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\bundleInfo.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\elementName.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\hapModuleInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\abilityInfo.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\bundleInfo.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\abilityInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\applicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\customizeData.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\hapModuleInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\bundleInfo.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\applicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\abilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\bundleInfo.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\app\\context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\abilityInfo.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\moduleInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\applicationInfo.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\customizeData.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\applicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\abilityInfo.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\bundleInfo.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\abilityInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\applicationInfo.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\bundle\\hapModuleInfo.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.bundle.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.application.BackupExtensionAbility.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.file.BackupExtensionContext.d.ts" + ], + "parent": [ + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entrybackupability\\EntryBackupAbility.ets" + ], + "error": false + }, + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\entrybackupability\\EntryBackupAbility.ets": { + "mtimeMs": 1761463405607.0276, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.hilog.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.application.BackupExtensionAbility.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.application.BackupExtensionAbility.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.file.BackupExtensionContext.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\ExtensionContext.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.application.BackupExtensionAbility.d.ts" + ], + "error": false + }, + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\PropSubComponentUpdateVarLocalV2.ets": { + "mtimeMs": 1761463405611.0283, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.hilog.d.ts" + ], + "parent": [], + "error": false + }, + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\WatchSingleVarV1.ets": { + "mtimeMs": 1761551441268.3047, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.hilog.d.ts" + ], + "parent": [], + "error": false + }, + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\WatchSingleVarV2.ets": { + "mtimeMs": 1761551441268.3047, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.hilog.d.ts" + ], + "parent": [], + "error": false + }, + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\WatchMoreVarV1.ets": { + "mtimeMs": 1761551441267.3047, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.hilog.d.ts" + ], + "parent": [], + "error": false + }, + "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\ets\\pages\\componentstatemigration\\WatchMoreVarV2.ets": { + "mtimeMs": 1761551441267.3047, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.hilog.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\action_sheet.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.promptAction.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.promptAction.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\alert_dialog.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.promptAction.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\canvas.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\FrameNode.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.uniformTypeDescriptor.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimodalInput.intentionCode.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\ImageModifier.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\SymbolGlyphModifier.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.shape.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.matrix4.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\image.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.uiEffect.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.theme.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\with_theme.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\common.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.dragController.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.dragController.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimodalInput.pointer.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.unifiedDataChannel.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.unifiedDataChannel.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.uniformTypeDescriptor.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.unifiedDataChannel.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.data.unifiedDataChannel.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimodalInput.intentionCode.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\ImageModifier.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\SymbolGlyphModifier.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.shape.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.shape.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.shape.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.shape.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.matrix4.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.observer.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.observer.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.observer.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.UIContext.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.uiEffect.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.uiEffect.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\ComponentContent.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.theme.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.promptAction.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.scene.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\ScenePostProcessSettings.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneTypes.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneResources.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneNodes.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\Scene.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\component3d.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\component3d.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.scene.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\ScenePostProcessSettings.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.scene.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneNodes.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneTypes.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.scene.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneResources.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneNodes.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\Scene.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneResources.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneTypes.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.scene.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneNodes.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\Scene.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneNodes.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneResources.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneTypes.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\ScenePostProcessSettings.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\Scene.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.scene.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\Scene.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\Scene.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneResources.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneNodes.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneTypes.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.scene.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\graphics3d\\SceneNodes.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\content_slot.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\custom_dialog_controller.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.promptAction.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\embedded_component.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.app.ability.Want.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\folder_stack.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\image.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.drawableDescriptor.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.matrix4.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\nav_destination.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\navigation.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.window.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\node_container.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.node.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\particle.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\pattern_lock.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\CommonModifier.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\tabs.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\tabs.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\CommonModifier.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.text.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.drawing.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.common2D.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\text_common.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\text_common.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.text.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.text.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.text.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.text.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.text.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.graphics.text.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.intl.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\time_picker.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\time_picker.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.intl.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\with_theme.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.arkui.theme.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\units.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\global\\resource.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\arkui\\Graphics.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\video.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.web.webview.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.security.cert.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.multimedia.image.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.print.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.web.netErrorList.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\web.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\build-tools\\ets-loader\\declarations\\web.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.web.webview.d.ts" + ], + "parent": [], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.security.cert.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.security.cryptoFramework.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.web.webview.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.print.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts", + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\application\\Context.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.web.webview.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.web.netErrorList.d.ts": { + "mtimeMs": 1758690718000, + "children": [], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.web.webview.d.ts" + ], + "error": false + }, + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.security.cryptoFramework.d.ts": { + "mtimeMs": 1758690718000, + "children": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.base.d.ts" + ], + "parent": [ + "D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\openharmony\\ets\\api\\@ohos.security.cert.d.ts" + ], + "error": false + } + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo new file mode 100644 index 0000000000000000000000000000000000000000..8a6eacc17763d4de2f9858409e62cd4fc80b2a97 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es5.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2016.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.core.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.collection.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.generator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.iterable.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.promise.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.proxy.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.reflect.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.symbol.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2016.array.include.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.object.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.promise.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.regexp.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.array.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.object.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.symbol.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.bigint.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.date.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.promise.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.number.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.promise.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.weakref.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.base.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/metadata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/elementname.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.want.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/global/resource.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/applicationinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/skill.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/abilityinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/extensionabilityinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/hapmoduleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/bundleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.bundle.bundlemanager.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/processinformation.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/appstatedata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/abilitystatedata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/processdata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/applicationstateobserver.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.appmanager.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.abilityconstant.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.configurationconstant.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.configuration.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.ability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/basecontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.colorspacemanager.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/global/rawfiledescriptor.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.drawabledescriptor.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.resourcemanager.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.rpc.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.multimedia.image.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.font.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.mediaquery.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.inspector.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.promptaction.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.router.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.componentutils.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.common2d.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.drawing.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/graphics.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/rendernode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/content.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/componentcontent.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/framenode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/buildernode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/nodecontroller.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/xcomponentnode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/nodecontent.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.node.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.animator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/connectoptions.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.dialogrequest.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.completionhandlerforatomicservice.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.contextconstant.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.completionhandler.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.startoptions.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.atomicserviceoptions.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/uiserviceproxy.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/uiserviceextensionconnectcallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/abilityresult.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/abilitystartcallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/eventhub.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.abilitylifecyclecallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.environmentcallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.applicationstatechangecallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/applicationcontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/context.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.openlinkoptions.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/uiabilitycontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/component/navigation.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.observer.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.measure.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.componentsnapshot.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.data.unifieddatachannel.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.dragcontroller.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/extensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/uiextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/abilitystagecontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/formextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/data/rdb/resultset.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/startabilityparameter.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/app/appversioninfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/moduleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/customizedata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/applicationinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/app/processinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/elementname.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/bundleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.bundle.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/abilityinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/hapmoduleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/app/context.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.ability.featureability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.data.rdb.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.data.dataability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/dataabilityoperation.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/dataabilityresult.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/dataabilityhelper.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/vpnextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/embeddableuiabilitycontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/photoeditorextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/appserviceextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.common.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.multimodalinput.pointer.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.uicontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.window.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.uiability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.hilog.d.ts","../../../../../../src/main/ets/entryability/entryability.ets","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.file.backupextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.application.backupextensionability.d.ts","../../../../../../src/main/ets/entrybackupability/entrybackupability.ets","../../../../../../src/main/ets/pages/index.ets","../../../../../../src/main/ets/pages/componentstatemigration/stateeasyv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/stateeasyv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/statecomplexv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/statecomplexv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/stateexternalinitializationv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/stateexternalinitializationv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/linkmiigrationv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/linkmiigrationv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/propeasyv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/propeasyv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/propcomplexv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/propcomplexv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/propsubcomponentupdatevarv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/propsubcomponentupdatevarv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/propsubcomponentupdatevarlocalv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/propsubcomponentupdatevarlocalv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/providealiasv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/providealiasv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideconsumenoinitv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideconsumeinitv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideparentinitv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideparentnoinitv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/providenoallowoverridev1.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideallowoverridev2.ets","../../../../../../src/main/ets/pages/componentstatemigration/watchsinglevarv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/watchsinglevarv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/watchmorevarv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/watchmorevarv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/computedv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/computedv2.ets","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/action_sheet.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/alert_dialog.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/alphabet_indexer.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/badge.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/blank.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/button.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/calendar_picker.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/canvas.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/checkbox.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/checkboxgroup.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/circle.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/column.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/column_split.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.data.uniformtypedescriptor.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.multimodalinput.intentioncode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/imagemodifier.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/symbolglyphmodifier.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.shape.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.matrix4.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.uieffect.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.theme.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/common.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/common_ts_ets_api.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/scenepostprocesssettings.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/scenetypes.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/sceneresources.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/scene.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/scenenodes.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.scene.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/component3d.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/container_span.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/content_slot.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/context_menu.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/counter.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/custom_dialog_controller.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/data_panel.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/date_picker.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/divider.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/ellipse.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/embedded_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/enums.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/featureability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/flex.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/flow_item.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/focus.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/folder_stack.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/form_link.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/for_each.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/gauge.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/gesture.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/global.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/grid.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/griditem.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/grid_col.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/grid_container.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/grid_row.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/hyperlink.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/image.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/image_animator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/image_common.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/image_span.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/lazy_for_each.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/lazy_grid_layout.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/line.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/list.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/list_item.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/list_item_group.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/loading_progress.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/matrix2d.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/marquee.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/menu.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/menu_item.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/menu_item_group.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/nav_destination.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/nav_router.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/navigation.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/navigator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/node_container.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/page_transition.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/panel.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/particle.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/paste_button.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/path.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/pattern_lock.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/polygon.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/polyline.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/progress.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/qrcode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/radio.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/rating.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/rect.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/refresh.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/relative_container.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/repeat.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/rich_editor.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/rich_text.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/row.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/row_split.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/save_button.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/scroll.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/scroll_bar.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/search.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/security_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/select.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/shape.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/slider.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/span.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/stack.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/state_management.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/stepper.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/stepper_item.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/swiper.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/indicatorcomponent.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/symbolglyph.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/symbol_span.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/commonmodifier.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/tabs.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/tab_content.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_area.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_clock.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.text.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_common.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_input.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_picker.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_timer.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/time_picker.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/toggle.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/toolbar.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/with_theme.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/units.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/video.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.security.cryptoframework.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.security.cert.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.print.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.web.neterrorlist.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.web.webview.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/web.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/xcomponent.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/sidebar.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/water_flow.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/styled_string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/index-full.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/animator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/calendar.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/form_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/media_cached_image.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/plugin_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/root_scene.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/screen.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/window_scene.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/ability_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/remote_window.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/effect_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/ui_extension_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/isolated_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/linearindicator.d.ts"],"fileInfos":[{"version":"be8b901880718680b6c067fd8083bd5b04cde401c1e1123823e3068bb2e0d282","affectsGlobalScope":true},"e8d2e50f9e8fdd312d31f97571b4c7295b8f29f7f8363498edae2a9eb113ee36","4b1854aec637e8e041eff02899e16fd3c0c78685c622336aadfd67e6604bbe1b","d6f7d47355a0167969e9a8eedfb0994f21e038d360965ec06c30f6871038900b","4735756aff7c5857de387f321633f272e2daba4950c427ab200de954340c7c13","13dfb22c1b46f9858b19fc7df54674146f3d174ccd35f0e02e8d05a3026b9ba8","33d21bcca0f7b054d0d0d402125f547c9ac77782c2df301de314143f08e81406","80510205fb587019e1ad42bfbc046d4f55f3c5a1c8b3debca7d6fe0adc93959f",{"version":"276144a8254bed55adae6f0646c37a2cd11575ac2cbc679bf7ac0419c443fd58","affectsGlobalScope":true},{"version":"3523038578cadf637fdce58f06018e144fd5b26c12e3f9c1cef14cdf92ca3d20","affectsGlobalScope":true},{"version":"28065193ddf88bf697915b9236d2d00a27e85726563e88474f166790376e10d8","affectsGlobalScope":true},{"version":"511c964513d7c2f72556554cdeb960b4f0445990d11080297a97cc7b5fa1bb68","affectsGlobalScope":true},{"version":"725daac09ec6eb9086c2bea6bbdf6d6ab2a6f49d686656c6021a4da0415fe31f","affectsGlobalScope":true},{"version":"21574b67bbedcb39a6efa00ca47e5b9402946a4d4e890abd5b51d3fd371819ba","affectsGlobalScope":true},{"version":"2415a2b1a4a521594b9837316ae3950b0c0c2f8b689defd358986bf3e263e904","affectsGlobalScope":true},{"version":"e5d8d715990d96a37f3521a3f1460679507b261eec1b42dc84d4de835997b794","affectsGlobalScope":true},{"version":"93fa2a84417c65ab8ed121a0b84536312e00a11cbf45b0006a75324d00b176d2","affectsGlobalScope":true},{"version":"a003a6051b48dc64eaa8ad83789e4c2a540f3482bed821053b6770969bd598fb","affectsGlobalScope":true},{"version":"e90857fa86cecc3bc964a2d7db9d95a0c406bebfadeb4853a01a0079936f12f7","affectsGlobalScope":true},{"version":"8bbb03589e48f10b49996064f35256e858d205dcb364428fb4cc045061b1d786","affectsGlobalScope":true},{"version":"5044747370afee4b4c247e8a14c2969d245bbcf8396295dc5a60c659d796a71f","affectsGlobalScope":true},{"version":"8e4921934f4bec04df1bee5762a8f4ad9213f0dab33ea10c5bb1ba1201070c6a","affectsGlobalScope":true},{"version":"a894424c7058bcc77c1a3c92fe289c0ff93792e583e064c683d021879479f7b8","affectsGlobalScope":true},{"version":"8f03386d697248c5d356fd53f2729b920ea124cd1414a6c22de03c5d24729277","affectsGlobalScope":true},{"version":"21ac76354ecc1324ee2e31ac5fcebfa91b1b6beb3e8c3fe6f3988538e9629c73","affectsGlobalScope":true},{"version":"ecc058373716a6bb19a4492ac553b61e3ebc0eb657407b6ea62337316885b64b","affectsGlobalScope":true},{"version":"fe7acdc1039eca904399190766d1c8766b7d2621413f972c8542dddd69612097","affectsGlobalScope":true},{"version":"c25aa843b930662d62f0e853dd1f347d08b66cdec09bd760151d4ba6ce220fe6","affectsGlobalScope":true},{"version":"3e47477f297e4fa0d556c40a872c2c45bddefa487fd054bf1f80bceb527a682b","affectsGlobalScope":true},{"version":"a902be9f4116b449dbac07ffe3f4d69abb664f8eddfaeb892225612469213788","affectsGlobalScope":true},{"version":"155d8d1e367e05af5e5708a860825785f00eabae01744cf7bc569664301415a4","affectsGlobalScope":true},{"version":"5b30b81cdeb239772daf44e6c0d5bf6adec9dbf8d534ed25c9a0e8a43b9abfff","affectsGlobalScope":true},{"version":"cdb77abf1220d79a20508bbcfddf21f0437ea8ef5939ba46f999c4987061baab","affectsGlobalScope":true},{"version":"62e02a2f5889850ed658dfde861b2ba84fb22f3663ea3b2e2f7fb3dcd1813431","affectsGlobalScope":true},{"version":"357921f26d612a4c5ac9896340e6a2beffcaf889ff5cdfcc742e9af804d1a448","affectsGlobalScope":true},{"version":"d836a4258d6b5ee12054b802002d7c9c5eb6a1adb6a654f0ee9429cbda03e1a0","affectsGlobalScope":true},{"version":"c021bff90eb33d29edfde16c9b861097bbf99aa290726d0d0ac65330aa7be85a","affectsGlobalScope":true},{"version":"1c4e64dc374ea5922d7632a52b167187ba7c7e35b34d3c1e22625be66ca1576d","affectsGlobalScope":true},{"version":"cd1bebc4db8fb52c5618ecad3f511f62c78921451c198220c5b2ee5610b4d7b9","affectsGlobalScope":true},{"version":"fb60e7c9de1306648f865b4c8ef76b7376731af3955b69551004ad3848fb8f4c","affectsGlobalScope":true},{"version":"18d23591bba5678cf57ef139e1a3daad8017b26ad6612c8c34d6fa39044b245f","affectsGlobalScope":true},{"version":"868df11ccdabb6de564f70b68aa6b379a243ef32c8f6ee6dc71056a3dd54578a","affectsGlobalScope":true},{"version":"cebef4c7f9b6afb02cd08e7288fab05d0be3e3c898c720775b8aa286e9f7cfed","affectsGlobalScope":true},{"version":"7e3c49afe9bf537f68ce2487d7996c6e5c2350c0f250939726add1efcb1bcf01","affectsGlobalScope":true},{"version":"c7673e88666f933b0d007e82e42b60e85cf606ec247033e8ee5ab5940e4be206","affectsGlobalScope":true},"18c90c5c0cc77bce15249c3b628f54126680dca8e8f800ae13c6827577d8d7ff","0885aa6e52133b13da14bd23c6e2923eb41f6587004d566b7fdcd643003f85dd","41c21e94cc18d83501abacdaf56f29ffa89e64a6dd5449580a53f7c834d487fc","734f6e14694c64bd97f1043a47397565d098937d35301b18c8670612a4e159cf","ff3b80b87f5c428ff03782f0036d2056e1f371b828f5fd1397064730c35c1c2a","76d8f54d8fa8b072116d014f52f4461a30652dc66260903f4897cbe7838ce373","5c5627008db0c037c148380ab9ed21004ad2e33df3c693a5f750a84fdb182c34","b2b5603060e1d6b2982cb5670e4c9f2864b185276e63bbc903d3a9c17ecdbfb0","90e2871e53f616739841e476f3054c5ae40255095aa2e7459222c4dc15e838b0","783616dbe6f5eb8691d1c390e7b089cbadafa32bd00b0c70c04d41407a761d69","1e597215fe046a63746dba7c4858158640e2604eedf9846eae6b349124ee29b9","ae2e5abe87b1a08b722b2eb1480ed06320c3f3f4d0d6dc44e66d08ec329d66ef","21930bd35ce5693ef61bd468014596dfaa5bd6b6c2d4f59f60844fac0eee384d","84912c4054b88f51a421edac0e72c3afffa6e13234d81b9a1aab9c9336830ce4","d6b557c3349079a11c7699cc680f0a9c9f709a09019d45e5e065985ea3919e9b","d720df61b68e1ac759fb8ee19a85b2d64d5fadc4f0f4a8c8e7b55df67a3f1775","acba4d1a0998ac6561b9a1aa15c6b1125f769f046cb38d325856a40b768cdaca","f3aeea828c0af07cee7cfacc5f7f5dd5c7f3e67d8bb63ab279c61c0642194d7c","620b7c31b289e834d976fa4c5dfd04ed9f0923ee5f7641b86fcd532baf2565b6","59076a01123585639ac35ad1ba8fd1acceee2335fe1ffcbf032d38925e47bce1","16820b43a1c139ef435c5dad03ec2a7f91c6e0fed732691ecba152ed1b44cd52","2478abad18abd3df6315d031c62f01f83a91caa634f35b17465df224608a8ac0","a8e07c1a2f8475fbab17dda22a5f51e2d26fbc39603cf3b18f9c0ae2b519e55e","9e35cb3a784322d79f1fc3e5f1f838baccf6e4897b1ba7ca58a0e85f5c62d392","2900121efc03a6a977643fe47b1f57f5d23e2ab7b4cac525ff41f6bd481ca52f","c855e91f562922633a8cbb28b6bf142242a831d861ba23475744253f5e37b95b","024f0f2569c643dc83c8e4ef7432a00186d101e7424132f88fb452f311b5d884","7b5f82b0e0cdc724a3b14a9c8bfce48ca8a5e70fa25f3f55503c4aeb84d0815e","fe89cfcf174d05ce0e14b241b1f456e98100506442bc434c254b457175043d64","a0577605aac5da0b747b491593a469584f0005416e52dce21fbb970abcd115e2","be201049e4d4638501f377c34d5318a68b41548a1a2ee577a306aabfedb05c93","95fdeb811613fe4b7db3766ace5232f7b0830a84bc4eeb5db6fa7c327d1fbbfe","9f17874d37b0bb6bc111469635ff0abddaa39c615d5459354044e5b920d8c095","ae6fbbd727e947b2214d28fb53875d98fee0cc796ece51d34f42475c0b5dfe69","7b071796c9afe1026dbc08854bd73d7f7085f97885a2699b45852808f9d3ce82","f83ee958f4e51ff58ec869784ca5403f66e111488d80ad8ed55e43fe96e79546","44f591ebb300365d6ebcda253431a049d45aa74c5717e58055d8b804bd2a8718","c59d5014d6310118454fe99540005aa81f41a72326eefd3d13ae3cb0a648b008","04d7628b1479c95bb2385477c283fdbf51afe60db51acf2449293c9303374cd8","16d269cca8715b0ca8b907859f6cce45f230f1b55a6429f267e4c5a8aa7f9d17","69634b06c488b31c03055d4544fddea21f84c1b0d052784ccd33ed6527b08131","b840440738eb0014fa755aecb6c49f70c907cca21c78a247b058156ae4bca715","329edb7e5e887dee7d365a60f139fc36de2f9a441abdd690c93bc5a45e467163","3f9b161e68bb7a52a3171cd1144254a968c8d2bb5b6b41ae30d93d5131aa5980","53a5c6a0ecdf633bea0a5ffdaeb9425b01c350ece3ef11b53301eb08bd9dbbf8","dc132b2bfd37756d5385b19a8972614ca9de8bf8264435096283230ce0d1fb2e","a480bb40ed9139c1886999772d83f2d46d4cbf86449af3c606dcca1dbc38d087","be0c35d4b8a3e29f1a98636e00b25ff9fde28e7b2a9eb7cda2c646f13751f1dc","5d1e8f9c86780f23962980d995e80f70cb90173100c4f3f1280c651c6dc22094","2238892eef3efdeaa60f96d62943897ca8c945dd6fb230ce71d2d9ce1989c30d","b77055b21a6390a1053cf3fd95a830c51b0a0b317e1639d0d029bfc637fc9984","0c98893d17a23b9b9a68328528d408ac9141b4d4e3fb5b2b38e6895c4f98aaed","a06221608f5d45845214ee4991743c1e7a6c91fa2addd3665d618abd1f940be1","5bf7782d5dc0ffb156bdb4b981e56c066247c252e7538a32efcf97ab6a65e5d4","45752fba2bcc8f837ba1eb959da11f22584ae2288b3cd0c8a0522c3aacbbd928","ee67d9b87041e39ed225a1c5e815d839985dfc9b6e12af1c96adef07b37251c7","c585cd71cd521f4373ff211223d2487faf3a467037b8e6ab0fa112551492b4c8","0cc5c94908b284934cc25e6bd28a612650b9644d64ce21248732f8ad95625cd5","105a88bf7880674f76b13a3100c47f22f72b2cbe30f42115bac1d45a772bd4a4","e6d653e5102c35235bf08d13b93ab1e229fe3fb4f734a06bf3e268f6be7fa0cd","500cd84a36eec70cf12d75d8db0482692947137231e5b56d729ee01d5799687e","486609fe99f6a3f875a7ec02440f1442f9f70d1b960b25e487d7172fff2145e0","7067a4950c4dfa1282ac4b2af9ea9d6f654ab9ca4874030b0ce08eba113bb788","5ba940e673cb292665db309eaf3cf3b6cd562c69c7d8343e92d351cafdda5de0","1415aaa37727b9d971f5d90855be88e9d6d0f91dedb5f448bac516232c0ec53e","1ee4140494ebdaa4971b592cb59603953c4f613a6707069292e04006a41eb4dd","bdc21c1c6547a171df6e036e256ea2a08ec3fff1259cef232f34b796e27cbdfa",{"version":"a1b442ee2c5708d05fa6267dafcfaaf9052aa5b1f2b96afd87d8bc768d5ffc2d","affectsGlobalScope":true},"6e44d700d4da368e0baa78517d2fd699302b6ef24908c9bfcb329e1a1ec4dae7","2fd4536b789dffa504fa1060d29618e0898f63635fc5b6ac8f8eaacc0e01a435","d73b0df62037fa7d8e447785395076fc48a7529a86d21951bba43b7c2c7e221b","ae34c262f096b945f4104faf1358983ee865fd67a31df058229ac2fc43cdc60e","18ae3d0c60ca49a89e37b243d5692b946f3863e6c6b2a5e2f806cd9fed499e81","ef2a7b4201827194eb706b950ef40889d0870f402e610cb096d86f0bb2d3bfda","33d2db33dbe83d05305a585bf6c0c083e825270b53c56ecc69584b3a6343903c","e15a16903c5239648c795bc68acdc833f6ae58daf7cbabad085e372ad2396a45","062845bbf8e7d38e456b9ad7d53248ba7e1c5b3f061edafddf0d3820488e6648","eb334428756c8c94fcf87fb74ff084f243de6595d19d5875a2e83cfdf645fd67","8e0622fd44e6fc146b3b431cd5433449bcc7660b555e6e6175926a5665353ad4","0fe10efa53a287daaccba7fa70bbf20820ead1cd0c011ad59248f04cea5f3534","6534aeb84fdb78bdf07dd551c70e5f859c28a08b00507446b1043c20526feb9d","59528c8bb0cd15a4e2b544547cd324bb3a1153ebd52beb99c1f36f5437bca908","7542f446bc5bc9148a8443618064cdd94ba23293716dc839ea17e79dee318b45","3a5f3b923aa0dbf9d743ee99961763d38576b11ba81dbcd1b90c046f52d6071e","53b8801feda0f792b5959291f0e760ed1e013a78fb4e22072b663a76eb47a368","e440c7066c19e60990f65eee96ecd5fe22cebf754376c0732a29ee4a11cfd2a4","7d81efdbf839fe9fd65d580a89b98cbde2d89a822d22e2e8e060921ddc93cc9f","f5c03ad15eee48dedd7bdef771d50369c70fa70b10523ab777e925a4c90dbbeb","e79dae84c8e3d36f8f47f2da99a824ebee5674af266cbf274355e1b058fb219b","8c804ac09102ae81cb3a5bd3698b0bbea4ee98bcf1c67ea28daf963e01743cc1","96c6b16e1aa7514e7df94ee86e534b8c06301470960072fac70099e93cf53efc","6c4a9afb20d47e984c4bf2e586b9652073cdf9f850cccee67a3eb4144ebdf147","2644ca9cd4f4d4f4192686f8df72f9e414341fcc40bf10383fe94d3ee7a148ac","383f35282369bbe076f1203bb8db614279bcdf69d3997a7ed8cd02b885aabcc9","64322c0908a6e5cce21f118b77e1bfa46ea39abb05fea77bb9369705e3b8cf47","97e9592d53be761c186124ada0363ffcf29efd028772f317e252e31edee3f84d","6e9801e6ddf7c3eeeda628c984737cadcfa7d075866ec59d0a66d0443aa3fd58","25d084c26f6956c51674a81f67ec88a0d6393e2582199243f06435ee0c2a88bb","bc6faa40ca044b14b715e85fef1ae84e35bd773a5aaad6b78f48d73da135e7b3","67819e5de1ef35de58abe6fcd4b48d4a9cbc9e7d3d72bdbef84366e06f8eacbd","4b6adcdca1b49c4a8dac544448a554be3dab44777a9e71dbcb616f5ae2a88cf3","eb5f405d8ca352dea6f605738c0ad6cced8837be60e64853ee067922d1bd0251","9037ebc6080ee87baf79279684015f7ebaa2a71c2b410707f0c7a5968e331ed3","0673364463a46eaccc54cada61bd168b63db49b4eafe73ef44bd3763dbfef653","0f5d7b3c98e25df635a065681dbbaf399e55459367ffb3c19169141a4704ead3","18d9c779b4f7ed8c70e708f992dfc5b0aa914460a83a1152d6456e1274fc6b11","3cadb4e33737fe417d3857edf0a8bf27029969ff3874532f22acf769943c229f","a98e4114fa6839755dce055ca4b9913ab27b0605a964ebdba14571d261fc57b9","c0dc66ec8a658536f71f7e5bf86971c960a7c8f886e76a9571ce66e950421493","cacebb42b85d8cfbf4517b65b10a68721082b4c52c1a5b5c5cb0c55074fc0060",{"version":"3d154b1b075dbb7bed02b5ab8f68a0275a78493f29e3038e83e178536e95ff99","affectsGlobalScope":true},{"version":"f20ec33ba6630168484cf0698a92548457e45ce43312e6b0d33d074a0cacf990","affectsGlobalScope":true},{"version":"c80ed986acf27425aec5faa13afa287ba3df69fc0dadaa4b6bf5fc8537009e1c","affectsGlobalScope":true},{"version":"dd50a2a8dd06ea90335c963e60e98aa378e4c2993b33437211e3afb80f94309d","affectsGlobalScope":true},{"version":"f95c6e42565445328c4e09ff35873c087df58c8529b3aa28e70622a24c02117d","affectsGlobalScope":true},{"version":"31c7550cb9f5317184eaf845f7c83e9d98262621ac293febd43f8f98effa344c","affectsGlobalScope":true},{"version":"61fc6f358ad76be01bacfe668150deded48e5be6fbb80b58364cd6a5baf1e07f","affectsGlobalScope":true},{"version":"7dd0ff60c32715ff69773c9813a75194c85f244757d381dd7eba8dc8fc651cc9","affectsGlobalScope":true},{"version":"b198bda06289d77f82d874cdd985aa24e7f7c844a4b6aa72881c8d372c79b40e","affectsGlobalScope":true},{"version":"c5d1b138838ce1d09ea9a93852d1cd04501f973fb944547676db8edb957a0135","affectsGlobalScope":true},{"version":"1252ac696b6680ff9837b9b501acad64e4fdba9740625bdd7cdf853a970af430","affectsGlobalScope":true},{"version":"62e46b083a3ce7db3b57961fe017808ba11544e4ae82e9c4d21272926e11bc15","affectsGlobalScope":true},{"version":"1e96215f6c263c431e91d4a2d10b4efc252ed683d3b71755aa0c2f699ca81a26","affectsGlobalScope":true},{"version":"221ec3c1cb10ff3e48e7c3da2ccbdf51e0cc3d43741703ad9420cd269590d562","affectsGlobalScope":true},{"version":"49a7b0ece04b3e273995008d76868658dcf26e1c1d85e7c2d3729ec6cb27f790","affectsGlobalScope":true},{"version":"99e34438814adcc42196877b011541bc3d5f4b2f529f6ba6c32d72d647546bb6","affectsGlobalScope":true},"52b7527cccf0bc6e353af3eafb6884c21c6e8e18a27ffb297d1b07cca40ca597",{"version":"aea4bc8d7dfc81bb5cd5fee22b893235d8a1ae276ba8c45ac9690bbb79b4cfd5","affectsGlobalScope":true},{"version":"64c899f124042ab5a7c097f36c558b7b6f43b84535820646bbe81cb37f5b96b3","affectsGlobalScope":true},{"version":"9182256998e1ce6796515063cc9b32969f8ad843ff8d4ced764bc600ebd25313","affectsGlobalScope":true},{"version":"a6d15a5984d107119a2c93398488522947a822538b9cfd55ea80d3a44df4d713","affectsGlobalScope":true},{"version":"17c96e5754edb84141561bdb48fabc7a0bf8bc77c0bdcaa56524b32d5da05882","affectsGlobalScope":true},{"version":"636185ad6bb7d5c6ee468ca56e316bcdc12b1ac242fbe400380f2b510422d5c6","affectsGlobalScope":true},{"version":"fa33b07efa40e081786d55430548b6c9bfbd8bd4c79fc191d93b8a5b92e20add","affectsGlobalScope":true},{"version":"034968fdc0513636010ee53f6bcf4e6fc9e17c24aaf9d1923a0598b80b5ffbd4","affectsGlobalScope":true},"2ba7f6bc18c7ccd5acb48bc5366c05052c6e39630e5a3cd5dbaf88154c410c3d","505480037f1121c13737f7a5037b00ffd77acc130bbb2b5b5012e260e04e44d3","faf5aa0e19c24e512dde816f1f1bc563962e0955cb2d5ee68b7cc1d049b40e58","2aff1e0c747e11a7c663a6f8254e95eafd31a05edfc15c467ec026ec145e16d4",{"version":"e80402489984e1e182df62d06a27d2ae4789c628258e6303d2066e6b3f196012","affectsGlobalScope":true},{"version":"469be5c8af1ed8b5ec942c5197e816cf7cb527606d4d06799477ffdc59e537ba","affectsGlobalScope":true},{"version":"96e15690cc2379a8b1b4d891b9714785764daf37d5af0996f9261f698b90c1b5","affectsGlobalScope":true},{"version":"3f80769e98e3c0415ebb402dfdf74d97d0d1ee6e4f3b97e6ee3bfbd3109c48e7","affectsGlobalScope":true},{"version":"be6e8ce9d89e6ae797bc5fec1dd2bf1a3e5096819a740e5f7d990ad052953f04","affectsGlobalScope":true},{"version":"6b6cfa0fa9528f829fa03a2cbcb1a9a325800daed455ef111ff15d8d6be8f39f","affectsGlobalScope":true},{"version":"2dae1085d34be82cceaa9da090d387d6a0ac7587ce93d63aa5e3ae5577338bc3","affectsGlobalScope":true},{"version":"ffae7fd73a4a74451be1de4ac54f9686aa321d0b5c633014ab336cc0b437b80a","affectsGlobalScope":true},{"version":"d1c9e5f0ccf6c9dec445e23f6c7806b2ec253fbf40975eda3851093cb7b5cace","affectsGlobalScope":true},{"version":"705d4d41c465b766928595f27e0d6e2cdbbc9b9874492052e171c92424bb7b8d","affectsGlobalScope":true},{"version":"353273db48805fa739de275b52173cb3edf2e553ef86e7813a3f6e4a1d4bddb7","affectsGlobalScope":true},{"version":"f6f74d538cfe5a140e54b23bb409c2225d0412636b8767cd6f8e91267f5b2895","affectsGlobalScope":true},{"version":"1b818842e3d38878689b2c2f3ef055ced422697dc9979976c489a06ff06a65b9","affectsGlobalScope":true},{"version":"7c0ae2a94e7a1a4571cd5dfdc4debd3833c4494ac90e008f6186b86ab61ece10","affectsGlobalScope":true},{"version":"26b491ab4cd40c8a4a797912bb77cf6656f6836d7d7dd83d110c44d3be50c7e4","affectsGlobalScope":true},"748d89f0afe6bab24b161aa0c139a2b91ba7ae37219b842ff6441fc965181713","aabcc875047a9ce097df133c01ccba6e6d1a70f9b3ebe16edfbce541b711d278","d2f0b25716bcf18895c71306abda91b5c9e5720077522060c5fec9bd1d755c03","8c107d9768a16d54f16190b0d6f33957d4bd41eef4fb7ef6b10fca0e5a39a587","cd487422606842bb084a6645f4353a8ee1de9714959c7d8cba214a460cb7f493","77bc4c8fb72b564df020bc3e2b49978f113e0388883e48d5149c4599d422529c","838fd41bfdaab921a26d32d8730b71101fd06e651d7e206324302246a9886243","f3fa1713741b3f7d07ed6bf57134fcbb6729e78f789a910b7e969403b9840a0f",{"version":"024e075321a9059640058c8b61bcf80f241318d686f5f870c33bdc769a53e559","affectsGlobalScope":true},{"version":"dfa1413db6ee4885b5fd49a8edbcd1ee08d8a983dd6b2399992da08cfc455556","affectsGlobalScope":true},"32dd1f6fa95589df742f0e5dc59a39617b85691b3d485a55d05949e6a277c341","61d73ba02b770f68da0d5df5abe6c4b892a94ecd791118d4c5eada5689127505","fe64e214cf336c5f3f188328c53bc015bfb5cd8b9a08855e8eba6154bf514dba","a6f44c7a5b4fc2e6aa37f4aff3944ca4b875e9f46f5196f93830fb88eb04e890","c3310cd0ff3c44be30be014909a718286897be09a3e4919512fb32d91e0de558","9febc93b9612a5081040535a0cc788716ec7ffc0e182517ad1057647704bc96d",{"version":"cd734a3ceb5b1343e1d92f40813437e25530eb5b7ef5154c90b46dec68e4caeb","affectsGlobalScope":true},{"version":"1d26e6d3045e6aa4c43b1b3058fc150ea0a3a05b82f832ce143cfd0d83713758","affectsGlobalScope":true},{"version":"328c9a08cfd0be25d4b3f33f60b21ffe469885f6b4d868e704fa45b4a355b7ca","affectsGlobalScope":true},{"version":"eecedc013fd6e67e7b2727cdf98fefd8dbfd833686a458157cdb305c576f2ee4","affectsGlobalScope":true},{"version":"009f50b2f451600f3b511c7532555ed02a44b93853325b72dd3b979e8ce6e58c","affectsGlobalScope":true},{"version":"2e11c2fbb7a11c2bbaf75a03876f6d0142cf5987e1deea4b1db88d175e84a8e8","affectsGlobalScope":true},{"version":"f2bf83fd6f73d59d35c157612efcf5636a02bea68dddd457edfe396241506b94","affectsGlobalScope":true},{"version":"e6c1aa24b636629fb3a8d69bf78a7d93d7f7095eb96e55cf6b30f45d3b48c2a1","affectsGlobalScope":true},{"version":"491ac07cb7139d2c9dd1fb834df8a71a34b3afd1fe7ca2abab060df7b025b974","affectsGlobalScope":true},{"version":"809d9fbd0d3d0f09074389672b7fee279bc5bbba8b4058b9fbcac91eeb904e9b","affectsGlobalScope":true},{"version":"d84104ff83394662482270c22f3db767397ead8f356c835215ef209f61331000","affectsGlobalScope":true},{"version":"9cb312e2f01112b3826155fb56d56e3e4d7ddd4ede6d0c2f87d655a39bc826ec","affectsGlobalScope":true},{"version":"8b0e1e59695dd28adf930fa4f82ee7f34789fa179837f52fcaa4e56478080974","affectsGlobalScope":true},{"version":"6ea823d5666499a02a3803899588d5337ecf7fababfc27ef1eff214526429f5b","affectsGlobalScope":true},{"version":"34e04261f8d46785867afa92ce6ce81f656228b9983927b9106605ea80399f04","affectsGlobalScope":true},{"version":"8be0e01065b88a7ae97de8138d5561ee34b4dd52dd261253652af6e2999d6220","affectsGlobalScope":true},{"version":"79560e3396417129db53868db639d5b55ec5d33253ad6ae074e94d901599bd7b","affectsGlobalScope":true},{"version":"7a1fdf8e667f526c7a0f3ad9fd8c11ddb3203837294ed277089f7bd2b82753e7","affectsGlobalScope":true},{"version":"399edc722872d367cddd6cd495369534cdbd2d30583889e83d3ab183f3446467","affectsGlobalScope":true},{"version":"953e4e86ef7d072197a5c535a547e7be231b4ab34ebba8d8fff9b752dc63c416","affectsGlobalScope":true},{"version":"90763cb92024b4f3a71ce52e121a06eb37875a7103952acf4bd34f821bc38799","affectsGlobalScope":true},{"version":"27849691ad382edde70c536ebc0a8eb8a45d69360d4b78eb49be2aeb8f0f9ed5","affectsGlobalScope":true},{"version":"1e65a598e37ecb4fa64c85f7cd420fd322612f10458dedc195a55ed7856e3ea4","affectsGlobalScope":true},{"version":"f07f6f392d85adc461612b9fc0114b19e19b03f4e0cf2b86bb17a2660aaad8b6","affectsGlobalScope":true},{"version":"e3444fd440d71f349fd854b42b955316d02249dcb5c5fd3da770388fb93a5011","affectsGlobalScope":true},{"version":"58c153487cdb0395e0602770d51dcb9b49f123e9e361dac849000ea98bac381e","affectsGlobalScope":true},{"version":"556469c9300b8bdf20ca790bccbbd6fc6697bb5d70cb5e921314fa89f2a21834","affectsGlobalScope":true},{"version":"0f7f6bb0ad58920c9f3fb76920826678bb5b7c71ea665b8653479139282039a8","affectsGlobalScope":true},{"version":"d16a8d241066333f1cce03ca06881e042a212b483b8254cc96c9596d9eb8a08c","affectsGlobalScope":true},{"version":"ba8a5a9383147b5ee09db9f7a44d99e9b2721dde4140755eed385386b724a06a","affectsGlobalScope":true},{"version":"a82fab989da9ffdf06c4cb390184f59f40a88e0f0b773fd9d30f1030a4bdd133","affectsGlobalScope":true},{"version":"3babd328660263e70db849a19469ee97eb26fdfea5159739c6ae63f11ae3a296","affectsGlobalScope":true},{"version":"d839874dd15f6ed348bace3842d483b53fb2933a67fc7e15414a6fb8513f9830","affectsGlobalScope":true},{"version":"b0bc815e0adc758ea47d6d3d0197b08f8d20edf56a8f7dda51db6576aa492ef0","affectsGlobalScope":true},{"version":"4e49bff690806c16ba10951046d8752d729031c190479e7b8d3f7ffb929add5b","affectsGlobalScope":true},{"version":"b8da7b98a977d6ccc5cd01ae6f3ac805a01390a78995be8126ee2b7ee4d8fe2c","affectsGlobalScope":true},{"version":"d90ad509192026b7ca61fbe15bb1b509c8c4377d4d184eb0f2c2f5fa6e55e207","affectsGlobalScope":true},{"version":"8e094675134039e83ea5c0e237a7f1389f6c65f66a453329c615ff2be711d4f1","affectsGlobalScope":true},{"version":"265e798c386cb4d68884c27cd3fe18b18531fdcf8b06a6f5f0457d5708409313","affectsGlobalScope":true},{"version":"1111132f62a1fa6ae7d0f4d8270351f96f4ecd605089e4e05062cc345f0ab8ba","affectsGlobalScope":true},{"version":"8ad20d4d07985a03b06755c578f8c5e61959b70c08aa6adf6834dceaa45038cc","affectsGlobalScope":true},{"version":"164cbee53b866ab7bcc1e27be9ca9425ad6ae546d428053c1390f39247ae8124","affectsGlobalScope":true},{"version":"4f4b54dad289cc7da8173f85edf66bcf34b5117d55f4f069154519cfea3ec864","affectsGlobalScope":true},{"version":"8833f137d183571bcfb39b82446abb9d1be5587de2db3e67e69e879e3c36440a","affectsGlobalScope":true},{"version":"2e543a7bcebb6b524651629de4ed05a093f30a979531c1900c7f95c3321b5a53","affectsGlobalScope":true},{"version":"110d2fbadd2fd7713a988779de06f5981e89202f470b1c6f03bcc4676e031942","affectsGlobalScope":true},{"version":"c4dea040deb2f44da458e0db699d8cc07f7a3a8273fb289c26c931cc69c34a1c","affectsGlobalScope":true},{"version":"ed0d1670088a608eaae7baebf7c3b0ad740df1f6a3fbf2e9918b4d2184b10418","affectsGlobalScope":true},{"version":"3b6e856ed84b49d4d2da000fd7c968cbb2f2f3bcb45aa5c516905bb25297a04f","affectsGlobalScope":true},{"version":"a8a6f58d770f1070c632933a238e5c2a3f9b93ee3748fca778741105ca51b42a","affectsGlobalScope":true},{"version":"9737e958668cf4d3877bde85c838d74a6f2399c55aea728330d6757f886fbd47","affectsGlobalScope":true},{"version":"a7c2fa80d163ae228a5f81cb93a1ec3f5ec18448c16ae6fa2fc0af8ff8202142","affectsGlobalScope":true},{"version":"ed92cc55553d5625fb29aa7a56ef7dafef214ba67569a5ad2090ff1210b7a7ee","affectsGlobalScope":true},{"version":"7d39efcf0a7e218d29702ad1ecfc1a819b5d19ead4e297edc51e1e4f48b01f70","affectsGlobalScope":true},{"version":"aa2a62fc51ebae2f2a69d0eeb18b7c9772b088c4bbf3d9e54455a02f98250aaa","affectsGlobalScope":true},{"version":"701ba90d14b2e21192f6184eae5927c5361449a52f7a97d24760f40de985e6a0","affectsGlobalScope":true},{"version":"7c56364ef045ad4a2a9093201e7015cb6dbd33c1789f375ae45ab745171dcd10","affectsGlobalScope":true},{"version":"ba14e8fd121b7b8ca07806f8902dedb6a78aa304cf3f29fb4d550c5174cabad8","affectsGlobalScope":true},{"version":"44ce2c9c3eab14339cf368213acd36f968652894a9c1a1db8f7980c5dfe0b062","affectsGlobalScope":true},{"version":"641703298fafc5cac58bfc067880d3a7d15dfa63014eff307fc40606d99f7695","affectsGlobalScope":true},{"version":"0258b20790ed0fd4fb112e5340d489f70f5ff353020926b395dc32e09f22a422","affectsGlobalScope":true},{"version":"fae2d8d01d5662e8c4602ffbb5c69388cc8a517c38a0d22f17c5975a008d8cfc","affectsGlobalScope":true},{"version":"8743407239e7e664b367343052be4a208d2bae2dbf09de62602c7045b642608f","affectsGlobalScope":true},{"version":"1a3d3001d09a11acca5dd4692dfbbbd526265e5bfb923f127eade807e96194a4","affectsGlobalScope":true},{"version":"bc343f02b56a1d98c7a6af5fc7518d79da9fd1f49cae4b1b97bf68de638d92e7","affectsGlobalScope":true},{"version":"2d8146043e62b7dcac961550e314acbba75fc14a78ccbebdedbdf3d29ee12bca","affectsGlobalScope":true},{"version":"c85bfc4b4d31ced03d7d3b36fd0d5c687c2fdc79810c4747087bf563b73fbec0","affectsGlobalScope":true},{"version":"6be5c828035b956f4136ccc865ecf914d1d966ecc89069e436997a595e0d47df","affectsGlobalScope":true},{"version":"e597e2399a2f5c999202e1bdfa1b0f5900f151b36b76f2d908ab74f2b4953dd4","affectsGlobalScope":true},{"version":"c7d982a2208e45043ebfd7891656f2ea115d4d119f2fc588355f7497b474b0e7","affectsGlobalScope":true},{"version":"5f1b7ef960cfed544094539c33810e5c3356bbb4901a857f240ff3bdd48d1d21","affectsGlobalScope":true},{"version":"f6a38297cf4932bad57637935c7567e5ebaba358d9d1ba05e93f09532b6e3038","affectsGlobalScope":true},{"version":"b7943bedfeb28fe2faa5e470425dd53efb5f8f7f36b2cfa8c40101490b892a95","affectsGlobalScope":true},{"version":"71b0196e3afeb2dd6864b864ea674d488de715f404b58e23e31dc05785ab8aa1","affectsGlobalScope":true},{"version":"6e4143a7da65fb171693aaeabdce2ab45918b64f4376ffec7be9bcec3d98bfaa","affectsGlobalScope":true},{"version":"fd6be01b565fca71bd6fd1f0f908c55ee0ff3ebbd1c3164226d1658da31ca662","affectsGlobalScope":true},{"version":"778132080567d22448de92f3d521fa5ee80cba17c4b402a5eee82cfd0da119cb","affectsGlobalScope":true},{"version":"5a895045b978fa050cd0ba6329ce97c435da2746a1871eb627ccce3f1667437f","affectsGlobalScope":true},{"version":"62d46230b41ce40023bd02ab1ba87f67a4a2596a3d6c62a66847ae86c4aed56f","affectsGlobalScope":true},{"version":"1667c3cea4df08f3ca882c5aa89d1d30828c5f7fbad5d7b99078cd02883c0e38","affectsGlobalScope":true},{"version":"9275648e986dd11e14b0b34d99aeebf0b632f3437fc636fe748582c3ea1f938a","affectsGlobalScope":true},{"version":"0050c919a6db04eb1161549c0b9883f07e341465f979db510381010884820c69","affectsGlobalScope":true},{"version":"8f3491349ef151050e0d8627ca0df34022a514df6552525a727fce0bd63d4d13","affectsGlobalScope":true},{"version":"dfe39326c357ad5c2793071529c2fa17016b1f33aaf2ff68f145f2bf547ba1a7","affectsGlobalScope":true},{"version":"7027679520d93e6d578e95ea194e421e709fbd20ab5a638084306cfed0c4c2f8","affectsGlobalScope":true},{"version":"5268624b0726192556c5c0be40a7a2479c40ec3b0a7732b7644ba6e079f20bf2","affectsGlobalScope":true},"5f2812985cf17f59db22b3f65ec76e1e7065d0e0d6d7f9a557e84f8a2c29e9f3",{"version":"d93627a771eb3089eb4a10d4687fda916dc9d73b02b01c3d87f6519482078863","affectsGlobalScope":true},{"version":"d084060ff7327f0c485b6efb3f1e6da0c1f7b3994b172dbb4ee49bc1993e0380","affectsGlobalScope":true},{"version":"b52776b968af86d593bbabbde7bbaf679cd482a38b0d6abe47e0510fcd135fdc","affectsGlobalScope":true},{"version":"6c61ca33af2fc0ccadf75a54f703a9ef0b9fbb4f69194ffef84e38343627012f","affectsGlobalScope":true},{"version":"3e8a96f68d24b318bc30a63344f7d4bd0d4558df1f5d2d569ab8e7b58f8d8466","affectsGlobalScope":true},"bcaa31b0ab53f1bb0ab217932b46ef1be570c5e0b71cac149d21a284b468080b",{"version":"aefc67cc89b17e4b36069d1c82be8d3b67fffb2dcf09d3469b62ddbbafd56cc9","affectsGlobalScope":true},{"version":"f7fd1042a37dbc4b80765ff070f433fc2d04194463d6f40ee4bab32c90e292ab","affectsGlobalScope":true},{"version":"0d3fe42231316be682277aa0c3e9937ed60610caec5f2d2669d30fb4846cb9be","affectsGlobalScope":true},{"version":"ccd4c143316d8784615624fb86c7fc5866321f26c64597a6b8762b46a4c6ae54","affectsGlobalScope":true},"614a2d35bf66a5f56b643ddffe9f779279eaff318a219a02d1c0fc1c4474cccd",{"version":"384d5da6f57c903720df0491e985c70ddd2591b861b268b2e694bfe3478047d2","affectsGlobalScope":true},{"version":"4b9290a110a4332145785b310afcceb4e31d0a32cfc2f686446c25bacc121f56","affectsGlobalScope":true},{"version":"5686baf6e3c4c244f2e2daaa306986619ce967cf7cf58a80e87f6b8fe4351388","affectsGlobalScope":true},{"version":"4bcfbab841de41b0a983a2312e684c0dfbeaa1e61fa801c56c85bb6c0b14b1e6","affectsGlobalScope":true},{"version":"07d4c4ef938690b1d85ab124138c8737b09b65108858b9213a1a2bc1cefa2b1f","affectsGlobalScope":true},{"version":"2fe137a03095209fe470abd521675f1729c95b416c92c6f1da15c042a7478fcb","affectsGlobalScope":true},"c92b1bbab6cd6ea02ba24a0b92f4d27779ee4b31ea12344d9d1c07ef57e1ad09","486b34258d280c4f09e089e496dbdb2ec7672010c3768492a40f86b8eafac0aa","00a046cedae69af18df1bfad757969fd5e851c6713458face8ae4ba7e1f3ae0c","f11046b75914ea9f73d1a89098b55639f253a7cda2924e16fe671cab923a347f","ead3d3722080de185007770883a2666d443e48e8cc5504ee93f0f06bd1948944",{"version":"1b69207048179b5b43ee0911a968a208b08dc2028b18bebc088575a82f7bbe68","affectsGlobalScope":true},{"version":"dd71ba6be8c2f31da0891252f3063e6f0a27a10e1b57ed7d38cc6edd10a59283","affectsGlobalScope":true},{"version":"44509a4b8ddf0b4b68698646598f5a8ec6ca919b58fc505cf1baf1fa911a68bf","affectsGlobalScope":true},{"version":"effb99c487277fc32e167f6e77bfcf84013ea2d3b56ef6424b77b36188b20ed9","affectsGlobalScope":true},{"version":"cef933f61c21263c027e234452d5fb5f87c424ba6b0920c48a2084af5fc187d4","affectsGlobalScope":true},"bd6709b0a41eb03998f47986b49dbd87c38d41923d32d16ab94335eb5b1343be"],"options":{"allowSyntheticDefaultImports":true,"alwaysStrict":true,"esModuleInterop":true,"etsAnnotationsEnable":true,"experimentalDecorators":true,"importsNotUsedAsValues":0,"module":6,"noImplicitAny":false,"noUnusedLocals":false,"noUnusedParameters":false,"skipLibCheck":false,"sourceMap":true,"target":8,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[46,49,94,103,124,125,129,135,141,149],[64,66],[63],[149,150],[46,58,59,60,61,62],[96,99],[68,94,101,102,103,104,105,109,110,112,119,120,121,122,141,142,143,144,145],[48],[65],[49],[57,74,97,98,149],[49,64,67,73,112,149],[153],[46,74],[46,117],[74],[46],[83,84,85,86,87,88,89,90,91],[46,112],[46,74,75,76,77,78,79,80,92,93,114,115,116,118,146,147],[46,47,48,49,51,52,53,54,55,56],[46,49,74,128,131,133],[137],[46,68,123],[46,49,74],[119],[50,69,74,81],[210,211,212,213,214],[81,82],[46,69,72,73],[46,110],[46,50,70,71],[46,320],[46,74,321,322,323],[46,57,65,68,74,92,148],[48,73],[46,123,137,138,139,140],[136,137,138],[46,68,125,128,129,130,132,133,134],[55,66,110],[103],[46,49,58,65,106,107,108,110],[59,60,61],[49,94,99,119],[46,51,68,72,97,105,109],[112],[54,55,66,110],[74,103,119],[57,63],[46,49,53,55,64,65,66,74,94,95,99,100,101,102,103,104,110,111,149,150],[46,49,65,94,99,100,101,102,103,111,119],[83,87,148],[85,88,148],[83,84,86,148],[50,81,82],[85,87],[83],[87,88,148],[127,128,132],[126,127],[128,133,134],[133],[47,51,52,57],[47,50,57],[51,55,57],[47,53,54,57],[211,212,214],[210,211,212,213],[46,211],[78],[82,87],[74,78,83,86,110,114,117,118,147,148,200,201,202,203,204,205,206,207],[215],[92],[46,49],[149],[46,71,82,205],[187,188,189,190,191,192,193,194,195,196,197,198,199,208,209,216,217,218,219,220,221,222,223,224,225,226,227,229,230,231,232,233,234,235,236,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,303,304,305,306,307,309,310,311,312,314,315,316,317,318,319,325,326,327,328,329,331,332,333,334,335,336,337,338,339,340,341,342,343,344],[46,149],[302],[308],[313],[50,83],[324],[207],[49,64,65,149,150,151],[151,154],[151]],"referencedMap":[[136,1],[67,2],[64,3],[106,4],[63,5],[100,6],[146,7],[98,8],[66,9],[95,10],[107,2],[99,11],[150,12],[154,13],[116,14],[118,15],[71,16],[77,17],[92,18],[114,19],[148,20],[57,21],[132,22],[138,23],[137,24],[117,25],[153,26],[82,27],[215,28],[308,29],[76,17],[74,30],[147,14],[322,31],[78,17],[72,32],[79,17],[73,17],[321,33],[320,17],[324,34],[149,35],[103,10],[94,36],[141,37],[139,38],[124,10],[135,39],[121,40],[104,41],[109,42],[62,43],[145,44],[110,45],[143,46],[119,47],[122,26],[144,48],[58,49],[112,50],[120,51],[142,26],[88,52],[86,53],[87,54],[83,55],[91,56],[89,52],[84,57],[90,58],[133,59],[128,60],[131,61],[134,62],[53,63],[51,64],[56,65],[54,63],[55,66],[213,67],[214,68],[212,69],[187,70],[188,70],[194,71],[208,72],[216,73],[218,74],[221,70],[226,75],[232,76],[244,77],[330,78],[260,79],[262,79],[264,74],[267,57],[270,17],[303,80],[309,81],[314,82],[318,83],[319,17],[325,84],[317,85],[113,79],[152,86],[155,87],[172,88],[183,88],[184,88],[181,88],[182,88]],"exportedModulesMap":[[136,1],[67,2],[64,3],[106,4],[63,5],[100,6],[146,7],[98,8],[66,9],[95,10],[107,2],[99,11],[150,12],[154,13],[116,14],[118,15],[71,16],[77,17],[92,18],[114,19],[148,20],[57,21],[132,22],[138,23],[137,24],[117,25],[153,26],[82,27],[215,28],[308,29],[76,17],[74,30],[147,14],[322,31],[78,17],[72,32],[79,17],[73,17],[321,33],[320,17],[324,34],[149,35],[103,10],[94,36],[141,37],[139,38],[124,10],[135,39],[121,40],[104,41],[109,42],[62,43],[145,44],[110,45],[143,46],[119,47],[122,26],[144,48],[58,49],[112,50],[120,51],[142,26],[88,52],[86,53],[87,54],[83,55],[91,56],[89,52],[84,57],[90,58],[133,59],[128,60],[131,61],[134,62],[53,63],[51,64],[56,65],[54,63],[55,66],[213,67],[214,68],[212,69],[187,70],[188,70],[194,71],[208,72],[216,73],[218,74],[221,70],[226,75],[232,76],[244,77],[330,78],[260,79],[262,79],[264,74],[267,57],[270,17],[303,80],[309,81],[314,82],[318,83],[319,17],[325,84],[317,85],[113,79],[152,86],[155,87],[172,88],[183,88],[184,88],[181,88],[182,88]],"semanticDiagnosticsPerFile":[136,93,67,64,106,108,63,100,146,98,96,66,65,97,95,107,111,99,150,49,154,116,80,118,71,77,92,114,204,207,148,46,57,132,138,137,117,200,153,75,69,81,82,215,308,206,151,313,205,115,76,74,201,147,322,78,72,79,73,321,320,323,324,149,103,94,141,139,140,124,125,135,129,121,104,60,109,62,145,59,68,110,143,105,119,122,144,61,58,112,120,102,101,142,88,302,86,85,87,83,202,91,89,84,203,90,133,128,131,127,130,134,126,53,51,56,48,54,55,47,52,123,70,50,213,214,210,212,211,187,188,189,190,191,192,193,194,195,196,197,198,199,208,209,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,234,233,235,236,237,238,240,241,242,239,243,244,245,246,247,330,299,248,249,250,251,252,253,254,256,255,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,327,292,293,294,295,296,297,329,298,301,300,304,303,305,306,307,309,310,311,312,314,315,316,318,319,328,325,317,326,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,8,45,42,43,44,1,113,152,155,185,186,163,164,167,168,165,166,171,172,169,170,173,174,180,176,175,179,177,178,159,160,157,158,161,162,183,184,181,182,156],"arktsLinterDiagnosticsPerFile":[136,93,67,64,106,108,63,100,146,98,96,66,65,97,95,107,111,99,150,49,154,116,80,118,71,77,92,114,204,207,148,46,57,132,138,137,117,200,153,75,69,81,82,215,308,206,151,313,205,115,76,74,201,147,322,78,72,79,73,321,320,323,324,149,103,94,141,139,140,124,125,135,129,121,104,60,109,62,145,59,68,110,143,105,119,122,144,61,58,112,120,102,101,142,88,302,86,85,87,83,202,91,89,84,203,90,133,128,131,127,130,134,126,53,51,56,48,54,55,47,52,123,70,50,213,214,210,212,211,187,188,189,190,191,192,193,194,195,196,197,198,199,208,209,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,234,233,235,236,237,238,240,241,242,239,243,244,245,246,247,330,299,248,249,250,251,252,253,254,256,255,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,327,292,293,294,295,296,297,329,298,301,300,304,303,305,306,307,309,310,311,312,314,315,316,318,319,328,325,317,326,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,8,45,42,43,44,1,113,152,155,185,186,163,164,167,168,165,166,171,172,169,170,173,174,180,176,175,179,177,178,159,160,157,158,161,162,183,184,181,182,156],"affectedFilesPendingEmit":[[136,1],[93,1],[67,1],[64,1],[106,1],[108,1],[63,1],[100,1],[146,1],[98,1],[96,1],[66,1],[65,1],[97,1],[95,1],[107,1],[111,1],[99,1],[150,1],[49,1],[154,1],[116,1],[80,1],[118,1],[71,1],[77,1],[92,1],[114,1],[204,1],[207,1],[148,1],[46,1],[57,1],[132,1],[138,1],[137,1],[117,1],[200,1],[153,1],[75,1],[69,1],[81,1],[82,1],[215,1],[308,1],[206,1],[151,1],[313,1],[205,1],[115,1],[76,1],[74,1],[201,1],[147,1],[322,1],[78,1],[72,1],[79,1],[73,1],[321,1],[320,1],[323,1],[324,1],[149,1],[103,1],[94,1],[141,1],[139,1],[140,1],[124,1],[125,1],[135,1],[129,1],[121,1],[104,1],[60,1],[109,1],[62,1],[145,1],[59,1],[68,1],[110,1],[143,1],[105,1],[119,1],[122,1],[144,1],[61,1],[58,1],[112,1],[120,1],[102,1],[101,1],[142,1],[88,1],[302,1],[86,1],[85,1],[87,1],[83,1],[202,1],[91,1],[89,1],[84,1],[203,1],[90,1],[133,1],[128,1],[131,1],[127,1],[130,1],[134,1],[126,1],[53,1],[51,1],[56,1],[48,1],[54,1],[55,1],[47,1],[52,1],[123,1],[70,1],[50,1],[213,1],[214,1],[210,1],[212,1],[211,1],[187,1],[188,1],[189,1],[190,1],[191,1],[192,1],[193,1],[194,1],[195,1],[196,1],[197,1],[198,1],[199,1],[208,1],[209,1],[216,1],[217,1],[218,1],[219,1],[220,1],[221,1],[222,1],[223,1],[224,1],[225,1],[226,1],[227,1],[228,1],[229,1],[230,1],[231,1],[232,1],[234,1],[233,1],[235,1],[236,1],[237,1],[238,1],[240,1],[241,1],[242,1],[239,1],[243,1],[244,1],[245,1],[246,1],[247,1],[330,1],[299,1],[248,1],[249,1],[250,1],[251,1],[252,1],[253,1],[254,1],[256,1],[255,1],[257,1],[258,1],[259,1],[260,1],[261,1],[262,1],[263,1],[264,1],[265,1],[266,1],[267,1],[268,1],[269,1],[270,1],[271,1],[272,1],[273,1],[274,1],[275,1],[276,1],[277,1],[278,1],[279,1],[280,1],[281,1],[282,1],[283,1],[284,1],[285,1],[286,1],[287,1],[288,1],[289,1],[290,1],[291,1],[327,1],[292,1],[293,1],[294,1],[295,1],[296,1],[297,1],[329,1],[298,1],[301,1],[300,1],[304,1],[303,1],[305,1],[306,1],[307,1],[309,1],[310,1],[311,1],[312,1],[314,1],[315,1],[316,1],[318,1],[319,1],[328,1],[325,1],[317,1],[326,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[113,1],[152,1],[155,1],[185,1],[186,1],[163,1],[164,1],[167,1],[168,1],[165,1],[166,1],[171,1],[172,1],[169,1],[170,1],[173,1],[174,1],[180,1],[176,1],[175,1],[179,1],[177,1],[178,1],[159,1],[160,1],[157,1],[158,1],[161,1],[162,1],[183,1],[184,1],[181,1],[182,1],[156,1]],"arkTSVersion":"ArkTS_1_1","compatibleSdkVersion":20},"version":"4.9.5"} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo.linter b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo.linter new file mode 100644 index 0000000000000000000000000000000000000000..49abb40325d4ec1d72a2f6d293a38023d73dd889 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/.tsbuildinfo.linter @@ -0,0 +1 @@ +{"program":{"fileNames":["d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es5.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2016.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.core.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.collection.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.generator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.iterable.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.promise.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.proxy.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.reflect.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.symbol.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2016.array.include.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.object.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.promise.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2018.regexp.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.array.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.object.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.symbol.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2019.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.bigint.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.date.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.promise.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2020.number.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.promise.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.weakref.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/node_modules/typescript/lib/lib.es2021.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.base.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/metadata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/elementname.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.want.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/global/resource.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/applicationinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/skill.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/abilityinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/extensionabilityinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/hapmoduleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundlemanager/bundleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.bundle.bundlemanager.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/processinformation.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/appstatedata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/abilitystatedata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/processdata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/applicationstateobserver.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.appmanager.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.abilityconstant.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.configurationconstant.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.configuration.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.ability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/basecontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.colorspacemanager.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/global/rawfiledescriptor.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.drawabledescriptor.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.resourcemanager.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.rpc.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.multimedia.image.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.font.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.mediaquery.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.inspector.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.promptaction.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.router.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.componentutils.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.common2d.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.drawing.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/graphics.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/rendernode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/content.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/componentcontent.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/framenode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/buildernode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/nodecontroller.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/xcomponentnode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/nodecontent.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.node.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.animator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/connectoptions.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.dialogrequest.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.completionhandlerforatomicservice.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.contextconstant.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.completionhandler.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.startoptions.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.atomicserviceoptions.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/uiserviceproxy.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/uiserviceextensionconnectcallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/abilityresult.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/abilitystartcallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/eventhub.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.abilitylifecyclecallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.environmentcallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.applicationstatechangecallback.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/applicationcontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/context.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.openlinkoptions.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/uiabilitycontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/component/navigation.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.observer.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.measure.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.componentsnapshot.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.data.unifieddatachannel.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.dragcontroller.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/extensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/uiextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/abilitystagecontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/formextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/data/rdb/resultset.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/startabilityparameter.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/app/appversioninfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/moduleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/customizedata.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/applicationinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/app/processinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/elementname.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/bundleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.bundle.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/abilityinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/bundle/hapmoduleinfo.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/app/context.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.ability.featureability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.data.rdb.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.data.dataability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/dataabilityoperation.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/dataabilityresult.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/ability/dataabilityhelper.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/vpnextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/embeddableuiabilitycontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/photoeditorextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/application/appserviceextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.common.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.multimodalinput.pointer.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.uicontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.window.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.app.ability.uiability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.hilog.d.ts","../../../../../../src/main/ets/entryability/entryability.ets","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.file.backupextensioncontext.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.application.backupextensionability.d.ts","../../../../../../src/main/ets/entrybackupability/entrybackupability.ets","../../../../../../src/main/ets/pages/index.ets","../../../../../../src/main/ets/pages/componentstatemigration/stateeasyv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/stateeasyv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/statecomplexv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/statecomplexv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/stateexternalinitializationv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/stateexternalinitializationv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/linkmiigrationv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/linkmiigrationv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/propeasyv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/propeasyv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/propcomplexv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/propcomplexv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/propsubcomponentupdatevarv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/propsubcomponentupdatevarv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/propsubcomponentupdatevarlocalv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/propsubcomponentupdatevarlocalv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/providealiasv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/providealiasv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideconsumenoinitv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideconsumeinitv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideparentinitv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideparentnoinitv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/providenoallowoverridev1.ets","../../../../../../src/main/ets/pages/componentstatemigration/provideallowoverridev2.ets","../../../../../../src/main/ets/pages/componentstatemigration/watchsinglevarv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/watchsinglevarv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/watchmorevarv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/watchmorevarv2.ets","../../../../../../src/main/ets/pages/componentstatemigration/computedv1.ets","../../../../../../src/main/ets/pages/componentstatemigration/computedv2.ets","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/action_sheet.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/alert_dialog.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/alphabet_indexer.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/badge.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/blank.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/button.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/calendar_picker.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/canvas.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/checkbox.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/checkboxgroup.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/circle.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/column.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/column_split.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.data.uniformtypedescriptor.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.multimodalinput.intentioncode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/imagemodifier.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/symbolglyphmodifier.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.shape.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.matrix4.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.uieffect.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.arkui.theme.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/common.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/common_ts_ets_api.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/scenepostprocesssettings.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/scenetypes.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/sceneresources.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/scene.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/graphics3d/scenenodes.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.scene.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/component3d.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/container_span.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/content_slot.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/context_menu.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/counter.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/custom_dialog_controller.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/data_panel.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/date_picker.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/divider.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/ellipse.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/embedded_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/enums.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/featureability.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/flex.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/flow_item.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/focus.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/folder_stack.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/form_link.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/for_each.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/gauge.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/gesture.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/global.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/grid.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/griditem.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/grid_col.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/grid_container.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/grid_row.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/hyperlink.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/image.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/image_animator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/image_common.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/image_span.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/lazy_for_each.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/lazy_grid_layout.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/line.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/list.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/list_item.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/list_item_group.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/loading_progress.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/matrix2d.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/marquee.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/menu.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/menu_item.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/menu_item_group.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/nav_destination.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/nav_router.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/navigation.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/navigator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/node_container.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/page_transition.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/panel.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/particle.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/paste_button.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/path.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/pattern_lock.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/polygon.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/polyline.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/progress.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/qrcode.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/radio.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/rating.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/rect.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/refresh.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/relative_container.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/repeat.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/rich_editor.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/rich_text.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/row.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/row_split.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/save_button.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/scroll.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/scroll_bar.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/search.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/security_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/select.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/shape.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/slider.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/span.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/stack.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/state_management.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/stepper.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/stepper_item.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/swiper.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/indicatorcomponent.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/symbolglyph.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/symbol_span.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/arkui/commonmodifier.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/tabs.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/tab_content.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_area.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_clock.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.graphics.text.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_common.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_input.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_picker.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/text_timer.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.intl.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/time_picker.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/toggle.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/toolbar.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/with_theme.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/units.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/video.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.security.cryptoframework.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.security.cert.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.print.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.web.neterrorlist.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/api/@ohos.web.webview.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/web.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/xcomponent.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/sidebar.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/water_flow.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/styled_string.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/index-full.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/animator.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/calendar.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/form_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/media_cached_image.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/plugin_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/root_scene.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/screen.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/window_scene.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/ability_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/remote_window.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/effect_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/ui_extension_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/isolated_component.d.ts","d:/devecostudio-windows-6.0.0.858/deveco studio/sdk/default/openharmony/ets/build-tools/ets-loader/declarations/linearindicator.d.ts"],"fileInfos":[{"version":"be8b901880718680b6c067fd8083bd5b04cde401c1e1123823e3068bb2e0d282","affectsGlobalScope":true},"e8d2e50f9e8fdd312d31f97571b4c7295b8f29f7f8363498edae2a9eb113ee36","4b1854aec637e8e041eff02899e16fd3c0c78685c622336aadfd67e6604bbe1b","d6f7d47355a0167969e9a8eedfb0994f21e038d360965ec06c30f6871038900b","4735756aff7c5857de387f321633f272e2daba4950c427ab200de954340c7c13","13dfb22c1b46f9858b19fc7df54674146f3d174ccd35f0e02e8d05a3026b9ba8","33d21bcca0f7b054d0d0d402125f547c9ac77782c2df301de314143f08e81406","80510205fb587019e1ad42bfbc046d4f55f3c5a1c8b3debca7d6fe0adc93959f",{"version":"276144a8254bed55adae6f0646c37a2cd11575ac2cbc679bf7ac0419c443fd58","affectsGlobalScope":true},{"version":"3523038578cadf637fdce58f06018e144fd5b26c12e3f9c1cef14cdf92ca3d20","affectsGlobalScope":true},{"version":"28065193ddf88bf697915b9236d2d00a27e85726563e88474f166790376e10d8","affectsGlobalScope":true},{"version":"511c964513d7c2f72556554cdeb960b4f0445990d11080297a97cc7b5fa1bb68","affectsGlobalScope":true},{"version":"725daac09ec6eb9086c2bea6bbdf6d6ab2a6f49d686656c6021a4da0415fe31f","affectsGlobalScope":true},{"version":"21574b67bbedcb39a6efa00ca47e5b9402946a4d4e890abd5b51d3fd371819ba","affectsGlobalScope":true},{"version":"2415a2b1a4a521594b9837316ae3950b0c0c2f8b689defd358986bf3e263e904","affectsGlobalScope":true},{"version":"e5d8d715990d96a37f3521a3f1460679507b261eec1b42dc84d4de835997b794","affectsGlobalScope":true},{"version":"93fa2a84417c65ab8ed121a0b84536312e00a11cbf45b0006a75324d00b176d2","affectsGlobalScope":true},{"version":"a003a6051b48dc64eaa8ad83789e4c2a540f3482bed821053b6770969bd598fb","affectsGlobalScope":true},{"version":"e90857fa86cecc3bc964a2d7db9d95a0c406bebfadeb4853a01a0079936f12f7","affectsGlobalScope":true},{"version":"8bbb03589e48f10b49996064f35256e858d205dcb364428fb4cc045061b1d786","affectsGlobalScope":true},{"version":"5044747370afee4b4c247e8a14c2969d245bbcf8396295dc5a60c659d796a71f","affectsGlobalScope":true},{"version":"8e4921934f4bec04df1bee5762a8f4ad9213f0dab33ea10c5bb1ba1201070c6a","affectsGlobalScope":true},{"version":"a894424c7058bcc77c1a3c92fe289c0ff93792e583e064c683d021879479f7b8","affectsGlobalScope":true},{"version":"8f03386d697248c5d356fd53f2729b920ea124cd1414a6c22de03c5d24729277","affectsGlobalScope":true},{"version":"21ac76354ecc1324ee2e31ac5fcebfa91b1b6beb3e8c3fe6f3988538e9629c73","affectsGlobalScope":true},{"version":"ecc058373716a6bb19a4492ac553b61e3ebc0eb657407b6ea62337316885b64b","affectsGlobalScope":true},{"version":"fe7acdc1039eca904399190766d1c8766b7d2621413f972c8542dddd69612097","affectsGlobalScope":true},{"version":"c25aa843b930662d62f0e853dd1f347d08b66cdec09bd760151d4ba6ce220fe6","affectsGlobalScope":true},{"version":"3e47477f297e4fa0d556c40a872c2c45bddefa487fd054bf1f80bceb527a682b","affectsGlobalScope":true},{"version":"a902be9f4116b449dbac07ffe3f4d69abb664f8eddfaeb892225612469213788","affectsGlobalScope":true},{"version":"155d8d1e367e05af5e5708a860825785f00eabae01744cf7bc569664301415a4","affectsGlobalScope":true},{"version":"5b30b81cdeb239772daf44e6c0d5bf6adec9dbf8d534ed25c9a0e8a43b9abfff","affectsGlobalScope":true},{"version":"cdb77abf1220d79a20508bbcfddf21f0437ea8ef5939ba46f999c4987061baab","affectsGlobalScope":true},{"version":"62e02a2f5889850ed658dfde861b2ba84fb22f3663ea3b2e2f7fb3dcd1813431","affectsGlobalScope":true},{"version":"357921f26d612a4c5ac9896340e6a2beffcaf889ff5cdfcc742e9af804d1a448","affectsGlobalScope":true},{"version":"d836a4258d6b5ee12054b802002d7c9c5eb6a1adb6a654f0ee9429cbda03e1a0","affectsGlobalScope":true},{"version":"c021bff90eb33d29edfde16c9b861097bbf99aa290726d0d0ac65330aa7be85a","affectsGlobalScope":true},{"version":"1c4e64dc374ea5922d7632a52b167187ba7c7e35b34d3c1e22625be66ca1576d","affectsGlobalScope":true},{"version":"cd1bebc4db8fb52c5618ecad3f511f62c78921451c198220c5b2ee5610b4d7b9","affectsGlobalScope":true},{"version":"fb60e7c9de1306648f865b4c8ef76b7376731af3955b69551004ad3848fb8f4c","affectsGlobalScope":true},{"version":"18d23591bba5678cf57ef139e1a3daad8017b26ad6612c8c34d6fa39044b245f","affectsGlobalScope":true},{"version":"868df11ccdabb6de564f70b68aa6b379a243ef32c8f6ee6dc71056a3dd54578a","affectsGlobalScope":true},{"version":"cebef4c7f9b6afb02cd08e7288fab05d0be3e3c898c720775b8aa286e9f7cfed","affectsGlobalScope":true},{"version":"7e3c49afe9bf537f68ce2487d7996c6e5c2350c0f250939726add1efcb1bcf01","affectsGlobalScope":true},{"version":"c7673e88666f933b0d007e82e42b60e85cf606ec247033e8ee5ab5940e4be206","affectsGlobalScope":true},"18c90c5c0cc77bce15249c3b628f54126680dca8e8f800ae13c6827577d8d7ff","0885aa6e52133b13da14bd23c6e2923eb41f6587004d566b7fdcd643003f85dd","41c21e94cc18d83501abacdaf56f29ffa89e64a6dd5449580a53f7c834d487fc","734f6e14694c64bd97f1043a47397565d098937d35301b18c8670612a4e159cf","ff3b80b87f5c428ff03782f0036d2056e1f371b828f5fd1397064730c35c1c2a","76d8f54d8fa8b072116d014f52f4461a30652dc66260903f4897cbe7838ce373","5c5627008db0c037c148380ab9ed21004ad2e33df3c693a5f750a84fdb182c34","b2b5603060e1d6b2982cb5670e4c9f2864b185276e63bbc903d3a9c17ecdbfb0","90e2871e53f616739841e476f3054c5ae40255095aa2e7459222c4dc15e838b0","783616dbe6f5eb8691d1c390e7b089cbadafa32bd00b0c70c04d41407a761d69","1e597215fe046a63746dba7c4858158640e2604eedf9846eae6b349124ee29b9","ae2e5abe87b1a08b722b2eb1480ed06320c3f3f4d0d6dc44e66d08ec329d66ef","21930bd35ce5693ef61bd468014596dfaa5bd6b6c2d4f59f60844fac0eee384d","84912c4054b88f51a421edac0e72c3afffa6e13234d81b9a1aab9c9336830ce4","d6b557c3349079a11c7699cc680f0a9c9f709a09019d45e5e065985ea3919e9b","d720df61b68e1ac759fb8ee19a85b2d64d5fadc4f0f4a8c8e7b55df67a3f1775","acba4d1a0998ac6561b9a1aa15c6b1125f769f046cb38d325856a40b768cdaca","f3aeea828c0af07cee7cfacc5f7f5dd5c7f3e67d8bb63ab279c61c0642194d7c","620b7c31b289e834d976fa4c5dfd04ed9f0923ee5f7641b86fcd532baf2565b6","59076a01123585639ac35ad1ba8fd1acceee2335fe1ffcbf032d38925e47bce1","16820b43a1c139ef435c5dad03ec2a7f91c6e0fed732691ecba152ed1b44cd52","2478abad18abd3df6315d031c62f01f83a91caa634f35b17465df224608a8ac0","a8e07c1a2f8475fbab17dda22a5f51e2d26fbc39603cf3b18f9c0ae2b519e55e","9e35cb3a784322d79f1fc3e5f1f838baccf6e4897b1ba7ca58a0e85f5c62d392","2900121efc03a6a977643fe47b1f57f5d23e2ab7b4cac525ff41f6bd481ca52f","c855e91f562922633a8cbb28b6bf142242a831d861ba23475744253f5e37b95b","024f0f2569c643dc83c8e4ef7432a00186d101e7424132f88fb452f311b5d884","7b5f82b0e0cdc724a3b14a9c8bfce48ca8a5e70fa25f3f55503c4aeb84d0815e","fe89cfcf174d05ce0e14b241b1f456e98100506442bc434c254b457175043d64","a0577605aac5da0b747b491593a469584f0005416e52dce21fbb970abcd115e2","be201049e4d4638501f377c34d5318a68b41548a1a2ee577a306aabfedb05c93","95fdeb811613fe4b7db3766ace5232f7b0830a84bc4eeb5db6fa7c327d1fbbfe","9f17874d37b0bb6bc111469635ff0abddaa39c615d5459354044e5b920d8c095","ae6fbbd727e947b2214d28fb53875d98fee0cc796ece51d34f42475c0b5dfe69","7b071796c9afe1026dbc08854bd73d7f7085f97885a2699b45852808f9d3ce82","f83ee958f4e51ff58ec869784ca5403f66e111488d80ad8ed55e43fe96e79546","44f591ebb300365d6ebcda253431a049d45aa74c5717e58055d8b804bd2a8718","c59d5014d6310118454fe99540005aa81f41a72326eefd3d13ae3cb0a648b008","04d7628b1479c95bb2385477c283fdbf51afe60db51acf2449293c9303374cd8","16d269cca8715b0ca8b907859f6cce45f230f1b55a6429f267e4c5a8aa7f9d17","69634b06c488b31c03055d4544fddea21f84c1b0d052784ccd33ed6527b08131","b840440738eb0014fa755aecb6c49f70c907cca21c78a247b058156ae4bca715","329edb7e5e887dee7d365a60f139fc36de2f9a441abdd690c93bc5a45e467163","3f9b161e68bb7a52a3171cd1144254a968c8d2bb5b6b41ae30d93d5131aa5980","53a5c6a0ecdf633bea0a5ffdaeb9425b01c350ece3ef11b53301eb08bd9dbbf8","dc132b2bfd37756d5385b19a8972614ca9de8bf8264435096283230ce0d1fb2e","a480bb40ed9139c1886999772d83f2d46d4cbf86449af3c606dcca1dbc38d087","be0c35d4b8a3e29f1a98636e00b25ff9fde28e7b2a9eb7cda2c646f13751f1dc","5d1e8f9c86780f23962980d995e80f70cb90173100c4f3f1280c651c6dc22094","2238892eef3efdeaa60f96d62943897ca8c945dd6fb230ce71d2d9ce1989c30d","b77055b21a6390a1053cf3fd95a830c51b0a0b317e1639d0d029bfc637fc9984","0c98893d17a23b9b9a68328528d408ac9141b4d4e3fb5b2b38e6895c4f98aaed","a06221608f5d45845214ee4991743c1e7a6c91fa2addd3665d618abd1f940be1","5bf7782d5dc0ffb156bdb4b981e56c066247c252e7538a32efcf97ab6a65e5d4","45752fba2bcc8f837ba1eb959da11f22584ae2288b3cd0c8a0522c3aacbbd928","ee67d9b87041e39ed225a1c5e815d839985dfc9b6e12af1c96adef07b37251c7","c585cd71cd521f4373ff211223d2487faf3a467037b8e6ab0fa112551492b4c8","0cc5c94908b284934cc25e6bd28a612650b9644d64ce21248732f8ad95625cd5","105a88bf7880674f76b13a3100c47f22f72b2cbe30f42115bac1d45a772bd4a4","e6d653e5102c35235bf08d13b93ab1e229fe3fb4f734a06bf3e268f6be7fa0cd","500cd84a36eec70cf12d75d8db0482692947137231e5b56d729ee01d5799687e","486609fe99f6a3f875a7ec02440f1442f9f70d1b960b25e487d7172fff2145e0","7067a4950c4dfa1282ac4b2af9ea9d6f654ab9ca4874030b0ce08eba113bb788","5ba940e673cb292665db309eaf3cf3b6cd562c69c7d8343e92d351cafdda5de0","1415aaa37727b9d971f5d90855be88e9d6d0f91dedb5f448bac516232c0ec53e","1ee4140494ebdaa4971b592cb59603953c4f613a6707069292e04006a41eb4dd","bdc21c1c6547a171df6e036e256ea2a08ec3fff1259cef232f34b796e27cbdfa",{"version":"a1b442ee2c5708d05fa6267dafcfaaf9052aa5b1f2b96afd87d8bc768d5ffc2d","affectsGlobalScope":true},"6e44d700d4da368e0baa78517d2fd699302b6ef24908c9bfcb329e1a1ec4dae7","2fd4536b789dffa504fa1060d29618e0898f63635fc5b6ac8f8eaacc0e01a435","d73b0df62037fa7d8e447785395076fc48a7529a86d21951bba43b7c2c7e221b","ae34c262f096b945f4104faf1358983ee865fd67a31df058229ac2fc43cdc60e","18ae3d0c60ca49a89e37b243d5692b946f3863e6c6b2a5e2f806cd9fed499e81","ef2a7b4201827194eb706b950ef40889d0870f402e610cb096d86f0bb2d3bfda","33d2db33dbe83d05305a585bf6c0c083e825270b53c56ecc69584b3a6343903c","e15a16903c5239648c795bc68acdc833f6ae58daf7cbabad085e372ad2396a45","062845bbf8e7d38e456b9ad7d53248ba7e1c5b3f061edafddf0d3820488e6648","eb334428756c8c94fcf87fb74ff084f243de6595d19d5875a2e83cfdf645fd67","8e0622fd44e6fc146b3b431cd5433449bcc7660b555e6e6175926a5665353ad4","0fe10efa53a287daaccba7fa70bbf20820ead1cd0c011ad59248f04cea5f3534","6534aeb84fdb78bdf07dd551c70e5f859c28a08b00507446b1043c20526feb9d","59528c8bb0cd15a4e2b544547cd324bb3a1153ebd52beb99c1f36f5437bca908","7542f446bc5bc9148a8443618064cdd94ba23293716dc839ea17e79dee318b45","3a5f3b923aa0dbf9d743ee99961763d38576b11ba81dbcd1b90c046f52d6071e","53b8801feda0f792b5959291f0e760ed1e013a78fb4e22072b663a76eb47a368","e440c7066c19e60990f65eee96ecd5fe22cebf754376c0732a29ee4a11cfd2a4","7d81efdbf839fe9fd65d580a89b98cbde2d89a822d22e2e8e060921ddc93cc9f","f5c03ad15eee48dedd7bdef771d50369c70fa70b10523ab777e925a4c90dbbeb","e79dae84c8e3d36f8f47f2da99a824ebee5674af266cbf274355e1b058fb219b","8c804ac09102ae81cb3a5bd3698b0bbea4ee98bcf1c67ea28daf963e01743cc1","96c6b16e1aa7514e7df94ee86e534b8c06301470960072fac70099e93cf53efc","6c4a9afb20d47e984c4bf2e586b9652073cdf9f850cccee67a3eb4144ebdf147","2644ca9cd4f4d4f4192686f8df72f9e414341fcc40bf10383fe94d3ee7a148ac","383f35282369bbe076f1203bb8db614279bcdf69d3997a7ed8cd02b885aabcc9","64322c0908a6e5cce21f118b77e1bfa46ea39abb05fea77bb9369705e3b8cf47","97e9592d53be761c186124ada0363ffcf29efd028772f317e252e31edee3f84d","6e9801e6ddf7c3eeeda628c984737cadcfa7d075866ec59d0a66d0443aa3fd58","25d084c26f6956c51674a81f67ec88a0d6393e2582199243f06435ee0c2a88bb","bc6faa40ca044b14b715e85fef1ae84e35bd773a5aaad6b78f48d73da135e7b3","67819e5de1ef35de58abe6fcd4b48d4a9cbc9e7d3d72bdbef84366e06f8eacbd","4b6adcdca1b49c4a8dac544448a554be3dab44777a9e71dbcb616f5ae2a88cf3","eb5f405d8ca352dea6f605738c0ad6cced8837be60e64853ee067922d1bd0251","9037ebc6080ee87baf79279684015f7ebaa2a71c2b410707f0c7a5968e331ed3","0673364463a46eaccc54cada61bd168b63db49b4eafe73ef44bd3763dbfef653","0f5d7b3c98e25df635a065681dbbaf399e55459367ffb3c19169141a4704ead3","18d9c779b4f7ed8c70e708f992dfc5b0aa914460a83a1152d6456e1274fc6b11","3cadb4e33737fe417d3857edf0a8bf27029969ff3874532f22acf769943c229f","a98e4114fa6839755dce055ca4b9913ab27b0605a964ebdba14571d261fc57b9","c0dc66ec8a658536f71f7e5bf86971c960a7c8f886e76a9571ce66e950421493","cacebb42b85d8cfbf4517b65b10a68721082b4c52c1a5b5c5cb0c55074fc0060",{"version":"3d154b1b075dbb7bed02b5ab8f68a0275a78493f29e3038e83e178536e95ff99","affectsGlobalScope":true},{"version":"f20ec33ba6630168484cf0698a92548457e45ce43312e6b0d33d074a0cacf990","affectsGlobalScope":true},{"version":"c80ed986acf27425aec5faa13afa287ba3df69fc0dadaa4b6bf5fc8537009e1c","affectsGlobalScope":true},{"version":"dd50a2a8dd06ea90335c963e60e98aa378e4c2993b33437211e3afb80f94309d","affectsGlobalScope":true},{"version":"f95c6e42565445328c4e09ff35873c087df58c8529b3aa28e70622a24c02117d","affectsGlobalScope":true},{"version":"31c7550cb9f5317184eaf845f7c83e9d98262621ac293febd43f8f98effa344c","affectsGlobalScope":true},{"version":"61fc6f358ad76be01bacfe668150deded48e5be6fbb80b58364cd6a5baf1e07f","affectsGlobalScope":true},{"version":"7dd0ff60c32715ff69773c9813a75194c85f244757d381dd7eba8dc8fc651cc9","affectsGlobalScope":true},{"version":"b198bda06289d77f82d874cdd985aa24e7f7c844a4b6aa72881c8d372c79b40e","affectsGlobalScope":true},{"version":"c5d1b138838ce1d09ea9a93852d1cd04501f973fb944547676db8edb957a0135","affectsGlobalScope":true},{"version":"1252ac696b6680ff9837b9b501acad64e4fdba9740625bdd7cdf853a970af430","affectsGlobalScope":true},{"version":"62e46b083a3ce7db3b57961fe017808ba11544e4ae82e9c4d21272926e11bc15","affectsGlobalScope":true},{"version":"1e96215f6c263c431e91d4a2d10b4efc252ed683d3b71755aa0c2f699ca81a26","affectsGlobalScope":true},{"version":"221ec3c1cb10ff3e48e7c3da2ccbdf51e0cc3d43741703ad9420cd269590d562","affectsGlobalScope":true},{"version":"49a7b0ece04b3e273995008d76868658dcf26e1c1d85e7c2d3729ec6cb27f790","affectsGlobalScope":true},{"version":"99e34438814adcc42196877b011541bc3d5f4b2f529f6ba6c32d72d647546bb6","affectsGlobalScope":true},"52b7527cccf0bc6e353af3eafb6884c21c6e8e18a27ffb297d1b07cca40ca597",{"version":"aea4bc8d7dfc81bb5cd5fee22b893235d8a1ae276ba8c45ac9690bbb79b4cfd5","affectsGlobalScope":true},{"version":"64c899f124042ab5a7c097f36c558b7b6f43b84535820646bbe81cb37f5b96b3","affectsGlobalScope":true},{"version":"9182256998e1ce6796515063cc9b32969f8ad843ff8d4ced764bc600ebd25313","affectsGlobalScope":true},{"version":"a6d15a5984d107119a2c93398488522947a822538b9cfd55ea80d3a44df4d713","affectsGlobalScope":true},{"version":"17c96e5754edb84141561bdb48fabc7a0bf8bc77c0bdcaa56524b32d5da05882","affectsGlobalScope":true},{"version":"636185ad6bb7d5c6ee468ca56e316bcdc12b1ac242fbe400380f2b510422d5c6","affectsGlobalScope":true},{"version":"fa33b07efa40e081786d55430548b6c9bfbd8bd4c79fc191d93b8a5b92e20add","affectsGlobalScope":true},{"version":"034968fdc0513636010ee53f6bcf4e6fc9e17c24aaf9d1923a0598b80b5ffbd4","affectsGlobalScope":true},"2ba7f6bc18c7ccd5acb48bc5366c05052c6e39630e5a3cd5dbaf88154c410c3d","505480037f1121c13737f7a5037b00ffd77acc130bbb2b5b5012e260e04e44d3","faf5aa0e19c24e512dde816f1f1bc563962e0955cb2d5ee68b7cc1d049b40e58","2aff1e0c747e11a7c663a6f8254e95eafd31a05edfc15c467ec026ec145e16d4",{"version":"e80402489984e1e182df62d06a27d2ae4789c628258e6303d2066e6b3f196012","affectsGlobalScope":true},{"version":"469be5c8af1ed8b5ec942c5197e816cf7cb527606d4d06799477ffdc59e537ba","affectsGlobalScope":true},{"version":"96e15690cc2379a8b1b4d891b9714785764daf37d5af0996f9261f698b90c1b5","affectsGlobalScope":true},{"version":"3f80769e98e3c0415ebb402dfdf74d97d0d1ee6e4f3b97e6ee3bfbd3109c48e7","affectsGlobalScope":true},{"version":"be6e8ce9d89e6ae797bc5fec1dd2bf1a3e5096819a740e5f7d990ad052953f04","affectsGlobalScope":true},{"version":"6b6cfa0fa9528f829fa03a2cbcb1a9a325800daed455ef111ff15d8d6be8f39f","affectsGlobalScope":true},{"version":"2dae1085d34be82cceaa9da090d387d6a0ac7587ce93d63aa5e3ae5577338bc3","affectsGlobalScope":true},{"version":"ffae7fd73a4a74451be1de4ac54f9686aa321d0b5c633014ab336cc0b437b80a","affectsGlobalScope":true},{"version":"d1c9e5f0ccf6c9dec445e23f6c7806b2ec253fbf40975eda3851093cb7b5cace","affectsGlobalScope":true},{"version":"705d4d41c465b766928595f27e0d6e2cdbbc9b9874492052e171c92424bb7b8d","affectsGlobalScope":true},{"version":"353273db48805fa739de275b52173cb3edf2e553ef86e7813a3f6e4a1d4bddb7","affectsGlobalScope":true},{"version":"f6f74d538cfe5a140e54b23bb409c2225d0412636b8767cd6f8e91267f5b2895","affectsGlobalScope":true},{"version":"1b818842e3d38878689b2c2f3ef055ced422697dc9979976c489a06ff06a65b9","affectsGlobalScope":true},{"version":"7c0ae2a94e7a1a4571cd5dfdc4debd3833c4494ac90e008f6186b86ab61ece10","affectsGlobalScope":true},{"version":"26b491ab4cd40c8a4a797912bb77cf6656f6836d7d7dd83d110c44d3be50c7e4","affectsGlobalScope":true},"748d89f0afe6bab24b161aa0c139a2b91ba7ae37219b842ff6441fc965181713","aabcc875047a9ce097df133c01ccba6e6d1a70f9b3ebe16edfbce541b711d278","d2f0b25716bcf18895c71306abda91b5c9e5720077522060c5fec9bd1d755c03","8c107d9768a16d54f16190b0d6f33957d4bd41eef4fb7ef6b10fca0e5a39a587","cd487422606842bb084a6645f4353a8ee1de9714959c7d8cba214a460cb7f493","77bc4c8fb72b564df020bc3e2b49978f113e0388883e48d5149c4599d422529c","838fd41bfdaab921a26d32d8730b71101fd06e651d7e206324302246a9886243","f3fa1713741b3f7d07ed6bf57134fcbb6729e78f789a910b7e969403b9840a0f",{"version":"024e075321a9059640058c8b61bcf80f241318d686f5f870c33bdc769a53e559","affectsGlobalScope":true},{"version":"dfa1413db6ee4885b5fd49a8edbcd1ee08d8a983dd6b2399992da08cfc455556","affectsGlobalScope":true},"32dd1f6fa95589df742f0e5dc59a39617b85691b3d485a55d05949e6a277c341","61d73ba02b770f68da0d5df5abe6c4b892a94ecd791118d4c5eada5689127505","fe64e214cf336c5f3f188328c53bc015bfb5cd8b9a08855e8eba6154bf514dba","a6f44c7a5b4fc2e6aa37f4aff3944ca4b875e9f46f5196f93830fb88eb04e890","c3310cd0ff3c44be30be014909a718286897be09a3e4919512fb32d91e0de558","9febc93b9612a5081040535a0cc788716ec7ffc0e182517ad1057647704bc96d",{"version":"cd734a3ceb5b1343e1d92f40813437e25530eb5b7ef5154c90b46dec68e4caeb","affectsGlobalScope":true},{"version":"1d26e6d3045e6aa4c43b1b3058fc150ea0a3a05b82f832ce143cfd0d83713758","affectsGlobalScope":true},{"version":"328c9a08cfd0be25d4b3f33f60b21ffe469885f6b4d868e704fa45b4a355b7ca","affectsGlobalScope":true},{"version":"eecedc013fd6e67e7b2727cdf98fefd8dbfd833686a458157cdb305c576f2ee4","affectsGlobalScope":true},{"version":"009f50b2f451600f3b511c7532555ed02a44b93853325b72dd3b979e8ce6e58c","affectsGlobalScope":true},{"version":"2e11c2fbb7a11c2bbaf75a03876f6d0142cf5987e1deea4b1db88d175e84a8e8","affectsGlobalScope":true},{"version":"f2bf83fd6f73d59d35c157612efcf5636a02bea68dddd457edfe396241506b94","affectsGlobalScope":true},{"version":"e6c1aa24b636629fb3a8d69bf78a7d93d7f7095eb96e55cf6b30f45d3b48c2a1","affectsGlobalScope":true},{"version":"491ac07cb7139d2c9dd1fb834df8a71a34b3afd1fe7ca2abab060df7b025b974","affectsGlobalScope":true},{"version":"809d9fbd0d3d0f09074389672b7fee279bc5bbba8b4058b9fbcac91eeb904e9b","affectsGlobalScope":true},{"version":"d84104ff83394662482270c22f3db767397ead8f356c835215ef209f61331000","affectsGlobalScope":true},{"version":"9cb312e2f01112b3826155fb56d56e3e4d7ddd4ede6d0c2f87d655a39bc826ec","affectsGlobalScope":true},{"version":"8b0e1e59695dd28adf930fa4f82ee7f34789fa179837f52fcaa4e56478080974","affectsGlobalScope":true},{"version":"6ea823d5666499a02a3803899588d5337ecf7fababfc27ef1eff214526429f5b","affectsGlobalScope":true},{"version":"34e04261f8d46785867afa92ce6ce81f656228b9983927b9106605ea80399f04","affectsGlobalScope":true},{"version":"8be0e01065b88a7ae97de8138d5561ee34b4dd52dd261253652af6e2999d6220","affectsGlobalScope":true},{"version":"79560e3396417129db53868db639d5b55ec5d33253ad6ae074e94d901599bd7b","affectsGlobalScope":true},{"version":"7a1fdf8e667f526c7a0f3ad9fd8c11ddb3203837294ed277089f7bd2b82753e7","affectsGlobalScope":true},{"version":"399edc722872d367cddd6cd495369534cdbd2d30583889e83d3ab183f3446467","affectsGlobalScope":true},{"version":"953e4e86ef7d072197a5c535a547e7be231b4ab34ebba8d8fff9b752dc63c416","affectsGlobalScope":true},{"version":"90763cb92024b4f3a71ce52e121a06eb37875a7103952acf4bd34f821bc38799","affectsGlobalScope":true},{"version":"27849691ad382edde70c536ebc0a8eb8a45d69360d4b78eb49be2aeb8f0f9ed5","affectsGlobalScope":true},{"version":"1e65a598e37ecb4fa64c85f7cd420fd322612f10458dedc195a55ed7856e3ea4","affectsGlobalScope":true},{"version":"f07f6f392d85adc461612b9fc0114b19e19b03f4e0cf2b86bb17a2660aaad8b6","affectsGlobalScope":true},{"version":"e3444fd440d71f349fd854b42b955316d02249dcb5c5fd3da770388fb93a5011","affectsGlobalScope":true},{"version":"58c153487cdb0395e0602770d51dcb9b49f123e9e361dac849000ea98bac381e","affectsGlobalScope":true},{"version":"556469c9300b8bdf20ca790bccbbd6fc6697bb5d70cb5e921314fa89f2a21834","affectsGlobalScope":true},{"version":"0f7f6bb0ad58920c9f3fb76920826678bb5b7c71ea665b8653479139282039a8","affectsGlobalScope":true},{"version":"d16a8d241066333f1cce03ca06881e042a212b483b8254cc96c9596d9eb8a08c","affectsGlobalScope":true},{"version":"ba8a5a9383147b5ee09db9f7a44d99e9b2721dde4140755eed385386b724a06a","affectsGlobalScope":true},{"version":"a82fab989da9ffdf06c4cb390184f59f40a88e0f0b773fd9d30f1030a4bdd133","affectsGlobalScope":true},{"version":"3babd328660263e70db849a19469ee97eb26fdfea5159739c6ae63f11ae3a296","affectsGlobalScope":true},{"version":"d839874dd15f6ed348bace3842d483b53fb2933a67fc7e15414a6fb8513f9830","affectsGlobalScope":true},{"version":"b0bc815e0adc758ea47d6d3d0197b08f8d20edf56a8f7dda51db6576aa492ef0","affectsGlobalScope":true},{"version":"4e49bff690806c16ba10951046d8752d729031c190479e7b8d3f7ffb929add5b","affectsGlobalScope":true},{"version":"b8da7b98a977d6ccc5cd01ae6f3ac805a01390a78995be8126ee2b7ee4d8fe2c","affectsGlobalScope":true},{"version":"d90ad509192026b7ca61fbe15bb1b509c8c4377d4d184eb0f2c2f5fa6e55e207","affectsGlobalScope":true},{"version":"8e094675134039e83ea5c0e237a7f1389f6c65f66a453329c615ff2be711d4f1","affectsGlobalScope":true},{"version":"265e798c386cb4d68884c27cd3fe18b18531fdcf8b06a6f5f0457d5708409313","affectsGlobalScope":true},{"version":"1111132f62a1fa6ae7d0f4d8270351f96f4ecd605089e4e05062cc345f0ab8ba","affectsGlobalScope":true},{"version":"8ad20d4d07985a03b06755c578f8c5e61959b70c08aa6adf6834dceaa45038cc","affectsGlobalScope":true},{"version":"164cbee53b866ab7bcc1e27be9ca9425ad6ae546d428053c1390f39247ae8124","affectsGlobalScope":true},{"version":"4f4b54dad289cc7da8173f85edf66bcf34b5117d55f4f069154519cfea3ec864","affectsGlobalScope":true},{"version":"8833f137d183571bcfb39b82446abb9d1be5587de2db3e67e69e879e3c36440a","affectsGlobalScope":true},{"version":"2e543a7bcebb6b524651629de4ed05a093f30a979531c1900c7f95c3321b5a53","affectsGlobalScope":true},{"version":"110d2fbadd2fd7713a988779de06f5981e89202f470b1c6f03bcc4676e031942","affectsGlobalScope":true},{"version":"c4dea040deb2f44da458e0db699d8cc07f7a3a8273fb289c26c931cc69c34a1c","affectsGlobalScope":true},{"version":"ed0d1670088a608eaae7baebf7c3b0ad740df1f6a3fbf2e9918b4d2184b10418","affectsGlobalScope":true},{"version":"3b6e856ed84b49d4d2da000fd7c968cbb2f2f3bcb45aa5c516905bb25297a04f","affectsGlobalScope":true},{"version":"a8a6f58d770f1070c632933a238e5c2a3f9b93ee3748fca778741105ca51b42a","affectsGlobalScope":true},{"version":"9737e958668cf4d3877bde85c838d74a6f2399c55aea728330d6757f886fbd47","affectsGlobalScope":true},{"version":"a7c2fa80d163ae228a5f81cb93a1ec3f5ec18448c16ae6fa2fc0af8ff8202142","affectsGlobalScope":true},{"version":"ed92cc55553d5625fb29aa7a56ef7dafef214ba67569a5ad2090ff1210b7a7ee","affectsGlobalScope":true},{"version":"7d39efcf0a7e218d29702ad1ecfc1a819b5d19ead4e297edc51e1e4f48b01f70","affectsGlobalScope":true},{"version":"aa2a62fc51ebae2f2a69d0eeb18b7c9772b088c4bbf3d9e54455a02f98250aaa","affectsGlobalScope":true},{"version":"701ba90d14b2e21192f6184eae5927c5361449a52f7a97d24760f40de985e6a0","affectsGlobalScope":true},{"version":"7c56364ef045ad4a2a9093201e7015cb6dbd33c1789f375ae45ab745171dcd10","affectsGlobalScope":true},{"version":"ba14e8fd121b7b8ca07806f8902dedb6a78aa304cf3f29fb4d550c5174cabad8","affectsGlobalScope":true},{"version":"44ce2c9c3eab14339cf368213acd36f968652894a9c1a1db8f7980c5dfe0b062","affectsGlobalScope":true},{"version":"641703298fafc5cac58bfc067880d3a7d15dfa63014eff307fc40606d99f7695","affectsGlobalScope":true},{"version":"0258b20790ed0fd4fb112e5340d489f70f5ff353020926b395dc32e09f22a422","affectsGlobalScope":true},{"version":"fae2d8d01d5662e8c4602ffbb5c69388cc8a517c38a0d22f17c5975a008d8cfc","affectsGlobalScope":true},{"version":"8743407239e7e664b367343052be4a208d2bae2dbf09de62602c7045b642608f","affectsGlobalScope":true},{"version":"1a3d3001d09a11acca5dd4692dfbbbd526265e5bfb923f127eade807e96194a4","affectsGlobalScope":true},{"version":"bc343f02b56a1d98c7a6af5fc7518d79da9fd1f49cae4b1b97bf68de638d92e7","affectsGlobalScope":true},{"version":"2d8146043e62b7dcac961550e314acbba75fc14a78ccbebdedbdf3d29ee12bca","affectsGlobalScope":true},{"version":"c85bfc4b4d31ced03d7d3b36fd0d5c687c2fdc79810c4747087bf563b73fbec0","affectsGlobalScope":true},{"version":"6be5c828035b956f4136ccc865ecf914d1d966ecc89069e436997a595e0d47df","affectsGlobalScope":true},{"version":"e597e2399a2f5c999202e1bdfa1b0f5900f151b36b76f2d908ab74f2b4953dd4","affectsGlobalScope":true},{"version":"c7d982a2208e45043ebfd7891656f2ea115d4d119f2fc588355f7497b474b0e7","affectsGlobalScope":true},{"version":"5f1b7ef960cfed544094539c33810e5c3356bbb4901a857f240ff3bdd48d1d21","affectsGlobalScope":true},{"version":"f6a38297cf4932bad57637935c7567e5ebaba358d9d1ba05e93f09532b6e3038","affectsGlobalScope":true},{"version":"b7943bedfeb28fe2faa5e470425dd53efb5f8f7f36b2cfa8c40101490b892a95","affectsGlobalScope":true},{"version":"71b0196e3afeb2dd6864b864ea674d488de715f404b58e23e31dc05785ab8aa1","affectsGlobalScope":true},{"version":"6e4143a7da65fb171693aaeabdce2ab45918b64f4376ffec7be9bcec3d98bfaa","affectsGlobalScope":true},{"version":"fd6be01b565fca71bd6fd1f0f908c55ee0ff3ebbd1c3164226d1658da31ca662","affectsGlobalScope":true},{"version":"778132080567d22448de92f3d521fa5ee80cba17c4b402a5eee82cfd0da119cb","affectsGlobalScope":true},{"version":"5a895045b978fa050cd0ba6329ce97c435da2746a1871eb627ccce3f1667437f","affectsGlobalScope":true},{"version":"62d46230b41ce40023bd02ab1ba87f67a4a2596a3d6c62a66847ae86c4aed56f","affectsGlobalScope":true},{"version":"1667c3cea4df08f3ca882c5aa89d1d30828c5f7fbad5d7b99078cd02883c0e38","affectsGlobalScope":true},{"version":"9275648e986dd11e14b0b34d99aeebf0b632f3437fc636fe748582c3ea1f938a","affectsGlobalScope":true},{"version":"0050c919a6db04eb1161549c0b9883f07e341465f979db510381010884820c69","affectsGlobalScope":true},{"version":"8f3491349ef151050e0d8627ca0df34022a514df6552525a727fce0bd63d4d13","affectsGlobalScope":true},{"version":"dfe39326c357ad5c2793071529c2fa17016b1f33aaf2ff68f145f2bf547ba1a7","affectsGlobalScope":true},{"version":"7027679520d93e6d578e95ea194e421e709fbd20ab5a638084306cfed0c4c2f8","affectsGlobalScope":true},{"version":"5268624b0726192556c5c0be40a7a2479c40ec3b0a7732b7644ba6e079f20bf2","affectsGlobalScope":true},"5f2812985cf17f59db22b3f65ec76e1e7065d0e0d6d7f9a557e84f8a2c29e9f3",{"version":"d93627a771eb3089eb4a10d4687fda916dc9d73b02b01c3d87f6519482078863","affectsGlobalScope":true},{"version":"d084060ff7327f0c485b6efb3f1e6da0c1f7b3994b172dbb4ee49bc1993e0380","affectsGlobalScope":true},{"version":"b52776b968af86d593bbabbde7bbaf679cd482a38b0d6abe47e0510fcd135fdc","affectsGlobalScope":true},{"version":"6c61ca33af2fc0ccadf75a54f703a9ef0b9fbb4f69194ffef84e38343627012f","affectsGlobalScope":true},{"version":"3e8a96f68d24b318bc30a63344f7d4bd0d4558df1f5d2d569ab8e7b58f8d8466","affectsGlobalScope":true},"bcaa31b0ab53f1bb0ab217932b46ef1be570c5e0b71cac149d21a284b468080b",{"version":"aefc67cc89b17e4b36069d1c82be8d3b67fffb2dcf09d3469b62ddbbafd56cc9","affectsGlobalScope":true},{"version":"f7fd1042a37dbc4b80765ff070f433fc2d04194463d6f40ee4bab32c90e292ab","affectsGlobalScope":true},{"version":"0d3fe42231316be682277aa0c3e9937ed60610caec5f2d2669d30fb4846cb9be","affectsGlobalScope":true},{"version":"ccd4c143316d8784615624fb86c7fc5866321f26c64597a6b8762b46a4c6ae54","affectsGlobalScope":true},"614a2d35bf66a5f56b643ddffe9f779279eaff318a219a02d1c0fc1c4474cccd",{"version":"384d5da6f57c903720df0491e985c70ddd2591b861b268b2e694bfe3478047d2","affectsGlobalScope":true},{"version":"4b9290a110a4332145785b310afcceb4e31d0a32cfc2f686446c25bacc121f56","affectsGlobalScope":true},{"version":"5686baf6e3c4c244f2e2daaa306986619ce967cf7cf58a80e87f6b8fe4351388","affectsGlobalScope":true},{"version":"4bcfbab841de41b0a983a2312e684c0dfbeaa1e61fa801c56c85bb6c0b14b1e6","affectsGlobalScope":true},{"version":"07d4c4ef938690b1d85ab124138c8737b09b65108858b9213a1a2bc1cefa2b1f","affectsGlobalScope":true},{"version":"2fe137a03095209fe470abd521675f1729c95b416c92c6f1da15c042a7478fcb","affectsGlobalScope":true},"c92b1bbab6cd6ea02ba24a0b92f4d27779ee4b31ea12344d9d1c07ef57e1ad09","486b34258d280c4f09e089e496dbdb2ec7672010c3768492a40f86b8eafac0aa","00a046cedae69af18df1bfad757969fd5e851c6713458face8ae4ba7e1f3ae0c","f11046b75914ea9f73d1a89098b55639f253a7cda2924e16fe671cab923a347f","ead3d3722080de185007770883a2666d443e48e8cc5504ee93f0f06bd1948944",{"version":"1b69207048179b5b43ee0911a968a208b08dc2028b18bebc088575a82f7bbe68","affectsGlobalScope":true},{"version":"dd71ba6be8c2f31da0891252f3063e6f0a27a10e1b57ed7d38cc6edd10a59283","affectsGlobalScope":true},{"version":"44509a4b8ddf0b4b68698646598f5a8ec6ca919b58fc505cf1baf1fa911a68bf","affectsGlobalScope":true},{"version":"effb99c487277fc32e167f6e77bfcf84013ea2d3b56ef6424b77b36188b20ed9","affectsGlobalScope":true},{"version":"cef933f61c21263c027e234452d5fb5f87c424ba6b0920c48a2084af5fc187d4","affectsGlobalScope":true},"bd6709b0a41eb03998f47986b49dbd87c38d41923d32d16ab94335eb5b1343be"],"options":{"allowSyntheticDefaultImports":true,"alwaysStrict":true,"esModuleInterop":true,"etsAnnotationsEnable":true,"experimentalDecorators":true,"importsNotUsedAsValues":0,"module":6,"noImplicitAny":false,"noUnusedLocals":false,"noUnusedParameters":false,"skipLibCheck":false,"sourceMap":true,"target":8,"tsBuildInfoFile":"./.tsbuildinfo"},"fileIdsList":[[46,49,94,103,124,125,129,135,141,149],[64,66],[63],[149,150],[46,58,59,60,61,62],[96,99],[68,94,101,102,103,104,105,109,110,112,119,120,121,122,141,142,143,144,145],[48],[65],[49],[57,74,97,98,149],[49,64,67,73,112,149],[153],[46,74],[46,117],[74],[46],[83,84,85,86,87,88,89,90,91],[46,112],[46,74,75,76,77,78,79,80,92,93,114,115,116,118,146,147],[46,47,48,49,51,52,53,54,55,56],[46,49,74,128,131,133],[137],[46,68,123],[46,49,74],[119],[50,69,74,81],[210,211,212,213,214],[81,82],[46,69,72,73],[46,110],[46,50,70,71],[46,320],[46,74,321,322,323],[46,57,65,68,74,92,148],[48,73],[46,123,137,138,139,140],[136,137,138],[46,68,125,128,129,130,132,133,134],[55,66,110],[103],[46,49,58,65,106,107,108,110],[59,60,61],[49,94,99,119],[46,51,68,72,97,105,109],[112],[54,55,66,110],[74,103,119],[57,63],[46,49,53,55,64,65,66,74,94,95,99,100,101,102,103,104,110,111,149,150],[46,49,65,94,99,100,101,102,103,111,119],[83,87,148],[85,88,148],[83,84,86,148],[50,81,82],[85,87],[83],[87,88,148],[127,128,132],[126,127],[128,133,134],[133],[47,51,52,57],[47,50,57],[51,55,57],[47,53,54,57],[211,212,214],[210,211,212,213],[46,211],[78],[82,87],[74,78,83,86,110,114,117,118,147,148,200,201,202,203,204,205,206,207],[215],[92],[46,49],[149],[46,71,82,205],[187,188,189,190,191,192,193,194,195,196,197,198,199,208,209,216,217,218,219,220,221,222,223,224,225,226,227,229,230,231,232,233,234,235,236,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,303,304,305,306,307,309,310,311,312,314,315,316,317,318,319,325,326,327,328,329,331,332,333,334,335,336,337,338,339,340,341,342,343,344],[46,149],[302],[308],[313],[50,83],[324],[207],[49,64,65,149,150,151],[151,154],[151]],"referencedMap":[[136,1],[67,2],[64,3],[106,4],[63,5],[100,6],[146,7],[98,8],[66,9],[95,10],[107,2],[99,11],[150,12],[154,13],[116,14],[118,15],[71,16],[77,17],[92,18],[114,19],[148,20],[57,21],[132,22],[138,23],[137,24],[117,25],[153,26],[82,27],[215,28],[308,29],[76,17],[74,30],[147,14],[322,31],[78,17],[72,32],[79,17],[73,17],[321,33],[320,17],[324,34],[149,35],[103,10],[94,36],[141,37],[139,38],[124,10],[135,39],[121,40],[104,41],[109,42],[62,43],[145,44],[110,45],[143,46],[119,47],[122,26],[144,48],[58,49],[112,50],[120,51],[142,26],[88,52],[86,53],[87,54],[83,55],[91,56],[89,52],[84,57],[90,58],[133,59],[128,60],[131,61],[134,62],[53,63],[51,64],[56,65],[54,63],[55,66],[213,67],[214,68],[212,69],[187,70],[188,70],[194,71],[208,72],[216,73],[218,74],[221,70],[226,75],[232,76],[244,77],[330,78],[260,79],[262,79],[264,74],[267,57],[270,17],[303,80],[309,81],[314,82],[318,83],[319,17],[325,84],[317,85],[113,79],[152,86],[155,87],[172,88],[183,88],[184,88],[181,88],[182,88]],"exportedModulesMap":[[136,1],[67,2],[64,3],[106,4],[63,5],[100,6],[146,7],[98,8],[66,9],[95,10],[107,2],[99,11],[150,12],[154,13],[116,14],[118,15],[71,16],[77,17],[92,18],[114,19],[148,20],[57,21],[132,22],[138,23],[137,24],[117,25],[153,26],[82,27],[215,28],[308,29],[76,17],[74,30],[147,14],[322,31],[78,17],[72,32],[79,17],[73,17],[321,33],[320,17],[324,34],[149,35],[103,10],[94,36],[141,37],[139,38],[124,10],[135,39],[121,40],[104,41],[109,42],[62,43],[145,44],[110,45],[143,46],[119,47],[122,26],[144,48],[58,49],[112,50],[120,51],[142,26],[88,52],[86,53],[87,54],[83,55],[91,56],[89,52],[84,57],[90,58],[133,59],[128,60],[131,61],[134,62],[53,63],[51,64],[56,65],[54,63],[55,66],[213,67],[214,68],[212,69],[187,70],[188,70],[194,71],[208,72],[216,73],[218,74],[221,70],[226,75],[232,76],[244,77],[330,78],[260,79],[262,79],[264,74],[267,57],[270,17],[303,80],[309,81],[314,82],[318,83],[319,17],[325,84],[317,85],[113,79],[152,86],[155,87],[172,88],[183,88],[184,88],[181,88],[182,88]],"semanticDiagnosticsPerFile":[136,93,67,64,106,108,63,100,146,98,96,66,65,97,95,107,111,99,150,49,154,116,80,118,71,77,92,114,204,207,148,46,57,132,138,137,117,200,153,75,69,81,82,215,308,206,151,313,205,115,76,74,201,147,322,78,72,79,73,321,320,323,324,149,103,94,141,139,140,124,125,135,129,121,104,60,109,62,145,59,68,110,143,105,119,122,144,61,58,112,120,102,101,142,88,302,86,85,87,83,202,91,89,84,203,90,133,128,131,127,130,134,126,53,51,56,48,54,55,47,52,123,70,50,213,214,210,212,211,187,188,189,190,191,192,193,194,195,196,197,198,199,208,209,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,234,233,235,236,237,238,240,241,242,239,243,244,245,246,247,330,299,248,249,250,251,252,253,254,256,255,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,327,292,293,294,295,296,297,329,298,301,300,304,303,305,306,307,309,310,311,312,314,315,316,318,319,328,325,317,326,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,8,45,42,43,44,1,113,152,155,185,186,[163,[{"file":"../../../../../../src/main/ets/pages/componentstatemigration/linkmiigrationv1.ets","start":705,"length":3,"messageText":"Property 'val' has no initializer and is not definitely assigned in the constructor.","category":1,"code":2564}]],[164,[{"file":"../../../../../../src/main/ets/pages/componentstatemigration/linkmiigrationv2.ets","start":746,"length":6,"messageText":"Property 'addOne' has no initializer and is not definitely assigned in the constructor.","category":1,"code":2564}]],[167,[{"file":"../../../../../../src/main/ets/pages/componentstatemigration/propcomplexv1.ets","start":803,"length":5,"messageText":"Property 'fruit' has no initializer and is not definitely assigned in the constructor.","category":1,"code":2564}]],168,[165,[{"file":"../../../../../../src/main/ets/pages/componentstatemigration/propeasyv1.ets","start":685,"length":5,"messageText":"Property 'value' has no initializer and is not definitely assigned in the constructor.","category":1,"code":2564}]],166,171,172,[169,[{"file":"../../../../../../src/main/ets/pages/componentstatemigration/propsubcomponentupdatevarv1.ets","start":708,"length":5,"messageText":"Property 'value' has no initializer and is not definitely assigned in the constructor.","category":1,"code":2564}]],170,[173,[{"file":"../../../../../../src/main/ets/pages/componentstatemigration/providealiasv1.ets","start":734,"length":12,"messageText":"Property 'childMessage' has no initializer and is not definitely assigned in the constructor.","category":1,"code":2564},{"file":"../../../../../../src/main/ets/pages/componentstatemigration/providealiasv1.ets","start":768,"length":7,"messageText":"Property 'message' has no initializer and is not definitely assigned in the constructor.","category":1,"code":2564}]],174,180,176,[175,[{"file":"../../../../../../src/main/ets/pages/componentstatemigration/provideconsumenoinitv1.ets","start":733,"length":7,"messageText":"Property 'message' has no initializer and is not definitely assigned in the constructor.","category":1,"code":2564}]],[179,[{"file":"../../../../../../src/main/ets/pages/componentstatemigration/providenoallowoverridev1.ets","start":1061,"length":11,"messageText":"Property 'reviewVotes' has no initializer and is not definitely assigned in the constructor.","category":1,"code":2564}]],177,178,159,160,157,158,161,162,183,184,181,182,156],"affectedFilesPendingEmit":[[136,1],[93,1],[67,1],[64,1],[106,1],[108,1],[63,1],[100,1],[146,1],[98,1],[96,1],[66,1],[65,1],[97,1],[95,1],[107,1],[111,1],[99,1],[150,1],[49,1],[154,1],[116,1],[80,1],[118,1],[71,1],[77,1],[92,1],[114,1],[204,1],[207,1],[148,1],[46,1],[57,1],[132,1],[138,1],[137,1],[117,1],[200,1],[153,1],[75,1],[69,1],[81,1],[82,1],[215,1],[308,1],[206,1],[151,1],[313,1],[205,1],[115,1],[76,1],[74,1],[201,1],[147,1],[322,1],[78,1],[72,1],[79,1],[73,1],[321,1],[320,1],[323,1],[324,1],[149,1],[103,1],[94,1],[141,1],[139,1],[140,1],[124,1],[125,1],[135,1],[129,1],[121,1],[104,1],[60,1],[109,1],[62,1],[145,1],[59,1],[68,1],[110,1],[143,1],[105,1],[119,1],[122,1],[144,1],[61,1],[58,1],[112,1],[120,1],[102,1],[101,1],[142,1],[88,1],[302,1],[86,1],[85,1],[87,1],[83,1],[202,1],[91,1],[89,1],[84,1],[203,1],[90,1],[133,1],[128,1],[131,1],[127,1],[130,1],[134,1],[126,1],[53,1],[51,1],[56,1],[48,1],[54,1],[55,1],[47,1],[52,1],[123,1],[70,1],[50,1],[213,1],[214,1],[210,1],[212,1],[211,1],[187,1],[188,1],[189,1],[190,1],[191,1],[192,1],[193,1],[194,1],[195,1],[196,1],[197,1],[198,1],[199,1],[208,1],[209,1],[216,1],[217,1],[218,1],[219,1],[220,1],[221,1],[222,1],[223,1],[224,1],[225,1],[226,1],[227,1],[228,1],[229,1],[230,1],[231,1],[232,1],[234,1],[233,1],[235,1],[236,1],[237,1],[238,1],[240,1],[241,1],[242,1],[239,1],[243,1],[244,1],[245,1],[246,1],[247,1],[330,1],[299,1],[248,1],[249,1],[250,1],[251,1],[252,1],[253,1],[254,1],[256,1],[255,1],[257,1],[258,1],[259,1],[260,1],[261,1],[262,1],[263,1],[264,1],[265,1],[266,1],[267,1],[268,1],[269,1],[270,1],[271,1],[272,1],[273,1],[274,1],[275,1],[276,1],[277,1],[278,1],[279,1],[280,1],[281,1],[282,1],[283,1],[284,1],[285,1],[286,1],[287,1],[288,1],[289,1],[290,1],[291,1],[327,1],[292,1],[293,1],[294,1],[295,1],[296,1],[297,1],[329,1],[298,1],[301,1],[300,1],[304,1],[303,1],[305,1],[306,1],[307,1],[309,1],[310,1],[311,1],[312,1],[314,1],[315,1],[316,1],[318,1],[319,1],[328,1],[325,1],[317,1],[326,1],[2,1],[3,1],[4,1],[5,1],[6,1],[7,1],[8,1],[113,1],[152,1],[155,1],[185,1],[186,1],[163,1],[164,1],[167,1],[168,1],[165,1],[166,1],[171,1],[172,1],[169,1],[170,1],[173,1],[174,1],[180,1],[176,1],[175,1],[179,1],[177,1],[178,1],[159,1],[160,1],[157,1],[158,1],[161,1],[162,1],[183,1],[184,1],[181,1],[182,1],[156,1]]},"version":"4.9.5"} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/compileInfo.json b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/compileInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..b28e1248f0f28395ac2cdb6901cb518cc89c08c1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/compileInfo.json @@ -0,0 +1 @@ +{"buildMode":"Debug"} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compileContextInfo.json b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compileContextInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..dace47128d8e2e2ba8517762786c20f2187692d1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compileContextInfo.json @@ -0,0 +1 @@ +{"hspPkgNames":[],"compileEntries":["&entry/src/main/ets/entryability/EntryAbility&","&entry/src/main/ets/entrybackupability/EntryBackupAbility&","&entry/src/main/ets/pages/Index&","&entry/src/main/ets/pages/componentstatemigration/StateEasyV1&","&entry/src/main/ets/pages/componentstatemigration/StateEasyV2&","&entry/src/main/ets/pages/componentstatemigration/StateComplexV1&","&entry/src/main/ets/pages/componentstatemigration/StateComplexV2&","&entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1&","&entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2&","&entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1&","&entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2&","&entry/src/main/ets/pages/componentstatemigration/PropEasyV1&","&entry/src/main/ets/pages/componentstatemigration/PropEasyV2&","&entry/src/main/ets/pages/componentstatemigration/PropComplexV1&","&entry/src/main/ets/pages/componentstatemigration/PropComplexV2&","&entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1&","&entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2&","&entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1&","&entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2&","&entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1&","&entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2&","&entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1&","&entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2&","&entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1&","&entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2&","&entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1&","&entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2&","&entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1&","&entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2&","&entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1&","&entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2&","&entry/src/main/ets/pages/componentstatemigration/ComputedV1&","&entry/src/main/ets/pages/componentstatemigration/ComputedV2&"],"updateVersionInfo":{}} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ComputedV1.ets-dfa9f0d12b2b5029ba92ea37ccffb4cb.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ComputedV1.ets-dfa9f0d12b2b5029ba92ea37ccffb4cb.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..ab4a68c2afc4d51e348f39abe18117f15abfa54f Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ComputedV1.ets-dfa9f0d12b2b5029ba92ea37ccffb4cb.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ComputedV2.ets-23a9201acba58b7bbf5ca1c4cb68fc49.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ComputedV2.ets-23a9201acba58b7bbf5ca1c4cb68fc49.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..05eb2450cc905f0789d8b0c93787708387f23ac6 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ComputedV2.ets-23a9201acba58b7bbf5ca1c4cb68fc49.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/EntryAbility.ets-f6598f93c1eebc0308326d60265fecbf.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/EntryAbility.ets-f6598f93c1eebc0308326d60265fecbf.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..01d8702b5a92e538c71966bbea8dc40df06d9b15 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/EntryAbility.ets-f6598f93c1eebc0308326d60265fecbf.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/EntryBackupAbility.ets-8fb6d10e24d06ab44004f738efc10e2e.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/EntryBackupAbility.ets-8fb6d10e24d06ab44004f738efc10e2e.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..d91d82097e6cf37db178b15183b9f2158b18ba4d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/EntryBackupAbility.ets-8fb6d10e24d06ab44004f738efc10e2e.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/Index.ets-f7115e7e2e9adf05ea6e4d43448265d3.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/Index.ets-f7115e7e2e9adf05ea6e4d43448265d3.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..151395a831bc663097af69f6d95bc15f34adbafb --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/Index.ets-f7115e7e2e9adf05ea6e4d43448265d3.msgpack @@ -0,0 +1,524 @@ +r@assertionscodecustomTransformCachedependenciesidmetamoduleSideEffectsoriginalCodeoriginalSourcemapresolvedIdssourcemapChainsyntheticNamedExportstransformDependenciestransformFilescacheAstrA#"use strict"; +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +let demandList = [ + { + name: 'StateEasyV1', + router: 'pages/componentstatemigration/StateEasyV1', + }, + { + name: 'StateEasyV2', + router: 'pages/componentstatemigration/StateEasyV2', + }, + { + name: 'StateComplexV1', + router: 'pages/componentstatemigration/StateComplexV1', + }, + { + name: 'StateComplexV2', + router: 'pages/componentstatemigration/StateComplexV2', + }, + { + name: 'StateExternalInitializationV1', + router: 'pages/componentstatemigration/StateExternalInitializationV1', + }, + { + name: 'StateExternalInitializationV2', + router: 'pages/componentstatemigration/StateExternalInitializationV2', + }, + { + name: 'LinkMiigrationV1', + router: 'pages/componentstatemigration/LinkMiigrationV1', + }, + { + name: 'LinkMiigrationV2', + router: 'pages/componentstatemigration/LinkMiigrationV2', + }, + { + name: 'PropEasyV1', + router: 'pages/componentstatemigration/PropEasyV1', + }, + { + name: 'PropEasyV2', + router: 'pages/componentstatemigration/PropEasyV2', + }, + { + name: 'PropComplexV1', + router: 'pages/componentstatemigration/PropComplexV1', + }, + { + name: 'PropComplexV2', + router: 'pages/componentstatemigration/PropComplexV2', + }, + { + name: 'PropSubComponentUpdateVarV1', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarV1', + }, + { + name: 'PropSubComponentUpdateVarV2', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarV2', + }, + { + name: 'PropSubComponentUpdateVarLocalV1', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV1', + }, + { + name: 'PropSubComponentUpdateVarLocalV2', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV2', + }, + { + name: 'ProvideAliasV1', + router: 'pages/componentstatemigration/ProvideAliasV1', + }, + { + name: 'ProvideAliasV2', + router: 'pages/componentstatemigration/ProvideAliasV2', + }, + { + name: 'ProvideConsumeNoInitV1', + router: 'pages/componentstatemigration/ProvideConsumeNoInitV1', + }, + { + name: 'ProvideConsumeInitV2', + router: 'pages/componentstatemigration/ProvideConsumeInitV2', + }, + { + name: 'ProvideParentInitV1', + router: 'pages/componentstatemigration/ProvideParentInitV1', + }, + { + name: 'ProvideParentNoInitV2', + router: 'pages/componentstatemigration/ProvideParentNoInitV2', + }, + { + name: 'ProvideNoAllowOverrideV1', + router: 'pages/componentstatemigration/ProvideNoAllowOverrideV1', + }, + { + name: 'ProvideAllowOverrideV2', + router: 'pages/componentstatemigration/ProvideAllowOverrideV2', + }, + { + name: 'WatchSingleVarV1', + router: 'pages/componentstatemigration/WatchSingleVarV1', + }, + { + name: 'WatchSingleVarV2', + router: 'pages/componentstatemigration/WatchSingleVarV2', + }, + { + name: 'WatchMoreVarV1', + router: 'pages/componentstatemigration/WatchMoreVarV1', + }, + { + name: 'WatchMoreVarV2', + router: 'pages/componentstatemigration/WatchMoreVarV2', + }, + { + name: 'ComputedV1', + router: 'pages/componentstatemigration/ComputedV1', + }, + { + name: 'ComputedV2', + router: 'pages/componentstatemigration/ComputedV2', + } +]; +class Index extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__bgColor = new ObservedPropertyObjectPU('#39b5fa', this, "bgColor"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params) { + if (params.bgColor !== undefined) { + this.bgColor = params.bgColor; + } + } + updateStateVars(params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__bgColor.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__bgColor.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + get bgColor() { + return this.__bgColor.get(); + } + set bgColor(newValue) { + this.__bgColor.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create({ "id": 16777223, "type": 10003, params: [], "bundleName": "com.samples.statemigrationproject", "moduleName": "entry" }); + Text.height('5%'); + Text.width('100%'); + Text.textAlign(TextAlign.Center); + Text.fontSize(15); + Text.fontWeight(FontWeight.Bold); + Text.backgroundColor(ObservedObject.GetRawObject(this.bgColor)); + Text.fontColor(Color.White); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + Column.width('100%'); + Column.backgroundColor('#fff4f3f3'); + Column.padding({ top: 5 }); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + List.create({ space: 20, initialIndex: 0 }); + List.listDirection(Axis.Vertical); + List.scrollBar(BarState.Off); + List.friction(0.6); + List.divider({ + strokeWidth: 2, + color: 0xFFFFFF, + startMargin: 20, + endMargin: 20 + }); + List.edgeEffect(EdgeEffect.Spring); + List.contentEndOffset(50); + List.width('90%'); + }, List); + this.observeComponentCreation2((elmtId, isInitialRender) => { + ForEach.create(); + const forEachItemGenFunction = (_item, index) => { + const listitem = _item; + { + const itemCreation = (elmtId, isInitialRender) => { + ViewStackProcessor.StartGetAccessRecordingFor(elmtId); + ListItem.create(deepRenderFunction, true); + if (!isInitialRender) { + ListItem.pop(); + } + ViewStackProcessor.StopGetAccessRecording(); + }; + const itemCreation2 = (elmtId, isInitialRender) => { + ListItem.create(deepRenderFunction, true); + }; + const deepRenderFunction = (elmtId, isInitialRender) => { + itemCreation(elmtId, isInitialRender); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + Column.onClick(() => { + if (!!listitem.router) { + this.getUIContext().getRouter().pushUrl({ url: listitem.router }); + } + }); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(listitem.name); + Text.fontSize(15); + Text.fontColor(ObservedObject.GetRawObject(this.bgColor)); + Text.maxLines(1); + }, Text); + Text.pop(); + Column.pop(); + ListItem.pop(); + }; + this.observeComponentCreation2(itemCreation2, ListItem); + ListItem.pop(); + } + }; + this.forEachUpdateFunction(elmtId, demandList, forEachItemGenFunction, undefined, true, false); + }, ForEach); + ForEach.pop(); + List.pop(); + Column.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName() { + return "Index"; + } +} +registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/Index", pageFullPath: "entry/src/main/ets/pages/Index", integratedHsp: "false", moduleType: "followWithHap" }); +//# sourceMappingURL=Index.js.mappE:\applications_app_samples\code\DocsSample\ArkUISample\StateMigrationProject\entry\src\main\ets\pages\Index.etsrBmoduleNameisLocalDependencyisNodeEntryFilepkgPathbelongProjectPathpkgNamepkgVersiondependencyPkgInfobelongModulePathcheckershouldEmitJsentrySE:\applications_app_samples\code\DocsSample\ArkUISample\StateMigrationProject\entryME:\applications_app_samples\code\DocsSample\ArkUISample\StateMigrationProjectentry1.0.0SE:\applications_app_samples\code\DocsSample\ArkUISample\StateMigrationProject\entryrCgetNodeCountgetIdentifierCountgetSymbolCountgetTypeCountgetInstantiationCountgetRelationCacheSizesisUndefinedSymbolisArgumentsSymbolisUnknownSymbolgetMergedSymbolgetDiagnosticsgetGlobalDiagnosticsgetRecursionIdentitygetUnmatchedPropertiesgetTypeOfSymbolAtLocationgetTypeOfSymbol(getSymbolsOfParameterPropertyDeclarationgetDeclaredTypeOfSymbolgetPropertiesOfTypegetPropertyOfType"getPrivateIdentifierPropertyOfTypegetTypeOfPropertyOfTypegetIndexInfoOfTypegetIndexInfosOfTypegetIndexInfosOfIndexSymbolgetSignaturesOfTypegetIndexTypeOfTypegetIndexTypegetBaseTypesgetBaseTypeOfLiteralTypegetWidenedTypegetTypeFromTypeNodegetParameterType$getParameterIdentifierNameAtPositiongetPromisedTypeOfPromisegetAwaitedTypegetReturnTypeOfSignatureisNullableTypegetNullableTypegetNonNullableTypegetNonOptionalTypegetTypeArgumentstypeToTypeNode$indexInfoToIndexSignatureDeclarationsignatureToSignatureDeclarationsymbolToEntityNamesymbolToExpressionsymbolToNode!symbolToTypeParameterDeclarationssymbolToParameterDeclarationtypeParameterToDeclarationgetSymbolsInScopegetSymbolAtLocationgetIndexInfosAtLocation!getShorthandAssignmentValueSymbol#getExportSpecifierLocalTargetSymbolgetExportSymbolOfSymbolgetTypeAtLocation tryGetTypeAtLocationWithoutCheckgetTypeOfAssignmentPattern*getPropertySymbolOfDestructuringAssignmentsignatureToStringtypeToStringsymbolToStringtypePredicateToStringwriteSignaturewriteTypewriteSymbolwriteTypePredicategetAugmentedPropertiesOfTypegetRootSymbolsgetSymbolOfExpandogetContextualType(getContextualTypeForObjectLiteralElement#getContextualTypeForArgumentAtIndex getContextualTypeForJsxAttributeisContextSensitive!getTypeOfPropertyOfContextualTypegetFullyQualifiedName#tryGetResolvedSignatureWithoutCheckgetResolvedSignature/getResolvedSignatureForStringLiteralCompletions$getResolvedSignatureForSignatureHelpgetExpandedParametershasEffectiveRestParametercontainsArgumentsReferencegetConstantValueisValidPropertyAccess#isValidPropertyAccessForCompletionsgetSignatureFromDeclarationisImplementationOfOverloadgetImmediateAliasedSymbolgetAliasedSymbolgetEmitResolvergetExportsOfModulegetExportsAndPropertiesOfModule forEachExportAndPropertyOfModulegetSymbolWalkergetAmbientModulesgetJsxIntrinsicTagNamesAtisOptionalParametertryGetMemberInModuleExports(tryGetMemberInModuleExportsAndPropertiestryFindAmbientModule(tryFindAmbientModuleWithoutAugmentationsgetApparentTypegetUnionTypeisTypeAssignableTocreateAnonymousTypecreateSignaturecreateSymbolcreateIndexInfogetAnyTypegetStringTypegetNumberTypecreatePromiseTypecreateArrayTypegetElementTypeOfArrayTypegetBooleanTypegetFalseTypegetTrueTypegetVoidTypegetUndefinedTypegetNullTypegetESSymbolTypegetNeverTypegetOptionalTypegetPromiseTypegetPromiseLikeTypegetAsyncIterableTypeisSymbolAccessibleisArrayTypeisTupleTypeisArrayLikeType#isTypeInvalidDueToUnionDiscriminantgetExactOptionalPropertiesgetAllPossiblePropertiesOfTypes(getSuggestedSymbolForNonexistentProperty#getSuggestionForNonexistentProperty,getSuggestedSymbolForNonexistentJSXAttribute&getSuggestedSymbolForNonexistentSymbol!getSuggestionForNonexistentSymbol&getSuggestedSymbolForNonexistentModule!getSuggestionForNonexistentExport+getSuggestedSymbolForNonexistentClassMembergetBaseConstraintOfTypegetDefaultFromTypeParameterresolveNamegetJsxNamespacegetJsxFragmentFactorygetAccessibleSymbolChaingetTypePredicateOfSignatureresolveExternalModuleNameresolveExternalModuleSymboltryGetThisTypeAtgetTypeArgumentConstraintgetSuggestionDiagnosticsrunWithCancellationToken3getLocalTypeParametersOfClassOrInterfaceOrTypeAliasisDeclarationVisibleisPropertyAccessiblegetTypeOnlyAliasDeclarationgetMemberOverrideModifierStatus!isTypeParameterPossiblyReferencedgetConstEnumRelateclearConstEnumRelatedeleteConstEnumRelate$getTypeArgumentsForResolvedSignaturegetCheckedSourceFiles"collectHaveTsNoCheckFilesForLinterclearQualifiedNameCacheisStaticRecordisStaticSourceFilecreateIntrinsicTypeO/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +interface listItem { + router?: string; + name: string; + description?: string; +} + +let demandList: listItem[] = [ + { + name: 'StateEasyV1', + router: 'pages/componentstatemigration/StateEasyV1', + }, + { + name: 'StateEasyV2', + router: 'pages/componentstatemigration/StateEasyV2', + }, + { + name: 'StateComplexV1', + router: 'pages/componentstatemigration/StateComplexV1', + }, + { + name: 'StateComplexV2', + router: 'pages/componentstatemigration/StateComplexV2', + }, + { + name: 'StateExternalInitializationV1', + router: 'pages/componentstatemigration/StateExternalInitializationV1', + }, + { + name: 'StateExternalInitializationV2', + router: 'pages/componentstatemigration/StateExternalInitializationV2', + }, + { + name: 'LinkMiigrationV1', + router: 'pages/componentstatemigration/LinkMiigrationV1', + }, + { + name: 'LinkMiigrationV2', + router: 'pages/componentstatemigration/LinkMiigrationV2', + }, + { + name: 'PropEasyV1', + router: 'pages/componentstatemigration/PropEasyV1', + }, + { + name: 'PropEasyV2', + router: 'pages/componentstatemigration/PropEasyV2', + }, + { + name: 'PropComplexV1', + router: 'pages/componentstatemigration/PropComplexV1', + }, + { + name: 'PropComplexV2', + router: 'pages/componentstatemigration/PropComplexV2', + }, + { + name: 'PropSubComponentUpdateVarV1', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarV1', + }, + { + name: 'PropSubComponentUpdateVarV2', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarV2', + }, + { + name: 'PropSubComponentUpdateVarLocalV1', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV1', + }, + { + name: 'PropSubComponentUpdateVarLocalV2', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV2', + }, + { + name: 'ProvideAliasV1', + router: 'pages/componentstatemigration/ProvideAliasV1', + }, + { + name: 'ProvideAliasV2', + router: 'pages/componentstatemigration/ProvideAliasV2', + }, + { + name: 'ProvideConsumeNoInitV1', + router: 'pages/componentstatemigration/ProvideConsumeNoInitV1', + }, + { + name: 'ProvideConsumeInitV2', + router: 'pages/componentstatemigration/ProvideConsumeInitV2', + }, + { + name: 'ProvideParentInitV1', + router: 'pages/componentstatemigration/ProvideParentInitV1', + }, + { + name: 'ProvideParentNoInitV2', + router: 'pages/componentstatemigration/ProvideParentNoInitV2', + }, + { + name: 'ProvideNoAllowOverrideV1', + router: 'pages/componentstatemigration/ProvideNoAllowOverrideV1', + }, + { + name: 'ProvideAllowOverrideV2', + router: 'pages/componentstatemigration/ProvideAllowOverrideV2', + }, + { + name: 'WatchSingleVarV1', + router: 'pages/componentstatemigration/WatchSingleVarV1', + }, + { + name: 'WatchSingleVarV2', + router: 'pages/componentstatemigration/WatchSingleVarV2', + }, + { + name: 'WatchMoreVarV1', + router: 'pages/componentstatemigration/WatchMoreVarV1', + }, + { + name: 'WatchMoreVarV2', + router: 'pages/componentstatemigration/WatchMoreVarV2', + }, + { + name: 'ComputedV1', + router: 'pages/componentstatemigration/ComputedV1', + }, + { + name: 'ComputedV2', + router: 'pages/componentstatemigration/ComputedV2', + } +] + +@Entry +@Component +struct Index { + @State bgColor: ResourceColor = '#39b5fa'; + + build() { + Column() { + Text($r('app.string.state_migration')) + .height('5%') + .width('100%') + .textAlign(TextAlign.Center) + .fontSize(15) + .fontWeight(FontWeight.Bold) + .backgroundColor(this.bgColor) + .fontColor(Color.White) + + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(demandList, (listitem: listItem, index: number) => { + ListItem() { + Column() { + Text(listitem.name) + .fontSize(15) + .fontColor(this.bgColor) + .maxLines(1) + } + .onClick(() => { + if (!!listitem.router) { + this.getUIContext().getRouter().pushUrl({ url: listitem.router }) + } + }) + } + }) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ + strokeWidth: 2, + color: 0xFFFFFF, + startMargin: 20, + endMargin: 20 + }) + .edgeEffect(EdgeEffect.Spring) + .contentEndOffset(50) + .width('90%') + } + .width('100%') + // .height('100%') + .backgroundColor('#fff4f3f3') + .padding({ top: 5 }) + } + } +}ArDversionfilesourceRootsourcesnamesmappingsIndex.jsIndex.ets𐐐  + + ;7  + + ;7  +  + > :!"# ## +#$$ +$ >$:%&' '' +-')(( +( M(I)*+ ++ +-+),, +, M,I-./ // + /00 +0 @0<123 33 + 344 +4 @4<567 77 +788 +8 :869:; ;; +;<< +< :<6=>? ?? +?@@ +@ =@9ABC CC +CDD +D =D9EFG GG ++G'HH +H KHGIJK KK ++K'LL +L KLGMNO OO +0O,PP +P PPLQRS SS +0S,TT +T PTLUVW WW +WXX +X >X:YZ[ [[ +[\\ +\ >\:]^_ __ +&_"`` +` F`Babc cc +$c dd +d Dd@efg gg +#ghh +h Ch?ijk kk +%k!ll +l ElAmno oo +(o$pp +p HpDqrs ss +&s"tt +t FtBuvw ww + wxx +x @x<yz{ {{ + {|| +| @|<}~  +̀̀ +̀ >̀:́̂̃ ̃̃ +̃̄̄ +̄ >̄:̅̆̇ ̇̇ +̇̈̈ +̈ :̈6̉̊̋ ̋̋ +̋̌̌ +̌ :̌6̍̎̎̒ ̒ ̐6̓"?̓+̎̓ ̓̓ ̓̕ ̖̖ + ̗̗ + ̗̗ +̘ ̘̘̘ ̗̗ +̙ ̙̙̙ ̗̗ +̚ ̚̚$̚%̚+̚# ̗̗ +̛ ̛̛̛ ̗̗ +̜ ̜̜&̜'̜+̜# ̗̗ +̝ ̝=̝A̝B̝I̝% ̗̗ +̞ ̞̞ ̞!̞&̞̗ ̗ + ̠̠ ̠̠ ̿̿ ̿ ̿ ̠̠ "#." ̠̠  "#% ̡̡ ̡ ̡̡!̡#̡%̡1̡&3̡(4̡)6̡+ ̡̡ ̲ ̲̲#̲$̲,̲$ ̡̡ ̳ ̳̳#̳$̳'̳ ̡̡ ̴ ̴̴̴ ̡̡ ̵ ̵̵̶ +̶̶̶̷ +̷̷̷̸ +̸̸̸̹ +̹̹̹ ̺ ̡̡ ̻ ̻̻&̻'̻-̻% ̡̡ ̼ !̼"̼$̼ ̡̡ ̽ ̽̽̽ ̢ +̢3̢38̢@̣ $̣̤"̤̤"̤#̪*̪+̪.̪0̪ ̫$̫%̫&̫.̫/̫5̫%7̫'$̬(̬)̬5̬#7̬%8̬&A̬/C̬1D̬2K̬9L̬:N̬?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~̴̵̶̷̸̡̢̧̨̛̖̗̘̙̜̝̞̟̠̣̤̥̦̩̪̫̬̭̮̯̰̱̲̳̹̺̻̼̀́̂̃̄̅̆̇̈̉̊̋̌̍̎̏̐̑̒̓̔̽̾̿̕̚rFmissingpluginægenAbcrGdynamicImportCacheexportAllDeclarationCacheexportNamedDeclarationCacheimportCache \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/LinkMiigrationV1.ets-a265f36791683cf16b65e8d4960afa7e.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/LinkMiigrationV1.ets-a265f36791683cf16b65e8d4960afa7e.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..5581ad76157f3b46aa84a31d4ba02c07da714b98 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/LinkMiigrationV1.ets-a265f36791683cf16b65e8d4960afa7e.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/LinkMiigrationV2.ets-e31f126b60c4e0965d69de14d54ca82a.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/LinkMiigrationV2.ets-e31f126b60c4e0965d69de14d54ca82a.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..a25d0cf980bb383fb2469d4c3534d4c9f201c5d6 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/LinkMiigrationV2.ets-e31f126b60c4e0965d69de14d54ca82a.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropComplexV1.ets-0b2efec7b0aca9dcaa4f7ffff2fd6184.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropComplexV1.ets-0b2efec7b0aca9dcaa4f7ffff2fd6184.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..58344d59bc77c07f83c70801822dd61984353b11 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropComplexV1.ets-0b2efec7b0aca9dcaa4f7ffff2fd6184.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropComplexV2.ets-b6e285a29947f6cf8e8f001ea7c61fe8.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropComplexV2.ets-b6e285a29947f6cf8e8f001ea7c61fe8.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..4564626b70abbceceb4a99c8b18adac239c283de Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropComplexV2.ets-b6e285a29947f6cf8e8f001ea7c61fe8.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropEasyV1.ets-45c7b33154b1e4bc1ba222f453f46331.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropEasyV1.ets-45c7b33154b1e4bc1ba222f453f46331.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..4414acafde0a74d9e4a876e6fdf09974675e0344 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropEasyV1.ets-45c7b33154b1e4bc1ba222f453f46331.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropEasyV2.ets-740127bbaa686c84dcdef2894c360640.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropEasyV2.ets-740127bbaa686c84dcdef2894c360640.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..66ab6403e5e11cbe08f185b3897ce7fb12661109 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropEasyV2.ets-740127bbaa686c84dcdef2894c360640.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarLocalV1.ets-3f21814c51cb840c6f2291e528036abb.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarLocalV1.ets-3f21814c51cb840c6f2291e528036abb.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..0d248900618315b2274780b5b3deb28f533461aa Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarLocalV1.ets-3f21814c51cb840c6f2291e528036abb.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarLocalV2.ets-3eea53bdd8eb8de8c365a48f769ec1e6.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarLocalV2.ets-3eea53bdd8eb8de8c365a48f769ec1e6.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..1241cbfad992fe119e92d6b9f3866f4f4c9709fd Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarLocalV2.ets-3eea53bdd8eb8de8c365a48f769ec1e6.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarV1.ets-17362ddd8495df611cfcc58d4e7be26a.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarV1.ets-17362ddd8495df611cfcc58d4e7be26a.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..c5993fab0c15cc84a1252e2388b7eb4d31a689d5 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarV1.ets-17362ddd8495df611cfcc58d4e7be26a.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarV2.ets-836249e78c1c4eb2db7fe819d15971f0.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarV2.ets-836249e78c1c4eb2db7fe819d15971f0.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..ee629561c88490086e113480142bf26d7b4b6e29 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/PropSubComponentUpdateVarV2.ets-836249e78c1c4eb2db7fe819d15971f0.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideAliasV1.ets-c553184d70cb66bd17ab09743b91c788.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideAliasV1.ets-c553184d70cb66bd17ab09743b91c788.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..04983f2c285547ddb0219d92669a08199546beb4 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideAliasV1.ets-c553184d70cb66bd17ab09743b91c788.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideAliasV2.ets-1453a4624922610723ad8804685ebf18.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideAliasV2.ets-1453a4624922610723ad8804685ebf18.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..9e72caea4222518c797dd7fe4eb7bc951ae98140 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideAliasV2.ets-1453a4624922610723ad8804685ebf18.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideAllowOverrideV2.ets-07fa41f0fdbe3ff63dc2f02da02f7b1d.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideAllowOverrideV2.ets-07fa41f0fdbe3ff63dc2f02da02f7b1d.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..11ac05018de040c386caf15eab1d2d2687a7e1a8 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideAllowOverrideV2.ets-07fa41f0fdbe3ff63dc2f02da02f7b1d.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideConsumeInitV2.ets-8d66c8b48a71715018e2860a7d205351.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideConsumeInitV2.ets-8d66c8b48a71715018e2860a7d205351.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..d98223bc8f52332dac951937970b46f3c16ea537 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideConsumeInitV2.ets-8d66c8b48a71715018e2860a7d205351.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideConsumeNoInitV1.ets-42c5951d223a6c9613488d8e531c6cc3.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideConsumeNoInitV1.ets-42c5951d223a6c9613488d8e531c6cc3.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..c6e3240bb964f26e723123734ef2046cfbd9767b Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideConsumeNoInitV1.ets-42c5951d223a6c9613488d8e531c6cc3.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideNoAllowOverrideV1.ets-9632b2907f41f3812dbae683c8883dd9.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideNoAllowOverrideV1.ets-9632b2907f41f3812dbae683c8883dd9.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..5a19d8b9d307f96a220f18347f317a95cef19685 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideNoAllowOverrideV1.ets-9632b2907f41f3812dbae683c8883dd9.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideParentInitV1.ets-8c35a86fb6149e0ee62020c73a1ad352.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideParentInitV1.ets-8c35a86fb6149e0ee62020c73a1ad352.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..3153e96ac2baaaf9965b1b8817c849c6de5a9b7f Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideParentInitV1.ets-8c35a86fb6149e0ee62020c73a1ad352.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideParentNoInitV2.ets-6068005fb4de7d0479d2ce99ccfee0ac.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideParentNoInitV2.ets-6068005fb4de7d0479d2ce99ccfee0ac.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..687ed41b46ea298c415df782c150b69637eb80a6 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/ProvideParentNoInitV2.ets-6068005fb4de7d0479d2ce99ccfee0ac.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateComplexV1.ets-dddafd764e36f63a4367e6dc82a7f890.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateComplexV1.ets-dddafd764e36f63a4367e6dc82a7f890.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..e1b3996a1987a277ecda99c60bcb29708c94a499 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateComplexV1.ets-dddafd764e36f63a4367e6dc82a7f890.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateComplexV2.ets-233d32b4747d6e8a58a80b25b141e865.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateComplexV2.ets-233d32b4747d6e8a58a80b25b141e865.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..4af951a6d4d95605c454cf0ab1dfea62a29ed79c Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateComplexV2.ets-233d32b4747d6e8a58a80b25b141e865.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateEasyV1.ets-8185086636e9ffcef1a6a4164759dbc6.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateEasyV1.ets-8185086636e9ffcef1a6a4164759dbc6.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..015358106ab347afc490947d6f510e398c323b6d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateEasyV1.ets-8185086636e9ffcef1a6a4164759dbc6.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateEasyV2.ets-ccd8b003e778a222217d4728d86d0182.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateEasyV2.ets-ccd8b003e778a222217d4728d86d0182.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..b2a37f7846a80dc18ce6b38cad1dd6afb4c48201 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateEasyV2.ets-ccd8b003e778a222217d4728d86d0182.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateExternalInitializationV1.ets-44c20f5d3166c6a3ab17c4cbbf0e4050.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateExternalInitializationV1.ets-44c20f5d3166c6a3ab17c4cbbf0e4050.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..0d86f3ee078d479abfe0a674d981a1e24490d765 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateExternalInitializationV1.ets-44c20f5d3166c6a3ab17c4cbbf0e4050.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateExternalInitializationV2.ets-5e6a46a8ea51c476b0f4666dede14e3a.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateExternalInitializationV2.ets-5e6a46a8ea51c476b0f4666dede14e3a.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..0cb60961c407e21c025c2ab324d93d2cf12c641d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/StateExternalInitializationV2.ets-5e6a46a8ea51c476b0f4666dede14e3a.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchMoreVarV1.ets-93f039717276ddd7dbbd3e004c085c4b.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchMoreVarV1.ets-93f039717276ddd7dbbd3e004c085c4b.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..e4b3b0e20434cb2aea13ac34d2e51da64d06fd54 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchMoreVarV1.ets-93f039717276ddd7dbbd3e004c085c4b.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchMoreVarV2.ets-9851ac5c0016b8dde1e59631f6394ce1.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchMoreVarV2.ets-9851ac5c0016b8dde1e59631f6394ce1.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..4ecb9bbf5f1a0e3e7c0663ca07bf06294dad68c1 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchMoreVarV2.ets-9851ac5c0016b8dde1e59631f6394ce1.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchSingleVarV1.ets-5932bfc7b23cf9700d610c67a55bcaf2.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchSingleVarV1.ets-5932bfc7b23cf9700d610c67a55bcaf2.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..ff77e3f7c765ce72b28e367b47c36a77cfea1ecb Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchSingleVarV1.ets-5932bfc7b23cf9700d610c67a55bcaf2.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchSingleVarV2.ets-0cca5415fd6e5a704541686ffe7404dc.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchSingleVarV2.ets-0cca5415fd6e5a704541686ffe7404dc.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..359c579ea6f8b21c478404b7da6aaaed383c9cad Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/modules/WatchSingleVarV2.ets-0cca5415fd6e5a704541686ffe7404dc.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/other/pkgName2SourceRoots.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/other/pkgName2SourceRoots.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..e0bdb76fe6759066b2a5f39fe5f21272c3ed36c2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/other/pkgName2SourceRoots.msgpack @@ -0,0 +1 @@ +r@ \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/plugins/plugins.msgpack b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/plugins/plugins.msgpack new file mode 100644 index 0000000000000000000000000000000000000000..f0b4ec261d8e39da06a2749b0aaa8905ba94e36d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/compiler.cache/plugins/plugins.msgpack differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/dep_info.json b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/dep_info.json new file mode 100644 index 0000000000000000000000000000000000000000..2cb0b1e091870f4b51cc0c643174e81efba97c09 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/dep_info.json @@ -0,0 +1 @@ +{"resolveConflictMode":true,"depName2RootPath":{"@ohos/lottie":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\oh_modules\\.ohpm\\@ohos+lottie@2.0.24\\oh_modules\\@ohos\\lottie","@ohos/hypium":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\oh_modules\\.ohpm\\@ohos+hypium@1.0.24\\oh_modules\\@ohos\\hypium","@ohos/hamock":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\oh_modules\\.ohpm\\@ohos+hamock@1.0.0\\oh_modules\\@ohos\\hamock"},"depName2DepInfo":{"@ohos/lottie":{"dependencyType":"har","isByteCodeHar":false,"pkgRootPath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\oh_modules\\.ohpm\\@ohos+lottie@2.0.24\\oh_modules\\@ohos\\lottie","pkgName":"@ohos/lottie","pkgVersion":"2.0.24"},"@ohos/hypium":{"dependencyType":"har","isByteCodeHar":false,"pkgRootPath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\oh_modules\\.ohpm\\@ohos+hypium@1.0.24\\oh_modules\\@ohos\\hypium","pkgName":"@ohos/hypium","pkgVersion":"1.0.24"},"@ohos/hamock":{"dependencyType":"har","isByteCodeHar":false,"pkgRootPath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\oh_modules\\.ohpm\\@ohos+hamock@1.0.0\\oh_modules\\@ohos\\hamock","pkgName":"@ohos/hamock","pkgVersion":"1.0.0"}}} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entryability/EntryAbility.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entryability/EntryAbility.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..c1a3c028efb9d66c66d06be34baca99762cb07b9 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entryability/EntryAbility.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entryability/EntryAbility.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entryability/EntryAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..5bcadbf771a3c193901246508e307afd2401b0bf --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entryability/EntryAbility.ts @@ -0,0 +1,44 @@ +import type AbilityConstant from "@ohos:app.ability.AbilityConstant"; +import ConfigurationConstant from "@ohos:app.ability.ConfigurationConstant"; +import UIAbility from "@ohos:app.ability.UIAbility"; +import type Want from "@ohos:app.ability.Want"; +import hilog from "@ohos:hilog"; +import type window from "@ohos:window"; +const DOMAIN = 0x0000; +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + try { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + } + catch (err) { + hilog.error(DOMAIN, 'testTag', 'Failed to set colorMode. Cause: %{public}s', JSON.stringify(err)); + } + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entrybackupability/EntryBackupAbility.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entrybackupability/EntryBackupAbility.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..e04eac41ac7c69e97dcb89dbac1c43f8deb76ca4 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entrybackupability/EntryBackupAbility.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entrybackupability/EntryBackupAbility.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entrybackupability/EntryBackupAbility.ts new file mode 100644 index 0000000000000000000000000000000000000000..7a794ad4d2525b290012c0fb01421ac1f1ccb857 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entrybackupability/EntryBackupAbility.ts @@ -0,0 +1,14 @@ +import hilog from "@ohos:hilog"; +import BackupExtensionAbility from "@ohos:application.BackupExtensionAbility"; +import type { BundleVersion as BundleVersion } from "@ohos:application.BackupExtensionAbility"; +const DOMAIN = 0x0000; +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(DOMAIN, 'testTag', 'onBackup ok'); + await Promise.resolve(); + } + async onRestore(bundleVersion: BundleVersion) { + hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + await Promise.resolve(); + } +} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/Index.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/Index.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..82daddc396f8d45735356b8d6a701d3d4847630d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/Index.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/Index.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/Index.ts new file mode 100644 index 0000000000000000000000000000000000000000..bffbd9f51ae30367c5e5a0c6f0e60d3f535d7b91 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/Index.ts @@ -0,0 +1,270 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Index_Params { + bgColor?: ResourceColor; +} +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +interface listItem { + router?: string; + name: string; + description?: string; +} +let demandList: listItem[] = [ + { + name: 'StateEasyV1', + router: 'pages/componentstatemigration/StateEasyV1', + }, + { + name: 'StateEasyV2', + router: 'pages/componentstatemigration/StateEasyV2', + }, + { + name: 'StateComplexV1', + router: 'pages/componentstatemigration/StateComplexV1', + }, + { + name: 'StateComplexV2', + router: 'pages/componentstatemigration/StateComplexV2', + }, + { + name: 'StateExternalInitializationV1', + router: 'pages/componentstatemigration/StateExternalInitializationV1', + }, + { + name: 'StateExternalInitializationV2', + router: 'pages/componentstatemigration/StateExternalInitializationV2', + }, + { + name: 'LinkMiigrationV1', + router: 'pages/componentstatemigration/LinkMiigrationV1', + }, + { + name: 'LinkMiigrationV2', + router: 'pages/componentstatemigration/LinkMiigrationV2', + }, + { + name: 'PropEasyV1', + router: 'pages/componentstatemigration/PropEasyV1', + }, + { + name: 'PropEasyV2', + router: 'pages/componentstatemigration/PropEasyV2', + }, + { + name: 'PropComplexV1', + router: 'pages/componentstatemigration/PropComplexV1', + }, + { + name: 'PropComplexV2', + router: 'pages/componentstatemigration/PropComplexV2', + }, + { + name: 'PropSubComponentUpdateVarV1', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarV1', + }, + { + name: 'PropSubComponentUpdateVarV2', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarV2', + }, + { + name: 'PropSubComponentUpdateVarLocalV1', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV1', + }, + { + name: 'PropSubComponentUpdateVarLocalV2', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV2', + }, + { + name: 'ProvideAliasV1', + router: 'pages/componentstatemigration/ProvideAliasV1', + }, + { + name: 'ProvideAliasV2', + router: 'pages/componentstatemigration/ProvideAliasV2', + }, + { + name: 'ProvideConsumeNoInitV1', + router: 'pages/componentstatemigration/ProvideConsumeNoInitV1', + }, + { + name: 'ProvideConsumeInitV2', + router: 'pages/componentstatemigration/ProvideConsumeInitV2', + }, + { + name: 'ProvideParentInitV1', + router: 'pages/componentstatemigration/ProvideParentInitV1', + }, + { + name: 'ProvideParentNoInitV2', + router: 'pages/componentstatemigration/ProvideParentNoInitV2', + }, + { + name: 'ProvideNoAllowOverrideV1', + router: 'pages/componentstatemigration/ProvideNoAllowOverrideV1', + }, + { + name: 'ProvideAllowOverrideV2', + router: 'pages/componentstatemigration/ProvideAllowOverrideV2', + }, + { + name: 'WatchSingleVarV1', + router: 'pages/componentstatemigration/WatchSingleVarV1', + }, + { + name: 'WatchSingleVarV2', + router: 'pages/componentstatemigration/WatchSingleVarV2', + }, + { + name: 'WatchMoreVarV1', + router: 'pages/componentstatemigration/WatchMoreVarV1', + }, + { + name: 'WatchMoreVarV2', + router: 'pages/componentstatemigration/WatchMoreVarV2', + }, + { + name: 'ComputedV1', + router: 'pages/componentstatemigration/ComputedV1', + }, + { + name: 'ComputedV2', + router: 'pages/componentstatemigration/ComputedV2', + } +]; +class Index extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__bgColor = new ObservedPropertyObjectPU('#39b5fa', this, "bgColor"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Index_Params) { + if (params.bgColor !== undefined) { + this.bgColor = params.bgColor; + } + } + updateStateVars(params: Index_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__bgColor.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__bgColor.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __bgColor: ObservedPropertyObjectPU; + get bgColor() { + return this.__bgColor.get(); + } + set bgColor(newValue: ResourceColor) { + this.__bgColor.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create({ "id": 16777223, "type": 10003, params: [], "bundleName": "com.samples.statemigrationproject", "moduleName": "entry" }); + Text.height('5%'); + Text.width('100%'); + Text.textAlign(TextAlign.Center); + Text.fontSize(15); + Text.fontWeight(FontWeight.Bold); + Text.backgroundColor(ObservedObject.GetRawObject(this.bgColor)); + Text.fontColor(Color.White); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + Column.width('100%'); + Column.backgroundColor('#fff4f3f3'); + Column.padding({ top: 5 }); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + List.create({ space: 20, initialIndex: 0 }); + List.listDirection(Axis.Vertical); + List.scrollBar(BarState.Off); + List.friction(0.6); + List.divider({ + strokeWidth: 2, + color: 0xFFFFFF, + startMargin: 20, + endMargin: 20 + }); + List.edgeEffect(EdgeEffect.Spring); + List.contentEndOffset(50); + List.width('90%'); + }, List); + this.observeComponentCreation2((elmtId, isInitialRender) => { + ForEach.create(); + const forEachItemGenFunction = (_item, index: number) => { + const listitem = _item; + { + const itemCreation = (elmtId, isInitialRender) => { + ViewStackProcessor.StartGetAccessRecordingFor(elmtId); + ListItem.create(deepRenderFunction, true); + if (!isInitialRender) { + ListItem.pop(); + } + ViewStackProcessor.StopGetAccessRecording(); + }; + const itemCreation2 = (elmtId, isInitialRender) => { + ListItem.create(deepRenderFunction, true); + }; + const deepRenderFunction = (elmtId, isInitialRender) => { + itemCreation(elmtId, isInitialRender); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + Column.onClick(() => { + if (!!listitem.router) { + this.getUIContext().getRouter().pushUrl({ url: listitem.router }); + } + }); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(listitem.name); + Text.fontSize(15); + Text.fontColor(ObservedObject.GetRawObject(this.bgColor)); + Text.maxLines(1); + }, Text); + Text.pop(); + Column.pop(); + ListItem.pop(); + }; + this.observeComponentCreation2(itemCreation2, ListItem); + ListItem.pop(); + } + }; + this.forEachUpdateFunction(elmtId, demandList, forEachItemGenFunction, undefined, true, false); + }, ForEach); + ForEach.pop(); + List.pop(); + Column.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Index"; + } +} +registerNamedRoute(() => new Index(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/Index", pageFullPath: "entry/src/main/ets/pages/Index", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..d86d942392ddb07c618d7235fcb7f69bb8906b2d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..0d7f99efe05cdfe067963ba4d92fc1f408ae4319 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV1.ts @@ -0,0 +1,81 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Index1_Params { + firstName?: string; + lastName?: string; +} +class Index1 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__firstName = new ObservedPropertySimplePU('Li', this, "firstName"); + this.__lastName = new ObservedPropertySimplePU('Hua', this, "lastName"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Index1_Params) { + if (params.firstName !== undefined) { + this.firstName = params.firstName; + } + if (params.lastName !== undefined) { + this.lastName = params.lastName; + } + } + updateStateVars(params: Index1_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__firstName.purgeDependencyOnElmtId(rmElmtId); + this.__lastName.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__firstName.aboutToBeDeleted(); + this.__lastName.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __firstName: ObservedPropertySimplePU; + get firstName() { + return this.__firstName.get(); + } + set firstName(newValue: string) { + this.__firstName.set(newValue); + } + private __lastName: ObservedPropertySimplePU; + get lastName() { + return this.__lastName.get(); + } + set lastName(newValue: string) { + this.__lastName.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.lastName + ' ' + this.firstName); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.lastName + ' ' + this.firstName); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('changed lastName'); + Button.onClick(() => { + this.lastName += 'a'; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Index1"; + } +} +registerNamedRoute(() => new Index1(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ComputedV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ComputedV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..a6ded0ba0af7ec28e0002b04fffc3b84aef59b54 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..a507932e9be60a9e31791aadcd2d3bbcf71e9848 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV2.ts @@ -0,0 +1,52 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class Index2 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.firstName = 'Li'; + this.lastName = 'Hua'; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.firstName = 'Li'; + this.lastName = 'Hua'; + this.resetComputed("fullName"); + } + @Local + firstName: string; + @Local + lastName: string; + @Computed + get fullName() { + return this.firstName + ' ' + this.lastName; + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.fullName); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.fullName); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('changed lastName'); + Button.onClick(() => { + this.lastName += 'a'; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Index2"; + } +} +registerNamedRoute(() => new Index2(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ComputedV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ComputedV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..fa1fcbb9116ef1574ff2f87909488685cc2dc2b0 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..05e3e181faa7c5dd9c5207ea8de58e181cd941b9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts @@ -0,0 +1,127 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Parent7_Params { + myVal?: number; +} +interface Child7_Params { + val?: number; +} +class Child7 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__val = new SynchedPropertySimpleTwoWayPU(params.val, this, "val"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child7_Params) { + } + updateStateVars(params: Child7_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__val.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__val.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + // @Link可以双向同步数据 + private __val: SynchedPropertySimpleTwoWayPU; + get val() { + return this.__val.get(); + } + set val(newValue: number) { + this.__val.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('child: ' + this.val.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('+1'); + Button.onClick(() => { + this.val++; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent7 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__myVal = new ObservedPropertySimplePU(10, this, "myVal"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent7_Params) { + if (params.myVal !== undefined) { + this.myVal = params.myVal; + } + } + updateStateVars(params: Parent7_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__myVal.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__myVal.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __myVal: ObservedPropertySimplePU; + get myVal() { + return this.__myVal.get(); + } + set myVal(newValue: number) { + this.__myVal.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('parent: ' + this.myVal.toString()); + }, Text); + Text.pop(); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child7(this, { val: this.__myVal }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ets", line: 40, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return { + val: this.myVal + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Child7" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent7"; + } +} +registerNamedRoute(() => new Parent7(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/LinkMiigrationV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..17894118da22439dcd094f2ff4540820d60156eb Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..e04b2e31b01242beb4c2f0c00b4a4dd20ca19c59 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts @@ -0,0 +1,97 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class Child8 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.initParam("val", (params && "val" in params) ? params.val : 0); + this.addOne = "addOne" in params ? params.addOne : () => { }; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.resetParam("val", (params && "val" in params) ? params.val : 0); + this.addOne = "addOne" in params ? params.addOne : () => { }; + } + // @Param搭配@Event回调实现数据双向同步 + @Param + readonly val: number; + @Event + addOne: () => void; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('child: ' + this.val.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('+1'); + Button.onClick(() => { + this.addOne(); + }); + }, Button); + Button.pop(); + Column.pop(); + } + public updateStateVars(params) { + if (params === undefined) { + return; + } + if ("val" in params) { + this.updateParam("val", params.val); + } + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent8 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.myVal = 10; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.myVal = 10; + } + @Local + myVal: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('parent: ' + this.myVal.toString()); + }, Text); + Text.pop(); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child8(this, { val: this.myVal, addOne: () => this.myVal++ }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ets", line: 41, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return { + val: this.myVal, + addOne: () => this.myVal++ + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + val: this.myVal + }); + } + }, { name: "Child8" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent8"; + } +} +registerNamedRoute(() => new Parent8(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/LinkMiigrationV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..598ef48b837422eab437ee6a7513baceb2a5c476 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..cc6e479d08c387ddad469432a6e410d3d5011b0b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ts @@ -0,0 +1,164 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Parent11_Params { + parentFruit?: Fruit1; +} +interface Child11_Params { + fruit?: Fruit1; +} +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent11_start] +class Fruit1 { + public apple: number = 5; + public orange: number = 10; +} +class Child11 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__fruit = new SynchedPropertyObjectOneWayPU(params.fruit, this, "fruit"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child11_Params) { + } + updateStateVars(params: Child11_Params) { + this.__fruit.reset(params.fruit); + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__fruit.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__fruit.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + // @Prop传递Fruit类,当子类修改属性,父类不受影响 + private __fruit: SynchedPropertySimpleOneWayPU; + get fruit() { + return this.__fruit.get(); + } + set fruit(newValue: Fruit1) { + this.__fruit.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('child apple: ' + this.fruit.apple.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('child orange: ' + this.fruit.orange.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('apple+1'); + Button.onClick(() => { + this.fruit.apple++; + }); + }, Button); + Button.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('orange+1'); + Button.onClick(() => { + this.fruit.orange++; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent11 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__parentFruit = new ObservedPropertyObjectPU(new Fruit1(), this, "parentFruit"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent11_Params) { + if (params.parentFruit !== undefined) { + this.parentFruit = params.parentFruit; + } + } + updateStateVars(params: Parent11_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__parentFruit.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__parentFruit.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __parentFruit: ObservedPropertyObjectPU; + get parentFruit() { + return this.__parentFruit.get(); + } + set parentFruit(newValue: Fruit1) { + this.__parentFruit.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('parent apple: ' + this.parentFruit.apple.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('parent orange: ' + this.parentFruit.orange.toString()); + }, Text); + Text.pop(); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child11(this, { fruit: this.parentFruit }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ets", line: 51, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return { + fruit: this.parentFruit + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + fruit: this.parentFruit + }); + } + }, { name: "Child11" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent11"; + } +} +registerNamedRoute(() => new Parent11(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/PropComplexV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/PropComplexV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..54da29fb598b0b8da3abbd9aad64b47d3eb66180 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..703a93efdb2a905a505b211f398e9ab022057fab --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ts @@ -0,0 +1,143 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent12_start] +@ObservedV2 +class Fruit2 { + @Trace + public apple: number = 5; + @Trace + public orange: number = 10; + // 实现深拷贝,子组件不会修改父组件的数据 + clone(): Fruit2 { + let newFruit: Fruit2 = new Fruit2(); + newFruit.apple = this.apple; + newFruit.orange = this.orange; + return newFruit; + } +} +class Child12 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.initParam("fruit", (params && "fruit" in params) ? params.fruit : new Fruit2()); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.resetParam("fruit", (params && "fruit" in params) ? params.fruit : new Fruit2()); + } + @Param + readonly fruit: Fruit2; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('child'); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.fruit.apple.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.fruit.orange.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('apple+1'); + Button.onClick(() => { + this.fruit.apple++; + }); + }, Button); + Button.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('orange+1'); + Button.onClick(() => { + this.fruit.orange++; + }); + }, Button); + Button.pop(); + Column.pop(); + } + public updateStateVars(params) { + if (params === undefined) { + return; + } + if ("fruit" in params) { + this.updateParam("fruit", params.fruit); + } + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent12 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.parentFruit = new Fruit2(); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.parentFruit = new Fruit2(); + } + @Local + parentFruit: Fruit2; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create('parent'); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.parentFruit.apple.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.parentFruit.orange.toString()); + }, Text); + Text.pop(); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child12(this, { fruit: this.parentFruit.clone() }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ets", line: 61, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return { + fruit: this.parentFruit.clone() + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + fruit: this.parentFruit.clone() + }); + } + }, { name: "Child12" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent12"; + } +} +registerNamedRoute(() => new Parent12(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/PropComplexV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/PropComplexV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..b7a68a46086c8e000505751d0393deaced4dab0b Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..003266eb98dccf33a014d784b75d30a98bdc1143 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ts @@ -0,0 +1,100 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Parent9_Params { +} +interface Child9_Params { + value?: number; +} +class Child9 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__value = new SynchedPropertySimpleOneWayPU(params.value, this, "value"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child9_Params) { + } + updateStateVars(params: Child9_Params) { + this.__value.reset(params.value); + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__value.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__value.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __value: SynchedPropertySimpleOneWayPU; + get value() { + return this.__value.get(); + } + set value(newValue: number) { + this.__value.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.value.toString()); + }, Text); + Text.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent9 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent9_Params) { + } + updateStateVars(params: Parent9_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + } + aboutToBeDeleted() { + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child9(this, { value: 30 }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ets", line: 30, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return { + value: 30 + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + value: 30 + }); + } + }, { name: "Child9" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent9"; + } +} +registerNamedRoute(() => new Parent9(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/PropEasyV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/PropEasyV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..5cfbea2f8871c669f02ff428eef418e758bec552 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..8a70bd288969d24af6dd55dfe61b80dd882f607b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ts @@ -0,0 +1,72 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class Child10 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.initParam("value", (params && "value" in params) ? params.value : 0); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.resetParam("value", (params && "value" in params) ? params.value : 0); + } + @Param + readonly value: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.value.toString()); + }, Text); + Text.pop(); + } + public updateStateVars(params) { + if (params === undefined) { + return; + } + if ("value" in params) { + this.updateParam("value", params.value); + } + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent10 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child10(this, { value: 30 }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ets", line: 30, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return { + value: 30 + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + value: 30 + }); + } + }, { name: "Child10" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent10"; + } +} +registerNamedRoute(() => new Parent10(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/PropEasyV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/PropEasyV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..995fc2766fcf8e904c66e78111ba57b44417b598 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..3b20c4b3ea9abf7a90997c83fe275d632f60e2cc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts @@ -0,0 +1,138 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Parent15_Params { + value?: number; +} +interface Child15_Params { + localValue?: number; +} +class Child15 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__localValue = new SynchedPropertySimpleOneWayPU(params.localValue, this, "localValue"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child15_Params) { + if (params.localValue === undefined) { + this.__localValue.set(0); + } + } + updateStateVars(params: Child15_Params) { + this.__localValue.reset(params.localValue); + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__localValue.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__localValue.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __localValue: SynchedPropertySimpleOneWayPU; + get localValue() { + return this.__localValue.get(); + } + set localValue(newValue: number) { + this.__localValue.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(`${this.localValue}`); + Text.fontSize(25); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('Child +100'); + Button.onClick(() => { + // 改变localValue不会传递给父组件Parent + this.localValue += 100; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent15 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__value = new ObservedPropertySimplePU(10, this, "value"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent15_Params) { + if (params.value !== undefined) { + this.value = params.value; + } + } + updateStateVars(params: Parent15_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__value.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__value.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __value: ObservedPropertySimplePU; + get value() { + return this.__value.get(); + } + set value(newValue: number) { + this.__value.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('Parent +1'); + Button.onClick(() => { + // 改变value的值,通知子组件Child value更新 + this.value += 1; + }); + }, Button); + Button.pop(); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child15(this, { localValue: this.value }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ets", line: 44, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return { + localValue: this.value + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + localValue: this.value + }); + } + }, { name: "Child15" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent15"; + } +} +registerNamedRoute(() => new Parent15(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/PropSubComponentUpdateVarLocalV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..9db2e4e988e0be8f0537e3abf77c15bbd046f605 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..de4e142a6f1de3e89ddb41fa3ecb5cb370e39021 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts @@ -0,0 +1,111 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +import hilog from "@ohos:hilog"; +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; +class Child16 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.localValue = 0; + this.initParam("value", (params && "value" in params) ? params.value : 0); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.localValue = 0; + this.resetParam("value", (params && "value" in params) ? params.value : 0); + this.resetMonitorsOnReuse(); + } + @Local + localValue: number; + @Param + readonly value: number; + @Monitor('value') + onValueChange(mon: IMonitor) { + hilog.info(DOMAIN, TAG, `value has been changed from ${mon.value()?.before} to ${mon.value()?.now}`); + // 父组件value变化时,通知子组件value更新,回调Monitor函数,将更新的值覆写给本地的localValue + this.localValue = this.value; + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(`${this.localValue}`); + Text.fontSize(25); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('Child +100'); + Button.onClick(() => { + // 改变localValue不会传递给父组件Parent + this.localValue += 100; + }); + }, Button); + Button.pop(); + Column.pop(); + } + public updateStateVars(params) { + if (params === undefined) { + return; + } + if ("value" in params) { + this.updateParam("value", params.value); + } + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent16 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.value = 10; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.value = 10; + } + @Local + value: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('Parent +1'); + Button.onClick(() => { + // 改变value的值,通知子组件Child value更新 + this.value += 1; + }); + }, Button); + Button.pop(); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child16(this, { value: this.value }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ets", line: 56, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return { + value: this.value + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + value: this.value + }); + } + }, { name: "Child16" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent16"; + } +} +registerNamedRoute(() => new Parent16(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/PropSubComponentUpdateVarLocalV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..21b2126eed83f84d3e67dc89b07c7b774556e79d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..ec712316aca3669ccc91fef05c35d0e5c56a81dc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts @@ -0,0 +1,112 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Parent13_Params { +} +interface Child13_Params { + value?: number; +} +class Child13 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__value = new SynchedPropertySimpleOneWayPU(params.value, this, "value"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child13_Params) { + } + updateStateVars(params: Child13_Params) { + this.__value.reset(params.value); + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__value.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__value.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + // @Prop可以直接修改变量值 + private __value: SynchedPropertySimpleOneWayPU; + get value() { + return this.__value.get(); + } + set value(newValue: number) { + this.__value.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.value.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('+1'); + Button.onClick(() => { + this.value++; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent13 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent13_Params) { + } + updateStateVars(params: Parent13_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + } + aboutToBeDeleted() { + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child13(this, { value: 30 }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ets", line: 37, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return { + value: 30 + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + value: 30 + }); + } + }, { name: "Child13" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent13"; + } +} +registerNamedRoute(() => new Parent13(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/PropSubComponentUpdateVarV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..49aefbe83c30cdc48c4580bbb6d73ce5d61f0ac8 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..7bc96c8d104acf5d1c898bcd66b19ed0b0d70a82 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts @@ -0,0 +1,85 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class Child14 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.initParam("value", (params && "value" in params) ? params.value : 0); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.resetParam("value", (params && "value" in params) ? params.value : 0); + } + // @Param搭配@Once使用,可以在本地修改@Param变量 + @Param + @Once + value: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.value.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('+1'); + Button.onClick(() => { + this.value++; + }); + }, Button); + Button.pop(); + Column.pop(); + } + public updateStateVars(params) { + if (params === undefined) { + return; + } + if ("value" in params) { + this.updateParam("value", params.value); + } + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent14 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child14(this, { value: 30 }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ets", line: 37, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return { + value: 30 + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + value: 30 + }); + } + }, { name: "Child14" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent14"; + } +} +registerNamedRoute(() => new Parent14(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/PropSubComponentUpdateVarV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..c7f01a42431b9b9110e8a632d9c011d4f699e801 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..0f2d8e6db5059eadd9291c97ce92cd7d6edac437 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts @@ -0,0 +1,131 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Parent17_Params { + message?: string; +} +interface Child17_Params { + childMessage?: string; + message?: string; +} +class Child17 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__childMessage = this.initializeConsume('text', "childMessage"); + this.__message = this.initializeConsume("message", "message"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child17_Params) { + } + updateStateVars(params: Child17_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__childMessage.purgeDependencyOnElmtId(rmElmtId); + this.__message.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__childMessage.aboutToBeDeleted(); + this.__message.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + // alias和属性名都为key,alias和属性名都可以匹配 + private __childMessage: ObservedPropertyAbstractPU; + get childMessage() { + return this.__childMessage.get(); + } + set childMessage(newValue: string) { + this.__childMessage.set(newValue); + } + private __message: ObservedPropertyAbstractPU; + get message() { + return this.__message.get(); + } + set message(newValue: string) { + this.__message.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.childMessage); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.message); + }, Text); + Text.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent17 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__message = new ObservedPropertySimplePU('Hello World', this, "message"); + this.addProvidedVar("text", this.__message, false); + this.addProvidedVar("message", this.__message, false); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent17_Params) { + if (params.message !== undefined) { + this.message = params.message; + } + } + updateStateVars(params: Parent17_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__message.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__message.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __message: ObservedPropertySimplePU; + get message() { + return this.__message.get(); + } + set message(newValue: string) { + this.__message.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child17(this, {}, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ets", line: 37, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return {}; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Child17" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent17"; + } +} +registerNamedRoute(() => new Parent17(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ProvideAliasV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..093b4bb5e0c7bce4c620461e8771356a04103610 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..cc919f4961bcf6f96696b17b8ae61ffdcf8b4e78 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts @@ -0,0 +1,77 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class Child18 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.childMessage = 'default'; + this.message = 'default'; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.resetConsumer("childMessage", 'default'); + this.resetConsumer("message", 'default'); + } + // alias是唯一匹配的key,有alias情况下无法通过属性名匹配 + @Consumer('text') + childMessage: string; + @Consumer() + message: string; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.childMessage); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.message); + }, Text); + Text.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent18 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.message = 'Hello World'; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.message = 'Hello World'; + } + @Provider('text') + message: string; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child18(this, {}, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ets", line: 37, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return {}; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Child18" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent18"; + } +} +registerNamedRoute(() => new Parent18(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ProvideAliasV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..894fd504fa1569243599fe8ac391287c78fb901d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..b9af06201fc5c3842cb6398a071f9f2747b331d9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts @@ -0,0 +1,97 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class GrandParent2 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.reviewVotes = 40; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.reviewVotes = 40; + } + @Provider('reviewVotes') + reviewVotes: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Parent24(this, {}, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ets", line: 23, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return {}; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Parent24" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "GrandParent2"; + } +} +class Parent24 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.reviewVotes = 20; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.reviewVotes = 20; + } + // @Provider默认支持重载,@Consumer向上查找最近的@Provider + @Provider() + reviewVotes: number; + initialRender() { + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child24(this, {}, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ets", line: 34, col: 5 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return {}; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Child24" }); + } + } + rerender() { + this.updateDirtyElements(); + } +} +class Child24 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.reviewVotes = 0; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.resetConsumer("reviewVotes", 0); + } + @Consumer() + reviewVotes: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.reviewVotes.toString()); + }, Text); + Text.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +registerNamedRoute(() => new GrandParent2(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ProvideAllowOverrideV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..8697d9b9e7f2d8579f6b7df32e666dc70931a0ba Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..ee314ab4526aab8009a985b05278f1873a966ce4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts @@ -0,0 +1,61 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class Child20 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.message = 'Hello World'; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.resetConsumer("message", 'Hello World'); + } + // @Consumer允许本地初始化,当找不到@Provider的时候使用本地默认值 + @Consumer() + message: string; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.message); + }, Text); + Text.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent20 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child20(this, {}, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ets", line: 31, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return {}; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Child20" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent20"; + } +} +registerNamedRoute(() => new Parent20(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ProvideConsumeInitV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..62edfa5bb7cdc83def610f3857a8ba4a5510cade Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..51f330fc311919dc07db933f5bde59539ea3195e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts @@ -0,0 +1,111 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Parent19_Params { + message?: string; +} +interface Child19_Params { + message?: string; +} +class Child19 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__message = this.initializeConsume("message", "message"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child19_Params) { + } + updateStateVars(params: Child19_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__message.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__message.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + // @Consume禁止本地初始化,当找不到对应的@Provide时抛出异常 + private __message: ObservedPropertyAbstractPU; + get message() { + return this.__message.get(); + } + set message(newValue: string) { + this.__message.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.message); + }, Text); + Text.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent19 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__message = new ObservedPropertySimplePU('Hello World', this, "message"); + this.addProvidedVar("message", this.__message, false); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent19_Params) { + if (params.message !== undefined) { + this.message = params.message; + } + } + updateStateVars(params: Parent19_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__message.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__message.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __message: ObservedPropertySimplePU; + get message() { + return this.__message.get(); + } + set message(newValue: string) { + this.__message.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child19(this, {}, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ets", line: 33, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return {}; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Child19" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent19"; + } +} +registerNamedRoute(() => new Parent19(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ProvideConsumeNoInitV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..ca5056dd17a67563f8f82206796fa7ccae22b54a Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..349b927542b04cb2716f000c1bda4960af6d7019 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts @@ -0,0 +1,168 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Child23_Params { + reviewVotes?: number; +} +interface Parent23_Params { + reviewVotes?: number; +} +interface GrandParent1_Params { + reviewVotes?: number; +} +class GrandParent1 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__reviewVotes = new ObservedPropertySimplePU(40, this, "reviewVotes"); + this.addProvidedVar("reviewVotes", this.__reviewVotes, false); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: GrandParent1_Params) { + if (params.reviewVotes !== undefined) { + this.reviewVotes = params.reviewVotes; + } + } + updateStateVars(params: GrandParent1_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__reviewVotes.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__reviewVotes.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __reviewVotes: ObservedPropertySimplePU; + get reviewVotes() { + return this.__reviewVotes.get(); + } + set reviewVotes(newValue: number) { + this.__reviewVotes.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Parent23(this, {}, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ets", line: 23, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return {}; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Parent23" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "GrandParent1"; + } +} +class Parent23 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__reviewVotes = new ObservedPropertySimplePU(20, this, "reviewVotes"); + this.addProvidedVar('reviewVotes', this.__reviewVotes, true); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent23_Params) { + if (params.reviewVotes !== undefined) { + this.reviewVotes = params.reviewVotes; + } + } + updateStateVars(params: Parent23_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__reviewVotes.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__reviewVotes.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + // @Provide默认不支持重载,支持重载需设置allowOverride函数 + private __reviewVotes: ObservedPropertySimplePU; + get reviewVotes() { + return this.__reviewVotes.get(); + } + set reviewVotes(newValue: number) { + this.__reviewVotes.set(newValue); + } + initialRender() { + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new Child23(this, {}, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ets", line: 34, col: 5 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return {}; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Child23" }); + } + } + rerender() { + this.updateDirtyElements(); + } +} +class Child23 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__reviewVotes = this.initializeConsume('reviewVotes', "reviewVotes"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child23_Params) { + } + updateStateVars(params: Child23_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__reviewVotes.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__reviewVotes.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __reviewVotes: ObservedPropertyAbstractPU; + get reviewVotes() { + return this.__reviewVotes.get(); + } + set reviewVotes(newValue: number) { + this.__reviewVotes.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.reviewVotes.toString()); + }, Text); + Text.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +registerNamedRoute(() => new GrandParent1(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ProvideNoAllowOverrideV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..aec977036612d56789482f8487d451a1f5b83b81 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..6154d8c9f108391faf8393f3c8cf0cdfaad15c7a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts @@ -0,0 +1,121 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Child21_Params { + childValue?: number; +} +interface Parent21_Params { + parentValue?: number; +} +class Parent21 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__parentValue = new ObservedPropertySimplePU(42, this, "parentValue"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent21_Params) { + if (params.parentValue !== undefined) { + this.parentValue = params.parentValue; + } + } + updateStateVars(params: Parent21_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__parentValue.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__parentValue.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __parentValue: ObservedPropertySimplePU; + get parentValue() { + return this.__parentValue.get(); + } + set parentValue(newValue: number) { + this.__parentValue.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new + // @Provide可以从父组件初始化 + Child21(this, { childValue: this.parentValue }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ets", line: 24, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return { + childValue: this.parentValue + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Child21" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent21"; + } +} +class Child21 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__childValue = new ObservedPropertySimplePU(0, this, "childValue"); + this.addProvidedVar("childValue", this.__childValue, false); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child21_Params) { + if (params.childValue !== undefined) { + this.childValue = params.childValue; + } + } + updateStateVars(params: Child21_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__childValue.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__childValue.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __childValue: ObservedPropertySimplePU; + get childValue() { + return this.__childValue.get(); + } + set childValue(newValue: number) { + this.__childValue.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.childValue.toString()); + }, Text); + Text.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +registerNamedRoute(() => new Parent21(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ProvideParentInitV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..24626c0d66e8100fca0c4e4c332e0168fbffceae Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..c3123da376e89a76c726e5382bbb717801e991ae --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts @@ -0,0 +1,87 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class Parent22 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.parentValue = 42; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.parentValue = 42; + } + @Local + parentValue: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new + // @Provider禁止从父组件初始化,替代方案为先用@Param接受,再赋值给@Provider + Child22(this, { initialValue: this.parentValue }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ets", line: 24, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return { + initialValue: this.parentValue + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + initialValue: this.parentValue + }); + } + }, { name: "Child22" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent22"; + } +} +class Child22 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.initParam("initialValue", (params && "initialValue" in params) ? params.initialValue : 0); + this.childValue = this.initialValue; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.resetParam("initialValue", (params && "initialValue" in params) ? params.initialValue : 0); + this.childValue = this.initialValue; + } + @Param + @Once + initialValue: number; + @Provider() + childValue: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.childValue.toString()); + }, Text); + Text.pop(); + Column.pop(); + } + public updateStateVars(params) { + if (params === undefined) { + return; + } + if ("initialValue" in params) { + this.updateParam("initialValue", params.initialValue); + } + } + rerender() { + this.updateDirtyElements(); + } +} +registerNamedRoute(() => new Parent22(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/ProvideParentNoInitV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..fa5ecc07560bb24020b12828fb7bfbc73495b620 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..0867e87ded27675aa99bb5e6fcd59ef83138a5c7 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ts @@ -0,0 +1,84 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface example1_Params { + child?: Child3; +} +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start example1_start] +class Child3 { + public value: number = 10; +} +class example1 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__child = new ObservedPropertyObjectPU(new Child3(), this, "child"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: example1_Params) { + if (params.child !== undefined) { + this.child = params.child; + } + } + updateStateVars(params: example1_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__child.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__child.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __child: ObservedPropertyObjectPU; + get child() { + return this.__child.get(); + } + set child(newValue: Child3) { + this.__child.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.child.value.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + // @State可以观察第一层变化 + Button.createWithLabel('value+1'); + // @State可以观察第一层变化 + Button.onClick(() => { + this.child.value++; + }); + }, Button); + // @State可以观察第一层变化 + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "example1"; + } +} +registerNamedRoute(() => new example1(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/StateComplexV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/StateComplexV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..aa4c3fcfe42fc96d3dc2a2d13cfe0f8541436017 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..43bae8b1004e2d9cdfb9de8d96e6db4a6b097add --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ts @@ -0,0 +1,62 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start example2_start] +@ObservedV2 +class Child4 { + @Trace + public value: number = 10; +} +class example2 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.child = new Child4(); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.child = new Child4(); + } + @Local + child: Child4; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.child.value.toString()); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + // @Local只能观察自身,需要给Child加上@ObservedV2和@Trace + Button.createWithLabel('value+1'); + // @Local只能观察自身,需要给Child加上@ObservedV2和@Trace + Button.onClick(() => { + this.child.value++; + }); + }, Button); + // @Local只能观察自身,需要给Child加上@ObservedV2和@Trace + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "example2"; + } +} +registerNamedRoute(() => new example2(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/StateComplexV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/StateComplexV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..cb37af5a0bd58b14428ee39ca5aa0fc6aa0eee2a Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..1cded81ad84f6db9de2690186b6f04aaa70fb3aa --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ts @@ -0,0 +1,52 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Child1_Params { + val?: number; +} +class Child1 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__val = new ObservedPropertySimplePU(10, this, "val"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child1_Params) { + if (params.val !== undefined) { + this.val = params.val; + } + } + updateStateVars(params: Child1_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__val.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__val.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __val: ObservedPropertySimplePU; + get val() { + return this.__val.get(); + } + set val(newValue: number) { + this.__val.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.val.toString()); + }, Text); + Text.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Child1"; + } +} +registerNamedRoute(() => new Child1(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/StateEasyV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/StateEasyV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..4cc66a65aa1db6d4bf3e053775a860d2ef616fd2 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..b880703208f9999b7498fe319f26d25a579969a3 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ts @@ -0,0 +1,28 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class Child2 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.val = 10; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.val = 10; + } + @Local + val: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.val.toString()); + }, Text); + Text.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Child2"; + } +} +registerNamedRoute(() => new Child2(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/StateEasyV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/StateEasyV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..7d3295ce03bfcc12d52044551bdffc3dd8959d4c Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..f7e790711b4d8f196692c3d4244053a111bc76c9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts @@ -0,0 +1,102 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface Parent5_Params { +} +interface Child5_Params { + value?: number; +} +class Child5 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__value = new ObservedPropertySimplePU(0, this, "value"); + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Child5_Params) { + if (params.value !== undefined) { + this.value = params.value; + } + } + updateStateVars(params: Child5_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__value.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__value.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __value: ObservedPropertySimplePU; + get value() { + return this.__value.get(); + } + set value(newValue: number) { + this.__value.set(newValue); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.value.toString()); + }, Text); + Text.pop(); + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent5 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.setInitiallyProvidedValue(params); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: Parent5_Params) { + } + updateStateVars(params: Parent5_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + } + aboutToBeDeleted() { + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new + // @State可以从外部初始化 + Child5(this, { value: 30 }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ets", line: 31, col: 7 }); + ViewPU.create(componentCall); + let paramsLambda = () => { + return { + value: 30 + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, {}); + } + }, { name: "Child5" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent5"; + } +} +registerNamedRoute(() => new Parent5(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/StateExternalInitializationV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..8d3f1149fc8a1aa9247aa2db9c481df980692023 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..f956bd736536a4fe81fe0455e9a5f95e455395cf --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts @@ -0,0 +1,75 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +class Child6 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.initParam("value", (params && "value" in params) ? params.value : 0); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.resetParam("value", (params && "value" in params) ? params.value : 0); + } + @Param + @Once + value: number; + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(this.value.toString()); + }, Text); + Text.pop(); + } + public updateStateVars(params) { + if (params === undefined) { + return; + } + if ("value" in params) { + this.updateParam("value", params.value); + } + } + rerender() { + this.updateDirtyElements(); + } +} +class Parent6 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + { + this.observeComponentCreation2((elmtId, isInitialRender) => { + if (isInitialRender) { + let componentCall = new + // @Local禁止从外部初始化,可以用@Param和@Once替代实现 + Child6(this, { value: 30 }, undefined, elmtId, () => { }, { page: "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ets", line: 31, col: 7 }); + ViewV2.create(componentCall); + let paramsLambda = () => { + return { + value: 30 + }; + }; + componentCall.paramsGenerator_ = paramsLambda; + } + else { + this.updateStateVarsOfChildByElmtId(elmtId, { + value: 30 + }); + } + }, { name: "Child6" }); + } + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "Parent6"; + } +} +registerNamedRoute(() => new Parent6(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/StateExternalInitializationV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..179a00db32e540d4ff90cc66e4a8a70771deff40 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..939995cf2ff2c798b86c1d2aea36c8d2bf419ae8 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts @@ -0,0 +1,100 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface WatchExample2_Params { + apple?: number; + orange?: number; +} +import hilog from "@ohos:hilog"; +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; +class WatchExample2 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__apple = new ObservedPropertySimplePU(0, this, "apple"); + this.__orange = new ObservedPropertySimplePU(0, this, "orange"); + this.setInitiallyProvidedValue(params); + this.declareWatch("apple", this.onAppleChange); + this.declareWatch("orange", this.onOrangeChange); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: WatchExample2_Params) { + if (params.apple !== undefined) { + this.apple = params.apple; + } + if (params.orange !== undefined) { + this.orange = params.orange; + } + } + updateStateVars(params: WatchExample2_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__apple.purgeDependencyOnElmtId(rmElmtId); + this.__orange.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__apple.aboutToBeDeleted(); + this.__orange.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __apple: ObservedPropertySimplePU; + get apple() { + return this.__apple.get(); + } + set apple(newValue: number) { + this.__apple.set(newValue); + } + private __orange: ObservedPropertySimplePU; + get orange() { + return this.__orange.get(); + } + set orange(newValue: number) { + this.__orange.set(newValue); + } + // @Watch 回调,只能监听单个变量,不能获取变化前的值 + onAppleChange(): void { + hilog.info(DOMAIN, TAG, 'apple count changed to ' + this.apple); + } + onOrangeChange(): void { + hilog.info(DOMAIN, TAG, 'orange count changed to ' + this.orange); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(`apple count: ${this.apple}`); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(`orange count: ${this.orange}`); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('add apple'); + Button.onClick(() => { + this.apple++; + }); + }, Button); + Button.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('add orange'); + Button.onClick(() => { + this.orange++; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "WatchExample2"; + } +} +registerNamedRoute(() => new WatchExample2(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/WatchMoreVarV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..5885bb4f945b310563d350147bfdebc30cfc12f5 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..a53efa0d23ba8dc214a433e61e98e97f151757e5 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts @@ -0,0 +1,65 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +import hilog from "@ohos:hilog"; +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; +class MonitorExample2 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.apple = 0; + this.orange = 0; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.apple = 0; + this.orange = 0; + this.resetMonitorsOnReuse(); + } + @Local + apple: number; + @Local + orange: number; + // @Monitor回调,支持监听多个变量,可以获取变化前的值 + @Monitor('apple', 'orange') + onFruitChange(monitor: IMonitor) { + monitor.dirty.forEach((name: string) => { + hilog.info(DOMAIN, TAG, `${name} changed from ${monitor.value(name)?.before} to ${monitor.value(name)?.now}`); + }); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(`apple count: ${this.apple}`); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(`orange count: ${this.orange}`); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('add apple'); + Button.onClick(() => { + this.apple++; + }); + }, Button); + Button.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('add orange'); + Button.onClick(() => { + this.orange++; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "MonitorExample2"; + } +} +registerNamedRoute(() => new MonitorExample2(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/WatchMoreVarV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..473ef2e1a3c959b3597c7e27d78cc0605c341eac Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts new file mode 100644 index 0000000000000000000000000000000000000000..f51d3870cc98fd7fa6b9960a5baacc40f3c5fd54 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts @@ -0,0 +1,70 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +interface WatchExample1_Params { + apple?: number; +} +import hilog from "@ohos:hilog"; +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; +class WatchExample1 extends ViewPU { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda = undefined, extraInfo) { + super(parent, __localStorage, elmtId, extraInfo); + if (typeof paramsLambda === "function") { + this.paramsGenerator_ = paramsLambda; + } + this.__apple = new ObservedPropertySimplePU(0, this, "apple"); + this.setInitiallyProvidedValue(params); + this.declareWatch("apple", this.onAppleChange); + this.finalizeConstruction(); + } + setInitiallyProvidedValue(params: WatchExample1_Params) { + if (params.apple !== undefined) { + this.apple = params.apple; + } + } + updateStateVars(params: WatchExample1_Params) { + } + purgeVariableDependenciesOnElmtId(rmElmtId) { + this.__apple.purgeDependencyOnElmtId(rmElmtId); + } + aboutToBeDeleted() { + this.__apple.aboutToBeDeleted(); + SubscriberManager.Get().delete(this.id__()); + this.aboutToBeDeletedInternal(); + } + private __apple: ObservedPropertySimplePU; + get apple() { + return this.__apple.get(); + } + set apple(newValue: number) { + this.__apple.set(newValue); + } + onAppleChange(): void { + hilog.info(DOMAIN, TAG, 'apple count changed to ' + this.apple); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(`apple count: ${this.apple}`); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('add apple'); + Button.onClick(() => { + this.apple++; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "WatchExample1"; + } +} +registerNamedRoute(() => new WatchExample1(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/WatchSingleVarV1", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..8aa376cd2fefdca707e35895b6419619d6bfafff Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts new file mode 100644 index 0000000000000000000000000000000000000000..724dc87aebb55ea02f08fd2b35d6245696df79ce --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts @@ -0,0 +1,47 @@ +if (!("finalizeConstruction" in ViewPU.prototype)) { + Reflect.set(ViewPU.prototype, "finalizeConstruction", () => { }); +} +import hilog from "@ohos:hilog"; +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; +class MonitorExample1 extends ViewV2 { + constructor(parent, params, __localStorage, elmtId = -1, paramsLambda, extraInfo) { + super(parent, elmtId, extraInfo); + this.apple = 0; + this.finalizeConstruction(); + } + public resetStateVarsOnReuse(params: Object): void { + this.apple = 0; + this.resetMonitorsOnReuse(); + } + @Local + apple: number; + @Monitor('apple') + onFruitChange(monitor: IMonitor) { + hilog.info(DOMAIN, TAG, `apple changed from ${monitor.value()?.before} to ${monitor.value()?.now}`); + } + initialRender() { + this.observeComponentCreation2((elmtId, isInitialRender) => { + Column.create(); + }, Column); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Text.create(`apple count: ${this.apple}`); + }, Text); + Text.pop(); + this.observeComponentCreation2((elmtId, isInitialRender) => { + Button.createWithLabel('add apple'); + Button.onClick(() => { + this.apple++; + }); + }, Button); + Button.pop(); + Column.pop(); + } + rerender() { + this.updateDirtyElements(); + } + static getEntryName(): string { + return "MonitorExample1"; + } +} +registerNamedRoute(() => new MonitorExample1(undefined, {}), "", { bundleName: "com.samples.statemigrationproject", moduleName: "entry", pagePath: "pages/componentstatemigration/WatchSingleVarV2", pageFullPath: "entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2", integratedHsp: "false", moduleType: "followWithHap" }); diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/filesInfo.txt b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/filesInfo.txt new file mode 100644 index 0000000000000000000000000000000000000000..d0da94428405c627faaf6409ca7026353b114739 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/filesInfo.txt @@ -0,0 +1,33 @@ +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ts;&entry/src/main/ets/pages/componentstatemigration/StateEasyV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/Index.ts;&entry/src/main/ets/pages/Index&;esm;entry|entry|1.0.0|src/main/ets/pages/Index.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entryability/EntryAbility.ts;&entry/src/main/ets/entryability/EntryAbility&;esm;entry|entry|1.0.0|src/main/ets/entryability/EntryAbility.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entrybackupability/EntryBackupAbility.ts;&entry/src/main/ets/entrybackupability/EntryBackupAbility&;esm;entry|entry|1.0.0|src/main/ets/entrybackupability/EntryBackupAbility.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ts;&entry/src/main/ets/pages/componentstatemigration/StateEasyV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ts;&entry/src/main/ets/pages/componentstatemigration/StateComplexV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ts;&entry/src/main/ets/pages/componentstatemigration/StateComplexV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts;&entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts;&entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts;&entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ts;&entry/src/main/ets/pages/componentstatemigration/PropEasyV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ts;&entry/src/main/ets/pages/componentstatemigration/PropEasyV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ts;&entry/src/main/ets/pages/componentstatemigration/PropComplexV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts;&entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ts;&entry/src/main/ets/pages/componentstatemigration/PropComplexV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts;&entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts;&entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts;&entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts;&entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts;&entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts;&entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts;&entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts;&entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts;&entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts;&entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts;&entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts;&entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts;&entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts;&entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts;&entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts;&entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV2.ts;&entry/src/main/ets/pages/componentstatemigration/ComputedV2&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV2.ts;entry;false;ets +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV1.ts;&entry/src/main/ets/pages/componentstatemigration/ComputedV1&;esm;entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV1.ts;entry;false;ets diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/modules.cache b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/modules.cache new file mode 100644 index 0000000000000000000000000000000000000000..08473cede03b36558683a06d634ad9321bad000d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/modules.cache @@ -0,0 +1,34 @@ +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/Index.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/Index.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entryability/EntryAbility.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entryability/EntryAbility.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entrybackupability/EntryBackupAbility.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/entrybackupability/EntryBackupAbility.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV2.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV2.protoBin +E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV1.ts;E:/applications_app_samples/code/DocsSample/ArkUISample/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/entry/src/main/ets/pages/componentstatemigration/ComputedV1.protoBin +E:\applications_app_samples\code\DocsSample\ArkUISample\StateMigrationProject\entry\build\default\cache\default\default@CompileArkTS\esmodule\debug\npmEntries.txt;E:\applications_app_samples\code\DocsSample\ArkUISample\StateMigrationProject\entry\build\default\cache\default\default@CompileArkTS\esmodule\debug\npmEntries.protoBin diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/npmEntries.protoBin b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/npmEntries.protoBin new file mode 100644 index 0000000000000000000000000000000000000000..799cf238c6029a20f1f8326e7cf8309d0a48d7df Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/npmEntries.protoBin differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/npmEntries.txt b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/npmEntries.txt new file mode 100644 index 0000000000000000000000000000000000000000..5c9e7b7c87dc3f4cb7f203ad5143af2c090ecc5f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/npmEntries.txt @@ -0,0 +1,7 @@ +@system.app:@native.system.app +@ohos.app:@native.ohos.app +@system.router:@native.system.router +@system.curves:@native.system.curves +@ohos.curves:@native.ohos.curves +@system.matrix4:@native.system.matrix4 +@ohos.matrix4:@native.ohos.matrix4 diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/sourceMaps.json b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/sourceMaps.json new file mode 100644 index 0000000000000000000000000000000000000000..c347499df5c6ad430a059abe22603d5452ed11b5 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/cache/default/default@CompileArkTS/esmodule/debug/sourceMaps.json @@ -0,0 +1,33 @@ +{"key": "entry|entry|1.0.0|src/main/ets/entryability/EntryAbility.ts", "val": {"version":3,"file":"EntryAbility.ets","sourceRoot":"","sources":["entry/src/main/ets/entryability/EntryAbility.ets"],"names":[],"mappings":"YAcS,eAAe;OAAE,qBAAqB;OAAE,SAAS;YAAE,IAAI;OACvD,KAAK;YACL,MAAM;AAEf,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IACjD,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,CAAC,WAAW,GAAG,IAAI;QAClE,IAAI;YACF,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;SACvG;QAAC,OAAO,GAAG,EAAE;YACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,4CAA4C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;SACnG;QACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,IAAI,IAAI;QACf,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC;IACnE,CAAC;IAED,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI;QACxD,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,6BAA6B,CAAC,CAAC;QAE3E,WAAW,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;YAC7C,IAAI,GAAG,CAAC,IAAI,EAAE;gBACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,+CAA+C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;gBACrG,OAAO;aACR;YACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,mCAAmC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,IAAI,IAAI;QAC1B,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,8BAA8B,CAAC,CAAC;IAC9E,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,oCAAoC;QACpC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,iCAAiC;QACjC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;CACF","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/entrybackupability/EntryBackupAbility.ts", "val": {"version":3,"file":"EntryBackupAbility.ets","sourceRoot":"","sources":["entry/src/main/ets/entrybackupability/EntryBackupAbility.ets"],"names":[],"mappings":"OAcS,KAAK;OACL,sBAAsB;cAAE,aAAa,IAAb,aAAa;AAE9C,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,sBAAsB;IACpE,KAAK,CAAC,QAAQ;QACZ,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAC7C,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa;QAC1C,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,yBAAyB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;QACxF,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACF","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV1.ts", "val": {"version":3,"file":"ComputedV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ComputedV1.ets"],"names":[],"mappings":";;;;IAkBS,SAAS,GAAE,MAAM;IACjB,QAAQ,GAAE,MAAM;;MAFlB,MAAM;IAFb;;;;;wDAG6B,IAAI;uDACL,KAAK;;;KAnBjC;;;;;;;;;;;;;;;;;;;;;IAkBE,8CAAkB,MAAM,EAAQ;QAAzB,SAAS;;;QAAT,SAAS,WAAE,MAAM;;;IACxB,6CAAiB,MAAM,EAAS;QAAzB,QAAQ;;;QAAR,QAAQ,WAAE,MAAM;;;IAEvB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS;;QAAzC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS;;QAAzC,IAAI;;YACJ,MAAM,iBAAC,kBAAkB;YAAzB,MAAM,CAAqB,OAAO,CAAC,GAAG,EAAE;gBACtC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;YACvB,CAAC;;QAFD,MAAM;QAHR,MAAM;KAQP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV2.ts", "val": {"version":3,"file":"ComputedV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ComputedV2.ets"],"names":[],"mappings":";;;MAiBO,MAAM;IAFb;;yBAG6B,IAAI;wBACL,KAAK;;KAnBjC;;yBAkB6B,IAAI;wBACL,KAAK;;;IAD/B,CAAC,KAAK;IAAC,SAAS,EAAE,MAAM,CAAQ;IAChC,CAAC,KAAK;IAAC,QAAQ,EAAE,MAAM,CAAS;IAEhC,CAAC,QAAQ;QACL,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC9C,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ;;QAAlB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ;;QAAlB,IAAI;;YACJ,MAAM,iBAAC,kBAAkB;YAAzB,MAAM,CAAqB,OAAO,CAAC,GAAG,EAAE;gBACtC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;YACvB,CAAC;;QAFD,MAAM;QAHR,MAAM;KAOP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts", "val": {"version":3,"file":"LinkMiigrationV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ets"],"names":[],"mappings":";;;;IAkCS,KAAK,GAAE,MAAM;;;IAhBd,GAAG,GAAE,MAAM;;MAFZ,MAAM;IADb;;;;;;;;KAfA;;;;;;;;;;;;;IAiBE,gBAAgB;IAChB,6CAAW,MAAM,EAAC;QAAZ,GAAG;;;QAAH,GAAG,WAAE,MAAM;;;IAEjB;;YACE,MAAM;;;YACJ,IAAI,QAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAApC,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;MAKI,OAAO;IAFd;;;;;oDAGyB,EAAE;;;KAL1B;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAM;QAAnB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,IAAI,QAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,MAAM,OAAC,EAAE,GAAG,cAAY,EAAE;;;;4BAAjB,GAAG;;;;;;;;;;QAFd,MAAM;KAIP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts", "val": {"version":3,"file":"LinkMiigrationV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ets"],"names":[],"mappings":";;;MAgBO,MAAM;IADb;;yEAGuB,CAAC;;;KAlBxB;;0EAkBuB,CAAC;;;IADtB,2BAA2B;IAC3B,CAAC,KAAK;IAHR,QAfA,CAkBS,GAAG,EAAE,MAAM,CAAK;IACvB,CAAC,KAAK;IAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAApC,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;;;;;;;;;MAKI,OAAO;IAFd;;qBAGyB,EAAE;;KAL1B;;qBAKwB,EAAE;;IAAzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAM;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,MAAM,OAAC,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE;;;;4BAA7C,GAAG,EAAE,IAAI,CAAC,KAAK;4BAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE;;;;;;;wBAA3C,GAAG,EAAE,IAAI,CAAC,KAAK;;;;;QAF1B,MAAM;KAIP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV1.ts", "val": {"version":3,"file":"PropComplexV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ets"],"names":[],"mappings":";;;;IA4CS,WAAW,GAAE,MAAM;;;IArBpB,KAAK,GAAE,MAAM;;AAvBrB;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,MAAM,MAAM;IACV,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;CAC5B;MAGM,OAAO;IADd;;;;;;;;KAFC;;;;kCAKO,KAAK;;;;;;;;;;IADX,+BAA+B;IAC/B,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,MAAM;;;YACJ,IAAI,QAAC,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAlD,IAAI;;YACJ,IAAI,QAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAApD,IAAI;;YACJ,MAAM,iBAAC,SAAS;YAAhB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,UAAU;YAAjB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP;;;;;MAKI,QAAQ;IAFf;;;;;0DAG+B,IAAI,MAAM,EAAE;;;KAL1C;;;;;;;;;;;;;;;;IAKC,gDAAoB,MAAM,EAAgB;QAAnC,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAzD,IAAI;;YACJ,IAAI,QAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAA3D,IAAI;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAAzB,KAAK,EAAE,IAAI,CAAC,WAAW;;;;;;;wBAAvB,KAAK,EAAE,IAAI,CAAC,WAAW;;;;;QAHnC,MAAM;KAKP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV2.ts", "val": {"version":3,"file":"PropComplexV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ets"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,CAAC,UAAU;MACL,MAAM;IACV,CAAC,KAAK;IAAC,MAAM,CAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC,KAAK;IAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;IAElC,sBAAsB;IACtB,KAAK,IAAI,MAAM;QACb,IAAI,QAAQ,EAAE,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACpC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;MAGM,OAAO;IADd;;+EAEyB,IAAI,MAAM,EAAE;;KAJpC;;gFAIwB,IAAI,MAAM,EAAE;;IAAnC,CAAC,KAAK;IAhBR,QAfA,CA+BS,KAAK,EAAE,MAAM,CAAgB;IAEpC;;YACE,MAAM;;;YACJ,IAAI,QAAC,OAAO;;QAAZ,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,SAAS;YAAhB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,UAAU;YAAjB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;;QAHH,MAAM;QARR,MAAM;KAaP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;2BAG+B,IAAI,MAAM,EAAE;;KAL1C;;2BAK8B,IAAI,MAAM,EAAE;;IAAzC,CAAC,KAAK;IAAC,WAAW,EAAE,MAAM,CAAgB;IAE1C;;YACE,MAAM;;;YACJ,IAAI,QAAC,QAAQ;;QAAb,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAtC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE;;;;4BAAjC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;;;;;;;wBAA/B,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;;;;;QAJ3C,MAAM;KAMP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV1.ts", "val": {"version":3,"file":"PropEasyV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ets"],"names":[],"mappings":";;;;;;IAiBQ,KAAK,GAAE,MAAM;;MADd,MAAM;IADb;;;;;;;;KAfA;;;;kCAiBQ,KAAK;;;;;;;;;;IAAX,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;MAKI,OAAO;IAFd;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;4CACJ,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADpB,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV2.ts", "val": {"version":3,"file":"PropEasyV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ets"],"names":[],"mappings":";;;MAgBO,OAAO;IADd;;+EAEyB,CAAC;;KAjB1B;;gFAiByB,CAAC;;IAAxB,CAAC,KAAK;IAFR,QAfA,CAiBS,KAAK,EAAE,MAAM,CAAK;IAEzB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts", "val": {"version":3,"file":"PropSubComponentUpdateVarLocalV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ets"],"names":[],"mappings":";;;;IAkCS,KAAK,GAAE,MAAM;;;IAjBd,UAAU,GAAE,MAAM;;MADnB,OAAO;IADd;;;;;;;;KAfA;;;kCAiB6B,CAAC;;;;uCAAtB,UAAU;;;;;;;;;;IAAhB,oDAAkB,MAAM,EAAK;QAAvB,UAAU;;;QAAV,UAAU,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;YACJ,IAAI,QAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YAAzB,IAAI,CAAuB,QAAQ,CAAC,EAAE;;QAAtC,IAAI;;YACJ,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,6BAA6B;gBAC7B,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC;YACzB,CAAC;;QAJH,MAAM;QAFR,MAAM;KAQP;;;;;MAKI,QAAQ;IAFf;;;;;oDAGyB,EAAE;;;KAL1B;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAM;QAAnB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,+BAA+B;gBAC/B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAClB,CAAC;;QAJH,MAAM;;;;4CAKN,OAAO,OAAC,EAAE,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE;;;;4BAAxB,UAAU,EAAE,IAAI,CAAC,KAAK;;;;;;;wBAAtB,UAAU,EAAE,IAAI,CAAC,KAAK;;;;;QANlC,MAAM;KAQP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts", "val": {"version":3,"file":"PropSubComponentUpdateVarLocalV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ets"],"names":[],"mappings":";;;OAeO,KAAK;AACZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAGnC,OAAO;IADd;;0BAE8B,CAAC;+EACN,CAAC;;KALgB;;0BAIZ,CAAC;gFACN,CAAC;;;IADxB,CAAC,KAAK;IAAC,UAAU,EAAE,MAAM,CAAK;IAC9B,CAAC,KAAK;IAPR,QAfA,CAsBS,KAAK,EAAE,MAAM,CAAK;IAEzB,CAAC,OAAO,CAAC,OAAO,CAAC;IACjB,aAAa,CAAC,GAAG,EAAE,QAAQ;QACzB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAC,GAAG,EAAC,+BAA+B,GAAG,CAAC,KAAK,EAAE,EAAE,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACnG,6DAA6D;QAC7D,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;IAC/B,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YAAzB,IAAI,CAAuB,QAAQ,CAAC,EAAE;;QAAtC,IAAI;;YACJ,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,6BAA6B;gBAC7B,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC;YACzB,CAAC;;QAJH,MAAM;QAFR,MAAM;KAQP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;qBAGyB,EAAE;;KAL1B;;qBAKwB,EAAE;;IAAzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAM;IAE1B;;YACE,MAAM;;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,+BAA+B;gBAC/B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAClB,CAAC;;QAJH,MAAM;;;;4CAKN,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;;;;4BAAnB,KAAK,EAAE,IAAI,CAAC,KAAK;;;;;;;wBAAjB,KAAK,EAAE,IAAI,CAAC,KAAK;;;;;QAN7B,MAAM;KAQP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts", "val": {"version":3,"file":"PropSubComponentUpdateVarV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ets"],"names":[],"mappings":";;;;;;IAkBQ,KAAK,GAAE,MAAM;;MAFd,OAAO;IADd;;;;;;;;KAfA;;;;kCAkBQ,KAAK;;;;;;;;;;IADX,iBAAiB;IACjB,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;MAKI,QAAQ;IAFf;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts", "val": {"version":3,"file":"PropSubComponentUpdateVarV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ets"],"names":[],"mappings":";;;MAgBO,OAAO;IADd;;+EAG+B,CAAC;;KAlBhC;;gFAkB+B,CAAC;;IAD9B,kCAAkC;IAClC,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,KAAK,EAAE,MAAM,CAAK;IAE/B;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts", "val": {"version":3,"file":"ProvideAliasV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ets"],"names":[],"mappings":";;;;IAgCmB,OAAO,GAAE,MAAM;;;IAdf,YAAY,GAAE,MAAM;IAC5B,OAAO,GAAE,MAAM;;MAHnB,OAAO;IADd;;;;;qDAGW,MAAM;;;;KAlBjB;;;;;;;;;;;;;;;IAiBE,gCAAgC;IAChC,mDAA+B,MAAM,EAAC;QAArB,YAAY;;;QAAZ,YAAY,WAAE,MAAM;;;IACrC,8CAAkB,MAAM,EAAC;QAAhB,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,YAAY;;QAAtB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;QAFN,MAAM;KAIP;;;;;MAKI,QAAQ;IAFf;;;;;sDAGqC,aAAa;;;;;KALjD;;;;;;;;;;;;;;;;IAKC,4CAA0B,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAEhC;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts", "val": {"version":3,"file":"ProvideAliasV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ets"],"names":[],"mappings":";;;MAgBO,OAAO;IADd;;4BAG2C,SAAS;uBACpB,SAAS;;KAnBzC;;2CAkB2C,SAAS;sCACpB,SAAS;;IAFvC,oCAAoC;IACpC,CAAC,QAAQ,CAAC,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAa;IACnD,CAAC,QAAQ,EAAE;IAAC,OAAO,EAAE,MAAM,CAAa;IAExC;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,YAAY;;QAAtB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;QAFN,MAAM;KAIP;;;;;MAKI,QAAQ;IAFf;;uBAGsC,aAAa;;KALlD;;uBAKqC,aAAa;;IAAjD,CAAC,QAAQ,CAAC,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAiB;IAElD;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts", "val": {"version":3,"file":"ProvideAllowOverrideV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ets"],"names":[],"mappings":";;;MAiBO,YAAY;IAFnB;;2BAGiD,EAAE;;KAlBnD;;2BAkBiD,EAAE;;IAAjD,CAAC,QAAQ,CAAC,aAAa,CAAC;IAAC,WAAW,EAAE,MAAM,CAAM;IAElD;;YACE,MAAM;;;;;4CACJ,QAAQ;;;;;;;;;;;;QADV,MAAM;KAGP;;;;;;;;MAII,QAAQ;IADf;;2BAGoC,EAAE;;KALrC;;2BAKmC,EAAE;;IADpC,4CAA4C;IAC5C,CAAC,QAAQ,EAAE;IAAC,WAAW,EAAE,MAAM,CAAM;IAErC;;;;4CACE,OAAO;;;;;;;;;;;;KACR;;;;;MAII,OAAO;IADd;;2BAEoC,CAAC;;KAJpC;;0CAImC,CAAC;;IAAnC,CAAC,QAAQ,EAAE;IAAC,WAAW,EAAE,MAAM,CAAK;IAEpC;;YACE,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;;QAAhC,IAAI;KACL","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts", "val": {"version":3,"file":"ProvideConsumeInitV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ets"],"names":[],"mappings":";;;MAgBO,OAAO;IADd;;uBAGgC,aAAa;;KAlB7C;;sCAkBgC,aAAa;;IAD3C,2CAA2C;IAC3C,CAAC,QAAQ,EAAE;IAAC,OAAO,EAAE,MAAM,CAAiB;IAE5C;;YACE,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;KACL;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts", "val": {"version":3,"file":"ProvideConsumeNoInitV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ets"],"names":[],"mappings":";;;;IA4BW,OAAO,GAAE,MAAM;;;IAVf,OAAO,GAAE,MAAM;;MAFnB,OAAO;IADd;;;;;;;;KAfA;;;;;;;;;;;;;IAiBE,uCAAuC;IACvC,8CAAkB,MAAM,EAAC;QAAhB,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;KACL;;;;;MAKI,QAAQ;IAFf;;;;;sDAG6B,aAAa;;;;KALzC;;;;;;;;;;;;;;;;IAKC,4CAAkB,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts", "val": {"version":3,"file":"ProvideNoAllowOverrideV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ets"],"names":[],"mappings":";;;;IAuC0B,WAAW,GAAE,MAAM;;;IATA,WAAW,GAAE,MAAM;;;IAZtC,WAAW,GAAE,MAAM;;MADtC,YAAY;IAFnB;;;;;0DAGgD,EAAE;;;;KAlBlD;;;;;;;;;;;;;;;;IAkBE,gDAAqC,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE3C;;YACE,MAAM;;;;;4CACJ,QAAQ;;;;;;;;;;;;QADV,MAAM;KAGP;;;;;;;;MAII,QAAQ;IADf;;;;;0DAGmE,EAAE;4BAAzC,aAAa;;;KALxC;;;;;;;;;;;;;;;;IAIC,yCAAyC;IACzC,gDAAwD,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE9D;;;;4CACE,OAAO;;;;;;;;;;;;KACR;;;;;MAII,OAAO;IADd;;;;;oDAEW,aAAa;;;KAJvB;;;;;;;;;;;;;IAIC,kDAAqC,MAAM,EAAC;QAApB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE3C;;YACE,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;;QAAhC,IAAI;KACL","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts", "val": {"version":3,"file":"ProvideParentInitV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ets"],"names":[],"mappings":";;;;IA8BW,UAAU,GAAE,MAAM;;;IAZpB,WAAW,GAAE,MAAM;;MADrB,QAAQ;IAFf;;;;;0DAG+B,EAAE;;;KAlBjC;;;;;;;;;;;;;;;;IAkBE,gDAAoB,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE1B;;YACE,MAAM;;;;;;oBACJ,oBAAoB;oBACpB,OAAO,OAAC,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAA9B,UAAU,EAAE,IAAI,CAAC,WAAW;;;;;;;;;;QAFxC,MAAM;KAIP;;;;;;;;MAII,OAAO;IADd;;;;;yDAEgC,CAAC;;;;KAJhC;;;;;;;;;;;;;;;;IAIC,+CAAqB,MAAM,EAAK;QAAvB,UAAU;;;QAAV,UAAU,WAAE,MAAM;;;IAE3B;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;QAA/B,IAAI;QADN,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts", "val": {"version":3,"file":"ProvideParentNoInitV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ets"],"names":[],"mappings":";;;MAiBO,QAAQ;IAFf;;2BAG+B,EAAE;;KAlBjC;;2BAkB+B,EAAE;;IAA/B,CAAC,KAAK;IAAC,WAAW,EAAE,MAAM,CAAM;IAEhC;;YACE,MAAM;;;;;;oBACJ,mDAAmD;oBACnD,OAAO,OAAC,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAAhC,YAAY,EAAE,IAAI,CAAC,WAAW;;;;;;;wBAA9B,YAAY,EAAE,IAAI,CAAC,WAAW;;;;;QAF1C,MAAM;KAIP;;;;;;;;MAII,OAAO;IADd;;oGAEsC,CAAC;0BACJ,IAAI,CAAC,YAAY;;KALnD;;qGAIqC,CAAC;0BACJ,IAAI,CAAC,YAAY;;IADlD,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,YAAY,EAAE,MAAM,CAAK;IACtC,CAAC,QAAQ,EAAE;IAAC,UAAU,EAAE,MAAM,CAAqB;IAEnD;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;QAA/B,IAAI;QADN,MAAM;KAGP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV1.ts", "val": {"version":3,"file":"StateComplexV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ets"],"names":[],"mappings":";;;;IAsBS,KAAK,GAAE,MAAM;;AAtBtB;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,MAAM,MAAM;IACV,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC;CAC3B;MAIM,QAAQ;IAFf;;;;;oDAGyB,IAAI,MAAM,EAAE;;;KALpC;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAgB;QAA7B,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,kBAAkB;YAClB,MAAM,iBAAC,SAAS;YADhB,kBAAkB;YAClB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAErB,CAAC;;QALH,kBAAkB;QAClB,MAAM;QAHR,MAAM;KASP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV2.ts", "val": {"version":3,"file":"StateComplexV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ets"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,CAAC,UAAU;MACL,MAAM;IACV,CAAC,KAAK;IAAC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC;CAClC;MAIM,QAAQ;IAFf;;qBAGyB,IAAI,MAAM,EAAE;;KALpC;;qBAKwB,IAAI,MAAM,EAAE;;IAAnC,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAgB;IAEpC;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,4CAA4C;YAC5C,MAAM,iBAAC,SAAS;YADhB,4CAA4C;YAC5C,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAJH,4CAA4C;QAC5C,MAAM;QAHR,MAAM;KAQP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV1.ts", "val": {"version":3,"file":"StateEasyV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ets"],"names":[],"mappings":";;;;IAkBS,GAAG,GAAE,MAAM;;MADb,MAAM;IAFb;;;;;kDAGuB,EAAE;;;KAlBzB;;;;;;;;;;;;;;;;IAkBE,wCAAY,MAAM,EAAM;QAAjB,GAAG;;;QAAH,GAAG,WAAE,MAAM;;;IAElB;;YACE,IAAI,QAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAAxB,IAAI;KACL","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV2.ts", "val": {"version":3,"file":"StateEasyV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ets"],"names":[],"mappings":";;;MAkBO,MAAM;IAFb;;mBAGuB,EAAE;;KAnBzB;;mBAmBuB,EAAE;;IAAvB,CAAC,KAAK;IAAC,GAAG,EAAE,MAAM,CAAM;IAExB;;YACE,IAAI,QAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAAxB,IAAI;KACL","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts", "val": {"version":3,"file":"StateExternalInitializationV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ets"],"names":[],"mappings":";;;;;;IAiBS,KAAK,GAAE,MAAM;;MADf,MAAM;IADb;;;;;oDAEyB,CAAC;;;KAjB1B;;;;;;;;;;;;;;;;IAiBE,0CAAc,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;MAKI,OAAO;IAFd;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;;oBACJ,iBAAiB;oBACjB,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;;;;QAFpB,MAAM;KAIP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts", "val": {"version":3,"file":"StateExternalInitializationV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ets"],"names":[],"mappings":";;;MAgBO,MAAM;IADb;;+EAE+B,CAAC;;KAjBhC;;gFAiB+B,CAAC;;IAA9B,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,KAAK,EAAE,MAAM,CAAK;IAE/B;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;;;;;;;;;MAKI,OAAO;IAFd;;;KAFC;;;IAKC;;YACE,MAAM;;;;;;oBACJ,qCAAqC;oBACrC,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QAFpB,MAAM;KAIP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts", "val": {"version":3,"file":"WatchMoreVarV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ets"],"names":[],"mappings":";;;;IAuBiC,KAAK,GAAE,MAAM;IACZ,MAAM,GAAE,MAAM;;OATzC,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,aAAa;IAFpB;;;;;oDAGiD,CAAC;qDACC,CAAC;;;;;KANV;;;;;;;;;;;;;;;;;;;;;IAKxC,0CAAsC,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAC5C,2CAAwC,MAAM,EAAK;QAAnB,MAAM;;;QAAN,MAAM,WAAE,MAAM;;;IAE9C,+BAA+B;IAC/B,aAAa,IAAI,IAAI;QACnB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAED,cAAc,IAAI,IAAI;QACpB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,IAAI,QAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE;;QAAnC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts", "val": {"version":3,"file":"WatchMoreVarV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ets"],"names":[],"mappings":";;;OAeO,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,eAAe;IAFtB;;qBAGyB,CAAC;sBACA,CAAC;;KANe;;qBAKjB,CAAC;sBACA,CAAC;;;IADzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAK;IACzB,CAAC,KAAK;IAAC,MAAM,EAAE,MAAM,CAAK;IAE1B,gCAAgC;IAChC,CAAC,OAAO,CAAC,OAAO,EAAC,QAAQ,CAAC;IAC1B,aAAa,CAAC,OAAO,EAAE,QAAQ;QAC7B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;YACrC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,iBAAiB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAChH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,IAAI,QAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE;;QAAnC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts", "val": {"version":3,"file":"WatchSingleVarV1.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ets"],"names":[],"mappings":";;;;IAuBiC,KAAK,GAAE,MAAM;;OARvC,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,aAAa;IAFpB;;;;;oDAGiD,CAAC;;;;KALR;;;;;;;;;;;;;;;;IAKxC,0CAAsC,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAE5C,aAAa,IAAI,IAAI;QACnB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts", "val": {"version":3,"file":"WatchSingleVarV2.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ets"],"names":[],"mappings":";;;OAeO,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,eAAe;IAFtB;;qBAGyB,CAAC;;KALgB;;qBAKjB,CAAC;;;IAAxB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAK;IAEzB,CAAC,OAAO,CAAC,OAAO,CAAC;IACjB,aAAa,CAAC,OAAO,EAAE,QAAQ;QAC7B,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,sBAAsB,OAAO,CAAC,KAAK,EAAE,EAAE,MAAM,OAAO,OAAO,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP","entry-package-info":"entry|1.0.0"}} +{"key": "entry|entry|1.0.0|src/main/ets/pages/Index.ts", "val": {"version":3,"file":"Index.ets","sourceRoot":"","sources":["entry/src/main/ets/pages/Index.ets"],"names":[],"mappings":";;;;IAmJS,OAAO,GAAE,aAAa;;AAnJ/B;;;;;;;;;;;;;GAaG;AAEH,UAAU,QAAQ;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,IAAI,UAAU,EAAE,QAAQ,EAAE,GAAG;IAC3B;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,2CAA2C;KACpD;IACD;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,2CAA2C;KACpD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,6DAA6D;KACtE;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,6DAA6D;KACtE;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,6CAA6C;KACtD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,6CAA6C;KACtD;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,2DAA2D;KACpE;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,2DAA2D;KACpE;IACD;QACE,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,gEAAgE;KACzE;IACD;QACE,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,gEAAgE;KACzE;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,MAAM,EAAE,sDAAsD;KAC/D;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,oDAAoD;KAC7D;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,mDAAmD;KAC5D;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE,qDAAqD;KAC9D;IACD;QACE,IAAI,EAAE,0BAA0B;QAChC,MAAM,EAAE,wDAAwD;KACjE;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,MAAM,EAAE,sDAAsD;KAC/D;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;CACF,CAAA;MAIM,KAAK;IAFZ;;;;;sDAGkC,SAAS;;;KAL1C;;;;;;;;;;;;;;;;IAKC,4CAAgB,aAAa,EAAa;QAAnC,OAAO;;;QAAP,OAAO,WAAE,aAAa;;;IAE7B;;YACE,MAAM;;;YACJ,IAAI;YAAJ,IAAI,CACD,MAAM,CAAC,IAAI;YADd,IAAI,CAED,KAAK,CAAC,MAAM;YAFf,IAAI,CAGD,SAAS,CAAC,SAAS,CAAC,MAAM;YAH7B,IAAI,CAID,QAAQ,CAAC,EAAE;YAJd,IAAI,CAKD,UAAU,CAAC,UAAU,CAAC,IAAI;YAL7B,IAAI,CAMD,eAAe,6BAAC,IAAI,CAAC,OAAO;YAN/B,IAAI,CAOD,SAAS,CAAC,KAAK,CAAC,KAAK;;QAPxB,IAAI;;YASJ,MAAM;YAAN,MAAM,CA+BL,KAAK,CAAC,MAAM;YA/Bb,MAAM,CAiCL,eAAe,CAAC,WAAW;YAjC5B,MAAM,CAkCL,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;;;YAjCjB,IAAI,QAAC,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE;YAAnC,IAAI,CAiBH,aAAa,CAAC,IAAI,CAAC,QAAQ;YAjB5B,IAAI,CAkBH,SAAS,CAAC,QAAQ,CAAC,GAAG;YAlBvB,IAAI,CAmBH,QAAQ,CAAC,GAAG;YAnBb,IAAI,CAoBH,OAAO,CAAC;gBACP,WAAW,EAAE,CAAC;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,EAAE;gBACf,SAAS,EAAE,EAAE;aACd;YAzBD,IAAI,CA0BH,UAAU,CAAC,UAAU,CAAC,MAAM;YA1B7B,IAAI,CA2BH,gBAAgB,CAAC,EAAE;YA3BpB,IAAI,CA4BH,KAAK,CAAC,KAAK;;;YA3BV,OAAO;mDAAkC,KAAK,EAAE,MAAM;;;;;;;4BACpD,QAAQ;;;;;;;;;;4BACN,MAAM;4BAAN,MAAM,CAML,OAAO,CAAC,GAAG,EAAE;gCACZ,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE;oCACrB,IAAI,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;iCAClE;4BACH,CAAC;;;4BATC,IAAI,QAAC,QAAQ,CAAC,IAAI;4BAAlB,IAAI,CACD,QAAQ,CAAC,EAAE;4BADd,IAAI,CAED,SAAS,6BAAC,IAAI,CAAC,OAAO;4BAFzB,IAAI,CAGD,QAAQ,CAAC,CAAC;;wBAHb,IAAI;wBADN,MAAM;wBADR,QAAQ;;;oBAAR,QAAQ;;;+CADF,UAAU;;QAAlB,OAAO;QADT,IAAI;QADN,MAAM;QAVR,MAAM;KA8CP","entry-package-info":"entry|1.0.0"}} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/generated/profile/default/BuildProfile.ets b/ArkUIKit/StateMigrationProject/entry/build/default/generated/profile/default/BuildProfile.ets new file mode 100644 index 0000000000000000000000000000000000000000..f48bf4636110915f01095065f6d38351aceb8614 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/generated/profile/default/BuildProfile.ets @@ -0,0 +1,25 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const BUNDLE_NAME = 'com.samples.statemigrationproject'; +export const BUNDLE_TYPE = 'app'; +export const VERSION_CODE = 1000000; +export const VERSION_NAME = '1.0.0'; +export const TARGET_NAME = 'default'; +export const PRODUCT_NAME = 'default'; +export const BUILD_MODE_NAME = 'debug'; +export const DEBUG = true; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly BUNDLE_NAME = BUNDLE_NAME; + static readonly BUNDLE_TYPE = BUNDLE_TYPE; + static readonly VERSION_CODE = VERSION_CODE; + static readonly VERSION_NAME = VERSION_NAME; + static readonly TARGET_NAME = TARGET_NAME; + static readonly PRODUCT_NAME = PRODUCT_NAME; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/generated/r/default/ResourceTable.h b/ArkUIKit/StateMigrationProject/entry/build/default/generated/r/default/ResourceTable.h new file mode 100644 index 0000000000000000000000000000000000000000..6358192feabfbbb354ad7b409840254290f829c4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/generated/r/default/ResourceTable.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef RESOURCE_TABLE_H +#define RESOURCE_TABLE_H + +#include + +namespace OHOS { +const int32_t STRING_ENTRYABILITY_DESC = 0x01000004; +const int32_t STRING_ENTRYABILITY_LABEL = 0x01000005; +const int32_t STRING_APP_NAME = 0x01000000; +const int32_t STRING_MODULE_DESC = 0x01000006; +const int32_t STRING_STATE_MIGRATION = 0x01000007; +const int32_t COLOR_START_WINDOW_BACKGROUND = 0x01000008; +const int32_t FLOAT_PAGE_TEXT_FONT_SIZE = 0x01000009; +const int32_t MEDIA_BACKGROUND = 0x01000001; +const int32_t MEDIA_FOREGROUND = 0x01000002; +const int32_t MEDIA_LAYERED_IMAGE = 0x01000003; +const int32_t MEDIA_STARTICON = 0x0100000a; +const int32_t PROFILE_BACKUP_CONFIG = 0x0100000b; +const int32_t PROFILE_MAIN_PAGES = 0x0100000c; +} +#endif \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/hap_metadata/default/output_metadata.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/hap_metadata/default/output_metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..2d6e4e7b9ac2016ac77625baa0e8479d4446a5e4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/hap_metadata/default/output_metadata.json @@ -0,0 +1 @@ +[{"hapName":"entry-default-unsigned.hap","deviceTypes":["default"],"isSigned":false}] diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader/default/loader.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader/default/loader.json new file mode 100644 index 0000000000000000000000000000000000000000..a8975324bccf491dc7f1cccb1c6a2b4c08ce1150 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader/default/loader.json @@ -0,0 +1,25 @@ +{ + "modulePathMap": { + "entry": "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry" + }, + "compileMode": "esmodule", + "projectRootPath": "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject", + "nodeModulesPath": "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\loader_out\\default\\node_modules", + "byteCodeHarInfo": {}, + "declarationEntry": [], + "moduleName": "entry", + "hspNameOhmMap": {}, + "harNameOhmMap": {}, + "packageManagerType": "ohpm", + "compileEntry": [], + "otherCompileFiles": [], + "dynamicImportLibInfo": {}, + "routerMap": [], + "hspResourcesMap": {}, + "updateVersionInfo": {}, + "anBuildOutPut": "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\loader_out\\default\\an\\arm64-v8a", + "anBuildMode": "type", + "patchConfig": { + "changedFileList": "E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\patch\\default\\changedFileList.json" + } +} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader/default/pkgContextInfo.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader/default/pkgContextInfo.json new file mode 100644 index 0000000000000000000000000000000000000000..8cbda1a775fe255da423b0efb264b98a04d3c34a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader/default/pkgContextInfo.json @@ -0,0 +1 @@ +{"@ohos/lottie":{"packageName":"@ohos/lottie","bundleName":"","moduleName":"","version":"2.0.24","entryPath":"src/main/js/modules/full.js","isSO":false,"dependencyAlias":""},"@ohos/hypium":{"packageName":"@ohos/hypium","bundleName":"","moduleName":"","version":"1.0.24","entryPath":"index.js","isSO":false,"dependencyAlias":""},"@ohos/hamock":{"packageName":"@ohos/hamock","bundleName":"","moduleName":"","version":"1.0.0","entryPath":"index.ets","isSO":false,"dependencyAlias":""},"entry":{"packageName":"entry","bundleName":"","moduleName":"","version":"","entryPath":"src/main/","isSO":false,"dependencyAlias":""}} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader_out/default/ets/modules.abc b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader_out/default/ets/modules.abc new file mode 100644 index 0000000000000000000000000000000000000000..a7673a41a029600839bd6e0144a6081fe8b97f03 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader_out/default/ets/modules.abc differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader_out/default/ets/sourceMaps.map b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader_out/default/ets/sourceMaps.map new file mode 100644 index 0000000000000000000000000000000000000000..c4f2e45d79528456d9816dc3e92be1c3d9720f67 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/loader_out/default/ets/sourceMaps.map @@ -0,0 +1,365 @@ +{ + "entry|entry|1.0.0|src/main/ets/entryability/EntryAbility.ts": { + "version": 3, + "file": "EntryAbility.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/entryability/EntryAbility.ets" + ], + "names": [], + "mappings": "YAcS,eAAe;OAAE,qBAAqB;OAAE,SAAS;YAAE,IAAI;OACvD,KAAK;YACL,MAAM;AAEf,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IACjD,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,CAAC,WAAW,GAAG,IAAI;QAClE,IAAI;YACF,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;SACvG;QAAC,OAAO,GAAG,EAAE;YACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,4CAA4C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;SACnG;QACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,IAAI,IAAI;QACf,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC;IACnE,CAAC;IAED,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI;QACxD,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,6BAA6B,CAAC,CAAC;QAE3E,WAAW,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;YAC7C,IAAI,GAAG,CAAC,IAAI,EAAE;gBACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,+CAA+C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;gBACrG,OAAO;aACR;YACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,mCAAmC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,IAAI,IAAI;QAC1B,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,8BAA8B,CAAC,CAAC;IAC9E,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,oCAAoC;QACpC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,iCAAiC;QACjC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;CACF", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/entrybackupability/EntryBackupAbility.ts": { + "version": 3, + "file": "EntryBackupAbility.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/entrybackupability/EntryBackupAbility.ets" + ], + "names": [], + "mappings": "OAcS,KAAK;OACL,sBAAsB;cAAE,aAAa,IAAb,aAAa;AAE9C,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,sBAAsB;IACpE,KAAK,CAAC,QAAQ;QACZ,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAC7C,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa;QAC1C,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,yBAAyB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;QACxF,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACF", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV1.ts": { + "version": 3, + "file": "ComputedV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ComputedV1.ets" + ], + "names": [], + "mappings": ";;;;IAkBS,SAAS,GAAE,MAAM;IACjB,QAAQ,GAAE,MAAM;;MAFlB,MAAM;IAFb;;;;;wDAG6B,IAAI;uDACL,KAAK;;;KAnBjC;;;;;;;;;;;;;;;;;;;;;IAkBE,8CAAkB,MAAM,EAAQ;QAAzB,SAAS;;;QAAT,SAAS,WAAE,MAAM;;;IACxB,6CAAiB,MAAM,EAAS;QAAzB,QAAQ;;;QAAR,QAAQ,WAAE,MAAM;;;IAEvB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS;;QAAzC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS;;QAAzC,IAAI;;YACJ,MAAM,iBAAC,kBAAkB;YAAzB,MAAM,CAAqB,OAAO,CAAC,GAAG,EAAE;gBACtC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;YACvB,CAAC;;QAFD,MAAM;QAHR,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV2.ts": { + "version": 3, + "file": "ComputedV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ComputedV2.ets" + ], + "names": [], + "mappings": ";;;MAiBO,MAAM;IAFb;;yBAG6B,IAAI;wBACL,KAAK;;KAnBjC;;yBAkB6B,IAAI;wBACL,KAAK;;;IAD/B,CAAC,KAAK;IAAC,SAAS,EAAE,MAAM,CAAQ;IAChC,CAAC,KAAK;IAAC,QAAQ,EAAE,MAAM,CAAS;IAEhC,CAAC,QAAQ;QACL,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC9C,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ;;QAAlB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ;;QAAlB,IAAI;;YACJ,MAAM,iBAAC,kBAAkB;YAAzB,MAAM,CAAqB,OAAO,CAAC,GAAG,EAAE;gBACtC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;YACvB,CAAC;;QAFD,MAAM;QAHR,MAAM;KAOP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts": { + "version": 3, + "file": "LinkMiigrationV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ets" + ], + "names": [], + "mappings": ";;;;IAkCS,KAAK,GAAE,MAAM;;;IAhBd,GAAG,GAAE,MAAM;;MAFZ,MAAM;IADb;;;;;;;;KAfA;;;;;;;;;;;;;IAiBE,gBAAgB;IAChB,6CAAW,MAAM,EAAC;QAAZ,GAAG;;;QAAH,GAAG,WAAE,MAAM;;;IAEjB;;YACE,MAAM;;;YACJ,IAAI,QAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAApC,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;MAKI,OAAO;IAFd;;;;;oDAGyB,EAAE;;;KAL1B;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAM;QAAnB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,IAAI,QAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,MAAM,OAAC,EAAE,GAAG,cAAY,EAAE;;;;4BAAjB,GAAG;;;;;;;;;;QAFd,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts": { + "version": 3, + "file": "LinkMiigrationV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,MAAM;IADb;;yEAGuB,CAAC;;;KAlBxB;;0EAkBuB,CAAC;;;IADtB,2BAA2B;IAC3B,CAAC,KAAK;IAHR,QAfA,CAkBS,GAAG,EAAE,MAAM,CAAK;IACvB,CAAC,KAAK;IAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAApC,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;;;;;;;;;MAKI,OAAO;IAFd;;qBAGyB,EAAE;;KAL1B;;qBAKwB,EAAE;;IAAzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAM;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,MAAM,OAAC,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE;;;;4BAA7C,GAAG,EAAE,IAAI,CAAC,KAAK;4BAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE;;;;;;;wBAA3C,GAAG,EAAE,IAAI,CAAC,KAAK;;;;;QAF1B,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV1.ts": { + "version": 3, + "file": "PropComplexV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ets" + ], + "names": [], + "mappings": ";;;;IA4CS,WAAW,GAAE,MAAM;;;IArBpB,KAAK,GAAE,MAAM;;AAvBrB;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,MAAM,MAAM;IACV,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;CAC5B;MAGM,OAAO;IADd;;;;;;;;KAFC;;;;kCAKO,KAAK;;;;;;;;;;IADX,+BAA+B;IAC/B,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,MAAM;;;YACJ,IAAI,QAAC,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAlD,IAAI;;YACJ,IAAI,QAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAApD,IAAI;;YACJ,MAAM,iBAAC,SAAS;YAAhB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,UAAU;YAAjB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP;;;;;MAKI,QAAQ;IAFf;;;;;0DAG+B,IAAI,MAAM,EAAE;;;KAL1C;;;;;;;;;;;;;;;;IAKC,gDAAoB,MAAM,EAAgB;QAAnC,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAzD,IAAI;;YACJ,IAAI,QAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAA3D,IAAI;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAAzB,KAAK,EAAE,IAAI,CAAC,WAAW;;;;;;;wBAAvB,KAAK,EAAE,IAAI,CAAC,WAAW;;;;;QAHnC,MAAM;KAKP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV2.ts": { + "version": 3, + "file": "PropComplexV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ets" + ], + "names": [], + "mappings": ";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,CAAC,UAAU;MACL,MAAM;IACV,CAAC,KAAK;IAAC,MAAM,CAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC,KAAK;IAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;IAElC,sBAAsB;IACtB,KAAK,IAAI,MAAM;QACb,IAAI,QAAQ,EAAE,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACpC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;MAGM,OAAO;IADd;;+EAEyB,IAAI,MAAM,EAAE;;KAJpC;;gFAIwB,IAAI,MAAM,EAAE;;IAAnC,CAAC,KAAK;IAhBR,QAfA,CA+BS,KAAK,EAAE,MAAM,CAAgB;IAEpC;;YACE,MAAM;;;YACJ,IAAI,QAAC,OAAO;;QAAZ,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,SAAS;YAAhB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,UAAU;YAAjB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;;QAHH,MAAM;QARR,MAAM;KAaP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;2BAG+B,IAAI,MAAM,EAAE;;KAL1C;;2BAK8B,IAAI,MAAM,EAAE;;IAAzC,CAAC,KAAK;IAAC,WAAW,EAAE,MAAM,CAAgB;IAE1C;;YACE,MAAM;;;YACJ,IAAI,QAAC,QAAQ;;QAAb,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAtC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE;;;;4BAAjC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;;;;;;;wBAA/B,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;;;;;QAJ3C,MAAM;KAMP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV1.ts": { + "version": 3, + "file": "PropEasyV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ets" + ], + "names": [], + "mappings": ";;;;;;IAiBQ,KAAK,GAAE,MAAM;;MADd,MAAM;IADb;;;;;;;;KAfA;;;;kCAiBQ,KAAK;;;;;;;;;;IAAX,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;MAKI,OAAO;IAFd;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;4CACJ,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADpB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV2.ts": { + "version": 3, + "file": "PropEasyV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;+EAEyB,CAAC;;KAjB1B;;gFAiByB,CAAC;;IAAxB,CAAC,KAAK;IAFR,QAfA,CAiBS,KAAK,EAAE,MAAM,CAAK;IAEzB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarLocalV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ets" + ], + "names": [], + "mappings": ";;;;IAkCS,KAAK,GAAE,MAAM;;;IAjBd,UAAU,GAAE,MAAM;;MADnB,OAAO;IADd;;;;;;;;KAfA;;;kCAiB6B,CAAC;;;;uCAAtB,UAAU;;;;;;;;;;IAAhB,oDAAkB,MAAM,EAAK;QAAvB,UAAU;;;QAAV,UAAU,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;YACJ,IAAI,QAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YAAzB,IAAI,CAAuB,QAAQ,CAAC,EAAE;;QAAtC,IAAI;;YACJ,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,6BAA6B;gBAC7B,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC;YACzB,CAAC;;QAJH,MAAM;QAFR,MAAM;KAQP;;;;;MAKI,QAAQ;IAFf;;;;;oDAGyB,EAAE;;;KAL1B;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAM;QAAnB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,+BAA+B;gBAC/B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAClB,CAAC;;QAJH,MAAM;;;;4CAKN,OAAO,OAAC,EAAE,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE;;;;4BAAxB,UAAU,EAAE,IAAI,CAAC,KAAK;;;;;;;wBAAtB,UAAU,EAAE,IAAI,CAAC,KAAK;;;;;QANlC,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarLocalV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ets" + ], + "names": [], + "mappings": ";;;OAeO,KAAK;AACZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAGnC,OAAO;IADd;;0BAE8B,CAAC;+EACN,CAAC;;KALgB;;0BAIZ,CAAC;gFACN,CAAC;;;IADxB,CAAC,KAAK;IAAC,UAAU,EAAE,MAAM,CAAK;IAC9B,CAAC,KAAK;IAPR,QAfA,CAsBS,KAAK,EAAE,MAAM,CAAK;IAEzB,CAAC,OAAO,CAAC,OAAO,CAAC;IACjB,aAAa,CAAC,GAAG,EAAE,QAAQ;QACzB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAC,GAAG,EAAC,+BAA+B,GAAG,CAAC,KAAK,EAAE,EAAE,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACnG,6DAA6D;QAC7D,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;IAC/B,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YAAzB,IAAI,CAAuB,QAAQ,CAAC,EAAE;;QAAtC,IAAI;;YACJ,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,6BAA6B;gBAC7B,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC;YACzB,CAAC;;QAJH,MAAM;QAFR,MAAM;KAQP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;qBAGyB,EAAE;;KAL1B;;qBAKwB,EAAE;;IAAzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAM;IAE1B;;YACE,MAAM;;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,+BAA+B;gBAC/B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAClB,CAAC;;QAJH,MAAM;;;;4CAKN,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;;;;4BAAnB,KAAK,EAAE,IAAI,CAAC,KAAK;;;;;;;wBAAjB,KAAK,EAAE,IAAI,CAAC,KAAK;;;;;QAN7B,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ets" + ], + "names": [], + "mappings": ";;;;;;IAkBQ,KAAK,GAAE,MAAM;;MAFd,OAAO;IADd;;;;;;;;KAfA;;;;kCAkBQ,KAAK;;;;;;;;;;IADX,iBAAiB;IACjB,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;MAKI,QAAQ;IAFf;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;+EAG+B,CAAC;;KAlBhC;;gFAkB+B,CAAC;;IAD9B,kCAAkC;IAClC,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,KAAK,EAAE,MAAM,CAAK;IAE/B;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts": { + "version": 3, + "file": "ProvideAliasV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ets" + ], + "names": [], + "mappings": ";;;;IAgCmB,OAAO,GAAE,MAAM;;;IAdf,YAAY,GAAE,MAAM;IAC5B,OAAO,GAAE,MAAM;;MAHnB,OAAO;IADd;;;;;qDAGW,MAAM;;;;KAlBjB;;;;;;;;;;;;;;;IAiBE,gCAAgC;IAChC,mDAA+B,MAAM,EAAC;QAArB,YAAY;;;QAAZ,YAAY,WAAE,MAAM;;;IACrC,8CAAkB,MAAM,EAAC;QAAhB,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,YAAY;;QAAtB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;QAFN,MAAM;KAIP;;;;;MAKI,QAAQ;IAFf;;;;;sDAGqC,aAAa;;;;;KALjD;;;;;;;;;;;;;;;;IAKC,4CAA0B,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAEhC;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts": { + "version": 3, + "file": "ProvideAliasV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;4BAG2C,SAAS;uBACpB,SAAS;;KAnBzC;;2CAkB2C,SAAS;sCACpB,SAAS;;IAFvC,oCAAoC;IACpC,CAAC,QAAQ,CAAC,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAa;IACnD,CAAC,QAAQ,EAAE;IAAC,OAAO,EAAE,MAAM,CAAa;IAExC;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,YAAY;;QAAtB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;QAFN,MAAM;KAIP;;;;;MAKI,QAAQ;IAFf;;uBAGsC,aAAa;;KALlD;;uBAKqC,aAAa;;IAAjD,CAAC,QAAQ,CAAC,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAiB;IAElD;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts": { + "version": 3, + "file": "ProvideAllowOverrideV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ets" + ], + "names": [], + "mappings": ";;;MAiBO,YAAY;IAFnB;;2BAGiD,EAAE;;KAlBnD;;2BAkBiD,EAAE;;IAAjD,CAAC,QAAQ,CAAC,aAAa,CAAC;IAAC,WAAW,EAAE,MAAM,CAAM;IAElD;;YACE,MAAM;;;;;4CACJ,QAAQ;;;;;;;;;;;;QADV,MAAM;KAGP;;;;;;;;MAII,QAAQ;IADf;;2BAGoC,EAAE;;KALrC;;2BAKmC,EAAE;;IADpC,4CAA4C;IAC5C,CAAC,QAAQ,EAAE;IAAC,WAAW,EAAE,MAAM,CAAM;IAErC;;;;4CACE,OAAO;;;;;;;;;;;;KACR;;;;;MAII,OAAO;IADd;;2BAEoC,CAAC;;KAJpC;;0CAImC,CAAC;;IAAnC,CAAC,QAAQ,EAAE;IAAC,WAAW,EAAE,MAAM,CAAK;IAEpC;;YACE,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;;QAAhC,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts": { + "version": 3, + "file": "ProvideConsumeInitV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;uBAGgC,aAAa;;KAlB7C;;sCAkBgC,aAAa;;IAD3C,2CAA2C;IAC3C,CAAC,QAAQ,EAAE;IAAC,OAAO,EAAE,MAAM,CAAiB;IAE5C;;YACE,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;KACL;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts": { + "version": 3, + "file": "ProvideConsumeNoInitV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ets" + ], + "names": [], + "mappings": ";;;;IA4BW,OAAO,GAAE,MAAM;;;IAVf,OAAO,GAAE,MAAM;;MAFnB,OAAO;IADd;;;;;;;;KAfA;;;;;;;;;;;;;IAiBE,uCAAuC;IACvC,8CAAkB,MAAM,EAAC;QAAhB,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;KACL;;;;;MAKI,QAAQ;IAFf;;;;;sDAG6B,aAAa;;;;KALzC;;;;;;;;;;;;;;;;IAKC,4CAAkB,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts": { + "version": 3, + "file": "ProvideNoAllowOverrideV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ets" + ], + "names": [], + "mappings": ";;;;IAuC0B,WAAW,GAAE,MAAM;;;IATA,WAAW,GAAE,MAAM;;;IAZtC,WAAW,GAAE,MAAM;;MADtC,YAAY;IAFnB;;;;;0DAGgD,EAAE;;;;KAlBlD;;;;;;;;;;;;;;;;IAkBE,gDAAqC,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE3C;;YACE,MAAM;;;;;4CACJ,QAAQ;;;;;;;;;;;;QADV,MAAM;KAGP;;;;;;;;MAII,QAAQ;IADf;;;;;0DAGmE,EAAE;4BAAzC,aAAa;;;KALxC;;;;;;;;;;;;;;;;IAIC,yCAAyC;IACzC,gDAAwD,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE9D;;;;4CACE,OAAO;;;;;;;;;;;;KACR;;;;;MAII,OAAO;IADd;;;;;oDAEW,aAAa;;;KAJvB;;;;;;;;;;;;;IAIC,kDAAqC,MAAM,EAAC;QAApB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE3C;;YACE,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;;QAAhC,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts": { + "version": 3, + "file": "ProvideParentInitV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ets" + ], + "names": [], + "mappings": ";;;;IA8BW,UAAU,GAAE,MAAM;;;IAZpB,WAAW,GAAE,MAAM;;MADrB,QAAQ;IAFf;;;;;0DAG+B,EAAE;;;KAlBjC;;;;;;;;;;;;;;;;IAkBE,gDAAoB,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE1B;;YACE,MAAM;;;;;;oBACJ,oBAAoB;oBACpB,OAAO,OAAC,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAA9B,UAAU,EAAE,IAAI,CAAC,WAAW;;;;;;;;;;QAFxC,MAAM;KAIP;;;;;;;;MAII,OAAO;IADd;;;;;yDAEgC,CAAC;;;;KAJhC;;;;;;;;;;;;;;;;IAIC,+CAAqB,MAAM,EAAK;QAAvB,UAAU;;;QAAV,UAAU,WAAE,MAAM;;;IAE3B;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;QAA/B,IAAI;QADN,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts": { + "version": 3, + "file": "ProvideParentNoInitV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ets" + ], + "names": [], + "mappings": ";;;MAiBO,QAAQ;IAFf;;2BAG+B,EAAE;;KAlBjC;;2BAkB+B,EAAE;;IAA/B,CAAC,KAAK;IAAC,WAAW,EAAE,MAAM,CAAM;IAEhC;;YACE,MAAM;;;;;;oBACJ,mDAAmD;oBACnD,OAAO,OAAC,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAAhC,YAAY,EAAE,IAAI,CAAC,WAAW;;;;;;;wBAA9B,YAAY,EAAE,IAAI,CAAC,WAAW;;;;;QAF1C,MAAM;KAIP;;;;;;;;MAII,OAAO;IADd;;oGAEsC,CAAC;0BACJ,IAAI,CAAC,YAAY;;KALnD;;qGAIqC,CAAC;0BACJ,IAAI,CAAC,YAAY;;IADlD,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,YAAY,EAAE,MAAM,CAAK;IACtC,CAAC,QAAQ,EAAE;IAAC,UAAU,EAAE,MAAM,CAAqB;IAEnD;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;QAA/B,IAAI;QADN,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV1.ts": { + "version": 3, + "file": "StateComplexV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ets" + ], + "names": [], + "mappings": ";;;;IAsBS,KAAK,GAAE,MAAM;;AAtBtB;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,MAAM,MAAM;IACV,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC;CAC3B;MAIM,QAAQ;IAFf;;;;;oDAGyB,IAAI,MAAM,EAAE;;;KALpC;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAgB;QAA7B,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,kBAAkB;YAClB,MAAM,iBAAC,SAAS;YADhB,kBAAkB;YAClB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAErB,CAAC;;QALH,kBAAkB;QAClB,MAAM;QAHR,MAAM;KASP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV2.ts": { + "version": 3, + "file": "StateComplexV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ets" + ], + "names": [], + "mappings": ";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,CAAC,UAAU;MACL,MAAM;IACV,CAAC,KAAK;IAAC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC;CAClC;MAIM,QAAQ;IAFf;;qBAGyB,IAAI,MAAM,EAAE;;KALpC;;qBAKwB,IAAI,MAAM,EAAE;;IAAnC,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAgB;IAEpC;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,4CAA4C;YAC5C,MAAM,iBAAC,SAAS;YADhB,4CAA4C;YAC5C,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAJH,4CAA4C;QAC5C,MAAM;QAHR,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV1.ts": { + "version": 3, + "file": "StateEasyV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ets" + ], + "names": [], + "mappings": ";;;;IAkBS,GAAG,GAAE,MAAM;;MADb,MAAM;IAFb;;;;;kDAGuB,EAAE;;;KAlBzB;;;;;;;;;;;;;;;;IAkBE,wCAAY,MAAM,EAAM;QAAjB,GAAG;;;QAAH,GAAG,WAAE,MAAM;;;IAElB;;YACE,IAAI,QAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAAxB,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV2.ts": { + "version": 3, + "file": "StateEasyV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ets" + ], + "names": [], + "mappings": ";;;MAkBO,MAAM;IAFb;;mBAGuB,EAAE;;KAnBzB;;mBAmBuB,EAAE;;IAAvB,CAAC,KAAK;IAAC,GAAG,EAAE,MAAM,CAAM;IAExB;;YACE,IAAI,QAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAAxB,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts": { + "version": 3, + "file": "StateExternalInitializationV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ets" + ], + "names": [], + "mappings": ";;;;;;IAiBS,KAAK,GAAE,MAAM;;MADf,MAAM;IADb;;;;;oDAEyB,CAAC;;;KAjB1B;;;;;;;;;;;;;;;;IAiBE,0CAAc,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;MAKI,OAAO;IAFd;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;;oBACJ,iBAAiB;oBACjB,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;;;;QAFpB,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts": { + "version": 3, + "file": "StateExternalInitializationV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,MAAM;IADb;;+EAE+B,CAAC;;KAjBhC;;gFAiB+B,CAAC;;IAA9B,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,KAAK,EAAE,MAAM,CAAK;IAE/B;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;;;;;;;;;MAKI,OAAO;IAFd;;;KAFC;;;IAKC;;YACE,MAAM;;;;;;oBACJ,qCAAqC;oBACrC,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QAFpB,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts": { + "version": 3, + "file": "WatchMoreVarV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ets" + ], + "names": [], + "mappings": ";;;;IAuBiC,KAAK,GAAE,MAAM;IACZ,MAAM,GAAE,MAAM;;OATzC,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,aAAa;IAFpB;;;;;oDAGiD,CAAC;qDACC,CAAC;;;;;KANV;;;;;;;;;;;;;;;;;;;;;IAKxC,0CAAsC,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAC5C,2CAAwC,MAAM,EAAK;QAAnB,MAAM;;;QAAN,MAAM,WAAE,MAAM;;;IAE9C,+BAA+B;IAC/B,aAAa,IAAI,IAAI;QACnB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAED,cAAc,IAAI,IAAI;QACpB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,IAAI,QAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE;;QAAnC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts": { + "version": 3, + "file": "WatchMoreVarV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ets" + ], + "names": [], + "mappings": ";;;OAeO,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,eAAe;IAFtB;;qBAGyB,CAAC;sBACA,CAAC;;KANe;;qBAKjB,CAAC;sBACA,CAAC;;;IADzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAK;IACzB,CAAC,KAAK;IAAC,MAAM,EAAE,MAAM,CAAK;IAE1B,gCAAgC;IAChC,CAAC,OAAO,CAAC,OAAO,EAAC,QAAQ,CAAC;IAC1B,aAAa,CAAC,OAAO,EAAE,QAAQ;QAC7B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;YACrC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,iBAAiB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAChH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,IAAI,QAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE;;QAAnC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts": { + "version": 3, + "file": "WatchSingleVarV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ets" + ], + "names": [], + "mappings": ";;;;IAuBiC,KAAK,GAAE,MAAM;;OARvC,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,aAAa;IAFpB;;;;;oDAGiD,CAAC;;;;KALR;;;;;;;;;;;;;;;;IAKxC,0CAAsC,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAE5C,aAAa,IAAI,IAAI;QACnB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts": { + "version": 3, + "file": "WatchSingleVarV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ets" + ], + "names": [], + "mappings": ";;;OAeO,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,eAAe;IAFtB;;qBAGyB,CAAC;;KALgB;;qBAKjB,CAAC;;;IAAxB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAK;IAEzB,CAAC,OAAO,CAAC,OAAO,CAAC;IACjB,aAAa,CAAC,OAAO,EAAE,QAAQ;QAC7B,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,sBAAsB,OAAO,CAAC,KAAK,EAAE,EAAE,MAAM,OAAO,OAAO,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/Index.ts": { + "version": 3, + "file": "Index.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/Index.ets" + ], + "names": [], + "mappings": ";;;;IAmJS,OAAO,GAAE,aAAa;;AAnJ/B;;;;;;;;;;;;;GAaG;AAEH,UAAU,QAAQ;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,IAAI,UAAU,EAAE,QAAQ,EAAE,GAAG;IAC3B;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,2CAA2C;KACpD;IACD;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,2CAA2C;KACpD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,6DAA6D;KACtE;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,6DAA6D;KACtE;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,6CAA6C;KACtD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,6CAA6C;KACtD;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,2DAA2D;KACpE;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,2DAA2D;KACpE;IACD;QACE,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,gEAAgE;KACzE;IACD;QACE,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,gEAAgE;KACzE;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,MAAM,EAAE,sDAAsD;KAC/D;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,oDAAoD;KAC7D;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,mDAAmD;KAC5D;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE,qDAAqD;KAC9D;IACD;QACE,IAAI,EAAE,0BAA0B;QAChC,MAAM,EAAE,wDAAwD;KACjE;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,MAAM,EAAE,sDAAsD;KAC/D;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;CACF,CAAA;MAIM,KAAK;IAFZ;;;;;sDAGkC,SAAS;;;KAL1C;;;;;;;;;;;;;;;;IAKC,4CAAgB,aAAa,EAAa;QAAnC,OAAO;;;QAAP,OAAO,WAAE,aAAa;;;IAE7B;;YACE,MAAM;;;YACJ,IAAI;YAAJ,IAAI,CACD,MAAM,CAAC,IAAI;YADd,IAAI,CAED,KAAK,CAAC,MAAM;YAFf,IAAI,CAGD,SAAS,CAAC,SAAS,CAAC,MAAM;YAH7B,IAAI,CAID,QAAQ,CAAC,EAAE;YAJd,IAAI,CAKD,UAAU,CAAC,UAAU,CAAC,IAAI;YAL7B,IAAI,CAMD,eAAe,6BAAC,IAAI,CAAC,OAAO;YAN/B,IAAI,CAOD,SAAS,CAAC,KAAK,CAAC,KAAK;;QAPxB,IAAI;;YASJ,MAAM;YAAN,MAAM,CA+BL,KAAK,CAAC,MAAM;YA/Bb,MAAM,CAiCL,eAAe,CAAC,WAAW;YAjC5B,MAAM,CAkCL,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;;;YAjCjB,IAAI,QAAC,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE;YAAnC,IAAI,CAiBH,aAAa,CAAC,IAAI,CAAC,QAAQ;YAjB5B,IAAI,CAkBH,SAAS,CAAC,QAAQ,CAAC,GAAG;YAlBvB,IAAI,CAmBH,QAAQ,CAAC,GAAG;YAnBb,IAAI,CAoBH,OAAO,CAAC;gBACP,WAAW,EAAE,CAAC;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,EAAE;gBACf,SAAS,EAAE,EAAE;aACd;YAzBD,IAAI,CA0BH,UAAU,CAAC,UAAU,CAAC,MAAM;YA1B7B,IAAI,CA2BH,gBAAgB,CAAC,EAAE;YA3BpB,IAAI,CA4BH,KAAK,CAAC,KAAK;;;YA3BV,OAAO;mDAAkC,KAAK,EAAE,MAAM;;;;;;;4BACpD,QAAQ;;;;;;;;;;4BACN,MAAM;4BAAN,MAAM,CAML,OAAO,CAAC,GAAG,EAAE;gCACZ,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE;oCACrB,IAAI,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;iCAClE;4BACH,CAAC;;;4BATC,IAAI,QAAC,QAAQ,CAAC,IAAI;4BAAlB,IAAI,CACD,QAAQ,CAAC,EAAE;4BADd,IAAI,CAED,SAAS,6BAAC,IAAI,CAAC,OAAO;4BAFzB,IAAI,CAGD,QAAQ,CAAC,CAAC;;wBAHb,IAAI;wBADN,MAAM;wBADR,QAAQ;;;oBAAR,QAAQ;;;+CADF,UAAU;;QAAlB,OAAO;QADT,IAAI;QADN,MAAM;QAVR,MAAM;KA8CP", + "entry-package-info": "entry|1.0.0" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/merge_profile/default/module.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/merge_profile/default/module.json new file mode 100644 index 0000000000000000000000000000000000000000..826631d1e6002d03b4ab21ba5a2d9bc1b892ab6b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/merge_profile/default/module.json @@ -0,0 +1,70 @@ +{ + "app": { + "bundleName": "com.samples.statemigrationproject", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name", + "apiReleaseType": "Release", + "compileSdkVersion": "6.0.0.47", + "targetAPIVersion": 60000020, + "minAPIVersion": 60000020, + "compileSdkType": "HarmonyOS", + "targetMinorAPIVersion": 0, + "targetPatchAPIVersion": 0, + "appEnvironments": [], + "bundleType": "app", + "buildMode": "debug", + "debug": true + }, + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "ohos.want.action.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ] + } + ], + "packageName": "entry" + } +} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/package/default/module.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/package/default/module.json new file mode 100644 index 0000000000000000000000000000000000000000..e05d59fae2eef6877272adbcaf46f4c677c4d62e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/package/default/module.json @@ -0,0 +1,68 @@ +{ + "app": { + "bundleName": "com.samples.statemigrationproject", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name", + "apiReleaseType": "Release", + "compileSdkVersion": "6.0.0.47", + "targetAPIVersion": 60000020, + "minAPIVersion": 60000020, + "compileSdkType": "HarmonyOS", + "targetMinorAPIVersion": 0, + "targetPatchAPIVersion": 0, + "appEnvironments": [], + "bundleType": "app", + "buildMode": "debug", + "debug": true, + "iconId": 16777219, + "labelId": 16777216 + }, + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": ["default"], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [{ + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [{ + "entities": ["entity.system.home"], + "actions": ["ohos.want.action.home"] + }], + "descriptionId": 16777220, + "iconId": 16777219, + "labelId": 16777221, + "startWindowIconId": 16777226, + "startWindowBackgroundId": 16777224 + }], + "extensionAbilities": [{ + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [{ + "name": "ohos.extension.backup", + "resource": "$profile:backup_config", + "resourceId": 16777227 + }] + }], + "packageName": "entry", + "virtualMachine": "ark13.0.1.0", + "compileMode": "esmodule", + "dependencies": [], + "descriptionId": 16777222 + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/patch/default/base_native_libs.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/patch/default/base_native_libs.json new file mode 100644 index 0000000000000000000000000000000000000000..f374f010c198cc570e0a9986cfe8ffbfdeaa9745 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/patch/default/base_native_libs.json @@ -0,0 +1 @@ +{"libs":{},"stripped":{}} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/process_profile/default/module.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/process_profile/default/module.json new file mode 100644 index 0000000000000000000000000000000000000000..67e5305e73539fca76a8c7c474e8f514b954e736 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/process_profile/default/module.json @@ -0,0 +1,73 @@ +{ + "app": { + "bundleName": "com.samples.statemigrationproject", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name", + "apiReleaseType": "Release", + "compileSdkVersion": "6.0.0.47", + "targetAPIVersion": 60000020, + "minAPIVersion": 60000020, + "compileSdkType": "HarmonyOS", + "targetMinorAPIVersion": 0, + "targetPatchAPIVersion": 0, + "appEnvironments": [], + "bundleType": "app", + "buildMode": "debug", + "debug": true + }, + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "ohos.want.action.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ] + } + ], + "packageName": "entry", + "virtualMachine": "ark13.0.1.0", + "compileMode": "esmodule", + "dependencies": [] + } +} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/.caches/base/media/background.png b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/.caches/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..1ab7ae20a327270995f1ad22c3dfc76db4fb1056 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/.caches/base/media/background.png differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/.caches/base/media/foreground.png b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/.caches/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..418affbf658954b0c174c80847a26328ca86111e Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/.caches/base/media/foreground.png differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/ResourceTable.txt b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/ResourceTable.txt new file mode 100644 index 0000000000000000000000000000000000000000..4fe9a49d3f9bc71872076e525b2b063622b6ee7e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/ResourceTable.txt @@ -0,0 +1,13 @@ +string EntryAbility_desc 0x01000004 +string EntryAbility_label 0x01000005 +string app_name 0x01000000 +string module_desc 0x01000006 +string state_migration 0x01000007 +color start_window_background 0x01000008 +float page_text_font_size 0x01000009 +media background 0x01000001 +media foreground 0x01000002 +media layered_image 0x01000003 +media startIcon 0x0100000a +profile backup_config 0x0100000b +profile main_pages 0x0100000c \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/ark_module.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/ark_module.json new file mode 100644 index 0000000000000000000000000000000000000000..610769cd1450d574564d0880ef56d7dacac92e9d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/ark_module.json @@ -0,0 +1 @@ +{"app":{"bundleName":"com.samples.statemigrationproject","vendor":"example","versionCode":1000000,"versionName":"1.0.0","icon":"$media:layered_image","label":"$string:app_name","apiReleaseType":"Release","compileSdkVersion":"6.0.0.47","targetAPIVersion":60000020,"minAPIVersion":60000020,"compileSdkType":"HarmonyOS","targetMinorAPIVersion":0,"targetPatchAPIVersion":0,"appEnvironments":[],"bundleType":"app","buildMode":"debug","debug":true},"module":{"name":"entry","type":"entry","description":"$string:module_desc","mainElement":"EntryAbility","deviceTypes":["default"],"deliveryWithInstall":true,"installationFree":false,"pages":"$profile:main_pages","abilities":[{"name":"EntryAbility","srcEntry":"./ets/entryability/EntryAbility.ets","description":"$string:EntryAbility_desc","icon":"$media:layered_image","label":"$string:EntryAbility_label","startWindowIcon":"$media:startIcon","startWindowBackground":"$color:start_window_background","exported":true,"skills":[{"entities":["entity.system.home"],"actions":["ohos.want.action.home"]}]}],"extensionAbilities":[{"name":"EntryBackupAbility","srcEntry":"./ets/entrybackupability/EntryBackupAbility.ets","type":"backup","exported":false,"metadata":[{"name":"ohos.extension.backup","resource":"$profile:backup_config"}]}],"packageName":"entry","virtualMachine":"ark13.0.1.0","compileMode":"esmodule","dependencies":[]}} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/ids_map/id_defined.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/ids_map/id_defined.json new file mode 100644 index 0000000000000000000000000000000000000000..8fdaaccd037bcd849e24008c22523b2d6b599139 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/ids_map/id_defined.json @@ -0,0 +1,55 @@ +{ + "record": [{ + "type": "string", + "name": "app_name", + "id": "0x01000000" + }, { + "type": "media", + "name": "background", + "id": "0x01000001" + }, { + "type": "media", + "name": "foreground", + "id": "0x01000002" + }, { + "type": "media", + "name": "layered_image", + "id": "0x01000003" + }, { + "type": "string", + "name": "EntryAbility_desc", + "id": "0x01000004" + }, { + "type": "string", + "name": "EntryAbility_label", + "id": "0x01000005" + }, { + "type": "string", + "name": "module_desc", + "id": "0x01000006" + }, { + "type": "string", + "name": "state_migration", + "id": "0x01000007" + }, { + "type": "color", + "name": "start_window_background", + "id": "0x01000008" + }, { + "type": "float", + "name": "page_text_font_size", + "id": "0x01000009" + }, { + "type": "media", + "name": "startIcon", + "id": "0x0100000A" + }, { + "type": "profile", + "name": "backup_config", + "id": "0x0100000B" + }, { + "type": "profile", + "name": "main_pages", + "id": "0x0100000C" + }] +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/module.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/module.json new file mode 100644 index 0000000000000000000000000000000000000000..e05d59fae2eef6877272adbcaf46f4c677c4d62e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/module.json @@ -0,0 +1,68 @@ +{ + "app": { + "bundleName": "com.samples.statemigrationproject", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name", + "apiReleaseType": "Release", + "compileSdkVersion": "6.0.0.47", + "targetAPIVersion": 60000020, + "minAPIVersion": 60000020, + "compileSdkType": "HarmonyOS", + "targetMinorAPIVersion": 0, + "targetPatchAPIVersion": 0, + "appEnvironments": [], + "bundleType": "app", + "buildMode": "debug", + "debug": true, + "iconId": 16777219, + "labelId": 16777216 + }, + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": ["default"], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [{ + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [{ + "entities": ["entity.system.home"], + "actions": ["ohos.want.action.home"] + }], + "descriptionId": 16777220, + "iconId": 16777219, + "labelId": 16777221, + "startWindowIconId": 16777226, + "startWindowBackgroundId": 16777224 + }], + "extensionAbilities": [{ + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [{ + "name": "ohos.extension.backup", + "resource": "$profile:backup_config", + "resourceId": 16777227 + }] + }], + "packageName": "entry", + "virtualMachine": "ark13.0.1.0", + "compileMode": "esmodule", + "dependencies": [], + "descriptionId": 16777222 + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/opt-compression.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/opt-compression.json new file mode 100644 index 0000000000000000000000000000000000000000..f385d4026e8cd1d00f8866d113f1e1d6ed3ee867 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/opt-compression.json @@ -0,0 +1 @@ +{"context":{"extensionPath":"D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\hms\\toolchains\\lib\\libimage_transcoder_shared.dll"},"compression":{"media":{"enable":false},"filters":[]}} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resConfig.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resConfig.json new file mode 100644 index 0000000000000000000000000000000000000000..ee6e3f417efe8e4a9fc28ca4f394f85f77868636 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resConfig.json @@ -0,0 +1 @@ +{"configPath":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\process_profile\\default\\module.json","packageName":"com.samples.statemigrationproject","output":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\res\\default","moduleNames":"entry","ResourceTable":["E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\generated\\r\\default\\ResourceTable.h"],"applicationResource":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\AppScope\\resources","moduleResources":["E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\src\\main\\resources"],"dependencies":[],"iconCheck":true,"compression":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\res\\default\\opt-compression.json","ids":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\res\\default\\ids_map","definedIds":"E:\\applications_app_samples\\code\\DocsSample\\ArkUISample\\StateMigrationProject\\entry\\build\\default\\intermediates\\res\\default\\ids_map\\id_defined.json","definedSysIds":"D:\\devecostudio-windows-6.0.0.858\\DevEco Studio\\sdk\\default\\hms\\toolchains\\id_defined.json"} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources.index b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources.index new file mode 100644 index 0000000000000000000000000000000000000000..286417714e4f8acad20b1b4fa0f3d2e4ff136412 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources.index differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/background.png b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..1ab7ae20a327270995f1ad22c3dfc76db4fb1056 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/background.png differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/foreground.png b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..418affbf658954b0c174c80847a26328ca86111e Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/foreground.png differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/layered_image.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..88e305e7ad5490d2333d1881cf965cff65e1c196 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/layered_image.json @@ -0,0 +1,6 @@ +{ + "layered-image": { + "background": "$media:16777217", + "foreground": "$media:16777218" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/startIcon.png b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..a31c7f86b9157290e9278a80f48ff93b61b5a60d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/media/startIcon.png differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/profile/backup_config.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..78f40ae7c494d71e2482278f359ec790ca73471a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/profile/main_pages.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..0aafd427b62fa962f23be5292ea0429737e5aa86 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/res/default/resources/base/profile/main_pages.json @@ -0,0 +1,35 @@ +{ + "src": [ + "pages/Index", + "pages/componentstatemigration/StateEasyV1", + "pages/componentstatemigration/StateEasyV2", + "pages/componentstatemigration/StateComplexV1", + "pages/componentstatemigration/StateComplexV2", + "pages/componentstatemigration/StateExternalInitializationV1", + "pages/componentstatemigration/StateExternalInitializationV2", + "pages/componentstatemigration/LinkMiigrationV1", + "pages/componentstatemigration/LinkMiigrationV2", + "pages/componentstatemigration/PropEasyV1", + "pages/componentstatemigration/PropEasyV2", + "pages/componentstatemigration/PropComplexV1", + "pages/componentstatemigration/PropComplexV2", + "pages/componentstatemigration/PropSubComponentUpdateVarV1", + "pages/componentstatemigration/PropSubComponentUpdateVarV2", + "pages/componentstatemigration/PropSubComponentUpdateVarLocalV1", + "pages/componentstatemigration/PropSubComponentUpdateVarLocalV2", + "pages/componentstatemigration/ProvideAliasV1", + "pages/componentstatemigration/ProvideAliasV2", + "pages/componentstatemigration/ProvideConsumeNoInitV1", + "pages/componentstatemigration/ProvideConsumeInitV2", + "pages/componentstatemigration/ProvideParentInitV1", + "pages/componentstatemigration/ProvideParentNoInitV2", + "pages/componentstatemigration/ProvideNoAllowOverrideV1", + "pages/componentstatemigration/ProvideAllowOverrideV2", + "pages/componentstatemigration/WatchSingleVarV1", + "pages/componentstatemigration/WatchSingleVarV2", + "pages/componentstatemigration/WatchMoreVarV1", + "pages/componentstatemigration/WatchMoreVarV2", + "pages/componentstatemigration/ComputedV1", + "pages/componentstatemigration/ComputedV2" + ] +} diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/router_map/default/loader-router-map.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/router_map/default/loader-router-map.json new file mode 100644 index 0000000000000000000000000000000000000000..0ec611b0f7ae29df1d089f3bb60294150b4e0a4d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/router_map/default/loader-router-map.json @@ -0,0 +1 @@ +{"routerMap":[]} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/router_map/default/temp-router-map.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/router_map/default/temp-router-map.json new file mode 100644 index 0000000000000000000000000000000000000000..0ec611b0f7ae29df1d089f3bb60294150b4e0a4d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/router_map/default/temp-router-map.json @@ -0,0 +1 @@ +{"routerMap":[]} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/share_config/default/temp-share-config.json b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/share_config/default/temp-share-config.json new file mode 100644 index 0000000000000000000000000000000000000000..2a514991fa3df1a64c50845026d4e63e7c86cdd0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/share_config/default/temp-share-config.json @@ -0,0 +1 @@ +{"crossAppSharedConfig":[]} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/source_map/default/sourceMaps.map b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/source_map/default/sourceMaps.map new file mode 100644 index 0000000000000000000000000000000000000000..c4f2e45d79528456d9816dc3e92be1c3d9720f67 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/intermediates/source_map/default/sourceMaps.map @@ -0,0 +1,365 @@ +{ + "entry|entry|1.0.0|src/main/ets/entryability/EntryAbility.ts": { + "version": 3, + "file": "EntryAbility.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/entryability/EntryAbility.ets" + ], + "names": [], + "mappings": "YAcS,eAAe;OAAE,qBAAqB;OAAE,SAAS;YAAE,IAAI;OACvD,KAAK;YACL,MAAM;AAEf,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IACjD,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,CAAC,WAAW,GAAG,IAAI;QAClE,IAAI;YACF,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;SACvG;QAAC,OAAO,GAAG,EAAE;YACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,4CAA4C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;SACnG;QACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,IAAI,IAAI;QACf,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC;IACnE,CAAC;IAED,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI;QACxD,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,6BAA6B,CAAC,CAAC;QAE3E,WAAW,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;YAC7C,IAAI,GAAG,CAAC,IAAI,EAAE;gBACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,+CAA+C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;gBACrG,OAAO;aACR;YACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,mCAAmC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,IAAI,IAAI;QAC1B,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,8BAA8B,CAAC,CAAC;IAC9E,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,oCAAoC;QACpC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,iCAAiC;QACjC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;CACF", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/entrybackupability/EntryBackupAbility.ts": { + "version": 3, + "file": "EntryBackupAbility.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/entrybackupability/EntryBackupAbility.ets" + ], + "names": [], + "mappings": "OAcS,KAAK;OACL,sBAAsB;cAAE,aAAa,IAAb,aAAa;AAE9C,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,sBAAsB;IACpE,KAAK,CAAC,QAAQ;QACZ,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAC7C,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa;QAC1C,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,yBAAyB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;QACxF,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACF", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV1.ts": { + "version": 3, + "file": "ComputedV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ComputedV1.ets" + ], + "names": [], + "mappings": ";;;;IAkBS,SAAS,GAAE,MAAM;IACjB,QAAQ,GAAE,MAAM;;MAFlB,MAAM;IAFb;;;;;wDAG6B,IAAI;uDACL,KAAK;;;KAnBjC;;;;;;;;;;;;;;;;;;;;;IAkBE,8CAAkB,MAAM,EAAQ;QAAzB,SAAS;;;QAAT,SAAS,WAAE,MAAM;;;IACxB,6CAAiB,MAAM,EAAS;QAAzB,QAAQ;;;QAAR,QAAQ,WAAE,MAAM;;;IAEvB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS;;QAAzC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS;;QAAzC,IAAI;;YACJ,MAAM,iBAAC,kBAAkB;YAAzB,MAAM,CAAqB,OAAO,CAAC,GAAG,EAAE;gBACtC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;YACvB,CAAC;;QAFD,MAAM;QAHR,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV2.ts": { + "version": 3, + "file": "ComputedV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ComputedV2.ets" + ], + "names": [], + "mappings": ";;;MAiBO,MAAM;IAFb;;yBAG6B,IAAI;wBACL,KAAK;;KAnBjC;;yBAkB6B,IAAI;wBACL,KAAK;;;IAD/B,CAAC,KAAK;IAAC,SAAS,EAAE,MAAM,CAAQ;IAChC,CAAC,KAAK;IAAC,QAAQ,EAAE,MAAM,CAAS;IAEhC,CAAC,QAAQ;QACL,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC9C,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ;;QAAlB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ;;QAAlB,IAAI;;YACJ,MAAM,iBAAC,kBAAkB;YAAzB,MAAM,CAAqB,OAAO,CAAC,GAAG,EAAE;gBACtC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;YACvB,CAAC;;QAFD,MAAM;QAHR,MAAM;KAOP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts": { + "version": 3, + "file": "LinkMiigrationV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ets" + ], + "names": [], + "mappings": ";;;;IAkCS,KAAK,GAAE,MAAM;;;IAhBd,GAAG,GAAE,MAAM;;MAFZ,MAAM;IADb;;;;;;;;KAfA;;;;;;;;;;;;;IAiBE,gBAAgB;IAChB,6CAAW,MAAM,EAAC;QAAZ,GAAG;;;QAAH,GAAG,WAAE,MAAM;;;IAEjB;;YACE,MAAM;;;YACJ,IAAI,QAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAApC,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;MAKI,OAAO;IAFd;;;;;oDAGyB,EAAE;;;KAL1B;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAM;QAAnB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,IAAI,QAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,MAAM,OAAC,EAAE,GAAG,cAAY,EAAE;;;;4BAAjB,GAAG;;;;;;;;;;QAFd,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts": { + "version": 3, + "file": "LinkMiigrationV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,MAAM;IADb;;yEAGuB,CAAC;;;KAlBxB;;0EAkBuB,CAAC;;;IADtB,2BAA2B;IAC3B,CAAC,KAAK;IAHR,QAfA,CAkBS,GAAG,EAAE,MAAM,CAAK;IACvB,CAAC,KAAK;IAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAApC,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;;;;;;;;;MAKI,OAAO;IAFd;;qBAGyB,EAAE;;KAL1B;;qBAKwB,EAAE;;IAAzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAM;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,MAAM,OAAC,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE;;;;4BAA7C,GAAG,EAAE,IAAI,CAAC,KAAK;4BAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE;;;;;;;wBAA3C,GAAG,EAAE,IAAI,CAAC,KAAK;;;;;QAF1B,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV1.ts": { + "version": 3, + "file": "PropComplexV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ets" + ], + "names": [], + "mappings": ";;;;IA4CS,WAAW,GAAE,MAAM;;;IArBpB,KAAK,GAAE,MAAM;;AAvBrB;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,MAAM,MAAM;IACV,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;CAC5B;MAGM,OAAO;IADd;;;;;;;;KAFC;;;;kCAKO,KAAK;;;;;;;;;;IADX,+BAA+B;IAC/B,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,MAAM;;;YACJ,IAAI,QAAC,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAlD,IAAI;;YACJ,IAAI,QAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAApD,IAAI;;YACJ,MAAM,iBAAC,SAAS;YAAhB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,UAAU;YAAjB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP;;;;;MAKI,QAAQ;IAFf;;;;;0DAG+B,IAAI,MAAM,EAAE;;;KAL1C;;;;;;;;;;;;;;;;IAKC,gDAAoB,MAAM,EAAgB;QAAnC,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAzD,IAAI;;YACJ,IAAI,QAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAA3D,IAAI;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAAzB,KAAK,EAAE,IAAI,CAAC,WAAW;;;;;;;wBAAvB,KAAK,EAAE,IAAI,CAAC,WAAW;;;;;QAHnC,MAAM;KAKP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV2.ts": { + "version": 3, + "file": "PropComplexV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ets" + ], + "names": [], + "mappings": ";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,CAAC,UAAU;MACL,MAAM;IACV,CAAC,KAAK;IAAC,MAAM,CAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC,KAAK;IAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;IAElC,sBAAsB;IACtB,KAAK,IAAI,MAAM;QACb,IAAI,QAAQ,EAAE,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACpC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;MAGM,OAAO;IADd;;+EAEyB,IAAI,MAAM,EAAE;;KAJpC;;gFAIwB,IAAI,MAAM,EAAE;;IAAnC,CAAC,KAAK;IAhBR,QAfA,CA+BS,KAAK,EAAE,MAAM,CAAgB;IAEpC;;YACE,MAAM;;;YACJ,IAAI,QAAC,OAAO;;QAAZ,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,SAAS;YAAhB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,UAAU;YAAjB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;;QAHH,MAAM;QARR,MAAM;KAaP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;2BAG+B,IAAI,MAAM,EAAE;;KAL1C;;2BAK8B,IAAI,MAAM,EAAE;;IAAzC,CAAC,KAAK;IAAC,WAAW,EAAE,MAAM,CAAgB;IAE1C;;YACE,MAAM;;;YACJ,IAAI,QAAC,QAAQ;;QAAb,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAtC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE;;;;4BAAjC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;;;;;;;wBAA/B,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;;;;;QAJ3C,MAAM;KAMP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV1.ts": { + "version": 3, + "file": "PropEasyV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ets" + ], + "names": [], + "mappings": ";;;;;;IAiBQ,KAAK,GAAE,MAAM;;MADd,MAAM;IADb;;;;;;;;KAfA;;;;kCAiBQ,KAAK;;;;;;;;;;IAAX,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;MAKI,OAAO;IAFd;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;4CACJ,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADpB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV2.ts": { + "version": 3, + "file": "PropEasyV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;+EAEyB,CAAC;;KAjB1B;;gFAiByB,CAAC;;IAAxB,CAAC,KAAK;IAFR,QAfA,CAiBS,KAAK,EAAE,MAAM,CAAK;IAEzB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarLocalV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ets" + ], + "names": [], + "mappings": ";;;;IAkCS,KAAK,GAAE,MAAM;;;IAjBd,UAAU,GAAE,MAAM;;MADnB,OAAO;IADd;;;;;;;;KAfA;;;kCAiB6B,CAAC;;;;uCAAtB,UAAU;;;;;;;;;;IAAhB,oDAAkB,MAAM,EAAK;QAAvB,UAAU;;;QAAV,UAAU,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;YACJ,IAAI,QAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YAAzB,IAAI,CAAuB,QAAQ,CAAC,EAAE;;QAAtC,IAAI;;YACJ,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,6BAA6B;gBAC7B,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC;YACzB,CAAC;;QAJH,MAAM;QAFR,MAAM;KAQP;;;;;MAKI,QAAQ;IAFf;;;;;oDAGyB,EAAE;;;KAL1B;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAM;QAAnB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,+BAA+B;gBAC/B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAClB,CAAC;;QAJH,MAAM;;;;4CAKN,OAAO,OAAC,EAAE,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE;;;;4BAAxB,UAAU,EAAE,IAAI,CAAC,KAAK;;;;;;;wBAAtB,UAAU,EAAE,IAAI,CAAC,KAAK;;;;;QANlC,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarLocalV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ets" + ], + "names": [], + "mappings": ";;;OAeO,KAAK;AACZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAGnC,OAAO;IADd;;0BAE8B,CAAC;+EACN,CAAC;;KALgB;;0BAIZ,CAAC;gFACN,CAAC;;;IADxB,CAAC,KAAK;IAAC,UAAU,EAAE,MAAM,CAAK;IAC9B,CAAC,KAAK;IAPR,QAfA,CAsBS,KAAK,EAAE,MAAM,CAAK;IAEzB,CAAC,OAAO,CAAC,OAAO,CAAC;IACjB,aAAa,CAAC,GAAG,EAAE,QAAQ;QACzB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAC,GAAG,EAAC,+BAA+B,GAAG,CAAC,KAAK,EAAE,EAAE,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACnG,6DAA6D;QAC7D,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;IAC/B,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YAAzB,IAAI,CAAuB,QAAQ,CAAC,EAAE;;QAAtC,IAAI;;YACJ,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,6BAA6B;gBAC7B,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC;YACzB,CAAC;;QAJH,MAAM;QAFR,MAAM;KAQP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;qBAGyB,EAAE;;KAL1B;;qBAKwB,EAAE;;IAAzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAM;IAE1B;;YACE,MAAM;;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,+BAA+B;gBAC/B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAClB,CAAC;;QAJH,MAAM;;;;4CAKN,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;;;;4BAAnB,KAAK,EAAE,IAAI,CAAC,KAAK;;;;;;;wBAAjB,KAAK,EAAE,IAAI,CAAC,KAAK;;;;;QAN7B,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ets" + ], + "names": [], + "mappings": ";;;;;;IAkBQ,KAAK,GAAE,MAAM;;MAFd,OAAO;IADd;;;;;;;;KAfA;;;;kCAkBQ,KAAK;;;;;;;;;;IADX,iBAAiB;IACjB,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;MAKI,QAAQ;IAFf;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;+EAG+B,CAAC;;KAlBhC;;gFAkB+B,CAAC;;IAD9B,kCAAkC;IAClC,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,KAAK,EAAE,MAAM,CAAK;IAE/B;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts": { + "version": 3, + "file": "ProvideAliasV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ets" + ], + "names": [], + "mappings": ";;;;IAgCmB,OAAO,GAAE,MAAM;;;IAdf,YAAY,GAAE,MAAM;IAC5B,OAAO,GAAE,MAAM;;MAHnB,OAAO;IADd;;;;;qDAGW,MAAM;;;;KAlBjB;;;;;;;;;;;;;;;IAiBE,gCAAgC;IAChC,mDAA+B,MAAM,EAAC;QAArB,YAAY;;;QAAZ,YAAY,WAAE,MAAM;;;IACrC,8CAAkB,MAAM,EAAC;QAAhB,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,YAAY;;QAAtB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;QAFN,MAAM;KAIP;;;;;MAKI,QAAQ;IAFf;;;;;sDAGqC,aAAa;;;;;KALjD;;;;;;;;;;;;;;;;IAKC,4CAA0B,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAEhC;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts": { + "version": 3, + "file": "ProvideAliasV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;4BAG2C,SAAS;uBACpB,SAAS;;KAnBzC;;2CAkB2C,SAAS;sCACpB,SAAS;;IAFvC,oCAAoC;IACpC,CAAC,QAAQ,CAAC,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAa;IACnD,CAAC,QAAQ,EAAE;IAAC,OAAO,EAAE,MAAM,CAAa;IAExC;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,YAAY;;QAAtB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;QAFN,MAAM;KAIP;;;;;MAKI,QAAQ;IAFf;;uBAGsC,aAAa;;KALlD;;uBAKqC,aAAa;;IAAjD,CAAC,QAAQ,CAAC,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAiB;IAElD;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts": { + "version": 3, + "file": "ProvideAllowOverrideV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ets" + ], + "names": [], + "mappings": ";;;MAiBO,YAAY;IAFnB;;2BAGiD,EAAE;;KAlBnD;;2BAkBiD,EAAE;;IAAjD,CAAC,QAAQ,CAAC,aAAa,CAAC;IAAC,WAAW,EAAE,MAAM,CAAM;IAElD;;YACE,MAAM;;;;;4CACJ,QAAQ;;;;;;;;;;;;QADV,MAAM;KAGP;;;;;;;;MAII,QAAQ;IADf;;2BAGoC,EAAE;;KALrC;;2BAKmC,EAAE;;IADpC,4CAA4C;IAC5C,CAAC,QAAQ,EAAE;IAAC,WAAW,EAAE,MAAM,CAAM;IAErC;;;;4CACE,OAAO;;;;;;;;;;;;KACR;;;;;MAII,OAAO;IADd;;2BAEoC,CAAC;;KAJpC;;0CAImC,CAAC;;IAAnC,CAAC,QAAQ,EAAE;IAAC,WAAW,EAAE,MAAM,CAAK;IAEpC;;YACE,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;;QAAhC,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts": { + "version": 3, + "file": "ProvideConsumeInitV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;uBAGgC,aAAa;;KAlB7C;;sCAkBgC,aAAa;;IAD3C,2CAA2C;IAC3C,CAAC,QAAQ,EAAE;IAAC,OAAO,EAAE,MAAM,CAAiB;IAE5C;;YACE,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;KACL;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts": { + "version": 3, + "file": "ProvideConsumeNoInitV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ets" + ], + "names": [], + "mappings": ";;;;IA4BW,OAAO,GAAE,MAAM;;;IAVf,OAAO,GAAE,MAAM;;MAFnB,OAAO;IADd;;;;;;;;KAfA;;;;;;;;;;;;;IAiBE,uCAAuC;IACvC,8CAAkB,MAAM,EAAC;QAAhB,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;KACL;;;;;MAKI,QAAQ;IAFf;;;;;sDAG6B,aAAa;;;;KALzC;;;;;;;;;;;;;;;;IAKC,4CAAkB,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts": { + "version": 3, + "file": "ProvideNoAllowOverrideV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ets" + ], + "names": [], + "mappings": ";;;;IAuC0B,WAAW,GAAE,MAAM;;;IATA,WAAW,GAAE,MAAM;;;IAZtC,WAAW,GAAE,MAAM;;MADtC,YAAY;IAFnB;;;;;0DAGgD,EAAE;;;;KAlBlD;;;;;;;;;;;;;;;;IAkBE,gDAAqC,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE3C;;YACE,MAAM;;;;;4CACJ,QAAQ;;;;;;;;;;;;QADV,MAAM;KAGP;;;;;;;;MAII,QAAQ;IADf;;;;;0DAGmE,EAAE;4BAAzC,aAAa;;;KALxC;;;;;;;;;;;;;;;;IAIC,yCAAyC;IACzC,gDAAwD,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE9D;;;;4CACE,OAAO;;;;;;;;;;;;KACR;;;;;MAII,OAAO;IADd;;;;;oDAEW,aAAa;;;KAJvB;;;;;;;;;;;;;IAIC,kDAAqC,MAAM,EAAC;QAApB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE3C;;YACE,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;;QAAhC,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts": { + "version": 3, + "file": "ProvideParentInitV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ets" + ], + "names": [], + "mappings": ";;;;IA8BW,UAAU,GAAE,MAAM;;;IAZpB,WAAW,GAAE,MAAM;;MADrB,QAAQ;IAFf;;;;;0DAG+B,EAAE;;;KAlBjC;;;;;;;;;;;;;;;;IAkBE,gDAAoB,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE1B;;YACE,MAAM;;;;;;oBACJ,oBAAoB;oBACpB,OAAO,OAAC,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAA9B,UAAU,EAAE,IAAI,CAAC,WAAW;;;;;;;;;;QAFxC,MAAM;KAIP;;;;;;;;MAII,OAAO;IADd;;;;;yDAEgC,CAAC;;;;KAJhC;;;;;;;;;;;;;;;;IAIC,+CAAqB,MAAM,EAAK;QAAvB,UAAU;;;QAAV,UAAU,WAAE,MAAM;;;IAE3B;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;QAA/B,IAAI;QADN,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts": { + "version": 3, + "file": "ProvideParentNoInitV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ets" + ], + "names": [], + "mappings": ";;;MAiBO,QAAQ;IAFf;;2BAG+B,EAAE;;KAlBjC;;2BAkB+B,EAAE;;IAA/B,CAAC,KAAK;IAAC,WAAW,EAAE,MAAM,CAAM;IAEhC;;YACE,MAAM;;;;;;oBACJ,mDAAmD;oBACnD,OAAO,OAAC,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAAhC,YAAY,EAAE,IAAI,CAAC,WAAW;;;;;;;wBAA9B,YAAY,EAAE,IAAI,CAAC,WAAW;;;;;QAF1C,MAAM;KAIP;;;;;;;;MAII,OAAO;IADd;;oGAEsC,CAAC;0BACJ,IAAI,CAAC,YAAY;;KALnD;;qGAIqC,CAAC;0BACJ,IAAI,CAAC,YAAY;;IADlD,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,YAAY,EAAE,MAAM,CAAK;IACtC,CAAC,QAAQ,EAAE;IAAC,UAAU,EAAE,MAAM,CAAqB;IAEnD;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;QAA/B,IAAI;QADN,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV1.ts": { + "version": 3, + "file": "StateComplexV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ets" + ], + "names": [], + "mappings": ";;;;IAsBS,KAAK,GAAE,MAAM;;AAtBtB;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,MAAM,MAAM;IACV,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC;CAC3B;MAIM,QAAQ;IAFf;;;;;oDAGyB,IAAI,MAAM,EAAE;;;KALpC;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAgB;QAA7B,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,kBAAkB;YAClB,MAAM,iBAAC,SAAS;YADhB,kBAAkB;YAClB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAErB,CAAC;;QALH,kBAAkB;QAClB,MAAM;QAHR,MAAM;KASP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV2.ts": { + "version": 3, + "file": "StateComplexV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ets" + ], + "names": [], + "mappings": ";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,CAAC,UAAU;MACL,MAAM;IACV,CAAC,KAAK;IAAC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC;CAClC;MAIM,QAAQ;IAFf;;qBAGyB,IAAI,MAAM,EAAE;;KALpC;;qBAKwB,IAAI,MAAM,EAAE;;IAAnC,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAgB;IAEpC;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,4CAA4C;YAC5C,MAAM,iBAAC,SAAS;YADhB,4CAA4C;YAC5C,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAJH,4CAA4C;QAC5C,MAAM;QAHR,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV1.ts": { + "version": 3, + "file": "StateEasyV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ets" + ], + "names": [], + "mappings": ";;;;IAkBS,GAAG,GAAE,MAAM;;MADb,MAAM;IAFb;;;;;kDAGuB,EAAE;;;KAlBzB;;;;;;;;;;;;;;;;IAkBE,wCAAY,MAAM,EAAM;QAAjB,GAAG;;;QAAH,GAAG,WAAE,MAAM;;;IAElB;;YACE,IAAI,QAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAAxB,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV2.ts": { + "version": 3, + "file": "StateEasyV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ets" + ], + "names": [], + "mappings": ";;;MAkBO,MAAM;IAFb;;mBAGuB,EAAE;;KAnBzB;;mBAmBuB,EAAE;;IAAvB,CAAC,KAAK;IAAC,GAAG,EAAE,MAAM,CAAM;IAExB;;YACE,IAAI,QAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAAxB,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts": { + "version": 3, + "file": "StateExternalInitializationV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ets" + ], + "names": [], + "mappings": ";;;;;;IAiBS,KAAK,GAAE,MAAM;;MADf,MAAM;IADb;;;;;oDAEyB,CAAC;;;KAjB1B;;;;;;;;;;;;;;;;IAiBE,0CAAc,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;MAKI,OAAO;IAFd;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;;oBACJ,iBAAiB;oBACjB,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;;;;QAFpB,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts": { + "version": 3, + "file": "StateExternalInitializationV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,MAAM;IADb;;+EAE+B,CAAC;;KAjBhC;;gFAiB+B,CAAC;;IAA9B,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,KAAK,EAAE,MAAM,CAAK;IAE/B;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;;;;;;;;;MAKI,OAAO;IAFd;;;KAFC;;;IAKC;;YACE,MAAM;;;;;;oBACJ,qCAAqC;oBACrC,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QAFpB,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts": { + "version": 3, + "file": "WatchMoreVarV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ets" + ], + "names": [], + "mappings": ";;;;IAuBiC,KAAK,GAAE,MAAM;IACZ,MAAM,GAAE,MAAM;;OATzC,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,aAAa;IAFpB;;;;;oDAGiD,CAAC;qDACC,CAAC;;;;;KANV;;;;;;;;;;;;;;;;;;;;;IAKxC,0CAAsC,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAC5C,2CAAwC,MAAM,EAAK;QAAnB,MAAM;;;QAAN,MAAM,WAAE,MAAM;;;IAE9C,+BAA+B;IAC/B,aAAa,IAAI,IAAI;QACnB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAED,cAAc,IAAI,IAAI;QACpB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,IAAI,QAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE;;QAAnC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts": { + "version": 3, + "file": "WatchMoreVarV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ets" + ], + "names": [], + "mappings": ";;;OAeO,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,eAAe;IAFtB;;qBAGyB,CAAC;sBACA,CAAC;;KANe;;qBAKjB,CAAC;sBACA,CAAC;;;IADzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAK;IACzB,CAAC,KAAK;IAAC,MAAM,EAAE,MAAM,CAAK;IAE1B,gCAAgC;IAChC,CAAC,OAAO,CAAC,OAAO,EAAC,QAAQ,CAAC;IAC1B,aAAa,CAAC,OAAO,EAAE,QAAQ;QAC7B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;YACrC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,iBAAiB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAChH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,IAAI,QAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE;;QAAnC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts": { + "version": 3, + "file": "WatchSingleVarV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ets" + ], + "names": [], + "mappings": ";;;;IAuBiC,KAAK,GAAE,MAAM;;OARvC,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,aAAa;IAFpB;;;;;oDAGiD,CAAC;;;;KALR;;;;;;;;;;;;;;;;IAKxC,0CAAsC,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAE5C,aAAa,IAAI,IAAI;QACnB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts": { + "version": 3, + "file": "WatchSingleVarV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ets" + ], + "names": [], + "mappings": ";;;OAeO,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,eAAe;IAFtB;;qBAGyB,CAAC;;KALgB;;qBAKjB,CAAC;;;IAAxB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAK;IAEzB,CAAC,OAAO,CAAC,OAAO,CAAC;IACjB,aAAa,CAAC,OAAO,EAAE,QAAQ;QAC7B,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,sBAAsB,OAAO,CAAC,KAAK,EAAE,EAAE,MAAM,OAAO,OAAO,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/Index.ts": { + "version": 3, + "file": "Index.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/Index.ets" + ], + "names": [], + "mappings": ";;;;IAmJS,OAAO,GAAE,aAAa;;AAnJ/B;;;;;;;;;;;;;GAaG;AAEH,UAAU,QAAQ;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,IAAI,UAAU,EAAE,QAAQ,EAAE,GAAG;IAC3B;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,2CAA2C;KACpD;IACD;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,2CAA2C;KACpD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,6DAA6D;KACtE;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,6DAA6D;KACtE;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,6CAA6C;KACtD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,6CAA6C;KACtD;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,2DAA2D;KACpE;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,2DAA2D;KACpE;IACD;QACE,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,gEAAgE;KACzE;IACD;QACE,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,gEAAgE;KACzE;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,MAAM,EAAE,sDAAsD;KAC/D;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,oDAAoD;KAC7D;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,mDAAmD;KAC5D;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE,qDAAqD;KAC9D;IACD;QACE,IAAI,EAAE,0BAA0B;QAChC,MAAM,EAAE,wDAAwD;KACjE;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,MAAM,EAAE,sDAAsD;KAC/D;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;CACF,CAAA;MAIM,KAAK;IAFZ;;;;;sDAGkC,SAAS;;;KAL1C;;;;;;;;;;;;;;;;IAKC,4CAAgB,aAAa,EAAa;QAAnC,OAAO;;;QAAP,OAAO,WAAE,aAAa;;;IAE7B;;YACE,MAAM;;;YACJ,IAAI;YAAJ,IAAI,CACD,MAAM,CAAC,IAAI;YADd,IAAI,CAED,KAAK,CAAC,MAAM;YAFf,IAAI,CAGD,SAAS,CAAC,SAAS,CAAC,MAAM;YAH7B,IAAI,CAID,QAAQ,CAAC,EAAE;YAJd,IAAI,CAKD,UAAU,CAAC,UAAU,CAAC,IAAI;YAL7B,IAAI,CAMD,eAAe,6BAAC,IAAI,CAAC,OAAO;YAN/B,IAAI,CAOD,SAAS,CAAC,KAAK,CAAC,KAAK;;QAPxB,IAAI;;YASJ,MAAM;YAAN,MAAM,CA+BL,KAAK,CAAC,MAAM;YA/Bb,MAAM,CAiCL,eAAe,CAAC,WAAW;YAjC5B,MAAM,CAkCL,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;;;YAjCjB,IAAI,QAAC,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE;YAAnC,IAAI,CAiBH,aAAa,CAAC,IAAI,CAAC,QAAQ;YAjB5B,IAAI,CAkBH,SAAS,CAAC,QAAQ,CAAC,GAAG;YAlBvB,IAAI,CAmBH,QAAQ,CAAC,GAAG;YAnBb,IAAI,CAoBH,OAAO,CAAC;gBACP,WAAW,EAAE,CAAC;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,EAAE;gBACf,SAAS,EAAE,EAAE;aACd;YAzBD,IAAI,CA0BH,UAAU,CAAC,UAAU,CAAC,MAAM;YA1B7B,IAAI,CA2BH,gBAAgB,CAAC,EAAE;YA3BpB,IAAI,CA4BH,KAAK,CAAC,KAAK;;;YA3BV,OAAO;mDAAkC,KAAK,EAAE,MAAM;;;;;;;4BACpD,QAAQ;;;;;;;;;;4BACN,MAAM;4BAAN,MAAM,CAML,OAAO,CAAC,GAAG,EAAE;gCACZ,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE;oCACrB,IAAI,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;iCAClE;4BACH,CAAC;;;4BATC,IAAI,QAAC,QAAQ,CAAC,IAAI;4BAAlB,IAAI,CACD,QAAQ,CAAC,EAAE;4BADd,IAAI,CAED,SAAS,6BAAC,IAAI,CAAC,OAAO;4BAFzB,IAAI,CAGD,QAAQ,CAAC,CAAC;;wBAHb,IAAI;wBADN,MAAM;wBADR,QAAQ;;;oBAAR,QAAQ;;;+CADF,UAAU;;QAAlB,OAAO;QADT,IAAI;QADN,MAAM;QAVR,MAAM;KA8CP", + "entry-package-info": "entry|1.0.0" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/outputs/default/entry-default-unsigned.hap b/ArkUIKit/StateMigrationProject/entry/build/default/outputs/default/entry-default-unsigned.hap new file mode 100644 index 0000000000000000000000000000000000000000..276d2ef0a31f39218276969625f446f3c1c7ec85 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/build/default/outputs/default/entry-default-unsigned.hap differ diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/outputs/default/mapping/sourceMaps.map b/ArkUIKit/StateMigrationProject/entry/build/default/outputs/default/mapping/sourceMaps.map new file mode 100644 index 0000000000000000000000000000000000000000..c4f2e45d79528456d9816dc3e92be1c3d9720f67 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/outputs/default/mapping/sourceMaps.map @@ -0,0 +1,365 @@ +{ + "entry|entry|1.0.0|src/main/ets/entryability/EntryAbility.ts": { + "version": 3, + "file": "EntryAbility.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/entryability/EntryAbility.ets" + ], + "names": [], + "mappings": "YAcS,eAAe;OAAE,qBAAqB;OAAE,SAAS;YAAE,IAAI;OACvD,KAAK;YACL,MAAM;AAEf,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS;IACjD,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,eAAe,CAAC,WAAW,GAAG,IAAI;QAClE,IAAI;YACF,IAAI,CAAC,OAAO,CAAC,qBAAqB,EAAE,CAAC,YAAY,CAAC,qBAAqB,CAAC,SAAS,CAAC,kBAAkB,CAAC,CAAC;SACvG;QAAC,OAAO,GAAG,EAAE;YACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,4CAA4C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;SACnG;QACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,CAAC,CAAC;IAClE,CAAC;IAED,SAAS,IAAI,IAAI;QACf,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC;IACnE,CAAC;IAED,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,WAAW,GAAG,IAAI;QACxD,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,6BAA6B,CAAC,CAAC;QAE3E,WAAW,CAAC,WAAW,CAAC,aAAa,EAAE,CAAC,GAAG,EAAE,EAAE;YAC7C,IAAI,GAAG,CAAC,IAAI,EAAE;gBACZ,KAAK,CAAC,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,+CAA+C,EAAE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC;gBACrG,OAAO;aACR;YACD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,mCAAmC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACL,CAAC;IAED,oBAAoB,IAAI,IAAI;QAC1B,yDAAyD;QACzD,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,8BAA8B,CAAC,CAAC;IAC9E,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,oCAAoC;QACpC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;IAED,YAAY,IAAI,IAAI;QAClB,iCAAiC;QACjC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,CAAC,CAAC;IACtE,CAAC;CACF", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/entrybackupability/EntryBackupAbility.ts": { + "version": 3, + "file": "EntryBackupAbility.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/entrybackupability/EntryBackupAbility.ets" + ], + "names": [], + "mappings": "OAcS,KAAK;OACL,sBAAsB;cAAE,aAAa,IAAb,aAAa;AAE9C,MAAM,MAAM,GAAG,MAAM,CAAC;AAEtB,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,sBAAsB;IACpE,KAAK,CAAC,QAAQ;QACZ,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QAC7C,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,aAAa,EAAE,aAAa;QAC1C,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,yBAAyB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;QACxF,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAC1B,CAAC;CACF", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV1.ts": { + "version": 3, + "file": "ComputedV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ComputedV1.ets" + ], + "names": [], + "mappings": ";;;;IAkBS,SAAS,GAAE,MAAM;IACjB,QAAQ,GAAE,MAAM;;MAFlB,MAAM;IAFb;;;;;wDAG6B,IAAI;uDACL,KAAK;;;KAnBjC;;;;;;;;;;;;;;;;;;;;;IAkBE,8CAAkB,MAAM,EAAQ;QAAzB,SAAS;;;QAAT,SAAS,WAAE,MAAM;;;IACxB,6CAAiB,MAAM,EAAS;QAAzB,QAAQ;;;QAAR,QAAQ,WAAE,MAAM;;;IAEvB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS;;QAAzC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS;;QAAzC,IAAI;;YACJ,MAAM,iBAAC,kBAAkB;YAAzB,MAAM,CAAqB,OAAO,CAAC,GAAG,EAAE;gBACtC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;YACvB,CAAC;;QAFD,MAAM;QAHR,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ComputedV2.ts": { + "version": 3, + "file": "ComputedV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ComputedV2.ets" + ], + "names": [], + "mappings": ";;;MAiBO,MAAM;IAFb;;yBAG6B,IAAI;wBACL,KAAK;;KAnBjC;;yBAkB6B,IAAI;wBACL,KAAK;;;IAD/B,CAAC,KAAK;IAAC,SAAS,EAAE,MAAM,CAAQ;IAChC,CAAC,KAAK;IAAC,QAAQ,EAAE,MAAM,CAAS;IAEhC,CAAC,QAAQ;QACL,QAAQ;QACV,OAAO,IAAI,CAAC,SAAS,GAAG,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC;IAC9C,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ;;QAAlB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,QAAQ;;QAAlB,IAAI;;YACJ,MAAM,iBAAC,kBAAkB;YAAzB,MAAM,CAAqB,OAAO,CAAC,GAAG,EAAE;gBACtC,IAAI,CAAC,QAAQ,IAAI,GAAG,CAAC;YACvB,CAAC;;QAFD,MAAM;QAHR,MAAM;KAOP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ts": { + "version": 3, + "file": "LinkMiigrationV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ets" + ], + "names": [], + "mappings": ";;;;IAkCS,KAAK,GAAE,MAAM;;;IAhBd,GAAG,GAAE,MAAM;;MAFZ,MAAM;IADb;;;;;;;;KAfA;;;;;;;;;;;;;IAiBE,gBAAgB;IAChB,6CAAW,MAAM,EAAC;QAAZ,GAAG;;;QAAH,GAAG,WAAE,MAAM;;;IAEjB;;YACE,MAAM;;;YACJ,IAAI,QAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAApC,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,GAAG,EAAE,CAAC;YACb,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;MAKI,OAAO;IAFd;;;;;oDAGyB,EAAE;;;KAL1B;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAM;QAAnB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,IAAI,QAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,MAAM,OAAC,EAAE,GAAG,cAAY,EAAE;;;;4BAAjB,GAAG;;;;;;;;;;QAFd,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ts": { + "version": 3, + "file": "LinkMiigrationV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,MAAM;IADb;;yEAGuB,CAAC;;;KAlBxB;;0EAkBuB,CAAC;;;IADtB,2BAA2B;IAC3B,CAAC,KAAK;IAHR,QAfA,CAkBS,GAAG,EAAE,MAAM,CAAK;IACvB,CAAC,KAAK;IAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAApC,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;;;;;;;;;MAKI,OAAO;IAFd;;qBAGyB,EAAE;;KAL1B;;qBAKwB,EAAE;;IAAzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAM;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,MAAM,OAAC,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE;;;;4BAA7C,GAAG,EAAE,IAAI,CAAC,KAAK;4BAAE,MAAM,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE;;;;;;;wBAA3C,GAAG,EAAE,IAAI,CAAC,KAAK;;;;;QAF1B,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV1.ts": { + "version": 3, + "file": "PropComplexV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ets" + ], + "names": [], + "mappings": ";;;;IA4CS,WAAW,GAAE,MAAM;;;IArBpB,KAAK,GAAE,MAAM;;AAvBrB;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,MAAM,MAAM;IACV,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IACzB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;CAC5B;MAGM,OAAO;IADd;;;;;;;;KAFC;;;;kCAKO,KAAK;;;;;;;;;;IADX,+BAA+B;IAC/B,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,MAAM;;;YACJ,IAAI,QAAC,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAlD,IAAI;;YACJ,IAAI,QAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAApD,IAAI;;YACJ,MAAM,iBAAC,SAAS;YAAhB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,UAAU;YAAjB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP;;;;;MAKI,QAAQ;IAFf;;;;;0DAG+B,IAAI,MAAM,EAAE;;;KAL1C;;;;;;;;;;;;;;;;IAKC,gDAAoB,MAAM,EAAgB;QAAnC,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE1B;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAzD,IAAI;;YACJ,IAAI,QAAC,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAA3D,IAAI;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAAzB,KAAK,EAAE,IAAI,CAAC,WAAW;;;;;;;wBAAvB,KAAK,EAAE,IAAI,CAAC,WAAW;;;;;QAHnC,MAAM;KAKP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropComplexV2.ts": { + "version": 3, + "file": "PropComplexV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ets" + ], + "names": [], + "mappings": ";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,CAAC,UAAU;MACL,MAAM;IACV,CAAC,KAAK;IAAC,MAAM,CAAE,KAAK,EAAE,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC,KAAK;IAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,EAAE,CAAC;IAElC,sBAAsB;IACtB,KAAK,IAAI,MAAM;QACb,IAAI,QAAQ,EAAE,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;QACpC,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC5B,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;QAC9B,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;MAGM,OAAO;IADd;;+EAEyB,IAAI,MAAM,EAAE;;KAJpC;;gFAIwB,IAAI,MAAM,EAAE;;IAAnC,CAAC,KAAK;IAhBR,QAfA,CA+BS,KAAK,EAAE,MAAM,CAAgB;IAEpC;;YACE,MAAM;;;YACJ,IAAI,QAAC,OAAO;;QAAZ,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,SAAS;YAAhB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,UAAU;YAAjB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;;QAHH,MAAM;QARR,MAAM;KAaP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;2BAG+B,IAAI,MAAM,EAAE;;KAL1C;;2BAK8B,IAAI,MAAM,EAAE;;IAAzC,CAAC,KAAK;IAAC,WAAW,EAAE,MAAM,CAAgB;IAE1C;;YACE,MAAM;;;YACJ,IAAI,QAAC,QAAQ;;QAAb,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAtC,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE;;QAAvC,IAAI;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE;;;;4BAAjC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;;;;;;;wBAA/B,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE;;;;;QAJ3C,MAAM;KAMP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV1.ts": { + "version": 3, + "file": "PropEasyV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ets" + ], + "names": [], + "mappings": ";;;;;;IAiBQ,KAAK,GAAE,MAAM;;MADd,MAAM;IADb;;;;;;;;KAfA;;;;kCAiBQ,KAAK;;;;;;;;;;IAAX,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;MAKI,OAAO;IAFd;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;4CACJ,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADpB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropEasyV2.ts": { + "version": 3, + "file": "PropEasyV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;+EAEyB,CAAC;;KAjB1B;;gFAiByB,CAAC;;IAAxB,CAAC,KAAK;IAFR,QAfA,CAiBS,KAAK,EAAE,MAAM,CAAK;IAEzB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarLocalV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ets" + ], + "names": [], + "mappings": ";;;;IAkCS,KAAK,GAAE,MAAM;;;IAjBd,UAAU,GAAE,MAAM;;MADnB,OAAO;IADd;;;;;;;;KAfA;;;kCAiB6B,CAAC;;;;uCAAtB,UAAU;;;;;;;;;;IAAhB,oDAAkB,MAAM,EAAK;QAAvB,UAAU;;;QAAV,UAAU,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;YACJ,IAAI,QAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YAAzB,IAAI,CAAuB,QAAQ,CAAC,EAAE;;QAAtC,IAAI;;YACJ,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,6BAA6B;gBAC7B,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC;YACzB,CAAC;;QAJH,MAAM;QAFR,MAAM;KAQP;;;;;MAKI,QAAQ;IAFf;;;;;oDAGyB,EAAE;;;KAL1B;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAM;QAAnB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,+BAA+B;gBAC/B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAClB,CAAC;;QAJH,MAAM;;;;4CAKN,OAAO,OAAC,EAAE,UAAU,EAAE,IAAI,CAAC,KAAK,EAAE;;;;4BAAxB,UAAU,EAAE,IAAI,CAAC,KAAK;;;;;;;wBAAtB,UAAU,EAAE,IAAI,CAAC,KAAK;;;;;QANlC,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarLocalV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ets" + ], + "names": [], + "mappings": ";;;OAeO,KAAK;AACZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAGnC,OAAO;IADd;;0BAE8B,CAAC;+EACN,CAAC;;KALgB;;0BAIZ,CAAC;gFACN,CAAC;;;IADxB,CAAC,KAAK;IAAC,UAAU,EAAE,MAAM,CAAK;IAC9B,CAAC,KAAK;IAPR,QAfA,CAsBS,KAAK,EAAE,MAAM,CAAK;IAEzB,CAAC,OAAO,CAAC,OAAO,CAAC;IACjB,aAAa,CAAC,GAAG,EAAE,QAAQ;QACzB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAC,GAAG,EAAC,+BAA+B,GAAG,CAAC,KAAK,EAAE,EAAE,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACnG,6DAA6D;QAC7D,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC;IAC/B,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,GAAG,IAAI,CAAC,UAAU,EAAE;YAAzB,IAAI,CAAuB,QAAQ,CAAC,EAAE;;QAAtC,IAAI;;YACJ,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,6BAA6B;gBAC7B,IAAI,CAAC,UAAU,IAAI,GAAG,CAAC;YACzB,CAAC;;QAJH,MAAM;QAFR,MAAM;KAQP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;qBAGyB,EAAE;;KAL1B;;qBAKwB,EAAE;;IAAzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAM;IAE1B;;YACE,MAAM;;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,+BAA+B;gBAC/B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC;YAClB,CAAC;;QAJH,MAAM;;;;4CAKN,OAAO,OAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;;;;4BAAnB,KAAK,EAAE,IAAI,CAAC,KAAK;;;;;;;wBAAjB,KAAK,EAAE,IAAI,CAAC,KAAK;;;;;QAN7B,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ets" + ], + "names": [], + "mappings": ";;;;;;IAkBQ,KAAK,GAAE,MAAM;;MAFd,OAAO;IADd;;;;;;;;KAfA;;;;kCAkBQ,KAAK;;;;;;;;;;IADX,iBAAiB;IACjB,+CAAa,MAAM,EAAC;QAAd,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEnB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;MAKI,QAAQ;IAFf;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ts": { + "version": 3, + "file": "PropSubComponentUpdateVarV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;+EAG+B,CAAC;;KAlBhC;;gFAkB+B,CAAC;;IAD9B,kCAAkC;IAClC,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,KAAK,EAAE,MAAM,CAAK;IAE/B;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;;YACJ,MAAM,iBAAC,IAAI;YAAX,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP;;;;;;;;;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QADrB,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV1.ts": { + "version": 3, + "file": "ProvideAliasV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ets" + ], + "names": [], + "mappings": ";;;;IAgCmB,OAAO,GAAE,MAAM;;;IAdf,YAAY,GAAE,MAAM;IAC5B,OAAO,GAAE,MAAM;;MAHnB,OAAO;IADd;;;;;qDAGW,MAAM;;;;KAlBjB;;;;;;;;;;;;;;;IAiBE,gCAAgC;IAChC,mDAA+B,MAAM,EAAC;QAArB,YAAY;;;QAAZ,YAAY,WAAE,MAAM;;;IACrC,8CAAkB,MAAM,EAAC;QAAhB,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,YAAY;;QAAtB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;QAFN,MAAM;KAIP;;;;;MAKI,QAAQ;IAFf;;;;;sDAGqC,aAAa;;;;;KALjD;;;;;;;;;;;;;;;;IAKC,4CAA0B,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAEhC;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAliasV2.ts": { + "version": 3, + "file": "ProvideAliasV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;4BAG2C,SAAS;uBACpB,SAAS;;KAnBzC;;2CAkB2C,SAAS;sCACpB,SAAS;;IAFvC,oCAAoC;IACpC,CAAC,QAAQ,CAAC,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAa;IACnD,CAAC,QAAQ,EAAE;IAAC,OAAO,EAAE,MAAM,CAAa;IAExC;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,YAAY;;QAAtB,IAAI;;YACJ,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;QAFN,MAAM;KAIP;;;;;MAKI,QAAQ;IAFf;;uBAGsC,aAAa;;KALlD;;uBAKqC,aAAa;;IAAjD,CAAC,QAAQ,CAAC,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAiB;IAElD;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ts": { + "version": 3, + "file": "ProvideAllowOverrideV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ets" + ], + "names": [], + "mappings": ";;;MAiBO,YAAY;IAFnB;;2BAGiD,EAAE;;KAlBnD;;2BAkBiD,EAAE;;IAAjD,CAAC,QAAQ,CAAC,aAAa,CAAC;IAAC,WAAW,EAAE,MAAM,CAAM;IAElD;;YACE,MAAM;;;;;4CACJ,QAAQ;;;;;;;;;;;;QADV,MAAM;KAGP;;;;;;;;MAII,QAAQ;IADf;;2BAGoC,EAAE;;KALrC;;2BAKmC,EAAE;;IADpC,4CAA4C;IAC5C,CAAC,QAAQ,EAAE;IAAC,WAAW,EAAE,MAAM,CAAM;IAErC;;;;4CACE,OAAO;;;;;;;;;;;;KACR;;;;;MAII,OAAO;IADd;;2BAEoC,CAAC;;KAJpC;;0CAImC,CAAC;;IAAnC,CAAC,QAAQ,EAAE;IAAC,WAAW,EAAE,MAAM,CAAK;IAEpC;;YACE,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;;QAAhC,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ts": { + "version": 3, + "file": "ProvideConsumeInitV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,OAAO;IADd;;uBAGgC,aAAa;;KAlB7C;;sCAkBgC,aAAa;;IAD3C,2CAA2C;IAC3C,CAAC,QAAQ,EAAE;IAAC,OAAO,EAAE,MAAM,CAAiB;IAE5C;;YACE,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;KACL;;;;;MAKI,QAAQ;IAFf;;;KAFC;;;IAKC;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ts": { + "version": 3, + "file": "ProvideConsumeNoInitV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ets" + ], + "names": [], + "mappings": ";;;;IA4BW,OAAO,GAAE,MAAM;;;IAVf,OAAO,GAAE,MAAM;;MAFnB,OAAO;IADd;;;;;;;;KAfA;;;;;;;;;;;;;IAiBE,uCAAuC;IACvC,8CAAkB,MAAM,EAAC;QAAhB,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,IAAI,QAAC,IAAI,CAAC,OAAO;;QAAjB,IAAI;KACL;;;;;MAKI,QAAQ;IAFf;;;;;sDAG6B,aAAa;;;;KALzC;;;;;;;;;;;;;;;;IAKC,4CAAkB,MAAM,EAAiB;QAAhC,OAAO;;;QAAP,OAAO,WAAE,MAAM;;;IAExB;;YACE,MAAM;;;;;4CACJ,OAAO;;;;;;;;;;;;QADT,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ts": { + "version": 3, + "file": "ProvideNoAllowOverrideV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ets" + ], + "names": [], + "mappings": ";;;;IAuC0B,WAAW,GAAE,MAAM;;;IATA,WAAW,GAAE,MAAM;;;IAZtC,WAAW,GAAE,MAAM;;MADtC,YAAY;IAFnB;;;;;0DAGgD,EAAE;;;;KAlBlD;;;;;;;;;;;;;;;;IAkBE,gDAAqC,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE3C;;YACE,MAAM;;;;;4CACJ,QAAQ;;;;;;;;;;;;QADV,MAAM;KAGP;;;;;;;;MAII,QAAQ;IADf;;;;;0DAGmE,EAAE;4BAAzC,aAAa;;;KALxC;;;;;;;;;;;;;;;;IAIC,yCAAyC;IACzC,gDAAwD,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE9D;;;;4CACE,OAAO;;;;;;;;;;;;KACR;;;;;MAII,OAAO;IADd;;;;;oDAEW,aAAa;;;KAJvB;;;;;;;;;;;;;IAIC,kDAAqC,MAAM,EAAC;QAApB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE3C;;YACE,IAAI,QAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE;;QAAhC,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ts": { + "version": 3, + "file": "ProvideParentInitV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ets" + ], + "names": [], + "mappings": ";;;;IA8BW,UAAU,GAAE,MAAM;;;IAZpB,WAAW,GAAE,MAAM;;MADrB,QAAQ;IAFf;;;;;0DAG+B,EAAE;;;KAlBjC;;;;;;;;;;;;;;;;IAkBE,gDAAoB,MAAM,EAAM;QAAzB,WAAW;;;QAAX,WAAW,WAAE,MAAM;;;IAE1B;;YACE,MAAM;;;;;;oBACJ,oBAAoB;oBACpB,OAAO,OAAC,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAA9B,UAAU,EAAE,IAAI,CAAC,WAAW;;;;;;;;;;QAFxC,MAAM;KAIP;;;;;;;;MAII,OAAO;IADd;;;;;yDAEgC,CAAC;;;;KAJhC;;;;;;;;;;;;;;;;IAIC,+CAAqB,MAAM,EAAK;QAAvB,UAAU;;;QAAV,UAAU,WAAE,MAAM;;;IAE3B;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;QAA/B,IAAI;QADN,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ts": { + "version": 3, + "file": "ProvideParentNoInitV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ets" + ], + "names": [], + "mappings": ";;;MAiBO,QAAQ;IAFf;;2BAG+B,EAAE;;KAlBjC;;2BAkB+B,EAAE;;IAA/B,CAAC,KAAK;IAAC,WAAW,EAAE,MAAM,CAAM;IAEhC;;YACE,MAAM;;;;;;oBACJ,mDAAmD;oBACnD,OAAO,OAAC,EAAE,YAAY,EAAE,IAAI,CAAC,WAAW,EAAE;;;;4BAAhC,YAAY,EAAE,IAAI,CAAC,WAAW;;;;;;;wBAA9B,YAAY,EAAE,IAAI,CAAC,WAAW;;;;;QAF1C,MAAM;KAIP;;;;;;;;MAII,OAAO;IADd;;oGAEsC,CAAC;0BACJ,IAAI,CAAC,YAAY;;KALnD;;qGAIqC,CAAC;0BACJ,IAAI,CAAC,YAAY;;IADlD,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,YAAY,EAAE,MAAM,CAAK;IACtC,CAAC,QAAQ,EAAE;IAAC,UAAU,EAAE,MAAM,CAAqB;IAEnD;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE;;QAA/B,IAAI;QADN,MAAM;KAGP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV1.ts": { + "version": 3, + "file": "StateComplexV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ets" + ], + "names": [], + "mappings": ";;;;IAsBS,KAAK,GAAE,MAAM;;AAtBtB;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,MAAM,MAAM;IACV,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC;CAC3B;MAIM,QAAQ;IAFf;;;;;oDAGyB,IAAI,MAAM,EAAE;;;KALpC;;;;;;;;;;;;;;;;IAKC,0CAAc,MAAM,EAAgB;QAA7B,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,kBAAkB;YAClB,MAAM,iBAAC,SAAS;YADhB,kBAAkB;YAClB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YAErB,CAAC;;QALH,kBAAkB;QAClB,MAAM;QAHR,MAAM;KASP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateComplexV2.ts": { + "version": 3, + "file": "StateComplexV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ets" + ], + "names": [], + "mappings": ";;;AAAA;;;;;;;;;;;;;GAaG;AACH,yBAAyB;AACzB,CAAC,UAAU;MACL,MAAM;IACV,CAAC,KAAK;IAAC,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,EAAE,CAAC;CAClC;MAIM,QAAQ;IAFf;;qBAGyB,IAAI,MAAM,EAAE;;KALpC;;qBAKwB,IAAI,MAAM,EAAE;;IAAnC,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAgB;IAEpC;;YACE,MAAM;;;YACJ,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAAhC,IAAI;;YACJ,4CAA4C;YAC5C,MAAM,iBAAC,SAAS;YADhB,4CAA4C;YAC5C,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;YACrB,CAAC;;QAJH,4CAA4C;QAC5C,MAAM;QAHR,MAAM;KAQP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV1.ts": { + "version": 3, + "file": "StateEasyV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ets" + ], + "names": [], + "mappings": ";;;;IAkBS,GAAG,GAAE,MAAM;;MADb,MAAM;IAFb;;;;;kDAGuB,EAAE;;;KAlBzB;;;;;;;;;;;;;;;;IAkBE,wCAAY,MAAM,EAAM;QAAjB,GAAG;;;QAAH,GAAG,WAAE,MAAM;;;IAElB;;YACE,IAAI,QAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAAxB,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateEasyV2.ts": { + "version": 3, + "file": "StateEasyV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ets" + ], + "names": [], + "mappings": ";;;MAkBO,MAAM;IAFb;;mBAGuB,EAAE;;KAnBzB;;mBAmBuB,EAAE;;IAAvB,CAAC,KAAK;IAAC,GAAG,EAAE,MAAM,CAAM;IAExB;;YACE,IAAI,QAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;;QAAxB,IAAI;KACL", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ts": { + "version": 3, + "file": "StateExternalInitializationV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ets" + ], + "names": [], + "mappings": ";;;;;;IAiBS,KAAK,GAAE,MAAM;;MADf,MAAM;IADb;;;;;oDAEyB,CAAC;;;KAjB1B;;;;;;;;;;;;;;;;IAiBE,0CAAc,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAEpB;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;MAKI,OAAO;IAFd;;;;;;;KAFC;;;;;;;;;;;IAKC;;YACE,MAAM;;;;;;oBACJ,iBAAiB;oBACjB,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;;;;QAFpB,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ts": { + "version": 3, + "file": "StateExternalInitializationV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ets" + ], + "names": [], + "mappings": ";;;MAgBO,MAAM;IADb;;+EAE+B,CAAC;;KAjBhC;;gFAiB+B,CAAC;;IAA9B,CAAC,KAAK;IAAC,CAAC,IAAI;IAAC,KAAK,EAAE,MAAM,CAAK;IAE/B;;YACE,IAAI,QAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE;;QAA1B,IAAI;KACL;;;;;;;;;;;;;MAKI,OAAO;IAFd;;;KAFC;;;IAKC;;YACE,MAAM;;;;;;oBACJ,qCAAqC;oBACrC,MAAM,OAAC,EAAE,KAAK,EAAE,EAAE,EAAE;;;;4BAAX,KAAK,EAAE,EAAE;;;;;;;wBAAT,KAAK,EAAE,EAAE;;;;;QAFpB,MAAM;KAIP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ts": { + "version": 3, + "file": "WatchMoreVarV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ets" + ], + "names": [], + "mappings": ";;;;IAuBiC,KAAK,GAAE,MAAM;IACZ,MAAM,GAAE,MAAM;;OATzC,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,aAAa;IAFpB;;;;;oDAGiD,CAAC;qDACC,CAAC;;;;;KANV;;;;;;;;;;;;;;;;;;;;;IAKxC,0CAAsC,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAC5C,2CAAwC,MAAM,EAAK;QAAnB,MAAM;;;QAAN,MAAM,WAAE,MAAM;;;IAE9C,+BAA+B;IAC/B,aAAa,IAAI,IAAI;QACnB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAED,cAAc,IAAI,IAAI;QACpB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,0BAA0B,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;IACpE,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,IAAI,QAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE;;QAAnC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ts": { + "version": 3, + "file": "WatchMoreVarV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ets" + ], + "names": [], + "mappings": ";;;OAeO,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,eAAe;IAFtB;;qBAGyB,CAAC;sBACA,CAAC;;KANe;;qBAKjB,CAAC;sBACA,CAAC;;;IADzB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAK;IACzB,CAAC,KAAK;IAAC,MAAM,EAAE,MAAM,CAAK;IAE1B,gCAAgC;IAChC,CAAC,OAAO,CAAC,OAAO,EAAC,QAAQ,CAAC;IAC1B,aAAa,CAAC,OAAO,EAAE,QAAQ;QAC7B,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE;YACrC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,iBAAiB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAChH,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,IAAI,QAAC,iBAAiB,IAAI,CAAC,MAAM,EAAE;;QAAnC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;;YAIN,MAAM,iBAAC,YAAY;YAAnB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,CAAC;;QAHH,MAAM;QAPR,MAAM;KAYP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ts": { + "version": 3, + "file": "WatchSingleVarV1.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ets" + ], + "names": [], + "mappings": ";;;;IAuBiC,KAAK,GAAE,MAAM;;OARvC,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,aAAa;IAFpB;;;;;oDAGiD,CAAC;;;;KALR;;;;;;;;;;;;;;;;IAKxC,0CAAsC,MAAM,EAAK;QAAlB,KAAK;;;QAAL,KAAK,WAAE,MAAM;;;IAE5C,aAAa,IAAI,IAAI;QACnB,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAClE,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ts": { + "version": 3, + "file": "WatchSingleVarV2.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ets" + ], + "names": [], + "mappings": ";;;OAeO,KAAK;AAEZ,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,GAAG,GAAG,6BAA6B,CAAC;MAInC,eAAe;IAFtB;;qBAGyB,CAAC;;KALgB;;qBAKjB,CAAC;;;IAAxB,CAAC,KAAK;IAAC,KAAK,EAAE,MAAM,CAAK;IAEzB,CAAC,OAAO,CAAC,OAAO,CAAC;IACjB,aAAa,CAAC,OAAO,EAAE,QAAQ;QAC7B,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,sBAAsB,OAAO,CAAC,KAAK,EAAE,EAAE,MAAM,OAAO,OAAO,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;IACtG,CAAC;IAED;;YACE,MAAM;;;YACJ,IAAI,QAAC,gBAAgB,IAAI,CAAC,KAAK,EAAE;;QAAjC,IAAI;;YACJ,MAAM,iBAAC,WAAW;YAAlB,MAAM,CACH,OAAO,CAAC,GAAG,EAAE;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC;;QAHH,MAAM;QAFR,MAAM;KAOP", + "entry-package-info": "entry|1.0.0" + }, + "entry|entry|1.0.0|src/main/ets/pages/Index.ts": { + "version": 3, + "file": "Index.ets", + "sourceRoot": "", + "sources": [ + "entry/src/main/ets/pages/Index.ets" + ], + "names": [], + "mappings": ";;;;IAmJS,OAAO,GAAE,aAAa;;AAnJ/B;;;;;;;;;;;;;GAaG;AAEH,UAAU,QAAQ;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,IAAI,UAAU,EAAE,QAAQ,EAAE,GAAG;IAC3B;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,2CAA2C;KACpD;IACD;QACE,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,2CAA2C;KACpD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,6DAA6D;KACtE;IACD;QACE,IAAI,EAAE,+BAA+B;QACrC,MAAM,EAAE,6DAA6D;KACtE;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,6CAA6C;KACtD;IACD;QACE,IAAI,EAAE,eAAe;QACrB,MAAM,EAAE,6CAA6C;KACtD;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,2DAA2D;KACpE;IACD;QACE,IAAI,EAAE,6BAA6B;QACnC,MAAM,EAAE,2DAA2D;KACpE;IACD;QACE,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,gEAAgE;KACzE;IACD;QACE,IAAI,EAAE,kCAAkC;QACxC,MAAM,EAAE,gEAAgE;KACzE;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,MAAM,EAAE,sDAAsD;KAC/D;IACD;QACE,IAAI,EAAE,sBAAsB;QAC5B,MAAM,EAAE,oDAAoD;KAC7D;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,MAAM,EAAE,mDAAmD;KAC5D;IACD;QACE,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE,qDAAqD;KAC9D;IACD;QACE,IAAI,EAAE,0BAA0B;QAChC,MAAM,EAAE,wDAAwD;KACjE;IACD;QACE,IAAI,EAAE,wBAAwB;QAC9B,MAAM,EAAE,sDAAsD;KAC/D;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,MAAM,EAAE,gDAAgD;KACzD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,gBAAgB;QACtB,MAAM,EAAE,8CAA8C;KACvD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;IACD;QACE,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,0CAA0C;KACnD;CACF,CAAA;MAIM,KAAK;IAFZ;;;;;sDAGkC,SAAS;;;KAL1C;;;;;;;;;;;;;;;;IAKC,4CAAgB,aAAa,EAAa;QAAnC,OAAO;;;QAAP,OAAO,WAAE,aAAa;;;IAE7B;;YACE,MAAM;;;YACJ,IAAI;YAAJ,IAAI,CACD,MAAM,CAAC,IAAI;YADd,IAAI,CAED,KAAK,CAAC,MAAM;YAFf,IAAI,CAGD,SAAS,CAAC,SAAS,CAAC,MAAM;YAH7B,IAAI,CAID,QAAQ,CAAC,EAAE;YAJd,IAAI,CAKD,UAAU,CAAC,UAAU,CAAC,IAAI;YAL7B,IAAI,CAMD,eAAe,6BAAC,IAAI,CAAC,OAAO;YAN/B,IAAI,CAOD,SAAS,CAAC,KAAK,CAAC,KAAK;;QAPxB,IAAI;;YASJ,MAAM;YAAN,MAAM,CA+BL,KAAK,CAAC,MAAM;YA/Bb,MAAM,CAiCL,eAAe,CAAC,WAAW;YAjC5B,MAAM,CAkCL,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE;;;YAjCjB,IAAI,QAAC,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE;YAAnC,IAAI,CAiBH,aAAa,CAAC,IAAI,CAAC,QAAQ;YAjB5B,IAAI,CAkBH,SAAS,CAAC,QAAQ,CAAC,GAAG;YAlBvB,IAAI,CAmBH,QAAQ,CAAC,GAAG;YAnBb,IAAI,CAoBH,OAAO,CAAC;gBACP,WAAW,EAAE,CAAC;gBACd,KAAK,EAAE,QAAQ;gBACf,WAAW,EAAE,EAAE;gBACf,SAAS,EAAE,EAAE;aACd;YAzBD,IAAI,CA0BH,UAAU,CAAC,UAAU,CAAC,MAAM;YA1B7B,IAAI,CA2BH,gBAAgB,CAAC,EAAE;YA3BpB,IAAI,CA4BH,KAAK,CAAC,KAAK;;;YA3BV,OAAO;mDAAkC,KAAK,EAAE,MAAM;;;;;;;4BACpD,QAAQ;;;;;;;;;;4BACN,MAAM;4BAAN,MAAM,CAML,OAAO,CAAC,GAAG,EAAE;gCACZ,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,EAAE;oCACrB,IAAI,CAAC,YAAY,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAA;iCAClE;4BACH,CAAC;;;4BATC,IAAI,QAAC,QAAQ,CAAC,IAAI;4BAAlB,IAAI,CACD,QAAQ,CAAC,EAAE;4BADd,IAAI,CAED,SAAS,6BAAC,IAAI,CAAC,OAAO;4BAFzB,IAAI,CAGD,QAAQ,CAAC,CAAC;;wBAHb,IAAI;wBADN,MAAM;wBADR,QAAQ;;;oBAAR,QAAQ;;;+CADF,UAAU;;QAAlB,OAAO;QADT,IAAI;QADN,MAAM;QAVR,MAAM;KA8CP", + "entry-package-info": "entry|1.0.0" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/build/default/outputs/default/pack.info b/ArkUIKit/StateMigrationProject/entry/build/default/outputs/default/pack.info new file mode 100644 index 0000000000000000000000000000000000000000..e7d00a0a1d2d5716f1e4197aab1ab0d08e2275d0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/build/default/outputs/default/pack.info @@ -0,0 +1 @@ +{"summary":{"app":{"bundleName":"com.samples.statemigrationproject","bundleType":"app","version":{"code":1000000,"name":"1.0.0"}},"modules":[{"mainAbility":"EntryAbility","deviceType":["default"],"abilities":[{"name":"EntryAbility","label":"$string:EntryAbility_label"}],"extensionAbilities":[{"name":"EntryBackupAbility","forms":[]}],"distro":{"moduleType":"entry","installationFree":false,"deliveryWithInstall":true,"moduleName":"entry"},"apiVersion":{"compatible":20,"releaseType":"Release","target":20}}]},"packages":[{"deviceType":["default"],"moduleType":"entry","deliveryWithInstall":true,"name":"entry-default"}]} diff --git a/ArkUIKit/StateMigrationProject/entry/hvigorfile.ts b/ArkUIKit/StateMigrationProject/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..f8b117a17af3b2d7cb87a7680e29e2bb8ccd5b46 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/hvigorfile.ts @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/obfuscation-rules.txt b/ArkUIKit/StateMigrationProject/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/oh-package.json5 b/ArkUIKit/StateMigrationProject/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..7101339c029488d56063666b6d40f444716d1537 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/oh-package.json5 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": { + // Lottie模块 + "@ohos/lottie": "^2.0.24" + } +} + diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/entryability/EntryAbility.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..98182799de1294d4c21194646a0c30eff08aea33 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + try { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + } catch (err) { + hilog.error(DOMAIN, 'testTag', 'Failed to set colorMode. Cause: %{public}s', JSON.stringify(err)); + } + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..4ce6449f0e91914e73d4502c9f2e8e9a395ea4b1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; + +const DOMAIN = 0x0000; + +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(DOMAIN, 'testTag', 'onBackup ok'); + await Promise.resolve(); + } + + async onRestore(bundleVersion: BundleVersion) { + hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + await Promise.resolve(); + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/Index.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..23f068941fce5e4c5f76cc656f52f6220788ac70 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,198 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +interface listItem { + router?: string; + name: string; + description?: string; +} + +let demandList: listItem[] = [ + { + name: 'StateEasyV1', + router: 'pages/componentstatemigration/StateEasyV1', + }, + { + name: 'StateEasyV2', + router: 'pages/componentstatemigration/StateEasyV2', + }, + { + name: 'StateComplexV1', + router: 'pages/componentstatemigration/StateComplexV1', + }, + { + name: 'StateComplexV2', + router: 'pages/componentstatemigration/StateComplexV2', + }, + { + name: 'StateExternalInitializationV1', + router: 'pages/componentstatemigration/StateExternalInitializationV1', + }, + { + name: 'StateExternalInitializationV2', + router: 'pages/componentstatemigration/StateExternalInitializationV2', + }, + { + name: 'LinkMiigrationV1', + router: 'pages/componentstatemigration/LinkMiigrationV1', + }, + { + name: 'LinkMiigrationV2', + router: 'pages/componentstatemigration/LinkMiigrationV2', + }, + { + name: 'PropEasyV1', + router: 'pages/componentstatemigration/PropEasyV1', + }, + { + name: 'PropEasyV2', + router: 'pages/componentstatemigration/PropEasyV2', + }, + { + name: 'PropComplexV1', + router: 'pages/componentstatemigration/PropComplexV1', + }, + { + name: 'PropComplexV2', + router: 'pages/componentstatemigration/PropComplexV2', + }, + { + name: 'PropSubComponentUpdateVarV1', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarV1', + }, + { + name: 'PropSubComponentUpdateVarV2', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarV2', + }, + { + name: 'PropSubComponentUpdateVarLocalV1', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV1', + }, + { + name: 'PropSubComponentUpdateVarLocalV2', + router: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV2', + }, + { + name: 'ProvideAliasV1', + router: 'pages/componentstatemigration/ProvideAliasV1', + }, + { + name: 'ProvideAliasV2', + router: 'pages/componentstatemigration/ProvideAliasV2', + }, + { + name: 'ProvideConsumeNoInitV1', + router: 'pages/componentstatemigration/ProvideConsumeNoInitV1', + }, + { + name: 'ProvideConsumeInitV2', + router: 'pages/componentstatemigration/ProvideConsumeInitV2', + }, + { + name: 'ProvideParentInitV1', + router: 'pages/componentstatemigration/ProvideParentInitV1', + }, + { + name: 'ProvideParentNoInitV2', + router: 'pages/componentstatemigration/ProvideParentNoInitV2', + }, + { + name: 'ProvideNoAllowOverrideV1', + router: 'pages/componentstatemigration/ProvideNoAllowOverrideV1', + }, + { + name: 'ProvideAllowOverrideV2', + router: 'pages/componentstatemigration/ProvideAllowOverrideV2', + }, + { + name: 'WatchSingleVarV1', + router: 'pages/componentstatemigration/WatchSingleVarV1', + }, + { + name: 'WatchSingleVarV2', + router: 'pages/componentstatemigration/WatchSingleVarV2', + }, + { + name: 'WatchMoreVarV1', + router: 'pages/componentstatemigration/WatchMoreVarV1', + }, + { + name: 'WatchMoreVarV2', + router: 'pages/componentstatemigration/WatchMoreVarV2', + }, + { + name: 'ComputedV1', + router: 'pages/componentstatemigration/ComputedV1', + }, + { + name: 'ComputedV2', + router: 'pages/componentstatemigration/ComputedV2', + } +] + +@Entry +@Component +struct Index { + @State bgColor: ResourceColor = '#39b5fa'; + + build() { + Column() { + Text($r('app.string.state_migration')) + .height('5%') + .width('100%') + .textAlign(TextAlign.Center) + .fontSize(15) + .fontWeight(FontWeight.Bold) + .backgroundColor(this.bgColor) + .fontColor(Color.White) + + Column() { + List({ space: 20, initialIndex: 0 }) { + ForEach(demandList, (listitem: listItem, index: number) => { + ListItem() { + Column() { + Text(listitem.name) + .fontSize(15) + .fontColor(this.bgColor) + .maxLines(1) + } + .onClick(() => { + if (!!listitem.router) { + this.getUIContext().getRouter().pushUrl({ url: listitem.router }) + } + }) + } + }) + } + .listDirection(Axis.Vertical) + .scrollBar(BarState.Off) + .friction(0.6) + .divider({ + strokeWidth: 2, + color: 0xFFFFFF, + startMargin: 20, + endMargin: 20 + }) + .edgeEffect(EdgeEffect.Spring) + .contentEndOffset(50) + .width('90%') + } + .width('100%') + // .height('100%') + .backgroundColor('#fff4f3f3') + .padding({ top: 5 }) + } + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ComputedV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ComputedV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..c97a01fc992ecb6202a7ca7130e62959e7b68644 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ComputedV1.ets @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start ComputedV1_start] +@Entry +@Component +struct Index1 { + @State firstName: string = 'Li'; + @State lastName: string = 'Hua'; + + build() { + Column() { + Text(this.lastName + ' ' + this.firstName); + Text(this.lastName + ' ' + this.firstName); + Button('changed lastName').onClick(() => { + this.lastName += 'a'; + }); + + } + } +} +// [End ComputedV1_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ComputedV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ComputedV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..39fc637565e71d2b7f9923272600bb5f1bc4337b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ComputedV2.ets @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start ComputedV2_start] +@Entry +@ComponentV2 +struct Index2 { + @Local firstName: string = 'Li'; + @Local lastName: string = 'Hua'; + + @Computed + get fullName() { + return this.firstName + ' ' + this.lastName; + } + + build() { + Column() { + Text(this.fullName); + Text(this.fullName); + Button('changed lastName').onClick(() => { + this.lastName += 'a'; + }); + } + } +} +// [End ComputedV2_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..f25128aaeaec9b8021c9e0e43e088d35d53844da --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV1.ets @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent7_start] +@Component +struct Child7 { + // @Link可以双向同步数据 + @Link val: number; + + build() { + Column() { + Text('child: ' + this.val.toString()) + Button('+1') + .onClick(() => { + this.val++; + }); + } + } +} + +@Entry +@Component +struct Parent7 { + @State myVal: number = 10; + + build() { + Column() { + Text('parent: ' + this.myVal.toString()); + Child7({ val: this.myVal }); + } + } +} +// [End Parent7_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..38fca214eb67f77ea7f9637184ab8515fdb81cc3 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/LinkMiigrationV2.ets @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent8_start] +@ComponentV2 +struct Child8 { + // @Param搭配@Event回调实现数据双向同步 + @Param val: number = 0; + @Event addOne: () => void; + + build() { + Column() { + Text('child: ' + this.val.toString()); + Button('+1') + .onClick(() => { + this.addOne(); + }); + } + } +} + +@Entry +@ComponentV2 +struct Parent8 { + @Local myVal: number = 10; + + build() { + Column() { + Text('parent: ' + this.myVal.toString()); + Child8({ val: this.myVal, addOne: () => this.myVal++ }); + } + } +} +// [End Parent8_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..08a6531246460c9c6b5a3259c713f9684d49ff2b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropComplexV1.ets @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent11_start] +class Fruit1 { + public apple: number = 5; + public orange: number = 10; +} + +@Component +struct Child11 { + // @Prop传递Fruit类,当子类修改属性,父类不受影响 + @Prop fruit: Fruit1; + + build() { + Column() { + Text('child apple: ' + this.fruit.apple.toString()); + Text('child orange: ' + this.fruit.orange.toString()); + Button('apple+1') + .onClick(() => { + this.fruit.apple++; + }); + Button('orange+1') + .onClick(() => { + this.fruit.orange++; + }); + } + } +} + +@Entry +@Component +struct Parent11 { + @State parentFruit: Fruit1 = new Fruit1(); + + build() { + Column() { + Text('parent apple: ' + this.parentFruit.apple.toString()); + Text('parent orange: ' + this.parentFruit.orange.toString()); + Child11({ fruit: this.parentFruit }); + } + } +} +// [End Parent11_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..9c24faf45c69b6923f5799e48e175af5b7f5966e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropComplexV2.ets @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent12_start] +@ObservedV2 +class Fruit2 { + @Trace public apple: number = 5; + @Trace public orange: number = 10; + + // 实现深拷贝,子组件不会修改父组件的数据 + clone(): Fruit2 { + let newFruit: Fruit2 = new Fruit2(); + newFruit.apple = this.apple; + newFruit.orange = this.orange; + return newFruit; + } +} + +@ComponentV2 +struct Child12 { + @Param fruit: Fruit2 = new Fruit2(); + + build() { + Column() { + Text('child'); + Text(this.fruit.apple.toString()); + Text(this.fruit.orange.toString()); + Button('apple+1') + .onClick(() => { + this.fruit.apple++; + }); + Button('orange+1') + .onClick(() => { + this.fruit.orange++; + }); + } + } +} + +@Entry +@ComponentV2 +struct Parent12 { + @Local parentFruit: Fruit2 = new Fruit2(); + + build() { + Column() { + Text('parent'); + Text(this.parentFruit.apple.toString()); + Text(this.parentFruit.orange.toString()); + Child12({ fruit: this.parentFruit.clone() }); + } + } +} +// [End Parent12_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..2b6e7305d03dd81a8838197ee3f81d47d980b916 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropEasyV1.ets @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent9_start] +@Component +struct Child9 { + @Prop value: number; + + build() { + Text(this.value.toString()); + } +} + +@Entry +@Component +struct Parent9 { + build() { + Column() { + Child9({ value: 30 }); + } + } +} +// [End Parent9_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..fd5d44dde9f68840ab9b8af2a693b6a3378400d8 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropEasyV2.ets @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent10_start] +@ComponentV2 +struct Child10 { + @Param value: number = 0; + + build() { + Text(this.value.toString()); + } +} + +@Entry +@ComponentV2 +struct Parent10 { + build() { + Column() { + Child10({ value: 30 }); + } + } +} +// [End Parent10_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf4d876f377bb9c66c061ce8bf3c3ddc2f759010 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV1.ets @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent15_start] +@Component +struct Child15 { + @Prop localValue: number = 0; + + build() { + Column() { + Text(`${this.localValue}`).fontSize(25); + Button('Child +100') + .onClick(() => { + // 改变localValue不会传递给父组件Parent + this.localValue += 100; + }); + } + } +} + +@Entry +@Component +struct Parent15 { + @State value: number = 10; + + build() { + Column() { + Button('Parent +1') + .onClick(() => { + // 改变value的值,通知子组件Child value更新 + this.value += 1; + }); + Child15({ localValue: this.value }); + } + } +} +// [End Parent15_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..ecb0dc0735ae925a89fc255b46e0d6240a713bb0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarLocalV2.ets @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent16_start] +import hilog from '@ohos.hilog'; +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; + +@ComponentV2 +struct Child16 { + @Local localValue: number = 0; + @Param value: number = 0; + + @Monitor('value') + onValueChange(mon: IMonitor) { + hilog.info(DOMAIN,TAG,`value has been changed from ${mon.value()?.before} to ${mon.value()?.now}`); + // 父组件value变化时,通知子组件value更新,回调Monitor函数,将更新的值覆写给本地的localValue + this.localValue = this.value; + } + + build() { + Column() { + Text(`${this.localValue}`).fontSize(25); + Button('Child +100') + .onClick(() => { + // 改变localValue不会传递给父组件Parent + this.localValue += 100; + }); + } + } +} + +@Entry +@ComponentV2 +struct Parent16 { + @Local value: number = 10; + + build() { + Column() { + Button('Parent +1') + .onClick(() => { + // 改变value的值,通知子组件Child value更新 + this.value += 1; + }); + Child16({ value: this.value }); + } + } +} +// [End Parent16_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..7ab8e7ab09691a360684957948782d611448ba27 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV1.ets @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent13_start] +@Component +struct Child13 { + // @Prop可以直接修改变量值 + @Prop value: number; + + build() { + Column() { + Text(this.value.toString()); + Button('+1') + .onClick(() => { + this.value++; + }); + } + } +} + +@Entry +@Component +struct Parent13 { + build() { + Column() { + Child13({ value: 30 }); + } + } +} +// [End Parent13_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..ff651b88cbc101b6f8fba0310af50d914abb3c90 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/PropSubComponentUpdateVarV2.ets @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent14_start] +@ComponentV2 +struct Child14 { + // @Param搭配@Once使用,可以在本地修改@Param变量 + @Param @Once value: number = 0; + + build() { + Column() { + Text(this.value.toString()); + Button('+1') + .onClick(() => { + this.value++; + }); + } + } +} + +@Entry +@ComponentV2 +struct Parent14 { + build() { + Column() { + Child14({ value: 30 }); + } + } +} +// [End Parent14_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..dcae77074fed80ed17d2bf6c34535ad02256c7be --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV1.ets @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent17_start] +@Component +struct Child17 { + // alias和属性名都为key,alias和属性名都可以匹配 + @Consume('text') childMessage: string; + @Consume message: string; + + build() { + Column() { + Text(this.childMessage); + Text(this.message); // Text是Hello World + } + } +} + +@Entry +@Component +struct Parent17 { + @Provide('text') message: string = 'Hello World'; + + build() { + Column() { + Child17(); + } + } +} +// [End Parent17_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..5efe53bec282b4b01f4648dc86b1305855ca0fd9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideAliasV2.ets @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent18_start] +@ComponentV2 +struct Child18 { + // alias是唯一匹配的key,有alias情况下无法通过属性名匹配 + @Consumer('text') childMessage: string = 'default'; + @Consumer() message: string = 'default'; + + build() { + Column() { + Text(this.childMessage); + Text(this.message); // Text是default + } + } +} + +@Entry +@ComponentV2 +struct Parent18 { + @Provider('text') message: string = 'Hello World'; + + build() { + Column() { + Child18(); + } + } +} +// [End Parent18_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..8753e6c7184b3c94a292854d721804e961a0e41f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideAllowOverrideV2.ets @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start GrandParent2_start] +@Entry +@ComponentV2 +struct GrandParent2 { + @Provider('reviewVotes') reviewVotes: number = 40; + + build() { + Column() { + Parent24(); + } + } +} + +@ComponentV2 +struct Parent24 { + // @Provider默认支持重载,@Consumer向上查找最近的@Provider + @Provider() reviewVotes: number = 20; + + build() { + Child24(); + } +} + +@ComponentV2 +struct Child24 { + @Consumer() reviewVotes: number = 0; + + build() { + Text(this.reviewVotes.toString()); // Text显示20 + } +} +// [End GrandParent2_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..71426b2f27b34e9770a3f05fe97c15b64bd4c46a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeInitV2.ets @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent20_start] +@ComponentV2 +struct Child20 { + // @Consumer允许本地初始化,当找不到@Provider的时候使用本地默认值 + @Consumer() message: string = 'Hello World'; + + build() { + Text(this.message); + } +} + +@Entry +@ComponentV2 +struct Parent20 { + build() { + Column() { + Child20(); + } + } +} +// [End Parent20_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..b54fff861ddc5830f821670de5ec74fd2f1e6121 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideConsumeNoInitV1.ets @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent19_start] +@Component +struct Child19 { + // @Consume禁止本地初始化,当找不到对应的@Provide时抛出异常 + @Consume message: string; + + build() { + Text(this.message); + } +} + +@Entry +@Component +struct Parent19 { + @Provide message: string = 'Hello World'; + + build() { + Column() { + Child19(); + } + } +} +// [End Parent19_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..2ff63ea49be7c83c5ed1cecda7432d14dfcdc807 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideNoAllowOverrideV1.ets @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start GrandParent1_start] +@Entry +@Component +struct GrandParent1 { + @Provide('reviewVotes') reviewVotes: number = 40; + + build() { + Column() { + Parent23(); + } + } +} + +@Component +struct Parent23 { + // @Provide默认不支持重载,支持重载需设置allowOverride函数 + @Provide({ allowOverride: 'reviewVotes' }) reviewVotes: number = 20; + + build() { + Child23(); + } +} + +@Component +struct Child23 { + @Consume('reviewVotes') reviewVotes: number; + + build() { + Text(this.reviewVotes.toString()); // Text显示20 + } +} +// [End GrandParent1_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..b4b210db696191f0bac6f9f74566ef87e770943d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideParentInitV1.ets @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent21_start] +@Entry +@Component +struct Parent21 { + @State parentValue: number = 42; + + build() { + Column() { + // @Provide可以从父组件初始化 + Child21({ childValue: this.parentValue }); + } + } +} + +@Component +struct Child21 { + @Provide childValue: number = 0; + + build() { + Column() { + Text(this.childValue.toString()); + } + } +} +// [End Parent21_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..13c8c5c04ff12b1a67f40a698453ca9525218034 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/ProvideParentNoInitV2.ets @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent22_start] +@Entry +@ComponentV2 +struct Parent22 { + @Local parentValue: number = 42; + + build() { + Column() { + // @Provider禁止从父组件初始化,替代方案为先用@Param接受,再赋值给@Provider + Child22({ initialValue: this.parentValue }); + } + } +} + +@ComponentV2 +struct Child22 { + @Param @Once initialValue: number = 0; + @Provider() childValue: number = this.initialValue; + + build() { + Column() { + Text(this.childValue.toString()); + } + } +} +// [End Parent22_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..6d73908b893873f7bab2d47fb0a0a534168d57ee --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateComplexV1.ets @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start example1_start] +class Child3 { + public value: number = 10; +} + +@Component +@Entry +struct example1 { + @State child: Child3 = new Child3(); + + build() { + Column() { + Text(this.child.value.toString()); + // @State可以观察第一层变化 + Button('value+1') + .onClick(() => { + this.child.value++; + + }); + } + } +} +// [End example1_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..57cae1d446e3954ae008ceddf3bf17620a5f09a2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateComplexV2.ets @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start example2_start] +@ObservedV2 +class Child4 { + @Trace public value: number = 10; +} + +@ComponentV2 +@Entry +struct example2 { + @Local child: Child4 = new Child4(); + + build() { + Column() { + Text(this.child.value.toString()); + // @Local只能观察自身,需要给Child加上@ObservedV2和@Trace + Button('value+1') + .onClick(() => { + this.child.value++; + }); + } + } +} +// [End example2_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..dfddb5fb6109ccfca891312474615ef5dd5580d4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateEasyV1.ets @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Child1_start] +@Entry +@Component +struct Child1 { + @State val: number = 10; + + build() { + Text(this.val.toString()); + } +} +// [End Child1_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..f6081fa325102feb35cd5274b01528ca1dc21fa2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateEasyV2.ets @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// [Start Child2_start] +@Entry +@ComponentV2 +struct Child2 { + @Local val: number = 10; + + build() { + Text(this.val.toString()); + } +} +// [End Child2_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..da321232311750844e02d1eb0840b077c2eb0ea4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV1.ets @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent5_start] +@Component +struct Child5 { + @State value: number = 0; + + build() { + Text(this.value.toString()); + } +} + +@Entry +@Component +struct Parent5 { + build() { + Column() { + // @State可以从外部初始化 + Child5({ value: 30 }); + } + } +} +// [End Parent5_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..bbe4d83238512e7ef2f457ac5099291746e37339 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/StateExternalInitializationV2.ets @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start Parent6_start] +@ComponentV2 +struct Child6 { + @Param @Once value: number = 0; + + build() { + Text(this.value.toString()); + } +} + +@Entry +@ComponentV2 +struct Parent6 { + build() { + Column() { + // @Local禁止从外部初始化,可以用@Param和@Once替代实现 + Child6({ value: 30 }); + } + } +} +// [End Parent6_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..ab9408ffb04bd501b2582db451ff30c31def919d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV1.ets @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start WatchExample2_start] +import hilog from '@ohos.hilog'; + +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; + +@Entry +@Component +struct WatchExample2 { + @State @Watch('onAppleChange') apple: number = 0; + @State @Watch('onOrangeChange') orange: number = 0; + + // @Watch 回调,只能监听单个变量,不能获取变化前的值 + onAppleChange(): void { + hilog.info(DOMAIN, TAG, 'apple count changed to ' + this.apple); + } + + onOrangeChange(): void { + hilog.info(DOMAIN, TAG, 'orange count changed to ' + this.orange); + } + + build() { + Column() { + Text(`apple count: ${this.apple}`); + Text(`orange count: ${this.orange}`); + Button('add apple') + .onClick(() => { + this.apple++; + }); + Button('add orange') + .onClick(() => { + this.orange++; + }); + } + } +} + +// [End WatchExample2_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..bab1b1ef01f667b74980d2fe6ab27524939ce1e3 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchMoreVarV2.ets @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start MonitorExample2_start] +import hilog from '@ohos.hilog'; + +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; + +@Entry +@ComponentV2 +struct MonitorExample2 { + @Local apple: number = 0; + @Local orange: number = 0; + + // @Monitor回调,支持监听多个变量,可以获取变化前的值 + @Monitor('apple','orange') + onFruitChange(monitor: IMonitor) { + monitor.dirty.forEach((name: string) => { + hilog.info(DOMAIN, TAG, `${name} changed from ${monitor.value(name)?.before} to ${monitor.value(name)?.now}`); + }); + } + + build() { + Column() { + Text(`apple count: ${this.apple}`); + Text(`orange count: ${this.orange}`); + Button('add apple') + .onClick(() => { + this.apple++; + }); + Button('add orange') + .onClick(() => { + this.orange++; + }); + } + } +} +// [End MonitorExample2_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ets new file mode 100644 index 0000000000000000000000000000000000000000..83ab6d0f2922f2677fee737bdeae919eecb2813e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV1.ets @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start WatchExample1_start] +import hilog from '@ohos.hilog'; + +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; + +@Entry +@Component +struct WatchExample1 { + @State @Watch('onAppleChange') apple: number = 0; + + onAppleChange(): void { + hilog.info(DOMAIN, TAG, 'apple count changed to ' + this.apple); + } + + build() { + Column() { + Text(`apple count: ${this.apple}`); + Button('add apple') + .onClick(() => { + this.apple++; + }); + } + } +} +// [End WatchExample1_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ets b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ets new file mode 100644 index 0000000000000000000000000000000000000000..20a8aae21a5c73ed50b22ab1c48b751e17f5dc01 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/ets/pages/componentstatemigration/WatchSingleVarV2.ets @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start MonitorExample1_start] +import hilog from '@ohos.hilog'; + +const DOMAIN = 0xFF00; +const TAG = '[Sample_StateMigration_App]'; + +@Entry +@ComponentV2 +struct MonitorExample1 { + @Local apple: number = 0; + + @Monitor('apple') + onFruitChange(monitor: IMonitor) { + hilog.info(DOMAIN, TAG, `apple changed from ${monitor.value()?.before} to ${monitor.value()?.now}`); + } + + build() { + Column() { + Text(`apple count: ${this.apple}`); + Button('add apple') + .onClick(() => { + this.apple++; + }); + } + } +} +// [End MonitorExample1_start] \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/module.json5 b/ArkUIKit/StateMigrationProject/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..476f4f508edb44dc9edfe115808545c33b284e0b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/module.json5 @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "ohos.want.action.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ], + } + ] + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/element/color.json b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/element/float.json b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..33ea22304f9b1485b5f22d811023701b5d4e35b6 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/element/string.json b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..3f16dbd77f8f648b1c61c02fd137e0e158cd54a0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/element/string.json @@ -0,0 +1,20 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "state_migration", + "value": "组件内状态变量迁移指导" + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/background.png b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..eeb110e3bb2f0607b3b8e0c30ae6a3e93d53e8d7 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/background.png differ diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/foreground.png b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..3063e3569b2ba2febffffd855539841a73b84860 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/foreground.png differ diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/layered_image.json b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/startIcon.png b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..a31c7f86b9157290e9278a80f48ff93b61b5a60d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/media/startIcon.png differ diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/profile/backup_config.json b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..78f40ae7c494d71e2482278f359ec790ca73471a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/profile/main_pages.json b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..0aafd427b62fa962f23be5292ea0429737e5aa86 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,35 @@ +{ + "src": [ + "pages/Index", + "pages/componentstatemigration/StateEasyV1", + "pages/componentstatemigration/StateEasyV2", + "pages/componentstatemigration/StateComplexV1", + "pages/componentstatemigration/StateComplexV2", + "pages/componentstatemigration/StateExternalInitializationV1", + "pages/componentstatemigration/StateExternalInitializationV2", + "pages/componentstatemigration/LinkMiigrationV1", + "pages/componentstatemigration/LinkMiigrationV2", + "pages/componentstatemigration/PropEasyV1", + "pages/componentstatemigration/PropEasyV2", + "pages/componentstatemigration/PropComplexV1", + "pages/componentstatemigration/PropComplexV2", + "pages/componentstatemigration/PropSubComponentUpdateVarV1", + "pages/componentstatemigration/PropSubComponentUpdateVarV2", + "pages/componentstatemigration/PropSubComponentUpdateVarLocalV1", + "pages/componentstatemigration/PropSubComponentUpdateVarLocalV2", + "pages/componentstatemigration/ProvideAliasV1", + "pages/componentstatemigration/ProvideAliasV2", + "pages/componentstatemigration/ProvideConsumeNoInitV1", + "pages/componentstatemigration/ProvideConsumeInitV2", + "pages/componentstatemigration/ProvideParentInitV1", + "pages/componentstatemigration/ProvideParentNoInitV2", + "pages/componentstatemigration/ProvideNoAllowOverrideV1", + "pages/componentstatemigration/ProvideAllowOverrideV2", + "pages/componentstatemigration/WatchSingleVarV1", + "pages/componentstatemigration/WatchSingleVarV2", + "pages/componentstatemigration/WatchMoreVarV1", + "pages/componentstatemigration/WatchMoreVarV2", + "pages/componentstatemigration/ComputedV1", + "pages/componentstatemigration/ComputedV2" + ] +} diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/resources/dark/element/color.json b/ArkUIKit/StateMigrationProject/entry/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..79b11c2747aec33e710fd3a7b2b3c94dd9965499 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/main/syscap.json b/ArkUIKit/StateMigrationProject/entry/src/main/syscap.json new file mode 100644 index 0000000000000000000000000000000000000000..94c464458d9ac40bf8de816b9fdd37b305c89d5e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/main/syscap.json @@ -0,0 +1,16 @@ +{ + "devices": { + "general": [ + "default" + ], + "custom": [ + { + "xts": [ + "SystemCapability.ArkUI.ArkUI.Full", + "SystemCapability.ArkUI.ArkUI.Lite", + "SystemCapability.ArkUI.ArkUI.Circle" + ] + } + ] + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/mock/mock-config.json5 b/ArkUIKit/StateMigrationProject/entry/src/mock/mock-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..323d1d611fecf4ecb751976e3a71500b3712a445 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/mock/mock-config.json5 @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/ohosTest/ets/test/Ability.test.ets b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/ets/test/Ability.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..7f30942b81554a399e89aa253c7089eca4f8d8d1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/ets/test/Ability.test.ets @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function abilityTest() { + describe('ActsAbilityTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }) + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }) + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }) + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }) + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }) + }) +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/ohosTest/ets/test/ComponentStateMigration.test.ets b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/ets/test/ComponentStateMigration.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0f7c71d2ff8b878e73296519f737b3b2e8436e00 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/ets/test/ComponentStateMigration.test.ets @@ -0,0 +1,693 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { beforeAll, describe, expect, it, Level, TestType, Size } from '@ohos/hypium'; +import { abilityDelegatorRegistry, Driver, ON } from '@kit.TestKit'; +import { UIAbility, Want } from '@kit.AbilityKit'; +import router from '@ohos.router'; + + +const delegator = abilityDelegatorRegistry.getAbilityDelegator(); +const bundleName = abilityDelegatorRegistry.getArguments().bundleName; +let driver: Driver; +let want: Want; + + +export default function ComponentStateMigration() { + describe('ComponentStateMigration', () => { + beforeAll(async () => { + want = { + bundleName: bundleName, + abilityName: 'EntryAbility' + }; + await delegator.startAbility(want); + driver = Driver.create(); + await driver.delayMs(1000); + + const ability: UIAbility = await delegator.getCurrentTopAbility(); + console.info('get top ability'); + expect(ability.context.abilityInfo.name).assertEqual('EntryAbility'); + }); + + /* + * @tc.number : StateEasyV1_001 + * @tc.name : testStateEasyV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testStateEasyV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/StateEasyV1' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + + /* + * @tc.number : StateEasyV2_002 + * @tc.name : testStateEasyV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testStateEasyV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/StateEasyV2' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : StateComplexV1_003 + * @tc.name : testStateComplexV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testStateComplexV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/StateComplexV1' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('value+1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + + /* + * @tc.number : StateComplexV2_004 + * @tc.name : testStateComplexV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testStateComplexV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/StateComplexV2' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('value+1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : StateExternalInitializationV1_005 + * @tc.name : testStateExternalInitializationV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testStateExternalInitializationV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/StateExternalInitializationV1' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + + /* + * @tc.number : StateExternalInitializationV2_006 + * @tc.name : testStateExternalInitializationV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testStateExternalInitializationV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/StateExternalInitializationV2' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : LinkMiigrationV1_007 + * @tc.name : testLinkMiigrationV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testLinkMiigrationV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/LinkMiigrationV1' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('+1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + + /* + * @tc.number : StateLinkMiigrationV2_008 + * @tc.name : testLinkMiigrationV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testLinkMiigrationV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/LinkMiigrationV2' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('+1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : PropEasyV1_009 + * @tc.name : testPropEasyV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testPropEasyV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/PropEasyV1' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : PropEasyV2_010 + * @tc.name : testPropEasyV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testPropEasyV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/PropEasyV2' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : PropComplexV1_011 + * @tc.name : testPropComplexV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testPropComplexV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/PropComplexV1' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('apple+1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(1000); + const title1 = await driver.findComponent(ON.text('orange+1')); + expect(title1 === null).assertFalse(); + await title1.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : PropComplexV2_012 + * @tc.name : testPropComplexV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testPropComplexV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/PropComplexV2' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('apple+1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(1000); + const title1 = await driver.findComponent(ON.text('orange+1')); + expect(title1 === null).assertFalse(); + await title1.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : PropSubComponentUpdateVarV1_013 + * @tc.name : testPropSubComponentUpdateVarV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testPropSubComponentUpdateVarV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/PropSubComponentUpdateVarV1' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('+1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : PropSubComponentUpdateVarV2_014 + * @tc.name : testPropSubComponentUpdateVarV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testPropSubComponentUpdateVarV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/PropSubComponentUpdateVarV2' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('+1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : PropSubComponentUpdateVarLocalV1_015 + * @tc.name : testPropSubComponentUpdateVarLocalV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testPropSubComponentUpdateVarLocalV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV1' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('Parent +1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(1000); + const title1 = await driver.findComponent(ON.text('Child +100')); + expect(title1 === null).assertFalse(); + await title1.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : PropSubComponentUpdateVarLocalV2_016 + * @tc.name : testPropSubComponentUpdateVarLocalV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testPropSubComponentUpdateVarLocalV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/PropSubComponentUpdateVarLocalV2' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('Parent +1')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(1000); + const title1 = await driver.findComponent(ON.text('Child +100')); + expect(title1 === null).assertFalse(); + await title1.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ProvideAliasV1_017 + * @tc.name : testProvideAliasV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testProvideAliasV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ProvideAliasV1' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ProvideAliasV2_018 + * @tc.name : testProvideAliasV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testProvideAliasV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ProvideAliasV2' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ProvideConsumeNoInitV1_019 + * @tc.name : testProvideConsumeNoInitV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testProvideConsumeNoInitV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ProvideConsumeNoInitV1' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ProvideConsumeInitV2_020 + * @tc.name : testProvideConsumeInitV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testProvideConsumeInitV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ProvideConsumeInitV2' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ProvideParentInitV1_021 + * @tc.name : testProvideParentInitV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testProvideParentInitV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ProvideParentInitV1' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ProvideParentNoInitV2_022 + * @tc.name : testProvideParentNoInitV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testProvideParentNoInitV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ProvideParentNoInitV2' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ProvideNoAllowOverrideV1_023 + * @tc.name : testProvideNoAllowOverrideV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testProvideNoAllowOverrideV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ProvideNoAllowOverrideV1' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ProvideAllowOverrideV2_024 + * @tc.name : testProvideAllowOverrideV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testProvideAllowOverrideV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ProvideAllowOverrideV2' }) + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : WatchSingleVarV1_025 + * @tc.name : testWatchSingleVarV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testWatchSingleVarV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/WatchSingleVarV1' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('add apple')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : WatchSingleVarV2_026 + * @tc.name : testWatchSingleVarV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testWatchSingleVarV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/WatchSingleVarV2' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('add apple')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : WatchMoreVarV1_027 + * @tc.name : testWatchMoreVarV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testWatchMoreVarV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/WatchMoreVarV1' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('add apple')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(1000); + const title1 = await driver.findComponent(ON.text('add orange')); + expect(title1 === null).assertFalse(); + await title1.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : WatchMoreVarV2_028 + * @tc.name : testWatchMoreVarV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testWatchMoreVarV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/WatchMoreVarV2' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('add apple')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(1000); + const title1 = await driver.findComponent(ON.text('add orange')); + expect(title1 === null).assertFalse(); + await title1.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ComputedV1_029 + * @tc.name : testComputedV1 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testComputedV1', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ComputedV1' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('changed lastName')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + /* + * @tc.number : ComputedV2_030 + * @tc.name : testComputedV2 + * @tc.desc : 测试装饰器迁移 + * @tc.size : MediumTest + * @tc.type : Function + * @tc.level : Level 1 + */ + it('testComputedV2', TestType.FUNCTION | Size.MEDIUMTEST | Level.LEVEL1, + async (done: Function) => { + let driver = Driver.create(); + await driver.delayMs(1000); + await router.pushUrl({ url: 'pages/componentstatemigration/ComputedV2' }) + await driver.delayMs(1000); + const title = await driver.findComponent(ON.text('changed lastName')); + expect(title === null).assertFalse(); + await driver.delayMs(1000); + await title.click(); + await driver.delayMs(2000); + await driver.pressBack(); + await driver.delayMs(1000); + done(); + }); + }); +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/ohosTest/ets/test/List.test.ets b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/ets/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f649fe783a0dca8a4c36665d5ec4da428e186928 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/ets/test/List.test.ets @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import abilityTest from './Ability.test'; +import ComponentStateMigration from './ComponentStateMigration.test'; + +export default function testsuite() { + abilityTest(); + ComponentStateMigration(); +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/ohosTest/module.json5 b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..59667117c86b64ab9863f7b382c435ae4a3c32fa --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/module.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "module": { + "name": "entry_test", + "type": "feature", + "deviceTypes": [ + "default" + ], + "deliveryWithInstall": true, + "installationFree": false + } +} diff --git a/ArkUIKit/StateMigrationProject/entry/src/ohosTest/syscap.json b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/syscap.json new file mode 100644 index 0000000000000000000000000000000000000000..94c464458d9ac40bf8de816b9fdd37b305c89d5e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/ohosTest/syscap.json @@ -0,0 +1,16 @@ +{ + "devices": { + "general": [ + "default" + ], + "custom": [ + { + "xts": [ + "SystemCapability.ArkUI.ArkUI.Full", + "SystemCapability.ArkUI.ArkUI.Lite", + "SystemCapability.ArkUI.ArkUI.Circle" + ] + } + ] + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/test/List.test.ets b/ArkUIKit/StateMigrationProject/entry/src/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..a60c87c5cbb0badf7c3fd8975034590e6fafa992 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/test/List.test.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import localUnitTest from './LocalUnit.test'; + +export default function testsuite() { + localUnitTest(); +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/entry/src/test/LocalUnit.test.ets b/ArkUIKit/StateMigrationProject/entry/src/test/LocalUnit.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..841bfd77e56060e50ec0924302a5ae624e76e3aa --- /dev/null +++ b/ArkUIKit/StateMigrationProject/entry/src/test/LocalUnit.test.ets @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function localUnitTest() { + describe('localUnitTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }); + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }); + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }); + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }); + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }); + }); +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/hvigor/hvigor-config.json5 b/ArkUIKit/StateMigrationProject/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..3b057578a1bb4d591ee53054e39ab0154fc2e43a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "modelVersion": "6.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | "ultrafine" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + // "optimizationStrategy": "memory" /* Define the optimization strategy. Value: [ "memory" | "performance" ]. Default: "memory" */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/ArkUIKit/StateMigrationProject/hvigorfile.ts b/ArkUIKit/StateMigrationProject/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..ae9086af35844176c08f1be3772d081d95d267c6 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/hvigorfile.ts @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh-package.json5 b/ArkUIKit/StateMigrationProject/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..b13b6c7075b3b6c4d7190a8f656568a3d387277d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh-package.json5 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "modelVersion": "6.0.0", + "description": "Please describe the basic information.", + "dependencies": { + "@ohos/lottie": "^2.0.24" + }, + "devDependencies": { + "@ohos/hypium": "1.0.24", + "@ohos/hamock": "1.0.0" + }, + "dynamicDependencies": {} +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/CHANGELOG.md b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..22a35bda8a1fab36dd81c1c7ae86addcc1f111cc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/CHANGELOG.md @@ -0,0 +1,4 @@ +## 1.0.0 +- 修复once断言问题 +## 1.0.0-rc +- 提供DevEco Studio预览器场景使能的MockSetup装饰器 \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/LICENSE b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4947287f7b5ccb5d1e8b7b2d3aa5d89f322c160d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/README.md b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c46981eb6b9163cb82723dd4c410b69b5e6a66cd --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/README.md @@ -0,0 +1,82 @@ +# Hamock + +## 简介 + +Hamock 是 OpenHarmony 上的模拟框架,提供预览场景的模拟功能。 + +## 下载安装 + +```bash +ohpm install @ohos/hamock +``` + +OpenHarmony ohpm 环境配置等更多内容,请参考[如何安装 OpenHarmony ohpm 包](https://gitee.com/openharmony-tpc/docs/blob/master/OpenHarmony_har_usage.md) + +## 使用示例 + +Hamock 提供了 @MockSetup 用于修饰 Mock 方法,仅支持声明式范式的组件。当开发者预览该组件时,预览运行时将在组件初始化时执行被 @MockSetup 修饰的方法。因此,开发者可以在这个被修饰的方法内重定义组件的方法或重赋值组件的属性,其将在预览时生效。 + +> 说明: +> @MockSetup 修饰的方法仅在预览场景会自动触发,并先于组件的 aboutToAppear 执行。 + +### UI组件的方法 + +在 ArkTS 页面代码中引入 Hamock。在目标组件中定义一个方法,并用 @MockSetup 修饰该方法。在这个方法中,使用 MockKit 模拟目标方法。 + +```typescript +import { MockKit, when, MockSetup } from '@ohos/hamock'; + +@Entry +@Component +struct Index { + ... + @MockSetup + randomName() { + let mocker: MockKit = new MockKit(); + let mockfunc: Object = mocker.mockFunc(this, this.method1); + // mock 指定的方法在指定入参的返回值 + when(mockfunc)('test').afterReturn(1); + } + ... + // 业务场景调用方法 + const result: number = this.method1('test'); // in previewer, result = 1 +} +``` + +### UI组件的属性 + +在 ArkTS 页面代码中引入 Hamock。在目标组件中定义一个方法,并用 @MockSetup 修饰该方法。在这个方法中,对于需要 Mock 的属性,可以重新赋值。 + +```typescript +import { MockSetup } from '@ohos/hamock'; + +@Component +struct Person { + @Prop species: string; + ... + // 在 @MockSetup 片段中,定义对象属性 + @MockSetup + randomName() { + this.species = 'primates'; + } + ... + // 业务场景调用属性(如果从初始化到调用期间,该属性无变化) + const result: string = this.species; // in previewer, result = primates +} +``` + +## 约束与限制 + +在下述版本验证通过: + +DevEco Studio: 4.1 (4.1.3.400), SDK: API11 (4.1.0.36) + +MockSetup 仅在 API11 支持。 + +## 贡献代码 + +使用过程中发现任何问题都可以提[Issue](https://gitee.com/openharmony/testfwk_arkxtest/issues) 给我们,当然,我们也非常欢迎你给我们提[PR](https://gitee.com/openharmony/testfwk_arkxtest/pulls) 。 + +## 开源协议 + +本项目基于 [Apache License 2.0](https://gitee.com/openharmony/testfwk_arkxtest/blob/master/hamock/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/build-profile.json5 b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..12fe2d844bdb69584fd05ebaa3e1cb197a25c3f1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/build-profile.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "apiType": "stageMode", + "buildOption": { + }, + "targets": [ + { + "name": "default" + } + ] +} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/hvigorfile.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/hvigorfile.js new file mode 100644 index 0000000000000000000000000000000000000000..d7bda561c9bf09b92a7fac485141cc8648907388 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/hvigorfile.js @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +export { harTasks } from '@ohos/hvigor-ohos-plugin'; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/hvigorfile.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..960be7d7df0790853d6bdab1f52a3ec8c8e4a1ca --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/hvigorfile.ts @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License") + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +export { harTasks } from '@ohos/hvigor-ohos-plugin'; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.d.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6bc7929ba5718da0e459721be04e903ec59289c0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.d.ts @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License") + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class ArgumentMatchers { + static any; + static anyString; + static anyBoolean; + static anyNumber; + static anyObj; + static anyFunction; + static matchRegexs(Regex: RegExp): void +} + +declare interface when { + afterReturn(value: any): any + afterReturnNothing(): undefined + afterAction(action: any): any + afterThrow(e_msg: string): string + (argMatchers?: any): when; +} + +export const when: when; + +export interface VerificationMode { + times(count: Number): void + never(): void + once(): void + atLeast(count: Number): void + atMost(count: Number): void +} + +export class MockKit { + constructor() + mockFunc(obj: Object, func: Function): Function + mockObject(obj: Object): Object + verify(methodName: String, argsArray: Array): VerificationMode + ignoreMock(obj: Object, func: Function): void + clear(obj: Object): void + clearAll(): void +} + +export declare function MockSetup( + target: Object, + propertyName: string | Symbol, + descriptor: TypedPropertyDescriptor<() => void> +): void; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.ets b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.ets new file mode 100644 index 0000000000000000000000000000000000000000..c3a47320c2b674216cccde0fe217dbb8423625cc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.ets @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License") + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { MockSetup, MockKit, when } from './src/main/mock/MockKit'; +export { ArgumentMatchers } from './src/main/mock/ArgumentMatchers'; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.js new file mode 100644 index 0000000000000000000000000000000000000000..1cb2b5e0256e00aa9276867f0753a89a7ac5e16f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.js @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License") + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export { MockSetup, MockKit, when } from './src/main/mock/MockKit.js'; +export { ArgumentMatchers } from './src/main/mock/ArgumentMatchers.js'; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..608eb4fe72aaf0f6cca0ccb3baad94e9b6101de0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright (c) 2021-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License") + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export { MockSetup, MockKit, when } from './src/main/mock/MockKit.js'; +export { ArgumentMatchers } from './src/main/mock/ArgumentMatchers.js'; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/oh-package.json5 b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..0ef4eeed251a93463c2abf85b262c3e1fb6733bc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/oh-package.json5 @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + name: '@ohos/hamock', + version: '1.0.0', + description: 'A mock framework for OpenHarmony application.', + main: 'index.ets', + author: 'huawei', + license: 'Apache-2.0', + dependencies: {}, + ohos: { + org: 'ohos', + }, + types: 'index.d.ts' +} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ArgumentMatchers.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ArgumentMatchers.js new file mode 100644 index 0000000000000000000000000000000000000000..f06bbca0b287aac612f42f9263c064c0157ae03a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ArgumentMatchers.js @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +export class ArgumentMatchers { + constructor() { + this.ANY = ""; + this.ANY_STRING = ""; + this.ANY_BOOLEAN = ""; + this.ANY_NUMBER = ""; + this.ANY_OBJECT = ""; + this.ANY_FUNCTION = ""; + this.MATCH_REGEXS = ""; + } + static any() { + } + static anyString() { + } + static anyBoolean() { + } + static anyNumber() { + } + static anyObj() { + } + static anyFunction() { + } + static matchRegexs(regex) { + if (ArgumentMatchers.isRegExp(regex)) { + return regex; + } + throw Error("not a regex"); + } + static isRegExp(value) { + return Object.prototype.toString.call(value) === "[object RegExp]"; + } + matcheReturnKey(...args) { + let arg = args[0]; + let regex = args[1]; + let stubSetKey = args[2]; + if (stubSetKey && stubSetKey == this.ANY) { + return this.ANY; + } + if (typeof arg === "string" && !regex) { + return this.ANY_STRING; + } + if (typeof arg === "boolean" && !regex) { + return this.ANY_BOOLEAN; + } + if (typeof arg === "number" && !regex) { + return this.ANY_NUMBER; + } + if (typeof arg === "object" && !regex) { + return this.ANY_OBJECT; + } + if (typeof arg === "function" && !regex) { + return this.ANY_FUNCTION; + } + if (typeof arg === "string" && regex) { + return regex.test(arg); + } + return null; + } + matcheStubKey(key) { + if (key === ArgumentMatchers.any) { + return this.ANY; + } + if (key === ArgumentMatchers.anyString) { + return this.ANY_STRING; + } + if (key === ArgumentMatchers.anyBoolean) { + return this.ANY_BOOLEAN; + } + if (key === ArgumentMatchers.anyNumber) { + return this.ANY_NUMBER; + } + if (key === ArgumentMatchers.anyObj) { + return this.ANY_OBJECT; + } + if (key === ArgumentMatchers.anyFunction) { + return this.ANY_FUNCTION; + } + if (ArgumentMatchers.isRegExp(key)) { + return key; + } + return null; + } +} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ArgumentMatchers.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ArgumentMatchers.ts new file mode 100644 index 0000000000000000000000000000000000000000..262bea1afbeb611029db0cfaeb65767b92f97b91 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ArgumentMatchers.ts @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class ArgumentMatchers { + ANY = ""; + ANY_STRING = ""; + ANY_BOOLEAN = ""; + ANY_NUMBER = ""; + ANY_OBJECT = ""; + ANY_FUNCTION = ""; + MATCH_REGEXS = ""; + + static any() { + } + + static anyString() { + } + + static anyBoolean() { + } + + static anyNumber() { + } + + static anyObj() { + } + + static anyFunction() { + } + + static matchRegexs(regex: any) { + if (ArgumentMatchers.isRegExp(regex)) { + return regex; + } + throw Error("not a regex"); + } + + static isRegExp(value: string) { + return Object.prototype.toString.call(value) === "[object RegExp]"; + } + + matcheReturnKey(...args: Array) { + let arg = args[0]; + let regex = args[1]; + let stubSetKey = args[2]; + + if (stubSetKey && stubSetKey == this.ANY) { + return this.ANY; + } + + if (typeof arg === "string" && !regex) { + return this.ANY_STRING; + } + + if (typeof arg === "boolean" && !regex) { + return this.ANY_BOOLEAN; + } + + if (typeof arg === "number" && !regex) { + return this.ANY_NUMBER; + } + + if (typeof arg === "object" && !regex) { + return this.ANY_OBJECT; + } + + if (typeof arg === "function" && !regex) { + return this.ANY_FUNCTION; + } + + if (typeof arg === "string" && regex) { + return regex.test(arg); + } + + return null; + } + + matcheStubKey(key: any) { + + if (key === ArgumentMatchers.any) { + return this.ANY; + } + + if (key === ArgumentMatchers.anyString) { + return this.ANY_STRING; + } + if (key === ArgumentMatchers.anyBoolean) { + return this.ANY_BOOLEAN; + } + if (key === ArgumentMatchers.anyNumber) { + return this.ANY_NUMBER; + } + if (key === ArgumentMatchers.anyObj) { + return this.ANY_OBJECT; + } + if (key === ArgumentMatchers.anyFunction) { + return this.ANY_FUNCTION; + } + + if (ArgumentMatchers.isRegExp(key)) { + return key; + } + + return null; + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ExtendInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ExtendInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..52f9dff07f7b719900ca47d56c3020586db31d5b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ExtendInterface.js @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class ExtendInterface { + constructor(mocker) { + this.mocker = mocker; + } + stub() { + this.params = arguments; + return this; + } + stubMockedCall(returnInfo) { + this.mocker.stubApply(this, this.params, returnInfo); + } + afterReturn(value) { + this.stubMockedCall(function () { + return value; + }); + } + afterReturnNothing() { + this.stubMockedCall(function () { + return undefined; + }); + } + afterAction(action) { + this.stubMockedCall(action); + } + afterThrow(msg) { + this.stubMockedCall(function () { + throw msg; + }); + } + clear(obj) { + this.mocker.clear(obj); + } +} +export default ExtendInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ExtendInterface.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ExtendInterface.ts new file mode 100644 index 0000000000000000000000000000000000000000..55f7a0b36bc2895e17a2e6b32a6c1980853cbce9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/ExtendInterface.ts @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { MockKit } from "./MockKit.js"; + +class ExtendInterface { + + private mocker: MockKit + private params: any + + constructor(mocker: MockKit) { + this.mocker = mocker; + } + + stub() { + this.params = arguments; + return this; + } + + stubMockedCall(returnInfo: any) { + this.mocker.stubApply(this, this.params, returnInfo); + } + + afterReturn(value: any) { + this.stubMockedCall(function () { + return value; + }); + } + + afterReturnNothing() { + this.stubMockedCall(function () { + return undefined; + }); + } + + afterAction(action: Function) { + this.stubMockedCall(action); + } + + afterThrow(msg: string) { + this.stubMockedCall(function () { + throw msg; + }); + } + + clear(obj?: any) { + this.mocker.clear(obj); + } +} + +export default ExtendInterface; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/MockKit.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/MockKit.js new file mode 100644 index 0000000000000000000000000000000000000000..c1ca51614abe9f9c149094f5186eeb750b00a074 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/MockKit.js @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import ExtendInterface from "./ExtendInterface.js"; +import VerificationMode from "./VerificationMode.js"; +import { ArgumentMatchers } from "./ArgumentMatchers.js"; +class MockKit { + constructor() { + this.mFunctions = []; + this.stubs = new Map(); + this.recordCalls = new Map(); + this.currentSetKey = new Map(); + this.mockObj = null; + this.recordMockedMethod = new Map(); + this.mFunctions = []; + this.stubs = new Map(); + this.recordCalls = new Map(); + this.currentSetKey = new Map(); + this.mockObj = null; + this.recordMockedMethod = new Map(); + } + init() { + this.reset(); + } + reset() { + this.mFunctions = []; + this.stubs = new Map(); + this.recordCalls = new Map(); + this.currentSetKey = new Map(); + this.mockObj = null; + this.recordMockedMethod = new Map(); + } + clearAll() { + this.reset(); + } + clear(obj) { + if (!obj) throw Error("Please enter an object to be cleaned"); + if (typeof (obj) !== 'object' && typeof (obj) !== 'function') throw new Error('Not a object or static class'); + this.recordMockedMethod.forEach(function (value, key, map) { + if (key) { + obj[key] = value; + } + }); + } + ignoreMock(obj, method) { + if (typeof (obj) !== 'object' && typeof (obj) !== 'function') throw new Error('Not a object or static class'); + if (typeof (method) !== 'function') throw new Error('Not a function'); + let og = this.recordMockedMethod.get(method.propName); + if (og) { + obj[method.propName] = og; + this.recordMockedMethod.set(method.propName, undefined); + } + } + extend(dest, source) { + dest["stub"] = source["stub"]; + dest["afterReturn"] = source["afterReturn"]; + dest["afterReturnNothing"] = source["afterReturnNothing"]; + dest["afterAction"] = source["afterAction"]; + dest["afterThrow"] = source["afterThrow"]; + dest["stubMockedCall"] = source["stubMockedCall"]; + dest["clear"] = source["clear"]; + return dest; + } + stubApply(f, params, returnInfo) { + let values = this.stubs.get(f); + if (!values) { + values = new Map(); + } + let key = params[0]; + if (typeof key === "undefined") { + key = "anonymous-mock-" + f.propName; + } + let matcher = new ArgumentMatchers(); + if (matcher.matcheStubKey(key)) { + key = matcher.matcheStubKey(key); + if (key) { + this.currentSetKey.set(f, key); + } + } + values.set(key, returnInfo); + this.stubs.set(f, values); + } + getReturnInfo(f, params) { + let values = this.stubs.get(f); + if (!values) { + return undefined; + } + let retrunKet = params[0]; + if (typeof retrunKet === "undefined") { + retrunKet = "anonymous-mock-" + f.propName; + } + let stubSetKey = this.currentSetKey.get(f); + + if (stubSetKey && (typeof (retrunKet) !== "undefined")) { + retrunKet = stubSetKey; + } + let matcher = new ArgumentMatchers(); + if (matcher.matcheReturnKey(params[0], undefined, stubSetKey) && matcher.matcheReturnKey(params[0], undefined, stubSetKey) !== stubSetKey) { + retrunKet = params[0]; + } + values.forEach(function (value, key, map) { + if (ArgumentMatchers.isRegExp(key) && matcher.matcheReturnKey(params[0], key)) { + retrunKet = key; + } + }); + return values.get(retrunKet); + } + findName(obj, value) { + let properties = this.findProperties(obj); + let name = ''; + properties.filter((item) => (item !== 'caller' && item !== 'arguments')).forEach(function (va1, idx, array) { + if (obj[va1] === value) { + name = va1; + } + }); + return name; + } + isFunctionFromPrototype(f, container, propName) { + if (container.constructor !== Object && container.constructor.prototype !== container) { + return container.constructor.prototype[propName] === f; + } + return false; + } + findProperties(obj, ...arg) { + function getProperty(new_obj) { + if (new_obj.__proto__ === null) { + return []; + } + let properties = Object.getOwnPropertyNames(new_obj); + return [...properties, ...getProperty(new_obj.__proto__)]; + } + return getProperty(obj); + } + recordMethodCall(originalMethod, args) { + originalMethod['getName'] = function () { + return this.name || this.toString().match(/function\s*([^(]*)\(/)[1]; + }; + let name = originalMethod.getName(); + let arglistString = name + '(' + Array.from(args).toString() + ')'; + let records = this.recordCalls.get(arglistString); + if (!records) { + records = 0; + } + records++; + this.recordCalls.set(arglistString, records); + } + mockFunc(originalObject, originalMethod) { + let tmp = this; + this.originalMethod = originalMethod; + const _this = this; + let f = function () { + let args = arguments; + let action = tmp.getReturnInfo(f, args); + if (originalMethod) { + tmp.recordMethodCall(originalMethod, args); + } + if (action) { + return action.apply(_this, args); + } + }; + f.container = null || originalObject; + f.original = originalMethod || null; + if (originalObject && originalMethod) { + if (typeof (originalMethod) != 'function') + throw new Error('Not a function'); + var name = this.findName(originalObject, originalMethod); + originalObject[name] = f; + this.recordMockedMethod.set(name, originalMethod); + f.propName = name; + f.originalFromPrototype = this.isFunctionFromPrototype(f.original, originalObject, f.propName); + } + f.mocker = this; + this.mFunctions.push(f); + this.extend(f, new ExtendInterface(this)); + return f; + } + verify(methodName, argsArray) { + if (!methodName) { + throw Error("not a function name"); + } + let a = this.recordCalls.get(methodName + '(' + argsArray.toString() + ')'); + return new VerificationMode(a ? a : 0); + } + mockObject(object) { + if (!object || typeof object === "string") { + throw Error(`this ${object} cannot be mocked`); + } + const _this = this; + let mockedObject = {}; + let keys = Reflect.ownKeys(object); + keys.filter(key => (typeof Reflect.get(object, key)) === 'function') + .forEach((key) => { + mockedObject[key] = object[key]; + mockedObject[key] = _this.mockFunc(mockedObject, mockedObject[key]); + }); + return mockedObject; + } +} +function ifMockedFunction(f) { + if (Object.prototype.toString.call(f) != "[object Function]" && + Object.prototype.toString.call(f) != "[object AsyncFunction]") { + throw Error("not a function"); + } + if (!f.stub) { + throw Error("not a mock function"); + } + return true; +} +function when(f) { + if (ifMockedFunction(f)) { + return f.stub.bind(f); + } +} +function MockSetup(target, propertyName, descriptor) { + const aboutToAppearOrigin = target.aboutToAppear; + const setup = descriptor.value; + target.aboutToAppear = function (...args) { + if (target.__Param) { // copy attributes and params of the original context + try { + const map = target.__Param; + for (const [key, val] of map) { + this[key] = val; // 'this' refers to context of current function + } + } + catch (e) { + throw new Error(`Mock setup param error: ${e}`); + } + } + if (setup) { // apply the mock content + try { + setup.apply(this); + } + catch (e) { + throw new Error(`Mock setup apply error: ${e}`); + } + } + if (aboutToAppearOrigin) { // append to aboutToAppear function of the original context + aboutToAppearOrigin.apply(this, args); + } + }; +} +export { MockSetup, MockKit, when }; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/MockKit.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/MockKit.ts new file mode 100644 index 0000000000000000000000000000000000000000..2807643e29d6da16ee7061ce5674b696a4fc3ca6 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/MockKit.ts @@ -0,0 +1,294 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ExtendInterface from "./ExtendInterface.js"; +import VerificationMode from "./VerificationMode.js"; +import { ArgumentMatchers } from "./ArgumentMatchers.js"; + +interface IFunction extends Function { + container: any; + original: any; + propName: string; + originalFromPrototype: boolean + mocker: MockKit +} + +class MockKit { + + private mFunctions:Array = []; + private stubs = new Map(); + private recordCalls = new Map(); + private currentSetKey = new Map(); + private mockObj = null; + private recordMockedMethod = new Map(); + private originalMethod: any; + + constructor() { + this.mFunctions = []; + this.stubs = new Map(); + this.recordCalls = new Map(); + this.currentSetKey = new Map(); + this.mockObj = null; + this.recordMockedMethod = new Map(); + } + + init() { + this.reset(); + } + + reset() { + this.mFunctions = []; + this.stubs = new Map() + this.recordCalls = new Map(); + this.currentSetKey = new Map(); + this.mockObj = null; + this.recordMockedMethod = new Map(); + } + + clearAll() { + this.reset(); + } + + clear(obj: any) { + if (!obj) throw Error("Please enter an object to be cleaned"); + if (typeof (obj) != 'object') throw new Error('Not a object'); + this.recordMockedMethod.forEach(function (value, key, map) { + if (key) { + obj[key] = value; + } + }); + } + + ignoreMock(obj:any, method: any) { + if (typeof (obj) != 'object') throw new Error('Not a object'); + if (typeof (method) != 'function') throw new Error('Not a function'); + let og = this.recordMockedMethod.get(method.propName); + if (og) { + obj[method.propName] = og; + this.recordMockedMethod.set(method.propName, undefined); + } + } + + extend(dest: any, source:any) { + dest["stub"] = source["stub"]; + dest["afterReturn"] = source["afterReturn"]; + dest["afterReturnNothing"] = source["afterReturnNothing"]; + dest["afterAction"] = source["afterAction"]; + dest["afterThrow"] = source["afterThrow"]; + dest["stubMockedCall"] = source["stubMockedCall"]; + dest["clear"] = source["clear"]; + return dest; + } + + stubApply(f: any, params:any, returnInfo:any) { + let values = this.stubs.get(f); + if (!values) { + values = new Map(); + } + let key = params[0]; + if (typeof key == "undefined") { + key = "anonymous-mock-" + f.propName; + } + let matcher = new ArgumentMatchers(); + if (matcher.matcheStubKey(key)) { + key = matcher.matcheStubKey(key); + if (key) { + this.currentSetKey.set(f, key); + } + } + values.set(key, returnInfo); + this.stubs.set(f, values); + } + + getReturnInfo(f: any, params:any) { + let values = this.stubs.get(f); + if (!values) { + return undefined; + } + let retrunKet = params[0]; + if (typeof retrunKet == "undefined") { + retrunKet = "anonymous-mock-" + f.propName; + } + let stubSetKey = this.currentSetKey.get(f); + + if (stubSetKey && (typeof (retrunKet) != "undefined")) { + retrunKet = stubSetKey; + } + let matcher = new ArgumentMatchers(); + if (matcher.matcheReturnKey(params[0], undefined, stubSetKey) && matcher.matcheReturnKey(params[0], undefined, stubSetKey) != stubSetKey) { + retrunKet = params[0]; + } + + values.forEach(function (value: any, key: any, map: any) { + if (ArgumentMatchers.isRegExp(key) && matcher.matcheReturnKey(params[0], key)) { + retrunKet = key; + } + }); + + return values.get(retrunKet); + } + + findName(obj: any, value: any) { + let properties = this.findProperties(obj); + let name = ''; + properties.filter((item:any) => (item !== 'caller' && item !== 'arguments')).forEach( + function (va1:any, idx:any, array:any) { + if (obj[va1] === value) { + name = va1; + } + } + ); + return name; + } + + isFunctionFromPrototype(f: Function, container:Function, propName: string) { + if (container.constructor != Object && container.constructor.prototype !== container) { + return container.constructor.prototype[propName] === f; + } + return false; + } + + findProperties(obj: any, ...arg: Array) { + function getProperty(new_obj:any): Array { + if (new_obj.__proto__ === null) { + return []; + } + let properties = Object.getOwnPropertyNames(new_obj); + return [...properties, ...getProperty(new_obj.__proto__)]; + } + return getProperty(obj); + } + + recordMethodCall(originalMethod: any, args: any) { + originalMethod['getName'] = function () { + return this.name || this.toString().match(/function\s*([^(]*)\(/)[1]; + } + let name = originalMethod.getName(); + let arglistString = name + '(' + Array.from(args).toString() + ')'; + let records = this.recordCalls.get(arglistString); + if (!records) { + records = 0; + } + records++; + this.recordCalls.set(arglistString, records); + } + + mockFunc(originalObject:any, originalMethod:any) { + let tmp = this; + this.originalMethod = originalMethod; + const _this = this; + let f:any = function () { + let args = arguments; + let action = tmp.getReturnInfo(f, args); + if (originalMethod) { + tmp.recordMethodCall(originalMethod, args); + } + if (action) { + return action.apply(_this, args); + } + }; + + f.container = null || originalObject; + f.original = originalMethod || null; + + if (originalObject && originalMethod) { + if (typeof (originalMethod) != 'function') throw new Error('Not a function'); + var name = this.findName(originalObject, originalMethod); + originalObject[name] = f; + this.recordMockedMethod.set(name, originalMethod); + f.propName = name; + f.originalFromPrototype = this.isFunctionFromPrototype(f.original, originalObject, f.propName); + } + f.mocker = this; + this.mFunctions.push(f); + this.extend(f, new ExtendInterface(this)); + return f; + } + + verify(methodName:any, argsArray:any) { + if (!methodName) { + throw Error("not a function name"); + } + let a = this.recordCalls.get(methodName + '(' + argsArray.toString() + ')'); + return new VerificationMode(a ? a : 0); + } + + mockObject(object: any) { + if (!object || typeof object === "string") { + throw Error(`this ${object} cannot be mocked`); + } + const _this = this; + let mockedObject:any = {}; + let keys = Reflect.ownKeys(object); + keys.filter(key => (typeof Reflect.get(object, key)) === 'function') + .forEach((key:any) => { + mockedObject[key] = object[key]; + mockedObject[key] = _this.mockFunc(mockedObject, mockedObject[key]); + }); + return mockedObject; + } +} + +function ifMockedFunction(f: any) { + if (Object.prototype.toString.call(f) != "[object Function]" && + Object.prototype.toString.call(f) != "[object AsyncFunction]") { + throw Error("not a function"); + } + if (!f.stub) { + throw Error("not a mock function"); + } + return true; +} + +function when(f: any) { + if (ifMockedFunction(f)) { + return f.stub.bind(f); + } +} + +function MockSetup(target: Object, propertyName: string | Symbol, descriptor: TypedPropertyDescriptor<() => void>): void { + const aboutToAppearOrigin = target.aboutToAppear; + const setup = descriptor.value; + target.aboutToAppear = function (...args: any[]) { + if (target.__Param) { // copy attributes and params of the original context + try { + const map = target.__Param as Map; + for (const [key, val] of map) { + this[key] = val; // 'this' refers to context of current function + } + } catch (e) { + throw new Error(`Mock setup param error: ${e}`); + } + } + + if (setup) { // apply the mock content + try { + setup.apply(this); + } catch (e) { + throw new Error(`Mock setup apply error: ${e}`); + } + } + + if (aboutToAppearOrigin) { // append to aboutToAppear function of the original context + aboutToAppearOrigin.apply(this, args); + } + } +} + +export { + MockSetup, + MockKit, + when +}; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/VerificationMode.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/VerificationMode.js new file mode 100644 index 0000000000000000000000000000000000000000..21e10fb8037f59475510b2821fcf7432c9459a4a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/VerificationMode.js @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +class VerificationMode { + constructor(times) { + this.doTimes = times; + } + times(count) { + if (count !== this.doTimes) { + throw Error(`expect ${count} actual ${this.doTimes}`); + } + } + never() { + if (this.doTimes !== 0) { + throw Error(`expect 0 actual ${this.doTimes}`); + } + } + once() { + if (this.doTimes !== 1) { + throw Error(`expect 1 actual ${this.doTimes}`); + } + } + atLeast(count) { + if (count > this.doTimes) { + throw Error('failed ' + count + ' greater than the actual execution times of method'); + } + } + atMost(count) { + if (count < this.doTimes) { + throw Error('failed ' + count + ' less than the actual execution times of method'); + } + } +} +export default VerificationMode; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/VerificationMode.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/VerificationMode.ts new file mode 100644 index 0000000000000000000000000000000000000000..93d976ce73b2fbde199d31b3efd30eb3544179d8 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/mock/VerificationMode.ts @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +class VerificationMode { + + private doTimes: number + + constructor(times: number) { + this.doTimes = times; + } + + times(count: number) { + if(count !== this.doTimes) { + throw Error(`expect ${count} actual ${this.doTimes}`); + } + } + + never() { + if (this.doTimes !== 0) { + throw Error(`expect 0 actual ${this.doTimes}`); + } + } + + once() { + if (this.doTimes !== 1) { + throw Error(`expect 1 actual ${this.doTimes}`); + } + } + + atLeast(count: number) { + if (count > this.doTimes) { + throw Error('failed ' + count + ' greater than the actual execution times of method'); + } + } + + atMost(count: number) { + if (count < this.doTimes) { + throw Error('failed ' + count + ' less than the actual execution times of method'); + } + } +} + +export default VerificationMode; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/module.json b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/module.json new file mode 100644 index 0000000000000000000000000000000000000000..384ae72f9bd2353fea8a5c9c5d6696ab5e67cb21 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/main/module.json @@ -0,0 +1,22 @@ +{ + "app": { + "bundleName": "com.example.hamock", + "debug": true, + "versionCode": 1000000, + "versionName": "1.0.0", + "minAPIVersion": 9, + "targetAPIVersion": 9, + "apiReleaseType": "Release" + }, + "module": { + "name": "hamock", + "type": "har", + "deviceTypes": [ + "default", + "tablet", + "tv", + "wearable", + "car" + ] + } +} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/res/schemas/mock-config-json5-schema.json b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/res/schemas/mock-config-json5-schema.json new file mode 100644 index 0000000000000000000000000000000000000000..96036325a316d827cb9fcb6908b3de23c53b4b79 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hamock@1.0.0/oh_modules/@ohos/hamock/src/res/schemas/mock-config-json5-schema.json @@ -0,0 +1,25 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "JSON schema for mock-config.json5 file", + "definitions": { + "sourceRedirection": { + "description": "A source redirection for mocked module.", + "type": "object", + "required": [ + "source" + ], + "properties": { + "source": { + "type": "string", + "maxLength": 128, + "minLength": 1 + } + } + } + }, + "patternProperties": { + ".+": { + "$ref": "#/definitions/sourceRedirection" + } + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/BuildProfile.ets b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/BuildProfile.ets new file mode 100644 index 0000000000000000000000000000000000000000..3da4b66931cbd61e2b904640696d5dfcfe78a1bc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/BuildProfile.ets @@ -0,0 +1,17 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const HAR_VERSION = '1.0.24'; +export const BUILD_MODE_NAME = 'debug'; +export const DEBUG = true; +export const TARGET_NAME = 'default'; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly HAR_VERSION = HAR_VERSION; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; + static readonly TARGET_NAME = TARGET_NAME; +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/CHANGELOG.md b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..3953f9d91b50454be0c6a192dc464d5ab3b68545 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/CHANGELOG.md @@ -0,0 +1,33 @@ +### 1.0.24 +- 提示信息优化 +### 1.0.23 +- 断言错误提示信息优化 +### 1.0.22 +- mock五参数失败问题修复 +### 1.0.21 +- mock支持多参数 +- describe中异步函数抛出日志信息 +- 修复多测试套时,执行单个测试套会打印其他测试套的日志信息 +## 1.0.14 +- 堆栈信息打印到cmd +## 1.0.15 +- 支持获取测试代码的失败堆栈信息 +- mock代码迁移至harmock包 +- 适配arkts语法 +- 修复覆盖率数据容易截断的bug +## 1.0.16 +- 修改覆盖率文件生成功能 +- 修改静态方法无法ignoreMock函数 + ## 1.0.17 +- 修改not断言失败提示日志 +- 自定义错误message信息 +- 添加xdescribe, xit API功能 + ## 1.0.18 +- 添加全局变量存储API get set +- 自定义断言功能 +## 1.0.18-rc.0 +添加框架worker执行能力 +## 1.0.19 +规范日志格式 +# 1.0.20 +代码告警整改 \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/LICENSE b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4947287f7b5ccb5d1e8b7b2d3aa5d89f322c160d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/README.md b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c7a16a7eead030baf267502401d19228ed14c27c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/README.md @@ -0,0 +1,229 @@ +
Hypium
+
A unit test framework for OpenHarmonyOS application
+ +## Hypium是什么? +*** +- Hypium是OpenHarmony上的测试框架,提供测试用例编写、执行、结果显示能力,用于OpenHarmony系统应用接口以及应用界面测试。 +- Hypium结构化模型:hypium工程主要由List.test.js与TestCase.test.js组成。 +``` +rootProject // Hypium工程根目录 +├── moduleA +│   ├── src +│      ├── main // 被测试应用目录 +│      ├── ohosTest // 测试用例目录 +│         ├── js/ets +│            └── test +│               └── List.test.js // 测试用例加载脚本,ets目录下为.ets后缀 +│               └── TestCase.test.js // 测试用例脚本,ets目录下为.ets后缀 +└── moduleB + ... +│               └── List.test.js // 测试用例加载脚本,ets目录下为.ets后缀 +│               └── TestCase.test.js // 测试用例脚本,ets目录下为.ets后缀 +``` + +## 安装使用 + +- 方式一 +```javascript +ohpm i @ohos/hypium +``` +- 方式二 +*** +- 在DevEco Studio内使用Hypium +- 工程级oh-package.json5内配置: +```json +"dependencies": { + "@ohos/hypium": "1.0.24" +} +``` +注: +hypium服务于OpenHarmonyOS应用对外接口测试、系统对外接口测试(SDK中接口),完成HAP自动化测试。详细指导: +[Deveco Studio](https://developer.harmonyos.com/cn/develop/deveco-studio) + +#### 通用语法 + +- 测试用例采用业内通用语法,describe代表一个测试套, it代表一条用例。 + +| No. | API | 功能说明 | +|-----| ----------------- |------------------------------------------------------------------------| +| 1 | describe | 定义一个测试套,支持两个参数:测试套名称和测试套函数。其中测试套函数不能是异步函数 | +| 2 | beforeAll | 在测试套内定义一个预置条件,在所有测试用例开始前执行且仅执行一次,支持一个参数:预置动作函数。 | +| 3 | beforeEach | 在测试套内定义一个单元预置条件,在每条测试用例开始前执行,执行次数与it定义的测试用例数一致,支持一个参数:预置动作函数。 | +| 4 | afterEach | 在测试套内定义一个单元清理条件,在每条测试用例结束后执行,执行次数与it定义的测试用例数一致,支持一个参数:清理动作函数。 | +| 5 | afterAll | 在测试套内定义一个清理条件,在所有测试用例结束后执行且仅执行一次,支持一个参数:清理动作函数。 | +| 6 | beforeItSpecified | @since1.0.15在测试套内定义一个单元预置条件,仅在指定测试用例开始前执行,支持两个参数:单个用例名称或用例名称数组、预置动作函数。 | +| 7 | afterItSpecified | @since1.0.15在测试套内定义一个单元清理条件,仅在指定测试用例结束后执行,支持两个参数:单个用例名称或用例名称数组、清理动作函数 | +| 8 | it | 定义一条测试用例,支持三个参数:用例名称,过滤参数和用例函数。 | +| 9 | expect | 支持bool类型判断等多种断言方法。 | +| 10 | xdescribe | @since1.0.17定义一个跳过的测试套,支持两个参数:测试套名称和测试套函数。 | +| 11 | xit | @since1.0.17定义一条跳过的测试用例,支持三个参数:用例名称,过滤参数和用例函数。 | | + +#### 断言库 + +- 示例代码: + +```javascript + expect(${actualvalue}).assertX(${expectvalue}) +``` + +- 断言功能列表: + +| No. | API | 功能说明 | +| :--- | :------------------------------- | ---------------------------------------------------------------------------------------------- | +| 1 | assertClose | 检验actualvalue和expectvalue(0)的接近程度是否是expectValue(1) | +| 2 | assertContain | 检验actualvalue中是否包含expectvalue | +| 3 | assertDeepEquals | @since1.0.4 检验actualvalue和expectvalue(0)是否是同一个对象 | +| 4 | assertEqual | 检验actualvalue是否等于expectvalue[0] | +| 5 | assertFail | 抛出一个错误 | +| 6 | assertFalse | 检验actualvalue是否是false | +| 7 | assertTrue | 检验actualvalue是否是true | +| 8 | assertInstanceOf | 检验actualvalue是否是expectvalue类型 | +| 9 | assertLarger | 检验actualvalue是否大于expectvalue | +| 10 | assertLess | 检验actualvalue是否小于expectvalue | +| 11 | assertNaN | @since1.0.4 检验actualvalue是否是NaN | +| 12 | assertNegUnlimited | @since1.0.4 检验actualvalue是否等于Number.NEGATIVE_INFINITY | +| 13 | assertNull | 检验actualvalue是否是null | +| 14 | assertPosUnlimited | @since1.0.4 检验actualvalue是否等于Number.POSITIVE_INFINITY | +| 15 | assertPromiseIsPending | @since1.0.4 检验actualvalue是否处于Pending状态【actualvalue为promse对象】 | +| 16 | assertPromiseIsRejected | @since1.0.4 检验actualvalue是否处于Rejected状态【同15】 | +| 17 | assertPromiseIsRejectedWith | @since1.0.4 检验actualvalue是否处于Rejected状态,并且比较执行的结果值【同15】 | +| 18 | assertPromiseIsRejectedWithError | @since1.0.4 检验actualvalue是否处于Rejected状态并有异常,同时比较异常的类型和message值【同15】 | +| 19 | assertPromiseIsResolved | @since1.0.4 检验actualvalue是否处于Resolved状态【同15】 | +| 20 | assertPromiseIsResolvedWith | @since1.0.4 检验actualvalue是否处于Resolved状态,并且比较执行的结果值【同15】 | +| 21 | assertThrowError | 检验actualvalue抛出Error内容是否是expectValue | +| 22 | assertUndefined | 检验actualvalue是否是undefined | +| 23 | not | @since1.0.4 断言结果取反 | +| 24 | message | @since1.0.17自定义断言异常信息 | + +示例代码: + +```javascript + import { describe, it, expect } from '@ohos/hypium'; + + export default async function assertCloseTest() { + describe('assertClose', function () { + it('assertClose_success', 0, function () { + let a = 100; + let b = 0.1; + expect(a).assertClose(99, b); + }) + }) + } +``` + +#### 公共系统能力 + +| No. | API | 功能描述 | +| ---- | ------------------------------------------------------- | ------------------------------------------------------------ | +| 1 | existKeyword(keyword: string, timeout: number): boolean | @since1.0.3 hilog日志中查找指定字段是否存在,keyword是待查找关键字,timeout为设置的查找时间 | +| 2 | actionStart(tag: string): void | @since1.0.3 cmd窗口输出开始tag | +| 3 | actionEnd(tag: string): void | @since1.0.3 cmd窗口输出结束tag | + +示例代码: + +```javascript +import { describe, it, expect, SysTestKit} from '@ohos/hypium'; + +export default function existKeywordTest() { + describe('existKeywordTest', function () { + it('existKeyword',DEFAULT, async function () { + console.info("HelloTest"); + let isExist = await SysTestKit.existKeyword('HelloTest'); + console.info('isExist ------>' + isExist); + }) + }) +} +``` +```javascript +import { describe, it, expect, SysTestKit} from '@ohos/hypium'; + +export default function actionTest() { + describe('actionTest', function () { + it('existKeyword',DEFAULT, async function () { + let tag = '[MyTest]'; + SysTestKit.actionStart(tag); + //do something + SysTestKit.actionEnd(tag); + }) + }) +} +``` + +#### 专项能力 + +- 测试用例属性筛选能力:hypium支持根据用例属性筛选执行指定测试用例,使用方式是先在测试用例上标记用例属性后,再在测试应用的启动shell命令后新增" -s ${Key} ${Value}"。 + +| Key | 含义说明 | Value取值范围 | +| -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | +| level | 用例级别 | "0","1","2","3","4", 例如:-s level 1 | +| size | 用例粒度 | "small","medium","large", 例如:-s size small | +| testType | 用例测试类型 | "function","performance","power","reliability","security","global","compatibility","user","standard","safety","resilience", 例如:-s testType function | + +示例代码 + +```javascript +import { describe, it, expect, TestType, Size, Level } from '@ohos/hypium'; + +export default function attributeTest() { + describe('attributeTest', function () { + it("testAttributeIt", TestType.FUNCTION | Size.SMALLTEST | Level.LEVEL0, function () { + console.info('Hello Test'); + }) + }) +} +``` + +示例命令 +```shell +XX -s level 1 -s size small -s testType function +``` +该命令的作用是:筛选测试应用中同时满足a)用例级别是1 b)用例粒度是small c)用例测试类型是function 三个条件的用例执行。 + +- 测试套/测试用例名称筛选能力(测试套与用例名称用“#”号连接,多个用“,”英文逗号分隔) + +| Key | 含义说明 | Value取值范围 | +| -------- | ----------------------- | -------------------------------------------------------------------------------------------- | +| class | 指定要执行的测试套&用例 | ${describeName}#${itName},${describeName} , 例如:-s class attributeTest#testAttributeIt | +| notClass | 指定不执行的测试套&用例 | ${describeName}#${itName},${describeName} , 例如:-s notClass attributeTest#testAttributeIt | + +示例命令 +```shell +XX -s class attributeTest#testAttributeIt,abilityTest#testAbilityIt +``` +该命令的作用是:筛选测试应用中attributeTest测试套下的testAttributeIt测试用例,abilityTest测试套下的testAbilityIt测试用例,只执行这两条用例。 + +- 其他能力 + +| 能力项 | Key | 含义说明 | Value取值范围 | +| ------------ | ------- | ---------------------------- | ---------------------------------------------- | +| 随机执行能力 | random | 测试套&测试用例随机执行 | true, 不传参默认为false, 例如:-s random true | +| 空跑能力 | dryRun | 显示要执行的测试用例信息全集 | true , 不传参默认为false,例如:-s dryRun true | +| 异步超时能力 | timeout | 异步用例执行的超时时间 | 正整数 , 单位ms,例如:-s timeout 5000 | + +##### 约束限制 +随机执行能力和空跑能力从npm包1.0.3版本开始支持 + +#### Mock能力 + +##### 约束限制 + +单元测试框架Mock能力从npm包[1.0.1版本](https://repo.harmonyos.com/#/cn/application/atomService/@ohos%2Fhypium/v/1.0.1)开始支持 + +## 约束 + +*** + 本模块首批接口从OpenHarmony SDK API version 8开始支持。 + +## Hypium开放能力隐私声明 + +- 我们如何收集和使用您的个人信息 + 您在使用集成了Hypium开放能力的测试应用时,Hypium不会处理您的个人信息。 +- SDK处理的个人信息 + 不涉及。 +- SDK集成第三方服务声明 + 不涉及。 +- SDK数据安全保护 + 不涉及。 +- SDK版本更新声明 + 为了向您提供最新的服务,我们会不时更新Hypium版本。我们强烈建议开发者集成使用最新版本的Hypium。 + diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/build-profile.json5 b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..e6773f9f5d76a66d6d19fddc9c6ddb3f5621d3b1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/build-profile.json5 @@ -0,0 +1,31 @@ +{ + "apiType": "stageMode", + "buildOption": { + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + }, + "consumerFiles": [ + "./consumer-rules.txt" + ] + } + }, + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest" + } + ] +} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/consumer-rules.txt b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/consumer-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/hvigorfile.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..805c5d7f6809c51cff0b4adcc1142979f8f864b6 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/hvigorfile.ts @@ -0,0 +1,6 @@ +import { harTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: harTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.d.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7272b5fa839a2cd510d0c70d517bb6800133dba2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.d.ts @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export const DEFAULT = 0B0000 + +export const when: when; + +export enum TestType { + FUNCTION = 0B1, + PERFORMANCE = 0B1 << 1, + POWER = 0B1 << 2, + RELIABILITY = 0B1 << 3, + SECURITY = 0B1 << 4, + GLOBAL = 0B1 << 5, + COMPATIBILITY = 0B1 << 6, + USER = 0B1 << 7, + STANDARD = 0B1 << 8, + SAFETY = 0B1 << 9, + RESILIENCE = 0B1 << 10 +} + +export enum Size { + SMALLTEST = 0B1 << 16, + MEDIUMTEST = 0B1 << 17, + LARGETEST = 0B1 << 18 +} + +export enum Level { + LEVEL0 = 0B1 << 24, + LEVEL1 = 0B1 << 25, + LEVEL2 = 0B1 << 26, + LEVEL3 = 0B1 << 27, + LEVEL4 = 0B1 << 28 +} +export { xdescribe, xit, describe, it } from './index'; + + + +export function beforeItSpecified(testCaseNames: Array | string, callback: Function): void + +export function afterItSpecified(testCaseNames: Array | string, callback: Function): void + +export function beforeEach(callback: Function): void + +export function afterEach(callback: Function): void + +export function beforeAll(callback: Function): void + +export function afterAll(callback: Function): void + + +export interface Assert { + assertClose(expectValue: number, precision: number): void + assertContain(expectValue: any): void + assertEqual(expectValue: any): void + assertFail(): void + assertFalse(): void + assertTrue(): void + assertInstanceOf(expectValue: string): void + assertLarger(expectValue: number): void + assertLess(expectValue: number): void + assertNull(): void + assertThrowError(expectValue: string | Function): void + assertUndefined(): void + assertLargerOrEqual(expectValue: number): void + assertLessOrEqual(expectValue: number): void + assertNaN(): void + assertNegUnlimited(): void + assertPosUnlimited(): void + not(): Assert; + assertDeepEquals(expectValue: any): void + assertPromiseIsPending(): Promise + assertPromiseIsRejected(): Promise + assertPromiseIsRejectedWith(expectValue?: any): Promise + assertPromiseIsRejectedWithError(...expectValue): Promise + assertPromiseIsResolved(): Promise + assertPromiseIsResolvedWith(expectValue?: any): Promise + message(msg: string): Assert +} + +export function expect(actualValue?: any): Assert + +export class ArgumentMatchers { + static any; + static anyString; + static anyBoolean; + static anyNumber; + static anyObj; + static anyFunction; + static matchRegexs(Regex: RegExp): void +} + +declare interface when { + afterReturn(value: any): any + afterReturnNothing(): undefined + afterAction(action: any): any + afterThrow(e_msg: string): string + (argMatchers?: any): when; +} + +export interface VerificationMode { + times(count: Number): void + never(): void + once(): void + atLeast(count: Number): void + atMost(count: Number): void +} + +export class MockKit { + constructor() + mockFunc(obj: Object, func: Function): Function + mockObject(obj: Object): Object + verify(methodName: String, argsArray: Array): VerificationMode + ignoreMock(obj: Object, func: Function): void + clear(obj: Object): void + clearAll(): void +} + +export class SysTestKit { + static getDescribeName(): string; + static getItName(): string; + static getItAttribute(): TestType | Size | Level + static actionStart(tag: string): void + static actionEnd(tag: string): void + static existKeyword(keyword: string, timeout?: number): boolean +} + +export class Hypium { + static setData(data: { [key: string]: any }): void + static setTimeConfig(systemTime: any) + static hypiumTest(abilityDelegator: any, abilityDelegatorArguments: any, testsuite: Function): void + static set(key: string, value: any): void + static get(key: string): any + static registerAssert(customAssertion: Function): void + static unregisterAssert(customAssertion: string | Function): void + static hypiumWorkerTest(abilityDelegator: Object, abilityDelegatorArguments: Object, testsuite: Function, workerPort: Object): void; + static hypiumInitWorkers(abilityDelegator: Object, scriptURL: string, workerNum: number, params: Object): void; +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.ets b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.ets new file mode 100644 index 0000000000000000000000000000000000000000..98b0ec55fe1e1d9d0a9b8a4eacc0a3c1a8091d1e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.ets @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Core from './src/main/core'; +import {TestType, Size, Level, DEFAULT} from './src/main/Constant'; +import DataDriver from './src/main/module/config/DataDriver'; +import ExpectExtend from './src/main/module/assert/ExpectExtend'; +import OhReport from './src/main/module/report/OhReport'; +export { xdescribe, xit, describe, it } from './index.ts'; + +export declare class Hypium { + static setData(data: Object): void + static setTimeConfig(systemTime: Object): void + static hypiumTest(abilityDelegator: Object, abilityDelegatorArguments: Object, testsuite: Function): void + static set(key: string, value: Object): void + static get(key: string): Object + static registerAssert(customAssertion: Function): void + static unregisterAssert(customAssertion: string | Function): void + static hypiumWorkerTest(abilityDelegator: Object, abilityDelegatorArguments: Object, + testsuite: Function, workerPort: Object): void; + static hypiumInitWorkers(abilityDelegator: Object, scriptURL: string, workerNum: number, params: Object): void; +} + +export { + Core, + DataDriver, + ExpectExtend, + OhReport, + TestType, + Size, + Level, + DEFAULT +}; + +type allExpectType = Object | undefined | null + +export declare function beforeItSpecified(testCaseNames: Array | string, callback: Function): void + +export declare function afterItSpecified(testCaseNames: Array | string, callback: Function): void + +export declare function beforeEach(callback: Function): void + +export declare function afterEach(callback: Function): void + +export declare function beforeAll(callback: Function): void + +export declare function afterAll(callback: Function): void + +export declare interface Assert { + assertClose(expectValue: number, precision: number): void + assertContain(expectValue: allExpectType): void + assertEqual(expectValue: allExpectType): void + assertFail(): void + assertFalse(): void + assertTrue(): void + assertInstanceOf(expectValue: string): void + assertLarger(expectValue: number): void + assertLess(expectValue: number): void + assertNull(): void + assertThrowError(expectValue: string | Function): void + assertUndefined(): void + assertLargerOrEqual(expectValue: number):void + assertLessOrEqual(expectValue: number):void + assertNaN():void + assertNegUnlimited(): void + assertPosUnlimited(): void + not(): Assert; + assertDeepEquals(expectValue: allExpectType):void + assertPromiseIsPending(): Promise + assertPromiseIsRejected(): Promise + assertPromiseIsRejectedWith(expectValue?: allExpectType): Promise + assertPromiseIsRejectedWithError(...expectValue: allExpectType[]): Promise + assertPromiseIsResolved(): Promise + assertPromiseIsResolvedWith(expectValue?: allExpectType): Promise + message(msg: string): Assert +} + +export declare function expect(actualValue?: allExpectType): Assert + +export declare class ArgumentMatchers { + public static any: allExpectType; + public static anyString: string; + public static anyBoolean: Boolean; + public static anyNumber: Number; + public static anyObj: Object; + public static anyFunction: Function; + public static matchRegexs(regex: RegExp): void +} + +declare interface whenResult { + afterReturn: (value: allExpectType) => allExpectType + afterReturnNothing: () => undefined + afterAction: (action: allExpectType) => allExpectType + afterThrow: (e_msg: string) => string +} + +export declare function when(f:Function): (...args: (allExpectType | void)[]) => whenResult + +export declare interface VerificationMode { + times(count: Number): void + never(): void + once(): void + atLeast(count: Number): void + atMost(count: Number): void +} + +export declare class MockKit { + constructor() + mockFunc(obj: Object, func: Function): Function + mockObject(obj: Object): Object + verify(methodName: String, argsArray: Array): VerificationMode + ignoreMock(obj: Object, func: Function): void + clear(obj: Object): void + clearAll(): void +} + +export declare class SysTestKit { + static getDescribeName(): string; + static getItName(): string; + static getItAttribute(): TestType | Size | Level + static actionStart(tag: string): void + static actionEnd(tag: string): void + static existKeyword(keyword: string, timeout?: number): boolean +} + diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.js new file mode 100644 index 0000000000000000000000000000000000000000..02d06d9d1b4b478aa2aec70ba3a73a5e123c98db --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.js @@ -0,0 +1,261 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License") + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Core from './src/main/core'; +import { DEFAULT, TestType, Size, Level, TAG, PrintTag } from './src/main/Constant'; +import DataDriver from './src/main/module/config/DataDriver'; +import ExpectExtend from './src/main/module/assert/ExpectExtend'; +import OhReport from './src/main/module/report/OhReport'; +import SysTestKit from './src/main/module/kit/SysTestKit'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, beforeItSpecified, afterItSpecified, xdescribe, xit } from './src/main/interface'; +import { MockKit, when } from './src/main/module/mock/MockKit'; +import ArgumentMatchers from './src/main/module/mock/ArgumentMatchers'; +import worker from '@ohos.worker'; + +class Hypium { + static context = new Map(); + static setData(data) { + const core = Core.getInstance(); + const dataDriver = new DataDriver({ data }); + core.addService('dataDriver', dataDriver); + } + + static setTimeConfig(systemTime) { + SysTestKit.systemTime = systemTime; + } + + static set(key, value) { + Hypium.context.set(key, value); + } + + static get(key) { + return Hypium.context.get(key); + } + + static hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) { + const core = Core.getInstance(); + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }); + core.addService('expect', expectExtend); + const ohReport = new OhReport({ + 'delegator': abilityDelegator, + 'abilityDelegatorArguments': abilityDelegatorArguments + }); + SysTestKit.delegator = abilityDelegator; + core.addService('report', ohReport); + core.init(); + core.subscribeEvent('spec', ohReport); + core.subscribeEvent('suite', ohReport); + core.subscribeEvent('task', ohReport); + const configService = core.getDefaultService('config'); + if (abilityDelegatorArguments !== null) { + let testParameters = configService.translateParams(abilityDelegatorArguments.parameters); + console.info(`${TAG}parameters:${JSON.stringify(testParameters)}`); + configService.setConfig(testParameters); + } + testsuite(); + core.execute(abilityDelegator); + } + static async hypiumInitWorkers(abilityDelegator, scriptURL, workerNum = 8, params) { + console.info(`${TAG}, hypiumInitWorkers call,${scriptURL}`); + let workerPromiseArray = []; + + // 开始统计时间 + let startTime = await SysTestKit.getRealTime(); + for (let i = 0; i < workerNum; i++) { + // 创建worker线程 + const workerPromise = Hypium.createWorkerPromise(scriptURL, i, params); + workerPromiseArray.push(workerPromise); + } + const ret = {total: 0, failure: 0, error: 0, pass: 0, ignore: 0, duration: 0}; + Promise.all(workerPromiseArray).then(async (items) => { + console.info(`${TAG}, all result from workers, ${JSON.stringify(items)}`); + let allItemList = new Array(); + // 统计执行结果 + Hypium.handleWorkerTestResult(ret, allItemList, items); + console.info(`${TAG}, all it result, ${JSON.stringify(allItemList)}`); + // 统计用例执行结果 + const retResult = {total: 0, failure: 0, error: 0, pass: 0, ignore: 0, duration: 0}; + // 标记用例执行结果 + Hypium.configWorkerItTestResult(retResult, allItemList); + // 打印用例结果 + Hypium.printWorkerTestResult(abilityDelegator, allItemList); + // 用例执行完成统计时间 + let endTime = await SysTestKit.getRealTime(); + const taskConsuming = endTime - startTime; + const message = + `\n${PrintTag.OHOS_REPORT_ALL_RESULT}: stream=Test run: runTimes: ${ret.total},total: ${retResult.total}, Failure: ${retResult.failure}, Error: ${retResult.error}, Pass: ${retResult.pass}, Ignore: ${retResult.ignore}` + + `\n${PrintTag.OHOS_REPORT_ALL_CODE}: ${retResult.failure > 0 || retResult.error > 0 ? -1 : 0}` + + `\n${PrintTag.OHOS_REPORT_ALL_STATUS}: taskconsuming=${taskConsuming > 0 ? taskConsuming : ret.duration}`; + abilityDelegator.printSync(message); + console.info(`${TAG}, [end] you worker test`); + abilityDelegator.finishTest('you worker test finished!!!', 0, () => {}); + }).catch((e) => { + console.info(`${TAG}, [end] error you worker test, ${JSON.stringify(e)}`); + abilityDelegator.finishTest('you worker test error finished!!!', 0, () => {}); + }).finally(() => { + console.info(`${TAG}, all promise finally end`); + }); + } + // 创建worker线程 + static createWorkerPromise(scriptURL, i, params) { + console.info(`${TAG}, createWorkerPromiser, ${scriptURL}, ${i}`); + const workerPromise = new Promise((resolve, reject) => { + const workerInstance = new worker.ThreadWorker(scriptURL, {name: `worker_${i}`}); + console.info(`${TAG}, send data to worker`); + // 发送数据到worker线程中 + workerInstance.postMessage(params); + workerInstance.onmessage = function (e) { + let currentThreadName = e.data?.currentThreadName; + console.info(`${TAG}, receview data from ${currentThreadName}, ${JSON.stringify(e.data)}`); + // + resolve(e.data?.summary); + console.info(`${TAG}, ${currentThreadName} finish`); + workerInstance.terminate(); + }; + workerInstance.onerror = function (e) { + console.info(`${TAG}, worker error, ${JSON.stringify(e)}`); + reject(e); + workerInstance.terminate(); + }; + workerInstance.onmessageerror = function (e) { + console.info(`${TAG}, worker message error, ${JSON.stringify(e)}`); + reject(e); + workerInstance.terminate(); + }; + }); + return workerPromise; + } + static handleWorkerTestResult(ret, allItemList, items) { + console.info(`${TAG}, handleWorkerTestResult, ${JSON.stringify(items)}`); + for (const {total, failure, error, pass, ignore, duration, itItemList} of items) { + ret.total += total; + ret.failure += failure; + ret.error += error; + ret.pass += pass; + ret.ignore += ignore; + ret.duration += duration; + Hypium.handleItResult(allItemList, itItemList); + } + } + static handleItResult(allItemList, itItemList) { + // 遍历所有的用例结果统计最终结果 + for (const {currentThreadName, description, result} of itItemList) { + let item = allItemList.find((it) => it.description === description); + if (item) { + let itResult = item.result; + // 当在worker中出现一次failure就标记为failure, 出现一次error就标记为error, 所有线程都pass才标记为pass + if (itResult === 0) { + item.result = result; + item.currentThreadName = currentThreadName; + } + } else { + let it = { + description: description, + currentThreadName: currentThreadName, + result: result + }; + allItemList.push(it); + } + } + } + static configWorkerItTestResult(retResult, allItemList) { + console.info(`${TAG}, configWorkerItTestResult, ${JSON.stringify(allItemList)}`); + for (const {currentThreadName, description, result} of allItemList) { + console.info(`${TAG}, description, ${description}, result,${result}`); + retResult.total ++; + if (result === 0) { + retResult.pass ++; + } else if (result === -1) { + retResult.error ++; + } else if (result === -2) { + retResult.failure ++; + } else { + retResult.ignore ++; + } + } + } + static printWorkerTestResult(abilityDelegator, allItemList) { + console.info(`${TAG}, printWorkerTestResult, ${JSON.stringify(allItemList)}`); + let index = 1; + for (const {currentThreadName, description, result} of allItemList) { + console.info(`${TAG}, description print, ${description}, result,${result}`); + let itArray = description.split('#'); + let des; + let itName; + if (itArray.length > 1) { + des = itArray[0]; + itName = itArray[1]; + } else if (itArray.length > 1) { + des = itArray[0]; + itName = itArray[0]; + } else { + des = 'undefined'; + itName = 'undefined'; + } + + let msg = `\n${PrintTag.OHOS_REPORT_WORKER_STATUS}: class=${des}`; + msg += `\n${PrintTag.OHOS_REPORT_WORKER_STATUS}: test=${itName}`; + msg += `\n${PrintTag.OHOS_REPORT_WORKER_STATUS}: current=${index}`; + msg += `\n${PrintTag.OHOS_REPORT_WORKER_STATUS}: CODE=${result}`; + abilityDelegator.printSync(msg); + index ++; + } + } + static hypiumWorkerTest(abilityDelegator, abilityDelegatorArguments, testsuite, workerPort) { + console.info(`${TAG}, hypiumWorkerTest call`); + SysTestKit.workerPort = workerPort; + let currentWorkerName = workerPort.name; + console.info(`${TAG}, hypiumWorkerTest_currentWorkerName: ${currentWorkerName}`); + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite); + + } + + static registerAssert(customAssertion) { + const core = Core.getInstance(); + const expectService = core.getDefaultService('expect'); + let matchers = {}; + matchers[customAssertion.name] = customAssertion; + expectService.addMatchers(matchers); + expectService.customMatchers.push(customAssertion.name); + console.info(`${TAG}success to register the ${customAssertion.name}`); + } + + static unregisterAssert(customAssertion) { + const core = Core.getInstance(); + const expectService = core.getDefaultService('expect'); + let customAssertionName = typeof customAssertion === 'function' ? customAssertion.name : customAssertion; + expectService.removeMatchers(customAssertionName); + console.info(`${TAG}success to unregister the ${customAssertionName}`); + } + +} + +export { + Hypium, + Core, + DEFAULT, + TestType, + Size, + Level, + DataDriver, + ExpectExtend, + OhReport, + SysTestKit, + describe, beforeAll, beforeEach, afterEach, afterAll, it, expect, beforeItSpecified, afterItSpecified, xdescribe, xit, + MockKit, when, + ArgumentMatchers +}; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..b7082ebc98214b58d41e8681791809f1aee48f12 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/index.ts @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { TestType, Size, Level } from "./src/main/Constant"; + +export declare function xdescribe(testSuiteName: string, func: Function): void; + +export declare namespace xdescribe { + function reason(reason: string): any; +}; + +export declare function describe(testSuiteName: string, func: Function): void; + +export declare function xit(testCaseName: string, attribute: TestType | Size | Level, func: Function): void; + +export declare namespace xit { + function reason(reason: string): any; +}; + +export declare function it(testCaseName: string, attribute: TestType | Size | Level, func: Function): void; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/obfuscation-rules.txt b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/oh-package.json5 b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..fe6fe8a55daa47d4cfb0857724ae8bda70715258 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/oh-package.json5 @@ -0,0 +1 @@ +{"name":"@ohos/hypium","version":"1.0.24","description":"A unit test framework for OpenHarmony application","main":"index.js","keywords":["测试框架","except","mock"],"author":"huawei","license":"Apache-2.0","repository":"https://gitee.com/openharmony/testfwk_arkxtest","homepage":"https://gitee.com/openharmony/testfwk_arkxtest","dependencies":{},"metadata":{"sourceRoots":["./src/main"],"debug":true,"useNormalizedOHMUrl":false},"compatibleSdkVersion":17,"compatibleSdkType":"HarmonyOS","obfuscated":false} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/Constant.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/Constant.js new file mode 100644 index 0000000000000000000000000000000000000000..dfd6b24a225a46f3ef21f1b9b3d6239e87449de9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/Constant.js @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * define the testcase type : TestType, Size , Level + */ +export const TAG = '[Hypium]'; + +export const DEFAULT = 0B0000; + +export class PrintTag { + static OHOS_REPORT_WORKER_STATUS = 'OHOS_REPORT_WORKER_STATUS'; + static OHOS_REPORT_ALL_RESULT = 'OHOS_REPORT_ALL_RESULT'; + static OHOS_REPORT_ALL_CODE = 'OHOS_REPORT_ALL_CODE'; + static OHOS_REPORT_ALL_STATUS = 'OHOS_REPORT_ALL_STATUS'; + static OHOS_REPORT_RESULT = 'OHOS_REPORT_RESULT'; + static OHOS_REPORT_CODE = 'OHOS_REPORT_CODE'; + static OHOS_REPORT_STATUS = 'OHOS_REPORT_STATUS'; + static OHOS_REPORT_SUM = 'OHOS_REPORT_SUM'; + static OHOS_REPORT_STATUS_CODE = 'OHOS_REPORT_STATUS_CODE'; +}; + +export class TestType { + static FUNCTION = 0B1; + static PERFORMANCE = 0B1 << 1; + static POWER = 0B1 << 2; + static RELIABILITY = 0B1 << 3; + static SECURITY = 0B1 << 4; + static GLOBAL = 0B1 << 5; + static COMPATIBILITY = 0B1 << 6; + static USER = 0B1 << 7; + static STANDARD = 0B1 << 8; + static SAFETY = 0B1 << 9; + static RESILIENCE = 0B1 << 10; +}; + +export class Size { + static SMALLTEST = 0B1 << 16; + static MEDIUMTEST = 0B1 << 17; + static LARGETEST = 0B1 << 18; +}; + +export class Level { + static LEVEL0 = 0B1 << 24; + static LEVEL1 = 0B1 << 25; + static LEVEL2 = 0B1 << 26; + static LEVEL3 = 0B1 << 27; + static LEVEL4 = 0B1 << 28; +}; + +export const TESTTYPE = { + 'function': 1, + 'performance': 1 << 1, + 'power': 1 << 2, + 'reliability': 1 << 3, + 'security': 1 << 4, + 'global': 1 << 5, + 'compatibility': 1 << 6, + 'user': 1 << 7, + 'standard': 1 << 8, + 'safety': 1 << 9, + 'resilience': 1 << 10, +}; + +export const LEVEL = { + '0': 1 << 24, + '1': 1 << 25, + '2': 1 << 26, + '3': 1 << 27, + '4': 1 << 28, +}; + +export const SIZE = { + 'small': 1 << 16, + 'medium': 1 << 17, + 'large': 1 << 18, +}; + +export const KEYSET = [ + '-s class', '-s notClass', '-s suite', '-s itName', + '-s level', '-s testType', '-s size', '-s timeout', + '-s dryRun', '-s random', '-s breakOnError', '-s stress', + '-s coverage', '-s skipMessage', '-s runSkipped', + 'class', 'notClass', 'suite', 'itName', + 'level', 'testType', 'size', 'timeout', 'dryRun', 'random', + 'breakOnError', 'stress', 'coverage', 'skipMessage', 'runSkipped' +]; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/core.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/core.js new file mode 100644 index 0000000000000000000000000000000000000000..cfcb5f17287208f5e6869b4248faf6c9093002d9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/core.js @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {SuiteService, SpecService, ExpectService, ReportService} from './service'; +import {ConfigService} from './module/config/configService'; +import {SpecEvent, TaskEvent, SuiteEvent} from './event'; + +/** + * core service for execute testcase. + */ +class Core { + static getInstance() { + if (!this.instance) { + this.instance = new Core(); + } + return this.instance; + } + + constructor() { + this.instance = null; + this.services = { + suite: {}, + spec: {}, + config: {}, + expect: {}, + log: {}, + report: {} + + }; + this.events = { + suite: {}, + spec: {}, + task: {} + }; + } + + addService(name, service) { + let serviceObj = {}; + if (!this.services[name]) { + this.services[name] = serviceObj; + } else { + serviceObj = this.services[name]; + } + serviceObj[service.id] = service; + } + + getDefaultService(name) { + return this.services[name].default; + } + + getServices(name) { + return this.services[name]; + } + + registerEvent(serviceName, event) { + let eventObj = {}; + if (!this.events[serviceName]) { + this.events[serviceName] = eventObj; + } else { + eventObj = this.events[serviceName]; + } + eventObj[event.id] = event; + } + + unRegisterEvent(serviceName, eventID) { + const eventObj = this.events[serviceName]; + if (eventObj) { + delete eventObj[eventID]; + } + } + + subscribeEvent(serviceName, serviceObj) { + const eventObj = this.events[serviceName]; + if (eventObj) { + for (const attr in eventObj) { + eventObj[attr]['subscribeEvent'](serviceObj); + } + } + } + + async fireEvents(serviceName, eventName) { + const eventObj = this.events[serviceName]; + if (!eventObj) { + return; + } + for (const attr in eventObj) { + await eventObj[attr][eventName](); + } + } + + addToGlobal(apis) { + if (typeof globalThis !== 'undefined') { + for (let api in apis) { + globalThis[api] = apis[api]; + } + } + for (const api in apis) { + this[api] = apis[api]; + } + } + + init() { + this.addService('suite', new SuiteService({id: 'default'})); + this.addService('spec', new SpecService({id: 'default'})); + this.addService('expect', new ExpectService({id: 'default'})); + this.addService('report', new ReportService({id: 'default'})); + this.addService('config', new ConfigService({id: 'default'})); + this.registerEvent('task', new TaskEvent({id: 'default', coreContext: this})); + this.registerEvent('suite', new SuiteEvent({id: 'default', coreContext: this})); + this.registerEvent('spec', new SpecEvent({id: 'default', coreContext: this})); + this.subscribeEvent('spec', this.getDefaultService('report')); + this.subscribeEvent('suite', this.getDefaultService('report')); + this.subscribeEvent('task', this.getDefaultService('report')); + const context = this; + for (const key in this.services) { + const serviceObj = this.services[key]; + for (const serviceID in serviceObj) { + const service = serviceObj[serviceID]; + service.init(context); + + if (typeof service.apis !== 'function') { + continue; + } + const apis = service.apis(); + if (apis) { + this.addToGlobal(apis); + } + } + } + } + + execute(abilityDelegator) { + const suiteService = this.getDefaultService('suite'); + const configService = this.getDefaultService('config'); + if (configService['dryRun'] === 'true') { + (async function () { + await suiteService.dryRun(abilityDelegator); + })(); + return; + } + setTimeout(() => { + suiteService.execute(); + }, 10); + } +} + +export default Core; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/event.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/event.js new file mode 100644 index 0000000000000000000000000000000000000000..3be0211f01646c9c269c2425cbee82c87ac6d9ea --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/event.js @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class SpecEvent { + constructor(attr) { + this.id = attr.id; + this.coreContext = attr.context; + this.eventMonitors = []; + } + + subscribeEvent(service) { + this.eventMonitors.push(service); + } + + async specStart() { + for (const monitor of this.eventMonitors) { + await monitor['specStart'](); + } + } + + async specDone() { + for (const monitor of this.eventMonitors) { + await monitor['specDone'](); + } + } +} + +class SuiteEvent { + constructor(attr) { + this.id = attr.id; + this.suiteContext = attr.coreContext; + this.eventMonitors = []; + } + + subscribeEvent(service) { + this.eventMonitors.push(service); + } + + async suiteStart() { + for (const monitor of this.eventMonitors) { + await monitor['suiteStart'](); + } + } + + async suiteDone() { + for (const monitor of this.eventMonitors) { + await monitor['suiteDone'](); + } + } +} + +class TaskEvent { + constructor(attr) { + this.id = attr.id; + this.coreContext = attr.coreContext; + this.eventMonitors = []; + } + + subscribeEvent(service) { + this.eventMonitors.push(service); + } + + async taskStart() { + for (const monitor of this.eventMonitors) { + await monitor['taskStart'](); + } + } + + async taskDone() { + for (const monitor of this.eventMonitors) { + await monitor['taskDone'](); + } + } + + incorrectFormat() { + for (const monitor of this.eventMonitors) { + monitor['incorrectFormat'](); + } + } + + incorrectTestSuiteFormat() { + for (const monitor of this.eventMonitors) { + monitor.incorrectTestSuiteFormat(); + } + } +} + +export { SpecEvent, TaskEvent, SuiteEvent }; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/interface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/interface.js new file mode 100644 index 0000000000000000000000000000000000000000..1bf43509ac3f70f1275e1da79388e1511e72a3f9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/interface.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import Core from './core'; + +const core = Core.getInstance(); + +const describe = function (desc, func) { + return Reflect.has(core, 'describe') ? core.describe(desc, func) : (desc, func) => { }; +}; +const it = function (desc, filter, func) { + return Reflect.has(core, 'it') ? core.it(desc, filter, func) : (desc, filter, func) => { }; +}; +const beforeItSpecified = function (itDescs, func) { + return Reflect.has(core, 'beforeItSpecified') ? core.beforeItSpecified(itDescs, func) : (itDescs, func) => { }; +}; + +const afterItSpecified = function (itDescs, func) { + return Reflect.has(core, 'afterItSpecified') ? core.afterItSpecified(itDescs, func) : (itDescs, func) => { }; +}; +const beforeEach = function (func) { + return Reflect.has(core, 'beforeEach') ? core.beforeEach(func) : (func) => { }; +}; +const afterEach = function (func) { + return Reflect.has(core, 'afterEach') ? core.afterEach(func) : (func) => { }; +}; +const beforeAll = function (func) { + return Reflect.has(core, 'beforeAll') ? core.beforeAll(func) : (func) => { }; +}; +const afterAll = function (func) { + return Reflect.has(core, 'afterAll') ? core.afterAll(func) : (func) => { }; +}; +const expect = function (actualValue) { + return Reflect.has(core, 'expect') ? core.expect(actualValue) : (actualValue) => { }; +}; + +const xdescribe = function (desc, func) { + return Reflect.has(core, 'xdescribe') ? core.xdescribe(desc, func, null) : (desc, func, reason) => { }; +}; +xdescribe.reason = (reason) => { + return (desc, func) => { + return Reflect.has(core, 'xdescribe') ? core.xdescribe(desc, func, reason) : (desc, func, reason) => { }; + }; +}; +const xit = function (desc, filter, func) { + return Reflect.has(core, 'xit') ? core.xit(desc, filter, func, null) : (desc, filter, func, reason) => { }; +}; +xit.reason = (reason) => { + return (desc, filter, func) => { + return Reflect.has(core, 'xit') ? core.xit(desc, filter, func, reason) : (desc, filter, func, reason) => { }; + }; +}; + +export { + describe, it, beforeAll, beforeEach, afterEach, afterAll, expect, beforeItSpecified, afterItSpecified, xdescribe, xit +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module.json b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module.json new file mode 100644 index 0000000000000000000000000000000000000000..7182854b6b51762c613e16b935c4d9e31087681a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module.json @@ -0,0 +1,30 @@ +{ + "app": { + "bundleName": "com.hypium.myapplication", + "debug": true, + "versionCode": 1000000, + "versionName": "1.0.0", + "minAPIVersion": 50005017, + "targetAPIVersion": 50005017, + "apiReleaseType": "Release", + "compileSdkVersion": "5.0.5.165", + "compileSdkType": "HarmonyOS", + "appEnvironments": [], + "bundleType": "app", + "buildMode": "debug" + }, + "module": { + "name": "hypium", + "type": "har", + "deviceTypes": [ + "default", + "tablet", + "2in1" + ], + "packageName": "@ohos/hypium", + "installationFree": false, + "virtualMachine": "ark12.0.6.0", + "compileMode": "esmodule", + "dependencies": [] + } +} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/ExpectExtend.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/ExpectExtend.js new file mode 100644 index 0000000000000000000000000000000000000000..d087755a446eebb4583db6137c71f56a6b3db724 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/ExpectExtend.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import assertNull from './assertNull'; +import assertClose from './assertClose'; +import assertContain from './assertContain'; +import assertLess from './assertLess'; +import assertLarger from './assertLarger'; +import assertFail from './assertFail'; +import assertUndefined from './assertUndefined'; +import assertFalse from './assertFalse'; +import assertInstanceOf from './assertInstanceOf'; +import assertThrowError from './assertThrowError'; +import assertLargerOrEqual from './assertLargerOrEqual'; +import assertLessOrEqual from './assertLessOrEqual'; +import assertNaN from './assertNaN'; +import assertNegUnlimited from './assertNegUnlimited'; +import assertPosUnlimited from './assertPosUnlimited'; +import assertDeepEquals from './deepEquals/assertDeepEquals'; +import assertPromiseIsPending from './assertPromiseIsPending'; +import assertPromiseIsRejected from './assertPromiseIsRejected'; +import assertPromiseIsRejectedWith from './assertPromiseIsRejectedWith'; +import assertPromiseIsRejectedWithError from './assertPromiseIsRejectedWithError'; +import assertPromiseIsResolved from './assertPromiseIsResolved'; +import assertPromiseIsResolvedWith from './assertPromiseIsResolvedWith'; +class ExpectExtend { + constructor(attr) { + this.id = attr.id; + this.matchers = {}; + } + + extendsMatchers() { + this.matchers.assertNull = assertNull; + this.matchers.assertClose = assertClose; + this.matchers.assertContain = assertContain; + this.matchers.assertLess = assertLess; + this.matchers.assertLarger = assertLarger; + this.matchers.assertFail = assertFail; + this.matchers.assertUndefined = assertUndefined; + this.matchers.assertFalse = assertFalse; + this.matchers.assertInstanceOf = assertInstanceOf; + this.matchers.assertThrowError = assertThrowError; + this.matchers.assertLargerOrEqual = assertLargerOrEqual; + this.matchers.assertLessOrEqual = assertLessOrEqual; + this.matchers.assertNaN = assertNaN; + this.matchers.assertNegUnlimited = assertNegUnlimited; + this.matchers.assertPosUnlimited = assertPosUnlimited; + this.matchers.assertDeepEquals = assertDeepEquals; + this.matchers.assertPromiseIsPending = assertPromiseIsPending; + this.matchers.assertPromiseIsRejected = assertPromiseIsRejected; + this.matchers.assertPromiseIsRejectedWith = assertPromiseIsRejectedWith; + this.matchers.assertPromiseIsRejectedWithError = assertPromiseIsRejectedWithError; + this.matchers.assertPromiseIsResolved = assertPromiseIsResolved; + this.matchers.assertPromiseIsResolvedWith = assertPromiseIsResolvedWith; + } + + init(coreContext) { + this.coreContext = coreContext; + this.extendsMatchers(); + const expectService = this.coreContext.getDefaultService('expect'); + expectService.addMatchers(this.matchers); + } + + apis() { + return { + 'expect': function (actualValue) { + return this.coreContext.getDefaultService('expect').expect(actualValue); + } + }; + } +} + +export default ExpectExtend; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertClose.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertClose.js new file mode 100644 index 0000000000000000000000000000000000000000..7e692bd25f1c026640978a042a9c9f64b0e8d5d3 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertClose.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertClose(actualValue, expected) { + if (actualValue === null && expected[0] === null) { + throw new Error('actualValue and expected can not be both null!!!'); + } + let result; + let diff = Math.abs(expected[0] - actualValue); + let actualAbs = Math.abs(actualValue); + if ((actualAbs - 0) === 0) { + if ((diff - 0) === 0) { + result = true; + } else { + result = false; + } + } else if (diff / actualAbs < expected[1]) { + result = true; + } else { + result = false; + } + return { + pass: result, + message: '|' + actualValue + ' - ' + expected[0] + '|/' + actualValue + ' is not less than ' + expected[1] + }; +} + +export default assertClose; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertContain.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertContain.js new file mode 100644 index 0000000000000000000000000000000000000000..7fba0d9755503e5e926f6c1a4e425e0d1cf47570 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertContain.js @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertContain(actualValue, expect) { + let result = false; + if (Object.prototype.toString.call(actualValue).indexOf('Array')) { + for (let i in actualValue) { + if (actualValue[i] == expect[0]) { + result = true; + } + } + } + let type = Object.prototype.toString.call(actualValue); + if (type === '[object String]') { + result = actualValue.indexOf(expect[0]) >= 0; + } + return { + pass: result, + message: 'expect false, ' + actualValue + ' do not have ' + expect[0] + }; +} + +export default assertContain; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertFail.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertFail.js new file mode 100644 index 0000000000000000000000000000000000000000..8ab4ac5caef712c75c4eac49dfbbb91d33669d9a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertFail.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertFail() { + return { + pass: false, + message: 'fail ' + }; +} + +export default assertFail; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertFalse.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertFalse.js new file mode 100644 index 0000000000000000000000000000000000000000..c5008e94f4b2ce13ed35b604811793c76b542347 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertFalse.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertFalse(actualValue) { + return { + pass: (actualValue) === false, + message: 'expect false, actualValue is ' + actualValue + }; +} + +export default assertFalse; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertInstanceOf.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertInstanceOf.js new file mode 100644 index 0000000000000000000000000000000000000000..1e11b93f7251c67f5455c5007cd7be268aa53b32 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertInstanceOf.js @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertInstanceOf(actualValue, expected) { + if (Object.prototype.toString.call(actualValue) == '[object ' + expected[0] + ']') { + return { + pass: true + }; + } else { + return { + pass: false, + message: actualValue + ' is ' + Object.prototype.toString.call(actualValue) + 'not ' + expected[0] + }; + } +} + +export default assertInstanceOf; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLarger.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLarger.js new file mode 100644 index 0000000000000000000000000000000000000000..a74f4a8cedaf3add9c2dc2d3799081a83198732f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLarger.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertLarger(actualValue, expected) { + return { + pass: (actualValue) > expected[0], + message: (actualValue) + ' is not larger than ' + expected[0] + }; +} + +export default assertLarger; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLargerOrEqual.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLargerOrEqual.js new file mode 100644 index 0000000000000000000000000000000000000000..e847e6c217364b7f69c173c66fb98d10efc45ef1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLargerOrEqual.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertLargerOrEqual(actualValue, expected) { + return { + pass: (actualValue) >= expected[0], + message: (actualValue) + ' is not larger than ' + expected[0] + }; +} + +export default assertLargerOrEqual; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLess.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLess.js new file mode 100644 index 0000000000000000000000000000000000000000..17e84b0abaeb20804048a5a15c19e0603634846d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLess.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertLess(actualValue, expected) { + return { + pass: (actualValue) < expected[0], + message: (actualValue) + ' is not less than ' + expected[0] + }; +} + +export default assertLess; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLessOrEqual.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLessOrEqual.js new file mode 100644 index 0000000000000000000000000000000000000000..f754f97ffa9d24e7852efe2423a1dd35d448af82 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertLessOrEqual.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertLessOrEqual(actualValue, expected) { + return { + pass: (actualValue) <= expected[0], + message: (actualValue) + ' is not less than ' + expected[0] + }; +} + +export default assertLessOrEqual; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertNaN.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertNaN.js new file mode 100644 index 0000000000000000000000000000000000000000..8d45d6a93b86c5ed325a68b32ff014835993a58e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertNaN.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertNaN(actualValue) { + return { + pass: actualValue !== actualValue, + message: 'expect NaN, actualValue is ' + actualValue + }; +} + +export default assertNaN; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertNegUnlimited.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertNegUnlimited.js new file mode 100644 index 0000000000000000000000000000000000000000..ceac555afc826e057970e6cfe9c73b322c672aa2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertNegUnlimited.js @@ -0,0 +1,23 @@ +/* +* Copyright (c) 2022 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +function assertNegUnlimited(actualValue) { + return { + pass: actualValue === Number.NEGATIVE_INFINITY, + message: 'Expected actualValue not to be -Infinity. actualValue is,' + actualValue + }; +} + +export default assertNegUnlimited; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertNull.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertNull.js new file mode 100644 index 0000000000000000000000000000000000000000..53a7bad827323a98d3302a4e7eea679551b459c5 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertNull.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertNull(actualValue) { + return { + pass: (actualValue) === null, + message: 'expect null, actualValue is ' + (actualValue) + }; +} + +export default assertNull; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPosUnlimited.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPosUnlimited.js new file mode 100644 index 0000000000000000000000000000000000000000..6e68c0e2b6c499f4dc3dd56c13e9ea1073a3c54c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPosUnlimited.js @@ -0,0 +1,23 @@ +/* +* Copyright (c) 2022 Huawei Device Co., Ltd. +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +function assertPosUnlimited(actualValue) { + return { + pass: actualValue === Number.POSITIVE_INFINITY, + message: 'Expected actualValue is POSITIVE_INFINITY. actualValue is,' + actualValue + }; +} + +export default assertPosUnlimited; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsPending.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsPending.js new file mode 100644 index 0000000000000000000000000000000000000000..7e2ca2ce14d50c39554fc1157d6d4eb9329d5c39 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsPending.js @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import isPromiseLike from './isPromiseLike'; + +function assertPromiseIsPending(actualPromise) { + if (!isPromiseLike(actualPromise)) { + return Promise.reject().then(function () { + }, function () { + return {pass: false, message: 'Expected not be called on a promise.'}; + }); + } + const helper = {}; + return Promise.race([actualPromise, Promise.resolve(helper)]).then( + function (got) { + return helper === got ? {pass: true, message: 'actualValue is isPending'} + : { + pass: false, + message: 'expect isPending, actualValue is resolve' + }; + }, + function () { + return { + pass: false + , message: 'expect isPending, actualValue is reject' + }; + }); +} + +export default assertPromiseIsPending; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsRejected.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsRejected.js new file mode 100644 index 0000000000000000000000000000000000000000..380075a369a84d6856e7f2db366f704e04302a8d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsRejected.js @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import isPromiseLike from './isPromiseLike'; + +function assertPromiseIsRejected(actualPromise) { + if (!isPromiseLike(actualPromise)) { + return Promise.reject().then(function () { + }, function () { + return {pass: false, message: 'Expected not be called on a promise.'}; + }); + } + return actualPromise.then( + function (got) { + return { + pass: false, + message: 'expect isRejected, but actualValue is resolve' + }; + }, + function () { + return {pass: true, message: 'actualValue is isRejected'}; + } + ); +} + +export default assertPromiseIsRejected; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsRejectedWith.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsRejectedWith.js new file mode 100644 index 0000000000000000000000000000000000000000..8179589d5580f9c305d2200b4b197d64ac9d53ae --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsRejectedWith.js @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import isPromiseLike from './isPromiseLike'; + +function assertPromiseIsRejectedWith(actualPromise, expectedValue) { + + if (!isPromiseLike(actualPromise)) { + return Promise.reject().then(function () { + }, function () { + return {pass: false, message: 'Expected not be called on a promise.'}; + }); + } + + function tips(passed) { + return ('Expected a promise ' + (passed ? 'not ' : '') + + 'to be rejected with ' + JSON.stringify(expectedValue[0])); + } + + return actualPromise.then( + function (got) { + return { + pass: false, + message: tips(false) + ' but actualValue is resolve' + }; + }, + function (actualValue) { + if (JSON.stringify(actualValue) == JSON.stringify(expectedValue[0])) { + return { + pass: true, + message: 'actualValue was rejected with ' + JSON.stringify(actualValue) + '.' + }; + } else { + return { + pass: false, + message: tips(false) + ' but it was rejected with ' + JSON.stringify(actualValue) + '.' + }; + } + } + ); +} + +export default assertPromiseIsRejectedWith; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsRejectedWithError.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsRejectedWithError.js new file mode 100644 index 0000000000000000000000000000000000000000..e515535394f1d9c455902aa9cc0cd324a3d2e71b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsRejectedWithError.js @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import isPromiseLike from './isPromiseLike'; + +function assertPromiseIsRejectedWithError(actualPromise, expectedValue) { + if (!isPromiseLike(actualPromise)) { + return Promise.reject().then(function () { + }, function () { + return {pass: false, message: 'Expected not be called on a promise.'}; + }); + } + return actualPromise.then( + function (got) { + return { + pass: false, + message: 'Expected a promise to be rejected but actualValue is resolve' + }; + }, + function (actualValue) { + return matchError(actualValue, expectedValue); + } + ); + +} + +function matchError(actualValue, expectedValue) { + if (expectedValue.length == 1 && typeof expectedValue[0] === 'function') { + if (expectedValue[0].name === actualValue.__proto__.name) { + return {pass: true, message: 'actual error type is ' + actualValue.name + '.'}; + } + return {pass: false, message: `except error type is ${expectedValue[0].name},but actual is ${actualValue.name}.`}; + } + + if (expectedValue.length == 1 && typeof expectedValue[0] === 'string') { + if (expectedValue[0] === actualValue.message) { + return {pass: true, message: `actual error message is ${actualValue.message}.`}; + } + return {pass: false, message: `except error message ${expectedValue[0]},but actual is ${actualValue.message}.`}; + } + + if (expectedValue.length == 1) { + return {pass: false, message: 'When only one parameter, it should be error type or error message.'}; + } + + if (expectedValue.length == 2 && typeof expectedValue[0] === 'function' && expectedValue[0].name === actualValue.name) { + if (typeof expectedValue[1] === 'string' && actualValue.message === expectedValue[1]) { + return {pass: true, message: 'actual error message is ' + actualValue.message + '.'}; + } + return {pass: false, message: `except error message is ${expectedValue[1]},but actual is ${actualValue.message}.`}; + } + + if (expectedValue.length == 2 && typeof expectedValue[0] === 'function' && expectedValue[0].name !== actualValue.name) { + if (typeof expectedValue[1] === 'string' && actualValue.message === expectedValue[1]) { + return {pass: false, message: `except error type is ${expectedValue[0].name},but actual is ${actualValue.name}.`}; + } + return {pass: false, message: 'except error type and message are incorrect.'}; + } + if (expectedValue.length > 2) { + return {pass: false, message: 'Up to two parameters are supported.'}; + } + return {pass: true, message: 'not equal type'}; +} + +export default assertPromiseIsRejectedWithError; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsResolved.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsResolved.js new file mode 100644 index 0000000000000000000000000000000000000000..86f559c32873f27b95d635452d760029de0ed657 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsResolved.js @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import isPromiseLike from './isPromiseLike'; + +function assertPromiseIsResolved(actualPromise) { + if (!isPromiseLike(actualPromise)) { + return Promise.reject().then(function () { + }, function () { + return {pass: false, message: 'Expected not be called on a promise.'}; + }); + } + + return actualPromise.then( + function (got) { + return {pass: true, message: 'actualValue is isResolved'}; + }, + function (rej) { + return { + pass: false, + message: 'Expected a promise to be resolved but it was ' + + 'rejected with ' + JSON.stringify(rej) + '.' + }; + } + ); +} + +export default assertPromiseIsResolved; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsResolvedWith.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsResolvedWith.js new file mode 100644 index 0000000000000000000000000000000000000000..c6f0ef68fde5b04a589a9fa3c6e2ab2b39acf4d3 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertPromiseIsResolvedWith.js @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import isPromiseLike from './isPromiseLike'; + +function assertPromiseIsResolvedWith(actualPromise, expectedValue) { + if (!isPromiseLike(actualPromise)) { + return Promise.reject().then(function () { + }, function () { + return {pass: false, message: 'Expected not be called on a promise.'}; + }); + } + + function tips(passed) { + return ( + 'Expected a promise ' + (passed ? 'not ' : '') + + 'to be resolved with ' + JSON.stringify(expectedValue[0])); + } + + return actualPromise.then( + function (got) { + if (JSON.stringify(got) == JSON.stringify(expectedValue[0])) { + return { + pass: true, + message: 'actualValue was resolved with ' + JSON.stringify(got) + '.' + }; + } + return { + pass: false, + message: tips(false) + ' but it was resolved with ' + + JSON.stringify(got) + '.' + }; + }, + function (rej) { + return { + pass: false, + message: tips(false) + ' but it was rejected with ' + JSON.stringify(rej) + '.' + }; + } + ); +} + +export default assertPromiseIsResolvedWith; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertThrowError.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertThrowError.js new file mode 100644 index 0000000000000000000000000000000000000000..876099808124955ce525d7450d79584c774f4887 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertThrowError.js @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertThrowError(actualValue, expected) { + let result = false; + let message = ''; + let err; + if (typeof actualValue !== 'function') { + throw new Error('actualValue is not a function'); + } + try { + actualValue(); + return { + pass: result, + message: ' An error is not thrown while it is expected!' + }; + } catch (e) { + err = e; + } + if (err instanceof Error) { + let type = typeof expected[0]; + if (type === 'function') { + result = err.constructor.name === expected[0].name; + message = 'expected throw failed , ' + err.constructor.name + ' is not ' + expected[0].name; + } else if (type === 'string') { + result = err.message.includes(expected[0]); + message = 'expected throw failed , ' + err.message + ' is not ' + expected[0]; + } + } + return { + pass: result, + message: message + }; +} + +export default assertThrowError; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertUndefined.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertUndefined.js new file mode 100644 index 0000000000000000000000000000000000000000..61f092d715dd1630297518b59ff13ef0940991e1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/assertUndefined.js @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function assertUndefined(actualValue) { + return { + pass: undefined === (actualValue), + message: 'expect Undefined, actualValue is ' + (actualValue) + }; +} + +export default assertUndefined; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/deepEquals/DeepTypeUtils.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/deepEquals/DeepTypeUtils.js new file mode 100644 index 0000000000000000000000000000000000000000..916824d9cb77a75d1fb35bc3500d7598bfc73e80 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/deepEquals/DeepTypeUtils.js @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class DeepTypeUtils { + static getType(value) { + return Object.prototype.toString.apply(value); + } + static isA(typeName, value) { + return this.getType(value) === '[object ' + typeName + ']'; + } + static isAsymmetricEqualityTester(obj) { + return obj ? this.isA('Function', obj.asymmetricMatch) : false; + } + + /** + * 是否是function + * @param value + */ + static isFunction(value) { + return this.isA('Function', value); + } + + /** + * 是否是undefined + * @param obj + */ + static isUndefined(obj) { + return obj === void 0; + } + + /** + * 是否是Node + * @param obj + */ + static isDomNode(obj) { + return obj !== null && + typeof obj === 'object' && + typeof obj.nodeType === 'number' && + typeof obj.nodeName === 'string'; + } + + /** + * 是否是promise对象 + * @param obj + */ + static isPromise(obj) { + return !!obj && obj.constructor === Promise; + }; + /** + * 是否是map对象 + * @param obj + */ + static isMap(obj) { + return ( + obj !== null && + typeof obj !== 'undefined' && + obj.constructor === Map + ); + } + + /** + * 是否是set对象 + * @param obj 对象 + */ + static isSet(obj) { + return ( + obj !== null && + typeof obj !== 'undefined' && + obj.constructor === Set + ); + } + + /** + * 对象是否有key属性 + * @param obj 对象 + * @param key 对象属性名称 + */ + static has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); + } + + /** + * 获取对象的自有属性 + * @param obj 对象 + * @param isArray 是否是数组,[object Array] + */ + static keys(obj, isArray) { + const extraKeys = []; + // 获取对象所有属性 + const allKeys = this.getAllKeys(obj); + if (!isArray) { + return allKeys; + } + if (allKeys.length === 0) { + return allKeys; + } + for (const k of allKeys) { + if (typeof k === 'symbol' || !/^[0-9]+$/.test(k)) { + extraKeys.push(k); + } + } + return extraKeys; + } + + /** + * 获取obj对象的所有属性 + * @param obj obj对象 + */ + static getAllKeys(obj) { + const keys = []; + for (let key in obj) { + if (this.has(obj, key)) { + keys.push(key); + } + } + const symbols = Object.getOwnPropertySymbols(obj); + for (const sym of symbols) { + // obj.propertyIsEnumerable(sym) + if (Object.prototype.propertyIsEnumerable.call(obj, sym)) { + keys.push(sym); + } + } + return keys; + } + +} +export default DeepTypeUtils; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/deepEquals/assertDeepEquals.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/deepEquals/assertDeepEquals.js new file mode 100644 index 0000000000000000000000000000000000000000..f20758a7f3059b7eb7083ea01c4d5fa9afe90719 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/deepEquals/assertDeepEquals.js @@ -0,0 +1,433 @@ +/* + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import DeepTypeUtils from './DeepTypeUtils'; +function assertDeepEquals(actualValue, expected) { + let result = eq(actualValue, expected[0]); + let msg = logMsg(actualValue, expected[0]); + return { + pass: result, + message: msg + }; +} + +function getMapLog(item) { + let valueStr = ''; + let keyValue = ''; + if (item.length > 1) { + let key = item[0]; + let value = item[1]; + if (value !== value) { + valueStr = value; + } else { + valueStr = JSON.stringify(value); + } + keyValue = JSON.stringify(key); + } + return '[' + keyValue + ',' + valueStr + ']'; +} + +function getArrayLog(item) { + // NAN + if (item !== item) { + return item; + } + if (item === undefined) { + return 'undefined'; + } + return JSON.stringify(item); +} + + +function getCollectionLog(data) { + // 获取a的对象名称 + let finallyResult = ''; + const aClassName = Object.prototype.toString.call(data); + if (aClassName === '[object Map]') { + let result = Array.from(data); + finallyResult = result.flatMap((item) => { + return getMapLog(item); + }); + } + if (aClassName === '[object Set]') { + let setArray = Array.from(data); + finallyResult = setArray.flatMap((item) => { + return getArrayLog(item); + }); + } + if (aClassName === '[object Array]') { + finallyResult = data.flatMap((item) => { + return getArrayLog(item); + }); + } + return finallyResult; +} + +function getActualValueLog(actualValue) { + // 获取a的对象名称 + const aClassName = Object.prototype.toString.call(actualValue); + let actualMsg = ''; + if (aClassName === '[object Function]') { + actualMsg = 'actualValue Function'; + } else if (aClassName === '[object Promise]') { + actualMsg = 'actualValue Promise'; + } else if (aClassName === '[object Map]') { + let finallyResult = getCollectionLog(actualValue); + actualMsg = '[' + finallyResult + ']'; + } else if (aClassName === '[object Set]') { + let flatMapResult = getCollectionLog(actualValue); + actualMsg = '[' + flatMapResult + ']'; + } else if (aClassName === '[object Array]') { + let flatMapResult = getCollectionLog(actualValue); + actualMsg = '[' + flatMapResult + ']'; + } else if (aClassName === '[object RegExp]') { + actualMsg = JSON.stringify(actualValue.source.replace('\\', '')); + } else if (aClassName === '[object BigInt]') { + actualMsg = actualValue; + } else if (aClassName === '[object Error]') { + actualMsg = actualValue.message; + } else if (aClassName === '[object ArrayBuffer]') { + actualMsg = actualValue.byteLength; + } + else { + // NAN + if (actualValue !== actualValue) { + actualMsg = actualValue.toString(); + } else { + actualMsg = JSON.stringify(actualValue); + } + } + return actualMsg; +} + +function getExpectedLog(expected) { + const bClassName = Object.prototype.toString.call(expected); + let expectMsg = ''; + if (bClassName === '[object Function]') { + expectMsg = 'expected Function'; + } else if (bClassName === '[object Promise]') { + expectMsg = 'expected Promise'; + } else if (bClassName === '[object Map]') { + let finallyResult = getCollectionLog(expected); + expectMsg = '[' + finallyResult + ']'; + } else if (bClassName === '[object Set]') { + let flatMapResult = getCollectionLog(expected); + expectMsg = '[' + flatMapResult + ']'; + } else if (bClassName === '[object Array]') { + let flatMapResult = getCollectionLog(expected); + expectMsg = '[' + flatMapResult + ']'; + } else if (bClassName === '[object RegExp]') { + expectMsg = JSON.stringify(expected.source.replace('\\', '')); + } else if (bClassName === '[object BigInt]') { + expectMsg = expected; + } else if (bClassName === '[object Error]') { + expectMsg = expected.message; + } else if (bClassName === '[object ArrayBuffer]') { + expectMsg = expected.byteLength; + } + else { + // NAN + if (expected !== expected) { + expectMsg = expected.toString(); + } else { + expectMsg = JSON.stringify(expected); + } + } + return expectMsg; +} + +/** + * 获取失败显示日志 + * @param actualValue 实际对象 + * @param expected 期待比较对象 + */ +function logMsg(actualValue, expected) { + // 获取a的对象名称 + let actualMsg = getActualValueLog(actualValue); + let expectMsg = getExpectedLog(expected); + + return 'expect ' + actualMsg + ' deep equals ' + expectMsg; +} + +function eq(a, b) { + let result = true; + + if (a === b) { + result = a !== 0 || 1 / a === 1 / b; + return result; + } + + if (a === null || b === null) { + result = a === b; + return result; + } + // 获取a的对象名称 + const aClassName = Object.prototype.toString.call(a); + const bClassName = Object.prototype.toString.call(b); + // 不同类型不同对象 + if (aClassName !== bClassName) { + return false; + } + if (aClassName === '[object String]' || aClassName === '[object Number]' || aClassName === '[object Date]' || + aClassName === '[object Boolean]' || aClassName === '[object ArrayBuffer]' || + aClassName === '[object RegExp]' || aClassName === '[object Error]') { + result = isEqualSampleObj(a, b); + return result; + } + + if (typeof a !== 'object' || typeof b !== 'object') { + return false; + } + + if (DeepTypeUtils.isDomNode(a) || DeepTypeUtils.isPromise(a) || DeepTypeUtils.isFunction(a)) { + result = isEqualNodeOrPromiseOrFunction(a, b); + return result; + } + + if (aClassName === '[object Array]' || aClassName === '[object Map]' || aClassName === '[object Set]') { + result = isEqualCollection(a, b); + return result; + } + + result = isEqualObj(a, b); + return result; +} + +function isEqualNodeOrPromiseOrFunction(a, b) { + let equalNodeOrPromiseOrFunction = true; + if (DeepTypeUtils.isDomNode(a) && DeepTypeUtils.isDomNode(b)) { + const aIsDomNode = DeepTypeUtils.isDomNode(a); + const bIsDomNode = DeepTypeUtils.isDomNode(b); + if (aIsDomNode && bIsDomNode) { + // At first try to use DOM3 method isEqualNode + equalNodeOrPromiseOrFunction = a.isEqualNode(b); + return equalNodeOrPromiseOrFunction; + } + if (aIsDomNode || bIsDomNode) { + equalNodeOrPromiseOrFunction = false; + return false; + } + } + + if (DeepTypeUtils.isPromise(a) && DeepTypeUtils.isPromise(b)) { + const aIsPromise = DeepTypeUtils.isPromise(a); + const bIsPromise = DeepTypeUtils.isPromise(b); + // 俩个Promise对象 + if (aIsPromise && bIsPromise) { + equalNodeOrPromiseOrFunction = a === b; + return a === b; + } + } + if (DeepTypeUtils.isFunction(a) && DeepTypeUtils.isFunction(b)) { + // 俩个函数对象 + const aCtor = a.constructor, + bCtor = b.constructor; + if ( + aCtor !== bCtor && + DeepTypeUtils.isFunction(aCtor) && + DeepTypeUtils.isFunction(bCtor) && + a instanceof aCtor && + b instanceof bCtor && + !(aCtor instanceof aCtor && bCtor instanceof bCtor) + ) { + equalNodeOrPromiseOrFunction = false; + return false; + } + } + return equalNodeOrPromiseOrFunction; +} + +function isEqualCollection(a, b) { + let equalCollection = true; + // 获取a的对象名称 + const aClassName = Object.prototype.toString.call(a); + const bClassName = Object.prototype.toString.call(b); + // 都是数组 + if (aClassName === '[object Array]') { + equalCollection = isEqualArray(a, b); + return equalCollection; + } + + // 都是Map + if (DeepTypeUtils.isMap(a) && DeepTypeUtils.isMap(b)) { + equalCollection = isEqualMap(a, b); + return equalCollection; + } + + // 都是Set + if (DeepTypeUtils.isSet(a) && DeepTypeUtils.isSet(b)) { + equalCollection = isEqualSet(a, b); + return equalCollection; + } + + return true; +} + +function isEqualSampleObj(a, b) { + let equalSampleObj = true; + const aClassName = Object.prototype.toString.call(a); + const bClassName = Object.prototype.toString.call(b); + // 俩个string对象 + if (aClassName === '[object String]') { + equalSampleObj = a === String(b); + return equalSampleObj; + } + // 俩个Number对象 + if (aClassName === '[object Number]') { + // NAN + if (a !== a && b !== b) { + return a === b; + } + equalSampleObj = a !== +a ? b !== +b : a === 0 && b === 0 ? 1 / a === 1 / b : a === +b; + return equalSampleObj; + } + + // 俩个Date对象/ boolean对象 + if (aClassName === '[object Date]' || aClassName === '[object Boolean]') { + equalSampleObj = +a === +b; + return equalSampleObj; + } + + // 俩个ArrayBuffer + if (aClassName === '[object ArrayBuffer]') { + equalSampleObj = eq(new Uint8Array(a), new Uint8Array(b)); + return equalSampleObj; + } + + // 正则表达式 + if (aClassName === '[object RegExp]') { + return ( + a.source === b.source && + a.global === b.global && + a.multiline === b.multiline && + a.ignoreCase === b.ignoreCase + ); + } + + if (a instanceof Error && b instanceof Error) { + equalSampleObj = a.message === b.message; + return equalSampleObj; + } + + return equalSampleObj; +} + +function isEqualObj(a, b) { + let equalObj = true; + const aClassName = Object.prototype.toString.call(a); + const bClassName = Object.prototype.toString.call(b); + const aKeys = DeepTypeUtils.keys(a, aClassName === '[object Array]'); + let size = aKeys.length; + + // 俩个对象属性长度不一致, 俩对象不相同 + if (DeepTypeUtils.keys(b, bClassName === '[object Array]').length !== size) { + return false; + } + + // 俩对象属性数量相同, 递归比较每个属性值得值 + for (const key of aKeys) { + // b 没有 key 属性 + if (!DeepTypeUtils.has(b, key)) { + equalObj = false; + continue; + } + if (!eq(a[key], b[key])) { + equalObj = false; + } + } + return equalObj; +} + +function isEqualArray(a, b) { + let equalArray = true; + const aLength = a.length; + const bLength = b.length; + if (aLength !== bLength) { + // 数组长度不同,不是同一个对象 + return false; + } + for (let i = 0; i < aLength || i < bLength; i++) { + // 递归每一个元素是否相同 + equalArray = eq(i < aLength ? a[i] : void 0, i < bLength ? b[i] : void 0) && equalArray; + } + return equalArray; +} + +function isEqualMap(a, b) { + let equalMap = true; + if (a.size !== b.size) { + return false; + } + const keysA = []; + const keysB = []; + a.forEach(function(valueA, keyA) { + keysA.push(keyA); + }); + b.forEach(function(valueB, keyB) { + keysB.push(keyB); + }); + const mapKeys = [keysA, keysB]; + const cmpKeys = [keysB, keysA]; + for (let i = 0; equalMap && i < mapKeys.length; i++) { + const mapIter = mapKeys[i]; + const cmpIter = cmpKeys[i]; + + for (let j = 0; equalMap && j < mapIter.length; j++) { + const mapKey = mapIter[j]; + const cmpKey = cmpIter[j]; + const mapValueA = a.get(mapKey); + let mapValueB; + if (eq(mapKey, cmpKey)) { + mapValueB = b.get(cmpKey); + } else { + mapValueB = b.get(mapKey); + } + equalMap = eq(mapValueA, mapValueB); + } + } + return equalMap; +} + +function isEqualSet(a, b) { + let equalSet = true; + if (a.size !== b.size) { + return false; + } + const valuesA = []; + a.forEach(function(valueA) { + valuesA.push(valueA); + }); + const valuesB = []; + b.forEach(function(valueB) { + valuesB.push(valueB); + }); + const setPairs = [[valuesA, valuesB], [valuesB, valuesA]]; + for (let i = 0; equalSet && i < setPairs.length; i++) { + const baseValues = setPairs[i][0]; + const otherValues = setPairs[i][1]; + for (const baseValue of baseValues) { + let found = false; + for (let j = 0; !found && j < otherValues.length; j++) { + const otherValue = otherValues[j]; + // 深度比较对象 + found = eq(baseValue, otherValue); + } + equalSet = equalSet && found; + } + } + return equalSet; +} + +export default assertDeepEquals; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/isPromiseLike.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/isPromiseLike.js new file mode 100644 index 0000000000000000000000000000000000000000..f5e771477f04e9aadd6ff204558d74ff9b8e2d05 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/assert/isPromiseLike.js @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +function isPromiseLike(obj) { + return !!obj && isFunction(obj.then); +} + +function isFunction(value) { + return isA('Function', value); +} + +function isA(typeName, value) { + return getType(value) === '[object ' + typeName + ']'; +} + +function getType(value) { + return Object.prototype.toString.apply(value); +} + +export default isPromiseLike; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/config/DataDriver.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/config/DataDriver.js new file mode 100644 index 0000000000000000000000000000000000000000..f86e4e479ad43dae1032e73bbe66ee1307b12d8b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/config/DataDriver.js @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +const SUITES_KEY = 'suites'; +const SPECS_KEY = 'items'; +const DESCRIBE_KEY = 'describe'; +const IT_KEY = 'it'; +const PARAMS_KEY = 'params'; +const STRESS_KEY = 'stress'; + +class ObjectUtils { + static get(object, name, defaultValue) { + let result = defaultValue; + for (const key in object) { + if (key === name) { + return object[key]; + } + } + return result; + } + + static has(object, key) { + return Object.prototype.hasOwnProperty.call(object, key); + } +} + +class DataDriver { + constructor(attr) { + this.id = 'dataDriver'; + this.data = attr.data || {}; + } + + init(coreContext) { + this.coreContext = coreContext; + this.suiteService = this.coreContext.getDefaultService('suite'); + this.specService = this.coreContext.getDefaultService('spec'); + } + + getSpecParamsValue(specs) { + let specParams = []; + let specDesc = this.specService.getCurrentRunningSpec().description; + if (specs === null || specs === undefined) { + return specParams; + } + for (const specItem of specs) { + if (ObjectUtils.has(specItem, IT_KEY) && ObjectUtils.get(specItem, IT_KEY) === specDesc) { + return ObjectUtils.get(specItem, PARAMS_KEY, specParams); + } + } + return specParams; + } + + getSpecParams() { + let specParams = []; + let suiteDesc = this.suiteService.getCurrentRunningSuite().description; + let specDesc = this.specService.getCurrentRunningSpec().description; + let suites = ObjectUtils.get(this.data, SUITES_KEY, []); + for (const suiteItem of suites) { + let describeValue = ObjectUtils.get(suiteItem, DESCRIBE_KEY, ''); + if (ObjectUtils.has(suiteItem, DESCRIBE_KEY) && (typeof describeValue === 'object') && describeValue.constructor === Array && describeValue.includes(suiteDesc)) { + let specs = ObjectUtils.get(suiteItem, SPECS_KEY, []); + return this.getSpecParamsValue(specs); + } + } + return specParams; + } + + getSuiteParams() { + let suiteParams = {}; + let suiteDesc = this.suiteService.getCurrentRunningSuite().description; + let suites = ObjectUtils.get(this.data, SUITES_KEY, []); + for (const suiteItem of suites) { + let describeValue = ObjectUtils.get(suiteItem, DESCRIBE_KEY, []); + if (ObjectUtils.has(suiteItem, DESCRIBE_KEY) && (typeof describeValue === 'object') && describeValue.constructor === Array && describeValue.includes(suiteDesc)) { + suiteParams = Object.assign({}, suiteParams, ObjectUtils.get(suiteItem, PARAMS_KEY, suiteParams)); + } + } + return suiteParams; + } + + getStressNum(specs, specDesc) { + let stress = 1; + if (specs === null || specs === undefined) { + return stress; + } + for (const specItem of specs) { + if (ObjectUtils.has(specItem, IT_KEY) && ObjectUtils.get(specItem, IT_KEY) === specDesc) { + let tempStress = ObjectUtils.get(specItem, STRESS_KEY, stress); + return (Number.isInteger(tempStress) && tempStress >= 1) ? tempStress : stress; + } + } + return stress; + } + + getSpecStress(specDesc) { + let stress = 1; + let suiteDesc = this.suiteService.getCurrentRunningSuite().description; + let suites = ObjectUtils.get(this.data, SUITES_KEY, []); + for (const suiteItem of suites) { + let describeValue = ObjectUtils.get(suiteItem, DESCRIBE_KEY, ''); + if (ObjectUtils.has(suiteItem, DESCRIBE_KEY) && (typeof describeValue === 'object') && describeValue.constructor === Array && describeValue.includes(suiteDesc)) { + let specs = ObjectUtils.get(suiteItem, SPECS_KEY, []); + return this.getStressNum(specs, specDesc); + } + } + return stress; + } + + getSuiteStress(suiteDesc) { + let stress = 1; + let suites = ObjectUtils.get(this.data, SUITES_KEY, []); + for (const suiteItem of suites) { + let describeValue = ObjectUtils.get(suiteItem, DESCRIBE_KEY, []); + if (ObjectUtils.has(suiteItem, DESCRIBE_KEY) && (typeof describeValue === 'object') && describeValue.constructor === Array && describeValue.includes(suiteDesc)) { + let tempStress = ObjectUtils.get(suiteItem, STRESS_KEY, stress); + return (Number.isInteger(tempStress) && tempStress >= 1) ? tempStress : stress; + } + } + return stress; + } +} + +export default DataDriver; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/config/Filter.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/config/Filter.js new file mode 100644 index 0000000000000000000000000000000000000000..52f68560cac73a08a49c54e7f6d43b228f05f11c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/config/Filter.js @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { LEVEL, SIZE, TESTTYPE } from '../../Constant'; + +class ClassFilter { + constructor(suiteName, itName, params) { + this.suiteName = suiteName; + this.itName = itName; + this.params = params; + } + + filterSuite() { + return !this.params.split(',').map(item => item.split('#')[0]).map(item => item == this.suiteName).reduce((pre, cur) => pre || cur, false); + } + + filterIt() { + let classArray = this.params.split(',') || []; + let suiteFilterResult = classArray.filter(item => !item.includes('#')).map(item => item == this.suiteName).reduce((pre, cur) => pre || cur, false); + let itFilterResult = classArray.filter(item => item.includes('#')).map(item => item == (this.suiteName + '#' + this.itName)).reduce((pre, cur) => pre || cur, false); + return !(suiteFilterResult || itFilterResult); + } +} + +class NotClassFilter { + constructor(suiteName, itName, params) { + this.suiteName = suiteName; + this.itName = itName; + this.params = params; + } + + filterSuite() { + return this.params.split(',').map(item => item == this.suiteName).reduce((pre, cur) => pre || cur, false); + } + + filterIt() { + return this.params.split(',').some(item => item == (this.suiteName + '#' + this.itName)); + } +} + +class SuiteAndItNameFilter { + constructor(suiteName, itName, params) { + this.suiteName = suiteName; + this.itName = itName; + this.params = params; + } + + filterSuite() { + return !this.params.split(',').map(item => item == this.suiteName).reduce((pre, cur) => pre || cur, false); + } + + filterIt() { + return !this.params.split(',').map(item => item == this.itName).reduce((pre, cur) => pre || cur, false); + } +} + + +class TestTypesFilter { + constructor(suiteName, itName, fi, params) { + this.suiteName = suiteName; + this.itName = itName; + this.params = params; + this.fi = fi; + } + + filterIt() { + return !((this.params === (this.fi & this.params)) || this.fi === 0); + } +} + +class NestFilter { + filterNestName(targetSuiteArray, targetSpecArray, suiteStack, desc) { + let targetSuiteName = ''; + for (let key in suiteStack) { + targetSuiteName = targetSuiteName + '.' + suiteStack[key].description; + } + targetSuiteName = targetSuiteName.substring(2); + const targetSpecName = targetSuiteName + '#' + desc; + let isFilter = true; + if (targetSpecArray.includes(targetSpecName)) { + return false; + } + for (let index in targetSuiteArray) { + if (targetSuiteName.startsWith(targetSuiteArray[index])) { + return false; + } + } + return isFilter; + } + + filterNotClass(notClass, suiteStack, desc) { + let filterNotClass = false; + if (notClass != null) { + let notClassArray = notClass.split(','); + let targetSuiteName = ''; + for (let key in suiteStack) { + targetSuiteName = targetSuiteName + '.' + suiteStack[key].description; + } + targetSuiteName = targetSuiteName.substring(2); + const targetSpecName = targetSuiteName + '#' + desc; + if (notClassArray.includes(targetSpecName) || notClassArray.some(key => targetSpecName.startsWith(key))) { + filterNotClass = true; + } + } + return filterNotClass; + } + + filterLevelOrSizeOrTestType(level, size, testType, filter) { + let result = false; + if (filter === 0 || filter === '0') { + return result; + } + if (level == null && size == null && testType == null) { + return result; + } + if (level != null) { + let levelFilter = LEVEL[`${level}`]; + result = result || filter === levelFilter; + } + if (size != null) { + let sizeFilter = SIZE[`${size}`]; + result = result || filter === sizeFilter; + } + if (testType != null) { + let testTypeFilter = TESTTYPE[`${testType}`]; + result = result || filter === testTypeFilter; + } + return !result; + } +} +export { ClassFilter, NotClassFilter, SuiteAndItNameFilter, TestTypesFilter, NestFilter }; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/config/configService.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/config/configService.js new file mode 100644 index 0000000000000000000000000000000000000000..17674d8cf7e2343bcb4a14ad47eb11cd03c15aac --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/config/configService.js @@ -0,0 +1,299 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ClassFilter, NotClassFilter, SuiteAndItNameFilter, TestTypesFilter, NestFilter } from './Filter'; +import { TAG, TESTTYPE, LEVEL, SIZE, KEYSET } from '../../Constant'; +const STRESS_RULE = /^[1-9]\d*$/; + +class ConfigService { + constructor(attr) { + this.id = attr.id; + this.supportAsync = true; // 默认异步处理测试用例 + this.random = false; + this.filterValid = []; + this.filter = 0; + this.flag = false; + this.suite = null; + this.itName = null; + this.testType = null; + this.level = null; + this.size = null; + this.class = null; + this.notClass = null; + this.timeout = null; + // 遇错即停模式配置 + this.breakOnError = false; + // 压力测试配置 + this.stress = null; + this.skipMessage = false; + this.runSkipped = ''; + this.filterXdescribe = []; + } + + init(coreContext) { + this.coreContext = coreContext; + } + + isNormalInteger(str) { + const n = Math.floor(Number(str)); + return n !== Infinity && String(n) === String(str) && n >= 0; + } + + + getStress() { + if (this.stress === undefined || this.stress === '' || this.stress === null) { + return 1; + } + return !this.stress.match(STRESS_RULE) ? 1 : Number.parseInt(this.stress); + } + + basicParamValidCheck(params) { + let size = params.size; + if (size !== undefined && size !== '' && size !== null) { + let sizeArray = ['small', 'medium', 'large']; + if (sizeArray.indexOf(size) === -1) { + this.filterValid.push('size:' + size); + } + } + let level = params.level; + if (level !== undefined && level !== '' && level !== null) { + let levelArray = ['0', '1', '2', '3', '4']; + if (levelArray.indexOf(level) === -1) { + this.filterValid.push('level:' + level); + } + } + let testType = params.testType; + if (testType !== undefined && testType !== '' && testType !== null) { + let testTypeArray = ['function', 'performance', 'power', 'reliability', 'security', + 'global', 'compatibility', 'user', 'standard', 'safety', 'resilience']; + if (testTypeArray.indexOf(testType) === -1) { + this.filterValid.push('testType:' + testType); + } + } + } + + filterParamValidCheck(params) { + let timeout = params.timeout; + if (timeout !== undefined && timeout !== '' && timeout !== null) { + if (!this.isNormalInteger(timeout)) { + this.filterValid.push('timeout:' + timeout); + } + } + + let paramKeys = ['dryRun', 'random', 'breakOnError', 'coverage', 'skipMessage']; + for (const key of paramKeys) { + if (params[key] !== undefined && params[key] !== 'true' && params[key] !== 'false') { + this.filterValid.push(`${key}:${params[key]}`); + } + } + + // 压力测试参数验证,正整数 + if (params.stress !== undefined && params.stress !== '' && params.stress !== null) { + if (!params.stress.match(STRESS_RULE)) { + this.filterValid.push('stress:' + params.stress); + } + } + + let nameRule = /^[A-Za-z]{1}[\w#,.]*$/; + let paramClassKeys = ['class', 'notClass']; + for (const key of paramClassKeys) { + if (params[key] !== undefined && params[key] !== '' && params[key] !== null) { + let classArray = params[key].split(','); + classArray.forEach(item => !item.match(nameRule) ? this.filterValid.push(`${key}:${params[key]}`) : null); + } + } + } + + setConfig(params) { + this.basicParamValidCheck(params); + this.filterParamValidCheck(params); + try { + this.class = params.class; + this.notClass = params.notClass; + this.flag = params.flag || { flag: false }; + this.suite = params.suite; + this.itName = params.itName; + this.filter = params.filter; + this.testType = params.testType; + this.level = params.level; + this.size = params.size; + this.timeout = params.timeout; + this.dryRun = params.dryRun; + this.breakOnError = params.breakOnError; + this.random = params.random === 'true' ? true : false; + this.stress = params.stress; + this.coverage = params.coverage; + this.skipMessage = params.skipMessage; + this.runSkipped = params.runSkipped; + this.filterParam = { + testType: TESTTYPE, + level: LEVEL, + size: SIZE + }; + this.parseParams(); + } catch (err) { + console.info(`${TAG}setConfig error: ${err.message}`); + } + } + + parseParams() { + if (this.filter != null) { + return; + } + let testTypeFilter = 0; + let sizeFilter = 0; + let levelFilter = 0; + if (this.testType != null) { + testTypeFilter = this.testType.split(',') + .map(item => this.filterParam.testType[item] || 0) + .reduce((pre, cur) => pre | cur, 0); + } + if (this.level != null) { + levelFilter = this.level.split(',') + .map(item => this.filterParam.level[item] || 0) + .reduce((pre, cur) => pre | cur, 0); + } + if (this.size != null) { + sizeFilter = this.size.split(',') + .map(item => this.filterParam.size[item] || 0) + .reduce((pre, cur) => pre | cur, 0); + } + this.filter = testTypeFilter | sizeFilter | levelFilter; + console.info(`${TAG}filter params:${this.filter}`); + } + + isCurrentSuite(description) { + if (this.suite !== undefined && this.suite !== '' && this.suite !== null) { + let suiteArray = this.suite.split(','); + return suiteArray.indexOf(description) !== -1; + } + return false; + } + + filterSuite(currentSuiteName) { + let filterArray = []; + if (this.suite !== undefined && this.suite !== '' && this.suite !== null) { + filterArray.push(new SuiteAndItNameFilter(currentSuiteName, '', this.suite)); + } + if (this.class !== undefined && this.class !== '' && this.class !== null) { + filterArray.push(new ClassFilter(currentSuiteName, '', this.class)); + } + if (this.notClass !== undefined && this.notClass !== '' && this.notClass !== null) { + filterArray.push(new NotClassFilter(currentSuiteName, '', this.notClass)); + } + + let result = filterArray.map(item => item.filterSuite()).reduce((pre, cur) => pre || cur, false); + return result; + } + + filterDesc(currentSuiteName, desc, fi, coreContext) { + let filterArray = []; + if (this.itName !== undefined && this.itName !== '' && this.itName !== null) { + filterArray.push(new SuiteAndItNameFilter(currentSuiteName, desc, this.itName)); + } + if (this.class !== undefined && this.class !== '' && this.class !== null) { + filterArray.push(new ClassFilter(currentSuiteName, desc, this.class)); + } + if (this.notClass !== undefined && this.notClass !== '' && this.notClass !== null) { + filterArray.push(new NotClassFilter(currentSuiteName, desc, this.notClass)); + } + if (typeof (this.filter) !== 'undefined' && this.filter !== 0 && fi !== 0) { + filterArray.push(new TestTypesFilter('', '', fi, this.filter)); + } + let result = filterArray.map(item => item.filterIt()).reduce((pre, cur) => pre || cur, false); + return result; + } + + filterWithNest(desc, filter) { + let filterArray = []; + const nestFilter = new NestFilter(); + const targetSuiteArray = this.coreContext.getDefaultService('suite').targetSuiteArray; + const targetSpecArray = this.coreContext.getDefaultService('suite').targetSpecArray; + const suiteStack = this.coreContext.getDefaultService('suite').suitesStack; + let isFilter = nestFilter.filterNestName(targetSuiteArray, targetSpecArray, suiteStack, desc); + const isFullRun = this.coreContext.getDefaultService('suite').fullRun; + if (typeof (this.filter) !== 'undefined' && this.filter !== 0 && filter !== 0) { + filterArray.push(new TestTypesFilter('', '', filter, this.filter)); + return filterArray.map(item => item.filterIt()).reduce((pre, cur) => pre || cur, false); + } + if (isFilter && !isFullRun) { + return true; + } + return nestFilter.filterNotClass(this.notClass, suiteStack, desc); + + } + + isRandom() { + return this.random || false; + } + + isBreakOnError() { + return this.breakOnError !== 'true' ? false : true; + } + + setSupportAsync(value) { + this.supportAsync = value; + } + + isSupportAsync() { + return this.supportAsync; + } + + translateParams(parameters) { + const keySet = new Set(KEYSET); + let targetParams = {}; + for (const key in parameters) { + if (keySet.has(key)) { + var newKey = key.replace('-s ', ''); + targetParams[newKey] = parameters[key]; + } + } + return targetParams; + } + translateParamsToString(parameters) { + const keySet = new Set(KEYSET); + let targetParams = ''; + for (const key in parameters) { + if (keySet.has(key)) { + targetParams += ' ' + key + ' ' + parameters[key]; + } + } + return targetParams.trim(); + } + + execute() { + } + + checkIfSuiteInSkipRun(desc) { + return this.runSkipped.split(',').some(item => { + return item === desc || item.startsWith(desc + '.') || item.startsWith(desc + '#') || desc.startsWith(item + '.') || this.runSkipped === 'skipped'; + }); + } + + checkIfSpecInSkipRun(desc) { + return this.runSkipped.split(',').some(item => { + if (item.includes('#')) { + return item === desc; + } else { + return desc.startsWith(item + '.') || desc.startsWith(item + '#') || this.runSkipped === 'skipped'; + } + } + ); + } +} + +export { + ConfigService +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/coverage/coverageCollect.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/coverage/coverageCollect.js new file mode 100644 index 0000000000000000000000000000000000000000..334a33db9561dd2070c4081457632decf2589b83 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/coverage/coverageCollect.js @@ -0,0 +1,76 @@ +/* + * Copyright (c) 2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import SysTestKit from '../kit/SysTestKit'; +import fs from '@ohos.file.fs'; +import {TAG} from '../../Constant'; + +const jsCoverageFileName = 'js_coverage.json'; + +export async function collectCoverageData() { + if (globalThis.__coverage__ === undefined) { + console.info(`${TAG} globalThis not have coverage`); + return; + } + const strJson = JSON.stringify(globalThis.__coverage__); + let testMode = globalThis.__testMode__; + console.info(`${TAG} coverage data testMode: ${testMode}`); + let savePath = globalThis.__savePath__; + console.info(`${TAG} write coverage data to: ${savePath}`); + let readPath = globalThis.__readPath__; + console.info(`${TAG} read coverage data in: ${readPath}`); + + // run callback mode if local test or (save path and read path ) is not defined + if (!testMode || !isCoveragePathValid(savePath)) { + console.info(`${TAG} run coverage data in call back mode`); + const strLen = strJson.length; + const maxLen = 500; + const maxCount = Math.floor(strLen / maxLen); + const OHOS_REPORT_COVERAGE_DATA = 'OHOS_REPORT_COVERAGE_DATA:'; + for (let count = 0; count <= maxCount; count++) { + console.info(`${OHOS_REPORT_COVERAGE_DATA} ${strJson.substring(count * maxLen, (count + 1) * maxLen)}`); + await SysTestKit.print(`${OHOS_REPORT_COVERAGE_DATA} ${strJson.substring(count * maxLen, (count + 1) * maxLen)}`); + } + return; + } + console.info(`${TAG} run coverage data in save file mode`); + if (fs.accessSync(savePath)) { + fs.unlinkSync(savePath); + } + + let inputPathDir = savePath.substring(0, savePath.length - jsCoverageFileName.length); + if (!fs.accessSync(inputPathDir)) { + console.info(`${TAG} coverage data create dir: ${inputPathDir}`); + fs.mkdirSync(inputPathDir); + } + + let file = fs.openSync(savePath, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); + let writeLen = fs.writeSync(file.fd, strJson, {encoding:'utf-8'}); + console.info(`${TAG} write coverage data success: ${writeLen}`); + fs.closeSync(file); + const OHOS_REPORT_COVERAGE_PATH = 'OHOS_REPORT_COVERAGE_PATH:'; + await SysTestKit.print(`${OHOS_REPORT_COVERAGE_PATH} ${readPath}`); + console.info(`${OHOS_REPORT_COVERAGE_PATH} ${readPath}`); +} + +function isCoveragePathValid(inputPath) { + if (!inputPath) { + return false; + } + if (inputPath.indexOf(jsCoverageFileName) === -1) { + return false; + } + return true; +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/kit/SysTestKit.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/kit/SysTestKit.js new file mode 100644 index 0000000000000000000000000000000000000000..6e2f256514cff87450f910098b1130943a40e39c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/kit/SysTestKit.js @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {TAG} from '../../Constant'; +import Core from '../../core.js'; + +export default class SysTestKit { + + static delegator = null; + static systemTime = null; + static workerPort = null; + + constructor() { + this.id = 'sysTestKit'; + this.index = 0; + } + + static getDescribeName() { + return Core.getInstance().getDefaultService('suite').getCurrentRunningSuite().description; + } + + static getItName() { + return Core.getInstance().getDefaultService('spec').getCurrentRunningSpec().description; + } + + static getItAttribute() { + return Core.getInstance().getDefaultService('spec').getCurrentRunningSpec().fi; + } + + static actionStart(tag) { + console.info(`${TAG}${JSON.stringify(tag)}`); + var message = '\n' + 'OHOS_REPORT_ACTIONSTART: ' + JSON.stringify(tag) + '\n'; + SysTestKit.print(message); + console.info(`${TAG}${JSON.stringify(tag)} actionStart print success`); + } + + static actionEnd(tag) { + console.info(`${TAG}${JSON.stringify(tag)}`); + var message = '\n' + 'OHOS_REPORT_ACTIONEND: ' + JSON.stringify(tag) + '\n'; + SysTestKit.print(message); + console.info(`${TAG}${JSON.stringify(tag)} actionEnd print success`); + } + + static async existKeyword(keyword, timeout) { + let reg = new RegExp(/^[a-zA-Z0-9]{1,}$/); + if (!reg.test(keyword)) { + throw new Error('keyword must contain more than one string, and only letters and numbers are supported.'); + } + timeout = timeout || 4; + + let searchResult = false; + let cmd = 'hilog -x | grep -i \'' + keyword + '\' | wc -l'; + await executePromise(cmd, timeout).then((data) => { + searchResult = data; + }); + return searchResult; + } + static async print(message) { + if ('printSync' in SysTestKit.delegator) { + console.info(`${TAG}printSync called ...`); + SysTestKit.delegator.printSync(message); + } else { + await SysTestKit.delegator.print(message); + } + } + + static async getRealTime() { + let currentTime = new Date().getTime(); + if (SysTestKit.systemTime !== null && SysTestKit.systemTime !== undefined) { + await SysTestKit.systemTime.getRealTime().then((time) => { + console.info(`${TAG}systemTime.getRealTime success data: ${JSON.stringify(time)}`); + currentTime = time; + }).catch((error) => { + console.error(`${TAG}failed to systemTime.getRealTime because ${JSON.stringify(error)}`); + }); + } + return currentTime; + } +} + +function executePromise(cmd, timeout) { + return new Promise((resolve, reject) => { + SysTestKit.delegator.executeShellCommand(cmd, timeout, + (error, data) => { + console.info(`${TAG}existKeyword CallBack: err : ${JSON.stringify(error)}`); + console.info(`${TAG}existKeyword CallBack: data : ${JSON.stringify(data)}`); + resolve(parseInt(data.stdResult) > 3 ? true : false); + }); + }); +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/ArgumentMatchers.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/ArgumentMatchers.js new file mode 100644 index 0000000000000000000000000000000000000000..1e69ac401049589986968a8575ca45a02a299327 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/ArgumentMatchers.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class ArgumentMatchers { + ANY = ''; + ANY_STRING = ''; + ANY_BOOLEAN = ''; + ANY_NUMBER = ''; + ANY_OBJECT = ''; + ANY_FUNCTION = ''; + MATCH_REGEXS = ''; + + static any() { + } + + static anyString() { + } + + static anyBoolean() { + } + + static anyNumber() { + } + + static anyObj() { + } + + static anyFunction() { + } + + static matchRegexs() { + let regex = arguments[0]; + if (ArgumentMatchers.isRegExp(regex)) { + return regex; + } + throw Error('not a regex'); + } + + static isRegExp(value) { + return Object.prototype.toString.call(value) === '[object RegExp]'; + } + + matcheReturnKey() { + let arg = arguments[0]; + let regex = arguments[1]; + let stubSetKey = arguments[2]; + + if (stubSetKey && stubSetKey == this.ANY) { + return this.ANY; + } + + if (typeof arg === 'string' && !regex) { + return this.ANY_STRING; + } + + if (typeof arg === 'boolean' && !regex) { + return this.ANY_BOOLEAN; + } + + if (typeof arg === 'number' && !regex) { + return this.ANY_NUMBER; + } + + if (typeof arg === 'object' && !regex) { + return this.ANY_OBJECT; + } + + if (typeof arg === 'function' && !regex) { + return this.ANY_FUNCTION; + } + + if (typeof arg === 'string' && regex) { + return regex.test(arg); + } + + return null; + } + + matcheStubKey() { + let key = arguments[0]; + + if (key === ArgumentMatchers.any) { + return this.ANY; + } + + if (key === ArgumentMatchers.anyString) { + return this.ANY_STRING; + } + if (key === ArgumentMatchers.anyBoolean) { + return this.ANY_BOOLEAN; + } + if (key === ArgumentMatchers.anyNumber) { + return this.ANY_NUMBER; + } + if (key === ArgumentMatchers.anyObj) { + return this.ANY_OBJECT; + } + if (key === ArgumentMatchers.anyFunction) { + return this.ANY_FUNCTION; + } + + if (ArgumentMatchers.isRegExp(key)) { + return key; + } + + return null; + } +} + +export default ArgumentMatchers; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/ExtendInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/ExtendInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..c6a866a6df662ad10a7f6869dcbc2381fa47bcdc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/ExtendInterface.js @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class ExtendInterface { + constructor(mocker) { + this.mocker = mocker; + } + + stub() { + this.params = arguments; + return this; + } + + stubMockedCall(returnInfo) { + this.mocker.stubApply(this, this.params, returnInfo); + } + + afterReturn(value) { + this.stubMockedCall(function () { + return value; + }); + } + + afterReturnNothing() { + this.stubMockedCall(function () { + return undefined; + }); + } + + afterAction(action) { + this.stubMockedCall(action); + } + + afterThrow(msg) { + this.stubMockedCall(function () { + throw msg; + }); + } + + clear() { + this.mocker.clear(); + } +} + +export default ExtendInterface; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/MockKit.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/MockKit.js new file mode 100644 index 0000000000000000000000000000000000000000..da220c7116bcb2ce6c41f14db2b05da539322520 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/MockKit.js @@ -0,0 +1,353 @@ +/* + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import ExtendInterface from './ExtendInterface'; +import VerificationMode from './VerificationMode'; +import ArgumentMatchers from './ArgumentMatchers'; + +class MockKit { + constructor() { + this.mFunctions = []; + this.stubs = new Map(); + this.recordCalls = new Map(); + this.currentSetKey = new Map(); + this.mockObj = null; + this.recordMockedMethod = new Map(); + } + + init() { + this.reset(); + } + + reset() { + this.mFunctions = []; + this.stubs = {}; + this.recordCalls = {}; + this.currentSetKey = new Map(); + this.mockObj = null; + this.recordMockedMethod = new Map(); + } + + clearAll() { + this.reset(); + var props = Object.keys(this); + for (var i = 0; i < props.length; i++) { + delete this[props[i]]; + } + + var props = Object.getOwnPropertyNames(this); + for (var i = 0; i < props.length; i++) { + delete this[props[i]]; + } + for (var key in this) { + delete this[key]; + } + } + + clear(obj) { + if (!obj) { + throw Error('Please enter an object to be cleaned'); + } + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new Error('Not a object or static class'); + } + this.recordMockedMethod.forEach(function (value, key, map) { + if (key) { + obj[key] = value; + } + }); + } + + ignoreMock(obj, method) { + if (typeof obj !== 'object' && typeof obj !== 'function') { + throw new Error('Not a object or static class'); + } + if (typeof method !== 'function') { + throw new Error('Not a function'); + } + let og = this.recordMockedMethod.get(method.propName); + if (og) { + obj[method.propName] = og; + this.recordMockedMethod.set(method.propName, undefined); + } + } + + extend(dest, source) { + dest['stub'] = source['stub']; + dest['afterReturn'] = source['afterReturn']; + dest['afterReturnNothing'] = source['afterReturnNothing']; + dest['afterAction'] = source['afterAction']; + dest['afterThrow'] = source['afterThrow']; + dest['stubMockedCall'] = source['stubMockedCall']; + dest['clear'] = source['clear']; + return dest; + } + + stubApply(f, params, returnInfo) { + let values = this.stubs.get(f); + if (!values) { + values = new Map(); + } + let key = params[0]; + if (typeof key === 'undefined') { + key = 'anonymous-mock-' + f.propName; + } else { + key = []; + const matcher = new ArgumentMatchers(); + for (let i = 0; i < params.length; i++) { + const param = params[i]; + const matchKey = matcher.matcheStubKey(param); + if (matchKey) { + key.push(matchKey); + } else { + key.push(param); + } + } + } + this.currentSetKey.set(f, key); + values.set(key, returnInfo); + this.stubs.set(f, values); + } + + getReturnInfo(f, params) { + let values = this.stubs.get(f); + if (!values) { + return undefined; + } + let returnKet = params[0]; + const anonymousName = 'anonymous-mock-' + f.propName; + if (typeof returnKet === 'undefined') { + returnKet = anonymousName; + let stubSetKey = this.currentSetKey.get(f); + + if (stubSetKey && (typeof (returnKet) !== 'undefined')) { + returnKet = stubSetKey; + } + } else { + returnKet = this.getReturnKet(values, params, returnKet, anonymousName); + } + + return values.get(returnKet); + } + + getReturnKet(values, params, defaultValue, anonymousName) { + let flag = true; + let returnKet = defaultValue; + values.forEach((value, paramsKey, map) => { + if ( + flag && + paramsKey !== anonymousName && + paramsKey.length === params.length && + this.checkIsRightValue(paramsKey, params) + ) { + returnKet = paramsKey; + flag = false; + } + }); + return returnKet; + } + + checkIsRightValue(paramsKey, params) { + const matcher = new ArgumentMatchers(); + return paramsKey.every((key, j) => { + if (ArgumentMatchers.isRegExp(key) && typeof params[j] === 'string') { + return key.test(params[j]); + } + const matchKey = matcher.matcheReturnKey(params[j], undefined, key); + if (matchKey && matchKey === key) { + return true; + } else if (this.checkIsEqual(params[j], key)) { + return true; + } + return false; + }); + } + + checkIsEqual(value1, value2) { + if (value1 === value2) { + return true; + } + if (typeof value1 !== typeof value2) { + return false; + } + if (Array.isArray(value1) && Array.isArray(value2)) { + if (value1.length !== value2.length) { + return false; + } + for (let i = 0; i < value1.length; i++) { + if (!this.checkIsEqual(value1[i], value2[i])) { + return false; + } + } + return true; + } + if (Object.prototype.toString.call(value1) === '[object Object]' && + Object.prototype.toString.call(value2) === '[object Object]') { + const keys1 = Object.keys(value1); + const keys2 = Object.keys(value2); + if (keys1.length !== keys2.length) { + return false; + } + for (let key of keys1) { + if (!keys2.includes(key) || !this.checkIsEqual(value1[key], value2[key])) { + return false; + } + } + return true; + } + if (Object.prototype.toString.call(value1) === '[object Date]' && + Object.prototype.toString.call(value2) === '[object Date]' && + value1.getTime() === value2.getTime()) { + return true; + } + if (Object.prototype.toString.call(value1) === '[object RegExp]' && + Object.prototype.toString.call(value2) === '[object RegExp]' && + value1.toString() === value2.toString()) { + return true; + } + return false; + } + + findName(obj, value) { + let properties = this.findProperties(obj); + let name = null; + properties + .filter((item) => item !== 'caller' && item !== 'arguments') + .forEach(function (va1, idx, array) { + if (obj[va1] === value) { + name = va1; + } + }); + return name; + } + + isFunctionFromPrototype(f, container, propName) { + if ( + container.constructor !== Object && + container.constructor.prototype !== container + ) { + return container.constructor.prototype[propName] === f; + } + return false; + } + + findProperties(obj, ...arg) { + function getProperty(newObj) { + if (newObj.__proto__ === null) { + return []; + } + let properties = Object.getOwnPropertyNames(newObj); + return [...properties, ...getProperty(newObj.__proto__)]; + } + return getProperty(obj); + } + + recordMethodCall(originalMethod, args) { + Function.prototype.getName = function () { + return this.name || this.toString().match(/function\s*([^(]*)\(/)[1]; + }; + let name = originalMethod.getName(); + let arglistString = name + '(' + Array.from(args).toString() + ')'; + let records = this.recordCalls.get(arglistString); + if (!records) { + records = 0; + } + records++; + this.recordCalls.set(arglistString, records); + } + + mockFunc(originalObject, originalMethod) { + let tmp = this; + this.originalMethod = originalMethod; + let f = function () { + let args = arguments; + let action = tmp.getReturnInfo(f, args); + if (originalMethod) { + tmp.recordMethodCall(originalMethod, args); + } + if (action) { + return action.apply(this, args); + } + }; + + f.container = null || originalObject; + f.original = originalMethod || null; + + if (originalObject && originalMethod) { + if (typeof originalMethod !== 'function') { + throw new Error('Not a function'); + } + var name = this.findName(originalObject, originalMethod); + originalObject[name] = f; + this.recordMockedMethod.set(name, originalMethod); + f.propName = name; + f.originalFromPrototype = this.isFunctionFromPrototype( + f.original, + originalObject, + f.propName + ); + } + f.mocker = this; + this.mFunctions.push(f); + this.extend(f, new ExtendInterface(this)); + return f; + } + + verify(methodName, argsArray) { + if (!methodName) { + throw Error('not a function name'); + } + let a = this.recordCalls.get(methodName + '(' + argsArray.toString() + ')'); + return new VerificationMode(a ? a : 0); + } + + mockObject(object) { + if (!object || typeof object === 'string') { + throw Error(`this ${object} cannot be mocked`); + } + const _this = this; + let mockedObject = {}; + let keys = Reflect.ownKeys(object); + keys + .filter((key) => typeof Reflect.get(object, key) === 'function') + .forEach((key) => { + mockedObject[key] = object[key]; + mockedObject[key] = _this.mockFunc(mockedObject, mockedObject[key]); + }); + return mockedObject; + } +} + +function ifMockedFunction(f) { + if ( + Object.prototype.toString.call(f) !== '[object Function]' && + Object.prototype.toString.call(f) !== '[object AsyncFunction]' + ) { + throw Error('not a function'); + } + if (!f.stub) { + throw Error('not a mock function'); + } + return true; +} + +function when(f) { + if (!ifMockedFunction(f)) { + throw Error('not a mock function'); + } + return f.stub.bind(f); +} + +export { MockKit, when }; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/VerificationMode.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/VerificationMode.js new file mode 100644 index 0000000000000000000000000000000000000000..aaf2fdfae00135d3d2055320fc5ea403b44d0bf3 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/mock/VerificationMode.js @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2022-2023 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {expect} from '../../interface'; + +class VerificationMode { + constructor(times) { + this.doTimes = times; + } + + times(count) { + expect(count).assertEqual(this.doTimes); + } + + never() { + console.info(this.doTimes); + expect(0).assertEqual(this.doTimes); + } + + once() { + expect(1).assertEqual(this.doTimes); + } + + atLeast(count) { + if (count > this.doTimes) { + throw Error('failed ' + count + ' greater than the actual execution times of method'); + } + } + + atMost(count) { + if (count < this.doTimes) { + throw Error('failed ' + count + ' less than the actual execution times of method'); + } + } +} + +export default VerificationMode; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/report/LogExpectError.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/report/LogExpectError.js new file mode 100644 index 0000000000000000000000000000000000000000..5a94cecb4625205797ae886c19ac592f189c2232 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/report/LogExpectError.js @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class LogExpectError { + static getErrorMsg(matcherName, actualValue, expect, originMsg) { + if (matcherName === 'assertNull') { + return 'expect not null, actualValue is ' + (actualValue); + } + if (matcherName === 'assertTrue') { + return 'expect not true, actualValue is ' + (actualValue); + } + if (matcherName === 'assertFalse') { + return 'expect not false, actualValue is ' + (actualValue); + } + if (matcherName === 'assertEqual') { + return 'expect not Equal, actualValue is ' + actualValue + ' equals ' + expect; + } + if (matcherName === 'assertContain') { + return 'expect not have, ' + actualValue + ' have ' + expect; + } + if (matcherName === 'assertInstanceOf') { + return 'expect not InstanceOf, ' + actualValue + ' is ' + + Object.prototype.toString.call(actualValue) + expect; + } + if (matcherName === 'assertLarger') { + return 'expect not Larger, ' + + (actualValue) + ' is larger than ' + expect; + } + if (matcherName === 'assertLargerOrEqual') { + return 'expect not LargerOrEqual, ' + (actualValue) + ' larger than ' + expect; + } + if (matcherName === 'assertLess') { + return 'expect not Less, ' + (actualValue) + ' less than ' + expect; + } + if (matcherName === 'assertLessOrEqual') { + return 'expect not LessOrEqual, ' + (actualValue) + ' is less than ' + expect; + } + if (matcherName === 'assertNaN') { + return 'expect not NaN, actualValue is ' + (actualValue); + } + if (matcherName === 'assertNegUnlimited') { + return 'expect not NegUnlimited, actualValue is ' + (actualValue); + } + if (matcherName === 'assertPosUnlimited') { + return 'expect not PosUnlimited, actualValue is ' + (actualValue); + } + if (matcherName === 'assertUndefined') { + return 'expect not Undefined, actualValue is ' + (actualValue); + } + return originMsg; + } +} +export default LogExpectError; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/report/OhReport.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/report/OhReport.js new file mode 100644 index 0000000000000000000000000000000000000000..d9327b4b2dc08e7452a3d9a6524f065285b80fd3 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/report/OhReport.js @@ -0,0 +1,217 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import SysTestKit from '../kit/SysTestKit'; +import { collectCoverageData } from '../coverage/coverageCollect'; +import { TAG, PrintTag } from '../../Constant'; + +class OhReport { + constructor(attr) { + this.delegator = attr.delegator; + this.abilityDelegatorArguments = attr.abilityDelegatorArguments; + this.id = 'report'; + this.index = 0; + this.duration = 0; + this.currentThreadName = 'mainThread'; + } + + init(coreContext) { + this.coreContext = coreContext; + this.suiteService = this.coreContext.getDefaultService('suite'); + this.specService = this.coreContext.getDefaultService('spec'); + if (SysTestKit.workerPort !== null) { + this.currentThreadName = SysTestKit.workerPort.name; + } + } + + taskStart() { + } + + async taskDone() { + let summary = this.suiteService.getSummary(); + if (this.abilityDelegatorArguments !== null) { + this.taskDoneTime = new Date().getTime(); + const configService = this.coreContext.getDefaultService('config'); + const suiteService = this.coreContext.getDefaultService('suite'); + const specService = this.coreContext.getDefaultService('spec'); + if (configService['coverage'] === 'true') { + await collectCoverageData(); + } + let message = '\n' + `${PrintTag.OHOS_REPORT_RESULT}: stream=Tests run: ` + summary.total + ', Failure: ' + summary.failure; + message += ', Error: ' + summary.error; + message += ', Pass: ' + summary.pass; + message += ', Ignore: ' + summary.ignore; + if (specService.skipSpecNum > 0) { + message += ', SkipSpec: ' + specService.skipSpecNum; + } + message += '\n' + `${PrintTag.OHOS_REPORT_CODE}: ` + (summary.failure > 0 ? -1 : 0) + '\n'; + let isHasError = summary.failure > 0 || summary.error > 0; + let config = this.coreContext.getDefaultService('config'); + if (config.isBreakOnError() && isHasError) { + // 未执行全部说明 + message += '\n' + `${PrintTag.OHOS_REPORT_RESULT}: breakOnError model, Stopping whole test suite if one specific test case failed or error` + '\n'; + } + message += `${PrintTag.OHOS_REPORT_STATUS}: taskconsuming=` + summary.duration + '\n'; + console.info(`${message}`); + await SysTestKit.print(message); + } + if (SysTestKit.workerPort === null || SysTestKit.workerPort === undefined) { + // 主线程执行完成 结束任务。 + console.info(`${TAG}report print success`); + this.delegator.finishTest('your test finished!!!', 0, () => { }); + } else { + // worker线程执行完成将数据发送到主线程中。 + let sendData = { + currentThreadName: this.currentThreadName, + summary: summary + }; + console.info(`${TAG}, send data to mainThread, ${this.currentThreadName}, ${JSON.stringify(sendData)}`); + SysTestKit.workerPort.postMessage(sendData); + } + } + + incorrectFormat() { + if (this.coreContext.getDefaultService('config').filterValid.length !== 0) { + var value = this.coreContext.getDefaultService('config').filterValid; + var message = 'this param ' + value.join(',') + ' is invalid' + '\n'; + this.delegator.finishTest(message, 0, () => { + }); + } + } + + incorrectTestSuiteFormat() { + if (this.coreContext.getDefaultService('config').filterXdescribe.length !== 0) { + let value = this.coreContext.getDefaultService('config').filterXdescribe; + let message = 'xdescribe ' + value.join(',') + ' should not contain it' + '\n'; + this.delegator.finishTest(message, 0, () => { + }); + } + } + async suiteStart() { + if (this.abilityDelegatorArguments !== null) { + let specArr = []; + this.suiteService.getAllChildSuiteNum(this.suiteService.getCurrentRunningSuite(), specArr); + let message = '\n' + `${PrintTag.OHOS_REPORT_SUM}: ` + specArr.length; + this.suiteService.setCurrentRunningSuiteDesc(this.suiteService.getRootSuite(), this.suiteService.getCurrentRunningSuite(), ''); + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: class=` + this.suiteService.getCurrentRunningSuiteDesc() + '\n'; + if (this.suiteService.currentRunningSuite.isSkip) { + message += `${PrintTag.OHOS_REPORT_STATUS}: skipReason=` + this.suiteService.currentRunningSuite.skipReason + '\n'; + } + if (SysTestKit.workerPort !== null) { + message += `${PrintTag.OHOS_REPORT_STATUS}: currentWorkerName=` + this.currentThreadName; + } + console.info(`${message}`); + await SysTestKit.print(message); + console.info(`${TAG}${this.suiteService.getCurrentRunningSuite().description} suiteStart print success`); + } + } + + async suiteDone() { + if (this.abilityDelegatorArguments !== null) { + const currentRunningSuite = this.suiteService.getCurrentRunningSuite(); + this.suiteService.setCurrentRunningSuiteDesc(this.suiteService.getRootSuite(), currentRunningSuite, ''); + let message = '\n' + `${PrintTag.OHOS_REPORT_STATUS}: class=` + this.suiteService.getCurrentRunningSuiteDesc(); + if (this.suiteService.currentRunningSuite.isSkip && this.suiteService.currentRunningSuite.skipReason !== '') { + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: skipReason=` + this.suiteService.currentRunningSuite.skipReason; + } + const isPromiseError = currentRunningSuite.isPromiseError; + if (isPromiseError) { + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: shortMsg=Promise(async, await) in describe is not allowed!`; + } + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: suiteconsuming=` + currentRunningSuite.duration; + if (currentRunningSuite.hookError) { + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: ${currentRunningSuite.hookError.message}`; + } + message += '\n'; + if (SysTestKit.workerPort !== null) { + message += `${PrintTag.OHOS_REPORT_STATUS}: currentWorkerName=` + this.currentThreadName; + } + console.info(`${message}`); + await SysTestKit.print(message); + console.info(`${TAG}${currentRunningSuite.description} suiteDone print success`); + } + } + + async specStart() { + if (this.abilityDelegatorArguments !== null) { + let message = '\n' + `${PrintTag.OHOS_REPORT_STATUS}: class=` + this.suiteService.getCurrentRunningSuiteDesc(); + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: current=` + (++this.index); + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: id=JS`; + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: numtests=` + this.specService.getTestTotal(); + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: stream=`; + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: test=` + this.specService.currentRunningSpec.description; + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS_CODE}: 1` + '\n'; + if (this.specService.currentRunningSpec.isSkip) { + message += `${PrintTag.OHOS_REPORT_STATUS}: skipReason=` + this.specService.currentRunningSpec.skipReason + '\n'; + } + if (SysTestKit.workerPort !== null) { + message += `${PrintTag.OHOS_REPORT_STATUS}: currentWorkerName=` + this.currentThreadName; + } + console.info(`${message}`); + await SysTestKit.print(message); + console.info(`${TAG}${this.specService.currentRunningSpec.description} specStart start print success`); + } + } + + async specDone() { + if (this.abilityDelegatorArguments !== null) { + let message = '\n' + `${PrintTag.OHOS_REPORT_STATUS}: class=` + this.suiteService.getCurrentRunningSuiteDesc(); + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: current=` + (this.index); + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: id=JS`; + message += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: numtests=` + this.specService.getTestTotal(); + let messageStack = ''; + let messageCode = ''; + if (this.specService.currentRunningSpec.error) { + messageStack = `${PrintTag.OHOS_REPORT_STATUS}: stack=` + this.specService.currentRunningSpec.error?.stack?.slice(0, -1); + messageCode += `${PrintTag.OHOS_REPORT_STATUS}: stream=`; + messageCode += this.specService.currentRunningSpec.expectMsg !== '' ? + `message: ${this.specService.currentRunningSpec.expectMsg}, Error in ${this.specService.currentRunningSpec.description}, ${this.specService.currentRunningSpec.error?.message}` : + `Error in ${this.specService.currentRunningSpec.description}, ${this.specService.currentRunningSpec.error?.message}`; + messageCode += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: test=` + this.specService.currentRunningSpec.description; + messageCode += '\n' + `${PrintTag.OHOS_REPORT_STATUS_CODE}: -1` + '\n'; + } else if (this.specService.currentRunningSpec) { + if (this.specService.currentRunningSpec.fail) { + messageStack += `${PrintTag.OHOS_REPORT_STATUS}: stack=` + this.specService.currentRunningSpec.fail?.stack?.slice(0, -1); + messageCode += `${PrintTag.OHOS_REPORT_STATUS}: stream=`; + messageCode += this.specService.currentRunningSpec.expectMsg !== '' ? + `message: ${this.specService.currentRunningSpec.expectMsg}, Error in ${this.specService.currentRunningSpec.description}, ${this.specService.currentRunningSpec.fail?.message}` : + `Error in ${this.specService.currentRunningSpec.description}, ${this.specService.currentRunningSpec.fail?.message}`; + messageCode += '\n' + `${PrintTag.OHOS_REPORT_STATUS}: test=` + this.specService.currentRunningSpec.description; + messageCode += '\n' + `${PrintTag.OHOS_REPORT_STATUS_CODE}: -2` + '\n'; + } else { + messageStack += `${PrintTag.OHOS_REPORT_STATUS}: stream=`; + messageCode += `${PrintTag.OHOS_REPORT_STATUS}: test=` + this.specService.currentRunningSpec.description; + messageCode += '\n' + `${PrintTag.OHOS_REPORT_STATUS_CODE}: 0` + '\n'; + messageCode += this.specService.currentRunningSpec.isSkip ? (`${PrintTag.OHOS_REPORT_STATUS}: skipReason=` + this.specService.currentRunningSpec.skipReason + '\n') : ''; + } + } else { + messageCode += '\n'; + } + messageCode += `${PrintTag.OHOS_REPORT_STATUS}: consuming=` + this.specService.currentRunningSpec.duration + '\n'; + if (SysTestKit.workerPort !== null) { + messageCode += `${PrintTag.OHOS_REPORT_STATUS}: currentWorkerName=` + this.currentThreadName; + } + console.info(`${message}`); + console.info(`\n${messageStack}`); + console.info(`\n${messageCode}`); + await SysTestKit.print(message); + await SysTestKit.print(messageStack); + await SysTestKit.print(messageCode); + console.info(`${TAG}${this.specService.currentRunningSpec.description} specDone end print success`); + } + } +} + +export default OhReport; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/report/ReportExtend.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/report/ReportExtend.js new file mode 100644 index 0000000000000000000000000000000000000000..4a75453f4337224291a206975096f252df7d4b74 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/module/report/ReportExtend.js @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +class ReportExtend { + constructor(fileModule) { + this.id = 'extend'; + this.fileModule = fileModule; + } + + init(coreContext) { + this.coreContext = coreContext; + this.suiteService = this.coreContext.getDefaultService('suite'); + } + + taskStart() { + + } + + handleSpecs(specs, report, suiteReport, testsuite) { + for (let testcase of specs) { + report.tests++; + suiteReport.tests++; + let caseReport = { + tag: 'testcase', + name: testcase.description, + status: 'run', + time: '0.0', + classname: testsuite.description + }; + if (testcase.error) { + caseReport.result = false; + caseReport.children = [{ + tag: 'error', + type: '', + message: testcase.error.message + }]; + report.errors++; + suiteReport.errors++; + } else if (testcase.result.failExpects.length > 0) { + caseReport.result = false; + let message = ''; + testcase.result.failExpects.forEach(failExpect => { + message += failExpect.message || ('expect ' + failExpect.actualValue + ' ' + failExpect.checkFunc + ' ' + (failExpect.expectValue || '')) + ';'; + }); + caseReport.children = [{ + tag: 'failure', + type: '', + message: message + }]; + report.failures++; + suiteReport.failures++; + } else { + caseReport.result = true; + } + suiteReport.children.push(caseReport); + } + } + + taskDone() { + const report = { + tag: 'testsuites', + name: 'summary_report', + timestamp: new Date().toDateString(), + time: '1', + errors: 0, + failures: 0, + tests: 0, + children: [] + }; + const rootSuite = this.suiteService.rootSuite; + if (rootSuite && rootSuite.childSuites) { + for (let testsuite of rootSuite.childSuites) { + let suiteReport = { + tag: 'testsuite', + name: testsuite['description'], + errors: 0, + tests: 0, + failures: 0, + time: '0.1', + children: [] + }; + let specs = testsuite['specs']; + this.handleSpecs(specs, report, suiteReport, testsuite); + report.children.push(suiteReport); + } + } + + writeXmlReport(report); + } +} + +function writeXmlReport(report) { + let reportXml = '\n' + json2xml(report); + this.fileModule.writeText({ + uri: 'internal://app/report.xml', + text: reportXml, + success: function () { + console.info('call success callback success'); + }, + fail: function (data, code) { + console.info('call fail callback success:'); + }, + complete: function () { + console.info('call complete callback success'); + } + }); +} + +function handleChild(json, key, hasChildren, childrenStr) { + if (json[key].length > 0) { + hasChildren = true; + for (let child of json[key]) { + childrenStr += json2xml(child); + } + } +} + +function json2xml(json) { + let tagName; + let hasChildren = false; + let childrenStr = ''; + let attrStr = ''; + for (let key in json) { + if (key === 'tag') { + tagName = json[key]; + } else if (key === 'children') { + handleChild(json, key, hasChildren, childrenStr); + } else { + attrStr += ` ${key}="${json[key]}"`; + } + } + let xml = `<${tagName}${attrStr}`; + xml += hasChildren ? `>${childrenStr}` : '/>'; + return xml; +} + +export default ReportExtend; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/service.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/service.js new file mode 100644 index 0000000000000000000000000000000000000000..0ca605e4269e58d9784a5ba9c13d000ac6cba0bd --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/service.js @@ -0,0 +1,1265 @@ +/* + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import SysTestKit from './module/kit/SysTestKit'; +import { TAG } from './Constant'; +import LogExpectError from './module/report/LogExpectError'; +import { NestFilter } from './module/config/Filter'; + +function assertTrueFun(actualValue) { + let result = { + pass: (actualValue) === true, + message: 'expect true, actualValue is ' + actualValue + }; + return result; +} + +function assertEqualFun(actualValue, args) { + let msg = 'expect ' + actualValue + ' equals ' + args[0]; + if (actualValue === args[0]) { // 数值相同,提示数据类型 + const aClassName = Object.prototype.toString.call(actualValue); + const bClassName = Object.prototype.toString.call(args[0]); + msg = 'expect ' + actualValue + aClassName + ' equals ' + args[0] + bClassName + 'strict mode inspect type'; + } + let result = { + pass: (actualValue) === args[0], + expectValue: args[0], + message: msg + }; + return result; +} + +function assertThrowFun(actual, args) { + const result = { + pass: false + }; + if (typeof actual !== 'function') { + result.message = 'toThrow\'s Actual should be a Function'; + } else { + let hasThrow = false; + let throwError; + try { + actual(); + } catch (e) { + hasThrow = true; + throwError = e; + } + if (!hasThrow) { + result.message = 'function did not throw an exception'; + } else if (throwError && throwError.message === args[0]) { + result.pass = true; + } else { + result.message = `expect to throw ${args[0]} , actual throw ${throwError.message}`; + } + } + return result; +} + +class AssertException extends Error { + constructor(message) { + super(); + this.name = 'AssertException'; + this.message = message; + } +} + +function getFuncWithArgsZero(func, timeout, isStressTest) { + return new Promise(async (resolve, reject) => { + let timer = null; + if (!isStressTest) { + timer = setTimeout(() => { + reject(new Error('execute timeout ' + timeout + 'ms')); + }, timeout); + } + try { + await func(); + } catch (err) { + reject(err); + } + timer !== null ? clearTimeout(timer) : null; + resolve(); + }); +} + +function getFuncWithArgsOne(func, timeout, isStressTest) { + return new Promise(async (resolve, reject) => { + let timer = null; + if (!isStressTest) { + timer = setTimeout(() => { + reject(new Error('execute timeout ' + timeout + 'ms')); + }, timeout); + } + + function done() { + timer !== null ? clearTimeout(timer) : null; + resolve(); + } + + try { + await func(done); + } catch (err) { + timer !== null ? clearTimeout(timer) : null; + reject(err); + } + }); +} + +function getFuncWithArgsTwo(func, timeout, paramItem, isStressTest) { + return new Promise(async (resolve, reject) => { + let timer = null; + if (!isStressTest) { + timer = setTimeout(() => { + reject(new Error('execute timeout ' + timeout + 'ms')); + }, timeout); + } + + function done() { + timer !== null ? clearTimeout(timer) : null; + resolve(); + } + + try { + await func(done, paramItem); + } catch (err) { + timer !== null ? clearTimeout(timer) : null; + reject(err); + } + }); +} + +function processFunc(coreContext, func) { + let argNames = ((func || '').toString() + .replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg, '') + .match(/^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m) || ['', '', ''])[2] + .split(',') // split parameters + .map(item => item.replace(/^\s*(_?)(.+?)\1\s*$/, name => name.split('=')[0].trim())) + .filter(String); + let funcLen = func.length; + let processedFunc; + const config = coreContext.getDefaultService('config'); + config.setSupportAsync(true); + const timeout = + (config.timeout === undefined ? 5000 : config.timeout); + const isStressTest = (coreContext.getServices('dataDriver') !== undefined || config.getStress() > 1); + switch (funcLen) { + case 0: { + processedFunc = function () { + return getFuncWithArgsZero(func, timeout, isStressTest); + }; + break; + } + case 1: { + processedFunc = function () { + return getFuncWithArgsOne(func, timeout, isStressTest); + }; + break; + } + default: { + processedFunc = function (paramItem) { + return getFuncWithArgsTwo(func, timeout, paramItem, isStressTest); + }; + break; + } + } + return processedFunc; +} + +function secureRandomNumber() { + return crypto.randomBytes(8).readUInt32LE() / 0xffffffff; +} + + + +class SuiteService { + constructor(attr) { + this.id = attr.id; + this.rootSuite = new SuiteService.Suite({}); + this.currentRunningSuite = this.rootSuite; + this.suitesStack = [this.rootSuite]; + this.targetSuiteArray = []; + this.targetSpecArray = []; + this.currentRunningSuiteDesc = null; + this.fullRun = false; + this.isSkipSuite = false; + this.suiteSkipReason = null; + } + + describe(desc, func) { + const configService = this.coreContext.getDefaultService('config'); + if (this.suitesStack.some(suite => { return suite.description === desc })) { + console.error(`${TAG} Loop nesting occurs : ${desc}`); + this.suiteSkipReason = ''; + this.isSkipSuite = false; + return; + } + let isFilter = this.analyzeConfigServiceClass(configService.class, desc); + if (configService.filterSuite(desc) && isFilter) { + if (this.currentRunningSuite.description === '' || this.currentRunningSuite.description == null) { + console.info(`${TAG}filter suite : ${desc}`); + this.suiteSkipReason = ''; + this.isSkipSuite = false; + return; + } + } + const suite = new SuiteService.Suite({ description: desc }); + if (this.isSkipSuite) { + suite.isSkip = true; + suite.skipReason = this.suiteSkipReason; + } + this.suiteSkipReason = ''; + this.isSkipSuite = false; + if (typeof this.coreContext.getServices('dataDriver') !== 'undefined' && configService['dryRun'] !== 'true') { + let suiteStress = this.coreContext.getServices('dataDriver').dataDriver.getSuiteStress(desc); + for (let i = 1; i < suiteStress; i++) { + this.currentRunningSuite.childSuites.push(suite); + } + } + this.currentRunningSuite.childSuites.push(suite); + this.currentRunningSuite = suite; + this.suitesStack.push(suite); + const res = func.call(); + if (Object.prototype.toString.call(res) === '[object Promise]') { + suite.isPromiseError = true; + } + this.suitesStack.pop(); + this.currentRunningSuite = this.suitesStack.pop(); + this.suitesStack.push(this.currentRunningSuite); + } + xdescribe(desc, func, reason) { + const configService = this.coreContext.getDefaultService('config'); + if (!configService.skipMessage && configService.runSkipped !== 'all') { + if (configService.runSkipped != null && configService.runSkipped !== '') { + let finalDesc = ''; + this.suitesStack.map(suite => { + finalDesc = finalDesc + '.' + suite.description; + }); + finalDesc = (finalDesc + '.' + desc).substring(2); + console.info(`${TAG} finalDesc ${finalDesc}`); + if (configService.checkIfSuiteInSkipRun(finalDesc)) { + console.info(`${TAG} runSkipped suite: ${desc}`); + } else { + console.info(reason == null ? `${TAG} skip suite: ${desc}` : `${TAG} skip suite: ${desc}, and the reason is ${reason}`); + return; + } + } else { + console.info(reason == null ? `${TAG} skip suite: ${desc}` : `${TAG} skip suite: ${desc}, and the reason is ${reason}`); + return; + } + } + this.isSkipSuite = true; + this.suiteSkipReason = reason; + this.describe(desc, func); + } + + beforeAll(func) { + this.currentRunningSuite.beforeAll.push(processFunc(this.coreContext, func)); + } + + beforeEach(func) { + this.currentRunningSuite.beforeEach.push(processFunc(this.coreContext, func)); + } + + beforeItSpecified(itDescs, func) { + this.currentRunningSuite.beforeItSpecified.set(itDescs, processFunc(this.coreContext, func)); + } + + afterItSpecified(itDescs, func) { + this.currentRunningSuite.afterItSpecified.set(itDescs, processFunc(this.coreContext, func)); + } + + afterAll(func) { + this.currentRunningSuite.afterAll.push(processFunc(this.coreContext, func)); + } + + afterEach(func) { + this.currentRunningSuite.afterEach.push(processFunc(this.coreContext, func)); + } + + getCurrentRunningSuite() { + return this.currentRunningSuite; + } + + setCurrentRunningSuite(suite) { + this.currentRunningSuite = suite; + } + + getRootSuite() { + return this.rootSuite; + } + + getCurrentRunningSuiteDesc() { + return this.currentRunningSuiteDesc; + } + + + setCurrentRunningSuiteDesc(suite, currentSuite, prefix) { + if (suite != null && suite === currentSuite) { + this.currentRunningSuiteDesc = prefix; + } else if (suite != null && suite !== currentSuite) { + suite.childSuites.forEach(it => { + let temp = prefix; + if (it.description != null || it.description !== '') { + temp = prefix === '' ? it.description : prefix + '.' + it.description; + } + this.setCurrentRunningSuiteDesc(it, currentSuite, temp); + } + ); + } + } + analyzeConfigServiceClass(configServiceClass, desc) { + if (configServiceClass == null || configServiceClass === '') { + this.fullRun = true; + return false; + } + const targetArray = configServiceClass.split(',').map(item => item.trim()).filter(item => item !== ''); + if (this.targetSuiteArray.length === 0) { + for (let index in targetArray) { + if (targetArray[index].includes('#')) { + this.targetSpecArray.push(targetArray[index]); + } else { + this.targetSuiteArray.push(targetArray[index]); + } + } + + } + return targetArray.indexOf(desc) === -1; + + } + traversalResults(suite, obj, breakOnError) { + if (suite.childSuites.length === 0 && suite.specs.length === 0) { + return; + } + if (suite.specs.length > 0) { + for (const itItem of suite.specs) { + obj.total++; + let itInfo = { + currentThreadName: 'mainThread', + description: suite.description + '#' + itItem.description, + result: -3 + }; + if (SysTestKit.workerPort !== null) { + itInfo.currentThreadName = SysTestKit.workerPort.name; + } + obj.itItemList.push(itInfo); + if (breakOnError && (obj.error > 0 || obj.failure > 0)) { // breakOnError模式 + continue; + } + if (itItem.error) { + obj.error++; + itInfo.result = -1; + } else if (itItem.fail) { + obj.failure++; + itInfo.result = -2; + } else if (itItem.pass === true) { + obj.pass++; + itInfo.result = 0; + } + } + } + + obj.duration += suite.duration; + + if (suite.childSuites.length > 0) { + for (const suiteItem of suite.childSuites) { + this.traversalResults(suiteItem, obj, breakOnError); + } + } + + } + + async setSuiteResults(suite, error, coreContext) { + if (suite.childSuites.length === 0 && suite.specs.length === 0) { + return; + } + if (suite.specs.length > 0) { + const specService = coreContext.getDefaultService('spec'); + for (const specItem of suite.specs) { + specService.setCurrentRunningSpec(specItem); + if (error instanceof AssertException) { + specItem.fail = error; + } else { + specItem.error = error; + } + await coreContext.fireEvents('spec', 'specStart', specItem); + await coreContext.fireEvents('spec', 'specDone', specItem); + } + } + if (suite.childSuites.length > 0) { + for (const suiteItem of suite.childSuites) { + await this.setSuiteResults(suiteItem, error, coreContext); + } + } + } + + getSummary() { + let suiteService = this.coreContext.getDefaultService('suite'); + let rootSuite = suiteService.rootSuite; + const specService = this.coreContext.getDefaultService('spec'); + const configService = this.coreContext.getDefaultService('config'); + let breakOnError = configService.isBreakOnError(); + let isError = specService.getStatus(); + let isBreaKOnError = breakOnError && isError; + // itItemList 保存当前用例执行情况, 发送到主线程用例计算最终结果 + let obj = { total: 0, failure: 0, error: 0, pass: 0, ignore: 0, duration: 0, itItemList: []}; + for (const suiteItem of rootSuite.childSuites) { + this.traversalResults(suiteItem, obj, isBreaKOnError); + } + obj.ignore = obj.total - obj.pass - obj.failure - obj.error; + return obj; + } + + init(coreContext) { + this.coreContext = coreContext; + } + + traversalSuites(suite, obj, configService) { + if (suite.childSuites.length === 0 && suite.specs.length === 0) { + return []; + } + if (suite.specs.length > 0) { + let itArray = []; + for (const itItem of suite['specs']) { + if (!configService.filterDesc(suite.description, itItem.description, itItem.fi, null)) { + itArray.push({ 'itName': itItem.description }); + } + } + obj[suite.description] = itArray; + } + if (suite.childSuites.length > 0) { + let suiteArray = []; + for (const suiteItem of suite.childSuites) { + let suiteObj = {}; + this.traversalSuites(suiteItem, suiteObj, configService); + if (!configService.filterSuite(suiteItem.description)) { + suiteArray.push(suiteObj); + } + } + obj.suites = suiteArray; + } + } + + async dryRun(abilityDelegator) { + console.info(`${TAG} rootSuite : ` + JSON.stringify(this.rootSuite)); + let obj = this.rootSuite; + let prefixStack = []; + let suiteArray = []; + let skipSuiteArray = []; + this.analyzeSuitesArray(prefixStack, suiteArray, skipSuiteArray, obj); + const configService = this.coreContext.getDefaultService('config'); + let result; + if (configService.skipMessage) { + result = { 'suites': suiteArray, 'skipSuites': skipSuiteArray }; + } else { + result = { 'suites': suiteArray }; + } + let strJson = JSON.stringify(result); + let strLen = strJson.length; + let maxLen = 500; + let maxCount = Math.floor(strLen / maxLen); + for (let count = 0; count <= maxCount; count++) { + await SysTestKit.print(strJson.substring(count * maxLen, (count + 1) * maxLen)); + } + console.info(`${TAG}dryRun print success`); + abilityDelegator.finishTest('dry run finished!!!', 0, () => { }); + } + + //将suitesArray的嵌套结构展开成三层结构 + analyzeSuitesArray(prefixStack, suiteArray, skipSuiteArray, obj) { + obj.childSuites.map(suite => { + if (suite.description != null && suite.description !== '') { + let prefix = ''; + if (prefixStack.length > 0) { + prefix = prefixStack.join('.') + '.' + suite.description; + } else { + prefix = suite.description; + } + prefixStack.push(suite.description); + let temp = {}; + temp[prefix] = []; + let skipTemp = {}; + skipTemp[prefix] = []; + suite.specs.map(spec => { + let it = { 'itName': spec.description }; + spec.isSkip ? skipTemp[prefix].push(it) : temp[prefix].push(it); + }); + suiteArray.push(temp); + skipSuiteArray.push(skipTemp); + } + this.analyzeSuitesArray(prefixStack, suiteArray, skipSuiteArray, suite); + prefixStack.pop(); + }); + } + //获取当前测试套下的所有测试用例数量 + getAllChildSuiteNum(suite, specArray) { + if (suite.specs != null) { + suite.specs.forEach(spec => specArray.push(spec)); + } + if (suite.childSuites != null) { + suite.childSuites.forEach(it => this.getAllChildSuiteNum(it, specArray)); + } + } + + execute() { + const configService = this.coreContext.getDefaultService('config'); + if (configService.filterValid.length !== 0) { + this.coreContext.fireEvents('task', 'incorrectFormat'); + return; + } + if (configService.filterXdescribe.length !== 0) { + this.coreContext.fireEvents('task', 'incorrectTestSuiteFormat'); + return; + } + if (configService.isRandom() && this.rootSuite.childSuites.length > 0) { + this.rootSuite.childSuites.sort(function () { + return +('0.' + (+ new Date() + '').split('').reverse().join('')) > 0.5 ? -1 : 1; + }); + this.currentRunningSuite = this.rootSuite.childSuites[0]; + } + if (configService.isSupportAsync()) { + console.info(`${TAG} rootSuite:` + JSON.stringify(this.rootSuite)); + let asyncExecute = async () => { + await this.coreContext.fireEvents('task', 'taskStart'); + await this.rootSuite.asyncRun(this.coreContext); + }; + asyncExecute().then(async () => { + await this.coreContext.fireEvents('task', 'taskDone'); + }); + } else { + console.info('${TAG} rootSuite:' + JSON.stringify(this.rootSuite)); + this.coreContext.fireEvents('task', 'taskStart'); + this.rootSuite.run(this.coreContext); + this.coreContext.fireEvents('task', 'taskDone'); + } + } + + apis() { + const _this = this; + return { + describe: function (desc, func) { + return _this.describe(desc, func); + }, + xdescribe: function (desc, func, reason) { + return _this.xdescribe(desc, func, reason); + }, + beforeItSpecified: function (itDescs, func) { + return _this.beforeItSpecified(itDescs, func); + }, + afterItSpecified: function (itDescs, func) { + return _this.afterItSpecified(itDescs, func); + }, + beforeAll: function (func) { + return _this.beforeAll(func); + }, + beforeEach: function (func) { + return _this.beforeEach(func); + }, + afterAll: function (func) { + return _this.afterAll(func); + }, + afterEach: function (func) { + return _this.afterEach(func); + } + }; + } +} + +SuiteService.Suite = class { + constructor(attrs) { + this.description = attrs.description || ''; + this.childSuites = []; + this.specs = []; + this.beforeAll = []; + this.afterAll = []; + this.beforeItSpecified = new Map(); + this.afterItSpecified = new Map(); + this.beforeEach = []; + this.afterEach = []; + this.duration = 0; + this.hookError = null; + this.isSkip = false; + this.skipReason = ''; + } + + pushSpec(spec) { + this.specs.push(spec); + } + + removeSpec(desc) { + this.specs = this.specs.filter((item, index) => { + return item.description !== desc; + }); + } + + getSpecsNum() { + return this.specs.length; + } + + isRun(coreContext) { + const configService = coreContext.getDefaultService('config'); + const suiteService = coreContext.getDefaultService('suite'); + const specService = coreContext.getDefaultService('spec'); + let breakOnError = configService.isBreakOnError(); + let isError = specService.getStatus(); + return breakOnError && isError; + } + + run(coreContext) { + const suiteService = coreContext.getDefaultService('suite'); + suiteService.setCurrentRunningSuite(this); + if (this.description !== '') { + coreContext.fireEvents('suite', 'suiteStart', this); + } + this.runHookFunc('beforeAll'); + if (this.specs.length > 0) { + const configService = coreContext.getDefaultService('config'); + if (configService.isRandom()) { + this.specs.sort(function () { + return +('0.' + (+ new Date() + '').split('').reverse().join('')) > 0.5 ? -1 : 1; + }); + } + for (let spec in this.specs) { + let isBreakOnError = this.isRun(coreContext); + if (isBreakOnError) { + break; + } + this.runHookFunc('beforeEach'); + spec.run(coreContext); + this.runHookFunc('afterEach'); + } + } + if (this.childSuites.length > 0) { + for (let suite in this.childSuites) { + let isBreakOnError = this.isRun(coreContext); + if (isBreakOnError) { + break; + } + suite.run(coreContext); + suiteService.setCurrentRunningSuite(suite); + } + } + this.runHookFunc('afterAll'); + if (this.description !== '') { + coreContext.fireEvents('suite', 'suiteDone'); + } + } + + async runBeforeItSpecified(beforeItSpecified, specItem) { + for (const [itNames, hookFunc] of beforeItSpecified) { + if ((Object.prototype.toString.call(itNames) === '[object Array]' && itNames.includes(specItem.description)) || + (Object.prototype.toString.call(itNames) === '[object String]' && itNames === specItem.description)) { + await Reflect.apply(hookFunc, null, []); + } + break; + } + } + + async runAfterItSpecified(beforeItSpecified, specItem) { + for (const [itNames, hookFunc] of beforeItSpecified) { + if ((Object.prototype.toString.call(itNames) === '[object Array]' && itNames.includes(specItem.description)) || + (Object.prototype.toString.call(itNames) === '[object String]' && itNames === specItem.description)) { + await Reflect.apply(hookFunc, null, []); + } + break; + } + } + + async asyncRunSpecs(coreContext) { + const configService = coreContext.getDefaultService('config'); + if (configService.isRandom()) { + this.specs.sort(function () { + return +('0.' + (+ new Date() + '').split('').reverse().join('')) > 0.5 ? -1 : 1; + }); + } + const specService = coreContext.getDefaultService('spec'); + for (let specItem of this.specs) { + specService.setCurrentRunningSpec(specItem); + // 遇错即停模式,发现用例有问题,直接返回,不在执行后面的it + let isBreakOnError = this.isRun(coreContext); + if (isBreakOnError) { + console.info('break description :' + this.description); + break; + } + await coreContext.fireEvents('spec', 'specStart', specItem); + try { + await this.runBeforeItSpecified(this.beforeItSpecified, specItem); + await this.runAsyncHookFunc('beforeEach'); + await specItem.asyncRun(coreContext); + await this.runAfterItSpecified(this.afterItSpecified, specItem); + await this.runAsyncHookFunc('afterEach'); + } catch (e) { + console.error(`${TAG}stack:${e?.stack}`); + console.error(`${TAG}stack end`); + if (e instanceof AssertException) { + specItem.fail = e; + } else { + specItem.error = e; + } + specService.setStatus(true); + } + specItem.setResult(); + await coreContext.fireEvents('spec', 'specDone', specItem); + specService.setCurrentRunningSpec(null); + } + } + + async asyncRunChildSuites(coreContext) { + for (let i = 0; i < this.childSuites.length; i++) { + // 遇错即停模式, 发现用例有问题,直接返回,不在执行后面的description + let isBreakOnError = this.isRun(coreContext); + if (isBreakOnError) { + console.info(`${TAG}break description : ${this.description}`); + break; + } + await this.childSuites[i].asyncRun(coreContext); + } + } + + async asyncRun(coreContext) { + const suiteService = coreContext.getDefaultService('suite'); + const specService = coreContext.getDefaultService('spec'); + + suiteService.setCurrentRunningSuite(this); + suiteService.suitesStack.push(this); + if (this.description !== '') { + await coreContext.fireEvents('suite', 'suiteStart', this); + } + + try { + await this.runAsyncHookFunc('beforeAll'); + } catch (error) { + console.error(`${TAG}${error?.stack}`); + this.hookError = error; + } + + if (this.hookError !== null) { + specService.setStatus(true); + await suiteService.setSuiteResults(this, this.hookError, coreContext); + } + + if (this.specs.length > 0 && this.hookError === null) { + await this.asyncRunSpecs(coreContext); + } + + if (this.childSuites.length > 0 && this.hookError === null) { + await this.asyncRunChildSuites(coreContext); + } + + try { + await this.runAsyncHookFunc('afterAll'); + } catch (error) { + console.error(`${TAG}${error?.stack}`); + this.hookError = error; + specService.setStatus(true); + } + + if (this.description !== '') { + await coreContext.fireEvents('suite', 'suiteDone'); + let childSuite = suiteService.suitesStack.pop(); + let currentRunningSuite = suiteService.suitesStack.pop(); + suiteService.setCurrentRunningSuite(currentRunningSuite); + suiteService.suitesStack.push(currentRunningSuite); + } + } + + runHookFunc(hookName) { + if (this[hookName] && this[hookName].length > 0) { + this[hookName].forEach(func => { + try { + func(); + } catch (e) { + console.error(`${TAG}${e.stack}`); + } + }); + } + } + + async runAsyncHookFunc(hookName) { + for (const hookItem of this[hookName]) { + try { + await hookItem(); + } catch (error) { + error['message'] += `, error in ${hookName} function`; + throw error; + } + + } + } +}; + +class SpecService { + constructor(attr) { + this.id = attr.id; + this.totalTest = 0; + this.hasError = false; + this.skipSpecNum = 0; + this.isSkipSpec = false; + this.specSkipReason = ''; + } + + init(coreContext) { + this.coreContext = coreContext; + } + + setCurrentRunningSpec(spec) { + this.currentRunningSpec = spec; + } + + setStatus(obj) { + this.hasError = obj; + } + + getStatus() { + return this.hasError; + } + + getTestTotal() { + return this.totalTest; + } + + getCurrentRunningSpec() { + return this.currentRunningSpec; + } + + + getSkipSpecNum() { + return this.skipSpecNum; + } + + initSpecService() { + this.isSkipSpec = false; + this.specSkipReason = ''; + } + + it(desc, filter, func) { + const suiteService = this.coreContext.getDefaultService('suite'); + const configService = this.coreContext.getDefaultService('config'); + let isFilter = new NestFilter().filterNestName(suiteService.targetSuiteArray, suiteService.targetSpecArray, suiteService.suitesStack, desc); + if (configService.filterWithNest(desc, filter)) { + console.info(`${TAG}filter it :${desc}`); + this.initSpecService(); + return; + } + if (configService.filterDesc(suiteService.currentRunningSuite.description, desc, filter, this.coreContext) && isFilter && !suiteService.fullRun) { + console.info(`${TAG}filter it :${desc}`); + this.initSpecService(); + } else { + let processedFunc = processFunc(this.coreContext, func); + const spec = new SpecService.Spec({ description: desc, fi: filter, fn: processedFunc }); + if (this.isSkipSpec) { + spec.isSkip = true; + spec.skipReason = this.specSkipReason; + } + this.initSpecService(); + if (configService.runSkipped === 'skipped' && !spec.isSkip) { + console.info(`${TAG} runSkipped is skipped , just run xit, don't run it: ${spec.description}`); + return; + } + if (suiteService.getCurrentRunningSuite().isSkip && !spec.isSkip) { + configService.filterXdescribe.push(suiteService.getCurrentRunningSuite().description); + } + if (typeof this.coreContext.getServices('dataDriver') !== 'undefined' && configService['dryRun'] !== 'true') { + let specStress = this.coreContext.getServices('dataDriver').dataDriver.getSpecStress(desc); + for (let i = 1; i < specStress; i++) { + this.totalTest++; + suiteService.getCurrentRunningSuite().pushSpec(spec); + } + } + // dryRun 状态下不统计压力测试重复数据 + if (configService['dryRun'] !== 'true') { + let stress = configService.getStress(); // 命令配置压力测试 + console.info(`${TAG}stress length : ${stress}`); + for (let i = 1; i < stress; i++) { + this.totalTest++; + suiteService.getCurrentRunningSuite().pushSpec(spec); + } + } + this.totalTest++; + suiteService.getCurrentRunningSuite().pushSpec(spec); + } + } + + xit(desc, filter, func, reason) { + const configService = this.coreContext.getDefaultService('config'); + const suiteService = this.coreContext.getDefaultService('suite'); + if (!configService.skipMessage && configService.runSkipped !== 'all') { + if (configService.runSkipped != null && configService.runSkipped !== '') { + let finalDesc = ''; + suiteService.suitesStack.map(suite => { + finalDesc = finalDesc + '.' + suite.description; + }); + finalDesc = (finalDesc + '#' + desc).substring(2); + if (configService.checkIfSpecInSkipRun(finalDesc)) { + console.info(`${TAG} runSkipped spec: ${desc}`); + } else { + console.info(reason == null ? `${TAG} skip spec: ${desc}` : `${TAG} skip spec: ${desc}, and the reason is ${reason}`); + return; + } + } else { + console.info(reason == null ? `${TAG} skip spec: ${desc}` : `${TAG} skip spec: ${desc}, and the reason is ${reason}`); + return; + } + } + this.skipSpecNum++; + this.isSkipSpec = true; + this.specSkipReason = reason; + this.it(desc, filter, func); + } + + apis() { + const _this = this; + return { + it: function (desc, filter, func) { + return _this.it(desc, filter, func); + }, + xit: function (desc, filter, func, reason) { + return _this.xit(desc, filter, func, reason); + } + }; + } +} + +SpecService.Spec = class { + constructor(attrs) { + this.description = attrs.description || ''; + this.fi = attrs.fi; + this.fn = attrs.fn || function () { + }; + this.fail = undefined; + this.error = undefined; + this.duration = 0; + this.startTime = 0; + this.isExecuted = false; // 当前用例是否执行 + this.isSkip = false; + this.skipReason = ''; + this.expectMsg = ''; + } + + setResult() { + if (this.fail) { + this.pass = false; + } else { + this.pass = true; + } + } + + run(coreContext) { + const specService = coreContext.getDefaultService('spec'); + specService.setCurrentRunningSpec(this); + coreContext.fireEvents('spec', 'specStart', this); + this.isExecuted = true; + try { + let dataDriver = coreContext.getServices('dataDriver'); + if (typeof dataDriver === 'undefined') { + this.fn(); + } else { + let suiteParams = dataDriver.dataDriver.getSuiteParams(); + let specParams = dataDriver.dataDriver.getSpecParams(); + console.info(`${TAG}[suite params] ${JSON.stringify(suiteParams)}`); + console.info(`${TAG}[spec params] ${JSON.stringify(specParams)}`); + if (this.fn.length === 0) { + this.fn(); + } else if (specParams.length === 0) { + this.fn(suiteParams); + } else { + specParams.forEach(paramItem => this.fn(Object.assign({}, paramItem, suiteParams))); + } + } + this.setResult(); + } catch (e) { + this.error = e; + specService.setStatus(true); + } + coreContext.fireEvents('spec', 'specDone', this); + } + + async asyncRun(coreContext) { + const dataDriver = coreContext.getServices('dataDriver'); + if (typeof dataDriver === 'undefined') { + await this.fn(); + } else { + const suiteParams = dataDriver.dataDriver.getSuiteParams(); + const specParams = dataDriver.dataDriver.getSpecParams(); + console.info(`[suite params] ${JSON.stringify(suiteParams)}`); + console.info(`[spec params] ${JSON.stringify(specParams)}`); + if (this.fn.length === 0) { + await this.fn(); + } else if (specParams.length === 0) { + await this.fn(suiteParams); + } else { + for (const paramItem of specParams) { + await this.fn(Object.assign({}, paramItem, suiteParams)); + } + } + } + + this.isExecuted = true; + } + + filterCheck(coreContext) { + const specService = coreContext.getDefaultService('spec'); + specService.setCurrentRunningSpec(this); + return true; + } +}; + +class ExpectService { + constructor(attr) { + this.id = attr.id; + this.matchers = {}; + this.customMatchers = []; + } + + expect(actualValue) { + return this.wrapMatchers(actualValue); + } + + init(coreContext) { + this.coreContext = coreContext; + this.addMatchers(this.basicMatchers()); + } + + addMatchers(matchers) { + for (const matcherName in matchers) { + if (Object.prototype.hasOwnProperty.call(matchers, matcherName)) { + this.matchers[matcherName] = matchers[matcherName]; + } + } + } + + removeMatchers(customAssertionName) { + if (customAssertionName === 'all') { + for (const matcherName in this.matchers) { + this.matchers[matcherName] = this.customMatchers.includes(matcherName) + ? (() => {throw new Error(`${matcherName} is unregistered`)}) : undefined; + } + } else { + this.matchers[customAssertionName] = () => { + throw new Error(`${customAssertionName} is unregistered`); + }; + } + } + + basicMatchers() { + return { + assertTrue: assertTrueFun, + assertEqual: assertEqualFun, + assertThrow: assertThrowFun + }; + } + + initWrapMatchers(currentRunningSpec) { + return { + // 翻转标识 + isNot: false, + // 翻转方法 + not: function () { + this.isNot = true; + return this; + }, + message: function (msg) { + currentRunningSpec.expectMsg = msg; + console.info(`${TAG} msg: ${msg}`); + return this; + } + }; + + } + + handleWithAssertPromise(_this, wrappedMatchers, matcherName, actualValue, currentRunningSpec, currentRunningSuite) { + wrappedMatchers[matcherName] = async function (...args) { + await _this.matchers[matcherName](actualValue, args).then(function (result) { + if (wrappedMatchers.isNot) { + result.pass = !result.pass; + } + result.actualValue = actualValue; + result.checkFunc = matcherName; + if (!result.pass) { + const assertError = new AssertException(result.message); + currentRunningSpec ? currentRunningSpec.fail = assertError : currentRunningSuite.hookError = assertError; + throw assertError; + } + }); + }; + } + + handleWithoutAssertPromise(_this, wrappedMatchers, matcherName, actualValue, currentRunningSpec, currentRunningSuite) { + wrappedMatchers[matcherName] = function (...args) { + const result = _this.customMatchers.includes(matcherName) + ? _this.matchers[matcherName](actualValue, args[0]) : _this.matchers[matcherName](actualValue, args); + if (wrappedMatchers.isNot) { + result.pass = !result.pass; + result.message = LogExpectError.getErrorMsg(matcherName, actualValue, args[0], result.message); + } + result.actualValue = actualValue; + result.checkFunc = matcherName; + if (!result.pass) { + const assertError = new AssertException(result.message); + currentRunningSpec ? currentRunningSpec.fail = assertError : currentRunningSuite.hookError = assertError; + throw assertError; + } + }; + } + + addAssert(wrappedMatchers, matcherName, actualValue) { + const _this = this; + const specService = _this.coreContext.getDefaultService('spec'); + const currentRunningSpec = specService.getCurrentRunningSpec(); + const currentRunningSuite = _this.coreContext.getDefaultService('suite').getCurrentRunningSuite(); + if (matcherName.search('assertPromise') === 0) { + this.handleWithAssertPromise(_this, wrappedMatchers, matcherName, actualValue, currentRunningSpec, currentRunningSuite); + } else { + this.handleWithoutAssertPromise(_this, wrappedMatchers, matcherName, actualValue, currentRunningSpec, currentRunningSuite); + } + } + + wrapMatchers(actualValue) { + const _this = this; + const specService = _this.coreContext.getDefaultService('spec'); + const currentRunningSpec = specService.getCurrentRunningSpec(); + const wrappedMatchers = this.initWrapMatchers(currentRunningSpec); + const currentRunningSuite = _this.coreContext.getDefaultService('suite').getCurrentRunningSuite(); + for (const matcherName in this.matchers) { + let result = Object.prototype.hasOwnProperty.call(this.matchers, matcherName); + if (!result) { + continue; + } + this.addAssert(wrappedMatchers, matcherName, actualValue); + } + return wrappedMatchers; + } + + apis() { + const _this = this; + return { + expect: function (actualValue) { + return _this.expect(actualValue); + } + }; + } +} + +class ReportService { + constructor(attr) { + this.id = attr.id; + } + + init(coreContext) { + this.coreContext = coreContext; + this.specService = this.coreContext.getDefaultService('spec'); + this.suiteService = this.coreContext.getDefaultService('suite'); + this.duration = 0; + } + + taskStart() { + console.info(`${TAG}[start] start run suites`); + } + + async suiteStart() { + console.info(`${TAG}[suite start]${this.suiteService.getCurrentRunningSuite().description}`); + } + + async specStart() { + console.info(`${TAG}start running case '${this.specService.currentRunningSpec.description}'`); + this.index = this.index + 1; + let spec = this.specService.currentRunningSpec; + spec.startTime = await SysTestKit.getRealTime(); + } + + async specDone() { + let msg = ''; + let spec = this.specService.currentRunningSpec; + let suite = this.suiteService.currentRunningSuite; + spec.duration = await SysTestKit.getRealTime() - spec.startTime; + suite.duration += spec.duration; + if (spec.error) { + this.formatPrint('error', spec.description + ' ; consuming ' + spec.duration + 'ms'); + this.formatPrint('errorDetail', spec.error); + } else if (spec.fail) { + this.formatPrint('fail', spec.description + ' ; consuming ' + spec.duration + 'ms'); + this.formatPrint('failDetail', spec.fail?.message); + } else { + this.formatPrint('pass', spec.description + ' ; consuming ' + spec.duration + 'ms'); + } + this.formatPrint(this.specService.currentRunningSpec.error, msg); + } + + suiteDone() { + let suite = this.suiteService.currentRunningSuite; + let message = suite.hookError ? `, ${suite.hookError?.message}` : ''; + console.info(`[suite end] ${suite.description} consuming ${suite.duration} ms${message}`); + } + + taskDone() { + let msg = ''; + let summary = this.suiteService.getSummary(); + msg = 'total cases:' + summary.total + ';failure ' + summary.failure + ',' + 'error ' + summary.error; + msg += ',pass ' + summary.pass + '; consuming ' + summary.duration + 'ms'; + console.info(`${TAG}${msg}`); + console.info(`${TAG}[end] run suites end`); + } + + incorrectFormat() { + if (this.coreContext.getDefaultService('config').filterValid.length !== 0) { + this.coreContext.getDefaultService('config').filterValid.forEach(function (item) { + console.info(`${TAG}this param ${item} is invalid`); + }); + } + } + + incorrectTestSuiteFormat() { + if (this.coreContext.getDefaultService('config').filterXdescribe.length !== 0) { + this.coreContext.getDefaultService('config').filterXdescribe.forEach(function (item) { + console.info(`${TAG}xdescribe: ${item} should not contain it`); + }); + } + } + + formatPrint(type, msg) { + switch (type) { + case 'pass': + console.info(`${TAG}[pass]${msg}`); + break; + case 'fail': + console.info(`${TAG}[fail]${msg}`); + break; + case 'failDetail': + console.info(`${TAG}[failDetail]${msg}`); + break; + case 'error': + console.info(`${TAG}[error]${msg}`); + break; + case 'errorDetail': + console.info(`${TAG}[errorDetail]${msg}`); + break; + } + } + + sleep(numberMillis) { + var now = new Date(); + var exitTime = now.getTime() + numberMillis; + while (true) { + now = new Date(); + if (now.getTime() > exitTime) { + return; + } + } + } +} + +export { + SuiteService, + SpecService, + ExpectService, + ReportService +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/testrunner/OpenHarmonyTestRunner.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/testrunner/OpenHarmonyTestRunner.ts new file mode 100644 index 0000000000000000000000000000000000000000..e6f4c1b12dd69714ed5a4524671abca1fbcaa58c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+hypium@1.0.24/oh_modules/@ohos/hypium/src/main/testrunner/OpenHarmonyTestRunner.ts @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2023-2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { abilityDelegatorRegistry, TestRunner } from '@kit.TestKit'; +import { BusinessError } from '@kit.BasicServicesKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { resourceManager } from '@kit.LocalizationKit'; +import { util } from '@kit.ArkTS'; +import { Hypium } from '@ohos/hypium'; +import testsuite from '../test/List.test'; + +let abilityDelegator: abilityDelegatorRegistry.AbilityDelegator; +let abilityDelegatorArguments: abilityDelegatorRegistry.AbilityDelegatorArgs; +let jsonPath: string = 'mock/mock-config.json'; +let domain: number = 0x0000; //日志标识,0x0000作为测试框架的业务标识 +let tag: string = 'testTag'; //日志标识字符串,作为tag标识当前runner类下的测试行为 + +export default class OpenHarmonyTestRunner implements TestRunner { + constructor() { + } + + onPrepare() { + hilog.info(domain, tag, '%{public}s', 'OpenHarmonyTestRunner OnPrepare'); + } + + async onRun() { + hilog.info(domain, tag, '%{public}s', 'OpenHarmonyTestRunner onRun run'); + abilityDelegatorArguments = abilityDelegatorRegistry.getArguments(); + abilityDelegator = abilityDelegatorRegistry.getAbilityDelegator(); + let moduleName = abilityDelegatorArguments.parameters['-m']; + let context = abilityDelegator.getAppContext().getApplicationContext().createModuleContext(moduleName); + let mResourceManager = context.resourceManager; + await checkMock(abilityDelegator, mResourceManager); + hilog.info(domain, tag, '%{public}s', 'start run testcase!!!'); + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite); + hilog.info(domain, tag, '%{public}s', 'OpenHarmonyTestRunner onRun end'); + } +} + +async function checkMock(abilityDelegator: abilityDelegatorRegistry.AbilityDelegator, resourceManager: resourceManager.ResourceManager) { + let rawFile: Uint8Array; + try { + rawFile = resourceManager.getRawFileContentSync(jsonPath); + hilog.info(domain, tag, 'MockList file exists'); + let mockStr: string = util.TextDecoder.create("utf-8", { ignoreBOM: true }).decodeWithStream(rawFile); + let mockMap: Record = getMockList(mockStr); + try { + abilityDelegator.setMockList(mockMap); + } catch (error) { + let code = (error as BusinessError).code; + let message = (error as BusinessError).message; + hilog.error(domain, tag, `abilityDelegator.setMockList failed, error code: ${code}, message: ${message}.`); + } + } catch (error) { + let code = (error as BusinessError).code; + let message = (error as BusinessError).message; + hilog.error(domain, tag, `ResourceManager:callback getRawFileContent failed, error code: ${code}, message: ${message}.`); + } +} + +function getMockList(jsonStr: string) { + let jsonObj: Record = JSON.parse(jsonStr); + let map: Map = new Map(Object.entries(jsonObj)); + let mockList: Record = {}; + map.forEach((value: object, key: string) => { + let realValue: string = value['source'].toString(); + mockList[key] = realValue; + }); + hilog.info(domain, tag, '%{public}s', 'mock-json value:' + JSON.stringify(mockList) ?? ''); + return mockList; +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/BuildProfile.ets b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/BuildProfile.ets new file mode 100644 index 0000000000000000000000000000000000000000..6ebcbce1855368b60f68bd8807c749dbec719dff --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/BuildProfile.ets @@ -0,0 +1,17 @@ +/** + * Use these variables when you tailor your ArkTS code. They must be of the const type. + */ +export const HAR_VERSION = '2.0.24'; +export const BUILD_MODE_NAME = 'debug'; +export const DEBUG = true; +export const TARGET_NAME = 'default'; + +/** + * BuildProfile Class is used only for compatibility purposes. + */ +export default class BuildProfile { + static readonly HAR_VERSION = HAR_VERSION; + static readonly BUILD_MODE_NAME = BUILD_MODE_NAME; + static readonly DEBUG = DEBUG; + static readonly TARGET_NAME = TARGET_NAME; +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/CHANGELOG.md b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..130b621fab7c6b0727c0a790e5692dc995855901 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/CHANGELOG.md @@ -0,0 +1,339 @@ +## v2.0.24 + Release version 2.0.24. + +## v2.0.24-rc.1 + feature: Supports synchronous clearing of all caches, including the current animation cache. + fix: Fix the issue of some animation content displaying abnormally outside the designated area. + fix: Fix the network image loading issue caused by the failure to create multiple layers of directories in the sandbox. + +## v2.0.24-rc.0 + fix: Fix the issue where the current animation frame number is abnormal when setting animation color dynamically. + fix: Fixed the issue of frame index out-of-bounds in reverse playback or nested animations in goToAndStop. + fix: Fix the issue where changeColor fails to modify the current frame color in transparency scenarios. + fix: Optimize the logic of the filling mode. + +## v2.0.23 + Release version 2.0.23. + +## v2.0.23-rc.2 + fix: Optimize the code by replacing deprecated interfaces with the latest and standardized ones. + +## v2.0.23-rc.1 + fix: Support the loading function of animation files in .zip and .lottie formats in the rawfile directory. + +## v2.0.23-rc.0 + feature: Support the loading function of animation files in .zip and .lottie formats in the rawfile directory. + +## v2.0.22 + fix: Fixed the animation crashing issue caused by the failure to read AbilityInfo.name in specific scenarios. + +## v2.0.21 + Release version 2.0.21. + +## v2.0.21-rc.1 + fix: Fix the complete callback exception caused by calling the playSegments method and enhance the fault-tolerant handling mechanism for illegal numbers NaN. + +## v2.0.21-rc.0 + fix: Fix the issue of abnormal animation playback in sub window scenes. + +## v2.0.20 + Release version 2.0.20. + +## v2.0.20-rc.3 + fix: Optimized the code for dynamically modifying the colors of each layer in Lottie animation, improving its performance, readability, and maintainability. + fix: Add a condition to determine whether the context2D object has the getJsonData method to avoid calling an error when the method does not exist. + +## v2.0.20-rc.2 + fix: Fix the issue in the HSP module where animations cannot be played due to the input of context context. + +## v2.0.20-rc.1 + fix: Optimize the loading logic of ZIP format network animation resources and fix some resource loading failures caused by format parsing exceptions. + fix: Fixed the issue where dynamically modifying the current frame color during animation pause was ineffective. + +## v2.0.20-rc.0 + fix: Fix and enhance the compatibility of loading. jpg/. jpg network animation images with enhanced animations. + fix: Fix the feature support issue where the animation playback frame rate can be set higher than the animation resource frame rate. + +## v2.0.19 + fix: Fixed the issue of process freezing caused by the while loop condition not being met, by adding a protection mechanism that forces the loop to exit when it reaches 2000 executions. + +## v2.0.18 + fix: Fixed the issue where Lottie's call to the goToAndStop interface resulted in the animation not correctly jumping to the last frame due to the total number of frames passed in. + +## v2.0.18-rc.1 + fix: Fix the compatibility issue of Lottie animation playback in some API 13 mirrored versions, targeting scenes where the canvas2d.on and canvas2d.off interfaces are not provided in this version, to ensure that the animation can play normally. + +## v2.0.18-rc.0 + feature: Supports normal playback of animations in multi ability scenarios. + +## v2.0.17 + fix: Optimize the Lottie lifecycle to solve redundant drawing in complex scenes. + Release version 2.0.17 + +## v2.0.17-rc.3 + fix: Fix getContext() in specific scenarios The problem of error reporting when obtaining the path of the sandbox file cacheDir using the method. + +## v2.0.17-rc.2 + fix: Fix due to this_ The type of the absoluteFramePlayed parameter is changed from number to non number, resulting in the failure of calling the. toPixed() method and causing errors. + +## v2.0.17-rc.1 + fix: Fixed the issue of accidentally clearing other array objects when destroying animations, resulting in the failure of loading other animations. + fix: Adjust the animation playback speed so that it can accurately control the playback rate in decimal form. + fix: Fix animation loading support for directly reading animation resource files from the sandbox through path mode for playback. + +## v2.0.17-rc.0 + fix: At the end of each frame of the animation, reset CanvasRendering Context2D to its default state, clear the background buffer, and improve drawing performance. + feature: Supplement log switch function interface. + +## v2.0.16 + Release version 2.0.16. + +## v2.0.16-rc.3 + fix:Fixed the issue where the animation loading execution was incomplete and destroyed, and the internal closure was not fully executed, resulting in the object being held indefinitely. + +## v2.0.16-rc.2 + fix:Fix the issue of abnormal font and animation effects playback size in animations. + +## v2.0.16-rc.1 + fix:Fixed the issue of ineffective animation gradient transparency caused by array index out of bounds. + +## v2.0.16-rc.0 + fix:Fixed the issue where the parent component node was hidden while the child component canvas node was visible, causing the animation to still play. + +## v2.0.15 + fix: Fix the issue where animations are automatically destroyed when their state is not visible in a specific scene. + fix: Fix the issue of failed dynamic modification of multiple keyframe colors in animation. + +## v2.0.15-rc.1 + fix: Optimized and solved the problem of keyframe colors not taking effect in dynamic replacement animations. + fix: Fixed the issue of ineffective transparency settings for dynamic gradient colors in animations. + fix: Fix the issue of incorrect text display position in animation. + +## v2.0.15-rc.0 + fix: Fixed the issue where one or more animations were destroyed during simultaneous loading and playback, resulting in a low probability of crashes in the application. + feature: Support specifying replacement animation images. + fix: Fix the issue of abnormal animation font playback and animation effect size. + fix: Fix the problem of reading errors in sandbox image resources caused by insufficient read permissions or missing files. + +## v2.0.14 + Release version 2.0.14. + +## v2.0.14-rc.2 + fix: Fix the issue of reading the image_stource property incorrectly when the image data is incorrect. + fix: Modify and clear cache interface, clearing all/individual caches using the same interface. + +## v2.0.14-rc.1 + feature:When the animation is completely invisible, the current animation will automatically pause and stop sending drawing instructions to optimize performance and reduce power consumption. + +## v2.0.14-rc.0 + feature:支持清除全部缓存, 清除当前动画缓存。 + feature:支持判断动画是否为网络播放。 + feature:优化animator的使用方式,使用displaySync替代animator机制。 + fix: 修复使用animationData方式加载播放网络资源图片失败的问题。 + +## v2.0.13 + 发布2.0.13正式版。 + +## v2.0.13-rc.0 + fix: 修复json动画资源文件缺少e属性导致动画图片加载不出来的问题。 + fix: 优化加载网络资源代码结构。 + +## v2.0.12 + 发布2.0.12正式版。 + +## v2.0.12-rc.3 + fix: 修复在自动播放状态下,加载动画第一帧重复播放的问题。 + +## v2.0.12-rc.2 + fix: 修复使用animateItem.destroy销毁方式,导致底层animator没有停止而一直在刷帧的问题。 + fix: 修复动画暂停重新播放后,帧率使用默认帧率播放的问题。 + +## v2.0.12-rc.1 + fix: 修复网络动画资源图片下载失败和字体没显示问题。 + +## v2.0.12-rc.0 + fix: 修复部分含字体动画播放显示不全的问题。 + +## v2.0.11 + 发布2.0.11正式版。 + +## v2.0.11-rc.7 + feature:支持读取指定路径下的图片资源。 + fix: 修复加载多个zip资源导致加载异常。 + fix: 修复频繁调用goToAndPlay()方法导致动画概率性出现播放不正常的问题。 + +## v2.0.11-rc.6 + fix: 修复lottie 网络资源下载异常处理。 + fix: 修复lottie 网络资源下载通知显示下载进度。 + fix: 修复lottie动态修改动画颜色时蒙版图层不需要改动的问题。 + +## v2.0.11-rc.5 + fix: 修复读取错误网络资源链接导致动画加载崩溃的问题。 + +## v2.0.11-rc.4 + fix: 修复动画执行pause时,底层animator没有停止的问题。 + fix:修复特殊场景下时间戳跳变引起时间差为负,导致动画播放跳到开始帧并完成播放的问题。 + fix:修复下载的zip资源中带有文件夹导致动画加载失败。 + +## v2.0.11-rc.3 + fix: 修复读取缓存资源,加载zip动画闪退的问题。 + +## v2.0.11-rc.2 + fix: 修复动画被销毁时,重新设置当前存活animation的最高帧率。 + feature:支持加载网络资源和通过URI路径方式加载动画。 + +## v2.0.11-rc.1 + fix: 修复lottie跳帧不渲染的问题。 + +## v2.0.11-rc.0 + fix: 修复图片资源默认使用图片自身宽高问题。 + +## v2.0.10 + feature:新增支持设置animator的刷帧率功能。 + fix: 修复无法触发'config_ready'、'data_ready'、'error'、'data_failed'监听事件问题。 + fix: 使用saveLayer和restoreLayer方案替代原来的方式实现动画蒙版动效,优化动画性能。 + feature:新增动画支持设置填充模式:Fill,Top,Cover,Bottom,Contain。 + fix: 修复动画圆圈的虚线无法展现实际动画效果的问题。 + fix: 修复图形变形没恢复导致画布重绘有残留图像的问题。 + fix: 修复动画json资源文件含有音频和正则表达式内容,动画加载播放的失败问题。 + fix: 修复加载多个动画,在特定场景下销毁个别正在播放的动画时animator没停止的问题。 + fix: 修复在特殊情况下动画暂停再恢复,画面内容不连贯问题。 + fix: 修复动画json有依赖图片资源不存在时,动画也可以加载播放的问题。 + +## v2.0.10-rc.4 + feature:新增支持设置animator的刷帧率功能 + +## v2.0.10-rc.3 + fix: 修复无法触发'config_ready'、'data_ready'、'error'、'data_failed'监听事件问题。 + fix: 使用saveLayer和restoreLayer方案替代原来的方式实现动画蒙版动效,优化动画性能。 + +## v2.0.10-rc.2 + feature:新增动画支持设置填充模式:Fill,Top,Cover,Bottom,Contain。 + fix: 修复动画圆圈的虚线无法展现实际动画效果的问题。 + fix: 修复图形变形没恢复导致画布重绘有残留图像的问题。 + +## v2.0.10-rc.1 + fix: 修复动画json资源文件含有音频和正则表达式内容,动画加载播放的失败问题。 + fix: 修复加载多个动画,在特定场景下销毁个别正在播放的动画时animator没停止的问题。 + +## v2.0.10-rc.0 + fix: 修复在特殊情况下动画暂停再恢复,画面内容不连贯问题。 + fix: 修复动画json有依赖图片资源不存在时,动画也可以加载播放的问题。 + +## v2.0.9 + fix: 新增支持动画mask相减蒙版模式特性。 + fix: 修复动画播放在折叠屏设备上出现残影的问题。 + +## v2.0.9-rc.0 + fix: 修复动画json文件里缺少e属性值导致外部资源图片加载失败的问题。 + +## v2.0.8 + fix: 添加传入应用包名接口,用于日志打印区分不同模块调用启动animator线程,packageName可以不传。 + fix: 更改animator的使用方式,适配lottie在插件模块下可以播放动画。 + +## v2.0.7 + feature:新增支持读取沙箱路径下的图片资源。 + fix: 为了适配HSP场景,loadAnimation接口新增当前场景上下文context可选参数传入,在HSP场景下需要传正确的context,非HSP场景不影响,context可以不传。 + +## v2.0.7-rc.0 + feature:新增支持更改动画颜色的透明值和关键帧渐变色颜色特性。 + +## v2.0.6 + feature:新增支持Canvas渲染动画的高斯模糊动效特性。 + fix: piexlmap改成不可编辑状态,优化图形图像端读取速度。 + +## v2.0.5 + fix: 优化性能,释放pixel_map,防止内存泄漏。 + +## v2.0.5-rc.0 + fix: 修复lottie的registeredAnimations[i].animation空指针报错问题。 + fix: 修正替换play函数为gotoFrame,防止play方法创建Animator对象,导致修改颜色后刷帧问题。 + +## v2.0.4 + fix: 修复lottie播放mask动画多次调用getPixelMap方法,导致动画播放掉帧的问题。 + fix: 适配ArkTs语法。 + +## v2.0.3 + fix: 修复lottie不同版本在同一个界面启动,导致动画播放失败的问题。 + fix: 修复动画销毁,重新刷新界面导致应用的崩溃问题。 + +## v2.0.2 + feature:新增支持Canvas渲染中mask部分特性 + 支持渲染本地图片,包含base64编码和文件路径方式。 + fix: 修正圆形动画加载小球不重叠。 + fix: 修正动画全部播放完后,Animator也要停止刷帧。 + updated: 适配DevEco Studio: 4.0 Canary2(4.0.3.312)。 + 适配SDK: API10 (4.0.9.3)。 + +## v2.0.1 + feature:新增动画动态渲染颜色能力。 + fix: 修正License文件版权。 + fix: 添加Array.apply()函数的参数检验,如果长度为undefined时,设置长度为0。 + updated: 适配DevEco Studio: 4.0 Canary1(4.0.0.112)。 + 适配SDK: API10 (4.0.7.2)。 + updated: 修改Library目录结构根目录名称。 + +## v2.0.0 + feature: 动画加载代码解耦。 + updated: 包管理工具由npm切换为ohpm + 适配DevEco Studio: 3.1 Beta2(3.1.0.400) + 适配SDK: API9 Release(3.2.11.9) + +## v1.1.2 + fix: 未设置动画数据就直接加载动画,销毁动画时,导致的空指针异常。 + fix: 修正根据路径加载不到动画数据时的处理方式,不进行构建动画配置。 + fix: 删除动画加载限制,重复加载动画前需手动销毁上一个已加载动画。 + fix: 补充readme文件内Lottie组件使用注意事项 + loadAnimation使用时须在页面加载完成之后,例如Canvas.onReady()生命周期。 + loadAnimation加载动画使用path参数设置时,需要注意path参数只支持entry/src/main/ets文件夹下的相对路径,不支持跨包设置。 + 同一Canvas组件加载多次/不同动画资源,需要手动销毁动画(lottie.destroy()/animationItem.destroy()),之后才可再次加载其他动画资源。 + +## v1.1.1 + feature:补充svg渲染能力。 + 适配原库5.10.0版本。 +不支持特性: +* 不支持SVG渲染中filter效果 +* 不支持SVG渲染中mask部分特性 +* 不支持渲染本地图片及网络图片资源 + +## v1.1.0 + updated: 名称由lottieETS修改为lottie。 + updated: 旧的包@ohos/lottieETS已不再维护,请使用新包@ohos/lottie。 + fix:修复多次在同一画布上加载动画,导致动画重叠的问题。 + +不支持特性: +* 不支持SVG、HTML渲染方式 +* 不支持组件控制动画显示、隐藏、resize +* 不支持注册动画 +* 不支持查找动画 +* 不支持更新动画数据 +* 不支持部分效果 +* 不支持含有表达式的动画 + + +## v1.0.3 + fix:修复销毁动画时未清空画布的bug。 + fix:添加对通过路径获取动画文件json数据的非空校验,如果未获取到将抛出异常进行提示。 + + +## v1.0.2 + 适配API9 Stage 模型。 + + +## v1.0.1 + 升级IDE到3.0.0.900,使项目能在该环境下运行。 + + +## v1.0.0 + 适配兼容OpenHarmony系统,完成相关功能,具体如下: +* 动画播放、暂停、停止、切换暂停、跳到某一时刻并停止、跳到某一时刻并播放等动画基础功能。 +* 播放指定片段、重置动画、设置播放速度、设置播放方向、添加监听状态、获取动画时长等扩展功能。 +* canvas渲染。 + + + +### 对源库改动如下: +* 删除html渲染。 +* 删除svg渲染,等待后续迭代。 + + diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/LICENSE b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..9c1cd7cb84357f4aa3d57ff961cd37d993055ef5 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Bodymovin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/NOTICE b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..f4bdacacf502d08c89ea748ca525beed72ed62c2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/NOTICE @@ -0,0 +1,22 @@ +OPEN SOURCE SOFTWARE NOTICE + +Please note we provide an open source software notice for the third party open source software along with this software and/or this software component (in the following just “this SOFTWARE”). The open source software licenses are granted by the respective right holders. + +Warranty Disclaimer +THE OPEN SOURCE SOFTWARE IN THIS PRODUCT IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE APPLICABLE LICENSES FOR MORE DETAILS. + +Copyright Notice and License Texts + +---------------------------------------------------------------------- +Software: lottie-web 5.10.2 + +Copyright notice: +Copyright (c) 2015 Bodymovin + +License: The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/README.OpenSource b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/README.OpenSource new file mode 100644 index 0000000000000000000000000000000000000000..55879bcb9350e206927cb44c1ae7b61a23ef064f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/README.OpenSource @@ -0,0 +1,11 @@ +[ + { + "Name": "lottie-web", + "License": "MIT License", + "License File": "LICENSE.md", + "Version Number": "5.10.2", + "Owner": "xiafeng@huawei.com", + "Upstream URL": "https://github.com/airbnb/lottie-web", + "Description": "Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/" + } +] diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/README.md b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/README.md new file mode 100644 index 0000000000000000000000000000000000000000..5fac633a3f3fd130ceb917fc0d403f21d4bf8415 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/README.md @@ -0,0 +1,709 @@ +# lottie + +> **We recommend using [lottie-turbo](https://gitcode.com/openharmony-sig/lottie_turbo): Its declarative invocation is more concise, supporting parallel loading, in-memory caching, and sub-thread rendering. This leads to a performance improvement of over 30%, ensuring a smoother UI experience in scenarios with multiple or complex animations.** + + +## Introduction + +Lottie is an animation library for OpenHarmony that parses Adobe After Effects animations, exported as JSON files with Bodymovin, and renders them natively on mobile devices. + +![showlottie](./screenshot/showlottie_EN.gif) + + +## How to Install + +``` + ohpm install @ohos/lottie +``` +For details about the OpenHarmony ohpm environment configuration, see [OpenHarmony HAR](https://gitcode.com/openharmony-tpc/docs/blob/master/OpenHarmony_har_usage.en.md). + +## Example +### Example +``` +import lottie, { AnimationItem } from '@ohos/lottie'; + +@Entry +@Component +struct Index { + // Build a rendering context. + private renderingSettings: RenderingContextSettings = new RenderingContextSettings(true) + private canvasRenderingContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.renderingSettings) + private animateItem: AnimationItem | null = null; + private animateName: string = "animation"; // name + + // Destroy the animation. + aboutToDisappear(): void { + console.info('aboutToDisappear'); + lottie.destroy(); + } + + build() { + Row() { + // Configure a canvas. + Canvas(this.canvasRenderingContext) + .width(200) + .height(200) + .backgroundColor(Color.Gray) + .onReady(() => { + // Load the animation. + if (this.animateItem != null) { + // Load animations during canvas onReady, ensure that the animation size is correct. + this.animateItem?.resize(); + } else { + // Anti-aliasing settings. + this.canvasRenderingContext.imageSmoothingEnabled = true; + this.canvasRenderingContext.imageSmoothingQuality = 'medium' + this.loadAnimation(); + } + }) + } + } + + loadAnimation() { + this.animateItem = lottie.loadAnimation({ + container: this.canvasRenderingContext, + renderer: 'canvas', // canvas renderer + loop: true, + autoplay: false, + name: this.animateName, + contentMode: 'Contain', + path: 'common/animation.json', + }) + // Animations are loaded asynchronously, any operations on animateItem should be performed within the callback function for when the animation has finished loading. + this.animateItem.addEventListener('DOMLoaded', (args: Object): void => { + this.animateItem.changeColor([225, 25, 100, 1]); + this.animateItem.play(); + }); + } + + destroy() { + this.animateItem.removeEventListener('DOMLoaded'); + lottie.destroy(this.animateName); + this.animateItem = null; + } +} + +``` +### Important Notes +- 1. It is recommended to load the animation in the onReady method of canvas, and call the lottie.destroy(name) method before loading the animation to ensure that the animation will not be loaded repeatedly. +- 2. It is recommended to put the operation of the animation animateItem in the 'DOMLoaded' callback listener of addEventListener, and ensure that the animation-related operations are performed after the complete construction and parsing are completed, so as to avoid potential loading order problems. Because if it is the same code block, the animation is loaded asynchronously. +- 3. It is recommended to add animation anti-aliasing, such as the sample code code 67 to 68 line, to reduce the jagged phenomenon of the animation edge, make the animation screen smoother and more delicate, and achieve the best animation effect. +- 4. For the destruction of animation, it is recommended to use the lottie.destroy(name) method, which is more performance-friendly than directly using animateItem.destroy(). +- 5. It is recommended to destroy all animations on the page when the page is destroyed or uninstalled to ensure that the page resources are properly managed and released. +- 6. If the obfuscation mode compilation fails, it is recommended to add the configuration in the obfuscation-rules.txt file under the corresponding module: -keep ./oh_modules/@ohos/lottie. +- 7. It is recommended that the aspect ratio of the canvas be consistent with that of the animation. For example, if the aspect ratio of the animation is 1000 * 2000 (i.e., a ratio of 1:2), then the width and height of the canvas can be set to 200 * 400, also maintaining a ratio of 1:2. It is recommended that the width and height of the canvas should not be larger than the original width and height of the animation. +- 8. Note: When loading external resource images, if the specified path is used: imagePage:'lottie/images/', the path of the external resource image refers to the path under the rawfile directory or the file directory in the sandbox. +- 9. The external image resources referenced in Lottie's JSON file need to be stored in the rawfile directory. For example, if "u":"images/" in the json file, a folder named images is created in the rawfile directory to store the images. + + +## How to Use + +### To start off, get required data prepared. + +Lottie animations are created in Adobe After Effects and exported with Bodymovin as JSON files. + +When creating an animation in Adobe After Effects, you need to set the animation width (**w**), animation height (**h**), bodymovin version (**v**), frame rate (**fr**), start frame (**ip**), +end frame (**op**), static resource information (**assets**), and layer information (**layers**). + +For demo test purposes, you can use the [JSON file in the example project](https://gitcode.com/openharmony-tpc/lottieArkTS/tree/master/entry/src/main/ets/common/lottie). + +### 1. Import the component to the corresponding class. + + ``` + import lottie from '@ohos/lottie'; + ``` + +### 2. Build a rendering context. + + ``` + private mainRenderingSettings: RenderingContextSettings = new RenderingContextSettings(true); + private mainCanvasRenderingContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.mainRenderingSettings); + ``` + +### 3. Place the JSON file required by the animation in the directory at the same level as the **pages** directory and reference the file. (In this example, the JSON file used is **entry/src/main/ets/common/lottie/data.json**). + + Note: The JSON file path cannot be a relative path, such as one that starts with a single dot (.) or double dot (..), followed by a slash (/). Using a relative path will result in a failure to fetch the animation source. + + This is because a relative path referenced in the **index** page is based on the **index.ets** file, whereas the path passed to the **loadAnimation** API is based on the **pages** folder. + + Therefore, if the JSON file is stored in the **pages** folder, the path should be **pages/common/data.json**. + + ``` + private path:string = 'common/lottie/data.json'; + Or + private jsonData:string = {"v":"4.6.6","fr":24,"ip":0,"op":72,"w":1000,"h":1000,"nm":"Comp 2","ddd":0,"assets":[],...}; + ``` + +### 4. Configure a canvas. + + ``` + Canvas(this.mainCanvasRenderingContext) + .width('50%') + .height(360 + 'px') + .backgroundColor(Color.Gray) + .onReady(()=>{ + // Anti-aliasing settings. + this.mainCanvasRenderingContext.imageSmoothingEnabled = true; + this.mainCanvasRenderingContext.imageSmoothingQuality = 'medium'; + }) + ``` + + Note: It is recommended that the aspect ratio set for the canvas be the same as that of the JSON animation resource. For example, if the aspect ratio of the JSON animation resource is 1:2, the aspect ratio set for the canvas should also be 1:2. + + The anti-aliasing settings in this example: **mainCanvasRenderingContext.imageSmoothingEnabled = true** and **mainCanvasRenderingContext.imageSmoothingQuality = 'medium'**. + + A canvas is cleared before an animation is drawn on it. + +### 5. Load the animation. + + Pay attention to the time when you want your animation to load. If you want the animation to load upon a button click, simply place the animation loading logic in the click event. If you want the animation to load automatically once the page where it is located is displayed, you must place the animation loading logic within or after the **onReady()** lifecycle callback. + + For a canvas to load one animation multiple times or load different animations, manually destroy the previously loaded animation (by calling **lottie.destroy('name')**) each time before the canvas loads again. + + ``` + lottie.destroy('2016'); // Destroy the previously loaded animation before loading a new one. + this.animationItem = lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // Rendering context. + renderer: 'canvas', // Rendering mode. + loop: true, // Whether to loop the playback. The default value is true. + autoplay: true, // Whether to enable automatic playback. The default value is true. + name: '2016', // Animation name. + contentMode: 'Contain', // Fill mode. + frameRate: 30, // Set the frame rate to 30. + imagePath: 'lottie/images/', // Load and read images in the specified path. + path: this.path, // JSON file path. + initialSegment: [10,50] // Initial segment of the animation. + }) + Or + lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // Rendering context. + renderer: 'canvas', // Rendering mode. + loop: true, // Whether to loop the playback. The default value is true. + autoplay: true, // Whether to enable automatic playback. The default value is true. + contentMode: 'Contain', // Fill mode. + frameRate: 30, // Set the frame rate to 30. + animationData: this.jsonData, // JSON object data. + initialSegment: [10,50] // Initial segment of the animation. + }) + Or + lottie.loadAnimation({ + uri: 'https: // assets7.lottiefiles.com/packages/lf20_sF7uci.json', // Internet resources specified by URI. + container: this.canvasRenderingContext, // Rendering context. + renderer: 'canvas', // Canvas rendering mode. + loop: true, // Whether to loop the playback. The default value is true. + autoplay: true, // Whether to enable automatic playback. The default value is true. + name: this.animateName, // Animation name. + }) + ``` + + To load an animation, use either **path** or **animationData**. + + - **path**: Only relative paths under **entry/src/main/ets** are allowed. Cross-package file search is not supported. + - **animationData**: Set this parameter based on **ResourceManager**. + - **uri**: Internet animations can be loaded through URIs. In this case, you must request the permissions **ohos.permission.INTERNET** and **ohos.permission.GET_NETWORK_INFO**. + - Loading external resource images: By default, the application reads images in the sandbox path. If the specified images are not found in the sandbox, the application searches for them in **rawfile**. + +### 6. Load an animation with an HSP. + + To load an animation with an HSP, When an HSP is involved, lottie loads the JSON resource file through **animationData**. As such, you must place the JSON resource file in **rawfile**. + + + ``` + lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // Rendering context. + renderer: 'canvas', // Rendering mode. + loop: true, // Whether to loop the playback. The default value is true. + autoplay: true, // Whether to enable automatic playback. The default value is true. + animationData: this.jsonData, // JSON object data. + contentMode: 'Contain', // Fill mode. + initialSegment: [10,50] // Initial segment of the animation. + }) + ``` + + + To load an animation, use **animationData**. + + **animationData**: Set this parameter based on **ResourceManager**. + + ``` + let resStr = new util.TextDecoder('utf-8',{ignoreBOM: true}); + let context = getContext(this).createModuleContext('library') as common.UIAbilityContext; + context.resourceManager.getRawFile('grunt.json',(err: Error,data: Uint8Array) =>{ + if(data === null || data === undefined || data.buffer=== undefined){ + return; + } + let lottieStr = resStr.decode(new Uint8Array(data.buffer)); + this.jsonData = JSON.parse(lottieStr); + }) + ``` + +### 7. Control animation playback. + +- Play the animation. + + ``` + lottie.play(); // Play all animations. + Or + animationItem.play(); // Play a given animation. + ``` + +- Stop the animation. + + ``` + lottie.stop(); // Stop all animations. + Or + animationItem.stop(); // Stop a given animation. + ``` + +- Pause the animation. + + ``` + lottie.pause(); // Pause all animations. + Or + animationItem.pause(); // Pause a given animation. + ``` + +- Switch the animation playback state between running and paused. + + ``` + lottie.togglePause(); // Switch the playback state between running and paused for all animations. + Or + animationItem.togglePause(); // Switch the playback state between running and paused for a given animation. + ``` + +- Set the playback speed. + > Note: If the speed is greater than **0**, the animation plays forwards. If the speed is less than **0**, the animation plays backwards. If the speed is **0**, the animation is paused. If the speed is **1.0** or **-1.0**, the animation plays at the normal speed. + + ``` + lottie.setSpeed(1); // Set the playback speed for all animations. + Or + animationItem.setSpeed(1); // Set the playback speed for a given animation. + ``` + +- Set the playback direction. + > Note: The value **1** indicates forward, and **-1** indicates backward. + + ``` + lottie.setDirection(1); // Set the playback direction for all animations. + Or + animationItem.setDirection(1); // Set the playback direction for a given animation. + ``` + +- Destroy the animation. + > Note: An animation needs to be destroyed when the page where it is located disappears or exits. The **destroy()** API can be used together with the **aboutToDisappear()** and **onPageHide()** callbacks of the page or the **onDisAppear()** callback of the canvas component. + + ``` + lottie.destroy(); // Destroy all animations. + Or + lottie.destroy('name'); // Destroy a given animation. + ``` + +- Clear Cache. + ``` + lottie.clearFileCache(); //Clear all animation caches. + Or + lottie.clearFileCache('path'); //Clear the specified animation cache. + Or + lottie.clearFileCache('path',container); //Clear the network resource cache in the specified local animation. + ``` + +- Stop the animation at a frame or a point of time. + > Note: The second parameter specifies whether to control by frame or time (in milliseconds). The value **true** means to control by frame, and **false** (default) means to control by time. + + ``` + animationItem.goToAndStop(250,true); + Or + animationItem.goToAndStop(5000,false); + ``` + +- Start the animation from a frame or a point of time. + > Note: The second parameter specifies whether to control by frame or time (in milliseconds). The value **true** means to control by frame, and **false** (default) means to control by time. + ``` + animationItem.goToAndPlay(250,true); + Or + animationItem.goToAndPlay(12000,false); + ``` + +- Set an animation segment to limit the frame range for animation playback. + + ``` + animationItem.setSegment(5,15); + ``` + +- Play animation segments. + > Note: The second parameter specifies whether the setting takes effect immediately. The value **true** indicates the setting takes effect immediately, and **false** indicates that the setting takes effect upon the next playback. + + ``` + animationItem.playSegments([5,15],[20,30],true); + ``` + +- Reset animation segments so that the animation plays from the start frame. + > Note: The parameter specifies whether the setting takes effect immediately. The value **true** indicates the setting takes effect immediately, and **false** indicates that the setting takes effect upon the next playback. + + ``` + animationItem.resetSegments(5,15); + ``` + +- Obtain the animation duration or number of frames. + > Note: The value **true** means to obtain the number of frames, and **false** means to obtain the duration (in ms). + + ``` + animationItem.getDuration(); + ``` + +- Add an event listener. + > Note: For an event listener to be removed correctly, its callback function must be the same as that of the event listener already added and must be predefined. + + ``` + AnimationEventName = 'drawnFrame' | 'enterFrame' | 'loopComplete' | 'complete' | 'segmentStart' | 'destroy' | 'config_ready' | 'data_ready' | 'DOMLoaded' | 'error' | 'data_failed' | 'loaded_images'; + + animationItem.addEventListener("enterFrame",function(){ + // TODO something + }) + ``` + +- Change the animation color. + + > Note: The first parameter indicates the RGB/RGBA color value. The second parameter indicates the animation layer and is optional. The third parameter indicates the index of the element corresponding to the animation layer and is optional. + + ``` + animationItem.changeColor([255,150,203,0.8]); // Change the color of the entire animation. + Or + animationItem.changeColor([255,150,203,0.8],2); // Change the color of the second layer of the animation. + Or + animationItem.changeColor([255,150,203,0.8],2,2); // Change the color of the second element at the second layer of the animation. + ``` + +- Remove an event listener. + + ``` + animationItem.removeEventListener("enterFrame",function(){ + // TODO something + }) + ``` + +- Resize the animation layout. + + ``` + animationItem.resize(); + ``` + +- Set the animation fill mode. + + > Note: There are five fill modes: **Fill**, **Cover**, **Top**, **Bottom**, and **Contain**. The default mode is **Contain**. + + ``` + animationItem.setContentMode('Cover'); + ``` + +- Set the frame rate range of the animation. + + > Note: The frame rate ranges from 1 to 120. A larger frame rate causes higher power consumption. + + ``` + animationItem.setFrameRate(30); + ``` + +- Clear cache file. + > Note: the container is with canvas component binding context CanvasRenderingContext2D, json file path for local resources. + ``` + lottie.clearFileCache() //Clear all animation cache files. + Or + lottie.clearFileCache('path') //Clear the specified animation cache file. + Or + lottie.clearFileCache('path',container) //Clears the network resource cache file in the specified local animation. + ``` + +### 8. Destroy the animation. + + Generally, the animation is destroyed in the **onDisAppear()** API of the canvas component or in the **aboutToDisappear()** method during page destruction. + + With lottie, you can destroy an animation in two modes: + + - **lottie.destroy**: destroys all animations; **lottie.destroy(name)** destroys the animation with the specified name. You are advised to use this mode to destroy animations. + - **animationItem.destroy**: destroys a given animation. Improper use may cause memory leakage. To destroy a given animation, you are advised to use **lottie.destroy(name)**.
+ + > Note 1: When there are multiple animations on one page and the animation instance is assigned to the same variable **animationItem**, only the last animation is destroyed when **animationItem.destroy** is called. In the following code example, the animations whose names are **cat** and **2016** are assigned to **this.animationItem**. Calling **animationItem.destroy()** destroys only the animation whose name is **2016**, but not the one whose name is **cat**. + + ``` + this.animationItem = lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // Rendering context. + renderer: 'canvas', // Rendering mode. + loop: true, // Whether to loop the playback. The default value is true. + autoplay: true, // Whether to enable automatic playback. The default value is true. + name: 'cat', // Animation name. + contentMode: 'Contain', // Fill mode. + path: this.path, // JSON file path. + initialSegment: [10,50] // Initial segment of the animation. + }) + + this.animationItem = lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // Rendering context. + renderer: 'canvas', // Rendering mode. + loop: true, // Whether to loop the playback. The default value is true. + autoplay: true, // Whether to enable automatic playback. The default value is true. + name: '2016', // Animation name. + contentMode: 'Contain', // Fill mode. + path: this.path, // JSON file path. + initialSegment: [10,50] // Initial segment of the animation. + }) + + ``` + + > Note 2: If you call the following APIs in the same code block as **lottie.loadAnimation** before animation loading is complete, the settings may not take effect: **stop**, **togglePause**, **pause**, **goToAndStop**, **goToAndPlay**, **setSegment**, **getDuration**, **changeColor**, and **setContentMode**. Call these APIs after the animation is loaded. You can use **animationItem.addEventListener('DOMLoaded') **to listen for the animation loading completion. + + ``` + // The animation is not completely loaded. The settings of changeColor and setContentMode are invalid. + Button('Load 2016') + .onClick(() => { + if (this.animationItem2 == null) { + this.animationItem2 = lottie.loadAnimation({ + container: this.canvasRenderingContext, + renderer: 'canvas', // Canvas rendering mode. + name: '2016', + path: 'common/lottie/data.json', + }) + this.animationItem2.changeColor([255,150,203,0.8]); + this.animationItem2.setContentMode('Top'); + } + }) + + ``` + + ``` + // After animationItem.addEventListener('DOMLoaded') is invoked, the settings of changeColor and setContentMode are valid. + Button('Load 2016') + .onClick(() => { + if (this.animationItem2 == null) { + this.animationItem2 = lottie.loadAnimation({ + container: this.canvasRenderingContext, + renderer: 'canvas', // Canvas rendering mode. + loop: true, + autoplay: false, + name: '2016', + contentMode: 'Contain', + path: 'common/lottie/data.json', + }) + + this.animationItem2.addEventListener('DOMLoaded', (args: Object): void => { + this.animationItem2.changeColor([255,150,203,0.8]); + // this.animationItem2.setContentMode('Top'); + // ... + }); // The event is triggered after the animation is loaded but before it is played. + } + }) + + ``` + +### 9. About obfuscation +- Code obfuscation, please see[Code Obfuscation](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/arkts-utils/source-obfuscation.md). +- If you want the lottie library not to be obfuscated during code obfuscation, you need to add corresponding exclusion rules in the obfuscation rule configuration file obfuscation-rules.txt. +``` +-keep +./oh_modules/@ohos/lottie +``` + +### 10. Determine whether the animation resource is a network load example +``` + this.isNet = 'Whether to load the network' + this.animateItem.isNetLoad; +``` +### 11. Log switch function +``` + LogUtil.mLogLevel = LogUtil.ON; //open log + LogUtil.mLogLevel = LogUtil.OFF; //close log +``` + +### 12. Drawing when animation is invisible + +Lottie supports skipping drawing when the animation slides to the invisible area to reduce redundant drawing(This feature is only supported in API 13 and above versions). The current processing logic assumes that lottie is bound to a specific canvas node, but in some complex interaction scenarios, it fails to track changes in the binding relationship, making it inapplicable when there are complex changes in the UI logic, including: + +- Preloading scenario, when the canvas node has no binding relationship with lottie. This includes explicit preloading by the developer and implicit preloading by the system caused by the cache mechanism of lazyforeach. +- Node reuse scenario, when the node may form a binding relationship with different animations. +- Node destruction and reconstruction scenario, when the old node has changed and the association relationship of the new node is reestablished. The above situations cannot be handled currently. As a result, lottie cannot accurately perceive the state of the canvas node, redundant drawing occurs, and even obvious experience problems such as inactivity when it should be active. + +Therefore, the coordinator object with CanvasRenderingContext2D as the core is introduced to track the dynamic relationship between lottie animation, CanvasRenderingContext2D, and Canvas. Only when the CanvasRenderingContext2D associated with lottie corresponds to a visible canvas, the drawing will be actually performed, otherwise the drawing will be skipped to avoid redundant load. When the coordinator cannot confirm the accurate canvas node status, compatibility processing is introduced: when the user does not explicitly call the bindContext2dToCoordinator interface, the drawing is performed by default, otherwise no further callback notifications such as drawing are performed. In order to avoid inconsideration of compatibility processing, the setAttachedCanvasHasVisibleArea interface is introduced to support developers to force the correction of the canvas node status associated with context2d to support escape. + +Usage examples: +1. Use canvas + lottie.loadAnimation method +After the CanvasRenderingContext2D object is created, before it is referenced by canvas, the bindContext2dToCoordinator interface is called, and when the page is destroyed, the unbindContext2dFromCoordinator interface is called to unbind. + +``` +import lottie from '@ohos/lottie' + +@Entry +@Component +struct InvisibleAreaAutoPlay { + private renderingSettings: RenderingContextSettings = new RenderingContextSettings(true); + private canvas2D: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.renderingSettings); + + aboutToAppear(): void { + lottie.bindContext2dToCoordinator(this.canvas2D); + } + + aboutToDisappear(): void { + lottie.unbindContext2dFromCoordinator(this.canvas2D); + lottie.destroy("robotYoga"); + } + + build() { + Stack() { + Canvas(this.canvas2D) + .width(300) + .height(300) + .backgroundColor(Color.Gray) + .onReady(() => { + lottie.loadAnimation({ + container: this.canvas2D, + renderer: 'canvas', + loop: true, + autoplay: true, + contentMode: 'Contain', + name: 'robotYoga', + path: 'common/lottie/robotYoga.json' + }) + }) + }.height('40%') + .width('100%') + .backgroundColor(Color.Gray) + } +} +``` + +### 13. Preventing Animation Memory Leaks + +- Avoid using the @state decorator for animation objects: When using @state to decorate an animationItem object, it may prevent the animation from being properly destroyed, leading to memory leak issues. + + +- Destroy animations in a timely manner: When an animation is no longer in use or when the page is about to be destroyed, the animation must be actively destroyed. If animations are only created but not actively destroyed, the animationItem objects will continue to exist, thereby causing memory leaks. It is recommended to use the lottie.destroy(name) method to destroy animations. + + + +## Available APIs + +### AnimationItem + +| API | Type | Description | +|-----------------------------------|--------------------------------------|-----------------------------------------------------------------------------------------------| +| play() | name? | Plays the animation. | +| stop() | name? | Stops the animation. | +| pause() | name? | Pauses the animation. | +| togglePause() | name? | Switches the animation playback state between running and paused. | +| destroy() | name? | Destroys the animation. | +| goToAndStop() | value, isFrame?, name? | Seeks to a certain frame or point of time and then stops the animation. | +| goToAndPlay() | value, isFrame?, name? | Seeks to a certain frame or point of time and then starts the animation. | +| setSegment() | init,end | Sets an animation segment. | +| playSegments() | arr, forceFlag | Plays animation segments. | +| resetSegments() | forceFlag | Resets the animation. | +| setSpeed() | speed | Sets the playback speed. | +| resize() | width?, height? | Refresh animation layout. | +| setDirection() | direction | Sets the playback direction. | +| getDuration() | isFrames? | Obtains the animation duration. | +| addEventListener() | eventName,callback | Adds an event listener. | +| removeEventListener() | name,callback? | Removes an event listener. | +| changeColor() | color, layer?, index? | Changes the animation color. | +| setContentMode() | contentMode | Sets the fill mode. | +| setFrameRate() | frameRate | Sets the animation frame rate. | + + +### LottiePlayer + +| API | Type | Description | +|-----------------------------------|----------------------------------------------|------------------------------------------------------------------------------------------------| +| play() | name?, onlyCurrentAbility? | Plays the animation. | +| stop() | name?, onlyCurrentAbility? | Stops the animation. | +| pause() | name?, onlyCurrentAbility? | Pauses the animation. | +| togglePause() | name?, onlyCurrentAbility? | Switches the animation playback state between running and paused. | +| destroy() | name?, onlyCurrentAbility? | Destroys the animation. | +| goToAndStop() | value, isFrame?, name?, onlyCurrentAbility? | Seeks to a certain frame or point of time and then stops the animation. | +| goToAndPlay() | value, isFrame?, name?, onlyCurrentAbility? | Seeks to a certain frame or point of time and then starts the animation. | +| setSpeed() | speed, name?, onlyCurrentAbility? | Sets the playback speed. | +| resize() | width?, height?, onlyCurrentAbility? | SRefresh animation layout. | +| setDirection() | direction, name?, onlyCurrentAbility? | Sets the playback direction. | +| setContentMode() | contentMode, name?, onlyCurrentAbility? | Sets the fill mode. | +| loadAnimation() | loadAnimation | Load Animation. | +| setFrameRate() | frameRate | Sets the animation frame rate. | +| clearFileCache() | url?, container? | Clear cache file. | +| bindContext2dToCoordinator() | CanvasRenderingContext2D | Track the dynamic relationship between lottie animation, CanvasRenderingContext2D, and Canvas. | +| unbindContext2dFromCoordinator() | CanvasRenderingContext2D | Remove tracking relationship. | +| setAttachedCanvasHasVisibleArea() | CanvasRenderingContext2D, boolean | Supports forced correction of the canvas node status associated with context2d. | + +## New Features +1. The animation color can be changed in canvas rendering mode. +- The color value can be in RGB format. +- The color value can be in RGBA format. +- The color can be set for the start keyframe. + +2. Certain masks and mattes features are supported for canvas rendering. +- For masks, the supported modes are: mode = a, mode = s, mode = f. +- For mattes, the supported modes are: tt = 1, tt = 2. + +3. The Gaussian blur effect is added for animations in canvas rendering mode. + +4. External resource images can be loaded in canvas rendering mode. +- External resource images in the sandbox (which is searched before the **rawfile** folder) can be loaded. +- External resource images in the **rawfile** folder can be loaded. + +5. The fill mode can be set, with the following options available: +- Fill (may be stretched, not cropped) +- Top (aligned with the top edge, not cropped) +- Bottom (aligned with the bottom edge, not cropped) +- Cover (may be cropped) +- Contain (aligned with the center vertically, may be cropped) + +6. The frame rate can be set for animations. + +7. Internet animations and animations specified by URIs can be loaded. +- Animations in the path specified by URIs can be rendered. +- Internet animation can be rendered. +- Note: If the animation file contains Internet resources, you must request the permissions **ohos.permission.INTERNET** and **ohos.permission.GET_NETWORK_INFO**. + +8. When the animation is completely invisible, the current animation will automatically pause and stop sending drawing instructions to optimize performance and reduce power consumption. + +## Constraints + +This project has been verified in the following version: +- DevEco Studio: NEXT Developer Beta3 (5.0.3.524), SDK: API 12 (5.0.0.25) +- DevEco Studio: NEXT Developer Beta1 (5.0.3.122), SDK: API 12 (5.0.0.18) + +## Directory Structure + +```` +/lottie # Root directory of the project +├── entry # Sample code +├── library # Lottie library folder +│ └─ src/main/js # Core code, including JSON parsing, animation drawing, and animation manipulation +│ └─ 3rd_party +│ └─ animation +│ └─ effects +│ └─ elements +│ └─ modules +│ └─ renderers +│ └─ utils +│ └─ EffectsManager.js +│ └─ main.js +│ └─ mask.js +│ └─index.d.ts # API declaration +├── README.md # Readme +├── README_zh.md # Readme +```` + +## How to Contribute + +If you find any problem when using lottie, submit an [issue](https://gitcode.com/openharmony-tpc/lottieArkTS/issues) or a [PR](https://gitcode.com/openharmony-tpc/lottieArkTS/pulls). + +## License + +This project is licensed under [MIT License](https://gitcode.com/openharmony-tpc/lottieArkTS/blob/master/LICENSE). + +## Features Not Yet Supported + +* HTML rendering mode +* Filter effect in SVG rendering +* Some masks and mattes features +* Luminance mask (that is, tt = 3) +* Animation visibility control in components +* Animation registration +* Animation search +* Animation data update +* Certain effects +* Animations containing expressions diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/README_zh.md b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..565f156650642dc35e7a64f48eae3d968845e3db --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/README_zh.md @@ -0,0 +1,696 @@ +# lottie + +> **推荐使用[lottie-turbo](https://gitcode.com/openharmony-sig/lottie_turbo):声明式调用更加简洁,支持并行加载、内存缓存、子线程渲染,性能优化30%+,多动画/复杂动画场景下UI界面更流畅。** + +## 简介 + +lottie是一个适用于OpenHarmony的动画库,它可以解析Adobe After Effects软件通过Bodymovin插件导出的json格式的动画,并在移动设备上进行本地渲染。 + +![showlottie](./screenshot/showlottie.gif) + + +## 下载安裝 + +``` + ohpm install @ohos/lottie +``` +OpenHarmony ohpm 环境配置等更多内容,请参考[如何安装 OpenHarmony ohpm 包](https://gitcode.com/openharmony-tpc/docs/blob/master/OpenHarmony_har_usage.md)。 + +## 使用示例 +### 完整示例 +``` +import lottie, { AnimationItem } from '@ohos/lottie'; + +@Entry +@Component +struct Index { + // 构建上下文 + private renderingSettings: RenderingContextSettings = new RenderingContextSettings(true); + private canvasRenderingContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.renderingSettings); + private animateItem: AnimationItem | null = null; + private animateName: string = 'animation'; + + // 页面销毁时释放动画资源 + aboutToDisappear(): void { + console.info('aboutToDisappear'); + lottie.destroy(); + } + + build() { + Row() { + // 关联画布 + Canvas(this.canvasRenderingContext) + .width(200) + .height(200) + .backgroundColor(Color.Gray) + .onReady(() => { + // 加载动画 + if (this.animateItem != null) { + // 可在此生命回调周期中加载动画,可以保证动画尺寸正确 + this.animateItem?.resize(); + } else { + // 抗锯齿的设置 + this.canvasRenderingContext.imageSmoothingEnabled = true; + this.canvasRenderingContext.imageSmoothingQuality = 'medium'; + this.loadAnimation(); + } + }) + } + } + + loadAnimation() { + this.animateItem = lottie.loadAnimation({ + container: this.canvasRenderingContext, + renderer: 'canvas', // canvas 渲染模式 + loop: true, + autoplay: false, + name: this.animateName, + contentMode: 'Contain', + path: 'common/animation.json', + }) + // 因为动画是异步加载,所以对animateItem的操作需要放在动画加载完成回调里操作 + this.animateItem.addEventListener('DOMLoaded', (args: Object): void => { + this.animateItem.changeColor([225, 25, 100, 1]); + this.animateItem.play(); + }); + } + + destroy() { + this.animateItem.removeEventListener('DOMLoaded'); + lottie.destroy(this.animateName); + this.animateItem = null; + } +} + +``` +### 注意事项 +- 1.建议在 canvas 的 onReady 方法中加载动画,并在加载该动画之前先调用 lottie.destroy(name) 方法,以确保动画不会重复加载。 +- 2.建议对动画animateItem的操作放在addEventListener的'DOMLoaded'回调监听中,确保在完全构建并解析完成后,再执行与动画相关的操作,从而避免潜在的加载顺序问题。因为如果是同一个代码块,动画的加载是异步加载的。 +- 3.建议添加动画抗锯齿,如示例代码67到68行,以减少动画边缘的锯齿状现象,使动画画面更加平滑细腻,实现更佳的动画效果。 +- 4.动画的销毁,推荐使用lottie.destroy(name)方法,相较于直接使用animateItem.destroy(),性能更友好。 +- 5.建议在页面销毁或卸载时,将页面上所有的动画进行销毁,确保页面资源得到妥善管理和释放。 +- 6.混淆模式编译报错,建议在对应的模块下的obfuscation-rules.txt文件添加配置:-keep ./oh_modules/@ohos/lottie。 +- 7.建议canvas的宽高比例与动画的宽高比例保持一致。例如动画的宽高比是1000 * 2000(即1:2的比例),那么可以将canvas的宽高设置为 200 * 400,同样保持1:2的比例。建议canvas的宽高不要大于动画的原始宽高。 +- 8.注意:加载外部资源图片时,若采用指定路径的方式:imagePath:'lottie/images/',外部资源图片的路径是指rawfile目录下的或者沙箱里file目录下的路径。 +- 9.Lottie的JSON文件中引用的外部图片资源,需要存放在rawfile目录下。例如json文件中 "u":"images/",则在rawfile目录下创建一个名为images的文件夹,存放图片。 + +## 使用说明 + +### 前提:数据准备 + +lottie动画文件是由设计人员使用Adobe After Effects软件通过bodymovin插件导出json格式的文件。 + +AE软件创建动画时需要设置动画的宽(w)、高(h)、bodymovin插件的版本号(v)、帧率(fr)、开始帧(ip)、 +结束帧(op)、静态资源信息(assets)、图层信息(layers)等重要信息。 + +如果仅是用于demo测试,可以使用[工程示例中的json文件](https://gitcode.com/openharmony-tpc/lottieArkTS/tree/master/entry/src/main/ets/common/lottie)。 + +### 1.在相应的类中引入组件 + +``` +import lottie from '@ohos/lottie'; +``` + +### 2.构建渲染上下文 + +``` + private mainRenderingSettings: RenderingContextSettings = new RenderingContextSettings(true); + private mainCanvasRenderingContext: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.mainRenderingSettings); +``` + +### 3.將动画需要的json文件放到pages同级别目录下,然后引用。(json路径为entry/src/main/ets/common/lottie/data.json) + +注意:json文件路径不能使用 ./ 或者 ../ 等相对路径,相对路径获取不到动画源数据,会导致动画加载不出来。 + +传递给loadAnimation 方法的路径是相对于pages父文件夹为基准的,而index页面内引入的相对路径的动画是以index.ets文件为基准的,两者基准不一致。 + +所以如果json文件放置在pages文件夹下,路径应为 'pages/common/data.json' 样式。 + +``` + private path:string = "common/lottie/data.json"; + 或 + private jsonData:string = {"v":"4.6.6","fr":24,"ip":0,"op":72,"w":1000,"h":1000,"nm":"Comp 2","ddd":0,"assets":[],...}; +``` + +### 4.关联画布 + +``` + Canvas(this.mainCanvasRenderingContext) + .width('50%') + .height(360 + 'px') + .backgroundColor(Color.Gray) + .onReady(()=>{ + //抗锯齿的设置 + this.mainCanvasRenderingContext.imageSmoothingEnabled = true; + this.mainCanvasRenderingContext.imageSmoothingQuality = 'medium'; + }) +``` +注意:canvas设置的宽高比例建议和动画json资源里面的宽高比例一致,如:json动画资源里的宽高比例是 1:2 ,则canvas设置的宽高也是 1:2。 +- 想要的抗锯齿效果:mainCanvasRenderingContext.imageSmoothingEnabled = true 与 mainCanvasRenderingContext.imageSmoothingQuality = 'medium'。 + +- 动画绘制前会对canvas画布进行清空处理,画布清空后再绘制动画。 + +### 5.加载动画 + +- 加载动画的时机需要注意,点击按钮加载动画可按照正常逻辑放在点击事件内,如果想要实现进入页面自动播放动画,需要结合Canvas组件的onReady()生命回调周期实现,加载动画时机需放置在onReady()生命周期回调内或及之后。 +- 同一Canvas组件加载多次/不同动画资源,需要手动销毁动画(lottie.destroy('name')),之后才可再次加载其他动画资源。 + +``` + lottie.destroy('2016'); //加载动画前先销毁之前加载的动画 + this.animationItem = lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // 渲染上下文 + renderer: 'canvas', // 渲染方式 + loop: true, // 是否循环播放,默认true + autoplay: true, // 是否自动播放,默认true + name: '2016', // 动画名称 + contentMode: 'Contain', // 填充的模式 + frameRate: 30, //设置animator的刷帧率为30 + imagePath: 'lottie/images/', // 加载读取指定路径下的图片资源 + path: this.path, // json路径 + initialSegment: [10,50] // 播放的动画片段 + }) + 或 + lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // 渲染上下文 + renderer: 'canvas', // 渲染方式 + loop: true, // 是否循环播放,默认true + autoplay: true, // 是否自动播放,默认true + contentMode: 'Contain', // 填充的模式 + frameRate: 30, //设置animator的刷帧率为30 + animationData: this.jsonData, // json对象数据 + initialSegment: [10,50] // 播放的动画片段 + }) + 或 + lottie.loadAnimation({ + uri: "https://assets7.lottiefiles.com/packages/lf20_sF7uci.json", // uri网络资源 + container: this.canvasRenderingContext, // 渲染上下文 + renderer: 'canvas', // canvas 渲染模式 + loop: true, // 是否循环播放,默认true + autoplay: true, // 是否自动播放,默认true + name: this.animateName, // 动画名 + }) +``` + +- 加载动画时,path 参数和 animationData 参数,二者选其一。 +- path 参数:只支持加载entry/src/main/ets 文件夹下的相对路径,不支持跨包查找文件。 +- animationData 参数:可结合ResourceManager进行读取资源文件内容进行设置。 +- uri 参数:支持加载网络资源和通过URI路径方式加载动画,该方式需申请 ohos.permission.INTERNET,ohos.permission.GET_NETWORK_INFO两个权限。 +- 加载外部资源图片:应用默认读取沙箱路径下的图片,如果沙箱下没有对应的资源图片,则会继续读取rawfile下的对应资源图片。 + +### 6.HSP场景 +- 为了适配HSP场景,lottie加载动画json资源文件需通过animationData方式加载,需把动画json资源文件放在rawfile下进行读取加载。 + +``` + lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // 渲染上下文 + renderer: 'canvas', // 渲染方式 + loop: true, // 是否循环播放,默认true + autoplay: true, // 是否自动播放,默认true + animationData: this.jsonData, // json对象数据 + contentMode: 'Contain', // 填充的模式 + initialSegment: [10,50] // 播放的动画片段 + }) +``` + +- 加载动画时,animationData 参数。 +- animationData 参数:可结合ResourceManager进行读取资源文件内容进行设置。 + +``` + try { + application.createModuleContext(getContext(this), 'sharedLibrary').then((data: Context) => { + this.moduleContext = data; + this.moduleContext?.resourceManager.getRawFileContent('animation.json',(err: Error,data: Uint8Array) =>{ + if(data === null || data === undefined || data.buffer=== undefined){ + return; + } + let resStr = util.TextDecoder.create('utf-8',{ignoreBOM: true}); + let lottieStr = resStr.decodeToString(new Uint8Array(data.buffer)); + this.mLottieData = JSON.parse(lottieStr); + }) + }).catch((error: BusinessError) => { + }) + } catch (error) { + } +``` + +### 7.控制动画 + +- 播放动画 + + ``` + lottie.play(); //所有动画播放 + 或 + animationItem.play(); //当前指定animationItem动画播放 + ``` + +- 停止动画 + + ``` + lottie.stop(); //所有动画停止 + 或 + animationItem.stop(); //当前指定animationItem动画停止 + ``` + +- 暂停动画 + + ``` + lottie.pause(); //所有动画暂停 + 或 + animationItem.pause(); //当前指定animationItem动画暂停 + ``` + +- 切换暂停/播放 + + ``` + lottie.togglePause(); //所有动画切换暂停/播放 + 或 + animationItem.togglePause(); //当前指定animationItem动画切换暂停/播放 + ``` + +- 设置播放速度
+注意:speed>0正向播放, speed<0反向播放, speed=0暂停播放, speed=1.0/-1.0正常速度播放。 + + ``` + lottie.setSpeed(1); //所有动画设置播放速度 + 或 + animationItem.setSpeed(1); //当前指定animationItem动画设置播放速度 + ``` + +- 设置动画播放方向
+注意:direction 1为正向,-1为反向。 + + ``` + lottie.setDirection(1); //所有动画设置播放方向 + 或 + animationItem.setDirection(1); //当前指定animationItem动画设置播放方向 + ``` + +- 销毁动画
+注意:页面不显示或退出页面时,需要销毁动画; 可配合页面生命周期aboutToDisappear()及onPageHide(),或者Canvas组件的onDisAppear()使用。 + + ``` + lottie.destroy(); //销毁所有动画 + 或 + lottie.destroy('name'); //销毁指定name动画 + ``` + +- 控制动画停止在某一帧或某一时刻
+注意:根据第二个参数判断按帧还是按毫秒控制,true 按帧控制,false 按时间控制,缺省默认为false。 + + ``` + animationItem.goToAndStop(250,true); + 或 + animationItem.goToAndStop(5000,false); + ``` + +- 控制动画从某一帧或某一时刻开始播放
+注意:根据第二参数判断按帧还是按毫秒控制,true 按帧控制,false 按时间控制,缺省默认为false。 + ``` + animationItem.goToAndPlay(250,true); + 或 + animationItem.goToAndPlay(12000,false); + ``` + +- 限定动画资源播放时的整体帧范围,即设置动画片段 + + ``` + animationItem.setSegment(5,15); + ``` + +- 播放动画片段
+注意:第二参数值为true立刻生效, 值为false循环下次播放的时候生效。 + + ``` + animationItem.playSegments([5,15],[20,30],true); + ``` + +- 重置动画播放片段,使动画从起始帧开始播放完整动画
+注意:参数值为true立刻生效,值为false循环下次播放的时候生效。 + + ``` + animationItem.resetSegments(5,15); + ``` + +- 获取动画时长/帧数
+注意:参数值为true时获取帧数,值为false时获取时间(单位ms)。 + + ``` + animationItem.getDuration(); + ``` + +- 添加侦听事件
+注意:添加和移除的事件监听,回调函数需是同一个,需预先定义,否则将不能正确移除。 + + ``` + AnimationEventName = 'drawnFrame' | 'enterFrame' | 'loopComplete' | 'complete' | 'segmentStart' | 'destroy' | 'config_ready' | 'data_ready' | 'DOMLoaded' | 'error' | 'data_failed' | 'loaded_images'; + + animationItem.addEventListener("enterFrame",function(){ + // TODO something + }) + ``` + +- 更改动画渲染颜色
+注意:第一个参数颜色是RGB/RGBA值,第二个参数是动画的层次 可不填,第三个参数是对应动画层次的元素的下标值 可不填。 + + ``` + animationItem.changeColor([255,150,203,0.8]); //修改整个动画的颜色 + 或 + animationItem.changeColor([255,150,203,0.8],2); //修改该动画第二层的颜色 + 或 + animationItem.changeColor([255,150,203,0.8],2,2); //修改该动画第二层第二个元素的颜色 + ``` + +- 移除侦听事件 + + ``` + animationItem.removeEventListener("enterFrame",function(){ + // TODO something + }) + ``` + +- 刷新动画布局 + + ``` + animationItem.resize(); + ``` + +- 动画填充模式
+注意:动画填充模式共有5种:Fill、Cover、Top、Bottom、Contain,其中默认的填充模式是:Contain。 + + ``` + animationItem.setContentMode('Cover'); + + ``` + +- 设置动画的刷帧率
+注意:设置动画animator的刷帧率,范围是1~120 帧率越大,功耗越严重。 + + ``` + animationItem.setFrameRate(30); + + ``` + +- 清除缓存文件
+注意:container是与canvas组件绑定的上下文CanvasRenderingContext2D,用于本地资源路径json文件。 + + ``` + lottie.clearFileCache(); //清除所有动画缓存文件 + 或 + lottie.clearFileCache('https://p3-dcd.byteimg.com/obj/motor-mis-img/5ec2c8af22bc17aedafe147a1d38f21d.json'); //清除指定动画缓存文件 + 或 + lottie.clearFileCache('common/lottie/data_url.json',container); //清除指定本地动画中网络资源缓存文件 + ``` + +### 8.动画销毁 +- lottie销毁的时机:动画的销毁一般在canvas组件生命周期的onDisAppear()方法进行,或者在页面销毁时的aboutToDisappear()方法里执行。 +- lottie销毁动画支持以下两种方式: + 1. lottie.destroy:销毁所有动画播放,lottie.destroy(name)销毁指定name的动画, 建议使用该方式销毁动画。 + 2. animationItem.destroy:销毁当前指定animationItem的动画播放,,该销毁方式使用不当可能会引起内存泄漏问题,建议使用lottie.destroy(name)销毁方式。
+- 执行this.animationItem.destroy(),只会销毁name为2016的动画,name为cat的动画不会被销毁。建议动画销毁时,使用lottie.destroy方式进行销毁。 + + > 说明一:当同一个页面中存在多个动画,且动画实例赋值给同一个变量animationItem时,使用animationItem.destroy销毁动画时,只会销毁最后一个。如下代码示例,将name为cat和2016的动画同时赋值给this.animationItem,执行animationItem.destroy()销毁动画时,仅销毁最后加载的name为2016动画。name为cat的动画不会被销毁。 + ``` + this.animationItem = lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // 渲染上下文 + renderer: 'canvas', // 渲染方式 + loop: true, // 是否循环播放,默认true + autoplay: true, // 是否自动播放,默认true + name: 'cat', // 动画名称 + contentMode: 'Contain', // 填充的模式 + path: this.path, // json路径 + initialSegment: [10,50] // 播放的动画片段 + }) + + this.animationItem = lottie.loadAnimation({ + container: this.mainCanvasRenderingContext, // 渲染上下文 + renderer: 'canvas', // 渲染方式 + loop: true, // 是否循环播放,默认true + autoplay: true, // 是否自动播放,默认true + name: '2016', // 动画名称 + contentMode: 'Contain', // 填充的模式 + path: this.path, // json路径 + initialSegment: [10,50] // 播放的动画片段 + }) + + ``` + +> 说明二:当lottie未加载完成前( lottie.loadAnimation方法和下述方法在同一代码块中同时使用),调用下述方法可能导致设置无效:stop、togglePause、pause、goToAndStop、goToAndPlay、setSegment、getDuration、changeColor、setContentMode。应将上述方法在动画加载完成之后再执行,通过animationItem.addEventListener('DOMLoaded')监听动画加载完成,示例如下: + +``` +// 动画未加载完成,changeColor和setContentMode设置无效 +Button('加载2016') + .onClick(() => { + if (this.animationItem2 == null) { + this.animationItem2 = lottie.loadAnimation({ + container: this.canvasRenderingContext, + renderer: 'canvas', // canvas 渲染模式 + name: '2016', + path: 'common/lottie/data.json', + }) + this.animationItem2.changeColor([255,150,203,0.8]); + this.animationItem2.setContentMode('Top'); + } + }) + +``` + +``` +// animationItem.addEventListener('DOMLoaded')监听后执行方法,changeColor和setContentMode设置有效 +Button('加载2016') + .onClick(() => { + if (this.animationItem2 == null) { + this.animationItem2 = lottie.loadAnimation({ + container: this.canvasRenderingContext, + renderer: 'canvas', // canvas 渲染模式 + loop: true, + autoplay: false, + name: '2016', + contentMode: 'Contain', + path: 'common/lottie/data.json', + }) + + this.animationItem2.addEventListener('DOMLoaded', (args: Object): void => { + this.animationItem2?.changeColor([255,150,203,0.8]); + // this.animationItem2?.setContentMode('Top'); + // ... + }); //动画加载完成,播放之前触发 + } + }) + +``` + +### 9.关于混淆 +- 代码混淆,请查看[代码混淆简介](https://docs.openharmony.cn/pages/v5.0/zh-cn/application-dev/arkts-utils/source-obfuscation.md)。 +- 如果希望lottie库在代码混淆过程中不会被混淆,需要在混淆规则配置文件obfuscation-rules.txt中添加相应的排除规则。 +``` +-keep +./oh_modules/@ohos/lottie +``` +### 10.判断动画资源是否为网络加载使用示例 +``` + this.isNet = '是否为网络加载' + this.animateItem.isNetLoad; +``` + +### 11.日志开关功能 +``` + LogUtil.mLogLevel = LogUtil.ON; //打开日志信息 + LogUtil.mLogLevel = LogUtil.OFF; //关闭日志信息 +``` + +### 12.动画不可见时绘制 + +lottie支持动画滑动到不可见区域时,跳过绘制,减少冗余绘制(需要在API 13及以上的版本才支持该功能)。当前处理逻辑假定了lottie跟一个具体的canvas节点已经绑定,但是在一些复杂交互场景下,未能追踪绑定关系变化,使得UI逻辑存在复杂变化时出现不适用,包括: + +- 预加载场景,此时canvas节点跟lottie尚无绑定关系。这又包括开发者显式预加载以及lazyforeach的cache机制引起的系统隐式预加载。 +- 节点复用场景,此时节点可能会跟不同的动画形成绑定关系。 +- 节点销毁后又重建的场景,此时旧节点已发生变化,新节点的关联关系被重新建立。 + +以上几种情况,当前都无法处理。导致lottie无法准确感知canvas节点状态,出现冗余绘制,甚至应该活动时不活动等明显的体验问题。 因此引入以CanvasRenderingContext2D为核心的协调员coordinator对象,用来跟踪 lottie动画、 CanvasRenderingContext2D、 Canvas 三者之间的动态关联关系。只有当lottie所关联CanvasRenderingContext2D对应了一个可见的canvas时,才会真正执行绘制,否则都会跳过绘制,避免冗余负载。当coordinator无法确认准确的canvas节点状态时,引入兼容性处理:当用户未显式调用bindContext2dToCoordinator接口时,默认进行绘制,否则不进行绘制等进一步的回调通知。为了避免兼容性处理考虑不周,引入setAttachedCanvasHasVisibleArea接口,支持开发者强制修正context2d所关联的canvas节点状态,以便支持逃生。 + +使用示例: + + 1. 使用canvas + lottie.loadAnimation方式 + 在CanvasRenderingContext2D对象创建后,尚未被canvas引用前显示调用bindContext2dToCoordinator接口时,页面销毁时调用unbindContext2dFromCoordinator接口解除绑定。 + +``` +import lottie from '@ohos/lottie'; + +@Entry +@Component +struct InvisibleAreaAutoPlay { + private renderingSettings: RenderingContextSettings = new RenderingContextSettings(true); + private canvas2D: CanvasRenderingContext2D = new CanvasRenderingContext2D(this.renderingSettings); + + aboutToAppear(): void { + lottie.bindContext2dToCoordinator(this.canvas2D); + } + + aboutToDisappear(): void { + lottie.unbindContext2dFromCoordinator(this.canvas2D); + lottie.destroy('robotYoga'); + } + + build() { + Stack() { + Canvas(this.canvas2D) + .width(300) + .height(300) + .backgroundColor(Color.Gray) + .onReady(() => { + lottie.loadAnimation({ + container: this.canvas2D, + renderer: 'canvas', + loop: true, + autoplay: true, + contentMode: 'Contain', + name: 'robotYoga', + path: 'common/lottie/robotYoga.json' + }) + }) + }.height('40%') + .width('100%') + .backgroundColor(Color.Gray) + } +} +``` + +### 13.防止动画内存泄漏 + +- 避免使用@state修饰动画对象:当使用@state来修饰animationItem对象时,可能会导致动画无法被正常销毁,从而引发内存泄漏问题。 + + +- 及时销毁动画:当动画不再使用或页面即将销毁时,必须主动销毁动画。若仅创建动画而不主动销毁,animationItem对象会持续存在,进而引发内存泄漏。建议采用lottie.destroy(name)方法来销毁动画。 + + +## 接口说明 + +### AnimationItem + +| 使用方法 | 类型 | 相关描述 | +|-----------------------------------|-----------------------|---------| +| play() | name? | 播放 | +| stop() | name? | 停止 | +| pause() | name? | 暂停 | +| togglePause() | name? | 切换暂停 | +| destroy() | name? | 销毁动画 | +| goToAndStop() | value, isFrame?, name? | 跳到某一时刻并停止 | +| goToAndPlay() | value, isFrame?, name? | 跳到某一时刻并播放 | +| setSegment() | init,end | 设置动画片段 | +| playSegments() | arr, forceFlag | 播放指定片段 | +| resetSegments() | forceFlag | 重置动画 | +| setSpeed() | speed | 设置播放速度 | +| resize() | width?, height? | 刷新动画布局 | +| setDirection() | direction | 设置播放方向 | +| getDuration() | isFrames? | 获取动画时长 | +| addEventListener() | eventName,callback | 添加监听状态 | +| removeEventListener() | name,callback? | 移除监听状态 | +| changeColor() | color, layer?, index? | 更改动画颜色 | +| setContentMode() | contentMode | 设置填充模式 | +| setFrameRate() | frameRate | 设置动画刷帧率 | + + +### LottiePlayer + +| 使用方法 | 类型 | 相关描述 | +|-----------------------------------|---------------------------------------------|-----------------------------------------------------------| +| play() | name?, onlyCurrentAbility? | 播放 | +| stop() | name?, onlyCurrentAbility? | 停止 | +| pause() | name?, onlyCurrentAbility? | 暂停 | +| togglePause() | name?, onlyCurrentAbility? | 切换暂停 | +| destroy() | name?, onlyCurrentAbility? | 销毁动画 | +| goToAndStop() | value, isFrame?, name?, onlyCurrentAbility? | 跳到某一时刻并停止 | +| goToAndPlay() | value, isFrame?, name?, onlyCurrentAbility? | 跳到某一时刻并播放 | +| setSpeed() | speed, name?, onlyCurrentAbility? | 设置播放速度 | +| resize() | width?, height?, onlyCurrentAbility? | 刷新动画布局 | +| setDirection() | direction, name?, onlyCurrentAbility? | 设置播放方向 | +| setContentMode() | contentMode, name?, onlyCurrentAbility? | 设置填充模式 | +| loadAnimation() | params | 加载动画 | +| setFrameRate() | frameRate | 设置动画刷帧率 | +| cacheFileClear() | url?, container? | 清除文件缓存 | +| bindContext2dToCoordinator() | CanvasRenderingContext2D | 跟踪 lottie动画, CanvasRenderingContext2D, Canvas 三者之间的动态关联关系 | +| unbindContext2dFromCoordinator() | CanvasRenderingContext2D | 解除追踪关系 | +| setAttachedCanvasHasVisibleArea() | CanvasRenderingContext2D, boolean | 支持强制修正context2d所关联的canvas节点状态 | + + + + +## 新增特性 +1. 支持canvas渲染模式下动画的颜色修改。 +- 支持设置RGB格式颜色。 +- 支持设置RGBA格式颜色。 +- 支持设置起始关键帧颜色。 + +2. 支持canvas渲染模式下动画的masks/mattes部分特性。 +- masks模式支持 mode = a, mode = s, mode = f 模式。 +- mattes模式支持 tt = 1, tt = 2 模式。 + +3. 支持canvas渲染模式下动画的高斯模糊效果。 + +4. 支持canvas渲染模式下加载外部资源图片。 +- 支持加载沙箱路径的外部资源图片(优先查找的路径)。 +- 支持加载rawfile目录下的外部资源图片。 + +5. 支持设置填充模式。 +- Fill 填充拉伸(可能被拉伸、不会被裁剪)。 +- Top 等比填充-顶对齐(不会被裁剪、长边对齐)。 +- Bottom 等比填充-底对齐(不会被裁剪、长边对齐)。 +- Cover 等比缩放填充(可能被裁剪、短边对齐)。 +- Contain 等比填充-纵向中对齐(不会被裁剪、长边对齐)。 + +6. 支持设置动画animator的刷帧率。 + +7. 支持加载网络资源和通过URI路径方式加载动画。 +- 支持通过URI方式指定资源路径渲染动画。 +- 支持根据在线资源渲染动画。 +- 说明:如果lottie文件含有网络资源,需申请 ohos.permission.INTERNET,ohos.permission.GET_NETWORK_INFO两个权限。 + +8. 支持当动画处于隐藏状态或完全不可见时,当前动画将自动暂停其向canvas底层发送绘制指令,以此优化性能并减少功耗。 + +## 约束与限制 + +在下述版本验证通过: +- DevEco Studio: NEXT Developer Beta3(5.0.3.524), SDK: API12(5.0.0.25)。 +- DevEco Studio: NEXT Developer Beta1(5.0.3.122), SDK: API12(5.0.0.18)。 + +## 目录结构 + +```` +/lottie # 项目根目录 +├── entry # 示例代码文件夹 +├── library # lottie库文件夹 +│ └─ src/main/js # 核心代码,包含json解析,动画绘制,操作动画 +│ └─ 3rd_party +│ └─ animation +│ └─ effects +│ └─ elements +│ └─ modules +│ └─ renderers +│ └─ utils +│ └─ EffectsManager.js +│ └─ main.js +│ └─ mask.js +│ └─index.d.ts +├── README.md # 安装使用方法 +├── README_zh.md # 安装使用方法 +```` + +## 贡献代码 + +使用过程中发现任何问题都可以提交 [Issue](https://gitcode.com/openharmony-tpc/lottieArkTS/issues),当然,也非常欢迎提交 [PR](https://gitcode.com/openharmony-tpc/lottieArkTS/pulls) 。 + +## 开源协议 + +本项目遵循 [MIT License](https://gitcode.com/openharmony-tpc/lottieArkTS/blob/master/LICENSE)。 + +## 不支持能力 + +* 不支持HTML渲染方式 +* 不支持SVG渲染中filter效果 +* 不支持动画中masks,mattes部分特性 +* 不支持亮度遮罩模式,即:tt=3 +* 不支持组件控制动画显示、隐藏 +* 不支持注册动画 +* 不支持查找动画 +* 不支持更新动画数据 +* 不支持部分效果 +* 不支持含有表达式的动画 diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/build-profile.json5 b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..35dff6d53cb3a241f8de4fb68bd01d38ade0f108 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/build-profile.json5 @@ -0,0 +1,5 @@ +{ + "apiType": "stageMode", + "buildOption": { + } +} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/hvigorfile.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..42ed4b4a54a873e2b53441556aae93fab24b794f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/hvigorfile.ts @@ -0,0 +1,3 @@ +// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently. +module.exports = require('@ohos/hvigor-ohos-plugin').harTasks + diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/index.d.ts b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..6cad6ec6b6920e131f5ed78a93b1f20d22883263 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/index.d.ts @@ -0,0 +1,839 @@ +/** + * The MIT License (MIT) + * + * Copyright (c) 2015 Bodymovin + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +import common from '@ohos.app.ability.common'; +import { image } from '@kit.ImageKit'; +import { AsyncCallback } from '@kit.BasicServicesKit'; + +/** + * 动画运行方向 + * @since 8 + * @design + */ +export type AnimationDirection = 1 | -1; + +/** + * 动画片段声明 + * @since 8 + * @design + */ +export type AnimationSegment = [number, number]; + +/** + * 动画事件类型 + * @since 8 + * @design + */ +export type AnimationEventName = 'drawnFrame' | 'enterFrame' | 'loopComplete' | 'complete' | 'segmentStart' | 'destroy' | 'config_ready' | 'data_ready' | 'DOMLoaded' | 'error' | 'data_failed' | 'loaded_images'; +/** + * 动画事件回调函数声明 + * @since 8 + * @design + */ +export type AnimationEventCallback = (args: T) => void; + + +/** Specifies the data for each event type. */ +export interface AnimationEvents { + DOMLoaded: undefined; + complete: BMCompleteEvent; + config_ready: undefined; + data_failed: undefined; + data_ready: undefined; + destroy: BMDestroyEvent; + drawnFrame: BMEnterFrameEvent; + enterFrame: BMEnterFrameEvent; + error: undefined; + loaded_images: undefined; + loopComplete: BMCompleteLoopEvent; + segmentStart: BMSegmentStartEvent; +} + +export interface BMCompleteEvent { + direction: number; + type: "complete"; +} + +export interface BMCompleteLoopEvent { + currentLoop: number; + direction: number; + totalLoops: number; + type: "loopComplete"; +} + +export interface BMDestroyEvent { + type: "destroy"; +} + +export interface BMEnterFrameEvent { + /** The current time in frames. */ + currentTime: number; + direction: number; + /** The total number of frames. */ + totalTime: number; + type: "enterFrame"; +} + +export interface BMSegmentStartEvent { + firstFrame: number; + totalFrames: number; + type: "segmentStart"; +} + +/** + * 动画实例, Lottie.loadAnimation接口返回值 + * @since 8 + * @design + */ +export type AnimationItem = { + /** + * 动画所属的上下文 + * @since 13 + * @design + */ + context: common.UIAbilityContext; + + /** + * 动画名称 + * @since 8 + * @design + */ + name: string; + + /** + * 动画是否已加载 + * @since 8 + * @design + */ + isLoaded: boolean; + + /** + * 当前播放的帧号, 默认精度为>=0.0的浮点数, 调用setSubframe(false)后精度为去小数点后的正整数 + * @since 8 + * @design + */ + currentFrame: number; + + /** + * 当前播放帧数, 精度为>=0.0的浮点数 + * @since 8 + * @design + */ + currentRawFrame: number; + + /** + * 当前播放片段的第一帧帧号 + * @since 8 + * @design + */ + firstFrame: number; + + /** + * 当前播放片段的总帧数 + * @since 8 + * @design + */ + totalFrames: number; + + /** + * 帧率 (frame/s) + * @since 8 + * @design + */ + frameRate: number; + + /** + * 帧率 (frame/ms) + * @since 8 + * @design + */ + frameMult: number; + + /** + * 播放速率, 值为>=1的正整数 + * @since 8 + * @design + */ + playSpeed: number; + + /** + * 播放方向, 1为正放, -1为倒放 + * @since 8 + * @design + */ + playDirection: number; + + /** + * 动画完成播放的次数 + * @since 8 + * @design + */ + playCount: number; + + /** + * 当前动画是否已暂停, 值为true动画已暂停 + * @since 8 + * @design + */ + isPaused: boolean; + + /** + * 当前动画是否网络加载 + * @since 8 + * @design + */ + isNetLoad: boolean; + + /** + * 加载动画后是否自动播放, 若值为false需要再调用play()接口开始播放 + * @since 8 + * @design + */ + autoplay: boolean; + + /** + * 类型为boolean时是否循环播放, 类型为number时播放次数 + * @since 8 + * @design + */ + loop: boolean | number; + + /** + * 动画渲染对象, 根据渲染类型而定 + * @since 8 + * @design + */ + renderer: any; + + /** + * 动画ID + * @since 8 + * @design + */ + animationID: string; + + /** + * 当前动画片段完成单次播放的帧数, 受AnimationSegment设置影响, 与totalFrames属性值相同 + * @since 8 + * @design + */ + timeCompleted: number; + + /** + * 当前动画片段序号, 值为>=0的正整数; + * @since 8 + * @design + */ + segmentPos: number; + + /** + * 是否尽可能地更新动画帧率 + * @since 8 + * @design + */ + isSubframeEnabled: boolean; + + /** + * 当前动画待播放片段 + * @since 8 + * @design + */ + segments: AnimationSegment | AnimationSegment[]; + + /** + * 播放动画 + * @param name 被指定的动画名, 缺省默认为空 + * @since 8 + * @design + */ + play(name?: string): void; + + /** + * 停止动画 + * @param name 被指定的动画名, 可缺省默认为空 + * @since 8 + * @design + */ + stop(name?: string): void; + + /** + * 播放或暂停动画 + * @param name 被指定的动画名, 可缺省默认为空 + * @since 8 + * @design + */ + togglePause(name?: string): void; + + /** + * 销毁动画 + * @param name 被指定的动画名, 可缺省默认为空 + * @since 8 + * @design + */ + destroy(name?: string): void; + + /** + * 暂停动画 + * @param name 被指定的动画名, 可缺省默认为空 + * @since 8 + * @design + */ + pause(name?: string): void; + + /** + * 控制动画画面停止在某一帧或某个时刻 + * @param value 帧号(值>=0)或时刻(ms) + * @param isFrame true按帧控制, false按时间控制, 缺省默认false + * @param name 被指定的动画名, 可缺省默认为空 + * @since 8 + * @design + */ + goToAndStop(value: number, isFrame?: boolean, name?: string): void; + + /** + * 控制动画画面从在某一帧或某个时刻开始播放 + * @param value 帧号(>=0)或时刻(ms) + * @param isFrame true按帧控制, false按时间控制, 缺省默认false + * @param name 被指定的动画名, 可缺省默认为空 + * @since 8 + * @design + */ + goToAndPlay(value: number, isFrame?: boolean, name?: string): void; + + /** + * 限定动画资源播放时的整体帧范围 + * @param init 起始帧号 + * @param end 结束帧号 + * @since 8 + * @design + */ + setSegment(init: number, end: number): void; + + /** + * 重置动画播放片段, 使动画重新从第一帧开始播放完整动画 + * @param forceFlag 值为true立刻生效, 值为false循环下次播放的时候生效 + * @since 8 + * @design + */ + resetSegments(forceFlag: boolean): void; + + /** + * 刷新动画布局 + * @since 8 + * @design + */ + resize(width?: number, height?: number): void; + + /** + * 设置播放速度 + * @param speed 值为浮点类型, speed>0正向播放, speed<0反向播放, speed=0暂停播放, speed=1.0/-1.0正常速度播放 + * @since 8 + * @design + */ + setSpeed(speed: number): void; + + /** + * 设置播放方向 + * @param direction 1为正向, -1为反向 + * @since 8 + * @design + */ + setDirection(direction: AnimationDirection): void; + + /** + * 设置仅播放指定范围的帧动画 + * @param segments 片段或片段数组; 若传入的是数组, 且当前loop!=0, 播放结束后, 仅循环播放最后一个片段 + * @param forceFlag 值为true立刻生效, 值为false循环下次播放的时候生效 + * @since 8 + * @design + */ + playSegments(segments: AnimationSegment | AnimationSegment[], forceFlag?: boolean): void; + + /** + * 设置是否尽可能地更新动画帧率 + * @param useSubFrames 默认值是true, 值为true时尽可能的更新动画帧率, 值为false时尊重原始AE fps + * @since 8 + * @design + */ + setSubframe(useSubFrames: boolean): void; + + /** + * 获取动画单次完整播放的时间(与播放速度无关)或帧数, 与Lottie.loadAnimation接口入参initialSegment有关 + * @param inFrames 值为true时获取帧数, 值为false时获取时间(单位ms) + * @since 8 + * @design + */ + getDuration(inFrames?: boolean): number; + + /** + * 直接触发指定事件的所有已设置的回调 + * @param name 事件名称, 有效范围见AnimationEventName声明 + * @param args 用户自定义回调参数 + * @since 8 + * @design + */ + triggerEvent(name: T, args: AnimationEvents[T]): void; + + /** + * 添加侦听事件, 事件完成后会触发指定回调函数 + * @param name 事件名称, 有效范围见AnimationEventName声明 + * @param AnimationEventCallback 用户自定义回调函数 + * @since 8 + * @design + */ + addEventListener(name: T, callback: AnimationEventCallback): () => void; + + /** + * 删除侦听事件 + * @param name 事件名称, 有效范围见AnimationEventName声明 + * @param AnimationEventCallback 用户自定义回调函数; 缺省为空时, 删除此事件的所有回调函数。 + * @since 8 + * @design + */ + removeEventListener(name: T, callback?: AnimationEventCallback): void; + + /** + * 修改动画颜色 + * @param color 颜色数组RGBA + * @param layer 层次的下标值 + * @param index 对应层次里面的elements的下标值 + */ + changeColor(color: number[], layer?: number, index?: number): void; + + /** + * 修改动画的关键帧颜色 + * @param startColor 开始颜色数组RGBA + * @param endColor 结束颜色数组RGBA + * @param layer 层次的下标值 + * @param index 对应层次里面的elements的下标值 + */ + changeColor(startColor: number[],endColor: number[], layer?: number, index?: number): void; + + /** + * 动画填充模式,默认的填充模式是:Contain + * @param contentMode 模式:'Fill','Top','Bottom','Cover','Contain' + */ + setContentMode(contentMode: string): void; + + /** + * 设置当前动画的播放帧率,范围1~120。 + * 可通过设置0帧率来取消该限制。 + * @param frameRate 播放帧率 + * @since 12 + */ + setFrameRate(frameRate: number): void; + + +}; + +export type AnimationConfig = { + /** + * 与canvas组件绑定的上下文CanvasRenderingContext2D, 提供最基础的绘制渲染能力 + * @since 8 + * + * @design + */ + container: CanvasRenderingContext2D; + + /** + * 渲染类型, 目前支持canvas方式 + * @since 8 + * @design + */ + renderer?: string; + + /** + * 动画播放结束后, 是否循环播放,默认值true, 值为true时无限循环播放; 值类型为number, 且>=1时为设置重复播放的次数 + * @since 8 + * @design + */ + loop?: boolean | number; + + /** + * 自动播放设置 + * @since 8 + * @design + */ + autoplay?: boolean; + + /** + * 初始化动画资源播放时的整体帧范围 + * @since 8 + * @design + */ + initialSegment?: AnimationSegment; + + /** + * 动画名称, 动画成功加载后, 可在Lottie相关接口上, 应用该名称进行动画控制 + * @since 8 + * @design + */ + name?: string; + + /** + * 应用上下文 Context 在HSP场景下需要传正确的context,非HSP场景不影响,context可以不传 + * @since 8 + * @design + */ + context?: common.UIAbilityContext; + + /** + * 应用包名 用于打印日志区分不同模块调用启动aniamtor,packageName可以不传 + * @since 8 + * @design + */ + packageName?: string; + + /** + * 动画填充模式 支持填充模式:Fill, Top, Cover, Bottom, Contain 默认模式是:Contain + * @since 8 + * @design + */ + contentMode?: string; + + /** + * 设置animator的刷帧率,范围1~120 + * @since 8 + * @design + */ + frameRate?: number; + + /** + * 读取来自网络路径的动画数据,支持json和zip格式 + * @since 8 + * @design + */ + uri?: string; + + /** + * true优先读取网络资源,false优先读取本地缓存资源 + * @since 8 + * @design + */ + isNetwork?: boolean; + + /** + * 读取指定路径下的图片资源 + * @since 8 + * @design + */ + imagePath?: string; + + /** + * 当动画不可见时,是否跳过绘制:设为true则跳过绘制,设为false则不跳过绘制(即无条件绘制),默认值为true + * @since 13 + * @design + */ + autoSkip?: boolean; + + /** + * 在加载图片时,调用此接口获取获取绘制的 PixelMap 对象 + */ + imageAssetDelegate?: (imagePath: string, callback: AsyncCallback) => void; + +}; + +/** + * 动画文件配置信息, 推荐此方式 + * @since 8 + * @design + */ +export type AnimationConfigWithPath = AnimationConfig & { + /** + * 应用内的动画数据文件路径, 仅限json格式 + * path 路径仅支持entry/src/main/ets 路径下的相对路径,不支持跨包路径设置 + * @example path: 'common/lottie/data.json' + * @since 8 + * @design + */ + path?: string; +}; + +/** + * 数据动画配置信息 + * @since 8 + * @design + */ +export type AnimationConfigWithData = AnimationConfig & { + /** + * json格式的动画数据, 仅限json格式 + * @since 8 + * @design + */ + animationData?: any; +}; + +/** + * LottiePlayer组件提供动画加载与控制播放能力 + * @since 8 + * @design + */ +export type LottiePlayer = { + + /** + * 通过动画名称控制, 播放动画 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时播放所有动画 + * @param onlyCurrentAbility 仅播放当前ability内的动画. 缺省时播放所有动画 + * @since 8 + * @design + */ + play(name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 通过动画名称控制,暂停动画 + * @param name 被指定的动画名, 同loadAnimation接口入参name, 缺省时暂停所有动画 + * @param onlyCurrentAbility 仅暂停当前ability内的动画. 缺省时暂停所有动画 + * @since 8 + * @design + */ + pause(name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 通过动画名称控制,停止动画 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时停止所有动画 + * @param onlyCurrentAbility 仅停止当前ability内的动画. 缺省时停止所有动画 + * @since 8 + * @design + */ + stop(name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 通过动画名称控制,设置播放速度 + * @param speed 值为浮点类型, speed>0正向播放, speed<0反向播放, speed=0暂停播放, speed=1.0/-1.0正常速度播放 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时设置所有动画速度 + * @param onlyCurrentAbility 仅设置当前ability内的动画. 缺省时设置所有动画速度 + * @since 8 + * @design + */ + setSpeed(speed: number, name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 通过动画名称控制,设置播放方向 + * @param direction 1为正向, -1为反向; 当设置为反向时, 从当前播放进度开始回播直到首帧, loop值为true时可无限倒放, speed<0叠加时也是倒放 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时设置所有动画方向 + * @param onlyCurrentAbility 仅设置当前ability内的动画. 缺省时设置所有动画方向 + * @since 8 + * @design + */ + setDirection(direction: AnimationDirection, name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 通过动画名称控制,暂停或播放动画 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时停止所有动画 + * @param onlyCurrentAbility 仅停止当前ability内的动画. 缺省时停止所有动画 + * @since 8 + * @design + */ + togglePause(name?: string, onlyCurrentAbility?: boolean): void + + /** + * 加载动画, 须在组件完成布局后调用, 如可在点击事件回调中及Canvas组件的onReady()生命周期回调内调用; + * 页面退出时, 须与destory()配对使用; + * 目前支持canvas渲染方式, 支持传入json动画资源路径或json格式动画数据; + * 声明式范式下可配合组件生命周期onPageShow()使用, web范式下可配合生命周期onShow()使用; + * @param params 详见AnimationConfigWithPath或AnimationConfigWithData的声明 + * @return AnimationItem 动画对象, 可控制动画播放。 + * @since 9 + * @design + */ + loadAnimation(params: AnimationConfigWithPath | AnimationConfigWithData): AnimationItem; + + /** + * 通过动画名称控制, 销毁动画; 声明式范式下可配合组件生命周期onDisappear()与onPageHide()使用, web范式下可配合配合生命周期onHide()使用 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时销毁所有动画 + * @param onlyCurrentAbility 仅销毁当前ability内的动画. 缺省时销毁所有动画 + * @since 8 + * @design + */ + destroy(name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 设置所有动画的播放帧率,范围1~120。 + * 该设置具备持久性,即不论对于已加载还是新加载的动画都生效。可通过设置0帧率来取消该限制。 + * @param frameRate 播放帧率 + * @since 12 + */ + setFrameRate(frameRate: number): void; + + /** + * 异步清除缓存 + * @param url 具体动画被清除缓存的地址 + * @param container 与canvas组件绑定的上下文CanvasRenderingContext2D,用于本地资源路径json文件 + * @design + */ + clearFileCache(url?: string, container?: CanvasRenderingContext2D): void; + + /** + * 同步清除缓存 + * @param url 具体动画被清除缓存的地址 + * @param container 与canvas组件绑定的上下文CanvasRenderingContext2D,用于本地资源路径json文件 + * @design + */ + clearFileCacheSync(url?: string, container?: CanvasRenderingContext2D): void; + + /** + * 把CanvasRenderingContext2D绑定到用来跟踪生命周期变化的协调器coordinator上. + * + * 借助coordinator, 可跟踪"lottie动画", "CanvasRenderingContext2D"以及"Canvas"三者之间的动态关联关系, + * coordinator伺机通知"lottie动画"是否跳过绘制,以达到有效控制冗余绘制的目的. + * + * 当coordinator跟踪节点变化时, 可能各相关节点已完成其各自的生命周期活动, 因此会存在coordinator未知状态的情形. 比如: + * 某个canvas曾经关联了其它context2d对象, 并处于可见状态, 其可见性回调已经发生过. + * 现在canvas要attached到本context2d对象上来, 由于canvas可见性状态并未改变, 因此canvas的可见性回调也并不会再发生. + * 尽管coordinator会获取当前节点的visibility以及attached的状态,但即便两个状态均为true也并不意味着canvas节点具备可见面积. + * 为了避免这种情况发生, 需要调用者在所有与动画相关的canvas节点被创建之前,把该canvas所关联的CanvasRenderingContext2D对象绑定给coordinator, + * 以便coordinator有能力跟踪到相关canvas节点的准确状态. + * + * 该接口建议在CanvasRenderingContext2D对象刚刚创建之时进行调用, 以做到第一时间感知其生命周期. + * + * @param context2d 待绑定给coordinator的CanvasRenderingContext2D对象 + */ + bindContext2dToCoordinator(context2d: CanvasRenderingContext2D): void; + + /** + * 从coordinator中把CanvasRenderingContext2D剔除, 不再监听相关节点的生命周期. + * + * 需要注意的是, 该接口一旦调用, coordinator将不再跟踪相关节点的状态变化. + * 因此通常应该在所有相关的"lottie动画", "CanvasRenderingContext2D"以及"Canvas"均销毁后才可调用. + * + * @param context2d 待从coordinator中剔除的CanvasRenderingContext2D对象 + */ + unbindContext2dFromCoordinator(context2d: CanvasRenderingContext2D): void; + + /** + * 对 CanvasRenderingContext2D 所绑定的canvas节点可见性进行修正. + * + * coordinator会认为新绑定的canvas节点初始并无可见面积, 等待可见性回调发生时再做判断, 从而有效避免冗余绘制. + * 但是当canvas节点在绑定context2d之前已经完成了可见性回调时, coordinator就无法正常处理. + * 通常, 调用者可以在该canvas节点创建之前, 对其所(即将)关联的context2d做一次bindContextToCoordinator调用, 即可让coordinator正常感知. + * 但为了处理可能的难以预知的复杂场景, 此处提供一个逃生接口, 给调用者显式调整canvas节点可见性的选择. + * + * 该接口仅建议在通过bindContextToCoordinator接口无法跟踪canvas节点可见性状态时才需要被使用. + * 注意: 当context2d尚未绑定任何canvas时, 该接口不做任何处理. + * + * @param context2d 已经绑定给coordinator的CanvasRenderingContext2D对象 + * @param visible 与context2d所绑定的canvas节点可见性状态. + */ + setAttachedCanvasHasVisibleArea(context2d: CanvasRenderingContext2D, visible?: boolean): void; + + /** + * 获取当前存活的动画, 以数组形式返回. + * @design + */ + getRegisteredAnimations(): AnimationItem[]; + + /** + * 动画填充模式,默认的填充模式是:Contain + * @param contentMode 模式:'Fill','Top','Bottom','Cover','Contain' + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时设置所有动画 + * @param onlyCurrentAbility 仅设置当前ability内的动画. 缺省时设置所有动画 + */ + setContentMode(contentMode: string, name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 刷新动画布局 + * @param width 布局宽度 + * @param height 布局高度 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时刷新所有动画 + * @param onlyCurrentAbility 仅刷新当前ability内的动画. 缺省时刷新所有动画 + * @design + */ + resize(width: number, height: number, name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 控制动画画面停止在某一帧或某个时刻 + * @param value 帧号(值>=0)或时刻(ms) + * @param isFrame true按帧控制, false按时间控制, 缺省默认false + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时处理所有动画 + * @param onlyCurrentAbility 仅处理当前ability内的动画. 缺省时处理所有动画 + * @design + */ + goToAndStop(value:number, isFrame:boolean, name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 控制动画画面从在某一帧或某个时刻开始播放 + * @param value 帧号(>=0)或时刻(ms) + * @param isFrame true按帧控制, false按时间控制, 缺省默认false + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时处理所有动画 + * @param onlyCurrentAbility 仅处理当前ability内的动画. 缺省时处理所有动画 + * @design + */ + goToAndPlay(value:number, isFrame:boolean, name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 冻结动画 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时冻结所有动画 + * @param onlyCurrentAbility 仅冻结当前ability内的动画. 缺省时冻结所有动画 + * TODO: 暂不放开 + */ + //freeze(name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 动画解冻 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时解冻所有动画 + * @param onlyCurrentAbility 仅解冻当前ability内的动画. 缺省时解冻所有动画 + * TODO: 暂不放开 + */ + //unfreeze(name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 动画静音 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时静音所有动画 + * @param onlyCurrentAbility 仅静音当前ability内的动画. 缺省时静音所有动画 + * TODO: 暂不放开 + */ + // mute(name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 动画放音 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时放音所有动画 + * @param onlyCurrentAbility 仅放音当前ability内的动画. 缺省时放音所有动画 + * TODO: 暂不放开 + */ + // unmute(name?: string, onlyCurrentAbility?: boolean): void; + + /** + * 设置动画音量 + * @param volume 动画音量 + * @param name 被指定的动画名, 同loadAnimation接口参数name, 缺省时设置所有动画 + * @param onlyCurrentAbility 仅设置当前ability内的动画. 缺省时设置所有动画 + * TODO: 暂不放开 + */ + // setVolume(volume: number, name?: string, onlyCurrentAbility?: boolean): void; +}; + +export { LogUtil } from './src/main/js/utils/LogUtil'; + +/** + * Lottie 声明Lottie实例 + * @since 8 + * @design + */ +declare const Lottie: LottiePlayer; + +/** + * 默认仅导出Lottie示例对象 + * @since 8 + * @design + */ +export default Lottie; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/oh-package.json5 b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..846d5cfe7b995f5f96f7ad72095bb59791f9f596 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/oh-package.json5 @@ -0,0 +1 @@ +{"types":"index.d.ts","keywords":["OpenHarmony","HarmonyOS","Lottie"],"author":"ohos_tpc","ohos":{"org":"opensource"},"description":"lottie是一个适用于OpenHarmony的动画库,它可以使用Bodymovin解析以json格式导出的Adobe After Effects动画,并在移动设备上进行本地渲染","main":"src/main/js/modules/full.js","repository":"https://gitcode.com/openharmony-tpc/lottieArkTS.git","type":"module","version":"2.0.24","tags":["Animation"],"dependencies":{},"license":"MIT","devDependencies":{},"name":"@ohos/lottie","metadata":{"sourceRoots":["./src/main"],"debug":true},"compatibleSdkVersion":12,"compatibleSdkType":"OpenHarmony","obfuscated":false} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/3rd_party/BezierEaser.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/3rd_party/BezierEaser.js new file mode 100644 index 0000000000000000000000000000000000000000..76d18d8060527e990a798d9c487cc46d03c8f954 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/3rd_party/BezierEaser.js @@ -0,0 +1,167 @@ +/* eslint-disable */ +const BezierFactory = (function () { + /** + * BezierEasing - use bezier curve for transition easing function + * by Gaëtan Renaudeau 2014 - 2015 – MIT License + * + * Credits: is based on Firefox's nsSMILKeySpline.cpp + * Usage: + * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ]) + * spline.get(x) => returns the easing value | x must be in [0, 1] range + * + */ + + var ob = {}; + ob.getBezierEasing = getBezierEasing; + var beziers = {}; + + function getBezierEasing(a, b, c, d, nm) { + var str = safeReplace(nm, a, b, c, d); + if (beziers[str]) { + return beziers[str]; + } + var bezEasing = new BezierEasing([a, b, c, d]); + beziers[str] = bezEasing; + return bezEasing; + } + + function safeReplace(nm, a, b, c, d) { + if (nm) { + return nm; + } + // 强制转换为字符串,避免 undefinde + const parts = ['bez_', String(a), '_', String(b), '_', String(c), '_', String(d)].join(''); + return parts.replace(/\./g, 'p'); + } + + // These values are established by empiricism with tests (tradeoff: performance VS precision) + var NEWTON_ITERATIONS = 4; + var NEWTON_MIN_SLOPE = 0.001; + var SUBDIVISION_PRECISION = 0.0000001; + var SUBDIVISION_MAX_ITERATIONS = 10; + + var kSplineTableSize = 11; + var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0); + + var float32ArraySupported = typeof Float32Array === 'function'; + + function A(aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; } + function B(aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; } + function C(aA1) { return 3.0 * aA1; } + + // Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2. + function calcBezier(aT, aA1, aA2) { + return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; + } + + // Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2. + function getSlope(aT, aA1, aA2) { + return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); + } + + function binarySubdivide(aX, aA, aB, mX1, mX2) { + var currentX, + currentT, + i = 0; + do { + currentT = aA + (aB - aA) / 2.0; + currentX = calcBezier(currentT, mX1, mX2) - aX; + if (currentX > 0.0) { + aB = currentT; + } else { + aA = currentT; + } + } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); + return currentT; + } + + function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) { + for (var i = 0; i < NEWTON_ITERATIONS; ++i) { + var currentSlope = getSlope(aGuessT, mX1, mX2); + if (currentSlope === 0.0) return aGuessT; + var currentX = calcBezier(aGuessT, mX1, mX2) - aX; + aGuessT -= currentX / currentSlope; + } + return aGuessT; + } + + /** + * points is an array of [ mX1, mY1, mX2, mY2 ] + */ + function BezierEasing(points) { + this._p = points; + this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize); + this._precomputed = false; + + this.get = this.get.bind(this); + } + + BezierEasing.prototype = { + + get: function (x) { + var mX1 = this._p[0], + mY1 = this._p[1], + mX2 = this._p[2], + mY2 = this._p[3]; + if (!this._precomputed) this._precompute(); + if (mX1 === mY1 && mX2 === mY2) return x; // linear + // Because JavaScript number are imprecise, we should guarantee the extremes are right. + if (x === 0) return 0; + if (x === 1) return 1; + return calcBezier(this._getTForX(x), mY1, mY2); + }, + + // Private part + + _precompute: function () { + var mX1 = this._p[0], + mY1 = this._p[1], + mX2 = this._p[2], + mY2 = this._p[3]; + this._precomputed = true; + if (mX1 !== mY1 || mX2 !== mY2) { this._calcSampleValues(); } + }, + + _calcSampleValues: function () { + var mX1 = this._p[0], + mX2 = this._p[2]; + for (var i = 0; i < kSplineTableSize; ++i) { + this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2); + } + }, + + /** + * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection. + */ + _getTForX: function (aX) { + var mX1 = this._p[0], + mX2 = this._p[2], + mSampleValues = this._mSampleValues; + + var intervalStart = 0.0; + var currentSample = 1; + var lastSample = kSplineTableSize - 1; + + for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) { + intervalStart += kSampleStepSize; + } + --currentSample; + + // Interpolate to provide an initial guess for t + var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]); + var guessForT = intervalStart + dist * kSampleStepSize; + + var initialSlope = getSlope(guessForT, mX1, mX2); + if (initialSlope >= NEWTON_MIN_SLOPE) { + return newtonRaphsonIterate(aX, guessForT, mX1, mX2); + } if (initialSlope === 0.0) { + return guessForT; + } + return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2); + }, + }; + + return ob; +}()); + +export default BezierFactory; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/3rd_party/seedrandom.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/3rd_party/seedrandom.js new file mode 100644 index 0000000000000000000000000000000000000000..8d18f809cf5a204edebc2449028fd1af0abdc6a2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/3rd_party/seedrandom.js @@ -0,0 +1,236 @@ +/* eslint-disable */ +/* + Copyright 2014 David Bau. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + */ + +function seedRandom(pool, math) { +// +// The following constants are related to IEEE 754 limits. +// + var global = this, + width = 256, // each RC4 output is 0 <= x < 256 + chunks = 6, // at least six RC4 outputs for each double + digits = 52, // there are 52 significant digits in a double + rngname = 'random', // rngname: name for Math.random and Math.seedrandom + startdenom = math.pow(width, chunks), + significance = math.pow(2, digits), + overflow = significance * 2, + mask = width - 1, + nodecrypto; // node.js crypto module, initialized at the bottom. + +// +// seedrandom() +// This is the seedrandom function described above. +// + function seedrandom(seed, options, callback) { + var key = []; + options = (options === true) ? { entropy: true } : (options || {}); + + // Flatten the seed string or build one from local entropy if needed. + var shortseed = mixkey(flatten( + options.entropy ? [seed, tostring(pool)] : + (seed === null) ? autoseed() : seed, 3), key); + + // Use the seed to initialize an ARC4 generator. + var arc4 = new ARC4(key); + + // This function returns a random double in [0, 1) that contains + // randomness in every bit of the mantissa of the IEEE 754 value. + var prng = function() { + var n = arc4.g(chunks), // Start with a numerator n < 2 ^ 48 + d = startdenom, // and denominator d = 2 ^ 48. + x = 0; // and no 'extra last byte'. + while (n < significance) { // Fill up all significant digits by + n = (n + x) * width; // shifting numerator and + d *= width; // denominator and generating a + x = arc4.g(1); // new least-significant-byte. + } + while (n >= overflow) { // To avoid rounding up, before adding + n /= 2; // last byte, shift everything + d /= 2; // right using integer math until + x >>>= 1; // we have exactly the desired bits. + } + return (n + x) / d; // Form the number within [0, 1). + }; + + prng.int32 = function() { return arc4.g(4) | 0; }; + prng.quick = function() { return arc4.g(4) / 0x100000000; }; + prng.double = prng; + + // Mix the randomness into accumulated entropy. + mixkey(tostring(arc4.S), pool); + + // Calling convention: what to return as a function of prng, seed, is_math. + return (options.pass || callback || + function(prng, seed, is_math_call, state) { + if (state) { + // Load the arc4 state from the given state if it has an S array. + if (state.S) { copy(state, arc4); } + // Only provide the .state method if requested via options.state. + prng.state = function() { return copy(arc4, {}); }; + } + + // If called as a method of Math (Math.seedrandom()), mutate + // Math.random because that is how seedrandom.js has worked since v1.0. + if (is_math_call) { math[rngname] = prng; return seed; } + + // Otherwise, it is a newer calling convention, so return the + // prng directly. + else return prng; + })( + prng, + shortseed, + 'global' in options ? options.global : (this == math), + options.state); + } + math['seed' + rngname] = seedrandom; + +// +// ARC4 +// +// An ARC4 implementation. The constructor takes a key in the form of +// an array of at most (width) integers that should be 0 <= x < (width). +// +// The g(count) method returns a pseudorandom integer that concatenates +// the next (count) outputs from ARC4. Its return value is a number x +// that is in the range 0 <= x < (width ^ count). +// + function ARC4(key) { + var t, keylen = key.length, + me = this, i = 0, j = me.i = me.j = 0, s = me.S = []; + + // The empty key [] is treated as [0]. + if (!keylen) { key = [keylen++]; } + + // Set up S using the standard key scheduling algorithm. + while (i < width) { + s[i] = i++; + } + for (i = 0; i < width; i++) { + s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))]; + s[j] = t; + } + + // The "g" method returns the next (count) outputs as one number. + me.g = function(count) { + // Using instance members instead of closure state nearly doubles speed. + var t, r = 0, + i = me.i, j = me.j, s = me.S; + while (count--) { + t = s[i = mask & (i + 1)]; + r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))]; + } + me.i = i; me.j = j; + return r; + // For robust unpredictability, the function call below automatically + // discards an initial batch of values. This is called RC4-drop[256]. + }; + } + +// +// copy() +// Copies internal state of ARC4 to or from a plain object. +// + function copy(f, t) { + t.i = f.i; + t.j = f.j; + t.S = f.S.slice(); + return t; + } + +// +// flatten() +// Converts an object tree to nested arrays of strings. +// + function flatten(obj, depth) { + var result = [], typ = (typeof obj), prop; + if (depth && typ == 'object') { + for (prop in obj) { + try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {} + } + } + return (result.length ? result : typ == 'string' ? obj : obj + '\0'); + } + +// +// mixkey() +// Mixes a string seed into a key that is an array of integers, and +// returns a shortened string seed that is equivalent to the result key. +// + function mixkey(seed, key) { + var stringseed = seed + '', smear, j = 0; + while (j < stringseed.length) { + key[mask & j] = + mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++)); + } + return tostring(key); + } + +// +// autoseed() +// Returns an object for autoseeding, using window.crypto and Node crypto +// module if available. +// + function autoseed() { + try { + if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); } + var out = new Uint8Array(width); + (global.crypto || global.msCrypto).getRandomValues(out); + return tostring(out); + } catch (e) { + var browser = global.navigator, + plugins = browser && browser.plugins; + return [+new Date(), global, plugins, global.screen, tostring(pool)]; + } + } + +// +// tostring() +// Converts an array of charcodes to a string +// + function tostring(a) { + return String.fromCharCode.apply(0, a); + } + +// +// When seedrandom.js is loaded, we immediately mix a few bits +// from the built-in RNG into the entropy pool. Because we do +// not want to interfere with deterministic PRNG state later, +// seedrandom will not call math.random on its own again after +// initialization. +// + mixkey(math.random(), pool); + +// +// Nodejs and AMD support: export the implementation as a module using +// either convention. +// + +// End anonymous scope, and pass initial values. +}; + +function initialize(BMMath) { + seedRandom([], BMMath); +} + +export default initialize; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/3rd_party/transformation-matrix.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/3rd_party/transformation-matrix.js new file mode 100644 index 0000000000000000000000000000000000000000..560f5d7096c9ca722fd05b5a189212eb5cbd9a46 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/3rd_party/transformation-matrix.js @@ -0,0 +1,426 @@ +import { + createTypedArray, +} from '../utils/helpers/arrays'; + +/*! + Transformation Matrix v2.0 + (c) Epistemex 2014-2015 + www.epistemex.com + By Ken Fyrstenberg + Contributions by leeoniya. + License: MIT, header required. + */ + +/** + * 2D transformation matrix object initialized with identity matrix. + * + * The matrix can synchronize a canvas context by supplying the context + * as an argument, or later apply current absolute transform to an + * existing context. + * + * All values are handled as floating point values. + * + * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix + * @prop {number} a - scale x + * @prop {number} b - shear y + * @prop {number} c - shear x + * @prop {number} d - scale y + * @prop {number} e - translate x + * @prop {number} f - translate y + * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context + * @constructor + */ + +const Matrix = (function () { + var _cos = Math.cos; + var _sin = Math.sin; + var _tan = Math.tan; + var _rnd = Math.round; + + function reset() { + this.props[0] = 1; + this.props[1] = 0; + this.props[2] = 0; + this.props[3] = 0; + this.props[4] = 0; + this.props[5] = 1; + this.props[6] = 0; + this.props[7] = 0; + this.props[8] = 0; + this.props[9] = 0; + this.props[10] = 1; + this.props[11] = 0; + this.props[12] = 0; + this.props[13] = 0; + this.props[14] = 0; + this.props[15] = 1; + return this; + } + + function rotate(angle) { + if (angle === 0) { + return this; + } + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + + function rotateX(angle) { + if (angle === 0) { + return this; + } + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1); + } + + function rotateY(angle) { + if (angle === 0) { + return this; + } + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(mCos, 0, mSin, 0, 0, 1, 0, 0, -mSin, 0, mCos, 0, 0, 0, 0, 1); + } + + function rotateZ(angle) { + if (angle === 0) { + return this; + } + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + } + + function shear(sx, sy) { + return this._t(1, sy, sx, 1, 0, 0); + } + + function skew(ax, ay) { + return this.shear(_tan(ax), _tan(ay)); + } + + function skewFromAxis(ax, angle) { + var mCos = _cos(angle); + var mSin = _sin(angle); + return this._t(mCos, mSin, 0, 0, -mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) + ._t(1, 0, 0, 0, _tan(ax), 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1) + ._t(mCos, -mSin, 0, 0, mSin, mCos, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1); + // return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0); + } + + function scale(sx, sy, sz) { + if (!sz && sz !== 0) { + sz = 1; + } + if (sx === 1 && sy === 1 && sz === 1) { + return this; + } + return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1); + } + + function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) { + this.props[0] = a; + this.props[1] = b; + this.props[2] = c; + this.props[3] = d; + this.props[4] = e; + this.props[5] = f; + this.props[6] = g; + this.props[7] = h; + this.props[8] = i; + this.props[9] = j; + this.props[10] = k; + this.props[11] = l; + this.props[12] = m; + this.props[13] = n; + this.props[14] = o; + this.props[15] = p; + return this; + } + + function translate(tx, ty, tz) { + tz = tz || 0; + if (tx !== 0 || ty !== 0 || tz !== 0) { + return this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, tx, ty, tz, 1); + } + return this; + } + + function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) { + var _p = this.props; + + if (a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0) { + // NOTE: commenting this condition because TurboFan deoptimizes code when present + // if(m2 !== 0 || n2 !== 0 || o2 !== 0){ + _p[12] = _p[12] * a2 + _p[15] * m2; + _p[13] = _p[13] * f2 + _p[15] * n2; + _p[14] = _p[14] * k2 + _p[15] * o2; + _p[15] *= p2; + // } + this._identityCalculated = false; + return this; + } + + var a1 = _p[0]; + var b1 = _p[1]; + var c1 = _p[2]; + var d1 = _p[3]; + var e1 = _p[4]; + var f1 = _p[5]; + var g1 = _p[6]; + var h1 = _p[7]; + var i1 = _p[8]; + var j1 = _p[9]; + var k1 = _p[10]; + var l1 = _p[11]; + var m1 = _p[12]; + var n1 = _p[13]; + var o1 = _p[14]; + var p1 = _p[15]; + + /* matrix order (canvas compatible): + * ace + * bdf + * 001 + */ + _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2; + _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2; + _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2; + _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2; + + _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2; + _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2; + _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2; + _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2; + + _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2; + _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2; + _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2; + _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2; + + _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2; + _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2; + _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2; + _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2; + + this._identityCalculated = false; + return this; + } + + function isIdentity() { + if (!this._identityCalculated) { + this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1); + this._identityCalculated = true; + } + return this._identity; + } + + function equals(matr) { + var i = 0; + while (i < 16) { + if (matr.props[i] !== this.props[i]) { + return false; + } + i += 1; + } + return true; + } + + function clone(matr) { + var i; + for (i = 0; i < 16; i += 1) { + matr.props[i] = this.props[i]; + } + return matr; + } + + function cloneFromProps(props) { + var i; + for (i = 0; i < 16; i += 1) { + this.props[i] = props[i]; + } + } + + function applyToPoint(x, y, z) { + return { + x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], + y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], + z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14], + }; + /* return { + x: x * me.a + y * me.c + me.e, + y: x * me.b + y * me.d + me.f + }; */ + } + function applyToX(x, y, z) { + return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12]; + } + function applyToY(x, y, z) { + return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13]; + } + function applyToZ(x, y, z) { + return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]; + } + + function getInverseMatrix() { + var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4]; + var a = this.props[5] / determinant; + var b = -this.props[1] / determinant; + var c = -this.props[4] / determinant; + var d = this.props[0] / determinant; + var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / determinant; + var f = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / determinant; + var inverseMatrix = new Matrix(); + inverseMatrix.props[0] = a; + inverseMatrix.props[1] = b; + inverseMatrix.props[4] = c; + inverseMatrix.props[5] = d; + inverseMatrix.props[12] = e; + inverseMatrix.props[13] = f; + return inverseMatrix; + } + + function inversePoint(pt) { + var inverseMatrix = this.getInverseMatrix(); + return inverseMatrix.applyToPointArray(pt[0], pt[1], pt[2] || 0); + } + + function inversePoints(pts) { + var i; + var len = pts.length; + var retPts = []; + for (i = 0; i < len; i += 1) { + retPts[i] = inversePoint(pts[i]); + } + return retPts; + } + + function applyToTriplePoints(pt1, pt2, pt3) { + var arr = createTypedArray('float32', 6); + if (this.isIdentity()) { + arr[0] = pt1[0]; + arr[1] = pt1[1]; + arr[2] = pt2[0]; + arr[3] = pt2[1]; + arr[4] = pt3[0]; + arr[5] = pt3[1]; + } else { + var p0 = this.props[0]; + var p1 = this.props[1]; + var p4 = this.props[4]; + var p5 = this.props[5]; + var p12 = this.props[12]; + var p13 = this.props[13]; + arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12; + arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13; + arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12; + arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13; + arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12; + arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13; + } + return arr; + } + + function applyToPointArray(x, y, z) { + var arr; + if (this.isIdentity()) { + arr = [x, y, z]; + } else { + arr = [ + x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12], + x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13], + x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14], + ]; + } + return arr; + } + + function applyToPointStringified(x, y) { + if (this.isIdentity()) { + return x + ',' + y; + } + var _p = this.props; + return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100 + ',' + Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100; + } + + function toCSS() { + // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed. + /* if(this.isIdentity()) { + return ''; + } */ + var i = 0; + var props = this.props; + var cssValue = 'matrix3d('; + var v = 10000; + while (i < 16) { + cssValue += _rnd(props[i] * v) / v; + cssValue += i === 15 ? ')' : ','; + i += 1; + } + return cssValue; + } + + function roundMatrixProperty(val) { + var v = 10000; + if ((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) { + return _rnd(val * v) / v; + } + return val; + } + + function to2dCSS() { + // Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed. + /* if(this.isIdentity()) { + return ''; + } */ + var props = this.props; + var _a = roundMatrixProperty(props[0]); + var _b = roundMatrixProperty(props[1]); + var _c = roundMatrixProperty(props[4]); + var _d = roundMatrixProperty(props[5]); + var _e = roundMatrixProperty(props[12]); + var _f = roundMatrixProperty(props[13]); + return 'matrix(' + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ')'; + } + + return function () { + this.reset = reset; + this.rotate = rotate; + this.rotateX = rotateX; + this.rotateY = rotateY; + this.rotateZ = rotateZ; + this.skew = skew; + this.skewFromAxis = skewFromAxis; + this.shear = shear; + this.scale = scale; + this.setTransform = setTransform; + this.translate = translate; + this.transform = transform; + this.applyToPoint = applyToPoint; + this.applyToX = applyToX; + this.applyToY = applyToY; + this.applyToZ = applyToZ; + this.applyToPointArray = applyToPointArray; + this.applyToTriplePoints = applyToTriplePoints; + this.applyToPointStringified = applyToPointStringified; + this.toCSS = toCSS; + this.to2dCSS = to2dCSS; + this.clone = clone; + this.cloneFromProps = cloneFromProps; + this.equals = equals; + this.inversePoints = inversePoints; + this.inversePoint = inversePoint; + this.getInverseMatrix = getInverseMatrix; + this._t = this.transform; + this.isIdentity = isIdentity; + this._identity = true; + this._identityCalculated = false; + + this.props = createTypedArray('float32', 16); + this.reset(); + }; +}()); + +export default Matrix; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/EffectsManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/EffectsManager.js new file mode 100644 index 0000000000000000000000000000000000000000..3603538a25656a41f3e09aaabcfbd3a37705add5 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/EffectsManager.js @@ -0,0 +1,83 @@ +import { + extendPrototype, +} from './utils/functionExtensions'; +import { + SliderEffect, + AngleEffect, + ColorEffect, + PointEffect, + LayerIndexEffect, + MaskIndexEffect, + CheckboxEffect, + NoValueEffect, +} from './effects/SliderEffect'; +import DynamicPropertyContainer from './utils/helpers/dynamicProperties'; + +function EffectsManager(data, element) { + var effects = data.ef || []; + this.effectElements = []; + var i; + var len = effects.length; + var effectItem; + for (i = 0; i < len; i += 1) { + effectItem = new GroupEffect(effects[i], element); + this.effectElements.push(effectItem); + } +} + +function GroupEffect(data, element) { + this.init(data, element); +} + +extendPrototype([DynamicPropertyContainer], GroupEffect); + +GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties; + +GroupEffect.prototype.init = function (data, element) { + this.data = data; + this.effectElements = []; + this.initDynamicPropertyContainer(element); + var i; + var len = this.data.ef.length; + var eff; + var effects = this.data.ef; + for (i = 0; i < len; i += 1) { + eff = null; + switch (effects[i].ty) { + case 0: + eff = new SliderEffect(effects[i], element, this); + break; + case 1: + eff = new AngleEffect(effects[i], element, this); + break; + case 2: + eff = new ColorEffect(effects[i], element, this); + break; + case 3: + eff = new PointEffect(effects[i], element, this); + break; + case 4: + case 7: + eff = new CheckboxEffect(effects[i], element, this); + break; + case 10: + eff = new LayerIndexEffect(effects[i], element, this); + break; + case 11: + eff = new MaskIndexEffect(effects[i], element, this); + break; + case 5: + eff = new EffectsManager(effects[i], element, this); + break; + // case 6: + default: + eff = new NoValueEffect(effects[i], element, this); + break; + } + if (eff) { + this.effectElements.push(eff); + } + } +}; + +export default EffectsManager; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/animation/AnimationItem.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/animation/AnimationItem.js new file mode 100644 index 0000000000000000000000000000000000000000..7114a94ccce5a2c625db1905da99284562ee2bea --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/animation/AnimationItem.js @@ -0,0 +1,1324 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; + +import audioControllerFactory from '../utils/audio/AudioController'; +import { + getSubframeEnabled, + BMEnterFrameEvent, + BMCompleteEvent, + BMCompleteLoopEvent, + BMSegmentStartEvent, + BMDestroyEvent, + BMRenderFrameErrorEvent, + BMConfigErrorEvent, + createElementID, + getExpressionsPlugin, +} from '../utils/common'; +import ImagePreloader from '../utils/imagePreloader'; +import BaseEvent from '../utils/BaseEvent'; +import dataManager from '../utils/DataManager'; +import markerParser from '../utils/markers/markerParser'; +import ProjectInterface from '../utils/expressions/ProjectInterface'; +import { getRenderer, getRegisteredRenderer } from '../renderers/renderersManager'; +import downloadManager from '../utils/DownloadManager'; +import { + readJson, + handleAssets, + createFilesDir, + handleZipAssets, + isCacheExist, + isHaveImg, + createImageFilesDir, + isJsonFile, + isCompressdFile, + isExistNetworkAssets +} from '../utils/DataUtil'; +import {LogUtil} from '../utils/LogUtil' +import deviceInfo from '@ohos.deviceInfo'; + +const AnimationItem = function () { + this._cbs = []; + this.name = ''; + this.path = ''; + this.source = null; + this.isLoaded = false; + this.absoluteFrameToPlay = -1; //absolute frame number based by 0, regardless of whether playing segments + this._absoluteFramePlayed = -1; + this.firstFrame = 0; //the number of the started frame which is in playing segments + this.endFrame = 0; + this.offsetFrame = 0; //the minimum number of segment frames. Note that it's not certainly firstFrame + this.totalFrames = 0; + this.frameRate = 0; + this.frameMult = 0; + this._speed = 1; + this._direction = 1; + this.playCount = 0; + this.animationData = {}; + this.assets = []; + this.isPaused = true; + this.autoplay = false; + this.loop = true; + this.renderer = null; + this.animationID = createElementID(); + this.assetsPath = ''; + this.timeCompleted = 0; + this.segmentPos = 0; + this.isSubframeEnabled = getSubframeEnabled(); + this.segments = []; + this._idle = true; + this.projectInterface = ProjectInterface(); + this.imagePreloader = new ImagePreloader(); + this.audioController = audioControllerFactory(); + this.markers = []; + this.configAnimation = this.configAnimation.bind(this); + this.onSetupError = this.onSetupError.bind(this); + this.onSegmentComplete = this.onSegmentComplete.bind(this); + this.drawnFrameEvent = new BMEnterFrameEvent('drawnFrame', 0, 0, 0); + this.context = null; + this.packageName = ''; + this.contentMode = ''; + this.userPlayingFrameRate = 0; // the max playing frame rate of this animation + this.lastTimestamp = 0; + this._loopCompleteTime = 20; + this._firstTime = 0; + this.isFirstLoaded = false; + this.isNetLoad = false; + this.isAutoSkip = true; + this._hasArea = true; + this._isCanvasStatusDeterminate = false; + + /* + * for backward compatiblity + * relative frame based by offsetFrame. + */ + Object.defineProperty(this, 'currentRawFrame', { + get() { + return this.absoluteFrameToPlay; + }, + set(value) { + let nextFrame = this.getNextFrameToPlay(value); + this.absoluteFrameToPlay = this.relativeFrameToAbsolute(nextFrame); + } + }); + + /* + * for backward compatiblity + * relative frame based by offsetFrame. Integerized when subFrame is false. + */ + Object.defineProperty(this, 'currentFrame', { + get() { + let frameToPlay = this.isSubframeEnabled ? this.absoluteFrameToPlay: Math.floor(this.absoluteFrameToPlay); + // for backward compatiblity + return this.absoluteFrameToRelative(frameToPlay); + }, + set(value) { + let frameToPlay = this.getNextFrameToPlay(value); + let absoluteFrame = this.relativeFrameToAbsolute(frameToPlay); + this.absoluteFrameToPlay = this.isSubframeEnabled ? absoluteFrame : Math.floor(absoluteFrame); + } + }); + + /* + * for backward compatiblity + * 播放速率, 值为>=1的正整数. + */ + Object.defineProperty(this, 'playSpeed', { + get() { + return this._speed; + }, + set(value) { + this.setSpeed(value); + } + }); + + /* + * for backward compatiblity + * 播放速率, 值为>=1的正整数. + */ + Object.defineProperty(this, 'playDirection', { + get() { + return this._direction; + }, + set(value) { + this.setDirection(value); + } + }); + +}; + +extendPrototype([BaseEvent], AnimationItem); + +AnimationItem.prototype._getLogTag = function() { + let abilityName = this.getUiContext()?.getHostContext()?.abilityInfo?.name; + return `<(${abilityName} ${this.animationID})> ${this.packageName} ${this.name} animation`; +}; + +AnimationItem.prototype.loadCacheData = function (uri, resultDir) { + let existResult = isCacheExist(uri, resultDir.route); // 沙箱中是否有下载的资源 + if (existResult?.isExist) { + let cacheData = readJson(uri, resultDir.route, this.triggerEvent.bind(this)); + // 优先读取缓存 + if (isJsonFile(uri)) { + if (cacheData?.assets?.length && isExistNetworkAssets(cacheData?.assets)) { + let newJsonData = handleAssets(cacheData); + this.setupAnimation(newJsonData); // 加载有图片资源的json资源 + } else { + this.setupAnimation(cacheData); // 加载无图片资源的json资源 + }; + } else if (isCompressdFile(uri)) { + // 修改u路径 + let newCacheData = handleZipAssets(cacheData, resultDir.route); + this.setupAnimation(newCacheData); + }; + this.isNetLoad = false; + } else { + // 若缓存无资源,加载网络资源 + downloadManager.loadNetworkAnimation(uri, (jsonData, isNetLoad) => { + this.isNetLoad = isNetLoad; + this.setupAnimation(jsonData); + }, this.triggerEvent.bind(this), resultDir, false); + }; +}; + +AnimationItem.prototype.loadAnimationData = function (jsonData, isNetwork) { + try { + if (jsonData?.assets?.length && isExistNetworkAssets(jsonData?.assets)) { + this.loadImage(jsonData, isNetwork); + } else { + // 无网络图片 + this.setupAnimation(jsonData); + } + } catch (error) { + LogUtil.error(`${this._getLogTag()} error.message: ${JSON.stringify(error.message)}, error.stack: ${JSON.stringify(error.stack)}`); + } +}; + +AnimationItem.prototype.loadImage = function (jsonData, isNetwork) { + if (isNetwork) { + downloadManager.loadNetworkImage(jsonData).then((results) => { + let newJsonData = handleAssets(jsonData); + this.setupAnimation(newJsonData); + }) + .catch((err) => { + // 处理网络异常加载缓存 + let imgRouterFilesDir = createImageFilesDir(); + let isImg = isHaveImg(imgRouterFilesDir); // 沙箱中是否有下载的图片资源 + if (isImg) { + let cacheImagesData = handleAssets(jsonData); + this.setupAnimation(cacheImagesData); + } else { + // 缓存无资源,返回加载异常 + this.triggerEvent('error', err); + } + ; + }); + } else { + // false 优先加载缓存资源 + let imgRouterFilesDir = createImageFilesDir(); + let isImg = isHaveImg(imgRouterFilesDir); // 沙箱中是否有下载的图片资源 + if (isImg) { + let filesJsonData = handleAssets(jsonData); + this.setupAnimation(filesJsonData); + } else { + downloadManager.loadNetworkImage(jsonData).then((results) => { + let newJsonData = handleAssets(jsonData); + this.setupAnimation(newJsonData); + }) + .catch((err) => { + // 下载失败,返回加载异常 + this.triggerEvent('error', err); + }); + } + ; + } +}; + +AnimationItem.prototype.getUiContext = function () { + return this.wrapper?.canvas?.uiContext_; +}; + +AnimationItem.prototype.setParams = function (params) { + if (params.wrapper || params.container) { + this.wrapper = params.wrapper || params.container; + } + var animType = 'svg'; + if (params.animType) { + animType = params.animType; + } else if (params.renderer) { + animType = params.renderer; + } + this.name = params.name ? params.name : ''; + const RendererClass = getRenderer(animType); + this.renderer = new RendererClass(this, params.rendererSettings); + this.context = getContext(); + let resContext = 'context' in params ? params.context : getContext(); + let imagePath = 'imagePath' in params ? params.imagePath : ''; + let imageAssetDelegate = 'imageAssetDelegate' in params ? params.imageAssetDelegate : null; + this.imagePreloader.setCacheType(animType, this.renderer.globalData.defs, resContext, imagePath); + this.imagePreloader.setImageAssetDelegate(imageAssetDelegate) + this.renderer.setProjectInterface(this.projectInterface); + this.animType = animType; + if (params.loop === '' + || params.loop === null + || params.loop === undefined + || params.loop === true) { + this.loop = true; + } else if (params.loop === false) { + this.loop = false; + } else { + this.loop = parseInt(params.loop, 10); + } + this.contentMode = 'contentMode' in params ? params.contentMode : ''; + this.packageName = 'packageName' in params ? params.packageName : ''; + if (params.frameRate) { + this.setFrameRate(params.frameRate); + } + this.autoplay = 'autoplay' in params ? params.autoplay : true; + this.isAutoSkip = 'autoSkip' in params ? params.autoSkip : true; + this.autoloadSegments = + Object.prototype.hasOwnProperty.call(params, 'autoloadSegments') ? params.autoloadSegments : true; + this.assetsPath = params.assetsPath; + this.initialSegment = params.initialSegment; + if (params.audioFactory) { + this.audioController.setAudioFactory(params.audioFactory); + } + + if (params.animationData) { + this.source = 'data'; + this.loadAnimationData(params.animationData, params.isNetwork); + } else if (params.path) { + this.source = params.path; + if (params.path.lastIndexOf('\\') !== -1) { + this.path = params.path.substr(0, params.path.lastIndexOf('\\') + 1); + } else { + this.path = params.path.substr(0, params.path.lastIndexOf('/') + 1); + } + this.fileName = params.path.substr(params.path.lastIndexOf('/') + 1); + this.fileName = this.fileName.substr(0, this.fileName.lastIndexOf('.json')); + try { + dataManager.loadAnimation( + this.wrapper, + params.path, + params.isNetwork, + this.configAnimation, + this.onSetupError + ); + } catch (err) { + this.triggerEvent('error', err); + } + } else if (params.uri) { + this.source = params.uri; + this.loadNetworkResource(params.uri, params.isNetwork) + } +}; + +AnimationItem.prototype.onCanvasHasVisibleArea = function(canvasUniqueId, hasArea) { + LogUtil.info(`${this._getLogTag()} canvas(${canvasUniqueId}) has ${hasArea ? 'visible' : 'no'} area.`); + this._isCanvasStatusDeterminate = true; + this._visibleAreaChanged(canvasUniqueId, hasArea); +}; + +AnimationItem.prototype.loadNetworkResource = function (uri, isNetwork) { + let resultDir = createFilesDir(uri); + if (isNetwork) { + // true 优先加载网络资源 + downloadManager.loadNetworkAnimation(uri, (jsonData, isNetLoad) => { + this.isNetLoad = isNetLoad; + this.setupAnimation(jsonData); + }, this.triggerEvent.bind(this), resultDir, true); + } else { + // false 优先加载缓存资源 + this.loadCacheData(uri, resultDir); + } +}; + +AnimationItem.prototype.onSetupError = function () { + this.trigger('data_failed'); +}; + +AnimationItem.prototype.setupAnimation = function (data) { + dataManager.completeAnimation( + data, + this.configAnimation + ); +}; + +// web only +AnimationItem.prototype.setData = function (wrapper, animationData) { + if (animationData) { + if (typeof animationData !== 'object') { + animationData = JSON.parse(animationData); + } + } + var params = { + wrapper: wrapper, + animationData: animationData, + }; + var wrapperAttributes = wrapper.attributes; + + params.path = wrapperAttributes.getNamedItem('data-animation-path') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-animation-path').value + : wrapperAttributes.getNamedItem('data-bm-path') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-path').value + : wrapperAttributes.getNamedItem('bm-path') + ? wrapperAttributes.getNamedItem('bm-path').value + : ''; + params.animType = wrapperAttributes.getNamedItem('data-anim-type') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-anim-type').value + : wrapperAttributes.getNamedItem('data-bm-type') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-type').value + : wrapperAttributes.getNamedItem('bm-type') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('bm-type').value + : wrapperAttributes.getNamedItem('data-bm-renderer') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-renderer').value + : wrapperAttributes.getNamedItem('bm-renderer') + ? wrapperAttributes.getNamedItem('bm-renderer').value + : getRegisteredRenderer() || 'canvas'; + + var loop = wrapperAttributes.getNamedItem('data-anim-loop') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-anim-loop').value + : wrapperAttributes.getNamedItem('data-bm-loop') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-loop').value + : wrapperAttributes.getNamedItem('bm-loop') + ? wrapperAttributes.getNamedItem('bm-loop').value + : ''; + if (loop === 'false') { + params.loop = false; + } else if (loop === 'true') { + params.loop = true; + } else if (loop !== '') { + params.loop = parseInt(loop, 10); + } + var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-anim-autoplay').value + : wrapperAttributes.getNamedItem('data-bm-autoplay') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-autoplay').value + : wrapperAttributes.getNamedItem('bm-autoplay') + ? wrapperAttributes.getNamedItem('bm-autoplay').value + : true; + params.autoplay = autoplay !== 'false'; + + params.name = wrapperAttributes.getNamedItem('data-name') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-name').value + : wrapperAttributes.getNamedItem('data-bm-name') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-name').value + : wrapperAttributes.getNamedItem('bm-name') + ? wrapperAttributes.getNamedItem('bm-name').value + : ''; + var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-anim-prerender').value + : wrapperAttributes.getNamedItem('data-bm-prerender') // eslint-disable-line no-nested-ternary + ? wrapperAttributes.getNamedItem('data-bm-prerender').value + : wrapperAttributes.getNamedItem('bm-prerender') + ? wrapperAttributes.getNamedItem('bm-prerender').value + : ''; + + if (prerender === 'false') { + params.prerender = false; + } + if (!params.path) { + this.trigger('destroy'); + } else { + this.setParams(params); + } +}; + +AnimationItem.prototype.includeLayers = function (data) { + if (data.op > this.animationData.op) { + this.animationData.op = data.op; + this.totalFrames = Math.floor(data.op - this.animationData.ip); + } + var layers = this.animationData.layers; + var i; + var len = layers.length; + var newLayers = data.layers; + var j; + var jLen = newLayers.length; + for (j = 0; j < jLen; j += 1) { + i = 0; + while (i < len) { + if (layers[i].id === newLayers[j].id) { + layers[i] = newLayers[j]; + break; + } + i += 1; + } + } + if (!!this.renderer) { + if (data.chars || data.fonts) { + this.renderer.globalData.fontManager.addChars(data.chars); + this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs); + } + } + if (data.assets) { + len = data.assets.length; + for (i = 0; i < len; i += 1) { + this.animationData.assets.push(data.assets[i]); + } + } + this.animationData.__complete = false; + dataManager.completeAnimation( + this.animationData, + this.onSegmentComplete + ); +}; + +AnimationItem.prototype.onSegmentComplete = function (data) { + this.animationData = data; + var expressionsPlugin = getExpressionsPlugin(); + if (expressionsPlugin) { + expressionsPlugin.initExpressions(this); + } + this.loadNextSegment(); +}; + +AnimationItem.prototype.loadNextSegment = function () { + var segments = this.animationData.segments; + if (!segments || segments.length === 0 || !this.autoloadSegments) { + this.trigger('data_ready'); + this.timeCompleted = this.totalFrames; + return; + } + var segment = segments.shift(); + this.timeCompleted = segment.time * this.frameRate; + var segmentPath = this.path + this.fileName + '_' + this.segmentPos + '.json'; + this.segmentPos += 1; + dataManager.loadData(segmentPath, this.includeLayers.bind(this), function () { + this.trigger('data_failed'); + }.bind(this)); +}; + +AnimationItem.prototype.loadSegments = function () { + var segments = this.animationData.segments; + if (!segments) { + this.timeCompleted = this.totalFrames; + } + this.loadNextSegment(); +}; + +AnimationItem.prototype.imagesLoaded = function () { + this.trigger('loaded_images'); + this.checkLoaded(); +}; + +AnimationItem.prototype.preloadImages = function () { + this.imagePreloader.setAssetsPath(this.assetsPath); + this.imagePreloader.setPath(this.path); + this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this)); +}; + +AnimationItem.prototype.configAnimation = function (animData, isNetLoad) { + if (isNetLoad != undefined) { + this.isNetLoad = isNetLoad + } + if (!this.renderer) { + return; + } + try { + this.animationData = animData; + this.renderer.configAnimation(animData); + if (!animData.assets) { + animData.assets = []; + } + + this.assets = this.animationData.assets; + if(!this.animationData.fr || this.animationData.fr <= 0) { + this.frameRate = 10; + LogUtil.warn(`${this._getLogTag()} with 0 fr. use ${this.frameRate} instead.`); + } else { + this.frameRate = this.animationData.fr; + } + this.frameMult = this.frameRate / 1000; + this.renderer.searchExtraCompositions(animData.assets); + this.markers = markerParser(animData.markers || []); + + this.trigger('config_ready', this); + this.preloadImages(); + this.loadSegments(); + this.updateFrameModifier(); + this.waitForFontsLoaded(); + if (this.isPaused) { + this.audioController.pause(); + } + + if (this.initialSegment) { + this.setSegment(this.initialSegment[0], this.initialSegment[1]); + } else { + this.setSegment(this.animationData.ip, this.animationData.op); + } + + } catch (error) { + LogUtil.warn(`${this._getLogTag()} exception in configAnimation: ${error.message} , ${error.stack}`); + this.triggerConfigError(error); + } +}; + +AnimationItem.prototype.waitForFontsLoaded = function () { + if (!this.renderer) { + return; + } + if (this.renderer.globalData.fontManager.isLoaded) { + this.checkLoaded(); + } else { + setTimeout(this.waitForFontsLoaded.bind(this), 20); + } +}; + +AnimationItem.prototype.checkLoaded = function () { + if (!this.renderer) { + return; + } + if (!this.isLoaded + && this.renderer.globalData.fontManager.isLoaded + && (this.imagePreloader.loadedImages() || this.renderer.rendererType !== 'canvas') + && (this.imagePreloader.loadedFootages()) + ) { + this.isLoaded = true; + var expressionsPlugin = getExpressionsPlugin(); + if (expressionsPlugin) { + expressionsPlugin.initExpressions(this); + } + this.renderer.initItems(); + setTimeout(function() { + this.trigger('DOMLoaded', this); + }.bind(this), 0); + + LogUtil.info(`${this._getLogTag()} created from ${this.source ? this.source : 'data'}`); + + if (this.autoplay) { + this.isFirstLoaded = true; + if (!this._isCanvasStatusDeterminate) { + LogUtil.warn(`${this._getLogTag()} playing with indeterminate canvas(${this.wrapper?.canvas?.getUniqueId()}) status.`); + } + this.play(); + } else { + this.gotoCurrentFrame(); + } + } +}; + +AnimationItem.prototype.setContentMode = function (contentMode) { + //防止this.renderer为null,导致读取updateContentMode属性失败 + if (!!this.renderer && contentMode) { + LogUtil.info(`${this._getLogTag()} setContentMode: ${contentMode}`); + this.renderer.updateContentMode(contentMode); + } +}; + +/* + * 注意:这里虽然叫setFrameRate, 但本质是为了设置"播放帧率", 而不是动画源帧率. 动画源帧率是固定值. + */ +AnimationItem.prototype.setFrameRate = function (playingFrameRate) { + LogUtil.info(`${this._getLogTag()} setFrameRate: ${playingFrameRate}`); + + this.userPlayingFrameRate = playingFrameRate; +}; + +/* + * 注意:这里虽然叫getFrameRate, 但本质是为了获取"播放帧率", 而不是动画源帧率. 在获取动画源帧率时不可调用此接口. + * 此处保持与setFrameRate命名风格一致是为了保持对称. 由于setFrameRate接口已经开出去了, 不能再更改. + */ +AnimationItem.prototype.getFrameRate = function () { + if (this.userPlayingFrameRate > 0 && this.userPlayingFrameRate <= 120) { + return this.userPlayingFrameRate; + } else { + return this.frameRate; + } +} + +AnimationItem.prototype.resize = function (width, height) { + // Adding this validation for backwards compatibility in case an event object was being passed down + let _width = typeof width === 'number' ? width : undefined; + let _height = typeof height === 'number' ? height : undefined; + + //防止this.renderer为null,导致读取updateContainerSize属性失败 + if (!!this.renderer && !!this.renderer.updateContainerSize) { + this.renderer.updateContainerSize(_width, _height); + } +}; + +AnimationItem.prototype.setSubframe = function (flag) { + LogUtil.info(`${this._getLogTag()} setSubframe: ${flag}`); + + this.isSubframeEnabled = !!flag; +}; + +AnimationItem.prototype.gotoCurrentFrame = function (skipOverdraw) { + + if (this.timeCompleted !== this.totalFrames && this.absoluteFrameToPlay > this.timeCompleted) { + this.absoluteFrameToPlay = this.timeCompleted; + } + + if (!skipOverdraw || this._absoluteFramePlayed !== this.absoluteFrameToPlay) { + if (this.renderCurrentFrame()) { + this._absoluteFramePlayed = this.absoluteFrameToPlay; + return true; + } + } + + return false; +}; + +AnimationItem.prototype.changeColor = function (color, endColor, layer, index) { + if (!this.renderer) { + return; + } + LogUtil.info(`${this._getLogTag()} changeColor: ${color}-${endColor}, ${layer} layer, ${index} element`); + + try { + this.renderer.changeColor(color, endColor, layer, index); + this.renderer.renderFrame(this.absoluteFrameToPlay, true); + this.gotoCurrentFrame(false); + } catch (error) { + LogUtil.warn(`${this._getLogTag()} exception in changeColor: ${error.message}`); + // TODO: decide how to handle catch case + } +} + +AnimationItem.prototype.renderCurrentFrame = function () { + if (this.isLoaded === false || !this.renderer) { + return false; + } + + let frameToPlay = this.isSubframeEnabled ? this.absoluteFrameToPlay: Math.floor(this.absoluteFrameToPlay); + try { + this.trigger('enterFrame'); + this.renderer.renderFrame(frameToPlay); + this.trigger('drawnFrame'); + } catch (error) { + LogUtil.warn(`${this._getLogTag()} exception in renderCurrentFrame: ${error.message} , ${error.stack}`); + this.triggerRenderFrameError(error); + return false; + } + + return true; +}; + +AnimationItem.prototype._updateIdleStatus = function () { + if (this.isPaused || (!this._hasArea && this.isAutoSkip)) { + if (!this._idle) { + this._idle = true; + this.trigger('_idle', this); + } + } else { + if (this._idle) { + this._idle = false; + this.trigger('_active', this); + } + } +}; + +AnimationItem.prototype._visibleAreaChanged = function (canvasUniqueId, isVisible) { + let hasArea = this._hasArea; + this._hasArea = isVisible; + if (hasArea !== this._hasArea) { + LogUtil.info(`${this._getLogTag()} canvas(${canvasUniqueId}) is ${isVisible ? 'moved in' : 'moved out'}`); + this._updateIdleStatus(); + } +}; + +AnimationItem.prototype.play = function (name) { + if (name && this.name !== name) { + return; + } + LogUtil.info(`${this._getLogTag()} play: ${this.isPaused ? 'paused' : 'playing'}`); + + if (this.isPaused === true) { + this.isPaused = false; + this.lastTimestamp = 0; //此处赋值不可省掉,它决定了时间是否暂停 + this.trigger('_play'); + LogUtil.info(`${this._getLogTag()} is playing`); + this.audioController.resume(); + this._updateIdleStatus(); + } +}; + +AnimationItem.prototype.pause = function (name) { + if (name && this.name !== name) { + return; + } + LogUtil.info(`${this._getLogTag()} pause: ${this.isPaused ? 'paused' : 'playing'}`); + + if (this.isPaused === false) { + this.isPaused = true; + this.trigger('_pause'); + LogUtil.info(`${this._getLogTag()} is paused`); + this._updateIdleStatus(); + this.audioController.pause(); + } +}; + +AnimationItem.prototype.togglePause = function (name) { + if (name && this.name !== name) { + return; + } + LogUtil.info(`${this._getLogTag()} togglePause: ${this.isPaused ? 'paused' : 'playing'}`); + if (this.isPaused === true) { + this.play(); + } else { + this.pause(); + } +}; + +AnimationItem.prototype.getNextFrameToPlay = function (frames) { + if(frames < 0) { + frames = -frames; + } + + let nextFrame = frames; + if((this._direction > 0 && this.firstFrame > this.endFrame) // 逆序segment且正向播放 + || (this._direction < 0 && this.firstFrame < this.endFrame)) { // 正序segment且逆向播放 + //改为用大值(初始值)作为起点 + nextFrame = this.totalFrames - 1 - frames; + } + + return nextFrame; +}; + +AnimationItem.prototype._complete = function (name, explicitly) { + if (name && this.name !== name) { + return; + } + + this.pause(); + LogUtil.info(`${this._getLogTag()} completed${explicitly ? ' explicitly' : + ''}. playing ${this.playCount} times`); + // 如果是人工干预停止, 则不触发事件回调,保持与旧版本逻辑相同 + if (!explicitly) { + this.trigger('complete'); + } + this.playCount = 0; +}; + +AnimationItem.prototype.stop = function (name) { + if (name && this.name !== name) { + return; + } + + LogUtil.info(`${this._getLogTag()} stop: ${this.isPaused ? 'paused' : 'playing'}`); + let nextFrame = this.getNextFrameToPlay(0); + this.gotoRelativeFrame(nextFrame); + this._complete(name, true); +}; + +AnimationItem.prototype.getMarkerData = function (markerName) { + var marker; + for (var i = 0; i < this.markers.length; i += 1) { + marker = this.markers[i]; + if (marker.payload && marker.payload.name === markerName) { + return marker; + } + } + return null; +}; + +AnimationItem.prototype.goToAndStop = function (framesOrMarker, isFrame, name) { + if (name && this.name !== name) { + return; + } + LogUtil.info(`${this._getLogTag()} goToAndStop: ${framesOrMarker} ${isFrame ? 'frame' : 'ms(or marker)'} ${name ? name : ''}`); + + if (Number.isNaN(framesOrMarker)) { + LogUtil.info(`${this._getLogTag()} goToAndStop: frame is NaN`); + return; + } + + if (isFrame) { + let nextFrame = this.getNextFrameToPlay(framesOrMarker); + this.goToFrame(nextFrame); + } else { + let numValue = Number(framesOrMarker); + if (isNaN(numValue)) { + let marker = this.getMarkerData(framesOrMarker); + if (marker) { + this.playCount = 0; + if (!marker.duration) { + let nextFrame = this.adjustSegment([marker.time, this.animationData.op]); + this.goToFrame(nextFrame); + } else { + let nextFrame = this.adjustSegment([marker.time, marker.time + marker.duration]); + this.goToFrame(nextFrame); + } + } + } else { + let nextFrame = this.getNextFrameToPlay(framesOrMarker * this.frameModifier); + this.goToFrame(nextFrame); + } + } + + this.pause(); +}; + +AnimationItem.prototype.goToAndPlay = function (framesOrMarker, isFrame, name) { + if (name && this.name !== name) { + return; + } + LogUtil.info(`${this._getLogTag()} goToAndPlay: ${framesOrMarker} ${isFrame ? 'frame' : + 'ms(or marker)'} ${name ? name : ''}`); + + if (Number.isNaN(framesOrMarker)) { + this.goToAndStop(this.firstFrame, isFrame, name); + } else { + this.goToAndStop(framesOrMarker, isFrame, name); + } + + this.play(); +}; + +AnimationItem.prototype.resume = function (timeStamp, displaySynced) { + if (this.isPaused === true || this.isLoaded === false) { + this.lastTimestamp = timeStamp; + return; + } else if (!this._hasArea && this.isAutoSkip) { //canvas完全隐藏且用户不要求强行绘制时,跳过执行绘制。 + return; + } + + if(displaySynced && this.isFirstLoaded) { + /* + * 刚刚加载完动画后,displaySync首帧的timestamp还是加载动画之前的vsync所携带的时间戳,在动画解析时间过长的场景下该timestamp会过早从而引起跳帧。 + * 比如解析30fps动画,假设需要210ms,则时间戳会提前210ms左右,导致绘制逻辑计算后会跳过7帧。 + * 通过简单跳过并直接绘制首帧来workaround。最终表现为首帧会多显示2个左右的周期。 + * TODO: 如果能够将负载卸载到其它线程,降低主线程负载,则可将此逻辑优化掉,否则需要保留,以便保证从首帧开始播放 + */ + LogUtil.info(`${this._getLogTag()} first play.`); + this.isFirstLoaded = false; + this.lastTimestamp = 0; + this.advanceTime(0); // 播放当前帧 + return; + } + + if (this.lastTimestamp === 0) { + LogUtil.info(`${this._getLogTag()} start for drawing.`); + this.advanceTime(0); // 播放当前帧 + } else { + let elapsedTime = timeStamp - this.lastTimestamp; // displaySync.onframe回调处理会保证timeStamp单调性,不受设备时间调整的影响 + + this.advanceTime(elapsedTime); + } + this.lastTimestamp = timeStamp; +} + +AnimationItem.prototype.advanceTime = function (elapsedTime) { + let nextFrame = this.absoluteFrameToRelative(this.absoluteFrameToPlay) + elapsedTime * this.frameModifier; + if (nextFrame >= this.totalFrames || nextFrame < 0) { + let frames = nextFrame; + if(nextFrame < 0) { + frames = -nextFrame + this.totalFrames; + } + + let loop = true; + while (frames >= this.totalFrames && loop) { + frames -= this.totalFrames; + loop = this.checkLoop(); + } + + if(!loop) { + frames = this.totalFrames - 1; + } + nextFrame = this.getNextFrameToPlay(frames); + } + + this.gotoRelativeFrame(nextFrame); +}; + +/* + * 在前后台切换场景下,会出现时间戳跳变的情况。 + * 此时需要计算出正确的下一帧,并更新playCount次数 + */ +AnimationItem.prototype.checkLoop = function () { + if ( this.checkSegments() !== -1 ) { + return true; + } + + this.playCount += 1; + + // total playing 1 times when this.loop = 0, 2 times when loop = 1, 3 times when loop = 2, and so on. + if (this.loop === true || this.playCount <= this.loop) { + this.trigger('loopComplete'); + let currentTimestamp = Date.now(); + if ((currentTimestamp - this._firstTime) > this._loopCompleteTime) { + this._firstTime = currentTimestamp; + LogUtil.info(`${this._getLogTag()} loopComplete name: ${this.name} from ${this.source}, canvas uniqueId is: ${this.wrapper?.canvas?.getUniqueId()}`); + this.renderer?.updateContainerSize(undefined, undefined, true); + } + return true; + } else { + //达到预期参数, 正常播放完成. 停留在最后一个segment上。TODO 可考虑从第1个segment重新开始。这需要不从segments序列中清除segment,并把segmentPos变量利用起来, + setTimeout(() => { + this._complete(); + }, 0); + } + + return false; +}; + +AnimationItem.prototype.adjustSegment = function (arr) { + let nextFrame = -1; + if(arr[0] === arr[1]) { + // 区间为左闭右开,因此相同左右值意味着没有可用帧,直接返回无效帧 + return nextFrame; + } + + if (arr[1] < arr[0]) { + this.totalFrames = arr[0] - arr[1]; + this.offsetFrame = arr[1] + 1; // 从大到小播放时,小值作为目的帧需要被排除, 而大值需被包含,整体偏移1帧保证"左闭右开"区间 + } else { + this.totalFrames = arr[1] - arr[0]; + this.offsetFrame = arr[0]; + } + + this.timeCompleted = this.totalFrames; + this.firstFrame = arr[0]; + this.endFrame = arr[1]; + this.updateFrameModifier(); + + nextFrame = this.getNextFrameToPlay(0); + + this.trigger('segmentStart'); + return nextFrame; +}; + +AnimationItem.prototype.setSegment = function (init, end) { + LogUtil.info(`${this._getLogTag()} setSegment: ${init} ~ ${end}`); + let nextFrame = this.adjustSegment([init, end]); + this.gotoRelativeFrame(nextFrame); +}; + +AnimationItem.prototype.playSegments = function (arr, forceFlag) { + LogUtil.info(`${this._getLogTag()} playSegments: ${arr}, ${forceFlag ? 'immediate' : 'deferred'}`); + + if (forceFlag) { + this.segments.length = 0; + } + let segmentAvailable = false; + if (typeof arr[0] === 'object') { // [ [x,x], [x,x], ...] + for (let i = 0; i < arr.length; i += 1) { + if (arr[i].length >= 2) { + this.segments.push(arr[i]); + segmentAvailable = true; + } + } + } else { // [x,x] + if (arr.length >= 2) { + this.segments.push(arr); + segmentAvailable = true; + } + } + + if(!segmentAvailable) { + return; + } + + if (forceFlag) { + this.playCount = 0; //replay + let nextFrame = this.checkSegments(); + this.gotoRelativeFrame(nextFrame); + } + + if (this.isPaused) { + this.play(); + } +}; + +AnimationItem.prototype.resetSegments = function (forceFlag) { + LogUtil.info(`${this._getLogTag()} resetSegments: ${forceFlag ? 'immediate' : 'deferred'}`); + + this.segments.length = 0; + this.segments.push([this.animationData.ip, this.animationData.op]); + if (forceFlag) { + this.playCount = 0; //replay + let nextFrame = this.checkSegments(); + this.gotoRelativeFrame(nextFrame); + } +}; + +AnimationItem.prototype.checkSegments = function () { + let nextFrame = -1; + while (this.segments.length) { + nextFrame = this.adjustSegment(this.segments.shift()) + if(nextFrame !== -1) { + break; + } + // 跳过空片段 + } + return nextFrame; +}; + +AnimationItem.prototype.destroy = function (name) { + if (name && this.name !== name) { + return; + } + LogUtil.info(`${this._getLogTag()} destroy${name ? name : + ''}, canvas uniqueId: ${this.wrapper?.canvas?.getUniqueId()}`); + LogUtil.version(); + this.stop() // stop the animation because it is dying + if (this.renderer) { + this.renderer.destroy(); + this.renderer = null; + } + if (this.imagePreloader) { + this.imagePreloader.destroy(); + this.imagePreloader = null; + } + this.trigger('destroy'); + this._cbs = null; + this.onEnterFrame = null; + this.onLoopComplete = null; + this.onComplete = null; + this.onSegmentStart = null; + this.onDestroy = null; + this.projectInterface = null; +}; + +AnimationItem.prototype.relativeFrameToAbsolute = function (relativeFrame) { + return relativeFrame + this.offsetFrame; +}; + +AnimationItem.prototype.absoluteFrameToRelative = function (absoluteFrame) { + return absoluteFrame - this.offsetFrame; +}; + +AnimationItem.prototype.gotoRelativeFrame = function (nextValue) { + let nextFrame; + if (this.totalFrames === nextValue) { + nextFrame = nextValue; + } else { + nextFrame = nextValue % this.totalFrames; + } + + if (nextFrame < 0) { + nextFrame += this.totalFrames; + } + + this.absoluteFrameToPlay = this.relativeFrameToAbsolute(nextFrame); + this.gotoCurrentFrame(true); +}; + +AnimationItem.prototype.goToFrame = function (nextValue) { + let nextFrame = nextValue; + if (nextFrame < 0) { + nextFrame += this.totalFrames; + } + + this.absoluteFrameToPlay = this.relativeFrameToAbsolute(nextFrame); + this.gotoCurrentFrame(true); +}; + +AnimationItem.prototype.setSpeed = function (val) { + LogUtil.info(`${this._getLogTag()} setSpeed: ${val}`); + if (val === 0) { + this.pause(); // 参考 index.d.ts setSpeed的对外声明:speed>0正向播放, speed<0反向播放, speed=0暂停播放, speed=1.0/-1.0正常速度播放 + return; + } + + if (val > 0) { + this.setDirection(1); + } else { + this.setDirection(-1); + } + + let speed = Math.abs(val); // 参考 index.d.ts playSpeed的对外声明:播放速率 + if (this._speed !== speed) { + this._speed = speed; + this.updateFrameModifier(); + } +}; + +AnimationItem.prototype.setDirection = function (val) { + let direction = val < 0 ? -1 : 1; + if(this._direction !== direction) { + LogUtil.info(`${this._getLogTag()} setDirection: ${val}`); + + this._direction = direction; + this.updateFrameModifier(); + } +}; + +AnimationItem.prototype.toggleDirection = function () { + LogUtil.info(`${this._getLogTag()} toggleDirection. current is ${this._direction}`); + this._direction = -this._direction; + this.updateFrameModifier(); +}; + +AnimationItem.prototype.setLoop = function (isLooping) { + this.loop = isLooping; +}; + +AnimationItem.prototype.setVolume = function (val, name) { + if (name && this.name !== name) { + return; + } + this.audioController.setVolume(val); +}; + +AnimationItem.prototype.getVolume = function () { + return this.audioController.getVolume(); +}; + +AnimationItem.prototype.mute = function (name) { + if (name && this.name !== name) { + return; + } + LogUtil.info(`${this._getLogTag()} mute: ${name ? name : ''}`); + + this.audioController.mute(); +}; + +AnimationItem.prototype.unmute = function (name) { + if (name && this.name !== name) { + return; + } + LogUtil.info(`${this._getLogTag()} unmute: ${name ? name : ''}`); + + this.audioController.unmute(); +}; + +AnimationItem.prototype.updateFrameModifier = function () { + let direction = 1; + if (this.firstFrame > this.endFrame) { + direction = this._direction > 0 ? -1 : 1; //由大到小播放时,正向需要用负值,反向需要正值 + } else { + direction = this._direction > 0 ? 1 : -1; + } + + let modifier = this._speed * direction; + this.frameModifier = this.frameMult * modifier; + this.audioController.setRate(modifier); +}; + +AnimationItem.prototype.getPath = function () { + return this.path; +}; + +AnimationItem.prototype.getAssetsPath = function (assetData) { + var path = ''; + if (assetData.e) { + path = assetData.p; + } else if (this.assetsPath) { + var imagePath = assetData.p; + if (imagePath.indexOf('images/') !== -1) { + imagePath = imagePath.split('/')[1]; + } + path = this.assetsPath + imagePath; + } else { + path = this.path; + path += assetData.u ? assetData.u : ''; + path += assetData.p; + } + return path; +}; + +AnimationItem.prototype.getAssetData = function (id) { + var i = 0; + var len = this.assets.length; + while (i < len) { + if (id === this.assets[i].id) { + return this.assets[i]; + } + i += 1; + } + return null; +}; + +AnimationItem.prototype.hide = function () { + LogUtil.info(`${this._getLogTag()} hide.`); + if (!this.renderer) { + return; + } + this.renderer.hide(); +}; + +AnimationItem.prototype.show = function () { + LogUtil.info(`${this._getLogTag()} show.`); + if (!this.renderer) { + return; + } + this.renderer.show(); +}; + +AnimationItem.prototype.getDuration = function (isFrame) { + let duration = isFrame ? this.totalFrames : this.totalFrames / this.frameRate; + LogUtil.info(`${this._getLogTag()} getDuration: total ${duration} ${isFrame ? 'frames' : 's'}`); + return duration; +}; + +AnimationItem.prototype.updateDocumentData = function (path, documentData, index) { + if (!this.renderer) { + return; + } + try { + var element = this.renderer.getElementByPath(path); + element.updateDocumentData(documentData, index); + } catch (error) { + LogUtil.warn(`${this._getLogTag()} exception in updateDocumentData: ${error.message}`); + // TODO: decide how to handle catch case + } +}; + +AnimationItem.prototype.trigger = function (name, args) { + if (this._cbs && this._cbs[name]) { + switch (name) { + case 'enterFrame': + this.triggerEvent(name, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameModifier)); + break; + case 'drawnFrame': + this.drawnFrameEvent.currentTime = this.currentFrame; + this.drawnFrameEvent.totalTime = this.totalFrames; + this.drawnFrameEvent.direction = this.frameModifier; + this.triggerEvent(name, this.drawnFrameEvent); + break; + case 'loopComplete': + this.triggerEvent(name, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult)); + break; + case 'complete': + this.triggerEvent(name, new BMCompleteEvent(name, this.frameMult)); + break; + case 'segmentStart': + this.triggerEvent(name, new BMSegmentStartEvent(name, this.offsetFrame, this.totalFrames)); + break; + case 'destroy': + this.triggerEvent(name, new BMDestroyEvent(name, this)); + break; + default: + this.triggerEvent(name, args); + } + } + if (name === 'enterFrame' && this.onEnterFrame) { + this.onEnterFrame.call(this, new BMEnterFrameEvent(name, this.currentFrame, this.totalFrames, this.frameMult)); + } + if (name === 'loopComplete' && this.onLoopComplete) { + this.onLoopComplete.call(this, new BMCompleteLoopEvent(name, this.loop, this.playCount, this.frameMult)); + } + if (name === 'complete' && this.onComplete) { + this.onComplete.call(this, new BMCompleteEvent(name, this.frameMult)); + } + if (name === 'segmentStart' && this.onSegmentStart) { + this.onSegmentStart.call(this, new BMSegmentStartEvent(name, this.offsetFrame, this.totalFrames)); + } + if (name === 'destroy' && this.onDestroy) { + this.onDestroy.call(this, new BMDestroyEvent(name, this)); + } +}; + +AnimationItem.prototype.triggerRenderFrameError = function (nativeError) { + var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame); + this.triggerEvent('error', error); + + if (this.onError) { + this.onError.call(this, error); + } + LogUtil.error(`${this._getLogTag()} triggerRenderFrameError: ${JSON.stringify(error)}`); +}; + +AnimationItem.prototype.triggerConfigError = function (nativeError) { + var error = new BMConfigErrorEvent(nativeError, this.currentFrame); + this.triggerEvent('error', error); + + if (this.onError) { + this.onError.call(this, error); + } + LogUtil.error(`${this._getLogTag()} triggerConfigError: ${JSON.stringify(error)}`); +}; + +export default AnimationItem; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/animation/AnimationManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/animation/AnimationManager.js new file mode 100644 index 0000000000000000000000000000000000000000..ddbef4188af614bc2922ff59b879a85e7ff1b9f5 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/animation/AnimationManager.js @@ -0,0 +1,1486 @@ +import createTag from '../utils/helpers/html_elements'; +import AnimationItem from './AnimationItem'; +import displaySync from '@ohos.graphics.displaySync' +import animator from '@ohos.animator'; +import fs from '@ohos.file.fs'; +import bez from '../utils/bez'; +import { LogUtil } from '../utils/LogUtil' +import deviceInfo from '@ohos.deviceInfo'; +import { isExistNetworkAssets } from '../utils/DataUtil'; +import { unlinkSync, unlink, rmdirSync, listFileSyncs } from '../utils/FileUtil' + +let _nextIdInCoordinator = 0; +const Coordinator = function() { + this._context2dShadows = new WeakMap(); + this._context2dCallbacks = new WeakMap(); + this._canvasShadows = new WeakMap(); +}; + +Coordinator.prototype._getLogTag = function() { + return ''; +}; + +Coordinator.prototype._getOrCreateCanvasShadow = function(canvas) { + if (!canvas) { + return {}; + } + let canvasShadow = this._canvasShadows.get(canvas); + if (canvasShadow) { + return canvasShadow; + } + canvasShadow = { + canvas, // G.OBJ.03 推荐在对象字面量中使用方法简写和属性简写 + status: { + hasArea: undefined, + }, + context2dShadow: undefined, + }; + this._canvasShadows.set(canvas, canvasShadow); + + // 以下2个接口未支持链式调用, 此处注册有可能会覆盖此前其它处理逻辑所注册的处理逻辑. 当然其它处理逻辑也可能影响coordinator的行为. + // 应避免不同的处理逻辑同时针对同一个canvas节点进行注册. 此处输出日志便于维测. + LogUtil.warn(`${this._getLogTag()} coordinator register canvas(${canvas.getUniqueId()}) callbacks.`); + canvas.commonEvent.setOnVisibleAreaApproximateChange( + { ratios: [0], expectedUpdateInterval: 500 }, + this._onVisibleAreaApproximateChange.bind(this, canvas)); + + return canvasShadow; +}; + +Coordinator.prototype._isNodeAndAncestorVisible = function (node) { + if (!node) { + return false; + } + + let isVisible = node.isVisible(); + let parent = node.getParent(); + while (parent && isVisible) { + isVisible = parent.isVisible(); + parent = parent.getParent(); + } + return isVisible; +}; + +Coordinator.prototype._notifyAnimationCanvasHasArea = function (animation, hasArea, context2dShadow) { + /* + * 影子数据的构建是依赖各种回调被依次调用,才能逐步完成. 在被构建出来之前, 存在 canvas 状态未知的情形 + */ + if (!animation) { + return; + } + + let canvas = context2dShadow.canvasShadow?.canvas; + let canvasUniqueId = canvas?.getUniqueId(); + let _hasArea = hasArea; + if (_hasArea !== true && _hasArea !== false) { + // canvas节点可见性状态未知, 此时canvas可能早已创建过, 也可能刚刚开始创建, 通过获取一次当前状态进行辅助判断 + let isAttached = canvas?.isAttached(); + let isVisible = this._isNodeAndAncestorVisible(canvas); + LogUtil.warn(`${this._getLogTag()} canvas(${canvasUniqueId}) is ${isAttached ? 'attached to' : + 'detached from'} UItree and ${isVisible ? 'visible' : 'invisible'}`); + if (!isAttached || !isVisible) { + _hasArea = false; + } else if (context2dShadow.option.preferredNoArea) { + LogUtil.info(`${this._getLogTag()} regard canvas(${canvasUniqueId}) as no visible area.`); + _hasArea = false; + } + } + + if (_hasArea === true || _hasArea === false) { + animation.onCanvasHasVisibleArea(canvasUniqueId, _hasArea); + } else { + // 即便canvas是在树上且visible, 也不意味着节点是具备可见面积的, 为保持前向兼容, 此时不对animation做主动通知 + LogUtil.warn(`${this._getLogTag()} do NOT notify animation(${animation.animationID}) for indeterminate canvas(${canvasUniqueId}) status.`); + } +}; + +Coordinator.prototype._onVisibleAreaApproximateChange = function(canvas, isVisible) { + let uniqueId = canvas?.getUniqueId(); + LogUtil.info(`${this._getLogTag()} canvas(${uniqueId}) visible area changed to ${isVisible}.`); + if (!canvas) { + return; + } + let canvasShadow = this._getOrCreateCanvasShadow(canvas); + canvasShadow.status.hasArea = isVisible; + + this._notifyAnimationCanvasHasArea(canvasShadow.context2dShadow?.animation, isVisible, + canvasShadow.context2dShadow); +}; + +Coordinator.prototype._onContext2dAttachedToCanvas = function (context2d) { + if (!context2d) { + return; + } + let { canvas } = context2d; + let canvasUniqueId = canvas?.getUniqueId(); + let context2dShadow = this._context2dShadows.get(context2d); + LogUtil.info(`${this._getLogTag()} context2d(${context2dShadow?._id}) attached to canvas(${canvasUniqueId})`); + if (!canvas) { + return; + } + let canvasShadow = this._getOrCreateCanvasShadow(canvas); + canvasShadow.context2dShadow = context2dShadow; + + if (context2dShadow?.canvasShadow !== canvasShadow) { + context2dShadow.canvasShadow = canvasShadow; + } else { + LogUtil.warn(`${this._getLogTag()} context2d(${context2dShadow?._id}) already attached to the same canvas(${canvasUniqueId}).`); + } + + this._onVisibleAreaApproximateChange(canvasShadow.canvas, canvasShadow.status.hasArea); +}; + +Coordinator.prototype._onContext2dDetachedFromCanvas = function (context2d) { + if (!context2d) { + return; + } + let context2dShadow = this._context2dShadows.get(context2d); + let canvas = context2dShadow?.canvasShadow?.canvas; + let canvasUniqueId = canvas?.getUniqueId(); + LogUtil.info(`${this._getLogTag()} context2d(${context2dShadow?._id}) detached from canvas(${canvasUniqueId})`); + + this._notifyAnimationCanvasHasArea(context2dShadow?.animation, false, context2dShadow); + + if (canvas) { + let canvasShadow = this._getOrCreateCanvasShadow(canvas); + if (canvasShadow) { + canvasShadow.context2dShadow = null; + } + } + + if (context2dShadow) { + context2dShadow.canvasShadow = null; // null:确定解绑, undefined:不确定是否绑定 + } +}; + +Coordinator.prototype._getOrCreateContext2dCallback = function (context2d) { + if (!context2d) { + return {}; + } + let callbacks = this._context2dCallbacks.get(context2d); + if (!callbacks) { + // _onContext2dAttachedToCanvas 需要一个额外的context2d作为参数, 需通过bind传递进去 + callbacks = { + onContext2dAttachedToCanvas: this._onContext2dAttachedToCanvas.bind(this, context2d), + onContext2dDetachedFromCanvas: this._onContext2dDetachedFromCanvas.bind(this, context2d), + }; + this._context2dCallbacks.set(context2d, callbacks); + } + return callbacks; +}; + +Coordinator.prototype.setAttachedCanvasHasVisibleArea = function(context2d, hasArea) { + if (!context2d) { + return; + } + let context2dShadow = this._context2dShadows.get(context2d); + if (!context2dShadow) { + LogUtil.warn(`${this._getLogTag()} context2d has not yet bound to coordinator.`); + return; + } + + let canvas = context2dShadow.canvasShadow?.canvas; + if (canvas) { + LogUtil.info(`${this._getLogTag()} fix visible area of canvas(${canvas.getUniqueId()})` + + ` attached to context2d(${context2dShadow._id}) to ${hasArea}`); + this._onVisibleAreaApproximateChange(canvas, hasArea); + } else { + LogUtil.warn(`${this._getLogTag()} context2d(${context2dShadow._id}) has no canvas attached.`); + } +}; + +Coordinator.prototype.isContext2dBoundToCoordinator = function (context2d) { + if (!context2d) { + return false; + } + return this._context2dShadows.has(context2d); +}; + +Coordinator.prototype.bindContext2dToCoordinator = function(context2d) { + if (!context2d) { + return; + } + let context2dShadow = this._context2dShadows.get(context2d); + if (context2dShadow) { + LogUtil.info(`${this._getLogTag()} context2d(${context2dShadow._id}) already attached to coordinator.`); + context2dShadow.option.preferredNoArea = true; + return; + } + this.internalBindContext2dToCoordinator(context2d, true); +}; + +Coordinator.prototype.internalBindContext2dToCoordinator = function (context2d, preferredNoArea) { + if (deviceInfo.sdkApiVersion < 13 || !context2d?.on) { + // 影子数据强依赖context2d的on接口, 只有API 13+才具备. + LogUtil.error(`${this._getLogTag()} API level(${deviceInfo.sdkApiVersion}) is too low.`); + return; + } + + let context2dShadow = { + _id: _nextIdInCoordinator++, + context2d, + option: { + preferredNoArea, // G.OBJ.03 推荐在对象字面量中使用方法简写和属性简写 + }, + animation: undefined, // undefined:不确定是否绑定 + canvasShadow: undefined, // undefined:不确定是否绑定 + }; + this._context2dShadows.set(context2d, context2dShadow); + LogUtil.info(`${this._getLogTag()} bind context2d(${context2dShadow._id}) to coordinator${preferredNoArea ? + ' with no area preferred' : ''}.`); + + let callbacks = this._getOrCreateContext2dCallback(context2d); + context2d.on('onAttach', callbacks.onContext2dAttachedToCanvas); + context2d.on('onDetach', callbacks.onContext2dDetachedFromCanvas); + + let { canvas } = context2d; // G.MET.11 建议使用参数的解构 + if (canvas) { + /* 此时context2d有一个关联到的canvas. 它与context2d有可能是attached的, 也有可能是曾经attached过但又被detached了. + * 为避免误判造成本该活动而未活动, 此处视其为attached的canvas来处理, 并做一次必要的"补调" + */ + LogUtil.warn(`${this._getLogTag()} canvas(${canvas.getUniqueId()}) indeterminate attached or not, treat it as attached.`); + callbacks.onContext2dAttachedToCanvas(); + } else { + context2dShadow.canvasShadow = null; + } +}; + +Coordinator.prototype.unbindContext2dFromCoordinator = function (context2d) { + if (!context2d) { + return; + } + if (deviceInfo.sdkApiVersion < 13) { + // 影子数据强依赖context2d的on接口, 只有API 13+才具备. + LogUtil.error(`${this._getLogTag()} API level(${deviceInfo.sdkApiVersion}) is too low.`); + return; + } + + let context2dShadow = this._context2dShadows.get(context2d); + LogUtil.info(`${this._getLogTag()} unbind context2d(${context2dShadow?._id}) from coordinator`); + + if (!context2dShadow) { + return; + } + + let canvas = context2dShadow.canvasShadow?.canvas; + if (canvas) { + // 这里应该去解注册canvas上的回调, 但解注册接口存在bug, 再次注册时接口会失效. + // 考虑到canvas节点销毁时回调自然会被解掉, 故这里忽略相关的解注册处理, 直接清理cache. + this._canvasShadows.delete(canvas); + } + + let callbacks = this._context2dCallbacks.get(context2d); + if (callbacks && context2d?.off) { + context2d.off('onAttach', callbacks.onContext2dAttachedToCanvas); + context2d.off('onDetach', callbacks.onContext2dDetachedFromCanvas); + } + + this._context2dShadows.delete(context2d); +}; + +Coordinator.prototype.attachAnimationToContext2d = function (context2d, animation) { + if (!context2d) { + return; + } + let context2dShadow = this._context2dShadows.get(context2d); + if (!context2dShadow) { + LogUtil.warn(`${this._getLogTag()} context2d must be bound to coordinator firstly. `); + return; + } + + if (context2dShadow.animation === animation) { + LogUtil.warn(`${this._getLogTag()} animation(${animation?.animationID}) already attached to context2d(${context2dShadow._id}).`); + return; + } + + context2dShadow.animation = animation; + + let { canvasShadow } = context2dShadow; + if (canvasShadow) { + this._onVisibleAreaApproximateChange(canvasShadow.canvas, canvasShadow.status.hasArea); + } +}; + +Coordinator.prototype.detachAnimationFromContext2d = function (context2d) { + if (!context2d) { + return null; + } + let context2dShadow = this._context2dShadows.get(context2d); + if (!context2dShadow) { + return null; + } + + let { animation } = context2dShadow; // G.MET.11 建议使用参数的解构 + context2dShadow.animation = null; // null:确定解绑, undefined:不确定是否绑定 + + return animation; +}; + +/** + * isSkipFrameByOwn需要在初始化时给出, 不能在运行时动态改变. + * 若要支持动态改变, 需要做到动态去除displaysync的投票, 暂无合适接口. + * 销毁后重建displaysync是个可选项, 但涉及到各种状态管理过于复杂. + * 该场景并不常见, 故暂不实现. + **/ +const _DURATION_BY_MS_ = 20000; +const _ALLOWABLE_ERROR_BY_MS_ = 1.5; // timestamp的时间精度为1个ms, 故让容许误差稍大于该值 +const _LEAD_BY_MS_ = 5; // 提前post frameCallback 的时间, 该值不能太小以至于错过vsync, 也不宜太大导致帧率过高. +let _nextIdInLooper = 0; +const Looper = function(uiContext, animations, playFrameCallback, isSkipFrameByOwn) { + this._id = _nextIdInLooper++; + this._uiContext = uiContext; + this._animations = animations; + this._playingAnimationsNum = 0; + this._looperStopped = true; + this._playingFrameRate = 0; + this._looperType = null; + this._displaySync = null; + this._frameCallback = undefined; + this._frameCallbackPosted = 0; + this._animator = null; + this._monotonicTimeStampInMs = 0; + this._lastAnimatorProgress = 0; + this._lastOnFrameTs = 0; + this._lastPlayedFrameTs = 0; + this._expectedFrameTs = 0; + this._periodByMs = 0; + this._playFrameCallback = playFrameCallback; + this._setExpectedFrameRateRangeWrapper = null; + this._isSkipFrameByOwn = isSkipFrameByOwn; + this.__performance = { + lastTimestamp: 0, + frames: 0, + janks: 0, + maxPeriod: 0, + }; + + if (isSkipFrameByOwn) { + if (this._initFrameCallbackLooper()) { + // 主动跳帧时优选frameCallback + return; + } + } + + if (this._initDisplaySyncLooper()) { + return; + } + + // fallback to animator + this._initAnimatorLooper(); +}; + +Looper.prototype._getLogTag = function() { + if (this._uiContext?.getHostContext()?.abilityInfo?.name) { + return ``; + } else { + return ``; + } +}; + +Looper.prototype._skippingFrame = function (timestamp) { + if (this._periodByMs === 0) { + return false; + } + + let supplyingPeriod = 0; + if (this._lastOnFrameTs !== 0) { + supplyingPeriod = timestamp - this._lastOnFrameTs; + } + + let phaseOffset = this._expectedFrameTs - timestamp; + if ((phaseOffset < 0 && phaseOffset > -_ALLOWABLE_ERROR_BY_MS_) || + (phaseOffset > 0 && phaseOffset < _ALLOWABLE_ERROR_BY_MS_)) { + phaseOffset = 0; // 在容许误差范围内则忽略偏差 + } + + let halfPeriod = supplyingPeriod >> 1; + if (phaseOffset > (halfPeriod + _ALLOWABLE_ERROR_BY_MS_)) { + return true; // 偏差离当前vsync过大, 主动跳过本帧 + } + + // 计算下一帧时间戳. 注意js的取模运算与其它语言不同, 会出现负的余数 + this._expectedFrameTs = timestamp + phaseOffset % this._periodByMs + this._periodByMs; + + return false; +}; + +Looper.prototype._baseOnframe = function (timestamp, displaySynced) { + if (this._isSkipFrameByOwn && this._skippingFrame(timestamp)) { + return; + } + + this._playFrameCallback(this._uiContext, timestamp, displaySynced); + + this._performancePeriodically(timestamp); + + this._lastPlayedFrameTs = timestamp; +}; + +Looper.prototype._performancePeriodically = function (timestamp) { + let _DURATION_ = 2_000; // heartbeat every <_DURATION_>ms elapsed + + try { + this.__performance.frames++; + + let supplyingPeriod = timestamp - this._lastPlayedFrameTs; + if (supplyingPeriod > this._periodByMs + _ALLOWABLE_ERROR_BY_MS_ + _ALLOWABLE_ERROR_BY_MS_) { + this.__performance.janks++; + } + + if (supplyingPeriod > this.__performance.maxPeriod) { + this.__performance.maxPeriod = supplyingPeriod; + } + + let elapsedMs = timestamp - this.__performance.lastTimestamp; + if (elapsedMs > _DURATION_) { + this.__performance.frames = 0; + this.__performance.janks = 0; + this.__performance.maxPeriod = 0; + this.__performance.lastTimestamp = timestamp; + } + } catch (e) { + // do nothing. performing does NOT matter + } +}; + +Looper.prototype._baseFirst = function () { + this._monotonicTimeStampInMs = 0; + this._lastPlayedFrameTs = 0; + this._expectedFrameTs = 0; +}; + +Looper.prototype._baseSetExpectedFrameRateRange = function (playingFrameRate) { + LogUtil.info(`${this._getLogTag()} ${this._looperType} running at ${playingFrameRate} HZ`); + this._periodByMs = 1000 / playingFrameRate; + + if (!this._isSkipFrameByOwn) { + if (this._setExpectedFrameRateRangeWrapper) { + this._setExpectedFrameRateRangeWrapper({ min: 0, max: 120, expected: playingFrameRate }); + } else { + LogUtil.warn(`${this._getLogTag()} ${this._looperType} has no displaySync. no frame rate set.`); + } + } else { + // 不做投票, 避免拉低ui帧率 + } +}; + +Looper.prototype._initFrameCallbackLooper = function () { + let apiVersion = deviceInfo?.sdkApiVersion; + if (apiVersion >= 13 && this._uiContext) { + /* 尽管FrameCallback机制在API 12已支持, 但由于它所依赖的uiContext需要从context2d所关联的canvas节点中获取, + * 而API 13及以上才支持从context2d中获取canvas节点, 故只能在API 13及以上才可以使能frameCallback + */ + this._frameCallback = { + onFrame: (timestamp) => { + this._frameCallbackPosted--; // 每次进入回调均意味着消费掉1次frameCallback + + if (this._looperStopped) { + return; + } + + // 确保有且仅有1个frameCallback被post到管线上, 避免frameCallback堆积 + if (this._uiContext && this._frameCallbackPosted <= 0) { + this._uiContext.postDelayedFrameCallback(this._frameCallback, this._periodByMs - _LEAD_BY_MS_); + this._frameCallbackPosted++; + } + + this._lastOnFrameTs = this._monotonicTimeStampInMs; + this._monotonicTimeStampInMs = Math.floor(timestamp / 1000_000); + + this._baseOnframe(this._monotonicTimeStampInMs, true); + }, + }; + LogUtil.info(`${this._getLogTag()} frameCallback created.`); + + this._exportApiByFrameCallback(); + + return true; + } else { + LogUtil.warn(`${this._getLogTag()} api version(${apiVersion}) is too low. frameCallback is disabled.`); + } + + return false; +}; + +Looper.prototype._exportApiByFrameCallback = function() { + // 导出外部可调用方法(内部方法以"_"开头) + this._looperType = 'frameCallback'; + + this.first = function () { + this._baseFirst(); + LogUtil.info(`${this._getLogTag()} ${this._looperType} first`); + }; + + this.start = function () { + LogUtil.info(`${this._getLogTag()} ${this._looperType} start`); + if (this._uiContext) { + if (this._frameCallbackPosted <= 0) { + // 不能无条件post. 如果已有callback被posted, 再次post会造成frameCallback堆积导致高帧率 + this._uiContext.postFrameCallback(this._frameCallback); + this._frameCallbackPosted++; + } + this._looperStopped = false; + } else { + LogUtil.warn(`${this._getLogTag()} ${this._looperType} no uicontext, frameCallback could not work.`); + } + }; + + this.stop = function () { + LogUtil.info(`${this._getLogTag()} ${this._looperType} stop`); + this._looperStopped = true; + }; + + this.setExpectedFrameRateRange = function (playingFrameRate) { + this._baseSetExpectedFrameRateRange(playingFrameRate); + }; +}; + +Looper.prototype._initDisplaySyncLooper = function () { + try { + this._displaySync = displaySync.create(); + this._displaySync.on('frame', (frameInfo) => { + if (this._looperStopped) { + return; + } + + this._lastOnFrameTs = this._monotonicTimeStampInMs; + this._monotonicTimeStampInMs = Math.floor(frameInfo.timestamp / 1000_000); + + this._baseOnframe(this._monotonicTimeStampInMs, true); + }); + LogUtil.info(`${this._getLogTag()} displaySync created.`); + + this._exportApiByDisplaySync(); + + return true; + } catch (e) { + LogUtil.info(`${this._getLogTag()} no displaySync. API version(${deviceInfo?.sdkApiVersion}) may be too low: ${e.message}`); + } + + return false; +}; + +Looper.prototype._exportApiByDisplaySync = function() { + // 导出外部可调用方法(内部方法以"_"开头) + this._looperType = 'displaySync'; + + this.first = function () { + this._baseFirst(); + LogUtil.info(`${this._getLogTag()} ${this._looperType} first`); + }; + + this.start = function () { + if (this._uiContext.getHostContext() !== getContext()) { + LogUtil.warn(`${this._getLogTag()} ${this._looperType} could NOT start cause context not matched`); + return; + } + LogUtil.info(`${this._getLogTag()} ${this._looperType} start`); + this._displaySync.start(); + this._looperStopped = false; + }; + + this.stop = function () { + if (this._uiContext.getHostContext() !== getContext()) { + LogUtil.warn(`${this._getLogTag()} ${this._looperType} could NOT stop cause context not matched`); + return; + } + LogUtil.info(`${this._getLogTag()} ${this._looperType} stop`); + this._looperStopped = true; + this._displaySync.stop(); + }; + + this._setExpectedFrameRateRangeWrapper = this._displaySync.setExpectedFrameRateRange.bind(this._displaySync); + this.setExpectedFrameRateRange = function (playingFrameRate) { + this._baseSetExpectedFrameRateRange(playingFrameRate); + }; +}; + +Looper.prototype._initAnimatorLooper = function () { + let options = { + duration: _DURATION_BY_MS_, + easing: 'linear', + delay: 0, + fill: 'forwards', + direction: 'normal', + iterations: -1, + begin: 0, + end: 1 + }; + this._animator = animator.create(options); + this._registerCallbackForAnimator(); + LogUtil.info(`${this._getLogTag()} animator created.`); + + this._exportApiByAnimator(); + + return true; +}; + +Looper.prototype._registerCallbackForAnimator = function() { + let sdkApiVersion = deviceInfo?.sdkApiVersion; + + let oncancel = () => { + this._lastAnimatorProgress = 0; + LogUtil.info(`${this._getLogTag()} ${this._looperType} oncancel.`); + }; + if (sdkApiVersion >= 12) { + this._animator.onCancel = oncancel; + } else { + this._animator.oncancel = oncancel; + } + + let onfinish = () => { + this._lastAnimatorProgress = 0; + LogUtil.info(`${this._getLogTag()} ${this._looperType} onfinish.`); + }; + if (sdkApiVersion >= 12) { + this._animator.onFinish = onfinish; + } else { + this._animator.onfinish = onfinish; + } + + let onframe = (progress) => { + if (this._looperStopped) { + // animator.cancel -> onframe -> animator.oncancel + return; + } + // 在每一次帧动画回调时,忽略系统时间,仅以动画步进来计算下一次时间戳,避免时间调整引起的跳变 + let positiveProgress = progress - this._lastAnimatorProgress + 1; + let modularProgress = positiveProgress - (positiveProgress >>> 0); // 高效地取出小数部分, 相当于对1取模 + let step = (_DURATION_BY_MS_ * modularProgress) >>> 0; // Zero-fill right shift for truncation to integer + if (step > 0) { + if (step > this._periodByMs + _ALLOWABLE_ERROR_BY_MS_ + _ALLOWABLE_ERROR_BY_MS_) { + let logInfo = + `step(${step}) is too significant. progress(${progress + }), last progress(${this._lastAnimatorProgress + }), modular progress(${modularProgress + })`; + LogUtil.warn(`${this._getLogTag()} ${this._looperType} ${logInfo}`); + } + + this._lastOnFrameTs = this._monotonicTimeStampInMs; + this._monotonicTimeStampInMs += step; + this._lastAnimatorProgress = progress; + + this._baseOnframe(this._monotonicTimeStampInMs, false); + } + }; + if (sdkApiVersion >= 12) { + this._animator.onFrame = onframe; + } else { + this._animator.onframe = onframe; + } +}; + +Looper.prototype._exportApiByAnimator = function() { + this._looperType = 'animator'; + + this.first = function () { + this._baseFirst(); + this._lastAnimatorProgress = 0; + this._monotonicTimeStampInMs = Math.floor(Date.now()); + LogUtil.info(`${this._getLogTag()} ${this._looperType} first: ${this._monotonicTimeStampInMs}`); + }; + + this.start = function () { + if (this._uiContext.getHostContext() !== getContext()) { + LogUtil.warn(`${this._getLogTag()} ${this._looperType} could NOT start cause context not matched`); + return; + } + LogUtil.info(`${this._getLogTag()} ${this._looperType} play`); + this._animator.play(); + this._looperStopped = false; + }; + + this.stop = function () { + if (this._uiContext.getHostContext() !== getContext()) { + LogUtil.warn(`${this._getLogTag()} ${this._looperType} could NOT stop cause context not matched`); + return; + } + LogUtil.info(`${this._getLogTag()} ${this._looperType} cancel`); + this._looperStopped = true; + // do not call '_animator.finish' function which will further call animator.onframe causing stack overflow. + this._animator.cancel(); + }; + + this._setExpectedFrameRateRangeWrapper = this._animator.setExpectedFrameRateRange?.bind(this._animator); + this.setExpectedFrameRateRange = function (playingFrameRate) { + this._baseSetExpectedFrameRateRange(playingFrameRate); + }; +}; + +Looper.prototype.onAnimationActive = function(animItem) { + if (animItem?.getFrameRate() > this._playingFrameRate) { + // 有更高帧率的动画活动,需要刷新帧率 + this.changeFrameRateIfNeeded(); + } + + this.addPlayingCount(); +}; + +Looper.prototype.onAnimationIdle = function(animItem) { + this.subtractPlayingCount(); + + if (animItem?.getFrameRate() >= this._playingFrameRate) { + // 最高帧率的动画暂停,需要刷新为第二高的帧率值 + this.changeFrameRateIfNeeded(); + } +}; + +Looper.prototype.pickMaxFrameRate = function() { + let maxUserFr = animationManager?.getFrameRate(); + if (maxUserFr > 0 && maxUserFr <= 120) { + return maxUserFr; // user already set frame rate. so ignore content fr for better performance + } + + let maxFrameRate = 0; + let len = this._animations?.length; + for (let i = 0; i < len; i++) { + let animItem = this._animations[i]?.animation; + let uiContext = animItem?.getUiContext(); + if ((!uiContext || (uiContext === this._uiContext)) && !animItem?._idle) { + let fr = animItem?.getFrameRate(); + LogUtil.info(`${this._getLogTag()} check fr from '${animItem?.name}(${animItem?.animationID})' with ${fr} fps.`); + if (fr > maxFrameRate) { + maxFrameRate = fr; + } + } + } + return maxFrameRate; +}; + +Looper.prototype.addPlayingCount = function() { + this._playingAnimationsNum += 1; + if (this._playingAnimationsNum > 0) { + this.activate(); + } +}; + +Looper.prototype.subtractPlayingCount = function() { + this._playingAnimationsNum -= 1; + if (this._playingAnimationsNum <= 0) { + this._playingAnimationsNum = 0; + this.deactivate(); + } +}; + +Looper.prototype.activate = function() { + if (this._playingAnimationsNum > 0 && this._looperStopped) { + LogUtil.info(`${this._getLogTag()} activate.`); + this.first(); + this.start(); + } +}; + +Looper.prototype.deactivate = function() { + if (!this._looperStopped) { + LogUtil.info(`${this._getLogTag()} deactivate`); + this._playingFrameRate = 0; + this.stop(); + } +}; + +Looper.prototype.changeFrameRateIfNeeded = function() { + let maxFr = this.pickMaxFrameRate(); + if (maxFr === 0) { + this.deactivate(); + return; + } + + if (maxFr !== this._playingFrameRate) { + if (maxFr > 0 && maxFr <= 120) { + this._playingFrameRate = maxFr; + this.setExpectedFrameRateRange(this._playingFrameRate); + } + } +}; + +const animationManager = (function(){ + let moduleOb = {}; + let registeredAnimations = []; + let _packageName = ''; + let _userPlayingFrameRate = 0; + let _contextLoopers = new WeakMap(); + let _coordinator = new Coordinator(); + + function _getLogTag() { + let abilityName = getContext()?.abilityInfo?.name; + if (abilityName && _packageName !== '') { + return ``; + } else if (abilityName) { + return ``; + } else if (_packageName !== '') { + return ``; + } else { + return ''; + } + } + + function _logFunc(funcName, name, onlyCurrentAbility, value) { + let valueDesc = ''; + if (value) { + valueDesc = ` with (${value})`; + } + let nameDesc = 'all animations'; + if (name) { + nameDesc = `animation named by '${name}'`; + } + + let abilityDesc = 'in all abilities'; + if (onlyCurrentAbility) { + abilityDesc = 'in current ability'; + } + + LogUtil.info(`${_getLogTag()} ${funcName}${valueDesc} for ${nameDesc} ${abilityDesc}`); + } + + function _isNameMatched(animation, nameTarget) { + if (!nameTarget || animation?.name === nameTarget) { + return true; + } + return false; + } + + function _isAbilityMatched(animation, onlyCurrentAbility) { + let context = getContext(); + if (!onlyCurrentAbility || animation?.getUiContext()?.getHostContext() === context) { + return true; + } + + return false; + } + + function _getAnimationUiContext(animation) { + /* 多abilities的支持需要依赖于在准确的context上启停Looper, 但displaysync无法完成这个使命. + * 每次启动displaysync时, start均会将displaysync挂载到当前执行上下文的管线中, 这会导致可能挂错. + * 为此引入frameCallback, 它能够支持向特定的管线上post回调, 从而确保上下文正确. + * 但frameCallback需要一个准确的uicontext, 当前并无接口支持. + * 此处直接借助了animation所关联canvas节点的uiContext_, 这有点类似java中的反射, 属于不规范的做法. + * FIXME:待后续有正式接口时需做下调整. + * (引入frameCallback的另一个好处是可以降低负载, ui线程只在必要时才被唤醒) + */ + return animation?.wrapper?.canvas?.uiContext_; + } + + function _getAllLooperFromAnimations() { + let allLooper = new Map(); + let len = registeredAnimations?.length; + for (let i = len - 1; i >= 0; i--) { + let context = _getAnimationUiContext(registeredAnimations[i]?.animation)?.getHostContext(); + if (context) { + let looper = _contextLoopers.get(context); + if (looper) { + allLooper.set(looper, looper); + } + } + } + + return allLooper; + } + + function _getLooperFromAnimation(animation) { + let uiContext = _getAnimationUiContext(animation); + if (!uiContext) { + LogUtil.warn(`${_getLogTag()} could NOT get current uiContext. no looper created.`); + return null; + } + + return _getOrCreateLooper(uiContext); + } + + function _getOrCreateLooper(uiContext) { + let looper = _contextLoopers.get(uiContext); + if (!!looper) { + return looper; + } + + looper = new Looper(uiContext, registeredAnimations, resume, true); + _contextLoopers.set(uiContext, looper); + return looper; + } + + // web only + function registerAnimation(element, animationData) { + if (!element) { + return null; + } + + let len = registeredAnimations?.length + for (let i = 0; i < len; i++) { + if (registeredAnimations[i]?.elem !== null && registeredAnimations[i]?.elem === element) { + return registeredAnimations[i]?.animation; + } + } + + var animItem = new AnimationItem(); + setupAnimation(animItem, element); + animItem.setData(element, animationData); + return animItem; + } + + // web only + function getRegisteredAnimations() { + var animations = []; + let len = registeredAnimations?.length; + for (let i = 0; i < len; i += 1) { + animations.push(registeredAnimations[i]?.animation); + } + return animations; + } + + function onAnimationItemLoaded(animItem) { + if (!!animItem.getUiContext()) { + LogUtil.info(`${animItem._getLogTag()} created with ${animItem.frameRate} fps.`); + } else { + LogUtil.warn(`${animItem._getLogTag()} created with ${animItem.frameRate} fps. no UIContext.`); + } + } + + function onAnimationItemDestroy(ev) { + let animItem = ev.target; + let len = registeredAnimations?.length + for (let i = len - 1; i >= 0; i--) { + if (registeredAnimations[i]?.animation === animItem) { + registeredAnimations[i].animation = null; + registeredAnimations.splice(i, 1); + _coordinator.detachAnimationFromContext2d(animItem?.wrapper); + LogUtil.info(`${animItem._getLogTag()} destroyed with ${animItem.frameRate} fps`); + } + } + } + + function onAnimationItemActive(animItem) { + if (!!animItem?.getUiContext()) { + LogUtil.info(`${animItem?._getLogTag()} activated with ${animItem?.getFrameRate()} fps.`); + } else { + LogUtil.warn(`${animItem?._getLogTag()} activated with ${animItem?.getFrameRate()} fps. no UiContext.`); + } + + _getLooperFromAnimation(animItem)?.onAnimationActive(animItem); + } + + function onAnimationItemIdle(animItem) { + if (!!animItem?.getUiContext()) { + LogUtil.info(`${animItem?._getLogTag()} deactivated with ${animItem?.getFrameRate()} fps`); + } else { + LogUtil.warn(`${animItem?._getLogTag()} deactivated with ${animItem?.getFrameRate()} fps. no UiContext.`); + } + + _getLooperFromAnimation(animItem)?.onAnimationIdle(animItem); + } + + function _destroyAnimationWithSameContext2d(context2d) { + let len = registeredAnimations?.length; + for (let i = len - 1; i >= 0; i--) { + let animation = registeredAnimations[i]?.animation; + if (animation?.wrapper === context2d) { + LogUtil.warn(`${_getLogTag()} destroy animation '${animation.name}(${animation?.animationID})' from ${animation?.source}, + because animation using the same context2D. `); + registeredAnimations.splice(i, 1); + animation?.destroy(); + } + } + } + + function setupAnimation(animItem, element) { + animItem.addEventListener('destroy', onAnimationItemDestroy); + animItem.addEventListener('_active', onAnimationItemActive); + animItem.addEventListener('_idle', onAnimationItemIdle); + animItem.addEventListener('DOMLoaded', onAnimationItemLoaded); + registeredAnimations.push({ elem: element, animation: animItem }); + } + + function loadAnimation(params) { + LogUtil.info(`${_getLogTag()} load animation named '${params.name ? params.name : ''}'` + + `${params.uri ? ' from ' + params.uri : (params.path ? ' from ' + params.path : '')}` + + `, canvas uniqueId is: ${params.container?.canvas?.getUniqueId()}`); + LogUtil.version(); + let context2d = params.wrapper || params.container; + if (!context2d) { + LogUtil.warn(`${_getLogTag()} loadAnimation failed because no container`); + return null; + } + + let animItem = _coordinator.detachAnimationFromContext2d(context2d); + if (animItem) { + LogUtil.warn(`${_getLogTag()} destroy animation '${animItem.name}(${animItem.animationID})' in the context2d. from ${animItem.source}`); + animItem.destroy(); + } else { + _destroyAnimationWithSameContext2d(context2d); + } + + animItem = new AnimationItem(); + if (!_coordinator.isContext2dBoundToCoordinator(context2d)) { + /* 执行 loadAnimation 时还未将 context2d 绑定到 coordinator 上, 即用户尚未显式调用bindContext2dToCoordinator + * 说明用户还处在旧的处理逻辑中, 需要帮用户做一次调用 + * 出于兼容性考虑, 此时需保持 preferredNoArea 为 false, 即默认 canvas 有可见面积 + */ + _coordinator.internalBindContext2dToCoordinator(context2d, false); + } + _coordinator.attachAnimationToContext2d(context2d, animItem); + + setupAnimation(animItem, null); + animItem.setParams(params); + return animItem; + } + + function setSpeed(val, animationName, onlyCurrentAbility) { + _logFunc('setSpeed', animationName, onlyCurrentAbility, val); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.setSpeed(val); + } + } + } + + function setDirection(val, animationName, onlyCurrentAbility) { + _logFunc('setDirection', animationName, onlyCurrentAbility, val); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.setDirection(val); + } + } + } + + function play(animationName, onlyCurrentAbility) { + _logFunc('play', animationName, onlyCurrentAbility); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.play(); + } + } + } + + function resume(uiContext, timestamp, displaySynced) { + let len = registeredAnimations.length; + + for (let i = 0; i < len; i += 1) { + if (!uiContext || registeredAnimations[i]?.animation.getUiContext() === uiContext) { + registeredAnimations[i]?.animation.resume(timestamp, displaySynced); + } + } + } + + function pause(animationName, onlyCurrentAbility) { + _logFunc('pause', animationName, onlyCurrentAbility); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.pause(); + } + } + } + + function goToAndStop(value, isFrame, animationName, onlyCurrentAbility) { + _logFunc('goToAndStop', animationName, onlyCurrentAbility, `${value},${isFrame}`); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.goToAndStop(value, isFrame); + } + } + } + + function goToAndPlay(value, isFrame, animationName, onlyCurrentAbility) { + _logFunc('goToAndPlay', animationName, onlyCurrentAbility, `${value},${isFrame}`); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.goToAndPlay(value, isFrame); + } + } + } + + function stop(animationName, onlyCurrentAbility) { + _logFunc('stop', animationName, onlyCurrentAbility); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.stop(); + } + } + } + + function togglePause(animationName, onlyCurrentAbility) { + _logFunc('togglePause', animationName, onlyCurrentAbility); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.togglePause(); + } + } + } + + /** + * 设置packageName + * @param name 应用的包名 + */ + function setPackageName(name) { + LogUtil.info(`${_getLogTag()} setPackageName: ${name}`); + _packageName = name; + } + + /** + * 设置所有动画的播放帧率 + * @param frameRate 帧率 + */ + function setFrameRate(frameRate) { + LogUtil.info(`${_getLogTag()} setFrameRate: ${frameRate}`); + _userPlayingFrameRate = frameRate; + + _getAllLooperFromAnimations()?.forEach((looper) => { + looper.changeFrameRateIfNeeded(); + }); + } + + /** + * 获取当前所有动画的播放帧率 + * @returns 帧率 + */ + function getFrameRate() { + return _userPlayingFrameRate; + } + + function destroy(animationName, onlyCurrentAbility) { + _logFunc('destroy', animationName, onlyCurrentAbility); + LogUtil.version(); + + let len = registeredAnimations.length; + for (let i = (len - 1); i >= 0; i -= 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + // 找到即将要被destroy的动画,销毁之。会触发回调,在回调中进行状态清理 + registeredAnimations[i]?.animation.destroy(); + } + } + if (registeredAnimations.length === 0) { + bez.storedData = {}; + } + } + + // html only + function searchAnimations(animationData, standalone, renderer) { + if (!document) { + return; + } + let animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')), + [].slice.call(document.getElementsByClassName('bodymovin'))); + let lenAnims = animElements.length; + for (let i = 0; i < lenAnims; i += 1) { + if (renderer && !!animElements[i]) { + animElements[i].setAttribute('data-bm-type', renderer); + } + registerAnimation(animElements[i], animationData); + } + if (standalone && lenAnims === 0) { + if (!renderer) { + renderer = 'svg'; + } + var body = document.getElementsByTagName('body')[0]; + body.innerText = ''; + var div = createTag('div'); + div.style.width = '100%'; + div.style.height = '100%'; + div.setAttribute('data-bm-type', renderer); + body.appendChild(div); + registerAnimation(div, animationData); + } + } + + function setContentMode(contentMode, animationName, onlyCurrentAbility) { + _logFunc('setContentMode', animationName, onlyCurrentAbility, contentMode); + + let len = registeredAnimations.length + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.setContentMode(contentMode); + } + } + } + + function resize(width, height, animationName, onlyCurrentAbility) { + _logFunc('resize', animationName, onlyCurrentAbility, `${width} x ${height}`); + + let len = registeredAnimations.length + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.resize(width, height); + } + } + } + + function freeze(animationName, onlyCurrentAbility) { + _logFunc('freeze', animationName, onlyCurrentAbility); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i].animation.pause(); + } + } + } + + function unfreeze(animationName, onlyCurrentAbility) { + _logFunc('unfreeze', animationName, onlyCurrentAbility); + + let len = registeredAnimations.length; + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i].animation.play(); + } + } + } + + function setVolume(val, animationName, onlyCurrentAbility) { + _logFunc('setVolume', animationName, onlyCurrentAbility, val); + + let len = registeredAnimations.length + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.setVolume(val); + } + } + } + + function mute(animationName, onlyCurrentAbility) { + _logFunc('mute', animationName, onlyCurrentAbility); + + let len = registeredAnimations.length + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.mute(); + } + } + } + + function unmute(animationName, onlyCurrentAbility) { + _logFunc('unmute', animationName, onlyCurrentAbility); + + let len = registeredAnimations.length + for (let i = 0; i < len; i += 1) { + if (_isNameMatched(registeredAnimations[i]?.animation, animationName) && + _isAbilityMatched(registeredAnimations[i]?.animation, onlyCurrentAbility)) { + registeredAnimations[i]?.animation.unmute(); + } + } + } + + /** + * 清除单个文件缓存(支持同步/异步模式) + * @param {string} path - 文件路径(支持HTTP URL格式) + * @param {Object} container - 包含JSON数据的容器对象 + * @param {boolean} isSync - 是否使用同步模式操作 + */ + function clearSingleFileCache(path, container, isSync) { + // 安全校验:确保上下文存在 + let context = getContext(); + if (!context) { + return; + } + + // 处理HTTP资源路径 + if (path.startsWith('http')) { + let pathSegments = path.split('/'); + let parentDirName = pathSegments[pathSegments.length - 2]; // 父级目录名 + let originalFileName = pathSegments[pathSegments.length - 1]; // 原始文件名(含扩展名) + let cleanFileName = originalFileName.replace(/\.(?:zip|json)$/i, ''); // 清理后文件名(去除扩展名) + + let lottieBaseDir = `${context.filesDir}/lottie/${parentDirName}`; // 基础存储目录 + let targetDirectory = `${lottieBaseDir}/${cleanFileName}`; // 目标目录 + + // 执行目录清理 + rmdir(targetDirectory, isSync); + } + + // 处理图片资源 + if (container) { + try { + // 解析资源中的JSON数据 + let jsonString = container.getJsonData(path); + let jsonObj = JSON.parse(jsonString); + + // 构建图片加载目录路径 + let loadPath = `${context.filesDir}/lottie/loadImages/`; + + // 检查是否存在网络资源 + if (isExistNetworkAssets(jsonObj?.assets)) { + rmdir(loadPath, isSync, jsonObj); + } + } catch (error) { + LogUtil.error(`JSON解析失败: ${error.message}`); + } + } + } + + /** + * 异步清除文件缓存 + * @param {string} url - 要清除缓存的文件URL或本地路径 + * @param {Object|string} container - 缓存容器对象或目录路径 + */ + function clearFileCache(url, container) { + clearFile(url, container, false); + } + + /** + * 同步清除文件缓存 + * @param {string} url - 要清除缓存的文件URL或本地路径 + * @param {Object|string} container - 缓存容器对象或目录路径 + */ + function clearFileCacheSync(url, container) { + clearFile(url, container, true); + } + + /** + * 清理文件缓存(支持单文件或全局清理) + * @param {string} [url] - 可选的文件URL路径,存在时清理指定文件缓存 + * @param {Object} container - 包含JSON数据的容器对象,用于解析关联资源 + * @param {boolean} isSync - 是否使用同步模式执行清理操作 + */ + function clearFile(url, container, isSync) { + // 安全校验:确保上下文存在 + let context = getContext(); + if (!context) { + return; + } + + if (url) { + // 单文件清理模式:精确清理指定URL对应的缓存 + clearSingleFileCache(url, container, isSync); + return; + } + let fileDir = `${context.filesDir}/lottie`; // 应用私有文件目录 + let cacheDir = `${context.cacheDir}/lottie`; // 系统缓存目录 + + // 执行清理操作(同步/异步模式) + rmdir(fileDir, isSync); + rmdir(cacheDir, isSync); + } + + /** + * 删除指定资源文件 + * @param {string} path - 基础目录路径 + * @param {Object} assets - 资源对象,包含id和p(路径)属性 + * @param {Array} filenames - 文件名数组 + * @param {boolean} isSync - 是否同步删除标志 + */ + function rmAssetsDir(path, assets, filenames, isSync) { + // 判断是否为HTTP资源(通过检查路径是否以http开头) + let isHttp = assets?.p?.startsWith('http'); + + if (isHttp) { + // 构造目标文件名(assets.id + '.png') + const targetFilename = `${assets.id}.png`; + const fileIndex = filenames.indexOf(targetFilename); + + // 找到匹配文件时执行删除 + if (fileIndex !== -1) { + if (isSync) { + unlinkSync(path + filenames[fileIndex]); + } else { + unlink(path + filenames[fileIndex]); + } + } + } + } + + /** + * 根据路径删除文件或目录 + * @param {string} path - 基础目录路径 + * @param {string} filename - 文件/目录名 + * @param {boolean} isSync - 是否同步操作标志 + */ + function rmDirByPath(path, filename, isSync) { + let dirPath = path + '/' + filename; + // 判断是否文件夹 + try { + let isDirectory = fs.statSync(dirPath).isDirectory(); + if (isDirectory) { + rmdirSync(dirPath); + } else { + if (isSync) { + unlinkSync(dirPath); + } else { + unlink(dirPath); + } + } + } catch (err) { + LogUtil.error('Method rmDirByPath execute error: ' + JSON.stringify(err)); + } + } + + /** + * 删除目录 + * @param path - 目标根目录路径 + * @param isSync - 是否同步操作标志 + * @param jsonObj - 资源描述对象(可选) + */ + function rmdir(path, isSync, jsonObj) { + let filenames = listFileSyncs(path); + if (jsonObj) { + for (let i = 0; i < jsonObj.assets.length; i++) { + rmAssetsDir(path, jsonObj.assets[i], filenames, isSync); + } + } else { + for (let i = 0; i < filenames.length; i++) { + rmDirByPath(path, filenames[i], isSync); + } + } + } + + moduleOb.registerAnimation = registerAnimation; + moduleOb.loadAnimation = loadAnimation; + moduleOb.setSpeed = setSpeed; + moduleOb.setDirection = setDirection; + moduleOb.play = play; + moduleOb.pause = pause; + moduleOb.stop = stop; + moduleOb.togglePause = togglePause; + moduleOb.searchAnimations = searchAnimations; + moduleOb.resize = resize; + moduleOb.clearFileCache = clearFileCache; + moduleOb.clearFileCacheSync = clearFileCacheSync; + moduleOb.goToAndStop = goToAndStop; + moduleOb.goToAndPlay = goToAndPlay; + moduleOb.destroy = destroy; + moduleOb.freeze = freeze; + moduleOb.unfreeze = unfreeze; + moduleOb.setVolume = setVolume; + moduleOb.mute = mute; + moduleOb.unmute = unmute; + moduleOb.getRegisteredAnimations = getRegisteredAnimations; + moduleOb.setPackageName = setPackageName; + moduleOb.setContentMode = setContentMode; + moduleOb.setFrameRate = setFrameRate; + moduleOb.getFrameRate = getFrameRate; + moduleOb.bindContext2dToCoordinator = _coordinator.bindContext2dToCoordinator.bind(_coordinator); + moduleOb.unbindContext2dFromCoordinator = _coordinator.unbindContext2dFromCoordinator.bind(_coordinator); + moduleOb.setAttachedCanvasHasVisibleArea = _coordinator.setAttachedCanvasHasVisibleArea.bind(_coordinator); + + return moduleOb; +}()); + +export default animationManager; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/effects/SliderEffect.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/effects/SliderEffect.js new file mode 100644 index 0000000000000000000000000000000000000000..f49a459e46af08ed824444109080e6114ccc80ca --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/effects/SliderEffect.js @@ -0,0 +1,37 @@ +import PropertyFactory from '../utils/PropertyFactory'; + +function SliderEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function AngleEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function ColorEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container); +} +function PointEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 1, 0, container); +} +function LayerIndexEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function MaskIndexEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function CheckboxEffect(data, elem, container) { + this.p = PropertyFactory.getProp(elem, data.v, 0, 0, container); +} +function NoValueEffect() { + this.p = {}; +} + +export { + SliderEffect, + AngleEffect, + ColorEffect, + PointEffect, + LayerIndexEffect, + MaskIndexEffect, + CheckboxEffect, + NoValueEffect, +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/AudioElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/AudioElement.js new file mode 100644 index 0000000000000000000000000000000000000000..608f17bfa85c4c9ae3d80d766d364520fc605f0b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/AudioElement.js @@ -0,0 +1,106 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; +import PropertyFactory from '../utils/PropertyFactory'; +import RenderableElement from './helpers/RenderableElement'; +import BaseElement from './BaseElement'; +import FrameElement from './helpers/FrameElement'; + +function AudioElement(data, globalData, comp) { + this.initFrame(); + this.initRenderable(); + this.assetData = globalData.getAssetData(data.refId); + this.initBaseData(data, globalData, comp); + this._isPlaying = false; + this._canPlay = false; + var assetPath = this.globalData.getAssetsPath(this.assetData); + this.audio = this.globalData.audioController.createAudio(assetPath); + this._currentTime = 0; + this.globalData.audioController.addAudio(this); + this._volumeMultiplier = 1; + this._volume = 1; + this._previousVolume = null; + this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true }; + this.lv = PropertyFactory.getProp(this, data.au && data.au.lv ? data.au.lv : { k: [100] }, 1, 0.01, this); +} + +AudioElement.prototype.prepareFrame = function (num) { + this.prepareRenderableFrame(num, true); + this.prepareProperties(num, true); + if (!this.tm._placeholder) { + var timeRemapped = this.tm.v; + this._currentTime = timeRemapped; + } else { + this._currentTime = num / this.data.sr; + } + this._volume = this.lv.v[0]; + var totalVolume = this._volume * this._volumeMultiplier; + if (this._previousVolume !== totalVolume) { + this._previousVolume = totalVolume; + this.audio.volume(totalVolume); + } +}; + +extendPrototype([RenderableElement, BaseElement, FrameElement], AudioElement); + +AudioElement.prototype.renderFrame = function () { + if (this.isInRange && this._canPlay) { + if (!this._isPlaying) { + this.audio.play(); + this.audio.seek(this._currentTime / this.globalData.frameRate); + this._isPlaying = true; + } else if (!this.audio.playing() + || Math.abs(this._currentTime / this.globalData.frameRate - this.audio.seek()) > 0.1 + ) { + this.audio.seek(this._currentTime / this.globalData.frameRate); + } + } +}; + +AudioElement.prototype.show = function () { + // this.audio.play() +}; + +AudioElement.prototype.hide = function () { + this.audio.pause(); + this._isPlaying = false; +}; + +AudioElement.prototype.pause = function () { + try{ + this.audio.pause(); + } catch (err) { + return; + } + this._isPlaying = false; + this._canPlay = false; +}; + +AudioElement.prototype.resume = function () { + this._canPlay = true; +}; + +AudioElement.prototype.setRate = function (rateValue) { + this.audio.rate(rateValue); +}; + +AudioElement.prototype.volume = function (volumeValue) { + this._volumeMultiplier = volumeValue; + this._previousVolume = volumeValue * this._volume; + this.audio.volume(this._previousVolume); +}; + +AudioElement.prototype.getBaseElement = function () { + return null; +}; + +AudioElement.prototype.destroy = function () { +}; + +AudioElement.prototype.sourceRectAtTime = function () { +}; + +AudioElement.prototype.initExpressions = function () { +}; + +export default AudioElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/BaseElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/BaseElement.js new file mode 100644 index 0000000000000000000000000000000000000000..031cc810d70aaecab55c515c39af907d7d9d34bd --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/BaseElement.js @@ -0,0 +1,78 @@ +import { + createElementID, + getExpressionInterfaces, +} from '../utils/common'; +import getBlendMode from '../utils/helpers/blendModes'; +import EffectsManager from '../EffectsManager'; + +function BaseElement() { +} + +BaseElement.prototype = { + checkMasks: function () { + if (!this.data.hasMask) { + return false; + } + var i = 0; + var len = this.data.masksProperties.length; + while (i < len) { + if ((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) { + return true; + } + i += 1; + } + return false; + }, + initExpressions: function () { + const expressionsInterfaces = getExpressionInterfaces(); + if (!expressionsInterfaces) { + return; + } + const LayerExpressionInterface = expressionsInterfaces('layer'); + const EffectsExpressionInterface = expressionsInterfaces('effects'); + const ShapeExpressionInterface = expressionsInterfaces('shape'); + const TextExpressionInterface = expressionsInterfaces('text'); + const CompExpressionInterface = expressionsInterfaces('comp'); + this.layerInterface = LayerExpressionInterface(this); + if (this.data.hasMask && this.maskManager) { + this.layerInterface.registerMaskInterface(this.maskManager); + } + var effectsInterface = EffectsExpressionInterface.createEffectsInterface(this, this.layerInterface); + this.layerInterface.registerEffectsInterface(effectsInterface); + + if (this.data.ty === 0 || this.data.xt) { + this.compInterface = CompExpressionInterface(this); + } else if (this.data.ty === 4) { + this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData, this.itemsData, this.layerInterface); + this.layerInterface.content = this.layerInterface.shapeInterface; + } else if (this.data.ty === 5) { + this.layerInterface.textInterface = TextExpressionInterface(this); + this.layerInterface.text = this.layerInterface.textInterface; + } + }, + setBlendMode: function () { + var blendModeValue = getBlendMode(this.data.bm); + var elem = this.baseElement || this.layerElement; + + elem.style['mix-blend-mode'] = blendModeValue; + }, + initBaseData: function (data, globalData, comp) { + this.globalData = globalData; + this.comp = comp; + this.data = data; + this.layerId = createElementID(); + + // Stretch factor for old animations missing this property. + if (!this.data.sr) { + this.data.sr = 1; + } + // effects manager + this.effectsManager = new EffectsManager(this.data, this, this.dynamicProperties); + }, + getType: function () { + return this.type; + }, + sourceRectAtTime: function () {}, +}; + +export default BaseElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/BaseTextElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/BaseTextElement.js new file mode 100644 index 0000000000000000000000000000000000000000..34d52ccba45982e17befe63628ef23faa5e8d43b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/BaseTextElement.js @@ -0,0 +1,4 @@ +const BaseTextElement = function () { +}; + +export default BaseTextElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/CompElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/CompElement.js new file mode 100644 index 0000000000000000000000000000000000000000..f1abe7382888fad026b0d69dd9f3f6ebc903b1f8 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/CompElement.js @@ -0,0 +1,149 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; +import BaseElement from './BaseElement'; +import TransformElement from './helpers/TransformElement'; +import HierarchyElement from './helpers/HierarchyElement'; +import FrameElement from './helpers/FrameElement'; +import RenderableDOMElement from './helpers/RenderableDOMElement'; + +function ICompElement() {} + +extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement); + +ICompElement.prototype.initElement = function (data, globalData, comp) { + this.initFrame(); + this.initBaseData(data, globalData, comp); + this.initTransform(data, globalData, comp); + this.initRenderable(); + this.initHierarchy(); + this.initRendererElement(); + this.createContainerElements(); + this.createRenderableComponents(); + if (this.data.xt || !globalData.progressiveLoad) { + this.buildAllItems(); + } + this.hide(); +}; + +/* ICompElement.prototype.hide = function(){ + if(!this.hidden){ + this.hideElement(); + var i,len = this.elements.length; + for( i = 0; i < len; i+=1 ){ + if(this.elements[i]){ + this.elements[i].hide(); + } + } + } +}; */ + +ICompElement.prototype.prepareFrame = function (num) { + this._mdf = false; + this.prepareRenderableFrame(num); + this.prepareProperties(num, this.isInRange); + if (!this.isInRange && !this.data.xt) { + return; + } + + if (!this.tm._placeholder) { + var timeRemapped = this.tm.v; + if (timeRemapped === this.data.op) { + timeRemapped = this.data.op - 1; + } + this.renderedFrame = timeRemapped; + } else { + this.renderedFrame = num / this.data.sr; + } + var i; + var len = this.elements.length; + if (!this.completeLayers) { + this.checkLayers(this.renderedFrame); + } + // This iteration needs to be backwards because of how expressions connect between each other + for (i = len - 1; i >= 0; i -= 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st); + if (this.elements[i]._mdf) { + this._mdf = true; + } + } + } +}; + +ICompElement.prototype.renderInnerContent = function () { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].renderFrame(); + } + } +}; + +ICompElement.prototype.renderShapeColor = function (color, endColor, index) { + if (typeof endColor == 'object') { + if (Array.isArray(endColor)) { + if (!index) { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].changeColor(color, endColor); + } + } + } else { + if (this.completeLayers || this.elements[index-1]) { + this.elements[index-1].changeColor(color, endColor); + } + } + } + } else if (typeof endColor == 'number') { + if (!endColor) { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].changeColor(color, undefined); + } + } + } else { + if (this.completeLayers || this.elements[endColor-1]) { + this.elements[endColor-1].changeColor(color, undefined); + } + } + } else { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].changeColor(color, undefined); + } + } + } +}; + +ICompElement.prototype.setElements = function (elems) { + this.elements = elems; +}; + +ICompElement.prototype.getElements = function () { + return this.elements; +}; + +ICompElement.prototype.destroyElements = function () { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + if (this.elements[i]) { + this.elements[i].destroy(); + } + } +}; + +ICompElement.prototype.destroy = function () { + this.destroyElements(); + this.destroyBaseElement(); +}; + +export default ICompElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/FootageElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/FootageElement.js new file mode 100644 index 0000000000000000000000000000000000000000..8b85987fee4270514ae705cf0e929940c8bf54fb --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/FootageElement.js @@ -0,0 +1,47 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; +import { + getExpressionInterfaces, +} from '../utils/common'; +import RenderableElement from './helpers/RenderableElement'; +import BaseElement from './BaseElement'; +import FrameElement from './helpers/FrameElement'; + +function FootageElement(data, globalData, comp) { + this.initFrame(); + this.initRenderable(); + this.assetData = globalData.getAssetData(data.refId); + this.footageData = globalData.imageLoader.getAsset(this.assetData); + this.initBaseData(data, globalData, comp); +} + +FootageElement.prototype.prepareFrame = function () { +}; + +extendPrototype([RenderableElement, BaseElement, FrameElement], FootageElement); + +FootageElement.prototype.getBaseElement = function () { + return null; +}; + +FootageElement.prototype.renderFrame = function () { +}; + +FootageElement.prototype.destroy = function () { +}; + +FootageElement.prototype.initExpressions = function () { + const expressionsInterfaces = getExpressionInterfaces(); + if (!expressionsInterfaces) { + return; + } + const FootageInterface = expressionsInterfaces('footage'); + this.layerInterface = FootageInterface(this); +}; + +FootageElement.prototype.getFootageData = function () { + return this.footageData; +}; + +export default FootageElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/ImageElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/ImageElement.js new file mode 100644 index 0000000000000000000000000000000000000000..5bee39af214408cc44013e44980aa4330769b14f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/ImageElement.js @@ -0,0 +1,42 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; + +import createNS from '../utils/helpers/svg_elements'; +import BaseElement from './BaseElement'; +import TransformElement from './helpers/TransformElement'; +import SVGBaseElement from './svgElements/SVGBaseElement'; +import HierarchyElement from './helpers/HierarchyElement'; +import FrameElement from './helpers/FrameElement'; +import RenderableDOMElement from './helpers/RenderableDOMElement'; + +function IImageElement(data, globalData, comp) { + this.assetData = globalData.getAssetData(data.refId); + if (this.assetData && this.assetData.sid) { + this.assetData = globalData.slotManager.getProp(this.assetData); + } + this.initElement(data, globalData, comp); + this.sourceRect = { + top: 0, left: 0, width: this.assetData.w, height: this.assetData.h, + }; +} + +extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], IImageElement); + +IImageElement.prototype.createContent = function () { + var assetPath = this.globalData.getAssetsPath(this.assetData); + + this.innerElem = createNS('image'); + this.innerElem.setAttribute('width', this.assetData.w + 'px'); + this.innerElem.setAttribute('height', this.assetData.h + 'px'); + this.innerElem.setAttribute('preserveAspectRatio', this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio); + this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath); + + this.layerElement.appendChild(this.innerElem); +}; + +IImageElement.prototype.sourceRectAtTime = function () { + return this.sourceRect; +}; + +export default IImageElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/NullElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/NullElement.js new file mode 100644 index 0000000000000000000000000000000000000000..f3bb129b45e7e2aea77ac28a3ba31159c3f0f7fa --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/NullElement.js @@ -0,0 +1,42 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; +import BaseElement from './BaseElement'; +import TransformElement from './helpers/TransformElement'; +import HierarchyElement from './helpers/HierarchyElement'; +import FrameElement from './helpers/FrameElement'; + +function NullElement(data, globalData, comp) { + this.initFrame(); + this.initBaseData(data, globalData, comp); + this.initFrame(); + this.initTransform(data, globalData, comp); + this.initHierarchy(); +} + +NullElement.prototype.prepareFrame = function (num) { + this.prepareProperties(num, true); +}; + +NullElement.prototype.renderFrame = function () { +}; + +NullElement.prototype.changeColor = function () { +}; + +NullElement.prototype.getBaseElement = function () { + return null; +}; + +NullElement.prototype.destroy = function () { +}; + +NullElement.prototype.sourceRectAtTime = function () { +}; + +NullElement.prototype.hide = function () { +}; + +extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement], NullElement); + +export default NullElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/ShapeElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/ShapeElement.js new file mode 100644 index 0000000000000000000000000000000000000000..4e50b4910829b5df97a843cf5bd671747ba414f4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/ShapeElement.js @@ -0,0 +1,76 @@ +import ProcessedElement from './helpers/shapes/ProcessedElement'; + +function IShapeElement() { +} + +IShapeElement.prototype = { + addShapeToModifiers: function (data) { + var i; + var len = this.shapeModifiers.length; + for (i = 0; i < len; i += 1) { + this.shapeModifiers[i].addShape(data); + } + }, + isShapeInAnimatedModifiers: function (data) { + var i = 0; + var len = this.shapeModifiers.length; + while (i < len) { + if (this.shapeModifiers[i].isAnimatedWithShape(data)) { + return true; + } + } + return false; + }, + renderModifiers: function () { + if (!this.shapeModifiers.length) { + return; + } + var i; + var len = this.shapes.length; + for (i = 0; i < len; i += 1) { + this.shapes[i].sh.reset(); + } + + len = this.shapeModifiers.length; + var shouldBreakProcess; + for (i = len - 1; i >= 0; i -= 1) { + shouldBreakProcess = this.shapeModifiers[i].processShapes(this._isFirstFrame); + // workaround to fix cases where a repeater resets the shape so the following processes get called twice + // TODO: find a better solution for this + if (shouldBreakProcess) { + break; + } + } + }, + + searchProcessedElement: function (elem) { + var elements = this.processedElements; + var i = 0; + var len = elements.length; + while (i < len) { + if (elements[i].elem === elem) { + return elements[i].pos; + } + i += 1; + } + return 0; + }, + addProcessedElement: function (elem, pos) { + var elements = this.processedElements; + var i = elements.length; + while (i) { + i -= 1; + if (elements[i].elem === elem) { + elements[i].pos = pos; + return; + } + } + elements.push(new ProcessedElement(elem, pos)); + }, + prepareFrame: function (num) { + this.prepareRenderableFrame(num); + this.prepareProperties(num, this.isInRange); + }, +}; + +export default IShapeElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/SolidElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/SolidElement.js new file mode 100644 index 0000000000000000000000000000000000000000..0c5594a5237a055d5b3951eee68660039c3ed92d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/SolidElement.js @@ -0,0 +1,23 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; +import createNS from '../utils/helpers/svg_elements'; +import IImageElement from './ImageElement'; + +function ISolidElement(data, globalData, comp) { + this.initElement(data, globalData, comp); +} +extendPrototype([IImageElement], ISolidElement); + +ISolidElement.prototype.createContent = function () { + var rect = createNS('rect'); + /// /rect.style.width = this.data.sw; + /// /rect.style.height = this.data.sh; + /// /rect.style.fill = this.data.sc; + rect.setAttribute('width', this.data.sw); + rect.setAttribute('height', this.data.sh); + rect.setAttribute('fill', this.data.sc); + this.layerElement.appendChild(rect); +}; + +export default ISolidElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/TextElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/TextElement.js new file mode 100644 index 0000000000000000000000000000000000000000..18adf1f334fc4c514b8324d73f3fa7c9852d13d1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/TextElement.js @@ -0,0 +1,91 @@ +import LetterProps from '../utils/text/LetterProps'; +import TextProperty from '../utils/text/TextProperty'; +import TextAnimatorProperty from '../utils/text/TextAnimatorProperty'; +import buildShapeString from '../utils/shapes/shapePathBuilder'; + +function ITextElement() { +} + +ITextElement.prototype.initElement = function (data, globalData, comp) { + this.lettersChangedFlag = true; + this.initFrame(); + this.initBaseData(data, globalData, comp); + this.textProperty = new TextProperty(this, data.t, this.dynamicProperties); + this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this); + this.initTransform(data, globalData, comp); + this.initHierarchy(); + this.initRenderable(); + this.initRendererElement(); + this.createContainerElements(); + this.createRenderableComponents(); + this.createContent(); + this.hide(); + this.textAnimator.searchProperties(this.dynamicProperties); +}; + +ITextElement.prototype.prepareFrame = function (num) { + this._mdf = false; + this.prepareRenderableFrame(num); + this.prepareProperties(num, this.isInRange); + if (this.textProperty._mdf || this.textProperty._isFirstFrame) { + this.buildNewText(); + this.textProperty._isFirstFrame = false; + this.textProperty._mdf = false; + } +}; + +ITextElement.prototype.createPathShape = function (matrixHelper, shapes) { + var j; + var jLen = shapes.length; + var pathNodes; + var shapeStr = ''; + for (j = 0; j < jLen; j += 1) { + if (shapes[j].ty === 'sh') { + pathNodes = shapes[j].ks.k; + shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper); + } + } + return shapeStr; +}; + +ITextElement.prototype.updateDocumentData = function (newData, index) { + this.textProperty.updateDocumentData(newData, index); +}; + +ITextElement.prototype.canResizeFont = function (_canResize) { + this.textProperty.canResizeFont(_canResize); +}; + +ITextElement.prototype.setMinimumFontSize = function (_fontSize) { + this.textProperty.setMinimumFontSize(_fontSize); +}; + +ITextElement.prototype.applyTextPropertiesToMatrix = function (documentData, matrixHelper, lineNumber, xPos, yPos) { + if (documentData.ps) { + matrixHelper.translate(documentData.ps[0], documentData.ps[1] + documentData.ascent, 0); + } + matrixHelper.translate(0, -documentData.ls, 0); + switch (documentData.j) { + case 1: + matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]), 0, 0); + break; + case 2: + matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]) / 2, 0, 0); + break; + default: + break; + } + matrixHelper.translate(xPos, yPos, 0); +}; + +ITextElement.prototype.buildColor = function (colorData) { + return 'rgb(' + Math.round(colorData[0] * 255) + ',' + Math.round(colorData[1] * 255) + ',' + Math.round(colorData[2] * 255) + ')'; +}; + +ITextElement.prototype.emptyProp = new LetterProps(); + +ITextElement.prototype.destroy = function () { + +}; + +export default ITextElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVBaseElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVBaseElement.js new file mode 100644 index 0000000000000000000000000000000000000000..b2f0a8f968338319728907c4e01b2574ce3ce334 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVBaseElement.js @@ -0,0 +1,144 @@ +import assetManager from '../../utils/helpers/assetManager'; +import getBlendMode from '../../utils/helpers/blendModes'; +import Matrix from '../../3rd_party/transformation-matrix'; +import CVEffects from './CVEffects'; +import CVMaskElement from './CVMaskElement'; + +function CVBaseElement() { +} + +var operationsMap = { + 1: 'destination-in', + 2: 'destination-out', + 3: 'destination-in', + 4: 'destination-out', +}; + +CVBaseElement.prototype = { + createElements: function () {}, + initRendererElement: function () {}, + createContainerElements: function () { + // If the layer is masked we will use two buffers to store each different states of the drawing + // This solution is not ideal for several reason. But unfortunately, because of the recursive + // nature of the render tree, it's the only simple way to make sure one inner mask doesn't override an outer mask. + // TODO: try to reduce the size of these buffers to the size of the composition containing the layer + // It might be challenging because the layer most likely is transformed in some way + this.canvasContext = this.globalData.canvasContext; + this.transformCanvas = this.globalData.transformCanvas; + this.renderableEffectsManager = new CVEffects(this); + }, + createContent: function () {}, + setBlendMode: function () { + var globalData = this.globalData; + if (globalData.blendMode !== this.data.bm) { + globalData.blendMode = this.data.bm; + var blendModeValue = getBlendMode(this.data.bm); + globalData.canvasContext.globalCompositeOperation = blendModeValue; + } + }, + createRenderableComponents: function () { + this.maskManager = new CVMaskElement(this.data, this); + }, + hideElement: function () { + if (!this.hidden && (!this.isInRange || this.isTransparent)) { + this.hidden = true; + } + }, + showElement: function () { + if (this.isInRange && !this.isTransparent) { + this.hidden = false; + this._isFirstFrame = true; + this.maskManager._isFirstFrame = true; + } + }, + clearCanvas: function (canvasContext) { + canvasContext.clearRect( + this.transformCanvas.tx, + this.transformCanvas.ty, + this.transformCanvas.w * this.transformCanvas.sx, + this.transformCanvas.h * this.transformCanvas.sy + ); + }, + prepareLayer: function () { + if (this.data.tt >= 1) { + if (!this.canvasContext.saveLayer) { + return; + } + this.canvasContext.globalCompositeOperation = 'source-over'; + this.canvasContext.saveLayer(); + //保存递归图层 + this.canvasContext.saveLayer(); + //对之前的混合模式还原成默认模式 + this.canvasContext.globalCompositeOperation = 'source-over'; + + } + }, + exitLayer: function () { + if (this.data.tt >= 1) { + if (!this.canvasContext.saveLayer || !this.canvasContext.restoreLayer) { + return; + } + //恢复图层 + this.canvasContext.restoreLayer(); + //将递归图层和mask动效图层进行指定混合 + this.canvasContext.globalCompositeOperation = operationsMap[this.data.tt]; + //保存mask动效层 + this.canvasContext.saveLayer(); + //对之前的混合模式还原成默认模式 + this.canvasContext.globalCompositeOperation = 'source-over'; + // We draw the mask + const mask = this.comp.getElementById('tp' in this.data ? this.data.tp : this.data.ind - 1); + mask?.renderFrame(true); + //恢复图层 + this.canvasContext.restoreLayer(); + this.canvasContext.restoreLayer(); + this.canvasContext.globalCompositeOperation = 'source-over'; + } + }, + renderFrame: function (forceRender) { + if (this.hidden || this.data.hd) { + return; + } + if (this.data.td === 1 && !forceRender) { + return; + } + this.renderTransform && this.renderTransform(); + this.renderRenderable && this.renderRenderable(); + this.setBlendMode(); + var forceRealStack = this.data.ty === 0; + //开始处理mask数据:包含两层layer数据,需要创建两个离屏绘制上下文 + this.prepareLayer(); + this.globalData.renderer.save(forceRealStack); + this.globalData.renderer.ctxTransform(this.finalTransform.mat.props); + this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v); + this.renderInnerContent && this.renderInnerContent(); + this.globalData.renderer.restore(forceRealStack); + //将两个layer数据分别绘制到两个离屏画布上,通过将离屏绘制数据结合混合模式绘制到当前显示画布上,实现mask效果 + this.exitLayer(); + + //恢复高斯模糊的默认值,防止非高斯模糊图层也高斯模糊 + this.canvasContext.filter = 'blur(0px)' + + if (this.maskManager.hasMasks) { + this.globalData.renderer.restore(true); + } + if (this._isFirstFrame) { + this._isFirstFrame = false; + } + }, + changeColor: function (color, endColor, index) { + this._isFirstFrame = true; + this.renderShapeColor && this.renderShapeColor(color, endColor, index); + }, + destroy: function () { + this.canvasContext = null; + this.data = null; + this.globalData = null; + this.maskManager.destroy(); + }, + mHelper: new Matrix(), +}; +CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement; +CVBaseElement.prototype.show = CVBaseElement.prototype.showElement; + +export default CVBaseElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVCompElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVCompElement.js new file mode 100644 index 0000000000000000000000000000000000000000..b4078bbe840cef6e02876f4b43d172b6edf6c187 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVCompElement.js @@ -0,0 +1,111 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import { + createSizedArray, +} from '../../utils/helpers/arrays'; +import PropertyFactory from '../../utils/PropertyFactory'; +import CanvasRendererBase from '../../renderers/CanvasRendererBase'; +import CVBaseElement from './CVBaseElement'; +import ICompElement from '../CompElement'; + +function CVCompElement(data, globalData, comp) { + this.completeLayers = false; + this.layers = data.layers; + this.pendingElements = []; + this.elements = createSizedArray(this.layers?.length); + this.initElement(data, globalData, comp); + this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true }; +} + +extendPrototype([CanvasRendererBase, ICompElement, CVBaseElement], CVCompElement); + +CVCompElement.prototype.renderInnerContent = function () { + var ctx = this.canvasContext; + ctx.beginPath(); + ctx.moveTo(0, 0); + ctx.lineTo(this.data.w, 0); + ctx.lineTo(this.data.w, this.data.h); + ctx.lineTo(0, this.data.h); + ctx.lineTo(0, 0); + ctx.clip(); + var i; + var len = this.layers.length; + for (i = len - 1; i >= 0; i -= 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].renderFrame(); + } + } +}; + +CVCompElement.prototype.renderShapeColor = function (color, endColor, index) { + if (typeof endColor == 'object') { + if (Array.isArray(endColor)) { + if (!index) { + var i; + var len = this.layers.length; + for (i = len - 1; i >= 0; i -= 1) { + let tag = true; + if (this.layers[i] && this.layers[i].td) { + tag = false; + } + if (tag && (this.completeLayers || this.elements[i])) { + this.elements[i].changeColor(color, endColor); + } + } + } else { + if (this.completeLayers || this.elements[index-1]) { + this.elements[index-1].changeColor(color, endColor); + } + } + } + } else if (typeof endColor == 'number') { + if (!endColor) { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + let tag = true; + if (this.layers[i] && this.layers[i].td) { + tag = false; + } + if (tag && (this.completeLayers || this.elements[i])) { + this.elements[i].changeColor(color, undefined); + } + } + } else { + if (this.completeLayers || this.elements[endColor-1]) { + this.elements[endColor-1].changeColor(color, undefined); + } + } + } else { + var i; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + let tag = true; + if (this.layers[i] && this.layers[i].td) { + tag = false; + } + if (tag && (this.completeLayers || this.elements[i])) { + this.elements[i].changeColor(color, undefined); + } + } + } +} + +CVCompElement.prototype.destroy = function () { + var i; + var len = this.layers.length; + for (i = len - 1; i >= 0; i -= 1) { + if (this.elements[i]) { + this.elements[i].destroy(); + } + } + this.layers = null; + this.elements = null; +}; + +CVCompElement.prototype.createComp = function (data) { + return new CVCompElement(data, this.globalData, this); +}; + +export default CVCompElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVContextData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVContextData.js new file mode 100644 index 0000000000000000000000000000000000000000..f5d8b93d02faa73bed4b6fb0c881fa3edb9210fb --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVContextData.js @@ -0,0 +1,90 @@ +import { + createTypedArray, +} from '../../utils/helpers/arrays'; +import Matrix from '../../3rd_party/transformation-matrix'; + +function CVContextData() { + this.saved = []; + this.cArrPos = 0; + this.cTr = new Matrix(); + this.cO = 1; + var i; + var len = 15; + this.savedOp = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + this.saved[i] = createTypedArray('float32', 16); + } + this._length = len; +} + +CVContextData.prototype.duplicate = function () { + var newLength = this._length * 2; + var currentSavedOp = this.savedOp; + this.savedOp = createTypedArray('float32', newLength); + this.savedOp.set(currentSavedOp); + var i = 0; + for (i = this._length; i < newLength; i += 1) { + this.saved[i] = createTypedArray('float32', 16); + } + this._length = newLength; +}; + +CVContextData.prototype.reset = function () { + this.cArrPos = 0; + this.cTr.reset(); + this.cO = 1; +}; + +CVContextData.prototype.popTransform = function () { + var popped = this.saved[this.cArrPos]; + var i; + var arr = this.cTr.props; + for (i = 0; i < 16; i += 1) { + arr[i] = popped[i]; + } + return popped; +}; + +CVContextData.prototype.popOpacity = function () { + var popped = this.savedOp[this.cArrPos]; + this.cO = popped; + return popped; +}; + +CVContextData.prototype.pop = function () { + this.cArrPos -= 1; + var transform = this.popTransform(); + var opacity = this.popOpacity(); + return { + transform: transform, + opacity: opacity, + }; +}; + +CVContextData.prototype.push = function () { + var props = this.cTr.props; + if (this._length <= this.cArrPos) { + this.duplicate(); + } + var i; + var arr = this.saved[this.cArrPos]; + for (i = 0; i < 16; i += 1) { + arr[i] = props[i]; + } + this.savedOp[this.cArrPos] = this.cO; + this.cArrPos += 1; +}; + +CVContextData.prototype.getTransform = function () { + return this.cTr; +}; + +CVContextData.prototype.getOpacity = function () { + return this.cO; +}; + +CVContextData.prototype.setOpacity = function (value) { + this.cO = value; +}; + +export default CVContextData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVEffects.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVEffects.js new file mode 100644 index 0000000000000000000000000000000000000000..b36e7c637ec413b6002e6f2a708cf763e6891191 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVEffects.js @@ -0,0 +1,44 @@ +import CVGaussianBlurEffect from './effects/CVGaussianBlurEffect' + +var registeredEffects = {}; + +function CVEffects(elem) { + var i; + var len = elem.data.ef ? elem.data.ef.length : 0; + this.filters = []; + var filterManager; + for (i = 0; i < len; i += 1) { + filterManager = null; + var type = elem.data.ef[i].ty; + //创建高斯模糊效果对象,type为29才是高斯模糊 + if (registeredEffects[type]) { + filterManager = new CVGaussianBlurEffect(elem.effectsManager.effectElements[i], elem); + } + //存储高斯模糊效果对象 + if (filterManager) { + this.filters.push(filterManager); + } + } + //将高斯模糊效果添加到指定对象 + if (this.filters.length) { + elem.addRenderableComponent(this); + } +} + +CVEffects.prototype.renderFrame = function (_isFirstFrame) { + var i; + var len = this.filters.length; + for (i = 0; i < len; i += 1) { + this.filters[i].renderFrame(_isFirstFrame); + } +}; + +export function registerCVEffect(id, effect, countsAsEffect) { + //注册高斯模糊效果监听 + registeredEffects[id] = { + effect, + countsAsEffect, + }; +} + +export default CVEffects; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVImageElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVImageElement.js new file mode 100644 index 0000000000000000000000000000000000000000..153417b5de3931bc0e8752f5372cdf168c3ca5aa --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVImageElement.js @@ -0,0 +1,62 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import createTag from '../../utils/helpers/html_elements'; +import RenderableElement from '../helpers/RenderableElement'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import CVBaseElement from './CVBaseElement'; +import IImageElement from '../ImageElement'; +import SVGShapeElement from '../svgElements/SVGShapeElement'; + +function CVImageElement(data, globalData, comp) { + this.assetData = globalData.getAssetData(data.refId); + this.img = globalData.imageLoader.getAsset(this.assetData); + this.initElement(data, globalData, comp); +} +extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement); + +CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement; +CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame; + +CVImageElement.prototype.createContent = function () { + if (this.img && this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) { + var imgW = this.img.width; + var imgH = this.img.height; + var imgRel = imgW / imgH; + var canvasRel = this.assetData.w / this.assetData.h; + var widthCrop; + var heightCrop; + var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio; + if ((imgRel > canvasRel && par === 'xMidYMid slice') || (imgRel < canvasRel && par !== 'xMidYMid slice')) { + heightCrop = imgH; + widthCrop = heightCrop * canvasRel; + } else { + widthCrop = imgW; + heightCrop = widthCrop / canvasRel; + } + this.canvasContext.drawImage(this.img.pixel_map, (imgW - widthCrop) / 2, (imgH - heightCrop) / 2, widthCrop, heightCrop, 0, 0, this.assetData.w, this.assetData.h); + } +}; + +CVImageElement.prototype.renderInnerContent = function () { + if (this.img.pixel_map) { + //传入base64资源与rawfile资源解析出的pixelMap进行绘制 + this.canvasContext.drawImage(this.img.pixel_map, 0, 0, this.img.width, this.img.height); + } else { + this.canvasContext.drawImage(this.img, 0, 0); + } +}; + +CVImageElement.prototype.destroy = function () { + //释放pixel_map,防止内存泄漏 + if (this.img?.pixel_map) { + this.img.pixel_map.release(() => { + }); + } + this.img = null; +}; + +export default CVImageElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVMaskElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVMaskElement.js new file mode 100644 index 0000000000000000000000000000000000000000..2b2c3a1fcae517dddcb7cf1bdf19f5ad317a8806 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVMaskElement.js @@ -0,0 +1,116 @@ +import { + createSizedArray, +} from '../../utils/helpers/arrays'; + +import ShapePropertyFactory from '../../utils/shapes/ShapeProperty'; +import MaskElement from '../../mask'; +import ArrayList from '@ohos.util.ArrayList'; + +function CVMaskElement(data, element) { + this.data = data; + this.element = element; + this.masksProperties = this.data.masksProperties || []; + this.viewData = createSizedArray(this.masksProperties.length); + this.list = new ArrayList(); + this.ptsds = undefined; + var i; + var len = this.masksProperties.length; + var hasMasks = false; + for (i = 0; i < len; i += 1) { + if (this.masksProperties[i].mode !== 'n') { + hasMasks = true; + } + this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element, this.masksProperties[i], 3); + } + this.hasMasks = hasMasks; + if (hasMasks) { + this.element.addRenderableComponent(this); + } +} + +CVMaskElement.prototype.renderFrame = function () { + if (!this.hasMasks) { + return; + } + var transform = this.element.finalTransform.mat; + var ctx = this.element.canvasContext; + var i; + var len = this.masksProperties.length; + var pt; + var pts; + var data; + ctx.beginPath(); + for (i = 0; i < len; i += 1) { + if (this.masksProperties[i].mode !== 'n') { + if (this.masksProperties[i].mode == 's' && !this.masksProperties[i].inv) { + if (i == 0) { + ctx.moveTo(0, 0); + ctx.lineTo(this.element.globalData.compSize.w, 0); + ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h); + ctx.lineTo(0, this.element.globalData.compSize.h); + ctx.lineTo(0, 0); + } else { + if (this.ptsds && this.ptsds.length > 1) { + ctx.moveTo(this.ptsds[0], this.ptsds[1]); + } + this.list.forEach(value => { + ctx.lineTo(value[4], value[5]); + ctx.bezierCurveTo(value[0], value[1], value[2], value[3], value[4], value[5]); + }) + } + data = this.viewData[i].v; + pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0); + ctx.moveTo(pt[0], pt[1]); + var j; + var jLen = data._length; + for (j = 1; j < jLen; j += 1) { + pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]); + ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); + } + pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]); + ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); + + } else { + if (this.masksProperties[i].inv) { + ctx.moveTo(0, 0); + ctx.lineTo(this.element.globalData.compSize.w, 0); + ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h); + ctx.lineTo(0, this.element.globalData.compSize.h); + ctx.lineTo(0, 0); + } + data = this.viewData[i].v; + pt = transform.applyToPointArray(data.v[0][0], data.v[0][1], 0); + ctx.moveTo(pt[0], pt[1]); + var j; + var jLen = data._length; + if (i == 0) { + this.list.clear(); + var ptsd; + this.ptsds = pt; + for (j = jLen - 1; j > 0; j--) { + ptsd = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]); + this.list.add(ptsd); + } + + } + for (j = 1; j < jLen; j += 1) { + pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]); + ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); + } + pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]); + ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]); + } + } + } + this.element.globalData.renderer.save(true); + ctx.clip(); +}; + +CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty; + +CVMaskElement.prototype.destroy = function () { + this.element = null; + this.list = null; +}; + +export default CVMaskElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVShapeElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVShapeElement.js new file mode 100644 index 0000000000000000000000000000000000000000..3096b487641bd353be24f446a433281dd75bf29b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVShapeElement.js @@ -0,0 +1,655 @@ +import { + degToRads, + bmFloor, +} from '../../utils/common'; + +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import PropertyFactory from '../../utils/PropertyFactory'; +import RenderableElement from '../helpers/RenderableElement'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import RenderableDOMElement from '../helpers/RenderableDOMElement'; +import ShapeTransformManager from '../helpers/shapes/ShapeTransformManager'; +import CVBaseElement from './CVBaseElement'; +import IShapeElement from '../ShapeElement'; +import GradientProperty from '../../utils/shapes/GradientProperty'; +import DashProperty from '../../utils/shapes/DashProperty'; +import TransformPropertyFactory from '../../utils/TransformProperty'; +import CVShapeData from '../helpers/shapes/CVShapeData'; +import { ShapeModifiers } from '../../utils/shapes/ShapeModifiers'; +import { + lineCapEnum, + lineJoinEnum, +} from '../../utils/helpers/shapeEnums'; +import { LogUtil } from '../../utils/LogUtil'; + +function CVShapeElement(data, globalData, comp) { + this.shapes = []; + this.shapesData = data.shapes; + this.stylesList = []; + this.itemsData = []; + this.prevViewData = []; + this.shapeModifiers = []; + this.processedElements = []; + this.transformsManager = new ShapeTransformManager(); + this.initElement(data, globalData, comp); +} + +extendPrototype([BaseElement, TransformElement, CVBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableElement], CVShapeElement); + +CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement; + +CVShapeElement.prototype.transformHelper = { opacity: 1, _opMdf: false }; + +CVShapeElement.prototype.dashResetter = []; + +CVShapeElement.prototype.createContent = function () { + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []); +}; + +CVShapeElement.prototype.createStyleElement = function (data, transforms) { + var styleElem = { + data: data, + type: data.ty, + preTransforms: this.transformsManager.addTransformSequence(transforms), + transforms: [], + elements: [], + closed: data.hd === true, + }; + var elementData = {}; + if (data.ty === 'fl' || data.ty === 'st') { + elementData.c = PropertyFactory.getProp(this, data.c, 1, 255, this); + if (!elementData.c.k) { + styleElem.co = 'rgb(' + bmFloor(elementData.c.v[0]) + ',' + bmFloor(elementData.c.v[1]) + ',' + bmFloor(elementData.c.v[2]) + ')'; + } + } else if (data.ty === 'gf' || data.ty === 'gs') { + elementData.s = PropertyFactory.getProp(this, data.s, 1, null, this); + elementData.e = PropertyFactory.getProp(this, data.e, 1, null, this); + elementData.h = PropertyFactory.getProp(this, data.h || { k: 0 }, 0, 0.01, this); + elementData.a = PropertyFactory.getProp(this, data.a || { k: 0 }, 0, degToRads, this); + elementData.g = new GradientProperty(this, data.g, this); + } + elementData.o = PropertyFactory.getProp(this, data.o, 0, 0.01, this); + if (data.ty === 'st' || data.ty === 'gs') { + styleElem.lc = lineCapEnum[data.lc || 2]; + styleElem.lj = lineJoinEnum[data.lj || 2]; + if (data.lj == 1) { // eslint-disable-line eqeqeq + styleElem.ml = data.ml; + } + elementData.w = PropertyFactory.getProp(this, data.w, 0, null, this); + if (!elementData.w.k) { + styleElem.wi = elementData.w.v; + } + if (data.d) { + var d = new DashProperty(this, data.d, 'canvas', this); + elementData.d = d; + if (!elementData.d.k) { + styleElem.da = elementData.d.dashArray; + styleElem.do = elementData.d.dashoffset[0]; + } + } + } else { + styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero'; + } + this.stylesList.push(styleElem); + elementData.style = styleElem; + return elementData; +}; + +CVShapeElement.prototype.createGroupElement = function () { + var elementData = { + it: [], + prevViewData: [], + }; + return elementData; +}; + +CVShapeElement.prototype.createTransformElement = function (data) { + var elementData = { + transform: { + opacity: 1, + _opMdf: false, + key: this.transformsManager.getNewKey(), + op: PropertyFactory.getProp(this, data.o, 0, 0.01, this), + mProps: TransformPropertyFactory.getTransformProperty(this, data, this), + }, + }; + return elementData; +}; + +CVShapeElement.prototype.createShapeElement = function (data) { + var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager); + + this.shapes.push(elementData); + this.addShapeToModifiers(elementData); + return elementData; +}; + +CVShapeElement.prototype.reloadShapes = function () { + this._isFirstFrame = true; + var i; + var len = this.itemsData.length; + for (i = 0; i < len; i += 1) { + this.prevViewData[i] = this.itemsData[i]; + } + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, true, []); + len = this.dynamicProperties.length; + for (i = 0; i < len; i += 1) { + this.dynamicProperties[i].getValue(); + } + this.renderModifiers(); + this.transformsManager.processSequences(this._isFirstFrame); +}; + +CVShapeElement.prototype.addTransformToStyleList = function (transform) { + var i; + var len = this.stylesList.length; + for (i = 0; i < len; i += 1) { + if (!this.stylesList[i].closed) { + this.stylesList[i].transforms.push(transform); + } + } +}; + +CVShapeElement.prototype.removeTransformFromStyleList = function () { + var i; + var len = this.stylesList.length; + for (i = 0; i < len; i += 1) { + if (!this.stylesList[i].closed) { + this.stylesList[i].transforms.pop(); + } + } +}; + +CVShapeElement.prototype.closeStyles = function (styles) { + var i; + var len = styles.length; + for (i = 0; i < len; i += 1) { + styles[i].closed = true; + } +}; + +CVShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, shouldRender, transforms) { + var i; + var len = arr.length - 1; + var j; + var jLen; + var ownStyles = []; + var ownModifiers = []; + var processedPos; + var modifier; + var currentTransform; + var ownTransforms = [].concat(transforms); + for (i = len; i >= 0; i -= 1) { + processedPos = this.searchProcessedElement(arr[i]); + if (!processedPos) { + arr[i]._shouldRender = shouldRender; + } else { + itemsData[i] = prevViewData[processedPos - 1]; + } + if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs') { + if (!processedPos) { + itemsData[i] = this.createStyleElement(arr[i], ownTransforms); + } else { + itemsData[i].style.closed = false; + } + + ownStyles.push(itemsData[i].style); + } else if (arr[i].ty === 'gr') { + if (!processedPos) { + itemsData[i] = this.createGroupElement(arr[i]); + } else { + jLen = itemsData[i].it.length; + for (j = 0; j < jLen; j += 1) { + itemsData[i].prevViewData[j] = itemsData[i].it[j]; + } + } + this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, shouldRender, ownTransforms); + } else if (arr[i].ty === 'tr') { + if (!processedPos) { + currentTransform = this.createTransformElement(arr[i]); + itemsData[i] = currentTransform; + } + ownTransforms.push(itemsData[i]); + this.addTransformToStyleList(itemsData[i]); + } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') { + if (!processedPos) { + itemsData[i] = this.createShapeElement(arr[i]); + } + } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') { + if (!processedPos) { + modifier = ShapeModifiers.getModifier(arr[i].ty); + modifier.init(this, arr[i]); + itemsData[i] = modifier; + this.shapeModifiers.push(modifier); + } else { + modifier = itemsData[i]; + modifier.closed = false; + } + ownModifiers.push(modifier); + } else if (arr[i].ty === 'rp') { + if (!processedPos) { + modifier = ShapeModifiers.getModifier(arr[i].ty); + itemsData[i] = modifier; + modifier.init(this, arr, i, itemsData); + this.shapeModifiers.push(modifier); + shouldRender = false; + } else { + modifier = itemsData[i]; + modifier.closed = true; + } + ownModifiers.push(modifier); + } + this.addProcessedElement(arr[i], i + 1); + } + this.removeTransformFromStyleList(); + this.closeStyles(ownStyles); + len = ownModifiers.length; + for (i = 0; i < len; i += 1) { + ownModifiers[i].closed = true; + } +}; + +CVShapeElement.prototype.renderInnerContent = function () { + this.transformHelper.opacity = 1; + this.transformHelper._opMdf = false; + this.renderModifiers(); + this.transformsManager.processSequences(this._isFirstFrame); + this.renderShape(this.transformHelper, this.shapesData, this.itemsData, true); +}; + +CVShapeElement.prototype.renderShapeTransform = function (parentTransform, groupTransform) { + if (parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) { + groupTransform.opacity = parentTransform.opacity; + groupTransform.opacity *= groupTransform.op.v; + groupTransform._opMdf = true; + } +}; + +CVShapeElement.prototype.drawLayer = function () { + var i; + var len = this.stylesList.length; + var j; + var jLen; + var k; + var kLen; + var elems; + var nodes; + var renderer = this.globalData.renderer; + var ctx = this.globalData.canvasContext; + var type; + var currentStyle; + for (i = 0; i < len; i += 1) { + currentStyle = this.stylesList[i]; + type = currentStyle.type; + + // Skipping style when + // Stroke width equals 0 + // style should not be rendered (extra unused repeaters) + // current opacity equals 0 + // global opacity equals 0 + if (!(((type === 'st' || type === 'gs') && currentStyle.wi === 0) || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0)) { + renderer.save(); + elems = currentStyle.elements; + if (type === 'st' || type === 'gs') { + ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd; + ctx.lineWidth = currentStyle.wi; + ctx.lineCap = currentStyle.lc; + ctx.lineJoin = currentStyle.lj; + ctx.miterLimit = currentStyle.ml || 0; + } else { + ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd; + } + renderer.ctxOpacity(currentStyle.coOp); + if (type !== 'st' && type !== 'gs') { + ctx.beginPath(); + } + renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props); + jLen = elems.length; + for (j = 0; j < jLen; j += 1) { + if (type === 'st' || type === 'gs') { + ctx.beginPath(); + if (currentStyle.da) { + //ctx.setLineDash()无法自动将currentStyle.da拆分为两个参数,导致传入接口参数个数不正确,所以这里需要手动拆分 + //判断currentStyle.da数组长度是否大于等于2,如果是则把数组的值取出来,传给ctx.setLineDash()方法 + if (currentStyle.da.length >= 2) { + var s1 = currentStyle.da[0]; + var s2 = currentStyle.da[1]; + ctx.setLineDash([s1, s2]); + } else { + var s1 = currentStyle.da[0]; + ctx.setLineDash([s1]); + } + ctx.lineDashOffset = currentStyle.do; + } + } + nodes = elems[j].trNodes; + kLen = nodes.length; + + for (k = 0; k < kLen; k += 1) { + if (nodes[k].t === 'm') { + ctx.moveTo(nodes[k].p[0], nodes[k].p[1]); + } else if (nodes[k].t === 'c') { + ctx.bezierCurveTo(nodes[k].pts[0], nodes[k].pts[1], nodes[k].pts[2], nodes[k].pts[3], nodes[k].pts[4], nodes[k].pts[5]); + } else { + ctx.closePath(); + } + } + if (type === 'st' || type === 'gs') { + ctx.stroke(); + if (currentStyle.da) { + ctx.setLineDash(this.dashResetter); + } + } + } + if (type !== 'st' && type !== 'gs') { + ctx.fill(currentStyle.r); + } + renderer.restore(); + } + } +}; + +CVShapeElement.prototype.applyColorToArray = function (targetArray, colorArray, maxChannels) { + if (targetArray) { + const channerlsToProcess = Math.min(maxChannels, targetArray.length); + for (let i = 0; i < channerlsToProcess; i++) { + targetArray[i] = colorArray[i] / 255.0; + } + } +}; + +CVShapeElement.prototype.keyframeColor = function (keyframe, color, endColor, number, isKeyframer) { + if (!keyframe) { + return; + } + if (number >= 1 && number <= 3) { + const channels = number; // 根据 number 确定需要处理通道 + + // 处理 keyframe.s + if (keyframe.s) { + this.applyColorToArray(keyframe.s, color, channels); + } + + // 处理 keyframe.e + if (keyframe.e) { + if (isKeyframer) { + this.applyColorToArray(keyframe.e, endColor, channels); + } else { + this.applyColorToArray(keyframe.e, color, channels); + } + } + } +}; + +CVShapeElement.prototype.changeColors = function (color, frame) { + if (color.length > 2) { // 修改图层颜色 + [frame[0], frame[1], frame[2]] = color; + } else if (color.length === 2) { + [frame[0], frame[1]] = color; + } else if (color.length === 1) { + [frame[0]] = color; + } else { + LogUtil.info('--lottie_ohos animation changecolor the input color parameter is not in RGB format.'); + } +}; + +CVShapeElement.prototype.flColor = function (index, data, color, endColor) { + try { + let lens = data[index].c.data.k.length; + let ii; + let keyframe = data[index].c.data.k[0]; + let frame = data[index].c.v; + if (!!endColor && endColor.length > 0) { + for (ii = 0; ii < lens; ii++) { // 修改关键帧颜色 + if (color.length > 2 && endColor.length > 2) { + this.keyframeColor(keyframe, color, endColor, 3, true); + } else if (color.length === 2 && endColor.length > 1) { + this.keyframeColor(keyframe, color, endColor, 2, true); + } else if (color.length === 1 && endColor.length > 0) { + this.keyframeColor(keyframe, color, endColor, 1, true); + } else { + } + if (color.length > 2 && endColor.length > 2 && ii > 0) { + let keyframe1 = data[index].c.data.k[ii]; + this.keyframeColor(keyframe1, color, endColor, 3, true); + } else if (color.length === 2 && endColor.length > 1 && ii > 0) { + let keyframe1 = data[index].c.data.k[ii]; + this.keyframeColor(keyframe1, color, endColor, 2, true); + } else if (color.length === 1 && endColor.length > 0 && ii > 0) { + let keyframe1 = data[index].c.data.k[ii]; + this.keyframeColor(keyframe1, color, endColor, 1, true); + } else { + } + } + this.changeColors(endColor, frame); + } else { + for (ii = 0; ii < lens; ii++) { // 修改关键帧颜色 + let keyframe2 = data[index].c.data.k[ii]; + if (color.length > 2) { + this.keyframeColor(keyframe2, color, endColor, 3, false); + } else if (color.length === 2) { + this.keyframeColor(keyframe2, color, endColor, 2, false); + } else if (color.length === 1) { + this.keyframeColor(keyframe2, color, endColor, 1, false); + } else { + LogUtil.info('--lottie_ohos animation changecolor the input color parameter is not in RGB format.'); + } + } + this.changeColors(color, frame); + } + if (color.length === 4) { + data[index].o.v = color[3]; + } + } catch (error) { + LogUtil.info('--lottie_ohos animation changecolor the input color parameter is not in RGB format.'); + } +}; + +CVShapeElement.prototype.renderShapeColor = function (color, endColor, items, data) { + if (!items || items.length === 0) { + items = this.shapesData; + data = this.itemsData; + } + var i; + var len = items.length - 1; + for (i = len; i >= 0; i -= 1) { + if (items[i].ty === 'fl' || items[i].ty === 'st') { + this.flColor(i, data, color, endColor); + } else if (items[i].ty === 'gr') { + this.renderShapeColor(color, endColor, items[i].it, data[i].it) + } else if (items[i].ty === 'gf' || items[i].ty === 'gs') { + try { + data[i].style.grd = undefined; + var j; + var lenss = 3; + for (j = 0; j < lenss; j += 1) { + if (color.length >= 3) { + data[i].g.c[j * 4 + 1] = color[0]; + data[i].g.c[j * 4 + 2] = color[1]; + data[i].g.c[j * 4 + 3] = color[2]; + } else if (color.length === 2) { + data[i].g.c[j * 4 + 1] = color[0]; + data[i].g.c[j * 4 + 2] = color[1]; + } else if (color.length === 1) { + data[i].g.c[j * 4 + 1] = color[0]; + } + } + } catch (error) { + } + } + } +} + +CVShapeElement.prototype.renderShape = function (parentTransform, items, data, isMain) { + var i; + var len = items.length - 1; + var groupTransform; + groupTransform = parentTransform; + for (i = len; i >= 0; i -= 1) { + if (items[i].ty === 'tr') { + groupTransform = data[i].transform; + this.renderShapeTransform(parentTransform, groupTransform); + } else if (items[i].ty === 'sh' || items[i].ty === 'el' || items[i].ty === 'rc' || items[i].ty === 'sr') { + this.renderPath(items[i], data[i]); + } else if (items[i].ty === 'fl') { + this.renderFill(items[i], data[i], groupTransform); + } else if (items[i].ty === 'st') { + this.renderStroke(items[i], data[i], groupTransform); + } else if (items[i].ty === 'gf' || items[i].ty === 'gs') { + this.renderGradientFill(items[i], data[i], groupTransform); + } else if (items[i].ty === 'gr') { + this.renderShape(groupTransform, items[i].it, data[i].it); + } else if (items[i].ty === 'tm') { + // + } + } + if (isMain) { + this.drawLayer(); + } +}; + +CVShapeElement.prototype.renderStyledShape = function (styledShape, shape) { + if (this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) { + var shapeNodes = styledShape.trNodes; + var paths = shape.paths; + var i; + var len; + var j; + var jLen = paths._length; + shapeNodes.length = 0; + var groupTransformMat = styledShape.transforms.finalTransform; + for (j = 0; j < jLen; j += 1) { + var pathNodes = paths.shapes[j]; + if (pathNodes && pathNodes.v) { + len = pathNodes._length; + for (i = 1; i < len; i += 1) { + if (i === 1) { + shapeNodes.push({ + t: 'm', + p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0), + }); + } + shapeNodes.push({ + t: 'c', + pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i]), + }); + } + if (len === 1) { + shapeNodes.push({ + t: 'm', + p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0), + }); + } + if (pathNodes.c && len) { + shapeNodes.push({ + t: 'c', + pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0]), + }); + shapeNodes.push({ + t: 'z', + }); + } + } + } + styledShape.trNodes = shapeNodes; + } +}; + +CVShapeElement.prototype.renderPath = function (pathData, itemData) { + if (pathData.hd !== true && pathData._shouldRender) { + var i; + var len = itemData.styledShapes.length; + for (i = 0; i < len; i += 1) { + this.renderStyledShape(itemData.styledShapes[i], itemData.sh); + } + } +}; + +CVShapeElement.prototype.renderFill = function (styleData, itemData, groupTransform) { + var styleElem = itemData.style; + + if (itemData.c._mdf || this._isFirstFrame) { + styleElem.co = 'rgb(' + + bmFloor(itemData.c.v[0]) + ',' + + bmFloor(itemData.c.v[1]) + ',' + + bmFloor(itemData.c.v[2]) + ')'; + } + if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) { + styleElem.coOp = itemData.o.v * groupTransform.opacity; + } +}; + +CVShapeElement.prototype.renderGradientFill = function (styleData, itemData, groupTransform) { + var styleElem = itemData.style; + var grd; + if (!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || (styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf))) { + var ctx = this.globalData.canvasContext; + var pt1 = itemData.s.v; + var pt2 = itemData.e.v; + if (styleData.t === 1) { + grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]); + } else { + var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2)); + var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]); + + var percent = itemData.h.v; + if (percent >= 1) { + percent = 0.99; + } else if (percent <= -1) { + percent = -0.99; + } + var dist = rad * percent; + var x = Math.cos(ang + itemData.a.v) * dist + pt1[0]; + var y = Math.sin(ang + itemData.a.v) * dist + pt1[1]; + grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad); + } + + var i; + var len = styleData.g.p; + var cValues = itemData.g.c; + var opacity = 1; + let len1 = itemData.g.o.length; + for (i = 0; i < len; i += 1) { + let index = i * 2 + 1; + if (itemData.g._hasOpacity && len1 > index) { + opacity = itemData.g.o[index]; + } + grd.addColorStop(cValues[i * 4] / 100, 'rgba(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ',' + opacity + ')'); + } + styleElem.grd = grd; + } + styleElem.coOp = itemData.o.v * groupTransform.opacity; +}; + +CVShapeElement.prototype.renderStroke = function (styleData, itemData, groupTransform) { + var styleElem = itemData.style; + var d = itemData.d; + if (d && (d._mdf || this._isFirstFrame)) { + styleElem.da = d.dashArray; + styleElem.do = d.dashoffset[0]; + } + if (itemData.c._mdf || this._isFirstFrame) { + styleElem.co = 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'; + } + if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) { + styleElem.coOp = itemData.o.v * groupTransform.opacity; + } + if (itemData.w._mdf || this._isFirstFrame) { + styleElem.wi = itemData.w.v; + } +}; + +CVShapeElement.prototype.destroy = function () { + this.shapesData = null; + this.globalData = null; + this.canvasContext = null; + this.stylesList.length = 0; + this.itemsData.length = 0; +}; + +export default CVShapeElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVSolidElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVSolidElement.js new file mode 100644 index 0000000000000000000000000000000000000000..61eadd805387c07f9ad308a16bac4f59336b9820 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVSolidElement.js @@ -0,0 +1,28 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import RenderableElement from '../helpers/RenderableElement'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import CVBaseElement from './CVBaseElement'; +import IImageElement from '../ImageElement'; +import SVGShapeElement from '../svgElements/SVGShapeElement'; + +function CVSolidElement(data, globalData, comp) { + this.initElement(data, globalData, comp); +} +extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement); + +CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement; +CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame; + +CVSolidElement.prototype.renderInnerContent = function () { + var ctx = this.canvasContext; + ctx.fillStyle = this.data.sc; + ctx.fillRect(0, 0, this.data.sw, this.data.sh); + // +}; + +export default CVSolidElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVTextElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVTextElement.js new file mode 100644 index 0000000000000000000000000000000000000000..eacbd2aced0b2666ff627f661f1fd9026b1e2764 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/CVTextElement.js @@ -0,0 +1,234 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import { + createSizedArray, +} from '../../utils/helpers/arrays'; +import createTag from '../../utils/helpers/html_elements'; +import RenderableElement from '../helpers/RenderableElement'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import ITextElement from '../TextElement'; +import CVBaseElement from './CVBaseElement'; + +function CVTextElement(data, globalData, comp) { + this.textSpans = []; + this.yOffset = 0; + this.fillColorAnim = false; + this.strokeColorAnim = false; + this.strokeWidthAnim = false; + this.stroke = false; + this.fill = false; + this.justifyOffset = 0; + this.currentRender = null; + this.renderType = 'canvas'; + this.values = { + fill: 'rgba(0,0,0,0)', + stroke: 'rgba(0,0,0,0)', + sWidth: 0, + fValue: '', + }; + this.initElement(data, globalData, comp); +} +extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement, ITextElement], CVTextElement); + +// 不支持动态创建Canvas,使用空对象替换 +CVTextElement.prototype.tHelper = {}; + +CVTextElement.prototype.buildNewText = function () { + var documentData = this.textProperty.currentData; + this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0); + + var hasFill = false; + if (documentData.fc) { + hasFill = true; + this.values.fill = this.buildColor(documentData.fc); + } else { + this.values.fill = 'rgba(0,0,0,0)'; + } + this.fill = hasFill; + var hasStroke = false; + if (documentData.sc) { + hasStroke = true; + this.values.stroke = this.buildColor(documentData.sc); + this.values.sWidth = documentData.sw; + } + var fontData = this.globalData.fontManager.getFontByName(documentData.f); + var i; + var len; + var letters = documentData.l; + var matrixHelper = this.mHelper; + this.stroke = hasStroke; + this.values.fValue = documentData.finalSize + 'px ' + this.globalData.fontManager.getFontByName(documentData.f).fFamily; + len = documentData.finalText.length; + // this.tHelper.font = this.values.fValue; + var charData; + var shapeData; + var k; + var kLen; + var shapes; + var j; + var jLen; + var pathNodes; + var commands; + var pathArr; + var singleShape = this.data.singleShape; + var trackingOffset = documentData.tr * 0.001 * documentData.finalSize; + var xPos = 0; + var yPos = 0; + var firstLine = true; + var cnt = 0; + for (i = 0; i < len; i += 1) { + charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily); + shapeData = (charData && charData.data) || {}; + matrixHelper.reset(); + if (singleShape && letters[i].n) { + xPos = -trackingOffset; + yPos += documentData.yOffset; + yPos += firstLine ? 1 : 0; + firstLine = false; + } + shapes = shapeData.shapes && shapeData.shapes.length > 0 ? shapeData.shapes[0].it : []; + jLen = shapes.length; + matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100); + if (singleShape) { + this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos); + } + commands = createSizedArray(jLen - 1); + var commandsCounter = 0; + for (j = 0; j < jLen; j += 1) { + if (shapes[j].ty === 'sh') { + kLen = shapes[j].ks.k.i.length; + pathNodes = shapes[j].ks.k; + pathArr = []; + for (k = 1; k < kLen; k += 1) { + if (k === 1) { + pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0)); + } + pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToY(pathNodes.i[k][0], pathNodes.i[k][1], 0), matrixHelper.applyToX(pathNodes.v[k][0], pathNodes.v[k][1], 0), matrixHelper.applyToY(pathNodes.v[k][0], pathNodes.v[k][1], 0)); + } + pathArr.push(matrixHelper.applyToX(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToY(pathNodes.o[k - 1][0], pathNodes.o[k - 1][1], 0), matrixHelper.applyToX(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToY(pathNodes.i[0][0], pathNodes.i[0][1], 0), matrixHelper.applyToX(pathNodes.v[0][0], pathNodes.v[0][1], 0), matrixHelper.applyToY(pathNodes.v[0][0], pathNodes.v[0][1], 0)); + commands[commandsCounter] = pathArr; + commandsCounter += 1; + } + } + if (singleShape) { + xPos += letters[i].l; + xPos += trackingOffset; + } + if (this.textSpans[cnt]) { + this.textSpans[cnt].elem = commands; + } else { + this.textSpans[cnt] = { elem: commands }; + } + cnt += 1; + } +}; + +CVTextElement.prototype.renderInnerContent = function () { + var ctx = this.canvasContext; + ctx.font = this.values.fValue; + ctx.lineCap = 'butt'; + ctx.lineJoin = 'miter'; + ctx.miterLimit = 4; + + if (!this.data.singleShape) { + this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag); + } + + var i; + var len; + var j; + var jLen; + var k; + var kLen; + var renderedLetters = this.textAnimator.renderedLetters; + + var letters = this.textProperty.currentData.l; + + len = letters.length; + var renderedLetter; + var lastFill = null; + var lastStroke = null; + var lastStrokeW = null; + var commands; + var pathArr; + for (i = 0; i < len; i += 1) { + if (!letters[i].n) { + renderedLetter = renderedLetters[i]; + if (renderedLetter) { + this.globalData.renderer.save(); + this.globalData.renderer.ctxTransform(renderedLetter.p); + this.globalData.renderer.ctxOpacity(renderedLetter.o); + } + if (this.fill) { + if (renderedLetter && renderedLetter.fc) { + if (lastFill !== renderedLetter.fc) { + lastFill = renderedLetter.fc; + ctx.fillStyle = renderedLetter.fc; + } + } else if (lastFill !== this.values.fill) { + lastFill = this.values.fill; + ctx.fillStyle = this.values.fill; + } + commands = this.textSpans[i].elem; + jLen = commands.length; + this.globalData.canvasContext.beginPath(); + for (j = 0; j < jLen; j += 1) { + pathArr = commands[j]?.map((item) => { + return px2vp(item); + }); + kLen = pathArr.length; + this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]); + for (k = 2; k < kLen; k += 6) { + this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]); + } + } + this.globalData.canvasContext.closePath(); + this.globalData.canvasContext.fill(); + ctx.fillText(letters[i].val,0,0); + } + if (this.stroke) { + if (renderedLetter && renderedLetter.sw) { + if (lastStrokeW !== renderedLetter.sw) { + lastStrokeW = renderedLetter.sw; + ctx.lineWidth = renderedLetter.sw; + } + } else if (lastStrokeW !== this.values.sWidth) { + lastStrokeW = this.values.sWidth; + ctx.lineWidth = this.values.sWidth; + } + if (renderedLetter && renderedLetter.sc) { + if (lastStroke !== renderedLetter.sc) { + lastStroke = renderedLetter.sc; + ctx.strokeStyle = renderedLetter.sc; + } + } else if (lastStroke !== this.values.stroke) { + lastStroke = this.values.stroke; + ctx.strokeStyle = this.values.stroke; + } + commands = this.textSpans[i].elem; + jLen = commands.length; + this.globalData.canvasContext.beginPath(); + for (j = 0; j < jLen; j += 1) { + pathArr = commands[j]; + kLen = pathArr.length; + this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]); + for (k = 2; k < kLen; k += 6) { + this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]); + } + } + this.globalData.canvasContext.closePath(); + this.globalData.canvasContext.stroke(); + ctx.strokeText(letters[i].val,0,0); + } + if (renderedLetter) { + this.globalData.renderer.restore(); + } + } + } +}; + +export default CVTextElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/effects/CVGaussianBlurEffect.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/effects/CVGaussianBlurEffect.js new file mode 100644 index 0000000000000000000000000000000000000000..d5f4871f9f1389fe9a58c7be99873641cb3f5264 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/canvasElements/effects/CVGaussianBlurEffect.js @@ -0,0 +1,14 @@ +function CVGaussianBlurEffect(filterManager, elem) { + this.filterManager = filterManager; + this.canvasContext = elem.canvasContext; +} + +CVGaussianBlurEffect.prototype.renderFrame = function (forceRender) { + //获取图层高斯模糊值 + var sigma = this.filterManager.effectElements[0].p.v; + //给图层设置高斯模糊效果 + this.canvasContext.filter = 'blur(' + sigma + 'px)'; + +}; + +export default CVGaussianBlurEffect; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/FrameElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/FrameElement.js new file mode 100644 index 0000000000000000000000000000000000000000..cb37450a8d1f0806d82305e4b865b3bc930fe5fa --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/FrameElement.js @@ -0,0 +1,54 @@ +/** + * @file + * Handles element's layer frame update. + * Checks layer in point and out point + * + */ + +function FrameElement() {} + +FrameElement.prototype = { + /** + * @function + * Initializes frame related properties. + * + */ + initFrame: function () { + // set to true when inpoint is rendered + this._isFirstFrame = false; + // list of animated properties + this.dynamicProperties = []; + // If layer has been modified in current tick this will be true + this._mdf = false; + }, + /** + * @function + * Calculates all dynamic values + * + * @param {number} num + * current frame number in Layer's time + * @param {boolean} isVisible + * if layers is currently in range + * + */ + prepareProperties: function (num, isVisible) { + var i; + var len = this.dynamicProperties.length; + for (i = 0; i < len; i += 1) { + if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) { + this.dynamicProperties[i].getValue(); + if (this.dynamicProperties[i]._mdf) { + this.globalData._mdf = true; + this._mdf = true; + } + } + } + }, + addDynamicProperty: function (prop) { + if (this.dynamicProperties.indexOf(prop) === -1) { + this.dynamicProperties.push(prop); + } + }, +}; + +export default FrameElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/HierarchyElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/HierarchyElement.js new file mode 100644 index 0000000000000000000000000000000000000000..6d44896a819597c832dad2143efe5c83834361f0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/HierarchyElement.js @@ -0,0 +1,52 @@ +/** + * @file + * Handles AE's layer parenting property. + * + */ + +function HierarchyElement() {} + +HierarchyElement.prototype = { + /** + * @function + * Initializes hierarchy properties + * + */ + initHierarchy: function () { + // element's parent list + this.hierarchy = []; + // if element is parent of another layer _isParent will be true + this._isParent = false; + this.checkParenting(); + }, + /** + * @function + * Sets layer's hierarchy. + * @param {array} hierarch + * layer's parent list + * + */ + setHierarchy: function (hierarchy) { + this.hierarchy = hierarchy; + }, + /** + * @function + * Sets layer as parent. + * + */ + setAsParent: function () { + this._isParent = true; + }, + /** + * @function + * Searches layer's parenting chain + * + */ + checkParenting: function () { + if (this.data.parent !== undefined) { + this.comp.buildElementParenting(this, this.data.parent, []); + } + }, +}; + +export default HierarchyElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/RenderableDOMElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/RenderableDOMElement.js new file mode 100644 index 0000000000000000000000000000000000000000..2ad657fd6b85b7c9f5c13d370e0c106accdb2709 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/RenderableDOMElement.js @@ -0,0 +1,77 @@ +import { + extendPrototype, + createProxyFunction, +} from '../../utils/functionExtensions'; +import RenderableElement from './RenderableElement'; + +function RenderableDOMElement() {} + +(function () { + var _prototype = { + initElement: function (data, globalData, comp) { + this.initFrame(); + this.initBaseData(data, globalData, comp); + this.initTransform(data, globalData, comp); + this.initHierarchy(); + this.initRenderable(); + this.initRendererElement(); + this.createContainerElements(); + this.createRenderableComponents(); + this.createContent(); + this.hide(); + }, + hide: function () { + // console.log('HIDE', this); + if (!this.hidden && (!this.isInRange || this.isTransparent)) { + var elem = this.baseElement || this.layerElement; + elem.style.display = 'none'; + this.hidden = true; + } + }, + show: function () { + // console.log('SHOW', this); + if (this.isInRange && !this.isTransparent) { + if (!this.data.hd) { + var elem = this.baseElement || this.layerElement; + elem.style.display = 'block'; + } + this.hidden = false; + this._isFirstFrame = true; + } + }, + renderFrame: function () { + // If it is exported as hidden (data.hd === true) no need to render + // If it is not visible no need to render + if (this.data.hd || this.hidden) { + return; + } + this.renderTransform(); + this.renderRenderable(); + this.renderElement(); + this.renderInnerContent(); + if (this._isFirstFrame) { + this._isFirstFrame = false; + } + }, + changeColor: function (color, endColor, index) { + this._isFirstFrame = true; + this.renderShapeColor(color, endColor, index); + this.isInRange = false; + }, + renderInnerContent: function () {}, + renderShapeColor: function () {}, + prepareFrame: function (num) { + this._mdf = false; + this.prepareRenderableFrame(num); + this.prepareProperties(num, this.isInRange); + this.checkTransparency(); + }, + destroy: function () { + this.innerElem = null; + this.destroyBaseElement(); + }, + }; + extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement); +}()); + +export default RenderableDOMElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/RenderableElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/RenderableElement.js new file mode 100644 index 0000000000000000000000000000000000000000..876bb0c416a1c4ad68412b6c24626b646bd5cd02 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/RenderableElement.js @@ -0,0 +1,87 @@ +function RenderableElement() { + +} + +RenderableElement.prototype = { + initRenderable: function () { + // layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange + this.isInRange = false; + // layer's display state + this.hidden = false; + // If layer's transparency equals 0, it can be hidden + this.isTransparent = false; + // list of animated components + this.renderableComponents = []; + }, + addRenderableComponent: function (component) { + if (this.renderableComponents.indexOf(component) === -1) { + this.renderableComponents.push(component); + } + }, + removeRenderableComponent: function (component) { + if (this.renderableComponents.indexOf(component) !== -1) { + this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1); + } + }, + prepareRenderableFrame: function (num) { + this.checkLayerLimits(num); + }, + checkTransparency: function () { + if (this.finalTransform.mProp.o.v <= 0) { + if (!this.isTransparent && this.globalData.renderConfig.hideOnTransparent) { + this.isTransparent = true; + this.hide(); + } + } else if (this.isTransparent) { + this.isTransparent = false; + this.show(); + } + }, + /** + * @function + * Initializes frame related properties. + * + * @param {number} num + * current frame number in Layer's time + * + */ + checkLayerLimits: function (num) { + if (this.data.ip - this.data.st <= num && this.data.op - this.data.st > num) { + if (this.isInRange !== true) { + this.globalData._mdf = true; + this._mdf = true; + this.isInRange = true; + this.show(); + } + } else if (this.isInRange !== false) { + this.globalData._mdf = true; + this.isInRange = false; + this.hide(); + } + }, + renderRenderable: function () { + var i; + var len = this.renderableComponents.length; + for (i = 0; i < len; i += 1) { + this.renderableComponents[i].renderFrame(this._isFirstFrame); + } + /* this.maskManager.renderFrame(this.finalTransform.mat); + this.renderableEffectsManager.renderFrame(this._isFirstFrame); */ + }, + sourceRectAtTime: function () { + return { + top: 0, + left: 0, + width: 100, + height: 100, + }; + }, + getLayerSize: function () { + if (this.data.ty === 5) { + return { w: this.data.textData.width, h: this.data.textData.height }; + } + return { w: this.data.width, h: this.data.height }; + }, +}; + +export default RenderableElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/TransformElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/TransformElement.js new file mode 100644 index 0000000000000000000000000000000000000000..c0050ca4c771663bb8e908de219fab1a8ba8d85e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/TransformElement.js @@ -0,0 +1,81 @@ +import Matrix from '../../3rd_party/transformation-matrix'; +import TransformPropertyFactory from '../../utils/TransformProperty'; + +function TransformElement() {} + +TransformElement.prototype = { + initTransform: function () { + this.finalTransform = { + mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : { o: 0 }, + _matMdf: false, + _opMdf: false, + mat: new Matrix(), + }; + if (this.data.ao) { + this.finalTransform.mProp.autoOriented = true; + } + + // TODO: check TYPE 11: Guided elements + if (this.data.ty !== 11) { + // this.createElements(); + } + }, + renderTransform: function () { + this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame; + this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame; + + if (this.hierarchy) { + var mat; + var finalMat = this.finalTransform.mat; + var i = 0; + var len = this.hierarchy.length; + // Checking if any of the transformation matrices in the hierarchy chain has changed. + if (!this.finalTransform._matMdf) { + while (i < len) { + if (this.hierarchy[i].finalTransform.mProp._mdf) { + this.finalTransform._matMdf = true; + break; + } + i += 1; + } + } + + if (this.finalTransform._matMdf) { + mat = this.finalTransform.mProp.v.props; + finalMat.cloneFromProps(mat); + for (i = 0; i < len; i += 1) { + mat = this.hierarchy[i].finalTransform.mProp.v.props; + finalMat.transform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5], mat[6], mat[7], mat[8], mat[9], mat[10], mat[11], mat[12], mat[13], mat[14], mat[15]); + } + } + } + }, + globalToLocal: function (pt) { + var transforms = []; + transforms.push(this.finalTransform); + var flag = true; + var comp = this.comp; + while (flag) { + if (comp.finalTransform) { + if (comp.data.hasMask) { + transforms.splice(0, 0, comp.finalTransform); + } + comp = comp.comp; + } else { + flag = false; + } + } + var i; + var len = transforms.length; + var ptNew; + for (i = 0; i < len; i += 1) { + ptNew = transforms[i].mat.applyToPointArray(0, 0, 0); + // ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]); + pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0]; + } + return pt; + }, + mHelper: new Matrix(), +}; + +export default TransformElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/CVShapeData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/CVShapeData.js new file mode 100644 index 0000000000000000000000000000000000000000..93401593c815347b6af678ae7545b0c3534c1800 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/CVShapeData.js @@ -0,0 +1,33 @@ +import ShapePropertyFactory from '../../../utils/shapes/ShapeProperty'; +import SVGShapeData from './SVGShapeData'; + +function CVShapeData(element, data, styles, transformsManager) { + this.styledShapes = []; + this.tr = [0, 0, 0, 0, 0, 0]; + var ty = 4; + if (data.ty === 'rc') { + ty = 5; + } else if (data.ty === 'el') { + ty = 6; + } else if (data.ty === 'sr') { + ty = 7; + } + this.sh = ShapePropertyFactory.getShapeProp(element, data, ty, element); + var i; + var len = styles.length; + var styledShape; + for (i = 0; i < len; i += 1) { + if (!styles[i].closed) { + styledShape = { + transforms: transformsManager.addTransformSequence(styles[i].transforms), + trNodes: [], + }; + this.styledShapes.push(styledShape); + styles[i].elements.push(styledShape); + } + } +} + +CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated; + +export default CVShapeData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ProcessedElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ProcessedElement.js new file mode 100644 index 0000000000000000000000000000000000000000..6cad9b3d684dae4dd0323df28bcaf5253691702b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ProcessedElement.js @@ -0,0 +1,6 @@ +function ProcessedElement(element, position) { + this.elem = element; + this.pos = position; +} + +export default ProcessedElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGElementsRenderer.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGElementsRenderer.js new file mode 100644 index 0000000000000000000000000000000000000000..5638f558d39084ce994886b3d360ba5c271b62b2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGElementsRenderer.js @@ -0,0 +1,241 @@ +import Matrix from '../../../3rd_party/transformation-matrix'; +import buildShapeString from '../../../utils/shapes/shapePathBuilder'; +import { bmFloor } from '../../../utils/common'; + +const SVGElementsRenderer = (function () { + var _identityMatrix = new Matrix(); + var _matrixHelper = new Matrix(); + + var ob = { + createRenderFunction: createRenderFunction, + }; + + function createRenderFunction(data) { + switch (data.ty) { + case 'fl': + return renderFill; + case 'gf': + return renderGradient; + case 'gs': + return renderGradientStroke; + case 'st': + return renderStroke; + case 'sh': + case 'el': + case 'rc': + case 'sr': + return renderPath; + case 'tr': + return renderContentTransform; + case 'no': + return renderNoop; + default: + return null; + } + } + + function renderContentTransform(styleData, itemData, isFirstFrame) { + if (isFirstFrame || itemData.transform.op._mdf) { + itemData.transform.container.setAttribute('opacity', itemData.transform.op.v); + } + if (isFirstFrame || itemData.transform.mProps._mdf) { + itemData.transform.container.setAttribute('transform', itemData.transform.mProps.v.to2dCSS()); + } + } + + function renderNoop() { + + } + + function renderPath(styleData, itemData, isFirstFrame) { + var j; + var jLen; + var pathStringTransformed; + var redraw; + var pathNodes; + var l; + var lLen = itemData.styles.length; + var lvl = itemData.lvl; + var paths; + var mat; + var props; + var iterations; + var k; + for (l = 0; l < lLen; l += 1) { + redraw = itemData.sh._mdf || isFirstFrame; + if (itemData.styles[l].lvl < lvl) { + mat = _matrixHelper.reset(); + iterations = lvl - itemData.styles[l].lvl; + k = itemData.transformers.length - 1; + while (!redraw && iterations > 0) { + redraw = itemData.transformers[k].mProps._mdf || redraw; + iterations -= 1; + k -= 1; + } + if (redraw) { + iterations = lvl - itemData.styles[l].lvl; + k = itemData.transformers.length - 1; + while (iterations > 0) { + props = itemData.transformers[k].mProps.v.props; + mat.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]); + iterations -= 1; + k -= 1; + } + } + } else { + mat = _identityMatrix; + } + paths = itemData.sh.paths; + jLen = paths._length; + if (redraw) { + pathStringTransformed = ''; + for (j = 0; j < jLen; j += 1) { + pathNodes = paths.shapes[j]; + if (pathNodes && pathNodes._length) { + pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat); + } + } + itemData.caches[l] = pathStringTransformed; + } else { + pathStringTransformed = itemData.caches[l]; + } + itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed; + itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf; + } + } + + function renderFill(styleData, itemData, isFirstFrame) { + var styleElem = itemData.style; + + if (itemData.c._mdf || isFirstFrame) { + styleElem.pElem.setAttribute('fill', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'); + } + if (itemData.o._mdf || isFirstFrame) { + styleElem.pElem.setAttribute('fill-opacity', itemData.o.v); + } + } + + function renderGradientStroke(styleData, itemData, isFirstFrame) { + renderGradient(styleData, itemData, isFirstFrame); + renderStroke(styleData, itemData, isFirstFrame); + } + + function renderGradient(styleData, itemData, isFirstFrame) { + var gfill = itemData.gf; + var hasOpacity = itemData.g._hasOpacity; + var pt1 = itemData.s.v; + var pt2 = itemData.e.v; + + if (itemData.o._mdf || isFirstFrame) { + var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity'; + itemData.style.pElem.setAttribute(attr, itemData.o.v); + } + if (itemData.s._mdf || isFirstFrame) { + var attr1 = styleData.t === 1 ? 'x1' : 'cx'; + var attr2 = attr1 === 'x1' ? 'y1' : 'cy'; + gfill.setAttribute(attr1, pt1[0]); + gfill.setAttribute(attr2, pt1[1]); + if (hasOpacity && !itemData.g._collapsable) { + itemData.of.setAttribute(attr1, pt1[0]); + itemData.of.setAttribute(attr2, pt1[1]); + } + } + var stops; + var i; + var len; + var stop; + if (itemData.g._cmdf || isFirstFrame) { + stops = itemData.cst; + var cValues = itemData.g.c; + len = stops.length; + for (i = 0; i < len; i += 1) { + stop = stops[i]; + stop.setAttribute('offset', cValues[i * 4] + '%'); + stop.setAttribute('stop-color', 'rgb(' + cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ',' + cValues[i * 4 + 3] + ')'); + } + } + if (hasOpacity && (itemData.g._omdf || isFirstFrame)) { + var oValues = itemData.g.o; + if (itemData.g._collapsable) { + stops = itemData.cst; + } else { + stops = itemData.ost; + } + len = stops.length; + for (i = 0; i < len; i += 1) { + stop = stops[i]; + if (!itemData.g._collapsable) { + stop.setAttribute('offset', oValues[i * 2] + '%'); + } + stop.setAttribute('stop-opacity', oValues[i * 2 + 1]); + } + } + if (styleData.t === 1) { + if (itemData.e._mdf || isFirstFrame) { + gfill.setAttribute('x2', pt2[0]); + gfill.setAttribute('y2', pt2[1]); + if (hasOpacity && !itemData.g._collapsable) { + itemData.of.setAttribute('x2', pt2[0]); + itemData.of.setAttribute('y2', pt2[1]); + } + } + } else { + var rad; + if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) { + rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2)); + gfill.setAttribute('r', rad); + if (hasOpacity && !itemData.g._collapsable) { + itemData.of.setAttribute('r', rad); + } + } + if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) { + if (!rad) { + rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2)); + } + var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]); + + var percent = itemData.h.v; + if (percent >= 1) { + percent = 0.99; + } else if (percent <= -1) { + percent = -0.99; + } + var dist = rad * percent; + var x = Math.cos(ang + itemData.a.v) * dist + pt1[0]; + var y = Math.sin(ang + itemData.a.v) * dist + pt1[1]; + gfill.setAttribute('fx', x); + gfill.setAttribute('fy', y); + if (hasOpacity && !itemData.g._collapsable) { + itemData.of.setAttribute('fx', x); + itemData.of.setAttribute('fy', y); + } + } + // gfill.setAttribute('fy','200'); + } + } + + function renderStroke(styleData, itemData, isFirstFrame) { + var styleElem = itemData.style; + var d = itemData.d; + if (d && (d._mdf || isFirstFrame) && d.dashStr) { + styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr); + styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]); + } + if (itemData.c && (itemData.c._mdf || isFirstFrame)) { + styleElem.pElem.setAttribute('stroke', 'rgb(' + bmFloor(itemData.c.v[0]) + ',' + bmFloor(itemData.c.v[1]) + ',' + bmFloor(itemData.c.v[2]) + ')'); + } + if (itemData.o._mdf || isFirstFrame) { + styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v); + } + if (itemData.w._mdf || isFirstFrame) { + styleElem.pElem.setAttribute('stroke-width', itemData.w.v); + if (styleElem.msElem) { + styleElem.msElem.setAttribute('stroke-width', itemData.w.v); + } + } + } + + return ob; +}()); + +export default SVGElementsRenderer; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGFillStyleData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGFillStyleData.js new file mode 100644 index 0000000000000000000000000000000000000000..26ab798b25734429ccc15d7e8e271a9caabe03f6 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGFillStyleData.js @@ -0,0 +1,18 @@ +import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties'; + +import { + extendPrototype, +} from '../../../utils/functionExtensions'; +import PropertyFactory from '../../../utils/PropertyFactory'; + +function SVGFillStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this); + this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this); + this.style = styleOb; +} + +extendPrototype([DynamicPropertyContainer], SVGFillStyleData); + +export default SVGFillStyleData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGGradientFillStyleData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGGradientFillStyleData.js new file mode 100644 index 0000000000000000000000000000000000000000..4ae0ab632ec6715b5bc157fe05f43102af0bf2d1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGGradientFillStyleData.js @@ -0,0 +1,100 @@ +import { + degToRads, + createElementID, +} from '../../../utils/common'; +import { getLocationHref } from '../../../main'; +import { + extendPrototype, +} from '../../../utils/functionExtensions'; +import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties'; +import PropertyFactory from '../../../utils/PropertyFactory'; +import createNS from '../../../utils/helpers/svg_elements'; +import GradientProperty from '../../../utils/shapes/GradientProperty'; +import { + lineCapEnum, + lineJoinEnum, +} from '../../../utils/helpers/shapeEnums'; + +function SVGGradientFillStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.initGradientData(elem, data, styleOb); +} + +SVGGradientFillStyleData.prototype.initGradientData = function (elem, data, styleOb) { + this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this); + this.s = PropertyFactory.getProp(elem, data.s, 1, null, this); + this.e = PropertyFactory.getProp(elem, data.e, 1, null, this); + this.h = PropertyFactory.getProp(elem, data.h || { k: 0 }, 0, 0.01, this); + this.a = PropertyFactory.getProp(elem, data.a || { k: 0 }, 0, degToRads, this); + this.g = new GradientProperty(elem, data.g, this); + this.style = styleOb; + this.stops = []; + this.setGradientData(styleOb.pElem, data); + this.setGradientOpacity(data, styleOb); + this._isAnimated = !!this._isAnimated; +}; + +SVGGradientFillStyleData.prototype.setGradientData = function (pathElement, data) { + var gradientId = createElementID(); + var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient'); + gfill.setAttribute('id', gradientId); + gfill.setAttribute('spreadMethod', 'pad'); + gfill.setAttribute('gradientUnits', 'userSpaceOnUse'); + var stops = []; + var stop; + var j; + var jLen; + jLen = data.g.p * 4; + for (j = 0; j < jLen; j += 4) { + stop = createNS('stop'); + gfill.appendChild(stop); + stops.push(stop); + } + pathElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + gradientId + ')'); + this.gf = gfill; + this.cst = stops; +}; + +SVGGradientFillStyleData.prototype.setGradientOpacity = function (data, styleOb) { + if (this.g._hasOpacity && !this.g._collapsable) { + var stop; + var j; + var jLen; + var mask = createNS('mask'); + var maskElement = createNS('path'); + mask.appendChild(maskElement); + var opacityId = createElementID(); + var maskId = createElementID(); + mask.setAttribute('id', maskId); + var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient'); + opFill.setAttribute('id', opacityId); + opFill.setAttribute('spreadMethod', 'pad'); + opFill.setAttribute('gradientUnits', 'userSpaceOnUse'); + jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length; + var stops = this.stops; + for (j = data.g.p * 4; j < jLen; j += 2) { + stop = createNS('stop'); + stop.setAttribute('stop-color', 'rgb(255,255,255)'); + opFill.appendChild(stop); + stops.push(stop); + } + maskElement.setAttribute(data.ty === 'gf' ? 'fill' : 'stroke', 'url(' + getLocationHref() + '#' + opacityId + ')'); + if (data.ty === 'gs') { + maskElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]); + maskElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]); + if (data.lj === 1) { + maskElement.setAttribute('stroke-miterlimit', data.ml); + } + } + this.of = opFill; + this.ms = mask; + this.ost = stops; + this.maskId = maskId; + styleOb.msElem = maskElement; + } +}; + +extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData); + +export default SVGGradientFillStyleData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGGradientStrokeStyleData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGGradientStrokeStyleData.js new file mode 100644 index 0000000000000000000000000000000000000000..22adf24a531f71dc0e77d6c095a55075e2474c08 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGGradientStrokeStyleData.js @@ -0,0 +1,20 @@ +import { + extendPrototype, +} from '../../../utils/functionExtensions'; +import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties'; +import PropertyFactory from '../../../utils/PropertyFactory'; +import DashProperty from '../../../utils/shapes/DashProperty'; +import SVGGradientFillStyleData from './SVGGradientFillStyleData'; + +function SVGGradientStrokeStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.w = PropertyFactory.getProp(elem, data.w, 0, null, this); + this.d = new DashProperty(elem, data.d || {}, 'svg', this); + this.initGradientData(elem, data, styleOb); + this._isAnimated = !!this._isAnimated; +} + +extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData); + +export default SVGGradientStrokeStyleData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGNoStyleData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGNoStyleData.js new file mode 100644 index 0000000000000000000000000000000000000000..7b7d06c10454e851a73b05b08c59bd9ce08dfe8d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGNoStyleData.js @@ -0,0 +1,15 @@ +import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties'; + +import { + extendPrototype, +} from '../../../utils/functionExtensions'; + +function SVGNoStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.style = styleOb; +} + +extendPrototype([DynamicPropertyContainer], SVGNoStyleData); + +export default SVGNoStyleData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGShapeData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGShapeData.js new file mode 100644 index 0000000000000000000000000000000000000000..f4e13206bc7bb6a5b353451bf901ad1a16a275b9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGShapeData.js @@ -0,0 +1,28 @@ +function SVGShapeData(transformers, level, shape) { + this.caches = []; + this.styles = []; + this.transformers = transformers; + this.lStr = ''; + this.sh = shape; + this.lvl = level; + // TODO find if there are some cases where _isAnimated can be false. + // For now, since shapes add up with other shapes. They have to be calculated every time. + // One way of finding out is checking if all styles associated to this shape depend only of this shape + this._isAnimated = !!shape.k; + // TODO: commenting this for now since all shapes are animated + var i = 0; + var len = transformers.length; + while (i < len) { + if (transformers[i].mProps.dynamicProperties.length) { + this._isAnimated = true; + break; + } + i += 1; + } +} + +SVGShapeData.prototype.setAsAnimated = function () { + this._isAnimated = true; +}; + +export default SVGShapeData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGStrokeStyleData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGStrokeStyleData.js new file mode 100644 index 0000000000000000000000000000000000000000..fa2435964dac66cbde14a99f6ea34c4252c51056 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGStrokeStyleData.js @@ -0,0 +1,21 @@ +import { + extendPrototype, +} from '../../../utils/functionExtensions'; +import DynamicPropertyContainer from '../../../utils/helpers/dynamicProperties'; +import PropertyFactory from '../../../utils/PropertyFactory'; +import DashProperty from '../../../utils/shapes/DashProperty'; + +function SVGStrokeStyleData(elem, data, styleOb) { + this.initDynamicPropertyContainer(elem); + this.getValue = this.iterateDynamicProperties; + this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, this); + this.w = PropertyFactory.getProp(elem, data.w, 0, null, this); + this.d = new DashProperty(elem, data.d || {}, 'svg', this); + this.c = PropertyFactory.getProp(elem, data.c, 1, 255, this); + this.style = styleOb; + this._isAnimated = !!this._isAnimated; +} + +extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData); + +export default SVGStrokeStyleData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGStyleData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGStyleData.js new file mode 100644 index 0000000000000000000000000000000000000000..08267c7e86e9d0cad8c05559789a4f321f3eee3b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGStyleData.js @@ -0,0 +1,19 @@ +import createNS from '../../../utils/helpers/svg_elements'; + +function SVGStyleData(data, level) { + this.data = data; + this.type = data.ty; + this.d = ''; + this.lvl = level; + this._mdf = false; + this.closed = data.hd === true; + this.pElem = createNS('path'); + this.msElem = null; +} + +SVGStyleData.prototype.reset = function () { + this.d = ''; + this._mdf = false; +}; + +export default SVGStyleData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGTransformData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGTransformData.js new file mode 100644 index 0000000000000000000000000000000000000000..f032012c968b3d1a54aae9776fe842f9858997c6 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/SVGTransformData.js @@ -0,0 +1,11 @@ +function SVGTransformData(mProps, op, container) { + this.transform = { + mProps: mProps, + op: op, + container: container, + }; + this.elements = []; + this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length; +} + +export default SVGTransformData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ShapeElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ShapeElement.js new file mode 100644 index 0000000000000000000000000000000000000000..7f0e7ef18779384f03cb23f501b408dfed7fae89 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ShapeElement.js @@ -0,0 +1,5 @@ +function ShapeElementData() { + +} + +export default ShapeElementData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ShapeGroupData.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ShapeGroupData.js new file mode 100644 index 0000000000000000000000000000000000000000..46a0c8391f1d8528785e6ba2f98f855cb1226e9a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ShapeGroupData.js @@ -0,0 +1,9 @@ +import createNS from '../../../utils/helpers/svg_elements'; + +function ShapeGroupData() { + this.it = []; + this.prevViewData = []; + this.gr = createNS('g'); +} + +export default ShapeGroupData; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ShapeTransformManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ShapeTransformManager.js new file mode 100644 index 0000000000000000000000000000000000000000..421eea427f1b6e28f8f52cb17bd2459bb488592f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/helpers/shapes/ShapeTransformManager.js @@ -0,0 +1,63 @@ +import Matrix from '../../../3rd_party/transformation-matrix'; + +function ShapeTransformManager() { + this.sequences = {}; + this.sequenceList = []; + this.transform_key_count = 0; +} + +ShapeTransformManager.prototype = { + addTransformSequence: function (transforms) { + var i; + var len = transforms.length; + var key = '_'; + for (i = 0; i < len; i += 1) { + key += transforms[i].transform.key + '_'; + } + var sequence = this.sequences[key]; + if (!sequence) { + sequence = { + transforms: [].concat(transforms), + finalTransform: new Matrix(), + _mdf: false, + }; + this.sequences[key] = sequence; + this.sequenceList.push(sequence); + } + return sequence; + }, + processSequence: function (sequence, isFirstFrame) { + var i = 0; + var len = sequence.transforms.length; + var _mdf = isFirstFrame; + while (i < len && !isFirstFrame) { + if (sequence.transforms[i].transform.mProps._mdf) { + _mdf = true; + break; + } + i += 1; + } + if (_mdf) { + var props; + sequence.finalTransform.reset(); + for (i = len - 1; i >= 0; i -= 1) { + props = sequence.transforms[i].transform.mProps.v.props; + sequence.finalTransform.transform(props[0], props[1], props[2], props[3], props[4], props[5], props[6], props[7], props[8], props[9], props[10], props[11], props[12], props[13], props[14], props[15]); + } + } + sequence._mdf = _mdf; + }, + processSequences: function (isFirstFrame) { + var i; + var len = this.sequenceList.length; + for (i = 0; i < len; i += 1) { + this.processSequence(this.sequenceList[i], isFirstFrame); + } + }, + getNewKey: function () { + this.transform_key_count += 1; + return '_' + this.transform_key_count; + }, +}; + +export default ShapeTransformManager; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HBaseElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HBaseElement.js new file mode 100644 index 0000000000000000000000000000000000000000..1e4e2df75be09da8d58fd364ce31e2a169e4134b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HBaseElement.js @@ -0,0 +1,88 @@ +import { + styleDiv, +} from '../../utils/common'; +import createNS from '../../utils/helpers/svg_elements'; +import createTag from '../../utils/helpers/html_elements'; +import BaseRenderer from '../../renderers/BaseRenderer'; +import SVGBaseElement from '../svgElements/SVGBaseElement'; +import CVEffects from '../canvasElements/CVEffects'; +import MaskElement from '../../mask'; + +function HBaseElement() {} +HBaseElement.prototype = { + checkBlendMode: function () {}, + initRendererElement: function () { + this.baseElement = createTag(this.data.tg || 'div'); + if (this.data.hasMask) { + this.svgElement = createNS('svg'); + this.layerElement = createNS('g'); + this.maskedElement = this.layerElement; + this.svgElement.appendChild(this.layerElement); + this.baseElement.appendChild(this.svgElement); + } else { + this.layerElement = this.baseElement; + } + styleDiv(this.baseElement); + }, + createContainerElements: function () { + this.renderableEffectsManager = new CVEffects(this); + this.transformedElement = this.baseElement; + this.maskedElement = this.layerElement; + if (this.data.ln) { + this.layerElement.setAttribute('id', this.data.ln); + } + if (this.data.cl) { + this.layerElement.setAttribute('class', this.data.cl); + } + if (this.data.bm !== 0) { + this.setBlendMode(); + } + }, + renderElement: function () { + var transformedElementStyle = this.transformedElement ? this.transformedElement.style : {}; + if (this.finalTransform._matMdf) { + var matrixValue = this.finalTransform.mat.toCSS(); + transformedElementStyle.transform = matrixValue; + transformedElementStyle.webkitTransform = matrixValue; + } + if (this.finalTransform._opMdf) { + transformedElementStyle.opacity = this.finalTransform.mProp.o.v; + } + }, + renderFrame: function () { + // If it is exported as hidden (data.hd === true) no need to render + // If it is not visible no need to render + if (this.data.hd || this.hidden) { + return; + } + this.renderTransform(); + this.renderRenderable(); + this.renderElement(); + this.renderInnerContent(); + if (this._isFirstFrame) { + this._isFirstFrame = false; + } + }, + destroy: function () { + this.layerElement = null; + this.transformedElement = null; + if (this.matteElement) { + this.matteElement = null; + } + if (this.maskManager) { + this.maskManager.destroy(); + this.maskManager = null; + } + }, + createRenderableComponents: function () { + this.maskManager = new MaskElement(this.data, this, this.globalData); + }, + addEffects: function () { + }, + setMatte: function () {}, +}; +HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement; +HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy; +HBaseElement.prototype.buildElementParenting = BaseRenderer.prototype.buildElementParenting; + +export default HBaseElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HCameraElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HCameraElement.js new file mode 100644 index 0000000000000000000000000000000000000000..cd3d3459ac46820ec8877291902809640912b6db --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HCameraElement.js @@ -0,0 +1,170 @@ +import { + degToRads, +} from '../../utils/common'; +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import PropertyFactory from '../../utils/PropertyFactory'; +import BaseElement from '../BaseElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import Matrix from '../../3rd_party/transformation-matrix'; + +function HCameraElement(data, globalData, comp) { + this.initFrame(); + this.initBaseData(data, globalData, comp); + this.initHierarchy(); + var getProp = PropertyFactory.getProp; + this.pe = getProp(this, data.pe, 0, 0, this); + if (data.ks.p.s) { + this.px = getProp(this, data.ks.p.x, 1, 0, this); + this.py = getProp(this, data.ks.p.y, 1, 0, this); + this.pz = getProp(this, data.ks.p.z, 1, 0, this); + } else { + this.p = getProp(this, data.ks.p, 1, 0, this); + } + if (data.ks.a) { + this.a = getProp(this, data.ks.a, 1, 0, this); + } + if (data.ks.or.k.length && data.ks.or.k[0].to) { + var i; + var len = data.ks.or.k.length; + for (i = 0; i < len; i += 1) { + data.ks.or.k[i].to = null; + data.ks.or.k[i].ti = null; + } + } + this.or = getProp(this, data.ks.or, 1, degToRads, this); + this.or.sh = true; + this.rx = getProp(this, data.ks.rx, 0, degToRads, this); + this.ry = getProp(this, data.ks.ry, 0, degToRads, this); + this.rz = getProp(this, data.ks.rz, 0, degToRads, this); + this.mat = new Matrix(); + this._prevMat = new Matrix(); + this._isFirstFrame = true; + + // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface. + this.finalTransform = { + mProp: this, + }; +} +extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement); + +HCameraElement.prototype.setup = function () { + var i; + var len = this.comp.threeDElements.length; + var comp; + var perspectiveStyle; + var containerStyle; + for (i = 0; i < len; i += 1) { + // [perspectiveElem,container] + comp = this.comp.threeDElements[i]; + if (comp.type === '3d') { + perspectiveStyle = comp.perspectiveElem.style; + containerStyle = comp.container.style; + var perspective = this.pe.v + 'px'; + var origin = '0px 0px 0px'; + var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)'; + perspectiveStyle.perspective = perspective; + perspectiveStyle.webkitPerspective = perspective; + containerStyle.transformOrigin = origin; + containerStyle.mozTransformOrigin = origin; + containerStyle.webkitTransformOrigin = origin; + perspectiveStyle.transform = matrix; + perspectiveStyle.webkitTransform = matrix; + } + } +}; + +HCameraElement.prototype.createElements = function () { +}; + +HCameraElement.prototype.hide = function () { +}; + +HCameraElement.prototype.renderFrame = function () { + var _mdf = this._isFirstFrame; + var i; + var len; + if (this.hierarchy) { + len = this.hierarchy.length; + for (i = 0; i < len; i += 1) { + _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf; + } + } + if (_mdf || this.pe._mdf || (this.p && this.p._mdf) || (this.px && (this.px._mdf || this.py._mdf || this.pz._mdf)) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || (this.a && this.a._mdf)) { + this.mat.reset(); + + if (this.hierarchy) { + len = this.hierarchy.length - 1; + for (i = len; i >= 0; i -= 1) { + var mTransf = this.hierarchy[i].finalTransform.mProp; + this.mat.translate(-mTransf.p.v[0], -mTransf.p.v[1], mTransf.p.v[2]); + this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]); + this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v); + this.mat.scale(1 / mTransf.s.v[0], 1 / mTransf.s.v[1], 1 / mTransf.s.v[2]); + this.mat.translate(mTransf.a.v[0], mTransf.a.v[1], mTransf.a.v[2]); + } + } + if (this.p) { + this.mat.translate(-this.p.v[0], -this.p.v[1], this.p.v[2]); + } else { + this.mat.translate(-this.px.v, -this.py.v, this.pz.v); + } + if (this.a) { + var diffVector; + if (this.p) { + diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]]; + } else { + diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]]; + } + var mag = Math.sqrt(Math.pow(diffVector[0], 2) + Math.pow(diffVector[1], 2) + Math.pow(diffVector[2], 2)); + // var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v)); + var lookDir = [diffVector[0] / mag, diffVector[1] / mag, diffVector[2] / mag]; + var lookLengthOnXZ = Math.sqrt(lookDir[2] * lookDir[2] + lookDir[0] * lookDir[0]); + var mRotationX = (Math.atan2(lookDir[1], lookLengthOnXZ)); + var mRotationY = (Math.atan2(lookDir[0], -lookDir[2])); + this.mat.rotateY(mRotationY).rotateX(-mRotationX); + } + this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v); + this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]); + this.mat.translate(this.globalData.compSize.w / 2, this.globalData.compSize.h / 2, 0); + this.mat.translate(0, 0, this.pe.v); + + var hasMatrixChanged = !this._prevMat.equals(this.mat); + if ((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) { + len = this.comp.threeDElements.length; + var comp; + var perspectiveStyle; + var containerStyle; + for (i = 0; i < len; i += 1) { + comp = this.comp.threeDElements[i]; + if (comp.type === '3d') { + if (hasMatrixChanged) { + var matValue = this.mat.toCSS(); + containerStyle = comp.container.style; + containerStyle.transform = matValue; + containerStyle.webkitTransform = matValue; + } + if (this.pe._mdf) { + perspectiveStyle = comp.perspectiveElem.style; + perspectiveStyle.perspective = this.pe.v + 'px'; + perspectiveStyle.webkitPerspective = this.pe.v + 'px'; + } + } + } + this.mat.clone(this._prevMat); + } + } + this._isFirstFrame = false; +}; + +HCameraElement.prototype.prepareFrame = function (num) { + this.prepareProperties(num, true); +}; + +HCameraElement.prototype.destroy = function () { +}; +HCameraElement.prototype.getBaseElement = function () { return null; }; + +export default HCameraElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HCompElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HCompElement.js new file mode 100644 index 0000000000000000000000000000000000000000..bac6856f415f1869c9193b6e2aa65158a2088905 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HCompElement.js @@ -0,0 +1,61 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import { + createSizedArray, +} from '../../utils/helpers/arrays'; +import PropertyFactory from '../../utils/PropertyFactory'; +import HybridRendererBase from '../../renderers/HybridRendererBase'; +import HBaseElement from './HBaseElement'; +import ICompElement from '../CompElement'; +import SVGCompElement from '../svgElements/SVGCompElement'; + +function HCompElement(data, globalData, comp) { + this.layers = data.layers; + this.supports3d = !data.hasMask; + this.completeLayers = false; + this.pendingElements = []; + this.elements = this.layers ? createSizedArray(this.layers.length) : []; + this.initElement(data, globalData, comp); + this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true }; +} + +extendPrototype([HybridRendererBase, ICompElement, HBaseElement], HCompElement); +HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements; + +HCompElement.prototype.createContainerElements = function () { + this._createBaseContainerElements(); + // divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)'; + if (this.data.hasMask) { + this.svgElement.setAttribute('width', this.data.w); + this.svgElement.setAttribute('height', this.data.h); + this.transformedElement = this.baseElement; + } else { + this.transformedElement = this.layerElement; + } +}; + +HCompElement.prototype.addTo3dContainer = function (elem, pos) { + var j = 0; + var nextElement; + while (j < pos) { + if (this.elements[j] && this.elements[j].getBaseElement) { + nextElement = this.elements[j].getBaseElement(); + } + j += 1; + } + if (nextElement) { + this.layerElement.insertBefore(elem, nextElement); + } else { + this.layerElement.appendChild(elem); + } +}; + +HCompElement.prototype.createComp = function (data) { + if (!this.supports3d) { + return new SVGCompElement(data, this.globalData, this); + } + return new HCompElement(data, this.globalData, this); +}; + +export default HCompElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HImageElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HImageElement.js new file mode 100644 index 0000000000000000000000000000000000000000..445e26b881289cbe45fe984785ae26a2c14865cb --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HImageElement.js @@ -0,0 +1,42 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import createNS from '../../utils/helpers/svg_elements'; +import RenderableElement from '../helpers/RenderableElement'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import HBaseElement from './HBaseElement'; +import HSolidElement from './HSolidElement'; + +function HImageElement(data, globalData, comp) { + this.assetData = globalData.getAssetData(data.refId); + this.initElement(data, globalData, comp); +} + +extendPrototype([BaseElement, TransformElement, HBaseElement, HSolidElement, HierarchyElement, FrameElement, RenderableElement], HImageElement); + +HImageElement.prototype.createContent = function () { + var assetPath = this.globalData.getAssetsPath(this.assetData); + var img = new Image(); + + if (this.data.hasMask) { + this.imageElem = createNS('image'); + this.imageElem.setAttribute('width', this.assetData.w + 'px'); + this.imageElem.setAttribute('height', this.assetData.h + 'px'); + this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink', 'href', assetPath); + this.layerElement.appendChild(this.imageElem); + this.baseElement.setAttribute('width', this.assetData.w); + this.baseElement.setAttribute('height', this.assetData.h); + } else { + this.layerElement.appendChild(img); + } + img.crossOrigin = 'anonymous'; + img.src = assetPath; + if (this.data.ln) { + this.baseElement.setAttribute('id', this.data.ln); + } +}; + +export default HImageElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HShapeElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HShapeElement.js new file mode 100644 index 0000000000000000000000000000000000000000..2777162fd1ba1a319b8d8b9d9404a9d9aceec805 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HShapeElement.js @@ -0,0 +1,261 @@ +import { + bmPow, + bmMax, + bmMin, + bmSqrt, +} from '../../utils/common'; +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import createNS from '../../utils/helpers/svg_elements'; +import RenderableElement from '../helpers/RenderableElement'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import HBaseElement from './HBaseElement'; +import HSolidElement from './HSolidElement'; +import SVGShapeElement from '../svgElements/SVGShapeElement'; + +function HShapeElement(data, globalData, comp) { + // List of drawable elements + this.shapes = []; + // Full shape data + this.shapesData = data.shapes; + // List of styles that will be applied to shapes + this.stylesList = []; + // List of modifiers that will be applied to shapes + this.shapeModifiers = []; + // List of items in shape tree + this.itemsData = []; + // List of items in previous shape tree + this.processedElements = []; + // List of animated components + this.animatedContents = []; + this.shapesContainer = createNS('g'); + this.initElement(data, globalData, comp); + // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties. + // List of elements that have been created + this.prevViewData = []; + this.currentBBox = { + x: 999999, + y: -999999, + h: 0, + w: 0, + }; +} +extendPrototype([BaseElement, TransformElement, HSolidElement, SVGShapeElement, HBaseElement, HierarchyElement, FrameElement, RenderableElement], HShapeElement); +HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent; + +HShapeElement.prototype.createContent = function () { + var cont; + this.baseElement.style.fontSize = 0; + if (this.data.hasMask) { + this.layerElement.appendChild(this.shapesContainer); + cont = this.svgElement; + } else { + cont = createNS('svg'); + var size = this.comp.data ? this.comp.data : this.globalData.compSize; + cont.setAttribute('width', size.w); + cont.setAttribute('height', size.h); + cont.appendChild(this.shapesContainer); + this.layerElement.appendChild(cont); + } + + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.shapesContainer, 0, [], true); + this.filterUniqueShapes(); + this.shapeCont = cont; +}; + +HShapeElement.prototype.getTransformedPoint = function (transformers, point) { + var i; + var len = transformers.length; + for (i = 0; i < len; i += 1) { + point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0); + } + return point; +}; + +HShapeElement.prototype.calculateShapeBoundingBox = function (item, boundingBox) { + var shape = item.sh.v; + var transformers = item.transformers; + var i; + var len = shape._length; + var vPoint; + var oPoint; + var nextIPoint; + var nextVPoint; + if (len <= 1) { + return; + } + for (i = 0; i < len - 1; i += 1) { + vPoint = this.getTransformedPoint(transformers, shape.v[i]); + oPoint = this.getTransformedPoint(transformers, shape.o[i]); + nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]); + nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]); + this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox); + } + if (shape.c) { + vPoint = this.getTransformedPoint(transformers, shape.v[i]); + oPoint = this.getTransformedPoint(transformers, shape.o[i]); + nextIPoint = this.getTransformedPoint(transformers, shape.i[0]); + nextVPoint = this.getTransformedPoint(transformers, shape.v[0]); + this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox); + } +}; + +HShapeElement.prototype.checkBounds = function (vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) { + this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint); + var bounds = this.shapeBoundingBox; + boundingBox.x = bmMin(bounds.left, boundingBox.x); + boundingBox.xMax = bmMax(bounds.right, boundingBox.xMax); + boundingBox.y = bmMin(bounds.top, boundingBox.y); + boundingBox.yMax = bmMax(bounds.bottom, boundingBox.yMax); +}; + +HShapeElement.prototype.shapeBoundingBox = { + left: 0, + right: 0, + top: 0, + bottom: 0, +}; + +HShapeElement.prototype.tempBoundingBox = { + x: 0, + xMax: 0, + y: 0, + yMax: 0, + width: 0, + height: 0, +}; + +HShapeElement.prototype.getBoundsOfCurve = function (p0, p1, p2, p3) { + var bounds = [[p0[0], p3[0]], [p0[1], p3[1]]]; + + for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) { // eslint-disable-line no-plusplus + b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; + a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; + c = 3 * p1[i] - 3 * p0[i]; + + b |= 0; // eslint-disable-line no-bitwise + a |= 0; // eslint-disable-line no-bitwise + c |= 0; // eslint-disable-line no-bitwise + + if (a === 0 && b === 0) { + // + } else if (a === 0) { + t = -c / b; + + if (t > 0 && t < 1) { + bounds[i].push(this.calculateF(t, p0, p1, p2, p3, i)); + } + } else { + b2ac = b * b - 4 * c * a; + + if (b2ac >= 0) { + t1 = (-b + bmSqrt(b2ac)) / (2 * a); + if (t1 > 0 && t1 < 1) bounds[i].push(this.calculateF(t1, p0, p1, p2, p3, i)); + t2 = (-b - bmSqrt(b2ac)) / (2 * a); + if (t2 > 0 && t2 < 1) bounds[i].push(this.calculateF(t2, p0, p1, p2, p3, i)); + } + } + } + + this.shapeBoundingBox.left = bmMin.apply(null, bounds[0]); + this.shapeBoundingBox.top = bmMin.apply(null, bounds[1]); + this.shapeBoundingBox.right = bmMax.apply(null, bounds[0]); + this.shapeBoundingBox.bottom = bmMax.apply(null, bounds[1]); +}; + +HShapeElement.prototype.calculateF = function (t, p0, p1, p2, p3, i) { + return bmPow(1 - t, 3) * p0[i] + + 3 * bmPow(1 - t, 2) * t * p1[i] + + 3 * (1 - t) * bmPow(t, 2) * p2[i] + + bmPow(t, 3) * p3[i]; +}; + +HShapeElement.prototype.calculateBoundingBox = function (itemsData, boundingBox) { + var i; + var len = itemsData.length; + for (i = 0; i < len; i += 1) { + if (itemsData[i] && itemsData[i].sh) { + this.calculateShapeBoundingBox(itemsData[i], boundingBox); + } else if (itemsData[i] && itemsData[i].it) { + this.calculateBoundingBox(itemsData[i].it, boundingBox); + } else if (itemsData[i] && itemsData[i].style && itemsData[i].w) { + this.expandStrokeBoundingBox(itemsData[i].w, boundingBox); + } + } +}; + +HShapeElement.prototype.expandStrokeBoundingBox = function (widthProperty, boundingBox) { + var width = 0; + if (widthProperty.keyframes) { + for (var i = 0; i < widthProperty.keyframes.length; i += 1) { + var kfw = widthProperty.keyframes[i].s; + if (kfw > width) { + width = kfw; + } + } + width *= widthProperty.mult; + } else { + width = widthProperty.v * widthProperty.mult; + } + + boundingBox.x -= width; + boundingBox.xMax += width; + boundingBox.y -= width; + boundingBox.yMax += width; +}; + +HShapeElement.prototype.currentBoxContains = function (box) { + return this.currentBBox.x <= box.x + && this.currentBBox.y <= box.y + && this.currentBBox.width + this.currentBBox.x >= box.x + box.width + && this.currentBBox.height + this.currentBBox.y >= box.y + box.height; +}; + +HShapeElement.prototype.renderInnerContent = function () { + this._renderShapeFrame(); + + if (!this.hidden && (this._isFirstFrame || this._mdf)) { + var tempBoundingBox = this.tempBoundingBox; + var max = 999999; + tempBoundingBox.x = max; + tempBoundingBox.xMax = -max; + tempBoundingBox.y = max; + tempBoundingBox.yMax = -max; + this.calculateBoundingBox(this.itemsData, tempBoundingBox); + tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x; + tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y; + // var tempBoundingBox = this.shapeCont.getBBox(); + if (this.currentBoxContains(tempBoundingBox)) { + return; + } + var changed = false; + if (this.currentBBox.w !== tempBoundingBox.width) { + this.currentBBox.w = tempBoundingBox.width; + this.shapeCont.setAttribute('width', tempBoundingBox.width); + changed = true; + } + if (this.currentBBox.h !== tempBoundingBox.height) { + this.currentBBox.h = tempBoundingBox.height; + this.shapeCont.setAttribute('height', tempBoundingBox.height); + changed = true; + } + if (changed || this.currentBBox.x !== tempBoundingBox.x || this.currentBBox.y !== tempBoundingBox.y) { + this.currentBBox.w = tempBoundingBox.width; + this.currentBBox.h = tempBoundingBox.height; + this.currentBBox.x = tempBoundingBox.x; + this.currentBBox.y = tempBoundingBox.y; + + this.shapeCont.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h); + var shapeStyle = this.shapeCont.style; + var shapeTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)'; + shapeStyle.transform = shapeTransform; + shapeStyle.webkitTransform = shapeTransform; + } + } +}; + +export default HShapeElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HSolidElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HSolidElement.js new file mode 100644 index 0000000000000000000000000000000000000000..9d8a021f773bd538c86767ea834e641730636fdd --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HSolidElement.js @@ -0,0 +1,36 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import createNS from '../../utils/helpers/svg_elements'; +import createTag from '../../utils/helpers/html_elements'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import RenderableDOMElement from '../helpers/RenderableDOMElement'; +import HBaseElement from './HBaseElement'; + +function HSolidElement(data, globalData, comp) { + this.initElement(data, globalData, comp); +} +extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement], HSolidElement); + +HSolidElement.prototype.createContent = function () { + var rect; + if (this.data.hasMask) { + rect = createNS('rect'); + rect.setAttribute('width', this.data.sw); + rect.setAttribute('height', this.data.sh); + rect.setAttribute('fill', this.data.sc); + this.svgElement.setAttribute('width', this.data.sw); + this.svgElement.setAttribute('height', this.data.sh); + } else { + rect = createTag('div'); + rect.style.width = this.data.sw + 'px'; + rect.style.height = this.data.sh + 'px'; + rect.style.backgroundColor = this.data.sc; + } + this.layerElement.appendChild(rect); +}; + +export default HSolidElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HTextElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HTextElement.js new file mode 100644 index 0000000000000000000000000000000000000000..040a4ea936a8e2093b40455307df8065c867f4d2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/htmlElements/HTextElement.js @@ -0,0 +1,289 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import { + createSizedArray, +} from '../../utils/helpers/arrays'; +import createNS from '../../utils/helpers/svg_elements'; +import createTag from '../../utils/helpers/html_elements'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import RenderableDOMElement from '../helpers/RenderableDOMElement'; +import ITextElement from '../TextElement'; +import HBaseElement from './HBaseElement'; +import { + lineCapEnum, + lineJoinEnum, +} from '../../utils/helpers/shapeEnums'; +import { + styleDiv, +} from '../../utils/common'; + +function HTextElement(data, globalData, comp) { + this.textSpans = []; + this.textPaths = []; + this.currentBBox = { + x: 999999, + y: -999999, + h: 0, + w: 0, + }; + this.renderType = 'svg'; + this.isMasked = false; + this.initElement(data, globalData, comp); +} +extendPrototype([BaseElement, TransformElement, HBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], HTextElement); + +HTextElement.prototype.createContent = function () { + this.isMasked = this.checkMasks(); + if (this.isMasked) { + this.renderType = 'svg'; + this.compW = this.comp.data.w; + this.compH = this.comp.data.h; + this.svgElement.setAttribute('width', this.compW); + this.svgElement.setAttribute('height', this.compH); + var g = createNS('g'); + this.maskedElement.appendChild(g); + this.innerElem = g; + } else { + this.renderType = 'html'; + this.innerElem = this.layerElement; + } + + this.checkParenting(); +}; + +HTextElement.prototype.buildNewText = function () { + var documentData = this.textProperty.currentData; + this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0); + var innerElemStyle = this.innerElem.style; + var textColor = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)'; + innerElemStyle.fill = textColor; + innerElemStyle.color = textColor; + if (documentData.sc) { + innerElemStyle.stroke = this.buildColor(documentData.sc); + innerElemStyle.strokeWidth = documentData.sw + 'px'; + } + var fontData = this.globalData.fontManager.getFontByName(documentData.f); + if (!this.globalData.fontManager.chars) { + innerElemStyle.fontSize = documentData.finalSize + 'px'; + innerElemStyle.lineHeight = documentData.finalSize + 'px'; + if (fontData.fClass) { + this.innerElem.className = fontData.fClass; + } else { + innerElemStyle.fontFamily = fontData.fFamily; + var fWeight = documentData.fWeight; + var fStyle = documentData.fStyle; + innerElemStyle.fontStyle = fStyle; + innerElemStyle.fontWeight = fWeight; + } + } + var i; + var len; + + var letters = documentData.l; + len = letters.length; + var tSpan; + var tParent; + var tCont; + var matrixHelper = this.mHelper; + var shapes; + var shapeStr = ''; + var cnt = 0; + for (i = 0; i < len; i += 1) { + if (this.globalData.fontManager.chars) { + if (!this.textPaths[cnt]) { + tSpan = createNS('path'); + tSpan.setAttribute('stroke-linecap', lineCapEnum[1]); + tSpan.setAttribute('stroke-linejoin', lineJoinEnum[2]); + tSpan.setAttribute('stroke-miterlimit', '4'); + } else { + tSpan = this.textPaths[cnt]; + } + if (!this.isMasked) { + if (this.textSpans[cnt]) { + tParent = this.textSpans[cnt]; + tCont = tParent.children[0]; + } else { + tParent = createTag('div'); + tParent.style.lineHeight = 0; + tCont = createNS('svg'); + tCont.appendChild(tSpan); + styleDiv(tParent); + } + } + } else if (!this.isMasked) { + if (this.textSpans[cnt]) { + tParent = this.textSpans[cnt]; + tSpan = this.textPaths[cnt]; + } else { + tParent = createTag('span'); + styleDiv(tParent); + tSpan = createTag('span'); + styleDiv(tSpan); + tParent.appendChild(tSpan); + } + } else { + tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text'); + } + // tSpan.setAttribute('visibility', 'hidden'); + if (this.globalData.fontManager.chars) { + var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily); + var shapeData; + if (charData) { + shapeData = charData.data; + } else { + shapeData = null; + } + matrixHelper.reset(); + if (shapeData && shapeData.shapes && shapeData.shapes.length) { + shapes = shapeData.shapes[0].it; + matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100); + shapeStr = this.createPathShape(matrixHelper, shapes); + tSpan.setAttribute('d', shapeStr); + } + if (!this.isMasked) { + this.innerElem.appendChild(tParent); + if (shapeData && shapeData.shapes) { + // document.body.appendChild is needed to get exact measure of shape + document.body.appendChild(tCont); + var boundingBox = tCont.getBBox(); + tCont.setAttribute('width', boundingBox.width + 2); + tCont.setAttribute('height', boundingBox.height + 2); + tCont.setAttribute('viewBox', (boundingBox.x - 1) + ' ' + (boundingBox.y - 1) + ' ' + (boundingBox.width + 2) + ' ' + (boundingBox.height + 2)); + var tContStyle = tCont.style; + var tContTranslation = 'translate(' + (boundingBox.x - 1) + 'px,' + (boundingBox.y - 1) + 'px)'; + tContStyle.transform = tContTranslation; + tContStyle.webkitTransform = tContTranslation; + + letters[i].yOffset = boundingBox.y - 1; + } else { + tCont.setAttribute('width', 1); + tCont.setAttribute('height', 1); + } + tParent.appendChild(tCont); + } else { + this.innerElem.appendChild(tSpan); + } + } else { + tSpan.textContent = letters[i].val; + tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); + if (!this.isMasked) { + this.innerElem.appendChild(tParent); + // + var tStyle = tSpan.style; + var tSpanTranslation = 'translate3d(0,' + -documentData.finalSize / 1.2 + 'px,0)'; + tStyle.transform = tSpanTranslation; + tStyle.webkitTransform = tSpanTranslation; + } else { + this.innerElem.appendChild(tSpan); + } + } + // + if (!this.isMasked) { + this.textSpans[cnt] = tParent; + } else { + this.textSpans[cnt] = tSpan; + } + this.textSpans[cnt].style.display = 'block'; + this.textPaths[cnt] = tSpan; + cnt += 1; + } + while (cnt < this.textSpans.length) { + this.textSpans[cnt].style.display = 'none'; + cnt += 1; + } +}; + +HTextElement.prototype.renderInnerContent = function () { + var svgStyle; + if (this.data.singleShape) { + if (!this._isFirstFrame && !this.lettersChangedFlag) { + return; + } if (this.isMasked && this.finalTransform._matMdf) { + // Todo Benchmark if using this is better than getBBox + this.svgElement.setAttribute('viewBox', -this.finalTransform.mProp.p.v[0] + ' ' + -this.finalTransform.mProp.p.v[1] + ' ' + this.compW + ' ' + this.compH); + svgStyle = this.svgElement.style; + var translation = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)'; + svgStyle.transform = translation; + svgStyle.webkitTransform = translation; + } + } + + this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag); + if (!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag) { + return; + } + var i; + var len; + var count = 0; + var renderedLetters = this.textAnimator.renderedLetters; + + var letters = this.textProperty.currentData.l; + + len = letters.length; + var renderedLetter; + var textSpan; + var textPath; + for (i = 0; i < len; i += 1) { + if (letters[i].n) { + count += 1; + } else { + textSpan = this.textSpans[i]; + textPath = this.textPaths[i]; + renderedLetter = renderedLetters[count]; + count += 1; + if (renderedLetter._mdf.m) { + if (!this.isMasked) { + textSpan.style.webkitTransform = renderedLetter.m; + textSpan.style.transform = renderedLetter.m; + } else { + textSpan.setAttribute('transform', renderedLetter.m); + } + } + /// /textSpan.setAttribute('opacity',renderedLetter.o); + textSpan.style.opacity = renderedLetter.o; + if (renderedLetter.sw && renderedLetter._mdf.sw) { + textPath.setAttribute('stroke-width', renderedLetter.sw); + } + if (renderedLetter.sc && renderedLetter._mdf.sc) { + textPath.setAttribute('stroke', renderedLetter.sc); + } + if (renderedLetter.fc && renderedLetter._mdf.fc) { + textPath.setAttribute('fill', renderedLetter.fc); + textPath.style.color = renderedLetter.fc; + } + } + } + + if (this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)) { + var boundingBox = this.innerElem.getBBox(); + + if (this.currentBBox.w !== boundingBox.width) { + this.currentBBox.w = boundingBox.width; + this.svgElement.setAttribute('width', boundingBox.width); + } + if (this.currentBBox.h !== boundingBox.height) { + this.currentBBox.h = boundingBox.height; + this.svgElement.setAttribute('height', boundingBox.height); + } + + var margin = 1; + if (this.currentBBox.w !== (boundingBox.width + margin * 2) || this.currentBBox.h !== (boundingBox.height + margin * 2) || this.currentBBox.x !== (boundingBox.x - margin) || this.currentBBox.y !== (boundingBox.y - margin)) { + this.currentBBox.w = boundingBox.width + margin * 2; + this.currentBBox.h = boundingBox.height + margin * 2; + this.currentBBox.x = boundingBox.x - margin; + this.currentBBox.y = boundingBox.y - margin; + + this.svgElement.setAttribute('viewBox', this.currentBBox.x + ' ' + this.currentBBox.y + ' ' + this.currentBBox.w + ' ' + this.currentBBox.h); + svgStyle = this.svgElement.style; + var svgTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)'; + svgStyle.transform = svgTransform; + svgStyle.webkitTransform = svgTransform; + } + } +}; + +export default HTextElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGBaseElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGBaseElement.js new file mode 100644 index 0000000000000000000000000000000000000000..dfda964dea35b29e08d7eafcd8c9242630ddb7f4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGBaseElement.js @@ -0,0 +1,180 @@ +import { getLocationHref } from '../../main'; +import { + createElementID, +} from '../../utils/common'; +import createNS from '../../utils/helpers/svg_elements'; +import MaskElement from '../../mask'; +import filtersFactory from '../../utils/filters'; +import featureSupport from '../../utils/featureSupport'; +import SVGEffects from './SVGEffects'; + +function SVGBaseElement() { +} + +SVGBaseElement.prototype = { + initRendererElement: function () { + this.layerElement = createNS('g'); + }, + createContainerElements: function () { + this.matteElement = createNS('g'); + this.transformedElement = this.layerElement; + this.maskedElement = this.layerElement; + this._sizeChanged = false; + var layerElementParent = null; + // If this layer acts as a mask for the following layer + if (this.data.td) { + this.matteMasks = {}; + var gg = createNS('g'); + gg.setAttribute('id', this.layerId); + gg.appendChild(this.layerElement); + layerElementParent = gg; + this.globalData.defs.appendChild(gg); + } else if (this.data.tt) { + this.matteElement.appendChild(this.layerElement); + layerElementParent = this.matteElement; + this.baseElement = this.matteElement; + } else { + this.baseElement = this.layerElement; + } + if (this.data.ln) { + this.layerElement.setAttribute('id', this.data.ln); + } + if (this.data.cl) { + this.layerElement.setAttribute('class', this.data.cl); + } + // Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped + if (this.data.ty === 0 && !this.data.hd) { + var cp = createNS('clipPath'); + var pt = createNS('path'); + pt.setAttribute('d', 'M0,0 L' + this.data.w + ',0 L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z'); + var clipId = createElementID(); + cp.setAttribute('id', clipId); + cp.appendChild(pt); + this.globalData.defs.appendChild(cp); + + if (this.checkMasks()) { + var cpGroup = createNS('g'); + cpGroup.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')'); + cpGroup.appendChild(this.layerElement); + this.transformedElement = cpGroup; + if (layerElementParent) { + layerElementParent.appendChild(this.transformedElement); + } else { + this.baseElement = this.transformedElement; + } + } else { + this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + clipId + ')'); + } + } + if (this.data.bm !== 0) { + this.setBlendMode(); + } + }, + renderElement: function () { + if (this.finalTransform._matMdf) { + this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS()); + } + if (this.finalTransform._opMdf) { + this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v); + } + }, + destroyBaseElement: function () { + this.layerElement = null; + this.matteElement = null; + this.maskManager.destroy(); + }, + getBaseElement: function () { + if (this.data.hd) { + return null; + } + return this.baseElement; + }, + createRenderableComponents: function () { + this.maskManager = new MaskElement(this.data, this, this.globalData); + this.renderableEffectsManager = new SVGEffects(this); + }, + getMatte: function (matteType) { + // This should not be a common case. But for backward compatibility, we'll create the matte object. + // It solves animations that have two consecutive layers marked as matte masks. + // Which is an undefined behavior in AE. + if (!this.matteMasks) { + this.matteMasks = {}; + } + if (!this.matteMasks[matteType]) { + var id = this.layerId + '_' + matteType; + var filId; + var fil; + var useElement; + var gg; + if (matteType === 1 || matteType === 3) { + var masker = createNS('mask'); + masker.setAttribute('id', id); + masker.setAttribute('mask-type', matteType === 3 ? 'luminance' : 'alpha'); + useElement = createNS('use'); + useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId); + masker.appendChild(useElement); + this.globalData.defs.appendChild(masker); + if (!featureSupport.maskType && matteType === 1) { + masker.setAttribute('mask-type', 'luminance'); + filId = createElementID(); + fil = filtersFactory.createFilter(filId); + this.globalData.defs.appendChild(fil); + fil.appendChild(filtersFactory.createAlphaToLuminanceFilter()); + gg = createNS('g'); + gg.appendChild(useElement); + masker.appendChild(gg); + gg.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')'); + } + } else if (matteType === 2) { + var maskGroup = createNS('mask'); + maskGroup.setAttribute('id', id); + maskGroup.setAttribute('mask-type', 'alpha'); + var maskGrouper = createNS('g'); + maskGroup.appendChild(maskGrouper); + filId = createElementID(); + fil = filtersFactory.createFilter(filId); + /// / + var feCTr = createNS('feComponentTransfer'); + feCTr.setAttribute('in', 'SourceGraphic'); + fil.appendChild(feCTr); + var feFunc = createNS('feFuncA'); + feFunc.setAttribute('type', 'table'); + feFunc.setAttribute('tableValues', '1.0 0.0'); + feCTr.appendChild(feFunc); + /// / + this.globalData.defs.appendChild(fil); + var alphaRect = createNS('rect'); + alphaRect.setAttribute('width', this.comp.data.w); + alphaRect.setAttribute('height', this.comp.data.h); + alphaRect.setAttribute('x', '0'); + alphaRect.setAttribute('y', '0'); + alphaRect.setAttribute('fill', '#ffffff'); + alphaRect.setAttribute('opacity', '0'); + maskGrouper.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')'); + maskGrouper.appendChild(alphaRect); + useElement = createNS('use'); + useElement.setAttributeNS('http://www.w3.org/1999/xlink', 'href', '#' + this.layerId); + maskGrouper.appendChild(useElement); + if (!featureSupport.maskType) { + maskGroup.setAttribute('mask-type', 'luminance'); + fil.appendChild(filtersFactory.createAlphaToLuminanceFilter()); + gg = createNS('g'); + maskGrouper.appendChild(alphaRect); + gg.appendChild(this.layerElement); + maskGrouper.appendChild(gg); + } + this.globalData.defs.appendChild(maskGroup); + } + this.matteMasks[matteType] = id; + } + return this.matteMasks[matteType]; + }, + setMatte: function (id) { + if (!this.matteElement) { + return; + } + this.matteElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')'); + }, +}; + +export default SVGBaseElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGCompElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGCompElement.js new file mode 100644 index 0000000000000000000000000000000000000000..fb31ea1eee2ee2696d4cba679b1cbf7fc7b1f627 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGCompElement.js @@ -0,0 +1,28 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import { + createSizedArray, +} from '../../utils/helpers/arrays'; +import PropertyFactory from '../../utils/PropertyFactory'; +import SVGRendererBase from '../../renderers/SVGRendererBase'; // eslint-disable-line +import SVGBaseElement from './SVGBaseElement'; +import ICompElement from '../CompElement'; + +function SVGCompElement(data, globalData, comp) { + this.layers = data.layers; + this.supports3d = true; + this.completeLayers = false; + this.pendingElements = []; + this.elements = this.layers ? createSizedArray(this.layers.length) : []; + this.initElement(data, globalData, comp); + this.tm = data.tm ? PropertyFactory.getProp(this, data.tm, 0, globalData.frameRate, this) : { _placeholder: true }; +} + +extendPrototype([SVGRendererBase, ICompElement, SVGBaseElement], SVGCompElement); + +SVGCompElement.prototype.createComp = function (data) { + return new SVGCompElement(data, this.globalData, this); +}; + +export default SVGCompElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGEffects.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGEffects.js new file mode 100644 index 0000000000000000000000000000000000000000..ef22f3a9ac36aa4f86913ceb68f38af49fad1c0c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGEffects.js @@ -0,0 +1,58 @@ +import { getLocationHref } from '../../main'; +import { + createElementID, +} from '../../utils/common'; +import filtersFactory from '../../utils/filters'; + +var registeredEffects = {}; +var idPrefix = 'filter_result_'; + +function SVGEffects(elem) { + var i; + var source = 'SourceGraphic'; + var len = elem.data.ef ? elem.data.ef.length : 0; + var filId = createElementID(); + var fil = filtersFactory.createFilter(filId, true); + var count = 0; + this.filters = []; + var filterManager; + for (i = 0; i < len; i += 1) { + filterManager = null; + var type = elem.data.ef[i].ty; + if (registeredEffects[type]) { + var Effect = registeredEffects[type].effect; + filterManager = new Effect(fil, elem.effectsManager.effectElements[i], elem, idPrefix + count, source); + source = idPrefix + count; + if (registeredEffects[type].countsAsEffect) { + count += 1; + } + } + if (filterManager) { + this.filters.push(filterManager); + } + } + if (count) { + elem.globalData.defs.appendChild(fil); + elem.layerElement.setAttribute('filter', 'url(' + getLocationHref() + '#' + filId + ')'); + } + if (this.filters.length) { + elem.addRenderableComponent(this); + } +} + +SVGEffects.prototype.renderFrame = function (_isFirstFrame) { + var i; + var len = this.filters.length; + for (i = 0; i < len; i += 1) { + this.filters[i].renderFrame(_isFirstFrame); + } +}; + +export function registerEffect(id, effect, countsAsEffect) { + registeredEffects[id] = { + effect, + countsAsEffect, + }; +} + +export default SVGEffects; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGShapeElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGShapeElement.js new file mode 100644 index 0000000000000000000000000000000000000000..690a6976e534e7f9153c0d99021ca2e965839e0b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGShapeElement.js @@ -0,0 +1,450 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import { getLocationHref } from '../../main'; +import ShapePropertyFactory from '../../utils/shapes/ShapeProperty'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import SVGBaseElement from './SVGBaseElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import RenderableDOMElement from '../helpers/RenderableDOMElement'; +import getBlendMode from '../../utils/helpers/blendModes'; +import Matrix from '../../3rd_party/transformation-matrix'; +import IShapeElement from '../ShapeElement'; +import TransformPropertyFactory from '../../utils/TransformProperty'; +import { ShapeModifiers } from '../../utils/shapes/ShapeModifiers'; +import { + lineCapEnum, + lineJoinEnum, +} from '../../utils/helpers/shapeEnums'; +import SVGShapeData from '../helpers/shapes/SVGShapeData'; +import SVGStyleData from '../helpers/shapes/SVGStyleData'; +import SVGStrokeStyleData from '../helpers/shapes/SVGStrokeStyleData'; +import SVGFillStyleData from '../helpers/shapes/SVGFillStyleData'; +import SVGNoStyleData from '../helpers/shapes/SVGNoStyleData'; +import SVGGradientFillStyleData from '../helpers/shapes/SVGGradientFillStyleData'; +import SVGGradientStrokeStyleData from '../helpers/shapes/SVGGradientStrokeStyleData'; +import ShapeGroupData from '../helpers/shapes/ShapeGroupData'; +import SVGTransformData from '../helpers/shapes/SVGTransformData'; +import SVGElementsRenderer from '../helpers/shapes/SVGElementsRenderer'; + +function SVGShapeElement(data, globalData, comp) { + // List of drawable elements + this.shapes = []; + // Full shape data + this.shapesData = data.shapes; + // List of styles that will be applied to shapes + this.stylesList = []; + // List of modifiers that will be applied to shapes + this.shapeModifiers = []; + // List of items in shape tree + this.itemsData = []; + // List of items in previous shape tree + this.processedElements = []; + // List of animated components + this.animatedContents = []; + this.initElement(data, globalData, comp); + // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties. + // List of elements that have been created + this.prevViewData = []; + // Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties. +} + +extendPrototype([BaseElement, TransformElement, SVGBaseElement, IShapeElement, HierarchyElement, FrameElement, RenderableDOMElement], SVGShapeElement); + +SVGShapeElement.prototype.initSecondaryElement = function () { +}; + +SVGShapeElement.prototype.identityMatrix = new Matrix(); + +SVGShapeElement.prototype.buildExpressionInterface = function () {}; + +SVGShapeElement.prototype.createContent = function () { + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true); + this.filterUniqueShapes(); +}; + +/* +This method searches for multiple shapes that affect a single element and one of them is animated +*/ +SVGShapeElement.prototype.filterUniqueShapes = function () { + var i; + var len = this.shapes.length; + var shape; + var j; + var jLen = this.stylesList.length; + var style; + var tempShapes = []; + var areAnimated = false; + for (j = 0; j < jLen; j += 1) { + style = this.stylesList[j]; + areAnimated = false; + tempShapes.length = 0; + for (i = 0; i < len; i += 1) { + shape = this.shapes[i]; + if (shape.styles.indexOf(style) !== -1) { + tempShapes.push(shape); + areAnimated = shape._isAnimated || areAnimated; + } + } + if (tempShapes.length > 1 && areAnimated) { + this.setShapesAsAnimated(tempShapes); + } + } +}; + +SVGShapeElement.prototype.setShapesAsAnimated = function (shapes) { + var i; + var len = shapes.length; + for (i = 0; i < len; i += 1) { + shapes[i].setAsAnimated(); + } +}; + +SVGShapeElement.prototype.createStyleElement = function (data, level) { + // TODO: prevent drawing of hidden styles + var elementData; + var styleOb = new SVGStyleData(data, level); + + var pathElement = styleOb.pElem; + if (data.ty === 'st') { + elementData = new SVGStrokeStyleData(this, data, styleOb); + } else if (data.ty === 'fl') { + elementData = new SVGFillStyleData(this, data, styleOb); + } else if (data.ty === 'gf' || data.ty === 'gs') { + var GradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData; + elementData = new GradientConstructor(this, data, styleOb); + this.globalData.defs.appendChild(elementData.gf); + if (elementData.maskId) { + this.globalData.defs.appendChild(elementData.ms); + this.globalData.defs.appendChild(elementData.of); + pathElement.setAttribute('mask', 'url(' + getLocationHref() + '#' + elementData.maskId + ')'); + } + } else if (data.ty === 'no') { + elementData = new SVGNoStyleData(this, data, styleOb); + } + + if (data.ty === 'st' || data.ty === 'gs') { + pathElement.setAttribute('stroke-linecap', lineCapEnum[data.lc || 2]); + pathElement.setAttribute('stroke-linejoin', lineJoinEnum[data.lj || 2]); + pathElement.setAttribute('fill-opacity', '0'); + if (data.lj === 1) { + pathElement.setAttribute('stroke-miterlimit', data.ml); + } + } + + if (data.r === 2) { + pathElement.setAttribute('fill-rule', 'evenodd'); + } + + if (data.ln) { + pathElement.setAttribute('id', data.ln); + } + if (data.cl) { + pathElement.setAttribute('class', data.cl); + } + if (data.bm) { + pathElement.style['mix-blend-mode'] = getBlendMode(data.bm); + } + this.stylesList.push(styleOb); + this.addToAnimatedContents(data, elementData); + return elementData; +}; + +SVGShapeElement.prototype.createGroupElement = function (data) { + var elementData = new ShapeGroupData(); + if (data.ln) { + elementData.gr.setAttribute('id', data.ln); + } + if (data.cl) { + elementData.gr.setAttribute('class', data.cl); + } + if (data.bm) { + elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm); + } + return elementData; +}; + +SVGShapeElement.prototype.createTransformElement = function (data, container) { + var transformProperty = TransformPropertyFactory.getTransformProperty(this, data, this); + var elementData = new SVGTransformData(transformProperty, transformProperty.o, container); + this.addToAnimatedContents(data, elementData); + return elementData; +}; + +SVGShapeElement.prototype.createShapeElement = function (data, ownTransformers, level) { + var ty = 4; + if (data.ty === 'rc') { + ty = 5; + } else if (data.ty === 'el') { + ty = 6; + } else if (data.ty === 'sr') { + ty = 7; + } + var shapeProperty = ShapePropertyFactory.getShapeProp(this, data, ty, this); + var elementData = new SVGShapeData(ownTransformers, level, shapeProperty); + this.shapes.push(elementData); + this.addShapeToModifiers(elementData); + this.addToAnimatedContents(data, elementData); + return elementData; +}; + +SVGShapeElement.prototype.addToAnimatedContents = function (data, element) { + var i = 0; + var len = this.animatedContents.length; + while (i < len) { + if (this.animatedContents[i].element === element) { + return; + } + i += 1; + } + this.animatedContents.push({ + fn: SVGElementsRenderer.createRenderFunction(data), + element: element, + data: data, + }); +}; + +SVGShapeElement.prototype.setElementStyles = function (elementData) { + var arr = elementData.styles; + var j; + var jLen = this.stylesList.length; + for (j = 0; j < jLen; j += 1) { + if (!this.stylesList[j].closed) { + arr.push(this.stylesList[j]); + } + } +}; + +SVGShapeElement.prototype.reloadShapes = function () { + this._isFirstFrame = true; + var i; + var len = this.itemsData.length; + for (i = 0; i < len; i += 1) { + this.prevViewData[i] = this.itemsData[i]; + } + this.searchShapes(this.shapesData, this.itemsData, this.prevViewData, this.layerElement, 0, [], true); + this.filterUniqueShapes(); + len = this.dynamicProperties.length; + for (i = 0; i < len; i += 1) { + this.dynamicProperties[i].getValue(); + } + this.renderModifiers(); +}; + +SVGShapeElement.prototype.searchShapes = function (arr, itemsData, prevViewData, container, level, transformers, render) { + var ownTransformers = [].concat(transformers); + var i; + var len = arr.length - 1; + var j; + var jLen; + var ownStyles = []; + var ownModifiers = []; + var currentTransform; + var modifier; + var processedPos; + for (i = len; i >= 0; i -= 1) { + processedPos = this.searchProcessedElement(arr[i]); + if (!processedPos) { + arr[i]._render = render; + } else { + itemsData[i] = prevViewData[processedPos - 1]; + } + if (arr[i].ty === 'fl' || arr[i].ty === 'st' || arr[i].ty === 'gf' || arr[i].ty === 'gs' || arr[i].ty === 'no') { + if (!processedPos) { + itemsData[i] = this.createStyleElement(arr[i], level); + } else { + itemsData[i].style.closed = false; + } + if (arr[i]._render) { + if (itemsData[i].style.pElem.parentNode !== container) { + container.appendChild(itemsData[i].style.pElem); + } + } + ownStyles.push(itemsData[i].style); + } else if (arr[i].ty === 'gr') { + if (!processedPos) { + itemsData[i] = this.createGroupElement(arr[i]); + } else { + jLen = itemsData[i].it.length; + for (j = 0; j < jLen; j += 1) { + itemsData[i].prevViewData[j] = itemsData[i].it[j]; + } + } + this.searchShapes(arr[i].it, itemsData[i].it, itemsData[i].prevViewData, itemsData[i].gr, level + 1, ownTransformers, render); + if (arr[i]._render) { + if (itemsData[i].gr.parentNode !== container) { + container.appendChild(itemsData[i].gr); + } + } + } else if (arr[i].ty === 'tr') { + if (!processedPos) { + itemsData[i] = this.createTransformElement(arr[i], container); + } + currentTransform = itemsData[i].transform; + ownTransformers.push(currentTransform); + } else if (arr[i].ty === 'sh' || arr[i].ty === 'rc' || arr[i].ty === 'el' || arr[i].ty === 'sr') { + if (!processedPos) { + itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level); + } + this.setElementStyles(itemsData[i]); + } else if (arr[i].ty === 'tm' || arr[i].ty === 'rd' || arr[i].ty === 'ms' || arr[i].ty === 'pb' || arr[i].ty === 'zz' || arr[i].ty === 'op') { + if (!processedPos) { + modifier = ShapeModifiers.getModifier(arr[i].ty); + modifier.init(this, arr[i]); + itemsData[i] = modifier; + this.shapeModifiers.push(modifier); + } else { + modifier = itemsData[i]; + modifier.closed = false; + } + ownModifiers.push(modifier); + } else if (arr[i].ty === 'rp') { + if (!processedPos) { + modifier = ShapeModifiers.getModifier(arr[i].ty); + itemsData[i] = modifier; + modifier.init(this, arr, i, itemsData); + this.shapeModifiers.push(modifier); + render = false; + } else { + modifier = itemsData[i]; + modifier.closed = true; + } + ownModifiers.push(modifier); + } + this.addProcessedElement(arr[i], i + 1); + } + len = ownStyles.length; + for (i = 0; i < len; i += 1) { + ownStyles[i].closed = true; + } + len = ownModifiers.length; + for (i = 0; i < len; i += 1) { + ownModifiers[i].closed = true; + } +}; + +SVGShapeElement.prototype.renderInnerContent = function () { + this.renderModifiers(); + var i; + var len = this.stylesList.length; + for (i = 0; i < len; i += 1) { + this.stylesList[i].reset(); + } + this.renderShape(); + for (i = 0; i < len; i += 1) { + if (this.stylesList[i]._mdf || this._isFirstFrame) { + if (this.stylesList[i].msElem) { + this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d); + // Adding M0 0 fixes same mask bug on all browsers + this.stylesList[i].d = 'M0 0' + this.stylesList[i].d; + } + this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0'); + } + } +}; + +SVGShapeElement.prototype.renderShape = function () { + var i; + var len = this.animatedContents.length; + var animatedContent; + for (i = 0; i < len; i += 1) { + animatedContent = this.animatedContents[i]; + if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) { + animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame); + } + } +}; +SVGShapeElement.prototype.renderShapeColor = function (color, endColor) { + var i; + var len = this.animatedContents.length; + var animatedContent; + for (i = 0; i < len; i += 1) { + animatedContent = this.animatedContents[i]; + if ((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) { + if (animatedContent.element.c && (animatedContent.element.c._mdf || this._isFirstFrame)) { + try { + if (!!endColor && endColor.length > 0) { + if (color.length == 4) { + animatedContent.element.c.data.k[0].s[0] = color[0] / 255.0; + animatedContent.element.c.data.k[0].s[1] = color[1] / 255.0; + animatedContent.element.c.data.k[0].s[2] = color[2] / 255.0; + + animatedContent.element.c.data.k[0].e[0] = endColor[0] / 255.0; + animatedContent.element.c.data.k[0].e[1] = endColor[1] / 255.0; + animatedContent.element.c.data.k[0].e[2] = endColor[2] / 255.0; + + animatedContent.element.o.v = color[3]; + } else if (color.length == 3) { + animatedContent.element.c.data.k[0].s[0] = color[0] / 255.0; + animatedContent.element.c.data.k[0].s[1] = color[1] / 255.0; + animatedContent.element.c.data.k[0].s[2] = color[2] / 255.0; + + animatedContent.element.c.data.k[0].e[0] = endColor[0] / 255.0; + animatedContent.element.c.data.k[0].e[1] = endColor[1] / 255.0; + animatedContent.element.c.data.k[0].e[2] = endColor[2] / 255.0; + } else if (color.length == 2) { + animatedContent.element.c.data.k[0].s[0] = color[0] / 255.0; + animatedContent.element.c.data.k[0].s[2] = color[1] / 255.0; + + animatedContent.element.c.data.k[0].e[0] = endColor[0] / 255.0; + animatedContent.element.c.data.k[0].e[2] = endColor[1] / 255.0; + } else if (color.length == 1) { + animatedContent.element.c.data.k[0].s[0] = color[0] / 255.0; + animatedContent.element.c.data.k[0].e[0] = endColor[0] / 255.0; + } + } else { + if (color.length == 4) { + animatedContent.element.c.v[0] = color[0]; + animatedContent.element.c.v[1] = color[1]; + animatedContent.element.c.v[2] = color[2]; + animatedContent.element.o.v = color[3]; + } else if (color.length == 3) { + animatedContent.element.c.v[0] = color[0]; + animatedContent.element.c.v[1] = color[1]; + animatedContent.element.c.v[2] = color[2]; + } else if (color.length == 2) { + animatedContent.element.c.v[0] = color[0]; + animatedContent.element.c.v[2] = color[1]; + } else if (color.length == 1) { + animatedContent.element.c.v[0] = color[0]; + } + } + } catch (error) { + } + } else { + try { + if (animatedContent.element.g && (animatedContent.element.g._cmdf || this._isFirstFrame)) { + var lens = 3; + var j; + for (j = 0; j < lens; j += 1) { + if (color.length >= 3) { + animatedContent.element.g.c[j * 4] = color[0]; + animatedContent.element.g.c[j * 4 + 1] = color[0]; + animatedContent.element.g.c[j * 4 + 2] = color[1]; + animatedContent.element.g.c[j * 4 + 3] = color[2]; + } else if (color.length == 2) { + animatedContent.element.g.c[j * 4] = color[0]; + animatedContent.element.g.c[j * 4 + 1] = color[0]; + animatedContent.element.g.c[j * 4 + 2] = color[1]; + } else if (color.length == 1) { + animatedContent.element.g.c[j * 4] = color[0]; + animatedContent.element.g.c[j * 4 + 1] = color[0]; + } + } + } + } catch (error) { + } + } + } + } +}; + +SVGShapeElement.prototype.destroy = function () { + this.destroyBaseElement(); + this.shapesData = null; + this.itemsData = null; +}; + +export default SVGShapeElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGTextElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGTextElement.js new file mode 100644 index 0000000000000000000000000000000000000000..d92f5f0dd36c279d2fd2cecafbdd29557be2e3cf --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/SVGTextElement.js @@ -0,0 +1,321 @@ +import { + extendPrototype, +} from '../../utils/functionExtensions'; +import { + createSizedArray, +} from '../../utils/helpers/arrays'; +import createNS from '../../utils/helpers/svg_elements'; +import BaseElement from '../BaseElement'; +import TransformElement from '../helpers/TransformElement'; +import SVGBaseElement from './SVGBaseElement'; +import HierarchyElement from '../helpers/HierarchyElement'; +import FrameElement from '../helpers/FrameElement'; +import RenderableDOMElement from '../helpers/RenderableDOMElement'; +import ITextElement from '../TextElement'; +import SVGCompElement from './SVGCompElement'; // eslint-disable-line +import SVGShapeElement from './SVGShapeElement'; + +var emptyShapeData = { + shapes: [], +}; + +function SVGTextLottieElement(data, globalData, comp) { + this.textSpans = []; + this.renderType = 'svg'; + this.initElement(data, globalData, comp); +} + +extendPrototype([BaseElement, TransformElement, SVGBaseElement, HierarchyElement, FrameElement, RenderableDOMElement, ITextElement], SVGTextLottieElement); + +SVGTextLottieElement.prototype.createContent = function () { + if (this.data.singleShape && !this.globalData.fontManager.chars) { + this.textContainer = createNS('text'); + } +}; + +SVGTextLottieElement.prototype.buildTextContents = function (textArray) { + var i = 0; + var len = textArray.length; + var textContents = []; + var currentTextContent = ''; + while (i < len) { + if (textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) { + textContents.push(currentTextContent); + currentTextContent = ''; + } else { + currentTextContent += textArray[i]; + } + i += 1; + } + textContents.push(currentTextContent); + return textContents; +}; + +SVGTextLottieElement.prototype.buildShapeData = function (data, scale) { + // data should probably be cloned to apply scale separately to each instance of a text on different layers + // but since text internal content gets only rendered once and then it's never rerendered, + // it's probably safe not to clone data and reuse always the same instance even if the object is mutated. + // Avoiding cloning is preferred since cloning each character shape data is expensive + if (data.shapes && data.shapes.length) { + var shape = data.shapes[0]; + if (shape.it) { + var shapeItem = shape.it[shape.it.length - 1]; + if (shapeItem.s) { + shapeItem.s.k[0] = scale; + shapeItem.s.k[1] = scale; + } + } + } + return data; +}; + +SVGTextLottieElement.prototype.buildNewText = function () { + this.addDynamicProperty(this); + var i; + var len; + + var documentData = this.textProperty.currentData; + this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0); + if (documentData.fc) { + this.layerElement.setAttribute('fill', this.buildColor(documentData.fc)); + } else { + this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)'); + } + if (documentData.sc) { + this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc)); + this.layerElement.setAttribute('stroke-width', documentData.sw); + } + this.layerElement.setAttribute('font-size', documentData.finalSize); + var fontData = this.globalData.fontManager.getFontByName(documentData.f); + if (fontData.fClass) { + this.layerElement.setAttribute('class', fontData.fClass); + } else { + this.layerElement.setAttribute('font-family', fontData.fFamily); + var fWeight = documentData.fWeight; + var fStyle = documentData.fStyle; + this.layerElement.setAttribute('font-style', fStyle); + this.layerElement.setAttribute('font-weight', fWeight); + } + this.layerElement.setAttribute('aria-label', documentData.t); + + var letters = documentData.l || []; + var usesGlyphs = !!this.globalData.fontManager.chars; + len = letters.length; + + var tSpan; + var matrixHelper = this.mHelper; + var shapeStr = ''; + var singleShape = this.data.singleShape; + var xPos = 0; + var yPos = 0; + var firstLine = true; + var trackingOffset = documentData.tr * 0.001 * documentData.finalSize; + if (singleShape && !usesGlyphs && !documentData.sz) { + var tElement = this.textContainer; + var justify = 'start'; + switch (documentData.j) { + case 1: + justify = 'end'; + break; + case 2: + justify = 'middle'; + break; + default: + justify = 'start'; + break; + } + tElement.setAttribute('text-anchor', justify); + tElement.setAttribute('letter-spacing', trackingOffset); + var textContent = this.buildTextContents(documentData.finalText); + len = textContent.length; + yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0; + for (i = 0; i < len; i += 1) { + tSpan = this.textSpans[i].span || createNS('tspan'); + tSpan.textContent = textContent[i]; + tSpan.setAttribute('x', 0); + tSpan.setAttribute('y', yPos); + tSpan.style.display = 'inherit'; + tElement.appendChild(tSpan); + if (!this.textSpans[i]) { + this.textSpans[i] = { + span: null, + glyph: null, + }; + } + this.textSpans[i].span = tSpan; + yPos += documentData.finalLineHeight; + } + + this.layerElement.appendChild(tElement); + } else { + var cachedSpansLength = this.textSpans.length; + var charData; + for (i = 0; i < len; i += 1) { + if (!this.textSpans[i]) { + this.textSpans[i] = { + span: null, + childSpan: null, + glyph: null, + }; + } + if (!usesGlyphs || !singleShape || i === 0) { + tSpan = cachedSpansLength > i ? this.textSpans[i].span : createNS(usesGlyphs ? 'g' : 'text'); + if (cachedSpansLength <= i) { + tSpan.setAttribute('stroke-linecap', 'butt'); + tSpan.setAttribute('stroke-linejoin', 'round'); + tSpan.setAttribute('stroke-miterlimit', '4'); + this.textSpans[i].span = tSpan; + if (usesGlyphs) { + var childSpan = createNS('g'); + tSpan.appendChild(childSpan); + this.textSpans[i].childSpan = childSpan; + } + this.textSpans[i].span = tSpan; + this.layerElement.appendChild(tSpan); + } + tSpan.style.display = 'inherit'; + } + + matrixHelper.reset(); + if (singleShape) { + if (letters[i].n) { + xPos = -trackingOffset; + yPos += documentData.yOffset; + yPos += firstLine ? 1 : 0; + firstLine = false; + } + this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos); + xPos += letters[i].l || 0; + // xPos += letters[i].val === ' ' ? 0 : trackingOffset; + xPos += trackingOffset; + } + if (usesGlyphs) { + charData = this.globalData.fontManager.getCharData( + documentData.finalText[i], + fontData.fStyle, + this.globalData.fontManager.getFontByName(documentData.f).fFamily + ); + var glyphElement; + // t === 1 means the character has been replaced with an animated shaped + if (charData.t === 1) { + glyphElement = new SVGCompElement(charData.data, this.globalData, this); + } else { + var data = emptyShapeData; + if (charData.data && charData.data.shapes) { + data = this.buildShapeData(charData.data, documentData.finalSize); + } + glyphElement = new SVGShapeElement(data, this.globalData, this); + } + if (this.textSpans[i].glyph) { + var glyph = this.textSpans[i].glyph; + this.textSpans[i].childSpan.removeChild(glyph.layerElement); + glyph.destroy(); + } + this.textSpans[i].glyph = glyphElement; + glyphElement._debug = true; + glyphElement.prepareFrame(0); + glyphElement.renderFrame(); + this.textSpans[i].childSpan.appendChild(glyphElement.layerElement); + // when using animated shapes, the layer will be scaled instead of replacing the internal scale + // this might have issues with strokes and might need a different solution + if (charData.t === 1) { + this.textSpans[i].childSpan.setAttribute('transform', 'scale(' + documentData.finalSize / 100 + ',' + documentData.finalSize / 100 + ')'); + } + } else { + if (singleShape) { + tSpan.setAttribute('transform', 'translate(' + matrixHelper.props[12] + ',' + matrixHelper.props[13] + ')'); + } + tSpan.textContent = letters[i].val; + tSpan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve'); + } + // + } + if (singleShape && tSpan) { + tSpan.setAttribute('d', shapeStr); + } + } + while (i < this.textSpans.length) { + this.textSpans[i].span.style.display = 'none'; + i += 1; + } + + this._sizeChanged = true; +}; + +SVGTextLottieElement.prototype.sourceRectAtTime = function () { + this.prepareFrame(this.comp.renderedFrame - this.data.st); + this.renderInnerContent(); + if (this._sizeChanged) { + this._sizeChanged = false; + var textBox = this.layerElement.getBBox(); + this.bbox = { + top: textBox.y, + left: textBox.x, + width: textBox.width, + height: textBox.height, + }; + } + return this.bbox; +}; + +SVGTextLottieElement.prototype.getValue = function () { + var i; + var len = this.textSpans.length; + var glyphElement; + this.renderedFrame = this.comp.renderedFrame; + for (i = 0; i < len; i += 1) { + glyphElement = this.textSpans[i].glyph; + if (glyphElement) { + glyphElement.prepareFrame(this.comp.renderedFrame - this.data.st); + if (glyphElement._mdf) { + this._mdf = true; + } + } + } +}; + +SVGTextLottieElement.prototype.renderInnerContent = function () { + if (!this.data.singleShape || this._mdf) { + this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag); + if (this.lettersChangedFlag || this.textAnimator.lettersChangedFlag) { + this._sizeChanged = true; + var i; + var len; + var renderedLetters = this.textAnimator.renderedLetters; + + var letters = this.textProperty.currentData.l; + + len = letters.length; + var renderedLetter; + var textSpan; + var glyphElement; + for (i = 0; i < len; i += 1) { + if (!letters[i].n) { + renderedLetter = renderedLetters[i]; + textSpan = this.textSpans[i].span; + glyphElement = this.textSpans[i].glyph; + if (glyphElement) { + glyphElement.renderFrame(); + } + if (renderedLetter._mdf.m) { + textSpan.setAttribute('transform', renderedLetter.m); + } + if (renderedLetter._mdf.o) { + textSpan.setAttribute('opacity', renderedLetter.o); + } + if (renderedLetter._mdf.sw) { + textSpan.setAttribute('stroke-width', renderedLetter.sw); + } + if (renderedLetter._mdf.sc) { + textSpan.setAttribute('stroke', renderedLetter.sc); + } + if (renderedLetter._mdf.fc) { + textSpan.setAttribute('fill', renderedLetter.fc); + } + } + } + } + } +}; + +export default SVGTextLottieElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGComposableEffect.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGComposableEffect.js new file mode 100644 index 0000000000000000000000000000000000000000..689b378eea7bfd3a169997b1a4b2449819eafd27 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGComposableEffect.js @@ -0,0 +1,22 @@ +import createNS from '../../../utils/helpers/svg_elements'; + +function SVGComposableEffect() { + +} +SVGComposableEffect.prototype = { + createMergeNode: (resultId, ins) => { + var feMerge = createNS('feMerge'); + feMerge.setAttribute('result', resultId); + var feMergeNode; + var i; + for (i = 0; i < ins.length; i += 1) { + feMergeNode = createNS('feMergeNode'); + feMergeNode.setAttribute('in', ins[i]); + feMerge.appendChild(feMergeNode); + feMerge.appendChild(feMergeNode); + } + return feMerge; + }, +}; + +export default SVGComposableEffect; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGDropShadowEffect.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGDropShadowEffect.js new file mode 100644 index 0000000000000000000000000000000000000000..835f800c91bc2819b719abadfd22ee4e8abdc80b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGDropShadowEffect.js @@ -0,0 +1,83 @@ +import { + degToRads, + rgbToHex, +} from '../../../utils/common'; +import createNS from '../../../utils/helpers/svg_elements'; +import SVGComposableEffect from './SVGComposableEffect'; +import { + extendPrototype, +} from '../../../utils/functionExtensions'; + +function SVGDropShadowEffect(filter, filterManager, elem, id, source) { + var globalFilterSize = filterManager.container.globalData.renderConfig.filterSize; + var filterSize = filterManager.data.fs || globalFilterSize; + filter.setAttribute('x', filterSize.x || globalFilterSize.x); + filter.setAttribute('y', filterSize.y || globalFilterSize.y); + filter.setAttribute('width', filterSize.width || globalFilterSize.width); + filter.setAttribute('height', filterSize.height || globalFilterSize.height); + this.filterManager = filterManager; + + var feGaussianBlur = createNS('feGaussianBlur'); + feGaussianBlur.setAttribute('in', 'SourceAlpha'); + feGaussianBlur.setAttribute('result', id + '_drop_shadow_1'); + feGaussianBlur.setAttribute('stdDeviation', '0'); + this.feGaussianBlur = feGaussianBlur; + filter.appendChild(feGaussianBlur); + + var feOffset = createNS('feOffset'); + feOffset.setAttribute('dx', '25'); + feOffset.setAttribute('dy', '0'); + feOffset.setAttribute('in', id + '_drop_shadow_1'); + feOffset.setAttribute('result', id + '_drop_shadow_2'); + this.feOffset = feOffset; + filter.appendChild(feOffset); + var feFlood = createNS('feFlood'); + feFlood.setAttribute('flood-color', '#00ff00'); + feFlood.setAttribute('flood-opacity', '1'); + feFlood.setAttribute('result', id + '_drop_shadow_3'); + this.feFlood = feFlood; + filter.appendChild(feFlood); + + var feComposite = createNS('feComposite'); + feComposite.setAttribute('in', id + '_drop_shadow_3'); + feComposite.setAttribute('in2', id + '_drop_shadow_2'); + feComposite.setAttribute('operator', 'in'); + feComposite.setAttribute('result', id + '_drop_shadow_4'); + filter.appendChild(feComposite); + + var feMerge = this.createMergeNode( + id, + [ + id + '_drop_shadow_4', + source, + ] + ); + filter.appendChild(feMerge); + // +} +extendPrototype([SVGComposableEffect], SVGDropShadowEffect); + +SVGDropShadowEffect.prototype.renderFrame = function (forceRender) { + if (forceRender || this.filterManager._mdf) { + if (forceRender || this.filterManager.effectElements[4].p._mdf) { + this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4); + } + if (forceRender || this.filterManager.effectElements[0].p._mdf) { + var col = this.filterManager.effectElements[0].p.v; + this.feFlood.setAttribute('flood-color', rgbToHex(Math.round(col[0] * 255), Math.round(col[1] * 255), Math.round(col[2] * 255))); + } + if (forceRender || this.filterManager.effectElements[1].p._mdf) { + this.feFlood.setAttribute('flood-opacity', this.filterManager.effectElements[1].p.v / 255); + } + if (forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf) { + var distance = this.filterManager.effectElements[3].p.v; + var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads; + var x = distance * Math.cos(angle); + var y = distance * Math.sin(angle); + this.feOffset.setAttribute('dx', x); + this.feOffset.setAttribute('dy', y); + } + } +}; + +export default SVGDropShadowEffect; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGFillFilter.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGFillFilter.js new file mode 100644 index 0000000000000000000000000000000000000000..1d174e36f204c56fc50f7702432462eb71bf9481 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGFillFilter.js @@ -0,0 +1,22 @@ +import createNS from '../../../utils/helpers/svg_elements'; + +function SVGFillFilter(filter, filterManager, elem, id) { + this.filterManager = filterManager; + var feColorMatrix = createNS('feColorMatrix'); + feColorMatrix.setAttribute('type', 'matrix'); + feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB'); + feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'); + feColorMatrix.setAttribute('result', id); + filter.appendChild(feColorMatrix); + this.matrixFilter = feColorMatrix; +} + +SVGFillFilter.prototype.renderFrame = function (forceRender) { + if (forceRender || this.filterManager._mdf) { + var color = this.filterManager.effectElements[2].p.v; + var opacity = this.filterManager.effectElements[6].p.v; + this.matrixFilter.setAttribute('values', '0 0 0 0 ' + color[0] + ' 0 0 0 0 ' + color[1] + ' 0 0 0 0 ' + color[2] + ' 0 0 0 ' + opacity + ' 0'); + } +}; + +export default SVGFillFilter; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGGaussianBlurEffect.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGGaussianBlurEffect.js new file mode 100644 index 0000000000000000000000000000000000000000..599ace16078a654ff9eb59f78b1c4d8ff026d3b0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGGaussianBlurEffect.js @@ -0,0 +1,44 @@ +import createNS from '../../../utils/helpers/svg_elements'; + +function SVGGaussianBlurEffect(filter, filterManager, elem, id) { + // Outset the filter region by 100% on all sides to accommodate blur expansion. + filter.setAttribute('x', '-100%'); + filter.setAttribute('y', '-100%'); + filter.setAttribute('width', '300%'); + filter.setAttribute('height', '300%'); + + this.filterManager = filterManager; + var feGaussianBlur = createNS('feGaussianBlur'); + feGaussianBlur.setAttribute('result', id); + filter.appendChild(feGaussianBlur); + this.feGaussianBlur = feGaussianBlur; +} + +SVGGaussianBlurEffect.prototype.renderFrame = function (forceRender) { + if (forceRender || this.filterManager._mdf) { + // Empirical value, matching AE's blur appearance. + var kBlurrinessToSigma = 0.3; + var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma; + + // Dimensions mapping: + // + // 1 -> horizontal & vertical + // 2 -> horizontal only + // 3 -> vertical only + // + var dimensions = this.filterManager.effectElements[1].p.v; + var sigmaX = (dimensions == 3) ? 0 : sigma; // eslint-disable-line eqeqeq + var sigmaY = (dimensions == 2) ? 0 : sigma; // eslint-disable-line eqeqeq + + this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + ' ' + sigmaY); + + // Repeat edges mapping: + // + // 0 -> off -> duplicate + // 1 -> on -> wrap + var edgeMode = (this.filterManager.effectElements[2].p.v == 1) ? 'wrap' : 'duplicate'; // eslint-disable-line eqeqeq + this.feGaussianBlur.setAttribute('edgeMode', edgeMode); + } +}; + +export default SVGGaussianBlurEffect; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGMatte3Effect.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGMatte3Effect.js new file mode 100644 index 0000000000000000000000000000000000000000..1c331cd9e3c0d47048ad7f043d1115d837bef18c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGMatte3Effect.js @@ -0,0 +1,101 @@ +import { + createElementID, +} from '../../../utils/common'; +import createNS from '../../../utils/helpers/svg_elements'; + +var _svgMatteSymbols = []; + +function SVGMatte3Effect(filterElem, filterManager, elem) { + this.initialized = false; + this.filterManager = filterManager; + this.filterElem = filterElem; + this.elem = elem; + elem.matteElement = createNS('g'); + elem.matteElement.appendChild(elem.layerElement); + elem.matteElement.appendChild(elem.transformedElement); + elem.baseElement = elem.matteElement; +} + +SVGMatte3Effect.prototype.findSymbol = function (mask) { + var i = 0; + var len = _svgMatteSymbols.length; + while (i < len) { + if (_svgMatteSymbols[i] === mask) { + return _svgMatteSymbols[i]; + } + i += 1; + } + return null; +}; + +SVGMatte3Effect.prototype.replaceInParent = function (mask, symbolId) { + var parentNode = mask.layerElement.parentNode; + if (!parentNode) { + return; + } + var children = parentNode.children; + var i = 0; + var len = children.length; + while (i < len) { + if (children[i] === mask.layerElement) { + break; + } + i += 1; + } + var nextChild; + if (i <= len - 2) { + nextChild = children[i + 1]; + } + var useElem = createNS('use'); + useElem.setAttribute('href', '#' + symbolId); + if (nextChild) { + parentNode.insertBefore(useElem, nextChild); + } else { + parentNode.appendChild(useElem); + } +}; + +SVGMatte3Effect.prototype.setElementAsMask = function (elem, mask) { + if (!this.findSymbol(mask)) { + var symbolId = createElementID(); + var masker = createNS('mask'); + masker.setAttribute('id', mask.layerId); + masker.setAttribute('mask-type', 'alpha'); + _svgMatteSymbols.push(mask); + var defs = elem.globalData.defs; + defs.appendChild(masker); + var symbol = createNS('symbol'); + symbol.setAttribute('id', symbolId); + this.replaceInParent(mask, symbolId); + symbol.appendChild(mask.layerElement); + defs.appendChild(symbol); + var useElem = createNS('use'); + useElem.setAttribute('href', '#' + symbolId); + masker.appendChild(useElem); + mask.data.hd = false; + mask.show(); + } + elem.setMatte(mask.layerId); +}; + +SVGMatte3Effect.prototype.initialize = function () { + var ind = this.filterManager.effectElements[0].p.v; + var elements = this.elem.comp.elements; + var i = 0; + var len = elements.length; + while (i < len) { + if (elements[i] && elements[i].data.ind === ind) { + this.setElementAsMask(this.elem, elements[i]); + } + i += 1; + } + this.initialized = true; +}; + +SVGMatte3Effect.prototype.renderFrame = function () { + if (!this.initialized) { + this.initialize(); + } +}; + +export default SVGMatte3Effect; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGProLevelsFilter.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGProLevelsFilter.js new file mode 100644 index 0000000000000000000000000000000000000000..dad722e8878726c49c5b5cfcea961e7a59e5a715 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGProLevelsFilter.js @@ -0,0 +1,108 @@ +import createNS from '../../../utils/helpers/svg_elements'; + +function SVGProLevelsFilter(filter, filterManager, elem, id) { + this.filterManager = filterManager; + var effectElements = this.filterManager.effectElements; + var feComponentTransfer = createNS('feComponentTransfer'); + + // Red + if (effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1) { + this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer); + } + // Green + if (effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1) { + this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer); + } + // Blue + if (effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1) { + this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer); + } + // Alpha + if (effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1) { + this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer); + } + // RGB + if (this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA) { + feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB'); + filter.appendChild(feComponentTransfer); + } + + if (effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1) { + feComponentTransfer = createNS('feComponentTransfer'); + feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB'); + feComponentTransfer.setAttribute('result', id); + filter.appendChild(feComponentTransfer); + this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer); + this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer); + this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer); + } +} + +SVGProLevelsFilter.prototype.createFeFunc = function (type, feComponentTransfer) { + var feFunc = createNS(type); + feFunc.setAttribute('type', 'table'); + feComponentTransfer.appendChild(feFunc); + return feFunc; +}; + +SVGProLevelsFilter.prototype.getTableValue = function (inputBlack, inputWhite, gamma, outputBlack, outputWhite) { + var cnt = 0; + var segments = 256; + var perc; + var min = Math.min(inputBlack, inputWhite); + var max = Math.max(inputBlack, inputWhite); + var table = Array.call(null, { length: segments }); + var colorValue; + var pos = 0; + var outputDelta = outputWhite - outputBlack; + var inputDelta = inputWhite - inputBlack; + while (cnt <= 256) { + perc = cnt / 256; + if (perc <= min) { + colorValue = inputDelta < 0 ? outputWhite : outputBlack; + } else if (perc >= max) { + colorValue = inputDelta < 0 ? outputBlack : outputWhite; + } else { + colorValue = (outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma)); + } + table[pos] = colorValue; + pos += 1; + cnt += 256 / (segments - 1); + } + return table.join(' '); +}; + +SVGProLevelsFilter.prototype.renderFrame = function (forceRender) { + if (forceRender || this.filterManager._mdf) { + var val; + var effectElements = this.filterManager.effectElements; + if (this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)) { + val = this.getTableValue(effectElements[3].p.v, effectElements[4].p.v, effectElements[5].p.v, effectElements[6].p.v, effectElements[7].p.v); + this.feFuncRComposed.setAttribute('tableValues', val); + this.feFuncGComposed.setAttribute('tableValues', val); + this.feFuncBComposed.setAttribute('tableValues', val); + } + + if (this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)) { + val = this.getTableValue(effectElements[10].p.v, effectElements[11].p.v, effectElements[12].p.v, effectElements[13].p.v, effectElements[14].p.v); + this.feFuncR.setAttribute('tableValues', val); + } + + if (this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)) { + val = this.getTableValue(effectElements[17].p.v, effectElements[18].p.v, effectElements[19].p.v, effectElements[20].p.v, effectElements[21].p.v); + this.feFuncG.setAttribute('tableValues', val); + } + + if (this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)) { + val = this.getTableValue(effectElements[24].p.v, effectElements[25].p.v, effectElements[26].p.v, effectElements[27].p.v, effectElements[28].p.v); + this.feFuncB.setAttribute('tableValues', val); + } + + if (this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)) { + val = this.getTableValue(effectElements[31].p.v, effectElements[32].p.v, effectElements[33].p.v, effectElements[34].p.v, effectElements[35].p.v); + this.feFuncA.setAttribute('tableValues', val); + } + } +}; + +export default SVGProLevelsFilter; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGStrokeEffect.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGStrokeEffect.js new file mode 100644 index 0000000000000000000000000000000000000000..452eaaf5a8637e50c6ab2f1b1fa906e8d1269323 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGStrokeEffect.js @@ -0,0 +1,119 @@ +import { getLocationHref } from '../../../main'; +import { + createElementID, + bmFloor, +} from '../../../utils/common'; +import createNS from '../../../utils/helpers/svg_elements'; + +function SVGStrokeEffect(fil, filterManager, elem) { + this.initialized = false; + this.filterManager = filterManager; + this.elem = elem; + this.paths = []; +} + +SVGStrokeEffect.prototype.initialize = function () { + var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes; + var path; + var groupPath; + var i; + var len; + if (this.filterManager.effectElements[1].p.v === 1) { + len = this.elem.maskManager.masksProperties.length; + i = 0; + } else { + i = this.filterManager.effectElements[0].p.v - 1; + len = i + 1; + } + groupPath = createNS('g'); + groupPath.setAttribute('fill', 'none'); + groupPath.setAttribute('stroke-linecap', 'round'); + groupPath.setAttribute('stroke-dashoffset', 1); + for (i; i < len; i += 1) { + path = createNS('path'); + groupPath.appendChild(path); + this.paths.push({ p: path, m: i }); + } + if (this.filterManager.effectElements[10].p.v === 3) { + var mask = createNS('mask'); + var id = createElementID(); + mask.setAttribute('id', id); + mask.setAttribute('mask-type', 'alpha'); + mask.appendChild(groupPath); + this.elem.globalData.defs.appendChild(mask); + var g = createNS('g'); + g.setAttribute('mask', 'url(' + getLocationHref() + '#' + id + ')'); + while (elemChildren[0]) { + g.appendChild(elemChildren[0]); + } + this.elem.layerElement.appendChild(g); + this.masker = mask; + groupPath.setAttribute('stroke', '#fff'); + } else if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) { + if (this.filterManager.effectElements[10].p.v === 2) { + elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes; + while (elemChildren.length) { + this.elem.layerElement.removeChild(elemChildren[0]); + } + } + this.elem.layerElement.appendChild(groupPath); + this.elem.layerElement.removeAttribute('mask'); + groupPath.setAttribute('stroke', '#fff'); + } + this.initialized = true; + this.pathMasker = groupPath; +}; + +SVGStrokeEffect.prototype.renderFrame = function (forceRender) { + if (!this.initialized) { + this.initialize(); + } + var i; + var len = this.paths.length; + var mask; + var path; + for (i = 0; i < len; i += 1) { + if (this.paths[i].m !== -1) { + mask = this.elem.maskManager.viewData[this.paths[i].m]; + path = this.paths[i].p; + if (forceRender || this.filterManager._mdf || mask.prop._mdf) { + path.setAttribute('d', mask.lastPath); + } + if (forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf) { + var dasharrayValue; + if (this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100) { + var s = Math.min(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01; + var e = Math.max(this.filterManager.effectElements[7].p.v, this.filterManager.effectElements[8].p.v) * 0.01; + var l = path.getTotalLength(); + dasharrayValue = '0 0 0 ' + l * s + ' '; + var lineLength = l * (e - s); + var segment = 1 + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01; + var units = Math.floor(lineLength / segment); + var j; + for (j = 0; j < units; j += 1) { + dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01 + ' '; + } + dasharrayValue += '0 ' + l * 10 + ' 0 0'; + } else { + dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v * 2 * this.filterManager.effectElements[9].p.v * 0.01; + } + path.setAttribute('stroke-dasharray', dasharrayValue); + } + } + } + if (forceRender || this.filterManager.effectElements[4].p._mdf) { + this.pathMasker.setAttribute('stroke-width', this.filterManager.effectElements[4].p.v * 2); + } + + if (forceRender || this.filterManager.effectElements[6].p._mdf) { + this.pathMasker.setAttribute('opacity', this.filterManager.effectElements[6].p.v); + } + if (this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2) { + if (forceRender || this.filterManager.effectElements[3].p._mdf) { + var color = this.filterManager.effectElements[3].p.v; + this.pathMasker.setAttribute('stroke', 'rgb(' + bmFloor(color[0] * 255) + ',' + bmFloor(color[1] * 255) + ',' + bmFloor(color[2] * 255) + ')'); + } + } +}; + +export default SVGStrokeEffect; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGTintEffect.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGTintEffect.js new file mode 100644 index 0000000000000000000000000000000000000000..424e6ddd2d14a8480e41dc01723a56c7d149d8eb --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGTintEffect.js @@ -0,0 +1,47 @@ +import createNS from '../../../utils/helpers/svg_elements'; +import SVGComposableEffect from './SVGComposableEffect'; +import { + extendPrototype, +} from '../../../utils/functionExtensions'; + +var linearFilterValue = '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0'; + +function SVGTintFilter(filter, filterManager, elem, id, source) { + this.filterManager = filterManager; + var feColorMatrix = createNS('feColorMatrix'); + feColorMatrix.setAttribute('type', 'matrix'); + feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB'); + feColorMatrix.setAttribute('values', linearFilterValue + ' 1 0'); + this.linearFilter = feColorMatrix; + feColorMatrix.setAttribute('result', id + '_tint_1'); + filter.appendChild(feColorMatrix); + feColorMatrix = createNS('feColorMatrix'); + feColorMatrix.setAttribute('type', 'matrix'); + feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB'); + feColorMatrix.setAttribute('values', '1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0'); + feColorMatrix.setAttribute('result', id + '_tint_2'); + filter.appendChild(feColorMatrix); + this.matrixFilter = feColorMatrix; + var feMerge = this.createMergeNode( + id, + [ + source, + id + '_tint_1', + id + '_tint_2', + ] + ); + filter.appendChild(feMerge); +} +extendPrototype([SVGComposableEffect], SVGTintFilter); + +SVGTintFilter.prototype.renderFrame = function (forceRender) { + if (forceRender || this.filterManager._mdf) { + var colorBlack = this.filterManager.effectElements[0].p.v; + var colorWhite = this.filterManager.effectElements[1].p.v; + var opacity = this.filterManager.effectElements[2].p.v / 100; + this.linearFilter.setAttribute('values', linearFilterValue + ' ' + opacity + ' 0'); + this.matrixFilter.setAttribute('values', (colorWhite[0] - colorBlack[0]) + ' 0 0 0 ' + colorBlack[0] + ' ' + (colorWhite[1] - colorBlack[1]) + ' 0 0 0 ' + colorBlack[1] + ' ' + (colorWhite[2] - colorBlack[2]) + ' 0 0 0 ' + colorBlack[2] + ' 0 0 0 1 0'); + } +}; + +export default SVGTintFilter; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGTritoneFilter.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGTritoneFilter.js new file mode 100644 index 0000000000000000000000000000000000000000..8c760010373251b6671fb7d8479b37cc80d3a814 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/elements/svgElements/effects/SVGTritoneFilter.js @@ -0,0 +1,43 @@ +import createNS from '../../../utils/helpers/svg_elements'; + +function SVGTritoneFilter(filter, filterManager, elem, id) { + this.filterManager = filterManager; + var feColorMatrix = createNS('feColorMatrix'); + feColorMatrix.setAttribute('type', 'matrix'); + feColorMatrix.setAttribute('color-interpolation-filters', 'linearRGB'); + feColorMatrix.setAttribute('values', '0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0'); + filter.appendChild(feColorMatrix); + var feComponentTransfer = createNS('feComponentTransfer'); + feComponentTransfer.setAttribute('color-interpolation-filters', 'sRGB'); + feComponentTransfer.setAttribute('result', id); + this.matrixFilter = feComponentTransfer; + var feFuncR = createNS('feFuncR'); + feFuncR.setAttribute('type', 'table'); + feComponentTransfer.appendChild(feFuncR); + this.feFuncR = feFuncR; + var feFuncG = createNS('feFuncG'); + feFuncG.setAttribute('type', 'table'); + feComponentTransfer.appendChild(feFuncG); + this.feFuncG = feFuncG; + var feFuncB = createNS('feFuncB'); + feFuncB.setAttribute('type', 'table'); + feComponentTransfer.appendChild(feFuncB); + this.feFuncB = feFuncB; + filter.appendChild(feComponentTransfer); +} + +SVGTritoneFilter.prototype.renderFrame = function (forceRender) { + if (forceRender || this.filterManager._mdf) { + var color1 = this.filterManager.effectElements[0].p.v; + var color2 = this.filterManager.effectElements[1].p.v; + var color3 = this.filterManager.effectElements[2].p.v; + var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0]; + var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1]; + var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2]; + this.feFuncR.setAttribute('tableValues', tableR); + this.feFuncG.setAttribute('tableValues', tableG); + this.feFuncB.setAttribute('tableValues', tableB); + } +}; + +export default SVGTritoneFilter; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/main.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/main.js new file mode 100644 index 0000000000000000000000000000000000000000..0fa5531e7d2debd6def94decf11fbd8a7ef4963f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/main.js @@ -0,0 +1,21 @@ +const svgNS = 'http://www.w3.org/2000/svg'; + +let locationHref = ''; +let _useWebWorker = false; + +const initialDefaultFrame = -999999; + +const setWebWorker = (flag) => { _useWebWorker = !!flag; }; +const getWebWorker = () => _useWebWorker; + +const setLocationHref = (value) => { locationHref = value; }; +const getLocationHref = () => locationHref; + +export { + svgNS, + initialDefaultFrame, + setWebWorker, + getWebWorker, + setLocationHref, + getLocationHref, +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/mask.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/mask.js new file mode 100644 index 0000000000000000000000000000000000000000..ab11b80dd8bc7f543fc002a948e0eb5beb4c8b0c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/mask.js @@ -0,0 +1,239 @@ +import { getLocationHref } from './main'; +import { + createElementID, +} from './utils/common'; +import { + createSizedArray, +} from './utils/helpers/arrays'; +import PropertyFactory from './utils/PropertyFactory'; +import ShapePropertyFactory from './utils/shapes/ShapeProperty'; +import createNS from './utils/helpers/svg_elements'; + +function MaskElement(data, element, globalData) { + this.data = data; + this.element = element; + this.globalData = globalData; + this.storedData = []; + this.masksProperties = this.data.masksProperties || []; + this.maskElement = null; + var defs = this.globalData.defs; + var i; + var len = this.masksProperties ? this.masksProperties.length : 0; + this.viewData = createSizedArray(len); + this.solidPath = ''; + + var path; + var properties = this.masksProperties; + var count = 0; + var currentMasks = []; + var j; + var jLen; + var layerId = createElementID(); + var rect; + var expansor; + var feMorph; + var x; + var maskType = 'clipPath'; + var maskRef = 'clip-path'; + for (i = 0; i < len; i += 1) { + if ((properties[i].mode !== 'a' && properties[i].mode !== 'n') || properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x) { + maskType = 'mask'; + maskRef = 'mask'; + } + + if ((properties[i].mode === 's' || properties[i].mode === 'i') && count === 0) { + rect = createNS('rect'); + rect.setAttribute('fill', '#ffffff'); + rect.setAttribute('width', this.element.comp.data.w || 0); + rect.setAttribute('height', this.element.comp.data.h || 0); + currentMasks.push(rect); + } else { + rect = null; + } + + path = createNS('path'); + if (properties[i].mode === 'n') { + // TODO move this to a factory or to a constructor + this.viewData[i] = { + op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element), + prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3), + elem: path, + lastPath: '', + }; + defs.appendChild(path); + } else { + count += 1; + + path.setAttribute('fill', properties[i].mode === 's' ? '#000000' : '#ffffff'); + path.setAttribute('clip-rule', 'nonzero'); + var filterID; + + if (properties[i].x.k !== 0) { + maskType = 'mask'; + maskRef = 'mask'; + x = PropertyFactory.getProp(this.element, properties[i].x, 0, null, this.element); + filterID = createElementID(); + expansor = createNS('filter'); + expansor.setAttribute('id', filterID); + feMorph = createNS('feMorphology'); + feMorph.setAttribute('operator', 'erode'); + feMorph.setAttribute('in', 'SourceGraphic'); + feMorph.setAttribute('radius', '0'); + expansor.appendChild(feMorph); + defs.appendChild(expansor); + path.setAttribute('stroke', properties[i].mode === 's' ? '#000000' : '#ffffff'); + } else { + feMorph = null; + x = null; + } + + // TODO move this to a factory or to a constructor + this.storedData[i] = { + elem: path, + x: x, + expan: feMorph, + lastPath: '', + lastOperator: '', + filterId: filterID, + lastRadius: 0, + }; + if (properties[i].mode === 'i') { + jLen = currentMasks.length; + var g = createNS('g'); + for (j = 0; j < jLen; j += 1) { + g.appendChild(currentMasks[j]); + } + var mask = createNS('mask'); + mask.setAttribute('mask-type', 'alpha'); + mask.setAttribute('id', layerId + '_' + count); + mask.appendChild(path); + defs.appendChild(mask); + g.setAttribute('mask', 'url(' + getLocationHref() + '#' + layerId + '_' + count + ')'); + + currentMasks.length = 0; + currentMasks.push(g); + } else { + currentMasks.push(path); + } + if (properties[i].inv && !this.solidPath) { + this.solidPath = this.createLayerSolidPath(); + } + // TODO move this to a factory or to a constructor + this.viewData[i] = { + elem: path, + lastPath: '', + op: PropertyFactory.getProp(this.element, properties[i].o, 0, 0.01, this.element), + prop: ShapePropertyFactory.getShapeProp(this.element, properties[i], 3), + invRect: rect, + }; + if (!this.viewData[i].prop.k) { + this.drawPath(properties[i], this.viewData[i].prop.v, this.viewData[i]); + } + } + } + + this.maskElement = createNS(maskType); + + len = currentMasks.length; + for (i = 0; i < len; i += 1) { + this.maskElement.appendChild(currentMasks[i]); + } + + if (count > 0) { + this.maskElement.setAttribute('id', layerId); + this.element.maskedElement.setAttribute(maskRef, 'url(' + getLocationHref() + '#' + layerId + ')'); + defs.appendChild(this.maskElement); + } + if (this.viewData.length) { + this.element.addRenderableComponent(this); + } +} + +MaskElement.prototype.getMaskProperty = function (pos) { + return this.viewData[pos].prop; +}; + +MaskElement.prototype.renderFrame = function (isFirstFrame) { + var finalMat = this.element.finalTransform.mat; + var i; + var len = this.masksProperties.length; + for (i = 0; i < len; i += 1) { + if (this.viewData[i].prop._mdf || isFirstFrame) { + this.drawPath(this.masksProperties[i], this.viewData[i].prop.v, this.viewData[i]); + } + if (this.viewData[i].op._mdf || isFirstFrame) { + this.viewData[i].elem.setAttribute('fill-opacity', this.viewData[i].op.v); + } + if (this.masksProperties[i].mode !== 'n') { + if (this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)) { + this.viewData[i].invRect.setAttribute('transform', finalMat.getInverseMatrix().to2dCSS()); + } + if (this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)) { + var feMorph = this.storedData[i].expan; + if (this.storedData[i].x.v < 0) { + if (this.storedData[i].lastOperator !== 'erode') { + this.storedData[i].lastOperator = 'erode'; + this.storedData[i].elem.setAttribute('filter', 'url(' + getLocationHref() + '#' + this.storedData[i].filterId + ')'); + } + feMorph.setAttribute('radius', -this.storedData[i].x.v); + } else { + if (this.storedData[i].lastOperator !== 'dilate') { + this.storedData[i].lastOperator = 'dilate'; + this.storedData[i].elem.setAttribute('filter', null); + } + this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v * 2); + } + } + } + } +}; + +MaskElement.prototype.getMaskelement = function () { + return this.maskElement; +}; + +MaskElement.prototype.createLayerSolidPath = function () { + var path = 'M0,0 '; + path += ' h' + this.globalData.compSize.w; + path += ' v' + this.globalData.compSize.h; + path += ' h-' + this.globalData.compSize.w; + path += ' v-' + this.globalData.compSize.h + ' '; + return path; +}; + +MaskElement.prototype.drawPath = function (pathData, pathNodes, viewData) { + var pathString = ' M' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1]; + var i; + var len; + len = pathNodes._length; + for (i = 1; i < len; i += 1) { + // pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[i][0]+','+pathNodes.i[i][1] + " "+pathNodes.v[i][0]+','+pathNodes.v[i][1]; + pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[i][0] + ',' + pathNodes.i[i][1] + ' ' + pathNodes.v[i][0] + ',' + pathNodes.v[i][1]; + } + // pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[0][0]+','+pathNodes.i[0][1] + " "+pathNodes.v[0][0]+','+pathNodes.v[0][1]; + if (pathNodes.c && len > 1) { + pathString += ' C' + pathNodes.o[i - 1][0] + ',' + pathNodes.o[i - 1][1] + ' ' + pathNodes.i[0][0] + ',' + pathNodes.i[0][1] + ' ' + pathNodes.v[0][0] + ',' + pathNodes.v[0][1]; + } + // pathNodes.__renderedString = pathString; + + if (viewData.lastPath !== pathString) { + var pathShapeValue = ''; + if (viewData.elem) { + if (pathNodes.c) { + pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString; + } + viewData.elem.setAttribute('d', pathShapeValue); + } + viewData.lastPath = pathString; + } +}; + +MaskElement.prototype.destroy = function () { + this.element = null; + this.globalData = null; + this.maskElement = null; + this.data = null; + this.masksProperties = null; +}; + +export default MaskElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/canvas.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/canvas.js new file mode 100644 index 0000000000000000000000000000000000000000..6d0a5967bc215289f4393f94553b8c9115614484 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/canvas.js @@ -0,0 +1,24 @@ +import lottie from './canvas_light'; +import { + setExpressionsPlugin, + setExpressionInterfaces, +} from '../utils/common'; +import Expressions from '../utils/expressions/Expressions'; +import interfacesProvider from '../utils/expressions/InterfacesProvider'; +import expressionPropertyDecorator from '../utils/expressions/ExpressionPropertyDecorator'; +import expressionTextPropertyDecorator from '../utils/expressions/ExpressionTextPropertyDecorator'; + +// Canvas effects +import { registerCVEffect } from '../elements/canvasElements/CVEffects'; +import CVGaussianBlurEffect from '../elements/canvasElements/effects/CVGaussianBlurEffect'; + +// Registering expression plugin +setExpressionsPlugin(Expressions); +setExpressionInterfaces(interfacesProvider); +expressionPropertyDecorator(); +expressionTextPropertyDecorator(); + +// Registering canvas effects +registerCVEffect(29, CVGaussianBlurEffect, true); + +export default lottie; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/canvas_light.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/canvas_light.js new file mode 100644 index 0000000000000000000000000000000000000000..0af0510b10af79f05c615d0aa8385db4f22604c6 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/canvas_light.js @@ -0,0 +1,25 @@ +import lottie from './main'; +import { ShapeModifiers } from '../utils/shapes/ShapeModifiers'; +import TrimModifier from '../utils/shapes/TrimModifier'; +import PuckerAndBloatModifier from '../utils/shapes/PuckerAndBloatModifier'; +import RepeaterModifier from '../utils/shapes/RepeaterModifier'; +import RoundCornersModifier from '../utils/shapes/RoundCornersModifier'; +import ZigZagModifier from '../utils/shapes/ZigZagModifier'; +import OffsetPathModifier from '../utils/shapes/OffsetPathModifier'; +import CanvasRenderer from '../renderers/CanvasRenderer'; +import { + registerRenderer, +} from '../renderers/renderersManager'; + +// Registering renderers +registerRenderer('canvas', CanvasRenderer); + +// Registering shape modifiers +ShapeModifiers.registerModifier('tm', TrimModifier); +ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier); +ShapeModifiers.registerModifier('rp', RepeaterModifier); +ShapeModifiers.registerModifier('rd', RoundCornersModifier); +ShapeModifiers.registerModifier('zz', ZigZagModifier); +ShapeModifiers.registerModifier('op', OffsetPathModifier); + +export default lottie; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/full.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/full.js new file mode 100644 index 0000000000000000000000000000000000000000..f2640cf351e9d91506e753ba0c452e1be8d91ff8 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/full.js @@ -0,0 +1,74 @@ +import lottie from './main'; +import { + setExpressionsPlugin, + setExpressionInterfaces, +} from '../utils/common'; +import { ShapeModifiers } from '../utils/shapes/ShapeModifiers'; +import TrimModifier from '../utils/shapes/TrimModifier'; +import PuckerAndBloatModifier from '../utils/shapes/PuckerAndBloatModifier'; +import RepeaterModifier from '../utils/shapes/RepeaterModifier'; +import RoundCornersModifier from '../utils/shapes/RoundCornersModifier'; +import ZigZagModifier from '../utils/shapes/ZigZagModifier'; +import OffsetPathModifier from '../utils/shapes/OffsetPathModifier'; +import CanvasRenderer from '../renderers/CanvasRenderer'; +import HybridRenderer from '../renderers/HybridRenderer'; +import SVGRenderer from '../renderers/SVGRenderer'; +import { + registerRenderer, +} from '../renderers/renderersManager'; +import Expressions from '../utils/expressions/Expressions'; +import interfacesProvider from '../utils/expressions/InterfacesProvider'; +import expressionPropertyDecorator from '../utils/expressions/ExpressionPropertyDecorator'; +import expressionTextPropertyDecorator from '../utils/expressions/ExpressionTextPropertyDecorator'; +// SVG effects +import { registerEffect } from '../elements/svgElements/SVGEffects'; +import SVGTintFilter from '../elements/svgElements/effects/SVGTintEffect'; +import SVGFillFilter from '../elements/svgElements/effects/SVGFillFilter'; +import SVGStrokeEffect from '../elements/svgElements/effects/SVGStrokeEffect'; +import SVGTritoneFilter from '../elements/svgElements/effects/SVGTritoneFilter'; +import SVGProLevelsFilter from '../elements/svgElements/effects/SVGProLevelsFilter'; +import SVGDropShadowEffect from '../elements/svgElements/effects/SVGDropShadowEffect'; +import SVGMatte3Effect from '../elements/svgElements/effects/SVGMatte3Effect'; +import SVGGaussianBlurEffect from '../elements/svgElements/effects/SVGGaussianBlurEffect'; + +// Canvas effects +import { registerCVEffect } from '../elements/canvasElements/CVEffects'; +import CVGaussianBlurEffect from '../elements/canvasElements/effects/CVGaussianBlurEffect'; + +import { LogUtil } from '../utils/LogUtil'; + +// Registering renderers +registerRenderer('canvas', CanvasRenderer); +registerRenderer('html', HybridRenderer); +registerRenderer('svg', SVGRenderer); + +// Registering shape modifiers +ShapeModifiers.registerModifier('tm', TrimModifier); +ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier); +ShapeModifiers.registerModifier('rp', RepeaterModifier); +ShapeModifiers.registerModifier('rd', RoundCornersModifier); +ShapeModifiers.registerModifier('zz', ZigZagModifier); +ShapeModifiers.registerModifier('op', OffsetPathModifier); + +// Registering expression plugin +setExpressionsPlugin(Expressions); +setExpressionInterfaces(interfacesProvider); +expressionPropertyDecorator(); +expressionTextPropertyDecorator(); + +// Registering svg effects +registerEffect(20, SVGTintFilter, true); +registerEffect(21, SVGFillFilter, true); +registerEffect(22, SVGStrokeEffect, false); +registerEffect(23, SVGTritoneFilter, true); +registerEffect(24, SVGProLevelsFilter, true); +registerEffect(25, SVGDropShadowEffect, true); +registerEffect(28, SVGMatte3Effect, false); +registerEffect(29, SVGGaussianBlurEffect, true); + +// Registering canvas effects +registerCVEffect(29, CVGaussianBlurEffect, true); + +export { LogUtil }; + +export default lottie; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/full_worker.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/full_worker.js new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/html.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/html.js new file mode 100644 index 0000000000000000000000000000000000000000..3e65186394b7ff259629d0ee9b7470ea3848359e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/html.js @@ -0,0 +1,35 @@ +import lottie from './html_light'; +import { + setExpressionsPlugin, + setExpressionInterfaces, +} from '../utils/common'; +import Expressions from '../utils/expressions/Expressions'; +import interfacesProvider from '../utils/expressions/InterfacesProvider'; +import expressionPropertyDecorator from '../utils/expressions/ExpressionPropertyDecorator'; +import expressionTextPropertyDecorator from '../utils/expressions/ExpressionTextPropertyDecorator'; +// SVG effects +import { registerEffect } from '../elements/svgElements/SVGEffects'; +import SVGTintFilter from '../elements/svgElements/effects/SVGTintEffect'; +import SVGFillFilter from '../elements/svgElements/effects/SVGFillFilter'; +import SVGStrokeEffect from '../elements/svgElements/effects/SVGStrokeEffect'; +import SVGTritoneFilter from '../elements/svgElements/effects/SVGTritoneFilter'; +import SVGProLevelsFilter from '../elements/svgElements/effects/SVGProLevelsFilter'; +import SVGDropShadowEffect from '../elements/svgElements/effects/SVGDropShadowEffect'; +import SVGMatte3Effect from '../elements/svgElements/effects/SVGMatte3Effect'; +import SVGGaussianBlurEffect from '../elements/svgElements/effects/SVGGaussianBlurEffect'; + +// Registering expression plugin +setExpressionsPlugin(Expressions); +setExpressionInterfaces(interfacesProvider); +expressionPropertyDecorator(); +expressionTextPropertyDecorator(); +registerEffect(20, SVGTintFilter, true); +registerEffect(21, SVGFillFilter, true); +registerEffect(22, SVGStrokeEffect, false); +registerEffect(23, SVGTritoneFilter, true); +registerEffect(24, SVGProLevelsFilter, true); +registerEffect(25, SVGDropShadowEffect, true); +registerEffect(28, SVGMatte3Effect, false); +registerEffect(29, SVGGaussianBlurEffect, true); + +export default lottie; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/html_light.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/html_light.js new file mode 100644 index 0000000000000000000000000000000000000000..185a7959a074ea98ef4816edc8af0807182613bb --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/html_light.js @@ -0,0 +1,25 @@ +import lottie from './main'; +import { ShapeModifiers } from '../utils/shapes/ShapeModifiers'; +import TrimModifier from '../utils/shapes/TrimModifier'; +import PuckerAndBloatModifier from '../utils/shapes/PuckerAndBloatModifier'; +import RepeaterModifier from '../utils/shapes/RepeaterModifier'; +import RoundCornersModifier from '../utils/shapes/RoundCornersModifier'; +import ZigZagModifier from '../utils/shapes/ZigZagModifier'; +import OffsetPathModifier from '../utils/shapes/OffsetPathModifier'; +import HybridRenderer from '../renderers/HybridRenderer'; +import { + registerRenderer, +} from '../renderers/renderersManager'; + +// Registering renderers +registerRenderer('html', HybridRenderer); + +// Registering shape modifiers +ShapeModifiers.registerModifier('tm', TrimModifier); +ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier); +ShapeModifiers.registerModifier('rp', RepeaterModifier); +ShapeModifiers.registerModifier('rd', RoundCornersModifier); +ShapeModifiers.registerModifier('zz', ZigZagModifier); +ShapeModifiers.registerModifier('op', OffsetPathModifier); + +export default lottie; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/main.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/main.js new file mode 100644 index 0000000000000000000000000000000000000000..7eac88c8a5f967d37d28eee1d79a77a6937690eb --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/main.js @@ -0,0 +1,148 @@ +import { setLocationHref, setWebWorker } from '../main'; +import animationManager from '../animation/AnimationManager'; +import { + setDefaultCurveSegments, + getDefaultCurveSegments, + roundValues, + setIdPrefix, + setSubframeEnabled, + setExpressionsPlugin, +} from '../utils/common'; +import PropertyFactory from '../utils/PropertyFactory'; +import ShapePropertyFactory from '../utils/shapes/ShapeProperty'; +import Matrix from '../3rd_party/transformation-matrix'; + +const lottie = {}; +var standalone = '__[STANDALONE]__'; +var animationData = '__[ANIMATIONDATA]__'; +var renderer = ''; + +function setLocation(href) { + setLocationHref(href); +} + +function searchAnimations() { + if (standalone === true) { + animationManager.searchAnimations(animationData, standalone, renderer); + } else { + animationManager.searchAnimations(); + } +} + +function setSubframeRendering(flag) { + setSubframeEnabled(flag); +} + +function setPrefix(prefix) { + setIdPrefix(prefix); +} + +function loadAnimation(params) { + if (standalone === true) { + params.animationData = JSON.parse(animationData); + } + return animationManager.loadAnimation(params); +} + +function setQuality(value) { + if (typeof value === 'string') { + switch (value) { + case 'high': + setDefaultCurveSegments(200); + break; + default: + case 'medium': + setDefaultCurveSegments(50); + break; + case 'low': + setDefaultCurveSegments(10); + break; + } + } else if (!isNaN(value) && value > 1) { + setDefaultCurveSegments(value); + } + if (getDefaultCurveSegments() >= 50) { + roundValues(false); + } else { + roundValues(true); + } +} + +function inBrowser() { + return false; +} + +function installPlugin(type, plugin) { + if (type === 'expressions') { + setExpressionsPlugin(plugin); + } +} + +function getFactory(name) { + switch (name) { + case 'propertyFactory': + return PropertyFactory; + case 'shapePropertyFactory': + return ShapePropertyFactory; + case 'matrix': + return Matrix; + default: + return null; + } +} + + +lottie.play = animationManager.play; +lottie.pause = animationManager.pause; +lottie.setLocationHref = setLocation; +lottie.togglePause = animationManager.togglePause; +lottie.setSpeed = animationManager.setSpeed; +lottie.setDirection = animationManager.setDirection; +lottie.stop = animationManager.stop; +lottie.searchAnimations = searchAnimations; +lottie.registerAnimation = animationManager.registerAnimation; +lottie.loadAnimation = loadAnimation; +lottie.setSubframeRendering = setSubframeRendering; +lottie.resize = animationManager.resize; +lottie.setContentMode = animationManager.setContentMode; +lottie.clearFileCache = animationManager.clearFileCache; +lottie.clearFileCacheSync = animationManager.clearFileCacheSync; +// lottie.start = start; +lottie.goToAndStop = animationManager.goToAndStop; +lottie.goToAndPlay = animationManager.goToAndPlay; +lottie.destroy = animationManager.destroy; +lottie.setFrameRate = animationManager.setFrameRate; +lottie.setQuality = setQuality; +lottie.inBrowser = inBrowser; +lottie.installPlugin = installPlugin; +lottie.freeze = animationManager.freeze; +lottie.unfreeze = animationManager.unfreeze; +lottie.setVolume = animationManager.setVolume; +lottie.mute = animationManager.mute; +lottie.unmute = animationManager.unmute; +lottie.getRegisteredAnimations = animationManager.getRegisteredAnimations; +lottie.bindContext2dToCoordinator = animationManager.bindContext2dToCoordinator; +lottie.unbindContext2dFromCoordinator = animationManager.unbindContext2dFromCoordinator; +lottie.setAttachedCanvasHasVisibleArea = animationManager.setAttachedCanvasHasVisibleArea; +lottie.useWebWorker = setWebWorker; +lottie.setIDPrefix = setPrefix; +lottie.__getFactory = getFactory; +lottie.version = '[[BM_VERSION]]'; + + +function getQueryVariable(variable) { + var vars = queryString.split('&'); + for (var i = 0; i < vars.length; i += 1) { + var pair = vars[i].split('='); + if (decodeURIComponent(pair[0]) == variable) { // eslint-disable-line eqeqeq + return decodeURIComponent(pair[1]); + } + } + return null; +} +var queryString = ''; +if (standalone) { + renderer = getQueryVariable('renderer'); +} + +export default lottie; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/svg.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/svg.js new file mode 100644 index 0000000000000000000000000000000000000000..4c7f5dfb43bd5832a3dfab13f25070dcba3ee51c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/svg.js @@ -0,0 +1,35 @@ +import lottie from './svg_light'; +import { + setExpressionsPlugin, + setExpressionInterfaces, +} from '../utils/common'; +import Expressions from '../utils/expressions/Expressions'; +import interfacesProvider from '../utils/expressions/InterfacesProvider'; +import expressionPropertyDecorator from '../utils/expressions/ExpressionPropertyDecorator'; +import expressionTextPropertyDecorator from '../utils/expressions/ExpressionTextPropertyDecorator'; +// SVG effects +import { registerEffect } from '../elements/svgElements/SVGEffects'; +import SVGTintFilter from '../elements/svgElements/effects/SVGTintEffect'; +import SVGFillFilter from '../elements/svgElements/effects/SVGFillFilter'; +import SVGStrokeEffect from '../elements/svgElements/effects/SVGStrokeEffect'; +import SVGTritoneFilter from '../elements/svgElements/effects/SVGTritoneFilter'; +import SVGProLevelsFilter from '../elements/svgElements/effects/SVGProLevelsFilter'; +import SVGDropShadowEffect from '../elements/svgElements/effects/SVGDropShadowEffect'; +import SVGMatte3Effect from '../elements/svgElements/effects/SVGMatte3Effect'; +import SVGGaussianBlurEffect from '../elements/svgElements/effects/SVGGaussianBlurEffect'; + +// Registering expression plugin +setExpressionsPlugin(Expressions); +setExpressionInterfaces(interfacesProvider); +expressionPropertyDecorator(); +expressionTextPropertyDecorator(); +registerEffect(20, SVGTintFilter, true); +registerEffect(21, SVGFillFilter, true); +registerEffect(22, SVGStrokeEffect, false); +registerEffect(23, SVGTritoneFilter, true); +registerEffect(24, SVGProLevelsFilter, true); +registerEffect(25, SVGDropShadowEffect, true); +registerEffect(28, SVGMatte3Effect, false); +registerEffect(29, SVGGaussianBlurEffect, true); + +export default lottie; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/svg_light.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/svg_light.js new file mode 100644 index 0000000000000000000000000000000000000000..8df0ebae172bc0ade9ab4a751363f3bfae700e2f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/modules/svg_light.js @@ -0,0 +1,25 @@ +import lottie from './main'; +import { ShapeModifiers } from '../utils/shapes/ShapeModifiers'; +import TrimModifier from '../utils/shapes/TrimModifier'; +import PuckerAndBloatModifier from '../utils/shapes/PuckerAndBloatModifier'; +import RepeaterModifier from '../utils/shapes/RepeaterModifier'; +import RoundCornersModifier from '../utils/shapes/RoundCornersModifier'; +import ZigZagModifier from '../utils/shapes/ZigZagModifier'; +import OffsetPathModifier from '../utils/shapes/OffsetPathModifier'; +import SVGRenderer from '../renderers/SVGRenderer'; +import { + registerRenderer, +} from '../renderers/renderersManager'; + +// Registering renderers +registerRenderer('svg', SVGRenderer); + +// Registering shape modifiers +ShapeModifiers.registerModifier('tm', TrimModifier); +ShapeModifiers.registerModifier('pb', PuckerAndBloatModifier); +ShapeModifiers.registerModifier('rp', RepeaterModifier); +ShapeModifiers.registerModifier('rd', RoundCornersModifier); +ShapeModifiers.registerModifier('zz', ZigZagModifier); +ShapeModifiers.registerModifier('op', OffsetPathModifier); + +export default lottie; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/BaseRenderer.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/BaseRenderer.js new file mode 100644 index 0000000000000000000000000000000000000000..58a09e639a7b6a3b79215fac7aea6a1a648141c4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/BaseRenderer.js @@ -0,0 +1,187 @@ +import FontManager from '../utils/FontManager'; +import slotFactory from '../utils/SlotManager'; +import FootageElement from '../elements/FootageElement'; +import AudioElement from '../elements/AudioElement'; + +function BaseRenderer() {} +BaseRenderer.prototype.checkLayers = function (num) { + var i; + var len = this.layers?.length; + var data; + this.completeLayers = true; + for (i = len - 1; i >= 0; i -= 1) { + if (!this.elements[i]) { + data = this.layers[i]; + if (data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st)) { + this.buildItem(i); + } + } + this.completeLayers = this.elements[i] ? this.completeLayers : false; + } + this.checkPendingElements(); +}; + +BaseRenderer.prototype.createItem = function (layer) { + switch (layer.ty) { + case 2: + return this.createImage(layer); + case 0: + return this.createComp(layer); + case 1: + return this.createSolid(layer); + case 3: + return this.createNull(layer); + case 4: + return this.createShape(layer); + case 5: + return this.createText(layer); + case 6: + return this.createAudio(layer); + case 13: + return this.createCamera(layer); + case 15: + return this.createFootage(layer); + default: + return this.createNull(layer); + } +}; + +BaseRenderer.prototype.createCamera = function () { + throw new Error('You\'re using a 3d camera. Try the html renderer.'); +}; + +BaseRenderer.prototype.createAudio = function (data) { + return new AudioElement(data, this.globalData, this); +}; + +BaseRenderer.prototype.createFootage = function (data) { + return new FootageElement(data, this.globalData, this); +}; + +BaseRenderer.prototype.buildAllItems = function () { + var i; + var len = this.layers?.length; + for (i = 0; i < len; i += 1) { + this.buildItem(i); + } + this.checkPendingElements(); +}; + +BaseRenderer.prototype.includeLayers = function (newLayers) { + this.completeLayers = false; + var i; + var len = newLayers?.length; + var j; + var jLen = this.layers?.length; + for (i = 0; i < len; i += 1) { + j = 0; + while (j < jLen) { + if (this.layers[j].id === newLayers[i].id) { + this.layers[j] = newLayers[i]; + break; + } + j += 1; + } + } +}; + +BaseRenderer.prototype.setProjectInterface = function (pInterface) { + this.globalData.projectInterface = pInterface; +}; + +BaseRenderer.prototype.initItems = function () { + if (!this.globalData.progressiveLoad) { + this.buildAllItems(); + } +}; +BaseRenderer.prototype.buildElementParenting = function (element, parentName, hierarchy) { + var elements = this.elements; + var layers = this.layers; + var i = 0; + var len = layers?.length; + while (i < len) { + if (layers[i].ind == parentName) { // eslint-disable-line eqeqeq + if (!elements[i] || elements[i] === true) { + this.buildItem(i); + this.addPendingElement(element); + } else { + hierarchy.push(elements[i]); + elements[i].setAsParent(); + if (layers[i].parent !== undefined) { + this.buildElementParenting(element, layers[i].parent, hierarchy); + } else { + element.setHierarchy(hierarchy); + } + } + } + i += 1; + } +}; + +BaseRenderer.prototype.addPendingElement = function (element) { + this.pendingElements.push(element); +}; + +BaseRenderer.prototype.searchExtraCompositions = function (assets) { + var i; + var len = assets?.length; + for (i = 0; i < len; i += 1) { + if (assets[i].xt) { + var comp = this.createComp(assets[i]); + comp.initExpressions(); + this.globalData.projectInterface.registerComposition(comp); + } + } +}; + +BaseRenderer.prototype.getElementById = function (ind) { + var i; + var len = this.elements?.length; + for (i = 0; i < len; i += 1) { + if (this.elements[i].data.ind === ind) { + return this.elements[i]; + } + } + return null; +}; + +BaseRenderer.prototype.getElementByPath = function (path) { + var pathValue = path.shift(); + var element; + if (typeof pathValue === 'number') { + element = this.elements[pathValue]; + } else { + var i; + var len = this.elements?.length; + for (i = 0; i < len; i += 1) { + if (this.elements[i].data.nm === pathValue) { + element = this.elements[i]; + break; + } + } + } + if (path.length === 0) { + return element; + } + return element.getElementByPath(path); +}; + +BaseRenderer.prototype.setupGlobalData = function (animData, fontsContainer) { + this.globalData.fontManager = new FontManager(); + this.globalData.slotManager = slotFactory(animData); + this.globalData.fontManager.addChars(animData.chars); + this.globalData.fontManager.addFonts(animData.fonts, fontsContainer); + this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem); + this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem); + this.globalData.imageLoader = this.animationItem.imagePreloader; + this.globalData.audioController = this.animationItem.audioController; + this.globalData.frameId = 0; + this.globalData.frameRate = animData.fr; + this.globalData.nm = animData.nm; + this.globalData.compSize = { + w: animData.w, + h: animData.h, + }; +}; + +export default BaseRenderer; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/CanvasRenderer.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/CanvasRenderer.js new file mode 100644 index 0000000000000000000000000000000000000000..15f6dfb464a26124e00caa42bb90701f15c9d968 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/CanvasRenderer.js @@ -0,0 +1,46 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; +import Matrix from '../3rd_party/transformation-matrix'; +import CanvasRendererBase from './CanvasRendererBase'; +import CVContextData from '../elements/canvasElements/CVContextData'; +import CVCompElement from '../elements/canvasElements/CVCompElement'; + +function CanvasRenderer(animationItem, config) { + this.animationItem = animationItem; + this.renderConfig = { + clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true, + context: (config && config.context) || null, + progressiveLoad: (config && config.progressiveLoad) || false, + preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet', + imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice', + contentVisibility: (config && config.contentVisibility) || 'visible', + className: (config && config.className) || '', + id: (config && config.id) || '', + runExpressions: !config || config.runExpressions === undefined || config.runExpressions, + }; + this.renderConfig.dpr = (config && config.dpr) || 1; + if (this.animationItem.wrapper) { + this.renderConfig.dpr = (config && config.dpr) || 1; + } + this.renderedFrame = -1; + this.globalData = { + frameNum: -1, + _mdf: false, + renderConfig: this.renderConfig, + currentGlobalAlpha: -1, + }; + this.contextData = new CVContextData(); + this.elements = []; + this.pendingElements = []; + this.transformMat = new Matrix(); + this.completeLayers = false; + this.rendererType = 'canvas'; +} +extendPrototype([CanvasRendererBase], CanvasRenderer); + +CanvasRenderer.prototype.createComp = function (data) { + return new CVCompElement(data, this.globalData, this); +}; + +export default CanvasRenderer; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/CanvasRendererBase.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/CanvasRendererBase.js new file mode 100644 index 0000000000000000000000000000000000000000..4564432ff46448fe50dd6c51765e34a47f5e5b43 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/CanvasRendererBase.js @@ -0,0 +1,445 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; +import { + createSizedArray, +} from '../utils/helpers/arrays'; +import createTag from '../utils/helpers/html_elements'; +import SVGRenderer from './SVGRenderer'; +import Matrix from '../3rd_party/transformation-matrix'; +import BaseRenderer from './BaseRenderer'; +import CVContextData from '../elements/canvasElements/CVContextData'; +import CVShapeElement from '../elements/canvasElements/CVShapeElement'; +import CVTextElement from '../elements/canvasElements/CVTextElement'; +import CVImageElement from '../elements/canvasElements/CVImageElement'; +import CVSolidElement from '../elements/canvasElements/CVSolidElement'; +import {LogUtil} from '../utils/LogUtil' + +function CanvasRendererBase(animationItem, config) { + this.animationItem = animationItem; + this.renderConfig = { + clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true, + context: (config && config.context) || null, + progressiveLoad: (config && config.progressiveLoad) || false, + preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet', + imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice', + contentVisibility: (config && config.contentVisibility) || 'visible', + className: (config && config.className) || '', + id: (config && config.id) || '', + }; + this.renderConfig.dpr = (config && config.dpr) || 1; + if (this.animationItem.wrapper) { + this.renderConfig.dpr = (config && config.dpr) || 1; + } + this.renderedFrame = -1; + this.globalData = { + frameNum: -1, + _mdf: false, + renderConfig: this.renderConfig, + currentGlobalAlpha: -1, + }; + this.contextData = new CVContextData(); + this.elements = []; + this.pendingElements = []; + this.transformMat = new Matrix(); + this.completeLayers = false; + this.rendererType = 'canvas'; +} +extendPrototype([BaseRenderer], CanvasRendererBase); + +CanvasRendererBase.prototype.createShape = function (data) { + return new CVShapeElement(data, this.globalData, this); +}; + +CanvasRendererBase.prototype.createText = function (data) { + return new CVTextElement(data, this.globalData, this); +}; + +CanvasRendererBase.prototype.createImage = function (data) { + return new CVImageElement(data, this.globalData, this); +}; + +CanvasRendererBase.prototype.createSolid = function (data) { + return new CVSolidElement(data, this.globalData, this); +}; + +CanvasRendererBase.prototype.createNull = SVGRenderer.prototype.createNull; + +CanvasRendererBase.prototype.ctxTransform = function (props) { + if (props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0) { + return; + } + if (!this.renderConfig.clearCanvas) { + this.canvasContext.transform(props[0], props[1], props[4], props[5], props[12], props[13]); + return; + } + // Resetting the canvas transform matrix to the new transform + this.transformMat.cloneFromProps(props); + // Taking the last transform value from the stored stack of transforms + var currentTransform = this.contextData.getTransform(); + var cProps = currentTransform.props; + // Applying the last transform value after the new transform to respect the order of transformations + this.transformMat.transform(cProps[0], cProps[1], cProps[2], cProps[3], cProps[4], cProps[5], cProps[6], cProps[7], cProps[8], cProps[9], cProps[10], cProps[11], cProps[12], cProps[13], cProps[14], cProps[15]); + // Storing the new transformed value in the stored transform + currentTransform.cloneFromProps(this.transformMat.props); + var trProps = currentTransform.props; + // Applying the new transform to the canvas + this.canvasContext.setTransform(trProps[0], trProps[1], trProps[4], trProps[5], trProps[12], trProps[13]); +}; + +CanvasRendererBase.prototype.ctxOpacity = function (op) { + /* if(op === 1){ + return; + } */ + var currentOpacity = this.contextData.getOpacity(); + if (!this.renderConfig.clearCanvas) { + this.canvasContext.globalAlpha *= op < 0 ? 0 : op; + this.globalData.currentGlobalAlpha = currentOpacity; + return; + } + currentOpacity *= op < 0 ? 0 : op; + this.contextData.setOpacity(currentOpacity); + //设置当前画布的透明度,防止this.globalData.currentGlobalAlpha不为1时画布被隐藏 + this.canvasContext.globalAlpha = currentOpacity; + if (this.globalData.currentGlobalAlpha !== currentOpacity) { + this.globalData.currentGlobalAlpha = currentOpacity; + } +}; + +CanvasRendererBase.prototype.reset = function () { + if (!this.renderConfig.clearCanvas) { + this.canvasContext.restore(); + return; + } + this.contextData.reset(); +}; + +CanvasRendererBase.prototype.save = function (actionFlag) { + if (!this.renderConfig.clearCanvas) { + this.canvasContext.save(); + return; + } + if (actionFlag) { + this.canvasContext.save(); + } + this.contextData.push(); +}; + +CanvasRendererBase.prototype.restore = function (actionFlag) { + if (!this.renderConfig.clearCanvas) { + this.canvasContext.restore(); + return; + } + if (actionFlag) { + this.canvasContext.restore(); + this.globalData.blendMode = 'source-over'; + } + var popped = this.contextData.pop(); + var transform = popped.transform; + var opacity = popped.opacity; + this.canvasContext.setTransform(transform[0], transform[1], transform[4], transform[5], transform[12], transform[13]); + if (this.globalData.currentGlobalAlpha !== opacity) { + this.canvasContext.globalAlpha = opacity; + this.globalData.currentGlobalAlpha = opacity; + } +}; + +CanvasRendererBase.prototype.configAnimation = function (animData) { + if (this.animationItem.wrapper) { + this.canvasContext = this.animationItem.wrapper; + } else { + this.canvasContext = this.renderConfig.context; + } + + this.setContentMode(this.animationItem.contentMode); + + this.data = animData; + this.layers = animData.layers; + this.transformCanvas = { + w: animData.w, + h: animData.h, + sx: 0, + sy: 0, + tx: 0, + ty: 0, + }; + this.setupGlobalData(animData, {}); + this.globalData.canvasContext = this.canvasContext; + this.globalData.renderer = this; + this.globalData.isDashed = false; + this.globalData.progressiveLoad = this.renderConfig.progressiveLoad; + this.globalData.transformCanvas = this.transformCanvas; + this.elements = createSizedArray(animData.layers.length); + this.updateContainerSize(); +}; + +CanvasRendererBase.prototype.setContentMode = function (contentMode) { + if (contentMode && this.renderConfig) { + const mode = contentMode.toLowerCase(); + switch (mode) { + case 'fill': + this.renderConfig.preserveAspectRatio = 'none'; + break; + case 'top': + this.renderConfig.preserveAspectRatio = 'xMidYMin meet'; + break; + case 'cover': + this.renderConfig.preserveAspectRatio = 'xMidYMid slice'; + break; + case 'bottom': + this.renderConfig.preserveAspectRatio = 'xMidYMax meet'; + break; + case 'contain': + this.renderConfig.preserveAspectRatio = 'xMidYMid meet'; + break; + default: + this.renderConfig.preserveAspectRatio = 'xMidYMid meet'; + } + } +}; + +CanvasRendererBase.prototype.updateContentMode = function (contentMode) { + if (contentMode && this.renderConfig) { + this.setContentMode(contentMode); + this.updateContainerSize(); + } +} + +CanvasRendererBase.prototype.updateContainerSize = function (width, height, isPrint) { + if (!this.canvasContext) { + return; + } + this.canvasContext.restore(); + this.canvasContext.setTransform(1, 0, 0, 1, 0, 0);//resetting the transform + this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h); //清空之前画布 + this.canvasContext.clearRect(0, 0, this.canvasContext.width, this.canvasContext.height); //清空之前画布 + this.canvasContext.reset(); + this.canvasContext.save(); + this.reset(); + var elementWidth; + var elementHeight; + if (width) { + elementWidth = width; + elementHeight = height; + } else { + if (this.canvasContext) { + elementHeight = this.canvasContext.height; + elementWidth = this.canvasContext.width; + + if (!elementHeight) { + elementHeight = 360; + } + if (!elementWidth) { + elementWidth = 540; + } + } + } + if (!isPrint) { + LogUtil.info("Lottie canvas size:" + elementHeight + "," + elementWidth + " with fr:" + + this.animationItem?.animationData?.fr); + } + + var elementRel; + var animationRel; + if (this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1) { + var par = this.renderConfig.preserveAspectRatio.split(' '); + var fillType = par[1] || 'meet'; + var pos = par[0] || 'xMidYMid'; + var xPos = pos.substr(0, 4); + var yPos = pos.substr(4); + elementRel = elementWidth / elementHeight; + animationRel = this.transformCanvas.w / this.transformCanvas.h; + if ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice')) { + this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr); + this.transformCanvas.sy = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr); + } else { + this.transformCanvas.sx = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr); + this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr); + } + + if (xPos === 'xMid' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) { + this.transformCanvas.tx = ((elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) / 2) * this.renderConfig.dpr; + } else if (xPos === 'xMax' && ((animationRel < elementRel && fillType === 'meet') || (animationRel > elementRel && fillType === 'slice'))) { + this.transformCanvas.tx = (elementWidth - this.transformCanvas.w * (elementHeight / this.transformCanvas.h)) * this.renderConfig.dpr; + } else { + this.transformCanvas.tx = 0; + } + if (yPos === 'YMid' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) { + this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w)) / 2) * this.renderConfig.dpr; + } else if (yPos === 'YMax' && ((animationRel > elementRel && fillType === 'meet') || (animationRel < elementRel && fillType === 'slice'))) { + this.transformCanvas.ty = ((elementHeight - this.transformCanvas.h * (elementWidth / this.transformCanvas.w))) * this.renderConfig.dpr; + } else { + this.transformCanvas.ty = 0; + } + } else if (this.renderConfig.preserveAspectRatio === 'none') { + this.transformCanvas.sx = elementWidth / (this.transformCanvas.w / this.renderConfig.dpr); + this.transformCanvas.sy = elementHeight / (this.transformCanvas.h / this.renderConfig.dpr); + this.transformCanvas.tx = 0; + this.transformCanvas.ty = 0; + } else { + this.transformCanvas.sx = this.renderConfig.dpr; + this.transformCanvas.sy = this.renderConfig.dpr; + this.transformCanvas.tx = 0; + this.transformCanvas.ty = 0; + } + this.transformCanvas.props = [this.transformCanvas.sx, 0, 0, 0, 0, this.transformCanvas.sy, 0, 0, 0, 0, 1, 0, this.transformCanvas.tx, this.transformCanvas.ty, 0, 1]; + /* var i, len = this.elements.length; + for(i=0;i= 0; i -= 1) { + if (this.elements[i] && this.elements[i].destroy) { + this.elements[i].destroy(); + } + } + this.elements.length = 0; + this.globalData.canvasContext = null; + this.animationItem.container = null; + this.destroyed = true; +}; + +CanvasRendererBase.prototype.changeColor = function (color, endColor, layer, index) { + if (typeof endColor == 'object') { + if (Array.isArray(endColor)) { + if (!layer) { + var len = this.layers.length; + var i; + for (i = 0; i < len; i += 1) { + let tag = true; + if (this.layers[i] && this.layers[i].td) { + tag = false; + } + if (tag && (this.completeLayers || this.elements[i])) { + this.elements[i].changeColor(color, endColor); + } + } + } else { + if (this.completeLayers || this.elements[layer-1]) { + this.elements[layer-1].changeColor(color, endColor, index); + } + } + } + } else if (typeof endColor == 'number') { + if (endColor == 0) { + var len = this.layers.length; + var i; + for (i = 0; i < len; i += 1) { + let tag = true; + if (this.layers[i] && this.layers[i].td) { + tag = false; + } + if (tag && (this.completeLayers || this.elements[i])) { + this.elements[i].changeColor(color, undefined); + } + } + } else { + if (this.completeLayers || this.elements[endColor-1]) { + this.elements[endColor-1].changeColor(color, layer, index); + } + } + } else { + var len = this.layers.length; + var i; + for (i = 0; i < len; i += 1) { + let tag = true; + if (this.layers[i] && this.layers[i].td) { + tag = false; + } + if (tag && (this.completeLayers || this.elements[i])) { + this.elements[i].changeColor(color, undefined); + } + } + } +} + +CanvasRendererBase.prototype.renderFrame = function (num, forceRender) { + if ((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1) { + return; + } + this.renderedFrame = num; + this.globalData.frameNum = num - this.animationItem._isFirstFrame; + this.globalData.frameId += 1; + this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender; + this.globalData.projectInterface.currentFrame = num; + + // LogUtil.log('--------'); + // LogUtil.log('NEW: ',num); + var i; + var len = this.layers.length; + if (!this.completeLayers) { + this.checkLayers(num); + } + + for (i = 0; i < len; i += 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].prepareFrame(num - this.layers[i].st); + } + } + + if (this.renderConfig.clearCanvas === true) { + let currentTranform = this.canvasContext.getTransform(); + this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h); //清空之前画布 + this.canvasContext.setTransform(1, 0, 0, 1, 0, 0); + this.canvasContext.clearRect(0, 0, this.canvasContext.width, this.canvasContext.height); //清空之前画布 + this.canvasContext.setTransform(currentTranform); + } else { + this.save(); + } + for (i = len - 1; i >= 0; i -= 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].renderFrame(); + } + } + if (this.renderConfig.clearCanvas !== true) { + this.restore(); + } +}; + +CanvasRendererBase.prototype.buildItem = function (pos) { + var elements = this.elements; + if (elements[pos] || this.layers[pos].ty === 99) { + return; + } + var element = this.createItem(this.layers[pos], this, this.globalData); + elements[pos] = element; + element.initExpressions(); + /* if(this.layers[pos].ty === 0){ + element.resize(this.globalData.transformCanvas); + } */ +}; + +CanvasRendererBase.prototype.checkPendingElements = function () { + while (this.pendingElements.length) { + var element = this.pendingElements.pop(); + element.checkParenting(); + } +}; + +CanvasRendererBase.prototype.hide = function () { + this.animationItem.container.style.display = 'none'; +}; + +CanvasRendererBase.prototype.show = function () { + this.animationItem.container.style.display = 'block'; +}; + +export default CanvasRendererBase; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/HybridRenderer.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/HybridRenderer.js new file mode 100644 index 0000000000000000000000000000000000000000..f5188d31bbbe3d6f292196051934fee68750ce6a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/HybridRenderer.js @@ -0,0 +1,47 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; +import HybridRendererBase from './HybridRendererBase'; +import HCompElement from '../elements/htmlElements/HCompElement'; +import SVGCompElement from '../elements/svgElements/SVGCompElement'; + +function HybridRenderer(animationItem, config) { + this.animationItem = animationItem; + this.layers = null; + this.renderedFrame = -1; + this.renderConfig = { + className: (config && config.className) || '', + imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice', + hideOnTransparent: !(config && config.hideOnTransparent === false), + filterSize: { + width: (config && config.filterSize && config.filterSize.width) || '400%', + height: (config && config.filterSize && config.filterSize.height) || '400%', + x: (config && config.filterSize && config.filterSize.x) || '-100%', + y: (config && config.filterSize && config.filterSize.y) || '-100%', + }, + runExpressions: !config || config.runExpressions === undefined || config.runExpressions, + }; + this.globalData = { + _mdf: false, + frameNum: -1, + renderConfig: this.renderConfig, + }; + this.pendingElements = []; + this.elements = []; + this.threeDElements = []; + this.destroyed = false; + this.camera = null; + this.supports3d = true; + this.rendererType = 'html'; +} + +extendPrototype([HybridRendererBase], HybridRenderer); + +HybridRenderer.prototype.createComp = function (data) { + if (!this.supports3d) { + return new SVGCompElement(data, this.globalData, this); + } + return new HCompElement(data, this.globalData, this); +}; + +export default HybridRenderer; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/HybridRendererBase.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/HybridRendererBase.js new file mode 100644 index 0000000000000000000000000000000000000000..5f1e691ccd135e0486b14964f57e34d08288927f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/HybridRendererBase.js @@ -0,0 +1,344 @@ +import { + extendPrototype, +} from '../utils/functionExtensions'; +import createNS from '../utils/helpers/svg_elements'; +import createTag from '../utils/helpers/html_elements'; +import SVGRenderer from './SVGRenderer'; +import HSolidElement from '../elements/htmlElements/HSolidElement'; +import { + styleDiv, +} from '../utils/common'; +import BaseRenderer from './BaseRenderer'; +import IImageElement from '../elements/ImageElement'; +import SVGShapeElement from '../elements/svgElements/SVGShapeElement'; +import HShapeElement from '../elements/htmlElements/HShapeElement'; +import HTextElement from '../elements/htmlElements/HTextElement'; +import HCameraElement from '../elements/htmlElements/HCameraElement'; +import HImageElement from '../elements/htmlElements/HImageElement'; +import ISolidElement from '../elements/SolidElement'; +import SVGTextLottieElement from '../elements/svgElements/SVGTextElement'; + +function HybridRendererBase(animationItem, config) { + this.animationItem = animationItem; + this.layers = null; + this.renderedFrame = -1; + this.renderConfig = { + className: (config && config.className) || '', + imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice', + hideOnTransparent: !(config && config.hideOnTransparent === false), + filterSize: { + width: (config && config.filterSize && config.filterSize.width) || '400%', + height: (config && config.filterSize && config.filterSize.height) || '400%', + x: (config && config.filterSize && config.filterSize.x) || '-100%', + y: (config && config.filterSize && config.filterSize.y) || '-100%', + }, + }; + this.globalData = { + _mdf: false, + frameNum: -1, + renderConfig: this.renderConfig, + }; + this.pendingElements = []; + this.elements = []; + this.threeDElements = []; + this.destroyed = false; + this.camera = null; + this.supports3d = true; + this.rendererType = 'html'; +} + +extendPrototype([BaseRenderer], HybridRendererBase); + +HybridRendererBase.prototype.buildItem = SVGRenderer.prototype.buildItem; + +HybridRendererBase.prototype.checkPendingElements = function () { + while (this.pendingElements.length) { + var element = this.pendingElements.pop(); + element.checkParenting(); + } +}; + +HybridRendererBase.prototype.appendElementInPos = function (element, pos) { + var newDOMElement = element.getBaseElement(); + if (!newDOMElement) { + return; + } + var layer = this.layers[pos]; + if (!layer.ddd || !this.supports3d) { + if (this.threeDElements) { + this.addTo3dContainer(newDOMElement, pos); + } else { + var i = 0; + var nextDOMElement; + var nextLayer; + var tmpDOMElement; + while (i < pos) { + if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement) { + nextLayer = this.elements[i]; + tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement(); + nextDOMElement = tmpDOMElement || nextDOMElement; + } + i += 1; + } + if (nextDOMElement) { + if (!layer.ddd || !this.supports3d) { + this.layerElement.insertBefore(newDOMElement, nextDOMElement); + } + } else if (!layer.ddd || !this.supports3d) { + this.layerElement.appendChild(newDOMElement); + } + } + } else { + this.addTo3dContainer(newDOMElement, pos); + } +}; + +HybridRendererBase.prototype.createShape = function (data) { + if (!this.supports3d) { + return new SVGShapeElement(data, this.globalData, this); + } + return new HShapeElement(data, this.globalData, this); +}; + +HybridRendererBase.prototype.createText = function (data) { + if (!this.supports3d) { + return new SVGTextLottieElement(data, this.globalData, this); + } + return new HTextElement(data, this.globalData, this); +}; + +HybridRendererBase.prototype.createCamera = function (data) { + this.camera = new HCameraElement(data, this.globalData, this); + return this.camera; +}; + +HybridRendererBase.prototype.createImage = function (data) { + if (!this.supports3d) { + return new IImageElement(data, this.globalData, this); + } + return new HImageElement(data, this.globalData, this); +}; + +HybridRendererBase.prototype.createSolid = function (data) { + if (!this.supports3d) { + return new ISolidElement(data, this.globalData, this); + } + return new HSolidElement(data, this.globalData, this); +}; + +HybridRendererBase.prototype.createNull = SVGRenderer.prototype.createNull; + +HybridRendererBase.prototype.getThreeDContainerByPos = function (pos) { + var i = 0; + var len = this.threeDElements.length; + while (i < len) { + if (this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) { + return this.threeDElements[i].perspectiveElem; + } + i += 1; + } + return null; +}; + +HybridRendererBase.prototype.createThreeDContainer = function (pos, type) { + var perspectiveElem = createTag('div'); + var style; + var containerStyle; + styleDiv(perspectiveElem); + var container = createTag('div'); + styleDiv(container); + if (type === '3d') { + style = perspectiveElem.style; + style.width = this.globalData.compSize.w + 'px'; + style.height = this.globalData.compSize.h + 'px'; + var center = '50% 50%'; + style.webkitTransformOrigin = center; + style.mozTransformOrigin = center; + style.transformOrigin = center; + containerStyle = container.style; + var matrix = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)'; + containerStyle.transform = matrix; + containerStyle.webkitTransform = matrix; + } + + perspectiveElem.appendChild(container); + // this.resizerElem.appendChild(perspectiveElem); + var threeDContainerData = { + container: container, + perspectiveElem: perspectiveElem, + startPos: pos, + endPos: pos, + type: type, + }; + this.threeDElements.push(threeDContainerData); + return threeDContainerData; +}; + +HybridRendererBase.prototype.build3dContainers = function () { + var i; + var len = this.layers.length; + var lastThreeDContainerData; + var currentContainer = ''; + for (i = 0; i < len; i += 1) { + if (this.layers[i].ddd && this.layers[i].ty !== 3) { + if (currentContainer !== '3d') { + currentContainer = '3d'; + lastThreeDContainerData = this.createThreeDContainer(i, '3d'); + } + lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i); + } else { + if (currentContainer !== '2d') { + currentContainer = '2d'; + lastThreeDContainerData = this.createThreeDContainer(i, '2d'); + } + lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos, i); + } + } + len = this.threeDElements.length; + for (i = len - 1; i >= 0; i -= 1) { + this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem); + } +}; + +HybridRendererBase.prototype.addTo3dContainer = function (elem, pos) { + var i = 0; + var len = this.threeDElements.length; + while (i < len) { + if (pos <= this.threeDElements[i].endPos) { + var j = this.threeDElements[i].startPos; + var nextElement; + while (j < pos) { + if (this.elements[j] && this.elements[j].getBaseElement) { + nextElement = this.elements[j].getBaseElement(); + } + j += 1; + } + if (nextElement) { + this.threeDElements[i].container.insertBefore(elem, nextElement); + } else { + this.threeDElements[i].container.appendChild(elem); + } + break; + } + i += 1; + } +}; + +HybridRendererBase.prototype.configAnimation = function (animData) { + var resizerElem = createTag('div'); + var wrapper = this.animationItem.wrapper; + var style = resizerElem.style; + style.width = animData.w + 'px'; + style.height = animData.h + 'px'; + this.resizerElem = resizerElem; + styleDiv(resizerElem); + style.transformStyle = 'flat'; + style.mozTransformStyle = 'flat'; + style.webkitTransformStyle = 'flat'; + if (this.renderConfig.className) { + resizerElem.setAttribute('class', this.renderConfig.className); + } + wrapper.appendChild(resizerElem); + + style.overflow = 'hidden'; + var svg = createNS('svg'); + svg.setAttribute('width', '1'); + svg.setAttribute('height', '1'); + styleDiv(svg); + this.resizerElem.appendChild(svg); + var defs = createNS('defs'); + svg.appendChild(defs); + this.data = animData; + // Mask animation + this.setupGlobalData(animData, svg); + this.globalData.defs = defs; + this.layers = animData.layers; + this.layerElement = this.resizerElem; + this.build3dContainers(); + this.updateContainerSize(); +}; + +HybridRendererBase.prototype.destroy = function () { + if (this.animationItem.wrapper) { + this.animationItem.wrapper.innerText = ''; + } + this.animationItem.container = null; + this.globalData.defs = null; + var i; + var len = this.layers ? this.layers.length : 0; + for (i = 0; i < len; i += 1) { + if (this.elements[i] && this.elements[i].destroy) { + this.elements[i].destroy(); + } + } + this.elements.length = 0; + this.destroyed = true; + this.animationItem = null; +}; + +HybridRendererBase.prototype.updateContainerSize = function () { + var elementWidth = this.animationItem.wrapper.offsetWidth; + var elementHeight = this.animationItem.wrapper.offsetHeight; + var elementRel = elementWidth / elementHeight; + var animationRel = this.globalData.compSize.w / this.globalData.compSize.h; + var sx; + var sy; + var tx; + var ty; + if (animationRel > elementRel) { + sx = elementWidth / (this.globalData.compSize.w); + sy = elementWidth / (this.globalData.compSize.w); + tx = 0; + ty = ((elementHeight - this.globalData.compSize.h * (elementWidth / this.globalData.compSize.w)) / 2); + } else { + sx = elementHeight / (this.globalData.compSize.h); + sy = elementHeight / (this.globalData.compSize.h); + tx = (elementWidth - this.globalData.compSize.w * (elementHeight / this.globalData.compSize.h)) / 2; + ty = 0; + } + var style = this.resizerElem.style; + style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,' + sy + ',0,0,0,0,1,0,' + tx + ',' + ty + ',0,1)'; + style.transform = style.webkitTransform; +}; + +HybridRendererBase.prototype.renderFrame = SVGRenderer.prototype.renderFrame; + +HybridRendererBase.prototype.hide = function () { + this.resizerElem.style.display = 'none'; +}; + +HybridRendererBase.prototype.show = function () { + this.resizerElem.style.display = 'block'; +}; + +HybridRendererBase.prototype.initItems = function () { + this.buildAllItems(); + if (this.camera) { + this.camera.setup(); + } else { + var cWidth = this.globalData.compSize.w; + var cHeight = this.globalData.compSize.h; + var i; + var len = this.threeDElements.length; + for (i = 0; i < len; i += 1) { + var style = this.threeDElements[i].perspectiveElem.style; + style.webkitPerspective = Math.sqrt(Math.pow(cWidth, 2) + Math.pow(cHeight, 2)) + 'px'; + style.perspective = style.webkitPerspective; + } + } +}; + +HybridRendererBase.prototype.searchExtraCompositions = function (assets) { + var i; + var len = assets.length; + var floatingContainer = createTag('div'); + for (i = 0; i < len; i += 1) { + if (assets[i].xt) { + var comp = this.createComp(assets[i], floatingContainer, this.globalData.comp, null); + comp.initExpressions(); + this.globalData.projectInterface.registerComposition(comp); + } + } +}; + +export default HybridRendererBase; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/SVGRenderer.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/SVGRenderer.js new file mode 100644 index 0000000000000000000000000000000000000000..c26c4e1d7b412583d0a5867a6bba2a98b8977ecc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/SVGRenderer.js @@ -0,0 +1,87 @@ +import { + createElementID, +} from '../utils/common'; +import { + extendPrototype, +} from '../utils/functionExtensions'; +import createNS from '../utils/helpers/svg_elements'; + +import SVGCompElement from '../elements/svgElements/SVGCompElement'; +import SVGRendererBase from './SVGRendererBase'; + +function SVGRenderer(animationItem, config) { + this.animationItem = animationItem; + this.layers = null; + this.renderedFrame = -1; + this.svgElement = createNS('svg'); + var ariaLabel = ''; + if (config && config.title) { + var titleElement = createNS('title'); + var titleId = createElementID(); + titleElement.setAttribute('id', titleId); + titleElement.textContent = config.title; + this.svgElement.appendChild(titleElement); + ariaLabel += titleId; + } + if (config && config.description) { + var descElement = createNS('desc'); + var descId = createElementID(); + descElement.setAttribute('id', descId); + descElement.textContent = config.description; + this.svgElement.appendChild(descElement); + ariaLabel += ' ' + descId; + } + if (ariaLabel) { + this.svgElement.setAttribute('aria-labelledby', ariaLabel); + } + var defs = createNS('defs'); + this.svgElement.appendChild(defs); + var maskElement = createNS('g'); + this.svgElement.appendChild(maskElement); + this.layerElement = maskElement; + this.dp = 1; + this.startX = 0; + this.startY = 0; + this.matrix = []; + this.cLength = []; + this.renderConfig = { + preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet', + imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice', + contentVisibility: (config && config.contentVisibility) || 'visible', + progressiveLoad: (config && config.progressiveLoad) || false, + hideOnTransparent: !((config && config.hideOnTransparent === false)), + viewBoxOnly: (config && config.viewBoxOnly) || false, + viewBoxSize: (config && config.viewBoxSize) || false, + className: (config && config.className) || '', + id: (config && config.id) || '', + focusable: config && config.focusable, + filterSize: { + width: (config && config.filterSize && config.filterSize.width) || '100%', + height: (config && config.filterSize && config.filterSize.height) || '100%', + x: (config && config.filterSize && config.filterSize.x) || '0%', + y: (config && config.filterSize && config.filterSize.y) || '0%', + }, + width: (config && config.width), + height: (config && config.height), + runExpressions: !config || config.runExpressions === undefined || config.runExpressions, + }; + + this.globalData = { + _mdf: false, + frameNum: -1, + defs: defs, + renderConfig: this.renderConfig, + }; + this.elements = []; + this.pendingElements = []; + this.destroyed = false; + this.rendererType = 'svg'; +} + +extendPrototype([SVGRendererBase], SVGRenderer); + +SVGRenderer.prototype.createComp = function (data) { + return new SVGCompElement(data, this.globalData, this); +}; + +export default SVGRenderer; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/SVGRendererBase.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/SVGRendererBase.js new file mode 100644 index 0000000000000000000000000000000000000000..cb34bab9255820812f16ef788654abe9f446cf40 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/SVGRendererBase.js @@ -0,0 +1,816 @@ +import { getLocationHref } from '../main'; +import { + createElementID, + getExpressionsPlugin, +} from '../utils/common'; +import { + extendPrototype, +} from '../utils/functionExtensions'; +import { + createSizedArray, +} from '../utils/helpers/arrays'; +import createNS from '../utils/helpers/svg_elements'; +import BaseRenderer from './BaseRenderer'; +import IImageElement from '../elements/ImageElement'; +import SVGShapeElement from '../elements/svgElements/SVGShapeElement'; +import SVGTextLottieElement from '../elements/svgElements/SVGTextElement'; // eslint-disable-line import/no-cycle +import ISolidElement from '../elements/SolidElement'; +import NullElement from '../elements/NullElement'; + +function SVGRendererBase() { +} + +extendPrototype([BaseRenderer], SVGRendererBase); + +SVGRendererBase.prototype.createNull = function (data) { + return new NullElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.createShape = function (data) { + return new SVGShapeElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.createText = function (data) { + return new SVGTextLottieElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.createImage = function (data) { + return new IImageElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.createSolid = function (data) { + return new ISolidElement(data, this.globalData, this); +}; + +SVGRendererBase.prototype.configAnimation = function (animData) { + this.svgElement.setAttribute('xmlns', 'http://www.w3.org/2000/svg'); + this.svgElement.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink'); + if (this.animationItem.wrapper != undefined) { + this.canvasContext = this.animationItem.wrapper; + } else { + this.canvasContext = this.renderConfig.context; + } + if (this.renderConfig.viewBoxSize) { + this.svgElement.setAttribute('viewBox', this.renderConfig.viewBoxSize); + } else { + this.svgElement.setAttribute('viewBox', '0 0 ' + animData.w + ' ' + animData.h); + } + + if (!this.renderConfig.viewBoxOnly) { + this.svgElement.setAttribute('width', animData.w); + this.svgElement.setAttribute('height', animData.h); + this.svgElement.style.width = '100%'; + this.svgElement.style.height = '100%'; + this.svgElement.style.transform = 'translate3d(0,0,0)'; + this.svgElement.style.contentVisibility = this.renderConfig.contentVisibility; + } + if (this.renderConfig.width) { + this.svgElement.setAttribute('width', this.renderConfig.width); + } + if (this.renderConfig.height) { + this.svgElement.setAttribute('height', this.renderConfig.height); + } + if (this.renderConfig.className) { + this.svgElement.setAttribute('class', this.renderConfig.className); + } + if (this.renderConfig.id) { + this.svgElement.setAttribute('id', this.renderConfig.id); + } + if (this.renderConfig.focusable !== undefined) { + this.svgElement.setAttribute('focusable', this.renderConfig.focusable); + } + this.svgElement.setAttribute('preserveAspectRatio', this.renderConfig.preserveAspectRatio); + // this.layerElement.style.transform = 'translate3d(0,0,0)'; + // this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px"; + // this.animationItem.wrapper.appendChild(this.svgElement); + // Mask animation + var defs = this.globalData.defs; + + this.setupGlobalData(animData, defs); + this.globalData.progressiveLoad = this.renderConfig.progressiveLoad; + this.data = animData; + + var maskElement = createNS('clipPath'); + var rect = createNS('rect'); + rect.setAttribute('width', animData.w); + rect.setAttribute('height', animData.h); + rect.setAttribute('x', 0); + rect.setAttribute('y', 0); + var maskId = createElementID(); + maskElement.setAttribute('id', maskId); + maskElement.appendChild(rect); + this.layerElement.setAttribute('clip-path', 'url(' + getLocationHref() + '#' + maskId + ')'); + + defs.appendChild(maskElement); + this.layers = animData.layers; + this.elements = createSizedArray(animData.layers.length); +}; + +SVGRendererBase.prototype.destroy = function () { + if (this.canvasContext) { + this.canvasContext.clearRect(0, 0, this.canvasContext.width, this.canvasContext.height) + } + this.layerElement = null; + this.globalData.defs = null; + var i; + var len = this.layers ? this.layers.length : 0; + for (i = 0; i < len; i += 1) { + if (this.elements[i]) { + if (this.elements[i] && this.elements[i].destroy) { + this.elements[i].destroy(); + } + } + } + this.elements.length = 0; + this.destroyed = true; + this.animationItem = null; +}; + +SVGRendererBase.prototype.updateContainerSize = function () { +}; + +SVGRendererBase.prototype.updateContentMode = function (contentMode) { +}; + +SVGRendererBase.prototype.findIndexByInd = function (ind) { + var i = 0; + var len = this.layers.length; + for (i = 0; i < len; i += 1) { + if (this.layers[i].ind === ind) { + return i; + } + } + return -1; +}; + +SVGRendererBase.prototype.buildItem = function (pos) { + var elements = this.elements; + if (elements[pos] || this.layers[pos].ty === 99) { + return; + } + elements[pos] = true; + var element = this.createItem(this.layers[pos]); + + elements[pos] = element; + if (getExpressionsPlugin()) { + if (this.layers[pos].ty === 0) { + this.globalData.projectInterface.registerComposition(element); + } + element.initExpressions(); + } + this.appendElementInPos(element, pos); + if (this.layers[pos].tt) { + var elementIndex = ('tp' in this.layers[pos]) + ? this.findIndexByInd(this.layers[pos].tp) + : pos - 1; + if (elementIndex === -1) { + return; + } + if (!this.elements[elementIndex] || this.elements[elementIndex] === true) { + this.buildItem(elementIndex); + this.addPendingElement(element); + } else { + var matteElement = elements[elementIndex]; + var matteMask = matteElement.getMatte(this.layers[pos].tt); + element.setMatte(matteMask); + } + } +}; + +SVGRendererBase.prototype.checkPendingElements = function () { + while (this.pendingElements.length) { + var element = this.pendingElements.pop(); + element.checkParenting(); + if (element.data.tt) { + var i = 0; + var len = this.elements.length; + while (i < len) { + if (this.elements[i] === element) { + var elementIndex = 'tp' in element.data + ? this.findIndexByInd(element.data.tp) + : i - 1; + var matteElement = this.elements[elementIndex]; + var matteMask = matteElement.getMatte(this.layers[i].tt); + element.setMatte(matteMask); + break; + } + i += 1; + } + } + } +}; + +SVGRendererBase.prototype.changeColor = function (color, endColor, layer, index) { + if (typeof endColor == 'object') { + if (Array.isArray(endColor)) { + if (!layer) { + var len = this.layers.length; + var i; + for (i = 0; i < len; i += 1) { + let tag = true; + if (this.layers[i] && this.layers[i].td) { + tag = false; + } + if (tag && (this.completeLayers || this.elements[i])) { + this.elements[i].changeColor(color, endColor); + } + } + } else { + if (this.completeLayers || this.elements[layer-1]) { + this.elements[layer-1].changeColor(color, endColor, index); + } + } + } + } else if (typeof endColor == 'number') { + if (endColor == 0) { + var len = this.layers.length; + var i; + for (i = 0; i < len; i += 1) { + let tag = true; + if (this.layers[i] && this.layers[i].td) { + tag = false; + } + if (tag && (this.completeLayers || this.elements[i])) { + this.elements[i].changeColor(color, undefined); + } + } + } else { + if (this.completeLayers || this.elements[endColor-1]) { + this.elements[endColor-1].changeColor(color, endColor, layer); + } + } + } else { + var len = this.layers.length; + var i; + for (i = 0; i < len; i += 1) { + let tag = true; + if (this.layers[i] && this.layers[i].td) { + tag = false; + } + if (tag && (this.completeLayers || this.elements[i])) { + this.elements[i].changeColor(color, undefined); + } + } + } +} + +SVGRendererBase.prototype.renderFrame = function (num,tag) { + if(tag){ + this.renderedFrame =-1; + } + if (this.renderedFrame === num || this.destroyed) { + return; + } + if (num === null) { + num = this.renderedFrame; + } else { + this.renderedFrame = num; + } + // console.log('-------'); + // console.log('FRAME ',num); + this.globalData.frameNum = num; + this.globalData.frameId += 1; + this.globalData.projectInterface.currentFrame = num; + this.globalData._mdf = false; + var i; + var len = this.layers.length; + if (!this.completeLayers) { + this.checkLayers(num); + } + for (i = len - 1; i >= 0; i -= 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].prepareFrame(num - this.layers[i].st); + } + } + if (this.globalData._mdf) { + for (i = 0; i < len; i += 1) { + if (this.completeLayers || this.elements[i]) { + this.elements[i].renderFrame(); + } + } + } + let width = this.canvasContext.width + let height = this.canvasContext.height + + this.startX = 0 + this.startY = 0 + if (width > height) { + this.dp = width / this.svgElement['ks']['width'] + if (height > this.svgElement['ks']['height'] * this.dp) { + this.dp = width / this.svgElement['ks']['width'] + this.startY = (height - this.svgElement['ks']['height'] * this.dp) / 2 + + } else { + this.dp = height / this.svgElement['ks']['height'] + this.startX = (width - this.svgElement['ks']['width'] * this.dp) / 2 + + } + } else { + this.dp = height / this.svgElement['ks']['height'] + if (width > this.svgElement['ks']['width'] * this.dp) { + this.dp = height / this.svgElement['ks']['height'] + this.startX = (width - this.svgElement['ks']['width'] * this.dp) / 2 + } else { + this.dp = width / this.svgElement['ks']['width'] + this.startY = (height - this.svgElement['ks']['height'] * this.dp) / 2 + } + } + //清空上一帧 + this.canvasContext.clearRect(0, 0, width, height) + //渲染动画 this.svgElement为svg标签封装实体 + this.renderLabel(this.svgElement) +}; + +/* + * @param path path元素 + * @param color 传递色值 + * @param op 传递透明度 + * @param isMask 是否为mask子元素 + * */ +SVGRendererBase.prototype.renderPath = function (path, color, op=-1, isMask=false) { + let props = Object.keys(path['ks']); + if (props.indexOf('d') > -1) { + let d = path['ks']['d']; + let spaces = d.split(' '); + let xys = [] + var ft = '' + var ed = '' + var begins = false + for (let i = 0;i < spaces.length; i++) { + if (spaces[i] != '') { + let item = spaces[i] + let first = spaces[i].charAt(0) + let end = spaces[i].substr(-1) + let xy = [] + if (first == 'M' || first == 'L' || first == 'H' || first == 'V' || first == 'C' || first == 'S' || first == 'Q' || first == 'T' || first == 'A') { + ft = first + xys = [] + xy = spaces[i].split(',') + xy[0] = xy[0].slice(1) + + } else { + xy = item.split(',') + } + if (end == 'z' || end == 'Z') { + xy[1] = xy[1].slice(0, -1) + ed = 'z' + } + xys.push(xy) + if (ft == 'M' && xys.length == 1) { + if (!begins) { + this.canvasContext.beginPath() + begins = !begins + } + let x = Number(xys[0][0]) * this.dp + let y = Number(xys[0][1]) * this.dp + this.canvasContext.moveTo(x, y) + //moveto(M X,Y) :将画笔移动到指定的坐标位置 + } else if (ft == 'L' && xys.length == 1) { + let x = Number(xys[0][0]) * this.dp + let y = Number(xys[0][1]) * this.dp + this.canvasContext.lineTo(x, y) + //lineto(L X,Y) :画直线到指定的坐标位置 + } else if (ft == 'H') { + //horizontal lineto(H X):画水平线到指定的X坐标位置 + } else if (ft == 'V') { + break; //vertical lineto(V Y):画垂直线到指定的Y坐标位置 + } else if (ft == 'C' && xys.length == 3) { + let x1 = Number(xys[0][0]) * this.dp + let y1 = Number(xys[0][1]) * this.dp + let x2 = Number(xys[1][0]) * this.dp + let y2 = Number(xys[1][1]) * this.dp + let x3 = Number(xys[2][0]) * this.dp + let y3 = Number(xys[2][1]) * this.dp + this.canvasContext.bezierCurveTo(x1, y1, x2, y2, x3, y3) + //curveto(C X1,Y1,X2,Y2,ENDX,ENDY):三次贝赛曲线 + } else if (ft == 'S') { + //smooth curveto(S X2,Y2,ENDX,ENDY) + } else if (ft == 'Q' && xys.length == 2) { + let x1 = Number(xys[0][0]) * this.dp + let y1 = Number(xys[0][1]) * this.dp + let x2 = Number(xys[1][0]) * this.dp + let y2 = Number(xys[1][1]) * this.dp + this.canvasContext.quadraticCurveTo(x1, y1, x2, y2) + //quadratic Belzier curve(Q X,Y,ENDX,ENDY):二次贝赛曲线 + } else if (ft == 'T') { + //smooth quadratic Belzier curveto(T ENDX,ENDY):映射 + } else if (ft == 'A') { + + } //elliptical Arc(A RX,RY,XROTATION,FLAG1,FLAG2,X,Y):弧线 + if (ed == 'z') { + this.canvasContext.closePath() + ed = '' + } + } + } + } + + + if (props.indexOf('stroke-linecap') > -1) { + this.canvasContext.lineCap = path['ks']['stroke-linecap'] + } + if (props.indexOf('stroke-linejoin') > -1) { + this.canvasContext.lineJoin = path['ks']['stroke-linejoin'] + } + if (props.indexOf('stroke-miterlimit') > -1) { + this.canvasContext.miterLimit = path['ks']['stroke-miterlimit'] + } + if (props.indexOf('stroke-dasharray') > -1) { + this.canvasContext.setLineDash(path['ks']['stroke-dasharray']) + } + if (props.indexOf('stroke-dashoffset') > -1) { + this.canvasContext.lineDashOffset = path['ks']['stroke-dashoffset'] + } + + + if (props.indexOf('stroke-width') > -1) { + this.canvasContext.lineWidth = path['ks']['stroke-width'] * this.dp + } + if (props.indexOf('stroke') > -1) { + this.canvasContext.strokeStyle = path['ks']['stroke'] + this.canvasContext.stroke() + } + if (op != -1) { + this.canvasContext.globalAlpha = op + } + + if (props.indexOf('fill') > -1) { + let cl = '' + if (path['ks']['fill'].indexOf('url(#') > -1) { + let id = path['ks']['fill'] + id = id.substring(0, id.length - 1); + id = id.slice(5) + for (let i = 0;i < this.defs.length; i++) { + if (this.defs[i]['ks']['id'] == id) { + this.renderLabel(this.defs[i], color, isMask) + } + } + } else { + + if (path['ks']['fill'] == '#ffffff') { //mask中白色为可见,正常处理传入色值 + if (color != undefined) { + cl = color + } + if (isMask) { //mask目前用clip实现简单效果 + this.canvasContext.clip() + } + } else { + if (isMask) { + if (path['ks']['fill'] == '#000000' || path['ks']['fill'] == 'rgb(0,0,0)') { + //mask中黑色为不可见 + this.canvasContext.globalAlpha = 0 + } else { + cl = color + this.canvasContext.clip() + } + } else { + cl = path['ks']['fill'] + } + + } + if (props.indexOf('fill-opacity') > -1) { + let op = Number(path['ks']['fill-opacity']) + if (cl != undefined && op != undefined) { + this.canvasContext.fillStyle = this.colorOpt(cl, op) + } + } else { + this.canvasContext.fillStyle = cl + } + if (props.indexOf('clip-rule') > -1) { + this.canvasContext.fill(path['ks']['clip-rule']) + } else { + this.canvasContext.fill() + } + } + } else if (color != undefined) { + this.canvasContext.fillStyle = color + this.canvasContext.fill() + } + + +} + +/** + * 十六进制颜色值转为带透明度的颜色 + * @param thisColor 十六进制颜色 + * @param thisOpacity 透明度 + * @returns {string} rgba + */ +SVGRendererBase.prototype.colorOpt = function (thisColor, thisOpacity) { + var theColor = thisColor.toLowerCase(); + //十六进制颜色值的正则表达式 + var r = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/; + // 如果是16进制颜色 + if (theColor && r.test(theColor)) { + + if (theColor.length === 4) { + var sColorNew = '#'; + for (var i = 1; i < 4; i += 1) { + sColorNew += theColor.slice(i, i + 1).concat(theColor.slice(i, i + 1)); + } + theColor = sColorNew; + } + //处理六位的颜色值 + var sColorChange = []; + for (var j = 1; j < 7; j += 2) { + sColorChange.push(parseInt('0x' + theColor.slice(j, j + 2))); + } + return 'rgba(' + sColorChange.join(',') + ',' + thisOpacity + ')'; + } + // 如果是rgba或者rgb + if (theColor.startsWith('rgb')) { + let numbers = theColor.match(/(\d(\.\d+)?)+/g); + numbers = numbers.slice(0, 3).concat(thisOpacity); + return 'rgba(' + numbers.join(',') + ')'; + } + + return theColor; +} + +/** + * 根据id查询全局defs中的元素并渲染 + * @param clipId 元素ID + * @param svg 当前元素 + * @param color 传递色值 + * */ +SVGRendererBase.prototype.renderClipPath = function (clipId, svg, color) { + clipId = clipId.substring(0, clipId.length - 1); + clipId = clipId.slice(5) + let isRender = true + let j = 0 + + while (isRender) { + if (this.defs[j]['ks']['id'] == clipId) { + let cl + if (svg['childs'].length > 0) { + for (let i = 0;i < svg['childs'].length; i++) { + //判断是否有色值可以传递 + let rectp = Object.keys(svg['childs'][i]['ks']); + if (svg['childs'][i]['label'] == 'rect' && rectp.indexOf('fill')) { + cl = svg['childs'][i]['ks']['fill'] + } + } + } + if (cl != undefined) { + this.renderLabel(this.defs[j], cl) + } else { + this.renderLabel(this.defs[j], color) + } + isRender = false + } + j++ + } +} +/** + * 渲染svg标签 + * @param svg label实体 + * @param color 传递色值 + * @param opacity 传递透明度 + * @param isMask 判断是否为Mask,并传递 + * */ +SVGRendererBase.prototype.renderLabel = function (svg, color, opacity=-1, isMask=false) { + //标签名 + let labelName = svg['label'] + //标签实体属性名集合 + let props = Object.keys(svg['ks']); + //标签实体style集合 + let styles = Object.keys(svg['style']); + //是否显示 + let isDis = false + switch (labelName) { + case 'svg': + this.canvasContext.fillStyle = '#00000000' //不设置填充色,默认渲染rect为黑色,这里设置为透明色 + this.canvasContext.fillRect(this.startX, this.startY, Number(svg['ks']['width']) * this.dp, Number(svg['ks']['height']) * this.dp) + if (labelName != 'defs' && svg['childs'] != undefined && !isDis) { + for (let i = 0;i < svg['childs'].length; i++) { + this.renderLabel(svg['childs'][i]) + } + } + break; + case 'clipPath': + for (let r = 0;r < svg['childs'].length; r++) { + if (color != undefined) { + this.renderLabel(svg['childs'][r], color) + } else { + this.renderLabel(svg['childs'][r]) + this.canvasContext.clip() + } + } + break + case 'radialGradient': + if (props.indexOf('cx') > -1 && props.indexOf('cy') > -1 && props.indexOf('r') > -1 && props.indexOf('fx') > -1 && props.indexOf('fy') > -1) { + var x0 = Number(svg['ks']['cx']) * this.dp + var y0 = Number(svg['ks']['cy']) * this.dp + var r = Number(svg['ks']['r']) * this.dp + var x1 = Number(svg['ks']['fx']) * this.dp + var y1 = Number(svg['ks']['fy']) * this.dp + var grad = this.canvasContext.createRadialGradient(x1, y1, 0, x0, y0, r) + for (let i = 0;i < svg['childs'].length; i++) { + let item = svg['childs'][i] + let op = item['ks']['offset'] + if (op.indexOf('%') > -1) { + op = Number(op.replace('%', '')) + } + grad.addColorStop(op / 100, item['ks']['stop-color']) + } + this.canvasContext.fillStyle = grad + this.canvasContext.fill() + } + break + case 'linearGradient': + if (props.indexOf('x1') > -1 && props.indexOf('y1') > -1 && props.indexOf('x2') > -1 && props.indexOf('y2') > -1) { + var x0 = Number(svg['ks']['x1']) * this.dp + var y0 = Number(svg['ks']['y1']) * this.dp + var x1 = Number(svg['ks']['x2']) * this.dp + var y1 = Number(svg['ks']['y2']) * this.dp + var grad = this.canvasContext.createLinearGradient(x0, y0, x1, y1) + for (let i = 0;i < svg['childs'].length; i++) { + let item = svg['childs'][i] + let op = item['ks']['offset'] + if (op.indexOf('%') > -1) { + op = Number(op.replace('%', '')) + } + grad.addColorStop(op / 100, item['ks']['stop-color']) + } + this.canvasContext.fillStyle = grad + this.canvasContext.fill() + } + break; + case 'symbol': + for (let i = 0;i < svg['childs'].length; i++) { + this.renderLabel(svg['childs'][i], color, opacity, isMask) + } + break; + case 'use': + if (props.indexOf('href') > -1) { + let useId = svg['ks']['href'] + useId = useId.slice(1) + //根据id在全局defs中查询并渲染 + for (let i = 0;i < this.defs.length; i++) { + if (this.defs[i]['ks']['id'] == useId) { + this.renderLabel(this.defs[i], color, opacity, isMask) + } + } + } + for (let i = 0;i < svg['childs'].length; i++) { + this.renderLabel(svg['childs'][i], color, opacity, isMask) + } + break; + case 'filter': + break; + case 'defs': + //将defs数据赋值给全局 + this.defs = svg['childs'] + break; + case 'rect': + this.canvasContext.rect(this.startX, this.startY, Number(svg['ks']['width']) * this.dp, Number(svg['ks']['height']) * this.dp) + break + case 'path': + //color和isMask是从mask子元素传来的 + this.renderPath(svg, color, opacity, isMask) + break; + case 'mask': + for (let i = 0;i < svg['childs'].length; i++) { + //向子元素传递color和isMask + this.renderLabel(svg['childs'][i], color, opacity, true) + } + break; + case 'g': + if (styles.length > 0) { + for (let k = 0;k < styles.length; k++) { + if (styles[k] == 'display') { + if (svg['style'][styles[k]] == 'none') { + isDis = true //隐藏 + } + if (svg['style'][styles[k]] == 'block') { + isDis = false //显示 + } + } + } + } + if (props.length > 0 && !isDis) { + if (props.indexOf('transform') > -1) { + if (svg['ks']['transform'].indexOf('matrix') > -1) { + let mat = svg['ks']['transform'] + mat = mat.substring(0, mat.length - 1); + mat = mat.slice(7) + let numbers = mat.split(',') + if (svg['childs'].length > 0) { + this.matrix.push(numbers) + this.cLength.push(svg['childs'].length) + } + for (let j = 0;j < this.matrix.length; j++) { + let mx = this.matrix[j] + //setTransform执行会重置matrix,所以第一条以外都用transform + if (j == 0) { + this.canvasContext.setTransform(Number(mx[0]), Number(mx[1]), Number(mx[2]), Number(mx[3]), (Number(mx[4]) * this.dp) + this.startX, (Number(mx[5]) * this.dp) + this.startY) + } else { + this.canvasContext.transform(Number(mx[0]), Number(mx[1]), Number(mx[2]), Number(mx[3]), (Number(mx[4]) * this.dp), (Number(mx[5]) * this.dp)) + } + } + } + if (svg['ks']['transform'].indexOf('translate') > -1) { + let tlt = svg['ks']['transform'] + tlt = tlt.substring(0, tlt.length - 1); + tlt = tlt.slice(9) + let xy = tlt.split(',') + this.canvasContext.translate(Number(xy[0]), Number(xy[1])) + } + if (svg['ks']['transform'].indexOf('scale') > -1) { + let scale = svg['ks']['transform'] + scale = scale.substring(0, scale.length - 1); + scale = scale.slice(5) + let xy = scale.split(',') + this.canvasContext.scale(Number(xy[0]), Number(xy[1])) + } + } + if (props.indexOf('opacity') > -1) { + if (Number(svg['ks']['opacity']) != 1) { + opacity = svg['ks']['opacity'] + } else { + this.canvasContext.globalAlpha = svg['ks']['opacity'] + } + } + if (props.indexOf('fill') > -1) { + color = svg['ks']['fill'] + } + if (props.indexOf('clip-path') > -1) { + let clipPathId = svg['ks']['clip-path'] + var isClip = false + let count = 0 + for (let i = 0;i < svg['childs'].length; i++) { + let it = svg['childs'][i] + let pp = Object.keys(it['ks']); + if (pp.indexOf('aria-label') > -1) { + count++ + if (i == svg['childs'].length - 1) { + isClip = (count == svg['childs'].length) + } + } + } + if (!isClip) { + this.renderClipPath(clipPathId, svg) + } + } + if (props.indexOf('mask') > -1) { + let maskId = svg['ks']['mask'] + this.renderClipPath(maskId, svg) + } + if (props.indexOf('filter') > -1) { + let filterId = svg['ks']['filter'] + this.renderClipPath(filterId, svg) + } + } + if (labelName != 'defs' && svg['childs'].length > 0 && !isDis) { + //渲染子元素,并清除当前元素的matrix + for (let n = 0;n < svg['childs'].length; n++) { + this.canvasContext.save() + let rect = Object.keys(svg['childs'][n]['ks']); + if (props.indexOf('clip-path') < 0 && props.indexOf('mask') < 0 && props.indexOf('filter') < 0 && svg['childs'][n]['label'] == 'rect' && rect.indexOf('fill') > -1) { + this.canvasContext.fillStyle = svg['childs'][n]['ks']['fill'] + this.canvasContext.fillRect(0, 0, Number(svg['childs'][n]['ks']['width']) * this.dp, Number(svg['childs'][n]['ks']['height']) * this.dp) + } else { + //向子元素传递color和isMask + this.renderLabel(svg['childs'][n], color, opacity, isMask) + let k = this.matrix.length - 1 + if (k != undefined && n == this.cLength[k] - 1) { + this.matrix.splice(-1) + this.cLength.splice(-1) + } + } + this.canvasContext.restore() + } + } + break; + } +} + +SVGRendererBase.prototype.appendElementInPos = function (element, pos) { + var newElement = element.getBaseElement(); + if (!newElement) { + return; + } + var i = 0; + var nextElement; + while (i < pos) { + if (this.elements[i] && this.elements[i] !== true && this.elements[i].getBaseElement()) { + nextElement = this.elements[i].getBaseElement(); + } + i += 1; + } + if (nextElement) { + this.layerElement.insertBefore(newElement, nextElement); + } else { + this.layerElement.appendChild(newElement); + } +}; + +SVGRendererBase.prototype.hide = function () { + this.layerElement.style.display = 'none'; +}; + +SVGRendererBase.prototype.show = function () { + this.layerElement.style.display = 'block'; +}; + +export default SVGRendererBase; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/renderersManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/renderersManager.js new file mode 100644 index 0000000000000000000000000000000000000000..a3d6fb074925c531aeb17570dbe90c4e1cc100a6 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/renderers/renderersManager.js @@ -0,0 +1,29 @@ +const renderers = {}; + +const registerRenderer = (key, value) => { + renderers[key] = value; +}; + +function getRenderer(key) { + return renderers[key]; +} + +function getRegisteredRenderer() { + // Returns canvas by default for compatibility + if (renderers.canvas) { + return 'canvas'; + } + // Returns any renderer that is registered + for (const key in renderers) { + if (renderers[key]) { + return key; + } + } + return ''; +} + +export { + getRegisteredRenderer, + registerRenderer, + getRenderer, +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/BaseEvent.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/BaseEvent.js new file mode 100644 index 0000000000000000000000000000000000000000..3cf63d1e1eb515ee92123bfb41dee6079ef1fb44 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/BaseEvent.js @@ -0,0 +1,55 @@ +function BaseEvent() {} +BaseEvent.prototype = { + triggerEvent: function (eventName, args) { + if (!!this._cbs) { + if (this._cbs[eventName]) { + var callbacks = this._cbs[eventName]; + for (var i = 0; i < callbacks.length; i += 1) { + if (!!callbacks[i]) { + callbacks[i](args); + } + } + } + } + }, + addEventListener: function (eventName, callback) { + if (!!this._cbs) { + if (!this._cbs[eventName]) { + this._cbs[eventName] = []; + } + this._cbs[eventName].push(callback); + } + + return function () { + this.removeEventListener(eventName, callback); + }.bind(this); + }, + removeEventListener: function (eventName, callback) { + if (!!!this._cbs) { + return; + } + if (!callback) { + this._cbs[eventName] = null; + } else if (this._cbs[eventName]) { + if (this._cbs[eventName]) { + var i = 0; + if (!!this._cbs[eventName]) { + var len = this._cbs[eventName].length; + while (i < len) { + if (this._cbs[eventName][i] === callback) { + this._cbs[eventName].splice(i, 1); + i -= 1; + len -= 1; + } + i += 1; + } + if (!this._cbs[eventName].length) { + this._cbs[eventName] = null; + } + } + } + } + }, +}; + +export default BaseEvent; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/DataManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/DataManager.js new file mode 100644 index 0000000000000000000000000000000000000000..80a30c09c82220d82297409818424ae06d04950d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/DataManager.js @@ -0,0 +1,791 @@ +import { handleAssets, isHaveImg, createImageFilesDir, decompressAndReadJson, createFilesDir, isCompressdFile, isExistNetworkAssets } from "./DataUtil"; +import { isRawFileExist, isSandboxFileExist, writeFileSync, readFileSync } from './FileUtil'; +import fs from '@ohos.file.fs'; +import util from '@ohos.util'; +import {LogUtil} from './LogUtil'; +import downloadManager from './DownloadManager'; + +const dataManager = (function () { + var _counterId = 1; + var processes = []; + var workerFn; + var workerInstance; + var workerProxy = { + onmessage: function () { + + }, + postMessage: function (path) { + workerFn({ + data: path, + }); + }, + }; + var _workerSelf = { + postMessage: function (data) { + workerProxy.onmessage({ + data: data, + }); + }, + }; + function createWorker(fn) { + workerFn = fn; + return workerProxy; + } + + function loadImage(isNetwork, jsonData, callback, errorCallback) { + // true 优先加载网络资源 + if (isNetwork) { + downloadManager.loadNetworkImage(jsonData).then((results) => { + let newJsonData = handleAssets(jsonData); + callback(newJsonData, true); + }) + .catch((err) => { + // 处理网络异常加载缓存 + let imgRouterFilesDir = createImageFilesDir(); + let isImg = isHaveImg(imgRouterFilesDir); // 沙箱中是否有下载的图片资源 + if (isImg) { + let cacheImagesData = handleAssets(jsonData); + callback(cacheImagesData, false); + } else { + // 缓存无资源,返回加载异常 + errorCallback('error', err); + } + }); + } else { + // false 优先加载缓存资源 + let imgRouterFilesDir = createImageFilesDir(); + let isImg = isHaveImg(imgRouterFilesDir); // 沙箱中是否有下载的图片资源 + if (isImg) { + let filesJsonData = handleAssets(jsonData); + callback(filesJsonData, false); + } else { + downloadManager.loadNetworkImage(jsonData).then((results) => { + let newJsonData = handleAssets(jsonData); + callback(newJsonData, true); + }) + .catch((err) => { + // 下载失败,返回加载异常 + errorCallBack('error', err); + }); + } + } + } + + function loadRawfileData(path, callback, errorCallback, isNetwork) { + if (isCompressdFile(path)) { + try { + let data = getContext()?.resourceManager?.getRawFileContentSync(path); + const lastIndex = path.lastIndexOf('/'); + let fileName = path.substring(lastIndex + 1); + let filePath = `${getContext().cacheDir}/${fileName}`; + let isSuccess = writeFileSync(filePath, data.buffer); + if (!isSuccess) { + errorCallback('Lottie: the path has no data'); + return; + } + let resultDir = createFilesDir(path); + decompressAndReadJson(path, `${getContext()?.cacheDir}`, resultDir.route).then((result) => { + try { + fs.unlink(filePath); + } catch (err) { + LogUtil.warn(`File removal failed: ${JSON.stringify(err)}`); + } + callback(result, false); + }).catch(() => { + errorCallback('Lottie: the path has no data'); + }); + } catch (err) { + errorCallback('Lottie: the path has no data'); + } + } else { + let data = getContext()?.resourceManager?.getRawFileContentSync(path); + let resStr = util.TextDecoder.create('utf-8', { ignoreBOM: true }); + let lottieStr = resStr.decodeToString(new Uint8Array(data.buffer)); + getJsonData(lottieStr, callback, errorCallback, isNetwork); + } + } + + function loadSandboxData(path, callback, errorCallback, isNetwork) { + try { + let filePath = `${getContext().filesDir}/${path}`; + if (isCompressdFile(path)) { + let resultDir = createFilesDir(path); + const lastIndex = filePath.lastIndexOf('/'); + const inFilePath = filePath.substring(0, lastIndex); + decompressAndReadJson(path, inFilePath, resultDir.route).then((result) => { + callback(result, false); + }).catch(() => { + errorCallback('Lottie: the path has no data'); + }); + } else { + let resStr = util.TextDecoder.create('utf-8', { ignoreBOM: true }); + let arrayBuffer = readFileSync(filePath); + if (arrayBuffer) { + let jsonString = resStr.decodeToString(new Uint8Array(arrayBuffer)); + getJsonData(jsonString, callback, errorCallback, isNetwork); + } + } + } catch (err) { + LogUtil.error(`Loading sandbox animation failed: ${JSON.stringify(err)}`); + } + } + + function getJsonData(jsonString, callback, errorCallback, isNetwork) { + let jsonData = JSON.parse(jsonString); + if (jsonData) { + if (jsonData.assets?.length && isExistNetworkAssets(jsonData.assets)) { + loadImage(isNetwork, jsonData, callback, errorCallback); + } else { + // 无网络图片 + callback(jsonData, false); + } + } else { + errorCallback('Lottie: the path has no data'); + } + } + + function setupWorker() { + if (!workerInstance) { + workerInstance = createWorker(function workerStart(e) { + function dataFunctionManager() { + function completeLayers(layers, comps) { + if (!layers) { + return; + } + var layerData; + var i; + var len = layers.length; + var j; + var jLen; + var k; + var kLen; + for (i = 0; i < len; i += 1) { + layerData = layers[i]; + if (('ks' in layerData) && !layerData.completed) { + layerData.completed = true; + if (layerData.hasMask) { + var maskProps = layerData.masksProperties; + jLen = maskProps.length; + for (j = 0; j < jLen; j += 1) { + if (maskProps[j].pt.k.i) { + convertPathsToAbsoluteValues(maskProps[j].pt.k); + } else { + kLen = maskProps[j].pt.k.length; + for (k = 0; k < kLen; k += 1) { + if (maskProps[j].pt.k[k].s) { + convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]); + } + if (maskProps[j].pt.k[k].e) { + convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]); + } + } + } + } + } + if (layerData.ty === 0) { + layerData.layers = findCompLayers(layerData.refId, comps); + completeLayers(layerData.layers, comps); + } else if (layerData.ty === 4) { + completeShapes(layerData.shapes); + } else if (layerData.ty === 5) { + completeText(layerData); + } + } + } + } + + function completeChars(chars, assets) { + if (chars) { + var i = 0; + var len = chars.length; + for (i = 0; i < len; i += 1) { + if (chars[i].t === 1) { + // var compData = findComp(chars[i].data.refId, assets); + chars[i].data.layers = findCompLayers(chars[i].data.refId, assets); + // chars[i].data.ip = 0; + // chars[i].data.op = 99999; + // chars[i].data.st = 0; + // chars[i].data.sr = 1; + // chars[i].w = compData.w; + // chars[i].data.ks = { + // a: { k: [0, 0, 0], a: 0 }, + // p: { k: [0, -compData.h, 0], a: 0 }, + // r: { k: 0, a: 0 }, + // s: { k: [100, 100], a: 0 }, + // o: { k: 100, a: 0 }, + // }; + completeLayers(chars[i].data.layers, assets); + } + } + } + } + + function findComp(id, comps) { + var i = 0; + var len = comps.length; + while (i < len) { + if (comps[i].id === id) { + return comps[i]; + } + i += 1; + } + return null; + } + + function findCompLayers(id, comps) { + var comp = findComp(id, comps); + if (comp) { + if (!comp.layers.__used) { + comp.layers.__used = true; + return comp.layers; + } + return JSON.parse(JSON.stringify(comp.layers)); + } + return null; + } + + function completeShapes(arr) { + var i; + var len = arr.length; + var j; + var jLen; + for (i = len - 1; i >= 0; i -= 1) { + if (arr[i].ty === 'sh') { + if (arr[i].ks.k.i) { + convertPathsToAbsoluteValues(arr[i].ks.k); + } else { + jLen = arr[i].ks.k.length; + for (j = 0; j < jLen; j += 1) { + if (arr[i].ks.k[j].s) { + convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]); + } + if (arr[i].ks.k[j].e) { + convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]); + } + } + } + } else if (arr[i].ty === 'gr') { + completeShapes(arr[i].it); + } + } + } + + function convertPathsToAbsoluteValues(path) { + var i; + var len = path.i.length; + for (i = 0; i < len; i += 1) { + path.i[i][0] += path.v[i][0]; + path.i[i][1] += path.v[i][1]; + path.o[i][0] += path.v[i][0]; + path.o[i][1] += path.v[i][1]; + } + } + + function checkVersion(minimum, animVersionString) { + var animVersion = animVersionString ? animVersionString.split('.') : [100, 100, 100]; + if (minimum[0] > animVersion[0]) { + return true; + } if (animVersion[0] > minimum[0]) { + return false; + } + if (minimum[1] > animVersion[1]) { + return true; + } if (animVersion[1] > minimum[1]) { + return false; + } + if (minimum[2] > animVersion[2]) { + return true; + } if (animVersion[2] > minimum[2]) { + return false; + } + return null; + } + + var checkText = (function () { + var minimumVersion = [4, 4, 14]; + + function updateTextLayer(textLayer) { + var documentData = textLayer.t.d; + textLayer.t.d = { + k: [ + { + s: documentData, + t: 0, + }, + ], + }; + } + + function iterateLayers(layers) { + var i; + var len = layers.length; + for (i = 0; i < len; i += 1) { + if (layers[i].ty === 5) { + updateTextLayer(layers[i]); + } + } + } + + return function (animationData) { + if (checkVersion(minimumVersion, animationData.v)) { + iterateLayers(animationData.layers); + if (animationData.assets) { + var i; + var len = animationData.assets.length; + for (i = 0; i < len; i += 1) { + if (animationData.assets[i].layers) { + iterateLayers(animationData.assets[i].layers); + } + } + } + } + }; + }()); + + var checkChars = (function () { + var minimumVersion = [4, 7, 99]; + return function (animationData) { + if (animationData.chars && !checkVersion(minimumVersion, animationData.v)) { + var i; + var len = animationData.chars.length; + for (i = 0; i < len; i += 1) { + var charData = animationData.chars[i]; + if (charData.data && charData.data.shapes) { + completeShapes(charData.data.shapes); + charData.data.ip = 0; + charData.data.op = 99999; + charData.data.st = 0; + charData.data.sr = 1; + charData.data.ks = { + p: { k: [0, 0], a: 0 }, + s: { k: [100, 100], a: 0 }, + a: { k: [0, 0], a: 0 }, + r: { k: 0, a: 0 }, + o: { k: 100, a: 0 }, + }; + if (!animationData.chars[i].t) { + charData.data.shapes.push( + { + ty: 'no', + } + ); + charData.data.shapes[0].it.push( + { + p: { k: [0, 0], a: 0 }, + s: { k: [100, 100], a: 0 }, + a: { k: [0, 0], a: 0 }, + r: { k: 0, a: 0 }, + o: { k: 100, a: 0 }, + sk: { k: 0, a: 0 }, + sa: { k: 0, a: 0 }, + ty: 'tr', + } + ); + } + } + } + } + }; + }()); + + var checkPathProperties = (function () { + var minimumVersion = [5, 7, 15]; + + function updateTextLayer(textLayer) { + var pathData = textLayer.t.p; + if (typeof pathData.a === 'number') { + pathData.a = { + a: 0, + k: pathData.a, + }; + } + if (typeof pathData.p === 'number') { + pathData.p = { + a: 0, + k: pathData.p, + }; + } + if (typeof pathData.r === 'number') { + pathData.r = { + a: 0, + k: pathData.r, + }; + } + } + + function iterateLayers(layers) { + var i; + var len = layers.length; + for (i = 0; i < len; i += 1) { + if (layers[i].ty === 5) { + updateTextLayer(layers[i]); + } + } + } + + return function (animationData) { + if (checkVersion(minimumVersion, animationData.v)) { + iterateLayers(animationData.layers); + if (animationData.assets) { + var i; + var len = animationData.assets.length; + for (i = 0; i < len; i += 1) { + if (animationData.assets[i].layers) { + iterateLayers(animationData.assets[i].layers); + } + } + } + } + }; + }()); + + var checkColors = (function () { + var minimumVersion = [4, 1, 9]; + + function iterateShapes(shapes) { + var i; + var len = shapes.length; + var j; + var jLen; + for (i = 0; i < len; i += 1) { + if (shapes[i].ty === 'gr') { + iterateShapes(shapes[i].it); + } else if (shapes[i].ty === 'fl' || shapes[i].ty === 'st') { + if (shapes[i].c.k && shapes[i].c.k[0].i) { + jLen = shapes[i].c.k.length; + for (j = 0; j < jLen; j += 1) { + if (shapes[i].c.k[j].s) { + shapes[i].c.k[j].s[0] /= 255; + shapes[i].c.k[j].s[1] /= 255; + shapes[i].c.k[j].s[2] /= 255; + shapes[i].c.k[j].s[3] /= 255; + } + if (shapes[i].c.k[j].e) { + shapes[i].c.k[j].e[0] /= 255; + shapes[i].c.k[j].e[1] /= 255; + shapes[i].c.k[j].e[2] /= 255; + shapes[i].c.k[j].e[3] /= 255; + } + } + } else { + shapes[i].c.k[0] /= 255; + shapes[i].c.k[1] /= 255; + shapes[i].c.k[2] /= 255; + shapes[i].c.k[3] /= 255; + } + } + } + } + + function iterateLayers(layers) { + var i; + var len = layers.length; + for (i = 0; i < len; i += 1) { + if (layers[i].ty === 4) { + iterateShapes(layers[i].shapes); + } + } + } + + return function (animationData) { + if (checkVersion(minimumVersion, animationData.v)) { + iterateLayers(animationData.layers); + if (animationData.assets) { + var i; + var len = animationData.assets.length; + for (i = 0; i < len; i += 1) { + if (animationData.assets[i].layers) { + iterateLayers(animationData.assets[i].layers); + } + } + } + } + }; + }()); + + var checkShapes = (function () { + var minimumVersion = [4, 4, 18]; + + function completeClosingShapes(arr) { + var i; + var len = arr.length; + var j; + var jLen; + for (i = len - 1; i >= 0; i -= 1) { + if (arr[i].ty === 'sh') { + if (arr[i].ks.k.i) { + arr[i].ks.k.c = arr[i].closed; + } else { + jLen = arr[i].ks.k.length; + for (j = 0; j < jLen; j += 1) { + if (arr[i].ks.k[j].s) { + arr[i].ks.k[j].s[0].c = arr[i].closed; + } + if (arr[i].ks.k[j].e) { + arr[i].ks.k[j].e[0].c = arr[i].closed; + } + } + } + } else if (arr[i].ty === 'gr') { + completeClosingShapes(arr[i].it); + } + } + } + + function iterateLayers(layers) { + var layerData; + var i; + var len = layers.length; + var j; + var jLen; + var k; + var kLen; + for (i = 0; i < len; i += 1) { + layerData = layers[i]; + if (layerData.hasMask) { + var maskProps = layerData.masksProperties; + jLen = maskProps.length; + for (j = 0; j < jLen; j += 1) { + if (maskProps[j].pt.k.i) { + maskProps[j].pt.k.c = maskProps[j].cl; + } else { + kLen = maskProps[j].pt.k.length; + for (k = 0; k < kLen; k += 1) { + if (maskProps[j].pt.k[k].s) { + maskProps[j].pt.k[k].s[0].c = maskProps[j].cl; + } + if (maskProps[j].pt.k[k].e) { + maskProps[j].pt.k[k].e[0].c = maskProps[j].cl; + } + } + } + } + } + if (layerData.ty === 4) { + completeClosingShapes(layerData.shapes); + } + } + } + + return function (animationData) { + if (checkVersion(minimumVersion, animationData.v)) { + iterateLayers(animationData.layers); + if (animationData.assets) { + var i; + var len = animationData.assets.length; + for (i = 0; i < len; i += 1) { + if (animationData.assets[i].layers) { + iterateLayers(animationData.assets[i].layers); + } + } + } + } + }; + }()); + + function completeData(animationData) { + if (!animationData || animationData.__complete) { + return; + } + checkColors(animationData); + checkText(animationData); + checkChars(animationData); + checkPathProperties(animationData); + checkShapes(animationData); + completeLayers(animationData.layers, animationData.assets); + completeChars(animationData.chars, animationData.assets); + animationData.__complete = true; + } + + function completeText(data) { + if (data.t.a.length === 0 && !('m' in data.t.p)) { + // data.singleShape = true; + } + } + + var moduleOb = {}; + moduleOb.completeData = completeData; + moduleOb.checkColors = checkColors; + moduleOb.checkChars = checkChars; + moduleOb.checkPathProperties = checkPathProperties; + moduleOb.checkShapes = checkShapes; + moduleOb.completeLayers = completeLayers; + + return moduleOb; + } + if (!_workerSelf.dataManager) { + _workerSelf.dataManager = dataFunctionManager(); + } + + if (!_workerSelf.assetLoader) { + _workerSelf.assetLoader = (function () { + function formatResponse(xhr) { + // using typeof doubles the time of execution of this method, + // so if available, it's better to use the header to validate the type + var contentTypeHeader = xhr.getResponseHeader('content-type'); + if (contentTypeHeader && xhr.responseType === 'json' && contentTypeHeader.indexOf('json') !== -1) { + return xhr.response; + } + if (xhr.response && typeof xhr.response === 'object') { + return xhr.response; + } if (xhr.response && typeof xhr.response === 'string') { + return JSON.parse(xhr.response); + } if (xhr.responseText) { + return JSON.parse(xhr.responseText); + } + return null; + } + + function loadAsset(context2D, path, isNetwork, fullPath, callback, errorCallback) { + setTimeout(() => { + if (context2D && typeof context2D.getJsonData === 'function') { + let filePath = getContext()?.filesDir + '/' + path; + let isExist = isSandboxFileExist(filePath); + //判断沙箱动画资源是否存在 + if (isExist) { + loadSandboxData(path, callback, errorCallback, isNetwork); + } else { + // 判断rawfile目录动画资源是否存在 + let isRawExist = isRawFileExist(getContext(), path); + if (isRawExist) { + loadRawfileData(path, callback, errorCallback, isNetwork); + return; + } + + let jsonString = context2D.getJsonData(path); + if (jsonString) { + getJsonData(jsonString, callback, errorCallback, isNetwork); + } else { + errorCallback('Lottie: the path has no data'); + } + } + } else { + errorCallback('Lottie: the path has no data'); + } + }, 0) + } + return { + load: loadAsset, + }; + }()); + } + + if (e.data.type === 'loadAnimation') { + _workerSelf.assetLoader.load( + e.data.context2D, + e.data.path, + e.data.isNetwork, + e.data.fullPath, + function (data, isNetLoad) { + _workerSelf.dataManager.completeData(data); + _workerSelf.postMessage({ + id: e.data.id, + isNetLoad:isNetLoad, + payload: data, + status: 'success', + }); + }, + function () { + _workerSelf.postMessage({ + id: e.data.id, + status: 'error', + }); + } + ); + } else if (e.data.type === 'complete') { + var animation = e.data.animation; + _workerSelf.dataManager.completeData(animation); + _workerSelf.postMessage({ + id: e.data.id, + payload: animation, + status: 'success', + }); + } else if (e.data.type === 'loadData') { + _workerSelf.assetLoader.load( + null, // context2D + e.data.path, + false, // isNetwork + e.data.fullPath, + function (data) { + _workerSelf.postMessage({ + id: e.data.id, + payload: data, + status: 'success', + }); + }, + function () { + _workerSelf.postMessage({ + id: e.data.id, + status: 'error', + }); + } + ); + } + }); + + workerInstance.onmessage = function (event) { + var data = event.data; + var id = data.id; + var process = processes[id]; + processes[id] = null; + if (data.status === 'success') { + process?.onComplete(data.payload, data.isNetLoad); + } else if (process?.onError) { + process.onError(); + } + }; + } + } + + function createProcess(onComplete, onError) { + _counterId += 1; + var id = 'processId_' + _counterId; + processes[id] = { + onComplete: onComplete, + onError: onError, + }; + return id; + } + + function loadAnimation(context2D, path, isNetwork, onComplete, onError) { + setupWorker(); + var processId = createProcess(onComplete, onError); + workerInstance.postMessage({ + type: 'loadAnimation', + context2D: context2D, + path: path, + isNetwork: isNetwork, + fullPath: "", + id: processId, + }); + } + + function loadData(path, onComplete, onError) { + setupWorker(); + var processId = createProcess(onComplete, onError); + workerInstance.postMessage({ + type: 'loadData', + path: path, + fullPath: "", + id: processId, + }); + } + + function completeAnimation(anim, onComplete, onError) { + setupWorker(); + var processId = createProcess(onComplete, onError); + workerInstance.postMessage({ + type: 'complete', + animation: anim, + id: processId, + }); + } + + return { + loadAnimation: loadAnimation, + loadData: loadData, + completeAnimation: completeAnimation, + }; +}()); + +export default dataManager; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/DataUtil.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/DataUtil.js new file mode 100644 index 0000000000000000000000000000000000000000..a250cf857eb521123fac07f224a6468465b8da82 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/DataUtil.js @@ -0,0 +1,383 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import fs from '@ohos.file.fs'; +import util from '@ohos.util'; +import zlib from '@ohos.zlib'; +import { moveFileSync, mkdirSync, listFileSync, readFileSync, isSandboxFileExist } from './FileUtil'; +import {LogUtil} from './LogUtil'; + +/** + * 过滤并返回指定目录下的 JSON 文件 + * + * @param way - 要扫描的目录路径 + * @param isDotLottiePath - 是否为 .lottie 文件路径的标志 + * @returns 返回找到的 JSON 文件名,如果没有找到则返回 undefined + */ +const filterJson = function (way, isDotLottiePath) { + try { + // 以同步方式列出文件夹下所有文件名 + let files = listFileSync(way, ['.json']); + if (isDotLottiePath) { + return files.find(item => { + return item !== 'manifest.json' && item.endsWith('.json'); + }); + } else { + return files.find(item => item.endsWith('.json')); + } + } catch (err) { + LogUtil.error(`Method filterJson err: ${JSON.stringify(err)}`); + return undefined; + } +}; + +/** + * 检查指定目录下是否存在包含 JSON 文件的子目录 + * + * @param way - 要扫描的目录路径 + * @param isDotLottiePath - 是否为 .lottie 文件路径的标志 + * @returns 返回找到的包含 JSON 文件的子目录名,如果没有找到则返回 null + */ +const isHaveDirectory = function (way, isDotLottiePath) { + try { + // 以同步方式列出文件夹下所有文件名 + let files = listFileSync(way, ['.json']); + for (let i = 0; i < files.length; i++) { + let isDirectory = fs.statSync(`${way}/${files[i]}`).isDirectory(); + if (isDirectory && files[i] !== '__MACOSX' && files[i] !== 'images') { + if (filterJson(`${way}/${files[i]}`, isDotLottiePath)) { + return files[i]; + } + } + } + } catch (err) { + LogUtil.error(`Method isHaveDirectory err: ${JSON.stringify(err)}`); + } + return null; +}; + +/** + * 将指定目录下的图片文件移动到目标目录的 images 文件夹中 + * + * @param routerDir - 目标目录路径 + * @param way - 相对路径,用于指定源目录的位置 + */ +const moveImages = function (routerDir, way) { + try { + // files创建新images文件夹 + let dirPath = `${routerDir}/images`; + mkdirSync(dirPath); + let newWay = `${routerDir}/${way}/images`; + let files = listFileSync(newWay, ['.png', '.jpg', '.jpeg']); + for (let i = 0; i < files.length; i++) { + let srcPath = `${newWay}/${files[i]}`; + let destPath = `${dirPath}/${files[i]}`; + moveFileSync(srcPath, destPath); + } + } catch (err) { + LogUtil.error(`Method moveImages err: ${JSON.stringify(err)}`); + } +}; + +/** + * 将指定目录下的 JSON 文件移动到目标目录中 + * + * @param routerDir - 目标目录路径 + * @param way - 相对路径,用于指定源目录的位置 + */ +const moveJson = function (routerDir, way) { + try { + let jsonWay = `${routerDir}/${way}`; + let jsonFile = listFileSync(jsonWay, ['.json']); + let newJson = jsonFile.find(item => item.endsWith('.json')); + let srcPath = `${jsonWay}/${newJson}`; + let destPath = `${routerDir}/${newJson}`; + moveFileSync(srcPath, destPath); + } catch (err) { + LogUtil.error(`Method moveJson err: ${JSON.stringify(err)}`); + } +}; + +/** + * 解压缩并读取 JSON 文件 + * + * @param url - 文件的 URL 地址 + * @param cacheDir - 缓存目录路径 + * @param fileDir - 目标目录路径 + * @returns 返回一个 Promise,解析为处理后的 JSON 数据 + */ +export const decompressAndReadJson = function (url, cacheDir, fileDir) { + const lastIndex = url.lastIndexOf('/'); + const result = url.substring(lastIndex + 1); + let isDotLottiePath = url.endsWith('.lottie'); + let inFile = `${cacheDir}/${result}`; + let outFile = fileDir; + let options = { + level: zlib.CompressLevel.COMPRESS_LEVEL_DEFAULT_COMPRESSION, + memLevel: zlib.MemLevel.MEM_LEVEL_MAX, + strategy: zlib.CompressStrategy.COMPRESS_STRATEGY_DEFAULT_STRATEGY, + }; + return new Promise((resolve, reject) => { + zlib.decompressFile(inFile, outFile, options).then((data) => { + // 解压完成之后读取 json 数据 + if (isHaveDirectory(fileDir, isDotLottiePath)) { + let newFileDir = isHaveDirectory(fileDir, isDotLottiePath); + moveImages(fileDir, newFileDir); + moveJson(fileDir, newFileDir); + let zipData = readJson(url, fileDir); + // 修改u路径 + let newZipData = handleZipAssets(zipData, fileDir); + resolve(newZipData); + } else { + let zipData = readJson(url, fileDir); + // 修改u路径 + let newZipData = handleZipAssets(zipData, fileDir); + resolve(newZipData); + } + }).catch((errData) => { + reject(errData); + }); + }); +}; + +/** + * 读取并解析 JSON 文件 + * + * @param url - 文件的 URL 地址 + * @param readPath - 读取路径 + * @param errCallBack - 错误回调函数 + * @returns 返回解析后的 JSON 对象,如果没有解析成功则返回 undefined + */ +export const readJson = function (url, readPath, errCallBack) { + try { + let textDecoderOptions = { + fatal: false, + ignoreBOM : true, + }; + let resStr = util.TextDecoder.create('utf-8', textDecoderOptions); + let existResult = isCacheExist(url, readPath); + if (existResult?.isExist) { + let arrayBuffer = readFileSync(existResult.filePath); + // 解码的json数据 + let lottieStr = resStr.decodeToString(new Uint8Array(arrayBuffer)); + return JSON.parse(lottieStr); + } + return undefined; + } catch (err) { + LogUtil.error(`Method readJson err: ${JSON.stringify(err)}`); + if (errCallBack) { + errCallBack('error', err); + } + return undefined; + } +}; + +/** + * 检查指定 URL 对应的文件是否存在于缓存中 + * + * @param url - 文件的 URL 地址 + * @param readPath - 读取路径 + * @returns 返回一个包含是否存在文件和文件路径的对象,如果出错则返回 undefined + */ +export const isCacheExist = function (url, readPath) { + try { + const lastIndex = url.lastIndexOf('/'); + const result = url.substring(lastIndex + 1); // 最后一个斜杠后的字符串 `${readPath}/${filterJson(readPath, url.endsWith('.lottie'))}` + // 通过沙箱中下载或者解压的文件名来找到文件所在路径 + let filePath = hasSuffix(url, ['.json', '.js']) ? `${readPath}/${result}` : + `${readPath}/${filterJson(readPath, url.endsWith('.lottie'))}`; + // 同步方法判断沙箱里的文件是否存在 + let isExist = isSandboxFileExist(filePath); + return { + isExist, + filePath, + }; + } catch (err) { + LogUtil.error(`Method isCacheExist err: ${JSON.stringify(err)}`); + return undefined; + } +}; + +/** + * 检查指定路径下是否存在图片文件 + * + * @param way - 目标路径 + * @returns 返回一个布尔值,表示是否存在图片文件,如果出错则返回 undefined + */ +export const isHaveImg = function (way) { + try { + let imgFiles = listFileSync(way, ['.png', '.jpg', '.jpeg']); + return imgFiles.some(item => { + return item.endsWith('.png') || item.endsWith('.jpg') || item.endsWith('.jpeg'); + }); + } catch (err) { + LogUtil.error(`Method isCacheExist err: ${JSON.stringify(err)}`); + return undefined; + } +}; + + +/** + * 检查URL是否以指定的后缀结尾 + * + * @param url - 需要检查的URL字符串 + * @param suffixes - 允许的文件后缀数组(如['.json', '.js']) + * @returns 如果URL以指定后缀之一结尾则返回true,否则返回false + */ +const hasSuffix = function (url, suffixes) { + const lastDotIndex = url.lastIndexOf('.'); + return lastDotIndex !== -1 && lastDotIndex < url.length - 1 && suffixes.includes(url.substring(lastDotIndex)); +}; + + +/** + * 处理 Lottie 动画数据中的资源路径 + * + * @param lottieData - Lottie 动画数据对象 + * @returns 返回处理后的 Lottie 动画数据对象 + */ +export const handleAssets = function (lottieData) { + let updatedAssets = lottieData?.assets?.map((item, index) => { + if (item.id && item.p && item.p.startsWith('http')) { + item.p = `${item.id}.png`; + if (!item.u) { + item.u = 'lottie/loadImages/'; + item.e = 0; + } + } + return item; + }); + lottieData.assets = updatedAssets; + return lottieData; +}; + +/** + * 处理 ZIP 压缩包中的 Lottie 动画资源路径 + * + * @param lottieData - Lottie 动画数据对象 + * @param zipRoute - ZIP 文件的路径 + * @returns 返回处理后的 Lottie 动画数据对象 + */ +export const handleZipAssets = function (lottieData, zipRoute) { + const parts = zipRoute.split('/'); + const lastPart = parts.slice(-3); + let lastPartStr = ''; + if (Array.isArray(lastPart)) { + lastPartStr = lastPart.join('/'); + } + // 修改u路径 + let updatedZipAssets = lottieData?.assets?.map((item, index) => { + if (item.id && item.u) { + item.u = `${lastPartStr}/images/`; + } + return item; + }); + lottieData.assets = updatedZipAssets; + return lottieData; +}; + +/** + * 创建文件的目录结构 + * + * @param url - 文件的 URL 地址 + * @returns 返回一个包含文件名和完整路径的对象,如果 URL 格式无效则返回 undefined + */ +export const createFilesDir = function (url) { + const parts = url.split('/'); + if (parts.length < 2) { + LogUtil.error(`Invalid URL format`); + return undefined; + } + // 获取倒数第二部分(目录名) + const directoryName = parts[parts.length - 2]; + // 获取最后一部分(文件名)并移除扩展名 + const fileNameWithExtension = parts[parts.length - 1]; + const fileName = fileNameWithExtension.replace(/\.(?:zip|json|lottie)$/i, ''); + const basePath = `${getContext()?.filesDir || ''}/lottie/${directoryName}`; + const fullPath = `${basePath}/${fileName}`; + // 创建目录 + mkdirSync(fullPath, true); + let result = { + dataName: fileNameWithExtension, + route: fullPath, + }; + return result; +}; + +/** + * 创建用于加载图片的目录 + * @returns 返回创建的图片目录路径 + */ +export const createImageFilesDir = function () { + let dirImgPath = `${getContext()?.filesDir}/lottie/loadImages`; + mkdirSync(dirImgPath, true); + return dirImgPath; +}; + +/** + * 合并多个 ArrayBuffer 对象为一个新的 ArrayBuffer + * + * @param arrayBuffers - 要合并的 ArrayBuffer 数组 + * @returns 返回合并后的 ArrayBuffer + */ +export const combineArrayBuffers = function (arrayBuffers) { + // 计算多个ArrayBuffer的总字节大小 + let totalByteLength = 0; + for (const arrayBuffer of arrayBuffers) { + totalByteLength += arrayBuffer.byteLength; + } + // 创建一个新的ArrayBuffer + const combinedArrayBuffer = new ArrayBuffer(totalByteLength); + // 创建一个Uint8Array来操作新的ArrayBuffer + const combinedUint8Array = new Uint8Array(combinedArrayBuffer); + // 依次复制每个ArrayBuffer的内容到新的ArrayBuffer中 + let offset = 0; + for (const arrayBuffer of arrayBuffers) { + const sourceUint8Array = new Uint8Array(arrayBuffer); + combinedUint8Array.set(sourceUint8Array, offset); + offset += sourceUint8Array.length; + } + return combinedArrayBuffer; +}; + +/** + * 检查给定的 URI 是否为JSON文件 + * + * @param uri - 要检查的文件 URI + * @returns 返回一个布尔值,表示 URI 是否以 .json 或 .js 结尾 + */ +export const isJsonFile = function (uri) { + return uri.endsWith('.json') || uri.endsWith('.js'); +}; + +/** + * 检查给定的 URI 是否为压缩文件或 Lottie 动画文件 + * @param uri - 要检查的文件 URI + * @returns 返回一个布尔值,表示 URI 是否以 .zip 或 .lottie 结尾 + */ +export const isCompressdFile = function (uri) { + return uri.endsWith('.zip') || uri.endsWith('.lottie'); +}; + +/** + * 检查给定的资源数组中是否存在网络资源 + * + * @param assets - 资源数组,每个资源对象包含属性 p + * @returns 返回一个布尔值,表示资源数组中是否存在以 'http' 开头的网络资源 + */ +export const isExistNetworkAssets = function (assets) { + return assets?.some((item) => { + return item.p && item.p.startsWith('http'); + }); +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/DownloadManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/DownloadManager.js new file mode 100644 index 0000000000000000000000000000000000000000..28389db345a5bd436a980781ef8e9b74361e0aa2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/DownloadManager.js @@ -0,0 +1,220 @@ +/** + * MIT License + * + * Copyright (C) 2024 Huawei Device Co., Ltd. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +import { + decompressAndReadJson, + readJson, + handleAssets, + handleZipAssets, + isCacheExist, + combineArrayBuffers, + createImageFilesDir, + isJsonFile, + isCompressdFile, + isExistNetworkAssets +} from './DataUtil'; +import http from '@ohos.net.http'; +import {LogUtil} from '../utils/LogUtil'; +import { writeFileSync, moveFileSync } from './FileUtil'; + +const downloadManager = (function () { + const downloadUri = new Map(); + const TIMEOUT = 60000; + /** + * 加载网络动画资源 + * + * @param uri - 动画资源的网络地址 + * @param onComplete - 加载完成时的回调函数 + * @param onError - 加载失败时的回调函数 + * @param resultDir - 结果目录信息 + * @param cacheFlag - 是否使用缓存标志 + */ + function loadNetworkAnimations(uri, onComplete, onError, resultDir, cacheFlag) { + let flag = downloadUri.has(uri); + if (flag) { + let tasks = setInterval(() => { + let existResult = isCacheExist(uri, resultDir.route); + if (!existResult?.isExist) { + return; + } + // 取消循环检测 + clearInterval(tasks); + let repeatData = readJson(uri, resultDir.route); + let newData = isJsonFile(uri) ? repeatData : handleZipAssets(repeatData, resultDir.route); + onComplete(newData, false); + }, 100); + } else { + // 将URI添加到Map中,表示下载已经开始 + downloadUri.set(uri, true); + let httpRequest = http.createHttp(); + let fileData = []; + httpRequest.on('dataReceive', (data) => { + fileData.push(data); + }); + let promise = httpRequest.requestInStream(uri, { + method: http.RequestMethod.GET, + expectDataType: http.HttpDataType.ARRAY_BUFFER, + connectTimeout: TIMEOUT, + readTimeout: TIMEOUT, + }); + + promise.then(async (data) => { + if (data === 200 || data === 206 || data === 204) { + let resBuf = combineArrayBuffers(fileData); + let filePath = `${getContext().cacheDir}/${resultDir.dataName}`; + writeFileSync(filePath, resBuf); + loadSuccess(uri, resultDir, onComplete); + } else { + loadFail(uri, resultDir, onComplete, onError, cacheFlag); + } + }).finally(()=>{ + downloadUri.delete(uri); + httpRequest.off('dataReceive'); + httpRequest.destroy(); + }); + } + }; + + /** + * 成功加载动画资源后的处理逻辑 + * + * @param uri - 动画资源的网络地址 + * @param resultDir - 结果目录信息 + * @param onComplete - 加载完成时的回调函数 + */ + function loadSuccess(uri, resultDir, onComplete) { + if (isJsonFile(uri)) { + let srcPath = `${getContext()?.cacheDir}/${resultDir.dataName}`; + let destPath = `${resultDir.route}/${resultDir.dataName}`; + moveFileSync(srcPath, destPath); + let lottieData = readJson(uri, resultDir.route); + if (lottieData?.assets?.length && isExistNetworkAssets(lottieData?.assets)) { + downLoadImg(lottieData).then((results) => { + // 下载成功加载网络 + let newJsonData = handleAssets(lottieData); + onComplete(newJsonData, true); + }) + .catch((err) => { + LogUtil.error(`Download error: ${JSON.stringify(err)}`); + errCallBack('error', err); + let filesJsonData = handleAssets(lottieData); + onComplete(filesJsonData, false); + }); + } else { + // 读取成功从Map中移除条目 + // uri方式无图片的json网络资源 + downloadUri.delete(uri); + onComplete(lottieData, true); + } + } else if (isCompressdFile(uri)) { + decompressAndReadJson(uri, `${getContext()?.cacheDir}`, resultDir.route).then((result) => { + // 解压成功,从Map中移除条目 + downloadUri.delete(uri); + onComplete(result, true); + }).catch((errData) => { + // 解压失败,从Map中移除条目 + downloadUri.delete(uri); + errCallBack('error', errData); + }); + } + }; + + /** + * 处理动画资源加载失败时的逻辑 + * + * @param uri - 动画资源的网络地址 + * @param resultDir - 结果目录信息 + * @param onComplete - 加载完成时的回调函数 + * @param onError - 错误回调函数 + * @param err - 错误对象 + * @param cacheFlag - 是否使用缓存标志 + */ + function loadFail(uri, resultDir, onComplete, onError, cacheFlag) { + // 处理网络异常加载缓存 + let existResult = isCacheExist(uri, resultDir.route); + if (existResult?.isExist && cacheFlag) { + downloadUri.delete(uri); + let cacheData = readJson(uri, resultDir.route); + let newData = isJsonFile(uri) ? cacheData : handleZipAssets(cacheData, resultDir.route); + onComplete(newData, false); + } else { + // 缓存无资源,给用户返回加载异常 + downloadUri.delete(uri); + onError('error', 'download fail'); + } + }; + + /** + * 下载并保存 Lottie 动画中的网络图片资源 + * + * @param lottieData - 包含动画图片资源的对象 + * @returns 返回一个 Promise,表示所有下载任务的状态 + */ + function loadNetworkImages(lottieData) { + let imgRouterFilesDir = createImageFilesDir(); + let downloadTasks = []; + let imgData = []; + lottieData?.assets?.forEach((item, index) => { + if (item.id && item.p && item.p.startsWith('http')) { + let httpRequest = http.createHttp(); + let jsonData = []; + httpRequest.on('dataReceive', (data) => { + jsonData.push(data); + jsonData.length === 1 ? imgData.push({ AssetItem: item, fileData: jsonData }) : undefined; + }); + let promise = httpRequest.requestInStream(item.p, { + method: http.RequestMethod.GET, + expectDataType: http.HttpDataType.ARRAY_BUFFER, + connectTimeout: TIMEOUT, + readTimeout: TIMEOUT, + }).finally(() => { + httpRequest.off('dataReceive'); + httpRequest.destroy(); + }); + downloadTasks.push(promise); + } + }); + + return Promise.all(downloadTasks) + .then((results) => { + results?.forEach((item, index) => { + let resBuf = combineArrayBuffers(imgData[index].fileData); + let filePath = `${imgRouterFilesDir}/${imgData[index].AssetItem.id}.png`; + writeFileSync(filePath, resBuf); + }); + LogUtil.error(`All download tasks completed success: ${JSON.stringify(results)}`); + }) + .catch((error) => { + if (error && error.message) { + LogUtil.error(`An error occurred during download: ${JSON.stringify(error)}`); + } + }); + }; + + return { + loadNetworkAnimation:loadNetworkAnimations, + loadNetworkImage:loadNetworkImages, + }; +}()); + +export default downloadManager; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/FileUtil.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/FileUtil.js new file mode 100644 index 0000000000000000000000000000000000000000..36d3355ace37ab45ea0403b3d597627827f93cae --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/FileUtil.js @@ -0,0 +1,194 @@ +/* + * Copyright (C) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import fs from '@ohos.file.fs'; +import {LogUtil} from './LogUtil'; + +/** + * 判断Rawfile目录下该文件是否存在 + * + * @param context 上下文 + * @param filePath 文件路径 + * @returns 存在返回true,不存在返回false + */ +export const isRawFileExist = (context, filePath) => { + try { + context.resourceManager?.getRawFileContentSync(filePath); + return true; + } catch (err) { + return false; + } +}; + +/** + * 判断沙箱路径下该文件是否存在 + * + * @param filePath 文件路径 + * @returns 存在返回true,不存在返回false + */ +export const isSandboxFileExist = (filePath) => { + try { + let isExist = fs.accessSync(filePath); + return isExist; + } catch (err) { + return false; + } +}; + +/** + * 同步写入文件 + * + * @param filePath 文件路径 + * @param data 要写入的数据 + * @returns 写入成功返回true,失败返回false + */ +export const writeFileSync = (filePath, data) => { + try { + let file = fs.openSync(filePath, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE); + fs.writeSync(file.fd, data); + fs.close(file); + return true; + } catch (err) { + return false; + } +}; + +/** + * 同步读取文件 + * + * @param filePath 文件路径 + * @returns 读取成功返回数据,失败返回false + */ +export const readFileSync = (filePath) => { + try { + // 打开文件 + let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY); + // 以同步方法获取文件详细属性信息 + let stat = fs.statSync(filePath); + // 读取文件 + let arrayBuffer = new ArrayBuffer(stat.size); + // 以同步方法从文件读取数据 + fs.readSync(file.fd, arrayBuffer); + fs.close(file); + return arrayBuffer; + } catch (err) { + return false; + } +}; + +/** + * 同步移动文件到指定路径 + * + * @param srcPath - 源文件的路径 + * @param destPath - 目标路径,文件将被移动到此处 + */ +export const moveFileSync = (srcPath, destPath) => { + try { + fs.moveFileSync(srcPath, destPath); + } catch (err) { + LogUtil.error(`Method moveFileSync err: ${JSON.stringify(err)}`); + } +}; + +/** + * 同步创建目录 + * + * @param path - 要创建的目录路径 + * @param rescursion - 是否递归创建目录及其父目录 + */ +export const mkdirSync = (path, rescursion) => { + try { + if (!fs.accessSync(path)) { + fs.mkdirSync(path, rescursion); + } + } catch (err) { + LogUtil.error(`Method mkdirSync err: ${JSON.stringify(err)}`); + } +}; + +/** + * 同步列出指定目录下的文件,并支持根据后缀名过滤文件 + * + * @param path - 要列出文件的目录路径 + * @param suffix - 文件后缀名过滤条件(例如 '.png', '.jpg', '.jpeg') + * @returns 返回匹配的文件列表,如果发生错误则返回空数组 + */ +export const listFileSync = (path, suff) => { + try { + let listFileOption = { + recursion: false, // 是否递归列出子目录中的文件 + listNum: 0, // 返回的文件数量限制,0 表示无限制 + filter: { + suffix: suff, // 匹配指定后缀名的文件 + displayName: ['*'], // 匹配所有文件名 + fileSizeOver: 0, // 匹配文件大小大于等于 0 的文件 + lastModifiedAfter: new Date(0).getTime(), // 匹配文件最近修改时间在1970年1月1日之后 + }, + }; + return fs.listFileSync(path, listFileOption); + } catch (err) { + LogUtil.error(`Method listFileSync err: ${JSON.stringify(err)}`); + return []; + } +}; + +/** + * 同步删除文件(封装fs.unlinkSync并添加错误处理) + * @param {string} filePath - 要删除的文件绝对路径 + */ +export const unlinkSync = (filePath) => { + try { + fs.unlinkSync(filePath); + } catch (err) { + LogUtil.error(`Method unlinkSync err: ${JSON.stringify(err)}`); + } +}; + +/** + * 异步删除文件(封装fs.unlink并添加错误处理) + * @param {string} filePath - 要删除的文件绝对路径 + */ +export const unlink = (filePath) => { + fs.unlink(filePath) + .catch((err) => { + LogUtil.error(`Method unlink err: ${JSON.stringify(err)}`); + }); +}; + +/** + * 同步删除目录 + * @param {string} filePath - 要删除的文件绝对路径 + */ +export const rmdirSync = (filePath) => { + try { + fs.rmdirSync(filePath); + } catch (err) { + LogUtil.error(`Method rmdirSync err: ${JSON.stringify(err)}`); + } +}; + +/** + * 同步获取目录文件列表 + * @param {string} filePath - 要扫描的目标目录绝对路径 + * @returns {Array} 成功时返回文件名列数组,失败时返回空数组 + */ +export const listFileSyncs = (filePath) => { + try { + let filenames = fs.listFileSync(filePath); + return filenames; + } catch (err) { + LogUtil.error(`Method rmdirSync err: ${JSON.stringify(err)}`); + return []; + } +}; \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/FontManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/FontManager.js new file mode 100644 index 0000000000000000000000000000000000000000..eaa4148af78c6bcbd8d3b5b305c2e639e5d83ae4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/FontManager.js @@ -0,0 +1,376 @@ +import createNS from './helpers/svg_elements'; +import createTag from './helpers/html_elements'; +import getFontProperties from './getFontProperties'; + +const FontManager = (function () { + var maxWaitingTime = 5000; + var emptyChar = { + w: 0, + size: 0, + shapes: [], + data: { + shapes: [], + }, + }; + var combinedCharacters = []; + // Hindi characters + combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366, + 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379, + 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]); + + var surrogateModifiers = [ + 'd83cdffb', + 'd83cdffc', + 'd83cdffd', + 'd83cdffe', + 'd83cdfff', + ]; + + var zeroWidthJoiner = [65039, 8205]; + + function trimFontOptions(font) { + var familyArray = font.split(','); + var i; + var len = familyArray.length; + var enabledFamilies = []; + for (i = 0; i < len; i += 1) { + if (familyArray[i] !== 'sans-serif' && familyArray[i] !== 'monospace') { + enabledFamilies.push(familyArray[i]); + } + } + return enabledFamilies.join(','); + } + + function setUpNode(font, family) { + var parentNode = createTag('span'); + // Node is invisible to screen readers. + parentNode.setAttribute('aria-hidden', true); + parentNode.style.fontFamily = family; + var node = createTag('span'); + // Characters that vary significantly among different fonts + node.innerText = 'giItT1WQy@!-/#'; + // Visible - so we can measure it - but not on the screen + parentNode.style.position = 'absolute'; + parentNode.style.left = '-10000px'; + parentNode.style.top = '-10000px'; + // Large font size makes even subtle changes obvious + parentNode.style.fontSize = '300px'; + // Reset any font properties + parentNode.style.fontVariant = 'normal'; + parentNode.style.fontStyle = 'normal'; + parentNode.style.fontWeight = 'normal'; + parentNode.style.letterSpacing = '0'; + parentNode.appendChild(node); + // document.body.appendChild(parentNode); + + // Remember width with no applied web font + var width = node.offsetWidth; + node.style.fontFamily = trimFontOptions(font) + ', ' + family; + return { node: node, w: width, parent: parentNode }; + } + + function checkLoadedFonts() { + var i; + var len = this.fonts.length; + var node; + var w; + var loadedCount = len; + for (i = 0; i < len; i += 1) { + if (this.fonts[i].loaded) { + loadedCount -= 1; + } else if (this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0) { + this.fonts[i].loaded = true; + } else { + node = this.fonts[i].monoCase.node; + w = this.fonts[i].monoCase.w; + if (node.offsetWidth !== w) { + loadedCount -= 1; + this.fonts[i].loaded = true; + } else { + node = this.fonts[i].sansCase.node; + w = this.fonts[i].sansCase.w; + if (node.offsetWidth !== w) { + loadedCount -= 1; + this.fonts[i].loaded = true; + } + } + if (this.fonts[i].loaded) { + this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent); + this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent); + } + } + } + + if (loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime) { + setTimeout(this.checkLoadedFontsBinded, 20); + } else { + setTimeout(this.setIsLoadedBinded, 10); + } + } + + function createHelper(fontData, def) { + var engine = 'canvas'; + var helper; + var fontProps = getFontProperties(fontData); + if (engine === 'svg') { + var tHelper = createNS('text'); + tHelper.style.fontSize = '100px'; + // tHelper.style.fontFamily = fontData.fFamily; + tHelper.setAttribute('font-family', fontData.fFamily); + tHelper.setAttribute('font-style', fontProps.style); + tHelper.setAttribute('font-weight', fontProps.weight); + tHelper.textContent = '1'; + if (fontData.fClass) { + tHelper.style.fontFamily = 'inherit'; + tHelper.setAttribute('class', fontData.fClass); + } else { + tHelper.style.fontFamily = fontData.fFamily; + } + def.appendChild(tHelper); + helper = tHelper; + } else { + var tCanvasHelper = new OffscreenCanvas(500, 500).getContext('2d'); + tCanvasHelper.font = fontProps.style + ' ' + fontProps.weight + ' 100px ' + fontData.fFamily; + helper = tCanvasHelper; + } + function measure(text) { + if (engine === 'svg') { + helper.textContent = text; + return helper.getComputedTextLength(); + } + return helper.measureText(text).width; + } + return { + measureText: measure, + }; + } + + function addFonts(fontData, defs) { + if (!fontData) { + this.isLoaded = true; + return; + } + if (this.chars) { + this.isLoaded = true; + this.fonts = fontData.list; + return; + } + // if (!document.body) { + // this.isLoaded = true; + // fontData.list.forEach((data) => { + // data.helper = createHelper(data); + // data.cache = {}; + // }); + // this.fonts = fontData.list; + // return; + // } + + var fontArr = fontData.list; + var i; + var len = fontArr.length; + var _pendingFonts = len; + for (i = 0; i < len; i += 1) { + var shouldLoadFont = true; + var loadedSelector; + var j; + fontArr[i].loaded = false; + fontArr[i].monoCase = setUpNode(fontArr[i].fFamily, 'monospace'); + fontArr[i].sansCase = setUpNode(fontArr[i].fFamily, 'sans-serif'); + //暂不支持自定义字体 + fontArr[i].fPath = ''; + if (!fontArr[i].fPath) { + fontArr[i].loaded = true; + _pendingFonts -= 1; + } else if (fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3) { + loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="' + fontArr[i].fFamily + '"], style[f-origin="3"][f-family="' + fontArr[i].fFamily + '"]'); + + if (loadedSelector.length > 0) { + shouldLoadFont = false; + } + + if (shouldLoadFont) { + var s = createTag('style'); + s.setAttribute('f-forigin', fontArr[i].fOrigin); + s.setAttribute('f-origin', fontArr[i].origin); + s.setAttribute('f-family', fontArr[i].fFamily); + s.type = 'text/css'; + s.innerText = '@font-face {font-family: ' + fontArr[i].fFamily + "; font-style: normal; src: url('" + fontArr[i].fPath + "');}"; + defs.appendChild(s); + } + } else if (fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1) { + loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'); + + for (j = 0; j < loadedSelector.length; j += 1) { + if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) { + // Font is already loaded + shouldLoadFont = false; + } + } + + if (shouldLoadFont) { + var l = createTag('link'); + l.setAttribute('f-forigin', fontArr[i].fOrigin); + l.setAttribute('f-origin', fontArr[i].origin); + l.type = 'text/css'; + l.rel = 'stylesheet'; + l.href = fontArr[i].fPath; + document.body.appendChild(l); + } + } else if (fontArr[i].fOrigin === 't' || fontArr[i].origin === 2) { + loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'); + + for (j = 0; j < loadedSelector.length; j += 1) { + if (fontArr[i].fPath === loadedSelector[j].src) { + // Font is already loaded + shouldLoadFont = false; + } + } + + if (shouldLoadFont) { + var sc = createTag('link'); + sc.setAttribute('f-forigin', fontArr[i].fOrigin); + sc.setAttribute('f-origin', fontArr[i].origin); + sc.setAttribute('rel', 'stylesheet'); + sc.setAttribute('href', fontArr[i].fPath); + defs.appendChild(sc); + } + } + fontArr[i].helper = createHelper(fontArr[i], defs); + fontArr[i].cache = {}; + this.fonts.push(fontArr[i]); + } + if (_pendingFonts === 0) { + this.isLoaded = true; + } else { + // On some cases even if the font is loaded, it won't load correctly when measuring text on canvas. + // Adding this timeout seems to fix it + setTimeout(this.checkLoadedFonts.bind(this), 100); + } + } + + function addChars(chars) { + if (!chars) { + return; + } + if (!this.chars) { + this.chars = []; + } + var i; + var len = chars.length; + var j; + var jLen = this.chars.length; + var found; + for (i = 0; i < len; i += 1) { + j = 0; + found = false; + while (j < jLen) { + if (this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch) { + found = true; + } + j += 1; + } + if (!found) { + this.chars.push(chars[i]); + jLen += 1; + } + } + } + + function getCharData(char, style, font) { + var i = 0; + var len = this.chars?.length; + while (i < len) { + if (this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font) { + return this.chars[i]; + } + i += 1; + } + if (((typeof char === 'string' && char.charCodeAt(0) !== 13) || !char) + && console + && console.warn // eslint-disable-line no-console + && !this._warned + ) { + this._warned = true; + console.warn('Missing character from exported characters list: ', char, style, font); // eslint-disable-line no-console + } + return emptyChar; + } + + function measureText(char, fontName, size) { + var fontData = this.getFontByName(fontName); + var index = char.charCodeAt(0); + if (!fontData.cache[index + 1]) { + var tHelper = fontData.helper; + if (char === ' ') { + var doubleSize = tHelper.measureText('|' + char + '|'); + var singleSize = tHelper.measureText('||'); + fontData.cache[index + 1] = (doubleSize - singleSize) / 100; + } else { + fontData.cache[index + 1] = tHelper.measureText(char) / 100; + } + } + return fontData.cache[index + 1] * size; + } + + function getFontByName(name) { + var i = 0; + var len = this.fonts.length; + while (i < len) { + if (this.fonts[i].fName === name) { + return this.fonts[i]; + } + i += 1; + } + return this.fonts[0]; + } + + function isModifier(firstCharCode, secondCharCode) { + var sum = firstCharCode.toString(16) + secondCharCode.toString(16); + return surrogateModifiers.indexOf(sum) !== -1; + } + + function isZeroWidthJoiner(firstCharCode, secondCharCode) { + if (!secondCharCode) { + return firstCharCode === zeroWidthJoiner[1]; + } + return firstCharCode === zeroWidthJoiner[0] && secondCharCode === zeroWidthJoiner[1]; + } + + function isCombinedCharacter(char) { + return combinedCharacters.indexOf(char) !== -1; + } + + function setIsLoaded() { + this.isLoaded = true; + } + + var Font = function () { + this.fonts = []; + this.chars = null; + this.typekitLoaded = 0; + this.isLoaded = false; + this._warned = false; + this.initTime = Date.now(); + this.setIsLoadedBinded = this.setIsLoaded.bind(this); + this.checkLoadedFontsBinded = this.checkLoadedFonts.bind(this); + }; + Font.isModifier = isModifier; + Font.isZeroWidthJoiner = isZeroWidthJoiner; + Font.isCombinedCharacter = isCombinedCharacter; + + var fontPrototype = { + addChars: addChars, + addFonts: addFonts, + getCharData: getCharData, + getFontByName: getFontByName, + measureText: measureText, + checkLoadedFonts: checkLoadedFonts, + setIsLoaded: setIsLoaded, + }; + + Font.prototype = fontPrototype; + + return Font; +}()); + +export default FontManager; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/LogUtil.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/LogUtil.js new file mode 100644 index 0000000000000000000000000000000000000000..cf30c94e14d9051ba8169f8e84b3d7361074f94e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/LogUtil.js @@ -0,0 +1,55 @@ +/* + * Copyright (C) 2024 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import hilog from '@ohos.hilog'; + +export class LogUtil { + static DOMAIN = 0xFF00; + static TAG = 'lottie_ohos'; + static ON = true; + static OFF = false; + static mLogLevel = LogUtil.ON; + static VERSION = '2.0.24'; + + static debug(message, ...args) { + if (LogUtil.mLogLevel === LogUtil.ON) { + hilog.debug(LogUtil.DOMAIN, LogUtil.TAG, message, args); + } + } + + static info(message, ...args) { + if (LogUtil.mLogLevel === LogUtil.ON) { + hilog.info(LogUtil.DOMAIN, LogUtil.TAG, message, args); + } + } + + static log(message, ...args) { + if (LogUtil.mLogLevel === LogUtil.ON) { + hilog.debug(LogUtil.DOMAIN, LogUtil.TAG, message, args); + } + } + + static warn(message, ...args) { + hilog.warn(LogUtil.DOMAIN, LogUtil.TAG, message, args); + } + + static error(message, ...args) { + hilog.error(LogUtil.DOMAIN, LogUtil.TAG, message, args); + } + + static version() { + hilog.info(LogUtil.DOMAIN, LogUtil.TAG, `current Lottie version: ${LogUtil.VERSION}`); + return LogUtil.VERSION; + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/PolynomialBezier.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/PolynomialBezier.js new file mode 100644 index 0000000000000000000000000000000000000000..07e9786f8426fe0119c3d063f5ef776abf3145ed --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/PolynomialBezier.js @@ -0,0 +1,253 @@ +function floatEqual(a, b) { + return Math.abs(a - b) * 100000 <= Math.min(Math.abs(a), Math.abs(b)); +} + +function floatZero(f) { + return Math.abs(f) <= 0.00001; +} + +function lerp(p0, p1, amount) { + return p0 * (1 - amount) + p1 * amount; +} + +function lerpPoint(p0, p1, amount) { + return [lerp(p0[0], p1[0], amount), lerp(p0[1], p1[1], amount)]; +} + +function quadRoots(a, b, c) { + // no root + if (a === 0) return []; + var s = b * b - 4 * a * c; + // Complex roots + if (s < 0) return []; + var singleRoot = -b / (2 * a); + // 1 root + if (s === 0) return [singleRoot]; + var delta = Math.sqrt(s) / (2 * a); + // 2 roots + return [singleRoot - delta, singleRoot + delta]; +} + +function polynomialCoefficients(p0, p1, p2, p3) { + return [ + -p0 + 3 * p1 - 3 * p2 + p3, + 3 * p0 - 6 * p1 + 3 * p2, + -3 * p0 + 3 * p1, + p0, + ]; +} + +function singlePoint(p) { + return new PolynomialBezier(p, p, p, p, false); +} + +function PolynomialBezier(p0, p1, p2, p3, linearize) { + if (linearize && pointEqual(p0, p1)) { + p1 = lerpPoint(p0, p3, 1 / 3); + } + if (linearize && pointEqual(p2, p3)) { + p2 = lerpPoint(p0, p3, 2 / 3); + } + var coeffx = polynomialCoefficients(p0[0], p1[0], p2[0], p3[0]); + var coeffy = polynomialCoefficients(p0[1], p1[1], p2[1], p3[1]); + this.a = [coeffx[0], coeffy[0]]; + this.b = [coeffx[1], coeffy[1]]; + this.c = [coeffx[2], coeffy[2]]; + this.d = [coeffx[3], coeffy[3]]; + this.points = [p0, p1, p2, p3]; +} +PolynomialBezier.prototype.point = function (t) { + return [ + (((this.a[0] * t) + this.b[0]) * t + this.c[0]) * t + this.d[0], + (((this.a[1] * t) + this.b[1]) * t + this.c[1]) * t + this.d[1], + ]; +}; +PolynomialBezier.prototype.derivative = function (t) { + return [ + (3 * t * this.a[0] + 2 * this.b[0]) * t + this.c[0], + (3 * t * this.a[1] + 2 * this.b[1]) * t + this.c[1], + ]; +}; +PolynomialBezier.prototype.tangentAngle = function (t) { + var p = this.derivative(t); + return Math.atan2(p[1], p[0]); +}; +PolynomialBezier.prototype.normalAngle = function (t) { + var p = this.derivative(t); + return Math.atan2(p[0], p[1]); +}; + +PolynomialBezier.prototype.inflectionPoints = function () { + var denom = this.a[1] * this.b[0] - this.a[0] * this.b[1]; + if (floatZero(denom)) return []; + var tcusp = (-0.5 * (this.a[1] * this.c[0] - this.a[0] * this.c[1])) / denom; + var square = tcusp * tcusp - ((1 / 3) * (this.b[1] * this.c[0] - this.b[0] * this.c[1])) / denom; + if (square < 0) return []; + var root = Math.sqrt(square); + if (floatZero(root)) { + if (root > 0 && root < 1) return [tcusp]; + return []; + } + return [tcusp - root, tcusp + root].filter(function (r) { return r > 0 && r < 1; }); +}; +PolynomialBezier.prototype.split = function (t) { + if (t <= 0) return [singlePoint(this.points[0]), this]; + if (t >= 1) return [this, singlePoint(this.points[this.points.length - 1])]; + var p10 = lerpPoint(this.points[0], this.points[1], t); + var p11 = lerpPoint(this.points[1], this.points[2], t); + var p12 = lerpPoint(this.points[2], this.points[3], t); + var p20 = lerpPoint(p10, p11, t); + var p21 = lerpPoint(p11, p12, t); + var p3 = lerpPoint(p20, p21, t); + return [ + new PolynomialBezier(this.points[0], p10, p20, p3, true), + new PolynomialBezier(p3, p21, p12, this.points[3], true), + ]; +}; +function extrema(bez, comp) { + var min = bez.points[0][comp]; + var max = bez.points[bez.points.length - 1][comp]; + if (min > max) { + var e = max; + max = min; + min = e; + } + // Derivative roots to find min/max + var f = quadRoots(3 * bez.a[comp], 2 * bez.b[comp], bez.c[comp]); + for (var i = 0; i < f.length; i += 1) { + if (f[i] > 0 && f[i] < 1) { + var val = bez.point(f[i])[comp]; + if (val < min) min = val; + else if (val > max) max = val; + } + } + return { + min: min, + max: max, + }; +} +PolynomialBezier.prototype.bounds = function () { + return { + x: extrema(this, 0), + y: extrema(this, 1), + }; +}; +PolynomialBezier.prototype.boundingBox = function () { + var bounds = this.bounds(); + return { + left: bounds.x.min, + right: bounds.x.max, + top: bounds.y.min, + bottom: bounds.y.max, + width: bounds.x.max - bounds.x.min, + height: bounds.y.max - bounds.y.min, + cx: (bounds.x.max + bounds.x.min) / 2, + cy: (bounds.y.max + bounds.y.min) / 2, + }; +}; + +function intersectData(bez, t1, t2) { + var box = bez.boundingBox(); + return { + cx: box.cx, + cy: box.cy, + width: box.width, + height: box.height, + bez: bez, + t: (t1 + t2) / 2, + t1: t1, + t2: t2, + }; +} +function splitData(data) { + var split = data.bez.split(0.5); + return [ + intersectData(split[0], data.t1, data.t), + intersectData(split[1], data.t, data.t2), + ]; +} + +function boxIntersect(b1, b2) { + return Math.abs(b1.cx - b2.cx) * 2 < b1.width + b2.width + && Math.abs(b1.cy - b2.cy) * 2 < b1.height + b2.height; +} + +function intersectsImpl(d1, d2, depth, tolerance, intersections, maxRecursion) { + if (!boxIntersect(d1, d2)) return; + if (depth >= maxRecursion || (d1.width <= tolerance && d1.height <= tolerance && d2.width <= tolerance && d2.height <= tolerance)) { + intersections.push([d1.t, d2.t]); + return; + } + var d1s = splitData(d1); + var d2s = splitData(d2); + intersectsImpl(d1s[0], d2s[0], depth + 1, tolerance, intersections, maxRecursion); + intersectsImpl(d1s[0], d2s[1], depth + 1, tolerance, intersections, maxRecursion); + intersectsImpl(d1s[1], d2s[0], depth + 1, tolerance, intersections, maxRecursion); + intersectsImpl(d1s[1], d2s[1], depth + 1, tolerance, intersections, maxRecursion); +} + +PolynomialBezier.prototype.intersections = function (other, tolerance, maxRecursion) { + if (tolerance === undefined) tolerance = 2; + if (maxRecursion === undefined) maxRecursion = 7; + var intersections = []; + intersectsImpl(intersectData(this, 0, 1), intersectData(other, 0, 1), 0, tolerance, intersections, maxRecursion); + return intersections; +}; + +PolynomialBezier.shapeSegment = function (shapePath, index) { + var nextIndex = (index + 1) % shapePath.length(); + return new PolynomialBezier(shapePath.v[index], shapePath.o[index], shapePath.i[nextIndex], shapePath.v[nextIndex], true); +}; + +PolynomialBezier.shapeSegmentInverted = function (shapePath, index) { + var nextIndex = (index + 1) % shapePath.length(); + return new PolynomialBezier(shapePath.v[nextIndex], shapePath.i[nextIndex], shapePath.o[index], shapePath.v[index], true); +}; + +function crossProduct(a, b) { + return [ + a[1] * b[2] - a[2] * b[1], + a[2] * b[0] - a[0] * b[2], + a[0] * b[1] - a[1] * b[0], + ]; +} + +function lineIntersection(start1, end1, start2, end2) { + var v1 = [start1[0], start1[1], 1]; + var v2 = [end1[0], end1[1], 1]; + var v3 = [start2[0], start2[1], 1]; + var v4 = [end2[0], end2[1], 1]; + + var r = crossProduct( + crossProduct(v1, v2), + crossProduct(v3, v4) + ); + + if (floatZero(r[2])) return null; + + return [r[0] / r[2], r[1] / r[2]]; +} + +function polarOffset(p, angle, length) { + return [ + p[0] + Math.cos(angle) * length, + p[1] - Math.sin(angle) * length, + ]; +} + +function pointDistance(p1, p2) { + return Math.hypot(p1[0] - p2[0], p1[1] - p2[1]); +} + +function pointEqual(p1, p2) { + return floatEqual(p1[0], p2[0]) && floatEqual(p1[1], p2[1]); +} + +export { + PolynomialBezier, + lineIntersection, + polarOffset, + pointDistance, + pointEqual, + floatEqual, +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/PropertyFactory.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/PropertyFactory.js new file mode 100644 index 0000000000000000000000000000000000000000..74d7b04bccbf44b18d5470006bb5f971fb67061a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/PropertyFactory.js @@ -0,0 +1,490 @@ +import { + degToRads, +} from './common'; +import { + createTypedArray, +} from './helpers/arrays'; +import BezierFactory from '../3rd_party/BezierEaser'; +import { + initialDefaultFrame, +} from '../main'; +import bez from './bez'; + + + var initFrame = initialDefaultFrame; + var mathAbs = Math.abs; + + function interpolateValue(frameNum, caching) { + var offsetTime = this.offsetTime; + var newValue; + if (this.propType === 'multidimensional') { + newValue = createTypedArray('float32', this.pv.length); + } + var iterationIndex = caching.lastIndex; + var i = iterationIndex; + var len = this.keyframes.length - 1; + var flag = true; + var keyData; + var nextKeyData; + var keyframeMetadata; + + while (flag) { + keyData = this.keyframes[i]; + nextKeyData = this.keyframes[i + 1]; + if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime) { + if (keyData.h) { + keyData = nextKeyData; + } + iterationIndex = 0; + break; + } + if ((nextKeyData.t - offsetTime) > frameNum) { + iterationIndex = i; + break; + } + if (i < len - 1) { + i += 1; + } else { + iterationIndex = 0; + flag = false; + } + } + keyframeMetadata = this.keyframesMetadata[i] || {}; + + var k; + var kLen; + var perc; + var jLen; + var j; + var fnc; + var nextKeyTime = nextKeyData.t - offsetTime; + var keyTime = keyData.t - offsetTime; + var endValue; + if (keyData.to) { + if (!keyframeMetadata.bezierData) { + keyframeMetadata.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti); + } + var bezierData = keyframeMetadata.bezierData; + if (frameNum >= nextKeyTime || frameNum < keyTime) { + var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0; + kLen = bezierData.points[ind].point.length; + for (k = 0; k < kLen; k += 1) { + newValue[k] = bezierData.points[ind].point[k]; + } + // caching._lastKeyframeIndex = -1; + } else { + if (keyframeMetadata.__fnct) { + fnc = keyframeMetadata.__fnct; + } else { + fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get; + keyframeMetadata.__fnct = fnc; + } + perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime)); + var distanceInLine = bezierData.segmentLength * perc; + + var segmentPerc; + var addedLength = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0; + j = (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0; + flag = true; + jLen = bezierData.points.length; + while (flag) { + addedLength += bezierData.points[j].partialLength; + if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) { + kLen = bezierData.points[j].point.length; + for (k = 0; k < kLen; k += 1) { + newValue[k] = bezierData.points[j].point[k]; + } + break; + } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) { + segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength; + kLen = bezierData.points[j].point.length; + for (k = 0; k < kLen; k += 1) { + newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc; + } + break; + } + if (j < jLen - 1) { + j += 1; + } else { + flag = false; + } + } + caching._lastPoint = j; + caching._lastAddedLength = addedLength - bezierData.points[j].partialLength; + caching._lastKeyframeIndex = i; + } + } else { + var outX; + var outY; + var inX; + var inY; + var keyValue; + len = keyData.s.length; + endValue = nextKeyData.s || keyData.e; + if (this.sh && keyData.h !== 1) { + if (frameNum >= nextKeyTime) { + newValue[0] = endValue[0]; + newValue[1] = endValue[1]; + newValue[2] = endValue[2]; + } else if (frameNum <= keyTime) { + newValue[0] = keyData.s[0]; + newValue[1] = keyData.s[1]; + newValue[2] = keyData.s[2]; + } else { + var quatStart = createQuaternion(keyData.s); + var quatEnd = createQuaternion(endValue); + var time = (frameNum - keyTime) / (nextKeyTime - keyTime); + quaternionToEuler(newValue, slerp(quatStart, quatEnd, time)); + } + } else { + for (i = 0; i < len; i += 1) { + if (keyData.h !== 1) { + if (frameNum >= nextKeyTime) { + perc = 1; + } else if (frameNum < keyTime) { + perc = 0; + } else { + if (keyData.o.x.constructor === Array) { + if (!keyframeMetadata.__fnct) { + keyframeMetadata.__fnct = []; + } + if (!keyframeMetadata.__fnct[i]) { + outX = keyData.o.x[i] === undefined ? keyData.o.x[0] : keyData.o.x[i]; + outY = keyData.o.y[i] === undefined ? keyData.o.y[0] : keyData.o.y[i]; + inX = keyData.i.x[i] === undefined ? keyData.i.x[0] : keyData.i.x[i]; + inY = keyData.i.y[i] === undefined ? keyData.i.y[0] : keyData.i.y[i]; + fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get; + keyframeMetadata.__fnct[i] = fnc; + } else { + fnc = keyframeMetadata.__fnct[i]; + } + } else if (!keyframeMetadata.__fnct) { + outX = keyData.o.x; + outY = keyData.o.y; + inX = keyData.i.x; + inY = keyData.i.y; + fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get; + keyData.keyframeMetadata = fnc; + } else { + fnc = keyframeMetadata.__fnct; + } + perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime)); + } + } + + endValue = nextKeyData.s || keyData.e; + keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc; + + if (this.propType === 'multidimensional') { + newValue[i] = keyValue; + } else { + newValue = keyValue; + } + } + } + } + caching.lastIndex = iterationIndex; + return newValue; + } + + // based on @Toji's https://github.com/toji/gl-matrix/ + function slerp(a, b, t) { + var out = []; + var ax = a[0]; + var ay = a[1]; + var az = a[2]; + var aw = a[3]; + var bx = b[0]; + var by = b[1]; + var bz = b[2]; + var bw = b[3]; + + var omega; + var cosom; + var sinom; + var scale0; + var scale1; + + cosom = ax * bx + ay * by + az * bz + aw * bw; + if (cosom < 0.0) { + cosom = -cosom; + bx = -bx; + by = -by; + bz = -bz; + bw = -bw; + } + if ((1.0 - cosom) > 0.000001) { + omega = Math.acos(cosom); + sinom = Math.sin(omega); + scale0 = Math.sin((1.0 - t) * omega) / sinom; + scale1 = Math.sin(t * omega) / sinom; + } else { + scale0 = 1.0 - t; + scale1 = t; + } + out[0] = scale0 * ax + scale1 * bx; + out[1] = scale0 * ay + scale1 * by; + out[2] = scale0 * az + scale1 * bz; + out[3] = scale0 * aw + scale1 * bw; + + return out; + } + + function quaternionToEuler(out, quat) { + var qx = quat[0]; + var qy = quat[1]; + var qz = quat[2]; + var qw = quat[3]; + var heading = Math.atan2(2 * qy * qw - 2 * qx * qz, 1 - 2 * qy * qy - 2 * qz * qz); + var attitude = Math.asin(2 * qx * qy + 2 * qz * qw); + var bank = Math.atan2(2 * qx * qw - 2 * qy * qz, 1 - 2 * qx * qx - 2 * qz * qz); + out[0] = heading / degToRads; + out[1] = attitude / degToRads; + out[2] = bank / degToRads; + } + + function createQuaternion(values) { + var heading = values[0] * degToRads; + var attitude = values[1] * degToRads; + var bank = values[2] * degToRads; + var c1 = Math.cos(heading / 2); + var c2 = Math.cos(attitude / 2); + var c3 = Math.cos(bank / 2); + var s1 = Math.sin(heading / 2); + var s2 = Math.sin(attitude / 2); + var s3 = Math.sin(bank / 2); + var w = c1 * c2 * c3 - s1 * s2 * s3; + var x = s1 * s2 * c3 + c1 * c2 * s3; + var y = s1 * c2 * c3 + c1 * s2 * s3; + var z = c1 * s2 * c3 - s1 * c2 * s3; + + return [x, y, z, w]; + } + + function getValueAtCurrentTime() { + var frameNum = this.comp.renderedFrame - this.offsetTime; + var initTime = this.keyframes[0].t - this.offsetTime; + var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime; + if (!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))) { + if (this._caching.lastFrame >= frameNum) { + this._caching._lastKeyframeIndex = -1; + this._caching.lastIndex = 0; + } + + var renderResult = this.interpolateValue(frameNum, this._caching); + this.pv = renderResult; + } + this._caching.lastFrame = frameNum; + return this.pv; + } + + function setVValue(val) { + var multipliedValue; + if (this.propType === 'unidimensional') { + multipliedValue = val * this.mult; + if (mathAbs(this.v - multipliedValue) > 0.00001) { + this.v = multipliedValue; + this._mdf = true; + } + } else { + var i = 0; + var len = this.v.length; + while (i < len) { + multipliedValue = val[i] * this.mult; + if (mathAbs(this.v[i] - multipliedValue) > 0.00001) { + this.v[i] = multipliedValue; + this._mdf = true; + } + i += 1; + } + } + } + + function processEffectsSequence() { + if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) { + return; + } + if (this.lock) { + this.setVValue(this.pv); + return; + } + this.lock = true; + this._mdf = this._isFirstFrame; + var i; + var len = this.effectsSequence.length; + var finalValue = this.kf ? this.pv : this.data.k; + for (i = 0; i < len; i += 1) { + finalValue = this.effectsSequence[i](finalValue); + } + this.setVValue(finalValue); + this._isFirstFrame = false; + this.lock = false; + this.frameId = this.elem.globalData.frameId; + } + + function addEffect(effectFunction) { + this.effectsSequence.push(effectFunction); + this.container.addDynamicProperty(this); + } + + function ValueProperty(elem, data, mult, container) { + this.propType = 'unidimensional'; + this.mult = mult || 1; + this.data = data; + this.v = mult ? data.k * mult : data.k; + this.pv = data.k; + this._mdf = false; + this.elem = elem; + this.container = container; + this.comp = elem.comp; + this.k = false; + this.kf = false; + this.vel = 0; + this.effectsSequence = []; + this._isFirstFrame = true; + this.getValue = processEffectsSequence; + this.setVValue = setVValue; + this.addEffect = addEffect; + } + + function MultiDimensionalProperty(elem, data, mult, container) { + this.propType = 'multidimensional'; + this.mult = mult || 1; + this.data = data; + this._mdf = false; + this.elem = elem; + this.container = container; + this.comp = elem.comp; + this.k = false; + this.kf = false; + this.frameId = -1; + var i; + var len = data.k.length; + this.v = createTypedArray('float32', len); + this.pv = createTypedArray('float32', len); + this.vel = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + this.v[i] = data.k[i] * this.mult; + this.pv[i] = data.k[i]; + } + this._isFirstFrame = true; + this.effectsSequence = []; + this.getValue = processEffectsSequence; + this.setVValue = setVValue; + this.addEffect = addEffect; + } + + function KeyframedValueProperty(elem, data, mult, container) { + this.propType = 'unidimensional'; + this.keyframes = data.k; + this.keyframesMetadata = []; + this.offsetTime = elem.data.st; + this.frameId = -1; + this._caching = { + lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1, + }; + this.k = true; + this.kf = true; + this.data = data; + this.mult = mult || 1; + this.elem = elem; + this.container = container; + this.comp = elem.comp; + this.v = initFrame; + this.pv = initFrame; + this._isFirstFrame = true; + this.getValue = processEffectsSequence; + this.setVValue = setVValue; + this.interpolateValue = interpolateValue; + this.effectsSequence = [getValueAtCurrentTime.bind(this)]; + this.addEffect = addEffect; + } + + function KeyframedMultidimensionalProperty(elem, data, mult, container) { + this.propType = 'multidimensional'; + var i; + var len = data.k.length; + var s; + var e; + var to; + var ti; + for (i = 0; i < len - 1; i += 1) { + if (data.k[i].to && data.k[i].s && data.k[i + 1] && data.k[i + 1].s) { + s = data.k[i].s; + e = data.k[i + 1].s; + to = data.k[i].to; + ti = data.k[i].ti; + if ((s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], s[0] + to[0], s[1] + to[1]) && bez.pointOnLine2D(s[0], s[1], e[0], e[1], e[0] + ti[0], e[1] + ti[1])) || (s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], s[0] + to[0], s[1] + to[1], s[2] + to[2]) && bez.pointOnLine3D(s[0], s[1], s[2], e[0], e[1], e[2], e[0] + ti[0], e[1] + ti[1], e[2] + ti[2]))) { + data.k[i].to = null; + data.k[i].ti = null; + } + if (s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) { + if (s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) { + data.k[i].to = null; + data.k[i].ti = null; + } + } + } + } + this.effectsSequence = [getValueAtCurrentTime.bind(this)]; + this.data = data; + this.keyframes = data.k; + this.keyframesMetadata = []; + this.offsetTime = elem.data.st; + this.k = true; + this.kf = true; + this._isFirstFrame = true; + this.mult = mult || 1; + this.elem = elem; + this.container = container; + this.comp = elem.comp; + this.getValue = processEffectsSequence; + this.setVValue = setVValue; + this.interpolateValue = interpolateValue; + this.frameId = -1; + var arrLen = data.k[0].s.length; + this.v = createTypedArray('float32', arrLen); + this.pv = createTypedArray('float32', arrLen); + for (i = 0; i < arrLen; i += 1) { + this.v[i] = initFrame; + this.pv[i] = initFrame; + } + this._caching = { lastFrame: initFrame, lastIndex: 0, value: createTypedArray('float32', arrLen) }; + this.addEffect = addEffect; + } + +const PropertyFactory = (function () { + function getProp(elem, data, type, mult, container) { + if (data.sid) { + data = elem.globalData.slotManager.getProp(data); + } + var p; + if (!data.k.length) { + p = new ValueProperty(elem, data, mult, container); + } else if (typeof (data.k[0]) === 'number') { + p = new MultiDimensionalProperty(elem, data, mult, container); + } else { + switch (type) { + case 0: + p = new KeyframedValueProperty(elem, data, mult, container); + break; + case 1: + p = new KeyframedMultidimensionalProperty(elem, data, mult, container); + break; + default: + break; + } + } + if (p.effectsSequence.length) { + container.addDynamicProperty(p); + } + return p; + } + + var ob = { + getProp: getProp, + }; + return ob; +}()); + +export default PropertyFactory; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/SlotManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/SlotManager.js new file mode 100644 index 0000000000000000000000000000000000000000..68d492524328c4116834df21f566ba83f8866d9f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/SlotManager.js @@ -0,0 +1,16 @@ +function SlotManager(animationData) { + this.animationData = animationData; +} + +SlotManager.prototype.getProp = function (data) { + if (this.animationData.slots && this.animationData.slots[data.sid]) { + return Object.assign(data, this.animationData.slots[data.sid].p); + } + return data; +}; + +function slotFactory(animationData) { + return new SlotManager(animationData); +} + +export default slotFactory; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/TransformProperty.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/TransformProperty.js new file mode 100644 index 0000000000000000000000000000000000000000..2284d429768809ad54dce6e9da3c3100635a0e2e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/TransformProperty.js @@ -0,0 +1,248 @@ +import { + degToRads, +} from './common'; +import { + extendPrototype, +} from './functionExtensions'; +import DynamicPropertyContainer from './helpers/dynamicProperties'; +import Matrix from '../3rd_party/transformation-matrix'; +import PropertyFactory from './PropertyFactory'; + +const TransformPropertyFactory = (function () { + var defaultVector = [0, 0]; + + function applyToMatrix(mat) { + var _mdf = this._mdf; + this.iterateDynamicProperties(); + this._mdf = this._mdf || _mdf; + if (this.a) { + mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]); + } + if (this.s) { + mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]); + } + if (this.sk) { + mat.skewFromAxis(-this.sk.v, this.sa.v); + } + if (this.r) { + mat.rotate(-this.r.v); + } else { + mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]) + .rotateY(this.or.v[1]) + .rotateX(this.or.v[0]); + } + if (this.data.p.s) { + if (this.data.p.z) { + mat.translate(this.px.v, this.py.v, -this.pz.v); + } else { + mat.translate(this.px.v, this.py.v, 0); + } + } else { + mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); + } + } + function processKeys(forceRender) { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + if (this._isDirty) { + this.precalculateMatrix(); + this._isDirty = false; + } + + this.iterateDynamicProperties(); + + if (this._mdf || forceRender) { + var frameRate; + this.v.cloneFromProps(this.pre.props); + if (this.appliedTransformations < 1) { + this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]); + } + if (this.appliedTransformations < 2) { + this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]); + } + if (this.sk && this.appliedTransformations < 3) { + this.v.skewFromAxis(-this.sk.v, this.sa.v); + } + if (this.r && this.appliedTransformations < 4) { + this.v.rotate(-this.r.v); + } else if (!this.r && this.appliedTransformations < 4) { + this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]) + .rotateY(this.or.v[1]) + .rotateX(this.or.v[0]); + } + if (this.autoOriented) { + var v1; + var v2; + frameRate = this.elem.globalData.frameRate; + if (this.p && this.p.keyframes && this.p.getValueAtTime) { + if (this.p._caching.lastFrame + this.p.offsetTime <= this.p.keyframes[0].t) { + v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate, 0); + v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0); + } else if (this.p._caching.lastFrame + this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) { + v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0); + v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0); + } else { + v1 = this.p.pv; + v2 = this.p.getValueAtTime((this.p._caching.lastFrame + this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime); + } + } else if (this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) { + v1 = []; + v2 = []; + var px = this.px; + var py = this.py; + if (px._caching.lastFrame + px.offsetTime <= px.keyframes[0].t) { + v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate, 0); + v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate, 0); + v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate, 0); + v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate, 0); + } else if (px._caching.lastFrame + px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) { + v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate), 0); + v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate), 0); + v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate, 0); + v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate, 0); + } else { + v1 = [px.pv, py.pv]; + v2[0] = px.getValueAtTime((px._caching.lastFrame + px.offsetTime - 0.01) / frameRate, px.offsetTime); + v2[1] = py.getValueAtTime((py._caching.lastFrame + py.offsetTime - 0.01) / frameRate, py.offsetTime); + } + } else { + v2 = defaultVector; + v1 = v2; + } + this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0])); + } + if (this.data.p && this.data.p.s) { + if (this.data.p.z) { + this.v.translate(this.px.v, this.py.v, -this.pz.v); + } else { + this.v.translate(this.px.v, this.py.v, 0); + } + } else { + this.v.translate(this.p.v[0], this.p.v[1], -this.p.v[2]); + } + } + this.frameId = this.elem.globalData.frameId; + } + + function precalculateMatrix() { + if (!this.a.k) { + this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]); + this.appliedTransformations = 1; + } else { + return; + } + if (!this.s.effectsSequence.length) { + this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]); + this.appliedTransformations = 2; + } else { + return; + } + if (this.sk) { + if (!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) { + this.pre.skewFromAxis(-this.sk.v, this.sa.v); + this.appliedTransformations = 3; + } else { + return; + } + } + if (this.r) { + if (!this.r.effectsSequence.length) { + this.pre.rotate(-this.r.v); + this.appliedTransformations = 4; + } + } else if (!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) { + this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]) + .rotateY(this.or.v[1]) + .rotateX(this.or.v[0]); + this.appliedTransformations = 4; + } + } + + function autoOrient() { + // + // var prevP = this.getValueAtTime(); + } + + function addDynamicProperty(prop) { + this._addDynamicProperty(prop); + this.elem.addDynamicProperty(prop); + this._isDirty = true; + } + + function TransformProperty(elem, data, container) { + this.elem = elem; + this.frameId = -1; + this.propType = 'transform'; + this.data = data; + this.v = new Matrix(); + // Precalculated matrix with non animated properties + this.pre = new Matrix(); + this.appliedTransformations = 0; + this.initDynamicPropertyContainer(container || elem); + if (data.p && data.p.s) { + this.px = PropertyFactory.getProp(elem, data.p.x, 0, 0, this); + this.py = PropertyFactory.getProp(elem, data.p.y, 0, 0, this); + if (data.p.z) { + this.pz = PropertyFactory.getProp(elem, data.p.z, 0, 0, this); + } + } else { + this.p = PropertyFactory.getProp(elem, data.p || { k: [0, 0, 0] }, 1, 0, this); + } + if (data.rx) { + this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this); + this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this); + this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this); + if (data.or.k[0].ti) { + var i; + var len = data.or.k.length; + for (i = 0; i < len; i += 1) { + data.or.k[i].to = null; + data.or.k[i].ti = null; + } + } + this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this); + // sh Indicates it needs to be capped between -180 and 180 + this.or.sh = true; + } else { + this.r = PropertyFactory.getProp(elem, data.r || { k: 0 }, 0, degToRads, this); + } + if (data.sk) { + this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this); + this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this); + } + this.a = PropertyFactory.getProp(elem, data.a || { k: [0, 0, 0] }, 1, 0, this); + this.s = PropertyFactory.getProp(elem, data.s || { k: [100, 100, 100] }, 1, 0.01, this); + // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes. + if (data.o) { + this.o = PropertyFactory.getProp(elem, data.o, 0, 0.01, elem); + } else { + this.o = { _mdf: false, v: 1 }; + } + this._isDirty = true; + if (!this.dynamicProperties.length) { + this.getValue(true); + } + } + + TransformProperty.prototype = { + applyToMatrix: applyToMatrix, + getValue: processKeys, + precalculateMatrix: precalculateMatrix, + autoOrient: autoOrient, + }; + + extendPrototype([DynamicPropertyContainer], TransformProperty); + TransformProperty.prototype.addDynamicProperty = addDynamicProperty; + TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty; + + function getTransformProperty(elem, data, container) { + return new TransformProperty(elem, data, container); + } + + return { + getTransformProperty: getTransformProperty, + }; +}()); + +export default TransformPropertyFactory; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/audio/AudioController.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/audio/AudioController.js new file mode 100644 index 0000000000000000000000000000000000000000..420a54939c016cb8ef05b496f25f42b39fdc4a57 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/audio/AudioController.js @@ -0,0 +1,81 @@ +// import Howl from '../../3rd_party/howler'; + +const audioControllerFactory = (function () { + function AudioController(audioFactory) { + this.audios = []; + this.audioFactory = audioFactory; + this._volume = 1; + this._isMuted = false; + } + + AudioController.prototype = { + addAudio: function (audio) { + this.audios.push(audio); + }, + pause: function () { + var i; + var len = this.audios.length; + for (i = 0; i < len; i += 1) { + this.audios[i].pause(); + } + }, + resume: function () { + var i; + var len = this.audios.length; + for (i = 0; i < len; i += 1) { + this.audios[i].resume(); + } + }, + setRate: function (rateValue) { + var i; + var len = this.audios.length; + for (i = 0; i < len; i += 1) { + this.audios[i].setRate(rateValue); + } + }, + createAudio: function (assetPath) { + if (this.audioFactory) { + return this.audioFactory(assetPath); + } + return { + isPlaying: false, + play: function () { this.isPlaying = true; }, + seek: function () { this.isPlaying = false; }, + playing: function () {}, + rate: function () {}, + setVolume: function () {}, + }; + }, + setAudioFactory: function (audioFactory) { + this.audioFactory = audioFactory; + }, + setVolume: function (value) { + this._volume = value; + this._updateVolume(); + }, + mute: function () { + this._isMuted = true; + this._updateVolume(); + }, + unmute: function () { + this._isMuted = false; + this._updateVolume(); + }, + getVolume: function () { + return this._volume; + }, + _updateVolume: function () { + var i; + var len = this.audios.length; + for (i = 0; i < len; i += 1) { + this.audios[i].volume(this._volume * (this._isMuted ? 0 : 1)); + } + }, + }; + + return function () { + return new AudioController(); + }; +}()); + +export default audioControllerFactory; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/audio/AudioElement.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/audio/AudioElement.js new file mode 100644 index 0000000000000000000000000000000000000000..af9593675b1d777b3a82f24c3e099f9c7972c4af --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/audio/AudioElement.js @@ -0,0 +1,6 @@ +// TODO: fix Overwrite +function AudioElement(data) { + this.audioData = data; +} + +export default AudioElement; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/bez.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/bez.js new file mode 100644 index 0000000000000000000000000000000000000000..ea83913c359586d7ca2cef7d9292103ade3875b7 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/bez.js @@ -0,0 +1,260 @@ +import { + bmPow, + bmFloor, + bmSqrt, + getDefaultCurveSegments, +} from './common'; +import { + createSizedArray, + createTypedArray, +} from './helpers/arrays'; +import segmentsLengthPool from './pooling/segments_length_pool'; +import bezierLengthPool from './pooling/bezier_length_pool'; + +function bezFunction() { + var math = Math; + + function pointOnLine2D(x1, y1, x2, y2, x3, y3) { + var det1 = (x1 * y2) + (y1 * x3) + (x2 * y3) - (x3 * y2) - (y3 * x1) - (x2 * y1); + return det1 > -0.001 && det1 < 0.001; + } + + function pointOnLine3D(x1, y1, z1, x2, y2, z2, x3, y3, z3) { + if (z1 === 0 && z2 === 0 && z3 === 0) { + return pointOnLine2D(x1, y1, x2, y2, x3, y3); + } + var dist1 = math.sqrt(math.pow(x2 - x1, 2) + math.pow(y2 - y1, 2) + math.pow(z2 - z1, 2)); + var dist2 = math.sqrt(math.pow(x3 - x1, 2) + math.pow(y3 - y1, 2) + math.pow(z3 - z1, 2)); + var dist3 = math.sqrt(math.pow(x3 - x2, 2) + math.pow(y3 - y2, 2) + math.pow(z3 - z2, 2)); + var diffDist; + if (dist1 > dist2) { + if (dist1 > dist3) { + diffDist = dist1 - dist2 - dist3; + } else { + diffDist = dist3 - dist2 - dist1; + } + } else if (dist3 > dist2) { + diffDist = dist3 - dist2 - dist1; + } else { + diffDist = dist2 - dist1 - dist3; + } + return diffDist > -0.0001 && diffDist < 0.0001; + } + + var getBezierLength = (function () { + return function (pt1, pt2, pt3, pt4) { + var curveSegments = getDefaultCurveSegments(); + var k; + var i; + var len; + var ptCoord; + var perc; + var addedLength = 0; + var ptDistance; + var point = []; + var lastPoint = []; + var lengthData = bezierLengthPool.newElement(); + len = pt3.length; + for (k = 0; k < curveSegments; k += 1) { + perc = k / (curveSegments - 1); + ptDistance = 0; + for (i = 0; i < len; i += 1) { + ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * pt3[i] + 3 * (1 - perc) * bmPow(perc, 2) * pt4[i] + bmPow(perc, 3) * pt2[i]; + point[i] = ptCoord; + if (lastPoint[i] !== null) { + ptDistance += bmPow(point[i] - lastPoint[i], 2); + } + lastPoint[i] = point[i]; + } + if (ptDistance) { + ptDistance = bmSqrt(ptDistance); + addedLength += ptDistance; + } + lengthData.percents[k] = perc; + lengthData.lengths[k] = addedLength; + } + lengthData.addedLength = addedLength; + return lengthData; + }; + }()); + + function getSegmentsLength(shapeData) { + var segmentsLength = segmentsLengthPool.newElement(); + var closed = shapeData.c; + var pathV = shapeData.v; + var pathO = shapeData.o; + var pathI = shapeData.i; + var i; + var len = shapeData._length; + var lengths = segmentsLength.lengths; + var totalLength = 0; + for (i = 0; i < len - 1; i += 1) { + lengths[i] = getBezierLength(pathV[i], pathV[i + 1], pathO[i], pathI[i + 1]); + totalLength += lengths[i].addedLength; + } + if (closed && len) { + lengths[i] = getBezierLength(pathV[i], pathV[0], pathO[i], pathI[0]); + totalLength += lengths[i].addedLength; + } + segmentsLength.totalLength = totalLength; + return segmentsLength; + } + + function BezierData(length) { + this.segmentLength = 0; + this.points = new Array(length); + } + + function PointData(partial, point) { + this.partialLength = partial; + this.point = point; + } + + var buildBezierData = (function () { + var storedData = {}; + + return function (pt1, pt2, pt3, pt4) { + var bezierName = (pt1[0] + '_' + pt1[1] + '_' + pt2[0] + '_' + pt2[1] + '_' + pt3[0] + '_' + pt3[1] + '_' + pt4[0] + '_' + pt4[1]).replace(/\./g, 'p'); + if (!storedData[bezierName]) { + var curveSegments = getDefaultCurveSegments(); + var k; + var i; + var len; + var ptCoord; + var perc; + var addedLength = 0; + var ptDistance; + var point; + var lastPoint = null; + if (pt1.length === 2 && (pt1[0] !== pt2[0] || pt1[1] !== pt2[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt1[0] + pt3[0], pt1[1] + pt3[1]) && pointOnLine2D(pt1[0], pt1[1], pt2[0], pt2[1], pt2[0] + pt4[0], pt2[1] + pt4[1])) { + curveSegments = 2; + } + var bezierData = new BezierData(curveSegments); + len = pt3.length; + for (k = 0; k < curveSegments; k += 1) { + point = createSizedArray(len); + perc = k / (curveSegments - 1); + ptDistance = 0; + for (i = 0; i < len; i += 1) { + ptCoord = bmPow(1 - perc, 3) * pt1[i] + 3 * bmPow(1 - perc, 2) * perc * (pt1[i] + pt3[i]) + 3 * (1 - perc) * bmPow(perc, 2) * (pt2[i] + pt4[i]) + bmPow(perc, 3) * pt2[i]; + point[i] = ptCoord; + if (lastPoint !== null) { + ptDistance += bmPow(point[i] - lastPoint[i], 2); + } + } + ptDistance = bmSqrt(ptDistance); + addedLength += ptDistance; + bezierData.points[k] = new PointData(ptDistance, point); + lastPoint = point; + } + bezierData.segmentLength = addedLength; + storedData[bezierName] = bezierData; + } + return storedData[bezierName]; + }; + }()); + + function getDistancePerc(perc, bezierData) { + var percents = bezierData.percents; + var lengths = bezierData.lengths; + var len = percents.length; + var initPos = bmFloor((len - 1) * perc); + var lengthPos = perc * bezierData.addedLength; + var lPerc = 0; + if (initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]) { + return percents[initPos]; + } + var dir = lengths[initPos] > lengthPos ? -1 : 1; + var flag = true; + let tag = 0; + while (flag) { + // 为了防止while循环条件未满足而陷入死循环,导致进程卡死的问题,添加一个保护机制,当循环执行次数达到2000次是,强制退出循环 + tag += 1; + if (tag > 2000) { + flag = false; + break; + } + + if (lengths[initPos] <= lengthPos && lengths[initPos + 1] > lengthPos) { + lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos + 1] - lengths[initPos]); + flag = false; + } else { + initPos += dir; + } + if (initPos < 0 || initPos >= len - 1) { + // FIX for TypedArrays that don't store floating point values with enough accuracy + if (initPos === len - 1) { + flag = false; + return percents[initPos]; + } + flag = false; + } + } + return percents[initPos] + (percents[initPos + 1] - percents[initPos]) * lPerc; + } + + function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) { + var t1 = getDistancePerc(percent, bezierData); + var u1 = 1 - t1; + var ptX = math.round((u1 * u1 * u1 * pt1[0] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[0] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[0] + t1 * t1 * t1 * pt2[0]) * 1000) / 1000; + var ptY = math.round((u1 * u1 * u1 * pt1[1] + (t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1) * pt3[1] + (t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1) * pt4[1] + t1 * t1 * t1 * pt2[1]) * 1000) / 1000; + return [ptX, ptY]; + } + + var bezierSegmentPoints = createTypedArray('float32', 8); + + function getNewSegment(pt1, pt2, pt3, pt4, startPerc, endPerc, bezierData) { + if (startPerc < 0) { + startPerc = 0; + } else if (startPerc > 1) { + startPerc = 1; + } + var t0 = getDistancePerc(startPerc, bezierData); + endPerc = endPerc > 1 ? 1 : endPerc; + var t1 = getDistancePerc(endPerc, bezierData); + var i; + var len = pt1.length; + var u0 = 1 - t0; + var u1 = 1 - t1; + var u0u0u0 = u0 * u0 * u0; + var t0u0u0_3 = t0 * u0 * u0 * 3; // eslint-disable-line camelcase + var t0t0u0_3 = t0 * t0 * u0 * 3; // eslint-disable-line camelcase + var t0t0t0 = t0 * t0 * t0; + // + var u0u0u1 = u0 * u0 * u1; + var t0u0u1_3 = t0 * u0 * u1 + u0 * t0 * u1 + u0 * u0 * t1; // eslint-disable-line camelcase + var t0t0u1_3 = t0 * t0 * u1 + u0 * t0 * t1 + t0 * u0 * t1; // eslint-disable-line camelcase + var t0t0t1 = t0 * t0 * t1; + // + var u0u1u1 = u0 * u1 * u1; + var t0u1u1_3 = t0 * u1 * u1 + u0 * t1 * u1 + u0 * u1 * t1; // eslint-disable-line camelcase + var t0t1u1_3 = t0 * t1 * u1 + u0 * t1 * t1 + t0 * u1 * t1; // eslint-disable-line camelcase + var t0t1t1 = t0 * t1 * t1; + // + var u1u1u1 = u1 * u1 * u1; + var t1u1u1_3 = t1 * u1 * u1 + u1 * t1 * u1 + u1 * u1 * t1; // eslint-disable-line camelcase + var t1t1u1_3 = t1 * t1 * u1 + u1 * t1 * t1 + t1 * u1 * t1; // eslint-disable-line camelcase + var t1t1t1 = t1 * t1 * t1; + for (i = 0; i < len; i += 1) { + bezierSegmentPoints[i * 4] = math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase + bezierSegmentPoints[i * 4 + 1] = math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase + bezierSegmentPoints[i * 4 + 2] = math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase + bezierSegmentPoints[i * 4 + 3] = math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000; // eslint-disable-line camelcase + } + + return bezierSegmentPoints; + } + + return { + getSegmentsLength: getSegmentsLength, + getNewSegment: getNewSegment, + getPointInSegment: getPointInSegment, + buildBezierData: buildBezierData, + pointOnLine2D: pointOnLine2D, + pointOnLine3D: pointOnLine3D, + }; +} + +const bez = bezFunction(); + +export default bez; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/common.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/common.js new file mode 100644 index 0000000000000000000000000000000000000000..4d502e78baa41ec6ca423c2120d18a38b4951b87 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/common.js @@ -0,0 +1,280 @@ +import { + createSizedArray, +} from './helpers/arrays'; + +let subframeEnabled = true; +let expressionsPlugin = null; +let expressionsInterfaces = null; +let idPrefix = ''; +const isSafari = false; +let _shouldRoundValues = false; +const bmPow = Math.pow; +const bmSqrt = Math.sqrt; +const bmFloor = Math.floor; +const bmMax = Math.max; +const bmMin = Math.min; + +const BMMath = {}; +(function () { + var propertyNames = ['abs', 'acos', 'acosh', 'asin', 'asinh', 'atan', 'atanh', 'atan2', 'ceil', 'cbrt', 'expm1', 'clz32', 'cos', 'cosh', 'exp', 'floor', 'fround', 'hypot', 'imul', 'log', 'log1p', 'log2', 'log10', 'max', 'min', 'pow', 'random', 'round', 'sign', 'sin', 'sinh', 'sqrt', 'tan', 'tanh', 'trunc', 'E', 'LN10', 'LN2', 'LOG10E', 'LOG2E', 'PI', 'SQRT1_2', 'SQRT2']; + var i; + var len = propertyNames.length; + for (i = 0; i < len; i += 1) { + BMMath[propertyNames[i]] = Math[propertyNames[i]]; + } +}()); + +function ProjectInterface() { return {}; } +BMMath.random = Math.random; +BMMath.abs = function (val) { + var tOfVal = typeof val; + if (tOfVal === 'object' && val.length) { + var absArr = createSizedArray(val.length); + var i; + var len = val.length; + for (i = 0; i < len; i += 1) { + absArr[i] = Math.abs(val[i]); + } + return absArr; + } + return Math.abs(val); +}; +let defaultCurveSegments = 150; +const degToRads = Math.PI / 180; +const roundCorner = 0.5519; + +function roundValues(flag) { + _shouldRoundValues = !!flag; +} + +function bmRnd(value) { + if (_shouldRoundValues) { + return Math.round(value); + } + return value; +} + +function styleDiv(element) { + element.style.position = 'absolute'; + element.style.top = 0; + element.style.left = 0; + element.style.display = 'block'; + element.style.transformOrigin = '0 0'; + element.style.webkitTransformOrigin = '0 0'; + element.style.backfaceVisibility = 'visible'; + element.style.webkitBackfaceVisibility = 'visible'; + element.style.transformStyle = 'preserve-3d'; + element.style.webkitTransformStyle = 'preserve-3d'; + element.style.mozTransformStyle = 'preserve-3d'; +} + +function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier) { + this.type = type; + this.currentTime = currentTime; + this.totalTime = totalTime; + this.direction = frameMultiplier < 0 ? -1 : 1; +} + +function BMCompleteEvent(type, frameMultiplier) { + this.type = type; + this.direction = frameMultiplier < 0 ? -1 : 1; +} + +function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier) { + this.type = type; + this.currentLoop = currentLoop; + this.totalLoops = totalLoops; + this.direction = frameMultiplier < 0 ? -1 : 1; +} + +function BMSegmentStartEvent(type, firstFrame, totalFrames) { + this.type = type; + this.firstFrame = firstFrame; + this.totalFrames = totalFrames; +} + +function BMDestroyEvent(type, target) { + this.type = type; + this.target = target; +} + +function BMRenderFrameErrorEvent(nativeError, currentTime) { + this.type = 'renderFrameError'; + this.nativeError = nativeError; + this.currentTime = currentTime; +} + +function BMConfigErrorEvent(nativeError) { + this.type = 'configError'; + this.nativeError = nativeError; +} + +function BMAnimationConfigErrorEvent(type, nativeError) { + this.type = type; + this.nativeError = nativeError; +} + +const createElementID = (function () { + var _count = 0; + return function createID() { + _count += 1; + return idPrefix + '__lottie_element_' + _count; + }; +}()); + +function HSVtoRGB(h, s, v) { + var r; + var g; + var b; + var i; + var f; + var p; + var q; + var t; + i = Math.floor(h * 6); + f = h * 6 - i; + p = v * (1 - s); + q = v * (1 - f * s); + t = v * (1 - (1 - f) * s); + switch (i % 6) { + case 0: r = v; g = t; b = p; break; + case 1: r = q; g = v; b = p; break; + case 2: r = p; g = v; b = t; break; + case 3: r = p; g = q; b = v; break; + case 4: r = t; g = p; b = v; break; + case 5: r = v; g = p; b = q; break; + default: break; + } + return [r, + g, + b]; +} + +function RGBtoHSV(r, g, b) { + var max = Math.max(r, g, b); + var min = Math.min(r, g, b); + var d = max - min; + var h; + var s = (max === 0 ? 0 : d / max); + var v = max / 255; + + switch (max) { + case min: h = 0; break; + case r: h = (g - b) + d * (g < b ? 6 : 0); h /= 6 * d; break; + case g: h = (b - r) + d * 2; h /= 6 * d; break; + case b: h = (r - g) + d * 4; h /= 6 * d; break; + default: break; + } + + return [ + h, + s, + v, + ]; +} + +function addSaturationToRGB(color, offset) { + var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255); + hsv[1] += offset; + if (hsv[1] > 1) { + hsv[1] = 1; + } else if (hsv[1] <= 0) { + hsv[1] = 0; + } + return HSVtoRGB(hsv[0], hsv[1], hsv[2]); +} + +function addBrightnessToRGB(color, offset) { + var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255); + hsv[2] += offset; + if (hsv[2] > 1) { + hsv[2] = 1; + } else if (hsv[2] < 0) { + hsv[2] = 0; + } + return HSVtoRGB(hsv[0], hsv[1], hsv[2]); +} + +function addHueToRGB(color, offset) { + var hsv = RGBtoHSV(color[0] * 255, color[1] * 255, color[2] * 255); + hsv[0] += offset / 360; + if (hsv[0] > 1) { + hsv[0] -= 1; + } else if (hsv[0] < 0) { + hsv[0] += 1; + } + return HSVtoRGB(hsv[0], hsv[1], hsv[2]); +} + +const rgbToHex = (function () { + var colorMap = []; + var i; + var hex; + for (i = 0; i < 256; i += 1) { + hex = i.toString(16); + colorMap[i] = hex.length === 1 ? '0' + hex : hex; + } + + return function (r, g, b) { + if (r < 0) { + r = 0; + } + if (g < 0) { + g = 0; + } + if (b < 0) { + b = 0; + } + return '#' + colorMap[r] + colorMap[g] + colorMap[b]; + }; +}()); + +const setSubframeEnabled = (flag) => { subframeEnabled = !!flag; }; +const getSubframeEnabled = () => subframeEnabled; +const setExpressionsPlugin = (value) => { expressionsPlugin = value; }; +const getExpressionsPlugin = () => expressionsPlugin; +const setExpressionInterfaces = (value) => { expressionsInterfaces = value; }; +const getExpressionInterfaces = () => expressionsInterfaces; +const setDefaultCurveSegments = (value) => { defaultCurveSegments = value; }; +const getDefaultCurveSegments = () => defaultCurveSegments; +const setIdPrefix = (value) => { idPrefix = value; }; +const getIdPrefix = () => idPrefix; + +export { + setSubframeEnabled, + getSubframeEnabled, + setExpressionsPlugin, + getExpressionsPlugin, + setExpressionInterfaces, + getExpressionInterfaces, + setDefaultCurveSegments, + getDefaultCurveSegments, + isSafari, + bmPow, + bmSqrt, + bmFloor, + bmMax, + bmMin, + degToRads, + roundCorner, + styleDiv, + bmRnd, + roundValues, + BMEnterFrameEvent, + BMCompleteEvent, + BMCompleteLoopEvent, + BMSegmentStartEvent, + BMDestroyEvent, + BMRenderFrameErrorEvent, + BMConfigErrorEvent, + BMAnimationConfigErrorEvent, + createElementID, + addSaturationToRGB, + addBrightnessToRGB, + addHueToRGB, + rgbToHex, + setIdPrefix, + getIdPrefix, + BMMath, + ProjectInterface, +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/CompInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/CompInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..179e26ea47d7c588f8f215471f2a7c5a4380a27a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/CompInterface.js @@ -0,0 +1,28 @@ +const CompExpressionInterface = (function () { + return function (comp) { + function _thisLayerFunction(name) { + var i = 0; + var len = comp.layers.length; + while (i < len) { + if (comp.layers[i].nm === name || comp.layers[i].ind === name) { + return comp.elements[i].layerInterface; + } + i += 1; + } + return null; + // return {active:false}; + } + Object.defineProperty(_thisLayerFunction, '_name', { value: comp.data.nm }); + _thisLayerFunction.layer = _thisLayerFunction; + _thisLayerFunction.pixelAspect = 1; + _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h; + _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w; + _thisLayerFunction.pixelAspect = 1; + _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate; + _thisLayerFunction.displayStartTime = 0; + _thisLayerFunction.numLayers = comp.layers.length; + return _thisLayerFunction; + }; +}()); + +export default CompExpressionInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/EffectInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/EffectInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..94e13b98a83099bd51fa5452fb4b7e16797679e7 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/EffectInterface.js @@ -0,0 +1,111 @@ +import ExpressionPropertyInterface from './ExpressionValueFactory'; +import propertyGroupFactory from './PropertyGroupFactory'; +import PropertyInterface from './PropertyInterface'; + +const EffectsExpressionInterface = (function () { + var ob = { + createEffectsInterface: createEffectsInterface, + }; + + function createEffectsInterface(elem, propertyGroup) { + if (elem.effectsManager) { + var effectElements = []; + var effectsData = elem.data.ef; + var i; + var len = elem.effectsManager.effectElements.length; + for (i = 0; i < len; i += 1) { + effectElements.push(createGroupInterface(effectsData[i], elem.effectsManager.effectElements[i], propertyGroup, elem)); + } + + var effects = elem.data.ef || []; + var groupInterface = function (name) { + i = 0; + len = effects.length; + while (i < len) { + if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) { + return effectElements[i]; + } + i += 1; + } + return null; + }; + Object.defineProperty(groupInterface, 'numProperties', { + get: function () { + return effects.length; + }, + }); + return groupInterface; + } + return null; + } + + function createGroupInterface(data, elements, propertyGroup, elem) { + function groupInterface(name) { + var effects = data.ef; + var i = 0; + var len = effects.length; + while (i < len) { + if (name === effects[i].nm || name === effects[i].mn || name === effects[i].ix) { + if (effects[i].ty === 5) { + return effectElements[i]; + } + return effectElements[i](); + } + i += 1; + } + throw new Error(); + } + var _propertyGroup = propertyGroupFactory(groupInterface, propertyGroup); + + var effectElements = []; + var i; + var len = data.ef.length; + for (i = 0; i < len; i += 1) { + if (data.ef[i].ty === 5) { + effectElements.push(createGroupInterface(data.ef[i], elements.effectElements[i], elements.effectElements[i].propertyGroup, elem)); + } else { + effectElements.push(createValueInterface(elements.effectElements[i], data.ef[i].ty, elem, _propertyGroup)); + } + } + + if (data.mn === 'ADBE Color Control') { + Object.defineProperty(groupInterface, 'color', { + get: function () { + return effectElements[0](); + }, + }); + } + Object.defineProperties(groupInterface, { + numProperties: { + get: function () { + return data.np; + }, + }, + _name: { value: data.nm }, + propertyGroup: { value: _propertyGroup }, + }); + groupInterface.enabled = data.en !== 0; + groupInterface.active = groupInterface.enabled; + return groupInterface; + } + + function createValueInterface(element, type, elem, propertyGroup) { + var expressionProperty = ExpressionPropertyInterface(element.p); + function interfaceFunction() { + if (type === 10) { + return elem.comp.compInterface(element.p.v); + } + return expressionProperty(); + } + + if (element.p.setGroupProperty) { + element.p.setGroupProperty(PropertyInterface('', propertyGroup)); + } + + return interfaceFunction; + } + + return ob; +}()); + +export default EffectsExpressionInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionManager.js new file mode 100644 index 0000000000000000000000000000000000000000..65c698ae059ba414cee188e0920f00f474ec34ab --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionManager.js @@ -0,0 +1,743 @@ +/* eslint-disable camelcase */ + +import { + degToRads, + BMMath, +} from '../common'; +import { + createTypedArray, +} from '../helpers/arrays'; +import BezierFactory from '../../3rd_party/BezierEaser'; +import shapePool from '../pooling/shape_pool'; +import seedrandom from '../../3rd_party/seedrandom'; +import propTypes from '../helpers/propTypes'; + +const ExpressionManager = (function () { + 'use strict'; + + var ob = {}; + var Math = BMMath; + var window = null; + var document = null; + var XMLHttpRequest = null; + var fetch = null; + var frames = null; + seedrandom(BMMath); + + function $bm_isInstanceOfArray(arr) { + return arr.constructor === Array || arr.constructor === Float32Array; + } + + function isNumerable(tOfV, v) { + return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number; + } + + function $bm_neg(a) { + var tOfA = typeof a; + if (tOfA === 'number' || tOfA === 'boolean' || a instanceof Number) { + return -a; + } + if ($bm_isInstanceOfArray(a)) { + var i; + var lenA = a.length; + var retArr = []; + for (i = 0; i < lenA; i += 1) { + retArr[i] = -a[i]; + } + return retArr; + } + if (a.propType) { + return a.v; + } + return -a; + } + + var easeInBez = BezierFactory.getBezierEasing(0.333, 0, 0.833, 0.833, 'easeIn').get; + var easeOutBez = BezierFactory.getBezierEasing(0.167, 0.167, 0.667, 1, 'easeOut').get; + var easeInOutBez = BezierFactory.getBezierEasing(0.33, 0, 0.667, 1, 'easeInOut').get; + + function sum(a, b) { + var tOfA = typeof a; + var tOfB = typeof b; + if (tOfA === 'string' || tOfB === 'string') { + return a + b; + } + if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { + return a + b; + } + if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { + a = a.slice(0); + a[0] += b; + return a; + } + if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { + b = b.slice(0); + b[0] = a + b[0]; + return b; + } + if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) { + var i = 0; + var lenA = a.length; + var lenB = b.length; + var retArr = []; + while (i < lenA || i < lenB) { + if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) { + retArr[i] = a[i] + b[i]; + } else { + retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i]; + } + i += 1; + } + return retArr; + } + return 0; + } + var add = sum; + + function sub(a, b) { + var tOfA = typeof a; + var tOfB = typeof b; + if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { + if (tOfA === 'string') { + a = parseInt(a, 10); + } + if (tOfB === 'string') { + b = parseInt(b, 10); + } + return a - b; + } + if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { + a = a.slice(0); + a[0] -= b; + return a; + } + if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { + b = b.slice(0); + b[0] = a - b[0]; + return b; + } + if ($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)) { + var i = 0; + var lenA = a.length; + var lenB = b.length; + var retArr = []; + while (i < lenA || i < lenB) { + if ((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)) { + retArr[i] = a[i] - b[i]; + } else { + retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i]; + } + i += 1; + } + return retArr; + } + return 0; + } + + function mul(a, b) { + var tOfA = typeof a; + var tOfB = typeof b; + var arr; + if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { + return a * b; + } + + var i; + var len; + if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { + len = a.length; + arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = a[i] * b; + } + return arr; + } + if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { + len = b.length; + arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = a * b[i]; + } + return arr; + } + return 0; + } + + function div(a, b) { + var tOfA = typeof a; + var tOfB = typeof b; + var arr; + if (isNumerable(tOfA, a) && isNumerable(tOfB, b)) { + return a / b; + } + var i; + var len; + if ($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)) { + len = a.length; + arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = a[i] / b; + } + return arr; + } + if (isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)) { + len = b.length; + arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = a / b[i]; + } + return arr; + } + return 0; + } + function mod(a, b) { + if (typeof a === 'string') { + a = parseInt(a, 10); + } + if (typeof b === 'string') { + b = parseInt(b, 10); + } + return a % b; + } + var $bm_sum = sum; + var $bm_sub = sub; + var $bm_mul = mul; + var $bm_div = div; + var $bm_mod = mod; + + function clamp(num, min, max) { + if (min > max) { + var mm = max; + max = min; + min = mm; + } + return Math.min(Math.max(num, min), max); + } + + function radiansToDegrees(val) { + return val / degToRads; + } + var radians_to_degrees = radiansToDegrees; + + function degreesToRadians(val) { + return val * degToRads; + } + var degrees_to_radians = radiansToDegrees; + + var helperLengthArray = [0, 0, 0, 0, 0, 0]; + + function length(arr1, arr2) { + if (typeof arr1 === 'number' || arr1 instanceof Number) { + arr2 = arr2 || 0; + return Math.abs(arr1 - arr2); + } + if (!arr2) { + arr2 = helperLengthArray; + } + var i; + var len = Math.min(arr1.length, arr2.length); + var addedLength = 0; + for (i = 0; i < len; i += 1) { + addedLength += Math.pow(arr2[i] - arr1[i], 2); + } + return Math.sqrt(addedLength); + } + + function normalize(vec) { + return div(vec, length(vec)); + } + + function rgbToHsl(val) { + var r = val[0]; var g = val[1]; var b = val[2]; + var max = Math.max(r, g, b); + var min = Math.min(r, g, b); + var h; + var s; + var l = (max + min) / 2; + + if (max === min) { + h = 0; // achromatic + s = 0; // achromatic + } else { + var d = max - min; + s = l > 0.5 ? d / (2 - max - min) : d / (max + min); + switch (max) { + case r: h = (g - b) / d + (g < b ? 6 : 0); break; + case g: h = (b - r) / d + 2; break; + case b: h = (r - g) / d + 4; break; + default: break; + } + h /= 6; + } + + return [h, s, l, val[3]]; + } + + function hue2rgb(p, q, t) { + if (t < 0) t += 1; + if (t > 1) t -= 1; + if (t < 1 / 6) return p + (q - p) * 6 * t; + if (t < 1 / 2) return q; + if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6; + return p; + } + + function hslToRgb(val) { + var h = val[0]; + var s = val[1]; + var l = val[2]; + + var r; + var g; + var b; + + if (s === 0) { + r = l; // achromatic + b = l; // achromatic + g = l; // achromatic + } else { + var q = l < 0.5 ? l * (1 + s) : l + s - l * s; + var p = 2 * l - q; + r = hue2rgb(p, q, h + 1 / 3); + g = hue2rgb(p, q, h); + b = hue2rgb(p, q, h - 1 / 3); + } + + return [r, g, b, val[3]]; + } + + function linear(t, tMin, tMax, value1, value2) { + if (value1 === undefined || value2 === undefined) { + value1 = tMin; + value2 = tMax; + tMin = 0; + tMax = 1; + } + if (tMax < tMin) { + var _tMin = tMax; + tMax = tMin; + tMin = _tMin; + } + if (t <= tMin) { + return value1; + } if (t >= tMax) { + return value2; + } + var perc = tMax === tMin ? 0 : (t - tMin) / (tMax - tMin); + if (!value1.length) { + return value1 + (value2 - value1) * perc; + } + var i; + var len = value1.length; + var arr = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arr[i] = value1[i] + (value2[i] - value1[i]) * perc; + } + return arr; + } + function random(min, max) { + if (max === undefined) { + if (min === undefined) { + min = 0; + max = 1; + } else { + max = min; + min = undefined; + } + } + if (max.length) { + var i; + var len = max.length; + if (!min) { + min = createTypedArray('float32', len); + } + var arr = createTypedArray('float32', len); + var rnd = BMMath.random(); + for (i = 0; i < len; i += 1) { + arr[i] = min[i] + rnd * (max[i] - min[i]); + } + return arr; + } + if (min === undefined) { + min = 0; + } + var rndm = BMMath.random(); + return min + rndm * (max - min); + } + + function createPath(points, inTangents, outTangents, closed) { + var i; + var len = points.length; + var path = shapePool.newElement(); + path.setPathData(!!closed, len); + var arrPlaceholder = [0, 0]; + var inVertexPoint; + var outVertexPoint; + for (i = 0; i < len; i += 1) { + inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder; + outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder; + path.setTripleAt(points[i][0], points[i][1], outVertexPoint[0] + points[i][0], outVertexPoint[1] + points[i][1], inVertexPoint[0] + points[i][0], inVertexPoint[1] + points[i][1], i, true); + } + return path; + } + + function initiateExpression(elem, data, property) { + // Bail out if we don't want expressions + function noOp(_value) { + return _value; + } + if (!elem.globalData.renderConfig.runExpressions) { + return noOp; + } + + var val = data.x; + var needsVelocity = /velocity(?![\w\d])/.test(val); + var _needsRandom = val.indexOf('random') !== -1; + var elemType = elem.data.ty; + var transform; + var $bm_transform; + var content; + var effect; + var thisProperty = property; + thisProperty.valueAtTime = thisProperty.getValueAtTime; + Object.defineProperty(thisProperty, 'value', { + get: function () { + return thisProperty.v; + }, + }); + elem.comp.frameDuration = 1 / elem.comp.globalData.frameRate; + elem.comp.displayStartTime = 0; + var inPoint = elem.data.ip / elem.comp.globalData.frameRate; + var outPoint = elem.data.op / elem.comp.globalData.frameRate; + var width = elem.data.sw ? elem.data.sw : 0; + var height = elem.data.sh ? elem.data.sh : 0; + var name = elem.data.nm; + var loopIn; + var loop_in; + var loopOut; + var loop_out; + var smooth; + var toWorld; + var fromWorld; + var fromComp; + var toComp; + var fromCompToSurface; + var position; + var rotation; + var anchorPoint; + var scale; + var thisLayer; + var thisComp; + var mask; + var valueAtTime; + var velocityAtTime; + + var scoped_bm_rt; + // val = val.replace(/(\\?"|')((http)(s)?(:\/))?\/.*?(\\?"|')/g, "\"\""); // deter potential network calls + //eval()用法违反编码规范,使用JSON.parse()方法来替换 + var expressions = '[function _expression_function(){' + val + ';scoped_bm_rt=$bm_rt}]'; + var datas = JSON.parse(expressions); + var expression_function = datas[0]; + var numKeys = property.kf ? data.k.length : 0; + + var active = !this.data || this.data.hd !== true; + + var wiggle = function wiggle(freq, amp) { + var iWiggle; + var j; + var lenWiggle = this.pv.length ? this.pv.length : 1; + var addedAmps = createTypedArray('float32', lenWiggle); + freq = 5; + var iterations = Math.floor(time * freq); + iWiggle = 0; + j = 0; + while (iWiggle < iterations) { + for (j = 0; j < lenWiggle; j += 1) { + addedAmps[j] += -amp + amp * 2 * BMMath.random(); + } + iWiggle += 1; + } + var periods = time * freq; + var perc = periods - Math.floor(periods); + var arr = createTypedArray('float32', lenWiggle); + if (lenWiggle > 1) { + for (j = 0; j < lenWiggle; j += 1) { + arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp * 2 * BMMath.random()) * perc; + } + return arr; + } + return this.pv + addedAmps[0] + (-amp + amp * 2 * BMMath.random()) * perc; + }.bind(this); + + if (thisProperty.loopIn) { + loopIn = thisProperty.loopIn.bind(thisProperty); + loop_in = loopIn; + } + + if (thisProperty.loopOut) { + loopOut = thisProperty.loopOut.bind(thisProperty); + loop_out = loopOut; + } + + if (thisProperty.smooth) { + smooth = thisProperty.smooth.bind(thisProperty); + } + + function loopInDuration(type, duration) { + return loopIn(type, duration, true); + } + + function loopOutDuration(type, duration) { + return loopOut(type, duration, true); + } + + if (this.getValueAtTime) { + valueAtTime = this.getValueAtTime.bind(this); + } + + if (this.getVelocityAtTime) { + velocityAtTime = this.getVelocityAtTime.bind(this); + } + + var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface); + + function lookAt(elem1, elem2) { + var fVec = [elem2[0] - elem1[0], elem2[1] - elem1[1], elem2[2] - elem1[2]]; + var pitch = Math.atan2(fVec[0], Math.sqrt(fVec[1] * fVec[1] + fVec[2] * fVec[2])) / degToRads; + var yaw = -Math.atan2(fVec[1], fVec[2]) / degToRads; + return [yaw, pitch, 0]; + } + + function easeOut(t, tMin, tMax, val1, val2) { + return applyEase(easeOutBez, t, tMin, tMax, val1, val2); + } + + function easeIn(t, tMin, tMax, val1, val2) { + return applyEase(easeInBez, t, tMin, tMax, val1, val2); + } + + function ease(t, tMin, tMax, val1, val2) { + return applyEase(easeInOutBez, t, tMin, tMax, val1, val2); + } + + function applyEase(fn, t, tMin, tMax, val1, val2) { + if (val1 === undefined) { + val1 = tMin; + val2 = tMax; + } else { + t = (t - tMin) / (tMax - tMin); + } + if (t > 1) { + t = 1; + } else if (t < 0) { + t = 0; + } + var mult = fn(t); + if ($bm_isInstanceOfArray(val1)) { + var iKey; + var lenKey = val1.length; + var arr = createTypedArray('float32', lenKey); + for (iKey = 0; iKey < lenKey; iKey += 1) { + arr[iKey] = (val2[iKey] - val1[iKey]) * mult + val1[iKey]; + } + return arr; + } + return (val2 - val1) * mult + val1; + } + + function nearestKey(time) { + var iKey; + var lenKey = data.k.length; + var index; + var keyTime; + if (!data.k.length || typeof (data.k[0]) === 'number') { + index = 0; + keyTime = 0; + } else { + index = -1; + time *= elem.comp.globalData.frameRate; + if (time < data.k[0].t) { + index = 1; + keyTime = data.k[0].t; + } else { + for (iKey = 0; iKey < lenKey - 1; iKey += 1) { + if (time === data.k[iKey].t) { + index = iKey + 1; + keyTime = data.k[iKey].t; + break; + } else if (time > data.k[iKey].t && time < data.k[iKey + 1].t) { + if (time - data.k[iKey].t > data.k[iKey + 1].t - time) { + index = iKey + 2; + keyTime = data.k[iKey + 1].t; + } else { + index = iKey + 1; + keyTime = data.k[iKey].t; + } + break; + } + } + if (index === -1) { + index = iKey + 1; + keyTime = data.k[iKey].t; + } + } + } + var obKey = {}; + obKey.index = index; + obKey.time = keyTime / elem.comp.globalData.frameRate; + return obKey; + } + + function key(ind) { + var obKey; + var iKey; + var lenKey; + if (!data.k.length || typeof (data.k[0]) === 'number') { + throw new Error('The property has no keyframe at index ' + ind); + } + ind -= 1; + obKey = { + time: data.k[ind].t / elem.comp.globalData.frameRate, + value: [], + }; + var arr = Object.prototype.hasOwnProperty.call(data.k[ind], 's') ? data.k[ind].s : data.k[ind - 1].e; + + lenKey = arr.length; + for (iKey = 0; iKey < lenKey; iKey += 1) { + obKey[iKey] = arr[iKey]; + obKey.value[iKey] = arr[iKey]; + } + return obKey; + } + + function framesToTime(fr, fps) { + if (!fps) { + fps = elem.comp.globalData.frameRate; + } + return fr / fps; + } + + function timeToFrames(t, fps) { + if (!t && t !== 0) { + t = time; + } + if (!fps) { + fps = elem.comp.globalData.frameRate; + } + return t * fps; + } + + function seedRandom(seed) { + BMMath.seedrandom(randSeed + seed); + } + + function sourceRectAtTime() { + return elem.sourceRectAtTime(); + } + + function substring(init, end) { + if (typeof value === 'string') { + if (end === undefined) { + return value.substring(init); + } + return value.substring(init, end); + } + return ''; + } + + function substr(init, end) { + if (typeof value === 'string') { + if (end === undefined) { + return value.substr(init); + } + return value.substr(init, end); + } + return ''; + } + + function posterizeTime(framesPerSecond) { + time = framesPerSecond === 0 ? 0 : Math.floor(time * framesPerSecond) / framesPerSecond; + value = valueAtTime(time); + } + + var time; + var velocity; + var value; + var text; + var textIndex; + var textTotal; + var selectorValue; + var index = elem.data.ind; + var hasParent = !!(elem.hierarchy && elem.hierarchy.length); + var parent; + var randSeed = Math.floor(Math.random() * 1000000); + var globalData = elem.globalData; + + function executeExpression(_value) { + // globalData.pushExpression(); + value = _value; + if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') { + return value; + } + if (this.propType === 'textSelector') { + textIndex = this.textIndex; + textTotal = this.textTotal; + selectorValue = this.selectorValue; + } + if (!thisLayer) { + text = elem.layerInterface.text; + thisLayer = elem.layerInterface; + thisComp = elem.comp.compInterface; + toWorld = thisLayer.toWorld.bind(thisLayer); + fromWorld = thisLayer.fromWorld.bind(thisLayer); + fromComp = thisLayer.fromComp.bind(thisLayer); + toComp = thisLayer.toComp.bind(thisLayer); + mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null; + fromCompToSurface = fromComp; + } + if (!transform) { + transform = elem.layerInterface('ADBE Transform Group'); + $bm_transform = transform; + if (transform) { + anchorPoint = transform.anchorPoint; + } + } + + if (elemType === 4 && !content) { + content = thisLayer('ADBE Root Vectors Group'); + } + if (!effect) { + effect = thisLayer(4); + } + hasParent = !!(elem.hierarchy && elem.hierarchy.length); + if (hasParent && !parent) { + parent = elem.hierarchy[0].layerInterface; + } + time = this.comp.renderedFrame / this.comp.globalData.frameRate; + if (_needsRandom) { + seedRandom(randSeed + time); + } + if (needsVelocity) { + velocity = velocityAtTime(time); + } + expression_function(); + this.frameExpressionId = elem.globalData.frameId; + + // TODO: Check if it's possible to return on ShapeInterface the .v value + // Changed this to a ternary operation because Rollup failed compiling it correctly + scoped_bm_rt = scoped_bm_rt.propType === propTypes.SHAPE + ? scoped_bm_rt.v + : scoped_bm_rt; + return scoped_bm_rt; + } + // Bundlers will see these as dead code and unless we reference them + executeExpression.__preventDeadCodeRemoval = [$bm_transform, anchorPoint, time, velocity, inPoint, outPoint, width, height, name, loop_in, loop_out, smooth, toComp, fromCompToSurface, toWorld, fromWorld, mask, position, rotation, scale, thisComp, numKeys, active, wiggle, loopInDuration, loopOutDuration, comp, lookAt, easeOut, easeIn, ease, nearestKey, key, text, textIndex, textTotal, selectorValue, framesToTime, timeToFrames, sourceRectAtTime, substring, substr, posterizeTime, index, globalData]; + return executeExpression; + } + + ob.initiateExpression = initiateExpression; + ob.__preventDeadCodeRemoval = [window, document, XMLHttpRequest, fetch, frames, $bm_neg, add, $bm_sum, $bm_sub, $bm_mul, $bm_div, $bm_mod, clamp, radians_to_degrees, degreesToRadians, degrees_to_radians, normalize, rgbToHsl, hslToRgb, linear, random, createPath]; + return ob; +}()); + +export default ExpressionManager; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionPropertyDecorator.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionPropertyDecorator.js new file mode 100644 index 0000000000000000000000000000000000000000..4c4ead3d22c81402944381d0013678f885070eec --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionPropertyDecorator.js @@ -0,0 +1,463 @@ +import { + extendPrototype, +} from '../functionExtensions'; +import { + createSizedArray, + createTypedArray, +} from '../helpers/arrays'; +import ShapePropertyFactory from '../shapes/ShapeProperty'; +import PropertyFactory from '../PropertyFactory'; +import shapePool from '../pooling/shape_pool'; +import { + initialDefaultFrame, +} from '../../main'; +import bez from '../bez'; +import Matrix from '../../3rd_party/transformation-matrix'; +import TransformPropertyFactory from '../TransformProperty'; +import expressionHelpers from './expressionHelpers'; +import ExpressionManager from './ExpressionManager'; + +function addPropertyDecorator() { + function loopOut(type, duration, durationFlag) { + if (!this.k || !this.keyframes) { + return this.pv; + } + type = type ? type.toLowerCase() : ''; + var currentFrame = this.comp.renderedFrame; + var keyframes = this.keyframes; + var lastKeyFrame = keyframes[keyframes.length - 1].t; + if (currentFrame <= lastKeyFrame) { + return this.pv; + } + var cycleDuration; + var firstKeyFrame; + if (!durationFlag) { + if (!duration || duration > keyframes.length - 1) { + duration = keyframes.length - 1; + } + firstKeyFrame = keyframes[keyframes.length - 1 - duration].t; + cycleDuration = lastKeyFrame - firstKeyFrame; + } else { + if (!duration) { + cycleDuration = Math.max(0, lastKeyFrame - this.elem.data.ip); + } else { + cycleDuration = Math.abs(lastKeyFrame - this.elem.comp.globalData.frameRate * duration); + } + firstKeyFrame = lastKeyFrame - cycleDuration; + } + var i; + var len; + var ret; + if (type === 'pingpong') { + var iterations = Math.floor((currentFrame - firstKeyFrame) / cycleDuration); + if (iterations % 2 !== 0) { + return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line + } + } else if (type === 'offset') { + var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0); + var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0); + var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame) / this.comp.globalData.frameRate, 0); // eslint-disable-line + var repeats = Math.floor((currentFrame - firstKeyFrame) / cycleDuration); + if (this.pv.length) { + ret = new Array(initV.length); + len = ret.length; + for (i = 0; i < len; i += 1) { + ret[i] = (endV[i] - initV[i]) * repeats + current[i]; + } + return ret; + } + return (endV - initV) * repeats + current; + } else if (type === 'continue') { + var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0); + var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0); + if (this.pv.length) { + ret = new Array(lastValue.length); + len = ret.length; + for (i = 0; i < len; i += 1) { + ret[i] = lastValue[i] + (lastValue[i] - nextLastValue[i]) * ((currentFrame - lastKeyFrame) / this.comp.globalData.frameRate) / 0.0005; // eslint-disable-line + } + return ret; + } + return lastValue + (lastValue - nextLastValue) * (((currentFrame - lastKeyFrame)) / 0.001); + } + return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line + + } + + function loopIn(type, duration, durationFlag) { + if (!this.k) { + return this.pv; + } + type = type ? type.toLowerCase() : ''; + var currentFrame = this.comp.renderedFrame; + var keyframes = this.keyframes; + var firstKeyFrame = keyframes[0].t; + if (currentFrame >= firstKeyFrame) { + return this.pv; + } + var cycleDuration; + var lastKeyFrame; + if (!durationFlag) { + if (!duration || duration > keyframes.length - 1) { + duration = keyframes.length - 1; + } + lastKeyFrame = keyframes[duration].t; + cycleDuration = lastKeyFrame - firstKeyFrame; + } else { + if (!duration) { + cycleDuration = Math.max(0, this.elem.data.op - firstKeyFrame); + } else { + cycleDuration = Math.abs(this.elem.comp.globalData.frameRate * duration); + } + lastKeyFrame = firstKeyFrame + cycleDuration; + } + var i; + var len; + var ret; + if (type === 'pingpong') { + var iterations = Math.floor((firstKeyFrame - currentFrame) / cycleDuration); + if (iterations % 2 === 0) { + return this.getValueAtTime((((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame)) / this.comp.globalData.frameRate, 0); // eslint-disable-line + } + } else if (type === 'offset') { + var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0); + var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0); + var current = this.getValueAtTime((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration) + firstKeyFrame) / this.comp.globalData.frameRate, 0); + var repeats = Math.floor((firstKeyFrame - currentFrame) / cycleDuration) + 1; + if (this.pv.length) { + ret = new Array(initV.length); + len = ret.length; + for (i = 0; i < len; i += 1) { + ret[i] = current[i] - (endV[i] - initV[i]) * repeats; + } + return ret; + } + return current - (endV - initV) * repeats; + } else if (type === 'continue') { + var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0); + var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0); + if (this.pv.length) { + ret = new Array(firstValue.length); + len = ret.length; + for (i = 0; i < len; i += 1) { + ret[i] = firstValue[i] + ((firstValue[i] - nextFirstValue[i]) * (firstKeyFrame - currentFrame)) / 0.001; + } + return ret; + } + return firstValue + ((firstValue - nextFirstValue) * (firstKeyFrame - currentFrame)) / 0.001; + } + return this.getValueAtTime(((cycleDuration - ((firstKeyFrame - currentFrame) % cycleDuration + firstKeyFrame))) / this.comp.globalData.frameRate, 0); // eslint-disable-line + + } + + function smooth(width, samples) { + if (!this.k) { + return this.pv; + } + width = (width || 0.4) * 0.5; + samples = Math.floor(samples || 5); + if (samples <= 1) { + return this.pv; + } + var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate; + var initFrame = currentTime - width; + var endFrame = currentTime + width; + var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1; + var i = 0; + var j = 0; + var value; + if (this.pv.length) { + value = createTypedArray('float32', this.pv.length); + } else { + value = 0; + } + var sampleValue; + while (i < samples) { + sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency); + if (this.pv.length) { + for (j = 0; j < this.pv.length; j += 1) { + value[j] += sampleValue[j]; + } + } else { + value += sampleValue; + } + i += 1; + } + if (this.pv.length) { + for (j = 0; j < this.pv.length; j += 1) { + value[j] /= samples; + } + } else { + value /= samples; + } + return value; + } + + function getTransformValueAtTime(time) { + if (!this._transformCachingAtTime) { + this._transformCachingAtTime = { + v: new Matrix(), + }; + } + /// / + var matrix = this._transformCachingAtTime.v; + matrix.cloneFromProps(this.pre.props); + if (this.appliedTransformations < 1) { + var anchor = this.a.getValueAtTime(time); + matrix.translate( + -anchor[0] * this.a.mult, + -anchor[1] * this.a.mult, + anchor[2] * this.a.mult + ); + } + if (this.appliedTransformations < 2) { + var scale = this.s.getValueAtTime(time); + matrix.scale( + scale[0] * this.s.mult, + scale[1] * this.s.mult, + scale[2] * this.s.mult + ); + } + if (this.sk && this.appliedTransformations < 3) { + var skew = this.sk.getValueAtTime(time); + var skewAxis = this.sa.getValueAtTime(time); + matrix.skewFromAxis(-skew * this.sk.mult, skewAxis * this.sa.mult); + } + if (this.r && this.appliedTransformations < 4) { + var rotation = this.r.getValueAtTime(time); + matrix.rotate(-rotation * this.r.mult); + } else if (!this.r && this.appliedTransformations < 4) { + var rotationZ = this.rz.getValueAtTime(time); + var rotationY = this.ry.getValueAtTime(time); + var rotationX = this.rx.getValueAtTime(time); + var orientation = this.or.getValueAtTime(time); + matrix.rotateZ(-rotationZ * this.rz.mult) + .rotateY(rotationY * this.ry.mult) + .rotateX(rotationX * this.rx.mult) + .rotateZ(-orientation[2] * this.or.mult) + .rotateY(orientation[1] * this.or.mult) + .rotateX(orientation[0] * this.or.mult); + } + if (this.data.p && this.data.p.s) { + var positionX = this.px.getValueAtTime(time); + var positionY = this.py.getValueAtTime(time); + if (this.data.p.z) { + var positionZ = this.pz.getValueAtTime(time); + matrix.translate( + positionX * this.px.mult, + positionY * this.py.mult, + -positionZ * this.pz.mult + ); + } else { + matrix.translate(positionX * this.px.mult, positionY * this.py.mult, 0); + } + } else { + var position = this.p.getValueAtTime(time); + matrix.translate( + position[0] * this.p.mult, + position[1] * this.p.mult, + -position[2] * this.p.mult + ); + } + return matrix; + /// / + } + + function getTransformStaticValueAtTime() { + return this.v.clone(new Matrix()); + } + + var getTransformProperty = TransformPropertyFactory.getTransformProperty; + TransformPropertyFactory.getTransformProperty = function (elem, data, container) { + var prop = getTransformProperty(elem, data, container); + if (prop.dynamicProperties.length) { + prop.getValueAtTime = getTransformValueAtTime.bind(prop); + } else { + prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop); + } + prop.setGroupProperty = expressionHelpers.setGroupProperty; + return prop; + }; + + var propertyGetProp = PropertyFactory.getProp; + PropertyFactory.getProp = function (elem, data, type, mult, container) { + var prop = propertyGetProp(elem, data, type, mult, container); + // prop.getVelocityAtTime = getVelocityAtTime; + // prop.loopOut = loopOut; + // prop.loopIn = loopIn; + if (prop.kf) { + prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop); + } else { + prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop); + } + prop.setGroupProperty = expressionHelpers.setGroupProperty; + prop.loopOut = loopOut; + prop.loopIn = loopIn; + prop.smooth = smooth; + prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop); + prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop); + prop.numKeys = data.a === 1 ? data.k.length : 0; + prop.propertyIndex = data.ix; + var value = 0; + if (type !== 0) { + value = createTypedArray('float32', data.a === 1 ? data.k[0].s.length : data.k.length); + } + prop._cachingAtTime = { + lastFrame: initialDefaultFrame, + lastIndex: 0, + value: value, + }; + expressionHelpers.searchExpressions(elem, data, prop); + if (prop.k) { + container.addDynamicProperty(prop); + } + + return prop; + }; + + function getShapeValueAtTime(frameNum) { + // For now this caching object is created only when needed instead of creating it when the shape is initialized. + if (!this._cachingAtTime) { + this._cachingAtTime = { + shapeValue: shapePool.clone(this.pv), + lastIndex: 0, + lastTime: initialDefaultFrame, + }; + } + + frameNum *= this.elem.globalData.frameRate; + frameNum -= this.offsetTime; + if (frameNum !== this._cachingAtTime.lastTime) { + this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0; + this._cachingAtTime.lastTime = frameNum; + this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime); + } + return this._cachingAtTime.shapeValue; + } + + var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction(); + var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction(); + + function ShapeExpressions() {} + ShapeExpressions.prototype = { + vertices: function (prop, time) { + if (this.k) { + this.getValue(); + } + var shapePath = this.v; + if (time !== undefined) { + shapePath = this.getValueAtTime(time, 0); + } + var i; + var len = shapePath._length; + var vertices = shapePath[prop]; + var points = shapePath.v; + var arr = createSizedArray(len); + for (i = 0; i < len; i += 1) { + if (prop === 'i' || prop === 'o') { + arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]]; + } else { + arr[i] = [vertices[i][0], vertices[i][1]]; + } + } + return arr; + }, + points: function (time) { + return this.vertices('v', time); + }, + inTangents: function (time) { + return this.vertices('i', time); + }, + outTangents: function (time) { + return this.vertices('o', time); + }, + isClosed: function () { + return this.v.c; + }, + pointOnPath: function (perc, time) { + var shapePath = this.v; + if (time !== undefined) { + shapePath = this.getValueAtTime(time, 0); + } + if (!this._segmentsLength) { + this._segmentsLength = bez.getSegmentsLength(shapePath); + } + + var segmentsLength = this._segmentsLength; + var lengths = segmentsLength.lengths; + var lengthPos = segmentsLength.totalLength * perc; + var i = 0; + var len = lengths.length; + var accumulatedLength = 0; + var pt; + while (i < len) { + if (accumulatedLength + lengths[i].addedLength > lengthPos) { + var initIndex = i; + var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1; + var segmentPerc = (lengthPos - accumulatedLength) / lengths[i].addedLength; + pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]); + break; + } else { + accumulatedLength += lengths[i].addedLength; + } + i += 1; + } + if (!pt) { + pt = shapePath.c ? [shapePath.v[0][0], shapePath.v[0][1]] : [shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1]]; + } + return pt; + }, + vectorOnPath: function (perc, time, vectorType) { + // perc doesn't use triple equality because it can be a Number object as well as a primitive. + if (perc == 1) { // eslint-disable-line eqeqeq + perc = this.v.c; + } else if (perc == 0) { // eslint-disable-line eqeqeq + perc = 0.999; + } + var pt1 = this.pointOnPath(perc, time); + var pt2 = this.pointOnPath(perc + 0.001, time); + var xLength = pt2[0] - pt1[0]; + var yLength = pt2[1] - pt1[1]; + var magnitude = Math.sqrt(Math.pow(xLength, 2) + Math.pow(yLength, 2)); + if (magnitude === 0) { + return [0, 0]; + } + var unitVector = vectorType === 'tangent' ? [xLength / magnitude, yLength / magnitude] : [-yLength / magnitude, xLength / magnitude]; + return unitVector; + }, + tangentOnPath: function (perc, time) { + return this.vectorOnPath(perc, time, 'tangent'); + }, + normalOnPath: function (perc, time) { + return this.vectorOnPath(perc, time, 'normal'); + }, + setGroupProperty: expressionHelpers.setGroupProperty, + getValueAtTime: expressionHelpers.getStaticValueAtTime, + }; + extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction); + extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction); + KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime; + KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression; + + var propertyGetShapeProp = ShapePropertyFactory.getShapeProp; + ShapePropertyFactory.getShapeProp = function (elem, data, type, arr, trims) { + var prop = propertyGetShapeProp(elem, data, type, arr, trims); + prop.propertyIndex = data.ix; + prop.lock = false; + if (type === 3) { + expressionHelpers.searchExpressions(elem, data.pt, prop); + } else if (type === 4) { + expressionHelpers.searchExpressions(elem, data.ks, prop); + } + if (prop.k) { + elem.addDynamicProperty(prop); + } + return prop; + }; +} + +function initialize() { + addPropertyDecorator(); +} + +export default initialize; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionTextPropertyDecorator.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionTextPropertyDecorator.js new file mode 100644 index 0000000000000000000000000000000000000000..d777c63e655f47404a8b7ddd75aeb93ea5cd746c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionTextPropertyDecorator.js @@ -0,0 +1,40 @@ +import TextProperty from '../text/TextProperty'; +import ExpressionManager from './ExpressionManager'; + +function addDecorator() { + function searchExpressions() { + if (this.data.d.x) { + this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem, this.data.d, this); + this.addEffect(this.getExpressionValue.bind(this)); + return true; + } + return null; + } + + TextProperty.prototype.getExpressionValue = function (currentValue, text) { + var newValue = this.calculateExpression(text); + if (currentValue.t !== newValue) { + var newData = {}; + this.copyData(newData, currentValue); + newData.t = newValue.toString(); + newData.__complete = false; + return newData; + } + return currentValue; + }; + + TextProperty.prototype.searchProperty = function () { + var isKeyframed = this.searchKeyframes(); + var hasExpressions = this.searchExpressions(); + this.kf = isKeyframed || hasExpressions; + return this.kf; + }; + + TextProperty.prototype.searchExpressions = searchExpressions; +} + +function initialize() { + addDecorator(); +} + +export default initialize; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionValue.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionValue.js new file mode 100644 index 0000000000000000000000000000000000000000..7088e48c7a6fd55029d05df92ee10ffa4d7be0d1 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionValue.js @@ -0,0 +1,61 @@ +import { + createTypedArray, +} from '../helpers/arrays'; + +function ExpressionValue(elementProp, mult, type) { + mult = mult || 1; + var expressionValue; + + if (elementProp.k) { + elementProp.getValue(); + } + var i; + var len; + var arrValue; + var val; + if (type) { + if (type === 'color') { + len = 4; + expressionValue = createTypedArray('float32', len); + arrValue = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arrValue[i] = (i < 3) ? elementProp.v[i] * mult : 1; + expressionValue[i] = arrValue[i]; + } + expressionValue.value = arrValue; + } + } else if (elementProp.propType === 'unidimensional') { + val = elementProp.v * mult; + expressionValue = new Number(val); // eslint-disable-line no-new-wrappers + expressionValue.value = val; + } else { + len = elementProp.pv.length; + expressionValue = createTypedArray('float32', len); + arrValue = createTypedArray('float32', len); + for (i = 0; i < len; i += 1) { + arrValue[i] = elementProp.v[i] * mult; + expressionValue[i] = arrValue[i]; + } + expressionValue.value = arrValue; + } + + expressionValue.numKeys = elementProp.keyframes ? elementProp.keyframes.length : 0; + expressionValue.key = function (pos) { + if (!expressionValue.numKeys) { + return 0; + } + return elementProp.keyframes[pos - 1].t; + }; + expressionValue.valueAtTime = elementProp.getValueAtTime; + expressionValue.speedAtTime = elementProp.getSpeedAtTime; + expressionValue.velocityAtTime = elementProp.getVelocityAtTime; + expressionValue.propertyGroup = elementProp.propertyGroup; + Object.defineProperty(expressionValue, 'velocity', { + get: function () { + return elementProp.getVelocityAtTime(elementProp.comp.currentFrame); + }, + }); + return expressionValue; +} + +export default ExpressionValue; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionValueFactory.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionValueFactory.js new file mode 100644 index 0000000000000000000000000000000000000000..ea90b4e706f33b4f3e80ee972a5817050037ef6e --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ExpressionValueFactory.js @@ -0,0 +1,101 @@ +import { + createTypedArray, +} from '../helpers/arrays'; + +const ExpressionPropertyInterface = (function () { + var defaultUnidimensionalValue = { pv: 0, v: 0, mult: 1 }; + var defaultMultidimensionalValue = { pv: [0, 0, 0], v: [0, 0, 0], mult: 1 }; + + function completeProperty(expressionValue, property, type) { + Object.defineProperty(expressionValue, 'velocity', { + get: function () { + return property.getVelocityAtTime(property.comp.currentFrame); + }, + }); + expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0; + expressionValue.key = function (pos) { + if (!expressionValue.numKeys) { + return 0; + } + var value = ''; + if ('s' in property.keyframes[pos - 1]) { + value = property.keyframes[pos - 1].s; + } else if ('e' in property.keyframes[pos - 2]) { + value = property.keyframes[pos - 2].e; + } else { + value = property.keyframes[pos - 2].s; + } + var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value); // eslint-disable-line no-new-wrappers + valueProp.time = property.keyframes[pos - 1].t / property.elem.comp.globalData.frameRate; + valueProp.value = type === 'unidimensional' ? value[0] : value; + return valueProp; + }; + expressionValue.valueAtTime = property.getValueAtTime; + expressionValue.speedAtTime = property.getSpeedAtTime; + expressionValue.velocityAtTime = property.getVelocityAtTime; + expressionValue.propertyGroup = property.propertyGroup; + } + + function UnidimensionalPropertyInterface(property) { + if (!property || !('pv' in property)) { + property = defaultUnidimensionalValue; + } + var mult = 1 / property.mult; + var val = property.pv * mult; + var expressionValue = new Number(val); // eslint-disable-line no-new-wrappers + expressionValue.value = val; + completeProperty(expressionValue, property, 'unidimensional'); + + return function () { + if (property.k) { + property.getValue(); + } + val = property.v * mult; + if (expressionValue.value !== val) { + expressionValue = new Number(val); // eslint-disable-line no-new-wrappers + expressionValue.value = val; + completeProperty(expressionValue, property, 'unidimensional'); + } + return expressionValue; + }; + } + + function MultidimensionalPropertyInterface(property) { + if (!property || !('pv' in property)) { + property = defaultMultidimensionalValue; + } + var mult = 1 / property.mult; + var len = (property.data && property.data.l) || property.pv.length; + var expressionValue = createTypedArray('float32', len); + var arrValue = createTypedArray('float32', len); + expressionValue.value = arrValue; + completeProperty(expressionValue, property, 'multidimensional'); + + return function () { + if (property.k) { + property.getValue(); + } + for (var i = 0; i < len; i += 1) { + arrValue[i] = property.v[i] * mult; + expressionValue[i] = arrValue[i]; + } + return expressionValue; + }; + } + + // TODO: try to avoid using this getter + function defaultGetter() { + return defaultUnidimensionalValue; + } + + return function (property) { + if (!property) { + return defaultGetter; + } if (property.propType === 'unidimensional') { + return UnidimensionalPropertyInterface(property); + } + return MultidimensionalPropertyInterface(property); + }; +}()); + +export default ExpressionPropertyInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/Expressions.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/Expressions.js new file mode 100644 index 0000000000000000000000000000000000000000..8355a73fa17caf6ab6e598674300c294690c272d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/Expressions.js @@ -0,0 +1,46 @@ +import CompExpressionInterface from './CompInterface'; + +const Expressions = (function () { + var ob = {}; + ob.initExpressions = initExpressions; + + function initExpressions(animation) { + var stackCount = 0; + var registers = []; + + function pushExpression() { + stackCount += 1; + } + + function popExpression() { + stackCount -= 1; + if (stackCount === 0) { + releaseInstances(); + } + } + + function registerExpressionProperty(expression) { + if (registers.indexOf(expression) === -1) { + registers.push(expression); + } + } + + function releaseInstances() { + var i; + var len = registers.length; + for (i = 0; i < len; i += 1) { + registers[i].release(); + } + registers.length = 0; + } + + animation.renderer.compInterface = CompExpressionInterface(animation.renderer); + animation.renderer.globalData.projectInterface.registerComposition(animation.renderer); + animation.renderer.globalData.pushExpression = pushExpression; + animation.renderer.globalData.popExpression = popExpression; + animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty; + } + return ob; +}()); + +export default Expressions; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/FootageInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/FootageInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..27b8be988f2195f97d082769ef84f469b8290f69 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/FootageInterface.js @@ -0,0 +1,60 @@ +const FootageInterface = (function () { + var outlineInterfaceFactory = (function (elem) { + var currentPropertyName = ''; + var currentProperty = elem.getFootageData(); + function init() { + currentPropertyName = ''; + currentProperty = elem.getFootageData(); + return searchProperty; + } + function searchProperty(value) { + if (currentProperty[value]) { + currentPropertyName = value; + currentProperty = currentProperty[value]; + if (typeof currentProperty === 'object') { + return searchProperty; + } + return currentProperty; + } + var propertyNameIndex = value.indexOf(currentPropertyName); + if (propertyNameIndex !== -1) { + var index = parseInt(value.substr(propertyNameIndex + currentPropertyName.length), 10); + currentProperty = currentProperty[index]; + if (typeof currentProperty === 'object') { + return searchProperty; + } + return currentProperty; + } + return ''; + } + return init; + }); + + var dataInterfaceFactory = function (elem) { + function interfaceFunction(value) { + if (value === 'Outline') { + return interfaceFunction.outlineInterface(); + } + return null; + } + + interfaceFunction._name = 'Outline'; + interfaceFunction.outlineInterface = outlineInterfaceFactory(elem); + return interfaceFunction; + }; + + return function (elem) { + function _interfaceFunction(value) { + if (value === 'Data') { + return _interfaceFunction.dataInterface; + } + return null; + } + + _interfaceFunction._name = 'Data'; + _interfaceFunction.dataInterface = dataInterfaceFactory(elem); + return _interfaceFunction; + }; +}()); + +export default FootageInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/InterfacesProvider.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/InterfacesProvider.js new file mode 100644 index 0000000000000000000000000000000000000000..22accf1bed065ddb23de4b021f421eef49f72177 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/InterfacesProvider.js @@ -0,0 +1,21 @@ +import LayerExpressionInterface from './LayerInterface'; +import EffectsExpressionInterface from './EffectInterface'; +import CompExpressionInterface from './CompInterface'; +import ShapeExpressionInterface from './ShapeInterface'; +import TextExpressionInterface from './TextInterface'; +import FootageInterface from './FootageInterface'; + +var interfaces = { + layer: LayerExpressionInterface, + effects: EffectsExpressionInterface, + comp: CompExpressionInterface, + shape: ShapeExpressionInterface, + text: TextExpressionInterface, + footage: FootageInterface, +}; + +function getInterface(type) { + return interfaces[type] || null; +} + +export default getInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/LayerInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/LayerInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..e1a17cdacab3f73936929c38a6a595ba4f710a81 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/LayerInterface.js @@ -0,0 +1,179 @@ +import { + getDescriptor, +} from '../functionExtensions'; +import Matrix from '../../3rd_party/transformation-matrix'; +import MaskManagerInterface from './MaskInterface'; +import TransformExpressionInterface from './TransformInterface'; + +const LayerExpressionInterface = (function () { + function getMatrix(time) { + var toWorldMat = new Matrix(); + if (time !== undefined) { + var propMatrix = this._elem.finalTransform.mProp.getValueAtTime(time); + propMatrix.clone(toWorldMat); + } else { + var transformMat = this._elem.finalTransform.mProp; + transformMat.applyToMatrix(toWorldMat); + } + return toWorldMat; + } + + function toWorldVec(arr, time) { + var toWorldMat = this.getMatrix(time); + toWorldMat.props[12] = 0; + toWorldMat.props[13] = 0; + toWorldMat.props[14] = 0; + return this.applyPoint(toWorldMat, arr); + } + + function toWorld(arr, time) { + var toWorldMat = this.getMatrix(time); + return this.applyPoint(toWorldMat, arr); + } + + function fromWorldVec(arr, time) { + var toWorldMat = this.getMatrix(time); + toWorldMat.props[12] = 0; + toWorldMat.props[13] = 0; + toWorldMat.props[14] = 0; + return this.invertPoint(toWorldMat, arr); + } + + function fromWorld(arr, time) { + var toWorldMat = this.getMatrix(time); + return this.invertPoint(toWorldMat, arr); + } + + function applyPoint(matrix, arr) { + if (this._elem.hierarchy && this._elem.hierarchy.length) { + var i; + var len = this._elem.hierarchy.length; + for (i = 0; i < len; i += 1) { + this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix); + } + } + return matrix.applyToPointArray(arr[0], arr[1], arr[2] || 0); + } + + function invertPoint(matrix, arr) { + if (this._elem.hierarchy && this._elem.hierarchy.length) { + var i; + var len = this._elem.hierarchy.length; + for (i = 0; i < len; i += 1) { + this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(matrix); + } + } + return matrix.inversePoint(arr); + } + + function fromComp(arr) { + var toWorldMat = new Matrix(); + toWorldMat.reset(); + this._elem.finalTransform.mProp.applyToMatrix(toWorldMat); + if (this._elem.hierarchy && this._elem.hierarchy.length) { + var i; + var len = this._elem.hierarchy.length; + for (i = 0; i < len; i += 1) { + this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat); + } + return toWorldMat.inversePoint(arr); + } + return toWorldMat.inversePoint(arr); + } + + function sampleImage() { + return [1, 1, 1, 1]; + } + + return function (elem) { + var transformInterface; + + function _registerMaskInterface(maskManager) { + _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem); + } + function _registerEffectsInterface(effects) { + _thisLayerFunction.effect = effects; + } + + function _thisLayerFunction(name) { + switch (name) { + case 'ADBE Root Vectors Group': + case 'Contents': + case 2: + return _thisLayerFunction.shapeInterface; + case 1: + case 6: + case 'Transform': + case 'transform': + case 'ADBE Transform Group': + return transformInterface; + case 4: + case 'ADBE Effect Parade': + case 'effects': + case 'Effects': + return _thisLayerFunction.effect; + case 'ADBE Text Properties': + return _thisLayerFunction.textInterface; + default: + return null; + } + } + _thisLayerFunction.getMatrix = getMatrix; + _thisLayerFunction.invertPoint = invertPoint; + _thisLayerFunction.applyPoint = applyPoint; + _thisLayerFunction.toWorld = toWorld; + _thisLayerFunction.toWorldVec = toWorldVec; + _thisLayerFunction.fromWorld = fromWorld; + _thisLayerFunction.fromWorldVec = fromWorldVec; + _thisLayerFunction.toComp = toWorld; + _thisLayerFunction.fromComp = fromComp; + _thisLayerFunction.sampleImage = sampleImage; + _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem); + _thisLayerFunction._elem = elem; + transformInterface = TransformExpressionInterface(elem.finalTransform.mProp); + var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint'); + Object.defineProperties(_thisLayerFunction, { + hasParent: { + get: function () { + return elem.hierarchy.length; + }, + }, + parent: { + get: function () { + return elem.hierarchy[0].layerInterface; + }, + }, + rotation: getDescriptor(transformInterface, 'rotation'), + scale: getDescriptor(transformInterface, 'scale'), + position: getDescriptor(transformInterface, 'position'), + opacity: getDescriptor(transformInterface, 'opacity'), + anchorPoint: anchorPointDescriptor, + anchor_point: anchorPointDescriptor, + transform: { + get: function () { + return transformInterface; + }, + }, + active: { + get: function () { + return elem.isInRange; + }, + }, + }); + + _thisLayerFunction.startTime = elem.data.st; + _thisLayerFunction.index = elem.data.ind; + _thisLayerFunction.source = elem.data.refId; + _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100; + _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100; + _thisLayerFunction.inPoint = elem.data.ip / elem.comp.globalData.frameRate; + _thisLayerFunction.outPoint = elem.data.op / elem.comp.globalData.frameRate; + _thisLayerFunction._name = elem.data.nm; + + _thisLayerFunction.registerMaskInterface = _registerMaskInterface; + _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface; + return _thisLayerFunction; + }; +}()); + +export default LayerExpressionInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/MaskInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/MaskInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..f3232d6668deb750866c2b014eabd7d83200cad7 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/MaskInterface.js @@ -0,0 +1,50 @@ +import { + createSizedArray, +} from '../helpers/arrays'; + +const MaskManagerInterface = (function () { + function MaskInterface(mask, data) { + this._mask = mask; + this._data = data; + } + Object.defineProperty(MaskInterface.prototype, 'maskPath', { + get: function () { + if (this._mask.prop.k) { + this._mask.prop.getValue(); + } + return this._mask.prop; + }, + }); + Object.defineProperty(MaskInterface.prototype, 'maskOpacity', { + get: function () { + if (this._mask.op.k) { + this._mask.op.getValue(); + } + return this._mask.op.v * 100; + }, + }); + + var MaskManager = function (maskManager) { + var _masksInterfaces = createSizedArray(maskManager.viewData.length); + var i; + var len = maskManager.viewData.length; + for (i = 0; i < len; i += 1) { + _masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]); + } + + var maskFunction = function (name) { + i = 0; + while (i < len) { + if (maskManager.masksProperties[i].nm === name) { + return _masksInterfaces[i]; + } + i += 1; + } + return null; + }; + return maskFunction; + }; + return MaskManager; +}()); + +export default MaskManagerInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ProjectInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ProjectInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..db59500fdf6c6ba763589a8132fd54f763b23874 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ProjectInterface.js @@ -0,0 +1,31 @@ +const ProjectInterface = (function () { + function registerComposition(comp) { + this.compositions.push(comp); + } + + return function () { + function _thisProjectFunction(name) { + var i = 0; + var len = this.compositions.length; + while (i < len) { + if (this.compositions[i].data && this.compositions[i].data.nm === name) { + if (this.compositions[i].prepareFrame && this.compositions[i].data.xt) { + this.compositions[i].prepareFrame(this.currentFrame); + } + return this.compositions[i].compInterface; + } + i += 1; + } + return null; + } + + _thisProjectFunction.compositions = []; + _thisProjectFunction.currentFrame = 0; + + _thisProjectFunction.registerComposition = registerComposition; + + return _thisProjectFunction; + }; +}()); + +export default ProjectInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/PropertyGroupFactory.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/PropertyGroupFactory.js new file mode 100644 index 0000000000000000000000000000000000000000..bd9b63264d0be4ce15425158e7854b8e896c8344 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/PropertyGroupFactory.js @@ -0,0 +1,13 @@ +const propertyGroupFactory = (function () { + return function (interfaceFunction, parentPropertyGroup) { + return function (val) { + val = val === undefined ? 1 : val; + if (val <= 0) { + return interfaceFunction; + } + return parentPropertyGroup(val - 1); + }; + }; +}()); + +export default propertyGroupFactory; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/PropertyInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/PropertyInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..5e8a09653572dcdbca48137bd3a07615b9a89f3d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/PropertyInterface.js @@ -0,0 +1,19 @@ +const PropertyInterface = (function () { + return function (propertyName, propertyGroup) { + var interfaceFunction = { + _name: propertyName, + }; + + function _propertyGroup(val) { + val = val === undefined ? 1 : val; + if (val <= 0) { + return interfaceFunction; + } + return propertyGroup(val - 1); + } + + return _propertyGroup; + }; +}()); + +export default PropertyInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ShapeInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ShapeInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..b2c6c8ffa46e6e50c2fabc8e3a4f669e3b48b6e6 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/ShapeInterface.js @@ -0,0 +1,543 @@ +import ExpressionPropertyInterface from './ExpressionValueFactory'; +import propertyGroupFactory from './PropertyGroupFactory'; +import PropertyInterface from './PropertyInterface'; +import ShapePathInterface from './shapes/ShapePathInterface'; + +const ShapeExpressionInterface = (function () { + function iterateElements(shapes, view, propertyGroup) { + var arr = []; + var i; + var len = shapes ? shapes.length : 0; + for (i = 0; i < len; i += 1) { + if (shapes[i].ty === 'gr') { + arr.push(groupInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'fl') { + arr.push(fillInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'st') { + arr.push(strokeInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'tm') { + arr.push(trimInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'tr') { + // arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup)); + } else if (shapes[i].ty === 'el') { + arr.push(ellipseInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'sr') { + arr.push(starInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'sh') { + arr.push(ShapePathInterface(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'rc') { + arr.push(rectInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'rd') { + arr.push(roundedInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'rp') { + arr.push(repeaterInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else if (shapes[i].ty === 'gf') { + arr.push(gradientFillInterfaceFactory(shapes[i], view[i], propertyGroup)); + } else { + arr.push(defaultInterfaceFactory(shapes[i], view[i], propertyGroup)); + } + } + return arr; + } + + function contentsInterfaceFactory(shape, view, propertyGroup) { + var interfaces; + var interfaceFunction = function _interfaceFunction(value) { + var i = 0; + var len = interfaces.length; + while (i < len) { + if (interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value) { + return interfaces[i]; + } + i += 1; + } + if (typeof value === 'number') { + return interfaces[value - 1]; + } + return null; + }; + + interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup); + interfaceFunction.numProperties = interfaces.length; + var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup); + interfaceFunction.transform = transformInterface; + interfaceFunction.propertyIndex = shape.cix; + interfaceFunction._name = shape.nm; + + return interfaceFunction; + } + + function groupInterfaceFactory(shape, view, propertyGroup) { + var interfaceFunction = function _interfaceFunction(value) { + switch (value) { + case 'ADBE Vectors Group': + case 'Contents': + case 2: + return interfaceFunction.content; + // Not necessary for now. Keeping them here in case a new case appears + // case 'ADBE Vector Transform Group': + // case 3: + default: + return interfaceFunction.transform; + } + }; + interfaceFunction.propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var content = contentsInterfaceFactory(shape, view, interfaceFunction.propertyGroup); + var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1], view.it[view.it.length - 1], interfaceFunction.propertyGroup); + interfaceFunction.content = content; + interfaceFunction.transform = transformInterface; + Object.defineProperty(interfaceFunction, '_name', { + get: function () { + return shape.nm; + }, + }); + // interfaceFunction.content = interfaceFunction; + interfaceFunction.numProperties = shape.np; + interfaceFunction.propertyIndex = shape.ix; + interfaceFunction.nm = shape.nm; + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function fillInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(val) { + if (val === 'Color' || val === 'color') { + return interfaceFunction.color; + } if (val === 'Opacity' || val === 'opacity') { + return interfaceFunction.opacity; + } + return null; + } + Object.defineProperties(interfaceFunction, { + color: { + get: ExpressionPropertyInterface(view.c), + }, + opacity: { + get: ExpressionPropertyInterface(view.o), + }, + _name: { value: shape.nm }, + mn: { value: shape.mn }, + }); + + view.c.setGroupProperty(PropertyInterface('Color', propertyGroup)); + view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup)); + return interfaceFunction; + } + + function gradientFillInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(val) { + if (val === 'Start Point' || val === 'start point') { + return interfaceFunction.startPoint; + } + if (val === 'End Point' || val === 'end point') { + return interfaceFunction.endPoint; + } + if (val === 'Opacity' || val === 'opacity') { + return interfaceFunction.opacity; + } + return null; + } + Object.defineProperties(interfaceFunction, { + startPoint: { + get: ExpressionPropertyInterface(view.s), + }, + endPoint: { + get: ExpressionPropertyInterface(view.e), + }, + opacity: { + get: ExpressionPropertyInterface(view.o), + }, + type: { + get: function () { + return 'a'; + }, + }, + _name: { value: shape.nm }, + mn: { value: shape.mn }, + }); + + view.s.setGroupProperty(PropertyInterface('Start Point', propertyGroup)); + view.e.setGroupProperty(PropertyInterface('End Point', propertyGroup)); + view.o.setGroupProperty(PropertyInterface('Opacity', propertyGroup)); + return interfaceFunction; + } + function defaultInterfaceFactory() { + function interfaceFunction() { + return null; + } + return interfaceFunction; + } + + function strokeInterfaceFactory(shape, view, propertyGroup) { + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var _dashPropertyGroup = propertyGroupFactory(dashOb, _propertyGroup); + function addPropertyToDashOb(i) { + Object.defineProperty(dashOb, shape.d[i].nm, { + get: ExpressionPropertyInterface(view.d.dataProps[i].p), + }); + } + var i; + var len = shape.d ? shape.d.length : 0; + var dashOb = {}; + for (i = 0; i < len; i += 1) { + addPropertyToDashOb(i); + view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup); + } + + function interfaceFunction(val) { + if (val === 'Color' || val === 'color') { + return interfaceFunction.color; + } if (val === 'Opacity' || val === 'opacity') { + return interfaceFunction.opacity; + } if (val === 'Stroke Width' || val === 'stroke width') { + return interfaceFunction.strokeWidth; + } + return null; + } + Object.defineProperties(interfaceFunction, { + color: { + get: ExpressionPropertyInterface(view.c), + }, + opacity: { + get: ExpressionPropertyInterface(view.o), + }, + strokeWidth: { + get: ExpressionPropertyInterface(view.w), + }, + dash: { + get: function () { + return dashOb; + }, + }, + _name: { value: shape.nm }, + mn: { value: shape.mn }, + }); + + view.c.setGroupProperty(PropertyInterface('Color', _propertyGroup)); + view.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup)); + view.w.setGroupProperty(PropertyInterface('Stroke Width', _propertyGroup)); + return interfaceFunction; + } + + function trimInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(val) { + if (val === shape.e.ix || val === 'End' || val === 'end') { + return interfaceFunction.end; + } + if (val === shape.s.ix) { + return interfaceFunction.start; + } + if (val === shape.o.ix) { + return interfaceFunction.offset; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + interfaceFunction.propertyIndex = shape.ix; + + view.s.setGroupProperty(PropertyInterface('Start', _propertyGroup)); + view.e.setGroupProperty(PropertyInterface('End', _propertyGroup)); + view.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup)); + interfaceFunction.propertyIndex = shape.ix; + interfaceFunction.propertyGroup = propertyGroup; + + Object.defineProperties(interfaceFunction, { + start: { + get: ExpressionPropertyInterface(view.s), + }, + end: { + get: ExpressionPropertyInterface(view.e), + }, + offset: { + get: ExpressionPropertyInterface(view.o), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function transformInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.a.ix === value || value === 'Anchor Point') { + return interfaceFunction.anchorPoint; + } + if (shape.o.ix === value || value === 'Opacity') { + return interfaceFunction.opacity; + } + if (shape.p.ix === value || value === 'Position') { + return interfaceFunction.position; + } + if (shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation') { + return interfaceFunction.rotation; + } + if (shape.s.ix === value || value === 'Scale') { + return interfaceFunction.scale; + } + if ((shape.sk && shape.sk.ix === value) || value === 'Skew') { + return interfaceFunction.skew; + } + if ((shape.sa && shape.sa.ix === value) || value === 'Skew Axis') { + return interfaceFunction.skewAxis; + } + return null; + } + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + view.transform.mProps.o.setGroupProperty(PropertyInterface('Opacity', _propertyGroup)); + view.transform.mProps.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); + view.transform.mProps.a.setGroupProperty(PropertyInterface('Anchor Point', _propertyGroup)); + view.transform.mProps.s.setGroupProperty(PropertyInterface('Scale', _propertyGroup)); + view.transform.mProps.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup)); + if (view.transform.mProps.sk) { + view.transform.mProps.sk.setGroupProperty(PropertyInterface('Skew', _propertyGroup)); + view.transform.mProps.sa.setGroupProperty(PropertyInterface('Skew Angle', _propertyGroup)); + } + view.transform.op.setGroupProperty(PropertyInterface('Opacity', _propertyGroup)); + Object.defineProperties(interfaceFunction, { + opacity: { + get: ExpressionPropertyInterface(view.transform.mProps.o), + }, + position: { + get: ExpressionPropertyInterface(view.transform.mProps.p), + }, + anchorPoint: { + get: ExpressionPropertyInterface(view.transform.mProps.a), + }, + scale: { + get: ExpressionPropertyInterface(view.transform.mProps.s), + }, + rotation: { + get: ExpressionPropertyInterface(view.transform.mProps.r), + }, + skew: { + get: ExpressionPropertyInterface(view.transform.mProps.sk), + }, + skewAxis: { + get: ExpressionPropertyInterface(view.transform.mProps.sa), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.ty = 'tr'; + interfaceFunction.mn = shape.mn; + interfaceFunction.propertyGroup = propertyGroup; + return interfaceFunction; + } + + function ellipseInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.p.ix === value) { + return interfaceFunction.position; + } + if (shape.s.ix === value) { + return interfaceFunction.size; + } + return null; + } + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + interfaceFunction.propertyIndex = shape.ix; + var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh; + prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup)); + prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); + + Object.defineProperties(interfaceFunction, { + size: { + get: ExpressionPropertyInterface(prop.s), + }, + position: { + get: ExpressionPropertyInterface(prop.p), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function starInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.p.ix === value) { + return interfaceFunction.position; + } + if (shape.r.ix === value) { + return interfaceFunction.rotation; + } + if (shape.pt.ix === value) { + return interfaceFunction.points; + } + if (shape.or.ix === value || value === 'ADBE Vector Star Outer Radius') { + return interfaceFunction.outerRadius; + } + if (shape.os.ix === value) { + return interfaceFunction.outerRoundness; + } + if (shape.ir && (shape.ir.ix === value || value === 'ADBE Vector Star Inner Radius')) { + return interfaceFunction.innerRadius; + } + if (shape.is && shape.is.ix === value) { + return interfaceFunction.innerRoundness; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh; + interfaceFunction.propertyIndex = shape.ix; + prop.or.setGroupProperty(PropertyInterface('Outer Radius', _propertyGroup)); + prop.os.setGroupProperty(PropertyInterface('Outer Roundness', _propertyGroup)); + prop.pt.setGroupProperty(PropertyInterface('Points', _propertyGroup)); + prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); + prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup)); + if (shape.ir) { + prop.ir.setGroupProperty(PropertyInterface('Inner Radius', _propertyGroup)); + prop.is.setGroupProperty(PropertyInterface('Inner Roundness', _propertyGroup)); + } + + Object.defineProperties(interfaceFunction, { + position: { + get: ExpressionPropertyInterface(prop.p), + }, + rotation: { + get: ExpressionPropertyInterface(prop.r), + }, + points: { + get: ExpressionPropertyInterface(prop.pt), + }, + outerRadius: { + get: ExpressionPropertyInterface(prop.or), + }, + outerRoundness: { + get: ExpressionPropertyInterface(prop.os), + }, + innerRadius: { + get: ExpressionPropertyInterface(prop.ir), + }, + innerRoundness: { + get: ExpressionPropertyInterface(prop.is), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function rectInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.p.ix === value) { + return interfaceFunction.position; + } + if (shape.r.ix === value) { + return interfaceFunction.roundness; + } + if (shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size') { + return interfaceFunction.size; + } + return null; + } + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + + var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh; + interfaceFunction.propertyIndex = shape.ix; + prop.p.setGroupProperty(PropertyInterface('Position', _propertyGroup)); + prop.s.setGroupProperty(PropertyInterface('Size', _propertyGroup)); + prop.r.setGroupProperty(PropertyInterface('Rotation', _propertyGroup)); + + Object.defineProperties(interfaceFunction, { + position: { + get: ExpressionPropertyInterface(prop.p), + }, + roundness: { + get: ExpressionPropertyInterface(prop.r), + }, + size: { + get: ExpressionPropertyInterface(prop.s), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function roundedInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.r.ix === value || value === 'Round Corners 1') { + return interfaceFunction.radius; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var prop = view; + interfaceFunction.propertyIndex = shape.ix; + prop.rd.setGroupProperty(PropertyInterface('Radius', _propertyGroup)); + + Object.defineProperties(interfaceFunction, { + radius: { + get: ExpressionPropertyInterface(prop.rd), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + function repeaterInterfaceFactory(shape, view, propertyGroup) { + function interfaceFunction(value) { + if (shape.c.ix === value || value === 'Copies') { + return interfaceFunction.copies; + } if (shape.o.ix === value || value === 'Offset') { + return interfaceFunction.offset; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + var prop = view; + interfaceFunction.propertyIndex = shape.ix; + prop.c.setGroupProperty(PropertyInterface('Copies', _propertyGroup)); + prop.o.setGroupProperty(PropertyInterface('Offset', _propertyGroup)); + Object.defineProperties(interfaceFunction, { + copies: { + get: ExpressionPropertyInterface(prop.c), + }, + offset: { + get: ExpressionPropertyInterface(prop.o), + }, + _name: { value: shape.nm }, + }); + interfaceFunction.mn = shape.mn; + return interfaceFunction; + } + + return function (shapes, view, propertyGroup) { + var interfaces; + function _interfaceFunction(value) { + if (typeof value === 'number') { + value = value === undefined ? 1 : value; + if (value === 0) { + return propertyGroup; + } + return interfaces[value - 1]; + } + var i = 0; + var len = interfaces.length; + while (i < len) { + if (interfaces[i]._name === value) { + return interfaces[i]; + } + i += 1; + } + return null; + } + function parentGroupWrapper() { + return propertyGroup; + } + _interfaceFunction.propertyGroup = propertyGroupFactory(_interfaceFunction, parentGroupWrapper); + interfaces = iterateElements(shapes, view, _interfaceFunction.propertyGroup); + _interfaceFunction.numProperties = interfaces.length; + _interfaceFunction._name = 'Contents'; + return _interfaceFunction; + }; +}()); + +export default ShapeExpressionInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/TextInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/TextInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..dc59ecb52a1b30ac3db62d6d2606cefd32a410ff --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/TextInterface.js @@ -0,0 +1,35 @@ +const TextExpressionInterface = (function () { + return function (elem) { + var _sourceText; + function _thisLayerFunction(name) { + switch (name) { + case 'ADBE Text Document': + return _thisLayerFunction.sourceText; + default: + return null; + } + } + Object.defineProperty(_thisLayerFunction, 'sourceText', { + get: function () { + elem.textProperty.getValue(); + var stringValue = elem.textProperty.currentData.t; + if (!_sourceText || stringValue !== _sourceText.value) { + _sourceText = new String(stringValue); // eslint-disable-line no-new-wrappers + // If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive + _sourceText.value = stringValue || new String(stringValue); // eslint-disable-line no-new-wrappers + Object.defineProperty(_sourceText, 'style', { + get: function () { + return { + fillColor: elem.textProperty.currentData.fc, + }; + }, + }); + } + return _sourceText; + }, + }); + return _thisLayerFunction; + }; +}()); + +export default TextExpressionInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/TextSelectorPropertyDecorator.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/TextSelectorPropertyDecorator.js new file mode 100644 index 0000000000000000000000000000000000000000..5b4c000d17d7cbc68625eaee772be84f7ead7f99 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/TextSelectorPropertyDecorator.js @@ -0,0 +1,44 @@ +import ExpressionManager from './ExpressionManager'; +import expressionHelpers from './expressionHelpers'; +import TextSelectorProp from '../text/TextSelectorProperty'; + +const TextExpressionSelectorPropFactory = (function () { // eslint-disable-line no-unused-vars + function getValueProxy(index, total) { + this.textIndex = index + 1; + this.textTotal = total; + this.v = this.getValue() * this.mult; + return this.v; + } + + return function (elem, data) { + this.pv = 1; + this.comp = elem.comp; + this.elem = elem; + this.mult = 0.01; + this.propType = 'textSelector'; + this.textTotal = data.totalChars; + this.selectorValue = 100; + this.lastValue = [1, 1, 1]; + this.k = true; + this.x = true; + this.getValue = ExpressionManager.initiateExpression.bind(this)(elem, data, this); + this.getMult = getValueProxy; + this.getVelocityAtTime = expressionHelpers.getVelocityAtTime; + if (this.kf) { + this.getValueAtTime = expressionHelpers.getValueAtTime.bind(this); + } else { + this.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(this); + } + this.setGroupProperty = expressionHelpers.setGroupProperty; + }; +}()); + +var propertyGetTextProp = TextSelectorProp.getTextSelectorProp; +TextSelectorProp.getTextSelectorProp = function (elem, data, arr) { + if (data.t === 1) { + return new TextExpressionSelectorPropFactory(elem, data, arr); // eslint-disable-line no-undef + } + return propertyGetTextProp(elem, data, arr); +}; + +export default TextExpressionSelectorPropFactory; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/TransformInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/TransformInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..147bddddfc96aaaeaa7e983d98a9637cdecb20dc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/TransformInterface.js @@ -0,0 +1,126 @@ +import ExpressionPropertyInterface from './ExpressionValueFactory'; + +const TransformExpressionInterface = (function () { + return function (transform) { + function _thisFunction(name) { + switch (name) { + case 'scale': + case 'Scale': + case 'ADBE Scale': + case 6: + return _thisFunction.scale; + case 'rotation': + case 'Rotation': + case 'ADBE Rotation': + case 'ADBE Rotate Z': + case 10: + return _thisFunction.rotation; + case 'ADBE Rotate X': + return _thisFunction.xRotation; + case 'ADBE Rotate Y': + return _thisFunction.yRotation; + case 'position': + case 'Position': + case 'ADBE Position': + case 2: + return _thisFunction.position; + case 'ADBE Position_0': + return _thisFunction.xPosition; + case 'ADBE Position_1': + return _thisFunction.yPosition; + case 'ADBE Position_2': + return _thisFunction.zPosition; + case 'anchorPoint': + case 'AnchorPoint': + case 'Anchor Point': + case 'ADBE AnchorPoint': + case 1: + return _thisFunction.anchorPoint; + case 'opacity': + case 'Opacity': + case 11: + return _thisFunction.opacity; + default: + return null; + } + } + Object.defineProperty(_thisFunction, 'rotation', { + get: ExpressionPropertyInterface(transform.r || transform.rz), + }); + + Object.defineProperty(_thisFunction, 'zRotation', { + get: ExpressionPropertyInterface(transform.rz || transform.r), + }); + + Object.defineProperty(_thisFunction, 'xRotation', { + get: ExpressionPropertyInterface(transform.rx), + }); + + Object.defineProperty(_thisFunction, 'yRotation', { + get: ExpressionPropertyInterface(transform.ry), + }); + Object.defineProperty(_thisFunction, 'scale', { + get: ExpressionPropertyInterface(transform.s), + }); + var _px; + var _py; + var _pz; + var _transformFactory; + if (transform.p) { + _transformFactory = ExpressionPropertyInterface(transform.p); + } else { + _px = ExpressionPropertyInterface(transform.px); + _py = ExpressionPropertyInterface(transform.py); + if (transform.pz) { + _pz = ExpressionPropertyInterface(transform.pz); + } + } + Object.defineProperty(_thisFunction, 'position', { + get: function () { + if (transform.p) { + return _transformFactory(); + } + return [ + _px(), + _py(), + _pz ? _pz() : 0]; + }, + }); + + Object.defineProperty(_thisFunction, 'xPosition', { + get: ExpressionPropertyInterface(transform.px), + }); + + Object.defineProperty(_thisFunction, 'yPosition', { + get: ExpressionPropertyInterface(transform.py), + }); + + Object.defineProperty(_thisFunction, 'zPosition', { + get: ExpressionPropertyInterface(transform.pz), + }); + + Object.defineProperty(_thisFunction, 'anchorPoint', { + get: ExpressionPropertyInterface(transform.a), + }); + + Object.defineProperty(_thisFunction, 'opacity', { + get: ExpressionPropertyInterface(transform.o), + }); + + Object.defineProperty(_thisFunction, 'skew', { + get: ExpressionPropertyInterface(transform.sk), + }); + + Object.defineProperty(_thisFunction, 'skewAxis', { + get: ExpressionPropertyInterface(transform.sa), + }); + + Object.defineProperty(_thisFunction, 'orientation', { + get: ExpressionPropertyInterface(transform.or), + }); + + return _thisFunction; + }; +}()); + +export default TransformExpressionInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/expressionHelpers.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/expressionHelpers.js new file mode 100644 index 0000000000000000000000000000000000000000..2dc06f69d1fbbd5db777c38f81fcc169dd1db2ae --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/expressionHelpers.js @@ -0,0 +1,90 @@ +import { + createTypedArray, +} from '../helpers/arrays'; +import ExpressionManager from './ExpressionManager'; + +const expressionHelpers = (function () { + function searchExpressions(elem, data, prop) { + if (data.x) { + /** + * 由于禁用了 Expression 的能力, 此 prop 脱离了 keyframe 的范畴。 故将 prop.k = true 注释。 + * 否则在仅有 "x", 没有 "a": 1 的情况下, 会导致 processKeys 始终不会被调用。 + */ + // prop.k = true; + prop.x = true; + prop.initiateExpression = ExpressionManager.initiateExpression; + //prop.effectsSequence.push(prop.initiateExpression(elem, data, prop).bind(prop)); 不支持正则表达式内容 + } + } + + function getValueAtTime(frameNum) { + frameNum *= this.elem.globalData.frameRate; + frameNum -= this.offsetTime; + if (frameNum !== this._cachingAtTime.lastFrame) { + this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0; + this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime); + this._cachingAtTime.lastFrame = frameNum; + } + return this._cachingAtTime.value; + } + + function getSpeedAtTime(frameNum) { + var delta = -0.01; + var v1 = this.getValueAtTime(frameNum); + var v2 = this.getValueAtTime(frameNum + delta); + var speed = 0; + if (v1.length) { + var i; + for (i = 0; i < v1.length; i += 1) { + speed += Math.pow(v2[i] - v1[i], 2); + } + speed = Math.sqrt(speed) * 100; + } else { + speed = 0; + } + return speed; + } + + function getVelocityAtTime(frameNum) { + if (this.vel !== undefined) { + return this.vel; + } + var delta = -0.001; + // frameNum += this.elem.data.st; + var v1 = this.getValueAtTime(frameNum); + var v2 = this.getValueAtTime(frameNum + delta); + var velocity; + if (v1.length) { + velocity = createTypedArray('float32', v1.length); + var i; + for (i = 0; i < v1.length; i += 1) { + // removing frameRate + // if needed, don't add it here + // velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta); + velocity[i] = (v2[i] - v1[i]) / delta; + } + } else { + velocity = (v2 - v1) / delta; + } + return velocity; + } + + function getStaticValueAtTime() { + return this.pv; + } + + function setGroupProperty(propertyGroup) { + this.propertyGroup = propertyGroup; + } + + return { + searchExpressions: searchExpressions, + getSpeedAtTime: getSpeedAtTime, + getVelocityAtTime: getVelocityAtTime, + getValueAtTime: getValueAtTime, + getStaticValueAtTime: getStaticValueAtTime, + setGroupProperty: setGroupProperty, + }; +}()); + +export default expressionHelpers; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/shapes/ShapePathInterface.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/shapes/ShapePathInterface.js new file mode 100644 index 0000000000000000000000000000000000000000..4a95149769e063251edc2daef623d45a9c8740aa --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/expressions/shapes/ShapePathInterface.js @@ -0,0 +1,47 @@ +import propertyGroupFactory from '../PropertyGroupFactory'; +import PropertyInterface from '../PropertyInterface'; + +const ShapePathInterface = ( + + function () { + return function pathInterfaceFactory(shape, view, propertyGroup) { + var prop = view.sh; + + function interfaceFunction(val) { + if (val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2) { + return interfaceFunction.path; + } + return null; + } + + var _propertyGroup = propertyGroupFactory(interfaceFunction, propertyGroup); + prop.setGroupProperty(PropertyInterface('Path', _propertyGroup)); + Object.defineProperties(interfaceFunction, { + path: { + get: function () { + if (prop.k) { + prop.getValue(); + } + return prop; + }, + }, + shape: { + get: function () { + if (prop.k) { + prop.getValue(); + } + return prop; + }, + }, + _name: { value: shape.nm }, + ix: { value: shape.ix }, + propertyIndex: { value: shape.ix }, + mn: { value: shape.mn }, + propertyGroup: { value: propertyGroup }, + }); + return interfaceFunction; + }; + }() +); + +export default ShapePathInterface; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/featureSupport.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/featureSupport.js new file mode 100644 index 0000000000000000000000000000000000000000..d4cecb8885c59b3a85ff10e70e961c49e2c32705 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/featureSupport.js @@ -0,0 +1,10 @@ +const featureSupport = (function () { + var ob = { + maskType: true, + svgLumaHidden: true, + offscreenCanvas: typeof OffscreenCanvas !== 'undefined', + }; + return ob; +}()); + +export default featureSupport; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/filters.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/filters.js new file mode 100644 index 0000000000000000000000000000000000000000..b3c2a43025cbcef9dcb55aab618dfa13270edff5 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/filters.js @@ -0,0 +1,32 @@ +import createNS from './helpers/svg_elements'; + +const filtersFactory = (function () { + var ob = {}; + ob.createFilter = createFilter; + ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter; + + function createFilter(filId, skipCoordinates) { + var fil = createNS('filter'); + fil.setAttribute('id', filId); + if (skipCoordinates !== true) { + fil.setAttribute('filterUnits', 'objectBoundingBox'); + fil.setAttribute('x', '0%'); + fil.setAttribute('y', '0%'); + fil.setAttribute('width', '100%'); + fil.setAttribute('height', '100%'); + } + return fil; + } + + function createAlphaToLuminanceFilter() { + var feColorMatrix = createNS('feColorMatrix'); + feColorMatrix.setAttribute('type', 'matrix'); + feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB'); + feColorMatrix.setAttribute('values', '0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1'); + return feColorMatrix; + } + + return ob; +}()); + +export default filtersFactory; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/functionExtensions.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/functionExtensions.js new file mode 100644 index 0000000000000000000000000000000000000000..f2281e2572ce4831aea4650ef233b83d422928ba --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/functionExtensions.js @@ -0,0 +1,27 @@ +function extendPrototype(sources, destination) { + var i; + var len = sources.length; + var sourcePrototype; + for (i = 0; i < len; i += 1) { + sourcePrototype = sources[i].prototype; + for (var attr in sourcePrototype) { + if (Object.prototype.hasOwnProperty.call(sourcePrototype, attr)) destination.prototype[attr] = sourcePrototype[attr]; + } + } +} + +function getDescriptor(object, prop) { + return Object.getOwnPropertyDescriptor(object, prop); +} + +function createProxyFunction(prototype) { + function ProxyFunction() {} + ProxyFunction.prototype = prototype; + return ProxyFunction; +} + +export { + extendPrototype, + getDescriptor, + createProxyFunction, +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/getFontProperties.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/getFontProperties.js new file mode 100644 index 0000000000000000000000000000000000000000..9d8595b6bc92669af1f99df4a5ecb05072030b74 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/getFontProperties.js @@ -0,0 +1,42 @@ +function getFontProperties(fontData) { + var styles = fontData.fStyle ? fontData.fStyle.split(' ') : []; + + var fWeight = 'normal'; var + fStyle = 'normal'; + var len = styles.length; + var styleName; + for (var i = 0; i < len; i += 1) { + styleName = styles[i].toLowerCase(); + switch (styleName) { + case 'italic': + fStyle = 'italic'; + break; + case 'bold': + fWeight = '700'; + break; + case 'black': + fWeight = '900'; + break; + case 'medium': + fWeight = '500'; + break; + case 'regular': + case 'normal': + fWeight = '400'; + break; + case 'light': + case 'thin': + fWeight = '200'; + break; + default: + break; + } + } + + return { + style: fStyle, + weight: fontData.fWeight || fWeight, + }; +} + +export default getFontProperties; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/arrays.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/arrays.js new file mode 100644 index 0000000000000000000000000000000000000000..2c9c0e8ace6e7de6875def210d4ecc0613d4d217 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/arrays.js @@ -0,0 +1,46 @@ +const createTypedArray = (function () { + function createRegularArray(type, len) { + var i = 0; + var arr = []; + var value; + switch (type) { + case 'int16': + case 'uint8c': + value = 1; + break; + default: + value = 1.1; + break; + } + for (i = 0; i < len; i += 1) { + arr.push(value); + } + return arr; + } + function createTypedArrayFactory(type, len) { + if (type === 'float32') { + return new Float32Array(len); + } if (type === 'int16') { + return new Int16Array(len); + } if (type === 'uint8c') { + return new Uint8ClampedArray(len); + } + return createRegularArray(type, len); + } + if (typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') { + return createTypedArrayFactory; + } + return createRegularArray; +}()); + +function createSizedArray(len) { + if (!len) { + len = 0; + } + return Array.apply(null, { length: len }); +} + +export { + createTypedArray, + createSizedArray, +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/assetManager.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/assetManager.js new file mode 100644 index 0000000000000000000000000000000000000000..74e17c30503791201df7050f52c834a7868d7f60 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/assetManager.js @@ -0,0 +1,96 @@ +import createTag from './html_elements'; +import createNS from './svg_elements'; +import featureSupport from '../featureSupport'; + +var lumaLoader = (function () { + var id = '__lottie_element_luma_buffer'; + var lumaBuffer = null; + var lumaBufferCtx = null; + var svg = null; + + // This alternate solution has a slight delay before the filter is applied, resulting in a flicker on the first frame. + // Keeping this here for reference, and in the future, if offscreen canvas supports url filters, this can be used. + // For now, neither of them work for offscreen canvas, so canvas workers can't support the luma track matte mask. + // Naming it solution 2 to mark the extra comment lines. + /* + var svgString = [ + '', + '', + '', + '', + '', + ].join(''); + var blob = new Blob([svgString], { type: 'image/svg+xml' }); + var url = URL.createObjectURL(blob); + */ + + function createLumaSvgFilter() { + var _svg = createNS('svg'); + var fil = createNS('filter'); + var matrix = createNS('feColorMatrix'); + fil.setAttribute('id', id); + matrix.setAttribute('type', 'matrix'); + matrix.setAttribute('color-interpolation-filters', 'sRGB'); + matrix.setAttribute('values', '0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0'); + fil.appendChild(matrix); + _svg.appendChild(fil); + _svg.setAttribute('id', id + '_svg'); + if (featureSupport.svgLumaHidden) { + _svg.style.display = 'none'; + } + return _svg; + } + + function loadLuma() { + if (!lumaBuffer) { + svg = createLumaSvgFilter(); + document.body.appendChild(svg); + lumaBuffer = createTag('canvas'); + lumaBufferCtx = lumaBuffer.getContext('2d'); + // lumaBufferCtx.filter = `url('${url}#__lottie_element_luma_buffer')`; // part of solution 2 + lumaBufferCtx.filter = 'url(#' + id + ')'; + lumaBufferCtx.fillStyle = 'rgba(0,0,0,0)'; + lumaBufferCtx.fillRect(0, 0, 1, 1); + } + } + + function getLuma(canvas) { + if (!lumaBuffer) { + loadLuma(); + } + lumaBuffer.width = canvas.width; + lumaBuffer.height = canvas.height; + // lumaBufferCtx.filter = `url('${url}#__lottie_element_luma_buffer')`; // part of solution 2 + lumaBufferCtx.filter = 'url(#' + id + ')'; + return lumaBuffer; + } + return { + load: loadLuma, + get: getLuma, + }; +}); + +function createCanvas(width, height) { + if (featureSupport.offscreenCanvas) { + return new OffscreenCanvas(width, height); + } + var canvas = createTag('canvas'); + canvas.width = width; + canvas.height = height; + return canvas; +} + +const assetLoader = (function () { + return { + loadLumaCanvas: lumaLoader.load, + getLumaCanvas: lumaLoader.get, + createCanvas: createCanvas, + }; +}()); + +export default assetLoader; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/blendModes.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/blendModes.js new file mode 100644 index 0000000000000000000000000000000000000000..55acdf53ebfca42ac6977f637e2ec80ffa6712bc --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/blendModes.js @@ -0,0 +1,26 @@ +const getBlendMode = (function () { + var blendModeEnums = { + 0: 'source-over', + 1: 'multiply', + 2: 'screen', + 3: 'overlay', + 4: 'darken', + 5: 'lighten', + 6: 'color-dodge', + 7: 'color-burn', + 8: 'hard-light', + 9: 'soft-light', + 10: 'difference', + 11: 'exclusion', + 12: 'hue', + 13: 'saturation', + 14: 'color', + 15: 'luminosity', + }; + + return function (mode) { + return blendModeEnums[mode] || ''; + }; +}()); + +export default getBlendMode; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/dynamicProperties.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/dynamicProperties.js new file mode 100644 index 0000000000000000000000000000000000000000..621bf4e371c23f2055c9884966cd6eab25c053d2 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/dynamicProperties.js @@ -0,0 +1,29 @@ +function DynamicPropertyContainer() {} +DynamicPropertyContainer.prototype = { + addDynamicProperty: function (prop) { + if (this.dynamicProperties.indexOf(prop) === -1) { + this.dynamicProperties.push(prop); + this.container.addDynamicProperty(this); + this._isAnimated = true; + } + }, + iterateDynamicProperties: function () { + this._mdf = false; + var i; + var len = this.dynamicProperties.length; + for (i = 0; i < len; i += 1) { + this.dynamicProperties[i].getValue(); + if (this.dynamicProperties[i]._mdf) { + this._mdf = true; + } + } + }, + initDynamicPropertyContainer: function (container) { + this.container = container; + this.dynamicProperties = []; + this._mdf = false; + this._isAnimated = false; + }, +}; + +export default DynamicPropertyContainer; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/html_elements.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/html_elements.js new file mode 100644 index 0000000000000000000000000000000000000000..5a5d56b2d624af250febf3069e07ac0b20449e0d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/html_elements.js @@ -0,0 +1,14 @@ +function createTag(type) { + return { + appendChild: function (n) { + }, + setAttribute: function (k, v) { + }, + style: {}, + getContext: function (s) { + return {}; + } + } +} + +export default createTag; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/propTypes.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/propTypes.js new file mode 100644 index 0000000000000000000000000000000000000000..6a1c570e1b5f7bcd07d3f25df096737977e730d0 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/propTypes.js @@ -0,0 +1,3 @@ +export default { + SHAPE: 'shape', +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/shapeEnums.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/shapeEnums.js new file mode 100644 index 0000000000000000000000000000000000000000..581a1cdc1b68814b77d3d0197b24d268e8c93469 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/shapeEnums.js @@ -0,0 +1,16 @@ +const lineCapEnum = { + 1: 'butt', + 2: 'round', + 3: 'square', +}; + +const lineJoinEnum = { + 1: 'miter', + 2: 'round', + 3: 'bevel', +}; + +export { + lineCapEnum, + lineJoinEnum, +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/svg_elements.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/svg_elements.js new file mode 100644 index 0000000000000000000000000000000000000000..227742e3edf570ac60dd6e0b0a728890079a4978 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/helpers/svg_elements.js @@ -0,0 +1,35 @@ +import { svgNS } from '../../main'; + +function createNS(types) { + return new createNs(types, svgNS) +} + +function createNs(types, svg) { + this.label = types + this.ks = {} + this.childs = new Array() + this.style = {} + if (types == 'svg' && svg != null) + this.setAttribute("xmlns", svg) +} + +createNs.prototype.setAttributeNS = function (n, k, v) { + this.setAttribute("xmlns", n) + this.ks[k+''] = v +} + +createNs.prototype.setAttribute = function (k, v) { + this.ks[k+''] = v +} + +createNs.prototype.appendChild = function (element) { + if (element != undefined) + this.childs.push(element) +} + +createNs.prototype.insertBefore = function (newNode, referenceNode) { + let addindex = this.childs.indexOf(referenceNode) + this.childs.splice(addindex, 0, newNode) +} + +export default createNS; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/imagePreloader.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/imagePreloader.js new file mode 100644 index 0000000000000000000000000000000000000000..0fb65033073fabb9ed9db1b63f00aefebdf75d99 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/imagePreloader.js @@ -0,0 +1,348 @@ +import { isSafari } from './common'; +import createNS from './helpers/svg_elements'; +import dataManager from './DataManager'; +import image from '@ohos.multimedia.image'; +import fs from '@ohos.file.fs'; +import {LogUtil} from './LogUtil' + +//类型定义参考 https://lottiefiles.github.io/lottie-docs/assets/ +const SOURCE_BASE64 = /data:image\/([a-zA-Z0-9+-]+\/?);base64/; +const TYPE_IMAGE_SOURCE_RAWFILE = 0 +const TYPE_IMAGE_SOURCE_BASE64 = 1 + +const ImagePreloader = (function () { + var proxyImage = (function () { + + // 使用空对象替代不支持动态创建的Canvas组件 + return { }; + }()); + + function imageLoaded() { + this.loadedAssets += 1; + if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) { + if (this.imagesLoadedCb) { + this.imagesLoadedCb(null); + } + } + } + function footageLoaded() { + this.loadedFootagesCount += 1; + if (this.loadedAssets === this.totalImages && this.loadedFootagesCount === this.totalFootages) { + if (this.imagesLoadedCb) { + this.imagesLoadedCb(null); + } + } + } + + function getAssetsPath(assetData, assetsPath, originalPath) { + var path = ''; + if (assetData.e) { + path = assetData.p; + } else if (assetsPath) { + var imagePath = assetData.p; + if (imagePath.indexOf('images/') !== -1) { + imagePath = imagePath.split('/')[1]; + } + path = assetsPath + imagePath; + } else { + path = originalPath; + path += assetData.u ? assetData.u : ''; + path += assetData.p; + } + return path; + } + + function testImageLoaded(img) { + var _count = 0; + var intervalId = setInterval(function () { + var box = img.getBBox(); + if (box.width || _count > 500) { + this._imageLoaded(); + clearInterval(intervalId); + } + _count += 1; + }.bind(this), 50); + } + + function generatePixelMapAndRefreshUI2(data, ob, callback) { + let image_source = image.createImageSource(data) + //piexlmap改成不可编辑状态,优化图形图像端读取速度 + let opts = { + editable: false, + desiredPixelFormat: image.PixelMapFormat.RGBA_8888 + }; + //创建pixel_map + image_source?.createPixelMap(opts, (err, pixel_map) => { + if (!err) { + ob.img.pixel_map = pixel_map; + if (ob.assetData && ob.assetData.w && ob.assetData.h) { + ob.img.width = ob.assetData.w; + ob.img.height = ob.assetData.h; + callback(); + } else { + //获取解析出来的pixel_map的宽、高 + pixel_map.getImageInfo().then((image_info) => { + ob.img.width = image_info.size.width; + ob.img.height = image_info.size.height; + callback(); + }); + } + } else { + callback(); + } + }); + } + + function createImageData(assetData) { + var path = getAssetsPath(assetData, this.assetsPath, this.path); + var img = createNS('image'); + if (isSafari) { + this.testImageLoaded(img); + } else { + img.addEventListener('load', this._imageLoaded, false); + } + img.addEventListener('error', function () { + ob.img = proxyImage; + this._imageLoaded(); + }.bind(this), false); + img.setAttributeNS('http://www.w3.org/1999/xlink', 'href', path); + if (this._elementHelper.append) { + this._elementHelper.append(img); + } else { + this._elementHelper.appendChild(img); + } + var ob = { + img: img, + assetData: assetData, + }; + return ob; + } + + function createImgData(assetData) { + var path = getAssetsPath(assetData, this.assetsPath, this.path); + var context = this.context; + if (context == null) { + context = getContext(); + } + //因OpenHarmony无法通过createTag创建html中的img标签,所以这里构造一个img对象,同进添加其使用到的addEventListener方法 + var img = { + addEventListener: function (type, callback, flag) { + if (type === "load") { + if (this._imageAssetDelegate) { + this._imageAssetDelegate(path, (err, pixel_map) => { + if (pixel_map == null) { + //assetData.e值是不唯一的参数,所以由assetData.p值来判断图片资源是base64图片资源,还是外部图片资源 + if (SOURCE_BASE64.test(assetData.p)) { //正则表达式判断是否含有data:image/;base64字段 + readBase64(assetData, ob, callback); //base64图片 + } else { //rawfile资源图片 + readRawFile(context, assetData, ob, callback); + } + } else { + ob.img.pixel_map = pixel_map; + if (ob.assetData && ob.assetData.w && ob.assetData.h) { + ob.img.width = ob.assetData.w; + ob.img.height = ob.assetData.h; + callback(); + } else { + //获取解析出来的pixel_map的宽、高 + pixel_map.getImageInfo().then((image_info) => { + ob.img.width = image_info.size.width; + ob.img.height = image_info.size.height; + callback(); + }); + } + } + }); + return; + } + //assetData.e值是不唯一的参数,所以由assetData.p值来判断图片资源是base64图片资源,还是外部图片资源 + if (SOURCE_BASE64.test(assetData.p)) { //正则表达式判断是否含有data:image/;base64字段 + readBase64(assetData, ob, callback); //base64图片 + } else { //rawfile资源图片 + readRawFile(context, assetData, ob, callback); + } + } + }.bind(this) + }; + var ob = { + img: img, + assetData: assetData, + }; + img.crossOrigin = 'anonymous'; + img.addEventListener('load', this._imageLoaded, false); + img.addEventListener('error', function () { + ob.img = proxyImage; + this._imageLoaded(); + }.bind(this), false); + img.src = path; + return ob; + } + + function readBase64(assetData, ob, callback) { + //generatePixelMapAndRefreshUI的入参ob可能为undefined,所以这里需要每隔一段时间检测一下ob是否实例化好了 + let task_id = setInterval(() => { + if (!ob) { + return + } + generatePixelMapAndRefreshUI2(assetData.p, ob, callback) + //取消循环检测 + clearInterval(task_id) + }, 10) + } + + function readRawFile(context, assetData, ob, callback) { + //拼接rawfile url + let res = assetData.u + assetData.p; //->common/image/lottie/icon.png + try { + let filePath = context.filesDir + '/' + res; + let isExist = fs.accessSync(filePath); //判断图片资源是否存在 + if (isExist) { + let file = fs.openSync(filePath, fs.OpenMode.READ_ONLY); + let stat = fs.statSync(filePath); + let arrayBuffer = new ArrayBuffer(stat.size); + fs.read(file.fd, arrayBuffer, (err, readLen) => { + if (!!!err) { + generatePixelMapAndRefreshUI2(arrayBuffer, ob, callback); + } else { + //加载依赖图片异常时,默认动画加载正常 + callback(); + } + fs.close(file) + }) + } else { + //获取rawfile的字节数组数据 + context.resourceManager.getRawFileContent(res, (err, raw_file_content) => { + if (!!!err) { + generatePixelMapAndRefreshUI2(raw_file_content.buffer, ob, callback); + } else { + //加载依赖图片异常时,默认动画加载正常 + callback(); + } + }) + } + } catch (err) { + LogUtil.error('Method readRawFile execute error: ' + JSON.stringify(err)); + } + } + + function createFootageData(data) { + var ob = { + assetData: data, + }; + var path = getAssetsPath(data, this.assetsPath, this.path); + dataManager.loadData(path, function (footageData) { + ob.img = footageData; + this._footageLoaded(); + }.bind(this), function () { + ob.img = {}; + this._footageLoaded(); + }.bind(this)); + return ob; + } + + function loadAssets(assets, cb) { + this.imagesLoadedCb = cb; + var i; + var len = assets.length; + for (i = 0; i < len; i += 1) { + if (!assets[i].layers) { + if (this.imagePath && this.imagePath != '') { + assets[i].u = this.imagePath; + } + if (!assets[i].t || assets[i].t === 'seq') { + this.totalImages += 1; + this.images.push(this._createImageData(assets[i])); + } else if (assets[i].t === 3) { + this.totalFootages += 1; + this.images.push(this.createFootageData(assets[i])); + } + } + } + } + + function setPath(path) { + this.path = path || ''; + } + + function setAssetsPath(path) { + this.assetsPath = path || ''; + } + + function getAsset(assetData) { + var i = 0; + var len = this.images.length; + while (i < len) { + if (this.images[i].assetData === assetData) { + return this.images[i].img; + } + i += 1; + } + return null; + } + + function destroy() { + this.imagesLoadedCb = null; + this.images.length = 0; + } + + function loadedImages() { + return this.totalImages === this.loadedAssets; + } + + function loadedFootages() { + return this.totalFootages === this.loadedFootagesCount; + } + + function setImageAssetDelegate(imageAssetDelegate) { + this._imageAssetDelegate = imageAssetDelegate; + } + + function setCacheType(type, elementHelper, context, imagePath) { + this.context = context; + this.imagePath = imagePath; + if (type === 'svg') { + this._elementHelper = elementHelper; + this._createImageData = this.createImageData.bind(this); + } else { + this._createImageData = this.createImgData.bind(this); + } + } + + function ImagePreloaderFactory() { + this._imageLoaded = imageLoaded.bind(this); + this._footageLoaded = footageLoaded.bind(this); + this._imageAssetDelegate = null; + this.testImageLoaded = testImageLoaded.bind(this); + this.createFootageData = createFootageData.bind(this); + this.assetsPath = ''; + this.path = ''; + this.totalImages = 0; + this.totalFootages = 0; + this.loadedAssets = 0; + this.loadedFootagesCount = 0; + this.imagesLoadedCb = null; + this.images = []; + this.context = null; + this.imagePath = ''; + } + + ImagePreloaderFactory.prototype = { + loadAssets: loadAssets, + setAssetsPath: setAssetsPath, + setPath: setPath, + loadedImages: loadedImages, + loadedFootages: loadedFootages, + destroy: destroy, + getAsset: getAsset, + createImgData: createImgData, + createImageData: createImageData, + imageLoaded: imageLoaded, + footageLoaded: footageLoaded, + setCacheType: setCacheType, + setImageAssetDelegate: setImageAssetDelegate, + }; + + return ImagePreloaderFactory; +}()); + +export default ImagePreloader; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/markers/markerParser.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/markers/markerParser.js new file mode 100644 index 0000000000000000000000000000000000000000..fe17929a9352a600d0ab1a6782fe40f7382ad465 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/markers/markerParser.js @@ -0,0 +1,47 @@ +const markerParser = ( + + function () { + function parsePayloadLines(payload) { + var lines = payload.split('\r\n'); + var keys = {}; + var line; + var keysCount = 0; + for (var i = 0; i < lines.length; i += 1) { + line = lines[i].split(':'); + if (line.length === 2) { + keys[line[0]] = line[1].trim(); + keysCount += 1; + } + } + if (keysCount === 0) { + throw new Error(); + } + return keys; + } + + return function (_markers) { + var markers = []; + for (var i = 0; i < _markers.length; i += 1) { + var _marker = _markers[i]; + var markerData = { + time: _marker.tm, + duration: _marker.dr, + }; + try { + markerData.payload = JSON.parse(_markers[i].cm); + } catch (_) { + try { + markerData.payload = parsePayloadLines(_markers[i].cm); + } catch (__) { + markerData.payload = { + name: _markers[i].cm, + }; + } + } + markers.push(markerData); + } + return markers; + }; + }()); + +export default markerParser; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/bezier_length_pool.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/bezier_length_pool.js new file mode 100644 index 0000000000000000000000000000000000000000..bd38b8bbf6a0d7136b62be75acc87a14d378e076 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/bezier_length_pool.js @@ -0,0 +1,20 @@ +import { + getDefaultCurveSegments, +} from '../common'; +import { + createTypedArray, +} from '../helpers/arrays'; +import poolFactory from './pool_factory'; + +const bezierLengthPool = (function () { + function create() { + return { + addedLength: 0, + percents: createTypedArray('float32', getDefaultCurveSegments()), + lengths: createTypedArray('float32', getDefaultCurveSegments()), + }; + } + return poolFactory(8, create); +}()); + +export default bezierLengthPool; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/point_pool.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/point_pool.js new file mode 100644 index 0000000000000000000000000000000000000000..79eeacb3f6d04ebb63022f0c68691f5c4e0f1708 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/point_pool.js @@ -0,0 +1,13 @@ +import { + createTypedArray, +} from '../helpers/arrays'; +import poolFactory from './pool_factory'; + +const pointPool = (function () { + function create() { + return createTypedArray('float32', 2); + } + return poolFactory(8, create); +}()); + +export default pointPool; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/pool_factory.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/pool_factory.js new file mode 100644 index 0000000000000000000000000000000000000000..5538c6588c43d50f4606bd21dfcf2dd2ecedff7f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/pool_factory.js @@ -0,0 +1,44 @@ +import { + createSizedArray, +} from '../helpers/arrays'; +import pooling from './pooling'; + +const poolFactory = (function () { + return function (initialLength, _create, _release) { + var _length = 0; + var _maxLength = initialLength; + var pool = createSizedArray(_maxLength); + + var ob = { + newElement: newElement, + release: release, + }; + + function newElement() { + var element; + if (_length) { + _length -= 1; + element = pool[_length]; + } else { + element = _create(); + } + return element; + } + + function release(element) { + if (_length === _maxLength) { + pool = pooling.double(pool); + _maxLength *= 2; + } + if (_release) { + _release(element); + } + pool[_length] = element; + _length += 1; + } + + return ob; + }; +}()); + +export default poolFactory; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/pooling.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/pooling.js new file mode 100644 index 0000000000000000000000000000000000000000..44e06954ce4fe5cd076ef0fd403ce5d4a73fd138 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/pooling.js @@ -0,0 +1,15 @@ +import { + createSizedArray, +} from '../helpers/arrays'; + +const pooling = (function () { + function double(arr) { + return arr.concat(createSizedArray(arr.length)); + } + + return { + double: double, + }; +}()); + +export default pooling; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/segments_length_pool.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/segments_length_pool.js new file mode 100644 index 0000000000000000000000000000000000000000..e7c69dd035b56d73d2a54e2457b969936be47d20 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/segments_length_pool.js @@ -0,0 +1,24 @@ +import bezierLengthPool from './bezier_length_pool'; +import poolFactory from './pool_factory'; + +const segmentsLengthPool = (function () { + function create() { + return { + lengths: [], + totalLength: 0, + }; + } + + function release(element) { + var i; + var len = element.lengths.length; + for (i = 0; i < len; i += 1) { + bezierLengthPool.release(element.lengths[i]); + } + element.lengths.length = 0; + } + + return poolFactory(8, create, release); +}()); + +export default segmentsLengthPool; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/shapeCollection_pool.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/shapeCollection_pool.js new file mode 100644 index 0000000000000000000000000000000000000000..ae31fd92c6d7eb60b6f90d69b7ea5680764edb1a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/shapeCollection_pool.js @@ -0,0 +1,48 @@ +import { + createSizedArray, +} from '../helpers/arrays'; +import shapePool from './shape_pool'; +import pooling from './pooling'; +import ShapeCollection from '../shapes/ShapeCollection'; + +const shapeCollectionPool = (function () { + var ob = { + newShapeCollection: newShapeCollection, + release: release, + }; + + var _length = 0; + var _maxLength = 4; + var pool = createSizedArray(_maxLength); + + function newShapeCollection() { + var shapeCollection; + if (_length) { + _length -= 1; + shapeCollection = pool[_length]; + } else { + shapeCollection = new ShapeCollection(); + } + return shapeCollection; + } + + function release(shapeCollection) { + var i; + var len = shapeCollection._length; + for (i = 0; i < len; i += 1) { + shapePool.release(shapeCollection.shapes[i]); + } + shapeCollection._length = 0; + + if (_length === _maxLength) { + pool = pooling.double(pool); + _maxLength *= 2; + } + pool[_length] = shapeCollection; + _length += 1; + } + + return ob; +}()); + +export default shapeCollectionPool; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/shape_pool.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/shape_pool.js new file mode 100644 index 0000000000000000000000000000000000000000..cbcbb1e11dadff5f9974d2e6127d6842a228e8a4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/pooling/shape_pool.js @@ -0,0 +1,44 @@ +import poolFactory from './pool_factory'; +import pointPool from './point_pool'; +import ShapePath from '../shapes/ShapePath'; + +const shapePool = (function () { + function create() { + return new ShapePath(); + } + + function release(shapePath) { + var len = shapePath._length; + var i; + for (i = 0; i < len; i += 1) { + pointPool.release(shapePath.v[i]); + pointPool.release(shapePath.i[i]); + pointPool.release(shapePath.o[i]); + shapePath.v[i] = null; + shapePath.i[i] = null; + shapePath.o[i] = null; + } + shapePath._length = 0; + shapePath.c = false; + } + + function clone(shape) { + var cloned = factory.newElement(); + var i; + var len = shape._length === undefined ? shape.v.length : shape._length; + cloned.setLength(len); + cloned.c = shape.c; + + for (i = 0; i < len; i += 1) { + cloned.setTripleAt(shape.v[i][0], shape.v[i][1], shape.o[i][0], shape.o[i][1], shape.i[i][0], shape.i[i][1], i); + } + return cloned; + } + + var factory = poolFactory(4, create, release); + factory.clone = clone; + + return factory; +}()); + +export default shapePool; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/DashProperty.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/DashProperty.js new file mode 100644 index 0000000000000000000000000000000000000000..f0594e32c067c1314541c14a21b43ff4443d6ffe --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/DashProperty.js @@ -0,0 +1,63 @@ +import { + extendPrototype, +} from '../functionExtensions'; +import DynamicPropertyContainer from '../helpers/dynamicProperties'; +import { + createSizedArray, + createTypedArray, +} from '../helpers/arrays'; +import PropertyFactory from '../PropertyFactory'; + +function DashProperty(elem, data, renderer, container) { + this.elem = elem; + this.frameId = -1; + this.dataProps = createSizedArray(data.length); + this.renderer = renderer; + this.k = false; + this.dashStr = ''; + this.dashArray = createTypedArray('float32', data.length ? data.length - 1 : 0); + this.dashoffset = createTypedArray('float32', 1); + this.initDynamicPropertyContainer(container); + var i; + var len = data.length || 0; + var prop; + for (i = 0; i < len; i += 1) { + prop = PropertyFactory.getProp(elem, data[i].v, 0, 0, this); + this.k = prop.k || this.k; + this.dataProps[i] = { n: data[i].n, p: prop }; + } + if (!this.k) { + this.getValue(true); + } + this._isAnimated = this.k; +} + +DashProperty.prototype.getValue = function (forceRender) { + if (this.elem.globalData.frameId === this.frameId && !forceRender) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); + this._mdf = this._mdf || forceRender; + if (this._mdf) { + var i = 0; + var len = this.dataProps.length; + if (this.renderer === 'svg') { + this.dashStr = ''; + } + for (i = 0; i < len; i += 1) { + if (this.dataProps[i].n !== 'o') { + if (this.renderer === 'svg') { + this.dashStr += ' ' + this.dataProps[i].p.v; + } else { + this.dashArray[i] = this.dataProps[i].p.v; + } + } else { + this.dashoffset[0] = this.dataProps[i].p.v; + } + } + } +}; +extendPrototype([DynamicPropertyContainer], DashProperty); + +export default DashProperty; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/GradientProperty.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/GradientProperty.js new file mode 100644 index 0000000000000000000000000000000000000000..a96d9eecc44619f55a52c911fb448fc879fae15b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/GradientProperty.js @@ -0,0 +1,93 @@ +import { + extendPrototype, +} from '../functionExtensions'; +import DynamicPropertyContainer from '../helpers/dynamicProperties'; +import { + createTypedArray, +} from '../helpers/arrays'; +import PropertyFactory from '../PropertyFactory'; + +function GradientProperty(elem, data, container) { + this.data = data; + this.c = createTypedArray('uint8c', data.p * 4); + var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p * 4) : data.k.k.length - data.p * 4; + this.o = createTypedArray('float32', cLength); + this._cmdf = false; + this._omdf = false; + this._collapsable = this.checkCollapsable(); + this._hasOpacity = cLength; + this.initDynamicPropertyContainer(container); + this.prop = PropertyFactory.getProp(elem, data.k, 1, null, this); + this.k = this.prop.k; + this.getValue(true); +} + +GradientProperty.prototype.comparePoints = function (values, points) { + var i = 0; + var len = this.o.length / 2; + var diff; + while (i < len) { + diff = Math.abs(values[i * 4] - values[points * 4 + i * 2]); + if (diff > 0.01) { + return false; + } + i += 1; + } + return true; +}; + +GradientProperty.prototype.checkCollapsable = function () { + if (this.o.length / 2 !== this.c.length / 4) { + return false; + } + if (this.data.k.k[0].s) { + var i = 0; + var len = this.data.k.k.length; + while (i < len) { + if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) { + return false; + } + i += 1; + } + } else if (!this.comparePoints(this.data.k.k, this.data.p)) { + return false; + } + return true; +}; + +GradientProperty.prototype.getValue = function (forceRender) { + this.prop.getValue(); + this._mdf = false; + this._cmdf = false; + this._omdf = false; + if (this.prop._mdf || forceRender) { + var i; + var len = this.data.p * 4; + var mult; + var val; + for (i = 0; i < len; i += 1) { + mult = i % 4 === 0 ? 100 : 255; + val = Math.round(this.prop.v[i] * mult); + if (this.c[i] !== val) { + this.c[i] = val; + this._cmdf = !forceRender; + } + } + if (this.o.length) { + len = this.prop.v.length; + for (i = this.data.p * 4; i < len; i += 1) { + mult = i % 2 === 0 ? 100 : 1; + val = i % 2 === 0 ? Math.round(this.prop.v[i] * 100) : this.prop.v[i]; + if (this.o[i - this.data.p * 4] !== val) { + this.o[i - this.data.p * 4] = val; + this._omdf = !forceRender; + } + } + } + this._mdf = !forceRender; + } +}; + +extendPrototype([DynamicPropertyContainer], GradientProperty); + +export default GradientProperty; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/OffsetPathModifier.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/OffsetPathModifier.js new file mode 100644 index 0000000000000000000000000000000000000000..ef08e0545a3f745c4b4ce6164240310e5b1c6955 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/OffsetPathModifier.js @@ -0,0 +1,306 @@ +import { + roundCorner, +} from '../common'; +import { + extendPrototype, +} from '../functionExtensions'; +import PropertyFactory from '../PropertyFactory'; +import shapePool from '../pooling/shape_pool'; +import { + ShapeModifier, +} from './ShapeModifiers'; +import { + PolynomialBezier, + polarOffset, + lineIntersection, + pointDistance, + pointEqual, + floatEqual, +} from '../PolynomialBezier'; + +function linearOffset(p1, p2, amount) { + var angle = Math.atan2(p2[0] - p1[0], p2[1] - p1[1]); + return [ + polarOffset(p1, angle, amount), + polarOffset(p2, angle, amount), + ]; +} + +function offsetSegment(segment, amount) { + var p0; var p1a; var p1b; var p2b; var p2a; var + p3; + var e; + e = linearOffset(segment.points[0], segment.points[1], amount); + p0 = e[0]; + p1a = e[1]; + e = linearOffset(segment.points[1], segment.points[2], amount); + p1b = e[0]; + p2b = e[1]; + e = linearOffset(segment.points[2], segment.points[3], amount); + p2a = e[0]; + p3 = e[1]; + var p1 = lineIntersection(p0, p1a, p1b, p2b); + if (p1 === null) p1 = p1a; + var p2 = lineIntersection(p2a, p3, p1b, p2b); + if (p2 === null) p2 = p2a; + + return new PolynomialBezier(p0, p1, p2, p3); +} + +function joinLines(outputBezier, seg1, seg2, lineJoin, miterLimit) { + var p0 = seg1.points[3]; + var p1 = seg2.points[0]; + + // Bevel + if (lineJoin === 3) return p0; + + // Connected, they don't need a joint + if (pointEqual(p0, p1)) return p0; + + // Round + if (lineJoin === 2) { + var angleOut = -seg1.tangentAngle(1); + var angleIn = -seg2.tangentAngle(0) + Math.PI; + var center = lineIntersection( + p0, + polarOffset(p0, angleOut + Math.PI / 2, 100), + p1, + polarOffset(p1, angleOut + Math.PI / 2, 100) + ); + var radius = center ? pointDistance(center, p0) : pointDistance(p0, p1) / 2; + + var tan = polarOffset(p0, angleOut, 2 * radius * roundCorner); + outputBezier.setXYAt(tan[0], tan[1], 'o', outputBezier.length() - 1); + + tan = polarOffset(p1, angleIn, 2 * radius * roundCorner); + outputBezier.setTripleAt(p1[0], p1[1], p1[0], p1[1], tan[0], tan[1], outputBezier.length()); + + return p1; + } + + // Miter + var t0 = pointEqual(p0, seg1.points[2]) ? seg1.points[0] : seg1.points[2]; + var t1 = pointEqual(p1, seg2.points[1]) ? seg2.points[3] : seg2.points[1]; + var intersection = lineIntersection(t0, p0, p1, t1); + if (intersection && pointDistance(intersection, p0) < miterLimit) { + outputBezier.setTripleAt( + intersection[0], + intersection[1], + intersection[0], + intersection[1], + intersection[0], + intersection[1], + outputBezier.length() + ); + return intersection; + } + + return p0; +} + +function getIntersection(a, b) { + const intersect = a.intersections(b); + + if (intersect.length && floatEqual(intersect[0][0], 1)) intersect.shift(); + + if (intersect.length) return intersect[0]; + + return null; +} + +function pruneSegmentIntersection(a, b) { + var outa = a.slice(); + var outb = b.slice(); + var intersect = getIntersection(a[a.length - 1], b[0]); + if (intersect) { + outa[a.length - 1] = a[a.length - 1].split(intersect[0])[0]; + outb[0] = b[0].split(intersect[1])[1]; + } + if (a.length > 1 && b.length > 1) { + intersect = getIntersection(a[0], b[b.length - 1]); + if (intersect) { + return [ + [a[0].split(intersect[0])[0]], + [b[b.length - 1].split(intersect[1])[1]], + ]; + } + } + return [outa, outb]; +} + +function pruneIntersections(segments) { + var e; + for (var i = 1; i < segments.length; i += 1) { + e = pruneSegmentIntersection(segments[i - 1], segments[i]); + segments[i - 1] = e[0]; + segments[i] = e[1]; + } + + if (segments.length > 1) { + e = pruneSegmentIntersection(segments[segments.length - 1], segments[0]); + segments[segments.length - 1] = e[0]; + segments[0] = e[1]; + } + + return segments; +} + +function offsetSegmentSplit(segment, amount) { + /* + We split each bezier segment into smaller pieces based + on inflection points, this ensures the control point + polygon is convex. + + (A cubic bezier can have none, one, or two inflection points) + */ + var flex = segment.inflectionPoints(); + var left; + var right; + var split; + var mid; + + if (flex.length === 0) { + return [offsetSegment(segment, amount)]; + } + + if (flex.length === 1 || floatEqual(flex[1], 1)) { + split = segment.split(flex[0]); + left = split[0]; + right = split[1]; + + return [ + offsetSegment(left, amount), + offsetSegment(right, amount), + ]; + } + + split = segment.split(flex[0]); + left = split[0]; + var t = (flex[1] - flex[0]) / (1 - flex[0]); + split = split[1].split(t); + mid = split[0]; + right = split[1]; + + return [ + offsetSegment(left, amount), + offsetSegment(mid, amount), + offsetSegment(right, amount), + ]; +} + +function OffsetPathModifier() {} + +extendPrototype([ShapeModifier], OffsetPathModifier); +OffsetPathModifier.prototype.initModifierProperties = function (elem, data) { + this.getValue = this.processKeys; + this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this); + this.miterLimit = PropertyFactory.getProp(elem, data.ml, 0, null, this); + this.lineJoin = data.lj; + this._isAnimated = this.amount.effectsSequence.length !== 0; +}; + +OffsetPathModifier.prototype.processPath = function (inputBezier, amount, lineJoin, miterLimit) { + var outputBezier = shapePool.newElement(); + outputBezier.c = inputBezier.c; + var count = inputBezier.length(); + if (!inputBezier.c) { + count -= 1; + } + var i; var j; var segment; + var multiSegments = []; + + for (i = 0; i < count; i += 1) { + segment = PolynomialBezier.shapeSegment(inputBezier, i); + multiSegments.push(offsetSegmentSplit(segment, amount)); + } + + if (!inputBezier.c) { + for (i = count - 1; i >= 0; i -= 1) { + segment = PolynomialBezier.shapeSegmentInverted(inputBezier, i); + multiSegments.push(offsetSegmentSplit(segment, amount)); + } + } + + multiSegments = pruneIntersections(multiSegments); + + // Add bezier segments to the output and apply line joints + var lastPoint = null; + var lastSeg = null; + + for (i = 0; i < multiSegments.length; i += 1) { + var multiSegment = multiSegments[i]; + + if (lastSeg) lastPoint = joinLines(outputBezier, lastSeg, multiSegment[0], lineJoin, miterLimit); + + lastSeg = multiSegment[multiSegment.length - 1]; + + for (j = 0; j < multiSegment.length; j += 1) { + segment = multiSegment[j]; + + if (lastPoint && pointEqual(segment.points[0], lastPoint)) { + outputBezier.setXYAt(segment.points[1][0], segment.points[1][1], 'o', outputBezier.length() - 1); + } else { + outputBezier.setTripleAt( + segment.points[0][0], + segment.points[0][1], + segment.points[1][0], + segment.points[1][1], + segment.points[0][0], + segment.points[0][1], + outputBezier.length() + ); + } + + outputBezier.setTripleAt( + segment.points[3][0], + segment.points[3][1], + segment.points[3][0], + segment.points[3][1], + segment.points[2][0], + segment.points[2][1], + outputBezier.length() + ); + + lastPoint = segment.points[3]; + } + } + + if (multiSegments.length) joinLines(outputBezier, lastSeg, multiSegments[0][0], lineJoin, miterLimit); + + return outputBezier; +}; + +OffsetPathModifier.prototype.processShapes = function (_isFirstFrame) { + var shapePaths; + var i; + var len = this.shapes.length; + var j; + var jLen; + var amount = this.amount.v; + var miterLimit = this.miterLimit.v; + var lineJoin = this.lineJoin; + + if (amount !== 0) { + var shapeData; + var localShapeCollection; + for (i = 0; i < len; i += 1) { + shapeData = this.shapes[i]; + localShapeCollection = shapeData.localShapeCollection; + if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { + localShapeCollection.releaseShapes(); + shapeData.shape._mdf = true; + shapePaths = shapeData.shape.paths.shapes; + jLen = shapeData.shape.paths._length; + for (j = 0; j < jLen; j += 1) { + localShapeCollection.addShape(this.processPath(shapePaths[j], amount, lineJoin, miterLimit)); + } + } + shapeData.shape.paths = shapeData.localShapeCollection; + } + } + if (!this.dynamicProperties.length) { + this._mdf = false; + } +}; + +export default OffsetPathModifier; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/PuckerAndBloatModifier.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/PuckerAndBloatModifier.js new file mode 100644 index 0000000000000000000000000000000000000000..5586c2871ec525b16a5b9446ae291110f495dd23 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/PuckerAndBloatModifier.js @@ -0,0 +1,80 @@ +import { + extendPrototype, +} from '../functionExtensions'; +import PropertyFactory from '../PropertyFactory'; +import shapePool from '../pooling/shape_pool'; +import { + ShapeModifier, +} from './ShapeModifiers'; + +function PuckerAndBloatModifier() {} +extendPrototype([ShapeModifier], PuckerAndBloatModifier); +PuckerAndBloatModifier.prototype.initModifierProperties = function (elem, data) { + this.getValue = this.processKeys; + this.amount = PropertyFactory.getProp(elem, data.a, 0, null, this); + this._isAnimated = !!this.amount.effectsSequence.length; +}; + +PuckerAndBloatModifier.prototype.processPath = function (path, amount) { + var percent = amount / 100; + var centerPoint = [0, 0]; + var pathLength = path._length; + var i = 0; + for (i = 0; i < pathLength; i += 1) { + centerPoint[0] += path.v[i][0]; + centerPoint[1] += path.v[i][1]; + } + centerPoint[0] /= pathLength; + centerPoint[1] /= pathLength; + var clonedPath = shapePool.newElement(); + clonedPath.c = path.c; + var vX; + var vY; + var oX; + var oY; + var iX; + var iY; + for (i = 0; i < pathLength; i += 1) { + vX = path.v[i][0] + (centerPoint[0] - path.v[i][0]) * percent; + vY = path.v[i][1] + (centerPoint[1] - path.v[i][1]) * percent; + oX = path.o[i][0] + (centerPoint[0] - path.o[i][0]) * -percent; + oY = path.o[i][1] + (centerPoint[1] - path.o[i][1]) * -percent; + iX = path.i[i][0] + (centerPoint[0] - path.i[i][0]) * -percent; + iY = path.i[i][1] + (centerPoint[1] - path.i[i][1]) * -percent; + clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, i); + } + return clonedPath; +}; + +PuckerAndBloatModifier.prototype.processShapes = function (_isFirstFrame) { + var shapePaths; + var i; + var len = this.shapes.length; + var j; + var jLen; + var amount = this.amount.v; + + if (amount !== 0) { + var shapeData; + var localShapeCollection; + for (i = 0; i < len; i += 1) { + shapeData = this.shapes[i]; + localShapeCollection = shapeData.localShapeCollection; + if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { + localShapeCollection.releaseShapes(); + shapeData.shape._mdf = true; + shapePaths = shapeData.shape.paths.shapes; + jLen = shapeData.shape.paths._length; + for (j = 0; j < jLen; j += 1) { + localShapeCollection.addShape(this.processPath(shapePaths[j], amount)); + } + } + shapeData.shape.paths = shapeData.localShapeCollection; + } + } + if (!this.dynamicProperties.length) { + this._mdf = false; + } +}; + +export default PuckerAndBloatModifier; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/RepeaterModifier.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/RepeaterModifier.js new file mode 100644 index 0000000000000000000000000000000000000000..8284b7ae7fe81bc272c4e188da27dc0ae1154b40 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/RepeaterModifier.js @@ -0,0 +1,232 @@ +import { + extendPrototype, +} from '../functionExtensions'; +import PropertyFactory from '../PropertyFactory'; +import Matrix from '../../3rd_party/transformation-matrix'; +import TransformPropertyFactory from '../TransformProperty'; +import { + ShapeModifier, +} from './ShapeModifiers'; + +function RepeaterModifier() {} +extendPrototype([ShapeModifier], RepeaterModifier); + +RepeaterModifier.prototype.initModifierProperties = function (elem, data) { + this.getValue = this.processKeys; + this.c = PropertyFactory.getProp(elem, data.c, 0, null, this); + this.o = PropertyFactory.getProp(elem, data.o, 0, null, this); + this.tr = TransformPropertyFactory.getTransformProperty(elem, data.tr, this); + this.so = PropertyFactory.getProp(elem, data.tr.so, 0, 0.01, this); + this.eo = PropertyFactory.getProp(elem, data.tr.eo, 0, 0.01, this); + this.data = data; + if (!this.dynamicProperties.length) { + this.getValue(true); + } + this._isAnimated = !!this.dynamicProperties.length; + this.pMatrix = new Matrix(); + this.rMatrix = new Matrix(); + this.sMatrix = new Matrix(); + this.tMatrix = new Matrix(); + this.matrix = new Matrix(); +}; + +RepeaterModifier.prototype.applyTransforms = function (pMatrix, rMatrix, sMatrix, transform, perc, inv) { + var dir = inv ? -1 : 1; + var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc); + var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc); + pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]); + rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]); + rMatrix.rotate(-transform.r.v * dir * perc); + rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]); + sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]); + sMatrix.scale(inv ? 1 / scaleX : scaleX, inv ? 1 / scaleY : scaleY); + sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]); +}; + +RepeaterModifier.prototype.init = function (elem, arr, pos, elemsData) { + this.elem = elem; + this.arr = arr; + this.pos = pos; + this.elemsData = elemsData; + this._currentCopies = 0; + this._elements = []; + this._groups = []; + this.frameId = -1; + this.initDynamicPropertyContainer(elem); + this.initModifierProperties(elem, arr[pos]); + while (pos > 0) { + pos -= 1; + // this._elements.unshift(arr.splice(pos,1)[0]); + this._elements.unshift(arr[pos]); + } + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.getValue(true); + } +}; + +RepeaterModifier.prototype.resetElements = function (elements) { + var i; + var len = elements.length; + for (i = 0; i < len; i += 1) { + elements[i]._processed = false; + if (elements[i].ty === 'gr') { + this.resetElements(elements[i].it); + } + } +}; + +RepeaterModifier.prototype.cloneElements = function (elements) { + var newElements = JSON.parse(JSON.stringify(elements)); + this.resetElements(newElements); + return newElements; +}; + +RepeaterModifier.prototype.changeGroupRender = function (elements, renderFlag) { + var i; + var len = elements.length; + for (i = 0; i < len; i += 1) { + elements[i]._render = renderFlag; + if (elements[i].ty === 'gr') { + this.changeGroupRender(elements[i].it, renderFlag); + } + } +}; + +RepeaterModifier.prototype.processShapes = function (_isFirstFrame) { + var items; + var itemsTransform; + var i; + var dir; + var cont; + var hasReloaded = false; + if (this._mdf || _isFirstFrame) { + var copies = Math.ceil(this.c.v); + if (this._groups.length < copies) { + while (this._groups.length < copies) { + var group = { + it: this.cloneElements(this._elements), + ty: 'gr', + }; + group.it.push({ + a: { a: 0, ix: 1, k: [0, 0] }, nm: 'Transform', o: { a: 0, ix: 7, k: 100 }, p: { a: 0, ix: 2, k: [0, 0] }, r: { a: 1, ix: 6, k: [{ s: 0, e: 0, t: 0 }, { s: 0, e: 0, t: 1 }] }, s: { a: 0, ix: 3, k: [100, 100] }, sa: { a: 0, ix: 5, k: 0 }, sk: { a: 0, ix: 4, k: 0 }, ty: 'tr', + }); + + this.arr.splice(0, 0, group); + this._groups.splice(0, 0, group); + this._currentCopies += 1; + } + this.elem.reloadShapes(); + hasReloaded = true; + } + cont = 0; + var renderFlag; + for (i = 0; i <= this._groups.length - 1; i += 1) { + renderFlag = cont < copies; + this._groups[i]._render = renderFlag; + this.changeGroupRender(this._groups[i].it, renderFlag); + if (!renderFlag) { + var elems = this.elemsData[i].it; + var transformData = elems[elems.length - 1]; + if (transformData.transform.op.v !== 0) { + transformData.transform.op._mdf = true; + transformData.transform.op.v = 0; + } else { + transformData.transform.op._mdf = false; + } + } + cont += 1; + } + + this._currentCopies = copies; + /// / + + var offset = this.o.v; + var offsetModulo = offset % 1; + var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset); + var pProps = this.pMatrix.props; + var rProps = this.rMatrix.props; + var sProps = this.sMatrix.props; + this.pMatrix.reset(); + this.rMatrix.reset(); + this.sMatrix.reset(); + this.tMatrix.reset(); + this.matrix.reset(); + var iteration = 0; + + if (offset > 0) { + while (iteration < roundOffset) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false); + iteration += 1; + } + if (offsetModulo) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false); + iteration += offsetModulo; + } + } else if (offset < 0) { + while (iteration > roundOffset) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true); + iteration -= 1; + } + if (offsetModulo) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, -offsetModulo, true); + iteration -= offsetModulo; + } + } + i = this.data.m === 1 ? 0 : this._currentCopies - 1; + dir = this.data.m === 1 ? 1 : -1; + cont = this._currentCopies; + var j; + var jLen; + while (cont) { + items = this.elemsData[i].it; + itemsTransform = items[items.length - 1].transform.mProps.v.props; + jLen = itemsTransform.length; + items[items.length - 1].transform.mProps._mdf = true; + items[items.length - 1].transform.op._mdf = true; + items[items.length - 1].transform.op.v = this._currentCopies === 1 + ? this.so.v + : this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1)); + + if (iteration !== 0) { + if ((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)) { + this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false); + } + this.matrix.transform(rProps[0], rProps[1], rProps[2], rProps[3], rProps[4], rProps[5], rProps[6], rProps[7], rProps[8], rProps[9], rProps[10], rProps[11], rProps[12], rProps[13], rProps[14], rProps[15]); + this.matrix.transform(sProps[0], sProps[1], sProps[2], sProps[3], sProps[4], sProps[5], sProps[6], sProps[7], sProps[8], sProps[9], sProps[10], sProps[11], sProps[12], sProps[13], sProps[14], sProps[15]); + this.matrix.transform(pProps[0], pProps[1], pProps[2], pProps[3], pProps[4], pProps[5], pProps[6], pProps[7], pProps[8], pProps[9], pProps[10], pProps[11], pProps[12], pProps[13], pProps[14], pProps[15]); + + for (j = 0; j < jLen; j += 1) { + itemsTransform[j] = this.matrix.props[j]; + } + this.matrix.reset(); + } else { + this.matrix.reset(); + for (j = 0; j < jLen; j += 1) { + itemsTransform[j] = this.matrix.props[j]; + } + } + iteration += 1; + cont -= 1; + i += dir; + } + } else { + cont = this._currentCopies; + i = 0; + dir = 1; + while (cont) { + items = this.elemsData[i].it; + itemsTransform = items[items.length - 1].transform.mProps.v.props; + items[items.length - 1].transform.mProps._mdf = false; + items[items.length - 1].transform.op._mdf = false; + cont -= 1; + i += dir; + } + } + return hasReloaded; +}; + +RepeaterModifier.prototype.addShape = function () {}; + +export default RepeaterModifier; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/RoundCornersModifier.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/RoundCornersModifier.js new file mode 100644 index 0000000000000000000000000000000000000000..b45c3fb528fcddb69282f8e7d025a75feda95b7c --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/RoundCornersModifier.js @@ -0,0 +1,122 @@ +import { + roundCorner, +} from '../common'; +import { + extendPrototype, +} from '../functionExtensions'; +import PropertyFactory from '../PropertyFactory'; +import shapePool from '../pooling/shape_pool'; +import { + ShapeModifier, +} from './ShapeModifiers'; + +function RoundCornersModifier() {} +extendPrototype([ShapeModifier], RoundCornersModifier); +RoundCornersModifier.prototype.initModifierProperties = function (elem, data) { + this.getValue = this.processKeys; + this.rd = PropertyFactory.getProp(elem, data.r, 0, null, this); + this._isAnimated = !!this.rd.effectsSequence.length; +}; + +RoundCornersModifier.prototype.processPath = function (path, round) { + var clonedPath = shapePool.newElement(); + clonedPath.c = path.c; + var i; + var len = path._length; + var currentV; + var currentI; + var currentO; + var closerV; + var distance; + var newPosPerc; + var index = 0; + var vX; + var vY; + var oX; + var oY; + var iX; + var iY; + for (i = 0; i < len; i += 1) { + currentV = path.v[i]; + currentO = path.o[i]; + currentI = path.i[i]; + if (currentV[0] === currentO[0] && currentV[1] === currentO[1] && currentV[0] === currentI[0] && currentV[1] === currentI[1]) { + if ((i === 0 || i === len - 1) && !path.c) { + clonedPath.setTripleAt(currentV[0], currentV[1], currentO[0], currentO[1], currentI[0], currentI[1], index); + /* clonedPath.v[index] = currentV; + clonedPath.o[index] = currentO; + clonedPath.i[index] = currentI; */ + index += 1; + } else { + if (i === 0) { + closerV = path.v[len - 1]; + } else { + closerV = path.v[i - 1]; + } + distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2)); + newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0; + iX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc; + vX = iX; + iY = currentV[1] - (currentV[1] - closerV[1]) * newPosPerc; + vY = iY; + oX = vX - (vX - currentV[0]) * roundCorner; + oY = vY - (vY - currentV[1]) * roundCorner; + clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index); + index += 1; + + if (i === len - 1) { + closerV = path.v[0]; + } else { + closerV = path.v[i + 1]; + } + distance = Math.sqrt(Math.pow(currentV[0] - closerV[0], 2) + Math.pow(currentV[1] - closerV[1], 2)); + newPosPerc = distance ? Math.min(distance / 2, round) / distance : 0; + oX = currentV[0] + (closerV[0] - currentV[0]) * newPosPerc; + vX = oX; + oY = currentV[1] + (closerV[1] - currentV[1]) * newPosPerc; + vY = oY; + iX = vX - (vX - currentV[0]) * roundCorner; + iY = vY - (vY - currentV[1]) * roundCorner; + clonedPath.setTripleAt(vX, vY, oX, oY, iX, iY, index); + index += 1; + } + } else { + clonedPath.setTripleAt(path.v[i][0], path.v[i][1], path.o[i][0], path.o[i][1], path.i[i][0], path.i[i][1], index); + index += 1; + } + } + return clonedPath; +}; + +RoundCornersModifier.prototype.processShapes = function (_isFirstFrame) { + var shapePaths; + var i; + var len = this.shapes.length; + var j; + var jLen; + var rd = this.rd.v; + + if (rd !== 0) { + var shapeData; + var localShapeCollection; + for (i = 0; i < len; i += 1) { + shapeData = this.shapes[i]; + localShapeCollection = shapeData.localShapeCollection; + if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { + localShapeCollection.releaseShapes(); + shapeData.shape._mdf = true; + shapePaths = shapeData.shape.paths.shapes; + jLen = shapeData.shape.paths._length; + for (j = 0; j < jLen; j += 1) { + localShapeCollection.addShape(this.processPath(shapePaths[j], rd)); + } + } + shapeData.shape.paths = shapeData.localShapeCollection; + } + } + if (!this.dynamicProperties.length) { + this._mdf = false; + } +}; + +export default RoundCornersModifier; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapeCollection.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapeCollection.js new file mode 100644 index 0000000000000000000000000000000000000000..ea4be625b89c51bb64875646973ee8984639895a --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapeCollection.js @@ -0,0 +1,29 @@ +import { + createSizedArray, +} from '../helpers/arrays'; +import shapePool from '../pooling/shape_pool'; + +function ShapeCollection() { + this._length = 0; + this._maxLength = 4; + this.shapes = createSizedArray(this._maxLength); +} + +ShapeCollection.prototype.addShape = function (shapeData) { + if (this._length === this._maxLength) { + this.shapes = this.shapes.concat(createSizedArray(this._maxLength)); + this._maxLength *= 2; + } + this.shapes[this._length] = shapeData; + this._length += 1; +}; + +ShapeCollection.prototype.releaseShapes = function () { + var i; + for (i = 0; i < this._length; i += 1) { + shapePool.release(this.shapes[i]); + } + this._length = 0; +}; + +export default ShapeCollection; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapeModifiers.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapeModifiers.js new file mode 100644 index 0000000000000000000000000000000000000000..6340f1f8bce4b5ed00b8dfb1be953f4fb1c8b4d7 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapeModifiers.js @@ -0,0 +1,71 @@ +import { + extendPrototype, +} from '../functionExtensions'; +import DynamicPropertyContainer from '../helpers/dynamicProperties'; +import { + initialDefaultFrame, +} from '../../main'; +import shapeCollectionPool from '../pooling/shapeCollection_pool'; + +const ShapeModifiers = (function () { + var ob = {}; + var modifiers = {}; + ob.registerModifier = registerModifier; + ob.getModifier = getModifier; + + function registerModifier(nm, factory) { + if (!modifiers[nm]) { + modifiers[nm] = factory; + } + } + + function getModifier(nm, elem, data) { + return new modifiers[nm](elem, data); + } + + return ob; +}()); + +function ShapeModifier() {} +ShapeModifier.prototype.initModifierProperties = function () {}; +ShapeModifier.prototype.addShapeToModifier = function () {}; +ShapeModifier.prototype.addShape = function (data) { + if (!this.closed) { + // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick. + data.sh.container.addDynamicProperty(data.sh); + var shapeData = { shape: data.sh, data: data, localShapeCollection: shapeCollectionPool.newShapeCollection() }; + this.shapes.push(shapeData); + this.addShapeToModifier(shapeData); + if (this._isAnimated) { + data.setAsAnimated(); + } + } +}; +ShapeModifier.prototype.init = function (elem, data) { + this.shapes = []; + this.elem = elem; + this.initDynamicPropertyContainer(elem); + this.initModifierProperties(elem, data); + this.frameId = initialDefaultFrame; + this.closed = false; + this.k = false; + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.getValue(true); + } +}; +ShapeModifier.prototype.processKeys = function () { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); +}; + +extendPrototype([DynamicPropertyContainer], ShapeModifier); + +export { + ShapeModifiers, + ShapeModifier, +}; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapePath.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapePath.js new file mode 100644 index 0000000000000000000000000000000000000000..3e55287882cc597b337afdaeb72573f14430135f --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapePath.js @@ -0,0 +1,100 @@ +import { + createSizedArray, +} from '../helpers/arrays'; +import pointPool from '../pooling/point_pool'; + +function ShapePath() { + this.c = false; + this._length = 0; + this._maxLength = 8; + this.v = createSizedArray(this._maxLength); + this.o = createSizedArray(this._maxLength); + this.i = createSizedArray(this._maxLength); +} + +ShapePath.prototype.setPathData = function (closed, len) { + this.c = closed; + this.setLength(len); + var i = 0; + while (i < len) { + this.v[i] = pointPool.newElement(); + this.o[i] = pointPool.newElement(); + this.i[i] = pointPool.newElement(); + i += 1; + } +}; + +ShapePath.prototype.setLength = function (len) { + while (this._maxLength < len) { + this.doubleArrayLength(); + } + this._length = len; +}; + +ShapePath.prototype.doubleArrayLength = function () { + this.v = this.v.concat(createSizedArray(this._maxLength)); + this.i = this.i.concat(createSizedArray(this._maxLength)); + this.o = this.o.concat(createSizedArray(this._maxLength)); + this._maxLength *= 2; +}; + +ShapePath.prototype.setXYAt = function (x, y, type, pos, replace) { + var arr; + this._length = Math.max(this._length, pos + 1); + if (this._length >= this._maxLength) { + this.doubleArrayLength(); + } + switch (type) { + case 'v': + arr = this.v; + break; + case 'i': + arr = this.i; + break; + case 'o': + arr = this.o; + break; + default: + arr = []; + break; + } + if (!arr[pos] || (arr[pos] && !replace)) { + arr[pos] = pointPool.newElement(); + } + arr[pos][0] = x; + arr[pos][1] = y; +}; + +ShapePath.prototype.setTripleAt = function (vX, vY, oX, oY, iX, iY, pos, replace) { + this.setXYAt(vX, vY, 'v', pos, replace); + this.setXYAt(oX, oY, 'o', pos, replace); + this.setXYAt(iX, iY, 'i', pos, replace); +}; + +ShapePath.prototype.reverse = function () { + var newPath = new ShapePath(); + newPath.setPathData(this.c, this._length); + var vertices = this.v; + var outPoints = this.o; + var inPoints = this.i; + var init = 0; + if (this.c) { + newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false); + init = 1; + } + var cnt = this._length - 1; + var len = this._length; + + var i; + for (i = init; i < len; i += 1) { + newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false); + cnt -= 1; + } + return newPath; +}; + +ShapePath.prototype.length = function () { + return this._length; +}; + +export default ShapePath; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapeProperty.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapeProperty.js new file mode 100644 index 0000000000000000000000000000000000000000..f06e38fcc8947a7addb0c8144d229152de83a73b --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ShapeProperty.js @@ -0,0 +1,546 @@ +import { + degToRads, + roundCorner, + bmMin, +} from '../common'; +import { + extendPrototype, +} from '../functionExtensions'; +import DynamicPropertyContainer from '../helpers/dynamicProperties'; +import PropertyFactory from '../PropertyFactory'; +import BezierFactory from '../../3rd_party/BezierEaser'; +import shapePool from '../pooling/shape_pool'; +import shapeCollectionPool from '../pooling/shapeCollection_pool'; + +const ShapePropertyFactory = (function () { + var initFrame = -999999; + + function interpolateShape(frameNum, previousValue, caching) { + var iterationIndex = caching.lastIndex; + var keyPropS; + var keyPropE; + var isHold; + var j; + var k; + var jLen; + var kLen; + var perc; + var vertexValue; + var kf = this.keyframes; + if (frameNum < kf[0].t - this.offsetTime) { + keyPropS = kf[0].s[0]; + isHold = true; + iterationIndex = 0; + } else if (frameNum >= kf[kf.length - 1].t - this.offsetTime) { + keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0]; + /* if(kf[kf.length - 1].s){ + keyPropS = kf[kf.length - 1].s[0]; + }else{ + keyPropS = kf[kf.length - 2].e[0]; + } */ + isHold = true; + } else { + var i = iterationIndex; + var len = kf.length - 1; + var flag = true; + var keyData; + var nextKeyData; + var keyframeMetadata; + while (flag) { + keyData = kf[i]; + nextKeyData = kf[i + 1]; + if ((nextKeyData.t - this.offsetTime) > frameNum) { + break; + } + if (i < len - 1) { + i += 1; + } else { + flag = false; + } + } + keyframeMetadata = this.keyframesMetadata[i] || {}; + isHold = keyData.h === 1; + iterationIndex = i; + if (!isHold) { + if (frameNum >= nextKeyData.t - this.offsetTime) { + perc = 1; + } else if (frameNum < keyData.t - this.offsetTime) { + perc = 0; + } else { + var fnc; + if (keyframeMetadata.__fnct) { + fnc = keyframeMetadata.__fnct; + } else { + fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y).get; + keyframeMetadata.__fnct = fnc; + } + perc = fnc((frameNum - (keyData.t - this.offsetTime)) / ((nextKeyData.t - this.offsetTime) - (keyData.t - this.offsetTime))); + } + keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0]; + } + keyPropS = keyData.s[0]; + } + jLen = previousValue._length; + kLen = keyPropS.i[0].length; + caching.lastIndex = iterationIndex; + + for (j = 0; j < jLen; j += 1) { + for (k = 0; k < kLen; k += 1) { + vertexValue = isHold ? keyPropS.i[j][k] : keyPropS.i[j][k] + (keyPropE.i[j][k] - keyPropS.i[j][k]) * perc; + previousValue.i[j][k] = vertexValue; + vertexValue = isHold ? keyPropS.o[j][k] : keyPropS.o[j][k] + (keyPropE.o[j][k] - keyPropS.o[j][k]) * perc; + previousValue.o[j][k] = vertexValue; + vertexValue = isHold ? keyPropS.v[j][k] : keyPropS.v[j][k] + (keyPropE.v[j][k] - keyPropS.v[j][k]) * perc; + previousValue.v[j][k] = vertexValue; + } + } + } + + function interpolateShapeCurrentTime() { + var frameNum = this.comp.renderedFrame - this.offsetTime; + var initTime = this.keyframes[0].t - this.offsetTime; + var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime; + var lastFrame = this._caching.lastFrame; + if (!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))) { + /// / + this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0; + this.interpolateShape(frameNum, this.pv, this._caching); + /// / + } + this._caching.lastFrame = frameNum; + return this.pv; + } + + function resetShape() { + this.paths = this.localShapeCollection; + } + + function shapesEqual(shape1, shape2) { + if (shape1._length !== shape2._length || shape1.c !== shape2.c) { + return false; + } + var i; + var len = shape1._length; + for (i = 0; i < len; i += 1) { + if (shape1.v[i][0] !== shape2.v[i][0] + || shape1.v[i][1] !== shape2.v[i][1] + || shape1.o[i][0] !== shape2.o[i][0] + || shape1.o[i][1] !== shape2.o[i][1] + || shape1.i[i][0] !== shape2.i[i][0] + || shape1.i[i][1] !== shape2.i[i][1]) { + return false; + } + } + return true; + } + + function setVValue(newPath) { + if (!shapesEqual(this.v, newPath)) { + this.v = shapePool.clone(newPath); + this.localShapeCollection.releaseShapes(); + this.localShapeCollection.addShape(this.v); + this._mdf = true; + this.paths = this.localShapeCollection; + } + } + + function processEffectsSequence() { + if (this.elem.globalData.frameId === this.frameId) { + return; + } if (!this.effectsSequence.length) { + this._mdf = false; + return; + } + if (this.lock) { + this.setVValue(this.pv); + return; + } + this.lock = true; + this._mdf = false; + var finalValue; + if (this.kf) { + finalValue = this.pv; + } else if (this.data.ks) { + finalValue = this.data.ks.k; + } else { + finalValue = this.data.pt.k; + } + var i; + var len = this.effectsSequence.length; + for (i = 0; i < len; i += 1) { + finalValue = this.effectsSequence[i](finalValue); + } + this.setVValue(finalValue); + this.lock = false; + this.frameId = this.elem.globalData.frameId; + } + + function ShapeProperty(elem, data, type) { + this.propType = 'shape'; + this.comp = elem.comp; + this.container = elem; + this.elem = elem; + this.data = data; + this.k = false; + this.kf = false; + this._mdf = false; + var pathData = type === 3 ? data.pt.k : data.ks.k; + this.v = shapePool.clone(pathData); + this.pv = shapePool.clone(this.v); + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.paths = this.localShapeCollection; + this.paths.addShape(this.v); + this.reset = resetShape; + this.effectsSequence = []; + } + + function addEffect(effectFunction) { + this.effectsSequence.push(effectFunction); + this.container.addDynamicProperty(this); + } + + ShapeProperty.prototype.interpolateShape = interpolateShape; + ShapeProperty.prototype.getValue = processEffectsSequence; + ShapeProperty.prototype.setVValue = setVValue; + ShapeProperty.prototype.addEffect = addEffect; + + function KeyframedShapeProperty(elem, data, type) { + this.propType = 'shape'; + this.comp = elem.comp; + this.elem = elem; + this.container = elem; + this.offsetTime = elem.data.st; + this.keyframes = type === 3 ? data.pt.k : data.ks.k; + this.keyframesMetadata = []; + this.k = true; + this.kf = true; + var len = this.keyframes[0].s[0].i.length; + this.v = shapePool.newElement(); + this.v.setPathData(this.keyframes[0].s[0].c, len); + this.pv = shapePool.clone(this.v); + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.paths = this.localShapeCollection; + this.paths.addShape(this.v); + this.lastFrame = initFrame; + this.reset = resetShape; + this._caching = { lastFrame: initFrame, lastIndex: 0 }; + this.effectsSequence = [interpolateShapeCurrentTime.bind(this)]; + } + KeyframedShapeProperty.prototype.getValue = processEffectsSequence; + KeyframedShapeProperty.prototype.interpolateShape = interpolateShape; + KeyframedShapeProperty.prototype.setVValue = setVValue; + KeyframedShapeProperty.prototype.addEffect = addEffect; + + var EllShapeProperty = (function () { + var cPoint = roundCorner; + + function EllShapePropertyFactory(elem, data) { + this.v = shapePool.newElement(); + this.v.setPathData(true, 4); + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.paths = this.localShapeCollection; + this.localShapeCollection.addShape(this.v); + this.d = data.d; + this.elem = elem; + this.comp = elem.comp; + this.frameId = -1; + this.initDynamicPropertyContainer(elem); + this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this); + this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this); + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.k = false; + this.convertEllToPath(); + } + } + + EllShapePropertyFactory.prototype = { + reset: resetShape, + getValue: function () { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); + + if (this._mdf) { + this.convertEllToPath(); + } + }, + convertEllToPath: function () { + var p0 = this.p.v[0]; + var p1 = this.p.v[1]; + var s0 = this.s.v[0] / 2; + var s1 = this.s.v[1] / 2; + var _cw = this.d !== 3; + var _v = this.v; + _v.v[0][0] = p0; + _v.v[0][1] = p1 - s1; + _v.v[1][0] = _cw ? p0 + s0 : p0 - s0; + _v.v[1][1] = p1; + _v.v[2][0] = p0; + _v.v[2][1] = p1 + s1; + _v.v[3][0] = _cw ? p0 - s0 : p0 + s0; + _v.v[3][1] = p1; + _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint; + _v.i[0][1] = p1 - s1; + _v.i[1][0] = _cw ? p0 + s0 : p0 - s0; + _v.i[1][1] = p1 - s1 * cPoint; + _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint; + _v.i[2][1] = p1 + s1; + _v.i[3][0] = _cw ? p0 - s0 : p0 + s0; + _v.i[3][1] = p1 + s1 * cPoint; + _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint; + _v.o[0][1] = p1 - s1; + _v.o[1][0] = _cw ? p0 + s0 : p0 - s0; + _v.o[1][1] = p1 + s1 * cPoint; + _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint; + _v.o[2][1] = p1 + s1; + _v.o[3][0] = _cw ? p0 - s0 : p0 + s0; + _v.o[3][1] = p1 - s1 * cPoint; + }, + }; + + extendPrototype([DynamicPropertyContainer], EllShapePropertyFactory); + + return EllShapePropertyFactory; + }()); + + var StarShapeProperty = (function () { + function StarShapePropertyFactory(elem, data) { + this.v = shapePool.newElement(); + this.v.setPathData(true, 0); + this.elem = elem; + this.comp = elem.comp; + this.data = data; + this.frameId = -1; + this.d = data.d; + this.initDynamicPropertyContainer(elem); + if (data.sy === 1) { + this.ir = PropertyFactory.getProp(elem, data.ir, 0, 0, this); + this.is = PropertyFactory.getProp(elem, data.is, 0, 0.01, this); + this.convertToPath = this.convertStarToPath; + } else { + this.convertToPath = this.convertPolygonToPath; + } + this.pt = PropertyFactory.getProp(elem, data.pt, 0, 0, this); + this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this); + this.r = PropertyFactory.getProp(elem, data.r, 0, degToRads, this); + this.or = PropertyFactory.getProp(elem, data.or, 0, 0, this); + this.os = PropertyFactory.getProp(elem, data.os, 0, 0.01, this); + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.localShapeCollection.addShape(this.v); + this.paths = this.localShapeCollection; + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.k = false; + this.convertToPath(); + } + } + + StarShapePropertyFactory.prototype = { + reset: resetShape, + getValue: function () { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); + if (this._mdf) { + this.convertToPath(); + } + }, + convertStarToPath: function () { + var numPts = Math.floor(this.pt.v) * 2; + var angle = (Math.PI * 2) / numPts; + /* this.v.v.length = numPts; + this.v.i.length = numPts; + this.v.o.length = numPts; */ + var longFlag = true; + var longRad = this.or.v; + var shortRad = this.ir.v; + var longRound = this.os.v; + var shortRound = this.is.v; + var longPerimSegment = (2 * Math.PI * longRad) / (numPts * 2); + var shortPerimSegment = (2 * Math.PI * shortRad) / (numPts * 2); + var i; + var rad; + var roundness; + var perimSegment; + var currentAng = -Math.PI / 2; + currentAng += this.r.v; + var dir = this.data.d === 3 ? -1 : 1; + this.v._length = 0; + for (i = 0; i < numPts; i += 1) { + rad = longFlag ? longRad : shortRad; + roundness = longFlag ? longRound : shortRound; + perimSegment = longFlag ? longPerimSegment : shortPerimSegment; + var x = rad * Math.cos(currentAng); + var y = rad * Math.sin(currentAng); + var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y); + var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y); + x += +this.p.v[0]; + y += +this.p.v[1]; + this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true); + + /* this.v.v[i] = [x,y]; + this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir]; + this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir]; + this.v._length = numPts; */ + longFlag = !longFlag; + currentAng += angle * dir; + } + }, + convertPolygonToPath: function () { + var numPts = Math.floor(this.pt.v); + var angle = (Math.PI * 2) / numPts; + var rad = this.or.v; + var roundness = this.os.v; + var perimSegment = (2 * Math.PI * rad) / (numPts * 4); + var i; + var currentAng = -Math.PI * 0.5; + var dir = this.data.d === 3 ? -1 : 1; + currentAng += this.r.v; + this.v._length = 0; + for (i = 0; i < numPts; i += 1) { + var x = rad * Math.cos(currentAng); + var y = rad * Math.sin(currentAng); + var ox = x === 0 && y === 0 ? 0 : y / Math.sqrt(x * x + y * y); + var oy = x === 0 && y === 0 ? 0 : -x / Math.sqrt(x * x + y * y); + x += +this.p.v[0]; + y += +this.p.v[1]; + this.v.setTripleAt(x, y, x - ox * perimSegment * roundness * dir, y - oy * perimSegment * roundness * dir, x + ox * perimSegment * roundness * dir, y + oy * perimSegment * roundness * dir, i, true); + currentAng += angle * dir; + } + this.paths.length = 0; + this.paths[0] = this.v; + }, + + }; + extendPrototype([DynamicPropertyContainer], StarShapePropertyFactory); + + return StarShapePropertyFactory; + }()); + + var RectShapeProperty = (function () { + function RectShapePropertyFactory(elem, data) { + this.v = shapePool.newElement(); + this.v.c = true; + this.localShapeCollection = shapeCollectionPool.newShapeCollection(); + this.localShapeCollection.addShape(this.v); + this.paths = this.localShapeCollection; + this.elem = elem; + this.comp = elem.comp; + this.frameId = -1; + this.d = data.d; + this.initDynamicPropertyContainer(elem); + this.p = PropertyFactory.getProp(elem, data.p, 1, 0, this); + this.s = PropertyFactory.getProp(elem, data.s, 1, 0, this); + this.r = PropertyFactory.getProp(elem, data.r, 0, 0, this); + if (this.dynamicProperties.length) { + this.k = true; + } else { + this.k = false; + this.convertRectToPath(); + } + } + + RectShapePropertyFactory.prototype = { + convertRectToPath: function () { + var p0 = this.p.v[0]; + var p1 = this.p.v[1]; + var v0 = this.s.v[0] / 2; + var v1 = this.s.v[1] / 2; + var round = bmMin(v0, v1, this.r.v); + var cPoint = round * (1 - roundCorner); + this.v._length = 0; + + if (this.d === 2 || this.d === 1) { + this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, 0, true); + this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, p0 + v0, p1 + v1 - round, 1, true); + if (round !== 0) { + this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, 2, true); + this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0 + round, p1 + v1, 3, true); + this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, 4, true); + this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1 + round, 5, true); + this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, 6, true); + this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, p0 + v0 - round, p1 - v1, 7, true); + } else { + this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0 + cPoint, p1 + v1, p0 - v0, p1 + v1, 2); + this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0, p1 - v1 + cPoint, p0 - v0, p1 - v1, 3); + } + } else { + this.v.setTripleAt(p0 + v0, p1 - v1 + round, p0 + v0, p1 - v1 + cPoint, p0 + v0, p1 - v1 + round, 0, true); + if (round !== 0) { + this.v.setTripleAt(p0 + v0 - round, p1 - v1, p0 + v0 - round, p1 - v1, p0 + v0 - cPoint, p1 - v1, 1, true); + this.v.setTripleAt(p0 - v0 + round, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0 + round, p1 - v1, 2, true); + this.v.setTripleAt(p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + round, p0 - v0, p1 - v1 + cPoint, 3, true); + this.v.setTripleAt(p0 - v0, p1 + v1 - round, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1 - round, 4, true); + this.v.setTripleAt(p0 - v0 + round, p1 + v1, p0 - v0 + round, p1 + v1, p0 - v0 + cPoint, p1 + v1, 5, true); + this.v.setTripleAt(p0 + v0 - round, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0 - round, p1 + v1, 6, true); + this.v.setTripleAt(p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - round, p0 + v0, p1 + v1 - cPoint, 7, true); + } else { + this.v.setTripleAt(p0 - v0, p1 - v1, p0 - v0 + cPoint, p1 - v1, p0 - v0, p1 - v1, 1, true); + this.v.setTripleAt(p0 - v0, p1 + v1, p0 - v0, p1 + v1 - cPoint, p0 - v0, p1 + v1, 2, true); + this.v.setTripleAt(p0 + v0, p1 + v1, p0 + v0 - cPoint, p1 + v1, p0 + v0, p1 + v1, 3, true); + } + } + }, + getValue: function () { + if (this.elem.globalData.frameId === this.frameId) { + return; + } + this.frameId = this.elem.globalData.frameId; + this.iterateDynamicProperties(); + if (this._mdf) { + this.convertRectToPath(); + } + }, + reset: resetShape, + }; + extendPrototype([DynamicPropertyContainer], RectShapePropertyFactory); + + return RectShapePropertyFactory; + }()); + + function getShapeProp(elem, data, type) { + var prop; + if (type === 3 || type === 4) { + var dataProp = type === 3 ? data.pt : data.ks; + var keys = dataProp.k; + if (keys.length) { + prop = new KeyframedShapeProperty(elem, data, type); + } else { + prop = new ShapeProperty(elem, data, type); + } + } else if (type === 5) { + prop = new RectShapeProperty(elem, data); + } else if (type === 6) { + prop = new EllShapeProperty(elem, data); + } else if (type === 7) { + prop = new StarShapeProperty(elem, data); + } + if (prop.k) { + elem.addDynamicProperty(prop); + } + return prop; + } + + function getConstructorFunction() { + return ShapeProperty; + } + + function getKeyframedConstructorFunction() { + return KeyframedShapeProperty; + } + + var ob = {}; + ob.getShapeProp = getShapeProp; + ob.getConstructorFunction = getConstructorFunction; + ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction; + return ob; +}()); + +export default ShapePropertyFactory; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/TrimModifier.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/TrimModifier.js new file mode 100644 index 0000000000000000000000000000000000000000..4d37df81c3bf039e8665e2f9cd8e5917210abece --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/TrimModifier.js @@ -0,0 +1,359 @@ +import { + extendPrototype, +} from '../functionExtensions'; +import PropertyFactory from '../PropertyFactory'; +import shapePool from '../pooling/shape_pool'; +import bez from '../bez'; +import { + ShapeModifier, +} from './ShapeModifiers'; +import segmentsLengthPool from '../pooling/segments_length_pool'; + +function TrimModifier() { +} +extendPrototype([ShapeModifier], TrimModifier); +TrimModifier.prototype.initModifierProperties = function (elem, data) { + this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this); + this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this); + this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this); + this.sValue = 0; + this.eValue = 0; + this.getValue = this.processKeys; + this.m = data.m; + this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length; +}; + +TrimModifier.prototype.addShapeToModifier = function (shapeData) { + shapeData.pathsData = []; +}; + +TrimModifier.prototype.calculateShapeEdges = function (s, e, shapeLength, addedLength, totalModifierLength) { + var segments = []; + if (e <= 1) { + segments.push({ + s: s, + e: e, + }); + } else if (s >= 1) { + segments.push({ + s: s - 1, + e: e - 1, + }); + } else { + segments.push({ + s: s, + e: 1, + }); + segments.push({ + s: 0, + e: e - 1, + }); + } + var shapeSegments = []; + var i; + var len = segments.length; + var segmentOb; + for (i = 0; i < len; i += 1) { + segmentOb = segments[i]; + if (!(segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength)) { + var shapeS; + var shapeE; + if (segmentOb.s * totalModifierLength <= addedLength) { + shapeS = 0; + } else { + shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength; + } + if (segmentOb.e * totalModifierLength >= addedLength + shapeLength) { + shapeE = 1; + } else { + shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength); + } + shapeSegments.push([shapeS, shapeE]); + } + } + if (!shapeSegments.length) { + shapeSegments.push([0, 0]); + } + return shapeSegments; +}; + +TrimModifier.prototype.releasePathsData = function (pathsData) { + var i; + var len = pathsData.length; + for (i = 0; i < len; i += 1) { + segmentsLengthPool.release(pathsData[i]); + } + pathsData.length = 0; + return pathsData; +}; + +TrimModifier.prototype.processShapes = function (_isFirstFrame) { + var s; + var e; + if (this._mdf || _isFirstFrame) { + var o = (this.o.v % 360) / 360; + if (o < 0) { + o += 1; + } + if (this.s.v > 1) { + s = 1 + o; + } else if (this.s.v < 0) { + s = 0 + o; + } else { + s = this.s.v + o; + } + if (this.e.v > 1) { + e = 1 + o; + } else if (this.e.v < 0) { + e = 0 + o; + } else { + e = this.e.v + o; + } + + if (s > e) { + var _s = s; + s = e; + e = _s; + } + s = Math.round(s * 10000) * 0.0001; + e = Math.round(e * 10000) * 0.0001; + this.sValue = s; + this.eValue = e; + } else { + s = this.sValue; + e = this.eValue; + } + var shapePaths; + var i; + var len = this.shapes.length; + var j; + var jLen; + var pathsData; + var pathData; + var totalShapeLength; + var totalModifierLength = 0; + + if (e === s) { + for (i = 0; i < len; i += 1) { + this.shapes[i].localShapeCollection.releaseShapes(); + this.shapes[i].shape._mdf = true; + this.shapes[i].shape.paths = this.shapes[i].localShapeCollection; + if (this._mdf) { + this.shapes[i].pathsData.length = 0; + } + } + } else if (!((e === 1 && s === 0) || (e === 0 && s === 1))) { + var segments = []; + var shapeData; + var localShapeCollection; + for (i = 0; i < len; i += 1) { + shapeData = this.shapes[i]; + // if shape hasn't changed and trim properties haven't changed, cached previous path can be used + if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) { + shapeData.shape.paths = shapeData.localShapeCollection; + } else { + shapePaths = shapeData.shape.paths; + jLen = shapePaths._length; + totalShapeLength = 0; + if (!shapeData.shape._mdf && shapeData.pathsData.length) { + totalShapeLength = shapeData.totalShapeLength; + } else { + pathsData = this.releasePathsData(shapeData.pathsData); + for (j = 0; j < jLen; j += 1) { + pathData = bez.getSegmentsLength(shapePaths.shapes[j]); + pathsData.push(pathData); + totalShapeLength += pathData.totalLength; + } + shapeData.totalShapeLength = totalShapeLength; + shapeData.pathsData = pathsData; + } + + totalModifierLength += totalShapeLength; + shapeData.shape._mdf = true; + } + } + var shapeS = s; + var shapeE = e; + var addedLength = 0; + var edges; + for (i = len - 1; i >= 0; i -= 1) { + shapeData = this.shapes[i]; + if (shapeData.shape._mdf) { + localShapeCollection = shapeData.localShapeCollection; + localShapeCollection.releaseShapes(); + // if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group + if (this.m === 2 && len > 1) { + edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength); + addedLength += shapeData.totalShapeLength; + } else { + edges = [[shapeS, shapeE]]; + } + jLen = edges.length; + for (j = 0; j < jLen; j += 1) { + shapeS = edges[j][0]; + shapeE = edges[j][1]; + segments.length = 0; + if (shapeE <= 1) { + segments.push({ + s: shapeData.totalShapeLength * shapeS, + e: shapeData.totalShapeLength * shapeE, + }); + } else if (shapeS >= 1) { + segments.push({ + s: shapeData.totalShapeLength * (shapeS - 1), + e: shapeData.totalShapeLength * (shapeE - 1), + }); + } else { + segments.push({ + s: shapeData.totalShapeLength * shapeS, + e: shapeData.totalShapeLength, + }); + segments.push({ + s: 0, + e: shapeData.totalShapeLength * (shapeE - 1), + }); + } + var newShapesData = this.addShapes(shapeData, segments[0]); + if (segments[0].s !== segments[0].e) { + if (segments.length > 1) { + var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1]; + if (lastShapeInCollection.c) { + var lastShape = newShapesData.pop(); + this.addPaths(newShapesData, localShapeCollection); + newShapesData = this.addShapes(shapeData, segments[1], lastShape); + } else { + this.addPaths(newShapesData, localShapeCollection); + newShapesData = this.addShapes(shapeData, segments[1]); + } + } + this.addPaths(newShapesData, localShapeCollection); + } + } + shapeData.shape.paths = localShapeCollection; + } + } + } else if (this._mdf) { + for (i = 0; i < len; i += 1) { + // Releasign Trim Cached paths data when no trim applied in case shapes are modified in between. + // Don't remove this even if it's losing cached info. + this.shapes[i].pathsData.length = 0; + this.shapes[i].shape._mdf = true; + } + } +}; + +TrimModifier.prototype.addPaths = function (newPaths, localShapeCollection) { + var i; + var len = newPaths.length; + for (i = 0; i < len; i += 1) { + localShapeCollection.addShape(newPaths[i]); + } +}; + +TrimModifier.prototype.addSegment = function (pt1, pt2, pt3, pt4, shapePath, pos, newShape) { + shapePath.setXYAt(pt2[0], pt2[1], 'o', pos); + shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1); + if (newShape) { + shapePath.setXYAt(pt1[0], pt1[1], 'v', pos); + } + shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1); +}; + +TrimModifier.prototype.addSegmentFromArray = function (points, shapePath, pos, newShape) { + shapePath.setXYAt(points[1], points[5], 'o', pos); + shapePath.setXYAt(points[2], points[6], 'i', pos + 1); + if (newShape) { + shapePath.setXYAt(points[0], points[4], 'v', pos); + } + shapePath.setXYAt(points[3], points[7], 'v', pos + 1); +}; + +TrimModifier.prototype.addShapes = function (shapeData, shapeSegment, shapePath) { + var pathsData = shapeData.pathsData; + var shapePaths = shapeData.shape.paths.shapes; + var i; + var len = shapeData.shape.paths._length; + var j; + var jLen; + var addedLength = 0; + var currentLengthData; + var segmentCount; + var lengths; + var segment; + var shapes = []; + var initPos; + var newShape = true; + if (!shapePath) { + shapePath = shapePool.newElement(); + segmentCount = 0; + initPos = 0; + } else { + segmentCount = shapePath._length; + initPos = shapePath._length; + } + shapes.push(shapePath); + for (i = 0; i < len; i += 1) { + lengths = pathsData[i].lengths; + shapePath.c = shapePaths[i].c; + jLen = shapePaths[i].c ? lengths.length : lengths.length + 1; + for (j = 1; j < jLen; j += 1) { + currentLengthData = lengths[j - 1]; + if (addedLength + currentLengthData.addedLength < shapeSegment.s) { + addedLength += currentLengthData.addedLength; + shapePath.c = false; + } else if (addedLength > shapeSegment.e) { + shapePath.c = false; + break; + } else { + if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) { + this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape); + newShape = false; + } else { + segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength) / currentLengthData.addedLength, (shapeSegment.e - addedLength) / currentLengthData.addedLength, lengths[j - 1]); + this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); + // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape); + newShape = false; + shapePath.c = false; + } + addedLength += currentLengthData.addedLength; + segmentCount += 1; + } + } + if (shapePaths[i].c && lengths.length) { + currentLengthData = lengths[j - 1]; + if (addedLength <= shapeSegment.e) { + var segmentLength = lengths[j - 1].addedLength; + if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) { + this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape); + newShape = false; + } else { + segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]); + this.addSegmentFromArray(segment, shapePath, segmentCount, newShape); + // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape); + newShape = false; + shapePath.c = false; + } + } else { + shapePath.c = false; + } + addedLength += currentLengthData.addedLength; + segmentCount += 1; + } + if (shapePath._length) { + shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos); + shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1], 'o', shapePath._length - 1); + } + if (addedLength > shapeSegment.e) { + break; + } + if (i < len - 1) { + shapePath = shapePool.newElement(); + newShape = true; + shapes.push(shapePath); + segmentCount = 0; + } + } + return shapes; +}; + +export default TrimModifier; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ZigZagModifier.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ZigZagModifier.js new file mode 100644 index 0000000000000000000000000000000000000000..f84538b9792bddbb755e8f877b196a65939ad6bd --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/ZigZagModifier.js @@ -0,0 +1,174 @@ +import { + extendPrototype, +} from '../functionExtensions'; +import PropertyFactory from '../PropertyFactory'; +import shapePool from '../pooling/shape_pool'; +import { + ShapeModifier, +} from './ShapeModifiers'; +import { PolynomialBezier } from '../PolynomialBezier'; + +function ZigZagModifier() {} +extendPrototype([ShapeModifier], ZigZagModifier); +ZigZagModifier.prototype.initModifierProperties = function (elem, data) { + this.getValue = this.processKeys; + this.amplitude = PropertyFactory.getProp(elem, data.s, 0, null, this); + this.frequency = PropertyFactory.getProp(elem, data.r, 0, null, this); + this.pointsType = PropertyFactory.getProp(elem, data.pt, 0, null, this); + this._isAnimated = this.amplitude.effectsSequence.length !== 0 || this.frequency.effectsSequence.length !== 0 || this.pointsType.effectsSequence.length !== 0; +}; + +function setPoint(outputBezier, point, angle, direction, amplitude, outAmplitude, inAmplitude) { + var angO = angle - Math.PI / 2; + var angI = angle + Math.PI / 2; + var px = point[0] + Math.cos(angle) * direction * amplitude; + var py = point[1] - Math.sin(angle) * direction * amplitude; + + outputBezier.setTripleAt( + px, + py, + px + Math.cos(angO) * outAmplitude, + py - Math.sin(angO) * outAmplitude, + px + Math.cos(angI) * inAmplitude, + py - Math.sin(angI) * inAmplitude, + outputBezier.length() + ); +} + +function getPerpendicularVector(pt1, pt2) { + var vector = [ + pt2[0] - pt1[0], + pt2[1] - pt1[1], + ]; + var rot = -Math.PI * 0.5; + var rotatedVector = [ + Math.cos(rot) * vector[0] - Math.sin(rot) * vector[1], + Math.sin(rot) * vector[0] + Math.cos(rot) * vector[1], + ]; + return rotatedVector; +} + +function getProjectingAngle(path, cur) { + var prevIndex = cur === 0 ? path.length() - 1 : cur - 1; + var nextIndex = (cur + 1) % path.length(); + var prevPoint = path.v[prevIndex]; + var nextPoint = path.v[nextIndex]; + var pVector = getPerpendicularVector(prevPoint, nextPoint); + return Math.atan2(0, 1) - Math.atan2(pVector[1], pVector[0]); +} + +function zigZagCorner(outputBezier, path, cur, amplitude, frequency, pointType, direction) { + var angle = getProjectingAngle(path, cur); + var point = path.v[cur % path._length]; + var prevPoint = path.v[cur === 0 ? path._length - 1 : cur - 1]; + var nextPoint = path.v[(cur + 1) % path._length]; + var prevDist = pointType === 2 + ? Math.sqrt(Math.pow(point[0] - prevPoint[0], 2) + Math.pow(point[1] - prevPoint[1], 2)) + : 0; + var nextDist = pointType === 2 + ? Math.sqrt(Math.pow(point[0] - nextPoint[0], 2) + Math.pow(point[1] - nextPoint[1], 2)) + : 0; + + setPoint( + outputBezier, + path.v[cur % path._length], + angle, + direction, + amplitude, + nextDist / ((frequency + 1) * 2), + prevDist / ((frequency + 1) * 2), + pointType + ); +} + +function zigZagSegment(outputBezier, segment, amplitude, frequency, pointType, direction) { + for (var i = 0; i < frequency; i += 1) { + var t = (i + 1) / (frequency + 1); + + var dist = pointType === 2 + ? Math.sqrt(Math.pow(segment.points[3][0] - segment.points[0][0], 2) + Math.pow(segment.points[3][1] - segment.points[0][1], 2)) + : 0; + + var angle = segment.normalAngle(t); + var point = segment.point(t); + setPoint( + outputBezier, + point, + angle, + direction, + amplitude, + dist / ((frequency + 1) * 2), + dist / ((frequency + 1) * 2), + pointType + ); + + direction = -direction; + } + + return direction; +} + +ZigZagModifier.prototype.processPath = function (path, amplitude, frequency, pointType) { + var count = path._length; + var clonedPath = shapePool.newElement(); + clonedPath.c = path.c; + + if (!path.c) { + count -= 1; + } + + if (count === 0) return clonedPath; + + var direction = -1; + var segment = PolynomialBezier.shapeSegment(path, 0); + zigZagCorner(clonedPath, path, 0, amplitude, frequency, pointType, direction); + + for (var i = 0; i < count; i += 1) { + direction = zigZagSegment(clonedPath, segment, amplitude, frequency, pointType, -direction); + + if (i === count - 1 && !path.c) { + segment = null; + } else { + segment = PolynomialBezier.shapeSegment(path, (i + 1) % count); + } + + zigZagCorner(clonedPath, path, i + 1, amplitude, frequency, pointType, direction); + } + + return clonedPath; +}; + +ZigZagModifier.prototype.processShapes = function (_isFirstFrame) { + var shapePaths; + var i; + var len = this.shapes.length; + var j; + var jLen; + var amplitude = this.amplitude.v; + var frequency = Math.max(0, Math.round(this.frequency.v)); + var pointType = this.pointsType.v; + + if (amplitude !== 0) { + var shapeData; + var localShapeCollection; + for (i = 0; i < len; i += 1) { + shapeData = this.shapes[i]; + localShapeCollection = shapeData.localShapeCollection; + if (!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)) { + localShapeCollection.releaseShapes(); + shapeData.shape._mdf = true; + shapePaths = shapeData.shape.paths.shapes; + jLen = shapeData.shape.paths._length; + for (j = 0; j < jLen; j += 1) { + localShapeCollection.addShape(this.processPath(shapePaths[j], amplitude, frequency, pointType)); + } + } + shapeData.shape.paths = shapeData.localShapeCollection; + } + } + if (!this.dynamicProperties.length) { + this._mdf = false; + } +}; + +export default ZigZagModifier; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/shapePathBuilder.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/shapePathBuilder.js new file mode 100644 index 0000000000000000000000000000000000000000..36fc1024ff49325787f47c88345167ee0a819ac5 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/shapes/shapePathBuilder.js @@ -0,0 +1,20 @@ +const buildShapeString = function (pathNodes, length, closed, mat) { + if (length === 0) { + return ''; + } + var _o = pathNodes.o; + var _i = pathNodes.i; + var _v = pathNodes.v; + var i; + var shapeString = ' M' + mat.applyToPointStringified(_v[0][0], _v[0][1]); + for (i = 1; i < length; i += 1) { + shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[i][0], _i[i][1]) + ' ' + mat.applyToPointStringified(_v[i][0], _v[i][1]); + } + if (closed && length) { + shapeString += ' C' + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + ' ' + mat.applyToPointStringified(_i[0][0], _i[0][1]) + ' ' + mat.applyToPointStringified(_v[0][0], _v[0][1]); + shapeString += 'z'; + } + return shapeString; +}; + +export default buildShapeString; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/LetterProps.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/LetterProps.js new file mode 100644 index 0000000000000000000000000000000000000000..1c752d6b18b1a53bf350793c7313c0ccb06442c3 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/LetterProps.js @@ -0,0 +1,60 @@ +function LetterProps(o, sw, sc, fc, m, p) { + this.o = o; + this.sw = sw; + this.sc = sc; + this.fc = fc; + this.m = m; + this.p = p; + this._mdf = { + o: true, + sw: !!sw, + sc: !!sc, + fc: !!fc, + m: true, + p: true, + }; +} + +LetterProps.prototype.update = function (o, sw, sc, fc, m, p) { + this._mdf.o = false; + this._mdf.sw = false; + this._mdf.sc = false; + this._mdf.fc = false; + this._mdf.m = false; + this._mdf.p = false; + var updated = false; + + if (this.o !== o) { + this.o = o; + this._mdf.o = true; + updated = true; + } + if (this.sw !== sw) { + this.sw = sw; + this._mdf.sw = true; + updated = true; + } + if (this.sc !== sc) { + this.sc = sc; + this._mdf.sc = true; + updated = true; + } + if (this.fc !== fc) { + this.fc = fc; + this._mdf.fc = true; + updated = true; + } + if (this.m !== m) { + this.m = m; + this._mdf.m = true; + updated = true; + } + if (p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) { + this.p = p; + this._mdf.p = true; + updated = true; + } + return updated; +}; + +export default LetterProps; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextAnimatorDataProperty.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextAnimatorDataProperty.js new file mode 100644 index 0000000000000000000000000000000000000000..535c882e618f69bee4e03a0fae9d204cb40dff67 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextAnimatorDataProperty.js @@ -0,0 +1,34 @@ +import { + degToRads, +} from '../common'; +import PropertyFactory from '../PropertyFactory'; +import TextSelectorProp from './TextSelectorProperty'; + +function TextAnimatorDataProperty(elem, animatorProps, container) { + var defaultData = { propType: false }; + var getProp = PropertyFactory.getProp; + var textAnimatorAnimatables = animatorProps.a; + this.a = { + r: textAnimatorAnimatables.r ? getProp(elem, textAnimatorAnimatables.r, 0, degToRads, container) : defaultData, + rx: textAnimatorAnimatables.rx ? getProp(elem, textAnimatorAnimatables.rx, 0, degToRads, container) : defaultData, + ry: textAnimatorAnimatables.ry ? getProp(elem, textAnimatorAnimatables.ry, 0, degToRads, container) : defaultData, + sk: textAnimatorAnimatables.sk ? getProp(elem, textAnimatorAnimatables.sk, 0, degToRads, container) : defaultData, + sa: textAnimatorAnimatables.sa ? getProp(elem, textAnimatorAnimatables.sa, 0, degToRads, container) : defaultData, + s: textAnimatorAnimatables.s ? getProp(elem, textAnimatorAnimatables.s, 1, 0.01, container) : defaultData, + a: textAnimatorAnimatables.a ? getProp(elem, textAnimatorAnimatables.a, 1, 0, container) : defaultData, + o: textAnimatorAnimatables.o ? getProp(elem, textAnimatorAnimatables.o, 0, 0.01, container) : defaultData, + p: textAnimatorAnimatables.p ? getProp(elem, textAnimatorAnimatables.p, 1, 0, container) : defaultData, + sw: textAnimatorAnimatables.sw ? getProp(elem, textAnimatorAnimatables.sw, 0, 0, container) : defaultData, + sc: textAnimatorAnimatables.sc ? getProp(elem, textAnimatorAnimatables.sc, 1, 0, container) : defaultData, + fc: textAnimatorAnimatables.fc ? getProp(elem, textAnimatorAnimatables.fc, 1, 0, container) : defaultData, + fh: textAnimatorAnimatables.fh ? getProp(elem, textAnimatorAnimatables.fh, 0, 0, container) : defaultData, + fs: textAnimatorAnimatables.fs ? getProp(elem, textAnimatorAnimatables.fs, 0, 0.01, container) : defaultData, + fb: textAnimatorAnimatables.fb ? getProp(elem, textAnimatorAnimatables.fb, 0, 0.01, container) : defaultData, + t: textAnimatorAnimatables.t ? getProp(elem, textAnimatorAnimatables.t, 0, 0, container) : defaultData, + }; + + this.s = TextSelectorProp.getTextSelectorProp(elem, animatorProps.s, container); + this.s.t = animatorProps.s.t; +} + +export default TextAnimatorDataProperty; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextAnimatorProperty.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextAnimatorProperty.js new file mode 100644 index 0000000000000000000000000000000000000000..47df2d9e1731ccfb5e73642dca7468c7325c1463 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextAnimatorProperty.js @@ -0,0 +1,610 @@ +import { + addSaturationToRGB, + addBrightnessToRGB, + addHueToRGB, +} from '../common'; +import { + extendPrototype, +} from '../functionExtensions'; +import DynamicPropertyContainer from '../helpers/dynamicProperties'; +import { + createSizedArray, +} from '../helpers/arrays'; +import PropertyFactory from '../PropertyFactory'; +import bez from '../bez'; +import Matrix from '../../3rd_party/transformation-matrix'; +import TextAnimatorDataProperty from './TextAnimatorDataProperty'; +import LetterProps from './LetterProps'; + +function TextAnimatorProperty(textData, renderType, elem) { + this._isFirstFrame = true; + this._hasMaskedPath = false; + this._frameId = -1; + this._textData = textData; + this._renderType = renderType; + this._elem = elem; + this._animatorsData = createSizedArray(this._textData.a.length); + this._pathData = {}; + this._moreOptions = { + alignment: {}, + }; + this.renderedLetters = []; + this.lettersChangedFlag = false; + this.initDynamicPropertyContainer(elem); +} + +TextAnimatorProperty.prototype.searchProperties = function () { + var i; + var len = this._textData.a.length; + var animatorProps; + var getProp = PropertyFactory.getProp; + for (i = 0; i < len; i += 1) { + animatorProps = this._textData.a[i]; + this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this); + } + if (this._textData.p && 'm' in this._textData.p) { + this._pathData = { + a: getProp(this._elem, this._textData.p.a, 0, 0, this), + f: getProp(this._elem, this._textData.p.f, 0, 0, this), + l: getProp(this._elem, this._textData.p.l, 0, 0, this), + r: getProp(this._elem, this._textData.p.r, 0, 0, this), + p: getProp(this._elem, this._textData.p.p, 0, 0, this), + m: this._elem.maskManager.getMaskProperty(this._textData.p.m), + }; + this._hasMaskedPath = true; + } else { + this._hasMaskedPath = false; + } + this._moreOptions.alignment = getProp(this._elem, this._textData.m.a, 1, 0, this); +}; + +TextAnimatorProperty.prototype.getMeasures = function (documentData, lettersChangedFlag) { + this.lettersChangedFlag = lettersChangedFlag; + if (!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) { + return; + } + this._isFirstFrame = false; + var alignment = this._moreOptions.alignment.v; + var animators = this._animatorsData; + var textData = this._textData; + var matrixHelper = this.mHelper; + var renderType = this._renderType; + var renderedLettersCount = this.renderedLetters.length; + var xPos; + var yPos; + var i; + var len; + var letters = documentData.l; + var pathInfo; + var currentLength; + var currentPoint; + var segmentLength; + var flag; + var pointInd; + var segmentInd; + var prevPoint; + var points; + var segments; + var partialLength; + var totalLength; + var perc; + var tanAngle; + var mask; + if (this._hasMaskedPath) { + mask = this._pathData.m; + if (!this._pathData.n || this._pathData._mdf) { + var paths = mask.v; + if (this._pathData.r.v) { + paths = paths.reverse(); + } + // TODO: release bezier data cached from previous pathInfo: this._pathData.pi + pathInfo = { + tLength: 0, + segments: [], + }; + len = paths._length - 1; + var bezierData; + totalLength = 0; + for (i = 0; i < len; i += 1) { + bezierData = bez.buildBezierData(paths.v[i], + paths.v[i + 1], + [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], + [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]); + pathInfo.tLength += bezierData.segmentLength; + pathInfo.segments.push(bezierData); + totalLength += bezierData.segmentLength; + } + i = len; + if (mask.v.c) { + bezierData = bez.buildBezierData(paths.v[i], + paths.v[0], + [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]], + [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]); + pathInfo.tLength += bezierData.segmentLength; + pathInfo.segments.push(bezierData); + totalLength += bezierData.segmentLength; + } + this._pathData.pi = pathInfo; + } + pathInfo = this._pathData.pi; + + currentLength = this._pathData.f.v; + segmentInd = 0; + pointInd = 1; + segmentLength = 0; + flag = true; + segments = pathInfo.segments; + if (currentLength < 0 && mask.v.c) { + if (pathInfo.tLength < Math.abs(currentLength)) { + currentLength = -Math.abs(currentLength) % pathInfo.tLength; + } + segmentInd = segments.length - 1; + points = segments[segmentInd].points; + pointInd = points.length - 1; + while (currentLength < 0) { + currentLength += points[pointInd].partialLength; + pointInd -= 1; + if (pointInd < 0) { + segmentInd -= 1; + points = segments[segmentInd].points; + pointInd = points.length - 1; + } + } + } + points = segments[segmentInd].points; + prevPoint = points[pointInd - 1]; + currentPoint = points[pointInd]; + partialLength = currentPoint.partialLength; + } + + len = letters.length; + xPos = 0; + yPos = 0; + var yOff = documentData.finalSize * 1.2 * 0.714; + var firstLine = true; + var animatorProps; + var animatorSelector; + var j; + var jLen; + var letterValue; + + jLen = animators.length; + + var mult; + var ind = -1; + var offf; + var xPathPos; + var yPathPos; + var initPathPos = currentLength; + var initSegmentInd = segmentInd; + var initPointInd = pointInd; + var currentLine = -1; + var elemOpacity; + var sc; + var sw; + var fc; + var k; + var letterSw; + var letterSc; + var letterFc; + var letterM = ''; + var letterP = this.defaultPropsArray; + var letterO; + + // + if (documentData.j === 2 || documentData.j === 1) { + var animatorJustifyOffset = 0; + var animatorFirstCharOffset = 0; + var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1; + var lastIndex = 0; + var isNewLine = true; + + for (i = 0; i < len; i += 1) { + if (letters[i].n) { + if (animatorJustifyOffset) { + animatorJustifyOffset += animatorFirstCharOffset; + } + while (lastIndex < i) { + letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset; + lastIndex += 1; + } + animatorJustifyOffset = 0; + isNewLine = true; + } else { + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.t.propType) { + if (isNewLine && documentData.j === 2) { + animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult; + } + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (mult.length) { + animatorJustifyOffset += animatorProps.t.v * mult[0] * justifyOffsetMult; + } else { + animatorJustifyOffset += animatorProps.t.v * mult * justifyOffsetMult; + } + } + } + isNewLine = false; + } + } + if (animatorJustifyOffset) { + animatorJustifyOffset += animatorFirstCharOffset; + } + while (lastIndex < i) { + letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset; + lastIndex += 1; + } + } + // + + for (i = 0; i < len; i += 1) { + matrixHelper.reset(); + elemOpacity = 1; + if (letters[i].n) { + xPos = 0; + yPos += documentData.yOffset; + yPos += firstLine ? 1 : 0; + currentLength = initPathPos; + firstLine = false; + if (this._hasMaskedPath) { + segmentInd = initSegmentInd; + pointInd = initPointInd; + points = segments[segmentInd].points; + prevPoint = points[pointInd - 1]; + currentPoint = points[pointInd]; + partialLength = currentPoint.partialLength; + segmentLength = 0; + } + letterM = ''; + letterFc = ''; + letterSw = ''; + letterO = ''; + letterP = this.defaultPropsArray; + } else { + if (this._hasMaskedPath) { + if (currentLine !== letters[i].line) { + switch (documentData.j) { + case 1: + currentLength += totalLength - documentData.lineWidths[letters[i].line]; + break; + case 2: + currentLength += (totalLength - documentData.lineWidths[letters[i].line]) / 2; + break; + default: + break; + } + currentLine = letters[i].line; + } + if (ind !== letters[i].ind) { + if (letters[ind]) { + currentLength += letters[ind].extra; + } + currentLength += letters[i].an / 2; + ind = letters[i].ind; + } + currentLength += (alignment[0] * letters[i].an) * 0.005; + var animatorOffset = 0; + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.p.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (mult.length) { + animatorOffset += animatorProps.p.v[0] * mult[0]; + } else { + animatorOffset += animatorProps.p.v[0] * mult; + } + } + if (animatorProps.a.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (mult.length) { + animatorOffset += animatorProps.a.v[0] * mult[0]; + } else { + animatorOffset += animatorProps.a.v[0] * mult; + } + } + } + flag = true; + // Force alignment only works with a single line for now + if (this._pathData.a.v) { + currentLength = letters[0].an * 0.5 + ((totalLength - this._pathData.f.v - letters[0].an * 0.5 - letters[letters.length - 1].an * 0.5) * ind) / (len - 1); + currentLength += this._pathData.f.v; + } + while (flag) { + if (segmentLength + partialLength >= currentLength + animatorOffset || !points) { + perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength; + xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc; + yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc; + matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, -(alignment[1] * yOff) * 0.01); + flag = false; + } else if (points) { + segmentLength += currentPoint.partialLength; + pointInd += 1; + if (pointInd >= points.length) { + pointInd = 0; + segmentInd += 1; + if (!segments[segmentInd]) { + if (mask.v.c) { + pointInd = 0; + segmentInd = 0; + points = segments[segmentInd].points; + } else { + segmentLength -= currentPoint.partialLength; + points = null; + } + } else { + points = segments[segmentInd].points; + } + } + if (points) { + prevPoint = currentPoint; + currentPoint = points[pointInd]; + partialLength = currentPoint.partialLength; + } + } + } + offf = letters[i].an / 2 - letters[i].add; + matrixHelper.translate(-offf, 0, 0); + } else { + offf = letters[i].an / 2 - letters[i].add; + matrixHelper.translate(-offf, 0, 0); + + // Grouping alignment + matrixHelper.translate((-alignment[0] * letters[i].an) * 0.005, (-alignment[1] * yOff) * 0.01, 0); + } + + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.t.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + // This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine" + if (xPos !== 0 || documentData.j !== 0) { + if (this._hasMaskedPath) { + if (mult.length) { + currentLength += animatorProps.t.v * mult[0]; + } else { + currentLength += animatorProps.t.v * mult; + } + } else if (mult.length) { + xPos += animatorProps.t.v * mult[0]; + } else { + xPos += animatorProps.t.v * mult; + } + } + } + } + if (documentData.strokeWidthAnim) { + sw = documentData.sw || 0; + } + if (documentData.strokeColorAnim) { + if (documentData.sc) { + sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]]; + } else { + sc = [0, 0, 0]; + } + } + if (documentData.fillColorAnim && documentData.fc) { + fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]]; + } + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.a.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + + if (mult.length) { + matrixHelper.translate(-animatorProps.a.v[0] * mult[0], -animatorProps.a.v[1] * mult[1], animatorProps.a.v[2] * mult[2]); + } else { + matrixHelper.translate(-animatorProps.a.v[0] * mult, -animatorProps.a.v[1] * mult, animatorProps.a.v[2] * mult); + } + } + } + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + if (animatorProps.s.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (mult.length) { + matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult[0]), 1 + ((animatorProps.s.v[1] - 1) * mult[1]), 1); + } else { + matrixHelper.scale(1 + ((animatorProps.s.v[0] - 1) * mult), 1 + ((animatorProps.s.v[1] - 1) * mult), 1); + } + } + } + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (animatorProps.sk.propType) { + if (mult.length) { + matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]); + } else { + matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult); + } + } + if (animatorProps.r.propType) { + if (mult.length) { + matrixHelper.rotateZ(-animatorProps.r.v * mult[2]); + } else { + matrixHelper.rotateZ(-animatorProps.r.v * mult); + } + } + if (animatorProps.ry.propType) { + if (mult.length) { + matrixHelper.rotateY(animatorProps.ry.v * mult[1]); + } else { + matrixHelper.rotateY(animatorProps.ry.v * mult); + } + } + if (animatorProps.rx.propType) { + if (mult.length) { + matrixHelper.rotateX(animatorProps.rx.v * mult[0]); + } else { + matrixHelper.rotateX(animatorProps.rx.v * mult); + } + } + if (animatorProps.o.propType) { + if (mult.length) { + elemOpacity += ((animatorProps.o.v) * mult[0] - elemOpacity) * mult[0]; + } else { + elemOpacity += ((animatorProps.o.v) * mult - elemOpacity) * mult; + } + } + if (documentData.strokeWidthAnim && animatorProps.sw.propType) { + if (mult.length) { + sw += animatorProps.sw.v * mult[0]; + } else { + sw += animatorProps.sw.v * mult; + } + } + if (documentData.strokeColorAnim && animatorProps.sc.propType) { + for (k = 0; k < 3; k += 1) { + if (mult.length) { + sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult[0]; + } else { + sc[k] += (animatorProps.sc.v[k] - sc[k]) * mult; + } + } + } + if (documentData.fillColorAnim && documentData.fc) { + if (animatorProps.fc.propType) { + for (k = 0; k < 3; k += 1) { + if (mult.length) { + fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult[0]; + } else { + fc[k] += (animatorProps.fc.v[k] - fc[k]) * mult; + } + } + } + if (animatorProps.fh.propType) { + if (mult.length) { + fc = addHueToRGB(fc, animatorProps.fh.v * mult[0]); + } else { + fc = addHueToRGB(fc, animatorProps.fh.v * mult); + } + } + if (animatorProps.fs.propType) { + if (mult.length) { + fc = addSaturationToRGB(fc, animatorProps.fs.v * mult[0]); + } else { + fc = addSaturationToRGB(fc, animatorProps.fs.v * mult); + } + } + if (animatorProps.fb.propType) { + if (mult.length) { + fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult[0]); + } else { + fc = addBrightnessToRGB(fc, animatorProps.fb.v * mult); + } + } + } + } + + for (j = 0; j < jLen; j += 1) { + animatorProps = animators[j].a; + + if (animatorProps.p.propType) { + animatorSelector = animators[j].s; + mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars); + if (this._hasMaskedPath) { + if (mult.length) { + matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]); + } else { + matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult); + } + } else if (mult.length) { + matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]); + } else { + matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult); + } + } + } + if (documentData.strokeWidthAnim) { + letterSw = sw < 0 ? 0 : sw; + } + if (documentData.strokeColorAnim) { + letterSc = 'rgb(' + Math.round(sc[0] * 255) + ',' + Math.round(sc[1] * 255) + ',' + Math.round(sc[2] * 255) + ')'; + } + if (documentData.fillColorAnim && documentData.fc) { + letterFc = 'rgb(' + Math.round(fc[0] * 255) + ',' + Math.round(fc[1] * 255) + ',' + Math.round(fc[2] * 255) + ')'; + } + + if (this._hasMaskedPath) { + matrixHelper.translate(0, -documentData.ls); + + matrixHelper.translate(0, (alignment[1] * yOff) * 0.01 + yPos, 0); + if (this._pathData.p.v) { + tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]); + var rot = (Math.atan(tanAngle) * 180) / Math.PI; + if (currentPoint.point[0] < prevPoint.point[0]) { + rot += 180; + } + matrixHelper.rotate((-rot * Math.PI) / 180); + } + matrixHelper.translate(xPathPos, yPathPos, 0); + currentLength -= (alignment[0] * letters[i].an) * 0.005; + if (letters[i + 1] && ind !== letters[i + 1].ind) { + currentLength += letters[i].an / 2; + currentLength += (documentData.tr * 0.001) * documentData.finalSize; + } + } else { + matrixHelper.translate(xPos, yPos, 0); + + if (documentData.ps) { + // matrixHelper.translate(documentData.ps[0],documentData.ps[1],0); + matrixHelper.translate(documentData.ps[0], documentData.ps[1] + px2vp(documentData.ascent), 0); + } + switch (documentData.j) { + case 1: + matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]), 0, 0); + break; + case 2: + matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]) / 2, 0, 0); + break; + default: + break; + } + matrixHelper.translate(0, -documentData.ls); + matrixHelper.translate(offf, 0, 0); + matrixHelper.translate((alignment[0] * letters[i].an) * 0.005, (alignment[1] * yOff) * 0.01, 0); + xPos += letters[i].l + (documentData.tr * 0.001) * documentData.finalSize; + } + if (renderType === 'html') { + letterM = matrixHelper.toCSS(); + } else if (renderType === 'svg') { + letterM = matrixHelper.to2dCSS(); + } else { + letterP = [matrixHelper.props[0], matrixHelper.props[1], matrixHelper.props[2], matrixHelper.props[3], matrixHelper.props[4], matrixHelper.props[5], matrixHelper.props[6], matrixHelper.props[7], matrixHelper.props[8], matrixHelper.props[9], matrixHelper.props[10], matrixHelper.props[11], matrixHelper.props[12], matrixHelper.props[13], matrixHelper.props[14], matrixHelper.props[15]]; + } + letterO = elemOpacity; + } + + if (renderedLettersCount <= i) { + letterValue = new LetterProps(letterO, letterSw, letterSc, letterFc, letterM, letterP); + this.renderedLetters.push(letterValue); + renderedLettersCount += 1; + this.lettersChangedFlag = true; + } else { + letterValue = this.renderedLetters[i]; + this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag; + } + } +}; + +TextAnimatorProperty.prototype.getValue = function () { + if (this._elem.globalData.frameId === this._frameId) { + return; + } + this._frameId = this._elem.globalData.frameId; + this.iterateDynamicProperties(); +}; + +TextAnimatorProperty.prototype.mHelper = new Matrix(); +TextAnimatorProperty.prototype.defaultPropsArray = []; +extendPrototype([DynamicPropertyContainer], TextAnimatorProperty); + +export default TextAnimatorProperty; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextProperty.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextProperty.js new file mode 100644 index 0000000000000000000000000000000000000000..dfbfa60a9905e6f758abf85f0806f710ca47b737 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextProperty.js @@ -0,0 +1,453 @@ +import { + initialDefaultFrame, +} from '../../main'; +import getFontProperties from '../getFontProperties'; +import FontManager from '../FontManager'; + +function TextProperty(elem, data) { + this._frameId = initialDefaultFrame; + this.pv = ''; + this.v = ''; + this.kf = false; + this._isFirstFrame = true; + this._mdf = false; + if (data.d && data.d.sid) { + data.d = elem.globalData.slotManager.getProp(data.d); + } + this.data = data; + this.elem = elem; + this.comp = this.elem.comp; + this.keysIndex = 0; + this.canResize = false; + this.minimumFontSize = 1; + this.effectsSequence = []; + this.currentData = { + ascent: 0, + boxWidth: this.defaultBoxWidth, + f: '', + fStyle: '', + fWeight: '', + fc: '', + j: '', + justifyOffset: '', + l: [], + lh: 0, + lineWidths: [], + ls: '', + of: '', + s: '', + sc: '', + sw: 0, + t: 0, + tr: 0, + sz: 0, + ps: null, + fillColorAnim: false, + strokeColorAnim: false, + strokeWidthAnim: false, + yOffset: 0, + finalSize: 0, + finalText: [], + finalLineHeight: 0, + __complete: false, + + }; + this.copyData(this.currentData, this.data.d.k[0].s); + + if (!this.searchProperty()) { + this.completeTextData(this.currentData); + } +} + +TextProperty.prototype.defaultBoxWidth = [0, 0]; + +TextProperty.prototype.copyData = function (obj, data) { + for (var s in data) { + if (Object.prototype.hasOwnProperty.call(data, s)) { + obj[s] = data[s]; + } + } + return obj; +}; + +TextProperty.prototype.setCurrentData = function (data) { + if (!data.__complete) { + this.completeTextData(data); + } + this.currentData = data; + this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth; + this._mdf = true; +}; + +TextProperty.prototype.searchProperty = function () { + return this.searchKeyframes(); +}; + +TextProperty.prototype.searchKeyframes = function () { + this.kf = this.data.d.k.length > 1; + if (this.kf) { + this.addEffect(this.getKeyframeValue.bind(this)); + } + return this.kf; +}; + +TextProperty.prototype.addEffect = function (effectFunction) { + this.effectsSequence.push(effectFunction); + this.elem.addDynamicProperty(this); +}; + +TextProperty.prototype.getValue = function (_finalValue) { + if ((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) { + return; + } + this.currentData.t = this.data.d.k[this.keysIndex].s.t; + var currentValue = this.currentData; + var currentIndex = this.keysIndex; + if (this.lock) { + this.setCurrentData(this.currentData); + return; + } + this.lock = true; + this._mdf = false; + var i; var + len = this.effectsSequence.length; + var finalValue = _finalValue || this.data.d.k[this.keysIndex].s; + for (i = 0; i < len; i += 1) { + // Checking if index changed to prevent creating a new object every time the expression updates. + if (currentIndex !== this.keysIndex) { + finalValue = this.effectsSequence[i](finalValue, finalValue.t); + } else { + finalValue = this.effectsSequence[i](this.currentData, finalValue.t); + } + } + if (currentValue !== finalValue) { + this.setCurrentData(finalValue); + } + this.v = this.currentData; + this.pv = this.v; + this.lock = false; + this.frameId = this.elem.globalData.frameId; +}; + +TextProperty.prototype.getKeyframeValue = function () { + var textKeys = this.data.d.k; + var frameNum = this.elem.comp.renderedFrame; + var i = 0; var + len = textKeys.length; + while (i <= len - 1) { + if (i === len - 1 || textKeys[i + 1].t > frameNum) { + break; + } + i += 1; + } + if (this.keysIndex !== i) { + this.keysIndex = i; + } + return this.data.d.k[this.keysIndex].s; +}; + +TextProperty.prototype.buildFinalText = function (text) { + var charactersArray = []; + var i = 0; + var len = text.length; + var charCode; + var secondCharCode; + var shouldCombine = false; + while (i < len) { + charCode = text.charCodeAt(i); + if (FontManager.isCombinedCharacter(charCode)) { + charactersArray[charactersArray.length - 1] += text.charAt(i); + } else if (charCode >= 0xD800 && charCode <= 0xDBFF) { + secondCharCode = text.charCodeAt(i + 1); + if (secondCharCode >= 0xDC00 && secondCharCode <= 0xDFFF) { + if (shouldCombine || FontManager.isModifier(charCode, secondCharCode)) { + charactersArray[charactersArray.length - 1] += text.substr(i, 2); + shouldCombine = false; + } else { + charactersArray.push(text.substr(i, 2)); + } + i += 1; + } else { + charactersArray.push(text.charAt(i)); + } + } else if (charCode > 0xDBFF) { + secondCharCode = text.charCodeAt(i + 1); + if (FontManager.isZeroWidthJoiner(charCode, secondCharCode)) { + shouldCombine = true; + charactersArray[charactersArray.length - 1] += text.substr(i, 2); + i += 1; + } else { + charactersArray.push(text.charAt(i)); + } + } else if (FontManager.isZeroWidthJoiner(charCode)) { + charactersArray[charactersArray.length - 1] += text.charAt(i); + shouldCombine = true; + } else { + charactersArray.push(text.charAt(i)); + } + i += 1; + } + return charactersArray; +}; + +TextProperty.prototype.completeTextData = function (documentData) { + documentData.__complete = true; + var fontManager = this.elem.globalData.fontManager; + var data = this.data; + var letters = []; + var i; var + len; + var newLineFlag; var index = 0; var + val; + var anchorGrouping = data.m.g; + var currentSize = 0; var currentPos = 0; var currentLine = 0; var + lineWidths = []; + var lineWidth = 0; + var maxLineWidth = 0; + var j; var + jLen; + var fontData = fontManager.getFontByName(documentData.f); + var charData; var + cLength = 0; + + var fontProps = getFontProperties(fontData); + documentData.fWeight = fontProps.weight; + documentData.fStyle = fontProps.style; + let fp = fp2px(documentData.s); + documentData.finalSize = fp; + documentData.finalText = this.buildFinalText(documentData.t); + len = documentData.finalText.length; + documentData.finalLineHeight = documentData.lh; + var trackingOffset = (documentData.tr / 1000) * documentData.finalSize; + var charCode; + if (documentData.sz) { + var flag = true; + var boxWidth = documentData.sz[0]; + var boxHeight = documentData.sz[1]; + var currentHeight; var + finalText; + while (flag) { + finalText = this.buildFinalText(documentData.t); + currentHeight = 0; + lineWidth = 0; + len = finalText.length; + trackingOffset = (documentData.tr / 1000) * documentData.finalSize; + var lastSpaceIndex = -1; + for (i = 0; i < len; i += 1) { + charCode = finalText[i].charCodeAt(0); + newLineFlag = false; + if (finalText[i] === ' ') { + lastSpaceIndex = i; + } else if (charCode === 13 || charCode === 3) { + lineWidth = 0; + newLineFlag = true; + currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2; + } + if (fontManager.chars) { + charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily); + cLength = newLineFlag ? 0 : (px2vp(charData.w) * documentData.finalSize) / 100; + } else { + // tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily; + cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize); + } + if (lineWidth + cLength > boxWidth && finalText[i] !== ' ') { + if (lastSpaceIndex === -1) { + len += 1; + } else { + i = lastSpaceIndex; + } + currentHeight += documentData.finalLineHeight || documentData.finalSize * 1.2; + finalText.splice(i, lastSpaceIndex === i ? 1 : 0, '\r'); + // finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i); + lastSpaceIndex = -1; + lineWidth = 0; + } else { + lineWidth += cLength; + lineWidth += trackingOffset; + } + } + currentHeight += (fontData.ascent * documentData.finalSize) / 100; + if (this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) { + documentData.finalSize -= 1; + documentData.finalLineHeight = (documentData.finalSize * documentData.lh) / documentData.s; + } else { + documentData.finalText = finalText; + len = documentData.finalText.length; + flag = false; + } + } + } + lineWidth = -trackingOffset; + cLength = 0; + var uncollapsedSpaces = 0; + var currentChar; + for (i = 0; i < len; i += 1) { + newLineFlag = false; + currentChar = documentData.finalText[i]; + charCode = currentChar.charCodeAt(0); + if (charCode === 13 || charCode === 3) { + uncollapsedSpaces = 0; + lineWidths.push(lineWidth); + maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth; + lineWidth = -2 * trackingOffset; + val = ''; + newLineFlag = true; + currentLine += 1; + } else { + val = currentChar; + } + if (fontManager.chars) { + charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily); + let width = px2vp(fontManager.chars[0].w); + cLength = newLineFlag ? 0 : (width * documentData.finalSize) / 100; + } else { + // var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize); + // tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily; + cLength = fontManager.measureText(val, documentData.f, documentData.finalSize); + } + + // + if (currentChar === ' ') { + uncollapsedSpaces += cLength + trackingOffset; + } else { + lineWidth += cLength + trackingOffset + uncollapsedSpaces; + uncollapsedSpaces = 0; + } + letters.push({ + l: cLength, an: cLength, add: currentSize, n: newLineFlag, anIndexes: [], val: val, line: currentLine, animatorJustifyOffset: 0, + }); + if (anchorGrouping == 2) { // eslint-disable-line eqeqeq + currentSize += cLength; + if (val === '' || val === ' ' || i === len - 1) { + if (val === '' || val === ' ') { + currentSize -= cLength; + } + while (currentPos <= i) { + letters[currentPos].an = currentSize; + letters[currentPos].ind = index; + letters[currentPos].extra = cLength; + currentPos += 1; + } + index += 1; + currentSize = 0; + } + } else if (anchorGrouping == 3) { // eslint-disable-line eqeqeq + currentSize += cLength; + if (val === '' || i === len - 1) { + if (val === '') { + currentSize -= cLength; + } + while (currentPos <= i) { + letters[currentPos].an = currentSize; + letters[currentPos].ind = index; + letters[currentPos].extra = cLength; + currentPos += 1; + } + currentSize = 0; + index += 1; + } + } else { + letters[index].ind = index; + letters[index].extra = 0; + index += 1; + } + } + documentData.l = letters; + maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth; + lineWidths.push(lineWidth); + if (documentData.sz) { + documentData.boxWidth = documentData.sz[0]; + documentData.justifyOffset = 0; + } else { + documentData.boxWidth = maxLineWidth; + switch (documentData.j) { + case 1: + documentData.justifyOffset = -documentData.boxWidth; + break; + case 2: + documentData.justifyOffset = -documentData.boxWidth / 2; + break; + default: + documentData.justifyOffset = 0; + } + } + documentData.lineWidths = lineWidths; + + var animators = data.a; var animatorData; var + letterData; + jLen = animators.length; + var based; var ind; var + indexes = []; + for (j = 0; j < jLen; j += 1) { + animatorData = animators[j]; + if (animatorData.a.sc) { + documentData.strokeColorAnim = true; + } + if (animatorData.a.sw) { + documentData.strokeWidthAnim = true; + } + if (animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb) { + documentData.fillColorAnim = true; + } + ind = 0; + based = animatorData.s.b; + for (i = 0; i < len; i += 1) { + letterData = letters[i]; + letterData.anIndexes[j] = ind; + if ((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== ' ') || (based == 3 && (letterData.n || letterData.val == ' ' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))) { // eslint-disable-line eqeqeq + if (animatorData.s.rn === 1) { + indexes.push(ind); + } + ind += 1; + } + } + data.a[j].s.totalChars = ind; + var currentInd = -1; var + newInd; + if (animatorData.s.rn === 1) { + for (i = 0; i < len; i += 1) { + letterData = letters[i]; + if (currentInd != letterData.anIndexes[j]) { // eslint-disable-line eqeqeq + currentInd = letterData.anIndexes[j]; + newInd = indexes.splice(Math.floor(Math.random() * indexes.length), 1)[0]; + } + letterData.anIndexes[j] = newInd; + } + } + } + documentData.yOffset = documentData.finalLineHeight || documentData.finalSize * 1.2; + documentData.ls = documentData.ls || 0; + documentData.ascent = (fontData.ascent * documentData.finalSize) / 100; +}; + +TextProperty.prototype.updateDocumentData = function (newData, index) { + index = index === undefined ? this.keysIndex : index; + var dData = this.copyData({}, this.data.d.k[index].s); + dData = this.copyData(dData, newData); + this.data.d.k[index].s = dData; + this.recalculate(index); + this.setCurrentData(dData); + this.elem.addDynamicProperty(this); +}; + +TextProperty.prototype.recalculate = function (index) { + var dData = this.data.d.k[index].s; + dData.__complete = false; + this.keysIndex = 0; + this._isFirstFrame = true; + this.getValue(dData); +}; + +TextProperty.prototype.canResizeFont = function (_canResize) { + this.canResize = _canResize; + this.recalculate(this.keysIndex); + this.elem.addDynamicProperty(this); +}; + +TextProperty.prototype.setMinimumFontSize = function (_fontValue) { + this.minimumFontSize = Math.floor(_fontValue) || 1; + this.recalculate(this.keysIndex); + this.elem.addDynamicProperty(this); +}; + +export default TextProperty; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextSelectorProperty.js b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextSelectorProperty.js new file mode 100644 index 0000000000000000000000000000000000000000..ce3af3897ad628f8b53726e8388056546b24a8f9 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/js/utils/text/TextSelectorProperty.js @@ -0,0 +1,179 @@ +import { + extendPrototype, +} from '../functionExtensions'; +import DynamicPropertyContainer from '../helpers/dynamicProperties'; +import PropertyFactory from '../PropertyFactory'; +import BezierFactory from '../../3rd_party/BezierEaser'; + +const TextSelectorProp = (function () { + var max = Math.max; + var min = Math.min; + var floor = Math.floor; + + function TextSelectorPropFactory(elem, data) { + this._currentTextLength = -1; + this.k = false; + this.data = data; + this.elem = elem; + this.comp = elem.comp; + this.finalS = 0; + this.finalE = 0; + this.initDynamicPropertyContainer(elem); + this.s = PropertyFactory.getProp(elem, data.s || { k: 0 }, 0, 0, this); + if ('e' in data) { + this.e = PropertyFactory.getProp(elem, data.e, 0, 0, this); + } else { + this.e = { v: 100 }; + } + this.o = PropertyFactory.getProp(elem, data.o || { k: 0 }, 0, 0, this); + this.xe = PropertyFactory.getProp(elem, data.xe || { k: 0 }, 0, 0, this); + this.ne = PropertyFactory.getProp(elem, data.ne || { k: 0 }, 0, 0, this); + this.sm = PropertyFactory.getProp(elem, data.sm || { k: 100 }, 0, 0, this); + this.a = PropertyFactory.getProp(elem, data.a, 0, 0.01, this); + if (!this.dynamicProperties.length) { + this.getValue(); + } + } + + TextSelectorPropFactory.prototype = { + getMult: function (ind) { + if (this._currentTextLength !== this.elem.textProperty.currentData.l.length) { + this.getValue(); + } + var x1 = 0; + var y1 = 0; + var x2 = 1; + var y2 = 1; + if (this.ne.v > 0) { + x1 = this.ne.v / 100.0; + } else { + y1 = -this.ne.v / 100.0; + } + if (this.xe.v > 0) { + x2 = 1.0 - this.xe.v / 100.0; + } else { + y2 = 1.0 + this.xe.v / 100.0; + } + var easer = BezierFactory.getBezierEasing(x1, y1, x2, y2).get; + + var mult = 0; + var s = this.finalS; + var e = this.finalE; + var type = this.data.sh; + if (type === 2) { + if (e === s) { + mult = ind >= e ? 1 : 0; + } else { + mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1)); + } + mult = easer(mult); + } else if (type === 3) { + if (e === s) { + mult = ind >= e ? 0 : 1; + } else { + mult = 1 - max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1)); + } + + mult = easer(mult); + } else if (type === 4) { + if (e === s) { + mult = 0; + } else { + mult = max(0, min(0.5 / (e - s) + (ind - s) / (e - s), 1)); + if (mult < 0.5) { + mult *= 2; + } else { + mult = 1 - 2 * (mult - 0.5); + } + } + mult = easer(mult); + } else if (type === 5) { + if (e === s) { + mult = 0; + } else { + var tot = e - s; + /* ind += 0.5; + mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind; */ + ind = min(max(0, ind + 0.5 - s), e - s); + var x = -tot / 2 + ind; + var a = tot / 2; + mult = Math.sqrt(1 - (x * x) / (a * a)); + } + mult = easer(mult); + } else if (type === 6) { + if (e === s) { + mult = 0; + } else { + ind = min(max(0, ind + 0.5 - s), e - s); + mult = (1 + (Math.cos((Math.PI + Math.PI * 2 * (ind) / (e - s))))) / 2; // eslint-disable-line + } + mult = easer(mult); + } else { + if (ind >= floor(s)) { + if (ind - s < 0) { + mult = max(0, min(min(e, 1) - (s - ind), 1)); + } else { + mult = max(0, min(e - ind, 1)); + } + } + mult = easer(mult); + } + // Smoothness implementation. + // The smoothness represents a reduced range of the original [0; 1] range. + // if smoothness is 25%, the new range will be [0.375; 0.625] + // Steps are: + // - find the lower value of the new range (threshold) + // - if multiplier is smaller than that value, floor it to 0 + // - if it is larger, + // - subtract the threshold + // - divide it by the smoothness (this will return the range to [0; 1]) + // Note: If it doesn't work on some scenarios, consider applying it before the easer. + if (this.sm.v !== 100) { + var smoothness = this.sm.v * 0.01; + if (smoothness === 0) { + smoothness = 0.00000001; + } + var threshold = 0.5 - smoothness * 0.5; + if (mult < threshold) { + mult = 0; + } else { + mult = (mult - threshold) / smoothness; + if (mult > 1) { + mult = 1; + } + } + } + return mult * this.a.v; + }, + getValue: function (newCharsFlag) { + this.iterateDynamicProperties(); + this._mdf = newCharsFlag || this._mdf; + this._currentTextLength = this.elem.textProperty.currentData.l.length || 0; + if (newCharsFlag && this.data.r === 2) { + this.e.v = this._currentTextLength; + } + var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars; + var o = this.o.v / divisor; + var s = this.s.v / divisor + o; + var e = (this.e.v / divisor) + o; + if (s > e) { + var _s = s; + s = e; + e = _s; + } + this.finalS = s; + this.finalE = e; + }, + }; + extendPrototype([DynamicPropertyContainer], TextSelectorPropFactory); + + function getTextSelectorProp(elem, data, arr) { + return new TextSelectorPropFactory(elem, data, arr); + } + + return { + getTextSelectorProp: getTextSelectorProp, + }; +}()); + +export default TextSelectorProp; diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/module.json b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/module.json new file mode 100644 index 0000000000000000000000000000000000000000..13f46f30e980cec4e2dbde83f1b01fc70b356aae --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/@ohos+lottie@2.0.24/oh_modules/@ohos/lottie/src/main/module.json @@ -0,0 +1,32 @@ +{ + "app": { + "bundleName": "com.openharmony.lottie", + "debug": true, + "versionCode": 1000000, + "versionName": "2.0.24", + "minAPIVersion": 12, + "targetAPIVersion": 12, + "apiReleaseType": "Release", + "compileSdkVersion": "5.0.0.71", + "compileSdkType": "OpenHarmony", + "appEnvironments": [], + "bundleType": "app", + "buildMode": "debug" + }, + "module": { + "name": "library", + "type": "har", + "deviceTypes": [ + "default", + "phone", + "tablet", + "2in1", + "car" + ], + "packageName": "@ohos/lottie", + "installationFree": false, + "virtualMachine": "ark12.0.2.0", + "compileMode": "esmodule", + "dependencies": [] + } +} diff --git a/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/lock.json5 b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/lock.json5 new file mode 100644 index 0000000000000000000000000000000000000000..ba27e28beab4b9b2e3c181f55fa19c37edb9738d --- /dev/null +++ b/ArkUIKit/StateMigrationProject/oh_modules/.ohpm/lock.json5 @@ -0,0 +1,74 @@ +{ + "lockVersion": "1.0", + "settings": { + "resolveConflict": true, + "resolveConflictStrict": false, + "installAll": true + }, + "overrides": {}, + "overrideDependencyMap": {}, + "modules": { + ".": { + "name": "", + "dependencies": { + "@ohos/lottie": { + "specifier": "^2.0.24", + "version": "2.0.24" + } + }, + "devDependencies": { + "@ohos/hypium": { + "specifier": "1.0.24", + "version": "1.0.24" + }, + "@ohos/hamock": { + "specifier": "1.0.0", + "version": "1.0.0" + } + }, + "dynamicDependencies": {}, + "maskedByOverrideDependencyMap": false + }, + "entry": { + "name": "entry", + "dependencies": { + "@ohos/lottie": { + "specifier": "^2.0.24", + "version": "2.0.24" + } + }, + "devDependencies": {}, + "dynamicDependencies": {}, + "maskedByOverrideDependencyMap": false + } + }, + "packages": { + "@ohos/lottie@2.0.24": { + "integrity": "sha512-TjqRTRqPT244ctFLVGw1pw8iZ4HHSCR+mJu7fPMvtlhVD+bsBpOY+V1tj17dAbySlbxJFUBGRpO21yDkmnjiYQ==", + "storePath": "oh_modules/.ohpm/@ohos+lottie@2.0.24", + "dependencies": {}, + "dynamicDependencies": {}, + "dev": false, + "dynamic": false, + "maskedByOverrideDependencyMap": false + }, + "@ohos/hypium@1.0.24": { + "integrity": "sha512-3dCqc+BAR5LqEGG2Vtzi8O3r7ci/3fYU+FWjwvUobbfko7DUnXGOccaror0yYuUhJfXzFK0aZNMGSnXaTwEnbw==", + "storePath": "oh_modules/.ohpm/@ohos+hypium@1.0.24", + "dependencies": {}, + "dynamicDependencies": {}, + "dev": true, + "dynamic": false, + "maskedByOverrideDependencyMap": false + }, + "@ohos/hamock@1.0.0": { + "integrity": "sha512-K6lDPYc6VkKe6ZBNQa9aoG+ZZMiwqfcR/7yAVFSUGIuOAhPvCJAo9+t1fZnpe0dBRBPxj2bxPPbKh69VuyAtDg==", + "storePath": "oh_modules/.ohpm/@ohos+hamock@1.0.0", + "dependencies": {}, + "dynamicDependencies": {}, + "dev": true, + "dynamic": false, + "maskedByOverrideDependencyMap": false + } + } +} \ No newline at end of file diff --git a/ArkUIKit/StateMigrationProject/ohosTest.md b/ArkUIKit/StateMigrationProject/ohosTest.md new file mode 100644 index 0000000000000000000000000000000000000000..d56bbc70cef022ffa2c92ea0444d2e1fce5f6db4 --- /dev/null +++ b/ArkUIKit/StateMigrationProject/ohosTest.md @@ -0,0 +1,20 @@ +# 组件内状态变量迁移指导 测试用例归档 + +## 用例表 + +| 测试功能 | 预置条件 | 输入 | 预期输出 | 是否自动 | 测试结果 | +|-------------------------------| -------------- |----------------------|---------|:-----| -------- | +| 测试V1装饰器@State是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V2装饰器@Local是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V2装饰器@ObservedV2和@Trace是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V2装饰器@Param和@Once是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V1装饰器@Link是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V2装饰器@Param和@Event是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V1装饰器@Prop是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V2装饰器@Param是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V1装饰器@Provide和@Consume是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V2装饰器@Provider和@Consumer是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V1装饰器@Watch是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V2装饰器@Monitor是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | +| 测试V2装饰器@Computed是否成功 | 设备正常运行 | 进入各个示例页面,push页面,然后返回 | 页面跳转正常 | 是 | Pass | + diff --git a/ArkUIKit/StateMigrationProject/screenshots/device/image1.png b/ArkUIKit/StateMigrationProject/screenshots/device/image1.png new file mode 100644 index 0000000000000000000000000000000000000000..ce6bcfd6a042a5f5e68f6fe2232910929753797d Binary files /dev/null and b/ArkUIKit/StateMigrationProject/screenshots/device/image1.png differ diff --git a/ArkUIKit/StateMigrationProject/screenshots/device/image2.png b/ArkUIKit/StateMigrationProject/screenshots/device/image2.png new file mode 100644 index 0000000000000000000000000000000000000000..bcfae800470d98b0fdd8f41ef1fa2e535c345db4 Binary files /dev/null and b/ArkUIKit/StateMigrationProject/screenshots/device/image2.png differ diff --git a/ArkUIKit/StateStyle/.gitignore b/ArkUIKit/StateStyle/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..d2ff20141ceed86d87c0ea5d99481973005bab2b --- /dev/null +++ b/ArkUIKit/StateStyle/.gitignore @@ -0,0 +1,12 @@ +/node_modules +/oh_modules +/local.properties +/.idea +**/build +/.hvigor +.cxx +/.clangd +/.clang-format +/.clang-tidy +**/.test +/.appanalyzer \ No newline at end of file diff --git a/ArkUIKit/StateStyle/AppScope/app.json5 b/ArkUIKit/StateStyle/AppScope/app.json5 new file mode 100644 index 0000000000000000000000000000000000000000..e3afbf37a6d3601558f96d4961524654043cb577 --- /dev/null +++ b/ArkUIKit/StateStyle/AppScope/app.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "app": { + "bundleName": "com.example.StateStyle", + "vendor": "example", + "versionCode": 1000000, + "versionName": "1.0.0", + "icon": "$media:layered_image", + "label": "$string:app_name" + } +} diff --git a/ArkUIKit/StateStyle/AppScope/resources/base/element/string.json b/ArkUIKit/StateStyle/AppScope/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..3b57591431fa00901f16b8fd617cbdbe3b7ca535 --- /dev/null +++ b/ArkUIKit/StateStyle/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string": [ + { + "name": "app_name", + "value": "ComponentExtension" + } + ] +} diff --git a/ArkUIKit/StateStyle/AppScope/resources/base/media/background.png b/ArkUIKit/StateStyle/AppScope/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/ArkUIKit/StateStyle/AppScope/resources/base/media/background.png differ diff --git a/ArkUIKit/StateStyle/AppScope/resources/base/media/foreground.png b/ArkUIKit/StateStyle/AppScope/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..eb9427585b36d14b12477435b6419d1f07b3e0bb Binary files /dev/null and b/ArkUIKit/StateStyle/AppScope/resources/base/media/foreground.png differ diff --git a/ArkUIKit/StateStyle/AppScope/resources/base/media/layered_image.json b/ArkUIKit/StateStyle/AppScope/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/ArkUIKit/StateStyle/AppScope/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/README_zh.md b/ArkUIKit/StateStyle/README_zh.md new file mode 100644 index 0000000000000000000000000000000000000000..c6eeaf21200fefd71213c87f897a2365936c6c17 --- /dev/null +++ b/ArkUIKit/StateStyle/README_zh.md @@ -0,0 +1,76 @@ +# ArkUI使用支持交互事件指南文档示例 + +### 介绍 + +本示例通过使用[ArkUI指南文档](https://gitcode.com/openharmony/docs/tree/master/zh-cn/application-dev/ui) +中各场景的开发示例,展示在工程中,帮助开发者更好地理解ArkUI提供的组件及组件属性并合理使用。 + +### 效果预览 + +| 首页 | 交互类组件目录 | 多态样式示例 | +|------------------------------------|------------------------------------|------------------------------------| +| ![](screenshots/device/image2.png) | ![](screenshots/device/image2.png) | ![](screenshots/device/image3.png) | + +### 使用说明 + +1. 在主界面,可以点击对应卡片,选择需要参考的组件示例。 + +2. 在组件目录选择详细的示例参考。 + +3. 进入示例界面,查看参考示例。 + +4. 通过自动测试框架可进行测试及维护。 + +### 工程目录 + +``` +entry/src/main/ets/ +|---entryability +|---pages +| |---FocusStyle //多态样式 +| | |---CompWithInlineStateStyles.ets +| |---NormalStyle +| | |---MyComponent.ets +| |---StateStyle +| | |---StateStylesSample.ets +|---pages +| |---Index.ets // 应用主页面 +entry/src/ohosTest/ +|---ets +| |---index.test.ets // 示例代码测试代码 +``` + +### 具体实现 + +stateStyles 通过为组件的不同内部状态(如 normal、focused、pressed 等) +绑定对应的样式规则,实现动态的多态视觉效果,其使用方式是在组件上调用 +.stateStyles({}) 方法,传入一个以状态名为键的对象,每个状态内通过链式调 +用设置通用样式属性,从而在用户交互时自动切换外观,提升用户体验。 + +### 相关权限 + +不涉及。 + +### 依赖 + +不涉及。 + +### 约束与限制 + +1.本示例仅支持标准系统上运行, 支持设备:RK3568。 + +2.本示例为Stage模型,支持API14版本SDK,版本号:5.0.2.57,镜像版本号:OpenHarmony_5.0.2.57。 + +3.本示例需要使用DevEco Studio NEXT Developer Preview2 (Build Version: 5.0.5.306, built on December 12, 2024)及以上版本才可编译运行。 + +### 下载 + +如需单独下载本工程,执行如下命令: + +```` +git init +git config core.sparsecheckout true +echo code/DocsSample/ArkUISample/EventProject > .git/info/sparse-checkout +git remote add origin https://gitcode.com/openharmony/applications_app_samples.git +git pull origin master +```` \ No newline at end of file diff --git a/ArkUIKit/StateStyle/build-profile.json5 b/ArkUIKit/StateStyle/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..3ca5a93fb814017ac4c398aacbdf17b1d8b0a237 --- /dev/null +++ b/ArkUIKit/StateStyle/build-profile.json5 @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "app": { + "signingConfigs": [], + "products": [ + { + "name": "default", + "signingConfig": "default", + "compileSdkVersion": "6.0.0(20)", + "compatibleSdkVersion": "6.0.0(20)", + "targetSdkVersion": "6.0.0(20)", + "runtimeOS": "HarmonyOS", + "buildOption": { + "strictMode": { + "caseSensitiveCheck": true, + "useNormalizedOHMUrl": true + } + } + } + ], + "buildModeSet": [ + { + "name": "debug", + }, + { + "name": "release" + } + ] + }, + "modules": [ + { + "name": "entry", + "srcPath": "./entry", + "targets": [ + { + "name": "default", + "applyToProducts": [ + "default" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/code-linter.json5 b/ArkUIKit/StateStyle/code-linter.json5 new file mode 100644 index 0000000000000000000000000000000000000000..5c4682f8164874ec7e9cb8f99ff8b3228ffbc126 --- /dev/null +++ b/ArkUIKit/StateStyle/code-linter.json5 @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "files": [ + "**/*.ets" + ], + "ignore": [ + "**/src/ohosTest/**/*", + "**/src/test/**/*", + "**/src/mock/**/*", + "**/node_modules/**/*", + "**/oh_modules/**/*", + "**/build/**/*", + "**/.preview/**/*" + ], + "ruleSet": [ + "plugin:@performance/recommended", + "plugin:@typescript-eslint/recommended" + ], + "rules": { + "@security/no-unsafe-aes": "error", + "@security/no-unsafe-hash": "error", + "@security/no-unsafe-mac": "warn", + "@security/no-unsafe-dh": "error", + "@security/no-unsafe-dsa": "error", + "@security/no-unsafe-ecdsa": "error", + "@security/no-unsafe-rsa-encrypt": "error", + "@security/no-unsafe-rsa-sign": "error", + "@security/no-unsafe-rsa-key": "error", + "@security/no-unsafe-dsa-key": "error", + "@security/no-unsafe-dh-key": "error", + "@security/no-unsafe-3des": "error" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/.gitignore b/ArkUIKit/StateStyle/entry/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..e2713a2779c5a3e0eb879efe6115455592caeea5 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/.gitignore @@ -0,0 +1,6 @@ +/node_modules +/oh_modules +/.preview +/build +/.cxx +/.test \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/build-profile.json5 b/ArkUIKit/StateStyle/entry/build-profile.json5 new file mode 100644 index 0000000000000000000000000000000000000000..9016faf39f8a65cf648bae246a53575510fe8b9f --- /dev/null +++ b/ArkUIKit/StateStyle/entry/build-profile.json5 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "apiType": "stageMode", + "buildOption": { + "resOptions": { + "copyCodeResource": { + "enable": false + } + } + }, + "buildOptionSet": [ + { + "name": "release", + "arkOptions": { + "obfuscation": { + "ruleOptions": { + "enable": false, + "files": [ + "./obfuscation-rules.txt" + ] + } + } + } + }, + ], + "targets": [ + { + "name": "default" + }, + { + "name": "ohosTest", + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/hvigorfile.ts b/ArkUIKit/StateStyle/entry/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..cfa8a00f74f409d9647f55cdf270ab6aec69fe41 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { hapTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/obfuscation-rules.txt b/ArkUIKit/StateStyle/entry/obfuscation-rules.txt new file mode 100644 index 0000000000000000000000000000000000000000..272efb6ca3f240859091bbbfc7c5802d52793b0b --- /dev/null +++ b/ArkUIKit/StateStyle/entry/obfuscation-rules.txt @@ -0,0 +1,23 @@ +# Define project specific obfuscation rules here. +# You can include the obfuscation configuration files in the current module's build-profile.json5. +# +# For more details, see +# https://developer.huawei.com/consumer/cn/doc/harmonyos-guides-V5/source-obfuscation-V5 + +# Obfuscation options: +# -disable-obfuscation: disable all obfuscations +# -enable-property-obfuscation: obfuscate the property names +# -enable-toplevel-obfuscation: obfuscate the names in the global scope +# -compact: remove unnecessary blank spaces and all line feeds +# -remove-log: remove all console.* statements +# -print-namecache: print the name cache that contains the mapping from the old names to new names +# -apply-namecache: reuse the given cache file + +# Keep options: +# -keep-property-name: specifies property names that you want to keep +# -keep-global-name: specifies names that you want to keep in the global scope + +-enable-property-obfuscation +-enable-toplevel-obfuscation +-enable-filename-obfuscation +-enable-export-obfuscation \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/oh-package.json5 b/ArkUIKit/StateStyle/entry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..10cda399b0aec3099b257299a57d284393e4e55a --- /dev/null +++ b/ArkUIKit/StateStyle/entry/oh-package.json5 @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "name": "entry", + "version": "1.0.0", + "description": "Please describe the basic information.", + "main": "", + "author": "", + "license": "", + "dependencies": {} +} + diff --git a/ArkUIKit/StateStyle/entry/ohosTest.md b/ArkUIKit/StateStyle/entry/ohosTest.md new file mode 100644 index 0000000000000000000000000000000000000000..df37d59f8784527a375e72c934bf5150ff999aa5 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/ohosTest.md @@ -0,0 +1,9 @@ +| 测试功能 | 预置条件 | 输入 | 预期输出 | 测试结果 | +| | ------------ | ---------------------- | --------------------------- | -------- | +| 首页加载测试 | 设备正常运行 | 验证基础元素渲染 | 检查标题和列表组件 | Pass | +| 基础场景测试 | 设备正常运行 | 点击button1 | 随点击变色 | Pass | +| 获焦变色测试 | 设备正常运行 | 长按"clickMe"" | 变为灰色 | Pass | + + + + diff --git a/ArkUIKit/StateStyle/entry/src/main/ets/common/resource.ets b/ArkUIKit/StateStyle/entry/src/main/ets/common/resource.ets new file mode 100644 index 0000000000000000000000000000000000000000..723a394265ee2e6bf6d895e9503c4b2d8e49207a --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/ets/common/resource.ets @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export class P2PManager { + public resourceToString(resource: Resource): string { + return getContext(this).resourceManager.getStringSync(resource); + } +} + +// 默认导出let +let p2pManager = new P2PManager(); + +export default p2pManager as P2PManager; \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/ets/entryability/EntryAbility.ets b/ArkUIKit/StateStyle/entry/src/main/ets/entryability/EntryAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..081b700cacec6def24d204fbc37ab93985f7b4ec --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/ets/entryability/EntryAbility.ets @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { AbilityConstant, ConfigurationConstant, UIAbility, Want } from '@kit.AbilityKit'; +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { display, uiObserver, window } from '@kit.ArkUI'; + +const DOMAIN = 0x0000; + +function callBackFunc(info: uiObserver.NavDestinationSwitchInfo) { + console.info(`testTag navDestinationSwitch from: ${JSON.stringify(info.from)} to: ${JSON.stringify(info.to)}`) +} + +function callBackFunc2(info: uiObserver.NavDestinationSwitchInfo) { + console.info(`testTag2 navDestinationSwitch from: ${JSON.stringify(info.from)} to: ${JSON.stringify(info.to)}`) +} + +export default class EntryAbility extends UIAbility { + onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void { + this.context.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_NOT_SET); + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onCreate'); + uiObserver.on('navDestinationSwitch', this.context, callBackFunc); + uiObserver.on('navDestinationSwitch', this.context, { + navigationId: 'myNavId' + }, callBackFunc2); + } + + onDestroy(): void { + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onDestroy'); + uiObserver.off('navDestinationSwitch', this.context, callBackFunc); + uiObserver.off('navDestinationSwitch', this.context, { + navigationId: 'myNavId' + }, callBackFunc); + } + + onWindowStageCreate(windowStage: window.WindowStage): void { + // Main window is created, set main page for this ability + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageCreate'); + let mainWindow: window.Window; + try { + mainWindow = windowStage.getMainWindowSync(); + let displayClass: display.Display = display.getDefaultDisplaySync(); + AppStorage.setOrCreate('orientation', displayClass.orientation); + // 监听窗口的windowsSizeChange事件,旋转屏时会触发该事件 + mainWindow.on('windowSizeChange', (data) => { + console.info('Succeeded in enabling the listener for window size changes. Data: ' + JSON.stringify(data)); + let displayClass: display.Display | null = null; + try { + displayClass = display.getDefaultDisplaySync(); + console.info('display orientation is ' + JSON.stringify(displayClass.orientation)); + // 获取屏幕的显示方向 + AppStorage.set('orientation', displayClass.orientation); + } catch { + return; + } + }) + } catch { + hilog.info(0x0000, 'testTag', '%{public}s', 'error'); + return; + } + windowStage.loadContent('pages/Index', (err) => { + if (err.code) { + hilog.error(DOMAIN, 'testTag', 'Failed to load the content. Cause: %{public}s', JSON.stringify(err)); + return; + } + hilog.info(DOMAIN, 'testTag', 'Succeeded in loading the content.'); + }); + } + + onWindowStageDestroy(): void { + // Main window is destroyed, release UI related resources + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onWindowStageDestroy'); + } + + onForeground(): void { + // Ability has brought to foreground + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onForeground'); + } + + onBackground(): void { + // Ability has back to background + hilog.info(DOMAIN, 'testTag', '%{public}s', 'Ability onBackground'); + } +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets b/ArkUIKit/StateStyle/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets new file mode 100644 index 0000000000000000000000000000000000000000..4ce6449f0e91914e73d4502c9f2e8e9a395ea4b1 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { BackupExtensionAbility, BundleVersion } from '@kit.CoreFileKit'; + +const DOMAIN = 0x0000; + +export default class EntryBackupAbility extends BackupExtensionAbility { + async onBackup() { + hilog.info(DOMAIN, 'testTag', 'onBackup ok'); + await Promise.resolve(); + } + + async onRestore(bundleVersion: BundleVersion) { + hilog.info(DOMAIN, 'testTag', 'onRestore ok %{public}s', JSON.stringify(bundleVersion)); + await Promise.resolve(); + } +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/ets/pages/FocusStyle/CompWithInlineStateStyles.ets b/ArkUIKit/StateStyle/entry/src/main/ets/pages/FocusStyle/CompWithInlineStateStyles.ets new file mode 100644 index 0000000000000000000000000000000000000000..b2142aa519ada618b8d6e2abeb25689b70e73b04 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/ets/pages/FocusStyle/CompWithInlineStateStyles.ets @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// [Start focus_style] +@Entry +@Component +struct CompWithInlineStateStyles { + @State focusedColor: Color = 0xD5D5D5; + normalColor: Color = 0x004AAF; + + build() { + Column() { + Button('clickMe') + .height(100) + .width(100) + .stateStyles({ + normal: { + .backgroundColor(this.normalColor) + }, + focused: { + .backgroundColor(this.focusedColor) + } + }) + .onClick(() => { + this.focusedColor = 0x707070; + }) + .margin('30%') + } + } +} +// [End focus_style] \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/ets/pages/Index.ets b/ArkUIKit/StateStyle/entry/src/main/ets/pages/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..bf5b7cdb6aaceed711c2986615213428f97aa21d --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/ets/pages/Index.ets @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import curves from '@ohos.curves'; +import { Route, RouteGroup } from './common/Index'; +import { KeyboardAvoidMode } from '@kit.ArkUI'; +import router from '@ohos.router'; + +@Styles +function cardPressedStyle() { + .backgroundColor('rgba(0,0,0,0.1)') + .opacity(1) + .animation({ curve: curves.cubicBezierCurve(0.33, 0, 0.67, 1), duration: 100 }) +} + +@Styles +function cardNormalStyle() { + .backgroundColor('rgba(0,0,0,0)') + .opacity(1) + .animation({ curve: curves.cubicBezierCurve(0.33, 0, 0.67, 1), duration: 100 }) +} + +@Styles +function cardDisabledStyle() { + .backgroundColor('rgba(0,0,0,0)') + .opacity(0.5) + .animation({ curve: curves.cubicBezierCurve(0.33, 0, 0.67, 1), duration: 100 }) +} + + +@Entry +@Component +struct ComponentExtension { + @Provide('router') router: NavPathStack = new NavPathStack(); + @State routes: RouteGroup[] = [ + { + name: 'StateStyle', + label: $r('app.string.StateStyles'), + children: [ + { name: 'StateStylesSample', label: $r('app.string.StateStylesExample') }, + ] + }, + { + name: 'NormalStyle', + label: $r('app.string.MyComponent'), + children: [ + { name: 'MyComponent', label: $r('app.string.MyComponentExample') }, + ] + }, + { + name: 'FocusStyle', + label: $r('app.string.CompWithInlineStateStyles'), + children: [ + { name: 'CompWithInlineStateStyles', label: $r('app.string.CompWithInlineStateStylesExample') }, + ] + } + ]; + @State selection: string | null = null; + + @Builder + ListItemGroupHeader(route: RouteGroup) { + Row() { + Text(route.label) + .fontColor($r('sys.color.ohos_id_color_text_primary')) + .fontWeight(FontWeight.Medium) + + Blank() + + Text(`${route.children.length}`) + .fontColor($r('sys.color.ohos_id_color_text_secondary')) + .opacity(this.selection === route.name ? 0 : 1) + + Image($r('sys.media.ohos_ic_public_arrow_right')) + .fillColor($r('sys.color.ohos_id_color_fourth')) + .height(24) + .width(24) + .rotate({ angle: this.selection === route.name ? 90 : 0 }) + .animation({ curve: curves.interpolatingSpring(0, 1, 228, 30) }) + } + .borderRadius(20) + .width('100%') + .padding(8) + .enabled(!!route.children.length) + .stateStyles({ + pressed: cardPressedStyle, + normal: cardNormalStyle, + disabled: cardDisabledStyle, + }) + .onClick(() => { + animateTo( + { curve: curves.interpolatingSpring(0, 1, 228, 25) }, + () => { + if (this.selection === route.name) { + this.selection = null; + } else { + this.selection = route.name; + } + }); + }) + } + + aboutToAppear(): void{ + this.getUIContext().setKeyboardAvoidMode(KeyboardAvoidMode.RESIZE); + } + build() { + Column() { + Text('ComponentExtension') + List() { + ForEach(this.routes, (routeGroup: RouteGroup) => { + ListItemGroup({ + header: this.ListItemGroupHeader(routeGroup), + style: ListItemGroupStyle.CARD, + }) { + if (routeGroup.name === this.selection) { + ForEach(routeGroup.children, (route: Route) => { + ListItem() { + Row() { + Text(route.label).fontSize(16) + Blank() + Image($r('sys.media.ohos_ic_public_arrow_right')) + .fillColor($r('sys.color.ohos_id_color_fourth')) + .height(24) + .width(24) + } + .stateStyles({ + pressed: cardPressedStyle, + normal: cardNormalStyle, + disabled: cardDisabledStyle, + }) + .borderRadius(20) + .padding(8) + .transition( + TransitionEffect.OPACITY.animation({ + curve: curves.interpolatingSpring(0, 1, 228, 30) + }) + ) + .width('100%') + .onClick(() => { + const name = `pages/${routeGroup.name}/${route.name}`; + router.pushUrl({url: name}); + }) + } + .width('100%') + }) + } + } + .padding(2) + .divider({ strokeWidth: 0.5 }) + }) + }.padding({bottom: 10}) + } + } +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/ets/pages/NormalStyle/MyComponent.ets b/ArkUIKit/StateStyle/entry/src/main/ets/pages/NormalStyle/MyComponent.ets new file mode 100644 index 0000000000000000000000000000000000000000..da04979f685c59cd54836e0d9faf97bdcaa97fe9 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/ets/pages/NormalStyle/MyComponent.ets @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// [Start normal_style] +@Entry +@Component +struct MyComponent { + @Styles normalStyle() { + .backgroundColor(Color.Gray) + } + + @Styles pressedStyle() { + .backgroundColor(Color.Red) + } + build() { + Column() { + Text('Text1') + .fontSize(50) + .fontColor(Color.White) + .stateStyles({ + normal: this.normalStyle, + pressed: this.pressedStyle, + }) + } + } +} +// [End normal_style] \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/ets/pages/StateStyle/StateStylesSample.ets b/ArkUIKit/StateStyle/entry/src/main/ets/pages/StateStyle/StateStylesSample.ets new file mode 100644 index 0000000000000000000000000000000000000000..8c9464cb10464de1157b7eaea493a396c9122d8b --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/ets/pages/StateStyle/StateStylesSample.ets @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// [Start state_style] +@Entry +@Component +struct StateStylesSample { + build() { + Column() { + Button('Button1') + .stateStyles({ + focused: { + .backgroundColor('#ffffeef0') + }, + pressed: { + .backgroundColor('#ff707070') + }, + normal: { + .backgroundColor('#ff2787d9') + } + }) + .margin(20) + Button('Button2') + .stateStyles({ + focused: { + .backgroundColor('#ffffeef0') + }, + pressed: { + .backgroundColor('#ff707070') + }, + normal: { + .backgroundColor('#ff2787d9') + } + }) + }.margin('30%') + } +} +// [End state_style] \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/ets/pages/common/Index.ets b/ArkUIKit/StateStyle/entry/src/main/ets/pages/common/Index.ets new file mode 100644 index 0000000000000000000000000000000000000000..02c5c6b987280c6731d3e40af7c56c416176a3af --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/ets/pages/common/Index.ets @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export interface Route { + name: string; + label: ResourceStr; +} + +export interface RouteGroup extends Route { + children: Route[]; +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/module.json5 b/ArkUIKit/StateStyle/entry/src/main/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..44e30abf324bffa0b0c832125d835c1de2cf9bc9 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/module.json5 @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "module": { + "name": "entry", + "type": "entry", + "description": "$string:module_desc", + "mainElement": "EntryAbility", + "deviceTypes": [ + "default" + ], + "deliveryWithInstall": true, + "installationFree": false, + "pages": "$profile:main_pages", + "abilities": [ + { + "name": "EntryAbility", + "srcEntry": "./ets/entryability/EntryAbility.ets", + "description": "$string:EntryAbility_desc", + "icon": "$media:layered_image", + "label": "$string:EntryAbility_label", + "startWindowIcon": "$media:startIcon", + "startWindowBackground": "$color:start_window_background", + "exported": true, + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "ohos.want.action.home" + ] + } + ] + } + ], + "extensionAbilities": [ + { + "name": "EntryBackupAbility", + "srcEntry": "./ets/entrybackupability/EntryBackupAbility.ets", + "type": "backup", + "exported": false, + "metadata": [ + { + "name": "ohos.extension.backup", + "resource": "$profile:backup_config" + } + ], + } + ] + } +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/base/element/color.json b/ArkUIKit/StateStyle/entry/src/main/resources/base/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..3c712962da3c2751c2b9ddb53559afcbd2b54a02 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/resources/base/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#FFFFFF" + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/base/element/float.json b/ArkUIKit/StateStyle/entry/src/main/resources/base/element/float.json new file mode 100644 index 0000000000000000000000000000000000000000..33ea22304f9b1485b5f22d811023701b5d4e35b6 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/resources/base/element/float.json @@ -0,0 +1,8 @@ +{ + "float": [ + { + "name": "page_text_font_size", + "value": "50fp" + } + ] +} diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/base/element/string.json b/ArkUIKit/StateStyle/entry/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..c7a9e5ca413b178718ef38892315e791d0442e90 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/resources/base/element/string.json @@ -0,0 +1,64 @@ +{ + "string": [ + { + "name": "module_desc", + "value": "module description" + }, + { + "name": "EntryAbility_desc", + "value": "description" + }, + { + "name": "EntryAbility_label", + "value": "label" + }, + { + "name": "parent", + "value": "生命周期" + }, + { + "name": "parentExample", + "value": "自定义组件生命周期" + }, + { + "name": "AnimatablePropertyText", + "value": "动画装饰器2" + }, + { + "name": "StylesDecorator", + "value": "Style装饰器" + }, + { + "name": "fancyAndglobalFancy", + "value": "Style装饰器1" + }, + { + "name": "FancyUse", + "value": "Style装饰器2" + }, + { + "name": "StateStyles", + "value": "基础场景" + }, + { + "name": "StateStylesExample", + "value": "基础场景示例" + }, + { + "name": "MyComponent", + "value": "按压态" + }, + { + "name": "MyComponentExample", + "value": "按压态示例" + }, + { + "name": "CompWithInlineStateStyles", + "value": "获焦变色" + }, + { + "name": "CompWithInlineStateStylesExample", + "value": "获焦变色示例" + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/base/media/background.png b/ArkUIKit/StateStyle/entry/src/main/resources/base/media/background.png new file mode 100644 index 0000000000000000000000000000000000000000..923f2b3f27e915d6871871deea0420eb45ce102f Binary files /dev/null and b/ArkUIKit/StateStyle/entry/src/main/resources/base/media/background.png differ diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/base/media/foreground.png b/ArkUIKit/StateStyle/entry/src/main/resources/base/media/foreground.png new file mode 100644 index 0000000000000000000000000000000000000000..97014d3e10e5ff511409c378cd4255713aecd85f Binary files /dev/null and b/ArkUIKit/StateStyle/entry/src/main/resources/base/media/foreground.png differ diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/base/media/layered_image.json b/ArkUIKit/StateStyle/entry/src/main/resources/base/media/layered_image.json new file mode 100644 index 0000000000000000000000000000000000000000..fb49920440fb4d246c82f9ada275e26123a2136a --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/resources/base/media/layered_image.json @@ -0,0 +1,7 @@ +{ + "layered-image": + { + "background" : "$media:background", + "foreground" : "$media:foreground" + } +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/base/media/startIcon.png b/ArkUIKit/StateStyle/entry/src/main/resources/base/media/startIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..205ad8b5a8a42e8762fbe4899b8e5e31ce822b8b Binary files /dev/null and b/ArkUIKit/StateStyle/entry/src/main/resources/base/media/startIcon.png differ diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/base/profile/backup_config.json b/ArkUIKit/StateStyle/entry/src/main/resources/base/profile/backup_config.json new file mode 100644 index 0000000000000000000000000000000000000000..78f40ae7c494d71e2482278f359ec790ca73471a --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/resources/base/profile/backup_config.json @@ -0,0 +1,3 @@ +{ + "allowToBackupRestore": true +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/base/profile/main_pages.json b/ArkUIKit/StateStyle/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 0000000000000000000000000000000000000000..bdce0c21044f47dd940418949dec745b6f28b4f2 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,8 @@ +{ + "src": [ + "pages/Index", + "pages/StateStyle/StateStylesSample", + "pages/NormalStyle/MyComponent", + "pages/FocusStyle/CompWithInlineStateStyles" + ] +} diff --git a/ArkUIKit/StateStyle/entry/src/main/resources/dark/element/color.json b/ArkUIKit/StateStyle/entry/src/main/resources/dark/element/color.json new file mode 100644 index 0000000000000000000000000000000000000000..79b11c2747aec33e710fd3a7b2b3c94dd9965499 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/main/resources/dark/element/color.json @@ -0,0 +1,8 @@ +{ + "color": [ + { + "name": "start_window_background", + "value": "#000000" + } + ] +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/mock/mock-config.json5 b/ArkUIKit/StateStyle/entry/src/mock/mock-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..323d1d611fecf4ecb751976e3a71500b3712a445 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/mock/mock-config.json5 @@ -0,0 +1,16 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/ohosTest/ets/test/Ability.test.ets b/ArkUIKit/StateStyle/entry/src/ohosTest/ets/test/Ability.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..0f8ce9a2c012f8fe36114cef65216ef0b6254f41 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/ohosTest/ets/test/Ability.test.ets @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { hilog } from '@kit.PerformanceAnalysisKit'; +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function abilityTest() { + describe('ActsAbilityTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }) + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }) + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }) + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }) + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + hilog.info(0x0000, 'testTag', '%{public}s', 'it begin'); + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }) + }) +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/ohosTest/ets/test/List.test.ets b/ArkUIKit/StateStyle/entry/src/ohosTest/ets/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..69a4acf0c78a039177ffdfc09b92be284aa58463 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/ohosTest/ets/test/List.test.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import StateStyleTest from './StateStyle.test'; + +export default function testsuite() { + StateStyleTest(); +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/ohosTest/ets/test/StateStyle.test.ets b/ArkUIKit/StateStyle/entry/src/ohosTest/ets/test/StateStyle.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..544e23b287e4f8be840a120fe72b6acfbb780afa --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/ohosTest/ets/test/StateStyle.test.ets @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { describe, it, expect, beforeAll } from '@ohos/hypium'; +// 导入测试依赖kit +import { abilityDelegatorRegistry, Driver, ON, MatchPattern } from '@kit.TestKit'; +import { UIAbility, Want } from '@kit.AbilityKit'; + + +const delegator: abilityDelegatorRegistry.AbilityDelegator = abilityDelegatorRegistry.getAbilityDelegator(); +const bundleName = abilityDelegatorRegistry.getArguments().bundleName; +let want: Want; + +export default function ParentTest() { + describe('StateStyleTest', () => { + beforeAll(async () => { + want = { + bundleName: bundleName, + abilityName: 'EntryAbility' + }; + await delegator.startAbility(want); + let driver = Driver.create(); + await driver.delayMs(1000); + const ability: UIAbility = await delegator.getCurrentTopAbility(); + console.info('get top ability'); + expect(ability.context.abilityInfo.name).assertEqual('EntryAbility'); + }) + + + /** + * @tc.number StateStyle_0100 + * @tc.name testStateStyle_0100 + * @tc.desc 测试多态样式 + */ + it('StateStyle_0100', 0, async (done: Function) => { + let driver = Driver.create(); + let button = await driver.findComponent(ON.text('基础场景', MatchPattern.CONTAINS)); + await button.click(); + let button1 = await driver.findComponent(ON.text('基础场景示例', MatchPattern.CONTAINS)); + await button1.click(); + let button2 = await driver.findComponent(ON.text('Button1', MatchPattern.CONTAINS)); + await button2.click(); + await driver.delayMs(2000); + await driver.pressBack(); + done(); + }) + + /** + * @tc.number StateStyle_0200 + * @tc.name testStateStyle_0200 + * @tc.desc 测试多态样式 + */ + it('StateStyle_0200', 0, async (done: Function) => { + let driver = Driver.create(); + let button = await driver.findComponent(ON.text('按压态', MatchPattern.CONTAINS)); + await button.click(); + let button1 = await driver.findComponent(ON.text('按压态示例', MatchPattern.CONTAINS)); + await button1.click(); + let button2 = await driver.findComponent(ON.text('Text1', MatchPattern.CONTAINS)); + await button2.click(); + await driver.delayMs(2000); + await driver.pressBack(); + done(); + }) + + /** + * @tc.number StateStyle_0300 + * @tc.name testStateStyle_0300 + * @tc.desc 测试多态样式 + */ + it('StateStyle_0300', 0, async (done: Function) => { + let driver = Driver.create(); + let button = await driver.findComponent(ON.text('获焦变色', MatchPattern.CONTAINS)); + await button.click(); + let button1 = await driver.findComponent(ON.text('获焦变色示例', MatchPattern.CONTAINS)); + await button1.click(); + let button2 = await driver.findComponent(ON.text('clickMe', MatchPattern.CONTAINS)); + await button2.click(); + await driver.delayMs(2000); + await driver.pressBack(); + done(); + }) + }) +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/ohosTest/module.json5 b/ArkUIKit/StateStyle/entry/src/ohosTest/module.json5 new file mode 100644 index 0000000000000000000000000000000000000000..84d30586d591412f4252801cc483bbc6d8554104 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/ohosTest/module.json5 @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "module": { + "name": "entry_test", + "type": "feature", + "deviceTypes": [ + "default" + ], + "deliveryWithInstall": true, + "installationFree": false + } +} diff --git a/ArkUIKit/StateStyle/entry/src/test/List.test.ets b/ArkUIKit/StateStyle/entry/src/test/List.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..f1186b1f53c3a70930921c5dbd1417332bec56c9 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/test/List.test.ets @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import localUnitTest from './LocalUnit.test'; + +export default function testsuite() { + localUnitTest(); +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/entry/src/test/LocalUnit.test.ets b/ArkUIKit/StateStyle/entry/src/test/LocalUnit.test.ets new file mode 100644 index 0000000000000000000000000000000000000000..7fc57c77dbf76d8df08a2b802a55b948e3fcf968 --- /dev/null +++ b/ArkUIKit/StateStyle/entry/src/test/LocalUnit.test.ets @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'; + +export default function localUnitTest() { + describe('localUnitTest', () => { + // Defines a test suite. Two parameters are supported: test suite name and test suite function. + beforeAll(() => { + // Presets an action, which is performed only once before all test cases of the test suite start. + // This API supports only one parameter: preset action function. + }); + beforeEach(() => { + // Presets an action, which is performed before each unit test case starts. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: preset action function. + }); + afterEach(() => { + // Presets a clear action, which is performed after each unit test case ends. + // The number of execution times is the same as the number of test cases defined by **it**. + // This API supports only one parameter: clear action function. + }); + afterAll(() => { + // Presets a clear action, which is performed after all test cases of the test suite end. + // This API supports only one parameter: clear action function. + }); + it('assertContain', 0, () => { + // Defines a test case. This API supports three parameters: test case name, filter parameter, and test case function. + let a = 'abc'; + let b = 'b'; + // Defines a variety of assertion methods, which are used to declare expected boolean conditions. + expect(a).assertContain(b); + expect(a).assertEqual(a); + }); + }); +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/hvigor/hvigor-config.json5 b/ArkUIKit/StateStyle/hvigor/hvigor-config.json5 new file mode 100644 index 0000000000000000000000000000000000000000..3b057578a1bb4d591ee53054e39ab0154fc2e43a --- /dev/null +++ b/ArkUIKit/StateStyle/hvigor/hvigor-config.json5 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +{ + "modelVersion": "6.0.0", + "dependencies": { + }, + "execution": { + // "analyze": "normal", /* Define the build analyze mode. Value: [ "normal" | "advanced" | "ultrafine" | false ]. Default: "normal" */ + // "daemon": true, /* Enable daemon compilation. Value: [ true | false ]. Default: true */ + // "incremental": true, /* Enable incremental compilation. Value: [ true | false ]. Default: true */ + // "parallel": true, /* Enable parallel compilation. Value: [ true | false ]. Default: true */ + // "typeCheck": false, /* Enable typeCheck. Value: [ true | false ]. Default: false */ + // "optimizationStrategy": "memory" /* Define the optimization strategy. Value: [ "memory" | "performance" ]. Default: "memory" */ + }, + "logging": { + // "level": "info" /* Define the log level. Value: [ "debug" | "info" | "warn" | "error" ]. Default: "info" */ + }, + "debugging": { + // "stacktrace": false /* Disable stacktrace compilation. Value: [ true | false ]. Default: false */ + }, + "nodeOptions": { + // "maxOldSpaceSize": 8192 /* Enable nodeOptions maxOldSpaceSize compilation. Unit M. Used for the daemon process. Default: 8192*/ + // "exposeGC": true /* Enable to trigger garbage collection explicitly. Default: true*/ + } +} diff --git a/ArkUIKit/StateStyle/hvigorfile.ts b/ArkUIKit/StateStyle/hvigorfile.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3340f07e45ddc5dcadbb87012668555def2e6e0 --- /dev/null +++ b/ArkUIKit/StateStyle/hvigorfile.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { appTasks } from '@ohos/hvigor-ohos-plugin'; + +export default { + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +} \ No newline at end of file diff --git a/ArkUIKit/StateStyle/oh-package.json5 b/ArkUIKit/StateStyle/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..69cb43cba3addcee1840403c67405134a2a9102c --- /dev/null +++ b/ArkUIKit/StateStyle/oh-package.json5 @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{ + "modelVersion": "6.0.0", + "description": "Please describe the basic information.", + "dependencies": { + }, + "devDependencies": { + "@ohos/hypium": "1.0.24", + "@ohos/hamock": "1.0.0" + } +} diff --git a/ArkUIKit/StateStyle/screenshots/device/image1.png b/ArkUIKit/StateStyle/screenshots/device/image1.png new file mode 100644 index 0000000000000000000000000000000000000000..0c095852957cdfc55b7798c5181b1ab3eccc22ae Binary files /dev/null and b/ArkUIKit/StateStyle/screenshots/device/image1.png differ diff --git a/ArkUIKit/StateStyle/screenshots/device/image2.png b/ArkUIKit/StateStyle/screenshots/device/image2.png new file mode 100644 index 0000000000000000000000000000000000000000..3e758bcc3f9c4fa8573a5e1e5b8b0d7d5cf51625 Binary files /dev/null and b/ArkUIKit/StateStyle/screenshots/device/image2.png differ diff --git a/ArkUIKit/StateStyle/screenshots/device/image3.png b/ArkUIKit/StateStyle/screenshots/device/image3.png new file mode 100644 index 0000000000000000000000000000000000000000..1000f8e2273fbd7415bf45d91b8760ceb0dfc413 Binary files /dev/null and b/ArkUIKit/StateStyle/screenshots/device/image3.png differ