diff --git a/README.md b/README.md index 86a5238b..83ec695b 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,15 @@ + + # React-Native-App -React-Native实战Simple App +React-Native实战Simple App + +### 0. 已上线iOS App +仓库地址: https://github.com/vczero/toilet +**苹果App Store搜索 厕所在哪, 即可下载** -###一、基于React-Native & Node通讯录App -####(1)主要完成的功能有: +### 一、基于React-Native & Node通讯录App +1.主要完成的功能有: + 基于文件系统的Node.js服务端; + 通讯录功能(分类页 + 列表页 + 拨号邮箱邮件) @@ -17,35 +23,71 @@ React-Native实战Simple App -
+
-
+
-
+
-####(2)安装启动程序 - (1)首先进入address_book目录安装node module;命令行:$ npm install - (2)其次cd server,启动node数据接口服务,命令行: $ node app.js - (3)初次登录用户名:test@126.com 密码:123 +2.安装启动程序 + (1)首先进入address_book目录安装node module;命令行:$ npm install + (2)其次cd server,命令行:$ npm install;然后启动node数据接口服务,命令行: $ node app.js + (3)初次登录用户名:test0@126.com 密码:123 + + +3.Tip: + (1)为了演示,代码有些粗糙; + (2)服务端也不是很完善,为了方便快速搭建,使用的是基于node的文件服务。 + (3)oschina会同步更新改项目:https://git.oschina.net/vczero/React-Native-App + (4)相关入门教程:https://github.com/vczero/react-native-lession + + + +### 二、基于LBS的App:附近 +1.主要完成的功能有: + ++ 附近的美食、附近的银行、附近的电影院、附近的卫生间; ++ 附近的搜索功能:美食、银行、电影院、卫生间 ++ 地图功能:展示附近的结果列表 + +效果如下图所示: + +![](pic/nearby/1.png) +![](pic/nearby/2.png) +![](pic/nearby/3.png) +![](pic/nearby/4.png) + +2.安装启动程序 + ++ 如果是模拟器,则使用模拟位置,修改nearby/Nearby/index.js文件中 + + ``` +//是否开启真实的定位;如果开启了_GEO_OPEN,_GEO_TEST_POS则会失效 +_GEO_OPEN = false; +``` + ++ 如果是真机环境则修改nearby/Nearby/index.js文件中 + +``` +//是否开启真实的定位;如果开启了_GEO_OPEN,_GEO_TEST_POS则会失效 +_GEO_OPEN = true; +``` + +### 三、基于 React-Native & 豆瓣Open API 开发搜索APP +地址:https://github.com/vczero/React-Dou -####(3)Tip: - (1)为了演示,代码有些粗糙; - (2)服务端也不是很完善,为了方便快速搭建,使用的是基于node的文件服务。 - (3)oschina会同步更新改项目:https://git.oschina.net/vczero/React-Native-App - (4)相关入门教程:https://github.com/vczero/react-native-lession -TODO: +### 四、天黑了,请闭眼(简单游戏) +地址: https://github.com/vczero/closeEye -+ 基于第三方数据构建美食App -+ 基于LBS的App diff --git a/address_book/android/app/build.gradle b/address_book/android/app/build.gradle new file mode 100644 index 00000000..c0b468cc --- /dev/null +++ b/address_book/android/app/build.gradle @@ -0,0 +1,78 @@ +apply plugin: "com.android.application" + +/** + * The react.gradle file registers two tasks: bundleDebugJsAndAssets and bundleReleaseJsAndAssets. + * These basically call `react-native bundle` with the correct arguments during the Android build + * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the + * bundle directly from the development server. Below you can see all the possible configurations + * and their defaults. If you decide to add a configuration block, make sure to add it before the + * `apply from: "react.gradle"` line. + * + * project.ext.react = [ + * // the name of the generated asset file containing your JS bundle + * bundleAssetName: "index.android.bundle", + * + * // the entry file for bundle generation + * entryFile: "index.android.js", + * + * // whether to bundle JS and assets in debug mode + * bundleInDebug: false, + * + * // whether to bundle JS and assets in release mode + * bundleInRelease: true, + * + * // the root of your project, i.e. where "package.json" lives + * root: "../../", + * + * // where to put the JS bundle asset in debug mode + * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", + * + * // where to put the JS bundle asset in release mode + * jsBundleDirRelease: "$buildDir/intermediates/assets/release", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in debug mode + * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in release mode + * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", + * + * // by default the gradle tasks are skipped if none of the JS files or assets change; this means + * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to + * // date; if you have any other folders that you want to ignore for performance reasons (gradle + * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ + * // for example, you might want to remove it from here. + * inputExcludes: ["android/**", "ios/**"] + * ] + */ + +apply from: "react.gradle" + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + applicationId "com.address_book" + minSdkVersion 16 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + ndk { + abiFilters "armeabi-v7a", "x86" + } + } + buildTypes { + release { + minifyEnabled false // Set this to true to enable Proguard + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } +} + +dependencies { + compile fileTree(dir: "libs", include: ["*.jar"]) + compile "com.android.support:appcompat-v7:23.0.1" + compile "com.facebook.react:react-native:0.17.+" +} diff --git a/address_book/android/app/proguard-rules.pro b/address_book/android/app/proguard-rules.pro new file mode 100644 index 00000000..ffa8c9f6 --- /dev/null +++ b/address_book/android/app/proguard-rules.pro @@ -0,0 +1,60 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Disabling obfuscation is useful if you collect stack traces from production crashes +# (unless you are using a system that supports de-obfuscate the stack traces). +-dontobfuscate + +# React Native + +# Keep our interfaces so they can be used by other ProGuard rules. +# See http://sourceforge.net/p/proguard/bugs/466/ +-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip +-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters + +# Do not strip any method/class that is annotated with @DoNotStrip +-keep @com.facebook.proguard.annotations.DoNotStrip class * +-keepclassmembers class * { + @com.facebook.proguard.annotations.DoNotStrip *; +} + +-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { + void set*(***); + *** get*(); +} + +-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } +-keep class * extends com.facebook.react.bridge.NativeModule { *; } +-keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.ReactProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup ; } + +# okhttp + +-keepattributes Signature +-keepattributes *Annotation* +-keep class com.squareup.okhttp.** { *; } +-keep interface com.squareup.okhttp.** { *; } +-dontwarn com.squareup.okhttp.** + +# okio + +-keep class sun.misc.Unsafe { *; } +-dontwarn java.nio.file.* +-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement +-dontwarn okio.** diff --git a/address_book/android/app/react.gradle b/address_book/android/app/react.gradle new file mode 100644 index 00000000..1e08b00f --- /dev/null +++ b/address_book/android/app/react.gradle @@ -0,0 +1,87 @@ +import org.apache.tools.ant.taskdefs.condition.Os + +def config = project.hasProperty("react") ? project.react : []; + +def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" +def entryFile = config.entryFile ?: "index.android.js" + +// because elvis operator +def elvisFile(thing) { + return thing ? file(thing) : null; +} + +def reactRoot = elvisFile(config.root) ?: file("../../") +def jsBundleDirDebug = elvisFile(config.jsBundleDirDebug) ?: + file("$buildDir/intermediates/assets/debug") +def jsBundleDirRelease = elvisFile(config.jsBundleDirRelease) ?: + file("$buildDir/intermediates/assets/release") +def resourcesDirDebug = elvisFile(config.resourcesDirDebug) ?: + file("$buildDir/intermediates/res/merged/debug") +def resourcesDirRelease = elvisFile(config.resourcesDirRelease) ?: + file("$buildDir/intermediates/res/merged/release") +def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"] + +def jsBundleFileDebug = file("$jsBundleDirDebug/$bundleAssetName") +def jsBundleFileRelease = file("$jsBundleDirRelease/$bundleAssetName") + +task bundleDebugJsAndAssets(type: Exec) { + // create dirs if they are not there (e.g. the "clean" task just ran) + doFirst { + jsBundleDirDebug.mkdirs() + resourcesDirDebug.mkdirs() + } + + // set up inputs and outputs so gradle can cache the result + inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) + outputs.dir jsBundleDirDebug + outputs.dir resourcesDirDebug + + // set up the call to the react-native cli + workingDir reactRoot + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", + entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug + } else { + commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", + entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug + } + + enabled config.bundleInDebug ?: false +} + +task bundleReleaseJsAndAssets(type: Exec) { + // create dirs if they are not there (e.g. the "clean" task just ran) + doFirst { + jsBundleDirRelease.mkdirs() + resourcesDirRelease.mkdirs() + } + + // set up inputs and outputs so gradle can cache the result + inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) + outputs.dir jsBundleDirRelease + outputs.dir resourcesDirRelease + + // set up the call to the react-native cli + workingDir reactRoot + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", + entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease + } else { + commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", + entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease + } + + enabled config.bundleInRelease ?: true +} + +gradle.projectsEvaluated { + // hook bundleDebugJsAndAssets into the android build process + bundleDebugJsAndAssets.dependsOn mergeDebugResources + bundleDebugJsAndAssets.dependsOn mergeDebugAssets + processDebugResources.dependsOn bundleDebugJsAndAssets + + // hook bundleReleaseJsAndAssets into the android build process + bundleReleaseJsAndAssets.dependsOn mergeReleaseResources + bundleReleaseJsAndAssets.dependsOn mergeReleaseAssets + processReleaseResources.dependsOn bundleReleaseJsAndAssets +} diff --git a/address_book/android/app/src/main/AndroidManifest.xml b/address_book/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..71e0671e --- /dev/null +++ b/address_book/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + diff --git a/address_book/android/app/src/main/java/com/address_book/MainActivity.java b/address_book/android/app/src/main/java/com/address_book/MainActivity.java new file mode 100644 index 00000000..adf28368 --- /dev/null +++ b/address_book/android/app/src/main/java/com/address_book/MainActivity.java @@ -0,0 +1,78 @@ +package com.address_book; + +import android.app.Activity; +import android.os.Bundle; +import android.view.KeyEvent; + +import com.facebook.react.LifecycleState; +import com.facebook.react.ReactInstanceManager; +import com.facebook.react.ReactRootView; +import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; +import com.facebook.react.shell.MainReactPackage; +import com.facebook.soloader.SoLoader; + +public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { + + private ReactInstanceManager mReactInstanceManager; + private ReactRootView mReactRootView; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mReactRootView = new ReactRootView(this); + + mReactInstanceManager = ReactInstanceManager.builder() + .setApplication(getApplication()) + .setBundleAssetName("index.android.bundle") + .setJSMainModuleName("index.android") + .addPackage(new MainReactPackage()) + .setUseDeveloperSupport(BuildConfig.DEBUG) + .setInitialLifecycleState(LifecycleState.RESUMED) + .build(); + + mReactRootView.startReactApplication(mReactInstanceManager, "address_book", null); + + setContentView(mReactRootView); + } + + @Override + public boolean onKeyUp(int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_MENU && mReactInstanceManager != null) { + mReactInstanceManager.showDevOptionsDialog(); + return true; + } + return super.onKeyUp(keyCode, event); + } + + @Override + public void onBackPressed() { + if (mReactInstanceManager != null) { + mReactInstanceManager.onBackPressed(); + } else { + super.onBackPressed(); + } + } + + @Override + public void invokeDefaultOnBackPressed() { + super.onBackPressed(); + } + + @Override + protected void onPause() { + super.onPause(); + + if (mReactInstanceManager != null) { + mReactInstanceManager.onPause(); + } + } + + @Override + protected void onResume() { + super.onResume(); + + if (mReactInstanceManager != null) { + mReactInstanceManager.onResume(this, this); + } + } +} diff --git a/address_book/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/address_book/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..cde69bcc Binary files /dev/null and b/address_book/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/address_book/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/address_book/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..c133a0cb Binary files /dev/null and b/address_book/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/address_book/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/address_book/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..bfa42f0e Binary files /dev/null and b/address_book/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/address_book/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/address_book/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..324e72cd Binary files /dev/null and b/address_book/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/address_book/android/app/src/main/res/values/strings.xml b/address_book/android/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..2b956b26 --- /dev/null +++ b/address_book/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + address_book + diff --git a/address_book/android/app/src/main/res/values/styles.xml b/address_book/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..319eb0ca --- /dev/null +++ b/address_book/android/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/address_book/android/build.gradle b/address_book/android/build.gradle new file mode 100644 index 00000000..ccdfc4e3 --- /dev/null +++ b/address_book/android/build.gradle @@ -0,0 +1,20 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.3.1' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + mavenLocal() + jcenter() + } +} diff --git a/address_book/android/gradle.properties b/address_book/android/gradle.properties new file mode 100644 index 00000000..1fd964e9 --- /dev/null +++ b/address_book/android/gradle.properties @@ -0,0 +1,20 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +android.useDeprecatedNdk=true diff --git a/address_book/android/gradle/wrapper/gradle-wrapper.jar b/address_book/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..b5166dad Binary files /dev/null and b/address_book/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/address_book/android/gradle/wrapper/gradle-wrapper.properties b/address_book/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..b9fbfaba --- /dev/null +++ b/address_book/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip diff --git a/address_book/android/gradlew b/address_book/android/gradlew new file mode 100755 index 00000000..91a7e269 --- /dev/null +++ b/address_book/android/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/address_book/android/gradlew.bat b/address_book/android/gradlew.bat new file mode 100644 index 00000000..8a0b282a --- /dev/null +++ b/address_book/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/address_book/android/settings.gradle b/address_book/android/settings.gradle new file mode 100644 index 00000000..bf48fc70 --- /dev/null +++ b/address_book/android/settings.gradle @@ -0,0 +1,3 @@ +rootProject.name = 'address_book' + +include ':app' diff --git a/address_book/address_book.xcodeproj/project.pbxproj b/address_book/iOS/address_book.xcodeproj/project.pbxproj similarity index 87% rename from address_book/address_book.xcodeproj/project.pbxproj rename to address_book/iOS/address_book.xcodeproj/project.pbxproj index 0460c0e1..733660e1 100644 --- a/address_book/address_book.xcodeproj/project.pbxproj +++ b/address_book/iOS/address_book.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; }; 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; @@ -22,7 +21,7 @@ 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; - 1C044BE61B5520FB00E88539 /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1C044BDC1B55201600E88539 /* libRCTAdSupport.a */; }; + 392E79C51C3BC94000E38DEE /* libRCTAdSupport.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 392E79BB1C3BC8B900E38DEE /* libRCTAdSupport.a */; }; 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; /* End PBXBuildFile section */ @@ -90,9 +89,9 @@ remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; remoteInfo = React; }; - 1C044BDB1B55201600E88539 /* PBXContainerItemProxy */ = { + 392E79BA1C3BC8B900E38DEE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = 1C044BD61B55201600E88539 /* RCTAdSupport.xcodeproj */; + containerPortal = 392E79B51C3BC8B900E38DEE /* RCTAdSupport.xcodeproj */; proxyType = 2; remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; remoteInfo = RCTAdSupport; @@ -114,28 +113,28 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = main.jsbundle; path = iOS/main.jsbundle; sourceTree = ""; }; - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; + 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; 00E356EE1AD99517003FC87E /* address_bookTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = address_bookTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* address_bookTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = address_bookTests.m; sourceTree = ""; }; - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* address_book.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = address_book.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = iOS/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = iOS/AppDelegate.m; sourceTree = ""; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = address_book/AppDelegate.h; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = address_book/AppDelegate.m; sourceTree = ""; }; 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = iOS/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = iOS/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = iOS/main.m; sourceTree = ""; }; - 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; - 1C044BD61B55201600E88539 /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = "node_modules/react-native/Libraries/AdSupport/RCTAdSupport.xcodeproj"; sourceTree = ""; }; - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = address_book/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = address_book/Info.plist; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = address_book/main.m; sourceTree = ""; }; + 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; + 392E79B51C3BC8B900E38DEE /* RCTAdSupport.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAdSupport.xcodeproj; path = "../node_modules/react-native/Libraries/AdSupport/RCTAdSupport.xcodeproj"; sourceTree = ""; }; + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -150,7 +149,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1C044BE61B5520FB00E88539 /* libRCTAdSupport.a in Frameworks */, + 392E79C51C3BC94000E38DEE /* libRCTAdSupport.a in Frameworks */, 146834051AC3E58100842450 /* libReact.a in Frameworks */, 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, @@ -262,10 +261,10 @@ name = Products; sourceTree = ""; }; - 1C044BD71B55201600E88539 /* Products */ = { + 392E79B61C3BC8B900E38DEE /* Products */ = { isa = PBXGroup; children = ( - 1C044BDC1B55201600E88539 /* libRCTAdSupport.a */, + 392E79BB1C3BC8B900E38DEE /* libRCTAdSupport.a */, ); name = Products; sourceTree = ""; @@ -281,7 +280,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */ = { isa = PBXGroup; children = ( - 1C044BD61B55201600E88539 /* RCTAdSupport.xcodeproj */, + 392E79B51C3BC8B900E38DEE /* RCTAdSupport.xcodeproj */, 146833FF1AC3E56700842450 /* React.xcodeproj */, 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, @@ -353,6 +352,7 @@ 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, ); buildRules = ( ); @@ -369,7 +369,7 @@ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0610; + LastUpgradeCheck = 0720; ORGANIZATIONNAME = Facebook; TargetAttributes = { 00E356ED1AD99517003FC87E = { @@ -395,8 +395,8 @@ ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; }, { - ProductGroup = 1C044BD71B55201600E88539 /* Products */; - ProjectRef = 1C044BD61B55201600E88539 /* RCTAdSupport.xcodeproj */; + ProductGroup = 392E79B61C3BC8B900E38DEE /* Products */; + ProjectRef = 392E79B51C3BC8B900E38DEE /* RCTAdSupport.xcodeproj */; }, { ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; @@ -500,11 +500,11 @@ remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; - 1C044BDC1B55201600E88539 /* libRCTAdSupport.a */ = { + 392E79BB1C3BC8B900E38DEE /* libRCTAdSupport.a */ = { isa = PBXReferenceProxy; fileType = archive.ar; path = libRCTAdSupport.a; - remoteRef = 1C044BDB1B55201600E88539 /* PBXContainerItemProxy */; + remoteRef = 392E79BA1C3BC8B900E38DEE /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { @@ -535,7 +535,6 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, ); @@ -543,6 +542,23 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Bundle React Native code and images"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "../node_modules/react-native/packager/react-native-xcode.sh"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 00E356EA1AD99517003FC87E /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -578,7 +594,7 @@ 13B07FB21A68108700A75B9A /* Base */, ); name = LaunchScreen.xib; - path = iOS; + path = address_book; sourceTree = ""; }; /* End PBXVariantGroup section */ @@ -599,6 +615,7 @@ INFOPLIST_FILE = address_bookTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/address_book.app/address_book"; }; @@ -616,6 +633,7 @@ INFOPLIST_FILE = address_bookTests/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/address_book.app/address_book"; }; @@ -625,14 +643,17 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + DEAD_CODE_STRIPPING = NO; HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/node_modules/react-native/React/**", + "$(SRCROOT)/../node_modules/react-native/React/**", ); - INFOPLIST_FILE = iOS/Info.plist; + INFOPLIST_FILE = address_book/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = address_book; }; name = Debug; @@ -644,11 +665,13 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/node_modules/react-native/React/**", + "$(SRCROOT)/../node_modules/react-native/React/**", ); - INFOPLIST_FILE = iOS/Info.plist; + INFOPLIST_FILE = address_book/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.1; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = address_book; }; name = Release; @@ -673,6 +696,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -690,7 +714,7 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/node_modules/react-native/React/**", + "$(SRCROOT)/../node_modules/react-native/React/**", ); IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = YES; @@ -730,7 +754,7 @@ HEADER_SEARCH_PATHS = ( "$(inherited)", /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/node_modules/react-native/React/**", + "$(SRCROOT)/../node_modules/react-native/React/**", ); IPHONEOS_DEPLOYMENT_TARGET = 7.0; MTL_ENABLE_DEBUG_INFO = NO; diff --git a/address_book/address_book.xcodeproj/xcshareddata/xcschemes/address_book.xcscheme b/address_book/iOS/address_book.xcodeproj/xcshareddata/xcschemes/address_book.xcscheme similarity index 95% rename from address_book/address_book.xcodeproj/xcshareddata/xcschemes/address_book.xcscheme rename to address_book/iOS/address_book.xcodeproj/xcshareddata/xcschemes/address_book.xcscheme index 2b877a2c..64cf5cc3 100644 --- a/address_book/address_book.xcodeproj/xcshareddata/xcschemes/address_book.xcscheme +++ b/address_book/iOS/address_book.xcodeproj/xcshareddata/xcschemes/address_book.xcscheme @@ -1,6 +1,6 @@ + shouldUseLaunchSchemeArgsEnv = "YES"> @@ -62,15 +62,18 @@ ReferencedContainer = "container:address_book.xcodeproj"> + + @@ -86,10 +89,10 @@ diff --git a/address_book/iOS/AppDelegate.h b/address_book/iOS/address_book/AppDelegate.h similarity index 100% rename from address_book/iOS/AppDelegate.h rename to address_book/iOS/address_book/AppDelegate.h diff --git a/address_book/iOS/AppDelegate.m b/address_book/iOS/address_book/AppDelegate.m similarity index 83% rename from address_book/iOS/AppDelegate.m rename to address_book/iOS/address_book/AppDelegate.m index d89cac43..6716db3a 100644 --- a/address_book/iOS/AppDelegate.m +++ b/address_book/iOS/address_book/AppDelegate.m @@ -31,26 +31,23 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:( * on the same Wi-Fi network. */ - jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle"]; + jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; /** * OPTION 2 - * Load from pre-bundled file on disk. To re-generate the static bundle - * from the root of your project directory, run - * - * $ react-native bundle --minify - * - * see http://facebook.github.io/react-native/docs/runningondevice.html + * Load from pre-bundled file on disk. The static bundle is automatically + * generated by "Bundle React Native code and images" build step. */ // jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation moduleName:@"address_book" + initialProperties:nil launchOptions:launchOptions]; self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [[UIViewController alloc] init]; + UIViewController *rootViewController = [UIViewController new]; rootViewController.view = rootView; self.window.rootViewController = rootViewController; [self.window makeKeyAndVisible]; diff --git a/address_book/iOS/Base.lproj/LaunchScreen.xib b/address_book/iOS/address_book/Base.lproj/LaunchScreen.xib similarity index 100% rename from address_book/iOS/Base.lproj/LaunchScreen.xib rename to address_book/iOS/address_book/Base.lproj/LaunchScreen.xib diff --git a/address_book/iOS/Images.xcassets/AppIcon.appiconset/Contents.json b/address_book/iOS/address_book/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/AppIcon.appiconset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/address_book/iOS/Images.xcassets/about.imageset/Contents.json b/address_book/iOS/address_book/Images.xcassets/about.imageset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/about.imageset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/about.imageset/Contents.json diff --git a/address_book/iOS/Images.xcassets/about.imageset/about.png b/address_book/iOS/address_book/Images.xcassets/about.imageset/about.png similarity index 100% rename from address_book/iOS/Images.xcassets/about.imageset/about.png rename to address_book/iOS/address_book/Images.xcassets/about.imageset/about.png diff --git a/address_book/iOS/Images.xcassets/github.imageset/Contents.json b/address_book/iOS/address_book/Images.xcassets/github.imageset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/github.imageset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/github.imageset/Contents.json diff --git a/address_book/iOS/Images.xcassets/github.imageset/github.png b/address_book/iOS/address_book/Images.xcassets/github.imageset/github.png similarity index 100% rename from address_book/iOS/Images.xcassets/github.imageset/github.png rename to address_book/iOS/address_book/Images.xcassets/github.imageset/github.png diff --git a/address_book/iOS/Images.xcassets/gonggao.imageset/Contents.json b/address_book/iOS/address_book/Images.xcassets/gonggao.imageset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/gonggao.imageset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/gonggao.imageset/Contents.json diff --git a/address_book/iOS/Images.xcassets/gonggao.imageset/gonggao.png b/address_book/iOS/address_book/Images.xcassets/gonggao.imageset/gonggao.png similarity index 100% rename from address_book/iOS/Images.xcassets/gonggao.imageset/gonggao.png rename to address_book/iOS/address_book/Images.xcassets/gonggao.imageset/gonggao.png diff --git a/address_book/iOS/Images.xcassets/logo.imageset/Contents.json b/address_book/iOS/address_book/Images.xcassets/logo.imageset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/logo.imageset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/logo.imageset/Contents.json diff --git a/address_book/iOS/Images.xcassets/logo.imageset/logo.png b/address_book/iOS/address_book/Images.xcassets/logo.imageset/logo.png similarity index 100% rename from address_book/iOS/Images.xcassets/logo.imageset/logo.png rename to address_book/iOS/address_book/Images.xcassets/logo.imageset/logo.png diff --git a/address_book/iOS/Images.xcassets/manager.imageset/Contents.json b/address_book/iOS/address_book/Images.xcassets/manager.imageset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/manager.imageset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/manager.imageset/Contents.json diff --git a/address_book/iOS/Images.xcassets/manager.imageset/manager.png b/address_book/iOS/address_book/Images.xcassets/manager.imageset/manager.png similarity index 100% rename from address_book/iOS/Images.xcassets/manager.imageset/manager.png rename to address_book/iOS/address_book/Images.xcassets/manager.imageset/manager.png diff --git a/address_book/iOS/Images.xcassets/me_1.imageset/Contents.json b/address_book/iOS/address_book/Images.xcassets/me_1.imageset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/me_1.imageset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/me_1.imageset/Contents.json diff --git a/address_book/iOS/Images.xcassets/me_1.imageset/me_1.png b/address_book/iOS/address_book/Images.xcassets/me_1.imageset/me_1.png similarity index 100% rename from address_book/iOS/Images.xcassets/me_1.imageset/me_1.png rename to address_book/iOS/address_book/Images.xcassets/me_1.imageset/me_1.png diff --git a/address_book/iOS/Images.xcassets/phone.imageset/Contents.json b/address_book/iOS/address_book/Images.xcassets/phone.imageset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/phone.imageset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/phone.imageset/Contents.json diff --git a/address_book/iOS/Images.xcassets/phone.imageset/phone.png b/address_book/iOS/address_book/Images.xcassets/phone.imageset/phone.png similarity index 100% rename from address_book/iOS/Images.xcassets/phone.imageset/phone.png rename to address_book/iOS/address_book/Images.xcassets/phone.imageset/phone.png diff --git a/address_book/iOS/Images.xcassets/phone_s.imageset/Contents.json b/address_book/iOS/address_book/Images.xcassets/phone_s.imageset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/phone_s.imageset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/phone_s.imageset/Contents.json diff --git a/address_book/iOS/Images.xcassets/phone_s.imageset/phone_s.png b/address_book/iOS/address_book/Images.xcassets/phone_s.imageset/phone_s.png similarity index 100% rename from address_book/iOS/Images.xcassets/phone_s.imageset/phone_s.png rename to address_book/iOS/address_book/Images.xcassets/phone_s.imageset/phone_s.png diff --git a/address_book/iOS/Images.xcassets/weibo.imageset/Contents.json b/address_book/iOS/address_book/Images.xcassets/weibo.imageset/Contents.json similarity index 100% rename from address_book/iOS/Images.xcassets/weibo.imageset/Contents.json rename to address_book/iOS/address_book/Images.xcassets/weibo.imageset/Contents.json diff --git a/address_book/iOS/Images.xcassets/weibo.imageset/weibo.png b/address_book/iOS/address_book/Images.xcassets/weibo.imageset/weibo.png similarity index 100% rename from address_book/iOS/Images.xcassets/weibo.imageset/weibo.png rename to address_book/iOS/address_book/Images.xcassets/weibo.imageset/weibo.png diff --git a/address_book/iOS/Info.plist b/address_book/iOS/address_book/Info.plist similarity index 81% rename from address_book/iOS/Info.plist rename to address_book/iOS/address_book/Info.plist index cddf0766..682480a6 100644 --- a/address_book/iOS/Info.plist +++ b/address_book/iOS/address_book/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -22,6 +22,13 @@ 1 LSRequiresIPhoneOS + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + NSLocationWhenInUseUsageDescription + UILaunchStoryboardName LaunchScreen UIRequiredDeviceCapabilities @@ -36,13 +43,5 @@ UIViewControllerBasedStatusBarAppearance - NSLocationWhenInUseUsageDescription - - NSAppTransportSecurity - - - NSAllowsArbitraryLoads - - diff --git a/address_book/iOS/main.m b/address_book/iOS/address_book/main.m similarity index 100% rename from address_book/iOS/main.m rename to address_book/iOS/address_book/main.m diff --git a/address_book/iOS/address_bookTests/Info.plist b/address_book/iOS/address_bookTests/Info.plist new file mode 100644 index 00000000..ba72822e --- /dev/null +++ b/address_book/iOS/address_bookTests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/address_book/address_bookTests/address_bookTests.m b/address_book/iOS/address_bookTests/address_bookTests.m similarity index 83% rename from address_book/address_bookTests/address_bookTests.m rename to address_book/iOS/address_bookTests/address_bookTests.m index 7e1564ef..729855e6 100644 --- a/address_book/address_bookTests/address_bookTests.m +++ b/address_book/iOS/address_bookTests/address_bookTests.m @@ -10,8 +10,7 @@ #import #import -#import "RCTAssert.h" -#import "RCTRedBox.h" +#import "RCTLog.h" #import "RCTRootView.h" #define TIMEOUT_SECONDS 240 @@ -23,7 +22,6 @@ @interface address_bookTests : XCTestCase @implementation address_bookTests - - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test { if (test(view)) { @@ -37,18 +35,23 @@ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test return NO; } -- (void)testRendersWelcomeScreen { +- (void)testRendersWelcomeScreen +{ UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; BOOL foundElement = NO; - NSString *redboxError = nil; + + __block NSString *redboxError = nil; + RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - redboxError = [[RCTRedBox sharedInstance] currentErrorMessage]; - foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { return YES; @@ -57,6 +60,8 @@ - (void)testRendersWelcomeScreen { }]; } + RCTSetLogFunction(RCTDefaultLogFunction); + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); } diff --git a/address_book/iOS/main.jsbundle b/address_book/iOS/main.jsbundle deleted file mode 100644 index b702b30c..00000000 --- a/address_book/iOS/main.jsbundle +++ /dev/null @@ -1,8 +0,0 @@ -// Offline JS -// To re-generate the offline bundle, run this from the root of your project: -// -// $ react-native bundle --minify -// -// See http://facebook.github.io/react-native/docs/runningondevice.html for more details. - -throw new Error('Offline JS file is empty. See iOS/main.jsbundle for instructions'); diff --git a/address_book/index.android.js b/address_book/index.android.js new file mode 100644 index 00000000..8ac2fb9d --- /dev/null +++ b/address_book/index.android.js @@ -0,0 +1,52 @@ +/** + * Sample React Native App + * https://github.com/facebook/react-native + */ +'use strict'; + +var React = require('react-native'); +var { + AppRegistry, + StyleSheet, + Text, + View, +} = React; + +var address_book = React.createClass({ + render: function() { + return ( + + + Welcome to React Native! + + + To get started, edit index.android.js + + + Shake or press menu button for dev menu + + + ); + } +}); + +var styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: '#F5FCFF', + }, + welcome: { + fontSize: 20, + textAlign: 'center', + margin: 10, + }, + instructions: { + textAlign: 'center', + color: '#333333', + marginBottom: 5, + }, +}); + +AppRegistry.registerComponent('address_book', () => address_book); diff --git a/address_book/index.ios.js b/address_book/index.ios.js index ee16906f..340c6fd3 100644 --- a/address_book/index.ios.js +++ b/address_book/index.ios.js @@ -26,7 +26,6 @@ var { } = React; - StatusBarIOS.setStyle('light-content'); var Address = React.createClass({ statics: { @@ -45,7 +44,7 @@ var Address = React.createClass({ flex:1, opacity:1 }, - isLoadingShow: false, + isLoadingShow: false }; }, @@ -72,6 +71,18 @@ var Address = React.createClass({ }); } }); + }else{ + that.setState({ + showIndex: { + height:0, + opacity:0 + }, + showLogin:{ + flex:1, + opacity:1 + }, + isLoadingShow: false + }); } }); @@ -313,7 +324,4 @@ var styles = StyleSheet.create({ } }); - - - AppRegistry.registerComponent('address_book', () => Address); diff --git a/address_book/package.json b/address_book/package.json index 4294e11a..50188076 100644 --- a/address_book/package.json +++ b/address_book/package.json @@ -3,9 +3,9 @@ "version": "0.0.1", "private": true, "scripts": { - "start": "node_modules/react-native/packager/packager.sh" + "start": "react-native start" }, "dependencies": { - "react-native": "^0.7.1" + "react-native": "^0.17.0" } } diff --git a/address_book/server/database/message.json b/address_book/server/database/message.json index d53e0ac5..8812f482 100644 --- a/address_book/server/database/message.json +++ b/address_book/server/database/message.json @@ -1,32 +1,72 @@ [ { - "messageid": "1", - "userid": "112222", - "username":"李响", - "time": "2015-05-03", - "message": "etcd 是一个分布式一致性高可用的键值系统。 它被目前大部分容器集群管理系统(kubernetes、docker swarm、 coreos fleet、cloudfoundry diego等)采用来管理调度信息。本次演讲主要介绍etcd的基本架构以及遇到的问题。另外也将介绍etcd今后的发展。" - }, - - { - "messageid": "2", - "userid": "112222", - "username":"王冲", - "time": "2015-05-03", - "message": "途牛旅游网作为国内最大的旅游信息类网站之一,而途牛的价格中心是其大数据计算分析业务的核心系统。现在,途牛价格中心全新的实时计算架构通过应用分布式数据库SequoiaDB作为底层数据存储,再结合其他技术和架构,实现了系统整体效率2倍以上的提升。本次的分享就将由途牛旅游网的高级工程师王冲,介绍途牛旅游网的价格中心的实时计算架构以及如何结合SequoiaDB提升途牛价格中心的实时计算的效率。" - }, - - { - "messageid": "3", - "userid": "112222", - "time": "2015-05-03", - "username":"陈伟才", - "message": "阿里云ECS是阿里云计算的核心产品之一,存储IO性能则关系到虚拟机之内应用程序的性能。在过去一年,我们在虚拟机IO全链路profile、多场景下存储产品的解决方案等方面进行持续优化,IO性能和可预期都取得明显的收益。" - }, - { - "messageid": "4", - "userid": "112222", - "time": "2015-05-03", - "username":"图拉鼎 ", - "message": "苹果发布了 Swift 2.0 ,并宣布即将开源 Swift (详情)。本主题将向您介绍 Swift 2.0 的新特性,当前 Swift 语言的发展状况及未来展望。" + "messageid": "DD61CCF3-17B7-464E-8066-FAC7C2B58F27", + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "宋江", + "time": "2015-9-23", + "message": "欢迎新同学小康" + }, + { + "messageid": "F05D4D47-1A67-4F44-930F-A5B240CAAC90", + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "李逵", + "time": "2015-9-22", + "message": "欢迎新同学催明" + }, + { + "messageid": "DD61CCF3-17B7-464E-8066-FAC7C2B58F28", + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "敏儿", + "time": "2015-9-21", + "message": "欢迎新同学刘明" + }, + { + "messageid": "F05D4D47-1A67-4F44-930F-A5B240CAAC91", + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "宋江", + "time": "2015-9-20", + "message": "欢迎新同学刘备" + }, + { + "messageid": "DD61CCF3-17B7-464E-8066-FAC7C2B58F29", + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "宋江", + "time": "2015-9-19", + "message": "欢迎新同学渡边" + }, + { + "messageid": "F05D4D47-1A67-4F44-930F-A5B240CAAC92", + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "宋江", + "time": "2015-9-18", + "message": "欢迎新同学彩霞" + }, + { + "messageid": "F05D4D47-1A67-4F44-930F-A5B240CAAC93", + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "辛弃疾", + "time": "2015-9-1", + "message": "西江月·夜行黄沙道中 明月别枝惊鹊,清风半夜鸣蝉。稻花香里说丰年,听取蛙声一片。七八个星天外,两三点雨山前。旧时⑹茅店社林边,路转溪桥忽见" + }, + { + "messageid": "74C88D5A-22CC-4588-9B3F-D614A8706D8D", + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "宋江", + "time": "2015-9-23", + "message": "ss" + }, + { + "messageid": "E50BCF04-88C0-49FE-B779-9E25A2247A95", + "userid": "3240870A-538F-4A84-B00E-567E910A30ED", + "username": "吴用", + "time": "2015-11-7", + "message": "g" + }, + { + "messageid": "57CAA9FF-5AA7-4F31-A2B4-E2EC4428D194", + "userid": "3240870A-538F-4A84-B00E-567E910A30ED", + "username": "吴用", + "time": "2015-11-7", + "message": "sssff" } ] \ No newline at end of file diff --git a/address_book/server/database/user.json b/address_book/server/database/user.json index 1c273c12..554af898 100644 --- a/address_book/server/database/user.json +++ b/address_book/server/database/user.json @@ -1 +1,254 @@ -[{"userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"宋江","password":"19bdec7440acd44c669240ed534fc2f6","partment":"框架研发","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh","token":"5904BF67-F198-424D-BBDF-7E1599C130CD5839849B-97AB-443D-B083-4236E550FAD2"},{"userid":"6998EED4-BB29-469E-B19A-DF4171B1FD12","username":"卢俊义","password":"19bdec7440acd44c669240ed534fc2f6","partment":"框架研发","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh","time":"2015-07-14T05:48:56.192Z","token":"C0B668AB-A030-4A35-8A3C-422DEF4F9BE2undefined"},{"userid":"3240870A-538F-4A84-B00E-567E910A30ED","username":"吴用","password":"91266e54a7d08e3df4b26839ee946628","partment":"框架研发","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh","time":"2015-07-14T09:18:59.174Z","token":"7722D6B3-8ACF-4C9B-8677-3326C14B7D9E5839849B-97AB-443D-B083-4236E550FAD2"},{"userid":"3240870A--4A84-B00E-567E910A30ED","username":"公孙胜","password":"91266e54a7d08e3df4b26839ee946628","partment":"框架研发","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh","time":"2015-07-14T09:18:59.174Z","token":"4AAF1FC7-E063-4E95-BC02-97AB-443D-B083-4236E550FAD2"},{"userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"关胜","password":"19bdec7440acd44c669240ed534fc2f6","partment":"框架研发","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh"},{"userid":"6998EED4-BB29-469E-B19A-DF4171B1FD12","username":"林冲","password":"19bdec7440acd44c669240ed534fc2f6","partment":"框架研发","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh","time":"2015-07-14T05:48:56.192Z","token":"C0B668AB-A030-4A35-8A3C-422DEF4F9BE2undefined"},{"userid":"3240870A-538F-4A84-B00E-567E910A30ED","username":"秦明","password":"91266e54a7d08e3df4b26839ee946628","partment":"框架研发","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh","time":"2015-07-14T09:18:59.174Z","token":"4AAF1FC7-E063-4E95-BC02-45D3D1C83CE15839849B-97AB-443D-B083-4236E550FAD2"},{"userid":"3240870A--4A84-B00E-567E910A30ED","username":"呼延灼","password":"91266e54a7d08e3df4b26839ee946628","partment":"框架研发","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh","time":"2015-07-14T09:18:59.174Z","token":"4AAF1FC7-E063-4E95-BC02-97AB-443D-B083-4236E550FAD2"},{"userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"花荣","password":"19bdec7440acd44c669240ed534fc2f6","partment":"BU产品","tel":"19008097890","email":"test@126.com","tag":"产品","creater":"wlh"},{"userid":"6998EED4-BB29-469E-B19A-DF4171B1FD12","username":"柴进","password":"19bdec7440acd44c669240ed534fc2f6","partment":"BU产品","tel":"19008097890","email":"test@126.com","tag":"产品","creater":"wlh","time":"2015-07-14T05:48:56.192Z","token":"C0B668AB-A030-4A35-8A3C-422DEF4F9BE2undefined"},{"userid":"3240870A-538F-4A84-B00E-567E910A30ED","username":"李应","password":"91266e54a7d08e3df4b26839ee946628","partment":"BU研发","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh","time":"2015-07-14T09:18:59.174Z","token":"A3BE67F4-D7BE-48BC-AA40-2D6022B4EC7B5839849B-97AB-443D-B083-4236E550FAD2"},{"userid":"3240870A--4A84-B00E-567E910A30ED","username":"鲁智深","password":"91266e54a7d08e3df4b26839ee946628","partment":"公共产品","tel":"19008097890","email":"test@126.com","tag":"产品","creater":"wlh","time":"2015-07-14T09:18:59.174Z","token":"4AAF1FC7-E063-4E95-BC02-97AB-443D-B083-4236E550FAD2"},{"userid":"591F68A5-87E6-4A6C-810F-5A50953AE747","username":"武松","password":"19bdec7440acd44c669240ed534fc2f6","partment":"启明星","tel":"19008097890","email":"test@126.com","tag":"研发","creater":"wlh"},{"userid":"6998EED4-BB29-469E-B19A-DF4171B1FD12","username":"董平","password":"19bdec7440acd44c669240ed534fc2f6","partment":"项目管理","tel":"19008097890","email":"test@126.com","tag":"项目","creater":"wlh","time":"2015-07-14T05:48:56.192Z","token":"C0B668AB-A030-4A35-8A3C-422DEF4F9BE2undefined"},{"userid":"3240870A-538F-4A84-B00E-567E910A30ED","username":"张清","password":"91266e54a7d08e3df4b26839ee946628","partment":"项目管理","tel":"19008097890","email":"sss@126.com","tag":"项目","creater":"wlh","time":"2015-07-14T09:18:59.174Z","token":"4AAF1FC7-E063-4E95-BC02-45D3D1C83CE15839849B-97AB-443D-B083-4236E550FAD2"},{"userid":"3240870A--4A84-B00E-567E910A30ED","username":"杨志","password":"91266e54a7d08e3df4b26839ee946628","partment":"BU产品","tel":"19008097890","email":"test@126.com","tag":"产品","creater":"wlh","time":"2015-07-14T09:18:59.174Z","token":"4AAF1FC7-E063-4E95-BC02-97AB-443D-B083-4236E550FAD2"},{"userid":"C9C77472-6672-4B11-9EE2-FA84634D5A13","username":"徐宁","password":"19bdec7440acd44c669240ed534fc2f6","partment":"框架研发","tel":"12012012001200","email":"h@126.com","tag":"研发","creater":"","time":"2015-07-16T08:10:05.691Z"},{"userid":"B06CCEED-F200-40B1-BFB6-0CCFD88C3C27","username":"索超","password":"19bdec7440acd44c669240ed534fc2f6","partment":"框架研发","tel":"12012012001200","email":"wukong@126.com","tag":"研发","creater":"","time":"2015-07-16T08:13:04.556Z"},{"userid":"631EE7C9-9D9E-49C9-9CAE-7C30E1E6FE09","username":"戴宗","password":"19bdec7440acd44c669240ed534fc2f6","partment":"框架研发","tel":"122","email":"bu@126.com","tag":"研发","creater":"","time":"2015-07-16T08:13:23.464Z"},{"userid":"3636B950-8E65-45D2-A610-0B2AAF4C85CA","username":"刘唐","password":"19bdec7440acd44c669240ed534fc2f6","partment":"框架研发","tel":"12","email":"tangsheng@126.com","tag":"研发","creater":"","time":"2015-07-16T08:13:27.380Z"},{"userid":"C505CD16-4261-4DDD-9CBB-DCFAF42C96D9","username":"李逵","password":"19bdec7440acd44c669240ed534fc2f6","partment":"框架研发","tel":"18978906789","email":"123@126.com","tag":"研发","creater":"","time":"2015-07-16T08:14:48.104Z"},{"userid":"9109C8F1-0691-4122-9AF3-AC79776D83C0","username":"e","password":"50cf3051af480981668d167eb4848329","partment":"框架研发","tel":"13456789098","email":"123@126.com","tag":"研发","creater":"","time":"2015-07-18T09:58:55.652Z","token":""}] \ No newline at end of file +[ + { + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "宋江", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "框架研发", + "tel": "19008097890", + "email": "test0@126.com", + "tag": "研发", + "creater": "wlh", + "token": "AE0218C4-21F2-4846-9767-28CE3C5D9579C34C0B51-3A68-4297-9C7E-A851B136D34F" + }, + { + "userid": "6998EED4-BB29-469E-B19A-DF4171B1FD12", + "username": "卢俊义", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "框架研发", + "tel": "19008097891", + "email": "test1@126.com", + "tag": "研发", + "creater": "wlh", + "time": "2015-07-14T05:48:56.192Z", + "token": "C0B668AB-A030-4A35-8A3C-422DEF4F9BE2undefined" + }, + { + "userid": "3240870A-538F-4A84-B00E-567E910A30ED", + "username": "吴用", + "password": "91266e54a7d08e3df4b26839ee946628", + "partment": "框架研发", + "tel": "19008097892", + "email": "test2@126.com", + "tag": "研发", + "creater": "wlh", + "time": "2015-07-14T09:18:59.174Z", + "token": "13E2A651-0044-428B-81FD-6ABBB96D663AC34C0B51-3A68-4297-9C7E-A851B136D34F" + }, + { + "userid": "3240870A--4A84-B00E-567E910A30ED", + "username": "公孙胜", + "password": "91266e54a7d08e3df4b26839ee946628", + "partment": "框架研发", + "tel": "19008097893", + "email": "test3@126.com", + "tag": "研发", + "creater": "wlh", + "time": "2015-07-14T09:18:59.174Z", + "token": "4AAF1FC7-E063-4E95-BC02-97AB-443D-B083-4236E550FAD2" + }, + { + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "关胜", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "框架研发", + "tel": "19008097894", + "email": "test4@126.com", + "tag": "研发", + "creater": "wlh" + }, + { + "userid": "6998EED4-BB29-469E-B19A-DF4171B1FD12", + "username": "林冲", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "框架研发", + "tel": "19008097895", + "email": "test5@126.com", + "tag": "研发", + "creater": "wlh", + "time": "2015-07-14T05:48:56.192Z", + "token": "C0B668AB-A030-4A35-8A3C-422DEF4F9BE2undefined" + }, + { + "userid": "3240870A-538F-4A84-B00E-567E910A30ED", + "username": "秦明", + "password": "91266e54a7d08e3df4b26839ee946628", + "partment": "框架研发", + "tel": "19008097896", + "email": "test6@126.com", + "tag": "研发", + "creater": "wlh", + "time": "2015-07-14T09:18:59.174Z", + "token": "4AAF1FC7-E063-4E95-BC02-45D3D1C83CE15839849B-97AB-443D-B083-4236E550FAD2" + }, + { + "userid": "3240870A--4A84-B00E-567E910A30ED", + "username": "呼延灼", + "password": "91266e54a7d08e3df4b26839ee946628", + "partment": "框架研发", + "tel": "19008097897", + "email": "test7@126.com", + "tag": "研发", + "creater": "wlh", + "time": "2015-07-14T09:18:59.174Z", + "token": "4AAF1FC7-E063-4E95-BC02-97AB-443D-B083-4236E550FAD2" + }, + { + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "花荣", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "BU产品", + "tel": "19008097898", + "email": "test8@126.com", + "tag": "产品", + "creater": "wlh" + }, + { + "userid": "6998EED4-BB29-469E-B19A-DF4171B1FD12", + "username": "柴进", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "BU产品", + "tel": "19008097899", + "email": "test9@126.com", + "tag": "产品", + "creater": "wlh", + "time": "2015-07-14T05:48:56.192Z", + "token": "C0B668AB-A030-4A35-8A3C-422DEF4F9BE2undefined" + }, + { + "userid": "3240870A-538F-4A84-B00E-567E910A30ED", + "username": "李应", + "password": "91266e54a7d08e3df4b26839ee946628", + "partment": "BU研发", + "tel": "19008097991", + "email": "test10@126.com", + "tag": "研发", + "creater": "wlh", + "time": "2015-07-14T09:18:59.174Z", + "token": "A3BE67F4-D7BE-48BC-AA40-2D6022B4EC7B5839849B-97AB-443D-B083-4236E550FAD2" + }, + { + "userid": "3240870A--4A84-B00E-567E910A30ED", + "username": "鲁智深", + "password": "91266e54a7d08e3df4b26839ee946628", + "partment": "公共产品", + "tel": "19008097992", + "email": "test11@126.com", + "tag": "产品", + "creater": "wlh", + "time": "2015-07-14T09:18:59.174Z", + "token": "4AAF1FC7-E063-4E95-BC02-97AB-443D-B083-4236E550FAD2" + }, + { + "userid": "591F68A5-87E6-4A6C-810F-5A50953AE747", + "username": "武松", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "启明星", + "tel": "19008097993", + "email": "test12@126.com", + "tag": "研发", + "creater": "wlh" + }, + { + "userid": "6998EED4-BB29-469E-B19A-DF4171B1FD12", + "username": "董平", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "项目管理", + "tel": "19008097994", + "email": "test13@126.com", + "tag": "项目", + "creater": "wlh", + "time": "2015-07-14T05:48:56.192Z", + "token": "C0B668AB-A030-4A35-8A3C-422DEF4F9BE2undefined" + }, + { + "userid": "3240870A-538F-4A84-B00E-567E910A30ED", + "username": "张清", + "password": "91266e54a7d08e3df4b26839ee946628", + "partment": "项目管理", + "tel": "19008097995", + "email": "test14@126.com", + "tag": "项目", + "creater": "wlh", + "time": "2015-07-14T09:18:59.174Z", + "token": "4AAF1FC7-E063-4E95-BC02-45D3D1C83CE15839849B-97AB-443D-B083-4236E550FAD2" + }, + { + "userid": "3240870A--4A84-B00E-567E910A30ED", + "username": "杨志", + "password": "91266e54a7d08e3df4b26839ee946628", + "partment": "BU产品", + "tel": "19008097996", + "email": "test15@126.com", + "tag": "产品", + "creater": "wlh", + "time": "2015-07-14T09:18:59.174Z", + "token": "4AAF1FC7-E063-4E95-BC02-97AB-443D-B083-4236E550FAD2" + }, + { + "userid": "C9C77472-6672-4B11-9EE2-FA84634D5A13", + "username": "徐宁", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "框架研发", + "tel": "19008097997", + "email": "test16@126.com", + "tag": "研发", + "creater": "", + "time": "2015-07-16T08:10:05.691Z" + }, + { + "userid": "B06CCEED-F200-40B1-BFB6-0CCFD88C3C27", + "username": "索超", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "框架研发", + "tel": "19008097998", + "email": "wukong@126.com", + "tag": "研发", + "creater": "", + "time": "2015-07-16T08:13:04.556Z" + }, + { + "userid": "631EE7C9-9D9E-49C9-9CAE-7C30E1E6FE09", + "username": "戴宗", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "框架研发", + "tel": "19008097999", + "email": "test17@126.com", + "tag": "研发", + "creater": "", + "time": "2015-07-16T08:13:23.464Z" + }, + { + "userid": "3636B950-8E65-45D2-A610-0B2AAF4C85CA", + "username": "刘唐", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "框架研发", + "tel": "19008098997", + "email": "test18@126.com", + "tag": "研发", + "creater": "", + "time": "2015-07-16T08:13:27.380Z" + }, + { + "userid": "C505CD16-4261-4DDD-9CBB-DCFAF42C96D9", + "username": "李逵", + "password": "19bdec7440acd44c669240ed534fc2f6", + "partment": "框架研发", + "tel": "19008096997", + "email": "test19@126.com", + "tag": "研发", + "creater": "", + "time": "2015-07-16T08:14:48.104Z" + }, + { + "userid": "9109C8F1-0691-4122-9AF3-AC79776D83C0", + "username": "e", + "password": "50cf3051af480981668d167eb4848329", + "partment": "框架研发", + "tel": "19008197997", + "email": "test20@126.com", + "tag": "研发", + "creater": "", + "time": "2015-07-18T09:58:55.652Z", + "token": "" + } +] \ No newline at end of file diff --git a/address_book/server/package.json b/address_book/server/package.json index 24dfe6e4..1eb22e53 100644 --- a/address_book/server/package.json +++ b/address_book/server/package.json @@ -14,6 +14,7 @@ "express": "~4.12.0", "morgan": "~1.5.1", "serve-favicon": "~2.2.0", - "supervisor": "^0.7.1" + "supervisor": "^0.7.1", + "xss": "^0.2.7" } } diff --git a/address_book/server/routes/services/message.js b/address_book/server/routes/services/message.js index 5a7da18c..78086a1e 100644 --- a/address_book/server/routes/services/message.js +++ b/address_book/server/routes/services/message.js @@ -1,13 +1,15 @@ var fs = require('fs'); var util = require('./../util'); var MESSAGE_PATH = './database/message.json'; +var USER_PATH = './database/user.json'; var Message = { - init: function(app){ app.post('/message/get', this.getMessage); + app.post('/message/add', this.addMessage); }, + //获取公告消息 getMessage: function(req, res){ var key = req.param('key'); if(key !== util.getKey()){ @@ -37,9 +39,64 @@ var Message = { err: err }); }); + }, + + //增加公告消息 + addMessage: function(req, res){ + var token = req.param('token'); + var message = req.param('message'); + if(!token || !message){ + return res.send({ + status: 0, + err: 'token或者message不能为空' + }); + } + //根据token查询 + fs.readFile(USER_PATH, function(err, data){ + if(err){ + return res.send({ + status: 0, + err: err + }); + } + + try{ + var obj = JSON.parse(data); + for(var i in obj){ + if(obj[i].token === token){ + //增加信息 + var msgObj = JSON.parse(fs.readFileSync(MESSAGE_PATH)); + msgObj.push({ + messageid: util.guid(), + userid: obj[i].userid, + username: obj[i].username, + time: new Date().getFullYear() + '-' + + (parseInt(new Date().getMonth()) + 1) + '-' + new Date().getDate(), + message: message + }); + + fs.writeFileSync(MESSAGE_PATH, JSON.stringify(msgObj)); + return res.send({ + status: 1 + }); + } + } + + return res.send({ + status: 0, + err: 'token认证失败' + }); + + }catch(e){ + return res.send({ + status: 0, + err: e + }); + } + }); + } }; - module.exports = Message; \ No newline at end of file diff --git a/address_book/server/routes/services/test.js b/address_book/server/routes/services/test.js new file mode 100644 index 00000000..56c85a29 --- /dev/null +++ b/address_book/server/routes/services/test.js @@ -0,0 +1,23 @@ + +var Test = { + init: function(app){ + app.get('/test/test', this.doTest); + app.get('/test/show', this.doShow); + }, + + doTest: function(req, res){ + res.send({ + status: 1, + info: '测试服务doTest' + }); + }, + + doShow: function(req, res){ + res.json({ + status: 1, + info: '测试服务doShow' + }); + } +}; + +module.exports = Test; \ No newline at end of file diff --git a/address_book/server/routes/services/user.js b/address_book/server/routes/services/user.js index 4294b7ac..3afe3e30 100644 --- a/address_book/server/routes/services/user.js +++ b/address_book/server/routes/services/user.js @@ -103,7 +103,6 @@ var User = { }, //用户登录 - //方便大会用户,开启白名单(但是不能修改密码、不能删除、更新其他用户信息;可增加用户) login: function(req, res){ var email = req.param('email'); var password = util.md5(req.param('password')); @@ -159,11 +158,6 @@ var User = { var oldPassword = util.md5(req.param('oldPassword')); var password = util.md5(req.param('password')); - console.log(req.param('oldPassword')); - console.log(req.param('password')); - console.log(oldPassword); - console.log(password); - var content = JSON.parse(fs.readFileSync(USER_PATH)); for(var i in content){ if(token === content[i].token && oldPassword === content[i].password){ diff --git a/address_book/server/service.md b/address_book/server/service.md index 3b7dea2b..9a624cf8 100644 --- a/address_book/server/service.md +++ b/address_book/server/service.md @@ -1,16 +1,14 @@ - - - - -//创建用户 -http://localhost:3000/user/create?username=wlh&password=123&tel=19008097890&email=wlhmyit@126.com&apartment=%E6%A1%86%E6%9E%B6%E7%A0%94%E5%8F%91%E9%83%A8&tag=%E5%89%8D%E7%AB%AF%E6%A1%86%E6%9E%B6%E7%BB%84&creater=wlh - -//登录 -http://localhost:3000/user/login?email=wlhmyit@126.com&password=123 -http://localhost:3000/user/login/token?token=789488DA-E81F-4B76-81EF-F7DB3AD1412Dundefined - -//更新密码 -http://localhost:3000/user/password/update?password=657&token=789488DA-E81F-4B76-81EF-F7DB3AD1412Dundefined - -//删除用户 -http://localhost:3000/user/delete?token=F6E39E6B-230E-4A64-8AC2-0C7C951830D8undefined&email=wlhmyit@126.com \ No newline at end of file +//user API +//获取用户信息 +app.post('/user/get', this.getUser); +//创建用户 +app.post('/user/create', this.addUser); +//登录 +app.post('/user/login/token', this.loginByToken); +//更新密码 +app.post('/user/password/update', this.updatePassword); +//删除用户 +app.post('/user/delete', this.deleteUser); +//message API +//获取公告 +app.post('/message/get', this.getMessage); diff --git a/address_book/views/about/webview.js b/address_book/views/about/webview.js index 449fa841..44390e3e 100644 --- a/address_book/views/about/webview.js +++ b/address_book/views/about/webview.js @@ -15,7 +15,7 @@ var webview = React.createClass({ render: function(){ return( - + ); @@ -23,5 +23,4 @@ var webview = React.createClass({ }); - module.exports = webview; diff --git a/address_book/views/home.js b/address_book/views/home.js index 728f3798..44f200bd 100644 --- a/address_book/views/home.js +++ b/address_book/views/home.js @@ -14,38 +14,43 @@ var { TouchableHighlight, } = React; - var Home = React.createClass({ getInitialState: function(){ //减去paddingLeft && paddingRight && space var width = Math.floor(((Util.size.width - 20) - 50) / 4); var items = [ { + id:1, title: '研发', partment: '框架研发', color: '#126AFF', }, { + id:2, title: '研发', partment: 'BU研发', color: '#FFD600', }, { + id:3, title: '产品', partment: '公共产品', color: '#F80728', }, { + id:4, title: '产品', partment: 'BU产品', color: '#05C147', }, { + id:5, title: '产品', partment: '启明星', color: '#FF4EB9', }, { + id:6, title: '项目', partment: '项目管理', color: '#EE810D', @@ -66,6 +71,7 @@ var Home = React.createClass({ for(var i = 0; i < 4; i++){ Items1.push( + - {items[i].username.substr(0, 1) || '未'} + + {items[i].username.substr(0, 1) || '未'} + @@ -40,12 +42,14 @@ var Address = React.createClass({ - + {items[i].tel} - + {items[i].email} @@ -55,7 +59,7 @@ var Address = React.createClass({ ); } return ( - + {view} ); @@ -123,5 +127,4 @@ var styles = StyleSheet.create({ } }); - module.exports = Address; \ No newline at end of file diff --git a/address_book/views/home/itemblock.js b/address_book/views/home/itemblock.js index 56ce8f64..ccc50787 100644 --- a/address_book/views/home/itemblock.js +++ b/address_book/views/home/itemblock.js @@ -1,7 +1,6 @@ var React = require('react-native'); var Address = require('./address'); - var Service = require('./../service'); var Util = require('../util'); @@ -12,7 +11,6 @@ var { TouchableHighlight, } = React; - //每个单项组件 var ItemBlock = React.createClass({ render: function(){ diff --git a/address_book/views/manager.js b/address_book/views/manager.js index 49b01329..7203f693 100644 --- a/address_book/views/manager.js +++ b/address_book/views/manager.js @@ -26,7 +26,7 @@ var Manager = React.createClass({ var JSXDOM = []; for(var i in items){ JSXDOM.push( - + {tags[i]} {items[i]} diff --git a/address_book/views/manager/addUser.js b/address_book/views/manager/addUser.js index c5fa8cd2..ddb2625f 100644 --- a/address_book/views/manager/addUser.js +++ b/address_book/views/manager/addUser.js @@ -45,7 +45,7 @@ var AddUser = React.createClass({ var tagOne = []; for(var i = 0; i <3; i++){ tagOne.push( - + {this.state.tags[i]} @@ -56,7 +56,7 @@ var AddUser = React.createClass({ var tagTwo = []; for(var i = 3; i <6; i++){ tagTwo.push( - + {this.state.tags[i]} @@ -144,7 +144,6 @@ var AddUser = React.createClass({ }; this.setState(obj); this.setState(color); - this.setState(); //清除其他选中效果 delete items[id]; for(var i in items){ diff --git a/address_book/views/manager/deleteUser.js b/address_book/views/manager/deleteUser.js index d243cabc..ab69bf5e 100644 --- a/address_book/views/manager/deleteUser.js +++ b/address_book/views/manager/deleteUser.js @@ -16,7 +16,11 @@ var { } = React; var DeleteUser = React.createClass({ - + getInitialState: function () { + return { + email: '' + } + }, render: function(){ return ( @@ -44,29 +48,33 @@ var DeleteUser = React.createClass({ _deleteUser: function(){ var that = this; - AlertIOS.alert('提示', '确认删除该用户?', [ - {text: '删除', onPress: function(){ - var path = Service.host + Service.deleteUser; - AsyncStorage.getItem('token', function(err, data){ - if(!err){ - Util.post(path,{ - token: data, - email: that.state.email - }, function(data){ - if(data.status){ - AlertIOS.alert('成功', '删除成功'); + this.state.email == '' ? + AlertIOS.alert('提示', '请输入要删除的用户邮箱') : + AlertIOS.alert('提示', '确认删除该用户?', [ + { + text: '删除', + onPress: function(){ + var path = Service.host + Service.deleteUser; + AsyncStorage.getItem('token', function(err, data){ + if(!err){ + Util.post(path,{ + token: data, + email: that.state.email + }, function(data){ + if(data.status){ + AlertIOS.alert('成功', '删除成功'); + }else{ + AlertIOS.alert('失败', '删除失败'); + } + }); }else{ - AlertIOS.alert('失败', '删除失败'); + AlertIOS.alert('提示', '没有权限'); } }); - }else{ - AlertIOS.alert('提示', '没有权限'); } - }); - } - }, - {text: '取消', onPress: ()=>null}, - ]); + }, + {text: '取消', onPress: ()=>null}, + ]); } }); @@ -95,6 +103,4 @@ var styles = StyleSheet.create({ } }); - - module.exports = DeleteUser; \ No newline at end of file diff --git a/address_book/views/manager/modifyPassword.js b/address_book/views/manager/modifyPassword.js index f43c9f7f..3c68bca4 100644 --- a/address_book/views/manager/modifyPassword.js +++ b/address_book/views/manager/modifyPassword.js @@ -73,7 +73,6 @@ var ModifyUser = React.createClass({ AlertIOS.alert('失败', data.data); } }); - } }); @@ -102,5 +101,4 @@ var styles = StyleSheet.create({ } }); - module.exports = ModifyUser; \ No newline at end of file diff --git a/address_book/views/manager/postMessage.js b/address_book/views/manager/postMessage.js index d0776ef8..5359b343 100644 --- a/address_book/views/manager/postMessage.js +++ b/address_book/views/manager/postMessage.js @@ -1,5 +1,6 @@ var React = require('react-native'); +var Service = require('./../service'); var Util = require('./../util'); var { @@ -10,6 +11,7 @@ var { TouchableOpacity, Image, Text, + AsyncStorage } = React; var PostMessage = React.createClass({ @@ -18,10 +20,13 @@ var PostMessage = React.createClass({ return ( - + - + 发布公告 @@ -31,8 +36,33 @@ var PostMessage = React.createClass({ ); }, + _onChange: function(val){ + if(val){ + this.setState({ + message: val + }); + } + }, + _postMessage: function(){ + var that = this; + AsyncStorage.getItem('token', function(err, token){ + if(err){ + alert('权限失效,请退出APP,重新登录'); + }else{ + Util.post(Service.host + Service.addMessage, { + token: token, + message: that.state.message + }, function(data){ + if(data.status){ + alert('添加成功!'); + }else{ + alert('添加失败!'); + } + }); + } + }); } }); @@ -62,5 +92,4 @@ var styles = StyleSheet.create({ } }); - module.exports = PostMessage; \ No newline at end of file diff --git a/address_book/views/message.js b/address_book/views/message.js index 57a527a0..d522732b 100644 --- a/address_book/views/message.js +++ b/address_book/views/message.js @@ -18,33 +18,20 @@ var { TouchableOpacity, } = React; - var Message = React.createClass({ render: function(){ var contents = []; var items = []; - var height = Util.size.height - 50 - 114; - var urls = []; - var word = '春眠不觉晓,知了处处叫'; - var component = ''; - if(this.props.data.status){ contents = this.props.data.data; } - - urls.push('https://avatars3.githubusercontent.com/u/6133685?v=3&s=50'); - urls.push('http://img1.gtimg.com/13/1309/130992/13099292_200x200_0.jpg'); - urls.push('http://tp1.sinaimg.cn/5396425536/180/5718431393/0'); - urls.push('http://tp2.sinaimg.cn/1904769205/180/5728293682/1'); - for(var i = 0; i < contents.length; i++){ - var pic = urls[parseInt(Math.random()*4)]; items.push( @@ -69,7 +56,8 @@ var styles = StyleSheet.create({ container:{ flex:1, backgroundColor:'#F5F5F5', - flexDirection:'column' + flexDirection:'column', + marginBottom: 64 }, search:{ height:35, @@ -81,5 +69,4 @@ var styles = StyleSheet.create({ } }); - module.exports = Message; \ No newline at end of file diff --git a/address_book/views/service.js b/address_book/views/service.js index 2acf300d..b8c2292d 100644 --- a/address_book/views/service.js +++ b/address_book/views/service.js @@ -5,9 +5,9 @@ var Service = { getUser: '/user/get', createUser: '/user/create', getMessage: '/message/get', + addMessage: '/message/add', updatePassword: '/user/password/update', deleteUser: '/user/delete' }; - module.exports = Service; \ No newline at end of file diff --git a/address_book/views/util.js b/address_book/views/util.js index 4bcf37f9..5269cb53 100644 --- a/address_book/views/util.js +++ b/address_book/views/util.js @@ -2,18 +2,14 @@ var React = require('react-native'); var Dimensions = require('Dimensions'); -//var KeyboardEvents = require('react-native-keyboardevents'); -//var KeyboardEventEmitter = KeyboardEvents.Emitter; - var { PixelRatio } = React; - var Util = { - //单位像素比 + //单位像素 pixel: 1 / PixelRatio.get(), //屏幕尺寸 size: { @@ -43,6 +39,4 @@ var Util = { }; - - module.exports = Util; \ No newline at end of file diff --git a/nearby/.flowconfig b/nearby/.flowconfig new file mode 100644 index 00000000..71d9905b --- /dev/null +++ b/nearby/.flowconfig @@ -0,0 +1,63 @@ +[ignore] + +# We fork some components by platform. +.*/*.web.js +.*/*.android.js + +# Some modules have their own node_modules with overlap +.*/node_modules/node-haste/.* + +# Ugh +.*/node_modules/babel.* +.*/node_modules/babylon.* +.*/node_modules/invariant.* + +# Ignore react and fbjs where there are overlaps, but don't ignore +# anything that react-native relies on +.*/node_modules/fbjs-haste/.*/__tests__/.* +.*/node_modules/fbjs-haste/__forks__/Map.js +.*/node_modules/fbjs-haste/__forks__/Promise.js +.*/node_modules/fbjs-haste/__forks__/fetch.js +.*/node_modules/fbjs-haste/core/ExecutionEnvironment.js +.*/node_modules/fbjs-haste/core/isEmpty.js +.*/node_modules/fbjs-haste/crypto/crc32.js +.*/node_modules/fbjs-haste/stubs/ErrorUtils.js +.*/node_modules/react-haste/React.js +.*/node_modules/react-haste/renderers/dom/ReactDOM.js +.*/node_modules/react-haste/renderers/shared/event/eventPlugins/ResponderEventPlugin.js + +# Ignore commoner tests +.*/node_modules/commoner/test/.* + +# See https://github.com/facebook/flow/issues/442 +.*/react-tools/node_modules/commoner/lib/reader.js + +# Ignore jest +.*/node_modules/jest-cli/.* + +# Ignore Website +.*/website/.* + +[include] + +[libs] +node_modules/react-native/Libraries/react-native/react-native-interface.js + +[options] +module.system=haste + +munge_underscores=true + +module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' +module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub' + +suppress_type=$FlowIssue +suppress_type=$FlowFixMe +suppress_type=$FixMe + +suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) +suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)? #[0-9]+ +suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy + +[version] +0.19.0 diff --git a/nearby/.gitignore b/nearby/.gitignore new file mode 100644 index 00000000..94fc8671 --- /dev/null +++ b/nearby/.gitignore @@ -0,0 +1,34 @@ +# OSX +# +.DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +project.xcworkspace + +# Android/IJ +# +.idea +.gradle +local.properties + +# node.js +# +node_modules/ +npm-debug.log diff --git a/nearby/.watchmanconfig b/nearby/.watchmanconfig new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/nearby/.watchmanconfig @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/nearby/Nearby/index.js b/nearby/Nearby/index.js new file mode 100644 index 00000000..abece8eb --- /dev/null +++ b/nearby/Nearby/index.js @@ -0,0 +1,165 @@ +var React = require('react-native'); +var Bank = require('./views/bank'); +var Film = require('./views/film'); +var Food = require('./views/food'); +var Toilet = require('./views/toilet'); +var Map = require('./views/map'); + +var { + AppRegistry, + StyleSheet, + Text, + View, + ScrollView, + NavigatorIOS, + StatusBarIOS, + TabBarIOS + } = React; + + +//是否开启真实的定位;如果开启了_GEO_OPEN,_GEO_TEST_POS则会失效 +_GEO_OPEN = false; +//模拟定位数据 +_GEO_TEST_POS = '121.390686,31.213976'; + +//高亮 +StatusBarIOS.setStyle('light-content'); +//开启网络状态 +StatusBarIOS.setNetworkActivityIndicatorVisible(true); + +var Nearby = React.createClass({ + getInitialState: function(){ + return{ + selected: '美食' + }; + }, + render: function() { + return ( + + + {this.setState({selected: '美食'})}}> + { + this.refs.nav_food.navigator.push({ + title: '地图', + component: Map, + passProps:{ + type:'餐饮' + } + }); + } + }} + /> + + + {this.setState({selected: '电影'})}}> + { + this.refs.nav_film.navigator.push({ + title: '地图', + component: Map, + passProps:{ + type:'电影院' + } + }); + } + }} + /> + + + {this.setState({selected: '银行'})}}> + { + this.refs.nav_bank.navigator.push({ + title: '地图', + component: Map, + passProps:{ + type:'银行' + } + }); + } + + }} + /> + + + {this.setState({selected: '卫生间'})}}> + { + this.refs.nav_toilet.navigator.push({ + title: '地图', + component: Map, + passProps:{ + type:'厕所' + } + }); + } + }} + /> + + + + ); + }, + +}); + +var styles = StyleSheet.create({ + container: { + flex: 1 + } +}); + +module.exports = Nearby; \ No newline at end of file diff --git a/nearby/Nearby/views/bank.js b/nearby/Nearby/views/bank.js new file mode 100644 index 00000000..56552a99 --- /dev/null +++ b/nearby/Nearby/views/bank.js @@ -0,0 +1,12 @@ + +var React = require('react-native'); +var List = require('./list'); +var Bank = React.createClass({ + render: function(){ + return( + + ); + } +}); + +module.exports = Bank; diff --git a/nearby/Nearby/views/detail.js b/nearby/Nearby/views/detail.js new file mode 100644 index 00000000..4ceb1926 --- /dev/null +++ b/nearby/Nearby/views/detail.js @@ -0,0 +1,104 @@ +var React = require('react-native'); +var Util = require('./util'); + +var { + View, + ScrollView, + Text, + StyleSheet, + TextInput, + ActivityIndicatorIOS, + TouchableOpacity + } = React; + +var FoodDetail = React.createClass({ + getInitialState: function(){ + return{ + data: null + }; + }, + render: function(){ + return ( + + {this.state.data? + + {this.state.data.name} + + 类型: + {this.state.data.type} + + + 地址: + {this.state.data.address} + + + 标签: + {this.state.data.tag} + + + 服务: + {this.state.data.server} + + + :null} + + ); + }, + componentDidMount: function(){ + var that = this; + var url = Util.detailURL + 'key=' + Util.amapKey + '&id=' + this.props.id + '&extensions=all'; + Util.getJSON(url, function(data){ + if(data.status && data.info === 'OK' && data.pois.length){ + var obj = data.pois[0]; + if(obj.deep_info && obj.deep_info.tag){ + obj.server = obj.deep_info.tag; + } + that.setState({ + data: obj + }); + }else{ + alert('数据服务出错'); + } + + }); + } +}); + +var styles = StyleSheet.create({ + container:{ + flex:1 + }, + name:{ + fontSize:15, + color:'#1D92F5', + fontWeight:'bold' + }, + content:{ + marginLeft:10, + marginRight:10, + marginTop:10 + }, + tag:{ + fontSize:13, + marginTop:10 + }, + types:{ + marginTop:10, + fontSize:13, + color:'#4C4C4C' + }, + address:{ + fontSize:13, + color:'#4C4C4C' + }, + server:{ + marginTop:10, + fontSize:13 + } + +}); + + + +module.exports = FoodDetail; + diff --git a/nearby/Nearby/views/film.js b/nearby/Nearby/views/film.js new file mode 100644 index 00000000..9f513dd6 --- /dev/null +++ b/nearby/Nearby/views/film.js @@ -0,0 +1,12 @@ + +var React = require('react-native'); +var List = require('./list'); +var Film = React.createClass({ + render: function(){ + return( + + ); + } +}); + +module.exports = Film; diff --git a/nearby/Nearby/views/food.js b/nearby/Nearby/views/food.js new file mode 100644 index 00000000..4da74424 --- /dev/null +++ b/nearby/Nearby/views/food.js @@ -0,0 +1,12 @@ + +var React = require('react-native'); +var List = require('./list'); +var Food = React.createClass({ + render: function(){ + return( + + ); + } +}); +module.exports = Food; + diff --git a/nearby/Nearby/views/list.js b/nearby/Nearby/views/list.js new file mode 100644 index 00000000..8f2862a3 --- /dev/null +++ b/nearby/Nearby/views/list.js @@ -0,0 +1,270 @@ +var React = require('react-native'); +var Geolocation = require('Geolocation'); +var Util = require('./util'); +var Detail = require('./detail'); + +var { + View, + ScrollView, + Text, + StyleSheet, + TextInput, + ActivityIndicatorIOS, + TouchableOpacity, + LinkingIOS, + ActionSheetIOS, + WebView, + AsyncStorage +} = React; + +var List = React.createClass({ + getInitialState: function() { + return { + list: null, + count: 0, + keywords: '' + }; + }, + render: function(){ + var items = []; + if(this.state.list){ + var len = this.state.list.length > 10 ? 10 : this.state.list.length; + for(var i = 0; i < len; i++){ + var obj = this.state.list[i]; + items.push( + + + + {obj.name} + {obj.type} + + + + {obj.distance}米 + + {obj.address} + + + { + + obj.tel.length ? + ( + 电话 + ) + :null + } + + ); + } + } + var placeholder = '搜索' + this.props.type; + return ( + + + + + + 已为您筛选 + {this.state.count} + 条数据 + + + + {items} + {items.length? null : } + + + ); + }, + componentDidMount: function(){ + var that = this; + Geolocation.getCurrentPosition(function(data){ + var lnglat = data.coords.longitude + ',' + data.coords.latitude; + AsyncStorage.setItem('pos', lnglat); + var url = Util.searchURL + 'key=' + Util.amapKey + '&keywords=' + + that.props.type + '&extensions=base'; + if(_GEO_OPEN){ + url += '&location=' + lnglat; + that._doGetData(url); + }else{ + url += '&location=' + _GEO_TEST_POS; + that._doGetData(url); + } + }, function(err){ + alert('定位失败,请重新开启应用定位'); + }); + }, + + _doGetData: function(url){ + var that = this; + Util.getJSON(url, function(data){ + if(data.status && data.info === 'OK'){ + var count = data.pois.length > 10? 10: data.pois.length; + that._addStorage(data); + that.setState({ + list: data.pois, + count: count + }); + }else{ + alert('没有查询到相应的数据'); + } + }); + }, + + /*加载详情页*/ + _loadDetail: function(id, name){ + this.props.nav.push({ + component: Detail, + title: name, + passProps:{ + id: id + } + }); + }, + + _onChangeText: function(val){ + this.setState({ + keywords: val + }); + }, + _onEndEditing: function(){ + var that = this; + var keywords = this.state.keywords; + var url = Util.searchURL + 'key=' + Util.amapKey + '&keywords=' + + keywords + '&types=' + that.props.type + '&extensions=base'; + that.setState({ + list: null + }); + AsyncStorage.getItem('pos', function(err, result){ + if(_GEO_OPEN){ + if(!err){ + url += '&location=' + result; + that._doGetData(url); + }else{ + alert('定位失败'); + } + }else{ + url += '&location=' + _GEO_TEST_POS; + that._doGetData(url); + } + }); + }, + + //添加到本地存储 + _addStorage: function(data){ + var posArr = []; + var len = data.pois.length > 10? 10: data.pois.length; + for(var i = 0; i < len; i++){ + posArr.push(data.pois[i].location); + } + var posStr = posArr.join(','); + AsyncStorage.setItem('_' + this.props.type , posStr); + }, + + //拨打电话 + _call: function(tel){ + if(tel.length){ + var arr = tel.split(';'); + var BUTTONS = []; + for(var i in arr){ + BUTTONS.push(arr[i]); + } + BUTTONS.push('取消'); + + ActionSheetIOS.showActionSheetWithOptions({ + options: BUTTONS, + cancelButtonIndex: BUTTONS.length - 1 + }, function(index){ + arr[index] && LinkingIOS.openURL('tel://' + arr[index]); + }); + }else{ + alert('没有提供号码'); + } + } + +}); + +var styles = StyleSheet.create({ + container:{ + flex:1, + backgroundColor:'#ddd' + }, + input:{ + height:38, + marginLeft:10, + marginRight:10, + borderWidth:Util.pixel, + paddingLeft:5, + marginTop:10, + borderColor: '#868687', + borderRadius:3, + fontSize:15 + }, + tip:{ + fontSize:12, + marginLeft:10, + marginTop:5, + color: '#505050' + }, + row:{ + flexDirection:'row', + marginLeft:10, + marginRight:10, + marginTop:10, + paddingTop:5 + }, + distance:{ + width:120, + alignItems:'flex-end', + }, + name:{ + fontSize:15, + marginBottom:6 + }, + type:{ + fontSize:12, + color:'#686868' + }, + mi:{ + fontSize:12, + color:'#686868' + }, + address:{ + fontSize:12, + marginTop:5, + color:'#686868' + }, + phone:{ + marginLeft:10, + marginRight:10, + height:30, + marginTop:10, + justifyContent:'center', + alignItems:'center', + borderWidth:Util.pixel, + borderColor:'#ccc', + borderRadius:2, + }, + searchBg:{ + backgroundColor:'#fff', + paddingBottom:10 + }, + item:{ + marginTop:10, + backgroundColor:'#fff', + paddingBottom:10, + borderTopWidth:Util.pixel, + borderBottomWidth:Util.pixel, + borderColor:'#ccc' + }, + activity:{ + marginTop:50, + justifyContent:'center', + alignItems:'center', + } +}); + +module.exports = List; + diff --git a/nearby/Nearby/views/map.js b/nearby/Nearby/views/map.js new file mode 100644 index 00000000..eec3fa0e --- /dev/null +++ b/nearby/Nearby/views/map.js @@ -0,0 +1,49 @@ + +var React = require('react-native'); +var { + View, + Text, + WebView, + AsyncStorage + } = React; + +var Map = React.createClass({ + getInitialState: function(){ + return{ + url: null + }; + }, + render: function(){ + var webView = null; + if(this.state.url){ + webView = + } + return( + + {webView} + + ); + }, + componentDidMount: function(){ + var that = this; + AsyncStorage.multiGet(['_' + that.props.type, 'pos'], function(err, result){ + if(!err){ + var pos = result[1][1]; + var markers = result[0][1]; + var url = 'http://vczero.github.io/webview/index.html?'; + if(_GEO_OPEN){ + url += 'pos=' + pos + '&markers=' + markers; + }else{ + url += 'pos=' + _GEO_TEST_POS + '&markers=' + markers; + } + that.setState({ + url: url + }); + }else{ + alert('定位失败'); + } + }); + } +}); + +module.exports = Map; \ No newline at end of file diff --git a/nearby/Nearby/views/toilet.js b/nearby/Nearby/views/toilet.js new file mode 100644 index 00000000..0d510bea --- /dev/null +++ b/nearby/Nearby/views/toilet.js @@ -0,0 +1,13 @@ + +var React = require('react-native'); +var List = require('./list'); +var Toilet = React.createClass({ + render: function(){ + return( + + ); + } +}); + +module.exports = Toilet; + diff --git a/nearby/Nearby/views/util.js b/nearby/Nearby/views/util.js new file mode 100644 index 00000000..d2afbc2c --- /dev/null +++ b/nearby/Nearby/views/util.js @@ -0,0 +1,51 @@ +var React = require('react-native'); +var Dimensions = require('Dimensions'); + +var { + PixelRatio + } = React; + +var Util = { + //单位像素 + pixel: 1 / PixelRatio.get(), + //屏幕尺寸 + size: { + width: Dimensions.get('window').width, + height: Dimensions.get('window').height + }, + + //post + post: function (url, data, callback) { + var fetchOptions = { + method: 'POST', + headers: { + 'Accept': 'application/json', + 'Content-Type': 'application/json' + }, + body: JSON.stringify(data) + }; + + fetch(url, fetchOptions) + .then((response) => response.text()) + .then((responseText) => { + callback(JSON.parse(responseText)); + }); + }, + + //get + getJSON: function(url, callback){ + fetch(url) + .then((response) => response.text()) + .then((responseText) => { + callback(JSON.parse(responseText)); + }); + }, + //高德地图key,测试key,请勿商用,后期会清理。申请key请到:http://lbs.amap.com/console/ + amapKey: '98cd4d3c1c2865132e73d851654c9c1b', + //周边搜索服务 + searchURL: 'http://restapi.amap.com/v3/place/around?', + + detailURL: 'http://restapi.amap.com/v3/place/detail?' +}; + +module.exports = Util; \ No newline at end of file diff --git a/nearby/android/app/build.gradle b/nearby/android/app/build.gradle new file mode 100644 index 00000000..580c5793 --- /dev/null +++ b/nearby/android/app/build.gradle @@ -0,0 +1,78 @@ +apply plugin: "com.android.application" + +/** + * The react.gradle file registers two tasks: bundleDebugJsAndAssets and bundleReleaseJsAndAssets. + * These basically call `react-native bundle` with the correct arguments during the Android build + * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the + * bundle directly from the development server. Below you can see all the possible configurations + * and their defaults. If you decide to add a configuration block, make sure to add it before the + * `apply from: "react.gradle"` line. + * + * project.ext.react = [ + * // the name of the generated asset file containing your JS bundle + * bundleAssetName: "index.android.bundle", + * + * // the entry file for bundle generation + * entryFile: "index.android.js", + * + * // whether to bundle JS and assets in debug mode + * bundleInDebug: false, + * + * // whether to bundle JS and assets in release mode + * bundleInRelease: true, + * + * // the root of your project, i.e. where "package.json" lives + * root: "../../", + * + * // where to put the JS bundle asset in debug mode + * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", + * + * // where to put the JS bundle asset in release mode + * jsBundleDirRelease: "$buildDir/intermediates/assets/release", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in debug mode + * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", + * + * // where to put drawable resources / React Native assets, e.g. the ones you use via + * // require('./image.png')), in release mode + * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", + * + * // by default the gradle tasks are skipped if none of the JS files or assets change; this means + * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to + * // date; if you have any other folders that you want to ignore for performance reasons (gradle + * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ + * // for example, you might want to remove it from here. + * inputExcludes: ["android/**", "ios/**"] + * ] + */ + +apply from: "react.gradle" + +android { + compileSdkVersion 23 + buildToolsVersion "23.0.1" + + defaultConfig { + applicationId "com.nearby" + minSdkVersion 16 + targetSdkVersion 22 + versionCode 1 + versionName "1.0" + ndk { + abiFilters "armeabi-v7a", "x86" + } + } + buildTypes { + release { + minifyEnabled false // Set this to true to enable Proguard + proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" + } + } +} + +dependencies { + compile fileTree(dir: "libs", include: ["*.jar"]) + compile "com.android.support:appcompat-v7:23.0.1" + compile "com.facebook.react:react-native:0.17.+" +} diff --git a/nearby/android/app/proguard-rules.pro b/nearby/android/app/proguard-rules.pro new file mode 100644 index 00000000..ffa8c9f6 --- /dev/null +++ b/nearby/android/app/proguard-rules.pro @@ -0,0 +1,60 @@ +# Add project specific ProGuard rules here. +# By default, the flags in this file are appended to flags specified +# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt +# You can edit the include path and order by changing the proguardFiles +# directive in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# Add any project specific keep options here: + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Disabling obfuscation is useful if you collect stack traces from production crashes +# (unless you are using a system that supports de-obfuscate the stack traces). +-dontobfuscate + +# React Native + +# Keep our interfaces so they can be used by other ProGuard rules. +# See http://sourceforge.net/p/proguard/bugs/466/ +-keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip +-keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters + +# Do not strip any method/class that is annotated with @DoNotStrip +-keep @com.facebook.proguard.annotations.DoNotStrip class * +-keepclassmembers class * { + @com.facebook.proguard.annotations.DoNotStrip *; +} + +-keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { + void set*(***); + *** get*(); +} + +-keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } +-keep class * extends com.facebook.react.bridge.NativeModule { *; } +-keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.ReactProp ; } +-keepclassmembers class * { @com.facebook.react.uimanager.ReactPropGroup ; } + +# okhttp + +-keepattributes Signature +-keepattributes *Annotation* +-keep class com.squareup.okhttp.** { *; } +-keep interface com.squareup.okhttp.** { *; } +-dontwarn com.squareup.okhttp.** + +# okio + +-keep class sun.misc.Unsafe { *; } +-dontwarn java.nio.file.* +-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement +-dontwarn okio.** diff --git a/nearby/android/app/react.gradle b/nearby/android/app/react.gradle new file mode 100644 index 00000000..1e08b00f --- /dev/null +++ b/nearby/android/app/react.gradle @@ -0,0 +1,87 @@ +import org.apache.tools.ant.taskdefs.condition.Os + +def config = project.hasProperty("react") ? project.react : []; + +def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" +def entryFile = config.entryFile ?: "index.android.js" + +// because elvis operator +def elvisFile(thing) { + return thing ? file(thing) : null; +} + +def reactRoot = elvisFile(config.root) ?: file("../../") +def jsBundleDirDebug = elvisFile(config.jsBundleDirDebug) ?: + file("$buildDir/intermediates/assets/debug") +def jsBundleDirRelease = elvisFile(config.jsBundleDirRelease) ?: + file("$buildDir/intermediates/assets/release") +def resourcesDirDebug = elvisFile(config.resourcesDirDebug) ?: + file("$buildDir/intermediates/res/merged/debug") +def resourcesDirRelease = elvisFile(config.resourcesDirRelease) ?: + file("$buildDir/intermediates/res/merged/release") +def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"] + +def jsBundleFileDebug = file("$jsBundleDirDebug/$bundleAssetName") +def jsBundleFileRelease = file("$jsBundleDirRelease/$bundleAssetName") + +task bundleDebugJsAndAssets(type: Exec) { + // create dirs if they are not there (e.g. the "clean" task just ran) + doFirst { + jsBundleDirDebug.mkdirs() + resourcesDirDebug.mkdirs() + } + + // set up inputs and outputs so gradle can cache the result + inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) + outputs.dir jsBundleDirDebug + outputs.dir resourcesDirDebug + + // set up the call to the react-native cli + workingDir reactRoot + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", + entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug + } else { + commandLine "react-native", "bundle", "--platform", "android", "--dev", "true", "--entry-file", + entryFile, "--bundle-output", jsBundleFileDebug, "--assets-dest", resourcesDirDebug + } + + enabled config.bundleInDebug ?: false +} + +task bundleReleaseJsAndAssets(type: Exec) { + // create dirs if they are not there (e.g. the "clean" task just ran) + doFirst { + jsBundleDirRelease.mkdirs() + resourcesDirRelease.mkdirs() + } + + // set up inputs and outputs so gradle can cache the result + inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) + outputs.dir jsBundleDirRelease + outputs.dir resourcesDirRelease + + // set up the call to the react-native cli + workingDir reactRoot + if (Os.isFamily(Os.FAMILY_WINDOWS)) { + commandLine "cmd","/c", "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", + entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease + } else { + commandLine "react-native", "bundle", "--platform", "android", "--dev", "false", "--entry-file", + entryFile, "--bundle-output", jsBundleFileRelease, "--assets-dest", resourcesDirRelease + } + + enabled config.bundleInRelease ?: true +} + +gradle.projectsEvaluated { + // hook bundleDebugJsAndAssets into the android build process + bundleDebugJsAndAssets.dependsOn mergeDebugResources + bundleDebugJsAndAssets.dependsOn mergeDebugAssets + processDebugResources.dependsOn bundleDebugJsAndAssets + + // hook bundleReleaseJsAndAssets into the android build process + bundleReleaseJsAndAssets.dependsOn mergeReleaseResources + bundleReleaseJsAndAssets.dependsOn mergeReleaseAssets + processReleaseResources.dependsOn bundleReleaseJsAndAssets +} diff --git a/nearby/android/app/src/main/AndroidManifest.xml b/nearby/android/app/src/main/AndroidManifest.xml new file mode 100644 index 00000000..7feaef6d --- /dev/null +++ b/nearby/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + diff --git a/nearby/android/app/src/main/java/com/nearby/MainActivity.java b/nearby/android/app/src/main/java/com/nearby/MainActivity.java new file mode 100644 index 00000000..5e692f56 --- /dev/null +++ b/nearby/android/app/src/main/java/com/nearby/MainActivity.java @@ -0,0 +1,78 @@ +package com.nearby; + +import android.app.Activity; +import android.os.Bundle; +import android.view.KeyEvent; + +import com.facebook.react.LifecycleState; +import com.facebook.react.ReactInstanceManager; +import com.facebook.react.ReactRootView; +import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; +import com.facebook.react.shell.MainReactPackage; +import com.facebook.soloader.SoLoader; + +public class MainActivity extends Activity implements DefaultHardwareBackBtnHandler { + + private ReactInstanceManager mReactInstanceManager; + private ReactRootView mReactRootView; + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + mReactRootView = new ReactRootView(this); + + mReactInstanceManager = ReactInstanceManager.builder() + .setApplication(getApplication()) + .setBundleAssetName("index.android.bundle") + .setJSMainModuleName("index.android") + .addPackage(new MainReactPackage()) + .setUseDeveloperSupport(BuildConfig.DEBUG) + .setInitialLifecycleState(LifecycleState.RESUMED) + .build(); + + mReactRootView.startReactApplication(mReactInstanceManager, "nearby", null); + + setContentView(mReactRootView); + } + + @Override + public boolean onKeyUp(int keyCode, KeyEvent event) { + if (keyCode == KeyEvent.KEYCODE_MENU && mReactInstanceManager != null) { + mReactInstanceManager.showDevOptionsDialog(); + return true; + } + return super.onKeyUp(keyCode, event); + } + + @Override + public void onBackPressed() { + if (mReactInstanceManager != null) { + mReactInstanceManager.onBackPressed(); + } else { + super.onBackPressed(); + } + } + + @Override + public void invokeDefaultOnBackPressed() { + super.onBackPressed(); + } + + @Override + protected void onPause() { + super.onPause(); + + if (mReactInstanceManager != null) { + mReactInstanceManager.onPause(); + } + } + + @Override + protected void onResume() { + super.onResume(); + + if (mReactInstanceManager != null) { + mReactInstanceManager.onResume(this, this); + } + } +} diff --git a/nearby/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/nearby/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 00000000..cde69bcc Binary files /dev/null and b/nearby/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/nearby/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/nearby/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 00000000..c133a0cb Binary files /dev/null and b/nearby/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/nearby/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/nearby/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 00000000..bfa42f0e Binary files /dev/null and b/nearby/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/nearby/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/nearby/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 00000000..324e72cd Binary files /dev/null and b/nearby/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/nearby/android/app/src/main/res/values/strings.xml b/nearby/android/app/src/main/res/values/strings.xml new file mode 100644 index 00000000..f73dcf7c --- /dev/null +++ b/nearby/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + nearby + diff --git a/nearby/android/app/src/main/res/values/styles.xml b/nearby/android/app/src/main/res/values/styles.xml new file mode 100644 index 00000000..319eb0ca --- /dev/null +++ b/nearby/android/app/src/main/res/values/styles.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/nearby/android/build.gradle b/nearby/android/build.gradle new file mode 100644 index 00000000..ccdfc4e3 --- /dev/null +++ b/nearby/android/build.gradle @@ -0,0 +1,20 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.3.1' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + mavenLocal() + jcenter() + } +} diff --git a/nearby/android/gradle.properties b/nearby/android/gradle.properties new file mode 100644 index 00000000..1fd964e9 --- /dev/null +++ b/nearby/android/gradle.properties @@ -0,0 +1,20 @@ +# Project-wide Gradle settings. + +# IDE (e.g. Android Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. + +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html + +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# Default value: -Xmx10248m -XX:MaxPermSize=256m +# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 + +# When configured, Gradle will run in incubating parallel mode. +# This option should only be used with decoupled projects. More details, visit +# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects +# org.gradle.parallel=true + +android.useDeprecatedNdk=true diff --git a/nearby/android/gradle/wrapper/gradle-wrapper.jar b/nearby/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 00000000..b5166dad Binary files /dev/null and b/nearby/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/nearby/android/gradle/wrapper/gradle-wrapper.properties b/nearby/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..b9fbfaba --- /dev/null +++ b/nearby/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip diff --git a/nearby/android/gradlew b/nearby/android/gradlew new file mode 100755 index 00000000..91a7e269 --- /dev/null +++ b/nearby/android/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/nearby/android/gradlew.bat b/nearby/android/gradlew.bat new file mode 100644 index 00000000..aec99730 --- /dev/null +++ b/nearby/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/nearby/android/settings.gradle b/nearby/android/settings.gradle new file mode 100644 index 00000000..93c6e1d2 --- /dev/null +++ b/nearby/android/settings.gradle @@ -0,0 +1,3 @@ +rootProject.name = 'nearby' + +include ':app' diff --git a/nearby/imgs/bank.png b/nearby/imgs/bank.png new file mode 100644 index 00000000..0891eedb Binary files /dev/null and b/nearby/imgs/bank.png differ diff --git a/nearby/imgs/film.png b/nearby/imgs/film.png new file mode 100644 index 00000000..a909b536 Binary files /dev/null and b/nearby/imgs/film.png differ diff --git a/nearby/imgs/food.png b/nearby/imgs/food.png new file mode 100644 index 00000000..acb10220 Binary files /dev/null and b/nearby/imgs/food.png differ diff --git a/nearby/imgs/toilet.png b/nearby/imgs/toilet.png new file mode 100644 index 00000000..89068dfc Binary files /dev/null and b/nearby/imgs/toilet.png differ diff --git a/nearby/index.android.js b/nearby/index.android.js new file mode 100644 index 00000000..2df02b08 --- /dev/null +++ b/nearby/index.android.js @@ -0,0 +1,52 @@ +/** + * Sample React Native App + * https://github.com/facebook/react-native + */ +'use strict'; + +var React = require('react-native'); +var { + AppRegistry, + StyleSheet, + Text, + View, +} = React; + +var nearby = React.createClass({ + render: function() { + return ( + + + Welcome to React Native! + + + To get started, edit index.android.js + + + Shake or press menu button for dev menu + + + ); + } +}); + +var styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: '#F5FCFF', + }, + welcome: { + fontSize: 20, + textAlign: 'center', + margin: 10, + }, + instructions: { + textAlign: 'center', + color: '#333333', + marginBottom: 5, + }, +}); + +AppRegistry.registerComponent('nearby', () => nearby); diff --git a/nearby/index.ios.js b/nearby/index.ios.js new file mode 100644 index 00000000..a4011e65 --- /dev/null +++ b/nearby/index.ios.js @@ -0,0 +1,13 @@ + +'use strict'; + +var React = require('react-native'); +var Nearby = require('./Nearby/index'); + +var { + AppRegistry +} = React; + + + +AppRegistry.registerComponent('nearby', () => Nearby); diff --git a/nearby/ios/main.jsbundle b/nearby/ios/main.jsbundle new file mode 100644 index 00000000..3d7f2ddd --- /dev/null +++ b/nearby/ios/main.jsbundle @@ -0,0 +1,19 @@ +__DEV__=!1,__BUNDLE_START_TIME__=Date.now(),function(e){function t(e){for(var t,n,r,i,o=Array.prototype.slice.call(e),a={};o.length;)if(n=o.shift(),!a[n]&&(a[n]=!0,r=h[n],r&&r.waiting))for(t=0;t=i.error&&(t=i.warn),e.nativeLoggingHook(r,t)}}function o(t){if(!Array.isArray(t)){var n=t;t=[];for(var o in n)if(n.hasOwnProperty(o)){var s=n[o];s[r]=o,t.push(s)}}if(0===t.length)return void e.nativeLoggingHook("",i.log);var u=Object.keys(t[0]).sort(),c=[],l=[];u.forEach(function(e,n){l[n]=e.length;for(var r=0;r=0||p.indexOf("description")>=0))return o(t);if(0===p.length){if(_(t)){var d=t.name?": "+t.name:"";return e.stylize("[Function"+d+"]","special")}if(m(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(g(t))return e.stylize(Date.prototype.toString.call(t),"date");if(y(t))return o(t)}var f="",v=!1,b=["{","}"];if(c(t)&&(v=!0,b=["[","]"]),_(t)){var S=t.name?": "+t.name:"";f=" [Function"+S+"]"}if(m(t)&&(f=" "+RegExp.prototype.toString.call(t)),g(t)&&(f=" "+Date.prototype.toUTCString.call(t)),y(t)&&(f=" "+o(t)),0===p.length&&(!v||0==t.length))return b[0]+f+b[1];if(0>r)return m(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var R;return R=v?a(e,t,r,h,p):p.map(function(n){return s(e,t,r,h,n,v)}),e.seen.pop(),u(R,f,b)}function i(e,t){if(f(t))return e.stylize("undefined","undefined");if(d(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return h(t)?e.stylize(""+t,"number"):l(t)?e.stylize(""+t,"boolean"):p(t)?e.stylize("null","null"):void 0}function o(e){return"["+Error.prototype.toString.call(e)+"]"}function a(e,t,n,r,i){for(var o=[],a=0,u=t.length;u>a;++a)o.push(S(t,String(a))?s(e,t,n,r,String(a),!0):"");return i.forEach(function(i){i.match(/^\d+$/)||o.push(s(e,t,n,r,i,!0))}),o}function s(e,t,n,i,o,a){var s,u,c;if(c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]},c.get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),S(i,o)||(s="["+o+"]"),u||(e.seen.indexOf(c.value)<0?(u=p(n)?r(e,c.value,null):r(e,c.value,n-1),u.indexOf("\n")>-1&&(u=a?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special")),f(s)){if(a&&o.match(/^\d+$/))return u;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+u}function u(e,t,n){var r=0,i=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function c(e){return Array.isArray(e)}function l(e){return"boolean"==typeof e}function p(e){return null===e}function h(e){return"number"==typeof e}function d(e){return"string"==typeof e}function f(e){return void 0===e}function m(e){return v(e)&&"[object RegExp]"===b(e)}function v(e){return"object"==typeof e&&null!==e}function g(e){return v(e)&&"[object Date]"===b(e)}function y(e){return v(e)&&("[object Error]"===b(e)||e instanceof Error)}function _(e){return"function"==typeof e}function b(e){return Object.prototype.toString.call(e)}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}return e}(),r="(index)",i={trace:0,log:1,info:2,warn:3,error:4};"undefined"!=typeof module?module.exports=t:t(e)}(this),function(e){function t(){var t=function(t){e.console.error("Error: \n stack: "+t.stack+"\n line: "+t.line+"\n message: "+t.message,t)};e.ErrorUtils.setGlobalHandler(t)}var n={_inGuard:0,_globalHandler:null,setGlobalHandler:function(e){n._globalHandler=e},reportError:function(e){n._globalHandler&&n._globalHandler(e)},reportFatalError:function(e){n._globalHandler&&n._globalHandler(e,!0)},applyWithGuard:function(e,t,r){try{return n._inGuard++,e.apply(t,r)}catch(i){n.reportError(i)}finally{n._inGuard--}},applyWithGuardIfNeeded:function(e,t,r){return n.inGuard()?e.apply(t,r):void n.applyWithGuard(e,t,r)},inGuard:function(){return n._inGuard},guard:function(e,t,r){function i(){return n.applyWithGuard(e,r||this,arguments,null,t)}return"function"!=typeof e?(console.warn("A function must be passed to ErrorUtils.guard, got ",e),null):(t=t||e.name||"",i)}};e.ErrorUtils=n,t()}(this),String.prototype.startsWith||(String.prototype.startsWith=function(e){"use strict";if(null==this)throw TypeError();var t=String(this),n=arguments.length>1?Number(arguments[1])||0:0,r=Math.min(Math.max(n,0),t.length);return t.indexOf(String(e),n)===r}),String.prototype.endsWith||(String.prototype.endsWith=function(e){"use strict";if(null==this)throw TypeError();var t=String(this),n=t.length,r=String(e),i=arguments.length>1?Number(arguments[1])||0:n,o=Math.min(Math.max(i,0),n),a=o-r.length;return 0>a?!1:t.lastIndexOf(r,a)===a}),String.prototype.contains||(String.prototype.contains=function(e){"use strict";if(null==this)throw TypeError();var t=String(this),n=arguments.length>1?Number(arguments[1])||0:0;return-1!==t.indexOf(String(e),n)}),String.prototype.repeat||(String.prototype.repeat=function(e){"use strict";if(null==this)throw TypeError();var t=String(this);if(e=Number(e)||0,0>e||1/0===e)throw RangeError();if(1===e)return t;for(var n="";e;)1&e&&(n+=t),(e>>=1)&&(t+=t);return n}),function(e){function t(e,t){if(null==this)throw new TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=Object(this),r=n.length>>>0,i=0;r>i;i++)if(e.call(t,n[i],i,n))return i;return-1}Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{enumerable:!1,writable:!0,configurable:!0,value:t}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{enumerable:!1,writable:!0,configurable:!0,value:function(n,r){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");var i=t.call(this,n,r);return-1===i?e:this[i]}})}(),__d("nearby/index.ios.js",["react-native/Libraries/react-native/react-native.js","nearby/Nearby/index.js"],function(e,t){"use strict";var n=t("react-native/Libraries/react-native/react-native.js"),r=t("nearby/Nearby/index.js"),i=n.AppRegistry;i.registerComponent("nearby",function(){return r})}),__d("react-native/Libraries/react-native/react-native.js",["React","ActivityIndicatorIOS","DatePickerIOS","Image","ListView","MapView","Modal","Navigator","NavigatorIOS","PickerIOS","ProgressViewIOS","ScrollView","SegmentedControlIOS","SliderIOS","SwitchIOS","TabBarIOS","Text","TextInput","TouchableHighlight","TouchableOpacity","TouchableWithoutFeedback","View","WebView","ActionSheetIOS","AdSupportIOS","AlertIOS","Animated","AppRegistry","AppStateIOS","AsyncStorage","CameraRoll","Dimensions","Easing","ImagePickerIOS","InteractionManager","LayoutAnimation","LinkingIOS","NetInfo","PanResponder","PixelRatio","PushNotificationIOS","Settings","StatusBarIOS","StyleSheet","VibrationIOS","RCTDeviceEventEmitter","RCTNativeAppEventEmitter","NativeModules","Platform","requireNativeComponent","EdgeInsetsPropType","PointPropType","LinkedStateMixin","ReactComponentWithPureRenderMixin","NativeModules","ReactUpdates","cloneWithProps","ReactFragment","update","ReactDefaultPerf","ReactTestUtils"],function(e,t,n){"use strict";var r=Object.assign(Object.create(t("React")),{ActivityIndicatorIOS:t("ActivityIndicatorIOS"),DatePickerIOS:t("DatePickerIOS"),Image:t("Image"),ListView:t("ListView"),MapView:t("MapView"),Modal:t("Modal"),Navigator:t("Navigator"),NavigatorIOS:t("NavigatorIOS"),PickerIOS:t("PickerIOS"),ProgressViewIOS:t("ProgressViewIOS"),ScrollView:t("ScrollView"),SegmentedControlIOS:t("SegmentedControlIOS"),SliderIOS:t("SliderIOS"),SwitchIOS:t("SwitchIOS"),TabBarIOS:t("TabBarIOS"),Text:t("Text"),TextInput:t("TextInput"),TouchableHighlight:t("TouchableHighlight"),TouchableOpacity:t("TouchableOpacity"),TouchableWithoutFeedback:t("TouchableWithoutFeedback"),View:t("View"),WebView:t("WebView"),ActionSheetIOS:t("ActionSheetIOS"),AdSupportIOS:t("AdSupportIOS"),AlertIOS:t("AlertIOS"),Animated:t("Animated"),AppRegistry:t("AppRegistry"),AppStateIOS:t("AppStateIOS"),AsyncStorage:t("AsyncStorage"),CameraRoll:t("CameraRoll"),Dimensions:t("Dimensions"),Easing:t("Easing"),ImagePickerIOS:t("ImagePickerIOS"),InteractionManager:t("InteractionManager"),LayoutAnimation:t("LayoutAnimation"),LinkingIOS:t("LinkingIOS"),NetInfo:t("NetInfo"),PanResponder:t("PanResponder"),PixelRatio:t("PixelRatio"),PushNotificationIOS:t("PushNotificationIOS"),Settings:t("Settings"),StatusBarIOS:t("StatusBarIOS"),StyleSheet:t("StyleSheet"),VibrationIOS:t("VibrationIOS"),DeviceEventEmitter:t("RCTDeviceEventEmitter"),NativeAppEventEmitter:t("RCTNativeAppEventEmitter"),NativeModules:t("NativeModules"),Platform:t("Platform"),requireNativeComponent:t("requireNativeComponent"),EdgeInsetsPropType:t("EdgeInsetsPropType"),PointPropType:t("PointPropType"),addons:{LinkedStateMixin:t("LinkedStateMixin"),Perf:void 0,PureRenderMixin:t("ReactComponentWithPureRenderMixin"),TestModule:t("NativeModules").TestModule,TestUtils:void 0,batchedUpdates:t("ReactUpdates").batchedUpdates,cloneWithProps:t("cloneWithProps"),createFragment:t("ReactFragment").create,update:t("update")}});__DEV__&&(r.addons.Perf=t("ReactDefaultPerf"),r.addons.TestUtils=t("ReactTestUtils")),n.exports=r}),__d("React",["ReactNative"],function(e,t,n){"use strict";n.exports=t("ReactNative")}),__d("ReactNative",["ReactChildren","ReactClass","ReactComponent","ReactCurrentOwner","ReactElement","ReactElementValidator","ReactInstanceHandles","ReactNativeDefaultInjection","ReactNativeMount","ReactPropTypes","ReactUpdates","deprecated","findNodeHandle","invariant","onlyChild","warning","ReactReconciler","ReactNativeTextComponent"],function(e,t,n){"use strict";var r=t("ReactChildren"),i=t("ReactClass"),o=t("ReactComponent"),a=t("ReactCurrentOwner"),s=t("ReactElement"),u=t("ReactElementValidator"),c=t("ReactInstanceHandles"),l=t("ReactNativeDefaultInjection"),p=t("ReactNativeMount"),h=t("ReactPropTypes"),d=t("ReactUpdates"),f=(t("deprecated"),t("findNodeHandle")),m=t("invariant"),v=t("onlyChild"),g=t("warning");l.inject();var y=s.createElement,_=s.createFactory,b=s.cloneElement;__DEV__&&(y=u.createElement,_=u.createFactory,b=u.cloneElement);var S=function(e){var t=e.type.defaultProps,n=e.props;for(var r in t)void 0===n[r]&&(n[r]=t[r])},R=function(e){return __DEV__&&m(!1,"This optimized path should never be used in DEV mode because it does not provide validation. Check your JSX transform."),e._owner=a.current,e.type.defaultProps&&S(e),e},E=function(e,t,n){return p.renderComponent(e,t,n)},T={hasReactNativeInitialized:!1,Children:{map:r.map,forEach:r.forEach,count:r.count,only:v},Component:o,PropTypes:h,createClass:i.createClass,createElement:y,createFactory:_,cloneElement:b,_augmentElement:R,findNodeHandle:f,render:E,unmountComponentAtNode:p.unmountComponentAtNode,unstable_batchedUpdates:d.batchedUpdates,__spread:Object.assign,unmountComponentAtNodeAndRemoveContainer:p.unmountComponentAtNodeAndRemoveContainer,isValidClass:s.isValidFactory,isValidElement:s.isValidElement,renderComponent:function(e,t,n){return g("Use React.render instead of React.renderComponent"),T.render(e,t,n)}};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:a,InstanceHandles:c,Mount:p,Reconciler:t("ReactReconciler"),TextComponent:t("ReactNativeTextComponent")}),n.exports=T}),__d("ReactChildren",["PooledClass","ReactFragment","traverseAllChildren","warning"],function(e,t,n){"use strict";function r(e,t){this.func=e,this.context=t,this.count=0}function i(e,t){var n=e;n.func.call(n.context,t,n.count++)}function o(e,t,n){if(null==e)return e;var o=r.getPooled(t,n);d(e,i,o),r.release(o)}function a(e,t,n){this.result=e,this.func=t,this.context=n,this.count=0}function s(e,t,n){var r=e,i=r.result,o=void 0===i[n];if(__DEV__&&f(o,"ReactChildren.map(...): Encountered two children with the same key, `%s`. Child keys must be unique; when two children share a key, only the first child will be used.",n),o){var a=r.func.call(r.context,t,r.count++);i[n]=a}}function u(e,t,n){if(null==e)return e;var r={},i=a.getPooled(r,t,n);return d(e,s,i),a.release(i),h.create(r)}function c(){return null}function l(e){return d(e,c,null)}var p=t("PooledClass"),h=t("ReactFragment"),d=t("traverseAllChildren"),f=t("warning"),m=p.twoArgumentPooler,v=p.threeArgumentPooler;p.addPoolingTo(r,m),p.addPoolingTo(a,v);var g={forEach:o,map:u,count:l};n.exports=g}),__d("PooledClass",["invariant"],function(e,t,n){"use strict";var r=t("invariant"),i=function(e){var t=this;if(t.instancePool.length){var n=t.instancePool.pop();return t.call(n,e),n}return new t(e)},o=function(e,t){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,e,t),r}return new n(e,t)},a=function(e,t,n){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,e,t,n),i}return new r(e,t,n)},s=function(e,t,n,r){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,e,t,n,r),o}return new i(e,t,n,r)},u=function(e,t,n,r,i){var o=this;if(o.instancePool.length){var a=o.instancePool.pop();return o.call(a,e,t,n,r,i),a}return new o(e,t,n,r,i)},c=function(e){var t=this;r(e instanceof t,"Trying to release an instance into a pool of a different type."),e.destructor&&e.destructor(),t.instancePool.length1){for(var p=Array(l),h=0;l>h;h++)p[h]=arguments[h+2];s.children=p}if(e&&e.defaultProps){var d=e.defaultProps;for(i in d)"undefined"==typeof s[i]&&(s[i]=d[i])}return new a(e,u,c,r.current,s)},a.createFactory=function(e){var t=a.createElement.bind(null,e);return t.type=e,t},a.cloneAndReplaceProps=function(e,t){var n=new a(e.type,e.key,e.ref,e._owner,t);return __DEV__&&(n._store.validated=e._store.validated),n},a.cloneElement=function(e,t,n){var s,u=i({},e.props),c=e.key,l=e.ref,p=e._owner;if(null!=t){void 0!==t.ref&&(l=t.ref,p=r.current),void 0!==t.key&&(c=""+t.key);for(s in t)t.hasOwnProperty(s)&&!o.hasOwnProperty(s)&&(u[s]=t[s])}var h=arguments.length-2;if(1===h)u.children=n;else if(h>1){for(var d=Array(h),f=0;h>f;f++)d[f]=arguments[f+2];u.children=d}return new a(e.type,c,l,p,u)},a.isValidElement=function(e){var t=!(!e||!e._isReactElement);return t},n.exports=a}),__d("ReactCurrentOwner",[],function(e,t,n){"use strict";var r={current:null};n.exports=r}),__d("Object.assign",[],function(e,t,n){"use strict";function r(e){if(null==e)throw new TypeError("Object.assign target cannot be null or undefined");for(var t=Object(e),n=Object.prototype.hasOwnProperty,r=1;r2?n-2:0),i=2;n>i;i++)r[i-2]=arguments[i];if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){var o=0,a="Warning: "+t.replace(/%s/g,function(){return r[o++]});"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(s){}}}),n.exports=i}),__d("emptyFunction",[],function(e,t,n){function r(e){return function(){return e}}function i(){}i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},n.exports=i}),__d("traverseAllChildren",["ReactElement","ReactFragment","ReactInstanceHandles","getIteratorFn","invariant","warning"],function(e,t,n){"use strict";function r(e){return g[e]}function i(e,t){return e&&null!=e.key?a(e.key):t.toString(36)}function o(e){return(""+e).replace(y,r)}function a(e){return"$"+o(e)}function s(e,t,n,r){var o=typeof e;if(("undefined"===o||"boolean"===o)&&(e=null),null===e||"string"===o||"number"===o||c.isValidElement(e))return n(r,e,""===t?m+i(e,0):t),1;var u,p,g=0;if(Array.isArray(e))for(var y=0;y=a;a++)if(i(e,a)&&i(t,a))r=a;else if(e.charAt(a)!==t.charAt(a))break;var s=e.substr(0,r);return h(o(s),"getFirstCommonAncestorID(%s, %s): Expected a valid React DOM ID: %s",e,t,s),s}function l(e,t,n,r,i,o){e=e||"",t=t||"",h(e!==t,"traverseParentPath(...): Cannot traverse from and to the same ID, `%s`.",e);var c=a(t,e);h(c||a(e,t),"traverseParentPath(%s, %s, ...): Cannot traverse from two IDs that do not have a parent path.",e,t);for(var l=0,p=c?s:u,d=e;;d=p(d,t)){var f;if(i&&d===e||o&&d===t||(f=n(d,c,r)),f===!1||d===t)break;h(l++1){var t=e.indexOf(d,1);return t>-1?e.substr(0,t):e}return null},traverseEnterLeave:function(e,t,n,r,i){var o=c(e,t);o!==e&&l(e,o,n,r,!1,!0),o!==t&&l(o,t,n,i,!0,!1)},traverseTwoPhase:function(e,t,n){e&&(l("",e,t,n,!0,!1),l(e,"",t,n,!1,!0))},traverseTwoPhaseSkipTarget:function(e,t,n){e&&(l("",e,t,n,!0,!0),l(e,"",t,n,!0,!0))},traverseAncestors:function(e,t,n){l("",e,t,n,!0,!1)},getFirstCommonAncestorID:c,_getNextDescendantID:u,isAncestorIDOf:a,SEPARATOR:d};n.exports=v}),__d("ReactRootIndex",[],function(e,t,n){"use strict";var r={injectCreateReactRootIndex:function(e){i.createReactRootIndex=e}},i={createReactRootIndex:null,injection:r};n.exports=i}),__d("getIteratorFn",[],function(e,t,n){"use strict";function r(e){var t=e&&(i&&e[i]||e[o]);return"function"==typeof t?t:void 0}var i="function"==typeof Symbol&&Symbol.iterator,o="@@iterator";n.exports=r}),__d("ReactClass",["ReactComponent","ReactElement","ReactErrorUtils","ReactPropTypeLocations","ReactPropTypeLocationNames","ReactNoopUpdateQueue","Object.assign","emptyObject","invariant","keyMirror","keyOf","warning"],function(e,t,n){"use strict";function r(){O||(O=!0,T(!1,"setProps(...) and replaceProps(...) are deprecated. Instead, call React.render again at the top level."))}function i(e,t,n){for(var r in t)t.hasOwnProperty(r)&&T("function"==typeof t[r],"%s: %s type `%s` is invalid; it must be a function, usually from React.PropTypes.",e.displayName||"ReactClass",g[n],r)}function o(e,t){var n=x.hasOwnProperty(t)?x[t]:null;N.hasOwnProperty(t)&&S(n===C.OVERRIDE_BASE,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e.hasOwnProperty(t)&&S(n===C.DEFINE_MANY||n===C.DEFINE_MANY_MERGED,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function a(e,t){if(t){S("function"!=typeof t,"ReactClass: You're attempting to use a component class as a mixin. Instead, just use a regular object."),S(!f.isValidElement(t),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var n=e.prototype;t.hasOwnProperty(w)&&P.mixins(e,t.mixins);for(var r in t)if(t.hasOwnProperty(r)&&r!==w){var i=t[r];if(o(n,r),P.hasOwnProperty(r))P[r](e,i);else{var a=x.hasOwnProperty(r),s=n.hasOwnProperty(r),u="function"==typeof i,p=u&&!a&&!s;if(p)n.__reactAutoBindMap||(n.__reactAutoBindMap={}),n.__reactAutoBindMap[r]=i,n[r]=i;else if(s){var h=x[r];S(a&&(h===C.DEFINE_MANY_MERGED||h===C.DEFINE_MANY),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",h,r),h===C.DEFINE_MANY_MERGED?n[r]=c(n[r],i):h===C.DEFINE_MANY&&(n[r]=l(n[r],i))}else n[r]=i,__DEV__&&"function"==typeof i&&t.displayName&&(n[r].displayName=t.displayName+"_"+r)}}}}function s(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var i=n in P;S(!i,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var o=n in e;S(!o,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),e[n]=r}}}function u(e,t){S(e&&t&&"object"==typeof e&&"object"==typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(S(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]); +return e}function c(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var i={};return u(i,n),u(i,r),i}}function l(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function p(e,t){var n=t.bind(e);if(__DEV__){n.__reactBoundContext=e,n.__reactBoundMethod=t,n.__reactBoundArguments=null;var r=e.constructor.displayName,i=n.bind;n.bind=function(o){for(var a=arguments.length,s=Array(a>1?a-1:0),u=1;a>u;u++)s[u-1]=arguments[u];if(o!==e&&null!==o)T(!1,"bind(): React component methods may only be bound to the component instance. See %s",r);else if(!s.length)return T(!1,"bind(): You are binding a component method to the component. React does this for you automatically in a high-performance way, so you can safely remove this call. See %s",r),n;var c=i.apply(n,arguments);return c.__reactBoundContext=e,c.__reactBoundMethod=t,c.__reactBoundArguments=s,c}}return n}function h(e){for(var t in e.__reactAutoBindMap)if(e.__reactAutoBindMap.hasOwnProperty(t)){var n=e.__reactAutoBindMap[t];e[t]=p(e,m.guard(n,e.constructor.displayName+"."+t))}}var d=t("ReactComponent"),f=t("ReactElement"),m=t("ReactErrorUtils"),v=t("ReactPropTypeLocations"),g=t("ReactPropTypeLocationNames"),y=t("ReactNoopUpdateQueue"),_=t("Object.assign"),b=t("emptyObject"),S=t("invariant"),R=t("keyMirror"),E=t("keyOf"),T=t("warning"),w=E({mixins:null}),C=R({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),I=[],O=!1,x={mixins:C.DEFINE_MANY,statics:C.DEFINE_MANY,propTypes:C.DEFINE_MANY,contextTypes:C.DEFINE_MANY,childContextTypes:C.DEFINE_MANY,getDefaultProps:C.DEFINE_MANY_MERGED,getInitialState:C.DEFINE_MANY_MERGED,getChildContext:C.DEFINE_MANY_MERGED,render:C.DEFINE_ONCE,componentWillMount:C.DEFINE_MANY,componentDidMount:C.DEFINE_MANY,componentWillReceiveProps:C.DEFINE_MANY,shouldComponentUpdate:C.DEFINE_ONCE,componentWillUpdate:C.DEFINE_MANY,componentDidUpdate:C.DEFINE_MANY,componentWillUnmount:C.DEFINE_MANY,updateComponent:C.OVERRIDE_BASE},P={displayName:function(e,t){e.displayName=t},mixins:function(e,t){if(t)for(var n=0;n.":null,url:" See https://fb.me/react-warning-keys for more information.",childOwner:null};return t&&t._owner&&t._owner!==v.current&&(c.childOwner=" It was passed a child from "+i(t._owner)+"."),c}function c(e,t){if(Array.isArray(e))for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=e.message,n=r(e,["message"]),i=new Error(t);return i.framesToPop=1,Object.assign(i,n)}var a=function(){function e(e,t){for(var n=0;n32&&(this._debugInfo[this._callbackID>>5]=null),this._debugInfo[this._callbackID>>1]=[e,t]),r&&n.push(this._callbackID),this._callbacks[this._callbackID++]=r,i&&n.push(this._callbackID),this._callbacks[this._callbackID++]=i),this._queue[f].push(e),this._queue[m].push(t),this._queue[v].push(n),__DEV__&&g&&isFinite(e)&&console.log("JS->N : "+this._remoteModuleTable[e]+"."+this._remoteMethodTable[e][t]+"("+JSON.stringify(n)+")")}},{key:"__callFunction",value:function(e,t,n){s.profile(function(){return e+"."+t+"("+d(n)+")"}),isFinite(e)&&(t=this._methodTable[e][t],e=this._moduleTable[e]),__DEV__&&g&&console.log("N->JS : "+e+"."+t+"("+JSON.stringify(n)+")"),e=this._require(e),e[t].apply(e,n),s.profileEnd()}},{key:"__invokeCallback",value:function(e,t){s.profile(function(){return"MessageQueue.invokeCallback("+e+", "+d(t)+")"});var n=this._callbacks[e];if(__DEV__){var r=this._debugInfo[e>>1],i=r&&this._remoteModuleTable[r[0]],o=r&&this._remoteMethodTable[r[0]][r[1]];n?g&&console.log("N->JS : ("+JSON.stringify(t)+")"):console.error("Callback with id "+e+": "+i+"."+o+"() not found")}this._callbacks[-2&e]=null,this._callbacks[1|e]=null,n.apply(null,t),s.profileEnd()}},{key:"_genLookupTables",value:function(e,t,n){for(var r=Object.keys(e),i=0,o=r.length;o>i;i++){var a=r[i],s=e[a].methods,u=e[a].moduleID;t[u]=a,n[u]={};for(var c=Object.keys(s),l=0,p=c.length;p>l;l++){var h=c[l],d=s[h];n[u][d.methodID]=h}}}},{key:"_genModules",value:function(e){for(var t=Object.keys(e),n=0,r=t.length;r>n;n++){var i=t[n],o=e[i];this.RemoteModules[i]=this._genModule({},o)}}},{key:"_genModule",value:function(e,t){for(var n=Object.keys(t.methods),r=0,i=n.length;i>r;r++){var o=n[r],a=t.methods[o];e[o]=this._genMethod(t.moduleID,a.methodID,a.type)}return Object.assign(e,t.constants),e}},{key:"_genMethod",value:function(e,t,n){if(n===y.local)return null;var r=null,i=this;return r=n===y.remoteAsync?function(){for(var n=arguments.length,r=Array(n),a=0;n>a;a++)r[a]=arguments[a];return new Promise(function(n,a){i.__nativeCall(e,t,r,n,function(e){var t=o(e);a(t)})})}:function(){for(var n=arguments.length,r=Array(n),o=0;n>o;o++)r[o]=arguments[o];var a=r.length>0?r[r.length-1]:null,s=r.length>1?r[r.length-2]:null,u="function"==typeof a,c="function"==typeof s;c&&p(u,"Cannot have a non-function arg after a function arg.");var l=u+c,h=u?a:null,d=c?s:null;return r=r.slice(0,r.length-l),i.__nativeCall(e,t,r,d,h)},r.type=n,r}}]),e}();n.exports=b}),__d("BridgeProfiling",["ReactPerf"],function(e,t,n){"use strict";var r=r||this,i=1<<17,o={profile:function(e){r.__BridgeProfilingIsProfiling&&(e="function"==typeof e?e():e,console.profile(i,e))},profileEnd:function(){r.__BridgeProfilingIsProfiling&&console.profileEnd(i)},swizzleReactPerf:function(){var e=t("ReactPerf"),n=e.measure;e.measure=function(t,i,a){return a=n.apply(e,arguments),function(){if(r.__BridgeProfilingIsProfiling){var e=this._instance&&this._instance.constructor&&(this._instance.constructor.displayName||this._instance.constructor.name);o.profile(t+"."+i+"("+e+")")}var n=a.apply(this,arguments);return o.profileEnd(),n}}}};n.exports=o}),__d("ReactPerf",[],function(e,t,n){"use strict";function r(e,t,n){return n}var i={enableMeasure:!1,storedMeasure:r,measureMethods:function(e,t,n){if(__DEV__)for(var r in n)n.hasOwnProperty(r)&&(e[r]=i.measure(t,n[r],e[r]))},measure:function(e,t,n){if(__DEV__){var r=null,o=function(){return i.enableMeasure?(r||(r=i.storedMeasure(e,t,n)),r.apply(this,arguments)):n.apply(this,arguments)};return o.displayName=e+"_"+t,o}return n},injection:{injectMeasure:function(e){i.storedMeasure=e}}};n.exports=i}),__d("ErrorUtils",[],function(e,t,n){var r=this;n.exports=r.ErrorUtils}),__d("JSTimersExecution",["invariant","keyMirror","performanceNow","warning","JSTimers","JSTimers"],function(e,t,n){"use strict";var r=t("invariant"),i=t("keyMirror"),o=t("performanceNow"),a=t("warning"),s={GUID:1,Type:i({setTimeout:null,setInterval:null,requestAnimationFrame:null,setImmediate:null}),callbacks:[],types:[],timerIDs:[],immediates:[],callTimer:function(e){a(e<=s.GUID,"Tried to call timer with ID "+e+" but no such timer exists");var t=s.timerIDs.indexOf(e);if(-1!==t){var n=s.types[t],r=s.callbacks[t];(n===s.Type.setTimeout||n===s.Type.setImmediate||n===s.Type.requestAnimationFrame)&&s._clearIndex(t);try{if(n===s.Type.setTimeout||n===s.Type.setInterval||n===s.Type.setImmediate)r();else{if(n!==s.Type.requestAnimationFrame)return void console.error("Tried to call a callback with invalid type: "+n);var i=o();r(i)}}catch(u){s.errors=s.errors||[],s.errors.push(u)}}},callTimers:function(e){r(0!==e.length,'Probably shouldn\'t call "callTimers" with no timerIDs'),s.errors=null,e.forEach(s.callTimer);var n=s.errors;if(n){var i=n.length;if(i>1)for(var o=1;i>o;o++)t("JSTimers").setTimeout(function(e){throw e}.bind(null,n[o]),0);throw n[0]}},callImmediates:function(){for(s.errors=null;0!==s.immediates.length;)s.callTimer(s.immediates.shift());s.errors&&s.errors.forEach(function(e){return t("JSTimers").setTimeout(function(){throw e},0)})},_clearIndex:function(e){s.timerIDs[e]=null,s.callbacks[e]=null,s.types[e]=null}};n.exports=s}),__d("performanceNow",["performance"],function(e,t,n){var r=t("performance");r&&r.now||(r=Date);var i=r.now.bind(r);n.exports=i}),__d("performance",["ExecutionEnvironment"],function(e,t,n){"use strict";var r,i=t("ExecutionEnvironment");i.canUseDOM&&(r=window.performance||window.msPerformance||window.webkitPerformance),n.exports=r||{}}),__d("ExecutionEnvironment",[],function(e,t,n){"use strict";var r=!1,i={canUseDOM:r,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:r&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:r&&!!window.screen,isInWorker:!r};n.exports=i}),__d("JSTimers",["NativeModules","JSTimersExecution"],function(e,t,n){"use strict";var r=t("NativeModules").Timing,i=t("JSTimersExecution"),o={Types:i.Types,_getFreeIndex:function(){var e=i.timerIDs.indexOf(null);return-1===e&&(e=i.timerIDs.length),e},setTimeout:function(e,t){for(var n=arguments.length,a=Array(n>2?n-2:0),s=2;n>s;s++)a[s-2]=arguments[s];var u=i.GUID++,c=o._getFreeIndex();return i.timerIDs[c]=u,i.callbacks[c]=function(){return e.apply(void 0,a)},i.types[c]=i.Type.setTimeout,r.createTimer(u,t||0,Date.now(),!1),u},setInterval:function(e,t){for(var n=arguments.length,a=Array(n>2?n-2:0),s=2;n>s;s++)a[s-2]=arguments[s];var u=i.GUID++,c=o._getFreeIndex();return i.timerIDs[c]=u,i.callbacks[c]=function(){return e.apply(void 0,a)},i.types[c]=i.Type.setInterval,r.createTimer(u,t||0,Date.now(),!0),u},setImmediate:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];var a=i.GUID++,s=o._getFreeIndex();return i.timerIDs[s]=a,i.callbacks[s]=function(){return e.apply(void 0,n)},i.types[s]=i.Type.setImmediate,i.immediates.push(a),a},requestAnimationFrame:function(e){var t=i.GUID++,n=o._getFreeIndex();return i.timerIDs[n]=t,i.callbacks[n]=e,i.types[n]=i.Type.requestAnimationFrame,r.createTimer(t,1,Date.now(),!1),t},clearTimeout:function(e){o._clearTimerID(e)},clearInterval:function(e){o._clearTimerID(e)},clearImmediate:function(e){o._clearTimerID(e),i.immediates.splice(i.immediates.indexOf(e),1)},cancelAnimationFrame:function(e){o._clearTimerID(e)},_clearTimerID:function(e){if(null!=e){var t=i.timerIDs.indexOf(e);-1!==t&&(i._clearIndex(t),i.types[t]!==i.Type.setImmediate&&r.deleteTimer(e))}}};n.exports=o}),__d("ReactUpdates",["CallbackQueue","PooledClass","ReactPerf","ReactReconciler","Transaction","Object.assign","invariant"],function(e,t,n){"use strict";function r(){v(C.ReactReconcileTransaction&&b,"ReactUpdates: must inject a reconcile transaction class and batching strategy")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=l.getPooled(),this.reconcileTransaction=C.ReactReconcileTransaction.getPooled()}function o(e,t,n,i,o,a){r(),b.batchedUpdates(e,t,n,i,o,a)}function a(e,t){return e._mountOrder-t._mountOrder}function s(e){var t=e.dirtyComponentsLength;v(t===g.length,"Expected flush transaction's stored dirty-components length (%s) to match dirty-components array length (%s).",t,g.length),g.sort(a);for(var n=0;t>n;n++){var r=g[n],i=r._pendingCallbacks;if(r._pendingCallbacks=null,d.performUpdateIfNecessary(r,e.reconcileTransaction),i)for(var o=0;on;n+=2){var i=t[n/2];o.addTimespan(i,e[n+1]-e[n],i)}}};n.exports=o}),__d("regenerator/runtime.js",[],function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o=Object.create((t||i).prototype);return o._invoke=l(e,n||null,new d(r||[])),o}function r(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(r){return{type:"throw",arg:r}}}function i(){}function o(){}function a(){}function s(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function u(e){this.arg=e}function c(e){function t(t,n){var r=e[t](n),a=r.value;return a instanceof u?Promise.resolve(a.arg).then(i,o):Promise.resolve(a).then(function(e){return r.value=e,r})}function n(e,n){var i=r?r.then(function(){return t(e,n)}):new Promise(function(r){r(t(e,n))});return r=i["catch"](function(){}),i}"object"==typeof process&&process.domain&&(t=process.domain.bind(t));{var r,i=t.bind(e,"next"),o=t.bind(e,"throw");t.bind(e,"return")}this._invoke=n}function l(e,t,n){var i=S;return function(o,a){if(i===E)throw new Error("Generator is already running");if(i===T){if("throw"===o)throw a;return m()}for(;;){var s=n.delegate;if(s){if("return"===o||"throw"===o&&s.iterator[o]===v){n.delegate=null;var u=s.iterator["return"];if(u){var c=r(u,s.iterator,a);if("throw"===c.type){o="throw",a=c.arg;continue}}if("return"===o)continue}var c=r(s.iterator[o],s.iterator,a);if("throw"===c.type){n.delegate=null,o="throw",a=c.arg;continue}o="next",a=v;var l=c.arg;if(!l.done)return i=R,l;n[s.resultName]=l.value,n.next=s.nextLoc,n.delegate=null}if("next"===o)n.sent=i===R?a:v;else if("throw"===o){if(i===S)throw i=T,a;n.dispatchException(a)&&(o="next",a=v)}else"return"===o&&n.abrupt("return",a);i=E;var c=r(e,t,n);if("normal"===c.type){i=n.done?T:R;var l={value:c.arg,done:n.done};if(c.arg!==w)return l; +n.delegate&&"next"===o&&(a=v)}else"throw"===c.type&&(i=T,o="throw",a=c.arg)}}}function p(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 h(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function d(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(p,this),this.reset(!0)}function f(e){if(e){var t=e[y];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function i(){for(;++n=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return t("end");if(i.tryLoc<=this.prev){var a=g.call(i,"catchLoc"),s=g.call(i,"finallyLoc");if(a&&s){if(this.prev=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&g.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),h(n),w}},"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 i=r.arg;h(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:f(e),resultName:t,nextLoc:n},w}}}("object"==typeof e?e:"object"==typeof window?window:"object"==typeof self?self:this)}),__d("ExceptionsManager",["NativeModules","loadSourceMap","parseErrorStack","stringifySafe"],function(e,t,n){"use strict";function r(e,t,n){var r=++f;l&&(n||(n=h(e)),t?l.reportFatalException(e.message,n,r):l.reportSoftException(e.message,n),__DEV__&&(c=c||p()).then(function(t){var n=h(e,t);l.updateExceptionMessage(e.message,n,r)})["catch"](function(e){console.warn("Unable to load source map: "+e.message)}))}function i(e,t){var n=h(e),i="Error: "+e.message+"\n stack: \n"+a(n)+"\n URL: "+e.sourceURL+"\n line: "+e.line+"\n message: "+e.message;console.errorOriginal?console.errorOriginal(i):console.error(i),r(e,t,n)}function o(){console.reportException||(console.reportException=r,console.errorOriginal=console.error.bind(console),console.error=function(){if(console.errorOriginal.apply(null,arguments),console.reportErrorsAsExceptions){var e=Array.prototype.map.call(arguments,d).join(", ");if('"Warning: '!==e.slice(0,10)){var t=new Error("console.error: "+e);t.framesToPop=1,r(t,!1)}}},void 0===console.reportErrorsAsExceptions&&(console.reportErrorsAsExceptions=!0))}function a(e){var t=Math.max.apply(null,e.map(function(e){return e.methodName.length}));return e.map(function(e){return s(e,t)}).join("\n")}function s(e,t){var n=e.file.split("/"),r=n[n.length-1];r.length>18&&(r=r.substr(0,17)+"…");var i=u(t-e.methodName.length);return" "+e.methodName+i+" "+r+":"+e.lineNumber}function u(e){return new Array(e+1).join(" ")}var c,l=t("NativeModules").ExceptionsManager,p=t("loadSourceMap"),h=t("parseErrorStack"),d=t("stringifySafe"),f=0;n.exports={handleException:i,installConsoleErrorReporter:o}}),__d("loadSourceMap",["Promise","NativeModules","SourceMap","react-native/Libraries/JavaScriptAppEngine/Initialization/source-map-url.js"],function(e,t,n){"use strict";function r(){return i().then(function(e){return new u(e)})}function i(){return e.RAW_SOURCE_MAP?a.resolve(e.RAW_SOURCE_MAP):l?p?new a(l.getScriptText).then(o).then(function(e){return null===e?a.reject(new Error("No source map URL found. May be running from bundled file.")):a.resolve(e)}).then(fetch).then(function(e){return e.text()}):a.reject(new Error("RCTNetworking module is not available")):a.reject(new Error("RCTSourceCode module is not available"))}function o(e){var t=e.url,n=e.text,r=e.fullSourceMappingURL;if(r)return r;var i=c.getFrom(n);if(!i)return null;var o=t.match(/(.+:\/\/.*?)\//)[1];return o+i}var a=t("Promise"),s=t("NativeModules"),u=t("SourceMap").SourceMapConsumer,c=t("react-native/Libraries/JavaScriptAppEngine/Initialization/source-map-url.js"),l=s.SourceCode,p=s.Networking;n.exports=r}),__d("Promise",["setImmediate","promise/setimmediate/es6-extensions.js","promise/setimmediate/done.js"],function(e,t,n){"use strict";e.setImmediate=t("setImmediate");var r=t("promise/setimmediate/es6-extensions.js");t("promise/setimmediate/done.js"),r.prototype["finally"]=function(e){return this.then(e,e)},n.exports=r}),__d("setImmediate",["ImmediateImplementation"],function(e,t,n){n.exports=e.setImmediate||t("ImmediateImplementation").setImmediate}),__d("ImmediateImplementation",[],function(e,t,n,r){!function(e,t){"use strict";function n(e){var n=e[0];return e=Array.prototype.slice.call(e,1),d[h]=function(){n.apply(t,e)},m=m.next={handle:h++},m.handle}function i(){for(var e,t;!v&&(e=f.next);)if(f=e,t=d[e.handle]){v=!0;try{t(),v=!1}finally{o(e.handle),v&&(v=!1,f.next&&p(i))}}}function o(e){delete d[e]}function a(){if(e.postMessage&&!e.importScripts){var t=!0,n=function(){t=!1,e.removeEventListener?e.removeEventListener("message",n,!1):e.detachEvent("onmessage",n)};if(e.addEventListener)e.addEventListener("message",n,!1);else{if(!e.attachEvent)return!1;e.attachEvent("onmessage",n)}return e.postMessage("","*"),t}}function s(){var t="setImmediate$"+Math.random()+"$",r=function(n){n.source===e&&"string"==typeof n.data&&0===n.data.indexOf(t)&&i()};e.addEventListener?e.addEventListener("message",r,!1):e.attachEvent("onmessage",r),p=function(){var r=n(arguments);return e.postMessage(t+r,"*"),r}}function u(){var e=new MessageChannel;e.port1.onmessage=i,p=function(){var t=n(arguments);return e.port2.postMessage(t),t}}function c(){var e=g.documentElement;p=function(){var t=n(arguments),r=g.createElement("script");return r.onreadystatechange=function(){r.onreadystatechange=null,e.removeChild(r),r=null,i()},e.appendChild(r),t}}function l(){p=function(){return setTimeout(i,0),n(arguments)}}var p,h=1,d={},f={},m=f,v=!1,g=e.document;a()?s():e.MessageChannel?u():g&&"onreadystatechange"in g.createElement("script")?c():l(),r.setImmediate=p,r.clearImmediate=o}(Function("return this")())}),__d("promise/setimmediate/es6-extensions.js",["promise/setimmediate/core.js"],function(e,t,n){"use strict";function r(e){var t=new i(i._99);return t._37=1,t._12=e,t}var i=t("promise/setimmediate/core.js");n.exports=i;var o=r(!0),a=r(!1),s=r(null),u=r(void 0),c=r(0),l=r("");i.resolve=function(e){if(e instanceof i)return e;if(null===e)return s;if(void 0===e)return u;if(e===!0)return o;if(e===!1)return a;if(0===e)return c;if(""===e)return l;if("object"==typeof e||"function"==typeof e)try{var t=e.then;if("function"==typeof t)return new i(t.bind(e))}catch(n){return new i(function(e,t){t(n)})}return r(e)},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function r(a,s){if(s&&("object"==typeof s||"function"==typeof s)){if(s instanceof i&&s.then===i.prototype.then){for(;3===s._37;)s=s._12;return 1===s._37?r(a,s._12):(2===s._37&&n(s._12),void s.then(function(e){r(a,e)},n))}var u=s.then;if("function"==typeof u){var c=new i(u.bind(s));return void c.then(function(e){r(a,e)},n)}}t[a]=s,0===--o&&e(t)}if(0===t.length)return e([]);for(var o=t.length,a=0;a0&&e.column>=0&&!t&&!n&&!r||e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,orginal:t,name:r}))},n.prototype._serializeMappings=function(){var e,t=0,n=1,o=0,a=0,s=0,u=0,c="";this._mappings.sort(i.compareByGeneratedPositions);for(var l=0,p=this._mappings.length;p>l;l++){if(e=this._mappings[l],e.generatedLine!==n)for(t=0;e.generatedLine!==n;)c+=";",n++;else if(l>0){if(!i.compareByGeneratedPositions(e,this._mappings[l-1]))continue;c+=","}c+=r.encode(e.generatedColumn-t),t=e.generatedColumn,e.source&&(c+=r.encode(this._sources.indexOf(e.source)-u),u=this._sources.indexOf(e.source),c+=r.encode(e.originalLine-1-a),a=e.originalLine-1,c+=r.encode(e.originalColumn-o),o=e.originalColumn,e.name&&(c+=r.encode(this._names.indexOf(e.name)-s),s=this._names.indexOf(e.name)))}return c},n.prototype._generateSourcesContent=function(e,t){return e.map(function(e){if(!this._sourcesContents)return null;t&&(e=i.relative(t,e));var n=i.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null},this)},n.prototype.toJSON=function(){var e={version:this._version,file:this._file,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},n.prototype.toString=function(){return JSON.stringify(this)},t.SourceMapGenerator=n}),e("source-map/base64-vlq",["require","exports","module","source-map/base64"],function(e,t){function n(e){return 0>e?(-e<<1)+1:(e<<1)+0}function r(e){var t=1===(1&e),n=e>>1;return t?-n:n}var i=e("./base64"),o=5,a=1<>>=o,a>0&&(t|=u),r+=i.encode(t);while(a>0);return r},t.decode=function(e){var t,n,a=0,c=e.length,l=0,p=0;do{if(a>=c)throw new Error("Expected more digits in base 64 VLQ value.");n=i.decode(e.charAt(a++)),t=!!(n&u),n&=s,l+=n<r)-(r>n)}function l(e,t,n){var r;return(r=c(e.source,t.source))?r:(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,r||n?r:(r=c(e.name,t.name))?r:(r=e.generatedLine-t.generatedLine,r?r:e.generatedColumn-t.generatedColumn))}function p(e,t,n){var r;return(r=e.generatedLine-t.generatedLine)?r:(r=e.generatedColumn-t.generatedColumn,r||n?r:(r=c(e.source,t.source))?r:(r=e.originalLine-t.originalLine)?r:(r=e.originalColumn-t.originalColumn,r?r:c(e.name,t.name)))}t.getArg=n;var h=/([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/,d=/^data:.+\,.+/;t.urlParse=r,t.urlGenerate=i,t.join=o,t.toSetString=a,t.fromSetString=s,t.relative=u,t.compareByOriginalPositions=l,t.compareByGeneratedPositions=p}),e("source-map/array-set",["require","exports","module","source-map/util"],function(e,t){function n(){this._array=[],this._set={}}var r=e("./util");n.fromArray=function(e,t){for(var r=new n,i=0,o=e.length;o>i;i++)r.add(e[i],t);return r},n.prototype.add=function(e,t){var n=this.has(e),i=this._array.length;(!n||t)&&this._array.push(e),n||(this._set[r.toSetString(e)]=i)},n.prototype.has=function(e){return Object.prototype.hasOwnProperty.call(this._set,r.toSetString(e))},n.prototype.indexOf=function(e){if(this.has(e))return this._set[r.toSetString(e)];throw new Error('"'+e+'" is not in the set.')},n.prototype.at=function(e){if(e>=0&&e0;)if(";"===h.charAt(0))i++,h=h.slice(1),o=0;else if(","===h.charAt(0))h=h.slice(1);else{if(t={},t.generatedLine=i,n=a.decode(h),t.generatedColumn=o+n.value,o=t.generatedColumn,h=n.rest,h.length>0&&!p.test(h.charAt(0))){if(n=a.decode(h),t.source=this._sources.at(c+n.value),c+=n.value,h=n.rest,0===h.length||p.test(h.charAt(0)))throw new Error("Found a source, but no line and column");if(n=a.decode(h),t.originalLine=s+n.value,s=t.originalLine,t.originalLine+=1,h=n.rest,0===h.length||p.test(h.charAt(0)))throw new Error("Found a source and line, but no column");n=a.decode(h),t.originalColumn=u+n.value,u=t.originalColumn,h=n.rest,h.length>0&&!p.test(h.charAt(0))&&(n=a.decode(h),t.name=this._names.at(l+n.value),l+=n.value,h=n.rest)}this.__generatedMappings.push(t),"number"==typeof t.originalLine&&this.__originalMappings.push(t)}this.__originalMappings.sort(r.compareByOriginalPositions)},n.prototype._findMapping=function(e,t,n,r,o){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,t,o)},n.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=this._findMapping(t,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositions);if(n){var i=r.getArg(n,"source",null);return i&&this.sourceRoot&&(i=r.join(this.sourceRoot,i)),{source:i,line:r.getArg(n,"originalLine",null),column:r.getArg(n,"originalColumn",null),name:r.getArg(n,"name",null)}}return{source:null,line:null,column:null,name:null}},n.prototype.sourceContentFor=function(e){if(!this.sourcesContent)return null;if(this.sourceRoot&&(e=r.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var t;if(this.sourceRoot&&(t=r.urlParse(this.sourceRoot))){var n=e.replace(/^file:\/\//,"");if("file"==t.scheme&&this._sources.has(n))return this.sourcesContent[this._sources.indexOf(n)];if((!t.path||"/"==t.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}throw new Error('"'+e+'" is not in the SourceMap.')},n.prototype.generatedPositionFor=function(e){var t={source:r.getArg(e,"source"),originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")};this.sourceRoot&&(t.source=r.relative(this.sourceRoot,t.source));var n=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions);return n?{line:r.getArg(n,"generatedLine",null),column:r.getArg(n,"generatedColumn",null)}:{line:null,column:null}},n.GENERATED_ORDER=1,n.ORIGINAL_ORDER=2,n.prototype.eachMapping=function(e,t,i){var o,a=t||null,s=i||n.GENERATED_ORDER;switch(s){case n.GENERATED_ORDER:o=this._generatedMappings;break;case n.ORIGINAL_ORDER:o=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var u=this.sourceRoot;o.map(function(e){var t=e.source;return t&&u&&(t=r.join(u,t)),{source:t,generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:e.name}}).forEach(e,a)},t.SourceMapConsumer=n}),e("source-map/binary-search",["require","exports","module"],function(e,t){function n(e,t,r,i,o){var a=Math.floor((t-e)/2)+e,s=o(r,i[a],!0);return 0===s?i[a]:s>0?t-a>1?n(a,t,r,i,o):i[a]:a-e>1?n(e,a,r,i,o):0>e?null:i[e]}t.search=function(e,t,r){return t.length>0?n(-1,t.length,e,t,r):null}}),e("source-map/source-node",["require","exports","module","source-map/source-map-generator","source-map/util"],function(e,t){function n(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=void 0===e?null:e,this.column=void 0===t?null:t,this.source=void 0===n?null:n,this.name=void 0===i?null:i,null!=r&&this.add(r)}var r=e("./source-map-generator").SourceMapGenerator,i=e("./util");n.fromStringWithSourceMap=function(e,t){function r(e,t){i.add(null===e||void 0===e.source?t:new n(e.originalLine,e.originalColumn,e.source,t,e.name))}var i=new n,o=e.split("\n"),a=1,s=0,u=null;return t.eachMapping(function(e){if(null===u){for(;a=0;t--)this.prepend(e[t]);else{if(!(e instanceof n||"string"==typeof e))throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},n.prototype.walk=function(e){for(var t,r=0,i=this.children.length;i>r;r++)t=this.children[r],t instanceof n?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},n.prototype.join=function(e){var t,n,r=this.children.length;if(r>0){for(t=[],n=0;r-1>n;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},n.prototype.replaceRight=function(e,t){var r=this.children[this.children.length-1];return r instanceof n?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this},n.prototype.setSourceContent=function(e,t){this.sourceContents[i.toSetString(e)]=t},n.prototype.walkSourceContents=function(e){for(var t=0,r=this.children.length;r>t;t++)this.children[t]instanceof n&&this.children[t].walkSourceContents(e);for(var o=Object.keys(this.sourceContents),t=0,r=o.length;r>t;t++)e(i.fromSetString(o[t]),this.sourceContents[o[t]])},n.prototype.toString=function(){var e="";return this.walk(function(t){e+=t}),e},n.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new r(e),i=!1,o=null,a=null,s=null,u=null;return this.walk(function(e,r){t.code+=e,null!==r.source&&null!==r.line&&null!==r.column?((o!==r.source||a!==r.line||s!==r.column||u!==r.name)&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),o=r.source,a=r.line,s=r.column,u=r.name,i=!0):i&&(n.addMapping({generated:{line:t.line,column:t.column}}),o=null,i=!1),e.split("").forEach(function(e){"\n"===e?(t.line++,t.column=0):t.column++})}),this.walkSourceContents(function(e,t){n.setSourceContent(e,t)}),{code:t.code,map:n}},t.SourceNode=n}),this.sourceMap={SourceMapConsumer:n("source-map/source-map-consumer").SourceMapConsumer,SourceMapGenerator:n("source-map/source-map-generator").SourceMapGenerator,SourceNode:n("source-map/source-node").SourceNode}}var i={};r.call(i),n.exports=i.sourceMap}),__d("react-native/Libraries/JavaScriptAppEngine/Initialization/source-map-url.js",[],function(e,t,n,r){!function(){var e=null;void function(t,i){"function"==typeof e&&e.amd?e(i):"object"==typeof r?n.exports=i():t.sourceMappingURL=i()}(this,function(){var e=/[#@] sourceMappingURL=([^\s'"]*)/,t=RegExp("(?:/\\*(?:\\s*\r?\n(?://)?)?(?:"+e.source+")\\s*\\*/|//(?:"+e.source+"))\\s*$");return{regex:t,_innerRegex:e,getFrom:function(e){var n=e.match(t);return n?n[1]||n[2]||"":null},existsIn:function(e){return t.test(e)},removeFrom:function(e){return e.replace(t,"")},insertBefore:function(e,n){var r=e.match(t);return r?e.slice(0,r.index)+n+e.slice(r.index):e+n}}})}()}),__d("parseErrorStack",["stacktrace-parser/index.js"],function(e,t,n){"use strict";function r(e,t){try{var n=e.originalPositionFor({line:t.lineNumber,column:t.column});n&&(t.file=n.source,t.lineNumber=n.line,t.column=n.column)}catch(r){}}function i(e,t){if(!e||!e.stack)return[];for(var n=Array.isArray(e.stack)?e.stack:o.parse(e.stack),i=e.framesToPop||0;i--;)n.shift();return t&&n.forEach(r.bind(null,t)),n}var o=t("stacktrace-parser/index.js");n.exports=i}),__d("stacktrace-parser/index.js",["stacktrace-parser/lib/stacktrace-parser.js"],function(e,t,n){n.exports=t("stacktrace-parser/lib/stacktrace-parser.js")}),__d("stacktrace-parser/lib/stacktrace-parser.js",[],function(e,t,n){var r="",i={parse:function(e){for(var t,n,i=/^\s*at (?:(?:(?:Anonymous function)?|((?:\[object object\])?\S+(?: \[as \S+\])?)) )?\(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i,o=/^(?:\s*(\S*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i,a=/^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=e.split("\n"),u=[],c=0,l=s.length;l>c;++c){if(t=o.exec(s[c]))n={file:t[3],methodName:t[1]||r,lineNumber:+t[4],column:t[5]?+t[5]:null};else if(t=i.exec(s[c]))n={file:t[2],methodName:t[1]||r,lineNumber:+t[3],column:t[4]?+t[4]:null};else{if(!(t=a.exec(s[c])))continue;n={file:t[2],methodName:t[1]||r,lineNumber:+t[3],column:t[4]?+t[4]:null}}u.push(n)}return u}};n.exports=i}),__d("Platform",[],function(e,t,n){"use strict";var r={OS:"ios"};n.exports=r}),__d("checkFlowAtRuntime",["NativeModules"],function(e,t,n){"use strict";function r(){var e=i();e&&fetch(e+"flow/").then(function(e){return e.json()}).then(function(e){if(!e.silentError)throw{message:e.message,stack:e.errors.map(function(e){return a({},e,{methodName:e.description,file:e.filename})})}},function(){}).done()}function i(){var e=t("NativeModules"),n=e&&e.SourceCode&&e.SourceCode.scriptURL||"";return o(n.match(/^https?:\/\/[^\/]+\//)) +}function o(e){return e?e[0]:null}var a=Object.assign||function(e){for(var t=1;t-1?t:e}function l(e,t){if(t=t||{},this.url=e,this.credentials=t.credentials||"omit",this.headers=new n(t.headers),this.method=c(t.method||"GET"),this.mode=t.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&t.body)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(t.body)}function p(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(i))}}),t}function h(e){var t=new n,r=e.getAllResponseHeaders().trim().split("\n");return r.forEach(function(e){var n=e.trim().split(":"),r=n.shift().trim(),i=n.join(":").trim();t.append(r,i)}),t}function d(e,t){t||(t={}),this._initBody(e),this.type="default",this.url=null,this.status=t.status,this.ok=this.status>=200&&this.status<300,this.statusText=t.statusText,this.headers=t.headers instanceof n?t.headers:new n(t.headers),this.url=t.url||""}if(!r.fetch){n.prototype.append=function(n,r){n=e(n),r=t(r);var i=this.map[n];i||(i=[],this.map[n]=i),i.push(r)},n.prototype["delete"]=function(t){delete this.map[e(t)]},n.prototype.get=function(t){var n=this.map[e(t)];return n?n[0]:null},n.prototype.getAll=function(t){return this.map[e(t)]||[]},n.prototype.has=function(t){return this.map.hasOwnProperty(e(t))},n.prototype.set=function(n,r){this.map[e(n)]=[t(r)]},n.prototype.forEach=function(e){var t=this;Object.getOwnPropertyNames(this.map).forEach(function(n){e(n,t.map[n])})};var f={blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in r},m=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];u.call(l.prototype),u.call(d.prototype),r.Headers=n,r.Request=l,r.Response=d,r.fetch=function(e,t){var n;return n=l.prototype.isPrototypeOf(e)&&!t?e:new l(e,t),new Promise(function(e,t){function r(){return"responseURL"in i?i.responseURL:/^X-Request-URL:/m.test(i.getAllResponseHeaders())?i.getResponseHeader("X-Request-URL"):void 0}var i=new XMLHttpRequest;"cors"===n.credentials&&(i.withCredentials=!0),i.onload=function(){var n=1223===i.status?204:i.status;if(100>n||n>599)return void t(new TypeError("Network request failed"));var o={status:n,statusText:i.statusText,headers:h(i),url:r()},a="response"in i?i.response:i.responseText;e(new d(a,o))},i.onerror=function(){t(new TypeError("Network request failed"))},i.open(n.method,n.url,!0),"responseType"in i&&f.blob&&(i.responseType="blob"),n.headers.forEach(function(e,t){t.forEach(function(t){i.setRequestHeader(e,t)})}),i.send("undefined"==typeof n._bodyInit?null:n._bodyInit)})},r.fetch.polyfill=!0}}(),n.exports=r}),__d("Geolocation",["RCTDeviceEventEmitter","NativeModules","invariant","logError","warning"],function(e,t,n){"use strict";var r=t("RCTDeviceEventEmitter"),i=t("NativeModules").LocationObserver,o=t("invariant"),a=t("logError"),s=t("warning"),u=[],c=!1,l={getCurrentPosition:function(e,t,n){o("function"==typeof e,"Must provide a valid geo_success callback."),i.getCurrentPosition(n||{},e,t||a)},watchPosition:function(e,t,n){c||(i.startObserving(n||{}),c=!0);var o=u.length;return u.push([r.addListener("geolocationDidChange",e),t?r.addListener("geolocationError",t):null]),o},clearWatch:function(e){var t=u[e];if(t){t[0].remove();var n=t[1];n&&n.remove(),u[e]=void 0;for(var r=!0,i=0;i-1,"EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.",e),!c.plugins[n]){a(t.extractEvents,"EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.",e),c.plugins[n]=t;var r=t.eventTypes;for(var o in r)a(i(r[o],t,o),"EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.",o,e)}}}function i(e,t,n){a(!c.eventNameDispatchConfigs.hasOwnProperty(n),"EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.",n),c.eventNameDispatchConfigs[n]=e;var r=e.phasedRegistrationNames;if(r){for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];o(s,t,n)}return!0}return e.registrationName?(o(e.registrationName,t,n),!0):!1}function o(e,t,n){a(!c.registrationNameModules[e],"EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.",e),c.registrationNameModules[e]=t,c.registrationNameDependencies[e]=t.eventTypes[n].dependencies}var a=t("invariant"),s=null,u={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(e){a(!s,"EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React."),s=Array.prototype.slice.call(e),r()},injectEventPluginsByName:function(e){var t=!1;for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];u.hasOwnProperty(n)&&u[n]===i||(a(!u[n],"EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.",n),u[n]=i,t=!0)}t&&r()},getPluginModuleForEvent:function(e){var t=e.dispatchConfig;if(t.registrationName)return c.registrationNameModules[t.registrationName]||null;for(var n in t.phasedRegistrationNames)if(t.phasedRegistrationNames.hasOwnProperty(n)){var r=c.registrationNameModules[t.phasedRegistrationNames[n]];if(r)return r}return null},_resetEventPlugins:function(){s=null;for(var e in u)u.hasOwnProperty(e)&&delete u[e];c.plugins.length=0;var t=c.eventNameDispatchConfigs;for(var n in t)t.hasOwnProperty(n)&&delete t[n];var r=c.registrationNameModules;for(var i in r)r.hasOwnProperty(i)&&delete r[i]}};n.exports=c}),__d("EventPluginUtils",["EventConstants","invariant","warning"],function(e,t,n){"use strict";function r(e){return e===y.topMouseUp||e===y.topTouchEnd||e===y.topTouchCancel}function i(e){return e===y.topMouseMove||e===y.topTouchMove}function o(e){return e===y.topMouseDown||e===y.topTouchStart}function a(e,t){var n=e._dispatchListeners,r=e._dispatchIDs;if(__DEV__&&d(e),Array.isArray(n))for(var i=0;ie,"Maximum deep merge depth exceeded. You may be attempting to merge circular structures in an unsupported way.")},checkArrayStrategy:function(e){r(void 0===e||e in s.ArrayStrategies,"You must provide an array strategy to deep merge functions to instruct the deep merge how to resolve merging two arrays.")},ArrayStrategies:i({Clobber:!0,IndexByIndex:!0})};n.exports=s}),__d("NodeHandle",[],function(e,t,n){var r={injection:{injectImplementation:function(e){r._Implementation=e}},_Implementation:null,getRootNodeID:function(e){return r._Implementation.getRootNodeID(e)}};n.exports=r}),__d("ReactDefaultBatchingStrategy",["ReactUpdates","Transaction","Object.assign","emptyFunction"],function(e,t,n){"use strict";function r(){this.reinitializeTransaction()}var i=t("ReactUpdates"),o=t("Transaction"),a=t("Object.assign"),s=t("emptyFunction"),u={initialize:s,close:function(){h.isBatchingUpdates=!1}},c={initialize:s,close:i.flushBatchedUpdates.bind(i)},l=[c,u];a(r.prototype,o.Mixin,{getTransactionWrappers:function(){return l}});var p=new r,h={isBatchingUpdates:!1,batchedUpdates:function(e,t,n,r,i,o){var a=h.isBatchingUpdates;h.isBatchingUpdates=!0,a?e(t,n,r,i,o):p.perform(e,null,t,n,r,i,o)}};n.exports=h}),__d("ReactNativeComponentEnvironment",["ReactNativeDOMIDOperations","ReactNativeReconcileTransaction"],function(e,t,n){"use strict";var r=t("ReactNativeDOMIDOperations"),i=t("ReactNativeReconcileTransaction"),o={processChildrenUpdates:r.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:r.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(){},clearNode:function(){},ReactReconcileTransaction:i};n.exports=o}),__d("ReactNativeDOMIDOperations",["ReactNativeTagHandles","ReactMultiChildUpdateTypes","NativeModules","ReactPerf"],function(e,t,n){"use strict";var r=t("ReactNativeTagHandles"),i=t("ReactMultiChildUpdateTypes"),o=t("NativeModules").UIManager,a=t("ReactPerf"),s=function(e,t){if(e.length){for(var n={},a=0;a=r?(this._iteratedObject=void 0,e(void 0,!0)):(this._nextIndex=i+1,u===o?e(i,!1):u===a?e(n[i],!1):u===s?e([i,n[i]],!1):void 0)}},{key:"@@iterator",value:function(){return this}}]),t}(),n=function(){function t(e){if(r(this,t),"string"!=typeof e)throw new TypeError("Object is not a string");this._iteratedString=e,this._nextIndex=0}return i(t,[{key:"next",value:function(){if(!this instanceof t)throw new TypeError("Object is not a StringIterator");if(null==this._iteratedString)return e(void 0,!0);var n=this._nextIndex,r=this._iteratedString,i=r.length;if(n>=i)return this._iteratedString=void 0,e(void 0,!0);var o,a=r.charCodeAt(n);if(55296>a||a>56319||n+1===i)o=r[n];else{var s=r.charCodeAt(n+1);o=56320>s||s>57343?r[n]:r[n]+r[n+1]}return this._nextIndex=n+o.length,e(o,!1)}},{key:"@@iterator",value:function(){return this}}]),t}();return function(e,r){return"string"==typeof e?new n(e):Array.isArray(e)?new t(e,r||a):e[u]()}}()}();Object.assign(c,{KIND_KEY:o,KIND_VALUE:a,KIND_KEY_VAL:s,ITERATOR_SYMBOL:u}),n.exports=c}),__d("_shouldPolyfillES6Collection",[],function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(t){var n=e[t];if(null==n)return!0;var r=n.prototype;return null==n||"function"!=typeof n||"function"!=typeof r.clear||0!==(new n).size||"function"!=typeof r.keys||"function"!=typeof r.forEach||s(n)||!a(n)}function a(e){var t=function(e){function t(){r(this,t),u(Object.getPrototypeOf(t.prototype),"constructor",this).apply(this,arguments)}return i(t,e),t}(e);try{var n=new t([]);return n.size,n instanceof e}catch(o){return!1}}function s(e){try{e()}catch(t){return!1}return!0}var u=function c(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);if(void 0===r){var i=Object.getPrototypeOf(e);return null===i?void 0:c(i,t,n)}if("value"in r)return r.value;var o=r.get;return void 0===o?void 0:o.call(n)};n.exports=o}),__d("ReactNativeGlobalResponderHandler",["NativeModules","ReactNativeTagHandles"],function(e,t,n){"use strict";var r=t("NativeModules").UIManager,i=t("ReactNativeTagHandles"),o={onChange:function(e,t,n){null!==t?r.setJSResponder(i.mostRecentMountedNodeHandleForRootNodeID(t),n):r.clearJSResponder()}};n.exports=o}),__d("ReactNativeTextComponent",["ReactNativeTagHandles","NativeModules","Object.assign"],function(e,t,n){"use strict";var r=t("ReactNativeTagHandles"),i=t("NativeModules").UIManager,o=t("Object.assign"),a=function(){};o(a.prototype,{construct:function(e){this._currentElement=e,this._stringText=""+e,this._rootNodeID=null},mountComponent:function(e){this._rootNodeID=e;var t=r.allocateTag(),n=r.getNativeTopRootIDFromNodeID(e);return i.createView(t,"RCTRawText",n?r.rootNodeIDToTag[n]:null,{text:this._stringText}),{rootNodeID:e,tag:t}},receiveComponent:function(e){if(e!==this._currentElement){this._currentElement=e;var t=""+e;t!==this._stringText&&(this._stringText=t,i.updateView(r.mostRecentMountedNodeHandleForRootNodeID(this._rootNodeID),"RCTRawText",{text:this._stringText}))}},unmountComponent:function(){this._currentElement=null,this._stringText=null,this._rootNodeID=null}}),n.exports=a}),__d("ResponderEventPlugin",["EventConstants","EventPluginUtils","EventPropagators","ReactInstanceHandles","ResponderSyntheticEvent","ResponderTouchHistoryStore","accumulate","invariant","keyOf"],function(e,t,n){"use strict";function r(e,t,n,r){var i=m(e)?w.startShouldSetResponder:v(e)?w.moveShouldSetResponder:e===a.topLevelTypes.topSelectionChange?w.selectionChangeShouldSetResponder:w.scrollShouldSetResponder,o=S?c.getFirstCommonAncestorID(S,t):t,s=o===S,d=l.getPooled(i,o,n,r);d.touchHistory=p.touchHistory,s?u.accumulateTwoPhaseDispatchesSkipTarget(d):u.accumulateTwoPhaseDispatches(d);var f=b(d);if(d.isPersistent()||d.constructor.release(d),!f||f===S)return null;var g,R=l.getPooled(w.responderGrant,f,n,r);R.touchHistory=p.touchHistory,u.accumulateDirectDispatches(R);var E=y(R)===!0;if(S){var C=l.getPooled(w.responderTerminationRequest,S,n,r);C.touchHistory=p.touchHistory,u.accumulateDirectDispatches(C);var I=!_(C)||y(C);if(C.isPersistent()||C.constructor.release(C),I){var O=w.responderTerminate,x=l.getPooled(O,S,n,r);x.touchHistory=p.touchHistory,u.accumulateDirectDispatches(x),g=h(g,[R,x]),T(f,E)}else{var P=l.getPooled(w.responderReject,f,n,r);P.touchHistory=p.touchHistory,u.accumulateDirectDispatches(P),g=h(g,P)}}else g=h(g,R),T(f,E);return g}function i(e,t,n){return t&&(e===a.topLevelTypes.topScroll&&!n.responderIgnoreScroll||R>0&&e===a.topLevelTypes.topSelectionChange||m(e)||v(e))}function o(e){var t=e.touches;if(!t||0===t.length)return!0;for(var n=0;n=0,"Ended a touch event which was not counted in trackedTouchCount.")),p.recordTouchTrack(e,s,c);var f=i(e,n,s)?r(e,n,s,c):null,y=S&&m(e),_=S&&v(e),b=S&&g(e),I=y?w.responderStart:_?w.responderMove:b?w.responderEnd:null;if(I){var O=l.getPooled(I,S,s,c);O.touchHistory=p.touchHistory,u.accumulateDirectDispatches(O),f=h(f,O)}var x=S&&e===a.topLevelTypes.topTouchCancel,P=S&&!x&&g(e)&&o(s),N=x?w.responderTerminate:P?w.responderRelease:null;if(N){var D=l.getPooled(N,S,s,c);D.touchHistory=p.touchHistory,u.accumulateDirectDispatches(D),f=h(f,D),T(null)}var M=p.touchHistory.numberActiveTouches;return C.GlobalInteractionHandler&&M!==E&&C.GlobalInteractionHandler.onChange(M),E=M,f},GlobalResponderHandler:null,GlobalInteractionHandler:null,injection:{injectGlobalResponderHandler:function(e){C.GlobalResponderHandler=e},injectGlobalInteractionHandler:function(e){C.GlobalInteractionHandler=e}}};n.exports=C}),__d("ResponderSyntheticEvent",["SyntheticEvent"],function(e,t,n){"use strict";function r(e,t,n,r){i.call(this,e,t,n,r)}var i=t("SyntheticEvent"),o={touchHistory:function(){return null}};i.augmentClass(r,o),n.exports=r}),__d("ResponderTouchHistoryStore",["EventPluginUtils","invariant"],function(e,t,n){"use strict";var r=t("EventPluginUtils"),i=t("invariant"),o=r.isMoveish,a=r.isStartish,s=r.isEndish,u=20,c={touchBank:[],numberActiveTouches:0,indexOfSingleActiveTouch:-1,mostRecentTimeStamp:0},l=function(e){return e.timeStamp||e.timestamp},p=function(e){return{touchActive:!0,startTimeStamp:l(e),startPageX:e.pageX,startPageY:e.pageY,currentPageX:e.pageX,currentPageY:e.pageY,currentTimeStamp:l(e),previousPageX:e.pageX,previousPageY:e.pageY,previousTimeStamp:l(e)}},h=function(e,t){e.touchActive=!0,e.startTimeStamp=l(t),e.startPageX=t.pageX,e.startPageY=t.pageY,e.currentPageX=t.pageX,e.currentPageY=t.pageY,e.currentTimeStamp=l(t),e.previousPageX=t.pageX,e.previousPageY=t.pageY,e.previousTimeStamp=l(t)},d=function(e){var t=e.identifier;i(null!=t,"Touch object is missing identifier"),t>u&&console.warn("Touch identifier "+t+" is greater than maximum supported "+u+" which causes performance issues backfilling array locations for all of the indices.")},f=function(e){var t=c.touchBank,n=e.identifier,r=t[n];__DEV__&&d(e),r?h(r,e):t[e.identifier]=p(e),c.mostRecentTimeStamp=l(e)},m=function(e){var t=c.touchBank,n=t[e.identifier];__DEV__&&(d(e),i(n,"Touch data should have been recorded on start")),n.touchActive=!0,n.previousPageX=n.currentPageX,n.previousPageY=n.currentPageY,n.previousTimeStamp=n.currentTimeStamp,n.currentPageX=e.pageX,n.currentPageY=e.pageY,n.currentTimeStamp=l(e),c.mostRecentTimeStamp=l(e)},v=function(e){var t=c.touchBank,n=t[e.identifier];__DEV__&&(d(e),i(n,"Touch data should have been recorded on start")),n.previousPageX=n.currentPageX,n.previousPageY=n.currentPageY,n.previousTimeStamp=n.currentTimeStamp,n.currentPageX=e.pageX,n.currentPageY=e.pageY,n.currentTimeStamp=l(e),n.touchActive=!1,c.mostRecentTimeStamp=l(e)},g={recordTouchTrack:function(e,t){var n=c.touchBank;if(o(e))t.changedTouches.forEach(m);else if(a(e))t.changedTouches.forEach(f),c.numberActiveTouches=t.touches.length,1===c.numberActiveTouches&&(c.indexOfSingleActiveTouch=t.touches[0].identifier);else if(s(e)&&(t.changedTouches.forEach(v),c.numberActiveTouches=t.touches.length,1===c.numberActiveTouches)){for(var r=0;rr;r++)n[r]=r;return b._cache[e]=n,n};b._cache={},_.Mixin={getPublicInstance:function(){return this},construct:function(e){this._currentElement=e},unmountComponent:function(){y(this._rootNodeID),this.unmountChildren(),this._rootNodeID=null},initializeChildren:function(e,t,n,r){var i=this.mountChildren(e,n,r);if(i.length){for(var o=b(i.length),s=[],c=0;c-1?t:t*Math.PI/180}function s(e,t,n){h(!t.getValue,"You passed an Animated.Value to a normal component. You need to wrap that component in an Animated. For example, replace by .");var r=["matrix","translate"];switch(-1!==r.indexOf(e)&&h(Array.isArray(t),"Transform with key of %s must have an array as the value: %s",e,d(n)),e){case"matrix":h(9===t.length||16===t.length,"Matrix transform must have a length of 9 (2d) or 16 (3d). Provided matrix has a length of %s: %s",t.length,d(n));break;case"translate":break;case"rotateX":case"rotateY":case"rotateZ":case"rotate":h("string"==typeof t,'Transform with key of "%s" must be a string: %s',e,d(n)),h(t.indexOf("deg")>-1||t.indexOf("rad")>-1,"Rotate transform must be expressed in degrees (deg) or radians (rad): %s",d(n));break;default:h("number"==typeof t,'Transform with key of "%s" must be a number: %s',e,d(n))}}var u=Object.assign||function(e){for(var t=1;t.49999*p?[0,2*Math.atan2(t,o)*h,90]:-.49999*p>l?[0,-2*Math.atan2(t,o)*h,-90]:[i.roundTo3Places(Math.atan2(2*t*o-2*n*r,1-2*s-2*c)*h),i.roundTo3Places(Math.atan2(2*n*o-2*t*r,1-2*u-2*c)*h),i.roundTo3Places(Math.asin(2*t*n+2*r*o)*h)]},roundTo3Places:function(e){var t=e.toString().split("e");return.001*Math.round(t[0]+"e"+(t[1]?+t[1]-3:3))},decomposeMatrix:function(e){r(16===e.length,"Matrix decomposition needs a list of 3d matrix values, received %s",e);var t=[],n=[],o=[],a=[],s=[];if(e[15]){for(var u=[],c=[],l=0;4>l;l++){u.push([]);for(var p=0;4>p;p++){var h=e[4*l+p]/e[15];u[l].push(h),c.push(3===p?0:h)}}if(c[15]=1,i.determinant(c)){if(0!==u[0][3]||0!==u[1][3]||0!==u[2][3])var d=[u[0][3],u[1][3],u[2][3],u[3][3]],f=i.inverse3x3(c),m=i.transpose4x4(f),t=i.multiplyVectorByMatrix(d,m);else t[0]=t[1]=t[2]=0,t[3]=1;for(var l=0;3>l;l++)s[l]=u[3][l];var v=[];for(l=0;3>l;l++)v[l]=[u[l][0],u[l][1],u[l][2]];o[0]=i.v3Length(v[0]),v[0]=i.v3Normalize(v[0],o[0]),a[0]=i.v3Dot(v[0],v[1]),v[1]=i.v3Combine(v[1],v[0],1,-a[0]),a[0]=i.v3Dot(v[0],v[1]),v[1]=i.v3Combine(v[1],v[0],1,-a[0]),o[1]=i.v3Length(v[1]),v[1]=i.v3Normalize(v[1],o[1]),a[0]/=o[1],a[1]=i.v3Dot(v[0],v[2]),v[2]=i.v3Combine(v[2],v[0],1,-a[1]),a[2]=i.v3Dot(v[1],v[2]),v[2]=i.v3Combine(v[2],v[1],1,-a[2]),o[2]=i.v3Length(v[2]),v[2]=i.v3Normalize(v[2],o[2]),a[1]/=o[2],a[2]/=o[2];var g=i.v3Cross(v[1],v[2]);if(i.v3Dot(v[0],g)<0)for(l=0;3>l;l++)o[l]*=-1,v[l][0]*=-1,v[l][1]*=-1,v[l][2]*=-1;n[0]=.5*Math.sqrt(Math.max(1+v[0][0]-v[1][1]-v[2][2],0)),n[1]=.5*Math.sqrt(Math.max(1-v[0][0]+v[1][1]-v[2][2],0)),n[2]=.5*Math.sqrt(Math.max(1-v[0][0]-v[1][1]+v[2][2],0)),n[3]=.5*Math.sqrt(Math.max(1+v[0][0]+v[1][1]+v[2][2],0)),v[2][1]>v[1][2]&&(n[0]=-n[0]),v[0][2]>v[2][0]&&(n[1]=-n[1]),v[1][0]>v[0][1]&&(n[2]=-n[2]);var y;return y=n[0]<.001&&n[0]>=0&&n[1]<.001&&n[1]>=0?[0,0,i.roundTo3Places(180*Math.atan2(v[0][1],v[0][0])/Math.PI)]:i.quaternionToDegreesXYZ(n,u,v),{rotationDegrees:y,perspective:t,quaternion:n,scale:o,skew:a,translation:s,rotate:y[2],scaleX:o[0],scaleY:o[1],translateX:s[0],translateY:s[1]}}}}};n.exports=i}),__d("deepFreezeAndThrowOnMutationInDev",[],function(e,t,n){"use strict";function r(e){if(__DEV__){if("object"!=typeof e||null===e||Object.isFrozen(e)||Object.isSealed(e))return;for(var t in e)e.hasOwnProperty(t)&&(e.__defineGetter__(t,o.bind(null,e[t])),e.__defineSetter__(t,i.bind(null,t)),r(e[t]));Object.freeze(e),Object.seal(e)}}function i(e,t){throw Error("You attempted to set the key `"+e+"` with the value `"+JSON.stringify(t)+"` on an object that is meant to be immutable and has been frozen.")}function o(e){return e}n.exports=r}),__d("ReactNativeEventEmitter",["EventPluginHub","ReactEventEmitterMixin","ReactNativeTagHandles","NodeHandle","EventConstants","merge","warning"],function(e,t,n){"use strict";var r=t("EventPluginHub"),i=t("ReactEventEmitterMixin"),o=t("ReactNativeTagHandles"),a=t("NodeHandle"),s=t("EventConstants"),u=t("merge"),c=t("warning"),l=s.topLevelTypes,p={},h=function(e,t){for(var n=[],r=0;r>",R={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),any:o(),arrayOf:a,element:s(),instanceOf:u,node:h(),objectOf:l,oneOf:c,oneOfType:p,shape:d};n.exports=R}),__d("TransformPropTypes",["ReactPropTypes"],function(e,t,n){"use strict";var r=t("ReactPropTypes"),i={transform:r.arrayOf(r.oneOfType([r.shape({perspective:r.number}),r.shape({rotate:r.string}),r.shape({rotateX:r.string}),r.shape({rotateY:r.string}),r.shape({rotateZ:r.string}),r.shape({scale:r.number}),r.shape({scaleX:r.number}),r.shape({scaleY:r.number}),r.shape({translateX:r.number}),r.shape({translateY:r.number})])),transformMatrix:r.arrayOf(r.number),rotation:r.number,scaleX:r.number,scaleY:r.number,translateX:r.number,translateY:r.number};n.exports=i}),__d("TextStylePropTypes",["ReactPropTypes","ViewStylePropTypes"],function(e,t,n){"use strict";for(var r=t("ReactPropTypes"),i=t("ViewStylePropTypes"),o=Object.assign(Object.create(i),{color:r.string,fontFamily:r.string,fontSize:r.number,fontStyle:r.oneOf(["normal","italic"]),fontWeight:r.oneOf(["normal","bold","100","200","300","400","500","600","700","800","900"]),letterSpacing:r.number,lineHeight:r.number,textAlign:r.oneOf(["auto","left","right","center","justify"]),textDecorationLine:r.oneOf(["none","underline","line-through","underline line-through"]),textDecorationStyle:r.oneOf(["solid","double","dotted","dashed"]),textDecorationColor:r.string,writingDirection:r.oneOf(["auto","ltr","rtl"])}),a=Object.keys({padding:null,paddingTop:null,paddingLeft:null,paddingRight:null,paddingBottom:null,paddingVertical:null,paddingHorizontal:null}),s=0;si;i++)if(r(e[i],t[i]))return!0}else{for(var o in e)if(r(e[o],t[o]))return!0;for(var a in t)if(void 0===e[a]&&void 0!==t[a])return!0}return!1};n.exports=r}),__d("diffRawProperties",["deepDiffer"],function(e,t,n){"use strict";function r(e,t,n,r){var o,a,s,u,c,l;if(n)for(var p in n)o=r[p],o&&(s=t&&t[p],a=n[p],"function"==typeof s&&(s=!0),"function"==typeof a&&(a=!0),s!==a&&(l=o.diff||i,u="object"!=typeof a||null===a,c=u||!s||l(s,a),c&&(e=e||{},e[p]=a)));if(t)for(var p in t)o=r[p],o&&(e&&void 0!==e[p]||(s=t[p],a=n&&n[p],"function"==typeof s&&(s=!0),"function"==typeof a&&(a=!0),s!==a&&(void 0===a&&(a=null),l=o.diff||i,u="object"!=typeof a||null===a,c=u&&s!==a||l(s,a),c&&(e=e||{},e[p]=a))));return e}var i=t("deepDiffer");n.exports=r}),__d("RCTEventEmitter",["ReactNativeEventEmitter"],function(e,t,n){"use strict";var r=t("ReactNativeEventEmitter");n.exports=r}),__d("RCTLog",["invariant"],function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=t("NativeMethodsMixin"),o=t("ReactPropTypes"),a=t("React"),s=t("StyleSheet"),u=t("View"),c=t("requireNativeComponent"),l="#999999",p=a.createClass({displayName:"ActivityIndicatorIOS",mixins:[i],propTypes:{animating:o.bool,color:o.string,hidesWhenStopped:o.bool,size:o.oneOf(["small","large"]),onLayout:o.func},getDefaultProps:function(){return{animating:!0,color:l,hidesWhenStopped:!0,size:"small"}},render:function(){var e=this.props,t=e.onLayout,n=e.style,i=r(e,["onLayout","style"]),o="large"===this.props.size?h.sizeLarge:h.sizeSmall;return a.createElement(u,{onLayout:t,style:[h.container,o,n]},a.createElement(d,i))}}),h=s.create({container:{alignItems:"center",justifyContent:"center"},sizeSmall:{width:20,height:20},sizeLarge:{width:36,height:36}}),d=c("RCTActivityIndicatorView",p,{nativeOnly:{activityIndicatorViewStyle:!0}});n.exports=p}),__d("StyleSheet",["StyleSheetRegistry","StyleSheetValidation"],function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n>")+": "+JSON.stringify(t,null," ")+(r||""))},h={};l.addValidStylePropTypes(o),l.addValidStylePropTypes(s),l.addValidStylePropTypes(u),n.exports=l}),__d("View",["NativeMethodsMixin","ReactPropTypes","NativeModules","React","ReactNativeStyleAttributes","ReactNativeViewAttributes","StyleSheetPropType","ViewStylePropTypes","createReactNativeComponentClass"],function(e,t,n){"use strict";var r=t("NativeMethodsMixin"),i=t("ReactPropTypes"),o=t("NativeModules").UIManager,a=t("React"),s=t("ReactNativeStyleAttributes"),u=t("ReactNativeViewAttributes"),c=t("StyleSheetPropType"),l=t("ViewStylePropTypes"),p=t("createReactNativeComponentClass"),h=c(l),d=["none","button","link","header","search","image","selected","plays","key","text","summary","disabled","frequentUpdates","startsMedia","adjustable","allowsDirectInteraction","pageTurn"],f=a.createClass({displayName:"View",mixins:[r],viewConfig:{uiViewClassName:"RCTView",validAttributes:u.RCTView},propTypes:{accessible:i.bool,accessibilityLabel:i.string,accessibilityComponentType:i.oneOf(["none","button","radiobutton_checked","radiobutton_unchecked"]),accessibilityLiveRegion:i.oneOf(["none","polite","assertive"]),importantForAccessibility:i.oneOf(["auto","yes","no","no-hide-descendants"]),accessibilityTraits:i.oneOfType([i.oneOf(d),i.arrayOf(i.oneOf(d))]),onAcccessibilityTap:i.func,onMagicTap:i.func,testID:i.string,onMoveShouldSetResponder:i.func,onResponderGrant:i.func,onResponderMove:i.func,onResponderReject:i.func,onResponderRelease:i.func,onResponderTerminate:i.func,onResponderTerminationRequest:i.func,onStartShouldSetResponder:i.func,onStartShouldSetResponderCapture:i.func,onLayout:i.func,pointerEvents:i.oneOf(["box-none","none","box-only","auto"]),style:h,removeClippedSubviews:i.bool,renderToHardwareTextureAndroid:i.bool,shouldRasterizeIOS:i.bool,collapsable:i.bool},render:function(){return a.createElement(m,this.props)}}),m=p({validAttributes:u.RCTView,uiViewClassName:"RCTView"});if(m.propTypes=f.propTypes,__DEV__){var v=o.viewConfigs&&o.viewConfigs.RCTView||{};for(var g in v.nativeProps){var y=f;if(!y.propTypes[g]&&!s[g])throw new Error("View is missing propType for native prop `"+g+"`")}}var _=m;__DEV__&&(_=f),n.exports=_}),__d("ReactNativeViewAttributes",["merge"],function(e,t,n){"use strict";var r=t("merge"),i={};i.UIView={pointerEvents:!0,accessible:!0,accessibilityLabel:!0,accessibilityComponentType:!0,accessibilityLiveRegion:!0,accessibilityTraits:!0,importantForAccessibility:!0,testID:!0,renderToHardwareTextureAndroid:!0,shouldRasterizeIOS:!0,onLayout:!0,onAccessibilityTap:!0,onMagicTap:!0,collapsable:!0},i.RCTView=r(i.UIView,{removeClippedSubviews:!0}),n.exports=i}),__d("StyleSheetPropType",["createStrictShapeTypeChecker","flattenStyle"],function(e,t,n){"use strict";function r(e){var t=i(e);return function(e,n,r,i){var a=e;return e[n]&&(a={},a[n]=o(e[n])),t(a,n,r,i)}}var i=t("createStrictShapeTypeChecker"),o=t("flattenStyle");n.exports=r}),__d("createStrictShapeTypeChecker",["ReactPropTypeLocationNames","invariant","merge"],function(e,t,n){"use strict";function r(e){function t(t,n,r,s,u){if(!n[r])return void(t&&o(!1,"Required object `"+r+"` was not specified in "+("`"+s+"`.")));var c=n[r],l=typeof c,p=u&&i[u]||"(unknown)";"object"!==l&&o(!1,"Invalid "+p+" `"+r+"` of type `"+l+"` "+("supplied to `"+s+"`, expected `object`."));var h=a(n[r],e);for(var d in h){var f=e[d];f||o(!1,"Invalid props."+r+" key `"+d+"` supplied to `"+s+"`.\nBad object: "+JSON.stringify(n[r],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(c,d,s,u);m&&o(!1,m.message+"\nBad object: "+JSON.stringify(n[r],null," "))}}function n(e,n,r,i){return t(!1,e,n,r,i)}return n.isRequired=t.bind(null,!0),n}var i=t("ReactPropTypeLocationNames"),o=t("invariant"),a=t("merge");n.exports=r}),__d("requireNativeComponent",["verifyPropTypes","NativeModules","UnimplementedView","createReactNativeComponentClass","insetsDiffer","pointsDiffer","matricesDiffer","sizesDiffer","verifyPropTypes","warning"],function(e,t,n){function r(e,t,n){var r=o[e];if(!r||!r.NativeProps)return d(!1,'Native component for "%s" does not exist',e),a;var u=i({},o.RCTView.NativeProps,r.NativeProps);r.uiViewClassName=e,r.validAttributes={},r.propTypes=t&&t.propTypes;for(var c in u){var l=f[u[c]];r.validAttributes[c]=l?{diff:l}:!0}return __DEV__&&t&&h(t,r,n&&n.nativeOnly),s(r)}var i=Object.assign||function(e){for(var t=1;t=t)return e[n];return e[e.length-1]||1}function c(e){if("object"==typeof e)return e;var t=h.getAssetByID(e);return t?l(t):null}function l(e){var t=r();return t?{width:e.width,height:e.height,uri:o(t,e),isStatic:!1}:{width:e.width,height:e.height,uri:i(e),isStatic:!0}}var p,h=t("AssetRegistry"),d=t("PixelRatio"),f=t("Platform"),m=t("NativeModules").SourceCode;n.exports=c,n.exports.pickScale=u}),__d("AssetRegistry",[],function(e,t,n){"use strict";function r(e){return o.push(e)}function i(e){return o[e-1]}var o=[];n.exports={registerAsset:r,getAssetByID:i}}),__d("PixelRatio",["Dimensions"],function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}var i=Object.assign||function(e){for(var t=1;t=this.state.prevRenderedRowsCount&&t.sectionHeaderShouldUpdate(l);e.push(a.createElement(p,{key:"s_"+h,shouldUpdate:!!f,render:this.props.renderSectionHeader.bind(null,t.getSectionHeaderData(l),h)})),o.push(c++)}for(var m=0;m=this.state.prevRenderedRowsCount&&t.rowShouldUpdate(l,m),_=a.createElement(p,{key:"r_"+g,shouldUpdate:!!y,render:this.props.renderRow.bind(null,t.getRowData(l,m),h,v,this.onRowHighlighted)});if(e.push(_),c++,this.props.renderSeparator&&(m!==d.length-1||l===n.length-1)){var b=this.state.highlightedRow.sectionID===h&&(this.state.highlightedRow.rowID===v||this.state.highlightedRow.rowID===d[m+1]),E=this.props.renderSeparator(h,v,b);e.push(E),c++}if(++i===this.state.curRenderedRowsCount)break}if(i>=this.state.curRenderedRowsCount)break}}var T=this.props,w=T.renderScrollComponent,C=r(T,["renderScrollComponent"]);return C.scrollEventThrottle||(C.scrollEventThrottle=S),Object.assign(C,{onScroll:this._onScroll,stickyHeaderIndices:o,onKeyboardWillShow:void 0,onKeyboardWillHide:void 0,onKeyboardDidShow:void 0,onKeyboardDidHide:void 0}),a.cloneElement(w(C),{ref:R},s,e,u)},_measureAndUpdateScrollProps:function(){var e=this.getScrollResponder();e&&e.getInnerViewNode&&(s.measureLayout(e.getInnerViewNode(),a.findNodeHandle(e),f,this._setScrollContentLength),s.measureLayoutRelativeToParent(a.findNodeHandle(e),f,this._setScrollVisibleLength),u&&u.calculateChildFrames&&u.calculateChildFrames(a.findNodeHandle(e),this._updateChildFrames))},_setScrollContentLength:function(e,t,n,r){this.scrollProperties.contentLength=this.props.horizontal?n:r},_setScrollVisibleLength:function(e,t,n,r){this.scrollProperties.visibleLength=this.props.horizontal?n:r,this._updateVisibleRows(),this._renderMoreRowsIfNeeded()},_updateChildFrames:function(e){this._updateVisibleRows(e)},_renderMoreRowsIfNeeded:function(){if(null!==this.scrollProperties.contentLength&&null!==this.scrollProperties.visibleLength&&this.state.curRenderedRowsCount!==this.props.dataSource.getRowCount()){var e=this._getDistanceFromEnd(this.scrollProperties);eo||i>R?b&&(c=!0,delete v[y],l[f]||(l[f]={}),l[f][y]=!1):b||(c=!0,v[y]=!0,l[f]||(l[f]={}),l[f][y]=!0)}d(v)?this._visibleRows[f]&&delete this._visibleRows[f]:this._visibleRows[f]=v}}c&&this.props.onChangeVisibleRows(this._visibleRows,l)}},_onScroll:function(e){var t=!this.props.horizontal;this.scrollProperties.visibleLength=e.nativeEvent.layoutMeasurement[t?"height":"width"],this.scrollProperties.contentLength=e.nativeEvent.contentSize[t?"height":"width"],this.scrollProperties.offset=e.nativeEvent.contentOffset[t?"y":"x"],this._updateVisibleRows(e.nativeEvent.updatedChildFrames);var n=this._getDistanceFromEnd(this.scrollProperties)=this.rowIdentities[n].length))return this.rowIdentities[n][t];t-=this.rowIdentities[n].length}return null}},{key:"getSectionIDForFlatIndex",value:function(e){for(var t=e,n=0;n=this.rowIdentities[n].length))return this.sectionIdentities[n];t-=this.rowIdentities[n].length}return null}},{key:"getSectionLengths",value:function(){for(var e=[],t=0;t but not `scrollEventThrottle`. You will only receive one event. Using `16` you get all the events but be aware that it may cause frame drops, use a bigger number if you don't need as much precision."),"android"===o.OS&&"on-drag"===this.props.keyboardDismissMode&&y(),this.scrollResponderHandleScroll(e)},render:function(){var e=[this.props.horizontal&&O.contentContainerHorizontal,this.props.contentContainerStyle];if(__DEV__&&this.props.style){var t=_(this.props.style),n=["alignItems","justifyContent"].filter(function(e){return t&&void 0!==t[e]});S(0===n.length,"ScrollView child layout ("+JSON.stringify(n)+") must by applied through the contentContainerStyle prop.")}var i,a=u.createElement(f,{ref:C,style:e,removeClippedSubviews:this.props.removeClippedSubviews,collapsable:!1},this.props.children),c=void 0!==this.props.alwaysBounceHorizontal?this.props.alwaysBounceHorizontal:this.props.horizontal,l=void 0!==this.props.alwaysBounceVertical?this.props.alwaysBounceVertical:!this.props.horizontal,p=r({},this.props,{alwaysBounceHorizontal:c,alwaysBounceVertical:l,style:[O.base,this.props.style],onTouchStart:this.scrollResponderHandleTouchStart,onTouchMove:this.scrollResponderHandleTouchMove,onTouchEnd:this.scrollResponderHandleTouchEnd,onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag,onScrollEndDrag:this.scrollResponderHandleScrollEndDrag,onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin,onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd,onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder,onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture,onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder,onScroll:this.handleScroll,onResponderGrant:this.scrollResponderHandleResponderGrant,onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest,onResponderTerminate:this.scrollResponderHandleTerminate,onResponderRelease:this.scrollResponderHandleResponderRelease,onResponderReject:this.scrollResponderHandleResponderReject});return"ios"===o.OS?i=s:"android"===o.OS&&(i=this.props.horizontal?N:P),S(void 0!==i,"ScrollViewClass must not be undefined"),u.createElement(i,r({},p,{ref:w}),a)}}),O=h.create({base:{flex:1},contentContainerHorizontal:{alignSelf:"flex-start",flexDirection:"row"}}),x=r({},c.UIView,{alwaysBounceHorizontal:!0,alwaysBounceVertical:!0,automaticallyAdjustContentInsets:!0,bounces:!0,centerContent:!0,contentInset:{diff:b},contentOffset:{diff:R},decelerationRate:!0,horizontal:!0,keyboardDismissMode:!0,keyboardShouldPersistTaps:!0,maximumZoomScale:!0,minimumZoomScale:!0,pagingEnabled:!0,removeClippedSubviews:!0,scrollEnabled:!0,scrollIndicatorInsets:{diff:b},scrollsToTop:!0,showsHorizontalScrollIndicator:!0,showsVerticalScrollIndicator:!0,stickyHeaderIndices:{diff:g},scrollEventThrottle:!0,zoomScale:!0});if("android"===o.OS)var P=v({validAttributes:x,uiViewClassName:"RCTScrollView"}),N=v({validAttributes:x,uiViewClassName:"AndroidHorizontalScrollView"});else if("ios"===o.OS)var s=E("RCTScrollView",I);n.exports=I}),__d("PointPropType",["ReactPropTypes","createStrictShapeTypeChecker"],function(e,t,n){"use strict";var r=t("ReactPropTypes"),i=t("createStrictShapeTypeChecker"),o=i({x:r.number,y:r.number});n.exports=o}),__d("ScrollResponder",["NativeModules","Platform","RCTDeviceEventEmitter","React","Subscribable","TextInputState","warning"],function(e,t,n){"use strict";var r=t("NativeModules"),i=t("Platform"),o=t("RCTDeviceEventEmitter"),a=t("React"),s=t("Subscribable"),u=t("TextInputState"),c=r.UIManager,l=c.RCTScrollView.Constants,p=t("warning"),h=16,d={mixins:[s.Mixin],statics:l,scrollResponderMixinGetInitialState:function(){return{isTouching:!1,lastMomentumScrollBeginTime:0,lastMomentumScrollEndTime:0,observedScrollSinceBecomingResponder:!1,becameResponderWhileAnimating:!1}},scrollResponderHandleScrollShouldSetResponder:function(){return this.state.isTouching},scrollResponderHandleStartShouldSetResponder:function(){return!1},scrollResponderHandleStartShouldSetResponderCapture:function(e){var t=u.currentlyFocusedField();return this.props.keyboardShouldPersistTaps===!1&&null!=t&&e.target!==t?!0:this.scrollResponderIsAnimating()},scrollResponderHandleResponderReject:function(){p(!1,"ScrollView doesn't take rejection well - scrolls anyway")},scrollResponderHandleTerminationRequest:function(){return!this.state.observedScrollSinceBecomingResponder},scrollResponderHandleTouchEnd:function(e){var t=e.nativeEvent;this.state.isTouching=0!==t.touches.length,this.props.onTouchEnd&&this.props.onTouchEnd(e)},scrollResponderHandleResponderRelease:function(e){this.props.onResponderRelease&&this.props.onResponderRelease(e);var t=u.currentlyFocusedField();this.props.keyboardShouldPersistTaps!==!1||null==t||e.target===t||this.state.observedScrollSinceBecomingResponder||this.state.becameResponderWhileAnimating||(this.props.onScrollResponderKeyboardDismissed&&this.props.onScrollResponderKeyboardDismissed(e),u.blurTextInput(t))},scrollResponderHandleScroll:function(e){this.state.observedScrollSinceBecomingResponder=!0,this.props.onScroll&&this.props.onScroll(e)},scrollResponderHandleResponderGrant:function(e){this.state.observedScrollSinceBecomingResponder=!1,this.props.onResponderGrant&&this.props.onResponderGrant(e),this.state.becameResponderWhileAnimating=this.scrollResponderIsAnimating()},scrollResponderHandleScrollBeginDrag:function(e){this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(e)},scrollResponderHandleScrollEndDrag:function(e){this.props.onScrollEndDrag&&this.props.onScrollEndDrag(e)},scrollResponderHandleMomentumScrollBegin:function(e){this.state.lastMomentumScrollBeginTime=Date.now(),this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(e)},scrollResponderHandleMomentumScrollEnd:function(e){this.state.lastMomentumScrollEndTime=Date.now(),this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(e)},scrollResponderHandleTouchStart:function(e){this.state.isTouching=!0,this.props.onTouchStart&&this.props.onTouchStart(e)},scrollResponderHandleTouchMove:function(e){this.props.onTouchMove&&this.props.onTouchMove(e)},scrollResponderIsAnimating:function(){var e=Date.now(),t=e-this.state.lastMomentumScrollEndTime,n=h>t||this.state.lastMomentumScrollEndTime=1,"Navigator requires props.initialRoute or props.initialRouteStack.");var n=t.length-1;return this.props.initialRoute&&(n=t.indexOf(this.props.initialRoute),R(-1!==n,"initialRoute is not in initialRouteStack.")),{sceneConfigStack:t.map(function(t){return e.props.configureScene(t)}),routeStack:t,presentedIndex:n,transitionFromIndex:null,activeGesture:null,pendingGestureProgress:null,transitionQueue:[]}},componentWillMount:function(){var e=this;this.__defineGetter__("navigationContext",this._getNavigationContext),this._subRouteFocus=[],this.parentNavigator=this.props.navigator,this._handlers={},this.springSystem=new E.SpringSystem,this.spring=this.springSystem.createSpring(),this.spring.setRestSpeedThreshold(.05),this.spring.setCurrentValue(0).setAtRest(),this.spring.addListener({onSpringEndStateChange:function(){e._interactionHandle||(e._interactionHandle=e.createInteractionHandle())},onSpringUpdate:function(){e._handleSpringUpdate()},onSpringAtRest:function(){e._completeTransition()}}),this.panGesture=f.create({onMoveShouldSetPanResponder:this._handleMoveShouldSetPanResponder,onPanResponderGrant:this._handlePanResponderGrant,onPanResponderRelease:this._handlePanResponderRelease,onPanResponderMove:this._handlePanResponderMove,onPanResponderTerminate:this._handlePanResponderTerminate}),this._interactionHandle=null,this._emitWillFocus(this.state.routeStack[this.state.presentedIndex])},componentDidMount:function(){this._handleSpringUpdate(),this._emitDidFocus(this.state.routeStack[this.state.presentedIndex])},componentWillUnmount:function(){this._navigationContext&&(this._navigationContext.dispose(),this._navigationContext=null)},immediatelyResetRouteStack:function(e){var t=this,n=e.length-1;this.setState({routeStack:e,sceneConfigStack:e.map(this.props.configureScene),presentedIndex:n,activeGesture:null,transitionFromIndex:null,transitionQueue:[]},function(){t._handleSpringUpdate()})},_transitionTo:function(e,t,n,r){if(e!==this.state.presentedIndex){if(null!==this.state.transitionFromIndex)return void this.state.transitionQueue.push({destIndex:e,velocity:t,cb:r});this.state.transitionFromIndex=this.state.presentedIndex,this.state.presentedIndex=e,this.state.transitionCb=r,this._onAnimationStart(),a&&a.startRecordingFps();var i=this.state.sceneConfigStack[this.state.transitionFromIndex]||this.state.sceneConfigStack[this.state.presentedIndex];R(i,"Cannot configure scene at index "+this.state.transitionFromIndex),null!=n&&this.spring.setCurrentValue(n),this.spring.setOvershootClampingEnabled(!0),this.spring.getSpringConfig().friction=i.springFriction,this.spring.getSpringConfig().tension=i.springTension,this.spring.setVelocity(t||i.defaultTransitionVelocity),this.spring.setEndValue(1)}},_handleSpringUpdate:function(){if(null!=this.state.transitionFromIndex)this._transitionBetween(this.state.transitionFromIndex,this.state.presentedIndex,this.spring.getCurrentValue());else if(null!=this.state.activeGesture){var e=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);this._transitionBetween(this.state.presentedIndex,e,this.spring.getCurrentValue())}},_completeTransition:function(){if(1!==this.spring.getCurrentValue()&&0!==this.spring.getCurrentValue())return void(this.state.pendingGestureProgress&&(this.state.pendingGestureProgress=null));this._onAnimationEnd();var e=this.state.presentedIndex,t=this._subRouteFocus[e]||this.state.routeStack[e];if(this._emitDidFocus(t),a&&a.stopRecordingFps(Date.now()),this.state.transitionFromIndex=null,this.spring.setCurrentValue(0).setAtRest(),this._hideScenes(),this.state.transitionCb&&(this.state.transitionCb(),this.state.transitionCb=null),this._interactionHandle&&(this.clearInteractionHandle(this._interactionHandle),this._interactionHandle=null),this.state.pendingGestureProgress){var n=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);return this._enableScene(n),void this.spring.setEndValue(this.state.pendingGestureProgress)}if(this.state.transitionQueue.length){var r=this.state.transitionQueue.shift();this._enableScene(r.destIndex),this._emitWillFocus(this.state.routeStack[r.destIndex]),this._transitionTo(r.destIndex,r.velocity,null,r.cb)}},_emitDidFocus:function(e){this.navigationContext.emit("didfocus",{route:e}),this.props.onDidFocus&&this.props.onDidFocus(e)},_emitWillFocus:function(e){this.navigationContext.emit("willfocus",{route:e});var t=this._navBar;t&&t.handleWillFocus&&t.handleWillFocus(e),this.props.onWillFocus&&this.props.onWillFocus(e)},_hideScenes:function(){var e=null;this.state.activeGesture&&(e=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture));for(var t=0;t=t;t++)this._setRenderSceneToHarwareTextureAndroid(t,!1);var n=this._navBar;n&&n.onAnimationEnd&&n.onAnimationEnd()},_setRenderSceneToHarwareTextureAndroid:function(e,t){var n=this.refs["scene_"+e];null!==n&&void 0!==n&&n.setNativeProps({renderToHardwareTextureAndroid:t})},_handleTouchStart:function(){this._eligibleGestures=P},_handleMoveShouldSetPanResponder:function(e,t){var n=this.state.sceneConfigStack[this.state.presentedIndex];return this._expectingGestureGrant=this._matchGestureAction(this._eligibleGestures,n.gestures,t),!!this._expectingGestureGrant},_doesGestureOverswipe:function(e){var t=this.state.presentedIndex<=0&&("pop"===e||"jumpBack"===e),n=this.state.presentedIndex>=this.state.routeStack.length-1&&"jumpForward"===e;return n||t},_handlePanResponderGrant:function(){R(this._expectingGestureGrant,"Responder granted unexpectedly."),this._attachGesture(this._expectingGestureGrant),this._onAnimationStart(),this._expectingGestureGrant=null},_deltaForGestureAction:function(e){switch(e){case"pop":case"jumpBack":return-1;case"jumpForward":return 1;default:return void R(!1,"Unsupported gesture action "+e)}},_handlePanResponderRelease:function(e,t){var n=this,r=this.state.sceneConfigStack[this.state.presentedIndex],i=this.state.activeGesture;if(i){var o=r.gestures[i],a=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);if(0===this.spring.getCurrentValue())return this.spring.setCurrentValue(0).setAtRest(),void this._completeTransition();var s,u,c="top-to-bottom"===o.direction||"bottom-to-top"===o.direction,l="right-to-left"===o.direction||"bottom-to-top"===o.direction;c?(s=l?-t.vy:t.vy,u=l?-t.dy:t.dy):(s=l?-t.vx:t.vx,u=l?-t.dx:t.dx);var p=b(-10,s,10);if(Math.abs(s)o.fullDistance*o.stillCompletionRatio;p=h?o.snapVelocity:-o.snapVelocity}if(0>p||this._doesGestureOverswipe(i)){if(null==this.state.transitionFromIndex){var d=this.state.presentedIndex;this.state.presentedIndex=a,this._transitionTo(d,-p,1-this.spring.getCurrentValue())}}else this._emitWillFocus(this.state.routeStack[a]),this._transitionTo(a,p,null,function(){"pop"===i&&n._cleanScenesPastIndex(a)});this._detachGesture()}},_handlePanResponderTerminate:function(){var e=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);this._detachGesture();var t=this.state.presentedIndex;this.state.presentedIndex=e,this._transitionTo(t,null,1-this.spring.getCurrentValue())},_attachGesture:function(e){this.state.activeGesture=e;var t=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);this._enableScene(t)},_detachGesture:function(){this.state.activeGesture=null,this.state.pendingGestureProgress=null,this._hideScenes()},_handlePanResponderMove:function(e,t){var n=this.state.sceneConfigStack[this.state.presentedIndex];if(this.state.activeGesture){var r=n.gestures[this.state.activeGesture];return this._moveAttachedGesture(r,t)}var i=this._matchGestureAction(P,n.gestures,t);i&&this._attachGesture(i)},_moveAttachedGesture:function(e,t){var n="top-to-bottom"===e.direction||"bottom-to-top"===e.direction,r="right-to-left"===e.direction||"bottom-to-top"===e.direction,i=n?t.dy:t.dx;i=r?-i:i;var o=e.gestureDetectMovement,a=(i-o)/(e.fullDistance-o);if(0>a&&e.isDetachable){var s=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture);return this._transitionBetween(this.state.presentedIndex,s,0),this._detachGesture(),void(null!=this.state.pendingGestureProgress&&this.spring.setCurrentValue(0))}if(this._doesGestureOverswipe(this.state.activeGesture)){var u=e.overswipe.frictionConstant,c=e.overswipe.frictionByDistance,l=1/(u+Math.abs(a)*c);a*=l}a=b(0,a,1),null!=this.state.transitionFromIndex?this.state.pendingGestureProgress=a:this.state.pendingGestureProgress?this.spring.setEndValue(a):this.spring.setCurrentValue(a)},_matchGestureAction:function(e,t,n){var r=this;if(!t)return null;var i=null;return e.some(function(e,o){var a=t[e];if(a){if(null==a.overswipe&&r._doesGestureOverswipe(e))return!1;var s="top-to-bottom"===a.direction||"bottom-to-top"===a.direction,u="right-to-left"===a.direction||"bottom-to-top"===a.direction,c=s?n.moveY:n.moveX,l=s?n.dy:n.dx,p=s?n.dx:n.dy,h=a.edgeHitWidth;u&&(c=-c,l=-l,p=-p,h=s?-(C-h):-(w-h));var d=null==a.edgeHitWidth||h>c;if(!d)return!1;var f=l>=a.gestureDetectMovement;if(!f)return!1;var m=Math.abs(l)>Math.abs(p)*a.directionRatio;return m?(i=e,!0):void(r._eligibleGestures=r._eligibleGestures.slice().splice(o,1))}}),i},_transitionSceneStyle:function(e,t,n,r){var i=this.refs["scene_"+r];if(null!==i&&void 0!==i){var o=t>e?t:e,a=this.state.sceneConfigStack[o];a||(a=this.state.sceneConfigStack[o-1]);var s={},u=e>r||t>r?a.animationInterpolators.out:a.animationInterpolators.into,c=t>e?n:1-n,l=u(s,c);l&&i.setNativeProps({style:s})}},_transitionBetween:function(e,t,n){this._transitionSceneStyle(e,t,n,e),this._transitionSceneStyle(e,t,n,t);var r=this._navBar;r&&r.updateProgress&&t>=0&&e>=0&&r.updateProgress(n,e,t)},_handleResponderTerminationRequest:function(){return!1},_getDestIndexWithinBounds:function(e){var t=this.state.presentedIndex,n=t+e;R(n>=0,"Cannot jump before the first route.");var r=this.state.routeStack.length-1;return R(r>=n,"Cannot jump past the last route."),n},_jumpN:function(e){var t=this._getDestIndexWithinBounds(e);this._enableScene(t),this._emitWillFocus(this.state.routeStack[t]),this._transitionTo(t)},jumpTo:function(e){var t=this.state.routeStack.indexOf(e);R(-1!==t,"Cannot jump to route that is not in the route stack"),this._jumpN(t-this.state.presentedIndex)},jumpForward:function(){this._jumpN(1)},jumpBack:function(){this._jumpN(-1)},push:function(e){var t=this;R(!!e,"Must supply route to push");var n=this.state.presentedIndex+1,r=this.state.routeStack.slice(0,n),i=this.state.sceneConfigStack.slice(0,n),o=r.concat([e]),a=o.length-1,s=i.concat([this.props.configureScene(e)]);this._emitWillFocus(o[a]),this.setState({routeStack:o,sceneConfigStack:s},function(){t._enableScene(a),t._transitionTo(a)})},_popN:function(e){var t=this;if(0!==e){R(this.state.presentedIndex-e>=0,"Cannot pop below zero");var n=this.state.presentedIndex-e;this._enableScene(n),this._emitWillFocus(this.state.routeStack[n]),this._transitionTo(n,null,null,function(){t._cleanScenesPastIndex(n)})}},pop:function(){this.state.transitionQueue.length||this.state.presentedIndex>0&&this._popN(1)},replaceAtIndex:function(e,t,n){var r=this;if(R(!!e,"Must supply route to replace"),0>t&&(t+=this.state.routeStack.length),!(this.state.routeStack.length<=t)){var i=this.state.routeStack.slice(),o=this.state.sceneConfigStack.slice();i[t]=e,o[t]=this.props.configureScene(e),t===this.state.presentedIndex&&this._emitWillFocus(e),this.setState({routeStack:i,sceneConfigStack:o},function(){t===r.state.presentedIndex&&r._emitDidFocus(e),n&&n()})}},replace:function(e){this.replaceAtIndex(e,this.state.presentedIndex)},replacePrevious:function(e){this.replaceAtIndex(e,this.state.presentedIndex-1)},popToTop:function(){this.popToRoute(this.state.routeStack[0])},popToRoute:function(e){var t=this.state.routeStack.indexOf(e);R(-1!==t,"Calling popToRoute for a route that doesn't exist!");var n=this.state.presentedIndex-t;this._popN(n)},replacePreviousAndPop:function(e){this.state.routeStack.length<2||(this.replacePrevious(e),this.pop())},resetTo:function(e){var t=this;R(!!e,"Must supply route to push"),this.replaceAtIndex(e,0,function(){t.state.presentedIndex>0&&t._popN(t.state.presentedIndex)})},getCurrentRoutes:function(){return this.state.routeStack.slice()},_cleanScenesPastIndex:function(e){var t=e+1;t0?(r=this._list.pop(),r.constructor.call(r,e,t,n)):r=new u(e,t,n),r}},{key:"put",value:function(e){this._list.push(e)}}]),e}(),s=new a,u=function(){function e(t,n,i){r(this,e),this._type=t,this._target=n,this._data=i,this._defaultPrevented=!1,this._disposed=!1}return i(e,null,[{key:"pool",value:function(e,t,n){return s.get(e,t,n)}}]),i(e,[{key:"preventDefault",value:function(){this._defaultPrevented=!0}},{key:"dispose",value:function(){o(!this._disposed,"NavigationEvent is already disposed"),this._disposed=!0,this._type=null,this._target=null,this._data=null,this._defaultPrevented=!1,s.put(this)}},{key:"type",get:function(){return this._type}},{key:"target",get:function(){return this._target}},{key:"data",get:function(){return this._data}},{key:"defaultPrevented",get:function(){return this._defaultPrevented}}]),e}();n.exports=u}),__d("NavigationEventEmitter",["EventEmitter","NavigationEvent"],function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var n=0;ne?r.Left[e]:r.Right[e]},b=o.createClass({displayName:"NavigatorBreadcrumbNavigationBar",propTypes:{navigator:h.shape({push:h.func,pop:h.func,replace:h.func,popToRoute:h.func,popToTop:h.func}),routeMapper:h.shape({rightContentForRoute:h.func,titleContentForRoute:h.func,iconForRoute:h.func}),navState:o.PropTypes.shape({routeStack:o.PropTypes.arrayOf(o.PropTypes.object),presentedIndex:o.PropTypes.number}),style:s.propTypes.style},statics:{Styles:r},_updateIndexProgress:function(e,t,n,r){var i,o=r>n?e:1-e,a=t-n,s=t-r;l(p[t],"Cannot find breadcrumb interpolators for "+t),i=a>0&&0===s||s>0&&0===a?p[t].RightToCenter:0>a&&0===s||0>s&&0===a?p[t].CenterToLeft:a===s?p[t].RightToCenter:p[t].RightToLeft,i.Crumb(d[t].style,o)&&this._setPropsIfExists("crumb_"+t,d[t]),i.Icon(f[t].style,o)&&this._setPropsIfExists("icon_"+t,f[t]),i.Separator(m[t].style,o)&&this._setPropsIfExists("separator_"+t,m[t]),i.Title(v[t].style,o)&&this._setPropsIfExists("title_"+t,v[t]);var u=this.refs["right_"+t];u&&i.RightItem(g[t].style,o)&&u.setNativeProps(g[t])},updateProgress:function(e,t,n){for(var r=Math.max(t,n),i=Math.min(t,n),o=i;r>=o;o++)this._updateIndexProgress(e,o,t,n)},onAnimationStart:function(e,t){for(var n=Math.max(e,t),r=Math.min(e,t),i=r;n>=i;i++)this._setRenderViewsToHardwareTextureAndroid(i,!0)},onAnimationEnd:function(){for(var e=this.props.navState.routeStack.length-1,t=0;e>=t;t++)this._setRenderViewsToHardwareTextureAndroid(t,!1)},_setRenderViewsToHardwareTextureAndroid:function(e,t){var n={renderToHardwareTextureAndroid:t};this._setPropsIfExists("icon_"+e,n),this._setPropsIfExists("separator_"+e,n),this._setPropsIfExists("title_"+e,n),this._setPropsIfExists("right_"+e,n)},componentWillMount:function(){this._descriptors={crumb:new c,title:new c,right:new c}},render:function(){var e=this.props.navState,t=e&&e.routeStack.map(this._getBreadcrumb),n=e.routeStack.map(this._getTitle),r=e.routeStack.map(this._getRightButton);return o.createElement(s,{style:[S.breadCrumbContainer,this.props.style]},n,t,r)},_getBreadcrumb:function(e,t){if(this._descriptors.crumb.has(e))return this._descriptors.crumb.get(e);var n=this.props.routeMapper,r=_(t,y(this.props.navState)),i=o.createElement(s,{ref:"crumb_"+t,style:r.Crumb},o.createElement(s,{ref:"icon_"+t,style:r.Icon},n.iconForRoute(e,this.props.navigator)),o.createElement(s,{ref:"separator_"+t,style:r.Separator},n.separatorForRoute(e,this.props.navigator)));return this._descriptors.crumb=this._descriptors.crumb.set(e,i),i},_getTitle:function(e,t){if(this._descriptors.title.has(e))return this._descriptors.title.get(e);var n=this.props.routeMapper.titleContentForRoute(this.props.navState.routeStack[t],this.props.navigator),r=_(t,y(this.props.navState)),i=o.createElement(s,{ref:"title_"+t,style:r.Title},n);return this._descriptors.title=this._descriptors.title.set(e,i),i},_getRightButton:function(e,t){if(this._descriptors.right.has(e))return this._descriptors.right.get(e);var n=this.props.routeMapper.rightContentForRoute(this.props.navState.routeStack[t],this.props.navigator);if(!n)return this._descriptors.right=this._descriptors.right.set(e,null),null;var r=_(t,y(this.props.navState)),i=o.createElement(s,{ref:"right_"+t,style:r.RightItem},n);return this._descriptors.right=this._descriptors.right.set(e,i),i},_setPropsIfExists:function(e,t){var e=this.refs[e];e&&e.setNativeProps(t)}}),S=a.create({breadCrumbContainer:{overflow:"hidden",position:"absolute",height:i.General.TotalNavHeight,top:0,left:0,right:0}});n.exports=b}),__d("NavigatorBreadcrumbNavigationBarStyles",["Dimensions","NavigatorNavigationBarStyles","buildStyleInterpolator","merge"],function(e,t,n){"use strict";for(var r=t("Dimensions"),i=t("NavigatorNavigationBarStyles"),o=t("buildStyleInterpolator"),a=t("merge"),s=r.get("window").width,u=i.General.StatusBarHeight,c=i.General.NavBarHeight,l=4,p=40,h=9,d=p+h,f=100,m=.6,v=10,g={position:"absolute",flexDirection:"row",top:u,width:d,height:c,backgroundColor:"transparent"},y={width:p,height:c},_={width:h,height:c},b={position:"absolute",top:u,height:c,backgroundColor:"transparent"},S=a(b,{left:0,right:0,alignItems:"center",height:c}),R={position:"absolute",top:u,right:l,overflow:"hidden",opacity:1,height:c,backgroundColor:"transparent"},E=[],T=[],w=[],C=0;v>C;C++){var I=d*C+l;E[C]={Crumb:a(g,{left:I}),Icon:a(y,{opacity:m}),Separator:a(_,{opacity:1}),Title:a(b,{left:I,opacity:0}),RightItem:a(R,{opacity:0})},T[C]={Crumb:a(g,{left:I}),Icon:a(y,{opacity:1}),Separator:a(_,{opacity:0}),Title:a(b,{left:I+p,opacity:1}),RightItem:a(R,{opacity:1})};var O=s-100;w[C]={Crumb:a(g,{left:O}),Icon:a(y,{opacity:0}),Separator:a(_,{opacity:0}),Title:a(b,{left:O+p,opacity:0}),RightItem:a(R,{opacity:0})}}T[0]={Crumb:a(g,{left:s/4}),Icon:a(y,{opacity:0}),Separator:a(_,{opacity:0}),Title:a(S,{opacity:1}),RightItem:T[0].RightItem},E[0].Title=a(S,{left:-s/4,opacity:0}),w[0].Title=a(S,{opacity:0});var x=function(e,t){return{Crumb:o({left:{type:"linear",from:e.Crumb.left,to:t.Crumb.left,min:0,max:1,extrapolate:!0}}),Icon:o({opacity:{type:"linear",from:e.Icon.opacity,to:t.Icon.opacity,min:0,max:1}}),Separator:o({opacity:{type:"linear",from:e.Separator.opacity,to:t.Separator.opacity,min:0,max:1}}),Title:o({opacity:{type:"linear",from:e.Title.opacity,to:t.Title.opacity,min:0,max:1},left:{type:"linear",from:e.Title.left,to:t.Title.left,min:0,max:1,extrapolate:!0}}),RightItem:o({opacity:{type:"linear",from:e.RightItem.opacity,to:t.RightItem.opacity,min:0,max:1,round:f}})}},P=T.map(function(e,t){return{RightToCenter:x(w[t],T[t]),CenterToLeft:x(T[t],E[t]),RightToLeft:x(w[t],E[t])}});n.exports={Interpolators:P,Left:E,Center:T,Right:w,IconWidth:p,IconHeight:c,SeparatorWidth:h,SeparatorHeight:c}}),__d("NavigatorNavigationBarStyles",["Dimensions","buildStyleInterpolator","merge"],function(e,t,n){"use strict";function r(e,t){return{Title:o({opacity:{type:"linear",from:e.Title.opacity,to:t.Title.opacity,min:0,max:1},left:{type:"linear",from:e.Title.left,to:t.Title.left,min:0,max:1,extrapolate:!0}}),LeftButton:o({opacity:{type:"linear",from:e.LeftButton.opacity,to:t.LeftButton.opacity,min:0,max:1,round:d},left:{type:"linear",from:e.LeftButton.left,to:t.LeftButton.left,min:0,max:1}}),RightButton:o({opacity:{type:"linear",from:e.RightButton.opacity,to:t.RightButton.opacity,min:0,max:1,round:d},left:{type:"linear",from:e.RightButton.left,to:t.RightButton.left,min:0,max:1,extrapolate:!0}})}}var i=t("Dimensions"),o=t("buildStyleInterpolator"),a=t("merge"),s=i.get("window").width,u=44,c=20,l=u+c,p={Title:{position:"absolute",top:c,left:0,alignItems:"center",width:s,height:u,backgroundColor:"transparent"},LeftButton:{position:"absolute",top:c,left:0,overflow:"hidden",opacity:1,width:s/3,height:u,backgroundColor:"transparent"},RightButton:{position:"absolute",top:c,left:2*s/3,overflow:"hidden",opacity:1,alignItems:"flex-end",width:s/3,height:u,backgroundColor:"transparent"}},h={Left:{Title:a(p.Title,{left:-s/2,opacity:0}),LeftButton:a(p.LeftButton,{left:-s/3,opacity:1}),RightButton:a(p.RightButton,{left:s/3,opacity:0})},Center:{Title:a(p.Title,{left:0,opacity:1}),LeftButton:a(p.LeftButton,{left:0,opacity:1}),RightButton:a(p.RightButton,{left:2*s/3-0,opacity:1})},Right:{Title:a(p.Title,{left:s/2,opacity:0}),LeftButton:a(p.LeftButton,{left:0,opacity:0}),RightButton:a(p.RightButton,{left:s,opacity:0})}},d=100,f={RightToCenter:r(h.Right,h.Center),CenterToLeft:r(h.Center,h.Left),RightToLeft:r(h.Right,h.Left)}; +n.exports={General:{NavBarHeight:u,StatusBarHeight:c,TotalNavHeight:l},Interpolators:f,Stages:h}}),__d("buildStyleInterpolator",["keyOf"],function(e,t,n){for(var r=t("keyOf"),i=r({x:null}),o=r({y:null}),a=r({z:null}),s=r({w:null}),u=r({transformRotateRadians:null}),c={transformRotateRadians:!0,transformScale:!0,transformTranslate:!0},l={transformRotateRadians:[0,0,0,1],transformTranslate:[0,0,0],transformScale:[1,1,1]},p=/([^\s,]+)/g,h=function(e,t){var n=e.toString(),r=n.slice(n.indexOf("(")+1,n.indexOf(")")).match(p)||[],i=r.map(function(e){return"\\b"+e+"\\b"}).join("|"),o=new RegExp(i,"g"),a=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),s=a.replace(o,function(e){var n=r.indexOf(e),i=t[n];return i});return s.split("\n")},d={unroll:function(e,t,n,r,i,o,a,s,u,c,l,p,h,d,f,m,v){t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],u=e[7],c=e[8],l=e[9],p=e[10],h=e[11],d=e[12],f=e[13],m=e[14],v=e[15]},matrixDiffers:function(e,t,n,r,i,o,a,s,u,c,l,p,h,d,f,m,v,g){e=e||n!==t[0]||r!==t[1]||i!==t[2]||o!==t[3]||a!==t[4]||s!==t[5]||u!==t[6]||c!==t[7]||l!==t[8]||p!==t[9]||h!==t[10]||d!==t[11]||f!==t[12]||m!==t[13]||v!==t[14]||g!==t[15]},transformScale:function(e,t){var n=t[0],r=t[1],i=t[2];e[0]=e[0]*n,e[1]=e[1]*n,e[2]=e[2]*n,e[3]=e[3]*n,e[4]=e[4]*r,e[5]=e[5]*r,e[6]=e[6]*r,e[7]=e[7]*r,e[8]=e[8]*i,e[9]=e[9]*i,e[10]=e[10]*i,e[11]=e[11]*i,e[12]=e[12],e[13]=e[13],e[14]=e[14],e[15]=e[15]},transformTranslate:function(e,t){var n=t[0],r=t[1],i=t[2];e[12]=e[0]*n+e[4]*r+e[8]*i+e[12],e[13]=e[1]*n+e[5]*r+e[9]*i+e[13],e[14]=e[2]*n+e[6]*r+e[10]*i+e[14],e[15]=e[3]*n+e[7]*r+e[11]*i+e[15]},transformRotateRadians:function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,u=i+i,c=n*a,l=n*s,p=n*u,h=r*s,d=r*u,f=i*u,m=o*a,v=o*s,g=o*u,y=1-(h+f),_=l+g,b=p-v,S=l-g,R=1-(c+f),E=d+m,T=p+v,w=d-m,C=1-(c+h),I=e[0],O=e[1],x=e[2],P=e[3],N=e[4],D=e[5],M=e[6],k=e[7],A=e[8],L=e[9],j=e[10],V=e[11],F=y,B=_,H=b;e[0]=F*I+B*N+H*A,e[1]=F*O+B*D+H*L,e[2]=F*x+B*M+H*j,e[3]=F*P+B*k+H*V,F=S,B=R,H=E,e[4]=F*I+B*N+H*A,e[5]=F*O+B*D+H*L,e[6]=F*x+B*M+H*j,e[7]=F*P+B*k+H*V,F=T,B=w,H=C,e[8]=F*I+B*N+H*A,e[9]=F*O+B*D+H*L,e[10]=F*x+B*M+H*j,e[11]=F*P+B*k+H*V}},f={transformScale:function(e,t){e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1},transformTranslate:function(e,t){e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1},transformRotateRadians:function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,u=i+i,c=n*a,l=n*s,p=n*u,h=r*s,d=r*u,f=i*u,m=o*a,v=o*s,g=o*u,y=1-(h+f),_=l+g,b=p-v,S=l-g,R=1-(c+f),E=d+m,T=p+v,w=d-m,C=1-(c+h),I=y,O=_,x=b;e[0]=I,e[1]=O,e[2]=x,e[3]=0,I=S,O=R,x=E,e[4]=I,e[5]=O,e[6]=x,e[7]=0,I=T,O=w,x=C,e[8]=I,e[9]=O,e[10]=x,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1}},m=function(e,t){return" if (!didChange) {\n var prevVal = result."+e+";\n result."+e+" = "+t+";\n didChange = didChange || ("+t+" !== prevVal);\n } else {\n result."+e+" = "+t+";\n }\n"},v=(function(e,t,n,r){var i="round"in e,o=e.round,a=" ratio = (value - "+e.min+") / "+(e.max-e.min)+";\n";e.extrapolate||(a+=" ratio = ratio > 1 ? 1 : (ratio < 0 ? 0 : ratio);\n");var s=i?"Math.round("+o+" * ":"",u=i?") / "+o:"";return a+=" "+r+" = "+s+"("+t+" * (1 - ratio) + "+n+" * ratio)"+u+";\n"}),g=function(e){return v(e,e.from,e.to,"nextScalarVal")},y=function(e){var t=JSON.stringify(e.value);return" nextScalarVal = "+t+";\n"},_=function(e){return" nextScalarVal = value >= "+(e.threshold+" ? "+e.to+" : "+e.from)+";\n"},b=function(){return" nextScalarVal = value;\n"},S=function(e){return e+"ReuseOp"},R=function(e){var t="";for(var n in e)c[n]&&(t+="var "+S(n)+" = [];\n");return t},E=function(e){return"\n"+e.join("\n")+"\n"},T=function(e,t,n,r){var i=S(t)+"["+r+"]";return void 0!==e.from[n]&&void 0!==e.to[n]?" "+e.from[n]!==e.to[n]?v(e,e.from[n],e.to[n],i):i+" = "+e.from[n]+";":" "+i+" = "+l[t][r]+";"},w=[],C=0;16>C;C++)w.push("m"+C);var I=function(e){var t=[" var transformMatrix = result.transformMatrix !== undefined ? result.transformMatrix : (result.transformMatrix = []);"];t.push.apply(t,h(d.unroll,["transformMatrix"].concat(w)));for(var n=0;ni;i++)r[i]=e[i+t];return r}function o(e){return void 0===e.size&&(e.size=e.__iterate(s)),e.size}function a(e,t){if("number"!=typeof t){var n=+t;if(""+n!==t)return 0/0;t=n}return 0>t?o(e)+t:t}function s(){return!0}function u(e,t,n){return(0===e||void 0!==n&&-n>=e)&&(void 0===t||void 0!==n&&t>=n)}function c(e,t){return p(e,t,0)}function l(e,t){return p(e,t,t)}function p(e,t,n){return void 0===e?n:0>e?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}function h(e){return v(e)?e:x(e)}function d(e){return g(e)?e:P(e)}function f(e){return y(e)?e:N(e)}function m(e){return v(e)&&!_(e)?e:D(e)}function v(e){return!(!e||!e[mr])}function g(e){return!(!e||!e[vr])}function y(e){return!(!e||!e[gr])}function _(e){return g(e)||y(e)}function b(e){return!(!e||!e[yr])}function S(e){this.next=e}function R(e,t,n,r){var i=0===e?t:1===e?n:[t,n];return r?r.value=i:r={value:i,done:!1},r}function E(){return{value:void 0,done:!0}}function T(e){return!!I(e)}function w(e){return e&&"function"==typeof e.next}function C(e){var t=I(e);return t&&t.call(e)}function I(e){var t=e&&(Rr&&e[Rr]||e[Er]);return"function"==typeof t?t:void 0}function O(e){return e&&"number"==typeof e.length}function x(e){return null===e||void 0===e?V():v(e)?e.toSeq():H(e)}function P(e){return null===e||void 0===e?V().toKeyedSeq():v(e)?g(e)?e.toSeq():e.fromEntrySeq():F(e)}function N(e){return null===e||void 0===e?V():v(e)?g(e)?e.entrySeq():e.toIndexedSeq():B(e)}function D(e){return(null===e||void 0===e?V():v(e)?g(e)?e.entrySeq():e:B(e)).toSetSeq()}function M(e){this._array=e,this.size=e.length}function k(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function A(e){this._iterable=e,this.size=e.length||e.size}function L(e){this._iterator=e,this._iteratorCache=[]}function j(e){return!(!e||!e[wr])}function V(){return Cr||(Cr=new M([]))}function F(e){var t=Array.isArray(e)?new M(e).fromEntrySeq():w(e)?new L(e).fromEntrySeq():T(e)?new A(e).fromEntrySeq():"object"==typeof e?new k(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function B(e){var t=U(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function H(e){var t=U(e)||"object"==typeof e&&new k(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}function U(e){return O(e)?new M(e):w(e)?new L(e):T(e)?new A(e):void 0}function q(e,t,n,r){var i=e._cache;if(i){for(var o=i.length-1,a=0;o>=a;a++){var s=i[n?o-a:a];if(t(s[1],r?s[0]:a,e)===!1)return a+1}return a}return e.__iterateUncached(t,n)}function z(e,t,n,r){var i=e._cache;if(i){var o=i.length-1,a=0;return new S(function(){var e=i[n?o-a:a];return a++>o?E():R(t,r?e[0]:a-1,e[1])})}return e.__iteratorUncached(t,n)}function G(){throw TypeError("Abstract")}function W(){}function Y(){}function K(){}function X(e,t){if(e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if(e=e.valueOf(),t=t.valueOf(),e===t||e!==e&&t!==t)return!0;if(!e||!t)return!1}return"function"==typeof e.equals&&"function"==typeof t.equals&&e.equals(t)?!0:!1}function J(e,t){return t?Q(t,e,"",{"":e}):$(e)}function Q(e,t,n,r){return Array.isArray(t)?e.call(r,n,N(t).map(function(n,r){return Q(e,n,r,t)})):Z(t)?e.call(r,n,P(t).map(function(n,r){return Q(e,n,r,t)})):t}function $(e){return Array.isArray(e)?N(e).map($).toList():Z(e)?P(e).map($).toMap():e}function Z(e){return e&&(e.constructor===Object||void 0===e.constructor)}function et(e){return e>>>1&1073741824|3221225471&e}function tt(e){if(e===!1||null===e||void 0===e)return 0;if("function"==typeof e.valueOf&&(e=e.valueOf(),e===!1||null===e||void 0===e))return 0;if(e===!0)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)e/=4294967295,n^=e;return et(n)}return"string"===t?e.length>kr?nt(e):rt(e):"function"==typeof e.hashCode?e.hashCode():it(e)}function nt(e){var t=jr[e];return void 0===t&&(t=rt(e),Lr===Ar&&(Lr=0,jr={}),Lr++,jr[e]=t),t}function rt(e){for(var t=0,n=0;n0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}function at(e,t){if(!e)throw new Error(t)}function st(e){at(1/0!==e,"Cannot perform this action with an infinite size.")}function ut(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function ct(e){this._iter=e,this.size=e.size}function lt(e){this._iter=e,this.size=e.size}function pt(e){this._iter=e,this.size=e.size}function ht(e){var t=Mt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=kt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate(function(e,n){return t(n,e,r)!==!1},n)},t.__iteratorUncached=function(t,n){if(t===Sr){var r=e.__iterator(t,n);return new S(function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(t===br?_r:br,n)},t}function dt(e,t,n){var r=Mt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,i){var o=e.get(r,hr);return o===hr?i:t.call(n,o,r,e)},r.__iterateUncached=function(r,i){var o=this;return e.__iterate(function(e,i,a){return r(t.call(n,e,i,a),i,o)!==!1},i)},r.__iteratorUncached=function(r,i){var o=e.__iterator(Sr,i);return new S(function(){var i=o.next();if(i.done)return i;var a=i.value,s=a[0];return R(r,s,t.call(n,a[1],s,e),i)})},r}function ft(e,t){var n=Mt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=ht(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=kt,n.__iterate=function(t,n){var r=this;return e.__iterate(function(e,n){return t(e,n,r)},!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function mt(e,t,n,r){var i=Mt(e);return r&&(i.has=function(r){var i=e.get(r,hr);return i!==hr&&!!t.call(n,i,r,e)},i.get=function(r,i){var o=e.get(r,hr);return o!==hr&&t.call(n,o,r,e)?o:i}),i.__iterateUncached=function(i,o){var a=this,s=0;return e.__iterate(function(e,o,u){return t.call(n,e,o,u)?(s++,i(e,r?o:s-1,a)):void 0},o),s},i.__iteratorUncached=function(i,o){var a=e.__iterator(Sr,o),s=0;return new S(function(){for(;;){var o=a.next();if(o.done)return o;var u=o.value,c=u[0],l=u[1];if(t.call(n,l,c,e))return R(i,r?c:s++,l,o)}})},i}function vt(e,t,n){var r=jt().asMutable();return e.__iterate(function(i,o){r.update(t.call(n,i,o,e),0,function(e){return e+1})}),r.asImmutable()}function gt(e,t,n){var r=g(e),i=(b(e)?Tn():jt()).asMutable();e.__iterate(function(o,a){i.update(t.call(n,o,a,e),function(e){return e=e||[],e.push(r?[a,o]:o),e})});var o=Dt(e);return i.map(function(t){return xt(e,o(t))})}function yt(e,t,n,r){var i=e.size;if(void 0!==t&&(t=0|t),void 0!==n&&(n=0|n),u(t,n,i))return e;var o=c(t,i),s=l(n,i);if(o!==o||s!==s)return yt(e.toSeq().cacheResult(),t,n,r);var p,h=s-o;h===h&&(p=0>h?0:h);var d=Mt(e);return d.size=0===p?p:e.size&&p||void 0,!r&&j(e)&&p>=0&&(d.get=function(t,n){return t=a(this,t),t>=0&&p>t?e.get(t+o,n):n}),d.__iterateUncached=function(t,n){var i=this;if(0===p)return 0;if(n)return this.cacheResult().__iterate(t,n);var a=0,s=!0,u=0;return e.__iterate(function(e,n){return s&&(s=a++p)return E();var e=i.next();return r||t===br?e:t===_r?R(t,s-1,void 0,e):R(t,s-1,e.value[1],e)})},d}function _t(e,t,n){var r=Mt(e);return r.__iterateUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterate(r,i);var a=0;return e.__iterate(function(e,i,s){return t.call(n,e,i,s)&&++a&&r(e,i,o)}),a},r.__iteratorUncached=function(r,i){var o=this;if(i)return this.cacheResult().__iterator(r,i);var a=e.__iterator(Sr,i),s=!0;return new S(function(){if(!s)return E();var e=a.next();if(e.done)return e;var i=e.value,u=i[0],c=i[1];return t.call(n,c,u,o)?r===Sr?e:R(r,u,c,e):(s=!1,E())})},r}function bt(e,t,n,r){var i=Mt(e);return i.__iterateUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterate(i,o);var s=!0,u=0;return e.__iterate(function(e,o,c){return s&&(s=t.call(n,e,o,c))?void 0:(u++,i(e,r?o:u-1,a))}),u},i.__iteratorUncached=function(i,o){var a=this;if(o)return this.cacheResult().__iterator(i,o);var s=e.__iterator(Sr,o),u=!0,c=0;return new S(function(){var e,o,l;do{if(e=s.next(),e.done)return r||i===br?e:i===_r?R(i,c++,void 0,e):R(i,c++,e.value[1],e);var p=e.value;o=p[0],l=p[1],u&&(u=t.call(n,l,o,a))}while(u);return i===Sr?e:R(i,o,l,e)})},i}function St(e,t){var n=g(e),r=[e].concat(t).map(function(e){return v(e)?n&&(e=d(e)):e=n?F(e):B(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===r.length)return e;if(1===r.length){var i=r[0];if(i===e||n&&g(i)||y(e)&&y(i))return i}var o=new M(r);return n?o=o.toKeyedSeq():y(e)||(o=o.toSetSeq()),o=o.flatten(!0),o.size=r.reduce(function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}},0),o}function Rt(e,t,n){var r=Mt(e);return r.__iterateUncached=function(r,i){function o(e,u){var c=this;e.__iterate(function(e,i){return(!t||t>u)&&v(e)?o(e,u+1):r(e,n?i:a++,c)===!1&&(s=!0),!s},i)}var a=0,s=!1;return o(e,0),a},r.__iteratorUncached=function(r,i){var o=e.__iterator(r,i),a=[],s=0;return new S(function(){for(;o;){var e=o.next();if(e.done===!1){var u=e.value;if(r===Sr&&(u=u[1]),t&&!(a.length0}function Ot(e,t,n){var r=Mt(e);return r.size=new M(n).map(function(e){return e.size}).min(),r.__iterate=function(e,t){for(var n,r=this.__iterator(br,t),i=0;!(n=r.next()).done&&e(n.value,i++,this)!==!1;);return i},r.__iteratorUncached=function(e,r){var i=n.map(function(e){return e=h(e),C(r?e.reverse():e)}),o=0,a=!1;return new S(function(){var n;return a||(n=i.map(function(e){return e.next()}),a=n.some(function(e){return e.done})),a?E():R(e,o++,t.apply(null,n.map(function(e){return e.value})))})},r}function xt(e,t){return j(e)?t:e.constructor(t)}function Pt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Nt(e){return st(e.size),o(e)}function Dt(e){return g(e)?d:y(e)?f:m}function Mt(e){return Object.create((g(e)?P:y(e)?N:D).prototype)}function kt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):x.prototype.cacheResult.call(this)}function At(e,t){return e>t?1:t>e?-1:0}function Lt(e){var t=C(e);if(!t){if(!O(e))throw new TypeError("Expected iterable or array-like: "+e);t=C(h(e))}return t}function jt(e){return null===e||void 0===e?Kt():Vt(e)&&!b(e)?e:Kt().withMutations(function(t){var n=d(e);st(n.size),n.forEach(function(e,n){return t.set(n,e)})})}function Vt(e){return!(!e||!e[Vr])}function Ft(e,t){this.ownerID=e,this.entries=t}function Bt(e,t,n){this.ownerID=e,this.bitmap=t,this.nodes=n}function Ht(e,t,n){this.ownerID=e,this.count=t,this.nodes=n}function Ut(e,t,n){this.ownerID=e,this.keyHash=t,this.entries=n}function qt(e,t,n){this.ownerID=e,this.keyHash=t,this.entry=n}function zt(e,t,n){this._type=t,this._reverse=n,this._stack=e._root&&Wt(e._root)}function Gt(e,t){return R(e,t[0],t[1])}function Wt(e,t){return{node:e,index:0,__prev:t}}function Yt(e,t,n,r){var i=Object.create(Fr);return i.size=e,i._root=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Kt(){return Br||(Br=Yt(0))}function Xt(e,n,r){var i,o;if(e._root){var a=t(dr),s=t(fr);if(i=Jt(e._root,e.__ownerID,0,void 0,n,r,a,s),!s.value)return e;o=e.size+(a.value?r===hr?-1:1:0)}else{if(r===hr)return e;o=1,i=new Ft(e.__ownerID,[[n,r]])}return e.__ownerID?(e.size=o,e._root=i,e.__hash=void 0,e.__altered=!0,e):i?Yt(o,i):Kt()}function Jt(e,t,r,i,o,a,s,u){return e?e.update(t,r,i,o,a,s,u):a===hr?e:(n(u),n(s),new qt(t,i,[o,a]))}function Qt(e){return e.constructor===qt||e.constructor===Ut}function $t(e,t,n,r,i){if(e.keyHash===r)return new Ut(t,r,[e.entry,i]);var o,a=(0===n?e.keyHash:e.keyHash>>>n)&pr,s=(0===n?r:r>>>n)&pr,u=a===s?[$t(e,t,n+cr,r,i)]:(o=new qt(t,r,i),s>a?[e,o]:[o,e]);return new Bt(t,1<s;s++,u<<=1){var l=t[s];void 0!==l&&s!==r&&(i|=u,a[o++]=l)}return new Bt(e,i,a)}function tn(e,t,n,r,i){for(var o=0,a=new Array(lr),s=0;0!==n;s++,n>>>=1)a[s]=1&n?t[o++]:void 0;return a[r]=i,new Ht(e,o+1,a)}function nn(e,t,n){for(var r=[],i=0;i>1&1431655765,e=(858993459&e)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,127&e}function un(e,t,n,r){var o=r?e:i(e);return o[t]=n,o}function cn(e,t,n,r){var i=e.length+1;if(r&&t+1===i)return e[t]=n,e;for(var o=new Array(i),a=0,s=0;i>s;s++)s===t?(o[s]=n,a=-1):o[s]=e[s+a];return o}function ln(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var i=new Array(r),o=0,a=0;r>a;a++)a===t&&(o=1),i[a]=e[a+o];return i}function pn(e){var t=vn();if(null===e||void 0===e)return t;if(hn(e))return e;var n=f(e),r=n.size;return 0===r?t:(st(r),r>0&&lr>r?mn(0,r,cr,null,new dn(n.toArray())):t.withMutations(function(e){e.setSize(r),n.forEach(function(t,n){return e.set(n,t)})}))}function hn(e){return!(!e||!e[zr])}function dn(e,t){this.array=e,this.ownerID=t}function fn(e,t){function n(e,t,n){return 0===t?r(e,n):i(e,t,n)}function r(e,n){var r=n===s?u&&u.array:e&&e.array,i=n>o?0:o-n,c=a-n;return c>lr&&(c=lr),function(){if(i===c)return Yr;var e=t?--c:i++;return r&&r[e]}}function i(e,r,i){var s,u=e&&e.array,c=i>o?0:o-i>>r,l=(a-i>>r)+1;return l>lr&&(l=lr),function(){for(;;){if(s){var e=s();if(e!==Yr)return e;s=null}if(c===l)return Yr;var o=t?--l:c++;s=n(u&&u[o],r-cr,i+(o<=e.size||0>n)return e.withMutations(function(e){0>n?Sn(e,n).set(0,r):Sn(e,0,n+1).set(n,r)});n+=e._origin;var i=e._tail,o=e._root,s=t(fr);return n>=En(e._capacity)?i=yn(i,e.__ownerID,0,n,r,s):o=yn(o,e.__ownerID,e._level,n,r,s),s.value?e.__ownerID?(e._root=o,e._tail=i,e.__hash=void 0,e.__altered=!0,e):mn(e._origin,e._capacity,e._level,o,i):e}function yn(e,t,r,i,o,a){var s=i>>>r&pr,u=e&&s0){var l=e&&e.array[s],p=yn(l,t,r-cr,i,o,a);return p===l?e:(c=_n(e,t),c.array[s]=p,c)}return u&&e.array[s]===o?e:(n(a),c=_n(e,t),void 0===o&&s===c.array.length-1?c.array.pop():c.array[s]=o,c)}function _n(e,t){return t&&e&&t===e.ownerID?e:new dn(e?e.array.slice():[],t)}function bn(e,t){if(t>=En(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&pr],r-=cr;return n}}function Sn(e,t,n){void 0!==t&&(t=0|t),void 0!==n&&(n=0|n);var i=e.__ownerID||new r,o=e._origin,a=e._capacity,s=o+t,u=void 0===n?a:0>n?a+n:o+n;if(s===o&&u===a)return e;if(s>=u)return e.clear();for(var c=e._level,l=e._root,p=0;0>s+p;)l=new dn(l&&l.array.length?[void 0,l]:[],i),c+=cr,p+=1<=1<d?bn(e,u-1):d>h?new dn([],i):f;if(f&&d>h&&a>s&&f.array.length){l=_n(l,i);for(var v=l,g=c;g>cr;g-=cr){var y=h>>>g≺v=v.array[y]=_n(v.array[y],i)}v.array[h>>>cr&pr]=f}if(a>u&&(m=m&&m.removeAfter(i,0,u)),s>=d)s-=d,u-=d,c=cr,l=null,m=m&&m.removeBefore(i,0,s);else if(s>o||h>d){for(p=0;l;){var _=s>>>c≺if(_!==d>>>c&pr)break;_&&(p+=(1<o&&(l=l.removeBefore(i,c,s-p)),l&&h>d&&(l=l.removeAfter(i,c,d-p)),p&&(s-=p,u-=p)}return e.__ownerID?(e.size=u-s,e._origin=s,e._capacity=u,e._level=c,e._root=l,e._tail=m,e.__hash=void 0,e.__altered=!0,e):mn(s,u,c,l,m)}function Rn(e,t,n){for(var r=[],i=0,o=0;oi&&(i=s.size),v(a)||(s=s.map(function(e){return J(e)})),r.push(s)}return i>e.size&&(e=e.setSize(i)),on(e,t,r)}function En(e){return lr>e?0:e-1>>>cr<=lr&&a.size>=2*o.size?(i=a.filter(function(e,t){return void 0!==e&&s!==t}),r=i.toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(r.__ownerID=i.__ownerID=e.__ownerID)):(r=o.remove(t),i=s===a.size-1?a.pop():a.set(s,void 0))}else if(u){if(n===a.get(s)[1])return e;r=o,i=a.set(s,[t,n])}else r=o.set(t,a.size),i=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=i,e.__hash=void 0,e):Cn(r,i)}function xn(e){return null===e||void 0===e?Dn():Pn(e)?e:Dn().unshiftAll(e)}function Pn(e){return!(!e||!e[Xr])}function Nn(e,t,n,r){var i=Object.create(Jr);return i.size=e,i._head=t,i.__ownerID=n,i.__hash=r,i.__altered=!1,i}function Dn(){return Qr||(Qr=Nn(0))}function Mn(e){return null===e||void 0===e?jn():kn(e)&&!b(e)?e:jn().withMutations(function(t){var n=m(e);st(n.size),n.forEach(function(e){return t.add(e)})})}function kn(e){return!(!e||!e[$r])}function An(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function Ln(e,t){var n=Object.create(Zr);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function jn(){return ei||(ei=Ln(Kt()))}function Vn(e){return null===e||void 0===e?Hn():Fn(e)?e:Hn().withMutations(function(t){var n=m(e);st(n.size),n.forEach(function(e){return t.add(e)})})}function Fn(e){return kn(e)&&b(e)}function Bn(e,t){var n=Object.create(ti);return n.size=e?e.size:0,n._map=e,n.__ownerID=t,n}function Hn(){return ni||(ni=Bn(In()))}function Un(e,t){var n,r=function(o){if(o instanceof r)return o;if(!(this instanceof r))return new r(o);if(!n){n=!0;var a=Object.keys(e);Gn(i,a),i.size=a.length,i._name=t,i._keys=a,i._defaultValues=e}this._map=jt(o)},i=r.prototype=Object.create(ri);return i.constructor=r,r}function qn(e,t,n){var r=Object.create(Object.getPrototypeOf(e));return r._map=t,r.__ownerID=n,r}function zn(e){return e._name||e.constructor.name||"Record"}function Gn(e,t){try{t.forEach(Wn.bind(void 0,e))}catch(n){}}function Wn(e,t){Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){at(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}function Yn(e,t){if(e===t)return!0;if(!v(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||g(e)!==g(t)||y(e)!==y(t)||b(e)!==b(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!_(e);if(b(e)){var r=e.entries();return t.every(function(e,t){var i=r.next().value;return i&&X(i[1],e)&&(n||X(i[0],t))})&&r.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var o=e;e=t,t=o}var a=!0,s=t.__iterate(function(t,r){return(n?e.has(t):i?X(t,e.get(r,hr)):X(e.get(r,hr),t))?void 0:(a=!1,!1)});return a&&e.size===s}function Kn(e,t,n){if(!(this instanceof Kn))return new Kn(e,t,n);if(at(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),e>t&&(n=-n),this._start=e,this._end=t,this._step=n,this.size=Math.max(0,Math.ceil((t-e)/n-1)+1),0===this.size){if(ii)return ii;ii=this}}function Xn(e,t){if(!(this instanceof Xn))return new Xn(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(oi)return oi;oi=this}}function Jn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}function Qn(e,t){return t}function $n(e,t){return[t,e]}function Zn(e){return function(){return!e.apply(this,arguments)}}function er(e){return function(){return-e.apply(this,arguments)}}function tr(e){return"string"==typeof e?JSON.stringify(e):e}function nr(){return i(arguments)}function rr(e,t){return t>e?1:e>t?-1:0}function ir(e){if(1/0===e.size)return 0;var t=b(e),n=g(e),r=t?1:0,i=e.__iterate(n?t?function(e,t){r=31*r+ar(tt(e),tt(t))|0}:function(e,t){r=r+ar(tt(e),tt(t))|0}:t?function(e){r=31*r+tt(e)|0}:function(e){r=r+tt(e)|0});return or(i,r)}function or(e,t){return t=Or(t,3432918353),t=Or(t<<15|t>>>-15,461845907),t=Or(t<<13|t>>>-13,5),t=(t+3864292196|0)^e,t=Or(t^t>>>16,2246822507),t=Or(t^t>>>13,3266489909),t=et(t^t>>>16)}function ar(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}var sr=Array.prototype.slice,ur="delete",cr=5,lr=1<=i;i++)if(e(n[t?r-i:i],i,this)===!1)return i+1;return i},M.prototype.__iterator=function(e,t){var n=this._array,r=n.length-1,i=0;return new S(function(){return i>r?E():R(e,i,n[t?r-i++:i++])})},e(k,P),k.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},k.prototype.has=function(e){return this._object.hasOwnProperty(e)},k.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,i=r.length-1,o=0;i>=o;o++){var a=r[t?i-o:o];if(e(n[a],a,this)===!1)return o+1}return o},k.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,i=r.length-1,o=0;return new S(function(){var a=r[t?i-o:o];return o++>i?E():R(e,a,n[a])})},k.prototype[yr]=!0,e(A,N),A.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=this._iterable,r=C(n),i=0;if(w(r))for(var o;!(o=r.next()).done&&e(o.value,i++,this)!==!1;);return i},A.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=this._iterable,r=C(n);if(!w(r))return new S(E);var i=0;return new S(function(){var t=r.next();return t.done?t:R(e,i++,t.value)})},e(L,N),L.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n=this._iterator,r=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[i]=t.value}return R(e,i,r[i++])})};var Cr;e(G,h),e(W,G),e(Y,G),e(K,G),G.Keyed=W,G.Indexed=Y,G.Set=K;var Ir,Or="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){e=0|e,t=0|t;var n=65535&e,r=65535&t;return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0},xr=Object.isExtensible,Pr=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}(),Nr="function"==typeof WeakMap;Nr&&(Ir=new WeakMap);var Dr=0,Mr="__immutablehash__";"function"==typeof Symbol&&(Mr=Symbol(Mr));var kr=16,Ar=255,Lr=0,jr={};e(ut,P),ut.prototype.get=function(e,t){return this._iter.get(e,t)},ut.prototype.has=function(e){return this._iter.has(e)},ut.prototype.valueSeq=function(){return this._iter.valueSeq()},ut.prototype.reverse=function(){var e=this,t=ft(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},ut.prototype.map=function(e,t){var n=this,r=dt(this,e,t);return this._useKeys||(r.valueSeq=function(){return n._iter.toSeq().map(e,t)}),r},ut.prototype.__iterate=function(e,t){var n,r=this;return this._iter.__iterate(this._useKeys?function(t,n){return e(t,n,r)}:(n=t?Nt(this):0,function(i){return e(i,t?--n:n++,r)}),t)},ut.prototype.__iterator=function(e,t){if(this._useKeys)return this._iter.__iterator(e,t);var n=this._iter.__iterator(br,t),r=t?Nt(this):0;return new S(function(){var i=n.next();return i.done?i:R(e,t?--r:r++,i.value,i)})},ut.prototype[yr]=!0,e(ct,N),ct.prototype.includes=function(e){return this._iter.includes(e)},ct.prototype.__iterate=function(e,t){var n=this,r=0;return this._iter.__iterate(function(t){return e(t,r++,n)},t)},ct.prototype.__iterator=function(e,t){var n=this._iter.__iterator(br,t),r=0;return new S(function(){var t=n.next();return t.done?t:R(e,r++,t.value,t)})},e(lt,D),lt.prototype.has=function(e){return this._iter.includes(e)},lt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){return e(t,t,n)},t)},lt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(br,t);return new S(function(){var t=n.next();return t.done?t:R(e,t.value,t.value,t)})},e(pt,P),pt.prototype.entrySeq=function(){return this._iter.toSeq()},pt.prototype.__iterate=function(e,t){var n=this;return this._iter.__iterate(function(t){if(t){Pt(t);var r=v(t);return e(r?t.get(1):t[1],r?t.get(0):t[0],n)}},t)},pt.prototype.__iterator=function(e,t){var n=this._iter.__iterator(br,t);return new S(function(){for(;;){var t=n.next();if(t.done)return t;var r=t.value;if(r){Pt(r);var i=v(r);return R(e,i?r.get(0):r[0],i?r.get(1):r[1],t)}}})},ct.prototype.cacheResult=ut.prototype.cacheResult=lt.prototype.cacheResult=pt.prototype.cacheResult=kt,e(jt,W),jt.prototype.toString=function(){return this.__toString("Map {","}")},jt.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},jt.prototype.set=function(e,t){return Xt(this,e,t)},jt.prototype.setIn=function(e,t){return this.updateIn(e,hr,function(){return t})},jt.prototype.remove=function(e){return Xt(this,e,hr)},jt.prototype.deleteIn=function(e){return this.updateIn(e,function(){return hr})},jt.prototype.update=function(e,t,n){return 1===arguments.length?e(this):this.updateIn([e],t,n)},jt.prototype.updateIn=function(e,t,n){n||(n=t,t=void 0);var r=an(this,Lt(e),t,n);return r===hr?void 0:r},jt.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Kt()},jt.prototype.merge=function(){return nn(this,void 0,arguments)},jt.prototype.mergeWith=function(e){var t=sr.call(arguments,1);return nn(this,e,t)},jt.prototype.mergeIn=function(e){var t=sr.call(arguments,1);return this.updateIn(e,Kt(),function(e){return"function"==typeof e.merge?e.merge.apply(e,t):t[t.length-1]})},jt.prototype.mergeDeep=function(){return nn(this,rn(void 0),arguments)},jt.prototype.mergeDeepWith=function(e){var t=sr.call(arguments,1);return nn(this,rn(e),t)},jt.prototype.mergeDeepIn=function(e){var t=sr.call(arguments,1);return this.updateIn(e,Kt(),function(e){return"function"==typeof e.mergeDeep?e.mergeDeep.apply(e,t):t[t.length-1]})},jt.prototype.sort=function(e){return Tn(wt(this,e))},jt.prototype.sortBy=function(e,t){return Tn(wt(this,t,e))},jt.prototype.withMutations=function(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this},jt.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new r)},jt.prototype.asImmutable=function(){return this.__ensureOwner()},jt.prototype.wasAltered=function(){return this.__altered},jt.prototype.__iterator=function(e,t){return new zt(this,e,t)},jt.prototype.__iterate=function(e,t){var n=this,r=0;return this._root&&this._root.iterate(function(t){return r++,e(t[1],t[0],n)},t),r},jt.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Yt(this.size,this._root,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},jt.isMap=Vt;var Vr="@@__IMMUTABLE_MAP__@@",Fr=jt.prototype;Fr[Vr]=!0,Fr[ur]=Fr.remove,Fr.removeIn=Fr.deleteIn,Ft.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(X(n,i[o][0]))return i[o][1];return r},Ft.prototype.update=function(e,t,r,o,a,s,u){for(var c=a===hr,l=this.entries,p=0,h=l.length;h>p&&!X(o,l[p][0]);p++);var d=h>p;if(d?l[p][1]===a:c)return this;if(n(u),(c||!d)&&n(s),!c||1!==l.length){if(!d&&!c&&l.length>=Hr)return Zt(e,l,o,a);var f=e&&e===this.ownerID,m=f?l:i(l);return d?c?p===h-1?m.pop():m[p]=m.pop():m[p]=[o,a]:m.push([o,a]),f?(this.entries=m,this):new Ft(e,m)}},Bt.prototype.get=function(e,t,n,r){void 0===t&&(t=tt(n));var i=1<<((0===e?t:t>>>e)&pr),o=this.bitmap;return 0===(o&i)?r:this.nodes[sn(o&i-1)].get(e+cr,t,n,r)},Bt.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=tt(r));var s=(0===t?n:n>>>t)&pr,u=1<=Ur)return tn(e,h,c,s,f);if(l&&!f&&2===h.length&&Qt(h[1^p]))return h[1^p];if(l&&f&&1===h.length&&Qt(f))return f;var m=e&&e===this.ownerID,v=l?f?c:c^u:c|u,g=l?f?un(h,p,f,m):ln(h,p,m):cn(h,p,f,m);return m?(this.bitmap=v,this.nodes=g,this):new Bt(e,v,g)},Ht.prototype.get=function(e,t,n,r){void 0===t&&(t=tt(n));var i=(0===e?t:t>>>e)&pr,o=this.nodes[i];return o?o.get(e+cr,t,n,r):r},Ht.prototype.update=function(e,t,n,r,i,o,a){void 0===n&&(n=tt(r));var s=(0===t?n:n>>>t)&pr,u=i===hr,c=this.nodes,l=c[s];if(u&&!l)return this;var p=Jt(l,e,t+cr,n,r,i,o,a);if(p===l)return this;var h=this.count;if(l){if(!p&&(h--,qr>h))return en(e,c,h,s)}else h++;var d=e&&e===this.ownerID,f=un(c,s,p,d);return d?(this.count=h,this.nodes=f,this):new Ht(e,h,f)},Ut.prototype.get=function(e,t,n,r){for(var i=this.entries,o=0,a=i.length;a>o;o++)if(X(n,i[o][0]))return i[o][1];return r},Ut.prototype.update=function(e,t,r,o,a,s,u){void 0===r&&(r=tt(o));var c=a===hr;if(r!==this.keyHash)return c?this:(n(u),n(s),$t(this,e,t,r,[o,a]));for(var l=this.entries,p=0,h=l.length;h>p&&!X(o,l[p][0]);p++);var d=h>p;if(d?l[p][1]===a:c)return this;if(n(u),(c||!d)&&n(s),c&&2===h)return new qt(e,this.keyHash,l[1^p]);var f=e&&e===this.ownerID,m=f?l:i(l);return d?c?p===h-1?m.pop():m[p]=m.pop():m[p]=[o,a]:m.push([o,a]),f?(this.entries=m,this):new Ut(e,this.keyHash,m)},qt.prototype.get=function(e,t,n,r){return X(n,this.entry[0])?this.entry[1]:r},qt.prototype.update=function(e,t,r,i,o,a,s){var u=o===hr,c=X(i,this.entry[0]);return(c?o===this.entry[1]:u)?this:(n(s),u?void n(a):c?e&&e===this.ownerID?(this.entry[1]=o,this):new qt(e,this.keyHash,[i,o]):(n(a),$t(this,e,t,tt(i),[i,o])))},Ft.prototype.iterate=Ut.prototype.iterate=function(e,t){for(var n=this.entries,r=0,i=n.length-1;i>=r;r++)if(e(n[t?i-r:r])===!1)return!1},Bt.prototype.iterate=Ht.prototype.iterate=function(e,t){for(var n=this.nodes,r=0,i=n.length-1;i>=r;r++){var o=n[t?i-r:r];if(o&&o.iterate(e,t)===!1)return!1}},qt.prototype.iterate=function(e){return e(this.entry)},e(zt,S),zt.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var n,r=t.node,i=t.index++;if(r.entry){if(0===i)return Gt(e,r.entry)}else if(r.entries){if(n=r.entries.length-1,n>=i)return Gt(e,r.entries[this._reverse?n-i:i])}else if(n=r.nodes.length-1,n>=i){var o=r.nodes[this._reverse?n-i:i];if(o){if(o.entry)return Gt(e,o.entry);t=this._stack=Wt(o,t)}continue}t=this._stack=this._stack.__prev}return E()};var Br,Hr=lr/4,Ur=lr/2,qr=lr/4;e(pn,Y),pn.of=function(){return this(arguments)},pn.prototype.toString=function(){return this.__toString("List [","]")},pn.prototype.get=function(e,t){if(e=a(this,e),e>=0&&e>>t≺if(r>=this.array.length)return new dn([],e);var i,o=0===r;if(t>0){var a=this.array[r];if(i=a&&a.removeBefore(e,t-cr,n),i===a&&o)return this}if(o&&!i)return this;var s=_n(this,e);if(!o)for(var u=0;r>u;u++)s.array[u]=void 0;return i&&(s.array[r]=i),s},dn.prototype.removeAfter=function(e,t,n){if(n===(t?1<>>t≺if(r>=this.array.length)return this;var i;if(t>0){var o=this.array[r];if(i=o&&o.removeAfter(e,t-cr,n),i===o&&r===this.array.length-1)return this}var a=_n(this,e);return a.array.splice(r+1),i&&(a.array[r]=i),a};var Wr,Yr={};e(Tn,jt),Tn.of=function(){return this(arguments)},Tn.prototype.toString=function(){return this.__toString("OrderedMap {","}")},Tn.prototype.get=function(e,t){var n=this._map.get(e);return void 0!==n?this._list.get(n)[1]:t},Tn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this):In()},Tn.prototype.set=function(e,t){return On(this,e,t)},Tn.prototype.remove=function(e){return On(this,e,hr)},Tn.prototype.wasAltered=function(){return this._map.wasAltered()||this._list.wasAltered()},Tn.prototype.__iterate=function(e,t){var n=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],n)},t)},Tn.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},Tn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),n=this._list.__ensureOwner(e);return e?Cn(t,n,e,this.__hash):(this.__ownerID=e,this._map=t,this._list=n,this)},Tn.isOrderedMap=wn,Tn.prototype[yr]=!0,Tn.prototype[ur]=Tn.prototype.remove;var Kr;e(xn,Y),xn.of=function(){return this(arguments)},xn.prototype.toString=function(){return this.__toString("Stack [","]")},xn.prototype.get=function(e,t){var n=this._head;for(e=a(this,e);n&&e--;)n=n.next;return n?n.value:t},xn.prototype.peek=function(){return this._head&&this._head.value},xn.prototype.push=function(){if(0===arguments.length)return this;for(var e=this.size+arguments.length,t=this._head,n=arguments.length-1;n>=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):Nn(e,t)},xn.prototype.pushAll=function(e){if(e=f(e),0===e.size)return this;st(e.size);var t=this.size,n=this._head;return e.reverse().forEach(function(e){t++,n={value:e,next:n}}),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):Nn(t,n)},xn.prototype.pop=function(){return this.slice(1)},xn.prototype.unshift=function(){return this.push.apply(this,arguments)},xn.prototype.unshiftAll=function(e){return this.pushAll(e)},xn.prototype.shift=function(){return this.pop.apply(this,arguments)},xn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dn()},xn.prototype.slice=function(e,t){if(u(e,t,this.size))return this;var n=c(e,this.size),r=l(t,this.size);if(r!==this.size)return Y.prototype.slice.call(this,e,t);for(var i=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=i,this._head=o,this.__hash=void 0,this.__altered=!0,this):Nn(i,o)},xn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Nn(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},xn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&e(r.value,n++,this)!==!1;)r=r.next;return n},xn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new S(function(){if(r){var t=r.value;return r=r.next,R(e,n++,t)}return E()})},xn.isStack=Pn;var Xr="@@__IMMUTABLE_STACK__@@",Jr=xn.prototype;Jr[Xr]=!0,Jr.withMutations=Fr.withMutations,Jr.asMutable=Fr.asMutable,Jr.asImmutable=Fr.asImmutable,Jr.wasAltered=Fr.wasAltered;var Qr;e(Mn,K),Mn.of=function(){return this(arguments)},Mn.fromKeys=function(e){return this(d(e).keySeq())},Mn.prototype.toString=function(){return this.__toString("Set {","}")},Mn.prototype.has=function(e){return this._map.has(e)},Mn.prototype.add=function(e){return An(this,this._map.set(e,!0))},Mn.prototype.remove=function(e){return An(this,this._map.remove(e))},Mn.prototype.clear=function(){return An(this,this._map.clear())},Mn.prototype.union=function(){var e=sr.call(arguments,0);return e=e.filter(function(e){return 0!==e.size}),0===e.length?this:0!==this.size||this.__ownerID||1!==e.length?this.withMutations(function(t){for(var n=0;n1?" by "+this._step:"")+" ]"},Kn.prototype.get=function(e,t){return this.has(e)?this._start+a(this,e)*this._step:t},Kn.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t=t?new Kn(0,0):new Kn(this.get(e,this._end),this.get(t,this._end),this._step))},Kn.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var n=t/this._step;if(n>=0&&n=o;o++){if(e(i,o,this)===!1)return o+1;i+=t?-r:r}return o},Kn.prototype.__iterator=function(e,t){var n=this.size-1,r=this._step,i=t?this._start+n*r:this._start,o=0;return new S(function(){var a=i;return i+=t?-r:r,o>n?E():R(e,o++,a)})},Kn.prototype.equals=function(e){return e instanceof Kn?this._start===e._start&&this._end===e._end&&this._step===e._step:Yn(this,e)};var ii;e(Xn,N),Xn.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Xn.prototype.get=function(e,t){return this.has(e)?this._value:t},Xn.prototype.includes=function(e){return X(this._value,e)},Xn.prototype.slice=function(e,t){var n=this.size;return u(e,t,n)?this:new Xn(this._value,l(t,n)-c(e,n))},Xn.prototype.reverse=function(){return this},Xn.prototype.indexOf=function(e){return X(this._value,e)?0:-1},Xn.prototype.lastIndexOf=function(e){return X(this._value,e)?this.size:-1},Xn.prototype.__iterate=function(e){for(var t=0;te?this.count():this.size);var r=this.slice(0,e);return xt(this,1===n?r:r.concat(i(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return xt(this,Rt(this,e,!1))},get:function(e,t){return e=a(this,e),0>e||1/0===this.size||void 0!==this.size&&e>this.size?t:this.find(function(t,n){return n===e},void 0,t)},has:function(e){return e=a(this,e),e>=0&&(void 0!==this.size?1/0===this.size||en?e:1-e,s=t-n,u=t-r;o=s>0&&0===u||u>0&&0===s?i.Interpolators.RightToCenter:0>s&&0===u||0>u&&0===s?i.Interpolators.CenterToLeft:s===u?i.Interpolators.RightToCenter:i.Interpolators.RightToLeft,c.forEach(function(e){var n=this._components[e].get(this.props.navState.routeStack[t]),r=this._getReusableProps(e,t);n&&o[e](r.style,a)&&n.setNativeProps(r)},this)},updateProgress:function(e,t,n){for(var r=Math.max(t,n),i=Math.min(t,n),o=i;r>=o;o++)this._updateIndexProgress(e,o,t,n)},render:function(){var e=this.props.navState,t=c.map(function(t){return e.routeStack.map(this._getComponent.bind(this,t))},this);return r.createElement(a,{style:[h.navBarContainer,this.props.style]},t)},_getComponent:function(e,t,n){var o=this;if(this._descriptors[e].includes(t))return this._descriptors[e].get(t);var s=null,u=this.props.routeMapper[e](this.props.navState.routeStack[n],this.props.navigator,n,this.props.navState);if(!u)return null;var c=n===l(this.props.navState)?i.Stages.Center:i.Stages.Left;return s=r.createElement(a,{ref:function(n){o._components[e]=o._components[e].set(t,n)},style:c[e]},u),this._descriptors[e]=this._descriptors[e].set(t,s),s}}),h=o.create({navBarContainer:{position:"absolute",height:i.General.TotalNavHeight,top:0,left:0,right:0,backgroundColor:"transparent"}});n.exports=p}),__d("NavigatorSceneConfigs",["Dimensions","PixelRatio","buildStyleInterpolator"],function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;tt&&(a+=i&&n?u.currentPageX:i&&!n?u.currentPageY:!i&&n?u.previousPageX:u.previousPageY,s=1);else for(var c=0;c=t){var p;p=i&&n?l.currentPageX:i&&!n?l.currentPageY:!i&&n?l.previousPageX:l.previousPageY,a+=p,s++}}return s>0?a/s:r.noCentroid},currentCentroidXOfTouchesChangedAfter:function(e,t){return r.centroidDimension(e,t,!0,!0)},currentCentroidYOfTouchesChangedAfter:function(e,t){return r.centroidDimension(e,t,!1,!0)},previousCentroidXOfTouchesChangedAfter:function(e,t){return r.centroidDimension(e,t,!0,!1)},previousCentroidYOfTouchesChangedAfter:function(e,t){return r.centroidDimension(e,t,!1,!1)},currentCentroidX:function(e){return r.centroidDimension(e,0,!0,!0)},currentCentroidY:function(e){return r.centroidDimension(e,0,!1,!0)},noCentroid:-1};n.exports=r}),__d("clamp",[],function(e,t,n){function r(e,t,n){return e>t?e:t>n?n:t}n.exports=r}),__d("rebound/rebound.js",[],function(e,t,n,r){!function(){function e(e,t){var n=e.indexOf(t);-1!=n&&e.splice(n,1)}var t={},n=t.util={},i=Array.prototype.concat,o=Array.prototype.slice;n.bind=function(e,t){var n=o.call(arguments,2);return function(){e.apply(t,i.call(n,o.call(arguments)))}},n.extend=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};var a=t.SpringSystem=function(e){this._springRegistry={},this._activeSprings=[],this.listeners=[],this._idleSpringIndices=[],this.looper=e||new l,this.looper.springSystem=this};n.extend(a.prototype,{_springRegistry:null,_isIdle:!0,_lastTimeMillis:-1,_activeSprings:null,listeners:null,_idleSpringIndices:null,setLooper:function(e){this.looper=e,e.springSystem=this},createSpring:function(e,t){var n;return n=void 0===e||void 0===t?c.DEFAULT_ORIGAMI_SPRING_CONFIG:c.fromOrigamiTensionAndFriction(e,t),this.createSpringWithConfig(n)},createSpringWithBouncinessAndSpeed:function(e,t){var n;return n=void 0===e||void 0===t?c.DEFAULT_ORIGAMI_SPRING_CONFIG:c.fromBouncinessAndSpeed(e,t),this.createSpringWithConfig(n)},createSpringWithConfig:function(e){var t=new s(this);return this.registerSpring(t),t.setSpringConfig(e),t},getIsIdle:function(){return this._isIdle},getSpringById:function(e){return this._springRegistry[e]},getAllSprings:function(){var e=[];for(var t in this._springRegistry)this._springRegistry.hasOwnProperty(t)&&e.push(this._springRegistry[t]);return e},registerSpring:function(e){this._springRegistry[e.getId()]=e},deregisterSpring:function(t){e(this._activeSprings,t),delete this._springRegistry[t.getId()]},advance:function(e,t){for(;this._idleSpringIndices.length>0;)this._idleSpringIndices.pop();for(var n=0,r=this._activeSprings.length;r>n;n++){var i=this._activeSprings[n];i.systemShouldAdvance()?i.advance(e/1e3,t/1e3):this._idleSpringIndices.push(this._activeSprings.indexOf(i))}for(;this._idleSpringIndices.length>0;){var o=this._idleSpringIndices.pop();o>=0&&this._activeSprings.splice(o,1)}},loop:function(e){var t;-1===this._lastTimeMillis&&(this._lastTimeMillis=e-1);var n=e-this._lastTimeMillis;this._lastTimeMillis=e;var r=0,i=this.listeners.length;for(r=0;i>r;r++)t=this.listeners[r],t.onBeforeIntegrate&&t.onBeforeIntegrate(this);for(this.advance(e,n),0===this._activeSprings.length&&(this._isIdle=!0,this._lastTimeMillis=-1),r=0;i>r;r++)t=this.listeners[r],t.onAfterIntegrate&&t.onAfterIntegrate(this);this._isIdle||this.looper.run()},activateSpring:function(e){var t=this._springRegistry[e];-1==this._activeSprings.indexOf(t)&&this._activeSprings.push(t),this.getIsIdle()&&(this._isIdle=!1,this.looper.run())},addListener:function(e){this.listeners.push(e)},removeListener:function(t){e(this.listeners,t)},removeAllListeners:function(){this.listeners=[]}});var s=t.Spring=function v(e){this._id="s"+v._ID++,this._springSystem=e,this.listeners=[],this._currentState=new u,this._previousState=new u,this._tempState=new u};n.extend(s,{_ID:0,MAX_DELTA_TIME_SEC:.064,SOLVER_TIMESTEP_SEC:.001}),n.extend(s.prototype,{_id:0,_springConfig:null,_overshootClampingEnabled:!1,_currentState:null,_previousState:null,_tempState:null,_startValue:0,_endValue:0,_wasAtRest:!0,_restSpeedThreshold:.001,_displacementFromRestThreshold:.001,listeners:null,_timeAccumulator:0,_springSystem:null,destroy:function(){this.listeners=[],this.frames=[],this._springSystem.deregisterSpring(this)},getId:function(){return this._id},setSpringConfig:function(e){return this._springConfig=e,this},getSpringConfig:function(){return this._springConfig},setCurrentValue:function(e,t){return this._startValue=e,this._currentState.position=e,t||this.setAtRest(),this.notifyPositionUpdated(!1,!1),this},getStartValue:function(){return this._startValue},getCurrentValue:function(){return this._currentState.position},getCurrentDisplacementDistance:function(){return this.getDisplacementDistanceForState(this._currentState)},getDisplacementDistanceForState:function(e){return Math.abs(this._endValue-e.position)},setEndValue:function(e){if(this._endValue==e&&this.isAtRest())return this;this._startValue=this.getCurrentValue(),this._endValue=e,this._springSystem.activateSpring(this.getId());for(var t=0,n=this.listeners.length;n>t;t++){var r=this.listeners[t],i=r.onSpringEndStateChange;i&&i(this)}return this},getEndValue:function(){return this._endValue},setVelocity:function(e){return e===this._currentState.velocity?this:(this._currentState.velocity=e,this._springSystem.activateSpring(this.getId()),this)},getVelocity:function(){return this._currentState.velocity},setRestSpeedThreshold:function(e){return this._restSpeedThreshold=e,this},getRestSpeedThreshold:function(){return this._restSpeedThreshold},setRestDisplacementThreshold:function(e){this._displacementFromRestThreshold=e},getRestDisplacementThreshold:function(){return this._displacementFromRestThreshold},setOvershootClampingEnabled:function(e){return this._overshootClampingEnabled=e,this},isOvershootClampingEnabled:function(){return this._overshootClampingEnabled},isOvershooting:function(){var e=this._startValue,t=this._endValue;return this._springConfig.tension>0&&(t>e&&this.getCurrentValue()>t||e>t&&this.getCurrentValue()s.MAX_DELTA_TIME_SEC&&(r=s.MAX_DELTA_TIME_SEC),this._timeAccumulator+=r;for(var i,o,a,u,c,l,p,h,d,f,m=this._springConfig.tension,v=this._springConfig.friction,g=this._currentState.position,y=this._currentState.velocity,_=this._tempState.position,b=this._tempState.velocity;this._timeAccumulator>=s.SOLVER_TIMESTEP_SEC;)this._timeAccumulator-=s.SOLVER_TIMESTEP_SEC,this._timeAccumulator0&&this.interpolate(this._timeAccumulator/s.SOLVER_TIMESTEP_SEC),(this.isAtRest()||this._overshootClampingEnabled&&this.isOvershooting())&&(this._springConfig.tension>0?(this._startValue=this._endValue,this._currentState.position=this._endValue):(this._endValue=this._currentState.position,this._startValue=this._endValue),this.setVelocity(0),n=!0);var S=!1;this._wasAtRest&&(this._wasAtRest=!1,S=!0);var R=!1;n&&(this._wasAtRest=!0,R=!0),this.notifyPositionUpdated(S,R)}},notifyPositionUpdated:function(e,t){for(var n=0,r=this.listeners.length;r>n;n++){var i=this.listeners[n];e&&i.onSpringActivate&&i.onSpringActivate(this),i.onSpringUpdate&&i.onSpringUpdate(this),t&&i.onSpringAtRest&&i.onSpringAtRest(this)}},systemShouldAdvance:function(){return!this.isAtRest()||!this.wasAtRest()},wasAtRest:function(){return this._wasAtRest},isAtRest:function(){return Math.abs(this._currentState.velocity)=e?this.b3Friction1(e):e>18&&44>=e?this.b3Friction2(e):this.b3Friction3(e)}}),n.extend(c,{fromOrigamiTensionAndFriction:function(e,t){return new c(p.tensionFromOrigamiValue(e),p.frictionFromOrigamiValue(t))},fromBouncinessAndSpeed:function(e,n){var r=new t.BouncyConversion(e,n);return this.fromOrigamiTensionAndFriction(r.bouncyTension,r.bouncyFriction)},coastingConfigWithOrigamiFriction:function(e){return new c(0,p.frictionFromOrigamiValue(e))}}),c.DEFAULT_ORIGAMI_SPRING_CONFIG=c.fromOrigamiTensionAndFriction(40,7),n.extend(c.prototype,{friction:0,tension:0});var d={};n.hexToRGB=function(e){if(d[e])return d[e];e=e.replace("#",""),3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=e.match(/.{2}/g),n={r:parseInt(t[0],16),g:parseInt(t[1],16),b:parseInt(t[2],16)};return d[e]=n,n},n.rgbToHex=function(e,t,n){return e=e.toString(16),t=t.toString(16),n=n.toString(16),e=e.length<2?"0"+e:e,t=t.length<2?"0"+t:t,n=n.length<2?"0"+n:n,"#"+e+t+n};var f=t.MathUtil={mapValueInRange:function(e,t,n,r,i){var o=n-t,a=i-r,s=(e-t)/o;return r+s*a},interpolateColor:function(e,t,r,i,o,a){i=void 0===i?0:i,o=void 0===o?1:o,t=n.hexToRGB(t),r=n.hexToRGB(r);var s=Math.floor(n.mapValueInRange(e,i,o,t.r,r.r)),u=Math.floor(n.mapValueInRange(e,i,o,t.g,r.g)),c=Math.floor(n.mapValueInRange(e,i,o,t.b,r.b));return a?"rgb("+s+","+u+","+c+")":n.rgbToHex(s,u,c)},degreesToRadians:function(e){return e*Math.PI/180},radiansToDegrees:function(e){return 180*e/Math.PI}};n.extend(n,f);var m;"undefined"!=typeof window&&(m=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),m||"undefined"==typeof process||"node"!==process.title||(m=setImmediate),n.onFrame=function(e){return m(e)},"undefined"!=typeof r?n.extend(r,t):"undefined"!=typeof window&&(window.rebound=t)}()}),__d("NavigatorIOS",["EventEmitter","Image","NavigationContext","React","NativeModules","StyleSheet","StaticContainer.react","View","requireNativeComponent","invariant","logError"],function(e,t,n){"use strict";function r(){return y++}var i=Object.assign||function(e){for(var t=1;tthis.state.observedTopOfStack+1?this.state.observedTopOfStack+1:null;this.setState({idStack:this.state.idStack.slice(0,this.state.observedTopOfStack+1),routeStack:this.state.routeStack.slice(0,this.state.observedTopOfStack+1),requestedTopOfStack:this.state.observedTopOfStack,makingNavigatorRequest:!0,updatingAllIndicesAtOrBeyond:e})},_emitDidFocus:function(e){this.navigationContext.emit("didfocus",{route:e})},_emitWillFocus:function(e){this.navigationContext.emit("willfocus",{route:e})},push:function(e){var t=this;f(!!e,"Must supply route to push"),this.state.requestedTopOfStack===this.state.observedTopOfStack&&this._tryLockNavigator(function(){t._emitWillFocus(e);var n=t.state.routeStack.concat([e]),i=t.state.idStack.concat([r()]);t.setState({idStack:i,routeStack:n,requestedTopOfStack:n.length-1,makingNavigatorRequest:!0,updatingAllIndicesAtOrBeyond:n.length-1})})},popN:function(e){var t=this;0!==e&&this.state.requestedTopOfStack===this.state.observedTopOfStack&&this.state.requestedTopOfStack>0&&this._tryLockNavigator(function(){var n=t.state.requestedTopOfStack-e;f(n>=0,"Cannot pop below 0"),t._emitWillFocus(t.state.routeStack[n]),t.setState({requestedTopOfStack:n,makingNavigatorRequest:!0,updatingAllIndicesAtOrBeyond:null})})},pop:function(){this.popN(1)},replaceAtIndex:function(e,t){if(f(!!e,"Must supply route to replace"),0>t&&(t+=this.state.routeStack.length),!(this.state.routeStack.length<=t)){var n=this.state.idStack.slice(),i=this.state.routeStack.slice();n[t]=r(),i[t]=e,this.setState({idStack:n,routeStack:i,makingNavigatorRequest:!1,updatingAllIndicesAtOrBeyond:t}),this._emitWillFocus(e),this._emitDidFocus(e)}},replace:function(e){this.replaceAtIndex(e,-1)},replacePrevious:function(e){this.replaceAtIndex(e,-2)},popToTop:function(){this.popToRoute(this.state.routeStack[0])},popToRoute:function(e){var t=this.state.routeStack.indexOf(e);f(-1!==t,"Calling pop to route for a route that doesn't exist!");var n=this.state.routeStack.length-t-1;this.popN(n)},replacePreviousAndPop:function(e){var t=this;this.state.requestedTopOfStack===this.state.observedTopOfStack&&(this.state.routeStack.length<2||this._tryLockNavigator(function(){t.replacePrevious(e),t.setState({requestedTopOfStack:t.state.requestedTopOfStack-1,makingNavigatorRequest:!0})}))},resetTo:function(e){f(!!e,"Must supply route to push"),this.state.requestedTopOfStack===this.state.observedTopOfStack&&(this.replaceAtIndex(e,0),this.popToRoute(e))},handleNavigationComplete:function(e){this._toFocusOnNavigationComplete&&(this._getFocusEmitter().emit("focus",this._toFocusOnNavigationComplete),this._toFocusOnNavigationComplete=null),this._handleNavigatorStackChanged(e)},_routeToStackItem:function(e,t){var n=e.component,r=null!==this.state.updatingAllIndicesAtOrBeyond&&this.state.updatingAllIndicesAtOrBeyond>=t;return u.createElement(p,{key:"nav"+t,shouldUpdate:r},u.createElement(E,{title:e.title,style:[S.stackItem,this.props.itemWrapperStyle,e.wrapperStyle],backButtonIcon:this._imageNameFromSource(e.backButtonIcon),backButtonTitle:e.backButtonTitle,leftButtonIcon:this._imageNameFromSource(e.leftButtonIcon),leftButtonTitle:e.leftButtonTitle,onNavLeftButtonTap:e.onLeftButtonPress,rightButtonIcon:this._imageNameFromSource(e.rightButtonIcon),rightButtonTitle:e.rightButtonTitle,onNavRightButtonTap:e.onRightButtonPress,navigationBarHidden:this.props.navigationBarHidden,shadowHidden:this.props.shadowHidden,tintColor:this.props.tintColor,barTintColor:this.props.barTintColor,translucent:this.props.translucent!==!1,titleTextColor:this.props.titleTextColor},u.createElement(n,i({navigator:this.navigator,route:e},e.passProps))))},_imageNameFromSource:function(e){return e?e.uri:void 0},renderNavigationStackItems:function(){var e=this.state.makingNavigatorRequest||null!==this.state.updatingAllIndicesAtOrBeyond,t=e?this.state.routeStack.map(this._routeToStackItem):null;return u.createElement(p,{shouldUpdate:e},u.createElement(_,{ref:v,style:S.transitioner,vertical:this.props.vertical,requestedTopOfStack:this.state.requestedTopOfStack,onNavigationComplete:this.handleNavigationComplete},t))},render:function(){return u.createElement(h,{style:this.props.style},this.renderNavigationStackItems())}}),S=l.create({stackItem:{backgroundColor:"white",overflow:"hidden",position:"absolute",top:0,left:0,right:0,bottom:0},transitioner:{flex:1}}),R=d("RCTNavigator"),E=d("RCTNavItem");n.exports=b}),__d("PickerIOS",["NativeMethodsMixin","React","ReactChildren","ReactNativeViewAttributes","NativeModules","StyleSheet","View","requireNativeComponent","merge"],function(e,t,n){"use strict";var r=t("NativeMethodsMixin"),i=t("React"),o=t("ReactChildren"),a=(t("ReactNativeViewAttributes"),t("NativeModules").UIManager.RCTPicker.Constants),s=t("StyleSheet"),u=t("View"),c=t("requireNativeComponent"),l=(t("merge"),"picker"),p=i.createClass({displayName:"PickerIOS",mixins:[r],propTypes:{onValueChange:i.PropTypes.func,selectedValue:i.PropTypes.any},getInitialState:function(){return this._stateFromProps(this.props)},componentWillReceiveProps:function(e){this.setState(this._stateFromProps(e))},_stateFromProps:function(e){var t=0,n=[];return o.forEach(e.children,function(r,i){r.props.value===e.selectedValue&&(t=i),n.push({value:r.props.value,label:r.props.label})}),{selectedIndex:t,items:n}},render:function(){return i.createElement(u,{style:this.props.style},i.createElement(d,{ref:l,style:h.pickerIOS,items:this.state.items,selectedIndex:this.state.selectedIndex,onChange:this._onChange})) +},_onChange:function(e){this.props.onChange&&this.props.onChange(e),this.props.onValueChange&&this.props.onValueChange(e.nativeEvent.newValue),this.state.selectedIndex!==e.nativeEvent.newIndex&&this.refs[l].setNativeProps({selectedIndex:this.state.selectedIndex})}});p.Item=i.createClass({displayName:"Item",propTypes:{value:i.PropTypes.any,label:i.PropTypes.string},render:function(){return null}});var h=s.create({pickerIOS:{height:a.ComponentHeight}}),d=c("RCTPicker",null);n.exports=p}),__d("ProgressViewIOS",["Image","NativeMethodsMixin","NativeModules","ReactPropTypes","React","StyleSheet","requireNativeComponent"],function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;ty&&this._cancelLongPressDelayTimeout()}var v=p>t.left-i&&d>t.top-a&&p0,i=n&&n.length>0;return!r&&i?n[0]:r?t[0]:e}};n.exports=r}),__d("queryLayoutByID",["ReactNativeTagHandles","NativeModules"],function(e,t,n){"use strict";var r=t("ReactNativeTagHandles"),i=t("NativeModules").UIManager,o=function(e,t,n){i.measure(r.rootNodeIDToTag[e],n)};n.exports=o}),__d("TextInput",["DocumentSelectionState","EventEmitter","NativeMethodsMixin","NativeModules","Platform","ReactPropTypes","React","ReactChildren","StyleSheet","Text","TextInputState","react-timer-mixin/TimerMixin.js","TouchableWithoutFeedback","createReactNativeComponentClass","emptyFunction","invariant","requireNativeComponent"],function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t1&&(i=l.createElement(d,null,i)),t.inputView&&(i=[i,t.inputView]),e=l.createElement(w,r({ref:"input"},t,{children:i,mostRecentEventCount:this.state.mostRecentEventCount,onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onSelectionChange:this._onSelectionChange,onTextInput:this._onTextInput,onSelectionChangeShouldSetResponder:y.thatReturnsTrue,text:this._getText()}))}else{for(var n in S)if(t[n])throw new Error("TextInput prop `"+n+"` is only supported with multiline.");e=l.createElement(C,r({ref:"input"},t,{onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onSelectionChangeShouldSetResponder:function(){return!0},text:this._getText(),mostRecentEventCount:this.state.mostRecentEventCount}))}return l.createElement(v,{onPress:this._onPress,rejectResponderTermination:!0,testID:t.testID},e)},_renderAndroid:function(){var e=s.UIText.AutocapitalizationType[this.props.autoCapitalize],t=s.AndroidTextInput.Constants.TextAlign[this.props.textAlign],n=s.AndroidTextInput.Constants.TextAlignVertical[this.props.textAlignVertical],r=this.props.children,i=0;p.forEach(r,function(){return++i}),_(!(this.props.value&&i),"Cannot specify both value and children."),i>1&&(r=l.createElement(d,null,r));var o=l.createElement(x,{ref:"input",style:[this.props.style],autoCapitalize:e,autoCorrect:this.props.autoCorrect,textAlign:t,textAlignVertical:n,keyboardType:this.props.keyboardType,mostRecentEventCount:this.state.mostRecentEventCount,multiline:this.props.multiline,onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onChange,onTextInput:this._onTextInput,onEndEditing:this.props.onEndEditing,onSubmitEditing:this.props.onSubmitEditing,onLayout:this.props.onLayout,password:this.props.password||this.props.secureTextEntry,placeholder:this.props.placeholder,placeholderTextColor:this.props.placeholderTextColor,text:this._getText(),underlineColorAndroid:this.props.underlineColorAndroid,children:r,editable:this.props.editable});return l.createElement(v,{onPress:this._onPress,testID:this.props.testID},o)},_onFocus:function(e){this.props.onFocus&&this.props.onFocus(e)},_onPress:function(){(this.props.editable||void 0===this.props.editable)&&this.focus()},_onChange:function(e){var t=this;"android"===u.OS&&this.refs.input.setNativeProps({mostRecentEventCount:e.nativeEvent.eventCount});var n=e.nativeEvent.text,r=e.nativeEvent.eventCount;this.props.onChange&&this.props.onChange(e),this.props.onChangeText&&this.props.onChangeText(n),this.setState({mostRecentEventCount:r},function(){n!==t.props.value&&"string"==typeof t.props.value&&t.refs.input.setNativeProps({text:t.props.value})})},_onBlur:function(e){this.blur(),this.props.onBlur&&this.props.onBlur(e)},_onSelectionChange:function(e){if(this.props.selectionState){var t=e.nativeEvent.selection;this.props.selectionState.update(t.start,t.end)}this.props.onSelectionChange&&this.props.onSelectionChange(e)},_onTextInput:function(e){this.props.onTextInput&&this.props.onTextInput(e)}}),O=h.create({input:{alignSelf:"stretch"}}),x=g({validAttributes:E,uiViewClassName:"AndroidTextInput"});n.exports=I}),__d("DocumentSelectionState",["mixInEventEmitter"],function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nthis._focusOffset}},{key:"getAnchorOffset",value:function(){return this._hasFocus?this._anchorOffset:null}},{key:"getFocusOffset",value:function(){return this._hasFocus?this._focusOffset:null}},{key:"getStartOffset",value:function(){return this._hasFocus?Math.min(this._anchorOffset,this._focusOffset):null}},{key:"getEndOffset",value:function(){return this._hasFocus?Math.max(this._anchorOffset,this._focusOffset):null}},{key:"overlaps",value:function(e,t){return this.hasFocus()&&this.getStartOffset()<=t&&e<=this.getEndOffset()}}]),e}();o(a,{blur:!0,focus:!0,update:!0}),n.exports=a}),__d("mixInEventEmitter",["EventEmitter","EventEmitterWithHolding","EventHolder","EventValidator","copyProperties","invariant","keyOf"],function(e,t,n){function r(e,t){c(t,"Must supply set of valid event types"),c(!this.__eventEmitter,"An active emitter is already mixed in");var n=e.prototype||e,r=e.constructor;r&&c(r===Object||r===Function,"Mix EventEmitter into a class, not an instance"),n.hasOwnProperty(p)?u(n.__types,t):n.__types=n.__types?u({},n.__types,t):t,u(n,h)}var i=t("EventEmitter"),o=t("EventEmitterWithHolding"),a=t("EventHolder"),s=t("EventValidator"),u=t("copyProperties"),c=t("invariant"),l=t("keyOf"),p=l({__types:!0}),h={emit:function(e,t,n,r,i,o,a){return this.__getEventEmitter().emit(e,t,n,r,i,o,a)},emitAndHold:function(e,t,n,r,i,o,a){return this.__getEventEmitter().emitAndHold(e,t,n,r,i,o,a)},addListener:function(e,t,n){return this.__getEventEmitter().addListener(e,t,n)},once:function(e,t,n){return this.__getEventEmitter().once(e,t,n)},addRetroactiveListener:function(e,t,n){return this.__getEventEmitter().addRetroactiveListener(e,t,n)},addListenerMap:function(e,t){return this.__getEventEmitter().addListenerMap(e,t)},addRetroactiveListenerMap:function(e,t){return this.__getEventEmitter().addListenerMap(e,t)},removeAllListeners:function(){this.__getEventEmitter().removeAllListeners()},removeCurrentListener:function(){this.__getEventEmitter().removeCurrentListener()},releaseHeldEventType:function(e){this.__getEventEmitter().releaseHeldEventType(e)},__getEventEmitter:function(){if(!this.__eventEmitter){var e=new i;e=s.addValidation(e,this.__types);var t=new a;this.__eventEmitter=new o(e,t)}return this.__eventEmitter}};n.exports=r}),__d("EventEmitterWithHolding",[],function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;nt.distance?1:0},p=function(e,t){return e.distance/t.length<.334},h=function(e,t){var n,r,i=[];for(n=0;n<=e.length;n++)i[n]=[n];for(r=1;r<=t.length;r++)i[0][r]=r;for(n=1;n<=e.length;n++)for(r=1;r<=t.length;r++){var o=e.charAt(n-1)===t.charAt(r-1)?0:1;i[n][r]=Math.min(i[n-1][r]+1,i[n][r-1]+1,i[n-1][r-1]+o),n>1&&r>1&&e.charAt(n-1)==t.charAt(r-2)&&e.charAt(n-2)==t.charAt(r-1)&&(i[n][r]=Math.min(i[n][r],i[n-2][r-2]+o))}return i[e.length][t.length]};n.exports=a}),__d("copyProperties",[],function(e,t,n){function r(e,t,n,r,i,o,a){if(e=e||{},__DEV__&&a)throw new Error("Too many arguments passed to copyProperties");for(var s,u=[t,n,r,i,o],c=0;u[c];){s=u[c++];for(var l in s)e[l]=s[l];s.hasOwnProperty&&s.hasOwnProperty("toString")&&"undefined"!=typeof s.toString&&e.toString!==s.toString&&(e.toString=s.toString)}return e}n.exports=r}),__d("TouchableWithoutFeedback",["React","react-timer-mixin/TimerMixin.js","Touchable","ensurePositiveDelayProps","onlyChild"],function(e,t,n){"use strict";var r=t("React"),i=t("react-timer-mixin/TimerMixin.js"),o=t("Touchable"),a=t("ensurePositiveDelayProps"),s=t("onlyChild"),u={top:20,left:20,right:20,bottom:30},c=r.createClass({displayName:"TouchableWithoutFeedback",mixins:[i,o.Mixin],propTypes:{accessible:r.PropTypes.bool,onPress:r.PropTypes.func,onPressIn:r.PropTypes.func,onPressOut:r.PropTypes.func,onLongPress:r.PropTypes.func,delayPressIn:r.PropTypes.number,delayPressOut:r.PropTypes.number,delayLongPress:r.PropTypes.number},getInitialState:function(){return this.touchableGetInitialState()},componentDidMount:function(){a(this.props)},componentWillReceiveProps:function(e){a(e)},touchableHandlePress:function(e){this.props.onPress&&this.props.onPress(e)},touchableHandleActivePressIn:function(e){this.props.onPressIn&&this.props.onPressIn(e)},touchableHandleActivePressOut:function(e){this.props.onPressOut&&this.props.onPressOut(e)},touchableHandleLongPress:function(e){this.props.onLongPress&&this.props.onLongPress(e)},touchableGetPressRectOffset:function(){return u},touchableGetHighlightDelayMS:function(){return this.props.delayPressIn||0},touchableGetLongPressDelayMS:function(){return 0===this.props.delayLongPress?0:this.props.delayLongPress||500},touchableGetPressOutDelayMS:function(){return this.props.delayPressOut||0},render:function(){return r.cloneElement(s(this.props.children),{accessible:this.props.accessible!==!1,testID:this.props.testID,onStartShouldSetResponder:this.touchableHandleStartShouldSetResponder,onResponderTerminationRequest:this.touchableHandleResponderTerminationRequest,onResponderGrant:this.touchableHandleResponderGrant,onResponderMove:this.touchableHandleResponderMove,onResponderRelease:this.touchableHandleResponderRelease,onResponderTerminate:this.touchableHandleResponderTerminate})}});n.exports=c}),__d("ensurePositiveDelayProps",["invariant"],function(e,t,n){"use strict";var r=t("invariant"),i=function(e){r(!(e.delayPressIn<0||e.delayPressOut<0||e.delayLongPress<0),"Touchable components cannot have negative delay properties")};n.exports=i}),__d("TouchableHighlight",["NativeMethodsMixin","React","ReactNativeViewAttributes","StyleSheet","react-timer-mixin/TimerMixin.js","Touchable","TouchableWithoutFeedback","View","cloneWithProps","ensureComponentIsNative","ensurePositiveDelayProps","keyOf","merge","onlyChild"],function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t1)for(var r=1;n>r;r++)t=arguments[r],t&&(e=(e?e+" ":"")+t);return e}n.exports=r}),__d("ensureComponentIsNative",["invariant"],function(e,t,n){"use strict";var r=t("invariant"),i=function(e){r(e&&"function"==typeof e.setNativeProps,"Touchable child must either be native or forward setNativeProps to a native component")};n.exports=i}),__d("TouchableOpacity",["Animated","NativeMethodsMixin","React","react-timer-mixin/TimerMixin.js","Touchable","TouchableWithoutFeedback","ensurePositiveDelayProps","flattenStyle","keyOf"],function(e,t,n){"use strict";var r=Object.assign||function(e){for(var t=1;t=this._startTime+this._duration?(this._onUpdate(0===this._duration?this._toValue:this._fromValue+this._easing(1)*(this._toValue-this._fromValue)),void this.__debouncedOnEnd({finished:!0})):(this._onUpdate(this._fromValue+this._easing((e-this._startTime)/this._duration)*(this._toValue-this._fromValue)),void(this.__active&&(this._animationFrame=R(this.onUpdate.bind(this)))))}},{key:"stop",value:function(){this.__active=!1,clearTimeout(this._timeout),window.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(T),O=function(e){function t(e){i(this,t),c(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this._deceleration=e.deceleration||.998,this._velocity=e.velocity}return r(t,e),l(t,[{key:"start",value:function(e,t,n){this.__active=!0,this._lastValue=e,this._fromValue=e,this._onUpdate=t,this.__onEnd=n,this._startTime=Date.now(),this._animationFrame=R(this.onUpdate.bind(this))}},{key:"onUpdate",value:function(){var e=Date.now(),t=this._fromValue+this._velocity/(1-this._deceleration)*(1-Math.exp(-(1-this._deceleration)*(e-this._startTime)));return this._onUpdate(t),Math.abs(this._lastValue-t)<.1?void this.__debouncedOnEnd({finished:!0}):(this._lastValue=t,void(this.__active&&(this._animationFrame=R(this.onUpdate.bind(this)))))}},{key:"stop",value:function(){this.__active=!1,window.cancelAnimationFrame(this._animationFrame),this.__debouncedOnEnd({finished:!1})}}]),t}(T),x=function(e){function t(e){i(this,t),c(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this._overshootClamping=a(e.overshootClamping,!1),this._restDisplacementThreshold=a(e.restDisplacementThreshold,.001),this._restSpeedThreshold=a(e.restSpeedThreshold,.001),this._initialVelocity=e.velocity,this._lastVelocity=a(e.velocity,0),this._toValue=e.toValue;var n;void 0!==e.bounciness||void 0!==e.speed?(b(void 0===e.tension&&void 0===e.friction,"You can only define bounciness/speed or tension/friction but not both"),n=g.fromBouncinessAndSpeed(a(e.bounciness,8),a(e.speed,12))):n=g.fromOrigamiTensionAndFriction(a(e.tension,40),a(e.friction,7)),this._tension=n.tension,this._friction=n.friction}return r(t,e),l(t,[{key:"start",value:function(e,n,r,i){if(this.__active=!0,this._startPosition=e,this._lastPosition=this._startPosition,this._onUpdate=n,this.__onEnd=r,this._lastTime=Date.now(),i instanceof t){var o=i.getInternalState();this._lastPosition=o.lastPosition,this._lastVelocity=o.lastVelocity,this._lastTime=o.lastTime}void 0!==this._initialVelocity&&null!==this._initialVelocity&&(this._lastVelocity=this._initialVelocity),this.onUpdate()}},{key:"getInternalState",value:function(){return{lastPosition:this._lastPosition,lastVelocity:this._lastVelocity,lastTime:this._lastTime}}},{key:"onUpdate",value:function(){var e=this._lastPosition,t=this._lastVelocity,n=this._lastPosition,r=this._lastVelocity,i=64,o=Date.now();o>this._lastTime+i&&(o=this._lastTime+i);for(var a=1,s=Math.floor((o-this._lastTime)/a),u=0;s>u;++u){var c=a/1e3,l=t,p=this._tension*(this._toValue-n)-this._friction*r,n=e+l*c/2,r=t+p*c/2,h=r,d=this._tension*(this._toValue-n)-this._friction*r;n=e+h*c/2,r=t+d*c/2;var f=r,m=this._tension*(this._toValue-n)-this._friction*r;n=e+f*c/2,r=t+m*c/2;var v=r,g=this._tension*(this._toValue-n)-this._friction*r;n=e+f*c/2,r=t+m*c/2;var y=(l+2*(h+f)+v)/6,_=(p+2*(d+m)+g)/6;e+=y*c,t+=_*c}if(this._lastTime=o,this._lastPosition=e,this._lastVelocity=t,this._onUpdate(e),this.__active){var b=!1;this._overshootClamping&&0!==this._tension&&(b=this._startPositionthis._toValue:ei;i++)r[i]=arguments[i];var o=function(e,t,n){if("number"==typeof t)return b(e instanceof N,"Bad mapping of type "+typeof e+" for key "+n+", event value must map to AnimatedValue"),void e.setValue(t);b("object"==typeof e,"Bad mapping of type "+typeof e+" for key "+n),b("object"==typeof t,"Bad event of type "+typeof t+" for key "+n);for(var n in e)o(e[n],t[n],n)};e.forEach(function(e,t){o(e,r[t],"arg"+t)}),t&&t.listener&&t.listener.apply(null,r)}};n.exports={delay:z,sequence:U,parallel:q,stagger:G,decay:H,timing:B,spring:F,event:W,Value:N,ValueXY:D,__PropsOnlyForTests:L,View:s(_),Text:s(y),Image:s(h),createAnimatedComponent:s}}),__d("Interpolation",[],function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,n,r,i,o,a,s){var u=e;if(t>u){if("identity"===a)return u;"clamp"===a&&(u=t)}if(u>n){if("identity"===s)return u;"clamp"===s&&(u=n)}return r===i?r:t===n?t>=e?r:i:(t===-1/0?u=-u:1/0===n?u-=t:u=(u-t)/(n-t),u=o(u),r===-1/0?u=-u:1/0===i?u+=r:u=u*(i-r)+r,u)}function o(e){var t=e.outputRange;h(t.length>=2,"Bad output range"),a(t);var n=t[0].match(m).map(function(){return[]});t.forEach(function(e){e.match(m).forEach(function(e,t){n[t].push(+e)})});var r=t[0].match(m).map(function(t,r){return f.create(l({},e,{outputRange:n[r]}))});return function(e){var n=0;return t[0].replace(m,function(){return String(r[n++](e))})}}function a(e){for(var t=e[0].replace(m,""),n=1;n=e);++n);return n-1}function u(e){h(e.length>=2,"inputRange must have at least 2 elements");for(var t=1;t=e[t-1],"inputRange must be monotonically increasing "+e)}function c(e,t){h(t.length>=2,e+" must have at least 2 elements"),h(2!==t.length||t[0]!==-1/0||1/0!==t[1],e+"cannot be ]-infinity;+infinity[ "+t)}var l=Object.assign||function(e){for(var t=1;t0?1:0}},{key:"step1",value:function(e){return e>=1?1:0}},{key:"linear",value:function(e){return e}},{key:"ease",value:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(e){return s(e)})},{key:"quad",value:function(e){return e*e}},{key:"cubic",value:function(e){return e*e*e}},{key:"poly",value:function(e){return function(t){return Math.pow(t,e)}}},{key:"sin",value:function(e){return 1-Math.cos(e*Math.PI/2)}},{key:"circle",value:function(e){return 1-Math.sqrt(1-e*e)}},{key:"exp",value:function(e){return Math.pow(2,10*(e-1))}},{key:"elastic",value:function(e,t){var n,r=2*Math.PI;return arguments.length<2&&(t=.45),arguments.length?n=t/r*Math.asin(1/e):(e=1,n=t/4),function(i){return 1+e*Math.pow(2,-10*i)*Math.sin((i-n)*r/t)}}},{key:"back",value:function(e){return void 0===e&&(e=1.70158),function(t){return t*t*((e+1)*t-e)}}},{key:"bounce",value:function(e){return 1/2.75>e?7.5625*e*e:2/2.75>e?(e-=1.5/2.75,7.5625*e*e+.75):2.5/2.75>e?(e-=2.25/2.75,7.5625*e*e+.9375):(e-=2.625/2.75,7.5625*e*e+.984375)}},{key:"bezier",value:function(e,t,n,r,i){if(void 0===i){var a=500;i=1e3/60/a/4}return o(e,t,n,r,i)}},{key:"in",value:function(e){return e}},{key:"out",value:function(e){return function(t){return 1-e(1-t)}}},{key:"inOut",value:function(e){return function(t){return.5>t?e(2*t)/2:1-e(2*(1-t))/2}}}]),e}(),s=a.bezier(.42,0,1,1);n.exports=a}),__d("bezier",[],function(e,t,n){n.exports=function(e,t,n,r,i){var o=function(t){var r=1-t;return 3*r*r*t*e+3*r*t*t*n+t*t*t},a=function(e){var n=1-e;return 3*n*n*e*t+3*n*e*e*r+e*e*e},s=function(t){var r=1-t;return 3*(2*(t-1)*t+r*r)*e+3*(-t*t*t+2*r*t)*n};return function(e){var t,n,r,u,c,l,p=e;for(r=p,l=0;8>l;l++){if(u=o(r)-p,Math.abs(u)r)return a(t);if(r>n)return a(n);for(;n>t;){if(u=o(r),Math.abs(u-p)u?t=r:n=r,r=.5*(n-t)+t}return a(r)}}}),__d("SpringConfig",[],function(e,t,n){"use strict";function r(e){return 3.62*(e-30)+194}function i(e){return 3*(e-8)+25}function o(e,t){return{tension:r(e),friction:i(t)}}function a(e,t){function n(e,t,n){return(e-t)/(n-t)}function o(e,t,n){return t+e*(n-t)}function a(e,t,n){return e*n+(1-e)*t}function s(e,t,n){return a(2*e-e*e,t,n)}function u(e){return 7e-4*Math.pow(e,3)-.031*Math.pow(e,2)+.64*e+1.28}function c(e){return 44e-6*Math.pow(e,3)-.006*Math.pow(e,2)+.36*e+2}function l(e){return 4.5e-7*Math.pow(e,3)-332e-6*Math.pow(e,2)+.1078*e+5.84}function p(e){return 18>=e?u(e):e>18&&44>=e?c(e):l(e)}var h=n(e/1.7,0,20);h=o(h,0,.8);var d=n(t/1.7,0,20),f=o(d,.5,200),m=s(h,p(f),.01);return{tension:r(f),friction:i(m)}}n.exports={fromOrigamiTensionAndFriction:o,fromBouncinessAndSpeed:a}}),__d("requestAnimationFrame",["emptyFunction","nativeRequestAnimationFrame"],function(e,t,n){var r=t("emptyFunction"),i=t("nativeRequestAnimationFrame"),o=0,a=i||function(t){var n=Date.now(),r=Math.max(0,16-(n-o));return o=n+r,e.setTimeout(function(){t(Date.now())},r)};a(r),n.exports=a}),__d("nativeRequestAnimationFrame",[],function(e,t,n){var r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.oRequestAnimationFrame||e.msRequestAnimationFrame;n.exports=r}),__d("WebView",["ActivityIndicatorIOS","EdgeInsetsPropType","React","StyleSheet","Text","View","invariant","keyMirror","requireNativeComponent","NativeModules"],function(e,t,n){"use strict";var r=t("ActivityIndicatorIOS"),i=t("EdgeInsetsPropType"),o=t("React"),a=t("StyleSheet"),s=t("Text"),u=t("View"),c=t("invariant"),l=t("keyMirror"),p=t("requireNativeComponent"),h=o.PropTypes,d=t("NativeModules").WebViewManager,f="rgba(255,255,255,0.8)",m="webview",v=l({IDLE:null,LOADING:null,ERROR:null}),g={click:d.NavigationType.LinkClicked,formsubmit:d.NavigationType.FormSubmitted,backforward:d.NavigationType.BackForward,reload:d.NavigationType.Reload,formresubmit:d.NavigationType.FormResubmitted,other:d.NavigationType.Other},y=d.JSNavigationScheme,_=function(){return o.createElement(u,{style:E.loadingView},o.createElement(r,null))},b=function(e,t,n){return o.createElement(u,{style:E.errorContainer},o.createElement(s,{style:E.errorTextTitle},"Error loading page"),o.createElement(s,{style:E.errorText},"Domain: "+e),o.createElement(s,{style:E.errorText},"Error Code: "+t),o.createElement(s,{style:E.errorText},"Description: "+n))},S=o.createClass({displayName:"WebView",statics:{JSNavigationScheme:y,NavigationType:g},propTypes:{url:h.string,html:h.string,renderError:h.func,renderLoading:h.func,bounces:h.bool,scrollEnabled:h.bool,automaticallyAdjustContentInsets:h.bool,contentInset:i,onNavigationStateChange:h.func,startInLoadingState:h.bool,style:u.propTypes.style,javaScriptEnabledAndroid:h.bool,injectedJavaScript:h.string,scalesPageToFit:h.bool},getInitialState:function(){return{viewState:v.IDLE,lastErrorEvent:null,startInLoadingState:!0}},componentWillMount:function(){this.props.startInLoadingState&&this.setState({viewState:v.LOADING})},render:function(){var e=null;if(this.state.viewState===v.LOADING)e=(this.props.renderLoading||_)();else if(this.state.viewState===v.ERROR){var t=this.state.lastErrorEvent;c(null!=t,"lastErrorEvent expected to be non-null"),e=(this.props.renderError||b)(t.domain,t.code,t.description)}else this.state.viewState!==v.IDLE&&console.error("RCTWebView invalid state encountered: "+this.state.loading);var n=[E.container,E.webView,this.props.style];(this.state.viewState===v.LOADING||this.state.viewState===v.ERROR)&&n.push(E.hidden);var r=o.createElement(R,{ref:m,key:"webViewKey",style:n,url:this.props.url,html:this.props.html,injectedJavaScript:this.props.injectedJavaScript,bounces:this.props.bounces,scrollEnabled:this.props.scrollEnabled,contentInset:this.props.contentInset,automaticallyAdjustContentInsets:this.props.automaticallyAdjustContentInsets,onLoadingStart:this.onLoadingStart,onLoadingFinish:this.onLoadingFinish,onLoadingError:this.onLoadingError,scalesPageToFit:this.props.scalesPageToFit});return o.createElement(u,{style:E.container},r,e)},goForward:function(){d.goForward(this.getWebViewHandle())},goBack:function(){d.goBack(this.getWebViewHandle())},reload:function(){d.reload(this.getWebViewHandle())},updateNavigationState:function(e){this.props.onNavigationStateChange&&this.props.onNavigationStateChange(e.nativeEvent)},getWebViewHandle:function(){return o.findNodeHandle(this.refs[m])},onLoadingStart:function(e){this.updateNavigationState(e)},onLoadingError:function(e){e.persist(),console.error("Encountered an error loading page",e.nativeEvent),this.setState({lastErrorEvent:e.nativeEvent,viewState:v.ERROR})},onLoadingFinish:function(e){this.setState({viewState:v.IDLE}),this.updateNavigationState(e)}}),R=p("RCTWebView",S),E=a.create({container:{flex:1},errorContainer:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:f},errorText:{fontSize:14,textAlign:"center",marginBottom:2},errorTextTitle:{fontSize:15,fontWeight:"500",marginBottom:10},hidden:{height:0,flex:0},loadingView:{backgroundColor:f,flex:1,justifyContent:"center",alignItems:"center"},webView:{backgroundColor:"#ffffff"}});n.exports=S}),__d("ActionSheetIOS",["NativeModules","invariant"],function(e,t,n){"use strict";var r=t("NativeModules").ActionSheetManager,i=t("invariant"),o={showActionSheetWithOptions:function(e,t){i("object"==typeof e&&null!==e,"Options must a valid object"),i("function"==typeof t,"Must provide a valid callback"),r.showActionSheetWithOptions(e,function(){},t)},showShareActionSheetWithOptions:function(e,t,n){i("object"==typeof e&&null!==e,"Options must a valid object"),i("function"==typeof t,"Must provide a valid failureCallback"),i("function"==typeof n,"Must provide a valid successCallback"),r.showShareActionSheetWithOptions(e,t,n)}};n.exports=o}),__d("AdSupportIOS",["NativeModules"],function(e,t,n){"use strict";var r=t("NativeModules").AdSupport;n.exports={getAdvertisingId:function(e,t){r.getAdvertisingId(e,t)},getAdvertisingTrackingEnabled:function(e,t){r.getAdvertisingTrackingEnabled(e,t)}}}),__d("AlertIOS",["NativeModules","invariant"],function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;ns.get("window").height/2?"top":"bottom",selection:r.length-1,hierarchy:r,inspected:{style:o.style||{},frame:t}})}},{key:"setPerfing",value:function(e){this.setState({perfing:e,inspecting:!1,inspected:null})}},{key:"setInspecting",value:function(e){this.setState({inspecting:e,inspected:null})}},{key:"render",value:function(){var e="bottom"===this.state.panelPos?{bottom:0}:{top:0};return p.createElement(f,{style:v.container,pointerEvents:"box-none"},this.state.inspecting&&p.createElement(u,{rootTag:this.props.rootTag,inspected:this.state.inspected,inspectedViewTag:this.props.inspectedViewTag,onTouchInstance:this.onTouchInstance.bind(this)}),p.createElement(f,{style:[v.panelContainer,e]},p.createElement(c,{devtoolsIsOpen:!!this.state.devtoolsAgent,inspecting:this.state.inspecting,perfing:this.state.perfing,setPerfing:this.setPerfing.bind(this),setInspecting:this.setInspecting.bind(this),inspected:this.state.inspected,hierarchy:this.state.hierarchy,selection:this.state.selection,setSelection:this.setSelection.bind(this)})))}}]),t}(p.Component),v=h.create({container:{position:"absolute",backgroundColor:"transparent",top:0,left:0,right:0,bottom:0},panelContainer:{position:"absolute",left:0,right:0}});n.exports=m}),__d("InspectorOverlay",["Dimensions","InspectorUtils","React","StyleSheet","NativeModules","View","ElementBox"],function(e,t,n){"use strict";var r=t("Dimensions"),i=t("InspectorUtils"),o=t("React"),a=t("StyleSheet"),s=t("NativeModules").UIManager,u=t("View"),c=t("ElementBox"),l=o.PropTypes,p=o.createClass({displayName:"InspectorOverlay",propTypes:{inspected:l.shape({frame:l.object,style:l.any}),inspectedViewTag:l.number,onTouchInstance:l.func.isRequired},findViewForTouchEvent:function(e){var t=this,n=e.nativeEvent.touches[0],r=n.locationX,o=n.locationY;s.findSubviewIn(this.props.inspectedViewTag,[r,o],function(e,n,r,a,s){var u=i.findInstanceByNativeTag(t.props.rootTag,e);u&&t.props.onTouchInstance(u,{left:n,top:r,width:a,height:s},o)})},shouldSetResponser:function(e){return this.findViewForTouchEvent(e),!0},render:function(){var e=null;return this.props.inspected&&(e=o.createElement(c,{frame:this.props.inspected.frame,style:this.props.inspected.style})),o.createElement(u,{onStartShouldSetResponder:this.shouldSetResponser,onResponderMove:this.findViewForTouchEvent,style:[h.inspector,{height:r.get("window").height}]},e)}}),h=a.create({inspector:{backgroundColor:"transparent",position:"absolute",left:0,top:0,right:0}});n.exports=p}),__d("ElementBox",["React","View","StyleSheet","BorderBox","resolveBoxStyle","flattenStyle"],function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(){function e(e,t){for(var n=0;n.5;e.dismissalSpring.setEndValue(i?1:0)}}})},render:function(){var e,t=this;return b.get(this.props.warning)>1&&(e=c.createElement(p,{style:O.bold},"(",b.get(this.props.warning),")"," ")),c.createElement(d,i({style:O.warningBox,ref:function(e){t.container=e}},this.panGesture.panHandlers),c.createElement(h,{onPress:this.props.onOpened},c.createElement(p,{style:O.warningText,numberOfLines:2,ref:function(e){t.text=e}},e,this.props.warning)),c.createElement(d,{ref:function(e){t.closeButton=e},style:O.closeButton},c.createElement(h,{onPress:function(){t.dismissalSpring.setEndValue(1)}},c.createElement(p,{style:O.closeButtonText},"✕"))))}}),w=c.createClass({displayName:"WarningBoxOpened",render:function(){var e;return b.get(this.props.warning)>1&&(e=c.createElement(p,{style:O.bold},"(",b.get(this.props.warning),")"," ")),c.createElement(h,{activeOpacity:.9,onPress:this.props.onClose,style:O.yellowBox},c.createElement(p,{style:O.yellowBoxText},e,this.props.warning),c.createElement(d,{style:O.yellowBoxButtons},c.createElement(h,{onPress:this.props.onDismissed,style:O.yellowBoxButton},c.createElement(p,{style:O.yellowBoxButtonText},"Dismiss")),c.createElement(h,{onPress:this.props.onIgnored,style:O.yellowBoxButton},c.createElement(p,{style:O.yellowBoxButtonText},"Ignore"))))}}),C=!0,I=c.createClass({displayName:"WarningBox",getInitialState:function(){return{totalWarningCount:R,openWarning:null}},componentWillMount:function(){console.yellowBoxResetIgnored&&(o.setItem(y,"[]",function(e){e&&console.warn("Could not reset ignored warnings.",e)}),S=[])},componentDidMount:function(){f(C,"There can only be one WarningBox"),C=!1,E.addListener("count",this._onWarningCount)},componentWillUnmount:function(){E.removeAllListeners(),C=!0},_onWarningCount:function(e){var t=this;setImmediate(function(){t.setState({totalWarningCount:e})})},_onDismiss:function(e){b["delete"](e),this.setState({openWarning:null})},render:function(){var e=this;if(0===b.size)return c.createElement(d,null);if(this.state.openWarning)return c.createElement(w,{warning:this.state.openWarning,onClose:function(){e.setState({openWarning:null})},onDismissed:this._onDismiss.bind(this,this.state.openWarning),onIgnored:function(){S.push(e.state.openWarning),r(),e._onDismiss(e.state.openWarning)}});var t=[];return b.forEach(function(n,r){t.push(c.createElement(T,{key:r,onOpened:function(){e.setState({openWarning:r})},onDismissed:e._onDismiss.bind(e,r),warning:r}))}),c.createElement(d,{style:O.warningContainer},t)}}),O=l.create({bold:{fontWeight:"bold"},closeButton:{position:"absolute",right:0,height:46,width:46},closeButtonText:{color:"white",fontSize:32,position:"relative",left:8},warningContainer:{position:"absolute",left:0,right:0,bottom:0},warningBox:{position:"relative",backgroundColor:"rgba(171, 124, 36, 0.9)",flex:1,height:46},warningText:{color:"white",position:"absolute",left:0,marginLeft:15,marginRight:46,top:7},yellowBox:{backgroundColor:"rgba(171, 124, 36, 0.9)",position:"absolute",left:0,right:0,top:0,bottom:0,padding:15,paddingTop:35},yellowBoxText:{color:"white",fontSize:20},yellowBoxButtons:{flexDirection:"row",position:"absolute",bottom:0},yellowBoxButton:{flex:1,padding:25},yellowBoxButtonText:{color:"white",fontSize:16}});n.exports=I}),__d("AsyncStorage",["NativeModules"],function(e,t,n){"use strict";function r(e){if(!e)return null;var t=new Error(e.message);return t.key=e.key,t}var i=t("NativeModules"),o=i.AsyncLocalStorage,a=i.AsyncRocksDBStorage,s=a||o,u={getItem:function(e,t){return new Promise(function(n,i){s.multiGet([e],function(e,o){var a=o&&o[0]&&o[0][1]?o[0][1]:null;t&&t(e&&r(e[0])||null,a),e?i(r(e[0])):n(a)})})},setItem:function(e,t,n){return new Promise(function(i,o){s.multiSet([[e,t]],function(e){n&&n(e&&r(e[0])||null),e?o(r(e[0])):i(null)})})},removeItem:function(e,t){return new Promise(function(n,i){s.multiRemove([e],function(e){t&&t(e&&r(e[0])||null),e?i(r(e[0])):n(null)})})},mergeItem:function(e,t,n){return new Promise(function(i,o){s.multiMerge([[e,t]],function(e){n&&n(e&&r(e[0])||null),e?o(r(e[0])):i(null)})})},clear:function(e){return new Promise(function(t,n){s.clear(function(i){e&&e(r(i)),i&&r(i)?n(r(i)):t(null)})})},getAllKeys:function(e){return new Promise(function(t,n){s.getAllKeys(function(i,o){e&&e(r(i),o),i?n(r(i)):t(o)})})},multiGet:function(e,t){return new Promise(function(n,i){s.multiGet(e,function(e,o){var a=e&&e.map(function(e){return r(e)})||null;t&&t(a,o),e?i(a):n(o)})})},multiSet:function(e,t){return new Promise(function(n,i){s.multiSet(e,function(e){var o=e&&e.map(function(e){return r(e)})||null;t&&t(o),e?i(o):n(null)})})},multiRemove:function(e,t){return new Promise(function(n,i){s.multiRemove(e,function(e){var o=e&&e.map(function(e){return r(e)})||null;t&&t(o),e?i(o):n(null)})})},multiMerge:function(e,t){return new Promise(function(n,i){s.multiMerge(e,function(e){var o=e&&e.map(function(e){return r(e)})||null;t&&t(o),e?i(o):n(null)})})}};s.multiMerge||(delete u.mergeItem,delete u.multiMerge),n.exports=u}),__d("setupDevtools",["flattenStyle","ReactCurrentOwner","ReactInstanceHandles","ReactNativeMount","ReactReconciler","ReactNativeTextComponent"],function(global,require,module,exports){"use strict";function setupDevtools(){function tryToConnect(){ws.send("attach:agent");var e=setInterval(function(){return ws.send("attach:agent")},500);ws.onmessage=function(t){0===t.data.indexOf("eval:")&&(clearInterval(e),initialize(t.data.slice("eval:".length)))}}function initialize(text){try{eval(text)}catch(e){return void console.error("Failed to eval"+e.message)}window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:require("ReactCurrentOwner"),InstanceHandles:require("ReactInstanceHandles"),Mount:require("ReactNativeMount"),Reconciler:require("ReactReconciler"),TextComponent:require("ReactNativeTextComponent")}),ws.onmessage=handleMessage}function handleMessage(e){var t;try{t=JSON.parse(e.data)}catch(n){return console.error("failed to parse json: "+e.data)}return t.$close||t.$error?(closeListeners.forEach(function(e){return e()}),window.__REACT_DEVTOOLS_GLOBAL_HOOK__.emit("shutdown"),void tryToConnect()):void(t.$open||messageListeners.forEach(function(e){try{e(t)}catch(n){throw console.log(t),n}}))}var messageListeners=[],closeListeners=[],ws=new window.WebSocket("ws://localhost:8081/devtools"),FOR_BACKEND={resolveRNStyle:require("flattenStyle"),wall:{listen:function(e){messageListeners.push(e)},onClose:function(e){closeListeners.push(e)},send:function(e){ws.send(JSON.stringify(e))}}};ws.onclose=function(){console.warn("devtools socket closed"),closeListeners.forEach(function(e){return e()})},ws.onerror=function(e){console.warn("devtools socket errored",e),closeListeners.forEach(function(e){return e()})},ws.onopen=function(){tryToConnect()}}module.exports=setupDevtools}),__d("RCTRenderingPerf",["ReactDefaultPerf","invariant"],function(e,t,n){"use strict";var r=t("ReactDefaultPerf"),i=t("invariant"),o=[],a=!1,s={toggle:function(){console.log("Render perfomance measurements enabled"),a=!0},start:function(){a&&(r.start(),o.forEach(function(e){return e.start()}))},stop:function(){if(a){r.stop(),r.printInclusive(),r.printWasted();for(var e=0,t=0,n=r.getLastMeasurements(),i=0;i component":e.componentName,"Inclusive time (ms)":r(e.time),Instances:e.count}})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},getMeasurementsSummaryMap:function(e){var t=a.getInclusiveSummary(e,!0);return t.map(function(e){return{"Owner > component":e.componentName,"Wasted time (ms)":e.time,Instances:e.count}})},printWasted:function(e){e=e||l._allMeasurements,console.table(l.getMeasurementsSummaryMap(e)),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},printDOM:function(e){e=e||l._allMeasurements;var t=a.getDOMSummary(e);console.table(t.map(function(e){var t={};return t[o.ID_ATTRIBUTE_NAME]=e.id,t.type=e.type,t.args=JSON.stringify(e.args),t})),console.log("Total time:",a.getTotalTime(e).toFixed(2)+" ms")},_recordWrite:function(e,t,n,r){var i=l._allMeasurements[l._allMeasurements.length-1].writes;i[e]=i[e]||[],i[e].push({type:t,time:n,args:r})},measure:function(e,t,n){return function(){for(var r=arguments.length,o=Array(r),a=0;r>a;a++)o[a]=arguments[a];var u,p,h;if("_renderNewRootComponent"===t||"flushBatchedUpdates"===t)return l._allMeasurements.push({exclusive:{},inclusive:{},render:{},counts:{},writes:{},displayNames:{},totalTime:0}),h=c(),p=n.apply(this,o),l._allMeasurements[l._allMeasurements.length-1].totalTime=c()-h,p;if("_mountImageIntoNode"===t||"ReactDOMIDOperations"===e){if(h=c(),p=n.apply(this,o),u=c()-h,"_mountImageIntoNode"===t){var d=s.getID(o[1]);l._recordWrite(d,t,u,o[0])}else"dangerouslyProcessChildrenUpdates"===t?o[0].forEach(function(e){var t={};null!==e.fromIndex&&(t.fromIndex=e.fromIndex),null!==e.toIndex&&(t.toIndex=e.toIndex),null!==e.textContent&&(t.textContent=e.textContent),null!==e.markupIndex&&(t.markup=o[1][e.markupIndex]),l._recordWrite(e.parentID,e.type,u,t)}):l._recordWrite(o[0],t,u,Array.prototype.slice.call(o,1));return p}if("ReactCompositeComponent"!==e||"mountComponent"!==t&&"updateComponent"!==t&&"_renderValidatedComponent"!==t)return n.apply(this,o);if("string"==typeof this._currentElement.type)return n.apply(this,o);var f="mountComponent"===t?o[0]:this._rootNodeID,m="_renderValidatedComponent"===t,v="mountComponent"===t,g=l._mountStack,y=l._allMeasurements[l._allMeasurements.length-1];if(m?i(y.counts,f,1):v&&g.push(0),h=c(),p=n.apply(this,o),u=c()-h,m)i(y.render,f,u);else if(v){var _=g.pop();g[g.length-1]+=u,i(y.exclusive,f,u-_),i(y.inclusive,f,u)}else i(y.inclusive,f,u);return y.displayNames[f]={current:this.getName(),owner:this._currentElement._owner?this._currentElement._owner.getName():""},p}}};n.exports=l}),__d("DOMProperty",["invariant"],function(e,t,n){"use strict";function r(e,t){return(e&t)===t}var i=t("invariant"),o={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(e){var t=o,n=e.Properties||{},a=e.DOMAttributeNamespaces||{},u=e.DOMAttributeNames||{},c=e.DOMPropertyNames||{},l=e.DOMMutationMethods||{};e.isCustomAttribute&&s._isCustomAttributeFunctions.push(e.isCustomAttribute);for(var p in n){i(!s.properties.hasOwnProperty(p),"injectDOMPropertyConfig(...): You're trying to inject DOM property '%s' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.",p);var h=p.toLowerCase(),d=n[p],f={attributeName:h,attributeNamespace:null,propertyName:p,mutationMethod:null,mustUseAttribute:r(d,t.MUST_USE_ATTRIBUTE),mustUseProperty:r(d,t.MUST_USE_PROPERTY),hasSideEffects:r(d,t.HAS_SIDE_EFFECTS),hasBooleanValue:r(d,t.HAS_BOOLEAN_VALUE),hasNumericValue:r(d,t.HAS_NUMERIC_VALUE),hasPositiveNumericValue:r(d,t.HAS_POSITIVE_NUMERIC_VALUE),hasOverloadedBooleanValue:r(d,t.HAS_OVERLOADED_BOOLEAN_VALUE)};if(i(!f.mustUseAttribute||!f.mustUseProperty,"DOMProperty: Cannot require using both attribute and property: %s",p),i(f.mustUseProperty||!f.hasSideEffects,"DOMProperty: Properties that have side effects must use property: %s",p),i(f.hasBooleanValue+f.hasNumericValue+f.hasOverloadedBooleanValue<=1,"DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s",p),__DEV__&&(s.getPossibleStandardName[h]=p),u.hasOwnProperty(p)){var m=u[p];f.attributeName=m,__DEV__&&(s.getPossibleStandardName[m]=p)}a.hasOwnProperty(p)&&(f.attributeNamespace=a[p]),c.hasOwnProperty(p)&&(f.propertyName=c[p]),l.hasOwnProperty(p)&&(f.mutationMethod=l[p]),s.properties[p]=f}}},a={},s={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:__DEV__?{}:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(e){for(var t=0;t=c&&s.push(n[t]);return s.sort(function(e,t){return t.exclusive-e.exclusive}),s}function a(e,t){for(var n,r={},i=0;i "+h.current,r[n]=r[n]||{componentName:n,time:0,count:0},a.inclusive[p]&&(r[n].time+=a.inclusive[p]),a.counts[p]&&(r[n].count+=a.counts[p])}}var d=[];for(n in r)r[n].time>=c&&d.push(r[n]);return d.sort(function(e,t){return t.time-e.time}),d}function s(e){var t={},n=Object.keys(e.writes),r=u({},e.exclusive,e.inclusive);for(var i in r){for(var o=!1,a=0;a0&&(t[i]=!0)}return t}var u=t("Object.assign"),c=1.2,l={_mountImageIntoNode:"set innerHTML",INSERT_MARKUP:"set innerHTML",MOVE_EXISTING:"move",REMOVE_NODE:"remove",TEXT_CONTENT:"set textContent",updatePropertyByID:"update attribute",deletePropertyByID:"delete attribute",updateStylesByID:"update styles",updateInnerHTMLByID:"set innerHTML",dangerouslyReplaceNodeWithMarkupByID:"replace"},p={getExclusiveSummary:o,getInclusiveSummary:a,getDOMSummary:i,getTotalTime:r};n.exports=p}),__d("ReactMount",["DOMProperty","ReactBrowserEventEmitter","ReactCurrentOwner","ReactElement","ReactEmptyComponent","ReactInstanceHandles","ReactInstanceMap","ReactMarkupChecksum","ReactPerf","ReactReconciler","ReactUpdateQueue","ReactUpdates","emptyObject","containsNode","instantiateReactComponent","invariant","setInnerHTML","shouldUpdateReactComponent","validateDOMNesting","warning"],function(e,t,n){"use strict";function r(e,t){for(var n=Math.min(e.length,t.length),r=0;n>r;r++)if(e.charAt(r)!==t.charAt(r))return r;return e.length===t.length?-1:n}function i(e){return e?e.nodeType===U?e.documentElement:e.firstChild:null}function o(e){var t=i(e);return t&&J.getID(t)}function a(e){var t=s(e);if(t)if(B.hasOwnProperty(t)){var n=B[t];n!==e&&(M(!p(n,t),"ReactMount: Two valid but unequal nodes with the same `%s`: %s",F,t),B[t]=e)}else B[t]=e;return t}function s(e){return e&&e.getAttribute&&e.getAttribute(F)||""}function u(e,t){var n=s(e);n!==t&&delete B[n],e.setAttribute(F,t),B[t]=e}function c(e){return B.hasOwnProperty(e)&&p(B[e],e)||(B[e]=J.findReactNodeByID(e)),B[e]}function l(e){var t=T.get(e)._rootNodeID;return R.isNullComponentID(t)?null:(B.hasOwnProperty(t)&&p(B[t],t)||(B[t]=J.findReactNodeByID(t)),B[t])}function p(e,t){if(e){M(s(e)===t,"ReactMount: Unexpected modification of `%s`",F);var n=J.findReactContainerForID(t);if(n&&N(n,e))return!0}return!1}function h(e){delete B[e]}function d(e){var t=B[e];return t&&p(t,e)?void(K=t):!1}function f(e){K=null,E.traverseAncestors(e,d);var t=K;return K=null,t}function m(e,t,n,r,i,o){if(__DEV__){o===P&&(o={});var a=n.nodeName.toLowerCase();o[L.ancestorInfoContextKey]=L.updatedAncestorInfo(null,a,null)}var s=I.mountComponent(e,t,r,o);e._renderedComponent._topLevelWrapper=e,J._mountImageIntoNode(s,n,i)}function v(e,t,n,r,i){var o=x.ReactReconcileTransaction.getPooled();o.perform(m,null,e,t,n,o,r,i),x.ReactReconcileTransaction.release(o)}function g(e,t){for(I.unmountComponent(e),t.nodeType===U&&(t=t.documentElement);t.lastChild;)t.removeChild(t.lastChild)}var y=t("DOMProperty"),_=t("ReactBrowserEventEmitter"),b=t("ReactCurrentOwner"),S=t("ReactElement"),R=t("ReactEmptyComponent"),E=t("ReactInstanceHandles"),T=t("ReactInstanceMap"),w=t("ReactMarkupChecksum"),C=t("ReactPerf"),I=t("ReactReconciler"),O=t("ReactUpdateQueue"),x=t("ReactUpdates"),P=t("emptyObject"),N=t("containsNode"),D=t("instantiateReactComponent"),M=t("invariant"),k=t("setInnerHTML"),A=t("shouldUpdateReactComponent"),L=t("validateDOMNesting"),j=t("warning"),V=E.SEPARATOR,F=y.ID_ATTRIBUTE_NAME,B={},H=1,U=9,q=11,z={},G={};if(__DEV__)var W={};var Y=[],K=null,X=function(){};X.prototype.render=function(){return this.props};var J={_instancesByReactRootID:z,scrollMonitor:function(e,t){t()},_updateRootComponent:function(e,t,n,r){return J.scrollMonitor(n,function(){O.enqueueElementInternal(e,t),r&&O.enqueueCallbackInternal(e,r)}),__DEV__&&(W[o(n)]=i(n)),e},_registerComponent:function(e,t){M(t&&(t.nodeType===H||t.nodeType===U||t.nodeType===q),"_registerComponent(...): Target container is not a DOM element."),_.ensureScrollValueMonitoring();var n=J.registerContainer(t);return z[n]=e,n},_renderNewRootComponent:function(e,t,n,r){j(null==b.current,"_renderNewRootComponent(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. Check the render method of %s.",b.current&&b.current.getName()||"ReactCompositeComponent");var o=D(e,null),a=J._registerComponent(o,t);return x.batchedUpdates(v,o,a,t,n,r),__DEV__&&(W[a]=i(t)),o},renderSubtreeIntoContainer:function(e,t,n,r){return M(null!=e&&null!=e._reactInternalInstance,"parentComponent must be a valid React Component"),J._renderSubtreeIntoContainer(e,t,n,r)},_renderSubtreeIntoContainer:function(e,t,n,r){M(S.isValidElement(t),"React.render(): Invalid component element.%s","string"==typeof t?" Instead of passing an element string, make sure to instantiate it by passing it to React.createElement.":"function"==typeof t?" Instead of passing a component class, make sure to instantiate it by passing it to React.createElement.":null!=t&&void 0!==t.props?" This may be caused by unintentionally loading two independent copies of React.":""),j(!n||!n.tagName||"BODY"!==n.tagName.toUpperCase(),"render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.");var a=new S(X,null,null,null,t),s=z[o(n)];if(s){var u=s._currentElement,c=u.props;if(A(c,t))return J._updateRootComponent(s,a,n,r)._renderedComponent.getPublicInstance();J.unmountComponentAtNode(n)}var l=i(n),p=l&&J.isRenderedByReact(l);if(__DEV__&&(!p||l.nextSibling))for(var h=l;h;){if(J.isRenderedByReact(h)){j(!1,"render(): Target node has markup rendered by React, but there are unrelated nodes as well. This is most commonly caused by white-space inserted around server-rendered markup.");break}h=h.nextSibling}var d=p&&!s,f=J._renderNewRootComponent(a,n,d,null!=e?e._reactInternalInstance._processChildContext(e._reactInternalInstance._context):P)._renderedComponent.getPublicInstance();return r&&r.call(f),f},render:function(e,t,n){return J._renderSubtreeIntoContainer(null,e,t,n)},registerContainer:function(e){var t=o(e);return t&&(t=E.getReactRootIDFromNodeID(t)),t||(t=E.createReactRootID()),G[t]=e,t},unmountComponentAtNode:function(e){j(null==b.current,"unmountComponentAtNode(): Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate. Check the render method of %s.",b.current&&b.current.getName()||"ReactCompositeComponent"),M(e&&(e.nodeType===H||e.nodeType===U||e.nodeType===q),"unmountComponentAtNode(...): Target container is not a DOM element.");var t=o(e),n=z[t];return n?(x.batchedUpdates(g,n,e),delete z[t],delete G[t],__DEV__&&delete W[t],!0):!1},findReactContainerForID:function(e){var t=E.getReactRootIDFromNodeID(e),n=G[t];if(__DEV__){var r=W[t];if(r&&r.parentNode!==n){j(s(r)===t,"ReactMount: Root element ID differed from reactRootID.");var i=n.firstChild;i&&t===s(i)?W[t]=i:j(!1,"ReactMount: Root element has been removed from its original container. New container: %s",r.parentNode)}}return n},findReactNodeByID:function(e){var t=J.findReactContainerForID(e);return J.findComponentRoot(t,e)},isRenderedByReact:function(e){if(1!==e.nodeType)return!1;var t=J.getID(e);return t?t.charAt(0)===V:!1},getFirstReactDOM:function(e){for(var t=e;t&&t.parentNode!==t;){if(J.isRenderedByReact(t))return t;t=t.parentNode}return null},findComponentRoot:function(e,t){var n=Y,r=0,i=f(t)||e;for(n[0]=i.firstChild,n.length=1;r when using tables, nesting tags like
,

, or , or using non-SVG elements in an parent. Try inspecting the child nodes of the element with React ID `%s`.",t,J.getID(e))},_mountImageIntoNode:function(e,t,n){if(M(t&&(t.nodeType===H||t.nodeType===U||t.nodeType===q),"mountComponentIntoNode(...): Target container is not valid."),n){var o=i(t);if(w.canReuseMarkup(e,o))return;var a=o.getAttribute(w.CHECKSUM_ATTR_NAME);o.removeAttribute(w.CHECKSUM_ATTR_NAME);var s=o.outerHTML;o.setAttribute(w.CHECKSUM_ATTR_NAME,a);var u=r(e,s),c=" (client) "+e.substring(u-20,u+20)+"\n (server) "+s.substring(u-20,u+20);M(t.nodeType!==U,"You're trying to render a component to the document using server rendering but the checksum was invalid. This usually means you rendered a different component type or props on the client from the one on the server, or your render() methods are impure. React cannot handle this case due to cross-browser quirks by rendering at the document root. You should look for environment dependent code in your components and ensure the props are the same client and server side:\n%s",c),__DEV__&&j(!1,"React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:\n%s",c)}M(t.nodeType!==U,"You're trying to render a component to the document but you didn't use server rendering. We can't do this without using server rendering due to cross-browser quirks. See React.renderToString() for server rendering."),k(t,e)},getReactRootID:o,getID:a,setID:u,getNode:c,getNodeFromInstance:l,purgeID:h};C.measureMethods(J,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"}),n.exports=J}),__d("ReactBrowserEventEmitter",["EventConstants","EventPluginHub","EventPluginRegistry","ReactEventEmitterMixin","ViewportMetrics","Object.assign","isEventSupported"],function(e,t,n){"use strict";function r(e){return Object.prototype.hasOwnProperty.call(e,m)||(e[m]=d++,p[e[m]]={}),p[e[m]]}var i=t("EventConstants"),o=t("EventPluginHub"),a=t("EventPluginRegistry"),s=t("ReactEventEmitterMixin"),u=t("ViewportMetrics"),c=t("Object.assign"),l=t("isEventSupported"),p={},h=!1,d=0,f={topBlur:"blur",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topScroll:"scroll",topSelectionChange:"selectionchange",topTextInput:"textInput",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topWheel:"wheel"},m="_reactListenersID"+String(Math.random()).slice(2),v=c({},s,{ReactEventListener:null,injection:{injectReactEventListener:function(e){e.setHandleTopLevel(v.handleTopLevel),v.ReactEventListener=e}},setEnabled:function(e){v.ReactEventListener&&v.ReactEventListener.setEnabled(e)},isEnabled:function(){return!(!v.ReactEventListener||!v.ReactEventListener.isEnabled())},listenTo:function(e,t){for(var n=t,o=r(n),s=a.registrationNameDependencies[e],u=i.topLevelTypes,c=0;c"," "+i.CHECKSUM_ATTR_NAME+'="'+t+'">')},canReuseMarkup:function(e,t){var n=t.getAttribute(i.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(e);return o===n}};n.exports=i}),__d("adler32",[],function(e,t,n){"use strict";function r(e){for(var t=1,n=0,r=0;r]/,a=function(e,t){e.innerHTML=t +};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(a=function(e,t){MSApp.execUnsafeLocalFunction(function(){e.innerHTML=t})}),r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(a=function(e,t){if(e.parentNode&&e.parentNode.replaceChild(e,e),i.test(t)||"<"===t[0]&&o.test(t)){e.innerHTML=String.fromCharCode(65279)+t;var n=e.firstChild;1===n.data.length?e.removeChild(n):n.deleteData(0,1)}else e.innerHTML=t})}n.exports=a}),__d("validateDOMNesting",["Object.assign","emptyFunction","warning"],function(e,t,n){"use strict";var r=t("Object.assign"),i=t("emptyFunction"),o=t("warning"),a=i;if(__DEV__){var s=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],u=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],c=u.concat(["button"]),l=["dd","dt","li","option","optgroup","p","rp","rt"],p={parentTag:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null},h=function(e,t,n){var i=r({},e||p),o={tag:t,instance:n};return-1!==u.indexOf(t)&&(i.aTagInScope=null,i.buttonTagInScope=null,i.nobrTagInScope=null),-1!==c.indexOf(t)&&(i.pTagInButtonScope=null),-1!==s.indexOf(t)&&"address"!==t&&"div"!==t&&"p"!==t&&(i.listItemTagAutoclosing=null,i.dlItemTagAutoclosing=null),i.parentTag=o,"form"===t&&(i.formTag=o),"a"===t&&(i.aTagInScope=o),"button"===t&&(i.buttonTagInScope=o),"nobr"===t&&(i.nobrTagInScope=o),"p"===t&&(i.pTagInButtonScope=o),"li"===t&&(i.listItemTagAutoclosing=o),("dd"===t||"dt"===t)&&(i.dlItemTagAutoclosing=o),i},d=function(e,t){switch(t){case"select":return"option"===e||"optgroup"===e||"#text"===e;case"optgroup":return"option"===e||"#text"===e;case"option":return"#text"===e;case"tr":return"th"===e||"td"===e||"style"===e||"script"===e||"template"===e;case"tbody":case"thead":case"tfoot":return"tr"===e||"style"===e||"script"===e||"template"===e;case"colgroup":return"col"===e||"template"===e;case"table":return"caption"===e||"colgroup"===e||"tbody"===e||"tfoot"===e||"thead"===e||"style"===e||"script"===e||"template"===e;case"head":return"base"===e||"basefont"===e||"bgsound"===e||"link"===e||"meta"===e||"title"===e||"noscript"===e||"noframes"===e||"style"===e||"script"===e||"template"===e;case"html":return"head"===e||"body"===e}switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t;case"rp":case"rt":return-1===l.indexOf(t);case"caption":case"col":case"colgroup":case"frame":case"head":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return null==t}return!0},f=function(e,t){switch(e){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return t.pTagInButtonScope;case"form":return t.formTag||t.pTagInButtonScope;case"li":return t.listItemTagAutoclosing;case"dd":case"dt":return t.dlItemTagAutoclosing;case"button":return t.buttonTagInScope;case"a":return t.aTagInScope;case"nobr":return t.nobrTagInScope}return null},m=function(e){if(!e)return[];var t=[];do t.push(e);while(e=e._currentElement._owner);return t.reverse(),t},v={};a=function(e,t,n){n=n||p;var r=n.parentTag,i=r&&r.tag,a=d(e,i)?null:r,s=a?null:f(e,n),u=a||s;if(u){var c,l=u.tag,h=u.instance,g=t&&t._currentElement._owner,y=h&&h._currentElement._owner,_=m(g),b=m(y),S=Math.min(_.length,b.length),R=-1;for(c=0;S>c&&_[c]===b[c];c++)R=c;var E="(unknown)",T=_.slice(R+1).map(function(e){return e.getName()||E}),w=b.slice(R+1).map(function(e){return e.getName()||E}),C=[].concat(-1!==R?_[R].getName()||E:[],w,l,s?["..."]:[],T,e).join(" > "),I=!!a+"|"+e+"|"+l+"|"+C;if(v[I])return;if(v[I]=!0,a){var O="";"table"===l&&"tr"===e&&(O+=" Add a to your code to match the DOM tree generated by the browser."),o(!1,"validateDOMNesting(...): <%s> cannot appear as a child of <%s>. See %s.%s",e,l,C,O)}else o(!1,"validateDOMNesting(...): <%s> cannot appear as a descendant of <%s>. See %s.",e,l,C)}},a.ancestorInfoContextKey="__validateDOMNesting_ancestorInfo$"+Math.random().toString(36).slice(2),a.updatedAncestorInfo=h,a.isTagValidInContext=function(e,t){t=t||p;var n=t.parentTag,r=n&&n.tag;return d(e,r)&&!f(e,t)}}n.exports=a}),__d("AppStateIOS",["Map","NativeModules","RCTDeviceEventEmitter","logError","invariant"],function(e,t,n){"use strict";var r=t("Map"),i=t("NativeModules"),o=t("RCTDeviceEventEmitter"),a=i.AppState,s=t("logError"),u=t("invariant"),c={change:new r,memoryWarning:new r},l={addEventListener:function(e,t){u(-1!==["change","memoryWarning"].indexOf(e),'Trying to subscribe to unknown event: "%s"',e),"change"===e?c[e].set(t,o.addListener("appStateDidChange",function(e){t(e.app_state)})):"memoryWarning"===e&&c[e].set(t,o.addListener("memoryWarning",t))},removeEventListener:function(e,t){u(-1!==["change","memoryWarning"].indexOf(e),'Trying to remove listener for unknown event: "%s"',e),c[e].has(t)&&(c[e].get(t).remove(),c[e]["delete"](t))},currentState:a&&a.initialAppState};o.addListener("appStateDidChange",function(e){l.currentState=e.app_state}),a.getCurrentAppState(function(e){l.currentState=e.app_state},s),n.exports=l}),__d("CameraRoll",["ReactPropTypes","NativeModules","createStrictShapeTypeChecker","deepFreezeAndThrowOnMutationInDev","invariant"],function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=function(){function e(e,t){for(var n=0;n10?10:this.state.list.length,n=0;t>n;n++){var i=this.state.list[n];e.push(r.createElement(d,{style:y.item,onPress:this._loadDetail.bind(this,i.id,i.name)},r.createElement(s,{style:y.row},r.createElement(s,{style:{flex:1}},r.createElement(c,{numberOfLines:1,style:y.name},i.name),r.createElement(c,{numberOfLines:1,style:y.type},i.type)),r.createElement(s,{style:y.distance},r.createElement(c,{numberOfLines:1,style:[y.mi,{color:"#4C4C4C"}]},i.distance,"米"),r.createElement(c,{numberOfLines:1,style:y.address},i.address))),i.tel.length?r.createElement(d,{style:y.phone,onPress:this._call.bind(this,i.tel)},r.createElement(c,{numberOfLines:1},"电话")):null))}var o="搜索"+this.props.type;return r.createElement(u,{style:y.container},r.createElement(s,{style:y.searchBg},r.createElement(p,{style:y.input,placeholder:o,onChangeText:this._onChangeText,onEndEditing:this._onEndEditing}),r.createElement(s,null,r.createElement(c,{style:y.tip},"已为您筛选",r.createElement(c,{style:{color:"#FA2530"}},this.state.count),"条数据"))),e,e.length?null:r.createElement(s,{style:y.activity},r.createElement(h,{color:"#248BFD"})),r.createElement(s,{style:{height:40}}))},componentDidMount:function(){var e=this;i.getCurrentPosition(function(t){var n=t.coords.longitude+","+t.coords.latitude;v.setItem("pos",n);var r=o.searchURL+"key="+o.amapKey+"&keywords="+e.props.type+"&extensions=base"; +_GEO_OPEN?(r+="&location="+n,e._doGetData(r)):(r+="&location="+_GEO_TEST_POS,e._doGetData(r))},function(){alert("定位失败,请重新开启应用定位")})},_doGetData:function(e){var t=this;o.getJSON(e,function(e){if(e.status&&"OK"===e.info){var n=e.pois.length>10?10:e.pois.length;t._addStorage(e),t.setState({list:e.pois,count:n})}else alert("没有查询到相应的数据")})},_loadDetail:function(e,t){this.props.nav.push({component:a,title:t,passProps:{id:e}})},_onChangeText:function(e){this.setState({keywords:e})},_onEndEditing:function(){var e=this,t=this.state.keywords,n=o.searchURL+"key="+o.amapKey+"&keywords="+t+"&types="+e.props.type+"&extensions=base";e.setState({list:null}),v.getItem("pos",function(t,r){_GEO_OPEN?t?alert("定位失败"):(n+="&location="+r,e._doGetData(n)):(n+="&location="+_GEO_TEST_POS,e._doGetData(n))})},_addStorage:function(e){for(var t=[],n=e.pois.length>10?10:e.pois.length,r=0;n>r;r++)t.push(e.pois[r].location);var i=t.join(",");v.setItem("_"+this.props.type,i)},_call:function(e){if(e.length){var t=e.split(";"),n=[];for(var r in t)n.push(t[r]);n.push("取消"),m.showActionSheetWithOptions({options:n,cancelButtonIndex:n.length-1},function(e){t[e]&&f.openURL("tel://"+t[e])})}else alert("没有提供号码")}}),y=l.create({container:{flex:1,backgroundColor:"#ddd"},input:{height:38,marginLeft:10,marginRight:10,borderWidth:o.pixel,paddingLeft:5,marginTop:10,borderColor:"#868687",borderRadius:3,fontSize:15},tip:{fontSize:12,marginLeft:10,marginTop:5,color:"#505050"},row:{flexDirection:"row",marginLeft:10,marginRight:10,marginTop:10,paddingTop:5},distance:{width:120,alignItems:"flex-end"},name:{fontSize:15,marginBottom:6},type:{fontSize:12,color:"#686868"},mi:{fontSize:12,color:"#686868"},address:{fontSize:12,marginTop:5,color:"#686868"},phone:{marginLeft:10,marginRight:10,height:30,marginTop:10,justifyContent:"center",alignItems:"center",borderWidth:o.pixel,borderColor:"#ccc",borderRadius:2},searchBg:{backgroundColor:"#fff",paddingBottom:10},item:{marginTop:10,backgroundColor:"#fff",paddingBottom:10,borderTopWidth:o.pixel,borderBottomWidth:o.pixel,borderColor:"#ccc"},activity:{marginTop:50,justifyContent:"center",alignItems:"center"}});n.exports=g}),__d("nearby/Nearby/views/util.js",["react-native/Libraries/react-native/react-native.js","Dimensions"],function(e,t,n){var r=t("react-native/Libraries/react-native/react-native.js"),i=t("Dimensions"),o=r.PixelRatio,a={pixel:1/o.get(),size:{width:i.get("window").width,height:i.get("window").height},post:function(e,t,n){var r={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(t)};fetch(e,r).then(function(e){return e.text()}).then(function(e){n(JSON.parse(e))})},getJSON:function(e,t){fetch(e).then(function(e){return e.text()}).then(function(e){t(JSON.parse(e))})},amapKey:"98cd4d3c1c2865132e73d851654c9c1b",searchURL:"http://restapi.amap.com/v3/place/around?",detailURL:"http://restapi.amap.com/v3/place/detail?"};n.exports=a}),__d("nearby/Nearby/views/detail.js",["react-native/Libraries/react-native/react-native.js","nearby/Nearby/views/util.js"],function(e,t,n){var r=t("react-native/Libraries/react-native/react-native.js"),i=t("nearby/Nearby/views/util.js"),o=r.View,a=r.ScrollView,s=r.Text,u=r.StyleSheet,c=(r.TextInput,r.ActivityIndicatorIOS,r.TouchableOpacity,r.createClass({displayName:"FoodDetail",getInitialState:function(){return{data:null}},render:function(){return r.createElement(a,null,this.state.data?r.createElement(o,{style:l.content},r.createElement(s,{style:l.name},this.state.data.name),r.createElement(s,{style:l.types},"类型:",this.state.data.type),r.createElement(s,{style:l.address},"地址:",this.state.data.address),r.createElement(s,{style:l.tag},"标签:",this.state.data.tag),r.createElement(s,{style:l.server},"服务:",this.state.data.server)):null)},componentDidMount:function(){var e=this,t=i.detailURL+"key="+i.amapKey+"&id="+this.props.id+"&extensions=all";i.getJSON(t,function(t){if(t.status&&"OK"===t.info&&t.pois.length){var n=t.pois[0];n.deep_info&&n.deep_info.tag&&(n.server=n.deep_info.tag),e.setState({data:n})}else alert("数据服务出错")})}})),l=u.create({container:{flex:1},name:{fontSize:15,color:"#1D92F5",fontWeight:"bold"},content:{marginLeft:10,marginRight:10,marginTop:10},tag:{fontSize:13,marginTop:10},types:{marginTop:10,fontSize:13,color:"#4C4C4C"},address:{fontSize:13,color:"#4C4C4C"},server:{marginTop:10,fontSize:13}});n.exports=c}),__d("nearby/Nearby/views/film.js",["react-native/Libraries/react-native/react-native.js","nearby/Nearby/views/list.js"],function(e,t,n){var r=t("react-native/Libraries/react-native/react-native.js"),i=t("nearby/Nearby/views/list.js"),o=r.createClass({displayName:"Film",render:function(){return r.createElement(i,{type:"电影院",nav:this.props.navigator})}});n.exports=o}),__d("nearby/Nearby/views/food.js",["react-native/Libraries/react-native/react-native.js","nearby/Nearby/views/list.js"],function(e,t,n){var r=t("react-native/Libraries/react-native/react-native.js"),i=t("nearby/Nearby/views/list.js"),o=r.createClass({displayName:"Food",render:function(){return r.createElement(i,{type:"餐饮",nav:this.props.navigator})}});n.exports=o}),__d("nearby/Nearby/views/toilet.js",["react-native/Libraries/react-native/react-native.js","nearby/Nearby/views/list.js"],function(e,t,n){var r=t("react-native/Libraries/react-native/react-native.js"),i=t("nearby/Nearby/views/list.js"),o=r.createClass({displayName:"Toilet",render:function(){return r.createElement(i,{type:"厕所",nav:this.props.navigator})}});n.exports=o}),__d("nearby/Nearby/views/map.js",["react-native/Libraries/react-native/react-native.js"],function(e,t,n){var r=t("react-native/Libraries/react-native/react-native.js"),i=r.View,o=(r.Text,r.WebView),a=r.AsyncStorage,s=r.createClass({displayName:"Map",getInitialState:function(){return{url:null}},render:function(){var e=null;return this.state.url&&(e=r.createElement(o,{url:this.state.url})),r.createElement(i,{style:{flex:1}},e)},componentDidMount:function(){var e=this;a.multiGet(["_"+e.props.type,"pos"],function(t,n){if(t)alert("定位失败");else{var r=n[1][1],i=n[0][1],o="http://vczero.github.io/webview/index.html?";o+=_GEO_OPEN?"pos="+r+"&markers="+i:"pos="+_GEO_TEST_POS+"6&markers="+i,e.setState({url:o})}})}});n.exports=s}),__d("image!food",[],function(e,t,n){n.exports={__packager_asset:!0,isStatic:!0,path:"/Users/lihua/work/github/React-Native-App/nearby/ios/nearby/Images.xcassets/food.imageset/food.png",uri:"food",width:24,height:23,deprecated:!0}}),__d("image!film",[],function(e,t,n){n.exports={__packager_asset:!0,isStatic:!0,path:"/Users/lihua/work/github/React-Native-App/nearby/ios/nearby/Images.xcassets/film.imageset/film.png",uri:"film",width:32,height:32,deprecated:!0}}),__d("image!bank",[],function(e,t,n){n.exports={__packager_asset:!0,isStatic:!0,path:"/Users/lihua/work/github/React-Native-App/nearby/ios/nearby/Images.xcassets/bank.imageset/bank.png",uri:"bank",width:24,height:24,deprecated:!0}}),__d("image!toilet",[],function(e,t,n){n.exports={__packager_asset:!0,isStatic:!0,path:"/Users/lihua/work/github/React-Native-App/nearby/ios/nearby/Images.xcassets/toilet.imageset/toilet.png",uri:"toilet",width:22,height:23,deprecated:!0}}),require("nearby/index.ios.js"); +//# sourceMappingURL=bundle.js \ No newline at end of file diff --git a/nearby/ios/nearby.xcodeproj/project.pbxproj b/nearby/ios/nearby.xcodeproj/project.pbxproj new file mode 100644 index 00000000..98f2ee41 --- /dev/null +++ b/nearby/ios/nearby.xcodeproj/project.pbxproj @@ -0,0 +1,639 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 008F07F21AC5B25A0029DE68 /* main.jsbundle */; }; + 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; + 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; + 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; + 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; + 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; + 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; + 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; + 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; + 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; + 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTActionSheet; + }; + 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTGeolocation; + }; + 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5115D1A9E6B3D00147676; + remoteInfo = RCTImage; + }; + 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B511DB1A9E6C8500147676; + remoteInfo = RCTNetwork; + }; + 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; + remoteInfo = RCTVibration; + }; + 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTSettings; + }; + 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 3C86DF461ADF2C930047B81A; + remoteInfo = RCTWebSocket; + }; + 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; + remoteInfo = React; + }; + 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 134814201AA4EA6300B7C361; + remoteInfo = RCTLinking; + }; + 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 58B5119B1A9E6C1200147676; + remoteInfo = RCTText; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; + 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 00E356F21AD99517003FC87E /* nearbyTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = nearbyTests.m; sourceTree = ""; }; + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; + 13B07F961A680F5B00A75B9A /* nearby.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = nearby.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = nearby/AppDelegate.h; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = nearby/AppDelegate.m; sourceTree = ""; }; + 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = nearby/Images.xcassets; sourceTree = ""; }; + 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = nearby/Info.plist; sourceTree = ""; }; + 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = nearby/main.m; sourceTree = ""; }; + 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 146834051AC3E58100842450 /* libReact.a in Frameworks */, + 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, + 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, + 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, + 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, + 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, + 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, + 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, + 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, + 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00C302A81ABCB8CE00DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302B61ABCB90400DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302BC1ABCB91800DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302D41ABCB9D200DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, + ); + name = Products; + sourceTree = ""; + }; + 00C302E01ABCB9EE00DB3ED1 /* Products */ = { + isa = PBXGroup; + children = ( + 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, + ); + name = Products; + sourceTree = ""; + }; + 00E356EF1AD99517003FC87E /* nearbyTests */ = { + isa = PBXGroup; + children = ( + 00E356F21AD99517003FC87E /* nearbyTests.m */, + 00E356F01AD99517003FC87E /* Supporting Files */, + ); + path = nearbyTests; + sourceTree = ""; + }; + 00E356F01AD99517003FC87E /* Supporting Files */ = { + isa = PBXGroup; + children = ( + 00E356F11AD99517003FC87E /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + 139105B71AF99BAD00B5F7CC /* Products */ = { + isa = PBXGroup; + children = ( + 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, + ); + name = Products; + sourceTree = ""; + }; + 139FDEE71B06529A00C62182 /* Products */ = { + isa = PBXGroup; + children = ( + 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, + ); + name = Products; + sourceTree = ""; + }; + 13B07FAE1A68108700A75B9A /* nearby */ = { + isa = PBXGroup; + children = ( + 008F07F21AC5B25A0029DE68 /* main.jsbundle */, + 13B07FAF1A68108700A75B9A /* AppDelegate.h */, + 13B07FB01A68108700A75B9A /* AppDelegate.m */, + 13B07FB51A68108700A75B9A /* Images.xcassets */, + 13B07FB61A68108700A75B9A /* Info.plist */, + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, + 13B07FB71A68108700A75B9A /* main.m */, + ); + name = nearby; + sourceTree = ""; + }; + 146834001AC3E56700842450 /* Products */ = { + isa = PBXGroup; + children = ( + 146834041AC3E56700842450 /* libReact.a */, + ); + name = Products; + sourceTree = ""; + }; + 78C398B11ACF4ADC00677621 /* Products */ = { + isa = PBXGroup; + children = ( + 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, + ); + name = Products; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + 146833FF1AC3E56700842450 /* React.xcodeproj */, + 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, + 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, + 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, + 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, + 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, + 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, + 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, + 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, + 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, + ); + name = Libraries; + sourceTree = ""; + }; + 832341B11AAA6A8300B99B32 /* Products */ = { + isa = PBXGroup; + children = ( + 832341B51AAA6A8300B99B32 /* libRCTText.a */, + ); + name = Products; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 13B07FAE1A68108700A75B9A /* nearby */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 00E356EF1AD99517003FC87E /* nearbyTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* nearby.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 13B07F861A680F5B00A75B9A /* nearby */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "nearby" */; + buildPhases = ( + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = nearby; + productName = "Hello World"; + productReference = 13B07F961A680F5B00A75B9A /* nearby.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0720; + ORGANIZATIONNAME = Facebook; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "nearby" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; + ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; + }, + { + ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; + ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; + }, + { + ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; + ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; + }, + { + ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; + ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; + }, + { + ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; + ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; + }, + { + ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; + ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; + }, + { + ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; + ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; + }, + { + ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; + ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; + }, + { + ProductGroup = 139FDEE71B06529A00C62182 /* Products */; + ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; + }, + { + ProductGroup = 146834001AC3E56700842450 /* Products */; + ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* nearby */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTActionSheet.a; + remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTGeolocation.a; + remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTImage.a; + remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTNetwork.a; + remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTVibration.a; + remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTSettings.a; + remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTWebSocket.a; + remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 146834041AC3E56700842450 /* libReact.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libReact.a; + remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTLinking.a; + remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libRCTText.a; + remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 008F07F31AC5B25A0029DE68 /* main.jsbundle in Resources */, + 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, + 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, + 13B07FC11A68108700A75B9A /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { + isa = PBXVariantGroup; + children = ( + 13B07FB21A68108700A75B9A /* Base */, + ); + name = LaunchScreen.xib; + path = nearby; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../node_modules/react-native/React/**", + ); + INFOPLIST_FILE = nearby/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = com.vczero; + PRODUCT_NAME = nearby; + PROVISIONING_PROFILE = "74fd2287-4be2-4918-ad95-cce0c4f670e1"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../node_modules/react-native/React/**", + ); + INFOPLIST_FILE = nearby/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = "-ObjC"; + PRODUCT_BUNDLE_IDENTIFIER = com.vczero; + PRODUCT_NAME = nearby; + PROVISIONING_PROFILE = "74fd2287-4be2-4918-ad95-cce0c4f670e1"; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../node_modules/react-native/React/**", + ); + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = YES; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + HEADER_SEARCH_PATHS = ( + "$(inherited)", + /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, + "$(SRCROOT)/../node_modules/react-native/React/**", + ); + IPHONEOS_DEPLOYMENT_TARGET = 7.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "nearby" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "nearby" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/nearby/ios/nearby.xcodeproj/xcshareddata/xcschemes/nearby.xcscheme b/nearby/ios/nearby.xcodeproj/xcshareddata/xcschemes/nearby.xcscheme new file mode 100644 index 00000000..40be0e89 --- /dev/null +++ b/nearby/ios/nearby.xcodeproj/xcshareddata/xcschemes/nearby.xcscheme @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nearby/ios/nearby/AppDelegate.h b/nearby/ios/nearby/AppDelegate.h new file mode 100644 index 00000000..a9654d5e --- /dev/null +++ b/nearby/ios/nearby/AppDelegate.h @@ -0,0 +1,16 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +@interface AppDelegate : UIResponder + +@property (nonatomic, strong) UIWindow *window; + +@end diff --git a/nearby/ios/nearby/AppDelegate.m b/nearby/ios/nearby/AppDelegate.m new file mode 100644 index 00000000..40cad758 --- /dev/null +++ b/nearby/ios/nearby/AppDelegate.m @@ -0,0 +1,58 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import "AppDelegate.h" + +#import "RCTRootView.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + NSURL *jsCodeLocation; + + /** + * Loading JavaScript code - uncomment the one you want. + * + * OPTION 1 + * Load from development server. Start the server from the repository root: + * + * $ npm start + * + * To run on device, change `localhost` to the IP address of your computer + * (you can get this by typing `ifconfig` into the terminal and selecting the + * `inet` value under `en0:`) and make sure your computer and iOS device are + * on the same Wi-Fi network. + */ + + jsCodeLocation = [NSURL URLWithString:@"http://127.0.0.1:8081/index.ios.bundle"]; + //jsCodeLocation = [NSURL URLWithString:@"http://vczero.github.io/react/main.jsbundle"]; + + /** + * OPTION 2 + * Load from pre-bundled file on disk. The static bundle is automatically + * generated by "Bundle React Native code and images" build step. + */ + +// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; + + RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation + moduleName:@"nearby" + initialProperties:nil + launchOptions:launchOptions]; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +@end diff --git a/nearby/ios/nearby/Base.lproj/LaunchScreen.xib b/nearby/ios/nearby/Base.lproj/LaunchScreen.xib new file mode 100644 index 00000000..2064a62c --- /dev/null +++ b/nearby/ios/nearby/Base.lproj/LaunchScreen.xib @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/nearby/ios/nearby/Images.xcassets/AppIcon.appiconset/Contents.json b/nearby/ios/nearby/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..118c98f7 --- /dev/null +++ b/nearby/ios/nearby/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,38 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/nearby/ios/nearby/Images.xcassets/bank.imageset/Contents.json b/nearby/ios/nearby/Images.xcassets/bank.imageset/Contents.json new file mode 100644 index 00000000..cc0af50f --- /dev/null +++ b/nearby/ios/nearby/Images.xcassets/bank.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "bank.png" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/nearby/ios/nearby/Images.xcassets/bank.imageset/bank.png b/nearby/ios/nearby/Images.xcassets/bank.imageset/bank.png new file mode 100644 index 00000000..0891eedb Binary files /dev/null and b/nearby/ios/nearby/Images.xcassets/bank.imageset/bank.png differ diff --git a/nearby/ios/nearby/Images.xcassets/film.imageset/Contents.json b/nearby/ios/nearby/Images.xcassets/film.imageset/Contents.json new file mode 100644 index 00000000..10182985 --- /dev/null +++ b/nearby/ios/nearby/Images.xcassets/film.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "film.png" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/nearby/ios/nearby/Images.xcassets/film.imageset/film.png b/nearby/ios/nearby/Images.xcassets/film.imageset/film.png new file mode 100644 index 00000000..a909b536 Binary files /dev/null and b/nearby/ios/nearby/Images.xcassets/film.imageset/film.png differ diff --git a/nearby/ios/nearby/Images.xcassets/food.imageset/Contents.json b/nearby/ios/nearby/Images.xcassets/food.imageset/Contents.json new file mode 100644 index 00000000..d479df35 --- /dev/null +++ b/nearby/ios/nearby/Images.xcassets/food.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "food.png" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/nearby/ios/nearby/Images.xcassets/food.imageset/food.png b/nearby/ios/nearby/Images.xcassets/food.imageset/food.png new file mode 100644 index 00000000..acb10220 Binary files /dev/null and b/nearby/ios/nearby/Images.xcassets/food.imageset/food.png differ diff --git a/nearby/ios/nearby/Images.xcassets/toilet.imageset/Contents.json b/nearby/ios/nearby/Images.xcassets/toilet.imageset/Contents.json new file mode 100644 index 00000000..701e0664 --- /dev/null +++ b/nearby/ios/nearby/Images.xcassets/toilet.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x", + "filename" : "toilet.png" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/nearby/ios/nearby/Images.xcassets/toilet.imageset/toilet.png b/nearby/ios/nearby/Images.xcassets/toilet.imageset/toilet.png new file mode 100644 index 00000000..89068dfc Binary files /dev/null and b/nearby/ios/nearby/Images.xcassets/toilet.imageset/toilet.png differ diff --git a/nearby/ios/nearby/Info.plist b/nearby/ios/nearby/Info.plist new file mode 100644 index 00000000..d0e786b8 --- /dev/null +++ b/nearby/ios/nearby/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + com.vczero + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + NSLocationWhenInUseUsageDescription + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + + + diff --git a/nearby/ios/nearby/main.m b/nearby/ios/nearby/main.m new file mode 100644 index 00000000..3d767fcb --- /dev/null +++ b/nearby/ios/nearby/main.m @@ -0,0 +1,18 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/address_book/address_bookTests/Info.plist b/nearby/ios/nearbyTests/Info.plist similarity index 100% rename from address_book/address_bookTests/Info.plist rename to nearby/ios/nearbyTests/Info.plist diff --git a/nearby/ios/nearbyTests/nearbyTests.m b/nearby/ios/nearbyTests/nearbyTests.m new file mode 100644 index 00000000..2d7091d0 --- /dev/null +++ b/nearby/ios/nearbyTests/nearbyTests.m @@ -0,0 +1,70 @@ +/** + * Copyright (c) 2015-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + */ + +#import +#import + +#import "RCTLog.h" +#import "RCTRootView.h" + +#define TIMEOUT_SECONDS 240 +#define TEXT_TO_LOOK_FOR @"Welcome to React Native!" + +@interface nearbyTests : XCTestCase + +@end + +@implementation nearbyTests + +- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test +{ + if (test(view)) { + return YES; + } + for (UIView *subview in [view subviews]) { + if ([self findSubviewInView:subview matching:test]) { + return YES; + } + } + return NO; +} + +- (void)testRendersWelcomeScreen +{ + UIViewController *vc = [[[[UIApplication sharedApplication] delegate] window] rootViewController]; + NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; + BOOL foundElement = NO; + + __block NSString *redboxError = nil; + RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { + if (level >= RCTLogLevelError) { + redboxError = message; + } + }); + + while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { + [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; + + foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) { + if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { + return YES; + } + return NO; + }]; + } + + RCTSetLogFunction(RCTDefaultLogFunction); + + XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); + XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); +} + + +@end diff --git a/nearby/package.json b/nearby/package.json new file mode 100644 index 00000000..84946e28 --- /dev/null +++ b/nearby/package.json @@ -0,0 +1,11 @@ +{ + "name": "nearby", + "version": "0.0.1", + "private": true, + "scripts": { + "start": "react-native start" + }, + "dependencies": { + "react-native": "^0.17.0" + } +} diff --git a/pic/nearby/1.png b/pic/nearby/1.png new file mode 100644 index 00000000..4a658912 Binary files /dev/null and b/pic/nearby/1.png differ diff --git a/pic/nearby/2.png b/pic/nearby/2.png new file mode 100644 index 00000000..86c2be29 Binary files /dev/null and b/pic/nearby/2.png differ diff --git a/pic/nearby/3.png b/pic/nearby/3.png new file mode 100644 index 00000000..97c6bbc0 Binary files /dev/null and b/pic/nearby/3.png differ diff --git a/pic/nearby/4.png b/pic/nearby/4.png new file mode 100644 index 00000000..9fe36b24 Binary files /dev/null and b/pic/nearby/4.png differ diff --git a/pic/nearby/bank.png b/pic/nearby/bank.png new file mode 100644 index 00000000..0891eedb Binary files /dev/null and b/pic/nearby/bank.png differ diff --git a/pic/nearby/film.png b/pic/nearby/film.png new file mode 100644 index 00000000..a909b536 Binary files /dev/null and b/pic/nearby/film.png differ diff --git a/pic/nearby/food.png b/pic/nearby/food.png new file mode 100644 index 00000000..acb10220 Binary files /dev/null and b/pic/nearby/food.png differ diff --git a/pic/nearby/toilet.png b/pic/nearby/toilet.png new file mode 100644 index 00000000..89068dfc Binary files /dev/null and b/pic/nearby/toilet.png differ