diff --git a/.eslintignore b/.eslintignore index a74b14fcd..03522465e 100644 --- a/.eslintignore +++ b/.eslintignore @@ -7,7 +7,7 @@ packages/hippy-vue/types packages/hippy-debug-server/webpack-dev-server/client packages/hippy-debug-server/webpack-dev-server/lib packages/hippy-vue-loader/lib -framework/js/packages/hippy-vue/types -framework/js/packages/hippy-debug-server/webpack-dev-server/client -framework/js/packages/hippy-debug-server/webpack-dev-server/lib -framework/js/packages/hippy-vue-loader/lib +driver/js/packages/hippy-vue/types +driver/js/packages/hippy-debug-server/webpack-dev-server/client +driver/js/packages/hippy-debug-server/webpack-dev-server/lib +driver/js/packages/hippy-vue-loader/lib diff --git a/.eslintrc.js b/.eslintrc.js index 3b0dae20e..c04fe0f14 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -141,7 +141,7 @@ module.exports = { ['core', resolveVue('core')], ['shared', resolveVue('shared')], ['sfc', resolveVue('sfc')], - ['he', path.resolve(__dirname, './framework/js/packages/hippy-vue/src/util/entity-decoder')], + ['he', path.resolve(__dirname, './driver/js/packages/hippy-vue/src/util/entity-decoder')], ], }, }, diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f8b08e247..0198b4846 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -34,21 +34,20 @@ /dom/ @churchill-zhang @ilikethese -/framework/js/core/ @churchill-zhang @zoomchan-cxj -/framework/js/core/js/ @zoomchan-cxj +/driver/js/core/ @churchill-zhang @zoomchan-cxj +/driver/js/core/js/ @zoomchan-cxj -/framework/js/android/ @siguangli @churchill-zhang -/framework/js/ios/ @ozonelmy @churchill-zhang -/ios/ @ozonelmy @churchill-zhang +/driver/js/android/ @siguangli @churchill-zhang +/driver/js/ios/ @ozonelmy @churchill-zhang -/framework/js/examples/android-demo/ @siguangli -/framework/js/examples/android-demo/res/ @zoomchan-cxj -/framework/js/examples/ios-demo/ @ozonelmy -/framework/js/examples/ios-demo/res/ @zoomchan-cxj -/framework/js/examples/hippy-react-demo/ @zoomchan-cxj -/framework/js/examples/hippy-vue-demo/ @zoomchan-cxj +/driver/js/examples/android-demo/ @siguangli +/driver/js/examples/android-demo/res/ @zoomchan-cxj +/driver/js/examples/ios-demo/ @ozonelmy +/driver/js/examples/ios-demo/res/ @zoomchan-cxj +/driver/js/examples/hippy-react-demo/ @zoomchan-cxj +/driver/js/examples/hippy-vue-demo/ @zoomchan-cxj -/framework/js/packages/ @zoomchan-cxj +/driver/js/packages/ @zoomchan-cxj /gradle/ @siguangli @medns /layout/ @ilikethese diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 52b17d325..99ef3c2df 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -3,9 +3,9 @@ name: '[front-end] check js code' on: pull_request: paths: - - 'framework/js/packages/**' - - 'framework/js/examples/hippy-*-demo/**' - - 'framework/js/core/js/**/*.js' + - 'driver/js/packages/**' + - 'driver/js/examples/hippy-*-demo/**' + - 'driver/js/core/js/**/*.js' - 'package*.json' - 'scripts/**/*.js' branches: diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml index 6d38c3f48..b6c2b13d1 100644 --- a/.github/workflows/ios.yml +++ b/.github/workflows/ios.yml @@ -3,7 +3,7 @@ name: '[iOS] build iOS native example' on: pull_request: paths: - - 'framework/js/ios/**' + - 'driver/js/ios/**' - 'ios/**' branches: # Pull request events to main branch @@ -27,4 +27,4 @@ jobs: # https://github.com/actions/virtual-environments/issues/4180 # Xcode_13 will be selected on October, 18, so we need to set to xcode13 manually before that day. sudo xcode-select --switch '/Applications/Xcode_13.0.app/' - pushd framework/js/examples/ios-demo && xcodebuild build -destination 'name=iPhone 11' -scheme 'HippyDemo' && popd + pushd driver/js/examples/ios-demo && xcodebuild build -destination 'name=iPhone 11' -scheme 'HippyDemo' && popd diff --git a/.nycrc b/.nycrc index e8807d962..e27872019 100644 --- a/.nycrc +++ b/.nycrc @@ -1,9 +1,9 @@ { "include": [ - "framework/js/packages/**/*.js" + "driver/js/packages/**/*.js" ], "exclude": [ - "framework/js/packages/**/__tests__/*.test.js" + "driver/js/packages/**/__tests__/*.test.js" ], "reporter": [ "lcov", diff --git a/README.md b/README.md index f115927b4..39874ac1d 100644 --- a/README.md +++ b/README.md @@ -59,9 +59,9 @@ For iOS, we recommend to use iOS simulator when first try. However, you can chan > `npm run build`: Build each front-end sdk package. 2. Choose a demo to build with `npm run buildexample [hippy-react-demo|hippy-vue-demo]` at root directory. -3. Start the Xcode and build the iOS app with `open framework/js/examples/ios-demo/HippyDemo.xcodeproj`. +3. Start the Xcode and build the iOS app with `open driver/js/examples/ios-demo/HippyDemo.xcodeproj`. -> If `Step 2` throw error, you can `cd` to `framework/js/examples` hippy-react-demo or hippy-vue-demo, and run `npm install --legacy-peer-deps` to install demo dependencies first. +> If `Step 2` throw error, you can `cd` to `driver/js/examples` hippy-react-demo or hippy-vue-demo, and run `npm install --legacy-peer-deps` to install demo dependencies first. > > More details for [iOS SDK integration](https://hippyjs.org/#/ios/integration?id=ios-%e9%9b%86%e6%88%90). @@ -82,11 +82,11 @@ Before build the android app, please make sure the SDK and NDK is installed, And > `npm run build`: Build each front-end sdk package. 2. Choose a demo to build with `npm run buildexample [hippy-react-demo|hippy-vue-demo]` at root directory. -3. Open the `framework/js/examples/android-demo` with Android Studio. +3. Open the `driver/js/examples/android-demo` with Android Studio. 4. Connect Android phone with USB cable and make sure USB debugging mode is enabled(Run `adb devices` on the computer terminal to check cellphone connection status). 5. Open the project with Android Studio, run and install the apk. -> If `Step 2` throw error, you can `cd` to `framework/js/examples` hippy-react-demo or hippy-vue-demo, and run `npm install --legacy-peer-deps` to install demo dependencies first. +> If `Step 2` throw error, you can `cd` to `driver/js/examples` hippy-react-demo or hippy-vue-demo, and run `npm install --legacy-peer-deps` to install demo dependencies first. > > If you encounter the issue of `No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android`, here is the [solution](https://github.com/google/filament/issues/15#issuecomment-415423557). > @@ -99,9 +99,9 @@ Before build the android app, please make sure the SDK and NDK is installed, And 3. Run `npm run debugexample [hippy-react-demo|hippy-vue-demo] debug` at root directory. 4. Run `npm run debugexample [hippy-react-demo|hippy-vue-demo] dev` at root directory. -> Or you can `cd` to `framework/js/examples/hippy-react-demo` or `framework/js/examples/hippy-vue-demo` directory to run `npm run hippy:debug` and `npm run hippy:dev` instead. +> Or you can `cd` to `driver/js/examples/hippy-react-demo` or `driver/js/examples/hippy-vue-demo` directory to run `npm run hippy:debug` and `npm run hippy:dev` instead. > -> On example debug mode, npm packages such as @hippy/react, @hippy/vue are linked to `framework/js/packages` > `[different package]` > `dist`(not node_modules), so if you have changed js package source code and want to make it take effect in target example, please call `npm run build` at root directory again. +> On example debug mode, npm packages such as @hippy/react, @hippy/vue are linked to `driver/js/packages` > `[different package]` > `dist`(not node_modules), so if you have changed js package source code and want to make it take effect in target example, please call `npm run build` at root directory again. > > More details for debugging can be read in [Hippy Debug Document](https://hippyjs.org/#/guide/debug). diff --git a/README.zh_CN.md b/README.zh_CN.md index a1684b1de..e81cf336a 100644 --- a/README.zh_CN.md +++ b/README.zh_CN.md @@ -60,9 +60,9 @@ Windows 用户者需要以下软件: > `npm run build`:编译每一个 JS SDK 包。 2. 选择一个前端范例项目来进行编译,在项目根目录运行 `npm run buildexample [hippy-react-demo|hippy-vue-demo]`。 -3. 启动 Xcode 并且开始编译终端 App:`open framework/js/examples/ios-demo/HippyDemo.xcodeproj`。 +3. 启动 Xcode 并且开始编译终端 App:`open driver/js/examples/ios-demo/HippyDemo.xcodeproj`。 -> 如果步骤2出现错误,可以先 `cd` 到 `framework/js/examples` hippy-react-demo 或者 hippy-vue-demo 目录下,执行 `npm install --legacy-peer-deps`,提前将 demo 的 NPM 包依赖先安装好。 +> 如果步骤2出现错误,可以先 `cd` 到 `driver/js/examples` hippy-react-demo 或者 hippy-vue-demo 目录下,执行 `npm install --legacy-peer-deps`,提前将 demo 的 NPM 包依赖先安装好。 > > 更多信息请参考 [iOS SDK 集成](https://hippyjs.org/#/ios/integration?id=ios-%e9%9b%86%e6%88%90)。 @@ -81,7 +81,7 @@ Windows 用户者需要以下软件: > > `npm run build`:编译每一个 JS SDK 包。 2. 选择一个前端范例项目来进行编译,在项目根目录运行 `npm run buildexample [hippy-react-demo|hippy-vue-demo]`。 -3. 用 Android Studio 来打开终端范例工程 `framework/js/examples`。 +3. 用 Android Studio 来打开终端范例工程 `driver/js/examples`。 4. 用 USB 数据线插上你的 Android 手机,需要确认手机已经打开 USB 调试模式(可通过在电脑 Terminal 执行 `adb devices` 判断手机是否已经连上了电脑)。 5. 运行工程,并安装 APK。 @@ -98,9 +98,9 @@ Windows 用户者需要以下软件: 3. 根目录执行 `npm run debugexample [hippy-react-demo|hippy-vue-demo] debug`。 4. 根目录执行 `npm run debugexample [hippy-react-demo|hippy-vue-demo] dev`。 -> 你也可以 `cd` 到 `framework/js/examples/hippy-react-demo` 或者 `framework/js/examples//hippy-vue-demo` 目录去分别执行 `npm run hippy:debug` 和 `npm run hippy:dev`。 +> 你也可以 `cd` 到 `driver/js/examples/hippy-react-demo` 或者 `driver/js/examples//hippy-vue-demo` 目录去分别执行 `npm run hippy:debug` 和 `npm run hippy:dev`。 > -> 在 example 调试模式下,@hippy/react、@hippy/vue 等 npm 模块会直接链接到 `framework/js/packages` > `[different package]` > `dist` 目录下面的 js 文件(非 node_modules),所以如果你修改了 packages 下的 JS 源代码并且想让其在 example 中生效,请重新在根目录执行 `npm run build`。 +> 在 example 调试模式下,@hippy/react、@hippy/vue 等 npm 模块会直接链接到 `driver/js/packages` > `[different package]` > `dist` 目录下面的 js 文件(非 node_modules),所以如果你修改了 packages 下的 JS 源代码并且想让其在 example 中生效,请重新在根目录执行 `npm run build`。 > > 更多关于调试的说明请浏览 [Hippy Debug Document](https://hippyjs.org/#/guide/debug)。 diff --git a/ava.config.js b/ava.config.js index 4013b0019..42e4d02b6 100644 --- a/ava.config.js +++ b/ava.config.js @@ -13,7 +13,7 @@ export default { extensions: false, compileEnhancements: false, files: [ - 'framework/js/packages/**/__tests__/*.test.js', + 'driver/js/packages/**/__tests__/*.test.js', ], require: [ 'esm', // Use ES modules in NodeJS. diff --git a/docs/android/integration.md b/docs/android/integration.md index 51d88decc..67e8bf958 100755 --- a/docs/android/integration.md +++ b/docs/android/integration.md @@ -12,7 +12,7 @@ # Demo 体验 -若想快速体验,可以直接基于我们的 [Android Demo](https://github.com/Tencent/Hippy/tree/master/framework/js/examples/android-demo) 来开发 +若想快速体验,可以直接基于我们的 [Android Demo](https://github.com/Tencent/Hippy/tree/master/driver/js/examples/android-demo) 来开发 # 快速接入 @@ -20,7 +20,7 @@ 2. 本地集成 - - [Demo](//github.com/Tencent/Hippy/tree/master/framework/js/examples/android-demo) 工程运行 Gradle Task `other => assembleRelease` 或者 `other => assembleDebug` 后会在 `android\sdk\build\outputs\aar` 目录下生成 `release` 或者 `debug` 模式的 + - [Demo](//github.com/Tencent/Hippy/tree/master/driver/js/examples/android-demo) 工程运行 Gradle Task `other => assembleRelease` 或者 `other => assembleDebug` 后会在 `android\sdk\build\outputs\aar` 目录下生成 `release` 或者 `debug` 模式的 `android-sdk.aar`,将 `android-sdk.aar` 拷贝到你项目的 `libs` 目录下。 !> 通过 `assembleRelease` task 生成的 AAR 默认不携带 `inspector` 模块,不能在前端通过 Devtools 对代码进行调试,若需要集成 `inspector`,请执行 `assembleDebug` task @@ -47,6 +47,6 @@ api 'com.android.support:support-v4:28.0.0' ``` -4. 继承 `HippyImageLoader` 并实现自己的图片加载器,具体可以参考 [Demo](//github.com/Tencent/Hippy/tree/master/framework/js/examples/android-demo) 工程中 `MyImageLoader` 实现。 +4. 继承 `HippyImageLoader` 并实现自己的图片加载器,具体可以参考 [Demo](//github.com/Tencent/Hippy/tree/master/driver/js/examples/android-demo) 工程中 `MyImageLoader` 实现。 -5. 在宿主 APP 工程中增加引擎初始化与 `hippyRootView` 挂载逻辑,具体可以参考 [Demo](//github.com/Tencent/Hippy/tree/master/framework/js/examples/android-demo) 工程中 MyActivity 实现 +5. 在宿主 APP 工程中增加引擎初始化与 `hippyRootView` 挂载逻辑,具体可以参考 [Demo](//github.com/Tencent/Hippy/tree/master/driver/js/examples/android-demo) 工程中 MyActivity 实现 diff --git a/docs/core/introduction.md b/docs/core/introduction.md index 2f1396693..a27d25c05 100644 --- a/docs/core/introduction.md +++ b/docs/core/introduction.md @@ -1,6 +1,6 @@ # Hippy Core 架构 -Hippy 开发的时候,前端 JS 经常需要访问一些双端(Android 和 iOS)通用能力,Hippy 推荐使用 `internalBinding` 来实现底层能力扩展(我们将这项能力称为 [Core 架构](//github.com/Tencent/Hippy/tree/master/framework/js/core)),它和 Node.js 的 internalBinding 一样,使用 C++ 进行开发,直接共享 JS 和 C++ 运行环境和数据,提供了非常高的 JS 和终端通信性能。 +Hippy 开发的时候,前端 JS 经常需要访问一些双端(Android 和 iOS)通用能力,Hippy 推荐使用 `internalBinding` 来实现底层能力扩展(我们将这项能力称为 [Core 架构](//github.com/Tencent/Hippy/tree/master/driver/js/core)),它和 Node.js 的 internalBinding 一样,使用 C++ 进行开发,直接共享 JS 和 C++ 运行环境和数据,提供了非常高的 JS 和终端通信性能。 它的原理是在 JS 环境中直接插入函数、类等方式,JS 使用这些函数或方法,可以直接访问 C++ 代码。 diff --git a/docs/guide/custom-font.md b/docs/guide/custom-font.md index f44d7f071..38066bbca 100644 --- a/docs/guide/custom-font.md +++ b/docs/guide/custom-font.md @@ -6,7 +6,7 @@ 前端使用自定义字体非常简单,和浏览器一样,使用 [font-family](https://www.w3schools.com/cssref/pr_font_font-family.asp) 样式即可。 -有两个范例:[hippy-react-demo](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/Text/index.jsx#L49)、[hippy-vue-demo](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue#L41) +有两个范例:[hippy-react-demo](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/src/components/Text/index.jsx#L49)、[hippy-vue-demo](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/demos/demo-p.vue#L41) 但是如果要使用操作系统自带以外的字体,需要单独整合一下,继续阅读下面内容。 @@ -63,4 +63,4 @@ Android 只需要在静态资源 `assets` 目录中建立 `fonts` 目录,然 需要注意的是,字体文件名需要和 FontFamily 一致,因为 Android 虽然也可以做字体文件名映射,但是字体和文件名一致无疑是最简单的办法。 -> 官方 demo 的字体放在 [res/fonts](https://github.com/Tencent/Hippy/tree/master/framework/js/examples/android-demo/res) 目录下,是因为编译脚本[将 `res` 目录下的文件直接拷贝到 `assets` 目录](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/android-demo/build.gradle#L35)下了,所以 `res/assets` 就变成 `assets/assets` 目录,为了让字体目录正确拷贝进 `assets` 静态资源目录,只能让它放在 `res` 下。 +> 官方 demo 的字体放在 [res/fonts](https://github.com/Tencent/Hippy/tree/master/driver/js/examples/android-demo/res) 目录下,是因为编译脚本[将 `res` 目录下的文件直接拷贝到 `assets` 目录](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/android-demo/build.gradle#L35)下了,所以 `res/assets` 就变成 `assets/assets` 目录,为了让字体目录正确拷贝进 `assets` 静态资源目录,只能让它放在 `res` 下。 diff --git a/docs/guide/dynamic-import.md b/docs/guide/dynamic-import.md index 00232d055..3be284b24 100644 --- a/docs/guide/dynamic-import.md +++ b/docs/guide/dynamic-import.md @@ -15,9 +15,9 @@ Hippy 2.2 版本之前只支持加载单个 js bundle 文件。随着业务越 ## 范例 -[[React 范例]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/externals/DyanmicImport/index.jsx) +[[React 范例]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/src/externals/DyanmicImport/index.jsx) -[[Vue 范例]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-dynamicimport.vue) +[[Vue 范例]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/demos/demo-dynamicimport.vue) ## 使用方法 @@ -27,7 +27,7 @@ Hippy 2.2 版本之前只支持加载单个 js bundle 文件。随着业务越 ### 使用 -在 [webpack 打包脚本](https://github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-vue-demo/scripts) 中引入插件 +在 [webpack 打包脚本](https://github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-vue-demo/scripts) 中引入插件 ```javascript const HippyDynamicImportPlugin = require('@hippy/hippy-dynamic-import-plugin'); diff --git a/docs/guide/integration.md b/docs/guide/integration.md index 309aa73da..c3b632d5a 100644 --- a/docs/guide/integration.md +++ b/docs/guide/integration.md @@ -2,7 +2,7 @@ Hippy 采用 `monorepo` 进行代码管理,版本前端和终端统一,前端可以直接引入对应的 NPM 包,终端可通过发布分支源码接入或通过对应的包管理仓库引入。 -Hippy 已经提供了完整的[前端和终端范例](//github.com/Tencent/Hippy/tree/master/framework/js/examples),可直接基于我们现有的范例开始 App 开发。若想快速体验 Hippy,可按照 [README 步骤](https://github.com/Tencent/Hippy/blob/master/README.zh_CN.md#-%E5%BC%80%E5%A7%8B) 将 DEMO 运行起来 。 如果要在已有的 App 里整合 Hippy,请继续阅读下面的`终端集成`章节。 +Hippy 已经提供了完整的[前端和终端范例](//github.com/Tencent/Hippy/tree/master/driver/js/examples),可直接基于我们现有的范例开始 App 开发。若想快速体验 Hippy,可按照 [README 步骤](https://github.com/Tencent/Hippy/blob/master/README.zh_CN.md#-%E5%BC%80%E5%A7%8B) 将 DEMO 运行起来 。 如果要在已有的 App 里整合 Hippy,请继续阅读下面的`终端集成`章节。 # 终端接入 @@ -14,7 +14,7 @@ Hippy 同时支持 React 和 Vue 两种 UI 框架,通过 [@hippy/react](//www. ## hippy-react -[[hippy-react 介绍]](hippy-react/introduction.md) [[范例工程]](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo) +[[hippy-react 介绍]](hippy-react/introduction.md) [[范例工程]](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo) hippy-react 工程暂时只能通过手工配置初始化,建议直接 clone 范例工程并基于它进行修改。 @@ -32,7 +32,7 @@ hippy-react 工程暂时只能通过手工配置初始化,建议直接 clone ### 准备 hippy-react 编译时依赖 -以官方提供的 [范例工程](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo) 范例工程为例,需要使用 `npm i -D` 准备好以下依赖,当然开发者可以根据需要自行选择: +以官方提供的 [范例工程](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo) 范例工程为例,需要使用 `npm i -D` 准备好以下依赖,当然开发者可以根据需要自行选择: 必须的: @@ -60,7 +60,7 @@ hippy-react 工程暂时只能通过手工配置初始化,建议直接 clone ### hippy-react 编译配置 -当前 hippy-react 采用 `Webpack 4`构建,配置全部放置于 [scripts](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo/scripts) 目录下,其实只是 [webpack](//webpack.js.org/) 的配置文件,建议先阅读 [webpack](//webpack.js.org/) 官网内容,具备一定基础后再进行修改。 +当前 hippy-react 采用 `Webpack 4`构建,配置全部放置于 [scripts](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo/scripts) 目录下,其实只是 [webpack](//webpack.js.org/) 的配置文件,建议先阅读 [webpack](//webpack.js.org/) 官网内容,具备一定基础后再进行修改。 #### hippy-react 终端开发调试用编译配置 @@ -68,7 +68,7 @@ hippy-react 工程暂时只能通过手工配置初始化,建议直接 clone | 配置文件 | 说明 | | ------------------------------------------------------------ | ---------- | -| [hippy-webpack.dev.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/scripts/hippy-webpack.dev.js) | 调试用配置 | +| [hippy-webpack.dev.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.dev.js) | 调试用配置 | #### 终端线上包配置 @@ -79,11 +79,11 @@ hippy-react 工程暂时只能通过手工配置初始化,建议直接 clone | 配置文件 | 说明 | | ------------------------------------------------------------ | ----------------------------- | -| [vendor.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/scripts/vendor.js) | vendor 包中需要包含的共享部分 | -| [hippy-webpack.ios.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/scripts/hippy-webpack.ios.js) | iOS 业务包配置 | -| [hippy-webpack.ios-vendor.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/scripts/hippy-webpack.ios-vendor.js) | iOS Vendor 包配置 | -| [hippy-webpack.android.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/scripts/hippy-webpack.android.js) | Android 业务包配置 | -| [hippy-webpack.android-vendor.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/scripts/hippy-webpack.android-vendor.js) | Android Vendor 包配置 | +| [vendor.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/scripts/vendor.js) | vendor 包中需要包含的共享部分 | +| [hippy-webpack.ios.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios.js) | iOS 业务包配置 | +| [hippy-webpack.ios-vendor.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.ios-vendor.js) | iOS Vendor 包配置 | +| [hippy-webpack.android.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android.js) | Android 业务包配置 | +| [hippy-webpack.android-vendor.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.android-vendor.js) | Android Vendor 包配置 | 如果仔细观察 webpack 配置,可以看出 iOS 和 Android 配置相差不大,但因为 iOS 上受苹果政策影响只能使用 [JavaScriptCore](//developer.apple.com/documentation/javascriptcore)(以下简称 JSC)作为运行环境,而 JSC 是跟随 iOS 操作系统的,无法进行独立升级,低版本 iOS 带的 JSC 甚至无法完整支持 ES6,所以需要输出一份 ES5 版本的 JS 代码。而 Android 下可以使用独立升级的 [X5](//x5.tencent.com/) 中的 V8 作为运行环境,就可以直接使用 ES6 代码了。 @@ -126,7 +126,7 @@ export default function app() { ### hippy-react npm 脚本 -最后在 [package.json](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/package.json#L13) 中补上几个快速的 npm 脚本就可以了,这里以 `hippy:`开头做好了范例,这里顺道做了一个到 [hippy-debug-server](//www.npmjs.com/package/hippy-debug-server) 的快速启动命令。 +最后在 [package.json](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/package.json#L13) 中补上几个快速的 npm 脚本就可以了,这里以 `hippy:`开头做好了范例,这里顺道做了一个到 [hippy-debug-server](//www.npmjs.com/package/hippy-debug-server) 的快速启动命令。 ```json "scripts": { @@ -143,7 +143,7 @@ export default function app() { ## hippy-vue -[[hippy-vue 介绍]](hippy-vue/introduction.md) [[范例工程]](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-vue-demo) +[[hippy-vue 介绍]](hippy-vue/introduction.md) [[范例工程]](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-vue-demo) hippy-vue 相对简单很多,hippy-vue 只是 [Vue](//vuejs.org) 在终端上的渲染层,组件也基本和浏览器保持一致。可以通过 [vue-cli](//cli.vuejs.org/) 先[创建一个 Web 项目](//cli.vuejs.org/zh/guide/creating-a-project.html),然后加上一些 hippy-vue 的内容就可以直接将网页渲染到终端了。 @@ -159,7 +159,7 @@ hippy-vue 相对简单很多,hippy-vue 只是 [Vue](//vuejs.org) 在终端上 ### hippy-vue 编译时依赖 -以官方提供的 [范例工程](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-vue-demo) 范例工程为例,需要使用 `npm i -D` 准备好以下依赖,当然开发者可以根据需要自行选择: +以官方提供的 [范例工程](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-vue-demo) 范例工程为例,需要使用 `npm i -D` 准备好以下依赖,当然开发者可以根据需要自行选择: 必须的: @@ -186,7 +186,7 @@ hippy-vue 相对简单很多,hippy-vue 只是 [Vue](//vuejs.org) 在终端上 ### hippy-vue 编译配置 -当前 hippy-vue 采用 `Webpack 4`构建(暂时不建议升级到`Weppack 5`),配置全部放置于 [scripts](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-vue-demo/scripts) 目录下,其实只是 [webpack](//webpack.js.org/) 的配置文件,建议先阅读 [webpack](//webpack.js.org/) 官网内容,具备一定基础后再进行修改。 +当前 hippy-vue 采用 `Webpack 4`构建(暂时不建议升级到`Weppack 5`),配置全部放置于 [scripts](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-vue-demo/scripts) 目录下,其实只是 [webpack](//webpack.js.org/) 的配置文件,建议先阅读 [webpack](//webpack.js.org/) 官网内容,具备一定基础后再进行修改。 #### hippy-vue 终端开发调试用编译配置 @@ -194,7 +194,7 @@ hippy-vue 相对简单很多,hippy-vue 只是 [Vue](//vuejs.org) 在终端上 | 配置文件 | 说明 | | ------------------------------------------------------------ | ---------- | -| [hippy-webpack.dev.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/scripts/hippy-webpack.dev.js) | 调试用配置 | +| [hippy-webpack.dev.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.dev.js) | 调试用配置 | #### hippy-vue 终端线上包配置 @@ -205,11 +205,11 @@ hippy-vue 相对简单很多,hippy-vue 只是 [Vue](//vuejs.org) 在终端上 | 配置文件 | 说明 | | ------------------------------------------------------------ | ----------------------------- | -| [vendor.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/scripts/vendor.js) | vendor 包中需要包含的共享部分 | -| [hippy-webpack.ios.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios.js) | iOS 业务包配置 | -| [hippy-webpack.ios-vendor.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios-vendor.js) | iOS Vendor 包配置 | -| [hippy-webpack.android.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/scripts/hippy-webpack.android.js) | Android 业务包配置 | -| [hippy-webpack.android-vendor.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/scripts/hippy-webpack.android-vendor.js) | Android Vendor 包配置 | +| [vendor.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/scripts/vendor.js) | vendor 包中需要包含的共享部分 | +| [hippy-webpack.ios.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios.js) | iOS 业务包配置 | +| [hippy-webpack.ios-vendor.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.ios-vendor.js) | iOS Vendor 包配置 | +| [hippy-webpack.android.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android.js) | Android 业务包配置 | +| [hippy-webpack.android-vendor.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/scripts/hippy-webpack.android-vendor.js) | Android Vendor 包配置 | 如果仔细观察 webpack 配置,可以看出 iOS 和 Android 配置相差不大,但因为 iOS 上受苹果政策影响只能使用 [JavaScriptCore](//developer.apple.com/documentation/javascriptcore)(以下简称 JSC)作为运行环境,而 JSC 是跟随 iOS 操作系统的,无法进行独立升级,低版本 iOS 带的 JSC 甚至无法完整支持 ES6,所以需要输出一份 ES5 版本的 JS 代码。而 Android 下可以使用独立升级的 [X5](//x5.tencent.com/) 中的 V8 作为运行环境,就可以直接使用 ES6 代码了。 @@ -217,7 +217,7 @@ hippy-vue 相对简单很多,hippy-vue 只是 [Vue](//vuejs.org) 在终端上 ### hippy-vue 入口文件 -hippy-cli 初始化的项目自带了一个 [Web 端入口文件](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/main.js),可以保留着用来启动 Web 端网页,但是因为 hippy-vue 的启动参数不一样,需要专门的 [终端入口文件](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/main-native.js)来加载一些终端上用到的模块。 +hippy-cli 初始化的项目自带了一个 [Web 端入口文件](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/main.js),可以保留着用来启动 Web 端网页,但是因为 hippy-vue 的启动参数不一样,需要专门的 [终端入口文件](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/main-native.js)来加载一些终端上用到的模块。 ```js import Vue from 'vue'; @@ -292,7 +292,7 @@ setApp(app); ### hippy-vue npm script -最后在 [package.json](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/package.json#L13) 中补上几个快速的 npm 脚本就可以了,这里以 `hippy:`开头做好了范例,这里顺道做了一个到 [hippy-debug-server](//www.npmjs.com/package/hippy-debug-server) 的快速启动命令。 +最后在 [package.json](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/package.json#L13) 中补上几个快速的 npm 脚本就可以了,这里以 `hippy:`开头做好了范例,这里顺道做了一个到 [hippy-debug-server](//www.npmjs.com/package/hippy-debug-server) 的快速启动命令。 ```json "scripts": { diff --git a/docs/guide/jsi.md b/docs/guide/jsi.md index b877277c1..8ba9a355a 100644 --- a/docs/guide/jsi.md +++ b/docs/guide/jsi.md @@ -56,7 +56,7 @@ public class DemoJavaTurboModule extends HippyNativeModuleBase {

-更多示例可参考类[DemoJavaTurboModule](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/android-demo/example/src/main/java/com/tencent/mtt/hippy/example/module/turbo/DemoJavaTurboModule.java) +更多示例可参考类[DemoJavaTurboModule](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/android-demo/example/src/main/java/com/tencent/mtt/hippy/example/module/turbo/DemoJavaTurboModule.java) * 注册TurboModule模块,跟NativeModule注册方法完全一致 @@ -154,16 +154,16 @@ HIPPY_EXPORT_TURBO_METHOD(setInfo:(NSString *)string) { -更多示例可参考类[DemoIOSTurboModule](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/ios-demo/HippyDemo/turbomodule/TurboBaseModule.mm) +更多示例可参考类[DemoIOSTurboModule](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/ios-demo/HippyDemo/turbomodule/TurboBaseModule.mm) ## 使用例子 -[Android Demo](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/android-demo) +[Android Demo](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/android-demo) -[iOS Demo](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/ios-demo) +[iOS Demo](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/ios-demo) -[HippyReact Demo](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/externals/Turbo/index.jsx) +[HippyReact Demo](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/src/externals/Turbo/index.jsx) -[HippyVue Demo](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-turbo.vue) +[HippyVue Demo](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/demos/demo-turbo.vue) diff --git a/docs/hippy-react/gesture.md b/docs/hippy-react/gesture.md index 0cf1afc8f..87bc60f6a 100644 --- a/docs/hippy-react/gesture.md +++ b/docs/hippy-react/gesture.md @@ -69,7 +69,7 @@ render() ## 事件冒泡 -[[事件冒泡范例]](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo/src/components/ListView) +[[事件冒泡范例]](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo/src/components/ListView) 点击事件和触屏事件均可以在回调函数中定义是否需要冒泡该事件到上层组件,点击或触屏事件发生时,终端会寻找该触屏点下声明了要处理该事件的最小控件: @@ -144,7 +144,7 @@ new Hippy({ > 最低支持版本 2.11.5 -[[事件捕获范例]](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo/src/components/ListView) +[[事件捕获范例]](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo/src/components/ListView) 点击事件和触屏事件支持事件捕获,如需注册捕获阶段的事件处理函数,则应在目标元素事件名添加 `Capture` 后缀,如 `onClickCapture`、`onTouchDownCapture`。 diff --git a/docs/hippy-react/modules.md b/docs/hippy-react/modules.md index bd2621961..d1f637190 100644 --- a/docs/hippy-react/modules.md +++ b/docs/hippy-react/modules.md @@ -7,7 +7,7 @@ # Animation -[[Animation 范例]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/modules/Animation/index.jsx) +[[Animation 范例]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/src/modules/Animation/index.jsx) `Animation` 是 Hippy 提供的动画组件,可以支持传入动画配置,以及手动控制开始与结束。在 Hippy 上实现一个动画分为三个步骤: @@ -34,7 +34,7 @@ - `rad`:代表动画参数的起止值为弧度; - `deg`:代表动画参数的起止值为度数; - - `color`:代表动画参数的起止值为颜色值,可修饰背景色 `backgroundColor` 和文字颜色 `color`(仅 Android 支持),参考 [例子](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/modules/Animation/index.jsx) `最低支持版本2.6.0` + - `color`:代表动画参数的起止值为颜色值,可修饰背景色 `backgroundColor` 和文字颜色 `color`(仅 Android 支持),参考 [例子](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/src/modules/Animation/index.jsx) `最低支持版本2.6.0` - timingFunction 的参数选项: - `linear`:使用线性插值器,动画将匀速进行; @@ -83,7 +83,7 @@ # AnimationSet -[[AnimationSet 范例]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/modules/Animation) +[[AnimationSet 范例]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/src/modules/Animation) `AnimationSet` 与 `Animation` 类似,都是赋予 hippy 组件的单个样式属性(如 width、height、left、right)动画能力的模块。 @@ -132,7 +132,7 @@ # AsyncStorage -[[AsyncStorage 范例]](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo/src/modules/AsyncStorage/index.jsx) +[[AsyncStorage 范例]](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo/src/modules/AsyncStorage/index.jsx) AsyncStorage 是一个简单的、异步的、持久化的 Key-Value 存储系统,它对于 App 来说是全局性的。 @@ -185,11 +185,11 @@ AsyncStorage 是一个简单的、异步的、持久化的 Key-Value 存储系 # BackAndroid -[[BackAndroid 范例]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/pages/gallery.jsx#L171) +[[BackAndroid 范例]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/src/pages/gallery.jsx#L171) 可以监听 Android 实体键的回退,在退出前做操作或拦截实体键的回退。 `hippy-react-web` 不支持。 -> 注意:该方法需要终端拦截实体返回按钮的事件,可以参考 [android-demo 的 onBackPressed 方法](//github.com/Tencent/Hippy/blob/master/framework/js/examples/android-demo/example/src/main/java/com/tencent/mtt/hippy/example/MyActivity.java) +> 注意:该方法需要终端拦截实体返回按钮的事件,可以参考 [android-demo 的 onBackPressed 方法](//github.com/Tencent/Hippy/blob/master/driver/js/examples/android-demo/example/src/main/java/com/tencent/mtt/hippy/example/MyActivity.java) ## 方法 @@ -213,7 +213,7 @@ AsyncStorage 是一个简单的、异步的、持久化的 Key-Value 存储系 # Clipboard -[[Clipboard 范例]](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo/src/modules/Clipboard) +[[Clipboard 范例]](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo/src/modules/Clipboard) 模块提供了 iOS/Android 双端的剪贴板能力,开发者可使用其来读取或写入剪贴板,目前仅支持字符串作为存取类型。 @@ -296,7 +296,7 @@ AsyncStorage 是一个简单的、异步的、持久化的 Key-Value 存储系 # NetInfo -[[NetInfo 范例]](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo/src/modules/NetInfo) +[[NetInfo 范例]](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo/src/modules/NetInfo) 通过该接口可以获得当前设备的网络状态,也可以注册一个监听器,当系统网络切换的时候,得到一个通知。 diff --git a/docs/hippy-react/web.md b/docs/hippy-react/web.md index b338d3858..43498cc7d 100644 --- a/docs/hippy-react/web.md +++ b/docs/hippy-react/web.md @@ -22,7 +22,7 @@ hippy-react 通过 [@hippy/react-web](//www.npmjs.com/package/@hippy/react-web) # 编译时依赖 -以官方提供的 [范例工程](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo) 范例工程为例,需要使用 `npm i -D` 准备好以下依赖,当然开发者可以根据需要自行选择: +以官方提供的 [范例工程](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo) 范例工程为例,需要使用 `npm i -D` 准备好以下依赖,当然开发者可以根据需要自行选择: | 包名 | 说明 | | ------------------- | ----------------------------- | @@ -35,11 +35,11 @@ hippy-react 通过 [@hippy/react-web](//www.npmjs.com/package/@hippy/react-web) 该配置展示了将 Hippy 运行于 Web 的最小化配置,并未包含分包等内容,开发者可以自行扩展。 -和 hippy-react 的主要区别在于做了一个 hippy-react 到 hippy-react-web 的 [alias](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/scripts/hippy-webpack.web.js#L80),使之可以不用修改代码直接运行。 +和 hippy-react 的主要区别在于做了一个 hippy-react 到 hippy-react-web 的 [alias](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.js#L80),使之可以不用修改代码直接运行。 | 配置文件 | 说明 | | ------------------------------------------------------------ | ---------- | -| [hippy-webpack.web.js](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/scripts/hippy-webpack.web.js) | 调试用配置 | +| [hippy-webpack.web.js](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/scripts/hippy-webpack.web.js) | 调试用配置 | # 入口文件 diff --git a/docs/hippy-vue/customize.md b/docs/hippy-vue/customize.md index 2c7af785a..7d357dfe4 100644 --- a/docs/hippy-vue/customize.md +++ b/docs/hippy-vue/customize.md @@ -39,7 +39,7 @@ Vue.registerElement('h-my-view', { * nativeEventName: 终端的原生事件名称 * nativeEventParams:终端的原生事件返回体 -例如,hippy-vue 的 [hi-swiper 组件](//github.com/Tencent/Hippy/blob/master/framework/js/packages/hippy-vue-native-components/src/swiper.js#L4),它是 swiper 实际渲染的对应节点。 +例如,hippy-vue 的 [hi-swiper 组件](//github.com/Tencent/Hippy/blob/master/driver/js/packages/hippy-vue-native-components/src/swiper.js#L4),它是 swiper 实际渲染的对应节点。 ```javascript component: { diff --git a/docs/hippy-vue/external-components.md b/docs/hippy-vue/external-components.md index 1904f3aee..261322999 100644 --- a/docs/hippy-vue/external-components.md +++ b/docs/hippy-vue/external-components.md @@ -8,7 +8,7 @@ # animation -[[范例:demo-animation.vue]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/demo-animation.vue) +[[范例:demo-animation.vue]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-animation.vue) 该组件是 hippy-vue 的动画解决方案,直接传入一个样式值和动画方案数组,即可触发动作效果。 @@ -23,13 +23,13 @@ * actions 详解 - 和 React 不同,它将单个动画 Animation 和动画序列 AnimationSet 合二为一了,其实方法特别简单,发现是个对象就是 Animation,如果是个数组就是动画序列就用 AnimationSet 处理,单个动画参数具体参考 [Animation 模块](../hippy-react/modules.md?id=animation)和 [范例](https://github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/animations)。需要说明 hippy-vue 的动画参数有一些[默认值](https://github.com/Tencent/Hippy/blob/master/packages/hippy-vue-native-components/src/animation.js#L5),只有差异部分才需要填写。循环播放参数 `repeatCount: 'loop'` 在 `2.12.2` 及以上版本支持,低版本请使用 `repeatCount: -1`。 + 和 React 不同,它将单个动画 Animation 和动画序列 AnimationSet 合二为一了,其实方法特别简单,发现是个对象就是 Animation,如果是个数组就是动画序列就用 AnimationSet 处理,单个动画参数具体参考 [Animation 模块](../hippy-react/modules.md?id=animation)和 [范例](https://github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/animations)。需要说明 hippy-vue 的动画参数有一些[默认值](https://github.com/Tencent/Hippy/blob/master/packages/hippy-vue-native-components/src/animation.js#L5),只有差异部分才需要填写。循环播放参数 `repeatCount: 'loop'` 在 `2.12.2` 及以上版本支持,低版本请使用 `repeatCount: -1`。 特别说明,对 actions 替换后会自动新建动画,需手动启动新动画。有两种处理方式: * 替换 actions => 延迟一定时间后(如setTimeout) 调用 `this.[animation ref].start()`(推荐) * `playing = false` => 替换 actions => 延迟一定时间后(如setTimeout) `playing = true` - 2.6.0 版本新增 `backgroundColor` 背景色渐变动画支持,参考 [渐变色动画DEMO](https://github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/animations/color-change.vue) + 2.6.0 版本新增 `backgroundColor` 背景色渐变动画支持,参考 [渐变色动画DEMO](https://github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/animations/color-change.vue) * 设置 `actions` 对 `backgroundColor` 进行修饰 * 设置 `valueType` 为 `color` * 设置 `startValue` 和 `toValue` 为 [color值](style/color.md) @@ -76,7 +76,7 @@ # dialog -[[范例:demo-dialog.vue]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/demo-dialog.vue) +[[范例:demo-dialog.vue]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-dialog.vue) 用于模态弹窗,默认透明背景色,需要加一个带背景色的 `
` 填充。 @@ -102,7 +102,7 @@ # swiper -[[范例:demo-swiper.vue]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/demo-swiper.vue) +[[范例:demo-swiper.vue]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-swiper.vue) 支持翻页的容器,它的每一个子容器组件会被视作一个单独的页面,对应终端 `ViewPager`组件, 里面只能包含 `` 组件。 @@ -134,7 +134,7 @@ # swiper-slide -[[范例:demo-swiper.vue]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/demo-swiper.vue) +[[范例:demo-swiper.vue]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-swiper.vue) 翻页子容器组件容器。 @@ -142,7 +142,7 @@ # pull-header -[[范例:demo-pull-header.vue]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/demo-pull-header.vue) +[[范例:demo-pull-header.vue]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-pull-header.vue) 下拉刷新组件,嵌套在 `ul` 中作为第一个子元素使用 @@ -164,7 +164,7 @@ # pull-footer -[[范例:demo-pull-footer.vue]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/demo-pull-footer.vue) +[[范例:demo-pull-footer.vue]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-pull-footer.vue) 上拉刷新组件,嵌套在 `ul` 中作为最后一个子元素使用 @@ -188,7 +188,7 @@ > 最低支持版本 2.9.0 -[[范例:demo-waterfall]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/demo-waterfall.vue) +[[范例:demo-waterfall]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-waterfall.vue) 瀑布流组件,子元素必须是 `waterfall-item` ,瀑布流组件下拉刷新需在最外层用`ul-refresh-wrapper`, 可在`waterfall` 内用 `pull-footer` 展示上拉加载文案。 diff --git a/docs/hippy-vue/vue-native.md b/docs/hippy-vue/vue-native.md index 819e8e4c7..a794efa2c 100644 --- a/docs/hippy-vue/vue-native.md +++ b/docs/hippy-vue/vue-native.md @@ -4,7 +4,7 @@ hippy-vue 通过在 Vue 上绑定了一个 `Native` 属性,实现获取终端设备信息、以及调用终端模块。也可以用来监测是否在 Hippy 环境下运行。 -> 对应 Demo: [demo-vue-native.vue](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/native-demos/demo-vue-native.vue) +> 对应 Demo: [demo-vue-native.vue](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/native-demos/demo-vue-native.vue) # 获取终端信息 @@ -93,7 +93,7 @@ console.log(Vue.Native.PixelRatio); // => 3 >* 最低支持版本 2.7.0 >* AsyncStorage 能力与挂载在全局变量下的 localStorage 模块一致,localStorage 可以在所有版本使用 -[[AsyncStorage 范例(与Hippy-React AsyncStorage 一致)]](//github.com/Tencent/Hippy/tree/master/framework/js/examples/hippy-react-demo/src/modules/AsyncStorage/index.jsx) +[[AsyncStorage 范例(与Hippy-React AsyncStorage 一致)]](//github.com/Tencent/Hippy/tree/master/driver/js/examples/hippy-react-demo/src/modules/AsyncStorage/index.jsx) AsyncStorage 是一个简单的、异步的、持久化的 Key-Value 存储系统。 @@ -151,12 +151,12 @@ Vue.Native.AsyncStorage.getItem('itemKey'); # BackAndroid -[[BackAndroid 范例]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/main-native.js) +[[BackAndroid 范例]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/main-native.js) 可以监听 Android 实体键的回退,在退出前做操作或拦截实体键的回退。 >* 最低支持版本 2.7.0 ->* 注意:该方法需要终端拦截实体返回按钮的事件,可以参考 [android-demo 的 onBackPressed 方法](//github.com/Tencent/Hippy/blob/master/framework/js/examples/android-demo/example/src/main/java/com/tencent/mtt/hippy/example/MyActivity.java) +>* 注意:该方法需要终端拦截实体返回按钮的事件,可以参考 [android-demo 的 onBackPressed 方法](//github.com/Tencent/Hippy/blob/master/driver/js/examples/android-demo/example/src/main/java/com/tencent/mtt/hippy/example/MyActivity.java) ## 方法 diff --git a/docs/structure/core.md b/docs/structure/core.md index e7bed9579..86462cb68 100644 --- a/docs/structure/core.md +++ b/docs/structure/core.md @@ -16,7 +16,7 @@ Hippy 开发的时候,前端 JS 经常需要访问一些双端(Android 和 i ## 继承 ModuleBase -在 [core/modules/](//github.com/Tencent/Hippy/tree/master/framework/js/core/modules) 下创建 test-module.h +在 [core/modules/](//github.com/Tencent/Hippy/tree/master/driver/js/core/modules) 下创建 test-module.h ```cpp #ifndef CORE_MODULES_TEST_MODULE_H_ @@ -35,7 +35,7 @@ class TestModule : public ModuleBase { #endif // CORE_MODULES_TEST_MODULE_H_ ``` -在 [core/modules/](//github.com/Tencent/Hippy/tree/master/framework/js/core/modules) 下创建 test-module.cc +在 [core/modules/](//github.com/Tencent/Hippy/tree/master/driver/js/core/modules) 下创建 test-module.cc ```cpp #include "core/modules/module-register.h" @@ -66,7 +66,7 @@ void TestModule::Print(const hippy::napi::CallbackInfo& info) { # JS 桥接 -双平台通用模块一般放在 [core/js/global](//github.com/Tencent/Hippy/tree/master/framework/js/core/js/global) 下,我们在 global 下 增加 TestModule.js +双平台通用模块一般放在 [core/js/global](//github.com/Tencent/Hippy/tree/master/driver/js/core/js/global) 下,我们在 global 下 增加 TestModule.js ```js const TestModule = internalBinding('TestModule'); @@ -74,7 +74,7 @@ const TestModule = internalBinding('TestModule'); global.TestModule = TestModule; ``` -[core/js/entry/](//github.com/Tencent/Hippy/tree/master/framework/js/core/js/entry) 下双平台 hippy.js 里增加 +[core/js/entry/](//github.com/Tencent/Hippy/tree/master/driver/js/core/js/entry) 下双平台 hippy.js 里增加 ```js require('../../global/TestModule.js'); diff --git a/docs/style/layout.md b/docs/style/layout.md index 5243ed0a9..bfd034e4f 100644 --- a/docs/style/layout.md +++ b/docs/style/layout.md @@ -39,7 +39,7 @@ Hippy 的样式排版使用了 Flex 布局。值得注意的是,尚不兼容 > `2.8.1` 版本后支持终端本地图片能力,可通过 webpack `file-loader` 加载。 -> 渐变色目前支持 `linear-gradient` 线性渐变 `(最低支持版本 2.8.0)` [[MDN 文档]](//developer.mozilla.org/zh-CN/docs/orphaned/Web/CSS/linear-gradient()),支持使用 `linear-gradient([ [ [ | to [top | bottom] || [left | right] ],]? [, ]+)` 格式; 其中 `angle` 支持 deg、turn、rad 单位;`color-stop` 支持设置多个颜色和百分比。DEMO: [HippyReact](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/components/View/index.jsx) [HippyVue](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-div.vue) +> 渐变色目前支持 `linear-gradient` 线性渐变 `(最低支持版本 2.8.0)` [[MDN 文档]](//developer.mozilla.org/zh-CN/docs/orphaned/Web/CSS/linear-gradient()),支持使用 `linear-gradient([ [ [ | to [top | bottom] || [left | right] ],]? [, ]+)` 格式; 其中 `angle` 支持 deg、turn、rad 单位;`color-stop` 支持设置多个颜色和百分比。DEMO: [HippyReact](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/src/components/View/index.jsx) [HippyVue](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/demos/demo-div.vue) >
>
> 注意: diff --git a/docs/style/setNativeProps.md b/docs/style/setNativeProps.md index 4fdcbd1bc..de765c99f 100644 --- a/docs/style/setNativeProps.md +++ b/docs/style/setNativeProps.md @@ -4,7 +4,7 @@ ## React -[[范例:SetNativeProps.jsx]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-react-demo/src/externals/SetNativeProps/index.jsx) +[[范例:SetNativeProps.jsx]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-react-demo/src/externals/SetNativeProps/index.jsx) 除了element component(如div)外,React 没有直接暴露 ElementNode 给业务使用,可以通过 [React.forwardRef](https://zh-hans.reactjs.org/docs/forwarding-refs.html) 转发,或者使用 Hippy 提供的 `UIManagerModule.getElementFromFiberRef` 方法(该方法会从当前节点逐个遍历子节点直到找到 `ElementNode` 元素并返回,有一定性能损耗) 获取第一个 `ElementNode`,使用 demo 如下: @@ -29,6 +29,6 @@ ## Vue -[[范例:demo-set-native-props.vue]](//github.com/Tencent/Hippy/blob/master/framework/js/examples/hippy-vue-demo/src/components/demos/demo-set-native-props.vue) +[[范例:demo-set-native-props.vue]](//github.com/Tencent/Hippy/blob/master/driver/js/examples/hippy-vue-demo/src/components/demos/demo-set-native-props.vue) Vue 如果是 HTML 元素,直接通过`$refs`可以获取到 DOM;如果是自定义组件,可以通过`$refs.x.$el` 获取,`setNativeProps`使用方法和 React 一致 diff --git a/driver/js/android/src/main/jni/src/bridge/native_source_code_android.cc b/driver/js/android/src/main/jni/src/bridge/native_source_code_android.cc index 5d028cf54..fafe1ee2b 100644 --- a/driver/js/android/src/main/jni/src/bridge/native_source_code_android.cc +++ b/driver/js/android/src/main/jni/src/bridge/native_source_code_android.cc @@ -5,7 +5,7 @@ * js2cpp is maintenance by Hippy Team * Copyright © 2018-2022 Tencent. All rights reserved. * -* Generated at Tue May 17 2022 17:55:49 GMT+0800 (中国标准时间). +* Generated at Fri May 20 2022 22:29:35 GMT+0800 (China Standard Time). * DO NOT EDIT IT. */ diff --git a/driver/js/examples/android-demo/res/vendor.android.js b/driver/js/examples/android-demo/res/vendor.android.js index 8be45f759..d3315efa7 100644 --- a/driver/js/examples/android-demo/res/vendor.android.js +++ b/driver/js/examples/android-demo/res/vendor.android.js @@ -1,7 +1,7 @@ var hippyReactBase=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}({"../../packages/hippy-react/dist/index.js":function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Animated",(function(){return an})),n.d(t,"Animation",(function(){return Rt})),n.d(t,"AnimationSet",(function(){return Tt})),n.d(t,"AppRegistry",(function(){return Zt})),n.d(t,"AsyncStorage",(function(){return Tn})),n.d(t,"BackAndroid",(function(){return On})),n.d(t,"Clipboard",(function(){return Fn})),n.d(t,"ConsoleModule",(function(){return Yn})),n.d(t,"Dimensions",(function(){return ir})),n.d(t,"Easing",(function(){return ln})),n.d(t,"Focusable",(function(){return Pn})),n.d(t,"Hippy",(function(){return Jn})),n.d(t,"HippyEventEmitter",(function(){return me})),n.d(t,"HippyEventListener",(function(){return pe})),n.d(t,"HippyRegister",(function(){return Dn})),n.d(t,"Image",(function(){return on})),n.d(t,"ImageBackground",(function(){return er})),n.d(t,"ImageLoaderModule",(function(){return Un})),n.d(t,"ListView",(function(){return dn})),n.d(t,"ListViewItem",(function(){return sn})),n.d(t,"Modal",(function(){return In})),n.d(t,"Navigator",(function(){return hn})),n.d(t,"NetInfo",(function(){return Wn})),n.d(t,"NetworkModule",(function(){return Hn})),n.d(t,"PixelRatio",(function(){return or})),n.d(t,"Platform",(function(){return Xn})),n.d(t,"PullFooter",(function(){return cn})),n.d(t,"PullHeader",(function(){return un})),n.d(t,"RNfqb",(function(){return Zn})),n.d(t,"RNfqbEventEmitter",(function(){return nr})),n.d(t,"RNfqbEventListener",(function(){return rr})),n.d(t,"RNfqbRegister",(function(){return tr})),n.d(t,"RefreshWrapper",(function(){return fn})),n.d(t,"ScrollView",(function(){return xn})),n.d(t,"StyleSheet",(function(){return En})),n.d(t,"Text",(function(){return nn})),n.d(t,"TextInput",(function(){return vn})),n.d(t,"TimerModule",(function(){return Gn})),n.d(t,"UIManagerModule",(function(){return Bn})),n.d(t,"View",(function(){return en})),n.d(t,"ViewPager",(function(){return yn})),n.d(t,"WaterfallView",(function(){return zn})),n.d(t,"WebSocket",(function(){return An})),n.d(t,"WebView",(function(){return _n})),n.d(t,"callNative",(function(){return $n})),n.d(t,"callNativeWithCallbackId",(function(){return Qn})),n.d(t,"callNativeWithPromise",(function(){return qn})),n.d(t,"colorParse",(function(){return Ne})),n.d(t,"default",(function(){return Jt})),n.d(t,"flushSync",(function(){return Vn})),n.d(t,"removeNativeCallback",(function(){return Kn}));var r=n("./node_modules/react/index.js"),i=n.n(r),o=n("./node_modules/@hippy/react-reconciler/index.js"),a=n.n(o);const l=["children"],s=["collapsable","style"],u=["style"],c=["children","style","imageStyle","imageRef","source","sources","src","srcs","tintColor","tintColors"],d=["children"],f=["children"],p=["children","style","renderRow","renderPullHeader","renderPullFooter","getRowType","getRowStyle","getRowKey","dataSource","initialListSize","rowShouldSticky","onRowLayout","onHeaderPulling","onHeaderReleased","onFooterPulling","onFooterReleased","onAppear","onDisappear","onWillAppear","onWillDisappear"],h=["children"],m=["initialRoute"],y=["component"],g=["children","onPageScrollStateChanged"],b=["style","renderBanner","numberOfColumns","columnSpacing","interItemSpacing","numberOfItems","preloadItemNumber","renderItem","renderPullHeader","renderPullFooter","getItemType","getItemKey","getItemStyle","contentInset","onItemLayout","onHeaderPulling","onHeaderReleased","onFooterPulling","onFooterReleased","containPullHeader","containPullFooter","containBannerView"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t=0||(i[n]=e[n]);return i} /*! * @hippy/react v2.2.1 - * Build at: Mon May 16 2022 20:34:31 GMT+0800 (China Standard Time) + * Build at: Fri May 20 2022 22:19:21 GMT+0800 (China Standard Time) * * Tencent is pleased to support the open source community by making * Hippy available. @@ -20,7 +20,7 @@ var hippyReactBase=function(e){var t={};function n(r){if(t[r])return t[r].export * 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. - */(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}e.__GLOBAL__||(e.__GLOBAL__={}),e.__GLOBAL__.nodeId=0,e.__GLOBAL__.animationId=0;const{asyncStorage:E,bridge:C,device:x,document:N,register:I,on:P,off:_,emit:L}=e.Hippy;var A=Object.freeze({__proto__:null,addEventListener:P,removeEventListener:_,dispatchEvent:L,AsyncStorage:E,Bridge:C,Device:x,HippyRegister:I,UIManager:N});let R,z;const T=new Map;function O(e,t){z=e,R=t}function j(){if(!z)throw new Error("getRootViewId must execute after setRootContainer");return z}function F(e){if(!R)return null;const{current:t}=R,n=[t];for(;n.length;){const t=n.shift();if(!t)break;if(e(t))return t;t.child&&n.push(t.child),t.sibling&&n.push(t.sibling)}return null}function H(e,t){T.set(t,e)}function M(e){T.delete(e)}function D(e){return(null==e?void 0:e.stateNode)||null}function U(e){return T.get(e)||null}function W(t){!function(t,n){if(!e.requestIdleCallback)return setTimeout(()=>{t({didTimeout:!1,timeRemaining:()=>1/0})},1);e.requestIdleCallback(t,n)}(e=>{(e.timeRemaining()>0||e.didTimeout)&&function e(t){"number"==typeof t?M(t):t&&(M(t.nodeId),Array.isArray(t.childNodes)&&t.childNodes.forEach(t=>e(t)))}(t)},{timeout:50})}const B=0,V=1,$={onTouchStart:["onTouchStart","onTouchDown"],onPress:["onPress","onClick"]},q={onClick:"click",onLongClick:"longclick",onPressIn:"pressin",onPressOut:"pressout",onTouchDown:"touchstart",onTouchStart:"touchstart",onTouchEnd:"touchend",onTouchMove:"touchmove",onTouchCancel:"touchcancel"};const Q=new RegExp(/^\d+$/);let K=!1,G=!1;function Y(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,e=>String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16)))}const X=new RegExp("^on.+Capture$");function J(e){return X.test(e)}const Z=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function ee(e){return"[object Function]"===Object.prototype.toString.call(e)}function te(e){K=e}function ne(){return G}function re(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){0;return`${"hpfile://"}./${e}`}return e}function ie(e){return 5===e}class oe{constructor(e){this.handlerContainer={},this.nextIdForHandler=0,this.eventName=e}getEventListeners(){return Object.keys(this.handlerContainer).filter(e=>this.handlerContainer[e]).map(e=>this.handlerContainer[e])}getHandlerSize(){return Object.keys(this.handlerContainer).length}addEventHandler(e,t){if(!e)throw new TypeError("Invalid arguments for addEventHandler");const n=this.nextIdForHandler;this.nextIdForHandler+=1;const r={id:n,eventHandler:e,context:t},i="eventHandler_"+n;return this.handlerContainer[i]=r,n}notifyEvent(e){Object.keys(this.handlerContainer).forEach(t=>{const n=this.handlerContainer[t];n&&n.eventHandler&&(n.context?n.eventHandler.call(n.context,e):n.eventHandler(e))})}removeEventHandler(e){if("number"!=typeof e)throw new TypeError("Invalid arguments for removeEventHandler");const t="eventHandler_"+e;this.handlerContainer[t]&&delete this.handlerContainer[t]}}class ae{constructor(e,t,n){this.type=e,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=t,this.target=n}stopPropagation(){this.bubbles=!1}preventDefault(){}}const le=new Map;function se(e,t){let n=e;if(t.memoizedProps&&!t.memoizedProps[e]){const r=Object.keys($);for(let i=0;i0){let e,i=!1;const o=D(n);for(;!i&&void 0!==(e=r.shift());)try{const{eventName:n,currentTarget:r,listener:a,isCapture:l}=e,s=new ae(n,r,o);Object.assign(s,t),l?(a(s),s.bubbles||(i=!0)):(i=a(s),"boolean"!=typeof i&&(i=!ne()),s.bubbles||(i=!0))}catch(e){console.reportUncaughtException(e)}}}(i,e,a):function(e,t,n){let r=!1,i=n,o=e;const a=D(n);do{if(o=se(o,i),ue(o,i))try{const e=D(i),n=new ae(o,e,a);Object.assign(n,t),r=i.memoizedProps[o](n),"boolean"!=typeof r&&(r=!ne()),n.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!ie(i.tag);)i=i.return}while(!r&&i)}(i,e,a)},receiveUIComponentEvent:function(e){if(!e||!Array.isArray(e)||e.length<2)return;const[t,n,r]=e;if("number"!=typeof t||"string"!=typeof n)return;const i=U(t);i&&ue(n,i)&&i.memoizedProps[n](r)}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=de);class fe{constructor(e,t){this.callback=e,this.bindListener=t}remove(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}class pe{constructor(e){this.eventName=e,this.listenerIdList=[]}unregister(){const e=de.getHippyEventHub(this.eventName);if(!e)throw new ReferenceError("No listeners for "+this.eventName);const t=this.listenerIdList.length;for(let n=0;n255?255:t}function ke(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Se(e,t,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Ee(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=Se(i,r,e+1/3),a=Se(i,r,e),l=Se(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function Ce(e){return(parseFloat(e)%360+360)%360/360}function xe(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ne(e){if(Number.isInteger(e))return e;let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ve.hex6.exec(e),Array.isArray(t)?parseInt(t[1]+"ff",16)>>>0:Object.hasOwnProperty.call(ge,e)?ge[e]:(t=ve.rgb.exec(e),Array.isArray(t)?(we(t[1])<<24|we(t[2])<<16|we(t[3])<<8|255)>>>0:(t=ve.rgba.exec(e),t?(we(t[1])<<24|we(t[2])<<16|we(t[3])<<8|ke(t[4]))>>>0:(t=ve.hex3.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ve.hex8.exec(e),t?parseInt(t[1],16)>>>0:(t=ve.hex4.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ve.hsl.exec(e),t?(255|Ee(Ce(t[1]),xe(t[2]),xe(t[3])))>>>0:(t=ve.hsla.exec(e),t?(Ee(Ce(t[1]),xe(t[2]),xe(t[3]))|ke(t[4]))>>>0:null))))))))}(e);return null===t?0:(t=(t<<24|t>>>8)>>>0,t)}function Ie(e){return Array.isArray(e)?e.map(e=>Ne(e)):[0]}var Pe=Object.freeze({__proto__:null,getString:function(){return C.callNativeWithPromise("ClipboardModule","getString")},setString:function(e){C.callNative("ClipboardModule","setString",e)}});var _e=Object.freeze({__proto__:null,getCookies:function(e){return C.callNativeWithPromise("network","getCookie",e)},setCookie:function(e,t,n){let r="";"string"==typeof n&&(r=n),n instanceof Date&&(r=n.toUTCString()),C.callNative("network","setCookie",e,t,r)}});function Le(e){return C.callNativeWithPromise("ImageLoaderModule","getSize",e)}function Ae(e){C.callNative("ImageLoaderModule","prefetch",e)}var Re=Object.freeze({__proto__:null,getSize:Le,prefetch:Ae});const ze=new Map;let Te;class Oe{constructor(e,t){this.eventName=e,this.listener=t}remove(){this.eventName&&this.listener&&(je(this.eventName,this.listener),this.listener=void 0)}}function je(e,t){if(t instanceof Oe)return void t.remove();let n=e;"change"===e&&(n="networkStatusDidChange");Te.listenerSize(n)<=1&&C.callNative("NetInfo","removeListener",n);const r=ze.get(t);r&&(r.remove(),ze.delete(t))}var Fe=Object.freeze({__proto__:null,addEventListener:function(e,t){Te=new me;let n=e;n&&"change"===n&&(n="networkStatusDidChange"),Te.listenerSize(n)<1&&C.callNative("NetInfo","addListener",n);const r=Te.addListener(n,e=>{t(e)});return ze.set(t,r),new Oe(n,t)},removeEventListener:je,fetch:function(){return C.callNativeWithPromise("NetInfo","getCurrentConnectivity").then(e=>e.network_info)}});const{createNode:He,updateNode:Me,deleteNode:De,flushBatch:Ue,endBatch:We,sendRenderError:Be}=N,Ve=function(e){return F(t=>t.stateNode&&t.stateNode.nodeId===e)};function $e(e){if(e instanceof qt)return e;const t=e._reactInternalFiber||e._reactInternals;if(null==t?void 0:t.child){let e=t.child;for(;e&&!(e.stateNode instanceof qt);)e=e.child;return e&&e.stateNode?e.stateNode:null}return null}function qe(e){let t=e;if("string"==typeof e){const n=F(t=>!!(t.return&&t.return.ref&&t.return.ref._stringRef)&&t.return.ref._stringRef===e);if(!n||!n.stateNode)return 0;t=n.stateNode}if(!t.nodeId){const e=$e(t);return e?e.nodeId:0}return t.nodeId}function Qe(e,t,...n){let{nativeName:r,nodeId:i}=e;if(!i||!r){const t=$e(e);t&&({nodeId:i,nativeName:r}=t)}if(!r)throw new Error("callUIFunction is calling a unnamed component");if(!i)throw new Error("callUIFunction is calling a component have no nodeId");let[o=[],a]=n;ee(o)&&(a=o,o=[]);null!==j()&&N.callUIFunction(i,t,o,a)}function Ke(e,t,n){const r=qe(t);return new Promise((t,i)=>r?C.callNative("UIManagerModule",e,r,e=>(n&&ee(n)&&n(e),"this view is null"===e?i(new Error("Android cannot get the node")):t(e))):(n&&ee(n)&&n("this view is null"),i(new Error(e+" cannot get nodeId"))))}var Ge=Object.freeze({__proto__:null,createNode:He,updateNode:Me,deleteNode:De,flushBatch:Ue,endBatch:We,sendRenderError:Be,getNodeById:Ve,getNodeIdByRef:qe,getElementFromFiberRef:$e,callUIFunction:Qe,measureInWindow:function(e,t){return Ke("measureInWindow",e,t)},measureInAppWindow:function(e,t){return"android"===x.platform.OS?Ke("measureInWindow",e,t):Ke("measureInAppWindow",e,t)}});const Ye=new me,Xe=new Set,Je={exitApp(){C.callNative("DeviceEventModule","invokeDefaultBackPressHandler")},addListener:e=>(C.callNative("DeviceEventModule","setListenBackPress",!0),Xe.add(e),{remove(){Je.removeListener(e)}}),removeListener(e){Xe.delete(e),0===Xe.size&&C.callNative("DeviceEventModule","setListenBackPress",!1)},initEventListener(){Ye.addListener("hardwareBackPress",()=>{let e=!0;[...Xe].reverse().every(t=>"function"!=typeof t||!t()||(e=!1,!1)),e&&Je.exitApp()})}},Ze=(Je.initEventListener(),Je);var et=Array.isArray,tt=Object.keys,nt=Object.prototype.hasOwnProperty;const rt={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")};let it=!0,ot=[];function at(e=[],t){e.forEach(e=>{if(e){const{id:n,eventList:r}=e;r.forEach(e=>{const{name:r,type:i,isCapture:o,listener:a}=e;let l;l=function(e){return!!q[e]}(r)?q[r]:function(e){return e.replace(/^(on)?/g,"").toLocaleLowerCase()}(r),i===V&&t.RemoveEventListener(n,l,a),i===B&&t.AddEventListener(n,l,a)})}})}function lt(t){const n=function(e){const t=[];for(let n=0;n{switch(e.type){case rt.createNode:e.nodes,r.Create(e.nodes),at(e.eventNodes,r);break;case rt.updateNode:e.nodes,r.Update(e.nodes),at(e.eventNodes,r);break;case rt.deleteNode:e.nodes,r.Delete(e.nodes)}}),r.Build()}function st(e=!1){if(!it)return;if(it=!1,0===ot.length)return void(it=!0);const t=j();e?(lt(t),ot=[],it=!0):Promise.resolve().then(()=>{lt(t),ot=[],it=!0})}function ut(e){const t=e.attributes,{children:n}=t;return S(t,l)}function ct(e,t){var n;if(!t.nativeName)return{};if(t.meta.skipAddToDom)return{};if(!t.meta.component)throw new Error("Specific tag is not supported yet: "+t.tagName);return{nativeNode:{id:t.nodeId,pId:(null===(n=t.parentNode)||void 0===n?void 0:n.nodeId)||e,index:t.index,name:t.nativeName,props:w(w({},ut(t)),{},{style:t.style})},eventNode:function(e){let t=void 0;const n=e.events;if(n){const r=[];Object.keys(n).forEach(t=>{const{name:i,type:o,isCapture:a,listener:l}=n[t];e.isListenerHandled(t,o)||(e.setListenerHandledType(t,o),r.push({name:i,type:o,isCapture:a,listener:l}))}),t={id:e.nodeId,eventList:r}}return t}(t)}}function dt(e,t,n,r){const i=[],o=[];let a=n;return void 0===a&&t&&t.parentNode&&(a=t.parentNode.childNodes.indexOf(t)),t.traverseChildren(t=>{const{nativeNode:n,eventNode:a}=ct(e,t);n&&i.push(n),a&&o.push(a),"function"==typeof r&&r(t)},a),{nativeLanguages:i,eventLanguages:o}}function ft(e){return!!R&&e instanceof R.containerInfo.constructor}function pt(e,t,n=-1){if(!e||!t)return;if(t.meta.skipAddToDom)return;const r=j();if(ft(e)&&!e.isMounted){const{nativeLanguages:e,eventLanguages:i}=dt(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});ot.push({type:rt.createNode,nodes:e,eventNodes:i})}else if(e.isMounted&&!t.isMounted){const{nativeLanguages:e,eventLanguages:i}=dt(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});ot.push({type:rt.createNode,nodes:e,eventNodes:i})}}function ht(e,t,n){if(!t||t.meta.skipAddToDom)return;t.isMounted=!1,t.index=n;const r=j(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];ot.push({type:rt.deleteNode,nodes:i,eventNodes:[]})}function mt(e){if(!e.isMounted)return;const t=j(),{nativeNode:n,eventNode:r}=ct(t,e);n&&ot.push({type:rt.updateNode,nodes:[n],eventNodes:[r]})}const yt=setTimeout,gt=clearTimeout;var bt=Object.freeze({__proto__:null,commitMutationEffectsBegin:function(){},commitMutationEffectsComplete:function(){st(!0)},getCurrentEventPriority:function(){return 16},scheduleTimeout:yt,cancelTimeout:gt,noTimeout:-1,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,o){H(o,e.nodeId);const a=Object.keys(t||{});if(0===a.length)return;const l=a.map(e=>[e,t[e]]);e.setAttributes(l)},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){const o=n.createElement(e);return Object.keys(t).forEach(e=>{switch(e){case"children":break;case"nativeName":o.meta.component.name=t.nativeName;break;default:o.setAttribute(e,t[e])}}),[5,7].indexOf(i.tag)<0&&(o.meta.skipAddToDom=!0),H(i,o.nodeId),o},createTextInstance:function(e,t,n,r){const i=t.createElement("p");return i.setAttribute("text",Y(e)),i.meta={component:{name:"Text"}},H(r,i.nodeId),i},detachDeletedInstance:function(){},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){const t={style:{display:"none"}};Object.keys(t).forEach(n=>e.setAttribute(n,t[n]))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){const i={};return Object.keys(n).forEach(e=>{const t=n[e],o=r[e];null!=t&&null==o&&(i[e]=o)}),Object.keys(r).forEach(e=>{const t=n[e],o=r[e];switch(e){case"children":t===o||"number"!=typeof o&&"string"!=typeof o||(i[e]=o);break;default:null!=o&&null==t?i[e]=o:"function"==typeof o||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,a=et(t),l=et(n);if(a&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=l)return!1;var s=t instanceof Date,u=n instanceof Date;if(s!=u)return!1;if(s&&u)return t.getTime()==n.getTime();var c=t instanceof RegExp,d=n instanceof RegExp;if(c!=d)return!1;if(c&&d)return t.toString()==n.toString();var f=tt(t);if((i=f.length)!==tt(n).length)return!1;for(r=i;0!=r--;)if(!nt.call(n,f[r]))return!1;for(r=i;0!=r--;)if(!e(t[o=f[r]],n[o]))return!1;return!0}return t!=t&&n!=n}(t,o)||(i[e]=o)}}),i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),W(t)},removeChildFromContainer:function(e,t){e.removeChild(t),W(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){const n=w(w({},t),{},{style:w(w({},t.style),{},{display:"flex"})});Object.keys(n).forEach(t=>e.setAttribute(t,n[t]))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){const{children:e}=t;return"string"==typeof e||"number"==typeof e}return!1}});const vt=a()(w(w({},bt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:()=>{},cancelDeferredCallback:()=>{}})),{flushSync:wt}=vt,{addEventListener:kt,removeEventListener:St,dispatchEvent:Et,AsyncStorage:Ct,Bridge:xt,Device:Nt,HippyRegister:It}=A;var Pt=Object.freeze({__proto__:null,addEventListener:kt,removeEventListener:St,dispatchEvent:Et,AsyncStorage:Ct,BackAndroid:Ze,Bridge:xt,Clipboard:Pe,Cookie:_e,Device:Nt,HippyRegister:It,ImageLoader:Re,NetworkInfo:Fe,UIManager:Ge,flushSync:wt});function _t(e){return"loop"===e?-1:e}const Lt=new me;function At(e,t){return"color"===e&&["number","string"].indexOf(typeof t)>=0?Ne(t):t}class Rt{constructor(e){var t;let n=0;if((null===(t=e.startValue)||void 0===t?void 0:t.constructor)&&"Animation"===e.startValue.constructor.name)n={animationId:e.startValue.animationId};else{const{startValue:t}=e;n=At(e.valueType,t)}const r=At(e.valueType,e.toValue);this.mode=e.mode||"timing",this.delay=e.delay||0,this.startValue=n||0,this.toValue=r||0,this.valueType=e.valueType||void 0,this.duration=e.duration||0,this.direction=e.direction||"center",this.timingFunction=e.timingFunction||"linear",this.repeatCount=_t(e.repeatCount||0),this.inputRange=e.inputRange||[],this.outputRange=e.outputRange||[],this.animationId=xt.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}removeEventListener(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}start(){this.removeEventListener();"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Lt.addListener("onAnimationStart",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Lt.addListener("onAnimationEnd",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Lt.addListener("onAnimationCancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Lt.addListener("onAnimationRepeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),xt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),xt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){xt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){xt.callNative("AnimationModule","resumeAnimation",this.animationId)}updateAnimation(e){if("object"!=typeof e)throw new TypeError("Invalid arguments");if("string"==typeof e.mode&&e.mode!==this.mode)throw new TypeError("Update animation mode not supported");Object.keys(e).forEach(t=>{const n=e[t];if("startValue"===t){let t=0;if(e.startValue instanceof Rt)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=At(this.valueType,n)}this.startValue=t||0}else"repeatCount"===t?this.repeatCount=_t(e.repeatCount||0):Object.defineProperty(this,t,{value:n})}),xt.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:At(this.valueType,this.toValue),duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{}))}onAnimationStart(e){this.onAnimationStartCallback=e}onAnimationEnd(e){this.onAnimationEndCallback=e}onAnimationCancel(e){this.onAnimationCancelCallback=e}onAnimationRepeat(e){this.onAnimationRepeatCallback=e}}const zt=new me;class Tt{constructor(e){this.animationList=[],e.children.forEach(e=>{this.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})}),this.animationId=xt.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:_t(e.repeatCount||0),children:this.animationList,virtual:e.virtual}),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}removeEventListener(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}start(){this.removeEventListener();"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=zt.addListener("onAnimationStart",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=zt.addListener("onAnimationEnd",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=zt.addListener("onAnimationCancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=zt.addListener("onAnimationRepeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),xt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),this.animationList.forEach(e=>Number.isInteger(e.animationId)&&xt.callNative("AnimationModule","destroyAnimation",e.animationId)),xt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){xt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){xt.callNative("AnimationModule","resumeAnimation",this.animationId)}onAnimationStart(e){this.onAnimationStartCallback=e}onAnimationEnd(e){this.onAnimationEndCallback=e}onAnimationCancel(e){this.onAnimationCancelCallback=e}onAnimationRepeat(e){this.onAnimationRepeatCallback=e}}let Ot=0;class jt{constructor(){this.meta={component:{}},this.index=0,this.childNodes=[],this.parentNode=null,this.mounted=!1,this.nodeId=(Ot+=1,Ot%10==0&&(Ot+=1),Ot)}toString(){return this.constructor.name}get isMounted(){return this.mounted}set isMounted(e){this.mounted=e}insertBefore(e,t){if(!e)throw new Error("Can't insert child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");const n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),pt(this,e,n)}moveChild(e,t){if(!e)throw new Error("Can't move child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");const n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),ht(0,e,n);const r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),pt(this,e,r)}appendChild(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),pt(this,e,this.childNodes.length-1)}}removeChild(e){if(!e)throw new Error("Can't remove child.");if(e.meta.skipAddToDom)return;if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");const t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),ht(0,e,t)}findChild(e){if(e(this))return this;if(this.childNodes.length)for(let t=0;t{this.traverseChildren.call(t,e,n)})}}const Ft={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},Ht={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},Mt="turn",Dt="rad",Ut="deg";function Wt(e){const t=(e||"").replace(/\s*/g,"").toLowerCase(),n=/^([+-]?\d+\.?\d*)+(deg|turn|rad)|(to\w+)$/g.exec(t);if(!Array.isArray(n))return;let r="180";const[i,o,a]=n;return o&&a?r=function(e,t=Ut){const n=parseFloat(e);let r=e||"";const[,i]=e.split(".");switch(i&&i.length>2&&(r=n.toFixed(2)),t){case Mt:r=""+(360*n).toFixed(2);break;case Dt:r=""+(180/Math.PI*n).toFixed(2)}return r}(o,a):i&&void 0!==Ht[i]&&(r=Ht[i]),r}function Bt(e){const t=(e||"").replace(/\s+/g," ").trim(),[n,r]=t.split(/\s+(?![^(]*?\))/),i=/^([+-]?\d+\.?\d*)%$/g;return!n||i.exec(n)||r?n&&i.exec(r)?{ratio:parseFloat(r.split("%")[0])/100,color:Ne(n)}:void 0:{color:Ne(n)}}function Vt(e){return J(e)&&(e=e.replace("Capture","")),$[e]?$[e][1]:e}function $t(e){return t=>{const{id:n,currentId:r,params:i}=t;if(function(e){return!!q[e]}(e)){const t={id:n,name:e,currentId:r};Object.assign(t,i),de.receiveNativeGesture(t)}else{const t=[n,e,i];de.receiveUIComponentEvent(t)}}}class qt extends jt{constructor(e){super(),this.id="",this.style={},this.attributes={},this.events={},this.tagName=e}get nativeName(){return this.meta.component.name}toString(){return`${this.tagName}:(${this.nativeName})`}setListenerHandledType(e,t){this.events[e]&&(this.events[e].handledType=t)}isListenerHandled(e,t){return!this.events[e]||t===this.events[e].handledType}hasAttribute(e){return!!this.attributes[e]}getAttribute(e){return this.attributes[e]}setStyleAttribute(e){this.style={};let t=e;if(!Array.isArray(t)&&Object.hasOwnProperty.call(t,0)){const e=[],n={};Object.keys(t).forEach(r=>{var i;i=r,Q.test(i)?e.push(t[r]):n[r]=t[r]}),t=[...e,n]}Array.isArray(t)||(t=[t]);let n={};t.forEach(e=>{Array.isArray(e)?e.forEach(e=>{n=w(w({},n),e)}):"object"==typeof e&&e&&(n=w(w({},n),e))}),Object.keys(n).forEach(e=>{const t=n[e];if(Object.prototype.hasOwnProperty.call(Ft,e)&&(e=Ft[e]),"transform"===e){const e={};if(!Array.isArray(t))throw new TypeError("transform only support array args");t.forEach(t=>{Object.keys(t).forEach(n=>{const r=t[n];r instanceof Rt||r instanceof Tt?e[n]={animationId:r.animationId}:null===r?e[n]&&delete e[n]:void 0!==r&&(e[n]=r)})});const n=Object.keys(e);n.length&&(Array.isArray(this.style.transform)||(this.style.transform=[]),n.forEach(t=>this.style.transform.push({[t]:e[t]})))}else if(null===t&&void 0!==this.style[e])this.style[e]=void 0;else if(t instanceof Rt||t instanceof Tt)this.style[e]={animationId:t.animationId};else if(e.toLowerCase().indexOf("colors")>-1)this.style[e]=Ie(t);else if(e.toLowerCase().indexOf("color")>-1)this.style[e]=Ne(t);else if("backgroundImage"===e&&t)this.style=function(e,t,n){if(0===t.indexOf("linear-gradient")){const e=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,(?![^(]*?\))/),r=[];n.linearGradient=n.linearGradient||{},e.forEach((e,t)=>{if(0===t){const t=Wt(e);if(t)n.linearGradient.angle=t;else{n.linearGradient.angle="180";const t=Bt(e);t&&r.push(t)}}else{const t=Bt(e);t&&r.push(t)}}),n.linearGradient.colorStopList=r}else n[e]=re(t);return n}(e,t,this.style);else if("textShadowOffset"===e){const{x:n=0,width:r=0,y:i=0,height:o=0}=t||{};this.style[e]={width:n||r,height:i||o}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?this.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,t,this.style):this.style[e]=t})}setAttributes(e=[]){Array.isArray(e)&&e.length>0&&(e.forEach(e=>{if(Array.isArray(e)){const[t,n]=e;this.setAttribute(t,n,{notToNative:!0})}}),mt(this))}parseAnimationStyleProp(e){let t=!1;Object.keys(e).some(n=>{const r=e[n];if(r&&Array.isArray(r)&&"transform"===n)for(let e=0;e["id"].indexOf(e)>=0,action:()=>(t===this.id||(this.id=t,function(e){if(!e.isMounted)return;const t=j(),{nativeLanguages:n,eventLanguages:r}=dt(t,e)||{};n&&ot.push({type:rt.updateNode,nodes:n,eventNodes:r})}(this)),!0)},{match:()=>["value","defaultValue","placeholder"].indexOf(e)>=0,action:()=>(this.attributes[e]=Y(t),!1)},{match:()=>["text"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,!1)},{match:()=>["style"].indexOf(e)>=0,action:()=>"object"!=typeof t||null==t||(this.setStyleAttribute(t),!1)},{match:()=>!0,action:()=>{if("function"==typeof t){const n=Vt(e);this.attributes[n]=t,this.events[n]?this.events[n]&&this.events[n].type!==B&&(this.events[n].type=B):this.events[n]={name:n,type:B,isCapture:J(e),listener:$t(n)}}else{const n=Vt(e);if(function(e,t){return void 0!==t&&"object"==typeof t[e]&&!!t[e]}(n,this.events)&&"function"!=typeof t)return delete this.attributes[n],this.events[n].type=V,!1;this.attributes[e]=t}return!1}}].some(e=>!!e.match()&&(n=e.action(),!0)),n}setAttribute(e,t,n={}){try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void(!n.notToNative&&mt(this));if(this.parseAttributeProp(e,t))return;this.parseAnimationStyleProp(this.style),!n.notToNative&&mt(this)}catch(e){}}removeAttribute(e){delete this.attributes[e]}setStyle(e,t,n=!1){if(null===t)return void delete this.style[e];let r=t,i=e;Object.prototype.hasOwnProperty.call(Ft,e)&&(i=Ft[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?Ie(r):i.toLowerCase().indexOf("color")>-1?Ne(r):function(e){if("number"==typeof e)return e;if("string"==typeof e&&Z.test(e))try{return parseFloat(e)}catch(t){return e}return e}(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||mt(this))}setNativeProps(e){if(e){const{style:t}=e;if(t){const e=t;Object.keys(e).forEach(t=>{this.setStyle(t,e[t],!0)}),mt(this),st(!0)}}}setText(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=Y(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}class Qt extends jt{constructor(){super(),this.documentElement=new qt("document")}createElement(e){return new qt(e)}createElementNS(e,t){return new qt(`${e}:${t}`)}}Qt.createElement=Qt.prototype.createElement,Qt.createElementNS=Qt.prototype.createElementNS;const{createContainer:Kt,updateContainer:Gt,getPublicRootInstance:Yt,injectIntoDevTools:Xt}=vt;class Jt{constructor(e){if(!e.appName||!e.entryPage)throw new TypeError("Invalid arguments");this.config=e,this.regist=this.start,this.render=this.render.bind(this);const t=new Qt;this.rootContainer=Kt(t,0,!1,null)}static get Native(){return Pt}start(){It.regist(this.config.appName,this.render)}render(e){const{appName:t,entryPage:n,silent:r=!1,bubbles:o=!1,callback:a=(()=>{})}=this.config,{__instanceId__:l}=e;this.rootContainer.containerInfo.nodeId=l,r&&te(r),o&&function(e=!1){G=e}(o),O(l,this.rootContainer);const s=i.a.createElement(n,e);return Gt(s,this.rootContainer,null,a),Yt(this.rootContainer)}}Jt.version="2.2.1";const Zt={registerComponent(e,t){new Jt({appName:e,entryPage:t}).start()}};class en extends i.a.Component{constructor(){super(...arguments),this.instance=null}setPressed(e){Qe(this.instance,"setPressed",[e])}setHotspot(e,t){Qe(this.instance,"setHotspot",[e,t])}render(){const e=this.props,{collapsable:t,style:n={}}=e,r=S(e,s),o=n,{nativeBackgroundAndroid:a}=r;return"boolean"==typeof t&&(o.collapsable=t),void 0!==(null==a?void 0:a.color)&&(a.color=Ne(a.color)),i.a.createElement("div",w({ref:e=>{this.instance=e},nativeName:"View",style:o},r))}}function tn(e,t){let{style:n}=e,r=S(e,u);const o=n;if(n&&(Array.isArray(n)?-1===n.filter(e=>"object"==typeof e&&e).findIndex(e=>e.color||e.colors)&&(o[0].color="#000"):"object"==typeof n&&void 0===n.color&&void 0===n.colors&&(o.color="#000")),r.text="","string"==typeof r.children)r.text=Y(r.children);else if("number"==typeof r.children)r.text=Y(r.children.toString());else if(Array.isArray(r.children)){const e=r.children.filter(e=>"string"==typeof e||"number"==typeof e).join("");e&&(r.text=Y(e),r.children=r.text)}return i.a.createElement("p",w({ref:t,nativeName:"Text",style:o},r))}tn.displayName="Text";const nn=i.a.forwardRef(tn);nn.displayName="Text";var rn=Object.freeze({__proto__:null,default:nn});class on extends i.a.Component{static get resizeMode(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}static getSize(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");const r=Le(e);return"function"==typeof t&&r.then(e=>t(e.width,e.height)),"function"==typeof n?r.catch(n):r.catch(e=>{}),r}render(){const e=this.props,{children:t,style:n,imageStyle:r,imageRef:o,source:a,sources:l,src:s,srcs:u,tintColor:d,tintColors:f}=e,p=S(e,c),h=this.getImageUrls({src:s,srcs:u,source:a,sources:l});1===h.length?[p.src]=h:h.length>1&&(p.srcs=h),"string"==typeof p.defaultSource&&(p.defaultSource.indexOf("data:image/"),p.defaultSource=re(p.defaultSource));const m=w({},n);return this.handleTintColor(m,d,f),p.style=m,t?i.a.createElement(en,{style:n},i.a.createElement("img",w(w({},p),{},{nativeName:"Image",alt:"",ref:o,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):i.a.createElement("img",w(w({},p),{},{nativeName:"Image",alt:"",ref:o}))}getImageUrls({src:e,srcs:t,source:n,sources:r}){let i=[];if("string"==typeof e&&i.push(e),Array.isArray(t)&&(i=[...i,...t]),n)if("string"==typeof n)i.push(n);else if("object"==typeof n&&null!==n){const{uri:e}=n;e&&i.push(e)}return r&&Array.isArray(r)&&r.forEach(e=>{"string"==typeof e?i.push(e):"object"==typeof e&&null!==e&&e.uri&&i.push(e.uri)}),i.length&&(i=i.map(e=>re(e))),i}handleTintColor(e,t,n){t&&Object.assign(e,{tintColor:t}),Array.isArray(n)&&Object.assign(e,{tintColors:n})}}on.prefetch=Ae;class an{constructor(){this.Value=an.Value}static Value(e){return e}static timing(e,t){return new Rt({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}an.View=en,an.Text=rn,an.Image=on;const ln={step0:e=>e>0?1:0,step1:e=>e>=1?1:0,linear:()=>"linear",ease:()=>"ease",quad:e=>e**2,cubic:e=>e**3,poly:e=>t=>t**e,sin:e=>1-Math.cos(e*Math.PI/2),circle:e=>1-Math.sqrt(1-e*e),exp:e=>2**(10*(e-1)),elastic:()=>"elastic",back:(e=1.70158)=>t=>t*t*((e+1)*t-e),bounce(e){let t=e;return t<1/2.75?7.5625*t*t:t<2/2.75?(t-=1.5/2.75,7.5625*t*t+.75):t<2.5/2.75?(t-=2.25/2.75,7.5625*t*t+.9375):(t-=2.625/2.75,7.5625*t*t+.984375)},bezier:()=>"bezier",in:()=>"ease-in",out:()=>"ease-out",inOut:()=>"ease-in-out"};function sn(e){return i.a.createElement("li",w({nativeName:"ListViewItem"},e))}class un extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullHeader(){Qe(this.instance,"expandPullHeader",[])}collapsePullHeader(e){"android"===Nt.platform.OS?Qe(this.instance,"collapsePullHeader",[e]):void 0!==e?Qe(this.instance,"collapsePullHeaderWithOptions",[e]):Qe(this.instance,"collapsePullHeader",[])}render(){const e=this.props,{children:t}=e,n=S(e,d);return i.a.createElement("div",w({nativeName:"PullHeaderView",ref:e=>{this.instance=e}},n),t)}}class cn extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullFooter(){Qe(this.instance,"expandPullFooter",[])}collapsePullFooter(){Qe(this.instance,"collapsePullFooter",[])}render(){const e=this.props,{children:t}=e,n=S(e,f);return i.a.createElement("div",w({nativeName:"PullFooterView",ref:e=>{this.instance=e}},n),t)}}cn.defaultProps={sticky:!0};class dn extends i.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this),this.state={initialListReady:!1}}componentDidMount(){const{getRowKey:e}=this.props}scrollToIndex(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Qe(this.instance,"scrollToIndex",[e,t,n])}scrollToContentOffset(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Qe(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}render(){const e=this.props,{children:t,style:n,renderRow:r,renderPullHeader:o,renderPullFooter:a,getRowType:l,getRowStyle:s,getRowKey:u,dataSource:c,initialListSize:d,rowShouldSticky:f,onRowLayout:h,onHeaderPulling:m,onHeaderReleased:y,onFooterPulling:g,onFooterReleased:b,onAppear:v,onDisappear:k,onWillAppear:E,onWillDisappear:C}=e,x=S(e,p),N=[];if("function"==typeof r){const{initialListReady:e}=this.state;let{numberOfRows:t}=this.props;const p=this.getPullHeader(o,m,y),S=this.getPullFooter(a,g,b);!t&&c&&(t=c.length),e||(t=Math.min(t,d||10));for(let e=0;e{"function"==typeof n&&(t[r]=()=>{n(e)})}),n&&N.push(i.a.createElement(sn,w({},t),n))}p&&N.unshift(p),S&&N.push(S),"function"==typeof f&&Object.assign(x,{rowShouldSticky:!0});const I=[v,k,E,C];x.exposureEventEnabled=I.some(e=>"function"==typeof e),"ios"===Nt.platform.OS&&(x.numberOfRows=N.length),x.initialListSize=d,x.style=w({},n)}return i.a.createElement("ul",w({ref:e=>{this.instance=e},nativeName:"ListView",initialListReady:this.handleInitialListReady},x),N.length?N:t)}handleInitialListReady(){this.setState({initialListReady:!0})}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(un,{key:"pull-header",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),r}getPullFooter(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(cn,{key:"pull-footer",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleRowProps(e,t,{getRowKey:n,getRowStyle:r,onRowLayout:i,getRowType:o,rowShouldSticky:a}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i(e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}"function"==typeof a&&(e.sticky=a(t))}}dn.defaultProps={numberOfRows:0};class fn extends i.a.Component{constructor(e){super(e),this.instance=null,this.refreshComplected=this.refreshCompleted.bind(this)}startRefresh(){Qe(this.instance,"startRefresh",null)}refreshCompleted(){Qe(this.instance,"refreshComplected",null)}render(){const e=this.props,{children:t}=e,n=S(e,h);return i.a.createElement("div",w({nativeName:"RefreshWrapper",ref:e=>{this.instance=e}},n),i.a.createElement("div",{nativeName:"RefreshWrapperItemView",style:{left:0,right:0,position:"absolute"}},this.getRefresh()),t)}getRefresh(){const{getRefresh:e}=this.props;return"function"==typeof e&&e()||null}}class pn{constructor(){this.top=null,this.size=0}push(e){this.top={data:e,next:this.top},this.size+=1}peek(){return null===this.top?null:this.top.data}pop(){if(null===this.top)return null;const e=this.top;return this.top=this.top.next,this.size>0&&(this.size-=1),e.data}clear(){this.top=null,this.size=0}displayAll(){const e=[];if(null===this.top)return e;let t=this.top;for(let n=0,r=this.size;n1&&this.pop({animated:!0})}push(e){if(null==e?void 0:e.component){if(!this.routeList[e.routeName]){new Jt({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0}delete e.component}const t=[e];this.stack.push(e),Qe(this.instance,"push",t)}pop(e){if(this.stack.size>1){const t=[e];this.stack.pop(),Qe(this.instance,"pop",t)}}clear(){this.stack.clear()}render(){const e=this.props,{initialRoute:{component:t}}=e,n=S(e.initialRoute,y),r=S(e,m);return r.initialRoute=n,i.a.createElement("div",w({nativeName:"Navigator",ref:e=>{this.instance=e}},r))}}function mn(e){return i.a.createElement("div",w(w({nativeName:"ViewPagerItem"},e),{},{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}class yn extends i.a.Component{constructor(e){super(e),this.instance=null,this.setPage=this.setPage.bind(this),this.setPageWithoutAnimation=this.setPageWithoutAnimation.bind(this),this.onPageScrollStateChanged=this.onPageScrollStateChanged.bind(this)}onPageScrollStateChanged(e){const{onPageScrollStateChanged:t}=this.props;t&&t(e.pageScrollState)}setPage(e){"number"==typeof e&&Qe(this.instance,"setPage",[e])}setPageWithoutAnimation(e){"number"==typeof e&&Qe(this.instance,"setPageWithoutAnimation",[e])}render(){const e=this.props,{children:t,onPageScrollStateChanged:n}=e,r=S(e,g);let o=[];return Array.isArray(t)?o=t.map(e=>{const t={};return"string"==typeof e.key&&(t.key="viewPager_"+e.key),i.a.createElement(mn,w({},t),e)}):o.push(i.a.createElement(mn,null,t)),"function"==typeof n&&(r.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",w({nativeName:"ViewPager",ref:e=>{this.instance=e}},r),o)}}function gn(){const e=x.platform.Localization;return!!e&&1===e.direction}const bn={caretColor:"caret-color"};class vn extends i.a.Component{constructor(e){super(e),this.instance=null,this._lastNativeText="",this.onChangeText=this.onChangeText.bind(this),this.onKeyboardWillShow=this.onKeyboardWillShow.bind(this)}componentDidMount(){const{value:e,autoFocus:t}=this.props;this._lastNativeText=e,t&&this.focus()}componentWillUnmount(){this.blur()}getValue(){return new Promise(e=>{Qe(this.instance,"getValue",t=>e(t.text))})}setValue(e){return Qe(this.instance,"setValue",[e]),e}focus(){Qe(this.instance,"focusTextInput",[])}blur(){Qe(this.instance,"blurTextInput",[])}showInputMethod(){}hideInputMethod(){}clear(){Qe(this.instance,"clear",[])}render(){const e=w({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors","caretColor","caret-color"].forEach(t=>{let n=t;const r=this.props[t];"string"==typeof this.props[t]&&(bn[t]&&(n=bn[t]),Array.isArray(e.style)?e.style.push({[n]:r}):e.style&&"object"==typeof e.style?e.style[n]=r:e.style={[n]:r},delete e[t])}),gn()&&(e.style?"object"!=typeof e.style||Array.isArray(e.style)||e.style.textAlign||(e.style.textAlign="right"):e.style={textAlign:"right"}),i.a.createElement("div",w(w({nativeName:"TextInput"},e),{},{ref:e=>{this.instance=e},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}onChangeText(e){const{onChangeText:t}=this.props;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}onKeyboardWillShow(e){const{onKeyboardWillShow:t}=this.props;"function"==typeof t&&t(e)}}const wn=Nt.window.scale;let kn=Math.round(.4*wn)/wn;function Sn(e){return e}0===kn&&(kn=1/wn);var En=Object.freeze({__proto__:null,get hairlineWidth(){return kn},create:Sn});const Cn={baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerVertical:{collapsable:!1,flexDirection:"column"},contentContainerHorizontal:{collapsable:!1,flexDirection:"row"}};class xn extends i.a.Component{constructor(){super(...arguments),this.instance=null}scrollTo(e,t,n=!0){let r=e,i=t,o=n;"number"==typeof e||"object"==typeof e&&e&&({x:r,y:i,animated:o}=e),r=r||0,i=i||0,o=!!o,Qe(this.instance,"scrollTo",[r,i,o])}scrollToWithDuration(e=0,t=0,n=1e3){Qe(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}render(){const{horizontal:e,contentContainerStyle:t,children:n,style:r}=this.props,o=[e?Cn.contentContainerHorizontal:Cn.contentContainerVertical,t],a=e?Object.assign({},Cn.baseHorizontal,r):Object.assign({},Cn.baseVertical,r);return e&&(a.flexDirection=gn()?"row-reverse":"row"),i.a.createElement("div",w(w({nativeName:"ScrollView",ref:e=>{this.instance=e}},this.props),{},{style:a}),i.a.createElement(en,{style:o},n))}}const Nn={modal:{position:"absolute",collapsable:!1}};class In extends i.a.Component{constructor(e){super(e),this.eventSubscription=null}componentDidMount(){"ios"===Nt.platform.OS&&(this.eventSubscription=new pe("modalDismissed"),this.eventSubscription.addCallback(e=>{const{primaryKey:t,onDismiss:n}=this.props;e.primaryKey===t&&"function"==typeof n&&n()}))}componentWillUnmount(){"ios"===Nt.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}render(){const{children:e,visible:t,transparent:n,animated:r}=this.props;let{animationType:o}=this.props;if(!1===t)return null;const a={backgroundColor:n?"transparent":"white"};return o||(o="none",r&&(o="slide")),i.a.createElement("div",w({nativeName:"Modal",animationType:o,transparent:n,style:[Nn.modal,a]},this.props),e)}}In.defaultProps={visible:!0};class Pn extends i.a.Component{constructor(e){super(e);const{requestFocus:t}=this.props;this.state={isFocus:!!t},this.handleFocus=this.handleFocus.bind(this)}render(){var e,t,n;const{requestFocus:r,children:o,nextFocusDownId:a,nextFocusUpId:l,nextFocusLeftId:s,nextFocusRightId:u,style:c,noFocusStyle:d,focusStyle:f,onClick:p}=this.props,{isFocus:h}=this.state,m=i.a.Children.only(o);let y;(null===(t=null===(e=null==m?void 0:m.child)||void 0===e?void 0:e.memoizedProps)||void 0===t?void 0:t.nativeName)?y=m.child.memoizedProps.nativeName:(null===(n=null==m?void 0:m.type)||void 0===n?void 0:n.displayName)&&(y=m.type.displayName);const g=a&&qe(a),b=l&&qe(l),v=s&&qe(s),k=u&&qe(u);let S=c;if("Text"!==y){const e=m.memoizedProps.style;S=w(w({},S),e)}if(Object.assign(S,h?f:d),"Text"===y)return i.a.createElement(en,{focusable:!0,nextFocusDownId:g,nextFocusUpId:b,nextFocusLeftId:v,nextFocusRightId:k,requestFocus:r,style:S,onClick:p,onFocus:this.handleFocus},m);const{children:E}=m.memoizedProps;return i.a.cloneElement(m,{nextFocusDownId:a,nextFocusUpId:l,nextFocusLeftId:s,nextFocusRightId:u,requestFocus:r,onClick:p,focusable:!0,children:E,style:S,onFocus:this.handleFocus})}handleFocus(e){const{onFocus:t}=this.props;"function"==typeof t&&t(e);const{isFocus:n}=this.state;n!==e.focus&&this.setState({isFocus:e.focus})}}function _n(e){return i.a.createElement("iframe",w({title:"hippy",nativeName:"WebView"},e))}let Ln;class An{constructor(e,t,n){if(this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),Ln||(Ln=new pe("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!e||"string"!=typeof e)throw new TypeError("Invalid WebSocket url");const r=w({},n);if(void 0!==t)if(Array.isArray(t)&&t.length>0)r["Sec-WebSocket-Protocol"]=t.join(",");else{if("string"!=typeof t)throw new TypeError("Invalid WebSocket protocols");r["Sec-WebSocket-Protocol"]=t}const i={headers:r,url:e};this.url=e,this.webSocketCallbackId=Ln.addCallback(this.onWebSocketEvent),C.callNativeWithPromise("websocket","connect",i).then(e=>{e&&0===e.code&&"number"==typeof e.id&&(this.webSocketId=e.id)})}close(e,t){1===this.readyState&&(this.readyState=2,C.callNative("websocket","close",{id:this.webSocketId,code:e,reason:t}))}send(e){if(1===this.readyState){if("string"!=typeof e)throw new TypeError("Unsupported websocket data type: "+typeof e);C.callNative("websocket","send",{id:this.webSocketId,data:e})}}set onopen(e){this.webSocketCallbacks.onOpen=e}set onclose(e){this.webSocketCallbacks.onClose=e}set onerror(e){this.webSocketCallbacks.onError=e}set onmessage(e){this.webSocketCallbacks.onMessage=e}onWebSocketEvent(e){if("object"!=typeof e||e.id!==this.webSocketId)return;const{type:t}=e;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,Ln.removeCallback(this.webSocketCallbackId));const n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}function Rn(e){return i.a.createElement("li",w({nativeName:"WaterfallItem"},e))}class zn extends i.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this)}scrollToIndex({index:e=0,animated:t=!0}){Qe(this.instance,"scrollToIndex",[e,e,t])}scrollToContentOffset({xOffset:e=0,yOffset:t=0,animated:n=!0}){Qe(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}render(){const e=this.props,{style:t={},renderBanner:n,numberOfColumns:r=2,columnSpacing:o=0,interItemSpacing:a=0,numberOfItems:l=0,preloadItemNumber:s=0,renderItem:u,renderPullHeader:c,renderPullFooter:d,getItemType:f,getItemKey:p,getItemStyle:h,contentInset:m={top:0,left:0,bottom:0,right:0},onItemLayout:y,onHeaderPulling:g,onHeaderReleased:v,onFooterPulling:k,onFooterReleased:E,containPullHeader:C=!1,containPullFooter:x=!1,containBannerView:N=!1}=e,I=w(w({},S(e,b)),{},{style:t,numberOfColumns:r,columnSpacing:o,interItemSpacing:a,preloadItemNumber:s,contentInset:m,containPullHeader:C,containPullFooter:x,containBannerView:N}),P=[];if("function"==typeof n){const e=n();e&&(P.push(i.a.createElement(en,{key:"bannerView"},i.a.cloneElement(e))),I.containBannerView=!0)}if("function"==typeof u){const e=this.getPullHeader(c,g,v),n=this.getPullFooter(d,k,E);for(let e=0;ethis.instance=e,initialListReady:this.handleInitialListReady.bind(this)},I),P)}componentDidMount(){const{getItemKey:e}=this.props}handleRowProps(e,t,{getItemKey:n,getItemStyle:r,onItemLayout:i,getItemType:o}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i.call(this,e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(un,{key:"PullHeader",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),r}getPullFooter(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(cn,{key:"PullFooter",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleInitialListReady(){const{onInitialListReady:e}=this.props;"function"==typeof e&&e()}}e.WebSocket=An;const{AsyncStorage:Tn,BackAndroid:On,Bridge:jn,Clipboard:Fn,Cookie:Hn,Device:Mn,HippyRegister:Dn,ImageLoader:Un,NetworkInfo:Wn,UIManager:Bn,flushSync:Vn}=Pt,{callNative:$n,callNativeWithPromise:qn,callNativeWithCallbackId:Qn,removeNativeCallback:Kn}=jn,Gn=null,Yn=e.ConsoleModule||e.console,Xn=Mn.platform,Jn=Jt,Zn=Jt,er=on,tr=Dn,nr=me,rr=pe,ir={get:e=>Mn[e]},or={get:()=>Mn.screen.scale}}.call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/@hippy/react-reconciler/cjs/react-reconciler.production.min.js":function(e,t,n){(function(e){ + */(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}e.__GLOBAL__||(e.__GLOBAL__={}),e.__GLOBAL__.nodeId=0,e.__GLOBAL__.animationId=0;const{asyncStorage:E,bridge:C,device:x,document:N,register:I,on:P,off:_,emit:L}=e.Hippy;var A=Object.freeze({__proto__:null,addEventListener:P,removeEventListener:_,dispatchEvent:L,AsyncStorage:E,Bridge:C,Device:x,HippyRegister:I,UIManager:N});let R,z;const T=new Map;function O(e,t){z=e,R=t}function j(){if(!z)throw new Error("getRootViewId must execute after setRootContainer");return z}function F(e){if(!R)return null;const{current:t}=R,n=[t];for(;n.length;){const t=n.shift();if(!t)break;if(e(t))return t;t.child&&n.push(t.child),t.sibling&&n.push(t.sibling)}return null}function H(e,t){T.set(t,e)}function M(e){T.delete(e)}function D(e){return(null==e?void 0:e.stateNode)||null}function U(e){return T.get(e)||null}function W(t){!function(t,n){if(!e.requestIdleCallback)return setTimeout(()=>{t({didTimeout:!1,timeRemaining:()=>1/0})},1);e.requestIdleCallback(t,n)}(e=>{(e.timeRemaining()>0||e.didTimeout)&&function e(t){"number"==typeof t?M(t):t&&(M(t.nodeId),Array.isArray(t.childNodes)&&t.childNodes.forEach(t=>e(t)))}(t)},{timeout:50})}const B=0,V=1,$={onTouchStart:["onTouchStart","onTouchDown"],onPress:["onPress","onClick"]},q={onClick:"click",onLongClick:"longclick",onPressIn:"pressin",onPressOut:"pressout",onTouchDown:"touchstart",onTouchStart:"touchstart",onTouchEnd:"touchend",onTouchMove:"touchmove",onTouchCancel:"touchcancel"};const Q=new RegExp(/^\d+$/);let K=!1,G=!1;function Y(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,e=>String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16)))}const X=new RegExp("^on.+Capture$");function J(e){return X.test(e)}const Z=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function ee(e){return"[object Function]"===Object.prototype.toString.call(e)}function te(e){K=e}function ne(){return G}function re(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){0;return`${"hpfile://"}./${e}`}return e}function ie(e){return 5===e}class oe{constructor(e){this.handlerContainer={},this.nextIdForHandler=0,this.eventName=e}getEventListeners(){return Object.keys(this.handlerContainer).filter(e=>this.handlerContainer[e]).map(e=>this.handlerContainer[e])}getHandlerSize(){return Object.keys(this.handlerContainer).length}addEventHandler(e,t){if(!e)throw new TypeError("Invalid arguments for addEventHandler");const n=this.nextIdForHandler;this.nextIdForHandler+=1;const r={id:n,eventHandler:e,context:t},i="eventHandler_"+n;return this.handlerContainer[i]=r,n}notifyEvent(e){Object.keys(this.handlerContainer).forEach(t=>{const n=this.handlerContainer[t];n&&n.eventHandler&&(n.context?n.eventHandler.call(n.context,e):n.eventHandler(e))})}removeEventHandler(e){if("number"!=typeof e)throw new TypeError("Invalid arguments for removeEventHandler");const t="eventHandler_"+e;this.handlerContainer[t]&&delete this.handlerContainer[t]}}class ae{constructor(e,t,n){this.type=e,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=t,this.target=n}stopPropagation(){this.bubbles=!1}preventDefault(){}}const le=new Map;function se(e,t){let n=e;if(t.memoizedProps&&!t.memoizedProps[e]){const r=Object.keys($);for(let i=0;i0){let e,i=!1;const o=D(n);for(;!i&&void 0!==(e=r.shift());)try{const{eventName:n,currentTarget:r,listener:a,isCapture:l}=e,s=new ae(n,r,o);Object.assign(s,t),l?(a(s),s.bubbles||(i=!0)):(i=a(s),"boolean"!=typeof i&&(i=!ne()),s.bubbles||(i=!0))}catch(e){console.reportUncaughtException(e)}}}(i,e,a):function(e,t,n){let r=!1,i=n,o=e;const a=D(n);do{if(o=se(o,i),ue(o,i))try{const e=D(i),n=new ae(o,e,a);Object.assign(n,t),r=i.memoizedProps[o](n),"boolean"!=typeof r&&(r=!ne()),n.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!ie(i.tag);)i=i.return}while(!r&&i)}(i,e,a)},receiveUIComponentEvent:function(e){if(!e||!Array.isArray(e)||e.length<2)return;const[t,n,r]=e;if("number"!=typeof t||"string"!=typeof n)return;const i=U(t);i&&ue(n,i)&&i.memoizedProps[n](r)}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=de);class fe{constructor(e,t){this.callback=e,this.bindListener=t}remove(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}class pe{constructor(e){this.eventName=e,this.listenerIdList=[]}unregister(){const e=de.getHippyEventHub(this.eventName);if(!e)throw new ReferenceError("No listeners for "+this.eventName);const t=this.listenerIdList.length;for(let n=0;n255?255:t}function ke(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Se(e,t,n){let r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Ee(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,o=Se(i,r,e+1/3),a=Se(i,r,e),l=Se(i,r,e-1/3);return Math.round(255*o)<<24|Math.round(255*a)<<16|Math.round(255*l)<<8}function Ce(e){return(parseFloat(e)%360+360)%360/360}function xe(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function Ne(e){if(Number.isInteger(e))return e;let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ve.hex6.exec(e),Array.isArray(t)?parseInt(t[1]+"ff",16)>>>0:Object.hasOwnProperty.call(ge,e)?ge[e]:(t=ve.rgb.exec(e),Array.isArray(t)?(we(t[1])<<24|we(t[2])<<16|we(t[3])<<8|255)>>>0:(t=ve.rgba.exec(e),t?(we(t[1])<<24|we(t[2])<<16|we(t[3])<<8|ke(t[4]))>>>0:(t=ve.hex3.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=ve.hex8.exec(e),t?parseInt(t[1],16)>>>0:(t=ve.hex4.exec(e),t?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=ve.hsl.exec(e),t?(255|Ee(Ce(t[1]),xe(t[2]),xe(t[3])))>>>0:(t=ve.hsla.exec(e),t?(Ee(Ce(t[1]),xe(t[2]),xe(t[3]))|ke(t[4]))>>>0:null))))))))}(e);return null===t?0:(t=(t<<24|t>>>8)>>>0,t)}function Ie(e){return Array.isArray(e)?e.map(e=>Ne(e)):[0]}var Pe=Object.freeze({__proto__:null,getString:function(){return C.callNativeWithPromise("ClipboardModule","getString")},setString:function(e){C.callNative("ClipboardModule","setString",e)}});var _e=Object.freeze({__proto__:null,getCookies:function(e){return C.callNativeWithPromise("network","getCookie",e)},setCookie:function(e,t,n){let r="";"string"==typeof n&&(r=n),n instanceof Date&&(r=n.toUTCString()),C.callNative("network","setCookie",e,t,r)}});function Le(e){return C.callNativeWithPromise("ImageLoaderModule","getSize",e)}function Ae(e){C.callNative("ImageLoaderModule","prefetch",e)}var Re=Object.freeze({__proto__:null,getSize:Le,prefetch:Ae});const ze=new Map;let Te;class Oe{constructor(e,t){this.eventName=e,this.listener=t}remove(){this.eventName&&this.listener&&(je(this.eventName,this.listener),this.listener=void 0)}}function je(e,t){if(t instanceof Oe)return void t.remove();let n=e;"change"===e&&(n="networkStatusDidChange");Te.listenerSize(n)<=1&&C.callNative("NetInfo","removeListener",n);const r=ze.get(t);r&&(r.remove(),ze.delete(t))}var Fe=Object.freeze({__proto__:null,addEventListener:function(e,t){Te=new me;let n=e;n&&"change"===n&&(n="networkStatusDidChange"),Te.listenerSize(n)<1&&C.callNative("NetInfo","addListener",n);const r=Te.addListener(n,e=>{t(e)});return ze.set(t,r),new Oe(n,t)},removeEventListener:je,fetch:function(){return C.callNativeWithPromise("NetInfo","getCurrentConnectivity").then(e=>e.network_info)}});const{createNode:He,updateNode:Me,deleteNode:De,flushBatch:Ue,endBatch:We,sendRenderError:Be}=N,Ve=function(e){return F(t=>t.stateNode&&t.stateNode.nodeId===e)};function $e(e){if(e instanceof qt)return e;const t=e._reactInternalFiber||e._reactInternals;if(null==t?void 0:t.child){let e=t.child;for(;e&&!(e.stateNode instanceof qt);)e=e.child;return e&&e.stateNode?e.stateNode:null}return null}function qe(e){let t=e;if("string"==typeof e){const n=F(t=>!!(t.return&&t.return.ref&&t.return.ref._stringRef)&&t.return.ref._stringRef===e);if(!n||!n.stateNode)return 0;t=n.stateNode}if(!t.nodeId){const e=$e(t);return e?e.nodeId:0}return t.nodeId}function Qe(e,t,...n){let{nativeName:r,nodeId:i}=e;if(!i||!r){const t=$e(e);t&&({nodeId:i,nativeName:r}=t)}if(!r)throw new Error("callUIFunction is calling a unnamed component");if(!i)throw new Error("callUIFunction is calling a component have no nodeId");let[o=[],a]=n;ee(o)&&(a=o,o=[]);null!==j()&&N.callUIFunction(i,t,o,a)}function Ke(e,t,n){const r=qe(t);return new Promise((t,i)=>r?C.callNative("UIManagerModule",e,r,e=>(n&&ee(n)&&n(e),"this view is null"===e?i(new Error("Android cannot get the node")):t(e))):(n&&ee(n)&&n("this view is null"),i(new Error(e+" cannot get nodeId"))))}var Ge=Object.freeze({__proto__:null,createNode:He,updateNode:Me,deleteNode:De,flushBatch:Ue,endBatch:We,sendRenderError:Be,getNodeById:Ve,getNodeIdByRef:qe,getElementFromFiberRef:$e,callUIFunction:Qe,measureInWindow:function(e,t){return Ke("measureInWindow",e,t)},measureInAppWindow:function(e,t){return"android"===x.platform.OS?Ke("measureInWindow",e,t):Ke("measureInAppWindow",e,t)}});const Ye=new me,Xe=new Set,Je={exitApp(){C.callNative("DeviceEventModule","invokeDefaultBackPressHandler")},addListener:e=>(C.callNative("DeviceEventModule","setListenBackPress",!0),Xe.add(e),{remove(){Je.removeListener(e)}}),removeListener(e){Xe.delete(e),0===Xe.size&&C.callNative("DeviceEventModule","setListenBackPress",!1)},initEventListener(){Ye.addListener("hardwareBackPress",()=>{let e=!0;[...Xe].reverse().every(t=>"function"!=typeof t||!t()||(e=!1,!1)),e&&Je.exitApp()})}},Ze=(Je.initEventListener(),Je);var et=Array.isArray,tt=Object.keys,nt=Object.prototype.hasOwnProperty;const rt={createNode:Symbol("createNode"),updateNode:Symbol("updateNode"),deleteNode:Symbol("deleteNode")};let it=!0,ot=[];function at(e=[],t){e.forEach(e=>{if(e){const{id:n,eventList:r}=e;r.forEach(e=>{const{name:r,type:i,listener:o}=e;let a;a=function(e){return!!q[e]}(r)?q[r]:function(e){return e.replace(/^(on)?/g,"").toLocaleLowerCase()}(r),i===V&&t.RemoveEventListener(n,a,o),i===B&&t.AddEventListener(n,a,o)})}})}function lt(t){const n=function(e){const t=[];for(let n=0;n{switch(e.type){case rt.createNode:e.nodes,r.Create(e.nodes),at(e.eventNodes,r);break;case rt.updateNode:e.nodes,r.Update(e.nodes),at(e.eventNodes,r);break;case rt.deleteNode:e.nodes,r.Delete(e.nodes)}}),r.Build()}function st(e=!1){if(!it)return;if(it=!1,0===ot.length)return void(it=!0);const t=j();e?(lt(t),ot=[],it=!0):Promise.resolve().then(()=>{lt(t),ot=[],it=!0})}function ut(e){const t=e.attributes,{children:n}=t;return S(t,l)}function ct(e,t){var n;if(!t.nativeName)return{};if(t.meta.skipAddToDom)return{};if(!t.meta.component)throw new Error("Specific tag is not supported yet: "+t.tagName);return{nativeNode:{id:t.nodeId,pId:(null===(n=t.parentNode)||void 0===n?void 0:n.nodeId)||e,index:t.index,name:t.nativeName,props:w(w({},ut(t)),{},{style:t.style})},eventNode:function(e){let t=void 0;const n=e.events;if(n){const r=[];Object.keys(n).forEach(t=>{const{name:i,type:o,isCapture:a,listener:l}=n[t];e.isListenerHandled(t,o)||(e.setListenerHandledType(t,o),r.push({name:i,type:o,isCapture:a,listener:l}))}),t={id:e.nodeId,eventList:r}}return t}(t)}}function dt(e,t,n,r){const i=[],o=[];let a=n;return void 0===a&&t&&t.parentNode&&(a=t.parentNode.childNodes.indexOf(t)),t.traverseChildren(t=>{const{nativeNode:n,eventNode:a}=ct(e,t);n&&i.push(n),a&&o.push(a),"function"==typeof r&&r(t)},a),{nativeLanguages:i,eventLanguages:o}}function ft(e){return!!R&&e instanceof R.containerInfo.constructor}function pt(e,t,n=-1){if(!e||!t)return;if(t.meta.skipAddToDom)return;const r=j();if(ft(e)&&!e.isMounted){const{nativeLanguages:e,eventLanguages:i}=dt(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});ot.push({type:rt.createNode,nodes:e,eventNodes:i})}else if(e.isMounted&&!t.isMounted){const{nativeLanguages:e,eventLanguages:i}=dt(r,t,n,e=>{e.isMounted||(e.isMounted=!0)});ot.push({type:rt.createNode,nodes:e,eventNodes:i})}}function ht(e,t,n){if(!t||t.meta.skipAddToDom)return;t.isMounted=!1,t.index=n;const r=j(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];ot.push({type:rt.deleteNode,nodes:i,eventNodes:[]})}function mt(e){if(!e.isMounted)return;const t=j(),{nativeNode:n,eventNode:r}=ct(t,e);n&&ot.push({type:rt.updateNode,nodes:[n],eventNodes:[r]})}const yt=setTimeout,gt=clearTimeout;var bt=Object.freeze({__proto__:null,commitMutationEffectsBegin:function(){},commitMutationEffectsComplete:function(){st(!0)},getCurrentEventPriority:function(){return 16},scheduleTimeout:yt,cancelTimeout:gt,noTimeout:-1,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,o){H(o,e.nodeId);const a=Object.keys(t||{});if(0===a.length)return;const l=a.map(e=>[e,t[e]]);e.setAttributes(l)},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){const o=n.createElement(e);return Object.keys(t).forEach(e=>{switch(e){case"children":break;case"nativeName":o.meta.component.name=t.nativeName;break;default:o.setAttribute(e,t[e])}}),[5,7].indexOf(i.tag)<0&&(o.meta.skipAddToDom=!0),H(i,o.nodeId),o},createTextInstance:function(e,t,n,r){const i=t.createElement("p");return i.setAttribute("text",Y(e)),i.meta={component:{name:"Text"}},H(r,i.nodeId),i},detachDeletedInstance:function(){},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){const t={style:{display:"none"}};Object.keys(t).forEach(n=>e.setAttribute(n,t[n]))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){const i={};return Object.keys(n).forEach(e=>{const t=n[e],o=r[e];null!=t&&null==o&&(i[e]=o)}),Object.keys(r).forEach(e=>{const t=n[e],o=r[e];switch(e){case"children":t===o||"number"!=typeof o&&"string"!=typeof o||(i[e]=o);break;default:null!=o&&null==t?i[e]=o:"function"==typeof o||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){var r,i,o,a=et(t),l=et(n);if(a&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=l)return!1;var s=t instanceof Date,u=n instanceof Date;if(s!=u)return!1;if(s&&u)return t.getTime()==n.getTime();var c=t instanceof RegExp,d=n instanceof RegExp;if(c!=d)return!1;if(c&&d)return t.toString()==n.toString();var f=tt(t);if((i=f.length)!==tt(n).length)return!1;for(r=i;0!=r--;)if(!nt.call(n,f[r]))return!1;for(r=i;0!=r--;)if(!e(t[o=f[r]],n[o]))return!1;return!0}return t!=t&&n!=n}(t,o)||(i[e]=o)}}),i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),W(t)},removeChildFromContainer:function(e,t){e.removeChild(t),W(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){const n=w(w({},t),{},{style:w(w({},t.style),{},{display:"flex"})});Object.keys(n).forEach(t=>e.setAttribute(t,n[t]))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){const{children:e}=t;return"string"==typeof e||"number"==typeof e}return!1}});const vt=a()(w(w({},bt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:()=>{},cancelDeferredCallback:()=>{}})),{flushSync:wt}=vt,{addEventListener:kt,removeEventListener:St,dispatchEvent:Et,AsyncStorage:Ct,Bridge:xt,Device:Nt,HippyRegister:It}=A;var Pt=Object.freeze({__proto__:null,addEventListener:kt,removeEventListener:St,dispatchEvent:Et,AsyncStorage:Ct,BackAndroid:Ze,Bridge:xt,Clipboard:Pe,Cookie:_e,Device:Nt,HippyRegister:It,ImageLoader:Re,NetworkInfo:Fe,UIManager:Ge,flushSync:wt});function _t(e){return"loop"===e?-1:e}const Lt=new me;function At(e,t){return"color"===e&&["number","string"].indexOf(typeof t)>=0?Ne(t):t}class Rt{constructor(e){var t;let n=0;if((null===(t=e.startValue)||void 0===t?void 0:t.constructor)&&"Animation"===e.startValue.constructor.name)n={animationId:e.startValue.animationId};else{const{startValue:t}=e;n=At(e.valueType,t)}const r=At(e.valueType,e.toValue);this.mode=e.mode||"timing",this.delay=e.delay||0,this.startValue=n||0,this.toValue=r||0,this.valueType=e.valueType||void 0,this.duration=e.duration||0,this.direction=e.direction||"center",this.timingFunction=e.timingFunction||"linear",this.repeatCount=_t(e.repeatCount||0),this.inputRange=e.inputRange||[],this.outputRange=e.outputRange||[],this.animationId=xt.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}removeEventListener(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}start(){this.removeEventListener();"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Lt.addListener("onAnimationStart",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Lt.addListener("onAnimationEnd",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Lt.addListener("onAnimationCancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Lt.addListener("onAnimationRepeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),xt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),xt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){xt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){xt.callNative("AnimationModule","resumeAnimation",this.animationId)}updateAnimation(e){if("object"!=typeof e)throw new TypeError("Invalid arguments");if("string"==typeof e.mode&&e.mode!==this.mode)throw new TypeError("Update animation mode not supported");Object.keys(e).forEach(t=>{const n=e[t];if("startValue"===t){let t=0;if(e.startValue instanceof Rt)t={animationId:e.startValue.animationId};else{const{startValue:n}=e;t=At(this.valueType,n)}this.startValue=t||0}else"repeatCount"===t?this.repeatCount=_t(e.repeatCount||0):Object.defineProperty(this,t,{value:n})}),xt.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:At(this.valueType,this.toValue),duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{}))}onAnimationStart(e){this.onAnimationStartCallback=e}onAnimationEnd(e){this.onAnimationEndCallback=e}onAnimationCancel(e){this.onAnimationCancelCallback=e}onAnimationRepeat(e){this.onAnimationRepeatCallback=e}}const zt=new me;class Tt{constructor(e){this.animationList=[],e.children.forEach(e=>{this.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})}),this.animationId=xt.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:_t(e.repeatCount||0),children:this.animationList,virtual:e.virtual}),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}removeEventListener(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}start(){this.removeEventListener();"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=zt.addListener("onAnimationStart",e=>{e===this.animationId&&(this.animationStartListener.remove(),"function"==typeof this.onAnimationStartCallback&&this.onAnimationStartCallback())})),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=zt.addListener("onAnimationEnd",e=>{e===this.animationId&&(this.animationEndListener.remove(),"function"==typeof this.onAnimationEndCallback&&this.onAnimationEndCallback())})),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=zt.addListener("onAnimationCancel",e=>{e===this.animationId&&(this.animationCancelListener.remove(),"function"==typeof this.onAnimationCancelCallback&&this.onAnimationCancelCallback())})),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=zt.addListener("onAnimationRepeat",e=>{e===this.animationId&&"function"==typeof this.onAnimationRepeatCallback&&this.onAnimationRepeatCallback()})),xt.callNative("AnimationModule","startAnimation",this.animationId)}destory(){this.destroy()}destroy(){this.removeEventListener(),this.animationList.forEach(e=>Number.isInteger(e.animationId)&&xt.callNative("AnimationModule","destroyAnimation",e.animationId)),xt.callNative("AnimationModule","destroyAnimation",this.animationId)}pause(){xt.callNative("AnimationModule","pauseAnimation",this.animationId)}resume(){xt.callNative("AnimationModule","resumeAnimation",this.animationId)}onAnimationStart(e){this.onAnimationStartCallback=e}onAnimationEnd(e){this.onAnimationEndCallback=e}onAnimationCancel(e){this.onAnimationCancelCallback=e}onAnimationRepeat(e){this.onAnimationRepeatCallback=e}}let Ot=0;class jt{constructor(){this.meta={component:{}},this.index=0,this.childNodes=[],this.parentNode=null,this.mounted=!1,this.nodeId=(Ot+=1,Ot%10==0&&(Ot+=1),Ot)}toString(){return this.constructor.name}get isMounted(){return this.mounted}set isMounted(e){this.mounted=e}insertBefore(e,t){if(!e)throw new Error("Can't insert child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");const n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),pt(this,e,n)}moveChild(e,t){if(!e)throw new Error("Can't move child.");if(e.meta.skipAddToDom)return;if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");const n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),ht(0,e,n);const r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),pt(this,e,r)}appendChild(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),pt(this,e,this.childNodes.length-1)}}removeChild(e){if(!e)throw new Error("Can't remove child.");if(e.meta.skipAddToDom)return;if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");const t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),ht(0,e,t)}findChild(e){if(e(this))return this;if(this.childNodes.length)for(let t=0;t{this.traverseChildren.call(t,e,n)})}}const Ft={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},Ht={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},Mt="turn",Dt="rad",Ut="deg";function Wt(e){const t=(e||"").replace(/\s*/g,"").toLowerCase(),n=/^([+-]?\d+\.?\d*)+(deg|turn|rad)|(to\w+)$/g.exec(t);if(!Array.isArray(n))return;let r="180";const[i,o,a]=n;return o&&a?r=function(e,t=Ut){const n=parseFloat(e);let r=e||"";const[,i]=e.split(".");switch(i&&i.length>2&&(r=n.toFixed(2)),t){case Mt:r=""+(360*n).toFixed(2);break;case Dt:r=""+(180/Math.PI*n).toFixed(2)}return r}(o,a):i&&void 0!==Ht[i]&&(r=Ht[i]),r}function Bt(e){const t=(e||"").replace(/\s+/g," ").trim(),[n,r]=t.split(/\s+(?![^(]*?\))/),i=/^([+-]?\d+\.?\d*)%$/g;return!n||i.exec(n)||r?n&&i.exec(r)?{ratio:parseFloat(r.split("%")[0])/100,color:Ne(n)}:void 0:{color:Ne(n)}}function Vt(e){return J(e)&&(e=e.replace("Capture","")),$[e]?$[e][1]:e}function $t(e){return t=>{const{id:n,currentId:r,params:i}=t;if(function(e){return!!q[e]}(e)){const t={id:n,name:e,currentId:r};Object.assign(t,i),de.receiveNativeGesture(t)}else{const t=[n,e,i];de.receiveUIComponentEvent(t)}}}class qt extends jt{constructor(e){super(),this.id="",this.style={},this.attributes={},this.events={},this.tagName=e}get nativeName(){return this.meta.component.name}toString(){return`${this.tagName}:(${this.nativeName})`}setListenerHandledType(e,t){this.events[e]&&(this.events[e].handledType=t)}isListenerHandled(e,t){return!this.events[e]||t===this.events[e].handledType}hasAttribute(e){return!!this.attributes[e]}getAttribute(e){return this.attributes[e]}setStyleAttribute(e){this.style={};let t=e;if(!Array.isArray(t)&&Object.hasOwnProperty.call(t,0)){const e=[],n={};Object.keys(t).forEach(r=>{var i;i=r,Q.test(i)?e.push(t[r]):n[r]=t[r]}),t=[...e,n]}Array.isArray(t)||(t=[t]);let n={};t.forEach(e=>{Array.isArray(e)?e.forEach(e=>{n=w(w({},n),e)}):"object"==typeof e&&e&&(n=w(w({},n),e))}),Object.keys(n).forEach(e=>{const t=n[e];if(Object.prototype.hasOwnProperty.call(Ft,e)&&(e=Ft[e]),"transform"===e){const e={};if(!Array.isArray(t))throw new TypeError("transform only support array args");t.forEach(t=>{Object.keys(t).forEach(n=>{const r=t[n];r instanceof Rt||r instanceof Tt?e[n]={animationId:r.animationId}:null===r?e[n]&&delete e[n]:void 0!==r&&(e[n]=r)})});const n=Object.keys(e);n.length&&(Array.isArray(this.style.transform)||(this.style.transform=[]),n.forEach(t=>this.style.transform.push({[t]:e[t]})))}else if(null===t&&void 0!==this.style[e])this.style[e]=void 0;else if(t instanceof Rt||t instanceof Tt)this.style[e]={animationId:t.animationId};else if(e.toLowerCase().indexOf("colors")>-1)this.style[e]=Ie(t);else if(e.toLowerCase().indexOf("color")>-1)this.style[e]=Ne(t);else if("backgroundImage"===e&&t)this.style=function(e,t,n){if(0===t.indexOf("linear-gradient")){const e=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,(?![^(]*?\))/),r=[];n.linearGradient=n.linearGradient||{},e.forEach((e,t)=>{if(0===t){const t=Wt(e);if(t)n.linearGradient.angle=t;else{n.linearGradient.angle="180";const t=Bt(e);t&&r.push(t)}}else{const t=Bt(e);t&&r.push(t)}}),n.linearGradient.colorStopList=r}else n[e]=re(t);return n}(e,t,this.style);else if("textShadowOffset"===e){const{x:n=0,width:r=0,y:i=0,height:o=0}=t||{};this.style[e]={width:n||r,height:i||o}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?this.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,t,this.style):this.style[e]=t})}setAttributes(e=[]){Array.isArray(e)&&e.length>0&&(e.forEach(e=>{if(Array.isArray(e)){const[t,n]=e;this.setAttribute(t,n,{notToNative:!0})}}),mt(this))}parseAnimationStyleProp(e){let t=!1;Object.keys(e).some(n=>{const r=e[n];if(r&&Array.isArray(r)&&"transform"===n)for(let e=0;e["id"].indexOf(e)>=0,action:()=>(t===this.id||(this.id=t,function(e){if(!e.isMounted)return;const t=j(),{nativeLanguages:n,eventLanguages:r}=dt(t,e)||{};n&&ot.push({type:rt.updateNode,nodes:n,eventNodes:r})}(this)),!0)},{match:()=>["value","defaultValue","placeholder"].indexOf(e)>=0,action:()=>(this.attributes[e]=Y(t),!1)},{match:()=>["text"].indexOf(e)>=0,action:()=>(this.attributes[e]=t,!1)},{match:()=>["style"].indexOf(e)>=0,action:()=>"object"!=typeof t||null==t||(this.setStyleAttribute(t),!1)},{match:()=>!0,action:()=>{if("function"==typeof t){const n=Vt(e);this.attributes[n]=t,this.events[n]?this.events[n]&&this.events[n].type!==B&&(this.events[n].type=B):this.events[n]={name:n,type:B,isCapture:J(e),listener:$t(n)}}else{const n=Vt(e);if(function(e,t){return void 0!==t&&"object"==typeof t[e]&&!!t[e]}(n,this.events)&&"function"!=typeof t)return delete this.attributes[n],this.events[n].type=V,!1;this.attributes[e]=t}return!1}}].some(e=>!!e.match()&&(n=e.action(),!0)),n}setAttribute(e,t,n={}){try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void(!n.notToNative&&mt(this));if(this.parseAttributeProp(e,t))return;this.parseAnimationStyleProp(this.style),!n.notToNative&&mt(this)}catch(e){}}removeAttribute(e){delete this.attributes[e]}setStyle(e,t,n=!1){if(null===t)return void delete this.style[e];let r=t,i=e;Object.prototype.hasOwnProperty.call(Ft,e)&&(i=Ft[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?Ie(r):i.toLowerCase().indexOf("color")>-1?Ne(r):function(e){if("number"==typeof e)return e;if("string"==typeof e&&Z.test(e))try{return parseFloat(e)}catch(t){return e}return e}(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||mt(this))}setNativeProps(e){if(e){const{style:t}=e;if(t){const e=t;Object.keys(e).forEach(t=>{this.setStyle(t,e[t],!0)}),mt(this),st(!0)}}}setText(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=Y(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}class Qt extends jt{constructor(){super(),this.documentElement=new qt("document")}createElement(e){return new qt(e)}createElementNS(e,t){return new qt(`${e}:${t}`)}}Qt.createElement=Qt.prototype.createElement,Qt.createElementNS=Qt.prototype.createElementNS;const{createContainer:Kt,updateContainer:Gt,getPublicRootInstance:Yt,injectIntoDevTools:Xt}=vt;class Jt{constructor(e){if(!e.appName||!e.entryPage)throw new TypeError("Invalid arguments");this.config=e,this.regist=this.start,this.render=this.render.bind(this);const t=new Qt;this.rootContainer=Kt(t,0,!1,null)}static get Native(){return Pt}start(){It.regist(this.config.appName,this.render)}render(e){const{appName:t,entryPage:n,silent:r=!1,bubbles:o=!1,callback:a=(()=>{})}=this.config,{__instanceId__:l}=e;this.rootContainer.containerInfo.nodeId=l,r&&te(r),o&&function(e=!1){G=e}(o),O(l,this.rootContainer);const s=i.a.createElement(n,e);return Gt(s,this.rootContainer,null,a),Yt(this.rootContainer)}}Jt.version="2.2.1";const Zt={registerComponent(e,t){new Jt({appName:e,entryPage:t}).start()}};class en extends i.a.Component{constructor(){super(...arguments),this.instance=null}setPressed(e){Qe(this.instance,"setPressed",[e])}setHotspot(e,t){Qe(this.instance,"setHotspot",[e,t])}render(){const e=this.props,{collapsable:t,style:n={}}=e,r=S(e,s),o=n,{nativeBackgroundAndroid:a}=r;return"boolean"==typeof t&&(o.collapsable=t),void 0!==(null==a?void 0:a.color)&&(a.color=Ne(a.color)),i.a.createElement("div",w({ref:e=>{this.instance=e},nativeName:"View",style:o},r))}}function tn(e,t){let{style:n}=e,r=S(e,u);const o=n;if(n&&(Array.isArray(n)?-1===n.filter(e=>"object"==typeof e&&e).findIndex(e=>e.color||e.colors)&&(o[0].color="#000"):"object"==typeof n&&void 0===n.color&&void 0===n.colors&&(o.color="#000")),r.text="","string"==typeof r.children)r.text=Y(r.children);else if("number"==typeof r.children)r.text=Y(r.children.toString());else if(Array.isArray(r.children)){const e=r.children.filter(e=>"string"==typeof e||"number"==typeof e).join("");e&&(r.text=Y(e),r.children=r.text)}return i.a.createElement("p",w({ref:t,nativeName:"Text",style:o},r))}tn.displayName="Text";const nn=i.a.forwardRef(tn);nn.displayName="Text";var rn=Object.freeze({__proto__:null,default:nn});class on extends i.a.Component{static get resizeMode(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}static getSize(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");const r=Le(e);return"function"==typeof t&&r.then(e=>t(e.width,e.height)),"function"==typeof n?r.catch(n):r.catch(e=>{}),r}render(){const e=this.props,{children:t,style:n,imageStyle:r,imageRef:o,source:a,sources:l,src:s,srcs:u,tintColor:d,tintColors:f}=e,p=S(e,c),h=this.getImageUrls({src:s,srcs:u,source:a,sources:l});1===h.length?[p.src]=h:h.length>1&&(p.srcs=h),"string"==typeof p.defaultSource&&(p.defaultSource.indexOf("data:image/"),p.defaultSource=re(p.defaultSource));const m=w({},n);return this.handleTintColor(m,d,f),p.style=m,t?i.a.createElement(en,{style:n},i.a.createElement("img",w(w({},p),{},{nativeName:"Image",alt:"",ref:o,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):i.a.createElement("img",w(w({},p),{},{nativeName:"Image",alt:"",ref:o}))}getImageUrls({src:e,srcs:t,source:n,sources:r}){let i=[];if("string"==typeof e&&i.push(e),Array.isArray(t)&&(i=[...i,...t]),n)if("string"==typeof n)i.push(n);else if("object"==typeof n&&null!==n){const{uri:e}=n;e&&i.push(e)}return r&&Array.isArray(r)&&r.forEach(e=>{"string"==typeof e?i.push(e):"object"==typeof e&&null!==e&&e.uri&&i.push(e.uri)}),i.length&&(i=i.map(e=>re(e))),i}handleTintColor(e,t,n){t&&Object.assign(e,{tintColor:t}),Array.isArray(n)&&Object.assign(e,{tintColors:n})}}on.prefetch=Ae;class an{constructor(){this.Value=an.Value}static Value(e){return e}static timing(e,t){return new Rt({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}an.View=en,an.Text=rn,an.Image=on;const ln={step0:e=>e>0?1:0,step1:e=>e>=1?1:0,linear:()=>"linear",ease:()=>"ease",quad:e=>e**2,cubic:e=>e**3,poly:e=>t=>t**e,sin:e=>1-Math.cos(e*Math.PI/2),circle:e=>1-Math.sqrt(1-e*e),exp:e=>2**(10*(e-1)),elastic:()=>"elastic",back:(e=1.70158)=>t=>t*t*((e+1)*t-e),bounce(e){let t=e;return t<1/2.75?7.5625*t*t:t<2/2.75?(t-=1.5/2.75,7.5625*t*t+.75):t<2.5/2.75?(t-=2.25/2.75,7.5625*t*t+.9375):(t-=2.625/2.75,7.5625*t*t+.984375)},bezier:()=>"bezier",in:()=>"ease-in",out:()=>"ease-out",inOut:()=>"ease-in-out"};function sn(e){return i.a.createElement("li",w({nativeName:"ListViewItem"},e))}class un extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullHeader(){Qe(this.instance,"expandPullHeader",[])}collapsePullHeader(e){"android"===Nt.platform.OS?Qe(this.instance,"collapsePullHeader",[e]):void 0!==e?Qe(this.instance,"collapsePullHeaderWithOptions",[e]):Qe(this.instance,"collapsePullHeader",[])}render(){const e=this.props,{children:t}=e,n=S(e,d);return i.a.createElement("div",w({nativeName:"PullHeaderView",ref:e=>{this.instance=e}},n),t)}}class cn extends i.a.Component{constructor(){super(...arguments),this.instance=null}expandPullFooter(){Qe(this.instance,"expandPullFooter",[])}collapsePullFooter(){Qe(this.instance,"collapsePullFooter",[])}render(){const e=this.props,{children:t}=e,n=S(e,f);return i.a.createElement("div",w({nativeName:"PullFooterView",ref:e=>{this.instance=e}},n),t)}}cn.defaultProps={sticky:!0};class dn extends i.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this),this.state={initialListReady:!1}}componentDidMount(){const{getRowKey:e}=this.props}scrollToIndex(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Qe(this.instance,"scrollToIndex",[e,t,n])}scrollToContentOffset(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&Qe(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}render(){const e=this.props,{children:t,style:n,renderRow:r,renderPullHeader:o,renderPullFooter:a,getRowType:l,getRowStyle:s,getRowKey:u,dataSource:c,initialListSize:d,rowShouldSticky:f,onRowLayout:h,onHeaderPulling:m,onHeaderReleased:y,onFooterPulling:g,onFooterReleased:b,onAppear:v,onDisappear:k,onWillAppear:E,onWillDisappear:C}=e,x=S(e,p),N=[];if("function"==typeof r){const{initialListReady:e}=this.state;let{numberOfRows:t}=this.props;const p=this.getPullHeader(o,m,y),S=this.getPullFooter(a,g,b);!t&&c&&(t=c.length),e||(t=Math.min(t,d||10));for(let e=0;e{"function"==typeof n&&(t[r]=()=>{n(e)})}),n&&N.push(i.a.createElement(sn,w({},t),n))}p&&N.unshift(p),S&&N.push(S),"function"==typeof f&&Object.assign(x,{rowShouldSticky:!0});const I=[v,k,E,C];x.exposureEventEnabled=I.some(e=>"function"==typeof e),"ios"===Nt.platform.OS&&(x.numberOfRows=N.length),x.initialListSize=d,x.style=w({},n)}return i.a.createElement("ul",w({ref:e=>{this.instance=e},nativeName:"ListView",initialListReady:this.handleInitialListReady},x),N.length?N:t)}handleInitialListReady(){this.setState({initialListReady:!0})}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(un,{key:"pull-header",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),r}getPullFooter(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(cn,{key:"pull-footer",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleRowProps(e,t,{getRowKey:n,getRowStyle:r,onRowLayout:i,getRowType:o,rowShouldSticky:a}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i(e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}"function"==typeof a&&(e.sticky=a(t))}}dn.defaultProps={numberOfRows:0};class fn extends i.a.Component{constructor(e){super(e),this.instance=null,this.refreshComplected=this.refreshCompleted.bind(this)}startRefresh(){Qe(this.instance,"startRefresh",null)}refreshCompleted(){Qe(this.instance,"refreshComplected",null)}render(){const e=this.props,{children:t}=e,n=S(e,h);return i.a.createElement("div",w({nativeName:"RefreshWrapper",ref:e=>{this.instance=e}},n),i.a.createElement("div",{nativeName:"RefreshWrapperItemView",style:{left:0,right:0,position:"absolute"}},this.getRefresh()),t)}getRefresh(){const{getRefresh:e}=this.props;return"function"==typeof e&&e()||null}}class pn{constructor(){this.top=null,this.size=0}push(e){this.top={data:e,next:this.top},this.size+=1}peek(){return null===this.top?null:this.top.data}pop(){if(null===this.top)return null;const e=this.top;return this.top=this.top.next,this.size>0&&(this.size-=1),e.data}clear(){this.top=null,this.size=0}displayAll(){const e=[];if(null===this.top)return e;let t=this.top;for(let n=0,r=this.size;n1&&this.pop({animated:!0})}push(e){if(null==e?void 0:e.component){if(!this.routeList[e.routeName]){new Jt({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0}delete e.component}const t=[e];this.stack.push(e),Qe(this.instance,"push",t)}pop(e){if(this.stack.size>1){const t=[e];this.stack.pop(),Qe(this.instance,"pop",t)}}clear(){this.stack.clear()}render(){const e=this.props,{initialRoute:{component:t}}=e,n=S(e.initialRoute,y),r=S(e,m);return r.initialRoute=n,i.a.createElement("div",w({nativeName:"Navigator",ref:e=>{this.instance=e}},r))}}function mn(e){return i.a.createElement("div",w(w({nativeName:"ViewPagerItem"},e),{},{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}class yn extends i.a.Component{constructor(e){super(e),this.instance=null,this.setPage=this.setPage.bind(this),this.setPageWithoutAnimation=this.setPageWithoutAnimation.bind(this),this.onPageScrollStateChanged=this.onPageScrollStateChanged.bind(this)}onPageScrollStateChanged(e){const{onPageScrollStateChanged:t}=this.props;t&&t(e.pageScrollState)}setPage(e){"number"==typeof e&&Qe(this.instance,"setPage",[e])}setPageWithoutAnimation(e){"number"==typeof e&&Qe(this.instance,"setPageWithoutAnimation",[e])}render(){const e=this.props,{children:t,onPageScrollStateChanged:n}=e,r=S(e,g);let o=[];return Array.isArray(t)?o=t.map(e=>{const t={};return"string"==typeof e.key&&(t.key="viewPager_"+e.key),i.a.createElement(mn,w({},t),e)}):o.push(i.a.createElement(mn,null,t)),"function"==typeof n&&(r.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",w({nativeName:"ViewPager",ref:e=>{this.instance=e}},r),o)}}function gn(){const e=x.platform.Localization;return!!e&&1===e.direction}const bn={caretColor:"caret-color"};class vn extends i.a.Component{constructor(e){super(e),this.instance=null,this._lastNativeText="",this.onChangeText=this.onChangeText.bind(this),this.onKeyboardWillShow=this.onKeyboardWillShow.bind(this)}componentDidMount(){const{value:e,autoFocus:t}=this.props;this._lastNativeText=e,t&&this.focus()}componentWillUnmount(){this.blur()}getValue(){return new Promise(e=>{Qe(this.instance,"getValue",t=>e(t.text))})}setValue(e){return Qe(this.instance,"setValue",[e]),e}focus(){Qe(this.instance,"focusTextInput",[])}blur(){Qe(this.instance,"blurTextInput",[])}showInputMethod(){}hideInputMethod(){}clear(){Qe(this.instance,"clear",[])}render(){const e=w({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors","caretColor","caret-color"].forEach(t=>{let n=t;const r=this.props[t];"string"==typeof this.props[t]&&(bn[t]&&(n=bn[t]),Array.isArray(e.style)?e.style.push({[n]:r}):e.style&&"object"==typeof e.style?e.style[n]=r:e.style={[n]:r},delete e[t])}),gn()&&(e.style?"object"!=typeof e.style||Array.isArray(e.style)||e.style.textAlign||(e.style.textAlign="right"):e.style={textAlign:"right"}),i.a.createElement("div",w(w({nativeName:"TextInput"},e),{},{ref:e=>{this.instance=e},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}onChangeText(e){const{onChangeText:t}=this.props;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}onKeyboardWillShow(e){const{onKeyboardWillShow:t}=this.props;"function"==typeof t&&t(e)}}const wn=Nt.window.scale;let kn=Math.round(.4*wn)/wn;function Sn(e){return e}0===kn&&(kn=1/wn);var En=Object.freeze({__proto__:null,get hairlineWidth(){return kn},create:Sn});const Cn={baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerVertical:{collapsable:!1,flexDirection:"column"},contentContainerHorizontal:{collapsable:!1,flexDirection:"row"}};class xn extends i.a.Component{constructor(){super(...arguments),this.instance=null}scrollTo(e,t,n=!0){let r=e,i=t,o=n;"number"==typeof e||"object"==typeof e&&e&&({x:r,y:i,animated:o}=e),r=r||0,i=i||0,o=!!o,Qe(this.instance,"scrollTo",[r,i,o])}scrollToWithDuration(e=0,t=0,n=1e3){Qe(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}render(){const{horizontal:e,contentContainerStyle:t,children:n,style:r}=this.props,o=[e?Cn.contentContainerHorizontal:Cn.contentContainerVertical,t],a=e?Object.assign({},Cn.baseHorizontal,r):Object.assign({},Cn.baseVertical,r);return e&&(a.flexDirection=gn()?"row-reverse":"row"),i.a.createElement("div",w(w({nativeName:"ScrollView",ref:e=>{this.instance=e}},this.props),{},{style:a}),i.a.createElement(en,{style:o},n))}}const Nn={modal:{position:"absolute",collapsable:!1}};class In extends i.a.Component{constructor(e){super(e),this.eventSubscription=null}componentDidMount(){"ios"===Nt.platform.OS&&(this.eventSubscription=new pe("modalDismissed"),this.eventSubscription.addCallback(e=>{const{primaryKey:t,onDismiss:n}=this.props;e.primaryKey===t&&"function"==typeof n&&n()}))}componentWillUnmount(){"ios"===Nt.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}render(){const{children:e,visible:t,transparent:n,animated:r}=this.props;let{animationType:o}=this.props;if(!1===t)return null;const a={backgroundColor:n?"transparent":"white"};return o||(o="none",r&&(o="slide")),i.a.createElement("div",w({nativeName:"Modal",animationType:o,transparent:n,style:[Nn.modal,a]},this.props),e)}}In.defaultProps={visible:!0};class Pn extends i.a.Component{constructor(e){super(e);const{requestFocus:t}=this.props;this.state={isFocus:!!t},this.handleFocus=this.handleFocus.bind(this)}render(){var e,t,n;const{requestFocus:r,children:o,nextFocusDownId:a,nextFocusUpId:l,nextFocusLeftId:s,nextFocusRightId:u,style:c,noFocusStyle:d,focusStyle:f,onClick:p}=this.props,{isFocus:h}=this.state,m=i.a.Children.only(o);let y;(null===(t=null===(e=null==m?void 0:m.child)||void 0===e?void 0:e.memoizedProps)||void 0===t?void 0:t.nativeName)?y=m.child.memoizedProps.nativeName:(null===(n=null==m?void 0:m.type)||void 0===n?void 0:n.displayName)&&(y=m.type.displayName);const g=a&&qe(a),b=l&&qe(l),v=s&&qe(s),k=u&&qe(u);let S=c;if("Text"!==y){const e=m.memoizedProps.style;S=w(w({},S),e)}if(Object.assign(S,h?f:d),"Text"===y)return i.a.createElement(en,{focusable:!0,nextFocusDownId:g,nextFocusUpId:b,nextFocusLeftId:v,nextFocusRightId:k,requestFocus:r,style:S,onClick:p,onFocus:this.handleFocus},m);const{children:E}=m.memoizedProps;return i.a.cloneElement(m,{nextFocusDownId:a,nextFocusUpId:l,nextFocusLeftId:s,nextFocusRightId:u,requestFocus:r,onClick:p,focusable:!0,children:E,style:S,onFocus:this.handleFocus})}handleFocus(e){const{onFocus:t}=this.props;"function"==typeof t&&t(e);const{isFocus:n}=this.state;n!==e.focus&&this.setState({isFocus:e.focus})}}function _n(e){return i.a.createElement("iframe",w({title:"hippy",nativeName:"WebView"},e))}let Ln;class An{constructor(e,t,n){if(this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),Ln||(Ln=new pe("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!e||"string"!=typeof e)throw new TypeError("Invalid WebSocket url");const r=w({},n);if(void 0!==t)if(Array.isArray(t)&&t.length>0)r["Sec-WebSocket-Protocol"]=t.join(",");else{if("string"!=typeof t)throw new TypeError("Invalid WebSocket protocols");r["Sec-WebSocket-Protocol"]=t}const i={headers:r,url:e};this.url=e,this.webSocketCallbackId=Ln.addCallback(this.onWebSocketEvent),C.callNativeWithPromise("websocket","connect",i).then(e=>{e&&0===e.code&&"number"==typeof e.id&&(this.webSocketId=e.id)})}close(e,t){1===this.readyState&&(this.readyState=2,C.callNative("websocket","close",{id:this.webSocketId,code:e,reason:t}))}send(e){if(1===this.readyState){if("string"!=typeof e)throw new TypeError("Unsupported websocket data type: "+typeof e);C.callNative("websocket","send",{id:this.webSocketId,data:e})}}set onopen(e){this.webSocketCallbacks.onOpen=e}set onclose(e){this.webSocketCallbacks.onClose=e}set onerror(e){this.webSocketCallbacks.onError=e}set onmessage(e){this.webSocketCallbacks.onMessage=e}onWebSocketEvent(e){if("object"!=typeof e||e.id!==this.webSocketId)return;const{type:t}=e;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,Ln.removeCallback(this.webSocketCallbackId));const n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}function Rn(e){return i.a.createElement("li",w({nativeName:"WaterfallItem"},e))}class zn extends i.a.Component{constructor(e){super(e),this.instance=null,this.pullHeader=null,this.pullFooter=null,this.handleInitialListReady=this.handleInitialListReady.bind(this)}scrollToIndex({index:e=0,animated:t=!0}){Qe(this.instance,"scrollToIndex",[e,e,t])}scrollToContentOffset({xOffset:e=0,yOffset:t=0,animated:n=!0}){Qe(this.instance,"scrollToContentOffset",[e,t,n])}expandPullHeader(){this.pullHeader&&this.pullHeader.expandPullHeader()}collapsePullHeader(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}expandPullFooter(){this.pullFooter&&this.pullFooter.expandPullFooter()}collapsePullFooter(){this.pullFooter&&this.pullFooter.collapsePullFooter()}render(){const e=this.props,{style:t={},renderBanner:n,numberOfColumns:r=2,columnSpacing:o=0,interItemSpacing:a=0,numberOfItems:l=0,preloadItemNumber:s=0,renderItem:u,renderPullHeader:c,renderPullFooter:d,getItemType:f,getItemKey:p,getItemStyle:h,contentInset:m={top:0,left:0,bottom:0,right:0},onItemLayout:y,onHeaderPulling:g,onHeaderReleased:v,onFooterPulling:k,onFooterReleased:E,containPullHeader:C=!1,containPullFooter:x=!1,containBannerView:N=!1}=e,I=w(w({},S(e,b)),{},{style:t,numberOfColumns:r,columnSpacing:o,interItemSpacing:a,preloadItemNumber:s,contentInset:m,containPullHeader:C,containPullFooter:x,containBannerView:N}),P=[];if("function"==typeof n){const e=n();e&&(P.push(i.a.createElement(en,{key:"bannerView"},i.a.cloneElement(e))),I.containBannerView=!0)}if("function"==typeof u){const e=this.getPullHeader(c,g,v),n=this.getPullFooter(d,k,E);for(let e=0;ethis.instance=e,initialListReady:this.handleInitialListReady.bind(this)},I),P)}componentDidMount(){const{getItemKey:e}=this.props}handleRowProps(e,t,{getItemKey:n,getItemStyle:r,onItemLayout:i,getItemType:o}){if("function"==typeof n&&(e.key=n(t)),"function"==typeof r&&(e.style=r(t)),"function"==typeof i&&(e.onLayout=e=>{i.call(this,e,t)}),"function"==typeof o){const n=o(t);Number.isInteger(n),e.type=n}}getPullHeader(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(un,{key:"PullHeader",ref:e=>{this.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),r}getPullFooter(e,t,n){let r=null;return"function"==typeof e&&(r=i.a.createElement(cn,{key:"PullFooter",ref:e=>{this.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),r}handleInitialListReady(){const{onInitialListReady:e}=this.props;"function"==typeof e&&e()}}e.WebSocket=An;const{AsyncStorage:Tn,BackAndroid:On,Bridge:jn,Clipboard:Fn,Cookie:Hn,Device:Mn,HippyRegister:Dn,ImageLoader:Un,NetworkInfo:Wn,UIManager:Bn,flushSync:Vn}=Pt,{callNative:$n,callNativeWithPromise:qn,callNativeWithCallbackId:Qn,removeNativeCallback:Kn}=jn,Gn=null,Yn=e.ConsoleModule||e.console,Xn=Mn.platform,Jn=Jt,Zn=Jt,er=on,tr=Dn,nr=me,rr=pe,ir={get:e=>Mn[e]},or={get:()=>Mn.screen.scale}}.call(this,n("./node_modules/webpack/buildin/global.js"))},"./node_modules/@hippy/react-reconciler/cjs/react-reconciler.production.min.js":function(e,t,n){(function(e){ /** @license React v0.26.2 * react-reconciler.production.min.js * diff --git a/driver/js/examples/ios-demo/res/index.ios.js b/driver/js/examples/ios-demo/res/index.ios.js index a69b6000d..dd957fc46 100644 --- a/driver/js/examples/ios-demo/res/index.ios.js +++ b/driver/js/examples/ios-demo/res/index.ios.js @@ -1,4 +1,5 @@ -!function(e){function t(t){for(var n,o,a=t[0],i=t[1],l=0,s=[];l0===l.indexOf(e))){var c=l.split("/"),s=c[c.length-1],u=s.split(".")[0];(f=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=f+s)}else{var f;u=l.split(".")[0];(f=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=f+l)}onScriptComplete=function(t){if(t instanceof Error){t.message+=", load chunk "+e+" failed, path is "+l;var n=r[e];0!==n&&n&&n[1](t),r[e]=void 0}},global.dynamicLoad(l,onScriptComplete)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var a=(0,eval)("this").webpackJsonp=(0,eval)("this").webpackJsonp||[],i=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);nu&&r[n].offset>t;)r[n].offset+=3;return"(.*)"}));for(;a=n.exec(t);){for(var h=0,m=a.index;"\\"===t.charAt(--m);)h++;h%2!=1&&((u+f===r.length||r[u+f].offset>a.index)&&r.splice(u+f,0,{name:d++,optional:!1,offset:a.index}),f++)}return t+=l?"$":"/"===t[t.length-1]?"":"(?=\\/|$)",new RegExp(t,c)};var n=/\((?!\?)/g},"./node_modules/prop-types/factoryWithThrowingShims.js":function(e,t,n){"use strict";var r=n("./node_modules/prop-types/lib/ReactPropTypesSecret.js");function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},"./node_modules/prop-types/index.js":function(e,t,n){e.exports=n("./node_modules/prop-types/factoryWithThrowingShims.js")()},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/react-is/cjs/react-is.production.min.js":function(e,t,n){"use strict"; +!function(e){function t(t){for(var n,o,a=t[0],i=t[1],l=0,s=[];l0===l.indexOf(e))){var c=l.split("/"),s=c[c.length-1],u=s.split(".")[0];(f=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=f+s)}else{var f;u=l.split(".")[0];(f=global.__DYNAMIC_LOAD_CUSTOM_PATH_MAP__[u])&&(l=f+l)}onScriptComplete=function(t){if(t instanceof Error){t.message+=", load chunk "+e+" failed, path is "+l;var n=r[e];0!==n&&n&&n[1](t),r[e]=void 0}},global.dynamicLoad(l,onScriptComplete)}return Promise.all(t)},o.m=e,o.c=n,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o.oe=function(e){throw console.error(e),e};var a=(0,eval)("this").webpackJsonp=(0,eval)("this").webpackJsonp||[],i=a.push.bind(a);a.push=t,a=a.slice();for(var l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(l&&c){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:R(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/setPrototypeOf.js":function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/slicedToArray.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),o=n("./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"),a=n("./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),i=n("./node_modules/@babel/runtime/helpers/nonIterableRest.js");e.exports=function(e,t){return r(e)||o(e,t)||a(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/toConsumableArray.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"),o=n("./node_modules/@babel/runtime/helpers/iterableToArray.js"),a=n("./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),i=n("./node_modules/@babel/runtime/helpers/nonIterableSpread.js");e.exports=function(e){return r(e)||o(e)||a(e)||i()},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/typeof.js":function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":function(e,t,n){var r=n("./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},"./node_modules/@babel/runtime/regenerator/index.js":function(e,t,n){e.exports=n("./node_modules/@babel/runtime/helpers/regeneratorRuntime.js")()},"./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js":function(e,t,n){"use strict";var r=n("./node_modules/react-is/index.js"),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function c(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var s=Object.defineProperty,u=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,h=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=h(n);o&&o!==m&&e(t,o,r)}var i=u(n);f&&(i=i.concat(f(n)));for(var l=c(t),p=c(n),y=0;yu&&r[n].offset>t;)r[n].offset+=3;return"(.*)"}));for(;a=n.exec(t);){for(var h=0,m=a.index;"\\"===t.charAt(--m);)h++;h%2!=1&&((u+f===r.length||r[u+f].offset>a.index)&&r.splice(u+f,0,{name:d++,optional:!1,offset:a.index}),f++)}return t+=l?"$":"/"===t[t.length-1]?"":"(?=\\/|$)",new RegExp(t,c)};var n=/\((?!\?)/g},"./node_modules/prop-types/factoryWithThrowingShims.js":function(e,t,n){"use strict";var r=n("./node_modules/prop-types/lib/ReactPropTypesSecret.js");function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},"./node_modules/prop-types/index.js":function(e,t,n){e.exports=n("./node_modules/prop-types/factoryWithThrowingShims.js")()},"./node_modules/prop-types/lib/ReactPropTypesSecret.js":function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/react-is/cjs/react-is.production.min.js":function(e,t,n){"use strict"; /** @license React v16.13.1 * react-is.production.min.js * @@ -6,4 +7,4 @@ * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var r=n("./node_modules/@babel/runtime/helpers/typeof.js"),o="function"==typeof Symbol&&Symbol.for,a=o?Symbol.for("react.element"):60103,i=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,u=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,d=o?Symbol.for("react.async_mode"):60111,h=o?Symbol.for("react.concurrent_mode"):60111,m=o?Symbol.for("react.forward_ref"):60112,p=o?Symbol.for("react.suspense"):60113,y=o?Symbol.for("react.suspense_list"):60120,g=o?Symbol.for("react.memo"):60115,b=o?Symbol.for("react.lazy"):60116,w=o?Symbol.for("react.block"):60121,v=o?Symbol.for("react.fundamental"):60117,x=o?Symbol.for("react.responder"):60118,S=o?Symbol.for("react.scope"):60119;function T(e){if("object"===r(e)&&null!==e){var t=e.$$typeof;switch(t){case a:switch(e=e.type){case d:case h:case l:case s:case c:case p:return e;default:switch(e=e&&e.$$typeof){case f:case m:case b:case g:case u:return e;default:return t}}case i:return t}}}function C(e){return T(e)===h}t.AsyncMode=d,t.ConcurrentMode=h,t.ContextConsumer=f,t.ContextProvider=u,t.Element=a,t.ForwardRef=m,t.Fragment=l,t.Lazy=b,t.Memo=g,t.Portal=i,t.Profiler=s,t.StrictMode=c,t.Suspense=p,t.isAsyncMode=function(e){return C(e)||T(e)===d},t.isConcurrentMode=C,t.isContextConsumer=function(e){return T(e)===f},t.isContextProvider=function(e){return T(e)===u},t.isElement=function(e){return"object"===r(e)&&null!==e&&e.$$typeof===a},t.isForwardRef=function(e){return T(e)===m},t.isFragment=function(e){return T(e)===l},t.isLazy=function(e){return T(e)===b},t.isMemo=function(e){return T(e)===g},t.isPortal=function(e){return T(e)===i},t.isProfiler=function(e){return T(e)===s},t.isStrictMode=function(e){return T(e)===c},t.isSuspense=function(e){return T(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===l||e===h||e===s||e===c||e===p||e===y||"object"===r(e)&&null!==e&&(e.$$typeof===b||e.$$typeof===g||e.$$typeof===u||e.$$typeof===f||e.$$typeof===m||e.$$typeof===v||e.$$typeof===x||e.$$typeof===S||e.$$typeof===w)},t.typeOf=T},"./node_modules/react-is/index.js":function(e,t,n){"use strict";e.exports=n("./node_modules/react-is/cjs/react-is.production.min.js")},"./node_modules/react/index.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/react/index.js")},"./node_modules/regenerator-runtime/runtime.js":function(e,t,n){(function(e){var t=n("./node_modules/@babel/runtime/helpers/typeof.js"),r=function(e){"use strict";var n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,a=Object.create(o.prototype),i=new C(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return k()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=x(i,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f={};function d(){}function h(){}function m(){}var p={};c(p,a,(function(){return this}));var y=Object.getPrototypeOf,g=y&&y(y(E([])));g&&g!==n&&r.call(g,a)&&(p=g);var b=m.prototype=d.prototype=Object.create(p);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,n){var o;this._invoke=function(a,i){function l(){return new n((function(o,l){!function o(a,i,l,c){var s=u(e[a],e,i);if("throw"!==s.type){var f=s.arg,d=f.value;return d&&"object"===t(d)&&r.call(d,"__await")?n.resolve(d.__await).then((function(e){o("next",e,l,c)}),(function(e){o("throw",e,l,c)})):n.resolve(d).then((function(e){f.value=e,l(f)}),(function(e){return o("throw",e,l,c)}))}c(s.arg)}(a,i,o,l)}))}return o=o?o.then(l,l):l()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){"object"===("undefined"==typeof globalThis?"undefined":t(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/webpack/buildin/global.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/global.js")},"./node_modules/webpack/buildin/module.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/module.js")},"./src/main.js":function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"Focusable",(function(){return te})),n.d(r,"Image",(function(){return ie})),n.d(r,"ListView",(function(){return we})),n.d(r,"Modal",(function(){return Ee})),n.d(r,"RefreshWrapper",(function(){return Ye})),n.d(r,"PullHeader",(function(){return Ze})),n.d(r,"ScrollView",(function(){return et})),n.d(r,"Text",(function(){return ot})),n.d(r,"TextInput",(function(){return lt})),n.d(r,"View",(function(){return ut})),n.d(r,"ViewPager",(function(){return xt})),n.d(r,"WebView",(function(){return Tt})),n.d(r,"BoxShadow",(function(){return kt})),n.d(r,"WaterfallView",(function(){return It})),n.d(r,"RippleViewAndroid",(function(){return zt}));var o={};n.r(o),n.d(o,"Animation",(function(){return Kt})),n.d(o,"AsyncStorage",(function(){return qt})),n.d(o,"Clipboard",(function(){return Xt})),n.d(o,"NativeEvent",(function(){return $t})),n.d(o,"NetInfo",(function(){return nn})),n.d(o,"TestModule",(function(){return ln})),n.d(o,"WebSocket",(function(){return fn})),n.d(o,"UIManagerModule",(function(){return yn}));var a={};n.r(a),n.d(a,"Slider",(function(){return Tn})),n.d(a,"TabHost",(function(){return kn})),n.d(a,"SetNativeProps",(function(){return In})),n.d(a,"DynamicImport",(function(){return Dn})),n.d(a,"Localization",(function(){return Ln})),n.d(a,"Turbo",(function(){return Wn}));var i=n("../../packages/hippy-react/dist/index.js"),l=n("./node_modules/@babel/runtime/helpers/classCallCheck.js"),c=n.n(l),s=n("./node_modules/@babel/runtime/helpers/createClass.js"),u=n.n(s),f=n("./node_modules/@babel/runtime/helpers/inherits.js"),d=n.n(f),h=n("./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),m=n.n(h),p=n("./node_modules/@babel/runtime/helpers/getPrototypeOf.js"),y=n.n(p),g=n("./node_modules/react/index.js"),b=n.n(g),w=n("./node_modules/@babel/runtime/helpers/toConsumableArray.js"),v=n.n(w),x=n("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");n("./node_modules/@babel/runtime/helpers/typeof.js");function S(){return(S=Object.assign||function(e){for(var t=1;t=0;u--){var f=o[u];"."===f?C(o,u):".."===f?(C(o,u),s++):s&&(C(o,u),s--)}if(!l)for(;s--;s)o.unshift("..");!l||""===o[0]||o[0]&&T(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};var k="Invariant failed";function R(e,t){if(!e)throw new Error(k)}function A(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function V(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=S({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=E(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function I(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),u({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=V(e,t,f(),y.location);s.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(y.entries[y.index]=r,u({action:"REPLACE",location:r}))}))},go:p,goBack:function(){p(-1)},goForward:function(){p(1)},canGo:function(e){var t=y.index+e;return t>=0&&t=0||(o[n]=e[n]);return o}var B=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),M=n.n(B),z=function(e){var t=Object(D.a)();return t.displayName=e,t}("Router"),F=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(x.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return b.a.createElement(z.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(b.a.Component);var W=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=100?t([]):t(me)}),600)}))}},{key:"render",value:function(){var e=this.state.dataSource;return b.a.createElement(i.ListView,{onTouchDown:function(e){console.log("onTouchDown ListView",e.target.nodeId,e.currentTarget.nodeId)},onClickCapture:function(e){console.log("onClickCapture listview",e.target.nodeId,e.currentTarget.nodeId)},onClick:function(e){return console.log("click listview",e.target.nodeId,e.currentTarget.nodeId),!0},bounces:!0,overScrollEnabled:!0,horizontal:void 0,style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,onDelete:this.onDelete,delText:this.delText,editable:!0,getRowKey:this.getRowKey,initialListSize:15,rowShouldSticky:this.rowShouldSticky,onAppear:this.onAppear,onDisappear:this.onDisappear,onWillAppear:this.onWillAppear,onWillDisappear:this.onWillDisappear})}}]),r}(b.a.Component);function ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var xe="#4c9afa",Se="#4c9afa",Te="white",Ce=i.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:xe,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:xe,textAlign:"center",textAlignVertical:"center"}}),Ee=function(e){d()(n,e);var t=ve(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={visible:!1,press:!1},r.show=r.show.bind(ue()(r)),r.hide=r.hide.bind(ue()(r)),r}return u()(n,[{key:"feedback",value:function(e){this.setState({press:"in"===e})}},{key:"show",value:function(){this.setState({visible:!0})}},{key:"hide",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.press,r=t.visible;return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:Ce.container},b.a.createElement(i.View,{onPressIn:function(){return e.feedback("in")},onPressOut:function(){return e.feedback("out")},onClick:this.show,style:[Ce.buttonView,{borderColor:xe,opacity:n?.5:1}]},b.a.createElement(i.Text,{style:[Ce.buttonText,{color:xe}]},"点击弹出浮层"))),b.a.createElement(i.Modal,{transparent:!0,animationType:"slide_fade",visible:r,onRequestClose:function(){},supportedOrientations:["portrait"],immersionStatusBar:!0},b.a.createElement(i.View,{style:{flex:1,flexDirection:"row",justifyContent:"center",backgroundColor:"#4c9afa88"}},b.a.createElement(i.View,{onClick:this.hide,style:{width:200,height:200,backgroundColor:Se,marginTop:300,flexDirection:"row",justifyContent:"center"}},b.a.createElement(i.Text,{style:{color:Te,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}]),n}(b.a.Component),ke="https://user-images.githubusercontent.com/12878546/148736841-59ce5d1c-8010-46dc-8632-01c380159237.jpg",Re={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[ke,ke,ke],subInfo:["三图评论","11评"]}},Ae={style:2,itemBean:{title:"彼得·泰尔:认知未来是投资人的谋生之道",picUrl:"https://user-images.githubusercontent.com/12878546/148736850-4fc13304-25d4-4b6a-ada3-cbf0745666f5.jpg",subInfo:["左文右图"]}},Ve={style:5,itemBean:{title:"愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?",picUrl:"https://user-images.githubusercontent.com/12878546/148736859-29e3a5b2-612a-4fdd-ad21-dc5d29fa538f.jpg",subInfo:["六眼神魔 5234播放"]}},Ie=[Ve,Re,Ae,Re,Ae,Re,Ae,Ve,Re],je=n("./node_modules/@babel/runtime/helpers/extends.js"),Oe=n.n(je),De={getScreenWidth:function(){var e=i.Dimensions.get("screen").width,t=i.Dimensions.get("screen").height,n=e>t?t:e;return Math.floor(n)},uniqueArray:function(e){for(var t=[],n=0;n=812&&i.PixelRatio.get()>=2&&(e=!0),e}},Pe=(De.getScreenWidth()-24-12)/3,_e=Math.floor(Pe/1.35),Le=i.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:_e,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:Pe,height:_e},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function Be(e){var t=e.itemBean,n=t.title,r=t.picList,o=e.itemBean.subInfo,a=null;if(o&&o.length){var l=(o=De.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:Le.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,Oe()({},e,{style:{collapsable:!1}}),b.a.createElement(i.Text,{style:[Le.title],numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:Le.imageContainer},b.a.createElement(i.Image,{style:Le.image,source:{uri:r[0]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:[Le.image,{marginLeft:6,marginRight:6}],source:{uri:r[1]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:Le.image,source:{uri:r[2]},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:Le.tagLine},a):null)}var Me=De.getScreenWidth()-24,ze=Math.floor(Me-12)/3,Fe=Math.floor(ze/1.35),We=i.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:Fe},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:ze,height:Fe},image:{width:ze,height:Fe},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function He(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=null,r=t.title,o=t.picUrl,a=t.subInfo;if(a&&a.length){var l=(a=De.uniqueArray(a)).join(" ");n=b.a.createElement(i.Text,{style:We.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,Oe()({},e,{style:We.container}),b.a.createElement(i.View,{style:We.leftContainer},b.a.createElement(i.Text,{style:We.title,numberOfLines:2,enableScale:!0},r),n?b.a.createElement(i.View,{style:We.tagLine},n):null),b.a.createElement(i.View,{style:We.imageContainer},b.a.createElement(i.Image,{resizeMode:i.Image.resizeMode.cover,style:We.image,source:{uri:o}})))}var Ne=De.getScreenWidth()-24,Ke=Math.floor(188*Ne/336),Ge=i.StyleSheet.create({text:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:Ne,height:Ke,alignSelf:"center"},image:{width:Ne,height:Ke},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function Ue(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=t.title,r=t.picUrl,o=t.subInfo,a=null;if(o&&o.length){var l=(o=De.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:Ge.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,e,b.a.createElement(i.Text,{style:Ge.text,numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:Ge.playerView},b.a.createElement(i.Image,{style:Ge.image,source:{uri:r},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:Ge.tagLine},a):null)}function qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Qe=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},spliter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}}),Ye=function(e){d()(o,e);var t,n,r=qe(o);function o(e){var t;return c()(this,o),(t=r.call(this,e)).state={dataSource:[],loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(ue()(t)),t.onRefresh=t.onRefresh.bind(ue()(t)),t.getRefresh=t.getRefresh.bind(ue()(t)),t.getRenderRow=t.getRenderRow.bind(ue()(t)),t.onEndReached=t.onEndReached.bind(ue()(t)),t.getRowType=t.getRowType.bind(ue()(t)),t.getRowKey=t.getRowKey.bind(ue()(t)),t}return u()(o,[{key:"componentDidMount",value:(n=ce()(de.a.mark((function e(){var t;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"onEndReached",value:(t=ce()(de.a.mark((function e(){var t,n,r,o,a;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state,n=t.dataSource,!t.fetchingDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.setState({fetchingDataFlag:!0,dataSource:n.concat([{style:100}])}),e.next=6,this.mockFetchData();case 6:r=e.sent,(o=n[n.length-1])&&100===o.style&&n.pop(),a=n.concat(r),this.setState({dataSource:a});case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"onRefresh",value:function(){var e=this;setTimeout(ce()(de.a.mark((function t(){var n;return de.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.mockFetchData();case 2:n=t.sent,e.setState({dataSource:n}),e.refresh.refreshComplected();case 5:case"end":return t.stop()}}),t)}))),1e3)}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state,r=n.dataSource,o=n.loadingState,a=null,l=r[e],c=r.length===e+1;switch(l.style){case 1:a=b.a.createElement(Be,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=b.a.createElement(He,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=b.a.createElement(Ue,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=b.a.createElement(i.Text,{style:Qe.loading},o)}return b.a.createElement(i.View,{style:Qe.container},b.a.createElement(i.View,{style:Qe.itemContainer},a),c?null:b.a.createElement(i.View,{style:Qe.spliter}))}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"getRefresh",value:function(){return b.a.createElement(i.View,{style:{flex:1,height:30}},b.a.createElement(i.Text,{style:{flex:1,textAlign:"center"}},"下拉刷新中..."))}},{key:"mockFetchData",value:function(){var e=this;return new Promise((function(t){setTimeout((function(){return e.setState({fetchingDataFlag:!1}),e.fetchTimes+=1,e.fetchTimes>=50?t([]):t(Ie)}),600)}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},b.a.createElement(i.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,getRowKey:this.getRowKey}))}}]),o}(b.a.Component);function Xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Je=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"}}),Ze=function(e){d()(a,e);var t,n,r,o=Xe(a);function a(e){var t;return c()(this,a),(t=o.call(this,e)).state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(ue()(t)),t.renderRow=t.renderRow.bind(ue()(t)),t.getRowType=t.getRowType.bind(ue()(t)),t.getRowKey=t.getRowKey.bind(ue()(t)),t.renderPullHeader=t.renderPullHeader.bind(ue()(t)),t.onEndReached=t.onEndReached.bind(ue()(t)),t.onHeaderReleased=t.onHeaderReleased.bind(ue()(t)),t.onHeaderPulling=t.onHeaderPulling.bind(ue()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=ce()(de.a.mark((function e(){var t;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t}),this.listView.collapsePullHeader();case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onEndReached",value:(n=ce()(de.a.mark((function e(){var t,n,r,o;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state.dataSource,!this.loadMoreDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.loadMoreDataFlag=!0,this.setState({dataSource:t.concat([{style:100}])}),n=[],e.prev=6,e.next=9,this.mockFetchData();case 9:n=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:(r=t[t.length-1])&&100===r.style&&t.pop(),o=t.concat(n),this.loadMoreDataFlag=!1,this.setState({dataSource:o});case 19:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"onHeaderReleased",value:(t=ce()(de.a.mark((function e(){var t,n=this;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.fetchingDataFlag){e.next=2;break}return e.abrupt("return");case 2:return this.fetchingDataFlag=!0,console.log("onHeaderReleased"),this.setState({pullingText:"刷新数据中,请稍等,2秒后自动收起"}),t=[],e.prev=6,e.next=9,this.mockFetchData();case 9:t=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:this.fetchingDataFlag=!1,this.setState({dataSource:t},(function(){n.listView.collapsePullHeader(),n.fetchTimes=0}));case 16:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return t.apply(this,arguments)})},{key:"onHeaderPulling",value:function(e){this.fetchingDataFlag||(console.log("onHeaderPulling",e.contentOffset),e.contentOffset>Je.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}},{key:"onClickItem",value:function(e,t){console.log("item: ".concat(e," is clicked.."),t.target.nodeId,t.currentTarget.nodeId)}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"mockFetchData",value:function(){var e=this;return new Promise((function(t){setTimeout((function(){e.fetchTimes+=1;var n=[];return e.fetchTimes<50&&(n=Ie),t(n)}),600)}))}},{key:"renderPullHeader",value:function(){var e=this.state.pullingText;return b.a.createElement(i.View,{style:Je.pullContainer},b.a.createElement(i.Text,{style:Je.pullContent},e))}},{key:"renderRow",value:function(e){var t=this,n=this.state,r=n.dataSource,o=n.loadingState,a=null,l=r[e],c=r.length===e+1;switch(l.style){case 1:a=b.a.createElement(Be,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 2:a=b.a.createElement(He,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 5:a=b.a.createElement(Ue,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 100:a=b.a.createElement(i.Text,{style:Je.loading},o)}return b.a.createElement(i.View,{style:Je.container},b.a.createElement(i.View,{style:Je.itemContainer},a),c?null:b.a.createElement(i.View,{style:Je.splitter}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.ListView,{onClick:function(e){return console.log("ListView",e.target.nodeId,e.currentTarget.nodeId)},ref:function(t){e.listView=t},style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,getRowType:this.getRowType,getRowKey:this.getRowKey,renderRow:this.renderRow,renderPullHeader:this.renderPullHeader,onEndReached:this.onEndReached,onHeaderReleased:this.onHeaderReleased,onHeaderPulling:this.onHeaderPulling})}}]),a}(b.a.Component),$e=i.StyleSheet.create({itemStyle:{width:100,height:100,lineHeight:100,borderWidth:1,borderColor:"#4c9afa",fontSize:80,margin:20,color:"#4c9afa",textAlign:"center"},verticalScrollView:{height:300,width:140,margin:20,borderColor:"#eee",borderWidth:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10}});function et(){return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:$e.itemTitle},b.a.createElement(i.Text,null,"Horizontal ScrollView")),b.a.createElement(i.View,null,b.a.createElement(i.ScrollView,{horizontal:!0,bounces:!0,showsHorizontalScrollIndicator:!1,showScrollIndicator:!1},b.a.createElement(i.Text,{style:$e.itemStyle},"A"),b.a.createElement(i.Text,{style:$e.itemStyle},"B"),b.a.createElement(i.Text,{style:$e.itemStyle},"C"),b.a.createElement(i.Text,{style:$e.itemStyle},"D"),b.a.createElement(i.Text,{style:$e.itemStyle},"E"),b.a.createElement(i.Text,{style:$e.itemStyle},"F"),b.a.createElement(i.Text,{style:$e.itemStyle},"A"))),b.a.createElement(i.View,{style:$e.itemTitle},b.a.createElement(i.Text,null,"Vertical ScrollView")),b.a.createElement(i.ScrollView,{bounces:!0,horizontal:!1,style:$e.verticalScrollView,showScrollIndicator:!1,showsVerticalScrollIndicator:!1},b.a.createElement(i.Text,{style:$e.itemStyle},"A"),b.a.createElement(i.Text,{style:$e.itemStyle},"B"),b.a.createElement(i.Text,{style:$e.itemStyle},"C"),b.a.createElement(i.Text,{style:$e.itemStyle},"D"),b.a.createElement(i.Text,{style:$e.itemStyle},"E"),b.a.createElement(i.Text,{style:$e.itemStyle},"F"),b.a.createElement(i.Text,{style:$e.itemStyle},"A")))}function tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var nt=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"},button:{width:100,height:24,borderColor:"blue",borderWidth:1},buttonText:{width:100,lineHeight:24,textAlign:"center"},customFont:{color:"#0052d9",fontSize:32,fontFamily:"TTTGB"}}),rt=0,ot=function(e){d()(n,e);var t=tt(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={fontSize:16,textShadowColor:"grey",textShadowOffset:{x:1,y:1}},r.incrementFontSize=r.incrementFontSize.bind(ue()(r)),r.decrementFontSize=r.decrementFontSize.bind(ue()(r)),r.androidNestedTextWrapperStyle={height:100,lineHeight:100},r}return u()(n,[{key:"incrementFontSize",value:function(){var e=this.state.fontSize;24!==e&&this.setState({fontSize:e+1})}},{key:"decrementFontSize",value:function(){var e=this.state.fontSize;6!==e&&this.setState({fontSize:e-1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.fontSize,r=t.textShadowColor,o=t.textShadowOffset,a=function(e){return b.a.createElement(i.View,{style:nt.itemTitle},b.a.createElement(i.Text,{style:!0},e))};return b.a.createElement(i.ScrollView,{style:{padding:10}},a("shadow"),b.a.createElement(i.View,{style:[nt.itemContent],onClick:function(){var t="red",n={x:10,y:1};rt%2==1&&(t="grey",n={x:1,y:1}),rt+=1,e.setState({textShadowColor:t,textShadowOffset:n})}},b.a.createElement(i.Text,{style:[nt.normalText,{color:"#242424",textShadowOffset:o,textShadowRadius:3,textShadowColor:r}]},"Text shadow is grey with radius 3 and offset 1")),a("color"),b.a.createElement(i.View,{style:[nt.itemContent]},b.a.createElement(i.Text,{style:[nt.normalText,{color:"#242424"}]},"Text color is black"),b.a.createElement(i.Text,{style:[nt.normalText,{color:"blue"}]},"Text color is blue"),b.a.createElement(i.Text,{style:[nt.normalText,{color:"rgb(228,61,36)"}]},"This is red")),a("fontSize"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{style:[nt.normalText,{fontSize:n}]},"Text fontSize is ".concat(n)),b.a.createElement(i.View,{style:nt.button,onClick:this.incrementFontSize},b.a.createElement(i.Text,{style:nt.buttonText},"放大字体")),b.a.createElement(i.View,{style:nt.button,onClick:this.decrementFontSize},b.a.createElement(i.Text,{style:nt.buttonText},"缩小字体"))),a("fontStyle"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{style:[nt.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),b.a.createElement(i.Text,{style:[nt.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),a("numberOfLines"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:nt.normalText},"just one line just one line just one line just one line just one line just one line just one line just one line"),b.a.createElement(i.Text,{numberOfLines:2,style:nt.normalText},"just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines")),a("textDecoration"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:[nt.normalText,{textDecorationLine:"underline",textDecorationStyle:"dotted"}]},"underline"),b.a.createElement(i.Text,{numberOfLines:1,style:[nt.normalText,{textDecorationLine:"line-through",textDecorationColor:"red"}]},"line-through")),a("Nest Text"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{numberOfLines:3},b.a.createElement(i.Text,{numberOfLines:3,style:[nt.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),b.a.createElement(i.Text,{numberOfLines:3,style:nt.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),a("Custom font"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:nt.customFont},"Hippy 跨端框架")),a("Text Nested"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{style:"android"===i.Platform.OS?this.androidNestedTextWrapperStyle:{}},b.a.createElement(i.Text,{numberOfLines:1,style:nt.normalText},"后面有张图片"),b.a.createElement(i.Image,{style:{width:70,height:35},source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAtCAMAAABmgJ64AAAAOVBMVEX/Rx8AAAD/QiL/Tif/QyH/RR//QiH/QiP/RCD/QSL/Qxz/QyH/QiL/QiD/QyL/QiL/QiH/QyH/QiLwirLUAAAAEnRSTlMZAF4OTC7DrWzjI4iietrRk0EEv/0YAAAB0UlEQVRYw72Y0Y6sIAxAKwUFlFH7/x97izNXF2lN1pU5D800jD2hJAJCdwYZuAUyVbmToKh903IhQHgErAVH+ccV0KI+G2oBPMxJgPA4WAigAT8F0IRDgNAE3ARyfeMFDGSc3YHVFkTBAHKDAgkEyHjacae/GTjxFqAo8NbakXrL9DRy9B+BCQwRcXR9OBKmEuAmAFFgcy0agBnIc1xZsMPOI5loAoUsQFmQjDEL9YbpaeGYBMGRKKAuqFEFL/JXApCw/zFEZk9qgbLGBx0gXLISxT25IUBREEgh1II1fph/IViGnZnCcDDVAgfgVg6gCy6ZaClySbDQpAl04vCGaB4+xGcFRK8CLvW0IBb5bQGqAlNwU4C6oEIVTLTcmoEr0AWcpKsZ/H0NAtkLQffnFjkOqiC/TTWBL9AFCwXQBHgI7rXImMgjCZwFa50s6DRBXyALmIECuMASiWNPFgRTgSJwM+XW8PDCmbwndzdaNL8FMYXPNjASDVChnIvWlBI/MKadPV952HszbmXtRERhhQ0vGFA52SVSSVt7MjHvxfRK8cdTpqovn02dUcltMrwiKf+wQ1FxXKCk9en6e/eDNnP44h2thQEb35O/etNv/q3iHza+KuhqqhZAAAAAAElFTkSuQmCC"}}),b.a.createElement(i.Text,{numberOfLines:1,style:nt.customFont},"前面有张图片"))))}}]),n}(b.a.Component);function at(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var it=i.StyleSheet.create({container_style:{padding:10},input_style:{width:300,marginVertical:10,fontSize:16,color:"#242424",height:30,lineHeight:30},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},button:{width:200,borderColor:"#4c9afa",borderWidth:1,marginTop:5,marginBottom:5}}),lt=function(e){d()(n,e);var t=at(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={textContent:""},r.changeInputContent=r.changeInputContent.bind(ue()(r)),r.focus=r.focus.bind(ue()(r)),r.blur=r.blur.bind(ue()(r)),r}return u()(n,[{key:"changeInputContent",value:function(){this.setState({textContent:"当前时间毫秒:".concat(Date.now())})}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var e=this,t=this.state.textContent,n=function(e){return b.a.createElement(i.View,{style:it.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:it.container_style},n("text"),b.a.createElement(i.TextInput,{ref:function(t){e.input=t},style:it.input_style,caretColor:"yellow",underlineColorAndroid:"grey",placeholderTextColor:"#4c9afa",placeholder:"text",defaultValue:t}),b.a.createElement(i.View,{style:it.button,onClick:this.changeInputContent},b.a.createElement(i.Text,null,"点击改变输入框内容")),b.a.createElement(i.View,{style:it.button,onClick:this.focus},b.a.createElement(i.Text,null,"Focus")),b.a.createElement(i.View,{style:it.button,onClick:this.blur},b.a.createElement(i.Text,null,"Blur")),n("numeric"),b.a.createElement(i.TextInput,{style:it.input_style,keyboardType:"numeric",placeholder:"numeric"}),n("phone-pad"),b.a.createElement(i.TextInput,{style:it.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),n("password"),b.a.createElement(i.TextInput,{style:it.input_style,keyboardType:"password",placeholder:"Password",multiline:!1}),n("maxLength"),b.a.createElement(i.TextInput,{caretColor:"yellow",style:it.input_style,placeholder:"maxLength=5",maxLength:5}))}}]),n}(g.Component),ct=n.p+"assets/defaultSource.jpg",st=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},rectangle:{width:160,height:80,marginVertical:10},bigRectangle:{width:200,height:100,borderColor:"#eee",borderWidth:1,padding:10,marginVertical:10},smallRectangle:{width:40,height:40,borderRadius:10}});function ut(){var e=function(e){return b.a.createElement(i.View,{style:st.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:{padding:10}},e("backgroundColor"),b.a.createElement(i.View,{style:[st.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),b.a.createElement(i.View,{style:[st.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:ct}],accessible:!0,accessibilityLabel:"背景图",accessibilityRole:"image",accessibilityState:{disabled:!1,selected:!0,checked:!1,expanded:!1,busy:!0},accessibilityValue:{min:1,max:10,now:5,text:"middle"}},b.a.createElement(i.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),b.a.createElement(i.View,{style:[st.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,borderWidth:2,borderColor:"black",borderRadius:2,backgroundImage:"linear-gradient(30deg, blue 10%, yellow 40%, red 50%);"}]},b.a.createElement(i.Text,{style:{color:"white"}},"渐变色")),e("border props"),b.a.createElement(i.View,{style:[st.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),b.a.createElement(i.View,{style:[st.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},b.a.createElement(i.View,{style:[st.smallRectangle,{backgroundColor:"yellow"}]}),b.a.createElement(i.View,{style:[st.smallRectangle,{backgroundColor:"blue"}]}),b.a.createElement(i.View,{style:[st.smallRectangle,{backgroundColor:"green"}]})))}var ft=i.StyleSheet.create({pageContainer:{alignItems:"center",justifyContent:"center",flex:1,paddingTop:20},mainRec:{backgroundColor:"#4c9afaAA",width:256,height:48,marginBottom:10,marginTop:156},title:{verticalAlign:"middle",lineHeight:48,height:48,fontSize:16,color:"white",alignSelf:"center"},shapeBase:{width:128,height:128,backgroundColor:"#4c9afa"},square:{},circle:{borderRadius:64},triangle:{borderTopWidth:0,borderRightWidth:70,borderBottomWidth:128,borderLeftWidth:70,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"#4c9afa",backgroundColor:"transparent",width:140}}),dt="SquarePagerView",ht="TrianglePagerView",mt="CirclePagerView";function pt(e,t){var n=function(t){return b.a.createElement(i.View,{style:ft.pageContainer,key:t},b.a.createElement(i.View,{style:[ft.shapeBase,e],key:"shape"}),b.a.createElement(i.View,{style:ft.mainRec,key:"title"},t?b.a.createElement(i.Text,{style:ft.title},t):null))};return n.displayName=t,n}var yt=pt(ft.square,dt),gt=pt(ft.triangle,ht),bt=pt(ft.circle,mt);function wt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var vt=i.StyleSheet.create({dotContainer:{position:"absolute",bottom:10,left:0,right:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},dot:{width:6,height:6,borderRadius:3,margin:3,backgroundColor:"#BBBBBB"},selectDot:{backgroundColor:"#000000"},container:{height:500},buttonContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:12},button:{width:120,height:36,backgroundColor:"#4c9afa",borderRadius:18,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"#fff"}}),xt=function(e){d()(n,e);var t=wt(n);function n(e){var r;return c()(this,n),r=t.call(this,e),$()(ue()(r),"state",{selectedIndex:0}),r.onPageSelected=r.onPageSelected.bind(ue()(r)),r}return u()(n,[{key:"onPageSelected",value:function(e){console.log("onPageSelected",e.position),this.setState({selectedIndex:e.position})}},{key:"onPageScrollStateChanged",value:function(e){console.log("onPageScrollStateChanged",e)}},{key:"onPageScroll",value:function(e){var t=e.offset,n=e.position;console.log("onPageScroll",t,n)}},{key:"render",value:function(){var e=this,t=this.state.selectedIndex;return b.a.createElement(i.View,{style:{flex:1,backgroundColor:"#ffffff"}},b.a.createElement(i.View,{style:vt.buttonContainer},b.a.createElement(i.View,{style:vt.button,onClick:function(){e.viewpager.setPage(2)}},b.a.createElement(i.Text,{style:vt.buttonText},"动效滑到第3页")),b.a.createElement(i.View,{style:vt.button,onClick:function(){return e.viewpager.setPageWithoutAnimation(0)}},b.a.createElement(i.Text,{style:vt.buttonText},"直接滑到第1页"))),b.a.createElement(i.ViewPager,{ref:function(t){e.viewpager=t},style:vt.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[yt("squarePager"),gt("TrianglePager"),bt("CirclePager")]),b.a.createElement(i.View,{style:vt.dotContainer},new Array(3).fill(0).map((function(e,n){var r=n===t;return b.a.createElement(i.View,{style:[vt.dot,r?vt.selectDot:null],key:"dot_".concat(n)})}))))}}]),n}(b.a.Component),St=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},webViewStyle:{padding:10,flex:1,flexGrow:1,borderRadius:10}});function Tt(){return b.a.createElement(i.View,{style:{padding:10,flex:1}},b.a.createElement(i.View,{style:St.itemTitle},b.a.createElement(i.Text,null,"WebView 示例")),b.a.createElement(i.WebView,{source:{uri:"https://hippyjs.org"},method:"get",userAgent:"Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36",style:St.webViewStyle,onLoad:function(e){var t=e.url;return console.log("webview onload",t)},onLoadStart:function(e){var t=e.url;return console.log("webview onLoadStart",t)},onLoadEnd:function(e){var t=e.url;return console.log("webview onLoadEnd",t)}}))}var Ct=i.StyleSheet.create({shadowDemo:{flex:1,overflowY:"scroll"},shadowDemoCubeAndroid:{position:"absolute",left:50,top:50,width:170,height:170,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentAndroid:{position:"absolute",left:5,top:5,width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:50,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowSpread:1,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}}),Et=i.StyleSheet.create({shadowDemoCubeAndroid:{position:"absolute",left:50,top:300,width:175,height:175,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:15,boxShadowOffsetY:15,boxShadowColor:"#4c9afa"},shadowDemoContentAndroid:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:300,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:10,boxShadowOffsetY:10,boxShadowSpread:1,boxShadowColor:"#4c9afa"},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}});function kt(){return b.a.createElement(i.View,{style:Ct.shadowDemo},"android"===i.Platform.OS?b.a.createElement(i.View,{style:Ct.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:Ct.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:Ct.text},"没有偏移阴影样式"))):b.a.createElement(i.View,{style:Ct.shadowDemoCubeIos},b.a.createElement(i.View,{style:Ct.shadowDemoContentIos},b.a.createElement(i.Text,{style:Ct.text},"没有偏移阴影样式"))),"android"===i.Platform.OS?b.a.createElement(i.View,{style:Et.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:Et.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:Et.text},"偏移阴影样式"))):b.a.createElement(i.View,{style:Et.shadowDemoCubeIos},b.a.createElement(i.View,{style:Et.shadowDemoContentIos},b.a.createElement(i.Text,{style:Et.text},"偏移阴影样式"))))}function Rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var At=Ie.filter((function(e){return 2!==e.style})),Vt=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"},pullFooter:{flex:1,height:40,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}}),It=function(e){d()(a,e);var t,n,r,o=Rt(a);function a(e){var t;return c()(this,a),(t=o.call(this,e)).state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},t.numberOfColumns=2,t.columnSpacing=6,t.interItemSpacing=6,t.mockFetchData=t.mockFetchData.bind(ue()(t)),t.renderItem=t.renderItem.bind(ue()(t)),t.getItemType=t.getItemType.bind(ue()(t)),t.getItemKey=t.getItemKey.bind(ue()(t)),t.onEndReached=t.onEndReached.bind(ue()(t)),t.onRefresh=t.onRefresh.bind(ue()(t)),t.getRefresh=t.getRefresh.bind(ue()(t)),t.renderPullFooter=t.renderPullFooter.bind(ue()(t)),t.renderBanner=t.renderBanner.bind(ue()(t)),t.getItemStyle=t.getItemStyle.bind(ue()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=ce()(de.a.mark((function e(){var t;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onEndReached",value:(n=ce()(de.a.mark((function e(){var t,n,r;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state.dataSource,!this.loadMoreDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.loadMoreDataFlag=!0,this.setState({loadingState:"加载更多..."}),n=[],e.prev=6,e.next=9,this.mockFetchData();case 9:n=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:0===n.length&&this.setState({loadingState:"没有更多数据"}),r=[].concat(v()(t),v()(n)),this.setState({dataSource:r}),this.loadMoreDataFlag=!1;case 18:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"renderPullFooter",value:function(){return 0===this.state.dataSource.length?null:b.a.createElement(i.View,{style:Vt.pullFooter},b.a.createElement(i.Text,{style:{color:"white"}},this.state.loadingState))}},{key:"onRefresh",value:(t=ce()(de.a.mark((function e(){var t=this;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(ce()(de.a.mark((function e(){var n;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.mockFetchData();case 2:n=e.sent,t.setState({dataSource:n}),t.refresh.refreshComplected();case 5:case"end":return e.stop()}}),e)}))),1e3);case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"getRefresh",value:function(){return b.a.createElement(i.View,{style:{flex:1,height:40,justifyContent:"center",alignItems:"center",backgroundColor:"#4c9afa"}},b.a.createElement(i.Text,{style:{height:40,lineHeight:40,textAlign:"center",color:"white"}},"下拉刷新中..."))}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{key:"getItemType",value:function(e){return this.state.dataSource[e].style}},{key:"getItemKey",value:function(e){return"row-".concat(e)}},{key:"onItemClick",value:function(e){console.log("onItemClick",e),this.listView.scrollToIndex({index:e,animation:!0})}},{key:"renderBanner",value:function(){return"android"===i.Platform.OS||0===this.state.dataSource.length?null:b.a.createElement(i.View,{style:{backgroundColor:"grey",height:100,justifyContent:"center",alignItems:"center"}},b.a.createElement(i.Text,{style:{fontSize:20,color:"white",lineHeight:100,height:100}},"Banner View"))}},{key:"renderItem",value:function(e){var t=this,n=null,r=this.state.dataSource[e];switch(r.style){case 1:n=b.a.createElement(Be,{itemBean:r.itemBean});break;case 2:n=b.a.createElement(He,{itemBean:r.itemBean});break;case 5:n=b.a.createElement(Ue,{itemBean:r.itemBean})}return b.a.createElement(i.View,{onClick:function(){return t.onItemClick(e)},style:Vt.container},b.a.createElement(i.View,{style:Vt.itemContainer},n),b.a.createElement(i.View,{style:Vt.splitter}))}},{key:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){var t=[].concat(v()(At),v()(At));return e(t)}),600)}))}},{key:"getWaterfallContentInset",value:function(){return{top:0,left:5,bottom:0,right:5}}},{key:"getItemStyle",value:function(){var e=this.numberOfColumns,t=this.columnSpacing,n=i.Dimensions.get("screen").width,r=this.getWaterfallContentInset();return{width:(n-r.left-r.right-(e-1)*t)/e}}},{key:"render",value:function(){var e=this,t=this.state.dataSource,n=this.numberOfColumns,r=this.columnSpacing,o=this.interItemSpacing,a=this.getWaterfallContentInset();return b.a.createElement(i.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},b.a.createElement(i.WaterfallView,{ref:function(t){e.listView=t},renderBanner:this.renderBanner,numberOfColumns:n,columnSpacing:r,interItemSpacing:o,numberOfItems:t.length,style:{flex:1},renderItem:this.renderItem,onEndReached:this.onEndReached,getItemType:this.getItemType,getItemKey:this.getItemKey,contentInset:a,getItemStyle:this.getItemStyle,containPullFooter:!0,renderPullFooter:this.renderPullFooter}))}}]),a}(b.a.Component),jt=n.p+"assets/defaultSource.jpg",Ot=n("./node_modules/@babel/runtime/helpers/slicedToArray.js"),Dt=n.n(Ot);function Pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _t(e){for(var t=1;t=o||(this.indicator.update(r),this.currentIndex=r)}}},{key:"onScrollBeginDrag",value:function(){this.touchStartOffset=this.scrollOffset,this.doClearTimer()}},{key:"onScrollEndDrag",value:function(){this.doCreateTimer()}},{key:"onLayout",value:function(e){this.width=e.layout.width}},{key:"doSwitchPage",value:function(e){this.scrollView.scrollTo({x:this.imgWidth*e,y:0,animated:!0})}},{key:"doCreateTimer",value:function(){var e=this;this.doClearTimer(),this.duration<=0||(this.interval=setInterval((function(){e.doSwitchPage((e.currentIndex+1)%e.itemCount)}),this.duration))}},{key:"doClearTimer",value:function(){this.interval&&clearInterval(this.interval),this.interval=null}},{key:"render",value:function(){for(var e=this,t=this.props.images,n=[],r=0;rr-a?60*r-o:60*n-60*a+30,this.navScrollView.scrollTo({x:e,y:0,animated:!0})}}},{key:"pressNavItem",value:function(e){this.setState({curIndex:e}),this.viewPager&&this.viewPager.setPage(e)}},{key:"renderNav",value:function(){var e=this,t=this.state,n=t.navList,r=t.curIndex;return b.a.createElement(i.View,{style:En.container},b.a.createElement(i.ScrollView,{style:En.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:function(t){e.navScrollView=t}},n.map((function(t,n){return b.a.createElement(i.View,{style:En.navItem,key:"nav_".concat(t),activeOpacity:.5,onClick:function(){return e.pressNavItem(n)}},b.a.createElement(i.Text,{style:[En.navItemText,r===n?En.navItemTextBlue:En.navItemTextNormal],numberOfLines:1},t))}))))}},{key:"render",value:function(){var e=this,t=this.state.navList;return b.a.createElement(i.View,{style:{flex:1,backgroundColor:"#ffffff"}},this.renderNav(),b.a.createElement(i.ViewPager,{ref:function(t){e.viewPager=t},style:{flex:1},initialPage:0,onPageSelected:this.onViewPagerChange},t.map((function(e,t){return n.getPage(e,t)}))))}}],[{key:"getPage",value:function(e,t){switch(t%3){case 0:return yt(e);case 1:return bt(e);case 2:return gt(e);default:return null}}}]),n}(b.a.Component);function Rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var An=i.Dimensions.get("window").width,Vn=i.StyleSheet.create({setNativePropsDemo:{display:"flex",alignItems:"center",position:"relative"},nativeDemo1Drag:{height:80,width:An,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo1Point:{height:80,width:80,color:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:An,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},splitter:{marginTop:50}}),In=function(e){d()(n,e);var t=Rn(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).demon1Point=b.a.createRef(),r.demo1PointDom=null,r.state={demo2Left:0},r.isDemon1Layouted=!1,r.idDemon2Layouted=!1,r.onTouchDown1=r.onTouchDown1.bind(ue()(r)),r.onDemon1Layout=r.onDemon1Layout.bind(ue()(r)),r.onTouchMove1=r.onTouchMove1.bind(ue()(r)),r.onTouchDown2=r.onTouchDown2.bind(ue()(r)),r.onTouchMove2=r.onTouchMove2.bind(ue()(r)),r}return u()(n,[{key:"componentDidMount",value:function(){}},{key:"onDemon1Layout",value:function(){this.isDemon1Layouted||(this.isDemon1Layouted=!0,this.demo1PointDom=i.UIManagerModule.getElementFromFiberRef(this.demon1Point.current))}},{key:"onTouchDown1",value:function(e){var t=e.page_x,n=t-40;console.log("touchdown x",t,n,An),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}},{key:"onTouchMove1",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,An),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}},{key:"onTouchDown2",value:function(e){var t=e.page_x,n=t-40;console.log("touchdown x",t,n,An),this.setState({demo2Left:n})}},{key:"onTouchMove2",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,An),this.setState({demo2Left:n})}},{key:"render",value:function(){var e=this.state.demo2Left;return b.a.createElement(i.View,{style:Vn.setNativePropsDemo},b.a.createElement(i.Text,null,"setNativeProps实现拖动效果"),b.a.createElement(i.View,{style:Vn.nativeDemo1Drag,onTouchDown:this.onTouchDown1,onTouchMove:this.onTouchMove1},b.a.createElement(i.View,{onLayout:this.onDemon1Layout,style:Vn.nativeDemo1Point,ref:this.demon1Point})),b.a.createElement(i.View,{style:Vn.splitter}),b.a.createElement(i.Text,null,"普通渲染实现拖动效果"),b.a.createElement(i.View,{style:Vn.nativeDemo2Drag,onTouchDown:this.onTouchDown2,onTouchMove:this.onTouchMove2},b.a.createElement(i.View,{style:[Vn.nativeDemo2Point,{left:e}]})))}}]),n}(b.a.Component);function jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var On=i.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),Dn=function(e){d()(r,e);var t=jn(r);function r(e){var n;return c()(this,r),(n=t.call(this,e)).state={AsyncComponentFromLocal:null,AsyncComponentFromHttp:null},n.onAsyncComponentLoad=n.onAsyncComponentLoad.bind(ue()(n)),n}return u()(r,[{key:"onAsyncComponentLoad",value:function(){var e=this;console.log("load async component"),n.e(1).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentLocal.jsx")).then((function(t){e.setState({AsyncComponentFromLocal:t.default||t})})).catch((function(e){return console.error("import async local component error",e)})),n.e(0).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentHttp.jsx")).then((function(t){e.setState({AsyncComponentFromHttp:t.default||t})})).catch((function(e){return console.error("import async remote component error",e)}))}},{key:"render",value:function(){var e=this.state,t=e.AsyncComponentFromLocal,n=e.AsyncComponentFromHttp;return b.a.createElement(i.View,{style:On.dynamicImportDemo},b.a.createElement(i.View,{style:{width:130,height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},b.a.createElement(i.Text,{style:{height:40,lineHeight:40,textAlign:"center"}},"点我异步加载")),b.a.createElement(i.View,{style:{marginTop:20}},t?b.a.createElement(t,null):null,n?b.a.createElement(n,null):null))}}]),r}(b.a.Component);function Pn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var _n=i.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),Ln=function(e){d()(n,e);var t=Pn(n);function n(){return c()(this,n),t.apply(this,arguments)}return u()(n,[{key:"render",value:function(){var e=i.Platform.Localization||{},t=e.country,n=e.language,r=e.direction;return b.a.createElement(i.View,{style:_n.LocalizationDemo},b.a.createElement(i.View,{style:{height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},b.a.createElement(i.Text,{style:{color:"white",marginHorizontal:30,height:40,lineHeight:40,textAlign:"center"}},"国际化相关信息:国家 ".concat(t," | 语言 ").concat(n," | 方向 ").concat(1===r?"RTL":"LTR"))))}}]),n}(b.a.Component),Bn=function(){var e=ce()(de.a.mark((function e(t){return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",turboPromise(getTurboModule("demoTurbo").nativeWithPromise)(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Mn=function(){return getTurboModule("demoTurbo").getTurboConfig()};function zn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Fn=i.StyleSheet.create({container:{flex:1},cellContentView:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#ccc",marginBottom:1},funcInfo:{justifyContent:"center",paddingLeft:15,paddingRight:15},actionButton:{backgroundColor:"#4c9afa",color:"#fff",height:44,lineHeight:44,textAlign:"center",width:80,borderRadius:6},resultView:{backgroundColor:"darkseagreen",minHeight:150,padding:15}}),Wn=function(e){d()(r,e);var t,n=zn(r);function r(e){var t;return c()(this,r),(t=n.call(this,e)).state={config:null,result:"",funList:["getString","getNum","getBoolean","getMap","getObject","getArray","nativeWithPromise","getTurboConfig","printTurboConfig","getInfo","setInfo"]},t.onTurboFunc=t.onTurboFunc.bind(ue()(t)),t.getRenderRow=t.getRenderRow.bind(ue()(t)),t.getRowKey=t.getRowKey.bind(ue()(t)),t}return u()(r,[{key:"onTurboFunc",value:(t=ce()(de.a.mark((function e(t){var n;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("nativeWithPromise"!==t){e.next=6;break}return e.next=3,Bn("aaa");case 3:n=e.sent,e.next=7;break;case 6:"getTurboConfig"===t?(this.config=Mn(),n="获取到config对象"):"printTurboConfig"===t?(r=this.config||Mn(),n=getTurboModule("demoTurbo").printTurboConfig(r)):"getInfo"===t?n=(this.config||Mn()).getInfo():"setInfo"===t?((this.config||Mn()).setInfo("Hello World"),n="设置config信息成功"):n={getString:function(){return e="123",getTurboModule("demoTurbo").getString(e);var e},getNum:function(){return e=1024,getTurboModule("demoTurbo").getNum(e);var e},getBoolean:function(){return e=!0,getTurboModule("demoTurbo").getBoolean(e);var e},getMap:function(){return e=new Map([["a","1"],["b",2]]),getTurboModule("demoTurbo").getMap(e);var e},getObject:function(){return e={c:"3",d:"4"},getTurboModule("demoTurbo").getObject(e);var e},getArray:function(){return e=["a","b","c"],getTurboModule("demoTurbo").getArray(e);var e}}[t]();case 7:this.setState({result:n});case 8:case"end":return e.stop()}var r}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"renderResultView",value:function(){return b.a.createElement(i.View,{style:Fn.resultView},b.a.createElement(i.Text,{style:{backgroundColor:"darkseagreen"}},"".concat(this.state.result)))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state.funList;return b.a.createElement(i.View,{style:Fn.cellContentView},b.a.createElement(i.View,{style:Fn.funcInfo},b.a.createElement(i.Text,{numberofLines:0},"函数名:",n[e])),b.a.createElement(i.Text,{style:Fn.actionButton,onClick:function(){return t.onTurboFunc(n[e])}},"执行"))}},{key:"getRowKey",value:function(e){return this.state.funList[e]}},{key:"render",value:function(){var e=this.state.funList;return b.a.createElement(i.View,{style:Fn.container},this.renderResultView(),b.a.createElement(i.ListView,{numberOfRows:e.length,renderRow:this.getRenderRow,getRowKey:this.getRowKey,style:{flex:1}}))}}]),r}(b.a.Component);function Hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nn(e){for(var t=1;t Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)"),e.push("注意:每次插拔 USB 线后都需要通过 npm run hippy:debug 重启调试服务"));return b.a.createElement(i.ScrollView,{style:rr.container},e.map((function(e,t){return b.a.createElement(i.Text,{style:rr.stepText,key:"steps-".concat(t)},e)})),b.a.createElement(i.View,{style:rr.buttonContainer},b.a.createElement(i.View,{style:rr.button,onClick:this.clickToDebug},b.a.createElement(i.Text,{style:rr.buttonText,numberOfLines:1},"点击调试"))))}}]),n}(g.Component);function ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var ir=i.StyleSheet.create({container:{flex:1}}),lr=function(e){d()(n,e);var t=ar(n);function n(e){var r;c()(this,n),r=t.call(this,e);var o=i.Dimensions.get("screen"),a=o.width,l=o.height;return r.state={isVertical:a=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),c=r.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}("object"===t(e)?e.exports:{});try{regeneratorRuntime=r}catch(e){"object"===("undefined"==typeof globalThis?"undefined":t(globalThis))?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}}).call(this,n("./node_modules/webpack/buildin/module.js")(e))},"./node_modules/webpack/buildin/global.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/global.js")},"./node_modules/webpack/buildin/module.js":function(e,t,n){e.exports=n("dll-reference hippyReactBase")("./node_modules/webpack/buildin/module.js")},"./src/main.js":function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"Focusable",(function(){return te})),n.d(r,"Image",(function(){return ie})),n.d(r,"ListView",(function(){return ve})),n.d(r,"Modal",(function(){return Ce})),n.d(r,"RefreshWrapper",(function(){return Ye})),n.d(r,"PullHeader",(function(){return Ze})),n.d(r,"ScrollView",(function(){return et})),n.d(r,"Text",(function(){return ot})),n.d(r,"TextInput",(function(){return lt})),n.d(r,"View",(function(){return ut})),n.d(r,"ViewPager",(function(){return xt})),n.d(r,"WebView",(function(){return Tt})),n.d(r,"BoxShadow",(function(){return kt})),n.d(r,"WaterfallView",(function(){return It})),n.d(r,"RippleViewAndroid",(function(){return zt}));var o={};n.r(o),n.d(o,"Animation",(function(){return Gt})),n.d(o,"AsyncStorage",(function(){return qt})),n.d(o,"Clipboard",(function(){return Xt})),n.d(o,"NativeEvent",(function(){return $t})),n.d(o,"NetInfo",(function(){return nn})),n.d(o,"TestModule",(function(){return ln})),n.d(o,"WebSocket",(function(){return fn})),n.d(o,"UIManagerModule",(function(){return yn}));var a={};n.r(a),n.d(a,"Slider",(function(){return Tn})),n.d(a,"TabHost",(function(){return kn})),n.d(a,"SetNativeProps",(function(){return In})),n.d(a,"DynamicImport",(function(){return Pn})),n.d(a,"Localization",(function(){return Ln})),n.d(a,"Turbo",(function(){return Wn}));var i=n("../../packages/hippy-react/dist/index.js"),l=n("./node_modules/@babel/runtime/helpers/classCallCheck.js"),c=n.n(l),s=n("./node_modules/@babel/runtime/helpers/createClass.js"),u=n.n(s),f=n("./node_modules/@babel/runtime/helpers/inherits.js"),d=n.n(f),h=n("./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js"),m=n.n(h),p=n("./node_modules/@babel/runtime/helpers/getPrototypeOf.js"),y=n.n(p),g=n("./node_modules/react/index.js"),b=n.n(g),v=n("./node_modules/@babel/runtime/helpers/toConsumableArray.js"),w=n.n(v),x=n("./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js");n("./node_modules/@babel/runtime/helpers/typeof.js");function S(){return(S=Object.assign||function(e){for(var t=1;t=0;u--){var f=o[u];"."===f?E(o,u):".."===f?(E(o,u),s++):s&&(E(o,u),s--)}if(!l)for(;s--;s)o.unshift("..");!l||""===o[0]||o[0]&&T(o[0])||o.unshift("");var d=o.join("/");return n&&"/"!==d.substr(-1)&&(d+="/"),d};var k="Invariant failed";function R(e,t){if(!e)throw new Error(k)}function A(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function V(e,t,n,r){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(o=S({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(e){throw e instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):e}return n&&(o.key=n),r?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=C(o.pathname,r.pathname)):o.pathname=r.pathname:o.pathname||(o.pathname="/"),o}function I(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,r):n.push(r),u({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=V(e,t,f(),y.location);s.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(y.entries[y.index]=r,u({action:"REPLACE",location:r}))}))},go:p,goBack:function(){p(-1)},goForward:function(){p(1)},canGo:function(e){var t=y.index+e;return t>=0&&t=0||(o[n]=e[n]);return o}var B=n("./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"),M=n.n(B),z=function(e){var t=Object(P.a)();return t.displayName=e,t}("Router"),F=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(x.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return b.a.createElement(z.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(b.a.Component);var W=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o=100?t([]):t(me)}),600)}))}},{key:"render",value:function(){var e=this.state.dataSource;return b.a.createElement(i.ListView,{onTouchDown:function(e){console.log("onTouchDown ListView",e.target.nodeId,e.currentTarget.nodeId)},onClickCapture:function(e){console.log("onClickCapture listview",e.target.nodeId,e.currentTarget.nodeId)},onClick:function(e){return console.log("click listview",e.target.nodeId,e.currentTarget.nodeId),!0},bounces:!0,overScrollEnabled:!0,horizontal:void 0,style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:e.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,onDelete:this.onDelete,delText:this.delText,editable:!0,getRowKey:this.getRowKey,initialListSize:15,rowShouldSticky:this.rowShouldSticky,onAppear:this.onAppear,onDisappear:this.onDisappear,onWillAppear:this.onWillAppear,onWillDisappear:this.onWillDisappear})}}]),r}(b.a.Component);function we(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var xe="#4c9afa",Se="#4c9afa",Te="white",Ee=i.StyleSheet.create({container:{flex:1,flexDirection:"row",justifyContent:"center"},buttonView:{borderColor:xe,borderWidth:2,borderRadius:8,justifyContent:"center",alignItems:"center",width:250,height:50,marginTop:30},buttonText:{fontSize:20,color:xe,textAlign:"center",textAlignVertical:"center"}}),Ce=function(e){d()(n,e);var t=we(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={visible:!1,press:!1},r.show=r.show.bind(ue()(r)),r.hide=r.hide.bind(ue()(r)),r}return u()(n,[{key:"feedback",value:function(e){this.setState({press:"in"===e})}},{key:"show",value:function(){this.setState({visible:!0})}},{key:"hide",value:function(){this.setState({visible:!1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.press,r=t.visible;return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:Ee.container},b.a.createElement(i.View,{onPressIn:function(){return e.feedback("in")},onPressOut:function(){return e.feedback("out")},onClick:this.show,style:[Ee.buttonView,{borderColor:xe,opacity:n?.5:1}]},b.a.createElement(i.Text,{style:[Ee.buttonText,{color:xe}]},"点击弹出浮层"))),b.a.createElement(i.Modal,{transparent:!0,animationType:"slide_fade",visible:r,onRequestClose:function(){},supportedOrientations:["portrait"],immersionStatusBar:!0},b.a.createElement(i.View,{style:{flex:1,flexDirection:"row",justifyContent:"center",backgroundColor:"#4c9afa88"}},b.a.createElement(i.View,{onClick:this.hide,style:{width:200,height:200,backgroundColor:Se,marginTop:300,flexDirection:"row",justifyContent:"center"}},b.a.createElement(i.Text,{style:{color:Te,fontSize:22,marginTop:80}},"点击关闭浮层")))))}}]),n}(b.a.Component),ke="https://user-images.githubusercontent.com/12878546/148736841-59ce5d1c-8010-46dc-8632-01c380159237.jpg",Re={style:1,itemBean:{title:"非洲总统出行真大牌,美制武装直升机和中国潜艇为其保驾",picList:[ke,ke,ke],subInfo:["三图评论","11评"]}},Ae={style:2,itemBean:{title:"彼得·泰尔:认知未来是投资人的谋生之道",picUrl:"https://user-images.githubusercontent.com/12878546/148736850-4fc13304-25d4-4b6a-ada3-cbf0745666f5.jpg",subInfo:["左文右图"]}},Ve={style:5,itemBean:{title:"愤怒!美官员扬言:“不让中国拿走南海的岛屿,南海岛礁不属于中国”?",picUrl:"https://user-images.githubusercontent.com/12878546/148736859-29e3a5b2-612a-4fdd-ad21-dc5d29fa538f.jpg",subInfo:["六眼神魔 5234播放"]}},Ie=[Ve,Re,Ae,Re,Ae,Re,Ae,Ve,Re],je=n("./node_modules/@babel/runtime/helpers/extends.js"),Oe=n.n(je),Pe={getScreenWidth:function(){var e=i.Dimensions.get("screen").width,t=i.Dimensions.get("screen").height,n=e>t?t:e;return Math.floor(n)},uniqueArray:function(e){for(var t=[],n=0;n=812&&i.PixelRatio.get()>=2&&(e=!0),e}},De=(Pe.getScreenWidth()-24-12)/3,_e=Math.floor(De/1.35),Le=i.StyleSheet.create({imageContainer:{flexDirection:"row",justifyContent:"center",height:_e,marginTop:8},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},image:{width:De,height:_e},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"}});function Be(e){var t=e.itemBean,n=t.title,r=t.picList,o=e.itemBean.subInfo,a=null;if(o&&o.length){var l=(o=Pe.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:Le.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,Oe()({},e,{style:{collapsable:!1}}),b.a.createElement(i.Text,{style:[Le.title],numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:Le.imageContainer},b.a.createElement(i.Image,{style:Le.image,source:{uri:r[0]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:[Le.image,{marginLeft:6,marginRight:6}],source:{uri:r[1]},resizeMode:i.Image.resizeMode.cover}),b.a.createElement(i.Image,{style:Le.image,source:{uri:r[2]},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:Le.tagLine},a):null)}var Me=Pe.getScreenWidth()-24,ze=Math.floor(Me-12)/3,Fe=Math.floor(ze/1.35),We=i.StyleSheet.create({container:{flexDirection:"row",justifyContent:"space-between",height:Fe},leftContainer:{flex:1,flexDirection:"column",justifyContent:"center",marginRight:8},imageContainer:{width:ze,height:Fe},image:{width:ze,height:Fe},title:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24},tagLine:{marginTop:8,height:20,flexDirection:"row",justifyContent:"flex-start"},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}});function He(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=null,r=t.title,o=t.picUrl,a=t.subInfo;if(a&&a.length){var l=(a=Pe.uniqueArray(a)).join(" ");n=b.a.createElement(i.Text,{style:We.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,Oe()({},e,{style:We.container}),b.a.createElement(i.View,{style:We.leftContainer},b.a.createElement(i.Text,{style:We.title,numberOfLines:2,enableScale:!0},r),n?b.a.createElement(i.View,{style:We.tagLine},n):null),b.a.createElement(i.View,{style:We.imageContainer},b.a.createElement(i.Image,{resizeMode:i.Image.resizeMode.cover,style:We.image,source:{uri:o}})))}var Ne=Pe.getScreenWidth()-24,Ge=Math.floor(188*Ne/336),Ke=i.StyleSheet.create({text:{fontSize:"android"===i.Platform.OS?17:18,lineHeight:24,color:"#242424"},playerView:{marginTop:8,alignItems:"center",width:Ne,height:Ge,alignSelf:"center"},image:{width:Ne,height:Ge},normalText:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},tagLine:{marginTop:8,flexDirection:"row",justifyContent:"space-between",alignItems:"center"}});function Ue(e){if("undefined"===e)return null;var t=e.itemBean;if(!t)return null;var n=t.title,r=t.picUrl,o=t.subInfo,a=null;if(o&&o.length){var l=(o=Pe.uniqueArray(o)).join(" ");a=b.a.createElement(i.Text,{style:Ke.normalText,numberOfLines:1},l)}return b.a.createElement(i.View,e,b.a.createElement(i.Text,{style:Ke.text,numberOfLines:2,enableScale:!0},n),b.a.createElement(i.View,{style:Ke.playerView},b.a.createElement(i.Image,{style:Ke.image,source:{uri:r},resizeMode:i.Image.resizeMode.cover})),a?b.a.createElement(i.View,{style:Ke.tagLine},a):null)}function qe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Qe=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},spliter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"}}),Ye=function(e){d()(o,e);var t,n,r=qe(o);function o(e){var t;return c()(this,o),(t=r.call(this,e)).state={dataSource:[],loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(ue()(t)),t.onRefresh=t.onRefresh.bind(ue()(t)),t.getRefresh=t.getRefresh.bind(ue()(t)),t.getRenderRow=t.getRenderRow.bind(ue()(t)),t.onEndReached=t.onEndReached.bind(ue()(t)),t.getRowType=t.getRowType.bind(ue()(t)),t.getRowKey=t.getRowKey.bind(ue()(t)),t}return u()(o,[{key:"componentDidMount",value:(n=ce()(de.a.mark((function e(){var t;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"onEndReached",value:(t=ce()(de.a.mark((function e(){var t,n,r,o,a;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state,n=t.dataSource,!t.fetchingDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.setState({fetchingDataFlag:!0,dataSource:n.concat([{style:100}])}),e.next=6,this.mockFetchData();case 6:r=e.sent,(o=n[n.length-1])&&100===o.style&&n.pop(),a=n.concat(r),this.setState({dataSource:a});case 11:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"onRefresh",value:function(){var e=this;setTimeout(ce()(de.a.mark((function t(){var n;return de.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.mockFetchData();case 2:n=t.sent,e.setState({dataSource:n}),e.refresh.refreshComplected();case 5:case"end":return t.stop()}}),t)}))),1e3)}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state,r=n.dataSource,o=n.loadingState,a=null,l=r[e],c=r.length===e+1;switch(l.style){case 1:a=b.a.createElement(Be,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 2:a=b.a.createElement(He,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 5:a=b.a.createElement(Ue,{itemBean:l.itemBean,onClick:function(){return t.onClickItem(e)}});break;case 100:a=b.a.createElement(i.Text,{style:Qe.loading},o)}return b.a.createElement(i.View,{style:Qe.container},b.a.createElement(i.View,{style:Qe.itemContainer},a),c?null:b.a.createElement(i.View,{style:Qe.spliter}))}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"getRefresh",value:function(){return b.a.createElement(i.View,{style:{flex:1,height:30}},b.a.createElement(i.Text,{style:{flex:1,textAlign:"center"}},"下拉刷新中..."))}},{key:"mockFetchData",value:function(){var e=this;return new Promise((function(t){setTimeout((function(){return e.setState({fetchingDataFlag:!1}),e.fetchTimes+=1,e.fetchTimes>=50?t([]):t(Ie)}),600)}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},b.a.createElement(i.ListView,{style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,renderRow:this.getRenderRow,onEndReached:this.onEndReached,getRowType:this.getRowType,getRowKey:this.getRowKey}))}}]),o}(b.a.Component);function Xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Je=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"}}),Ze=function(e){d()(a,e);var t,n,r,o=Xe(a);function a(e){var t;return c()(this,a),(t=o.call(this,e)).state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},t.fetchTimes=0,t.mockFetchData=t.mockFetchData.bind(ue()(t)),t.renderRow=t.renderRow.bind(ue()(t)),t.getRowType=t.getRowType.bind(ue()(t)),t.getRowKey=t.getRowKey.bind(ue()(t)),t.renderPullHeader=t.renderPullHeader.bind(ue()(t)),t.onEndReached=t.onEndReached.bind(ue()(t)),t.onHeaderReleased=t.onHeaderReleased.bind(ue()(t)),t.onHeaderPulling=t.onHeaderPulling.bind(ue()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=ce()(de.a.mark((function e(){var t;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t}),this.listView.collapsePullHeader();case 5:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onEndReached",value:(n=ce()(de.a.mark((function e(){var t,n,r,o;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state.dataSource,!this.loadMoreDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.loadMoreDataFlag=!0,this.setState({dataSource:t.concat([{style:100}])}),n=[],e.prev=6,e.next=9,this.mockFetchData();case 9:n=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:(r=t[t.length-1])&&100===r.style&&t.pop(),o=t.concat(n),this.loadMoreDataFlag=!1,this.setState({dataSource:o});case 19:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"onHeaderReleased",value:(t=ce()(de.a.mark((function e(){var t,n=this;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.fetchingDataFlag){e.next=2;break}return e.abrupt("return");case 2:return this.fetchingDataFlag=!0,console.log("onHeaderReleased"),this.setState({pullingText:"刷新数据中,请稍等,2秒后自动收起"}),t=[],e.prev=6,e.next=9,this.mockFetchData();case 9:t=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:this.fetchingDataFlag=!1,this.setState({dataSource:t},(function(){n.listView.collapsePullHeader(),n.fetchTimes=0}));case 16:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return t.apply(this,arguments)})},{key:"onHeaderPulling",value:function(e){this.fetchingDataFlag||(console.log("onHeaderPulling",e.contentOffset),e.contentOffset>Je.pullContent.height?this.setState({pullingText:"松手,即可触发刷新"}):this.setState({pullingText:"继续下拉,触发刷新"}))}},{key:"onClickItem",value:function(e,t){console.log("item: ".concat(e," is clicked.."),t.target.nodeId,t.currentTarget.nodeId)}},{key:"getRowType",value:function(e){return this.state.dataSource[e].style}},{key:"getRowKey",value:function(e){return"row-".concat(e)}},{key:"mockFetchData",value:function(){var e=this;return new Promise((function(t){setTimeout((function(){e.fetchTimes+=1;var n=[];return e.fetchTimes<50&&(n=Ie),t(n)}),600)}))}},{key:"renderPullHeader",value:function(){var e=this.state.pullingText;return b.a.createElement(i.View,{style:Je.pullContainer},b.a.createElement(i.Text,{style:Je.pullContent},e))}},{key:"renderRow",value:function(e){var t=this,n=this.state,r=n.dataSource,o=n.loadingState,a=null,l=r[e],c=r.length===e+1;switch(l.style){case 1:a=b.a.createElement(Be,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 2:a=b.a.createElement(He,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 5:a=b.a.createElement(Ue,{itemBean:l.itemBean,onClick:function(n){return t.onClickItem(e,n)}});break;case 100:a=b.a.createElement(i.Text,{style:Je.loading},o)}return b.a.createElement(i.View,{style:Je.container},b.a.createElement(i.View,{style:Je.itemContainer},a),c?null:b.a.createElement(i.View,{style:Je.splitter}))}},{key:"render",value:function(){var e=this,t=this.state.dataSource;return b.a.createElement(i.ListView,{onClick:function(e){return console.log("ListView",e.target.nodeId,e.currentTarget.nodeId)},ref:function(t){e.listView=t},style:{flex:1,backgroundColor:"#ffffff"},numberOfRows:t.length,getRowType:this.getRowType,getRowKey:this.getRowKey,renderRow:this.renderRow,renderPullHeader:this.renderPullHeader,onEndReached:this.onEndReached,onHeaderReleased:this.onHeaderReleased,onHeaderPulling:this.onHeaderPulling})}}]),a}(b.a.Component),$e=i.StyleSheet.create({itemStyle:{width:100,height:100,lineHeight:100,borderWidth:1,borderColor:"#4c9afa",fontSize:80,margin:20,color:"#4c9afa",textAlign:"center"},verticalScrollView:{height:300,width:140,margin:20,borderColor:"#eee",borderWidth:1},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10}});function et(){return b.a.createElement(i.ScrollView,null,b.a.createElement(i.View,{style:$e.itemTitle},b.a.createElement(i.Text,null,"Horizontal ScrollView")),b.a.createElement(i.View,null,b.a.createElement(i.ScrollView,{horizontal:!0,bounces:!0,showsHorizontalScrollIndicator:!1,showScrollIndicator:!1},b.a.createElement(i.Text,{style:$e.itemStyle},"A"),b.a.createElement(i.Text,{style:$e.itemStyle},"B"),b.a.createElement(i.Text,{style:$e.itemStyle},"C"),b.a.createElement(i.Text,{style:$e.itemStyle},"D"),b.a.createElement(i.Text,{style:$e.itemStyle},"E"),b.a.createElement(i.Text,{style:$e.itemStyle},"F"),b.a.createElement(i.Text,{style:$e.itemStyle},"A"))),b.a.createElement(i.View,{style:$e.itemTitle},b.a.createElement(i.Text,null,"Vertical ScrollView")),b.a.createElement(i.ScrollView,{bounces:!0,horizontal:!1,style:$e.verticalScrollView,showScrollIndicator:!1,showsVerticalScrollIndicator:!1},b.a.createElement(i.Text,{style:$e.itemStyle},"A"),b.a.createElement(i.Text,{style:$e.itemStyle},"B"),b.a.createElement(i.Text,{style:$e.itemStyle},"C"),b.a.createElement(i.Text,{style:$e.itemStyle},"D"),b.a.createElement(i.Text,{style:$e.itemStyle},"E"),b.a.createElement(i.Text,{style:$e.itemStyle},"F"),b.a.createElement(i.Text,{style:$e.itemStyle},"A")))}function tt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var nt=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},itemContent:{alignItems:"flex-start",justifyContent:"center",height:100,borderWidth:1,borderRadius:2,borderColor:"#e0e0e0",backgroundColor:"#ffffff",padding:10},normalText:{fontSize:14,lineHeight:18,color:"black"},button:{width:100,height:24,borderColor:"blue",borderWidth:1},buttonText:{width:100,lineHeight:24,textAlign:"center"},customFont:{color:"#0052d9",fontSize:32,fontFamily:"TTTGB"}}),rt=0,ot=function(e){d()(n,e);var t=tt(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={fontSize:16,textShadowColor:"grey",textShadowOffset:{x:1,y:1}},r.incrementFontSize=r.incrementFontSize.bind(ue()(r)),r.decrementFontSize=r.decrementFontSize.bind(ue()(r)),r.androidNestedTextWrapperStyle={height:100,lineHeight:100},r}return u()(n,[{key:"incrementFontSize",value:function(){var e=this.state.fontSize;24!==e&&this.setState({fontSize:e+1})}},{key:"decrementFontSize",value:function(){var e=this.state.fontSize;6!==e&&this.setState({fontSize:e-1})}},{key:"render",value:function(){var e=this,t=this.state,n=t.fontSize,r=t.textShadowColor,o=t.textShadowOffset,a=function(e){return b.a.createElement(i.View,{style:nt.itemTitle},b.a.createElement(i.Text,{style:!0},e))};return b.a.createElement(i.ScrollView,{style:{padding:10}},a("shadow"),b.a.createElement(i.View,{style:[nt.itemContent],onClick:function(){var t="red",n={x:10,y:1};rt%2==1&&(t="grey",n={x:1,y:1}),rt+=1,e.setState({textShadowColor:t,textShadowOffset:n})}},b.a.createElement(i.Text,{style:[nt.normalText,{color:"#242424",textShadowOffset:o,textShadowRadius:3,textShadowColor:r}]},"Text shadow is grey with radius 3 and offset 1")),a("color"),b.a.createElement(i.View,{style:[nt.itemContent]},b.a.createElement(i.Text,{style:[nt.normalText,{color:"#242424"}]},"Text color is black"),b.a.createElement(i.Text,{style:[nt.normalText,{color:"blue"}]},"Text color is blue"),b.a.createElement(i.Text,{style:[nt.normalText,{color:"rgb(228,61,36)"}]},"This is red")),a("fontSize"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{style:[nt.normalText,{fontSize:n}]},"Text fontSize is ".concat(n)),b.a.createElement(i.View,{style:nt.button,onClick:this.incrementFontSize},b.a.createElement(i.Text,{style:nt.buttonText},"放大字体")),b.a.createElement(i.View,{style:nt.button,onClick:this.decrementFontSize},b.a.createElement(i.Text,{style:nt.buttonText},"缩小字体"))),a("fontStyle"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{style:[nt.normalText,{fontStyle:"normal"}]},"Text fontStyle is normal"),b.a.createElement(i.Text,{style:[nt.normalText,{fontStyle:"italic"}]},"Text fontStyle is italic")),a("numberOfLines"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:nt.normalText},"just one line just one line just one line just one line just one line just one line just one line just one line"),b.a.createElement(i.Text,{numberOfLines:2,style:nt.normalText},"just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines just two lines")),a("textDecoration"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:[nt.normalText,{textDecorationLine:"underline",textDecorationStyle:"dotted"}]},"underline"),b.a.createElement(i.Text,{numberOfLines:1,style:[nt.normalText,{textDecorationLine:"line-through",textDecorationColor:"red"}]},"line-through")),a("Nest Text"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{numberOfLines:3},b.a.createElement(i.Text,{numberOfLines:3,style:[nt.normalText,{color:"#4c9afa"}]},"#SpiderMan#"),b.a.createElement(i.Text,{numberOfLines:3,style:nt.normalText},"Hello world, I am a spider man and I have five friends in other universe."))),a("Custom font"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{numberOfLines:1,style:nt.customFont},"Hippy 跨端框架")),a("Text Nested"),b.a.createElement(i.View,{style:nt.itemContent},b.a.createElement(i.Text,{style:"android"===i.Platform.OS?this.androidNestedTextWrapperStyle:{}},b.a.createElement(i.Text,{numberOfLines:1,style:nt.normalText},"后面有张图片"),b.a.createElement(i.Image,{style:{width:70,height:35},source:{uri:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAAAtCAMAAABmgJ64AAAAOVBMVEX/Rx8AAAD/QiL/Tif/QyH/RR//QiH/QiP/RCD/QSL/Qxz/QyH/QiL/QiD/QyL/QiL/QiH/QyH/QiLwirLUAAAAEnRSTlMZAF4OTC7DrWzjI4iietrRk0EEv/0YAAAB0UlEQVRYw72Y0Y6sIAxAKwUFlFH7/x97izNXF2lN1pU5D800jD2hJAJCdwYZuAUyVbmToKh903IhQHgErAVH+ccV0KI+G2oBPMxJgPA4WAigAT8F0IRDgNAE3ARyfeMFDGSc3YHVFkTBAHKDAgkEyHjacae/GTjxFqAo8NbakXrL9DRy9B+BCQwRcXR9OBKmEuAmAFFgcy0agBnIc1xZsMPOI5loAoUsQFmQjDEL9YbpaeGYBMGRKKAuqFEFL/JXApCw/zFEZk9qgbLGBx0gXLISxT25IUBREEgh1II1fph/IViGnZnCcDDVAgfgVg6gCy6ZaClySbDQpAl04vCGaB4+xGcFRK8CLvW0IBb5bQGqAlNwU4C6oEIVTLTcmoEr0AWcpKsZ/H0NAtkLQffnFjkOqiC/TTWBL9AFCwXQBHgI7rXImMgjCZwFa50s6DRBXyALmIECuMASiWNPFgRTgSJwM+XW8PDCmbwndzdaNL8FMYXPNjASDVChnIvWlBI/MKadPV952HszbmXtRERhhQ0vGFA52SVSSVt7MjHvxfRK8cdTpqovn02dUcltMrwiKf+wQ1FxXKCk9en6e/eDNnP44h2thQEb35O/etNv/q3iHza+KuhqqhZAAAAAAElFTkSuQmCC"}}),b.a.createElement(i.Text,{numberOfLines:1,style:nt.customFont},"前面有张图片"))))}}]),n}(b.a.Component);function at(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var it=i.StyleSheet.create({container_style:{padding:10},input_style:{width:300,marginVertical:10,fontSize:16,color:"#242424",height:30,lineHeight:30},itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},button:{width:200,borderColor:"#4c9afa",borderWidth:1,marginTop:5,marginBottom:5}}),lt=function(e){d()(n,e);var t=at(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).state={textContent:""},r.changeInputContent=r.changeInputContent.bind(ue()(r)),r.focus=r.focus.bind(ue()(r)),r.blur=r.blur.bind(ue()(r)),r}return u()(n,[{key:"changeInputContent",value:function(){this.setState({textContent:"当前时间毫秒:".concat(Date.now())})}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"render",value:function(){var e=this,t=this.state.textContent,n=function(e){return b.a.createElement(i.View,{style:it.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:it.container_style},n("text"),b.a.createElement(i.TextInput,{ref:function(t){e.input=t},style:it.input_style,caretColor:"yellow",underlineColorAndroid:"grey",placeholderTextColor:"#4c9afa",placeholder:"text",defaultValue:t}),b.a.createElement(i.View,{style:it.button,onClick:this.changeInputContent},b.a.createElement(i.Text,null,"点击改变输入框内容")),b.a.createElement(i.View,{style:it.button,onClick:this.focus},b.a.createElement(i.Text,null,"Focus")),b.a.createElement(i.View,{style:it.button,onClick:this.blur},b.a.createElement(i.Text,null,"Blur")),n("numeric"),b.a.createElement(i.TextInput,{style:it.input_style,keyboardType:"numeric",placeholder:"numeric"}),n("phone-pad"),b.a.createElement(i.TextInput,{style:it.input_style,keyboardType:"phone-pad",placeholder:"phone-pad"}),n("password"),b.a.createElement(i.TextInput,{style:it.input_style,keyboardType:"password",placeholder:"Password",multiline:!1}),n("maxLength"),b.a.createElement(i.TextInput,{caretColor:"yellow",style:it.input_style,placeholder:"maxLength=5",maxLength:5}))}}]),n}(g.Component),ct=n.p+"assets/defaultSource.jpg",st=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},rectangle:{width:160,height:80,marginVertical:10},bigRectangle:{width:200,height:100,borderColor:"#eee",borderWidth:1,padding:10,marginVertical:10},smallRectangle:{width:40,height:40,borderRadius:10}});function ut(){var e=function(e){return b.a.createElement(i.View,{style:st.itemTitle},b.a.createElement(i.Text,null,e))};return b.a.createElement(i.ScrollView,{style:{padding:10}},e("backgroundColor"),b.a.createElement(i.View,{style:[st.rectangle,{backgroundColor:"#4c9afa"}]}),e("backgroundImage"),b.a.createElement(i.View,{style:[st.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,backgroundImage:ct}],accessible:!0,accessibilityLabel:"背景图",accessibilityRole:"image",accessibilityState:{disabled:!1,selected:!0,checked:!1,expanded:!1,busy:!0},accessibilityValue:{min:1,max:10,now:5,text:"middle"}},b.a.createElement(i.Text,{style:{color:"white"}},"背景图")),e("backgroundImage linear-gradient"),b.a.createElement(i.View,{style:[st.rectangle,{alignItems:"center",justifyContent:"center",marginTop:20,borderWidth:2,borderColor:"black",borderRadius:2,backgroundImage:"linear-gradient(30deg, blue 10%, yellow 40%, red 50%);"}]},b.a.createElement(i.Text,{style:{color:"white"}},"渐变色")),e("border props"),b.a.createElement(i.View,{style:[st.rectangle,{borderColor:"#242424",borderRadius:4,borderWidth:1}]}),e("flex props"),b.a.createElement(i.View,{style:[st.bigRectangle,{flexDirection:"row",alignItems:"center",justifyContent:"space-between"}]},b.a.createElement(i.View,{style:[st.smallRectangle,{backgroundColor:"yellow"}]}),b.a.createElement(i.View,{style:[st.smallRectangle,{backgroundColor:"blue"}]}),b.a.createElement(i.View,{style:[st.smallRectangle,{backgroundColor:"green"}]})))}var ft=i.StyleSheet.create({pageContainer:{alignItems:"center",justifyContent:"center",flex:1,paddingTop:20},mainRec:{backgroundColor:"#4c9afaAA",width:256,height:48,marginBottom:10,marginTop:156},title:{verticalAlign:"middle",lineHeight:48,height:48,fontSize:16,color:"white",alignSelf:"center"},shapeBase:{width:128,height:128,backgroundColor:"#4c9afa"},square:{},circle:{borderRadius:64},triangle:{borderTopWidth:0,borderRightWidth:70,borderBottomWidth:128,borderLeftWidth:70,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent",borderBottomColor:"#4c9afa",backgroundColor:"transparent",width:140}}),dt="SquarePagerView",ht="TrianglePagerView",mt="CirclePagerView";function pt(e,t){var n=function(t){return b.a.createElement(i.View,{style:ft.pageContainer,key:t},b.a.createElement(i.View,{style:[ft.shapeBase,e],key:"shape"}),b.a.createElement(i.View,{style:ft.mainRec,key:"title"},t?b.a.createElement(i.Text,{style:ft.title},t):null))};return n.displayName=t,n}var yt=pt(ft.square,dt),gt=pt(ft.triangle,ht),bt=pt(ft.circle,mt);function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var wt=i.StyleSheet.create({dotContainer:{position:"absolute",bottom:10,left:0,right:0,flexDirection:"row",alignItems:"center",justifyContent:"center"},dot:{width:6,height:6,borderRadius:3,margin:3,backgroundColor:"#BBBBBB"},selectDot:{backgroundColor:"#000000"},container:{height:500},buttonContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:12},button:{width:120,height:36,backgroundColor:"#4c9afa",borderRadius:18,alignItems:"center",justifyContent:"center"},buttonText:{fontSize:16,color:"#fff"}}),xt=function(e){d()(n,e);var t=vt(n);function n(e){var r;return c()(this,n),r=t.call(this,e),$()(ue()(r),"state",{selectedIndex:0}),r.onPageSelected=r.onPageSelected.bind(ue()(r)),r}return u()(n,[{key:"onPageSelected",value:function(e){console.log("onPageSelected",e.position),this.setState({selectedIndex:e.position})}},{key:"onPageScrollStateChanged",value:function(e){console.log("onPageScrollStateChanged",e)}},{key:"onPageScroll",value:function(e){var t=e.offset,n=e.position;console.log("onPageScroll",t,n)}},{key:"render",value:function(){var e=this,t=this.state.selectedIndex;return b.a.createElement(i.View,{style:{flex:1,backgroundColor:"#ffffff"}},b.a.createElement(i.View,{style:wt.buttonContainer},b.a.createElement(i.View,{style:wt.button,onClick:function(){e.viewpager.setPage(2)}},b.a.createElement(i.Text,{style:wt.buttonText},"动效滑到第3页")),b.a.createElement(i.View,{style:wt.button,onClick:function(){return e.viewpager.setPageWithoutAnimation(0)}},b.a.createElement(i.Text,{style:wt.buttonText},"直接滑到第1页"))),b.a.createElement(i.ViewPager,{ref:function(t){e.viewpager=t},style:wt.container,initialPage:0,keyboardDismissMode:"none",scrollEnabled:!0,onPageSelected:this.onPageSelected,onPageScroll:this.onPageScroll},[yt("squarePager"),gt("TrianglePager"),bt("CirclePager")]),b.a.createElement(i.View,{style:wt.dotContainer},new Array(3).fill(0).map((function(e,n){var r=n===t;return b.a.createElement(i.View,{style:[wt.dot,r?wt.selectDot:null],key:"dot_".concat(n)})}))))}}]),n}(b.a.Component),St=i.StyleSheet.create({itemTitle:{alignItems:"flex-start",justifyContent:"center",height:40,borderWidth:1,borderColor:"#e0e0e0",borderRadius:2,backgroundColor:"#fafafa",padding:10,marginTop:10},webViewStyle:{padding:10,flex:1,flexGrow:1,borderRadius:10}});function Tt(){return b.a.createElement(i.View,{style:{padding:10,flex:1}},b.a.createElement(i.View,{style:St.itemTitle},b.a.createElement(i.Text,null,"WebView 示例")),b.a.createElement(i.WebView,{source:{uri:"https://hippyjs.org"},method:"get",userAgent:"Mozilla/5.0 (Linux; U; Android 5.1.1; zh-cn; vivo X7 Build/LMY47V) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 Chrome/37.0.0.0 MQQBrowser/8.2 Mobile Safari/537.36",style:St.webViewStyle,onLoad:function(e){var t=e.url;return console.log("webview onload",t)},onLoadStart:function(e){var t=e.url;return console.log("webview onLoadStart",t)},onLoadEnd:function(e){var t=e.url;return console.log("webview onLoadEnd",t)}}))}var Et=i.StyleSheet.create({shadowDemo:{flex:1,overflowY:"scroll"},shadowDemoCubeAndroid:{position:"absolute",left:50,top:50,width:170,height:170,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentAndroid:{position:"absolute",left:5,top:5,width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:50,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowSpread:1,boxShadowColor:"#4c9afa",borderRadius:5},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",borderRadius:5,display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}}),Ct=i.StyleSheet.create({shadowDemoCubeAndroid:{position:"absolute",left:50,top:300,width:175,height:175,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:15,boxShadowOffsetY:15,boxShadowColor:"#4c9afa"},shadowDemoContentAndroid:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},shadowDemoCubeIos:{position:"absolute",left:50,top:300,width:160,height:160,boxShadowOpacity:.6,boxShadowRadius:5,boxShadowOffsetX:10,boxShadowOffsetY:10,boxShadowSpread:1,boxShadowColor:"#4c9afa"},shadowDemoContentIos:{width:160,height:160,backgroundColor:"grey",display:"flex",justifyContent:"center",alignItems:"center"},text:{color:"white"}});function kt(){return b.a.createElement(i.View,{style:Et.shadowDemo},"android"===i.Platform.OS?b.a.createElement(i.View,{style:Et.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:Et.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:Et.text},"没有偏移阴影样式"))):b.a.createElement(i.View,{style:Et.shadowDemoCubeIos},b.a.createElement(i.View,{style:Et.shadowDemoContentIos},b.a.createElement(i.Text,{style:Et.text},"没有偏移阴影样式"))),"android"===i.Platform.OS?b.a.createElement(i.View,{style:Ct.shadowDemoCubeAndroid},b.a.createElement(i.View,{style:Ct.shadowDemoContentAndroid},b.a.createElement(i.Text,{style:Ct.text},"偏移阴影样式"))):b.a.createElement(i.View,{style:Ct.shadowDemoCubeIos},b.a.createElement(i.View,{style:Ct.shadowDemoContentIos},b.a.createElement(i.Text,{style:Ct.text},"偏移阴影样式"))))}function Rt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var At=Ie.filter((function(e){return 2!==e.style})),Vt=i.StyleSheet.create({container:{backgroundColor:"#ffffff"},itemContainer:{padding:12},splitter:{marginLeft:12,marginRight:12,height:.5,backgroundColor:"#e5e5e5"},loading:{fontSize:11,color:"#aaaaaa",alignSelf:"center"},pullContainer:{height:60,backgroundColor:"green"},pullContent:{lineHeight:60,color:"white",height:60,textAlign:"center"},pullFooter:{flex:1,height:40,backgroundColor:"#4c9afa",justifyContent:"center",alignItems:"center"}}),It=function(e){d()(a,e);var t,n,r,o=Rt(a);function a(e){var t;return c()(this,a),(t=o.call(this,e)).state={dataSource:[],pullingText:"继续下拉触发刷新",loadingState:"正在加载..."},t.numberOfColumns=2,t.columnSpacing=6,t.interItemSpacing=6,t.mockFetchData=t.mockFetchData.bind(ue()(t)),t.renderItem=t.renderItem.bind(ue()(t)),t.getItemType=t.getItemType.bind(ue()(t)),t.getItemKey=t.getItemKey.bind(ue()(t)),t.onEndReached=t.onEndReached.bind(ue()(t)),t.onRefresh=t.onRefresh.bind(ue()(t)),t.getRefresh=t.getRefresh.bind(ue()(t)),t.renderPullFooter=t.renderPullFooter.bind(ue()(t)),t.renderBanner=t.renderBanner.bind(ue()(t)),t.getItemStyle=t.getItemStyle.bind(ue()(t)),t}return u()(a,[{key:"componentDidMount",value:(r=ce()(de.a.mark((function e(){var t;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.mockFetchData();case 2:t=e.sent,this.setState({dataSource:t});case 4:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onEndReached",value:(n=ce()(de.a.mark((function e(){var t,n,r;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.state.dataSource,!this.loadMoreDataFlag){e.next=3;break}return e.abrupt("return");case 3:return this.loadMoreDataFlag=!0,this.setState({loadingState:"加载更多..."}),n=[],e.prev=6,e.next=9,this.mockFetchData();case 9:n=e.sent,e.next=14;break;case 12:e.prev=12,e.t0=e.catch(6);case 14:0===n.length&&this.setState({loadingState:"没有更多数据"}),r=[].concat(w()(t),w()(n)),this.setState({dataSource:r}),this.loadMoreDataFlag=!1;case 18:case"end":return e.stop()}}),e,this,[[6,12]])}))),function(){return n.apply(this,arguments)})},{key:"renderPullFooter",value:function(){return 0===this.state.dataSource.length?null:b.a.createElement(i.View,{style:Vt.pullFooter},b.a.createElement(i.Text,{style:{color:"white"}},this.state.loadingState))}},{key:"onRefresh",value:(t=ce()(de.a.mark((function e(){var t=this;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(ce()(de.a.mark((function e(){var n;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.mockFetchData();case 2:n=e.sent,t.setState({dataSource:n}),t.refresh.refreshComplected();case 5:case"end":return e.stop()}}),e)}))),1e3);case 1:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"getRefresh",value:function(){return b.a.createElement(i.View,{style:{flex:1,height:40,justifyContent:"center",alignItems:"center",backgroundColor:"#4c9afa"}},b.a.createElement(i.Text,{style:{height:40,lineHeight:40,textAlign:"center",color:"white"}},"下拉刷新中..."))}},{key:"onClickItem",value:function(e){console.log("item: ".concat(e," is clicked.."))}},{key:"getItemType",value:function(e){return this.state.dataSource[e].style}},{key:"getItemKey",value:function(e){return"row-".concat(e)}},{key:"onItemClick",value:function(e){console.log("onItemClick",e),this.listView.scrollToIndex({index:e,animation:!0})}},{key:"renderBanner",value:function(){return"android"===i.Platform.OS||0===this.state.dataSource.length?null:b.a.createElement(i.View,{style:{backgroundColor:"grey",height:100,justifyContent:"center",alignItems:"center"}},b.a.createElement(i.Text,{style:{fontSize:20,color:"white",lineHeight:100,height:100}},"Banner View"))}},{key:"renderItem",value:function(e){var t=this,n=null,r=this.state.dataSource[e];switch(r.style){case 1:n=b.a.createElement(Be,{itemBean:r.itemBean});break;case 2:n=b.a.createElement(He,{itemBean:r.itemBean});break;case 5:n=b.a.createElement(Ue,{itemBean:r.itemBean})}return b.a.createElement(i.View,{onClick:function(){return t.onItemClick(e)},style:Vt.container},b.a.createElement(i.View,{style:Vt.itemContainer},n),b.a.createElement(i.View,{style:Vt.splitter}))}},{key:"mockFetchData",value:function(){return new Promise((function(e){setTimeout((function(){var t=[].concat(w()(At),w()(At));return e(t)}),600)}))}},{key:"getWaterfallContentInset",value:function(){return{top:0,left:5,bottom:0,right:5}}},{key:"getItemStyle",value:function(){var e=this.numberOfColumns,t=this.columnSpacing,n=i.Dimensions.get("screen").width,r=this.getWaterfallContentInset();return{width:(n-r.left-r.right-(e-1)*t)/e}}},{key:"render",value:function(){var e=this,t=this.state.dataSource,n=this.numberOfColumns,r=this.columnSpacing,o=this.interItemSpacing,a=this.getWaterfallContentInset();return b.a.createElement(i.RefreshWrapper,{ref:function(t){e.refresh=t},style:{flex:1},onRefresh:this.onRefresh,bounceTime:100,getRefresh:this.getRefresh},b.a.createElement(i.WaterfallView,{ref:function(t){e.listView=t},renderBanner:this.renderBanner,numberOfColumns:n,columnSpacing:r,interItemSpacing:o,numberOfItems:t.length,style:{flex:1},renderItem:this.renderItem,onEndReached:this.onEndReached,getItemType:this.getItemType,getItemKey:this.getItemKey,contentInset:a,getItemStyle:this.getItemStyle,containPullFooter:!0,renderPullFooter:this.renderPullFooter}))}}]),a}(b.a.Component),jt=n.p+"assets/defaultSource.jpg",Ot=n("./node_modules/@babel/runtime/helpers/slicedToArray.js"),Pt=n.n(Ot);function Dt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _t(e){for(var t=1;t=o||(this.indicator.update(r),this.currentIndex=r)}}},{key:"onScrollBeginDrag",value:function(){this.touchStartOffset=this.scrollOffset,this.doClearTimer()}},{key:"onScrollEndDrag",value:function(){this.doCreateTimer()}},{key:"onLayout",value:function(e){this.width=e.layout.width}},{key:"doSwitchPage",value:function(e){this.scrollView.scrollTo({x:this.imgWidth*e,y:0,animated:!0})}},{key:"doCreateTimer",value:function(){var e=this;this.doClearTimer(),this.duration<=0||(this.interval=setInterval((function(){e.doSwitchPage((e.currentIndex+1)%e.itemCount)}),this.duration))}},{key:"doClearTimer",value:function(){this.interval&&clearInterval(this.interval),this.interval=null}},{key:"render",value:function(){for(var e=this,t=this.props.images,n=[],r=0;rr-a?60*r-o:60*n-60*a+30,this.navScrollView.scrollTo({x:e,y:0,animated:!0})}}},{key:"pressNavItem",value:function(e){this.setState({curIndex:e}),this.viewPager&&this.viewPager.setPage(e)}},{key:"renderNav",value:function(){var e=this,t=this.state,n=t.navList,r=t.curIndex;return b.a.createElement(i.View,{style:Cn.container},b.a.createElement(i.ScrollView,{style:Cn.scroll,horizontal:!0,showsHorizontalScrollIndicator:!1,ref:function(t){e.navScrollView=t}},n.map((function(t,n){return b.a.createElement(i.View,{style:Cn.navItem,key:"nav_".concat(t),activeOpacity:.5,onClick:function(){return e.pressNavItem(n)}},b.a.createElement(i.Text,{style:[Cn.navItemText,r===n?Cn.navItemTextBlue:Cn.navItemTextNormal],numberOfLines:1},t))}))))}},{key:"render",value:function(){var e=this,t=this.state.navList;return b.a.createElement(i.View,{style:{flex:1,backgroundColor:"#ffffff"}},this.renderNav(),b.a.createElement(i.ViewPager,{ref:function(t){e.viewPager=t},style:{flex:1},initialPage:0,onPageSelected:this.onViewPagerChange},t.map((function(e,t){return n.getPage(e,t)}))))}}],[{key:"getPage",value:function(e,t){switch(t%3){case 0:return yt(e);case 1:return bt(e);case 2:return gt(e);default:return null}}}]),n}(b.a.Component);function Rn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var An=i.Dimensions.get("window").width,Vn=i.StyleSheet.create({setNativePropsDemo:{display:"flex",alignItems:"center",position:"relative"},nativeDemo1Drag:{height:80,width:An,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo1Point:{height:80,width:80,color:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},nativeDemo2Drag:{height:80,width:An,backgroundColor:"#4c9afa",position:"relative",marginTop:10},nativeDemo2Point:{height:80,width:80,color:"#4cccfa",backgroundColor:"#4cccfa",position:"absolute",left:0},splitter:{marginTop:50}}),In=function(e){d()(n,e);var t=Rn(n);function n(e){var r;return c()(this,n),(r=t.call(this,e)).demon1Point=b.a.createRef(),r.demo1PointDom=null,r.state={demo2Left:0},r.isDemon1Layouted=!1,r.idDemon2Layouted=!1,r.onTouchDown1=r.onTouchDown1.bind(ue()(r)),r.onDemon1Layout=r.onDemon1Layout.bind(ue()(r)),r.onTouchMove1=r.onTouchMove1.bind(ue()(r)),r.onTouchDown2=r.onTouchDown2.bind(ue()(r)),r.onTouchMove2=r.onTouchMove2.bind(ue()(r)),r}return u()(n,[{key:"componentDidMount",value:function(){}},{key:"onDemon1Layout",value:function(){this.isDemon1Layouted||(this.isDemon1Layouted=!0,this.demo1PointDom=i.UIManagerModule.getElementFromFiberRef(this.demon1Point.current))}},{key:"onTouchDown1",value:function(e){var t=e.page_x,n=t-40;console.log("touchdown x",t,n,An),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}},{key:"onTouchMove1",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,An),this.demo1PointDom&&this.demo1PointDom.setNativeProps({style:{left:n}})}},{key:"onTouchDown2",value:function(e){var t=e.page_x,n=t-40;console.log("touchdown x",t,n,An),this.setState({demo2Left:n})}},{key:"onTouchMove2",value:function(e){var t=e.page_x,n=t-40;console.log("touchmove x",t,n,An),this.setState({demo2Left:n})}},{key:"render",value:function(){var e=this.state.demo2Left;return b.a.createElement(i.View,{style:Vn.setNativePropsDemo},b.a.createElement(i.Text,null,"setNativeProps实现拖动效果"),b.a.createElement(i.View,{style:Vn.nativeDemo1Drag,onTouchDown:this.onTouchDown1,onTouchMove:this.onTouchMove1},b.a.createElement(i.View,{onLayout:this.onDemon1Layout,style:Vn.nativeDemo1Point,ref:this.demon1Point})),b.a.createElement(i.View,{style:Vn.splitter}),b.a.createElement(i.Text,null,"普通渲染实现拖动效果"),b.a.createElement(i.View,{style:Vn.nativeDemo2Drag,onTouchDown:this.onTouchDown2,onTouchMove:this.onTouchMove2},b.a.createElement(i.View,{style:[Vn.nativeDemo2Point,{left:e}]})))}}]),n}(b.a.Component);function jn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var On=i.StyleSheet.create({dynamicImportDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),Pn=function(e){d()(r,e);var t=jn(r);function r(e){var n;return c()(this,r),(n=t.call(this,e)).state={AsyncComponentFromLocal:null,AsyncComponentFromHttp:null},n.onAsyncComponentLoad=n.onAsyncComponentLoad.bind(ue()(n)),n}return u()(r,[{key:"onAsyncComponentLoad",value:function(){var e=this;console.log("load async component"),n.e(1).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentLocal.jsx")).then((function(t){e.setState({AsyncComponentFromLocal:t.default||t})})).catch((function(e){return console.error("import async local component error",e)})),n.e(0).then(n.bind(null,"./src/externals/DyanmicImport/AsyncComponentHttp.jsx")).then((function(t){e.setState({AsyncComponentFromHttp:t.default||t})})).catch((function(e){return console.error("import async remote component error",e)}))}},{key:"render",value:function(){var e=this.state,t=e.AsyncComponentFromLocal,n=e.AsyncComponentFromHttp;return b.a.createElement(i.View,{style:On.dynamicImportDemo},b.a.createElement(i.View,{style:{width:130,height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},b.a.createElement(i.Text,{style:{height:40,lineHeight:40,textAlign:"center"}},"点我异步加载")),b.a.createElement(i.View,{style:{marginTop:20}},t?b.a.createElement(t,null):null,n?b.a.createElement(n,null):null))}}]),r}(b.a.Component);function Dn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var _n=i.StyleSheet.create({LocalizationDemo:{marginTop:20,display:"flex",flex:1,alignItems:"center",position:"relative",flexDirection:"column"}}),Ln=function(e){d()(n,e);var t=Dn(n);function n(){return c()(this,n),t.apply(this,arguments)}return u()(n,[{key:"render",value:function(){var e=i.Platform.Localization||{},t=e.country,n=e.language,r=e.direction;return b.a.createElement(i.View,{style:_n.LocalizationDemo},b.a.createElement(i.View,{style:{height:40,textAlign:"center",backgroundColor:"#4c9afa",borderRadius:5},onTouchDown:this.onAsyncComponentLoad},b.a.createElement(i.Text,{style:{color:"white",marginHorizontal:30,height:40,lineHeight:40,textAlign:"center"}},"国际化相关信息:国家 ".concat(t," | 语言 ").concat(n," | 方向 ").concat(1===r?"RTL":"LTR"))))}}]),n}(b.a.Component),Bn=function(){var e=ce()(de.a.mark((function e(t){return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",turboPromise(getTurboModule("demoTurbo").nativeWithPromise)(t));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Mn=function(){return getTurboModule("demoTurbo").getTurboConfig()};function zn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var Fn=i.StyleSheet.create({container:{flex:1},cellContentView:{flexDirection:"row",justifyContent:"space-between",backgroundColor:"#ccc",marginBottom:1},funcInfo:{justifyContent:"center",paddingLeft:15,paddingRight:15},actionButton:{backgroundColor:"#4c9afa",color:"#fff",height:44,lineHeight:44,textAlign:"center",width:80,borderRadius:6},resultView:{backgroundColor:"darkseagreen",minHeight:150,padding:15}}),Wn=function(e){d()(r,e);var t,n=zn(r);function r(e){var t;return c()(this,r),(t=n.call(this,e)).state={config:null,result:"",funList:["getString","getNum","getBoolean","getMap","getObject","getArray","nativeWithPromise","getTurboConfig","printTurboConfig","getInfo","setInfo"]},t.onTurboFunc=t.onTurboFunc.bind(ue()(t)),t.getRenderRow=t.getRenderRow.bind(ue()(t)),t.getRowKey=t.getRowKey.bind(ue()(t)),t}return u()(r,[{key:"onTurboFunc",value:(t=ce()(de.a.mark((function e(t){var n;return de.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("nativeWithPromise"!==t){e.next=6;break}return e.next=3,Bn("aaa");case 3:n=e.sent,e.next=7;break;case 6:"getTurboConfig"===t?(this.config=Mn(),n="获取到config对象"):"printTurboConfig"===t?(r=this.config||Mn(),n=getTurboModule("demoTurbo").printTurboConfig(r)):"getInfo"===t?n=(this.config||Mn()).getInfo():"setInfo"===t?((this.config||Mn()).setInfo("Hello World"),n="设置config信息成功"):n={getString:function(){return e="123",getTurboModule("demoTurbo").getString(e);var e},getNum:function(){return e=1024,getTurboModule("demoTurbo").getNum(e);var e},getBoolean:function(){return e=!0,getTurboModule("demoTurbo").getBoolean(e);var e},getMap:function(){return e=new Map([["a","1"],["b",2]]),getTurboModule("demoTurbo").getMap(e);var e},getObject:function(){return e={c:"3",d:"4"},getTurboModule("demoTurbo").getObject(e);var e},getArray:function(){return e=["a","b","c"],getTurboModule("demoTurbo").getArray(e);var e}}[t]();case 7:this.setState({result:n});case 8:case"end":return e.stop()}var r}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"renderResultView",value:function(){return b.a.createElement(i.View,{style:Fn.resultView},b.a.createElement(i.Text,{style:{backgroundColor:"darkseagreen"}},"".concat(this.state.result)))}},{key:"getRenderRow",value:function(e){var t=this,n=this.state.funList;return b.a.createElement(i.View,{style:Fn.cellContentView},b.a.createElement(i.View,{style:Fn.funcInfo},b.a.createElement(i.Text,{numberofLines:0},"函数名:",n[e])),b.a.createElement(i.Text,{style:Fn.actionButton,onClick:function(){return t.onTurboFunc(n[e])}},"执行"))}},{key:"getRowKey",value:function(e){return this.state.funList[e]}},{key:"render",value:function(){var e=this.state.funList;return b.a.createElement(i.View,{style:Fn.container},this.renderResultView(),b.a.createElement(i.ListView,{numberOfRows:e.length,renderRow:this.getRenderRow,getRowKey:this.getRowKey,style:{flex:1}}))}}]),r}(b.a.Component);function Hn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Nn(e){for(var t=1;t Develop 菜单进行调试(需要在预置 -> 高级里打开开发者菜单)"),e.push("注意:每次插拔 USB 线后都需要通过 npm run hippy:debug 重启调试服务"));return b.a.createElement(i.ScrollView,{style:rr.container},e.map((function(e,t){return b.a.createElement(i.Text,{style:rr.stepText,key:"steps-".concat(t)},e)})),b.a.createElement(i.View,{style:rr.buttonContainer},b.a.createElement(i.View,{style:rr.button,onClick:this.clickToDebug},b.a.createElement(i.Text,{style:rr.buttonText,numberOfLines:1},"点击调试"))))}}]),n}(g.Component);function ar(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y()(e);if(t){var o=y()(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m()(this,n)}}var ir=i.StyleSheet.create({container:{flex:1}}),lr=function(e){d()(n,e);var t=ar(n);function n(e){var r;c()(this,n),r=t.call(this,e);var o=i.Dimensions.get("screen"),a=o.width,l=o.height;return r.state={isVertical:a=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,i,a=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){l=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(l)throw i}}return a}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0||e.didTimeout)&&function e(t){"number"==typeof t?ee(t):t&&(ee(t.nodeId),Array.isArray(t.childNodes)&&t.childNodes.forEach((function(t){return e(t)})))}(t)}),{timeout:50})}var ie=0,ae=1,oe={onTouchStart:["onTouchStart","onTouchDown"],onPress:["onPress","onClick"]},le={onClick:"click",onLongClick:"longclick",onPressIn:"pressin",onPressOut:"pressout",onTouchDown:"touchstart",onTouchStart:"touchstart",onTouchEnd:"touchend",onTouchMove:"touchmove",onTouchCancel:"touchcancel"};function ue(e){return e.replace(/^(on)?/g,"").toLocaleLowerCase()}var se=new RegExp(/^\d+$/),ce=!1;function fe(){}function de(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,(function(e){return String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16))}))}var pe=new RegExp("^on.+Capture$");function he(e){return pe.test(e)}var me=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function ve(e){if("number"==typeof e)return e;if("string"==typeof e&&me.test(e))try{return parseFloat(e)}catch(t){return e}return e}function ye(e){return"[object Function]"===Object.prototype.toString.call(e)}function ge(e){e}function be(){return ce}function ke(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){return"".concat("hpfile://","./").concat(e)}return e}function we(e){return 5===e}var Se=function(){function e(t){L(this,e),this.handlerContainer={},this.nextIdForHandler=0,this.eventName=t}return R(e,[{key:"getEventListeners",value:function(){var e=this;return Object.keys(this.handlerContainer).filter((function(t){return e.handlerContainer[t]})).map((function(t){return e.handlerContainer[t]}))}},{key:"getHandlerSize",value:function(){return Object.keys(this.handlerContainer).length}},{key:"addEventHandler",value:function(e,t){if(!e)throw new TypeError("Invalid arguments for addEventHandler");var n=this.nextIdForHandler;this.nextIdForHandler+=1;var r={id:n,eventHandler:e,context:t},i="eventHandler_".concat(n);return this.handlerContainer[i]=r,n}},{key:"notifyEvent",value:function(e){var t=this;Object.keys(this.handlerContainer).forEach((function(n){var r=t.handlerContainer[n];r&&r.eventHandler&&(r.context?r.eventHandler.call(r.context,e):r.eventHandler(e))}))}},{key:"removeEventHandler",value:function(e){if("number"!=typeof e)throw new TypeError("Invalid arguments for removeEventHandler");var t="eventHandler_".concat(e);this.handlerContainer[t]&&delete this.handlerContainer[t]}}]),e}(),Ee=function(){function e(t,n,r){L(this,e),this.type=t,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=n,this.target=r}return R(e,[{key:"stopPropagation",value:function(){this.bubbles=!1}},{key:"preventDefault",value:function(){}}]),e}(),Ce=new Map,xe=["%c[event]%c","color: green","color: auto"];function Ne(e,t){var n=e;if(t.memoizedProps&&!t.memoizedProps[e])for(var r=Object.keys(oe),i=0;i0)for(var l,u=!1,s=te(n);!u&&void 0!==(l=r.shift());)try{var c=l,f=c.eventName,d=c.currentTarget,p=c.listener,h=c.isCapture,m=new Ee(f,d,s);Object.assign(m,t),h?(p(m),m.bubbles||(u=!0)):("boolean"!=typeof(u=p(m))&&(u=!be()),m.bubbles||(u=!0))}catch(e){console.reportUncaughtException(e)}}(r,e,a):function(e,t,n){var r=!1,i=n,a=e,o=te(n);do{if(Ie(a=Ne(a,i),i))try{var l=te(i),u=new Ee(a,l,o);Object.assign(u,t),"boolean"!=typeof(r=i.memoizedProps[a](u))&&(r=!be()),u.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!we(i.tag);)i=i.return}while(!r&&i)}(r,e,a)}}},receiveUIComponentEvent:function(e){if(fe.apply(void 0,xe.concat(["receiveUIComponentEvent",e])),e&&Array.isArray(e)&&!(e.length<2)){var t=_(e,3),n=t[0],r=t[1],i=t[2];if("number"==typeof n&&"string"==typeof r){var a=ne(n);a&&Ie(r,a)&&a.memoizedProps[r](i)}}}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=_e);var Le=function(){function e(t,n){L(this,e),this.callback=t,this.bindListener=n}return R(e,[{key:"remove",value:function(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}]),e}(),Ae=function(){function e(t){L(this,e),this.eventName=t,this.listenerIdList=[]}return R(e,[{key:"unregister",value:function(){var e=_e.getHippyEventHub(this.eventName);if(!e)throw new ReferenceError("No listeners for ".concat(this.eventName));for(var t=this.listenerIdList.length,n=0;n255?255:t}function De(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Ue(e,t,n){var r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Be(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=Ue(i,r,e+1/3),o=Ue(i,r,e),l=Ue(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*l)<<8}function We(e){return(parseFloat(e)%360+360)%360/360}function Ve(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function $e(e){if(Number.isInteger(e))return e;var t=function(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=He.hex6.exec(e),Array.isArray(t)?parseInt("".concat(t[1],"ff"),16)>>>0:Object.hasOwnProperty.call(Oe,e)?Oe[e]:(t=He.rgb.exec(e),Array.isArray(t)?(Me(t[1])<<24|Me(t[2])<<16|Me(t[3])<<8|255)>>>0:(t=He.rgba.exec(e))?(Me(t[1])<<24|Me(t[2])<<16|Me(t[3])<<8|De(t[4]))>>>0:(t=He.hex3.exec(e))?parseInt("".concat(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],"ff"),16)>>>0:(t=He.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=He.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=He.hsl.exec(e))?(255|Be(We(t[1]),Ve(t[2]),Ve(t[3])))>>>0:(t=He.hsla.exec(e))?(Be(We(t[1]),Ve(t[2]),Ve(t[3]))|De(t[4]))>>>0:null))}(e);return null===t?0:t=(t<<24|t>>>8)>>>0}function qe(e){return Array.isArray(e)?e.map((function(e){return $e(e)})):[0]}var Qe=Object.freeze({__proto__:null,getString:function(){return U.callNativeWithPromise("ClipboardModule","getString")},setString:function(e){U.callNative("ClipboardModule","setString",e)}});var Ke=Object.freeze({__proto__:null,getCookies:function(e){return U.callNativeWithPromise("network","getCookie",e)},setCookie:function(e,t,n){var r="";"string"==typeof n&&(r=n),n instanceof Date&&(r=n.toUTCString()),U.callNative("network","setCookie",e,t,r)}});function Ge(e){return U.callNativeWithPromise("ImageLoaderModule","getSize",e)}function Ye(e){U.callNative("ImageLoaderModule","prefetch",e)}var Xe,Je=Object.freeze({__proto__:null,getSize:Ge,prefetch:Ye}),Ze=new Map,et=function(){function e(t,n){L(this,e),this.eventName=t,this.listener=n}return R(e,[{key:"remove",value:function(){this.eventName&&this.listener&&(tt(this.eventName,this.listener),this.listener=void 0)}}]),e}();function tt(e,t){if(t instanceof et)t.remove();else{var n=e;"change"===e&&(n="networkStatusDidChange"),Xe.listenerSize(n)<=1&&U.callNative("NetInfo","removeListener",n);var r=Ze.get(t);r&&(r.remove(),Ze.delete(t))}}var nt=Object.freeze({__proto__:null,addEventListener:function(e,t){var n=e;n&&"change"===n&&(n="networkStatusDidChange"),(Xe=new ze).listenerSize(n)<1&&U.callNative("NetInfo","addListener",n);var r=Xe.addListener(n,(function(e){t(e)}));return Ze.set(t,r),new et(n,t)},removeEventListener:tt,fetch:function(){return U.callNativeWithPromise("NetInfo","getCurrentConnectivity").then((function(e){return e.network_info}))}}),rt=W.createNode,it=W.updateNode,at=W.deleteNode,ot=W.flushBatch,lt=W.endBatch,ut=W.sendRenderError,st=function(e){return J((function(t){return t.stateNode&&t.stateNode.nodeId===e}))};function ct(e){if(e instanceof mn)return e;var t=e._reactInternalFiber||e._reactInternals;if(null==t?void 0:t.child){for(var n=t.child;n&&!(n.stateNode instanceof mn);)n=n.child;return n&&n.stateNode?n.stateNode:null}return null}function ft(e){var t=e;if("string"==typeof e){"getNodeIdByRef('".concat(e,"') use string ref will affect to performance, recommend use reference to the ref instead");var n=J((function(t){return!!(t.return&&t.return.ref&&t.return.ref._stringRef)&&t.return.ref._stringRef===e}));if(!n||!n.stateNode)return 0;t=n.stateNode}if(!t.nodeId){var r=ct(t);return r?r.nodeId:0}return t.nodeId}function dt(e,t){var n=e.nativeName,r=e.nodeId;if(!r||!n){var i=ct(e);i&&(r=i.nodeId,n=i.nativeName)}if(!n)throw new Error("callUIFunction is calling a unnamed component");if(!r)throw new Error("callUIFunction is calling a component have no nodeId");for(var a=arguments.length,o=new Array(a>2?a-2:0),l=2;l0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;e.forEach((function(e){if(e){var n=e.id;e.eventList.forEach((function(e){var r,i=e.name,a=e.type,o=(e.isCapture,e.listener);r=It(i)?le[i]:ue(i),a===ae&&t.RemoveEventListener(n,r,o),a===ie&&t.AddEventListener(n,r,o)}))}}))}function _t(t){var n=function(e){for(var t=[],n=0;n0&&void 0!==arguments[0]&&arguments[0];if(xt)if(xt=!1,0!==Nt.length){var t=X();e?(_t(t),Nt=[],xt=!0):Promise.resolve().then((function(){_t(t),Nt=[],xt=!0}))}else xt=!0}function At(e){var t=e.attributes;t.children;return P(t,l)}function Rt(e,t){var n;if(!t.nativeName)return{};if(t.meta.skipAddToDom)return{};if(!t.meta.component)throw new Error("Specific tag is not supported yet: ".concat(t.tagName));return{nativeNode:{id:t.nodeId,pId:(null===(n=t.parentNode)||void 0===n?void 0:n.nodeId)||e,index:t.index,name:t.nativeName,props:N(N({},At(t)),{},{style:t.style})},eventNode:function(e){var t=void 0,n=e.events;if(n){var r=[];Object.keys(n).forEach((function(t){var i=n[t],a=i.name,o=i.type,l=i.isCapture,u=i.listener;e.isListenerHandled(t,o)||(e.setListenerHandledType(t,o),r.push({name:a,type:o,isCapture:l,listener:u}))})),t={id:e.nodeId,eventList:r}}return t}(t)}}function zt(e,t,n,r){var i=[],a=[],o=n;return void 0===o&&t&&t.parentNode&&(o=t.parentNode.childNodes.indexOf(t)),t.traverseChildren((function(t){var n=Rt(e,t),o=n.nativeNode,l=n.eventNode;o&&i.push(o),l&&a.push(l),"function"==typeof r&&r(t)}),o),{nativeLanguages:i,eventLanguages:a}}function Tt(e){return!!F&&e instanceof F.containerInfo.constructor}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(e&&t&&!t.meta.skipAddToDom){var r=X();if(Tt(e)&&!e.isMounted){var i=zt(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)})),a=i.nativeLanguages,o=i.eventLanguages;Nt.push({type:Ct.createNode,nodes:a,eventNodes:o})}else if(e.isMounted&&!t.isMounted){var l=zt(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)})),u=l.nativeLanguages,s=l.eventLanguages;Nt.push({type:Ct.createNode,nodes:u,eventNodes:s})}}}function jt(e,t,n){if(t&&!t.meta.skipAddToDom){t.isMounted=!1,t.index=n;var r=X(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];Nt.push({type:Ct.deleteNode,nodes:i,eventNodes:[]})}}function Ft(e){if(e.isMounted){var t=Rt(X(),e),n=t.nativeNode,r=t.eventNode;n&&Nt.push({type:Ct.updateNode,nodes:[n],eventNodes:[r]})}}var Ht=setTimeout,Mt=clearTimeout,Dt=Object.freeze({__proto__:null,commitMutationEffectsBegin:function(){},commitMutationEffectsComplete:function(){Lt(!0)},getCurrentEventPriority:function(){return 16},scheduleTimeout:Ht,cancelTimeout:Mt,noTimeout:-1,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,a){Z(a,e.nodeId);var o=Object.keys(t||{});if(0!==o.length){var l=o.map((function(e){return[e,t[e]]}));e.setAttributes(l)}},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){var a=n.createElement(e);return Object.keys(t).forEach((function(e){switch(e){case"children":break;case"nativeName":a.meta.component.name=t.nativeName;break;default:a.setAttribute(e,t[e])}})),[5,7].indexOf(i.tag)<0&&(a.meta.skipAddToDom=!0),Z(i,a.nodeId),a},createTextInstance:function(e,t,n,r){var i=t.createElement("p");return i.setAttribute("text",de(e)),i.meta={component:{name:"Text"}},Z(r,i.nodeId),i},detachDeletedInstance:function(){},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){var t={style:{display:"none"}};Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){var i={};return Object.keys(n).forEach((function(e){var t=n[e],a=r[e];null!=t&&null==a&&(i[e]=a)})),Object.keys(r).forEach((function(e){var t=n[e],a=r[e];switch(e){case"children":t===a||"number"!=typeof a&&"string"!=typeof a||(i[e]=a);break;default:null!=a&&null==t?i[e]=a:"function"==typeof a||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==j(t)&&"object"==j(n)){var r,i,a,o=kt(t),l=kt(n);if(o&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(o!=l)return!1;var u=t instanceof Date,s=n instanceof Date;if(u!=s)return!1;if(u&&s)return t.getTime()==n.getTime();var c=t instanceof RegExp,f=n instanceof RegExp;if(c!=f)return!1;if(c&&f)return t.toString()==n.toString();var d=wt(t);if((i=d.length)!==wt(n).length)return!1;for(r=i;0!=r--;)if(!St.call(n,d[r]))return!1;for(r=i;0!=r--;)if(!e(t[a=d[r]],n[a]))return!1;return!0}return t!=t&&n!=n}(t,a)||(i[e]=a)}})),i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),re(t)},removeChildFromContainer:function(e,t){e.removeChild(t),re(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){var n=N(N({},t),{},{style:N(N({},t.style),{},{display:"flex"})});Object.keys(n).forEach((function(t){return e.setAttribute(t,n[t])}))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){var n=t.children;return"string"==typeof n||"number"==typeof n}return!1}}),Ut=o()(N(N({},Dt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:function(){},cancelDeferredCallback:function(){}})),Bt=Ut.flushSync,Wt=K.addEventListener,Vt=K.removeEventListener,$t=K.dispatchEvent,qt=K.AsyncStorage,Qt=K.Bridge,Kt=K.Device,Gt=K.HippyRegister,Yt=Object.freeze({__proto__:null,addEventListener:Wt,removeEventListener:Vt,dispatchEvent:$t,AsyncStorage:qt,BackAndroid:bt,Bridge:Qt,Clipboard:Qe,Cookie:Ke,Device:Kt,HippyRegister:Gt,ImageLoader:Je,NetworkInfo:nt,UIManager:ht,flushSync:Bt});function Xt(e){return"loop"===e?-1:e}var Jt=new ze;function Zt(e,t){return"color"===e&&["number","string"].indexOf(j(t))>=0?$e(t):t}var en=function(){function e(t){var n;L(this,e);var r=0;if((null===(n=t.startValue)||void 0===n?void 0:n.constructor)&&"Animation"===t.startValue.constructor.name)r={animationId:t.startValue.animationId};else{var i=t.startValue;r=Zt(t.valueType,i)}var a=Zt(t.valueType,t.toValue);this.mode=t.mode||"timing",this.delay=t.delay||0,this.startValue=r||0,this.toValue=a||0,this.valueType=t.valueType||void 0,this.duration=t.duration||0,this.direction=t.direction||"center",this.timingFunction=t.timingFunction||"linear",this.repeatCount=Xt(t.repeatCount||0),this.inputRange=t.inputRange||[],this.outputRange=t.outputRange||[],this.animationId=Qt.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}return R(e,[{key:"removeEventListener",value:function(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}},{key:"start",value:function(){var e=this;this.removeEventListener();"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Jt.addListener("".concat("onAnimation","Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Jt.addListener("".concat("onAnimation","End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Jt.addListener("".concat("onAnimation","Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Jt.addListener("".concat("onAnimation","Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Qt.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),Qt.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Qt.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Qt.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"updateAnimation",value:function(t){var n=this;if("object"!==j(t))throw new TypeError("Invalid arguments");if("string"==typeof t.mode&&t.mode!==this.mode)throw new TypeError("Update animation mode not supported");Object.keys(t).forEach((function(r){var i=t[r];if("startValue"===r){var a=0;if(t.startValue instanceof e)a={animationId:t.startValue.animationId};else{var o=t.startValue;a=Zt(n.valueType,o)}n.startValue=a||0}else"repeatCount"===r?n.repeatCount=Xt(t.repeatCount||0):Object.defineProperty(n,r,{value:i})})),Qt.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:Zt(this.valueType,this.toValue),duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{}))}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}]),e}(),tn=new ze,nn=function(){function e(t){var n=this;L(this,e),this.animationList=[],t.children.forEach((function(e){n.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})})),this.animationId=Qt.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Xt(t.repeatCount||0),children:this.animationList,virtual:t.virtual}),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}return R(e,[{key:"removeEventListener",value:function(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}},{key:"start",value:function(){var e=this;this.removeEventListener();"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=tn.addListener("".concat("onAnimation","Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=tn.addListener("".concat("onAnimation","End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=tn.addListener("".concat("onAnimation","Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=tn.addListener("".concat("onAnimation","Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Qt.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),this.animationList.forEach((function(e){return Number.isInteger(e.animationId)&&Qt.callNative("AnimationModule","destroyAnimation",e.animationId)})),Qt.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Qt.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Qt.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}]),e}(),rn=0;var an=function(){function e(){L(this,e),this.meta={component:{}},this.index=0,this.childNodes=[],this.parentNode=null,this.mounted=!1,this.nodeId=((rn+=1)%10==0&&(rn+=1),rn)}return R(e,[{key:"toString",value:function(){return this.constructor.name}},{key:"isMounted",get:function(){return this.mounted},set:function(e){this.mounted=e}},{key:"insertBefore",value:function(e,t){if(!e)throw new Error("Can't insert child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");var n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),Ot(this,e,n)}}},{key:"moveChild",value:function(e,t){if(!e)throw new Error("Can't move child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");var n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),jt(0,e,n);var r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),Ot(this,e,r)}}},{key:"appendChild",value:function(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),Ot(this,e,this.childNodes.length-1)}}},{key:"removeChild",value:function(e){if(!e)throw new Error("Can't remove child.");if(!e.meta.skipAddToDom){if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");var t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),jt(0,e,t)}}},{key:"findChild",value:function(e){if(e(this))return this;if(this.childNodes.length)for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;this.index=this.parentNode?n:0,e(this),this.childNodes.length&&this.childNodes.forEach((function(n,r){t.traverseChildren.call(n,e,r)}))}}]),e}(),on={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},ln={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},un="turn",sn="rad",cn="deg";function fn(e){var t=(e||"").replace(/\s*/g,"").toLowerCase(),n=/^([+-]?\d+\.?\d*)+(deg|turn|rad)|(to\w+)$/g.exec(t);if(Array.isArray(n)){var r="180",i=_(n,3),a=i[0],o=i[1],l=i[2];return o&&l?r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cn,n=parseFloat(e),r=e||"",i=e.split("."),a=_(i,2),o=a[1];switch(o&&o.length>2&&(r=n.toFixed(2)),t){case un:r="".concat((360*n).toFixed(2));break;case sn:r="".concat((180/Math.PI*n).toFixed(2))}return r}(o,l):a&&void 0!==ln[a]&&(r=ln[a]),r}}function dn(e){var t=_((e||"").replace(/\s+/g," ").trim().split(/\s+(?![^(]*?\))/),2),n=t[0],r=t[1],i=/^([+-]?\d+\.?\d*)%$/g;return!n||i.exec(n)||r?n&&i.exec(r)?{ratio:parseFloat(r.split("%")[0])/100,color:$e(n)}:void 0:{color:$e(n)}}function pn(e){return he(e)&&(e=e.replace("Capture","")),oe[e]?oe[e][1]:e}function hn(e){return function(t){var n=t.id,r=t.currentId,i=t.params;if(function(e){return!!le[e]}(e)){var a={id:n,name:e,currentId:r};Object.assign(a,i),_e.receiveNativeGesture(a)}else{var o=[n,e,i];_e.receiveUIComponentEvent(o)}}}var mn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this)).id="",r.style={},r.attributes={},r.events={},r.tagName=e,r}return R(n,[{key:"nativeName",get:function(){return this.meta.component.name}},{key:"toString",value:function(){return"".concat(this.tagName,":(").concat(this.nativeName,")")}},{key:"setListenerHandledType",value:function(e,t){this.events[e]&&(this.events[e].handledType=t)}},{key:"isListenerHandled",value:function(e,t){return!this.events[e]||t===this.events[e].handledType}},{key:"hasAttribute",value:function(e){return!!this.attributes[e]}},{key:"getAttribute",value:function(e){return this.attributes[e]}},{key:"setStyleAttribute",value:function(e){var t=this;this.style={};var n=e;if(!Array.isArray(n)&&Object.hasOwnProperty.call(n,0)){var r=[],i={};Object.keys(n).forEach((function(e){var t;t=e,se.test(t)?r.push(n[e]):i[e]=n[e]})),n=[].concat(r,[i])}Array.isArray(n)||(n=[n]);var a={};n.forEach((function(e){Array.isArray(e)?e.forEach((function(e){a=N(N({},a),e)})):"object"===j(e)&&e&&(a=N(N({},a),e))})),Object.keys(a).forEach((function(e){var n=a[e];if(Object.prototype.hasOwnProperty.call(on,e)&&(e=on[e]),"transform"===e){var r={};if(!Array.isArray(n))throw new TypeError("transform only support array args");n.forEach((function(e){Object.keys(e).forEach((function(t){var n=e[t];n instanceof en||n instanceof nn?r[t]={animationId:n.animationId}:null===n?r[t]&&delete r[t]:void 0!==n&&(r[t]=n)}))}));var i=Object.keys(r);i.length&&(Array.isArray(t.style.transform)||(t.style.transform=[]),i.forEach((function(e){return t.style.transform.push({[e]:r[e]})})))}else if(null===n&&void 0!==t.style[e])t.style[e]=void 0;else if(n instanceof en||n instanceof nn)t.style[e]={animationId:n.animationId};else if(e.toLowerCase().indexOf("colors")>-1)t.style[e]=qe(n);else if(e.toLowerCase().indexOf("color")>-1)t.style[e]=$e(n);else if("backgroundImage"===e&&n)t.style=function(e,t,n){if(0===t.indexOf("linear-gradient")){var r=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,(?![^(]*?\))/),i=[];n.linearGradient=n.linearGradient||{},r.forEach((function(e,t){if(0===t){var r=fn(e);if(r)n.linearGradient.angle=r;else{n.linearGradient.angle="180";var a=dn(e);a&&i.push(a)}}else{var o=dn(e);o&&i.push(o)}})),n.linearGradient.colorStopList=i}else n[e]=ke(t);return n}(e,n,t.style);else if("textShadowOffset"===e){var o=n||{},l=o.x,u=void 0===l?0:l,s=o.width,c=void 0===s?0:s,f=o.y,d=void 0===f?0:f,p=o.height,h=void 0===p?0:p;t.style[e]={width:u||c,height:d||h}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?t.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,n,t.style):t.style[e]=n}))}},{key:"setAttributes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(t)&&t.length>0&&(t.forEach((function(t){if(Array.isArray(t)){var n=_(t,2),r=n[0],i=n[1];e.setAttribute(r,i,{notToNative:!0})}})),Ft(this))}},{key:"parseAnimationStyleProp",value:function(e){var t=!1;Object.keys(e).some((function(n){var r=e[n];if(r&&Array.isArray(r)&&"transform"===n)for(var i=0;i=0},action:function(){return t===n.id||(n.id=t,function(e){if(e.isMounted){var t=zt(X(),e)||{},n=t.nativeLanguages,r=t.eventLanguages;n&&Nt.push({type:Ct.updateNode,nodes:n,eventNodes:r})}}(n)),!0}},{match:function(){return["value","defaultValue","placeholder"].indexOf(e)>=0},action:function(){return n.attributes[e]=de(t),!1}},{match:function(){return["text"].indexOf(e)>=0},action:function(){return n.attributes[e]=t,!1}},{match:function(){return["style"].indexOf(e)>=0},action:function(){return"object"!==j(t)||null==t||(n.setStyleAttribute(t),!1)}},{match:function(){return!0},action:function(){if("function"==typeof t){var r=pn(e);n.attributes[r]=t,n.events[r]?n.events[r]&&n.events[r].type!==ie&&(n.events[r].type=ie):n.events[r]={name:r,type:ie,isCapture:he(e),listener:hn(r)}}else{var i=pn(e);if(function(e,t){return void 0!==t&&"object"===j(t[e])&&!!t[e]}(i,n.events)&&"function"!=typeof t)return delete n.attributes[i],n.events[i].type=ae,!1;n.attributes[e]=t}return!1}}].some((function(e){return!!e.match()&&(r=e.action(),!0)})),r}},{key:"setAttribute",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void(!n.notToNative&&Ft(this));var r=this.parseAttributeProp(e,t);if(r)return;this.parseAnimationStyleProp(this.style),!n.notToNative&&Ft(this)}catch(e){}}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"setStyle",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==t){var r=t,i=e;Object.prototype.hasOwnProperty.call(on,e)&&(i=on[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?qe(r):i.toLowerCase().indexOf("color")>-1?$e(r):ve(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||Ft(this))}else delete this.style[e]}},{key:"setNativeProps",value:function(e){var t=this;if(e){var n=e.style;if(n){var r=n;Object.keys(r).forEach((function(e){t.setStyle(e,r[e],!0)})),Ft(this),Lt(!0)}}}},{key:"setText",value:function(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=de(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}]),n}(an),vn=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.call(this)).documentElement=new mn("document"),e}return R(n,[{key:"createElement",value:function(e){return new mn(e)}},{key:"createElementNS",value:function(e,t){return new mn("".concat(e,":").concat(t))}}]),n}(an);vn.createElement=vn.prototype.createElement,vn.createElementNS=vn.prototype.createElementNS;var yn=Ut.createContainer,gn=Ut.updateContainer,bn=Ut.getPublicRootInstance,kn=(Ut.injectIntoDevTools,['%c[Hippy-React "2.2.1"]%c',"color: #61dafb","color: auto"]),wn=function(){function e(t){if(L(this,e),!t.appName||!t.entryPage)throw new TypeError("Invalid arguments");this.config=t,this.regist=this.start,this.render=this.render.bind(this);var n=new vn;this.rootContainer=yn(n,0,!1,null)}return R(e,[{key:"start",value:function(){Gt.regist(this.config.appName,this.render)}},{key:"render",value:function(e){var t=this.config,n=t.appName,r=t.entryPage,a=t.silent,o=void 0!==a&&a,l=t.bubbles,u=void 0!==l&&l,s=t.callback,c=void 0===s?function(){}:s,f=e.__instanceId__;fe.apply(void 0,kn.concat(["Start",n,"with rootViewId",f,e])),this.rootContainer.containerInfo.nodeId=f,o&&ge(o),u&&function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ce=e}(u),Y(f,this.rootContainer);var d=i.a.createElement(r,e);return gn(d,this.rootContainer,null,c),bn(this.rootContainer)}}],[{key:"Native",get:function(){return Yt}}]),e}();wn.version="2.2.1";var Sn={registerComponent:function(e,t){new wn({appName:e,entryPage:t}).start()}},En=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.apply(this,arguments)).instance=null,e}return R(n,[{key:"setPressed",value:function(e){dt(this.instance,"setPressed",[e])}},{key:"setHotspot",value:function(e,t){dt(this.instance,"setHotspot",[e,t])}},{key:"render",value:function(){var e=this,t=this.props,n=t.collapsable,r=t.style,a=void 0===r?{}:r,o=P(t,u),l=a,s=o.nativeBackgroundAndroid;return"boolean"==typeof n&&(l.collapsable=n),void 0!==(null==s?void 0:s.color)&&(s.color=$e(s.color)),i.a.createElement("div",N({ref:function(t){e.instance=t},nativeName:"View",style:l},o))}}]),n}(i.a.Component);function Cn(e,t){var n=e.style,r=P(e,s),a=n;if(n&&(Array.isArray(n)?-1===n.filter((function(e){return"object"===j(e)&&e})).findIndex((function(e){return e.color||e.colors}))&&(a[0].color="#000"):"object"===j(n)&&void 0===n.color&&void 0===n.colors&&(a.color="#000")),r.text="","string"==typeof r.children)r.text=de(r.children);else if("number"==typeof r.children)r.text=de(r.children.toString());else if(Array.isArray(r.children)){var o=r.children.filter((function(e){return"string"==typeof e||"number"==typeof e})).join("");o&&(r.text=de(o),r.children=r.text)}return i.a.createElement("p",N({ref:t,nativeName:"Text",style:a},r))}Cn.displayName="Text";var xn=i.a.forwardRef(Cn);xn.displayName="Text";var Nn=Object.freeze({__proto__:null,default:xn}),In=function(e){b(n,e);var t=w(n);function n(){return L(this,n),t.apply(this,arguments)}return R(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.style,r=e.imageStyle,a=e.imageRef,o=e.source,l=e.sources,u=e.src,s=e.srcs,f=e.tintColor,d=e.tintColors,p=P(e,c),h=this.getImageUrls({src:u,srcs:s,source:o,sources:l});if(1===h.length){var m=_(h,1);p.src=m[0]}else h.length>1&&(p.srcs=h);"string"==typeof p.defaultSource&&(p.defaultSource.indexOf("data:image/"),p.defaultSource=ke(p.defaultSource));var v=N({},n);return this.handleTintColor(v,f,d),p.style=v,t?i.a.createElement(En,{style:n},i.a.createElement("img",N(N({},p),{},{nativeName:"Image",alt:"",ref:a,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):i.a.createElement("img",N(N({},p),{},{nativeName:"Image",alt:"",ref:a}))}},{key:"getImageUrls",value:function(e){var t=e.src,n=e.srcs,r=e.source,i=e.sources,a=[];if("string"==typeof t&&a.push(t),Array.isArray(n)&&(a=[].concat(z(a),z(n))),r)if("string"==typeof r)a.push(r);else if("object"===j(r)&&null!==r){var o=r.uri;o&&a.push(o)}return i&&Array.isArray(i)&&i.forEach((function(e){"string"==typeof e?a.push(e):"object"===j(e)&&null!==e&&e.uri&&a.push(e.uri)})),a.length&&(a=a.map((function(e){return ke(e)}))),a}},{key:"handleTintColor",value:function(e,t,n){t&&Object.assign(e,{tintColor:t}),Array.isArray(n)&&Object.assign(e,{tintColors:n})}}],[{key:"resizeMode",get:function(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}},{key:"getSize",value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");var r=Ge(e);return"function"==typeof t&&r.then((function(e){return t(e.width,e.height)})),"function"==typeof n?r.catch(n):r.catch((function(t){"Failed to get size for image: ".concat(e)})),r}}]),n}(i.a.Component);In.prefetch=Ye;var Pn=function(){function e(){L(this,e),this.Value=e.Value}return R(e,null,[{key:"Value",value:function(e){return e}},{key:"timing",value:function(e,t){return new en({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}]),e}();Pn.View=En,Pn.Text=Nn,Pn.Image=In;var _n={step0:function(e){return e>0?1:0},step1:function(e){return e>=1?1:0},linear:function(){return"linear"},ease:function(){return"ease"},quad:function(e){return Math.pow(e,2)},cubic:function(e){return Math.pow(e,3)},poly:function(e){return function(t){return Math.pow(t,e)}},sin:function(e){return 1-Math.cos(e*Math.PI/2)},circle:function(e){return 1-Math.sqrt(1-e*e)},exp:function(e){return Math.pow(2,10*(e-1))},elastic:function(){return"elastic"},back:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.70158;return function(t){return t*t*((e+1)*t-e)}},bounce:function(e){var t=e;return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bezier:function(){return"bezier"},in:function(){return"ease-in"},out:function(){return"ease-out"},inOut:function(){return"ease-in-out"}};function Ln(e){return i.a.createElement("li",N({nativeName:"ListViewItem"},e))}var An=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.apply(this,arguments)).instance=null,e}return R(n,[{key:"expandPullHeader",value:function(){dt(this.instance,"expandPullHeader",[])}},{key:"collapsePullHeader",value:function(e){"android"===Kt.platform.OS?dt(this.instance,"collapsePullHeader",[e]):void 0!==e?dt(this.instance,"collapsePullHeaderWithOptions",[e]):dt(this.instance,"collapsePullHeader",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=P(t,f);return i.a.createElement("div",N({nativeName:"PullHeaderView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component),Rn=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.apply(this,arguments)).instance=null,e}return R(n,[{key:"expandPullFooter",value:function(){dt(this.instance,"expandPullFooter",[])}},{key:"collapsePullFooter",value:function(){dt(this.instance,"collapsePullFooter",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=P(t,d);return i.a.createElement("div",N({nativeName:"PullFooterView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component);Rn.defaultProps={sticky:!0};var zn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(E(r)),r.state={initialListReady:!1},r}return R(n,[{key:"componentDidMount",value:function(){this.props.getRowKey}},{key:"scrollToIndex",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&dt(this.instance,"scrollToIndex",[e,t,n])}},{key:"scrollToContentOffset",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&dt(this.instance,"scrollToContentOffset",[e,t,n])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.style,a=t.renderRow,o=t.renderPullHeader,l=t.renderPullFooter,u=t.getRowType,s=t.getRowStyle,c=t.getRowKey,f=t.dataSource,d=t.initialListSize,h=t.rowShouldSticky,m=t.onRowLayout,v=t.onHeaderPulling,y=t.onHeaderReleased,g=t.onFooterPulling,b=t.onFooterReleased,k=t.onAppear,w=t.onDisappear,S=t.onWillAppear,E=t.onWillDisappear,C=P(t,p),x=[];if("function"==typeof a){var I=this.state.initialListReady,_=this.props.numberOfRows,L=this.getPullHeader(o,v,y),A=this.getPullFooter(l,g,b);!_&&f&&(_=f.length),I||(_=Math.min(_,d||10));for(var R=function(t){var n={},r=void 0;r=f?a(f[t],null,t):a(t),e.handleRowProps(n,t,{getRowKey:c,getRowStyle:s,getRowType:u,onRowLayout:m,rowShouldSticky:h}),[{func:k,name:"onAppear"},{func:w,name:"onDisappear"},{func:S,name:"onWillAppear"},{func:E,name:"onWillDisappear"}].forEach((function(e){var r=e.func,i=e.name;"function"==typeof r&&(n[i]=function(){r(t)})})),r&&x.push(i.a.createElement(Ln,N({},n),r))},z=0;z<_;z+=1)R(z);L&&x.unshift(L),A&&x.push(A),"function"==typeof h&&Object.assign(C,{rowShouldSticky:!0});var T=[k,w,S,E];C.exposureEventEnabled=T.some((function(e){return"function"==typeof e})),"ios"===Kt.platform.OS&&(C.numberOfRows=x.length),C.initialListSize=d,C.style=N({},r)}return i.a.createElement("ul",N({ref:function(t){e.instance=t},nativeName:"ListView",initialListReady:this.handleInitialListReady},C),x.length?x:n)}},{key:"handleInitialListReady",value:function(){this.setState({initialListReady:!0})}},{key:"getPullHeader",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(An,{key:"pull-header",ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),a}},{key:"getPullFooter",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(Rn,{key:"pull-footer",ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),a}},{key:"handleRowProps",value:function(e,t,n){var r=n.getRowKey,i=n.getRowStyle,a=n.onRowLayout,o=n.getRowType,l=n.rowShouldSticky;if("function"==typeof r&&(e.key=r(t)),"function"==typeof i&&(e.style=i(t)),"function"==typeof a&&(e.onLayout=function(e){a(e,t)}),"function"==typeof o){var u=o(t);Number.isInteger(u),e.type=u}"function"==typeof l&&(e.sticky=l(t))}}]),n}(i.a.Component);zn.defaultProps={numberOfRows:0};var Tn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r.refreshComplected=r.refreshCompleted.bind(E(r)),r}return R(n,[{key:"startRefresh",value:function(){dt(this.instance,"startRefresh",null)}},{key:"refreshCompleted",value:function(){dt(this.instance,"refreshComplected",null)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=P(t,h);return i.a.createElement("div",N({nativeName:"RefreshWrapper",ref:function(t){e.instance=t}},r),i.a.createElement("div",{nativeName:"RefreshWrapperItemView",style:{left:0,right:0,position:"absolute"}},this.getRefresh()),n)}},{key:"getRefresh",value:function(){var e=this.props.getRefresh;return"function"==typeof e&&e()||null}}]),n}(i.a.Component),On=function(){function e(){L(this,e),this.top=null,this.size=0}return R(e,[{key:"push",value:function(e){this.top={data:e,next:this.top},this.size+=1}},{key:"peek",value:function(){return null===this.top?null:this.top.data}},{key:"pop",value:function(){if(null===this.top)return null;var e=this.top;return this.top=this.top.next,this.size>0&&(this.size-=1),e.data}},{key:"clear",value:function(){this.top=null,this.size=0}},{key:"displayAll",value:function(){var e=[];if(null===this.top)return e;for(var t=this.top,n=0,r=this.size;n1&&this.pop({animated:!0})}},{key:"push",value:function(e){if(null==e?void 0:e.component){if(!this.routeList[e.routeName])new wn({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0;delete e.component}var t=[e];this.stack.push(e),dt(this.instance,"push",t)}},{key:"pop",value:function(e){if(this.stack.size>1){var t=[e];this.stack.pop(),dt(this.instance,"pop",t)}}},{key:"clear",value:function(){this.stack.clear()}},{key:"render",value:function(){var e=this,t=this.props,n=t.initialRoute,r=(n.component,P(n,m)),a=P(t,v);return a.initialRoute=r,i.a.createElement("div",N({nativeName:"Navigator",ref:function(t){e.instance=t}},a))}}]),n}(i.a.Component);function Fn(e){return i.a.createElement("div",N(N({nativeName:"ViewPagerItem"},e),{},{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}var Hn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r.setPage=r.setPage.bind(E(r)),r.setPageWithoutAnimation=r.setPageWithoutAnimation.bind(E(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(E(r)),r}return R(n,[{key:"onPageScrollStateChanged",value:function(e){var t=this.props.onPageScrollStateChanged;t&&t(e.pageScrollState)}},{key:"setPage",value:function(e){"number"==typeof e&&dt(this.instance,"setPage",[e])}},{key:"setPageWithoutAnimation",value:function(e){"number"==typeof e&&dt(this.instance,"setPageWithoutAnimation",[e])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.onPageScrollStateChanged,a=P(t,y),o=[];return Array.isArray(n)?o=n.map((function(e){var t={};return"string"==typeof e.key&&(t.key="viewPager_".concat(e.key)),i.a.createElement(Fn,N({},t),e)})):o.push(i.a.createElement(Fn,null,n)),"function"==typeof r&&(a.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",N({nativeName:"ViewPager",ref:function(t){e.instance=t}},a),o)}}]),n}(i.a.Component);function Mn(){var e=B.platform.Localization;return!!e&&1===e.direction}var Dn={caretColor:"caret-color"},Un=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r._lastNativeText="",r.onChangeText=r.onChangeText.bind(E(r)),r.onKeyboardWillShow=r.onKeyboardWillShow.bind(E(r)),r}return R(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.value,n=e.autoFocus;this._lastNativeText=t,n&&this.focus()}},{key:"componentWillUnmount",value:function(){this.blur()}},{key:"getValue",value:function(){var e=this;return new Promise((function(t){dt(e.instance,"getValue",(function(e){return t(e.text)}))}))}},{key:"setValue",value:function(e){return dt(this.instance,"setValue",[e]),e}},{key:"focus",value:function(){dt(this.instance,"focusTextInput",[])}},{key:"blur",value:function(){dt(this.instance,"blurTextInput",[])}},{key:"showInputMethod",value:function(){}},{key:"hideInputMethod",value:function(){}},{key:"clear",value:function(){dt(this.instance,"clear",[])}},{key:"render",value:function(){var e=this,t=N({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors","caretColor","caret-color"].forEach((function(n){var r=n,i=e.props[n];"string"==typeof e.props[n]&&(Dn[n]&&(r=Dn[n]),Array.isArray(t.style)?t.style.push({[r]:i}):t.style&&"object"===j(t.style)?t.style[r]=i:t.style={[r]:i},delete t[n])})),Mn()&&(t.style?"object"!==j(t.style)||Array.isArray(t.style)||t.style.textAlign||(t.style.textAlign="right"):t.style={textAlign:"right"}),i.a.createElement("div",N(N({nativeName:"TextInput"},t),{},{ref:function(t){e.instance=t},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}},{key:"onChangeText",value:function(e){var t=this.props.onChangeText;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}},{key:"onKeyboardWillShow",value:function(e){var t=this.props.onKeyboardWillShow;"function"==typeof t&&t(e)}}]),n}(i.a.Component),Bn=Kt.window.scale,Wn=Math.round(.4*Bn)/Bn;function Vn(e){return e}0===Wn&&(Wn=1/Bn);var $n=Object.freeze({__proto__:null,get hairlineWidth(){return Wn},create:Vn}),qn={baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerVertical:{collapsable:!1,flexDirection:"column"},contentContainerHorizontal:{collapsable:!1,flexDirection:"row"}},Qn=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.apply(this,arguments)).instance=null,e}return R(n,[{key:"scrollTo",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e,i=t,a=n;"number"==typeof e||"object"===j(e)&&e&&(r=e.x,i=e.y,a=e.animated),r=r||0,i=i||0,a=!!a,dt(this.instance,"scrollTo",[r,i,a])}},{key:"scrollToWithDuration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;dt(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}},{key:"render",value:function(){var e=this,t=this.props,n=t.horizontal,r=t.contentContainerStyle,a=t.children,o=t.style,l=[n?qn.contentContainerHorizontal:qn.contentContainerVertical,r],u=n?Object.assign({},qn.baseHorizontal,o):Object.assign({},qn.baseVertical,o);return n&&(u.flexDirection=Mn()?"row-reverse":"row"),i.a.createElement("div",N(N({nativeName:"ScrollView",ref:function(t){e.instance=t}},this.props),{},{style:u}),i.a.createElement(En,{style:l},a))}}]),n}(i.a.Component),Kn={modal:{position:"absolute",collapsable:!1}},Gn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).eventSubscription=null,r}return R(n,[{key:"componentDidMount",value:function(){var e=this;"ios"===Kt.platform.OS&&(this.eventSubscription=new Ae("modalDismissed"),this.eventSubscription.addCallback((function(t){var n=e.props,r=n.primaryKey,i=n.onDismiss;t.primaryKey===r&&"function"==typeof i&&i()})))}},{key:"componentWillUnmount",value:function(){"ios"===Kt.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.visible,r=e.transparent,a=e.animated,o=this.props.animationType;if(!1===n)return null;var l={backgroundColor:r?"transparent":"white"};return o||(o="none",a&&(o="slide")),i.a.createElement("div",N({nativeName:"Modal",animationType:o,transparent:r,style:[Kn.modal,l]},this.props),t)}}]),n}(i.a.Component);Gn.defaultProps={visible:!0};var Yn=function(e){b(n,e);var t=w(n);function n(e){var r;L(this,n);var i=(r=t.call(this,e)).props.requestFocus;return r.state={isFocus:!!i},r.handleFocus=r.handleFocus.bind(E(r)),r}return R(n,[{key:"render",value:function(){var e,t,n,r,a=this.props,o=a.requestFocus,l=a.children,u=a.nextFocusDownId,s=a.nextFocusUpId,c=a.nextFocusLeftId,f=a.nextFocusRightId,d=a.style,p=a.noFocusStyle,h=a.focusStyle,m=a.onClick,v=this.state.isFocus,y=i.a.Children.only(l);(null===(t=null===(e=null==y?void 0:y.child)||void 0===e?void 0:e.memoizedProps)||void 0===t?void 0:t.nativeName)?r=y.child.memoizedProps.nativeName:(null===(n=null==y?void 0:y.type)||void 0===n?void 0:n.displayName)&&(r=y.type.displayName);var g=u&&ft(u),b=s&&ft(s),k=c&&ft(c),w=f&&ft(f),S=d;if("Text"!==r){var E=y.memoizedProps.style;S=N(N({},S),E)}if(Object.assign(S,v?h:p),"Text"===r)return i.a.createElement(En,{focusable:!0,nextFocusDownId:g,nextFocusUpId:b,nextFocusLeftId:k,nextFocusRightId:w,requestFocus:o,style:S,onClick:m,onFocus:this.handleFocus},y);var C=y.memoizedProps.children;return i.a.cloneElement(y,{nextFocusDownId:u,nextFocusUpId:s,nextFocusLeftId:c,nextFocusRightId:f,requestFocus:o,onClick:m,focusable:!0,children:C,style:S,onFocus:this.handleFocus})}},{key:"handleFocus",value:function(e){var t=this.props.onFocus;"function"==typeof t&&t(e),this.state.isFocus!==e.focus&&this.setState({isFocus:e.focus})}}]),n}(i.a.Component);function Xn(e){return i.a.createElement("iframe",N({title:"hippy",nativeName:"WebView"},e))}var Jn,Zn=function(){function e(t,n,r){var i=this;if(L(this,e),this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),Jn||(Jn=new Ae("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!t||"string"!=typeof t)throw new TypeError("Invalid WebSocket url");var a=N({},r);if(void 0!==n)if(Array.isArray(n)&&n.length>0)a["Sec-WebSocket-Protocol"]=n.join(",");else{if("string"!=typeof n)throw new TypeError("Invalid WebSocket protocols");a["Sec-WebSocket-Protocol"]=n}var o={headers:a,url:t};this.url=t,this.webSocketCallbackId=Jn.addCallback(this.onWebSocketEvent),U.callNativeWithPromise("websocket","connect",o).then((function(e){e&&0===e.code&&"number"==typeof e.id&&(i.webSocketId=e.id)}))}return R(e,[{key:"close",value:function(e,t){1===this.readyState&&(this.readyState=2,U.callNative("websocket","close",{id:this.webSocketId,code:e,reason:t}))}},{key:"send",value:function(e){if(1===this.readyState){if("string"!=typeof e)throw new TypeError("Unsupported websocket data type: ".concat(j(e)));U.callNative("websocket","send",{id:this.webSocketId,data:e})}}},{key:"onopen",set:function(e){this.webSocketCallbacks.onOpen=e}},{key:"onclose",set:function(e){this.webSocketCallbacks.onClose=e}},{key:"onerror",set:function(e){this.webSocketCallbacks.onError=e}},{key:"onmessage",set:function(e){this.webSocketCallbacks.onMessage=e}},{key:"onWebSocketEvent",value:function(e){if("object"===j(e)&&e.id===this.webSocketId){var t=e.type;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,Jn.removeCallback(this.webSocketCallbackId));var n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}}]),e}();function er(e){return i.a.createElement("li",N({nativeName:"WaterfallItem"},e))}var tr=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(E(r)),r}return R(n,[{key:"scrollToIndex",value:function(e){var t=e.index,n=void 0===t?0:t,r=e.animated,i=void 0===r||r;dt(this.instance,"scrollToIndex",[n,n,i])}},{key:"scrollToContentOffset",value:function(e){var t=e.xOffset,n=void 0===t?0:t,r=e.yOffset,i=void 0===r?0:r,a=e.animated,o=void 0===a||a;dt(this.instance,"scrollToContentOffset",[n,i,o])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"render",value:function(){var e=this,t=this.props,n=t.style,r=void 0===n?{}:n,a=t.renderBanner,o=t.numberOfColumns,l=void 0===o?2:o,u=t.columnSpacing,s=void 0===u?0:u,c=t.interItemSpacing,f=void 0===c?0:c,d=t.numberOfItems,p=void 0===d?0:d,h=t.preloadItemNumber,m=void 0===h?0:h,v=t.renderItem,y=t.renderPullHeader,b=t.renderPullFooter,k=t.getItemType,w=t.getItemKey,S=t.getItemStyle,E=t.contentInset,C=void 0===E?{top:0,left:0,bottom:0,right:0}:E,x=t.onItemLayout,I=t.onHeaderPulling,_=t.onHeaderReleased,L=t.onFooterPulling,A=t.onFooterReleased,R=t.containPullHeader,z=void 0!==R&&R,T=t.containPullFooter,O=void 0!==T&&T,j=t.containBannerView,F=void 0!==j&&j,H=N(N({},P(t,g)),{},{style:r,numberOfColumns:l,columnSpacing:s,interItemSpacing:f,preloadItemNumber:m,contentInset:C,containPullHeader:z,containPullFooter:O,containBannerView:F}),M=[];if("function"==typeof a){var D=a();D&&(M.push(i.a.createElement(En,{key:"bannerView"},i.a.cloneElement(D))),H.containBannerView=!0)}if("function"==typeof v){for(var U=this.getPullHeader(y,I,_),B=this.getPullFooter(b,L,A),W=0;W0||e.didTimeout)&&function e(t){"number"==typeof t?ee(t):t&&(ee(t.nodeId),Array.isArray(t.childNodes)&&t.childNodes.forEach((function(t){return e(t)})))}(t)}),{timeout:50})}var ie=0,ae=1,oe={onTouchStart:["onTouchStart","onTouchDown"],onPress:["onPress","onClick"]},le={onClick:"click",onLongClick:"longclick",onPressIn:"pressin",onPressOut:"pressout",onTouchDown:"touchstart",onTouchStart:"touchstart",onTouchEnd:"touchend",onTouchMove:"touchmove",onTouchCancel:"touchcancel"};function ue(e){return e.replace(/^(on)?/g,"").toLocaleLowerCase()}var se=new RegExp(/^\d+$/),ce=!1;function fe(){}function de(e){return e.replace(/\\u[\dA-F]{4}|\\x[\dA-F]{2}/gi,(function(e){return String.fromCharCode(parseInt(e.replace(/\\u|\\x/g,""),16))}))}var pe=new RegExp("^on.+Capture$");function he(e){return pe.test(e)}var me=new RegExp("^(?=.+)[+-]?\\d*\\.?\\d*([Ee][+-]?\\d+)?$");function ve(e){if("number"==typeof e)return e;if("string"==typeof e&&me.test(e))try{return parseFloat(e)}catch(t){return e}return e}function ye(e){return"[object Function]"===Object.prototype.toString.call(e)}function ge(e){e}function be(){return ce}function ke(e){if(e&&!/^(http|https):\/\//.test(e)&&e.indexOf("assets")>-1){return"".concat("hpfile://","./").concat(e)}return e}function we(e){return 5===e}var Se=function(){function e(t){L(this,e),this.handlerContainer={},this.nextIdForHandler=0,this.eventName=t}return R(e,[{key:"getEventListeners",value:function(){var e=this;return Object.keys(this.handlerContainer).filter((function(t){return e.handlerContainer[t]})).map((function(t){return e.handlerContainer[t]}))}},{key:"getHandlerSize",value:function(){return Object.keys(this.handlerContainer).length}},{key:"addEventHandler",value:function(e,t){if(!e)throw new TypeError("Invalid arguments for addEventHandler");var n=this.nextIdForHandler;this.nextIdForHandler+=1;var r={id:n,eventHandler:e,context:t},i="eventHandler_".concat(n);return this.handlerContainer[i]=r,n}},{key:"notifyEvent",value:function(e){var t=this;Object.keys(this.handlerContainer).forEach((function(n){var r=t.handlerContainer[n];r&&r.eventHandler&&(r.context?r.eventHandler.call(r.context,e):r.eventHandler(e))}))}},{key:"removeEventHandler",value:function(e){if("number"!=typeof e)throw new TypeError("Invalid arguments for removeEventHandler");var t="eventHandler_".concat(e);this.handlerContainer[t]&&delete this.handlerContainer[t]}}]),e}(),Ee=function(){function e(t,n,r){L(this,e),this.type=t,this.bubbles=!0,this.timeStamp=Date.now(),this.currentTarget=n,this.target=r}return R(e,[{key:"stopPropagation",value:function(){this.bubbles=!1}},{key:"preventDefault",value:function(){}}]),e}(),Ce=new Map,xe=["%c[event]%c","color: green","color: auto"];function Ne(e,t){var n=e;if(t.memoizedProps&&!t.memoizedProps[e])for(var r=Object.keys(oe),i=0;i0)for(var l,u=!1,s=te(n);!u&&void 0!==(l=r.shift());)try{var c=l,f=c.eventName,d=c.currentTarget,p=c.listener,h=c.isCapture,m=new Ee(f,d,s);Object.assign(m,t),h?(p(m),m.bubbles||(u=!0)):("boolean"!=typeof(u=p(m))&&(u=!be()),m.bubbles||(u=!0))}catch(e){console.reportUncaughtException(e)}}(r,e,a):function(e,t,n){var r=!1,i=n,a=e,o=te(n);do{if(Ie(a=Ne(a,i),i))try{var l=te(i),u=new Ee(a,l,o);Object.assign(u,t),"boolean"!=typeof(r=i.memoizedProps[a](u))&&(r=!be()),u.bubbles||(r=!0)}catch(e){console.reportUncaughtException(e)}if(!1===r)for(i=i.return;i&&!we(i.tag);)i=i.return}while(!r&&i)}(r,e,a)}}},receiveUIComponentEvent:function(e){if(fe.apply(void 0,xe.concat(["receiveUIComponentEvent",e])),e&&Array.isArray(e)&&!(e.length<2)){var t=_(e,3),n=t[0],r=t[1],i=t[2];if("number"==typeof n&&"string"==typeof r){var a=ne(n);a&&Ie(r,a)&&a.memoizedProps[r](i)}}}};e.__GLOBAL__&&(e.__GLOBAL__.jsModuleList.EventDispatcher=_e);var Le=function(){function e(t,n){L(this,e),this.callback=t,this.bindListener=n}return R(e,[{key:"remove",value:function(){"number"==typeof this.callback&&this.bindListener&&(this.bindListener.removeCallback(this.callback),this.bindListener=void 0)}}]),e}(),Ae=function(){function e(t){L(this,e),this.eventName=t,this.listenerIdList=[]}return R(e,[{key:"unregister",value:function(){var e=_e.getHippyEventHub(this.eventName);if(!e)throw new ReferenceError("No listeners for ".concat(this.eventName));for(var t=this.listenerIdList.length,n=0;n255?255:t}function De(e){var t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function Ue(e,t,n){var r=n;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function Be(e,t,n){var r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=Ue(i,r,e+1/3),o=Ue(i,r,e),l=Ue(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*l)<<8}function We(e){return(parseFloat(e)%360+360)%360/360}function Ve(e){var t=parseFloat(e);return t<0?0:t>100?1:t/100}function $e(e){if(Number.isInteger(e))return e;var t=function(e){var t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=He.hex6.exec(e),Array.isArray(t)?parseInt("".concat(t[1],"ff"),16)>>>0:Object.hasOwnProperty.call(Oe,e)?Oe[e]:(t=He.rgb.exec(e),Array.isArray(t)?(Me(t[1])<<24|Me(t[2])<<16|Me(t[3])<<8|255)>>>0:(t=He.rgba.exec(e))?(Me(t[1])<<24|Me(t[2])<<16|Me(t[3])<<8|De(t[4]))>>>0:(t=He.hex3.exec(e))?parseInt("".concat(t[1]+t[1]+t[2]+t[2]+t[3]+t[3],"ff"),16)>>>0:(t=He.hex8.exec(e))?parseInt(t[1],16)>>>0:(t=He.hex4.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=He.hsl.exec(e))?(255|Be(We(t[1]),Ve(t[2]),Ve(t[3])))>>>0:(t=He.hsla.exec(e))?(Be(We(t[1]),Ve(t[2]),Ve(t[3]))|De(t[4]))>>>0:null))}(e);return null===t?0:t=(t<<24|t>>>8)>>>0}function qe(e){return Array.isArray(e)?e.map((function(e){return $e(e)})):[0]}var Qe=Object.freeze({__proto__:null,getString:function(){return U.callNativeWithPromise("ClipboardModule","getString")},setString:function(e){U.callNative("ClipboardModule","setString",e)}});var Ke=Object.freeze({__proto__:null,getCookies:function(e){return U.callNativeWithPromise("network","getCookie",e)},setCookie:function(e,t,n){var r="";"string"==typeof n&&(r=n),n instanceof Date&&(r=n.toUTCString()),U.callNative("network","setCookie",e,t,r)}});function Ge(e){return U.callNativeWithPromise("ImageLoaderModule","getSize",e)}function Ye(e){U.callNative("ImageLoaderModule","prefetch",e)}var Xe,Je=Object.freeze({__proto__:null,getSize:Ge,prefetch:Ye}),Ze=new Map,et=function(){function e(t,n){L(this,e),this.eventName=t,this.listener=n}return R(e,[{key:"remove",value:function(){this.eventName&&this.listener&&(tt(this.eventName,this.listener),this.listener=void 0)}}]),e}();function tt(e,t){if(t instanceof et)t.remove();else{var n=e;"change"===e&&(n="networkStatusDidChange"),Xe.listenerSize(n)<=1&&U.callNative("NetInfo","removeListener",n);var r=Ze.get(t);r&&(r.remove(),Ze.delete(t))}}var nt=Object.freeze({__proto__:null,addEventListener:function(e,t){var n=e;n&&"change"===n&&(n="networkStatusDidChange"),(Xe=new ze).listenerSize(n)<1&&U.callNative("NetInfo","addListener",n);var r=Xe.addListener(n,(function(e){t(e)}));return Ze.set(t,r),new et(n,t)},removeEventListener:tt,fetch:function(){return U.callNativeWithPromise("NetInfo","getCurrentConnectivity").then((function(e){return e.network_info}))}}),rt=W.createNode,it=W.updateNode,at=W.deleteNode,ot=W.flushBatch,lt=W.endBatch,ut=W.sendRenderError,st=function(e){return J((function(t){return t.stateNode&&t.stateNode.nodeId===e}))};function ct(e){if(e instanceof mn)return e;var t=e._reactInternalFiber||e._reactInternals;if(null==t?void 0:t.child){for(var n=t.child;n&&!(n.stateNode instanceof mn);)n=n.child;return n&&n.stateNode?n.stateNode:null}return null}function ft(e){var t=e;if("string"==typeof e){"getNodeIdByRef('".concat(e,"') use string ref will affect to performance, recommend use reference to the ref instead");var n=J((function(t){return!!(t.return&&t.return.ref&&t.return.ref._stringRef)&&t.return.ref._stringRef===e}));if(!n||!n.stateNode)return 0;t=n.stateNode}if(!t.nodeId){var r=ct(t);return r?r.nodeId:0}return t.nodeId}function dt(e,t){var n=e.nativeName,r=e.nodeId;if(!r||!n){var i=ct(e);i&&(r=i.nodeId,n=i.nativeName)}if(!n)throw new Error("callUIFunction is calling a unnamed component");if(!r)throw new Error("callUIFunction is calling a component have no nodeId");for(var a=arguments.length,o=new Array(a>2?a-2:0),l=2;l0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;e.forEach((function(e){if(e){var n=e.id;e.eventList.forEach((function(e){var r,i=e.name,a=e.type,o=e.listener;r=It(i)?le[i]:ue(i),a===ae&&t.RemoveEventListener(n,r,o),a===ie&&t.AddEventListener(n,r,o)}))}}))}function _t(t){var n=function(e){for(var t=[],n=0;n0&&void 0!==arguments[0]&&arguments[0];if(xt)if(xt=!1,0!==Nt.length){var t=X();e?(_t(t),Nt=[],xt=!0):Promise.resolve().then((function(){_t(t),Nt=[],xt=!0}))}else xt=!0}function At(e){var t=e.attributes;t.children;return P(t,l)}function Rt(e,t){var n;if(!t.nativeName)return{};if(t.meta.skipAddToDom)return{};if(!t.meta.component)throw new Error("Specific tag is not supported yet: ".concat(t.tagName));return{nativeNode:{id:t.nodeId,pId:(null===(n=t.parentNode)||void 0===n?void 0:n.nodeId)||e,index:t.index,name:t.nativeName,props:N(N({},At(t)),{},{style:t.style})},eventNode:function(e){var t=void 0,n=e.events;if(n){var r=[];Object.keys(n).forEach((function(t){var i=n[t],a=i.name,o=i.type,l=i.isCapture,u=i.listener;e.isListenerHandled(t,o)||(e.setListenerHandledType(t,o),r.push({name:a,type:o,isCapture:l,listener:u}))})),t={id:e.nodeId,eventList:r}}return t}(t)}}function zt(e,t,n,r){var i=[],a=[],o=n;return void 0===o&&t&&t.parentNode&&(o=t.parentNode.childNodes.indexOf(t)),t.traverseChildren((function(t){var n=Rt(e,t),o=n.nativeNode,l=n.eventNode;o&&i.push(o),l&&a.push(l),"function"==typeof r&&r(t)}),o),{nativeLanguages:i,eventLanguages:a}}function Tt(e){return!!F&&e instanceof F.containerInfo.constructor}function Ot(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(e&&t&&!t.meta.skipAddToDom){var r=X();if(Tt(e)&&!e.isMounted){var i=zt(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)})),a=i.nativeLanguages,o=i.eventLanguages;Nt.push({type:Ct.createNode,nodes:a,eventNodes:o})}else if(e.isMounted&&!t.isMounted){var l=zt(r,t,n,(function(e){e.isMounted||(e.isMounted=!0)})),u=l.nativeLanguages,s=l.eventLanguages;Nt.push({type:Ct.createNode,nodes:u,eventNodes:s})}}}function jt(e,t,n){if(t&&!t.meta.skipAddToDom){t.isMounted=!1,t.index=n;var r=X(),i=[{id:t.nodeId,pId:t.parentNode?t.parentNode.nodeId:r,index:t.index}];Nt.push({type:Ct.deleteNode,nodes:i,eventNodes:[]})}}function Ft(e){if(e.isMounted){var t=Rt(X(),e),n=t.nativeNode,r=t.eventNode;n&&Nt.push({type:Ct.updateNode,nodes:[n],eventNodes:[r]})}}var Ht=setTimeout,Mt=clearTimeout,Dt=Object.freeze({__proto__:null,commitMutationEffectsBegin:function(){},commitMutationEffectsComplete:function(){Lt(!0)},getCurrentEventPriority:function(){return 16},scheduleTimeout:Ht,cancelTimeout:Mt,noTimeout:-1,afterActiveInstanceBlur:function(){},appendChild:function(e,t){e.childNodes.indexOf(t)>=0&&e.removeChild(t),e.appendChild(t)},appendChildToContainer:function(e,t){e.appendChild(t)},appendInitialChild:function(e,t){e.appendChild(t)},beforeActiveInstanceBlur:function(){},commitMount:function(){},commitTextUpdate:function(){},commitUpdate:function(e,t,n,r,i,a){Z(a,e.nodeId);var o=Object.keys(t||{});if(0!==o.length){var l=o.map((function(e){return[e,t[e]]}));e.setAttributes(l)}},clearContainer:function(){},createContainerChildSet:function(){},createInstance:function(e,t,n,r,i){var a=n.createElement(e);return Object.keys(t).forEach((function(e){switch(e){case"children":break;case"nativeName":a.meta.component.name=t.nativeName;break;default:a.setAttribute(e,t[e])}})),[5,7].indexOf(i.tag)<0&&(a.meta.skipAddToDom=!0),Z(i,a.nodeId),a},createTextInstance:function(e,t,n,r){var i=t.createElement("p");return i.setAttribute("text",de(e)),i.meta={component:{name:"Text"}},Z(r,i.nodeId),i},detachDeletedInstance:function(){},finalizeContainerChildren:function(){},finalizeInitialChildren:function(){return!0},getChildHostContext:function(){return{}},getPublicInstance:function(e){return e},getInstanceFromNode:function(){throw new Error("Not yet implemented.")},getFundamentalComponentInstance:function(){throw new Error("Not yet implemented.")},getRootHostContext:function(){return{}},hideInstance:function(e){var t={style:{display:"none"}};Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])}))},hideTextInstance:function(){throw new Error("Not yet implemented.")},insertBefore:function(e,t,n){e.childNodes.indexOf(t)>=0?e.moveChild(t,n):e.insertBefore(t,n)},isOpaqueHydratingObject:function(){throw new Error("Not yet implemented")},makeClientId:function(){throw new Error("Not yet implemented")},makeClientIdInDEV:function(){throw new Error("Not yet implemented")},makeOpaqueHydratingObject:function(){throw new Error("Not yet implemented.")},mountFundamentalComponent:function(){throw new Error("Not yet implemented.")},prepareForCommit:function(){return null},preparePortalMount:function(){},prepareUpdate:function(e,t,n,r){var i={};return Object.keys(n).forEach((function(e){var t=n[e],a=r[e];null!=t&&null==a&&(i[e]=a)})),Object.keys(r).forEach((function(e){var t=n[e],a=r[e];switch(e){case"children":t===a||"number"!=typeof a&&"string"!=typeof a||(i[e]=a);break;default:null!=a&&null==t?i[e]=a:"function"==typeof a||function e(t,n){if(t===n)return!0;if(t&&n&&"object"==j(t)&&"object"==j(n)){var r,i,a,o=kt(t),l=kt(n);if(o&&l){if((i=t.length)!=n.length)return!1;for(r=i;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(o!=l)return!1;var u=t instanceof Date,s=n instanceof Date;if(u!=s)return!1;if(u&&s)return t.getTime()==n.getTime();var c=t instanceof RegExp,f=n instanceof RegExp;if(c!=f)return!1;if(c&&f)return t.toString()==n.toString();var d=wt(t);if((i=d.length)!==wt(n).length)return!1;for(r=i;0!=r--;)if(!St.call(n,d[r]))return!1;for(r=i;0!=r--;)if(!e(t[a=d[r]],n[a]))return!1;return!0}return t!=t&&n!=n}(t,a)||(i[e]=a)}})),i},replaceContainerChildren:function(){},removeChild:function(e,t){e.removeChild(t),re(t)},removeChildFromContainer:function(e,t){e.removeChild(t),re(t)},resetAfterCommit:function(){},resetTextContent:function(){},unmountFundamentalComponent:function(){throw new Error("Not yet implemented.")},updateFundamentalComponent:function(){throw new Error("Not yet implemented.")},unhideTextInstance:function(){throw new Error("Not yet implemented.")},unhideInstance:function(e,t){var n=N(N({},t),{},{style:N(N({},t.style),{},{display:"flex"})});Object.keys(n).forEach((function(t){return e.setAttribute(t,n[t])}))},shouldDeprioritizeSubtree:function(){return!0},shouldUpdateFundamentalComponent:function(){throw new Error("Not yet implemented.")},shouldSetTextContent:function(e,t){if(t&&"Text"===t.nativeName||-1!==["p","span"].indexOf(e)){var n=t.children;return"string"==typeof n||"number"==typeof n}return!1}}),Ut=o()(N(N({},Dt),{},{clearTimeout:clearTimeout,setTimeout:setTimeout,isPrimaryRenderer:!0,noTimeout:-1,supportsMutation:!0,supportsHydration:!1,supportsPersistence:!1,now:Date.now,scheduleDeferredCallback:function(){},cancelDeferredCallback:function(){}})),Bt=Ut.flushSync,Wt=K.addEventListener,Vt=K.removeEventListener,$t=K.dispatchEvent,qt=K.AsyncStorage,Qt=K.Bridge,Kt=K.Device,Gt=K.HippyRegister,Yt=Object.freeze({__proto__:null,addEventListener:Wt,removeEventListener:Vt,dispatchEvent:$t,AsyncStorage:qt,BackAndroid:bt,Bridge:Qt,Clipboard:Qe,Cookie:Ke,Device:Kt,HippyRegister:Gt,ImageLoader:Je,NetworkInfo:nt,UIManager:ht,flushSync:Bt});function Xt(e){return"loop"===e?-1:e}var Jt=new ze;function Zt(e,t){return"color"===e&&["number","string"].indexOf(j(t))>=0?$e(t):t}var en=function(){function e(t){var n;L(this,e);var r=0;if((null===(n=t.startValue)||void 0===n?void 0:n.constructor)&&"Animation"===t.startValue.constructor.name)r={animationId:t.startValue.animationId};else{var i=t.startValue;r=Zt(t.valueType,i)}var a=Zt(t.valueType,t.toValue);this.mode=t.mode||"timing",this.delay=t.delay||0,this.startValue=r||0,this.toValue=a||0,this.valueType=t.valueType||void 0,this.duration=t.duration||0,this.direction=t.direction||"center",this.timingFunction=t.timingFunction||"linear",this.repeatCount=Xt(t.repeatCount||0),this.inputRange=t.inputRange||[],this.outputRange=t.outputRange||[],this.animationId=Qt.callNativeWithCallbackId("AnimationModule","createAnimation",!0,this.mode,Object.assign({delay:this.delay,startValue:this.startValue,toValue:this.toValue,duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{})),this.destroy=this.destroy.bind(this),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}return R(e,[{key:"removeEventListener",value:function(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}},{key:"start",value:function(){var e=this;this.removeEventListener();"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=Jt.addListener("".concat("onAnimation","Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=Jt.addListener("".concat("onAnimation","End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=Jt.addListener("".concat("onAnimation","Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=Jt.addListener("".concat("onAnimation","Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Qt.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),Qt.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Qt.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Qt.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"updateAnimation",value:function(t){var n=this;if("object"!==j(t))throw new TypeError("Invalid arguments");if("string"==typeof t.mode&&t.mode!==this.mode)throw new TypeError("Update animation mode not supported");Object.keys(t).forEach((function(r){var i=t[r];if("startValue"===r){var a=0;if(t.startValue instanceof e)a={animationId:t.startValue.animationId};else{var o=t.startValue;a=Zt(n.valueType,o)}n.startValue=a||0}else"repeatCount"===r?n.repeatCount=Xt(t.repeatCount||0):Object.defineProperty(n,r,{value:i})})),Qt.callNative("AnimationModule","updateAnimation",this.animationId,Object.assign({delay:this.delay,startValue:this.startValue,toValue:Zt(this.valueType,this.toValue),duration:this.duration,direction:this.direction,timingFunction:this.timingFunction,repeatCount:this.repeatCount,inputRange:this.inputRange,outputRange:this.outputRange},this.valueType?{valueType:this.valueType}:{}))}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}]),e}(),tn=new ze,nn=function(){function e(t){var n=this;L(this,e),this.animationList=[],t.children.forEach((function(e){n.animationList.push({animationId:e.animation.animationId,follow:e.follow||!1})})),this.animationId=Qt.callNativeWithCallbackId("AnimationModule","createAnimationSet",!0,{repeatCount:Xt(t.repeatCount||0),children:this.animationList,virtual:t.virtual}),this.onRNfqbAnimationStart=this.onAnimationStart.bind(this),this.onRNfqbAnimationEnd=this.onAnimationEnd.bind(this),this.onRNfqbAnimationCancel=this.onAnimationCancel.bind(this),this.onRNfqbAnimationRepeat=this.onAnimationRepeat.bind(this),this.onHippyAnimationStart=this.onAnimationStart.bind(this),this.onHippyAnimationEnd=this.onAnimationEnd.bind(this),this.onHippyAnimationCancel=this.onAnimationCancel.bind(this),this.onHippyAnimationRepeat=this.onAnimationRepeat.bind(this)}return R(e,[{key:"removeEventListener",value:function(){this.animationStartListener&&this.animationStartListener.remove(),this.animationEndListener&&this.animationEndListener.remove(),this.animationCancelListener&&this.animationCancelListener.remove(),this.animationRepeatListener&&this.animationRepeatListener.remove()}},{key:"start",value:function(){var e=this;this.removeEventListener();"function"==typeof this.onAnimationStartCallback&&(this.animationStartListener=tn.addListener("".concat("onAnimation","Start"),(function(t){t===e.animationId&&(e.animationStartListener.remove(),"function"==typeof e.onAnimationStartCallback&&e.onAnimationStartCallback())}))),"function"==typeof this.onAnimationEndCallback&&(this.animationEndListener=tn.addListener("".concat("onAnimation","End"),(function(t){t===e.animationId&&(e.animationEndListener.remove(),"function"==typeof e.onAnimationEndCallback&&e.onAnimationEndCallback())}))),"function"==typeof this.onAnimationCancelCallback&&(this.animationCancelListener=tn.addListener("".concat("onAnimation","Cancel"),(function(t){t===e.animationId&&(e.animationCancelListener.remove(),"function"==typeof e.onAnimationCancelCallback&&e.onAnimationCancelCallback())}))),"function"==typeof this.onAnimationRepeatCallback&&(this.animationRepeatListener=tn.addListener("".concat("onAnimation","Repeat"),(function(t){t===e.animationId&&"function"==typeof e.onAnimationRepeatCallback&&e.onAnimationRepeatCallback()}))),Qt.callNative("AnimationModule","startAnimation",this.animationId)}},{key:"destory",value:function(){this.destroy()}},{key:"destroy",value:function(){this.removeEventListener(),this.animationList.forEach((function(e){return Number.isInteger(e.animationId)&&Qt.callNative("AnimationModule","destroyAnimation",e.animationId)})),Qt.callNative("AnimationModule","destroyAnimation",this.animationId)}},{key:"pause",value:function(){Qt.callNative("AnimationModule","pauseAnimation",this.animationId)}},{key:"resume",value:function(){Qt.callNative("AnimationModule","resumeAnimation",this.animationId)}},{key:"onAnimationStart",value:function(e){this.onAnimationStartCallback=e}},{key:"onAnimationEnd",value:function(e){this.onAnimationEndCallback=e}},{key:"onAnimationCancel",value:function(e){this.onAnimationCancelCallback=e}},{key:"onAnimationRepeat",value:function(e){this.onAnimationRepeatCallback=e}}]),e}(),rn=0;var an=function(){function e(){L(this,e),this.meta={component:{}},this.index=0,this.childNodes=[],this.parentNode=null,this.mounted=!1,this.nodeId=((rn+=1)%10==0&&(rn+=1),rn)}return R(e,[{key:"toString",value:function(){return this.constructor.name}},{key:"isMounted",get:function(){return this.mounted},set:function(e){this.mounted=e}},{key:"insertBefore",value:function(e,t){if(!e)throw new Error("Can't insert child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't insert child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't insert child, because it already has a different parent.");var n=this.childNodes.indexOf(t);return e.parentNode=this,this.childNodes.splice(n,0,e),Ot(this,e,n)}}},{key:"moveChild",value:function(e,t){if(!e)throw new Error("Can't move child.");if(!e.meta.skipAddToDom){if(!t)return this.appendChild(e);if(t.parentNode!==this)throw new Error("Can't move child, because the reference node has a different parent.");if(e.parentNode&&e.parentNode!==this)throw new Error("Can't move child, because it already has a different parent.");var n=this.childNodes.indexOf(e);if(this.childNodes.indexOf(t)===n)return e;this.childNodes.splice(n,1),jt(0,e,n);var r=this.childNodes.indexOf(t);return this.childNodes.splice(r,0,e),Ot(this,e,r)}}},{key:"appendChild",value:function(e){if(!e)throw new Error("Can't append child.");if(!e.meta.skipAddToDom){if(e.parentNode&&e.parentNode!==this)throw new Error("Can't append child, because it already has a different parent.");e.parentNode=this,this.childNodes.push(e),Ot(this,e,this.childNodes.length-1)}}},{key:"removeChild",value:function(e){if(!e)throw new Error("Can't remove child.");if(!e.meta.skipAddToDom){if(!e.parentNode)throw new Error("Can't remove child, because it has no parent.");if(e.parentNode!==this)throw new Error("Can't remove child, because it has a different parent.");var t=this.childNodes.indexOf(e);this.childNodes.splice(t,1),jt(0,e,t)}}},{key:"findChild",value:function(e){if(e(this))return this;if(this.childNodes.length)for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:0;this.index=this.parentNode?n:0,e(this),this.childNodes.length&&this.childNodes.forEach((function(n,r){t.traverseChildren.call(n,e,r)}))}}]),e}(),on={textDecoration:"textDecorationLine",boxShadowOffset:"shadowOffset",boxShadowOffsetX:"shadowOffsetX",boxShadowOffsetY:"shadowOffsetY",boxShadowOpacity:"shadowOpacity",boxShadowRadius:"shadowRadius",boxShadowSpread:"shadowSpread",boxShadowColor:"shadowColor"},ln={totop:"0",totopright:"totopright",toright:"90",tobottomright:"tobottomright",tobottom:"180",tobottomleft:"tobottomleft",toleft:"270",totopleft:"totopleft"},un="turn",sn="rad",cn="deg";function fn(e){var t=(e||"").replace(/\s*/g,"").toLowerCase(),n=/^([+-]?\d+\.?\d*)+(deg|turn|rad)|(to\w+)$/g.exec(t);if(Array.isArray(n)){var r="180",i=_(n,3),a=i[0],o=i[1],l=i[2];return o&&l?r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:cn,n=parseFloat(e),r=e||"",i=e.split("."),a=_(i,2),o=a[1];switch(o&&o.length>2&&(r=n.toFixed(2)),t){case un:r="".concat((360*n).toFixed(2));break;case sn:r="".concat((180/Math.PI*n).toFixed(2))}return r}(o,l):a&&void 0!==ln[a]&&(r=ln[a]),r}}function dn(e){var t=_((e||"").replace(/\s+/g," ").trim().split(/\s+(?![^(]*?\))/),2),n=t[0],r=t[1],i=/^([+-]?\d+\.?\d*)%$/g;return!n||i.exec(n)||r?n&&i.exec(r)?{ratio:parseFloat(r.split("%")[0])/100,color:$e(n)}:void 0:{color:$e(n)}}function pn(e){return he(e)&&(e=e.replace("Capture","")),oe[e]?oe[e][1]:e}function hn(e){return function(t){var n=t.id,r=t.currentId,i=t.params;if(function(e){return!!le[e]}(e)){var a={id:n,name:e,currentId:r};Object.assign(a,i),_e.receiveNativeGesture(a)}else{var o=[n,e,i];_e.receiveUIComponentEvent(o)}}}var mn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this)).id="",r.style={},r.attributes={},r.events={},r.tagName=e,r}return R(n,[{key:"nativeName",get:function(){return this.meta.component.name}},{key:"toString",value:function(){return"".concat(this.tagName,":(").concat(this.nativeName,")")}},{key:"setListenerHandledType",value:function(e,t){this.events[e]&&(this.events[e].handledType=t)}},{key:"isListenerHandled",value:function(e,t){return!this.events[e]||t===this.events[e].handledType}},{key:"hasAttribute",value:function(e){return!!this.attributes[e]}},{key:"getAttribute",value:function(e){return this.attributes[e]}},{key:"setStyleAttribute",value:function(e){var t=this;this.style={};var n=e;if(!Array.isArray(n)&&Object.hasOwnProperty.call(n,0)){var r=[],i={};Object.keys(n).forEach((function(e){var t;t=e,se.test(t)?r.push(n[e]):i[e]=n[e]})),n=[].concat(r,[i])}Array.isArray(n)||(n=[n]);var a={};n.forEach((function(e){Array.isArray(e)?e.forEach((function(e){a=N(N({},a),e)})):"object"===j(e)&&e&&(a=N(N({},a),e))})),Object.keys(a).forEach((function(e){var n=a[e];if(Object.prototype.hasOwnProperty.call(on,e)&&(e=on[e]),"transform"===e){var r={};if(!Array.isArray(n))throw new TypeError("transform only support array args");n.forEach((function(e){Object.keys(e).forEach((function(t){var n=e[t];n instanceof en||n instanceof nn?r[t]={animationId:n.animationId}:null===n?r[t]&&delete r[t]:void 0!==n&&(r[t]=n)}))}));var i=Object.keys(r);i.length&&(Array.isArray(t.style.transform)||(t.style.transform=[]),i.forEach((function(e){return t.style.transform.push({[e]:r[e]})})))}else if(null===n&&void 0!==t.style[e])t.style[e]=void 0;else if(n instanceof en||n instanceof nn)t.style[e]={animationId:n.animationId};else if(e.toLowerCase().indexOf("colors")>-1)t.style[e]=qe(n);else if(e.toLowerCase().indexOf("color")>-1)t.style[e]=$e(n);else if("backgroundImage"===e&&n)t.style=function(e,t,n){if(0===t.indexOf("linear-gradient")){var r=t.substring(t.indexOf("(")+1,t.lastIndexOf(")")).split(/,(?![^(]*?\))/),i=[];n.linearGradient=n.linearGradient||{},r.forEach((function(e,t){if(0===t){var r=fn(e);if(r)n.linearGradient.angle=r;else{n.linearGradient.angle="180";var a=dn(e);a&&i.push(a)}}else{var o=dn(e);o&&i.push(o)}})),n.linearGradient.colorStopList=i}else n[e]=ke(t);return n}(e,n,t.style);else if("textShadowOffset"===e){var o=n||{},l=o.x,u=void 0===l?0:l,s=o.width,c=void 0===s?0:s,f=o.y,d=void 0===f?0:f,p=o.height,h=void 0===p?0:p;t.style[e]={width:u||c,height:d||h}}else["textShadowOffsetX","textShadowOffsetY"].indexOf(e)>=0?t.style=function(e,t,n){return n.textShadowOffset=n.textShadowOffset||{},Object.assign(n.textShadowOffset,{[{textShadowOffsetX:"width",textShadowOffsetY:"height"}[e]]:t||0}),n}(e,n,t.style):t.style[e]=n}))}},{key:"setAttributes",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];Array.isArray(t)&&t.length>0&&(t.forEach((function(t){if(Array.isArray(t)){var n=_(t,2),r=n[0],i=n[1];e.setAttribute(r,i,{notToNative:!0})}})),Ft(this))}},{key:"parseAnimationStyleProp",value:function(e){var t=!1;Object.keys(e).some((function(n){var r=e[n];if(r&&Array.isArray(r)&&"transform"===n)for(var i=0;i=0},action:function(){return t===n.id||(n.id=t,function(e){if(e.isMounted){var t=zt(X(),e)||{},n=t.nativeLanguages,r=t.eventLanguages;n&&Nt.push({type:Ct.updateNode,nodes:n,eventNodes:r})}}(n)),!0}},{match:function(){return["value","defaultValue","placeholder"].indexOf(e)>=0},action:function(){return n.attributes[e]=de(t),!1}},{match:function(){return["text"].indexOf(e)>=0},action:function(){return n.attributes[e]=t,!1}},{match:function(){return["style"].indexOf(e)>=0},action:function(){return"object"!==j(t)||null==t||(n.setStyleAttribute(t),!1)}},{match:function(){return!0},action:function(){if("function"==typeof t){var r=pn(e);n.attributes[r]=t,n.events[r]?n.events[r]&&n.events[r].type!==ie&&(n.events[r].type=ie):n.events[r]={name:r,type:ie,isCapture:he(e),listener:hn(r)}}else{var i=pn(e);if(function(e,t){return void 0!==t&&"object"===j(t[e])&&!!t[e]}(i,n.events)&&"function"!=typeof t)return delete n.attributes[i],n.events[i].type=ae,!1;n.attributes[e]=t}return!1}}].some((function(e){return!!e.match()&&(r=e.action(),!0)})),r}},{key:"setAttribute",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if("boolean"==typeof this.attributes[e]&&""===t&&(t=!0),void 0===e)return void(!n.notToNative&&Ft(this));var r=this.parseAttributeProp(e,t);if(r)return;this.parseAnimationStyleProp(this.style),!n.notToNative&&Ft(this)}catch(e){}}},{key:"removeAttribute",value:function(e){delete this.attributes[e]}},{key:"setStyle",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null!==t){var r=t,i=e;Object.prototype.hasOwnProperty.call(on,e)&&(i=on[e]),"string"==typeof r&&(r=t.trim(),r=i.toLowerCase().indexOf("colors")>-1?qe(r):i.toLowerCase().indexOf("color")>-1?$e(r):ve(r)),null!=r&&this.style[i]!==r&&(this.style[i]=r,n||Ft(this))}else delete this.style[e]}},{key:"setNativeProps",value:function(e){var t=this;if(e){var n=e.style;if(n){var r=n;Object.keys(r).forEach((function(e){t.setStyle(e,r[e],!0)})),Ft(this),Lt(!0)}}}},{key:"setText",value:function(e){if("string"!=typeof e)try{e=e.toString()}catch(e){throw new Error("Only string type is acceptable for setText")}return(e=e.trim())||this.getAttribute("text")?(e=(e=de(e)).replace(/ /g," ").replace(/Â/g," "),"textarea"===this.tagName?this.setAttribute("value",e):this.setAttribute("text",e)):null}}]),n}(an),vn=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.call(this)).documentElement=new mn("document"),e}return R(n,[{key:"createElement",value:function(e){return new mn(e)}},{key:"createElementNS",value:function(e,t){return new mn("".concat(e,":").concat(t))}}]),n}(an);vn.createElement=vn.prototype.createElement,vn.createElementNS=vn.prototype.createElementNS;var yn=Ut.createContainer,gn=Ut.updateContainer,bn=Ut.getPublicRootInstance,kn=(Ut.injectIntoDevTools,['%c[Hippy-React "2.2.1"]%c',"color: #61dafb","color: auto"]),wn=function(){function e(t){if(L(this,e),!t.appName||!t.entryPage)throw new TypeError("Invalid arguments");this.config=t,this.regist=this.start,this.render=this.render.bind(this);var n=new vn;this.rootContainer=yn(n,0,!1,null)}return R(e,[{key:"start",value:function(){Gt.regist(this.config.appName,this.render)}},{key:"render",value:function(e){var t=this.config,n=t.appName,r=t.entryPage,a=t.silent,o=void 0!==a&&a,l=t.bubbles,u=void 0!==l&&l,s=t.callback,c=void 0===s?function(){}:s,f=e.__instanceId__;fe.apply(void 0,kn.concat(["Start",n,"with rootViewId",f,e])),this.rootContainer.containerInfo.nodeId=f,o&&ge(o),u&&function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ce=e}(u),Y(f,this.rootContainer);var d=i.a.createElement(r,e);return gn(d,this.rootContainer,null,c),bn(this.rootContainer)}}],[{key:"Native",get:function(){return Yt}}]),e}();wn.version="2.2.1";var Sn={registerComponent:function(e,t){new wn({appName:e,entryPage:t}).start()}},En=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.apply(this,arguments)).instance=null,e}return R(n,[{key:"setPressed",value:function(e){dt(this.instance,"setPressed",[e])}},{key:"setHotspot",value:function(e,t){dt(this.instance,"setHotspot",[e,t])}},{key:"render",value:function(){var e=this,t=this.props,n=t.collapsable,r=t.style,a=void 0===r?{}:r,o=P(t,u),l=a,s=o.nativeBackgroundAndroid;return"boolean"==typeof n&&(l.collapsable=n),void 0!==(null==s?void 0:s.color)&&(s.color=$e(s.color)),i.a.createElement("div",N({ref:function(t){e.instance=t},nativeName:"View",style:l},o))}}]),n}(i.a.Component);function Cn(e,t){var n=e.style,r=P(e,s),a=n;if(n&&(Array.isArray(n)?-1===n.filter((function(e){return"object"===j(e)&&e})).findIndex((function(e){return e.color||e.colors}))&&(a[0].color="#000"):"object"===j(n)&&void 0===n.color&&void 0===n.colors&&(a.color="#000")),r.text="","string"==typeof r.children)r.text=de(r.children);else if("number"==typeof r.children)r.text=de(r.children.toString());else if(Array.isArray(r.children)){var o=r.children.filter((function(e){return"string"==typeof e||"number"==typeof e})).join("");o&&(r.text=de(o),r.children=r.text)}return i.a.createElement("p",N({ref:t,nativeName:"Text",style:a},r))}Cn.displayName="Text";var xn=i.a.forwardRef(Cn);xn.displayName="Text";var Nn=Object.freeze({__proto__:null,default:xn}),In=function(e){b(n,e);var t=w(n);function n(){return L(this,n),t.apply(this,arguments)}return R(n,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.style,r=e.imageStyle,a=e.imageRef,o=e.source,l=e.sources,u=e.src,s=e.srcs,f=e.tintColor,d=e.tintColors,p=P(e,c),h=this.getImageUrls({src:u,srcs:s,source:o,sources:l});if(1===h.length){var m=_(h,1);p.src=m[0]}else h.length>1&&(p.srcs=h);"string"==typeof p.defaultSource&&(p.defaultSource.indexOf("data:image/"),p.defaultSource=ke(p.defaultSource));var v=N({},n);return this.handleTintColor(v,f,d),p.style=v,t?i.a.createElement(En,{style:n},i.a.createElement("img",N(N({},p),{},{nativeName:"Image",alt:"",ref:a,style:[{position:"absolute",left:0,right:0,top:0,bottom:0,width:n.width,height:n.height},r]})),t):i.a.createElement("img",N(N({},p),{},{nativeName:"Image",alt:"",ref:a}))}},{key:"getImageUrls",value:function(e){var t=e.src,n=e.srcs,r=e.source,i=e.sources,a=[];if("string"==typeof t&&a.push(t),Array.isArray(n)&&(a=[].concat(z(a),z(n))),r)if("string"==typeof r)a.push(r);else if("object"===j(r)&&null!==r){var o=r.uri;o&&a.push(o)}return i&&Array.isArray(i)&&i.forEach((function(e){"string"==typeof e?a.push(e):"object"===j(e)&&null!==e&&e.uri&&a.push(e.uri)})),a.length&&(a=a.map((function(e){return ke(e)}))),a}},{key:"handleTintColor",value:function(e,t,n){t&&Object.assign(e,{tintColor:t}),Array.isArray(n)&&Object.assign(e,{tintColors:n})}}],[{key:"resizeMode",get:function(){return{contain:"contain",cover:"cover",stretch:"stretch",center:"center",repeat:"repeat"}}},{key:"getSize",value:function(e,t,n){if("string"!=typeof e)throw new TypeError("Image.getSize first argument must be a string url");var r=Ge(e);return"function"==typeof t&&r.then((function(e){return t(e.width,e.height)})),"function"==typeof n?r.catch(n):r.catch((function(t){"Failed to get size for image: ".concat(e)})),r}}]),n}(i.a.Component);In.prefetch=Ye;var Pn=function(){function e(){L(this,e),this.Value=e.Value}return R(e,null,[{key:"Value",value:function(e){return e}},{key:"timing",value:function(e,t){return new en({mode:"timing",delay:0,startValue:e,toValue:t.toValue,duration:t.duration,timingFunction:t.easing||"linear"})}}]),e}();Pn.View=En,Pn.Text=Nn,Pn.Image=In;var _n={step0:function(e){return e>0?1:0},step1:function(e){return e>=1?1:0},linear:function(){return"linear"},ease:function(){return"ease"},quad:function(e){return Math.pow(e,2)},cubic:function(e){return Math.pow(e,3)},poly:function(e){return function(t){return Math.pow(t,e)}},sin:function(e){return 1-Math.cos(e*Math.PI/2)},circle:function(e){return 1-Math.sqrt(1-e*e)},exp:function(e){return Math.pow(2,10*(e-1))},elastic:function(){return"elastic"},back:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.70158;return function(t){return t*t*((e+1)*t-e)}},bounce:function(e){var t=e;return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bezier:function(){return"bezier"},in:function(){return"ease-in"},out:function(){return"ease-out"},inOut:function(){return"ease-in-out"}};function Ln(e){return i.a.createElement("li",N({nativeName:"ListViewItem"},e))}var An=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.apply(this,arguments)).instance=null,e}return R(n,[{key:"expandPullHeader",value:function(){dt(this.instance,"expandPullHeader",[])}},{key:"collapsePullHeader",value:function(e){"android"===Kt.platform.OS?dt(this.instance,"collapsePullHeader",[e]):void 0!==e?dt(this.instance,"collapsePullHeaderWithOptions",[e]):dt(this.instance,"collapsePullHeader",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=P(t,f);return i.a.createElement("div",N({nativeName:"PullHeaderView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component),Rn=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.apply(this,arguments)).instance=null,e}return R(n,[{key:"expandPullFooter",value:function(){dt(this.instance,"expandPullFooter",[])}},{key:"collapsePullFooter",value:function(){dt(this.instance,"collapsePullFooter",[])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=P(t,d);return i.a.createElement("div",N({nativeName:"PullFooterView",ref:function(t){e.instance=t}},r),n)}}]),n}(i.a.Component);Rn.defaultProps={sticky:!0};var zn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(E(r)),r.state={initialListReady:!1},r}return R(n,[{key:"componentDidMount",value:function(){this.props.getRowKey}},{key:"scrollToIndex",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&dt(this.instance,"scrollToIndex",[e,t,n])}},{key:"scrollToContentOffset",value:function(e,t,n){"number"==typeof e&&"number"==typeof t&&"boolean"==typeof n&&dt(this.instance,"scrollToContentOffset",[e,t,n])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.style,a=t.renderRow,o=t.renderPullHeader,l=t.renderPullFooter,u=t.getRowType,s=t.getRowStyle,c=t.getRowKey,f=t.dataSource,d=t.initialListSize,h=t.rowShouldSticky,m=t.onRowLayout,v=t.onHeaderPulling,y=t.onHeaderReleased,g=t.onFooterPulling,b=t.onFooterReleased,k=t.onAppear,w=t.onDisappear,S=t.onWillAppear,E=t.onWillDisappear,C=P(t,p),x=[];if("function"==typeof a){var I=this.state.initialListReady,_=this.props.numberOfRows,L=this.getPullHeader(o,v,y),A=this.getPullFooter(l,g,b);!_&&f&&(_=f.length),I||(_=Math.min(_,d||10));for(var R=function(t){var n={},r=void 0;r=f?a(f[t],null,t):a(t),e.handleRowProps(n,t,{getRowKey:c,getRowStyle:s,getRowType:u,onRowLayout:m,rowShouldSticky:h}),[{func:k,name:"onAppear"},{func:w,name:"onDisappear"},{func:S,name:"onWillAppear"},{func:E,name:"onWillDisappear"}].forEach((function(e){var r=e.func,i=e.name;"function"==typeof r&&(n[i]=function(){r(t)})})),r&&x.push(i.a.createElement(Ln,N({},n),r))},z=0;z<_;z+=1)R(z);L&&x.unshift(L),A&&x.push(A),"function"==typeof h&&Object.assign(C,{rowShouldSticky:!0});var T=[k,w,S,E];C.exposureEventEnabled=T.some((function(e){return"function"==typeof e})),"ios"===Kt.platform.OS&&(C.numberOfRows=x.length),C.initialListSize=d,C.style=N({},r)}return i.a.createElement("ul",N({ref:function(t){e.instance=t},nativeName:"ListView",initialListReady:this.handleInitialListReady},C),x.length?x:n)}},{key:"handleInitialListReady",value:function(){this.setState({initialListReady:!0})}},{key:"getPullHeader",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(An,{key:"pull-header",ref:function(e){r.pullHeader=e},onHeaderPulling:t,onHeaderReleased:n},e())),a}},{key:"getPullFooter",value:function(e,t,n){var r=this,a=null;return"function"==typeof e&&(a=i.a.createElement(Rn,{key:"pull-footer",ref:function(e){r.pullFooter=e},onFooterPulling:t,onFooterReleased:n},e())),a}},{key:"handleRowProps",value:function(e,t,n){var r=n.getRowKey,i=n.getRowStyle,a=n.onRowLayout,o=n.getRowType,l=n.rowShouldSticky;if("function"==typeof r&&(e.key=r(t)),"function"==typeof i&&(e.style=i(t)),"function"==typeof a&&(e.onLayout=function(e){a(e,t)}),"function"==typeof o){var u=o(t);Number.isInteger(u),e.type=u}"function"==typeof l&&(e.sticky=l(t))}}]),n}(i.a.Component);zn.defaultProps={numberOfRows:0};var Tn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r.refreshComplected=r.refreshCompleted.bind(E(r)),r}return R(n,[{key:"startRefresh",value:function(){dt(this.instance,"startRefresh",null)}},{key:"refreshCompleted",value:function(){dt(this.instance,"refreshComplected",null)}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=P(t,h);return i.a.createElement("div",N({nativeName:"RefreshWrapper",ref:function(t){e.instance=t}},r),i.a.createElement("div",{nativeName:"RefreshWrapperItemView",style:{left:0,right:0,position:"absolute"}},this.getRefresh()),n)}},{key:"getRefresh",value:function(){var e=this.props.getRefresh;return"function"==typeof e&&e()||null}}]),n}(i.a.Component),On=function(){function e(){L(this,e),this.top=null,this.size=0}return R(e,[{key:"push",value:function(e){this.top={data:e,next:this.top},this.size+=1}},{key:"peek",value:function(){return null===this.top?null:this.top.data}},{key:"pop",value:function(){if(null===this.top)return null;var e=this.top;return this.top=this.top.next,this.size>0&&(this.size-=1),e.data}},{key:"clear",value:function(){this.top=null,this.size=0}},{key:"displayAll",value:function(){var e=[];if(null===this.top)return e;for(var t=this.top,n=0,r=this.size;n1&&this.pop({animated:!0})}},{key:"push",value:function(e){if(null==e?void 0:e.component){if(!this.routeList[e.routeName])new wn({appName:e.routeName,entryPage:e.component}).regist(),this.routeList[e.routeName]=!0;delete e.component}var t=[e];this.stack.push(e),dt(this.instance,"push",t)}},{key:"pop",value:function(e){if(this.stack.size>1){var t=[e];this.stack.pop(),dt(this.instance,"pop",t)}}},{key:"clear",value:function(){this.stack.clear()}},{key:"render",value:function(){var e=this,t=this.props,n=t.initialRoute,r=(n.component,P(n,m)),a=P(t,v);return a.initialRoute=r,i.a.createElement("div",N({nativeName:"Navigator",ref:function(t){e.instance=t}},a))}}]),n}(i.a.Component);function Fn(e){return i.a.createElement("div",N(N({nativeName:"ViewPagerItem"},e),{},{style:{position:"absolute",left:0,top:0,right:0,bottom:0,collapsable:!1}}))}var Hn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r.setPage=r.setPage.bind(E(r)),r.setPageWithoutAnimation=r.setPageWithoutAnimation.bind(E(r)),r.onPageScrollStateChanged=r.onPageScrollStateChanged.bind(E(r)),r}return R(n,[{key:"onPageScrollStateChanged",value:function(e){var t=this.props.onPageScrollStateChanged;t&&t(e.pageScrollState)}},{key:"setPage",value:function(e){"number"==typeof e&&dt(this.instance,"setPage",[e])}},{key:"setPageWithoutAnimation",value:function(e){"number"==typeof e&&dt(this.instance,"setPageWithoutAnimation",[e])}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.onPageScrollStateChanged,a=P(t,y),o=[];return Array.isArray(n)?o=n.map((function(e){var t={};return"string"==typeof e.key&&(t.key="viewPager_".concat(e.key)),i.a.createElement(Fn,N({},t),e)})):o.push(i.a.createElement(Fn,null,n)),"function"==typeof r&&(a.onPageScrollStateChanged=this.onPageScrollStateChanged),i.a.createElement("div",N({nativeName:"ViewPager",ref:function(t){e.instance=t}},a),o)}}]),n}(i.a.Component);function Mn(){var e=B.platform.Localization;return!!e&&1===e.direction}var Dn={caretColor:"caret-color"},Un=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r._lastNativeText="",r.onChangeText=r.onChangeText.bind(E(r)),r.onKeyboardWillShow=r.onKeyboardWillShow.bind(E(r)),r}return R(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.value,n=e.autoFocus;this._lastNativeText=t,n&&this.focus()}},{key:"componentWillUnmount",value:function(){this.blur()}},{key:"getValue",value:function(){var e=this;return new Promise((function(t){dt(e.instance,"getValue",(function(e){return t(e.text)}))}))}},{key:"setValue",value:function(e){return dt(this.instance,"setValue",[e]),e}},{key:"focus",value:function(){dt(this.instance,"focusTextInput",[])}},{key:"blur",value:function(){dt(this.instance,"blurTextInput",[])}},{key:"showInputMethod",value:function(){}},{key:"hideInputMethod",value:function(){}},{key:"clear",value:function(){dt(this.instance,"clear",[])}},{key:"render",value:function(){var e=this,t=N({},this.props);return["underlineColorAndroid","placeholderTextColor","placeholderTextColors","caretColor","caret-color"].forEach((function(n){var r=n,i=e.props[n];"string"==typeof e.props[n]&&(Dn[n]&&(r=Dn[n]),Array.isArray(t.style)?t.style.push({[r]:i}):t.style&&"object"===j(t.style)?t.style[r]=i:t.style={[r]:i},delete t[n])})),Mn()&&(t.style?"object"!==j(t.style)||Array.isArray(t.style)||t.style.textAlign||(t.style.textAlign="right"):t.style={textAlign:"right"}),i.a.createElement("div",N(N({nativeName:"TextInput"},t),{},{ref:function(t){e.instance=t},onChangeText:this.onChangeText,onKeyboardWillShow:this.onKeyboardWillShow}))}},{key:"onChangeText",value:function(e){var t=this.props.onChangeText;"function"==typeof t&&t(e.text),this.instance&&(this._lastNativeText=e.text)}},{key:"onKeyboardWillShow",value:function(e){var t=this.props.onKeyboardWillShow;"function"==typeof t&&t(e)}}]),n}(i.a.Component),Bn=Kt.window.scale,Wn=Math.round(.4*Bn)/Bn;function Vn(e){return e}0===Wn&&(Wn=1/Bn);var $n=Object.freeze({__proto__:null,get hairlineWidth(){return Wn},create:Vn}),qn={baseVertical:{flexGrow:1,flexShrink:1,flexDirection:"column",overflow:"scroll"},baseHorizontal:{flexGrow:1,flexShrink:1,flexDirection:"row",overflow:"scroll"},contentContainerVertical:{collapsable:!1,flexDirection:"column"},contentContainerHorizontal:{collapsable:!1,flexDirection:"row"}},Qn=function(e){b(n,e);var t=w(n);function n(){var e;return L(this,n),(e=t.apply(this,arguments)).instance=null,e}return R(n,[{key:"scrollTo",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=e,i=t,a=n;"number"==typeof e||"object"===j(e)&&e&&(r=e.x,i=e.y,a=e.animated),r=r||0,i=i||0,a=!!a,dt(this.instance,"scrollTo",[r,i,a])}},{key:"scrollToWithDuration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3;dt(this.instance,"scrollToWithOptions",[{x:e,y:t,duration:n}])}},{key:"render",value:function(){var e=this,t=this.props,n=t.horizontal,r=t.contentContainerStyle,a=t.children,o=t.style,l=[n?qn.contentContainerHorizontal:qn.contentContainerVertical,r],u=n?Object.assign({},qn.baseHorizontal,o):Object.assign({},qn.baseVertical,o);return n&&(u.flexDirection=Mn()?"row-reverse":"row"),i.a.createElement("div",N(N({nativeName:"ScrollView",ref:function(t){e.instance=t}},this.props),{},{style:u}),i.a.createElement(En,{style:l},a))}}]),n}(i.a.Component),Kn={modal:{position:"absolute",collapsable:!1}},Gn=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).eventSubscription=null,r}return R(n,[{key:"componentDidMount",value:function(){var e=this;"ios"===Kt.platform.OS&&(this.eventSubscription=new Ae("modalDismissed"),this.eventSubscription.addCallback((function(t){var n=e.props,r=n.primaryKey,i=n.onDismiss;t.primaryKey===r&&"function"==typeof i&&i()})))}},{key:"componentWillUnmount",value:function(){"ios"===Kt.platform.OS&&this.eventSubscription&&this.eventSubscription.unregister()}},{key:"render",value:function(){var e=this.props,t=e.children,n=e.visible,r=e.transparent,a=e.animated,o=this.props.animationType;if(!1===n)return null;var l={backgroundColor:r?"transparent":"white"};return o||(o="none",a&&(o="slide")),i.a.createElement("div",N({nativeName:"Modal",animationType:o,transparent:r,style:[Kn.modal,l]},this.props),t)}}]),n}(i.a.Component);Gn.defaultProps={visible:!0};var Yn=function(e){b(n,e);var t=w(n);function n(e){var r;L(this,n);var i=(r=t.call(this,e)).props.requestFocus;return r.state={isFocus:!!i},r.handleFocus=r.handleFocus.bind(E(r)),r}return R(n,[{key:"render",value:function(){var e,t,n,r,a=this.props,o=a.requestFocus,l=a.children,u=a.nextFocusDownId,s=a.nextFocusUpId,c=a.nextFocusLeftId,f=a.nextFocusRightId,d=a.style,p=a.noFocusStyle,h=a.focusStyle,m=a.onClick,v=this.state.isFocus,y=i.a.Children.only(l);(null===(t=null===(e=null==y?void 0:y.child)||void 0===e?void 0:e.memoizedProps)||void 0===t?void 0:t.nativeName)?r=y.child.memoizedProps.nativeName:(null===(n=null==y?void 0:y.type)||void 0===n?void 0:n.displayName)&&(r=y.type.displayName);var g=u&&ft(u),b=s&&ft(s),k=c&&ft(c),w=f&&ft(f),S=d;if("Text"!==r){var E=y.memoizedProps.style;S=N(N({},S),E)}if(Object.assign(S,v?h:p),"Text"===r)return i.a.createElement(En,{focusable:!0,nextFocusDownId:g,nextFocusUpId:b,nextFocusLeftId:k,nextFocusRightId:w,requestFocus:o,style:S,onClick:m,onFocus:this.handleFocus},y);var C=y.memoizedProps.children;return i.a.cloneElement(y,{nextFocusDownId:u,nextFocusUpId:s,nextFocusLeftId:c,nextFocusRightId:f,requestFocus:o,onClick:m,focusable:!0,children:C,style:S,onFocus:this.handleFocus})}},{key:"handleFocus",value:function(e){var t=this.props.onFocus;"function"==typeof t&&t(e),this.state.isFocus!==e.focus&&this.setState({isFocus:e.focus})}}]),n}(i.a.Component);function Xn(e){return i.a.createElement("iframe",N({title:"hippy",nativeName:"WebView"},e))}var Jn,Zn=function(){function e(t,n,r){var i=this;if(L(this,e),this.protocol="",this.onWebSocketEvent=this.onWebSocketEvent.bind(this),Jn||(Jn=new Ae("hippyWebsocketEvents")),this.readyState=0,this.webSocketCallbacks={},!t||"string"!=typeof t)throw new TypeError("Invalid WebSocket url");var a=N({},r);if(void 0!==n)if(Array.isArray(n)&&n.length>0)a["Sec-WebSocket-Protocol"]=n.join(",");else{if("string"!=typeof n)throw new TypeError("Invalid WebSocket protocols");a["Sec-WebSocket-Protocol"]=n}var o={headers:a,url:t};this.url=t,this.webSocketCallbackId=Jn.addCallback(this.onWebSocketEvent),U.callNativeWithPromise("websocket","connect",o).then((function(e){e&&0===e.code&&"number"==typeof e.id&&(i.webSocketId=e.id)}))}return R(e,[{key:"close",value:function(e,t){1===this.readyState&&(this.readyState=2,U.callNative("websocket","close",{id:this.webSocketId,code:e,reason:t}))}},{key:"send",value:function(e){if(1===this.readyState){if("string"!=typeof e)throw new TypeError("Unsupported websocket data type: ".concat(j(e)));U.callNative("websocket","send",{id:this.webSocketId,data:e})}}},{key:"onopen",set:function(e){this.webSocketCallbacks.onOpen=e}},{key:"onclose",set:function(e){this.webSocketCallbacks.onClose=e}},{key:"onerror",set:function(e){this.webSocketCallbacks.onError=e}},{key:"onmessage",set:function(e){this.webSocketCallbacks.onMessage=e}},{key:"onWebSocketEvent",value:function(e){if("object"===j(e)&&e.id===this.webSocketId){var t=e.type;"onOpen"===t?this.readyState=1:"onClose"===t&&(this.readyState=3,Jn.removeCallback(this.webSocketCallbackId));var n=this.webSocketCallbacks[t];"function"==typeof n&&n(e.data)}}}]),e}();function er(e){return i.a.createElement("li",N({nativeName:"WaterfallItem"},e))}var tr=function(e){b(n,e);var t=w(n);function n(e){var r;return L(this,n),(r=t.call(this,e)).instance=null,r.pullHeader=null,r.pullFooter=null,r.handleInitialListReady=r.handleInitialListReady.bind(E(r)),r}return R(n,[{key:"scrollToIndex",value:function(e){var t=e.index,n=void 0===t?0:t,r=e.animated,i=void 0===r||r;dt(this.instance,"scrollToIndex",[n,n,i])}},{key:"scrollToContentOffset",value:function(e){var t=e.xOffset,n=void 0===t?0:t,r=e.yOffset,i=void 0===r?0:r,a=e.animated,o=void 0===a||a;dt(this.instance,"scrollToContentOffset",[n,i,o])}},{key:"expandPullHeader",value:function(){this.pullHeader&&this.pullHeader.expandPullHeader()}},{key:"collapsePullHeader",value:function(e){this.pullHeader&&this.pullHeader.collapsePullHeader(e)}},{key:"expandPullFooter",value:function(){this.pullFooter&&this.pullFooter.expandPullFooter()}},{key:"collapsePullFooter",value:function(){this.pullFooter&&this.pullFooter.collapsePullFooter()}},{key:"render",value:function(){var e=this,t=this.props,n=t.style,r=void 0===n?{}:n,a=t.renderBanner,o=t.numberOfColumns,l=void 0===o?2:o,u=t.columnSpacing,s=void 0===u?0:u,c=t.interItemSpacing,f=void 0===c?0:c,d=t.numberOfItems,p=void 0===d?0:d,h=t.preloadItemNumber,m=void 0===h?0:h,v=t.renderItem,y=t.renderPullHeader,b=t.renderPullFooter,k=t.getItemType,w=t.getItemKey,S=t.getItemStyle,E=t.contentInset,C=void 0===E?{top:0,left:0,bottom:0,right:0}:E,x=t.onItemLayout,I=t.onHeaderPulling,_=t.onHeaderReleased,L=t.onFooterPulling,A=t.onFooterReleased,R=t.containPullHeader,z=void 0!==R&&R,T=t.containPullFooter,O=void 0!==T&&T,j=t.containBannerView,F=void 0!==j&&j,H=N(N({},P(t,g)),{},{style:r,numberOfColumns:l,columnSpacing:s,interItemSpacing:f,preloadItemNumber:m,contentInset:C,containPullHeader:z,containPullFooter:O,containBannerView:F}),M=[];if("function"==typeof a){var D=a();D&&(M.push(i.a.createElement(En,{key:"bannerView"},i.a.cloneElement(D))),H.containBannerView=!0)}if("function"==typeof v){for(var U=this.getPullHeader(y,I,_),B=this.getPullFooter(b,L,A),W=0;W * Copyright © 2018-2022 Tencent. All rights reserved. * -* Generated at Tue May 17 2022 17:55:49 GMT+0800 (中国标准时间). +* Generated at Fri May 20 2022 22:29:35 GMT+0800 (China Standard Time). * DO NOT EDIT IT. */ diff --git a/lerna.json b/lerna.json index aabca03e7..a0f3a13c7 100644 --- a/lerna.json +++ b/lerna.json @@ -1,7 +1,7 @@ { "npmClient": "npm", "packages": [ - "framework/js/packages/*" + "driver/js/packages/*" ], "version": "2.2.1" } diff --git a/package.json b/package.json index 849f9f48c..86985374e 100644 --- a/package.json +++ b/package.json @@ -14,12 +14,12 @@ "markdownlint": "markdownlint --config .markdownlintrc.json \"./@(README|README.zh_CN|PUBLISH.zh_CN).md\" \"./docs/**/*.md\"", "coverage": "nyc ava", "codecov": "cat ./coverage/lcov.info | codecov", - "lint": "eslint --fix \"framework/js/packages/**/*.@(js|ts|tsx|vue)\" \"framework/js/examples/hippy-react-demo/**/*.@(js|jsx)\" \"framework/js/examples/hippy-vue-demo/**/*.@(js|vue)\" \"./scripts/**/*.js\" \"framework/js/core/js/**/*.js\"", - "clean": "rimraf ./framework/js/packages/*/node_modules ./framework/js/examples/hippy-react-demo/node_modules ./framework/js/examples/hippy-vue-demo/node_modules", + "lint": "eslint --fix \"driver/js/packages/**/*.@(js|ts|tsx|vue)\" \"driver/js/examples/hippy-react-demo/**/*.@(js|jsx)\" \"driver/js/examples/hippy-vue-demo/**/*.@(js|vue)\" \"./scripts/**/*.js\" \"driver/js/core/js/**/*.js\"", + "clean": "rimraf ./driver/js/packages/*/node_modules ./driver/js/examples/hippy-react-demo/node_modules ./driver/js/examples/hippy-vue-demo/node_modules", "init": "npm install && npx lerna bootstrap && npm run build", "init:example": "node ./scripts/init-example.js", "test": "ava", - "watch": "watch \"npm run build\" ./framework/js/packages --ignoreDotFiles --ignoreUnreadable --ignoreDirectoryPattern '/dist/'", + "watch": "watch \"npm run build\" ./driver/js/packages --ignoreDotFiles --ignoreUnreadable --ignoreDirectoryPattern '/dist/'", "publish": "npx lerna version patch --conventional-commits --sign-git-commit", "doc": "docsify serve docs", "prepare": "is-ci || husky install" @@ -91,10 +91,10 @@ "core": "node_modules/vue/src/core", "shared": "node_modules/vue/src/shared", "sfc": "node_modules/vue/src/sfc", - "he": "framework/js/packages/hippy-vue/util/entity-decoder", - "@vue": "framework/js/packages/hippy-vue/src", - "@router": "framework/js/packages/hippy-vue-router/src", - "@css-loader": "framework/js/packages/hippy-vue-css-loader/src", - "@native-components": "framework/js/packages/hippy-vue-native-components/src" + "he": "driver/js/packages/hippy-vue/util/entity-decoder", + "@vue": "driver/js/packages/hippy-vue/src", + "@router": "driver/js/packages/hippy-vue-router/src", + "@css-loader": "driver/js/packages/hippy-vue-css-loader/src", + "@native-components": "driver/js/packages/hippy-vue-native-components/src" } } diff --git a/scripts/build-core.js b/scripts/build-core.js index d83b896df..f4fc59438 100644 --- a/scripts/build-core.js +++ b/scripts/build-core.js @@ -131,18 +131,18 @@ function getAbsolutePath(relativePath) { function getAllRequiredFiles(platform) { return new Promise((resole) => { const rl = readline.createInterface({ - input: fs.createReadStream(getAbsolutePath(`../framework/js/core/js/entry/${platform}/hippy.js`)), + input: fs.createReadStream(getAbsolutePath(`../driver/js/core/js/entry/${platform}/hippy.js`)), }); const filePaths = [ - getAbsolutePath('../framework/js/core/js/bootstrap.js'), - getAbsolutePath(`../framework/js/core/js/entry/${platform}/hippy.js`), - getAbsolutePath('../framework/js/core/js/modules/ExceptionHandle.js'), + getAbsolutePath('../driver/js/core/js/bootstrap.js'), + getAbsolutePath(`../driver/js/core/js/entry/${platform}/hippy.js`), + getAbsolutePath('../driver/js/core/js/modules/ExceptionHandle.js'), ]; rl.on('line', (line) => { if (line.split('//')[0].indexOf('require') > -1) { const entry = line.split('(\'')[1].split('\')')[0]; - filePaths.push(getAbsolutePath(`../framework/js/core/js/entry/${platform}/${entry}`)); + filePaths.push(getAbsolutePath(`../driver/js/core/js/entry/${platform}/${entry}`)); } }); rl.on('close', () => { @@ -225,6 +225,6 @@ function generateCpp(platform, buildDirPath) { } // Start to work -generateCpp('ios', getAbsolutePath('../framework/js/ios/base')); -generateCpp('android', getAbsolutePath('../framework/js/android/src/main/jni/src/bridge/')); -generateCpp('flutter', getAbsolutePath('../framework/js/flutter/core/src/bridge/')); +generateCpp('ios', getAbsolutePath('../driver/js/ios/base')); +generateCpp('android', getAbsolutePath('../driver/js/android/src/main/jni/src/bridge/')); +generateCpp('flutter', getAbsolutePath('../driver/js/flutter/core/src/bridge/')); diff --git a/scripts/build-debug-server.js b/scripts/build-debug-server.js index 327975cbe..593de8e67 100644 --- a/scripts/build-debug-server.js +++ b/scripts/build-debug-server.js @@ -9,7 +9,7 @@ const { module.exports = buildDebugServer; function buildDebugServer() { - const DEBUG_SERVER_PATH = path.join(__dirname, '../framework/js/packages/hippy-debug-server'); + const DEBUG_SERVER_PATH = path.join(__dirname, '../driver/js/packages/hippy-debug-server'); pushd(DEBUG_SERVER_PATH); diff --git a/scripts/build-example.js b/scripts/build-example.js index da265f539..3aedbedaf 100644 --- a/scripts/build-example.js +++ b/scripts/build-example.js @@ -17,7 +17,7 @@ if (!example) { } const BASE_PATH = process.cwd(); // Target demo project path -const DEMO_PATH = path.join(BASE_PATH, 'framework/js/examples', example); +const DEMO_PATH = path.join(BASE_PATH, 'driver/js/examples', example); if (!test('-d', DEMO_PATH)) { console.error(`❌ Can not find demo project: ${example}, ${cmdExample}`); process.exit(1); diff --git a/scripts/debug-example.js b/scripts/debug-example.js index e222ba91d..163da6bae 100644 --- a/scripts/debug-example.js +++ b/scripts/debug-example.js @@ -23,7 +23,7 @@ if (!cmd) { } const BASE_PATH = process.cwd(); // Target demo project path -const DEMO_PATH = path.join(BASE_PATH, 'framework/js/examples', example); +const DEMO_PATH = path.join(BASE_PATH, 'driver/js/examples', example); if (!test('-d', DEMO_PATH)) { console.error(`❌ Can not find demo project: ${example}, ${cmdExample}.`); process.exit(1); diff --git a/scripts/init-example.js b/scripts/init-example.js index 5c56f1737..195e86ba6 100644 --- a/scripts/init-example.js +++ b/scripts/init-example.js @@ -15,7 +15,7 @@ if (!example) { } const BASE_PATH = process.cwd(); // Target demo project path -const DEMO_PATH = path.join(BASE_PATH, 'framework/js/examples', example); +const DEMO_PATH = path.join(BASE_PATH, 'driver/js/examples', example); if (!test('-d', DEMO_PATH)) { console.error(`❌ Can not find demo project: ${example}, ${cmdExample}`); return; diff --git a/scripts/react-configs.js b/scripts/react-configs.js index 357c36cfe..fb990e384 100644 --- a/scripts/react-configs.js +++ b/scripts/react-configs.js @@ -5,8 +5,8 @@ const replace = require('@rollup/plugin-replace'); const { nodeResolve } = require('@rollup/plugin-node-resolve'); const commonjs = require('@rollup/plugin-commonjs'); -const hippyReactPackage = require('../framework/js/packages/hippy-react/package.json'); -const hippyReactWebPackage = require('../framework/js/packages/hippy-react-web/package.json'); +const hippyReactPackage = require('../driver/js/packages/hippy-react/package.json'); +const hippyReactWebPackage = require('../driver/js/packages/hippy-react-web/package.json'); function banner(name, version) { const startYear = 2017; @@ -43,8 +43,8 @@ function banner(name, version) { const builds = { '@hippy/react': { - entry: './framework/js/packages/hippy-react/src/index.ts', - dest: './framework/js/packages/hippy-react/dist/index.js', + entry: './driver/js/packages/hippy-react/src/index.ts', + dest: './driver/js/packages/hippy-react/dist/index.js', format: 'es', banner: banner('@hippy/react', hippyReactPackage.version), external(id) { @@ -56,8 +56,8 @@ const builds = { }, }, '@hippy/react-web': { - entry: './framework/js/packages/hippy-react-web/src/index.ts', - dest: './framework/js/packages/hippy-react-web/dist/index.js', + entry: './driver/js/packages/hippy-react-web/src/index.ts', + dest: './driver/js/packages/hippy-react-web/dist/index.js', format: 'es', banner: banner('@hippy/react-web', hippyReactWebPackage.version), external(id) { diff --git a/scripts/vue-configs.js b/scripts/vue-configs.js index cd7633603..a42e70a4a 100644 --- a/scripts/vue-configs.js +++ b/scripts/vue-configs.js @@ -7,10 +7,10 @@ const { nodeResolve } = require('@rollup/plugin-node-resolve'); const flow = require('rollup-plugin-flow-no-whitespace'); const VueVersion = require('vue/package.json').version; -const hippyVuePackage = require('../framework/js/packages/hippy-vue/package.json'); -const cssLoaderPackage = require('../framework/js/packages/hippy-vue-css-loader/package.json'); -const nativeComponentsPackage = require('../framework/js/packages/hippy-vue-native-components/package.json'); -const routerPackage = require('../framework/js/packages/hippy-vue-router/package.json'); +const hippyVuePackage = require('../driver/js/packages/hippy-vue/package.json'); +const cssLoaderPackage = require('../driver/js/packages/hippy-vue-css-loader/package.json'); +const nativeComponentsPackage = require('../driver/js/packages/hippy-vue-native-components/package.json'); +const routerPackage = require('../driver/js/packages/hippy-vue-router/package.json'); const andHippyVueString = ` and Hippy-Vue v${hippyVuePackage.version}`; @@ -53,7 +53,7 @@ function resolveVue(p) { } function resolvePackage(src, extra = 'src') { - return path.resolve(__dirname, '../framework/js/packages/', src, extra); + return path.resolve(__dirname, '../driver/js/packages/', src, extra); } const aliases = { @@ -63,7 +63,7 @@ const aliases = { core: resolveVue('core'), shared: resolveVue('shared'), sfc: resolveVue('sfc'), - he: path.resolve(__dirname, '../framework/js/packages/hippy-vue/src/util/entity-decoder'), + he: path.resolve(__dirname, '../driver/js/packages/hippy-vue/src/util/entity-decoder'), '@vue': resolvePackage('hippy-vue'), '@router': resolvePackage('hippy-vue-router'), '@css-loader': resolvePackage('hippy-vue-css-loader'), diff --git a/tsconfig.json b/tsconfig.json index 1db88eff4..fee729af4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -42,17 +42,17 @@ "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ "paths": { /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ - "@vue/*": ["framework/js/packages/hippy-vue/src/*"], - "@router/*": ["framework/js/packages/hippy-vue-router/src/*"], - "@css-loader/*": ["framework/js/packages/hippy-vue-css-loader/src/*"], - "@native-components/*": ["framework/js/packages/hippy-vue-native-components/src/*"], + "@vue/*": ["driver/js/packages/hippy-vue/src/*"], + "@router/*": ["driver/js/packages/hippy-vue-router/src/*"], + "@css-loader/*": ["driver/js/packages/hippy-vue-css-loader/src/*"], + "@native-components/*": ["driver/js/packages/hippy-vue-native-components/src/*"], "vue": ["node_modules/vue/src/core/index"], "compiler/*": ["node_modules/vue/src/compiler/*"], "web/*": ["node_modules/vue/src/platforms/web/*"], "core/*": ["node_modules/vue/src/core/*"], "shared/*": ["node_modules/vue/src/shared/*"], "sfc/*": ["node_modules/vue/src/sfc/*"], - "he": ["framework/js/packages/hippy-vue/src/util/entity-decoder"] + "he": ["driver/js/packages/hippy-vue/src/util/entity-decoder"] }, // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "typeRoots": [], /* List of folders to include type definitions from. */ @@ -73,8 +73,8 @@ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ }, "include": [ - "framework/js/packages/*/src", - "framework/js/packages/global.d.ts", + "driver/js/packages/*/src", + "driver/js/packages/global.d.ts", "node_modules/@types/web/index.d.ts", "node_modules/@types/node/index.d.ts", ],